• No results found

Development and Evaluation of an Inertial Sensor for Gait Analysis

N/A
N/A
Protected

Academic year: 2021

Share "Development and Evaluation of an Inertial Sensor for Gait Analysis"

Copied!
49
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

Development and Evaluation of an Inertial Sensor

for Gait Analysis

Examensarbete utfört i Elektroniksystem vid Tekniska högskolan i Linköping

av Björn Nutti LITH-ISY-EX--06/3940--SE

Linköping 2006

(2)
(3)

Development and Evaluation of an Inertial Sensor

for Gait Analysis

Examensarbete utfört i Elektroniksystem

vid Tekniska högskolan i Linköping

av

Björn Nutti LITH-ISY-EX--06/3940--SE

Handledare: Mark Vesterbacka

isy, Linköpings universitet, Linköping, Sverige

Wolfgang Liedecke

Hasomed GmbH, Magdeburg, Tyskland

Examinator: Mark Vesterbacka

(4)
(5)

Avdelning, Institution Division, Department

Division of Electronics System Department of Electrical Engineering Linköpings universitet

SE-581 83 Linköping, Sweden

Datum Date 2006-09-20 Språk Language ¤Svenska/Swedish ¤Engelska/English ¤ £ Rapporttyp Report category ¤Licentiatavhandling ¤Examensarbete ¤C-uppsats ¤D-uppsats ¤Övrig rapport ¤ £

URL för elektronisk version http://www.es.isy.liu.se http://www.ep.liu.se/2006/3940 ISBN  ISRN LITH-ISY-EX--06/3940--SE Serietitel och serienummer Title of series, numbering ISSN

Titel

Title Utveckling och utvärdering av en intertial sensor för gånganalysDevelopment and Evaluation of an Inertial Sensor for Gait Analysis

Författare

Author Björn Nutti

Sammanfattning Abstract

Hasomed GmbH, a German company in the eld of medicine technology, intends to introduce a gait analysis system on the market. The system includes an inertial sensor which collects data used for generating movement patterns of the feet. This thesis describes the development and evaluation of a new version of the sensor, aimed at minimizing costs, maximizing performance and facilitating production. Algorithms used in the gait analysis system are sensitive to noise. Noise sources and precautions taken in order to minimize noise levels are described and discussed. By minimizing the physical size of analogue electronics blocks, static noise and occasional high frequency components were substantially reduced.

New features including internal temperature sensors, rmware update via serial interface, self-test functions and a wireless link were implemented. Additional improvements are e.g. lower power consumption and an extension of the interface from 2 to 256 (theoretical limit) attached devices. By reducing the number of included components and PCB (Printed Circuit Board) layers, together with use of components that do not require advanced soldering techniques, easier and cheaper production was obtained.

Research and development presented in this thesis resulted in a sensor with overall good performance and new features.

(6)
(7)

Abstract

Hasomed GmbH, a German company in the eld of medicine technology, intends to introduce a gait analysis system on the market. The system includes an inertial sensor which collects data used for generating movement patterns of the feet. This thesis describes the development and evaluation of a new version of the sensor, aimed at minimizing costs, maximizing performance and facilitating production. Algorithms used in the gait analysis system are sensitive to noise. Noise sources and precautions taken in order to minimize noise levels are described and discussed. By minimizing the physical size of analogue electronics blocks, static noise and occasional high frequency components were substantially reduced.

New features including internal temperature sensors, rmware update via serial interface, self-test functions and a wireless link were implemented. Additional improvements are e.g. lower power consumption and an extension of the interface from 2 to 256 (theoretical limit) attached devices. By reducing the number of included components and PCB (Printed Circuit Board) layers, together with use of components that do not require advanced soldering techniques, easier and cheaper production was obtained.

Research and development presented in this thesis resulted in a sensor with overall good performance and new features.

(8)
(9)

Acknowledgments

I am very grateful that I was given the opportunity to do my master's thesis at Hasomed GmbH. I had a great time and met many inspiring, enthusiastic and competent persons. The atmosphere at Hasomed GmbH is fantastic and all of the co-workers have a nature of being friendly and helpful.

Special thanks to Dr. Peter Weber and Dr. Wolfgang Liedecke for giving me the opportunity to work in an interesting project such as this.

I am also grateful to my supervisor, Prof. Mark Vesterbacka, for support when needed.

Thanks to Josef Halfpapp, Matthias Weber, Dr. Ralf Kauert, and Dr.-Ing. Carsten Behling for fruitful discussions during my work at Hasomed GmbH.

I would also like to thank Johannes Hallqvist for establishing my contact with Ha-somed GmbH, Marcus Hennix for interesting discussions regarding my work and Erik Nyberg White and Josephine Speziali for proof-reading.

Finally, I would like to thank Josephine and my family for believing in and sup-porting me during my work.

(10)
(11)

Contents

1 Introduction 3 1.1 Scope . . . 3 1.2 Research Approach . . . 3 1.3 Thesis Outline . . . 4 2 Background 5 2.1 Inertial Sensor . . . 5

2.2 Microelectromechanical Systems (MEMS) . . . 5

2.2.1 Accelerometer . . . 6 2.2.2 Gyroscope . . . 7 2.3 Noise Sources . . . 8 2.3.1 Mechanical Noise . . . 9 2.3.2 Electrical Noise . . . 9 2.3.3 Quantization Noise . . . 10

3 Designing a New Sensor 11 3.1 Analysis of the Existing Inertial Sensor . . . 11

3.2 Specication of Requirements . . . 12 3.2.1 Signal Quality . . . 12 3.2.2 Quantization Resolution . . . 12 3.2.3 Temperature Drift . . . 12 3.2.4 Range of Measurement . . . 13 3.2.5 Bandwidth . . . 13 3.2.6 Sample Frequency . . . 13

3.3 Evaluation of Available Technology . . . 13

3.4 Status Seminar . . . 14 3.5 Sensor Development . . . 14 4 Quantization Precision 15 4.1 System Description . . . 15 4.1.1 Old Sensor . . . 15 4.1.2 New Sensor . . . 16 4.2 Signal Characteristics . . . 16 4.2.1 X - Source Signal . . . 17 4.2.2 M - Mechanical Noise . . . 17

(12)

4.2.3 I - Internal Electrical Noise . . . 17

4.2.4 W - External Electrical Noise . . . 17

4.2.5 QN - Quantization Noise . . . 18

4.3 Simulation of 12- and 16-bit Quantization . . . 18

4.3.1 Simulation Procedure . . . 18

4.3.2 Quantized Signal . . . 18

4.3.3 Introduced Error . . . 19

4.3.4 Signal-To-Noise Ratio . . . 19

4.3.5 Quantization Noise - Simulation 1 . . . 19

4.3.6 Quantization Noise - Simulation 2 . . . 20

4.3.7 Results from Noise Simulations . . . 21

5 Results 23 5.1 Quantization Noise . . . 23

5.1.1 Test Procedure . . . 23

5.1.2 Data Conversion . . . 23

5.1.3 Algorithms . . . 23

5.1.4 Simulations of 12- and 16-bit Precision . . . 24

5.2 Static Noise . . . 24

5.2.1 Gyroscopes . . . 25

5.3 Compliance with the Requirements . . . 27

5.3.1 Signal Quality . . . 27 5.3.2 Quantization Resolution . . . 27 5.3.3 Temperature Drift . . . 27 5.3.4 Range of Measurement . . . 27 5.3.5 Bandwidth . . . 28 5.3.6 Sample Frequency . . . 28

5.4 Additional Features and Improvements . . . 28

5.4.1 Reduced Power Consumption . . . 28

5.4.2 Internal Self-Test . . . 29

5.4.3 PCB with Fewer Layers . . . 29

5.4.4 Firmware Update via Serial Interface . . . 29

5.4.5 Bus System . . . 29 5.4.6 Wireless Link . . . 29 6 Conclusion 31 6.1 Enhanced Performance . . . 31 6.2 Easier Manufacturing . . . 31 6.3 New Features . . . 31 6.4 Future Work . . . 32 Bibliography 33 A Simulations 35 A.1 Simulation 1 . . . 35 A.2 Simulation 2 . . . 36 A.3 Simulation 3 . . . 36

(13)

Abbreviations

6DOF 6 Degrees Of Freedom

ADC Analogue-to-Digital Converter DC Direct Current

DOF Degree Of Freedom

IFF Fraunhofer-Institut für Fabrikbetrieb und -Automatisierung IMU Inertial Measurement Unit

MEMS Microelectromechanical Systems MST Micro Systems Technology PCB Printed Circuit Board PSD Power Spectral Density SNR Signal-to-Noise Ratio

(14)
(15)

Chapter 1

Introduction

In the eld of rehabilitation, an accurate diagnosis is of great importance. New technology makes way for new, more accurate analysis methods. Hasomed GmbH, located in Magdeburg Germany, is one of the leading companies in the area of gait analysis systems.

A gait analysis system records a subject's walk, divides it into steps and step phases. An inertial sensor integrated in the gait analysis system is used to record the walk. Hasomed GmbH developed their rst gait analysis system and inertial sensor in cooperation with Fraunhofer-Institut für Fabrikbetrieb (IFF). Introduc-ing this system on the market requires a more accurate, and cheaper, inertial sensor. To meet these requirements a second inertial sensor was developed by the author of this thesis.

1.1 Scope

This thesis aims at describing the development and evaluation of a new inertial sensor, which is going to be a part of the gait analysis system. The thesis starts with an evaluation of the existing sensor and ends in a nal comparison between the existing and the developed sensor. The existing is currently in use at Hasomed GmbH, the new one is developed by the author.

Components, design, implementation and sensitive data are excluded from this thesis since they are considered to be condential.

1.2 Research Approach

The following research approach was taken during the work with this thesis. Evaluating the existing sensor.

(16)

4 Introduction

Assembly of the new sensor's hardware. Developing rmware.

Evaluating the new sensor.

1.3 Thesis Outline

The thesis is outlined as follows; Chapter 2 gives the reader useful background in-formation, including expressions such as inertial sensor, MEMS and noise sources. A reader familiar with these concepts can skip this chapter. An overview of how the new sensor was developed is given in Chapter 3. Chapter 4 gives a theoret-ical discussion covering quantization resolution as a design parameter. Chapter 5 compares theory presented in Chapter 4 with actual tests. Static noise from the old and the new sensor are also compared. A presentation of how the new sensor complies with the specication of requirements as well as new features and improvements are also presented. Chapter 6 summarizes the dierence between the old and the new sensor. A presentation of possible further development is also presented.

(17)

Chapter 2

Background

In this chapter, background theory and commonly used concepts are explained. First, the characteristics of an inertial sensor are described. This is followed by a presentation of Microelectromechanical Systems (MEMS) sensors. Finally, dier-ent noise sources are discussed.

2.1 Inertial Sensor

An Inertial Sensor, also known as Inertial Measurement Unit (IMU), is a closed system used to detect motion and location. The expression Inertial Sensor is widely used to refer to a device, containing three accelerometers and three gyro-scopes. Accelerometers and gyroscopes are placed such that their measuring axes are mutually orthogonal. This arrangement makes it possible to measure full six-degree-of-freedom (6DOF).

Inertial sensors are used in many dierent elds, e.g. airbag deployment systems, autopilot systems and motion capture for virtual character generation in game development and lm industry.

Hasomed GmbH uses one inertial sensor for each foot in their gait analysis system. Data recorded by the sensors is used to analyze the movement pattern for each foot.

2.2 Microelectromechanical Systems (MEMS)

MEMS, also known as Micro Systems Technology (MST), is a technology allowing construction of very small sensing elements. MEMS technology combines mechan-ical and electrmechan-ical blocks on the same chip and can be realized using a number of dierent implementations and materials. These materials include silicon, polymers and metals [7].

A popular implementation is based on mass-supporting springs [6]. When the sen-sor is exposed to a force this results in a capacitive change which can be converted

(18)

6 Background

to a voltage level that can easily be converted into digital data.

Another implementation is based on heat transfer by means of natural convection [7]. This means that an applied force results in changes in heat transfer. The convected heat can be converted to a voltage level.

2.2.1 Accelerometer

An accelerometer is used to detect acceleration which is obtained by measuring physical quantities proportional to the acceleration. The accelerometers treated in this thesis are based on an implementation of mass-supporting springs. When the accelerometer is exposed to a force, an internal mass is displaced. This dis-placement is detected by small capacitive elements as a change in capacitance. An outline of a MEMS Accelerometer is shown in Figure 2.1a.

(a)

ǻx

F

(b)

Figure 2.1. Outline of a resting MEMS accelerometer (a); MEMS accelerometer exposed to an acceleration (b).

(19)

2.2 Microelectromechanical Systems (MEMS) 7

When the accelerometer is exposed to acceleration a displacement of the mass occurs, see Figure 2.1b. This displacement can be converted to acceleration by using established physical formulas.

Newton's 2nd Law [9] gives the relation between acceleration and applied force:

F = m · a. (2.1)

Hooke's Law [11] gives the relation between applied force and displacement:

F = −k · ∆x. (2.2)

By combining Newton's 2nd (Eq. 2.1) with Hooke's Law (Eq. 2.2) the following relation between acceleration and displacement is obtained:

a = −k

m· ∆x. (2.3)

The displacement ∆x in Figure 2.1b is obtained by measuring a proportional capacitance. This capacitance is converted to a voltage level by a capacitance-to-voltage converter based on the switched capacitor technique [3].

U

ǻx

Figure 2.2. Capacitance-to-voltage converter.

A capacitance-to-voltage converter is a linear amplier where the output voltage is proportional to the input capacitance [3], see Figure 2.2. The function of this converter is beyond the scope of this document.

2.2.2 Gyroscope

A MEMS gyroscope measures angular velocity. The angular velocity is obtained by measuring physical quantities proportional to the angular velocity. MEMS

(20)

8 Background M v ǻx Ȧ Fc D ir e c ti o n o f R o ta ti o n

Figure 2.3. Outline of a MEMS gyroscope.

Coriolis force to convert angular velocity to displacement [7]. An outline of a MEMS gyroscope is shown in Figure 2.3.

The Coriolis force ensue when a mass, M, rotates around an axis, ¯ω, while moving in radial direction with velocity ¯v. The velocity ¯v is caused by a forced oscillation. The resulting Coriolis force [11] is dened by

FC = −2m(ω × v). (2.4)

By combining Eq. 2.2 and Eq. 2.4 the following mathematical relation between displacement and angular velocity is obtained:

∆x = 2m(ω × v)

k . (2.5)

The displacement ∆x is detected in the same way as described in Section 2.2.1. Hence the output voltage is proportional to measured angular velocity.

A common way to remove eects from linear acceleration, such as gravitation, is to use two sensing mechanisms. One with the internal mass oscillating in-phase and the other out-of-phase. The dierence between the two output signals corresponds to the angular velocity [7] [6].

2.3 Noise Sources

When designing a system it is important to be aware of relevant noise sources. Relevant noise sources for the inertial sensors are presented and discussed in this section.

(21)

2.3 Noise Sources 9

2.3.1 Mechanical Noise

Each way of implementing MEMS technology has its benets and drawbacks. The MEMS sensors described in this thesis are based on an implementation based on mass-supporting springs. In such a system, the mass-supporting silicon springs are the weak point [7]. The characteristics of the springs vary with temperature which results in bias and sensitivity changes. Other sources of inaccuracy are hysteresis and mechanical ringing.

Hysteresis means that springs have memory. A spring in the process of being con-tracted does not have the same characteristics as a spring which is being stretched [3].

Mechanical ringing may arise when a moving frame holding a spring-supported mass suddenly stops [6]. The springs allow the mass to swing for a short period of time. This eect introduces a small error in the signal.

2.3.2 Electrical Noise

Analogue blocks are exposed to dierent noise sources. The most relevant ones are crosstalk from digital lines [1] and thermal noise [8] [5].

Crosstalk is a common unwanted side eect that often occurs when mixing blocks of analogue and digital electronics. On Printed Circuit Boards (PCB) with high utilization it is not always possible to keep sucient distance between analogue and digital signal lines. Two adjacent signal lines result in a capacitive connection [5]. For Direct Current (DC) or low frequency components, a capacitive connec-tion is interpreted as high impedance [8]. Digital signals contain high frequency components which interpret a capacitive connection as low impedance [8]. Hence, it is possible for digital signals to travel between adjacent signal lines, see Figure 2.4.

Pulse DC

Figure 2.4. Crosstalk between two adjacent signal lines: The DC is blocked by the capacitive connection while the pulse travels across.

(22)

10 Background

These capacitors block the DC signal while conducting high frequency components to ground. This technique is not possible to use on other signals since a decou-pling capacitor might remove important information [1]. Another way of reducing crosstalk is to separate lines by a shield connected to ground, but in this case this is not feasible due to limited physical space.

Thermal noise arises when electrons collide and is more often observable in long signal lines [5]. Therefore, a good way of minimizing thermal noise is to keep the signal lines as short as possible. Digital signals are not sensitive to small noise components since digital information uses magnitude variations much greater than the noise magnitude.

2.3.3 Quantization Noise

When designing a system is it optimal to quantize such that no error is introduced while at the same time a negligible amount of bits is used. Since this is not possible in real applications, a practically feasible aim is to introduce a very small error while using few bits [4].

Introducing only a small error is good for the accuracy while using few bits means that there are few bits to transfer, which in turn saves energy. Low energy con-sumption is of the essence, especially in battery powered equipment.

In the domain of quantization, precision refers to the amount of bits used to describe the signal. However, the signal quality can not be increased when quan-tizing, at best kept at the same level. When quantizing a noisy signal fewer bits are needed than when quantizing a signal with very low noise. This is due to that the quantization noise drowns in a noisy signal.

(23)

Chapter 3

Designing a New Sensor

This chapter describes the development process of the new inertial sensor and can be divided into two phases.

The rst phase describes the collection and compilation of information covering the old sensor. This information was used to develop designs for the new sensor. The following sections were treated.

Analyzing weaknesses of the existing inertial sensor.

Dening a specication of requirements for a new inertial sensor.

Evaluating global development on new sensors and their potential use in this application.

This phase was completed by a status seminar where three dierent designs were presented. At the seminar, developers from both Hasomed GmbH and IFF were present. Feedback from this seminar was compiled and a nal design based on this information was developed.

The second phase, sensor development, can be divided into three sections. Designing a circuit diagram.

Assembly of the new sensor. Developing a rst rmware version.

3.1 Analysis of the Existing Inertial Sensor

In order to know what to improve in the new design an analysis of the existing sensor was performed.

The rst step was to discuss the weaknesses and features of the existing sensor with developers at Hasomed GmbH and IFF. The developers had three years of experience with the existing sensor and possessed a signicant amount of relevant information.

(24)

12 Designing a New Sensor

3.2 Specication of Requirements

Based on the collected information, a specication of requirements was developed. This was done in cooperation with the sta at Hasomed GmbH. The following sections contain the specied requirements. Each section states the requirement in italics followed by an explanation.

3.2.1 Signal Quality

Occasional high frequency components must be removed.

The signal from the old sensor suers from occasional high frequency components. An example of this is shown in Figure 3.1. Such components are critical since

680 700 720 740 760 780 800 820 840 860 880 900 −1.1 −1.05 −1 −0.95 −0.9 −0.85 Sample no. [g]

Figure 3.1. High frequency noise.

they make the algorithms used by the gait analysis system accumulate a large bias error.

3.2.2 Quantization Resolution

The signal on all six channels should be quantized with a resolution of minimum 16-bit.

This was based on the fact that the existing sensor used 16-bit quantization reso-lution.

3.2.3 Temperature Drift

(25)

3.3 Evaluation of Available Technology 13

The characteristics of a MEMS sensor vary with temperature (Section 2.3.1 of Chapter 2). As the gait analysis system is switched on, all elements starts to heat up until they reach working temperature. During this period the characteristics vary, which makes output unpredictable. Therapists and patients should not need to wait several minutes while the system heats up.

3.2.4 Range of Measurement

The sensor should handle the following physical ranges: acceleration of ±4g

angular speed of ±600◦/s

These physical ranges were established by the developers at Hasomed GmbH after evaluating tests on regular walk performed with the old sensor. Both ranges are optimized for regular walk.

3.2.5 Bandwidth

The sensor should have a bandwidth of 100Hz on all channels.

This value was established by the developers at Hasomed GmbH after evaluating tests on regular walk performed with the old sensor. A slower system might not be able to detect short acceleration peaks. Such peaks are common when the foot bumps into the ground during regular walk.

3.2.6 Sample Frequency

The sensor should handle a sample frequency of minimum 500Hz.

This value fulls the Nyquist requirement [10] since the sample frequency is more than two times the bandwidth.

3.3 Evaluation of Available Technology

After completing the specication of requirements market research was performed in order to nd new devices suitable to the new sensor. Apart from the require-ments presented in Section 3.2, important characteristics for new devices were:

low price small size

low power consumption good noise performance good accessibility

(26)

14 Designing a New Sensor

3.4 Status Seminar

The status seminar aimed at compiling feedback and experience from available experts. Three dierent design proposals were presented, each with characterizing benets and drawbacks.

The main topic for discussion during the seminar ended up to be whether or not 12-bit quantization precision is enough. The old sensor uses 16-bit precision but contains blocks introducing noise which might lower the quality to less than 12-bit precision. In this case, an improvement would be to use a design that guarantees 12-bit precision. This decision aected which devices should be used in the nal design.

To clarify this issue a document describing present signal conditions and noise sources was composed. Results from this document are presented in Chapter 4 and Section 5.1 of Chapter 5. Based on the results, Section 3.2.2 of the specica-tion of requirement was revised to:

In order to not lose any information the signal should be quantized with a resolution of minimum 12-bit on all six channels.

3.5 Sensor Development

Based on the nal design developed in the previous phase, a circuit diagram was produced. A board layout was developed based on the circuit diagram. After retrieving the new PCB and all belonging devices the sensor was assembled. Nec-essary software and rmware were developed for the new sensor. Due to the condential nature of these parts, they will not be further explained in this thesis (Section 1.1 of Chapter 1).

(27)

Chapter 4

Quantization Precision

In this chapter the theoretical dierences between 12- and 16-bit quantization are described. First, each sensor is described by a mathematical model. This is followed by a description of the included signal sources, and nally, results from the theoretical comparison are presented.

4.1 System Description

The inertial sensor can be described with a model containing relevant signals and noise sources. Each degree of freedom (DOF) is referred to as a channel. A channel can be divided into blocks representing dierent parts. For each model, the output signal from the MEMS device is known. This signal, approximated to be the same in both the old and the new sensor, is the sum of M and I.

4.1.1 Old Sensor

This section describes the existing sensor, which uses 16-bit quantization. One channel can be represented by the model shown in Figure 4.1.

+ Mass / Spring Mechanical M + +

Ext. Electronics Quantization

Y W QN + Int. Electronics I X S

Figure 4.1. A model of the old sensor.

(28)

16 Quantization Precision

the source signal. Since there is mechanical noise (Section 2.3.1 of Chapter 2), a noise source M is added to the model.

The Internal Electronics (Int. Electronics) block describes the internal conversion from capacitance to voltage level (Section 2.2.1 of Chapter 2) and additional am-plication (Section 2.3.2 of Chapter 2). This noise is represented by signal I. The External Electronics (Ext. Electronics) block is situated between the MEMS sensor and the analogue-to-digital converter (ADC). It consists of dierent ampli-cation and ltering units. These are exposed to dierent noise sources such as crosstalk and thermal noise (Section 2.3.2 of Chapter 2). This noise is represented by signal W.

The quantization block is where the signal is converted to digital data. Since the quantization is not optimal [4] some noise will be introduced (Section 2.3.3 of Chapter 2). This noise is represented by signal QN, where N is number of quantization bits used.

4.1.2 New Sensor

This section describes the new sensor, which uses only 12-bit precision. One channel can be represented by the model displayed in Figure 4.2.

+ Mass / Spring Mechanical M + Quantization Y QN + Int. Electronics I X S

Figure 4.2. A model of the new sensor.

The block denitions in Figure 4.2 are equal to those described in Section 4.1.1 of this chapter. To illustrate the main dierence between the old and new sensor, the block of external electronics (Ext. Electronics) has been removed in this gure. This is due to the fact that amplication and ltering is carried out internally. When this is done internally, it is possible to keep all analogue wires very short. Short wires are subject to a lesser degree of crosstalk and thermal noise (Section 2.3.2 of Chapter 2). As mentioned above, the sum of I and M is known.

4.2 Signal Characteristics

To be able to simulate the models presented in Section 4.1.1-4.1.2 of this chapter, each signal was assigned a distribution. This was done by running the simula-tions with both uniformly and normally distributed random seeds. The dierence

(29)

4.2 Signal Characteristics 17

between these results was negligible. Noise can be considered as many small and independent signal sources. A sum of such signals results in a normal distribution. Hence, all signals in this simulation were modeled in this way.

4.2.1 X - Source Signal

X is dened as an ideal source signal, which means that X is free from noise. X is a signal corresponding to acceleration or angular velocity. When no accelera-tion or angular velocity is presented, the signal takes on its mean value. When exposed to a force or angular velocity, the signal varies around this mean value. Such characteristics are typical for a normally distributed signal, strengthening the assumption that a normal distribution is a good approximation. X is dened as

X ∈ N (mX, σX). (4.1)

4.2.2 M - Mechanical Noise

Both sensors are using the same type of MEMS implementation. This makes it possible to assume that the mechanical noise (Section 2.3.1 of Chapter 2) magni-tudes are within the same range. The distribution of M is, as previously mentioned (Section 4.2 of this chapter), assumed to be normally distributed. M is dened as

M ∈ N (mM, σM). (4.2)

4.2.3 I - Internal Electrical Noise

This signal represents noise which arises in the sensor's internal electronics (Section 2.3.2 of Chapter 2). The variance of I is, as previously mentioned (Section 4.2 of this chapter), assumed to be normally distributed. I is dened as

I ∈ N (mI, σI). (4.3)

4.2.4 W - External Electrical Noise

This signal represents noise from electronics that are not included in the sensor (Section 2.3.2 of Chapter 2).

The distribution and variance of this noise source is unknown. Since the block of external electronics is exposed to more electrical disturbance (Section 2.3.2 of Chapter 2) it is feasible to assume that W has greater variance than I.

To be able to include this noise source in the calculations it is assumed that W and the sum of M and I, at worst, have the same variance. The purpose of this assumption is to keep the variance in a decent range and to display how any noise from external electronics will aect the result.

(30)

18 Quantization Precision

4.2.5 Q

N

- Quantization Noise

Quantization noise is considered to be uniformly distributed in the interval limited by the size of the quantization levels [4]. This is written as

QN ∈ U N IF ORM (−

2,

2). (4.5)

For linear quantization the variation of the quantization noise can be described by [4]

σQ2 = ∆2

12. (4.6)

For N bits and a peak-to-peak power of VP P this gives [4] ∆ = VP P

2N (4.7)

which inserted in 4.6 gives

σ2

Q = (VP P

2N )2

12 . (4.8)

4.3 Simulation of 12- and 16-bit Quantization

In this section, the dierence between 12-bit quantization without external elec-tronics and 16-bit quantization with external elecelec-tronics is simulated.

The rst part describes how the simulations were performed, which is later followed by results from the simulations.

4.3.1 Simulation Procedure

Two dierent comparisons were carried out. In order to be able to see how the external noise source W aected the result, it was not included in the rst com-parison.

In the second comparison W was included to achieve a more realistic result. The magnitude of W was dened as in Section 4.2.4 of this chapter.

A real test was also performed by running algorithms from the gait analysis system on a data stream re-quantized from 16-bit to 12-bit. These results were compared with the results generated by algorithms applied to the original 16-bit data. Re-sults from the comparison are presented in Section 5.1 of Chapter 5.

4.3.2 Quantized Signal

S is the signal to be quantized, see Figure 4.1 and 4.2. S is the sum of the source signal X, mechanical noise M and electrical noise I & W. All signals are assumed to be normally distributed (Section 4.2 of this chapter). A sum of independent normally distributed signals results in a normally distributed signal [2].

(31)

4.3 Simulation of 12- and 16-bit Quantization 19

In the rst comparison, no noise from external electronics is included and S is dened as

S ∈ N (mX+ mM + mI,

q

σ2

X+ σM2 + σI2). (4.9) In the second comparison, W is included and S is dened as

S ∈ N (mX+ mM+ mI+ mW,

q

σ2

X+ σM2 + σI2+ σW2 ). (4.10)

4.3.3 Introduced Error

The stochastic characteristics of signal S are known. Using the mathematical expressions presented in Chapter 4.2.5 it is possible to simulate noise added by the quantization. + Quantization YN QN + -EN S

Figure 4.3. Signal error.

The variance of signal EN can be calculated as

σ2

E= E{(X − Y )2}E{(X − YN)2} = E{X2} − 2 · E{X · YN} + E{YN2}. (4.11) The terms 2 · E{X · YN} and E{YN2} cannot be calculated theoretically. Instead, they were approximated by conducting a computer simulation.

4.3.4 Signal-To-Noise Ratio

Dierent resolutions were evaluated by relating the size of the source signal to the signal error. This type of comparison is often performed by calculating the signal-to-noise ratio (SNR) dened as [4]

SN R = 10 · logσ 2 Y σ2 E . (4.12)

(32)

20 Quantization Precision 4 6 8 10 12 14 16 18 20 22 24 0 10 20 30 40 50 60 N−bit SNR [dB] 12−bit SNR:55.14 14−bit SNR:55.22 16−bit SNR:55.23

Figure 4.4. Quantization SNR for N-bit in simulation 1.

Figure 4.4 shows resulting SNR for N bits used in the quantization. The results reveal that the dierence between 16-bit and 12-bit quantization is only 0.08 dB.

4.3.6 Quantization Noise - Simulation 2

The second simulation was performed with the external noise source, W. As ex-plained in Section 4.2.4, the variance of W is assigned a value in order to show how this parameter aects the result. Results from simulation 2 are shown in Figure 4.5. 4 6 8 10 12 14 16 18 20 22 24 0 10 20 30 40 50 60 N−bit SNR [dB] 12−bit SNR:52.19 14−bit SNR:52.23 16−bit SNR:52.24

(33)

4.3 Simulation of 12- and 16-bit Quantization 21

The dierence between 16-bit and 12-bit quantization is only 0.04 dB.

4.3.7 Results from Noise Simulations

Simulation 1 shows that 12-bit quantization introduces 0.08 dB of noise, a level which is negligible. When including noise from external electronics, the inuence of quantization noise is even smaller. Both levels are acceptable, which implies that 12-bit quantization precision is sucient.

(34)
(35)

Chapter 5

Results

This chapter presents results from tests performed on both the old and the new sensor, as well as specications and new features of the new sensor.

The rst section describes how quantization precision aects the results from al-gorithms used by the gait analysis system. In the second section, static noise from both sensors is analyzed. The third and nal section describes how the new sensor complies with the specication of requirements. New features of the new sensor are also presented.

5.1 Quantization Noise

Theory indicating that 12-bit quantization is enough for this application was pre-sented in Chapter 4. To verify this, three simulations comparing 12- and 16-bit quantization precision were performed.

5.1.1 Test Procedure

To be able to easily verify test results, algorithms for calculating distance were used. The distance used in the test was established by using measuring-tape. The following step was letting a subject walk a given distance with one inertial sensor attached to each foot. The subject started and nished with parallel feet. Data collected during this procedure was saved to a le.

5.1.2 Data Conversion

16-bit data collected during the test procedure was converted to 12-bit and saved to a separate le.

5.1.3 Algorithms

The nal step was performed by running selected algorithms on collected data. The algorithms calculated covered distance for both 12- and 16-bit precision for

(36)

24 Results

each foot. An average covered distance by the right and the left foot was also calculated. These results are presented in the following sections.

5.1.4 Simulations of 12- and 16-bit Precision

This section summarizes results from the performed simulations. Detailed infor-mation regarding data used in this section can be found in Appendix A.

1 2 3 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 Error [%] Simulation no. 16−bit 12−bit 1 2 3 0.5 1 1.5 2 2.5 3 3.5 Error [%] Simulation no. 16−bit 12−bit (a) (b) 1 2 3 1.6 1.8 2 2.2 2.4 2.6 2.8 3 Error [%] Simulation no. 16−bit 12−bit (c)

Figure 5.1. Error in the calculated distance for the left (a) and the right (b) foot. Average error is given in (c).

The resulting error of the calculated distance is shown in Figure 5.1. The dierence between using 12- and 16-bit quantization is in the range of 0.1 percentage units, which vindicates that 12-bit precision is sucient.

5.2 Static Noise

In this section, data generated by the old and new sensors is compared. Data was collected while both sensors were exposed to the same reference force. A good

(37)

5.2 Static Noise 25

reference, which is constant for a specic location, is gravitation. The inuence of the earth's rotation is considered small and is therefore neglected. Hence, a resting sensor should give an acceleration component of 1 g and 0/s around all axes. With these reference points, it is possible to measure the deviation from the correct values, referred to as Static Noise.

Due to hardware issues with the accelerometers, only test data from the gyroscopes is presented.

Sometimes there are small dierences in performance between devices from the same series. Therefore, data from two gyroscopes per sensor is presented.

5.2.1 Gyroscopes

Figure 5.2 shows output signals from two gyroscopes from the old sensor and two from the new sensor .

200 400 600 800 1000 1200 1400 1600 1800 2000 −10 −8 −6 −4 −2 0 2 4 6 8 10 [ ° /s] Sample No ωx 500 1000 1500 2000 2500 −10 −8 −6 −4 −2 0 2 4 6 8 10 [ ° /s] Sample no. ωx (a) (b) 200 400 600 800 1000 1200 1400 1600 1800 2000 −10 −8 −6 −4 −2 0 2 4 6 8 10 [ ° /s] Sample No ωy 500 1000 1500 2000 2500 −10 −8 −6 −4 −2 0 2 4 6 8 10 [ ° /s] Sample no. ωy (c) (d)

Figure 5.2. Gyroscope representing ωxin the old sensor (a) and the new (b). Gyroscope

representing ωyin the old sensor (c) and the new (d).

(38)

26 Results

The static noise level in the new sensor, for the ωx axis , is approximately 1.149 dB lower than in the old sensor. For the ωyaxis, the dierence is 4.2978 dB. This corresponds to a reduction of approximately 30% and 50% respectively.

By studying the power spectral density (PSD) in Figures 5.3a and 5.3b, it is conrmed that high frequency components are reduced in the new sensor.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 −12 −10 −8 −6 −4 −2 0 2 Frequency

Power Spectrum Magnitude (dB)

Old Sensor New Sensor (a) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 −20 −15 −10 −5 0 5 Frequency

Power Spectrum Magnitude (dB)

Old Sensor New Sensor

(b)

(39)

5.3 Compliance with the Requirements 27

As shown in Figure 5.3a, the power of non DC components is approximately 2 to 6 dB lower in the new sensor. The PSD in Figure 5.3b shows that the level of high frequency components in the new sensor are about 5 to 10 dB lower than in the old.

5.3 Compliance with the Requirements

The new sensor complies with all the requirements described in the specication of requirements (Section 3.2 of Chapter 3).

A description of how the new sensor fulls each requirement is provided in the following sections. Each section begins with a résumé of the requirement in italics.

5.3.1 Signal Quality

Occasional high frequency components must be removed.

This problem was solved by rst selecting devices such that problems which occur when mixing analogue and digital electronics (Section 2.3.2 of Chapter 2) could be minimized. Extra precaution was then taken when routing the PCB, e.g. by sepa-rating digital from analogue signal lines, using decoupling capacitors and applying a solid ground plane.

5.3.2 Quantization Resolution

The signal on all six channels should be quantized with a resolution of minimum 12-bit.

This was done by selecting devices supporting 12-bit ADC.

5.3.3 Temperature Drift

It must be possible to compensate for drift caused by temperature variations. This was solved by selecting devices with integrated temperature sensors. The internal temperature for each device can be used to compensate for bias and sen-sitivity variations.

5.3.4 Range of Measurement

The sensor should handle the following physical ranges: Acceleration of ±4g

Angular speed of ±600◦/s

Devices were selected and tuned such that the sensor was able to handle following physical ranges:

(40)

28 Results

Angular speed of ±600◦/s

These ranges can be modied in a convenient way, either by changing the value of a few passive components or by replacing the sensing devices with available pin-out compatible devices. This would be useful in the event that future applications have other requirements.

5.3.5 Bandwidth

The sensor should have a bandwidth of 100Hz on all channels.

Devices were selected and tuned to comply with this requirement. By replacing a few passive components, it is possible to change the bandwidth.

5.3.6 Sample Frequency

The sensor should handle a sample frequency of minimum 500Hz.

The sample frequency is preset via software, available frequencies are in the range of 60-512Hz.

5.4 Additional Features and Improvements

This section presents improvements and additional features, not presented in the specication of requirements. The new features were implemented during the de-velopment process after consultation with the sta at Hasomed GmbH. Improve-ments were often desired side eects of dierent design decisions. The following is a summary of improvements and new features:

reduced power consumption integrated self-test

PCB with fewer layers better sensor positioning

rmware update via serial interface bus system

wireless link

These are described in more detail below.

5.4.1 Reduced Power Consumption

Minimizing power consumption is very important since the gait analysis system uses batteries as power supply. One of the measures taken to lower the power consumption was to select a low-power micro controller. Furthermore, the quan-tization precision was changed from 12- to 16-bit. How this aects the noise is presented in Chapter 4.

(41)

5.4 Additional Features and Improvements 29

5.4.2 Internal Self-Test

After manufacturing a sensor it is useful to be able to test whether or not all MEMS devices are ok. This can be done by using the self-test feature, implemented in each selected MEMS device.

5.4.3 PCB with Fewer Layers

The new sensor consists of fewer components. This made it possible to reduce the number of layers used by the PCB from four to two, the main benet being cheaper production.

5.4.4 Firmware Update via Serial Interface

In order to update the rmware of the old sensor an extra cable needs to be attached to the PCB. This method requires that the box containing the sensor is opened. To avoid this, a feature allowing rmware to be updated via the serial interface was implemented.

This feature enables update of the rmware after the gait analysis system has been shipped to the customer. A complete rmware update of both the gait analysis system and the inertial sensors is performed simply by connecting a memory device to the gait analysis system.

5.4.5 Bus System

The old sensor use an interface which allows the gait analysis system to use a maximum of two sensors at a time. To make the new interface more dynamic a bus system was implemented. This system has a theoretical limitation of 256 units, however, the real limit is available bandwidth.

5.4.6 Wireless Link

Due to the compact PCB layout there was enough space to include a radio transceiver with a small on-board antenna. This feature, which has the poten-tial of replacing the cable connection, is very convenient since dealing with cables is often time consuming. This was not fully implemented since a real wireless connection requires an internal power cell as power supply.

(42)
(43)

Chapter 6

Conclusion

Research and development presented in this thesis resulted in a sensor with good performance and convenient features. In the following sections, the main dier-ences between the old and new sensor are described.

6.1 Enhanced Performance

One of the main benets with the new sensor is the enhanced performance in terms of noise reduction and quantization precision. The old sensor suers from a relatively high static noise oor with occasional high frequency components. In the new sensor, this noise is reduced by replacing external electronics with internal. Quantization precision was changed from 16-bit to 12-bit. This does not introduce additional noise, but lowers energy and bandwidth consumption.

6.2 Easier Manufacturing

Another major benet concerns the manufacturing procedure. By reducing the number of passive components by approximately ten times, the time for soldering and positioning is reduced. All devices used in the new sensor are possible to solder with conventional methods. This means that advanced techniques for positioning and distribution of soldering paste are not required. The number of PCB layers is reduced to 2 compared with the old sensor's 4, which results in cheaper production.

6.3 New Features

A number of new features were implemented in the new sensor, including inte-grated temperature sensors in all MEMS devices, self test feature in all MEMS devices, a wireless link and rmware update via serial interface.

(44)

32 Conclusion

6.4 Future Work

There are many interesting areas that need further work.

In order to lower the noise levels further, one possibility is to study required bandwidth for each channel. By decreasing the bandwidth, unwanted noise can be rejected.

Calibration routines which take temperature data into account. By doing this, noise and bias levels can be subjected to further trimming.

Using the wireless feature of the inertial sensor requires an accumulator as power supply. There are many interesting alternatives, such as supercaps, goldcaps and regular high performance accumulators.

(45)

Bibliography

[1] Sten Benda. Interference-free electronics. Studentlitteratur, 1st edition, 1997. ISBN 0-471-14448-7.

[2] Gunnar Blom. Sannolikhetsteori med tillämpningar. Studentlitteratur, 1st edition, 1970.

[3] Jacob Fraden. Handbook of Modern Sensors. Springer Science, 3rd edition, 2004. ISBN 0-387-00750-4.

[4] Ulf Henriksson and Anders Lindman. Signalteori. Linus & Linnea AB, 1999.

[5] David Johns and Kan Martin. Analog Integrated Circuit Design. John Wiley & Sons, Inc., 1st edition, 1997. ISBN 0-471-14447-7.

[6] Jan G. Kornvik and Oliver Paul. MEMS: A practical guide to design, analysis and applications. William Andrew Publishing, 1st edition, 2006. ISBN 0-8155-1497-2.

[7] Nadim Maluf. An Introduction to Microelectromechanical Systems Engineer-ing. Artech House, 1st edition, 2000. ISBN 0-89006-581-0.

[8] Bengt Molin. Analog Elektronik. Förlag Studentlitteratur AB, 1st edition, 2001. ISBN 91-44-01435-X.

[9] Carl Nordling and Jonny Österman. Physics Handbook for science and engi-neering. Studentlitteratur, 6th edition, 1999. ISBN 91-44-00823-6.

[10] Sune Söderkvist and L.E Ahnell. Tidsdiskreta Signaler och System. Tryckeriet Erik Larsson AB, 1994.

[11] Richard Wolfson and Jay M. Pasacho. Physics with modern physics. Harper-CollinsCollegePublishers, 2nd edition, 1995. ISBN 0-06-501015-7.

(46)
(47)

Appendix A

Simulations

Results from each simulation are divided into three tables. The rst table, Table A.Xa, holds the name and date of the measurement, used sample frequency and distance measured with the measuring-tape. In the second table, Table A.Xb, calculated distance as well as dierence between measured and calculated distance for each foot is shown. The third and last table, Table A.Xc, shows an average of both calculated distance and dierence between measured and calculated distance for both feet.

A.1 Simulation 1

16-bit 12-bit

Measurement Anonymous1 Anonymous1_12bit

Date 2005-12-05 2005-12-05

Sample Frequency [Hz] 500 500

Length [m] 20 20

(a)

Left Right

16-bit 12-bit 16-bit 12-bit

Length [m] 20.5348 20.5211 20.2053 20.1646 Length Error [%] 2.6739 2.6057 1.0265 0.82292 (b) 16-bit 12-bit Average Length [m] 20.37 20.3429 Error [%] 1.8502 1.7143 (c)

(48)

36 Simulations

A.2 Simulation 2

16-bit 12-bit

Measurement Anonymous2 Anonymous2_12bit

Date 2005-01-09 2005-01-09

Sample Frequency 500Hz 500Hz

Length 20.08m 20.08m

(a)

Left Right

16-bit 12-bit 16-bit 12-bit

Length [m] 20.5118 20.4949 20.7221 20.662 Length Error [%] 2.1506 2.066 3.1979 2.8984 (b) 16-bit 12-bit Average Length 20.617 20.5784 Error [%] 2.6743 2.4822 (c)

Table A.2. Simulation info (a); Error for each foot (b); Average error of both feet (c)

A.3 Simulation 3

16-bit 12-bit

Measurement Anonymous1 Anonymous1_12bit

Date 2005-12-05 2005-12-05

Sample Frequency [Hz] 500 500

Length [m] 20 20

(a)

Left Right

16-bit 12-bit 16-bit 12-bit

Length [m] 20.5348 20.5211 20.2053 20.1646 Length Error [%] 2.6739 2.6057 1.0265 0.82292 (b) 16-bit 12-bit Average Length [m] 20.37 20.3429 Error [%] 1.8502 1.7143 (c)

(49)

På svenska

Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare –

under en längre tid från publiceringsdatum under förutsättning att inga

extra-ordinära omständigheter uppstår.

Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,

skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för

ick-ekommersiell forskning och för undervisning. Överföring av upphovsrätten vid

en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av

dokumentet kräver upphovsmannens medgivande. För att garantera äktheten,

säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ

art.

Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den

omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna

sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i

sådant sammanhang som är kränkande för upphovsmannens litterära eller

konst-närliga anseende eller egenart.

För ytterligare information om Linköping University Electronic Press se

för-lagets hemsida

http://www.ep.liu.se/

In English

The publishers will keep this document online on the Internet - or its possible

replacement - for a considerable time from the date of publication barring

excep-tional circumstances.

The online availability of the document implies a permanent permission for

anyone to read, to download, to print out single copies for your own use and to

use it unchanged for any non-commercial research and educational purpose.

Sub-sequent transfers of copyright cannot revoke this permission. All other uses of

the document are conditional on the consent of the copyright owner. The

pub-lisher has taken technical and administrative measures to assure authenticity,

security and accessibility.

According to intellectual property law the author has the right to be

men-tioned when his/her work is accessed as described above and to be protected

against infringement.

For additional information about the Linköping University Electronic Press

and its procedures for publication and for assurance of document integrity, please

refer to its WWW home page:

http://www.ep.liu.se/

References

Related documents

For this type of application the maximum allowable speed limit is adjusted downwards to diffe- rent levels when adverse weather and road surface conditions occur..

Both Brazil and Sweden have made bilateral cooperation in areas of technology and innovation a top priority. It has been formalized in a series of agreements and made explicit

För att uppskatta den totala effekten av reformerna måste dock hänsyn tas till såväl samt- liga priseffekter som sammansättningseffekter, till följd av ökad försäljningsandel

Från den teoretiska modellen vet vi att när det finns två budgivare på marknaden, och marknadsandelen för månadens vara ökar, så leder detta till lägre

Syftet eller förväntan med denna rapport är inte heller att kunna ”mäta” effekter kvantita- tivt, utan att med huvudsakligt fokus på output och resultat i eller från

• Utbildningsnivåerna i Sveriges FA-regioner varierar kraftigt. I Stockholm har 46 procent av de sysselsatta eftergymnasial utbildning, medan samma andel i Dorotea endast

Utvärderingen omfattar fyra huvudsakliga områden som bedöms vara viktiga för att upp- dragen – och strategin – ska ha avsedd effekt: potentialen att bidra till måluppfyllelse,

På många små orter i gles- och landsbygder, där varken några nya apotek eller försälj- ningsställen för receptfria läkemedel har tillkommit, är nätet av