Professional Documents
Culture Documents
Video 5
Video 5
Abstract--In the medical field, there is a need for small ambulatory sensor systems for
measuring the kinematics of body segments. Current methods for ambulatory
measurement of body orientation have limited accuracy when the body moves. The
aim of the paper was to develop and validate a method for accurate measurement
of the orientation of human body segments using an inertial measurement unit
(IMU). An IMU containing three single-axis accelerometers and three single-axis
micromachined gyroscopes was assembled in a rectangular box, sized
20 x 20 x 30 mm. The presented orientation estimation algorithm continuously cor-
rected orientation estimates obtained by mathematical integration of the 3D angular
velocity measured using the gyroscopes. The correction was performed using an incli-
nation estimate continuously obtained using the signal of the 3D accelerometer. This
reduces the integration drift that originates from errors in the angular velocity signal.
In addition, the gyroscope offset was continuously recalibrated. The method was
realised using a Kalman filter that took into account the spectra of the signals involved
as well as a fluctuating gyroscope offset. The method was tested for movements of the
pelvis, trunk and forearm. Although the problem of integration drift around the global
vertical continuously increased in the order of 0.5° s 7, the inclination estimate was
accurate within 3° RMS. It was shown that the gyroscope offset could be estimated
continuously during a trial. Using an initial offset error of I rad s 7, after 2 min the off-
set error was roughly5% of the original offset error. Using the Kalman filter described,
an accurate and robust system for ambulatory motion recording can be realised.
S'narWn
vector that is expressed in the global co-ordinate system.
A strapdown integration algorithm calculates the change in
orientation from an angular velocity signal. The word strap- GSR÷
~t 1 . .
S-~-
~G,t
YG,t
down means that the angular velocity is obtained using gyro-
scopes strapped to an object. A number of integration
methods have been described (IGNAGNI, 1990; BORTZ, 1971;
JIANG and LIN, 1992). The orientation of the sensor with
gt-1 | yA,t
respect to the global co-ordinate frame is expressed with a %~_~,~Sz~t
rotation matrix, containing the three unit column vectors
of the global co-ordinate system expressed in the sensor
co-ordinate system (5). Fig. 3 Diagram describing estimation of inclination of human body
segment based on gyroscope system and based on
accelerometer system using sensor signals, previously
G~R=[~X ~v ~z] ~ (5) estimated states and model described in Fig. 2. Angular
velocity o4 is estimated by subtracting estimated offset from
gyroscope signal Yr. Strapdown integration algorithm is
The acceleration and gravity in the global co-ordinate frame used to estimate change in orientation ~SR i and inclination
(4) are related to the acceleration and gravity in the sensor co- Sz~, t. Acceleration gti is estimated by assuming it is
ordinate frame (3) through the axes transformation of (6). factor c, of previously measured acceleration. Orientation
is used to estimate acceleration in sensor co-ordinate
system, enablins~ measurement of inclination based on
a at agt aSRt (Sat Sgt) (6)
-- = " -- accelerometers Za, t
Ze,t = SZ A -- Sz G (9)
+
= Wb, t -- be,t 1 + VG, t (14)
A difference in the two inclination estimates is caused by
prediction errors. The two most important factors causing an
If we substitute the angular velocity estimation and the
inclination error are incorporated in the error state vector x~,
orientation estimation (13) and neglect products of errors, the
which is estimated using the Kalman filter (10). The first
estimated orientation is given by
factor is the orientation error at the previous timestep, as this
orientation is used as a starting point to obtain the next
orientation by strapdown integration. The second factor is the GSR;~GSRt • (I+[( ~,t 1 _ _ Tb~,+ t I + T v G , t ) × ] )
0 + (15)
gyroscope offset error, as, already, a small offset error causes
a dramatic effect on the estimated orientation. Finally, comparing (15) with (12), it follows that the error
propagation 0~, t is described by
x~,t = [0~,t 1 b~,t] r (10)
Oe, t O e+, t 1 - - Tbe,t
+ 1 ~ - TI~G, t (16)
The orientation error is defined as the angle and direction
is which the actual sensor co-ordinate frame has to be rotated The matrix A of (8) describes the propagation of the a priori
to coincide with the estimated sensor co-ordinate frame. It is error state vector x~. Considering (16) and (11), it can be found
expressed by 0~, which has a magnitude that equals the angle that the a priori expected errors b , t and 0~, t do not depend on
of rotation, whereas the rotation axis is given by the direction previous a priori estimated states be, t 1 and 0~, t 1- This means
of 0~. As other error sources axe not incorporated into the that knowledge about previous errors is incorporated into the
state vector, these are only specified as part of the covariance current estimate, and that there is no correlation left between
matrix of wt and yr. the a priori estimate errors of two timesteps. Therefore the A
To use the Kalman filter to make an estimate of the error matrix equals the zero matrix.
vector x~, the matrices A and C and the covariance matrices
Qw and Q~ axe derived. Matrix A and noise w describe the 2.4.2 Relationship between filter input and error states
propagation of the a priori error state vector x~. They were The error of the gyroscope based inclination estimate was
found by considering the effect of unknown system com- obtained in the same way as the error in the orientation estimate
ponents on the error state. Matrix C and noise v describe the (15), yielding
relationship between the error states and the Kalman filter
input z~. They were found by considering the effect of an
offset and orientation error on the inclination estimate. The s,~G,t ~ Zt + S'zt 1 × O~,t+ 1 - TS'zt 1 × be,t
covariances Q~ and Qw were derived by taking the variances + TsZt 1 × VG,t (17)
of v and w.
The error of the accelerometer-based inclination estimate
2.4.1 Error propagation
S'z A, (7) depends on the error in estimated acceleration
The offset prediction error is denoted by b~,t 1 and can be
expressed in the sensor co-ordinate frame and the acceler-
found by substituting the prediction of the offset in the offset
ometer noise. The error in predicted acceleration in the
model (2).
global co-ordinate frame was found by comparing the real
acceleration with the estimate, using (4).
Ga ~ ^ _
= be+t 1 -- Wb, t (11) e,t Gat Gat
G^+
Ca " ae,t 1 -- Wa,t (18)
For small errors, the relationship between the actual and esti-
mated orientations is given by (12) (BORTZ, 1971) To obtain the acceleration error in the sensor co-ordinate
frame, relationship (6) was applied using the acceleration
Gsi¢ = o s R . (I + [0~x]) (12) error estimate (18) and orientation estimate (12). The resulting
error is caused by both an orientation error and an error in the
The matrix cross product operator is given by global acceleration estimate (19).
S a e= ,s~tt t -- Sa t
[ a x ] = I az
0 - a0z - ayax 1 = ca" Sa~, t 1 - Swa,t + sgtt × 0~,t (19)
-- ay ax 0
= C.
/
b~,t ] + v t (21)
was obtained using the accelerometer output vector during
two moments in which the IMU was put in a different orien-
tation. Gyroscope and accelerometer signals were sampled at
where C is a 3 x 6 matrix, consisting of two 3 x 3 cross product 100 Hz and recorded with a portable datalogger.
matrices. The IMU was placed on the pelvis, trunk and forearm.
Tasks that were performed were: lifting crates, mimicking
eating and mimicking typical morning routine tasks. For the
crate-lifting tasks, the IMU was placed on the dorsal side
of the pelvis and between the shoulder blades at the height
of the T10 vertebra. The z-axis of the pelvis and trunk IMU
The noise term vt is described by the third and fourth terms pointed cranially, and the y-axis pointed laterally, to the left.
of (21) The forearm IMU was placed on the dorsal side of the
wrist, with the y-axis of the IMU unit along the arm, pointing
1 in the proximal direction, and the z-axis pointing in the dorsal
I, t z - - ( S W a , t - - C a • S a e,t Jr- ~ - I ' A , t ) -- SZt 1 X I'G, t (23)
g direction.
The first task was a 2 min lifting task. A stack of six empty
2•4•3 Covariance matrices beer crates was placed in front of the subject. The subject
The error covariance matrix Qw,t of the noise term w in the was asked to move the crates one by one from the stack to
error propagation part of the Kalman filter (8) can be obtained build a new stack 1 m away. Once the new stack was com-
using the knowledge that the matrix A equals the zero matrix• pleted, the routine was reversed. This was repeated for the
Therefore the error covaxiance matrix can be found by taking duration of the trial. Ten recordings were made at different
the variance of the error propagation equations (11) and (16). lifting speeds. The pace of crate stacking was dictated by
a metronome. The time intervals between the handling of
[ E(o,,,.
E(b,,,
E(o,,,.
E(b,,,.
two crates were 7 s, 6 s, 5 s (twice), 4 s, 3.5 s (twice), 3 s
(twice) and 2 s. Two trials were performed at a pace of
3.5 s per crate, as this was experienced as a comfortable
lifting speed.
Q~,t 1 + T Qb, t 1 + T2Q~G T Qb,~ 1 The second task consisted of three trials of 90 s in which the
= 2 + Q+ + Qb
T Qb,~ 1 b,~ 1 subject was asked to mimic eating. It consisted of subsequent
sessions of the following activities: pouring a glass (10 s),
where Qo,t÷ 1 and Q÷b,t 1 are the a posteriori error covaxiance eating soup (20 s), eating spaghetti (20 s), eating meat (30 s),
matrices of the orientation and offset at the previous timestep, drinking (10 s). The morning-routine tasks consisted of: pouring
respectively. Qb is the very small covaxiance matrix of the water on face and drying it using a towel (10 s), applying
offset noise wb and Q~G is the gyroscope noise covaJciance matrix. deodorant (10 s), buttoning a blouse (10 s), combing hair (20 s),
Taking the covaxiance of the noise term (23) yields brushing teeth (30 s).
The tasks described were chosen, not only because of their
1 relevance in ambulatory movement recording, but also for
Q~,t = -~ (c2~ • Q~,t
+ 1 + Qw~ + Q ~ ) + QvG (24)
their very different movement characteristics and 3D character.
Prior to and after each recording, the subject was asked to stand
where Q+a,t 1 is the a posteriori acceleration error covariance still for 4 s. The gyroscope signals that were recorded in this
matrix, QN~ is the covaxiance matrix of Wa,t, and Q~a is the interval were averaged to yield the initial offset. Experiments
covariance of the measurement noise vector I'a, t. The last were performed on two healthy subjects. The first subject
term of (24) was found by assuming that the gyroscope noise (male, 29 years) performed the lifting task, and the second
variance is equal in the x-y- and z-directions• In this case, the (female, 28 years) performed the eating and morning routine
noise covariance matrix does not change when the noise is tasks. Both subjects signed an informed consent prior to the
expressed in a different reference system• measurement.
3 Experimental methods
3•2 Model parameter estimation
An inertial measurement unit (IMU) was constructed by
Before the Kalman filter was used, the model parameters
mounting three vibrating beam gyroscopes* and three piezo-
were determined• The sensor noise variances Qva and
resistive accelerometers t perpendicular to each other in a
QvG were found by taking the variance of the sensor signal
30 x 20 x 50 m m 3 box. These sensors were calibrated accor-
while the sensor was lying still on the laboratory floor• The
ding to FERRARIS et al. (1995) to obtain the gains and offsets
parameters Ca and Qwa were chosen to give reasonable
of both the accelerometers and gyroscopes.
results while the filter was tested• Gyroscope offset varia-
*Murata ENCO5 tion, described by Qwb, was determined with a temperature
tAD XL05 experiment•
Medical & Biological Engineering & Computing 2005, Vol. 43 277
A measurement of gyroscope and accelerometer offset in measured distance was 1 mm. This corresponds to a standard
fluctuation was carried out to deviation in measured orientation of less than 1°.
Fluctuation of accelerometer offset can cause an error in
(i) identify the parameter for gyroscope offset change wb
sensor-maxker orientation. Using the temperature exper-
(ii) validate the assumption that the accelerometer offset does
iments, the offset change of six accelerometers after a tempera-
not change because the subjects skin warms up.
ture ste~ from 20 to 30 ° was 0 . 2 m s -2 on average (SD
It was assumed that the major factor influencing the offsets is 0.2 m s - ). An offset error of 0.2 ms -2 corresponds to an
the temperature, so that the variation due to a varying tempera- angle error of 1.1 °. It was assumed that these were the
ture is an approximation of the entire offset variation. The largest sources of error of the reference system.
effect of temperature on gyroscope and accelerometer offset
was measured by cooling down two IMUs in an oven from 4.2 Parameter identification
40 to 20°C in a time period of 3 h. This was done by laying
the sensor on six different sides, enabling us to measure both An example of a gyroscope and accelerometer recording is
the gyroscope and the accelerometer offset dependence on given in Fig. 4. It shows the signals of a sensor on the trunk
temperature. during the lifting of one crate, involving flexion as well as
A practical value for gyroscope offset variation wb could be lateroflexion. It can be seen that the z-component of the
estimated by taring the time derivative with respect to temp- accelerometer output is close to 1 g at the beginning and
erature at 30°C and assuming that the temperature during end, indicating an upright posture. As soon as the movement
measurements will not fluctuate by more than 1° min -1. A starts, the magnitude of the accelerometer output vector
value for the change in accelerometer offset resulting from differs from 1 g, indicating an acceleration.
mounting an IMU on a subject was obtained using the Static measurement with the sensor lying still on the labora-
change in output from 20 to 30°C, as this was assumed to be tory floor, to obtain gyroscope and accelerometer noise, resulted
1 2
a typical temperature step from the calibration temperature to in an RMS of 0.01 rad s - and 0.1 m s , respectively. The temp-
the temperature near the skin. erature tests indicated that the temperature dependency of the
gyroscope offset was 2 deg s - I ° c - I ( S D 1) for six gyroscopes.
Assuming a temperature change of less than I°C rain -1 for lab-
3.3 Analysis
oratory experiments, this corresponds to an offset change per
The filter performance was split into one part describing the timestep wb of 0.3 x 10 -3 deg s -1. While testing the KaJman
ability of the filter to estimate the gyroscope offset and one part filter, it appeared that a low Ca of 0.6 and a standard deviation
describing the quality of the orientation measurement. The of each component of Wa of 0.4 ms -2 gave good results.
ability of the filter to estimate the gyroscope offset was
tested by adding an error of 1 rad s-1 to each of the separate 4.3 Orientation accuracy
gyroscope channels during off-line analysis and determining
the offset error at the end of each trial after applying the An example of the filter performance during a crate-lifting
Kalman filter. The robustness of the filter for orientation esti- trial is shown in Fig. 5. The error of the orientation obtained
mation was tested by comparing the orientation errors during using the filter was compared with the integration method
a trial for different tasks and one for different lifting speeds. described by BORTZ (1971). The error was defined as the mag-
The quality of the orientation estimation was described by nitude of the orientation error vector. It can be seen that the
the magnitude of 0~, expressed in the global co-ordinate orientation error, as obtained by integration of the gyroscope
system. The orientation error has different behaviour for incli- signal, is larger than the error of the Kalman filter estimate.
nation and for the orientation around the vertical. Therefore the The reason that the slope of the orientation error is close to
orientation error 0~ was split into an inclination and a heading zero at the start and end of the trial is because the gyroscope
part. When 0~ is considered a vector, the vector component in offset was determined at these points.
the vertical direction is called the heading, and the component The magnitude of the orientation drift was defined as the
in the horizontal plane is defined as the inclination error. As time derivatives of the orientation error. The heading drift
long as one of these two errors is small, this is a reasonable
error measure. 4
angle the estimated Z-axis makes with the real Z-axis. 0 .'" " ~ (~""/' "'".-:fi2"~'. .....:¢~..,.-"~.
The inclination of the Kalman filter was compared with
the inclination obtained by low-pass filtering accelerometers.
The heading error was continuously increasing, and therefore
time, s
its derivative with respect to time was used to compare with a
the orientation that was obtained by strapdown integration of
gyroscope signals. Comparisons were made with a paired 20-
4 Results 10-
4.1 Accuracy of the reference measurement system -20 ~ ~ ~
1 2 3 4
The accuracy of the reference measurements performed with time, s
b
the Vicon system depends on the accuracy of the position
measurement of the markers and on the accuracy of the Fig. 4 Measured sensor signals during one crate lift. Sensor is
maxker-sensor orientation estimate. The accuracy of the pos- attached to trunk. (a) gyroscope output vector," (b)
ition measurement was estimated by considering the distance accelerometer output vector. Accelerometer magnitude is
between two markers. The standard deviation of the fluctuation represented by thick line
"o+ 150-
strapdown integration 1+l[+m+,
11 ,er
[D acce,erometer
<~ 1oo- 10
=
+m
50-
o •~ 5
0 Z . . . . i
+5
0 20 40 60 80 100 120 140 160
cr
time, s
Fig. 5 Example trial of orientation error during crate-lifting trial. Pelvis Trunk Forearm
Orientation error is defined as angle over which computed
sensor frame has to be rotated to coincide with actual Fig. 7 RMS value of inclination error for three types of movement,
sensor frame
obtained using Kalman filter and using accelerometer as
inclinometer. Inclination of pelvis and trunk were obtained
during crate-lifting tasks (number of measurements = 10),
and inclination of forearm was obtained from three morning
was defined likewise as the time derivative of the change in
and three eating daily routines
heading error. The average orientation and heading drift over
several trials is given in Fig. 6. Using paired t-tests with a
5% significance level, it was found that the orientation errors An example of gyroscope offset estimation during a crate-
from the Kalman filter are significantly smaller than the lifting experiment is given in Fig. 9. The decline in offset
errors obtained by integration alone. However, the heading that is estimated using the Kalman filter is presented using an
errors from the Kalman filter axe not significantly different initial offset error of t 0 deg s -1. Fig. t 0 also gives the standard
from the heading errors from the strapdown integration deviation estimated by the Kalman filter. These are the square
algorithm. roots of the three diagonal elements of Qb+t. As the acceler-
The RMS value of the inclination error during different tasks ometer gives an estimate of the inclination, merely the gyro-
is shown in Fig. 7. For three tasks, the inclination as computed scope offset of gyroscopes with their sensitive axes in the
with the Kalman filter is compared with the inclination that horizontal plane can be corrected. This is also shown in the
is obtained by low-pass filtering the accelerometer signals standard deviation graph. As the y-axis points in the lateral
and applying (7). The low-pass filter is a fourth order direction during the entire trial, the y-component of the offset
Butterworth filter with a 5 Hz cutoff frequency. The Kalman has the smallest covaxiance at the end of the trial.
filter performed significantly better than the method without The offset estimation was tested for the lifting experiments
Kalman filter. To test the robustness of the filter for the (N = t0), with the sensor on the trunk and pelvis, as well as
speed of movement, the influence of the lifting speed on the for the eating and morning routine tasks together (N = 6),
inclination error was determined (Fig 8). A linear regression with the sensor on the forearm. The remaining offset error
was made between the lifting speed and inclination error. after 120 s is shown in Fig. t0. From the Figure, it can be
The slope was significantly different from zero and the corre- seen that, for crate-lifting tasks, the estimation of the offsets
lation coefficient was 0.77 for the Kalman filter and 0.95 for in the sensor z-axis is most difficult. This is because the
the method using only the accelerometer. Especially at high z-axis of the sensor co-ordinate frame is predominantly vertical
lifting speeds, the Kalman filter shows a considerable improve- during these trials.
ment over the use of accelerometers as inclinometers.
5 Discussion
4.4 Gyroscope offset estimation
Considering Figs 6 and 7, it can be concluded that the orien-
The time required for the filter to estimate the offset was
tation drift of the examined trials processed using the Kalman
tested by off-line processing of the sensor signals using an
initial offset error, artificially added to the gyroscope signals
prior to application of the Kalman filter. The offset error at
8-
the end of the measurement was then used as a measure for
the ability of the filter to estimate the offset.
6
• Kalmanfilter X3
~ 2.0 5 gyroscopes
8 ~ f.5 O3
~4-
~ 1.0
C
orientation heading orientation heading orientation heading
2-
Pelvis Trunk Forearm