Abstract
This paper proposes a Kalman filter-based attitude (i.e., roll and pitch) estimation algorithm using an inertial sensor composed of a triaxial accelerometer and a triaxial gyroscope. In particular, the proposed algorithm has been developed for accurate attitude estimation during dynamic conditions, in which external acceleration is present. Although external acceleration is the main source of the attitude estimation error and despite the need for its accurate estimation in many applications, this problem that can be critical for the attitude estimation has not been addressed explicitly in the literature. Accordingly, this paper addresses the combined estimation problem of the attitude and external acceleration. Experimental tests were conducted to verify the performance of the proposed algorithm in various dynamic condition settings and to provide further insight into the variations in the estimation accuracy. Furthermore, two different approaches for dealing with the estimation problem during dynamic conditions were compared, i.e., threshold-based switching approach versus acceleration model-based approach. Based on an external acceleration model, the proposed algorithm was capable of estimating accurate attitudes and external accelerations for short accelerated periods, showing its high effectiveness during short-term fast dynamic conditions. Contrariwise, when the testing condition involved prolonged high external accelerations, the proposed algorithm exhibited gradually increasing errors. However, as soon as the condition returned to static or quasi-static conditions, the algorithm was able to stabilize the estimation error, regaining its high estimation accuracy.
Index Terms: Accelerometer, attitude estimation, external acceleration, gyroscope, inertial sensor, Kalman filter (KF)
I. Introduction
Inertial, such as accelerometers and gyroscopes, are widely used in many applications, and the number of applications is increasing exponentially as these inertial sensors continually shrink in size and cost through the advent of the microelectromechanical-systems technology [1]. In particular, the use of inertial sensors has already become popular in ambulatory applications such as detection of unconstrained walking [2] and pedestrian localization [3], [4]. In biomedical applications, miniature inertial sensors can work as “wearable sensors” that are attached unobtrusively and noninvasively to the body or part of clothing in order to monitor and track a wearer’s motion outside a specialized motion capture laboratory [5]–[7].
Orientation estimation using inertial sensors is an important research theme since it provides the angular position information to complement the primary sensor signals (i.e., angular velocities from gyroscopes and linear accelerations from accelerometers). In fact, most of the previous works concerning inertial sensing-based orientation estimation have focused on 3-D orientations by combining the inertial sensor with a magnetometer, which forms an attitude and heading reference system (AHRS) [8]–[11]. In an AHRS, the attitude implies the roll and pitch of the Euler angles, while the heading implies yaw. In this configuration, the magnetometer provides the heading direction information by measuring the local magnetic field vector as the accelerometer alone cannot sense the rotation about the vertical axis [12]. However, many applications such as human balance (e.g., [13]) and vehicle stability control (e.g., [14]) problems require only the attitude states and not the heading states. In these applications, in which inertial sensors could be employed to measuring human falls or vehicle rollovers, the focus lies strictly on the estimation of the tilt angles with respect to the vertical axis (i.e., attitudes) in the presence of the gravity. This paper specifically deals with the attitude estimation problem using a six-axis inertial sensor comprised of a triaxial accelerometer and a triaxial gyroscope only.
The two underlying concepts (UC) behind the inertial sensing-based attitude estimation problem are as follows.
UC1: The accelerometer measurement can provide the fixed vertical reference, which is the gravitational acceleration. Note that the accelerometer signal is dominated by gravity only during static or quasi-static conditions (i.e., it is kinematic condition dependent).
UC2: The angular velocity from the gyroscope can be integrated to obtain the orientation or the attitude. Note that the gyroscope signal is dominated by the angular velocity regardless of kinematic conditions (i.e., it is kinematic condition independent).
However, these underlying concepts are faced with the following signal processing difficulties (DC).
DC1: During dynamic conditions, the accelerometer is sensitive to not only gravity but also the external acceleration of the object/body that the sensor is attached to. Therefore, the accelerometer signal is the summation of the gravitational acceleration and the external acceleration. However, since the accelerometer reading is inherently expressed with respect to the sensor reference frame, the gravity component with respect to the sensor frame changes according to the changes in the sensor orientation. Thus, one cannot distinguish the gravitational acceleration from the external acceleration.
DC2: When the gyroscope signal is integrated, its measurement errors are also integrated and cause boundless orientation drift errors.
Therefore, a proper fusion of the accelerometer and gyroscope signals is needed to overcome the aforementioned difficulties. In particular, in order to obtain high estimation accuracy during dynamic conditions, DC1 needs to be properly addressed by the estimation algorithm.
In the literature, approaches to deal with DC1 can be categorized into the following two: 1) threshold-based switching approach and 2) acceleration model-based approach. First, the threshold-based switching approach that is more popular in the literature uses conditional switching of the measurement signals’ weights when dynamic conditions are detected, e.g., when the norm of accelerometer output is deviated from a pre-defined threshold near the gravity acceleration (9.81 m/s2). For example, in [15]–[17], smaller weights are assigned to the accelerometer output in comparison to those assigned to the gyro output in dynamic conditions by increasing the corresponding measurement noise covariances of their Kalman filters (KFs). In [11], an adaptive method is proposed, where the direction of external acceleration is estimated from the KF residual. This leads to weights being assigned to those accelerometer outputs that are affected by the external acceleration only, whereas the weights for the unaffected accelerometer outputs are kept constant during the estimation. Second, the acceleration model-based approach involves the use of an external acceleration model without relying on the conditional switching. One was presented in [18] and used in [9] in the same way when the algorithm was extended for the 3-D orientation estimation. In this paper, the proposed algorithm is based on the modification of this acceleration model concept. Although the aforementioned two approaches are conceptually different from each other and may present different pros and cons, they have not been compared explicitly in terms of the performance characteristics of each approach.
One important by-product of the orientation estimation using an inertial sensor is the estimation of the external acceleration from the accelerometer signal by subtracting the gravitational acceleration. It should be noted that the attitude information is sufficient for this subtraction and does not require the full 3-D orientation. This is essential if one wishes to estimate velocities and positions through the integration of the external acceleration in applications such as fall detection [19], [20]. However, although external acceleration is the main source of the attitude estimation error and despite the need for its accurate estimation in many applications, the problem of estimating the external acceleration during the orientation estimation has not been explicitly discussed in the literature. Furthermore, none of the previous works shows the performance in orientation estimation over various dynamic conditions.
This paper proposes a new KF-based attitude estimation algorithm using a six-axis inertial sensor. In particular, the proposed algorithm has been developed to perform during the dynamic conditions in which external accelerations are present. Accordingly, experiments are carried out to evaluate the accuracy of the proposed algorithm in estimating not only attitudes but also external accelerations over a much wider range of dynamic conditions than previously considered, including severely perturbed conditions. The expansion of the experimental testing conditions provides further insight into the variations in the estimation accuracy of inertial sensors and their capabilities/limitations with respect to varying operating conditions. Furthermore, the properties of the proposed acceleration model-based approach are discussed in comparison to those of the threshold-based switching approach.
II. Method
A. Problem Definition
The coordinate transformation of a 3 × 1 vector x between the sensor frame S and the inertial frame I is
| (1) |
where the left superscripts I and S of x’s imply that the corresponding vectors are expressed in the inertial and sensor frame coordinates, respectively, and is the rotation matrix of the sensor frame S with respect to the inertial frame I. Henceforth, the rotation matrix is simply denoted as R for convenience. The rotation matrix R contains the three unit column vectors of the inertial coordinate system expressed in the sensor coordinate system as
| (2) |
Using the conventional Z – Y – X Euler angles, R can be expressed as
| (3) |
where α (yaw), β (pitch), and γ (roll) are the rotation angles about the Z-, Y -, and X-axes, respectively. Note that the last row of the matrix R of (3) (i.e., SZ) is expressed in terms of only γ and β, without α. Therefore, roll and pitch can be calculated only using SZ (= [SZ1 SZ2 SZ3]T) as follows:
| (4) |
Next, considering Ig (the gravity vector with respect to the inertial frame) is g × IZ where g is 9.8 m/s2, Sg (the gravity vector with respect to the sensor frame) can be expressed in terms of SZ as
| (5) |
Therefore, SZ is the sufficient information to calculate the attitude (i.e., roll and pitch) and also to compensate for the gravity effect in the accelerometer signal (i.e., not requiring a 3-D orientation such as R). Hence, the purpose of the proposed KF is to estimate SZ.
B. Algorithm Description
Sensor Modeling
Sensor signals from the gyroscope (G) and the accelerometer (A) are modeled, respectively, as follows:
| (6a) |
| (6b) |
where ω is the angular velocity, a is the external acceleration, and n’s are the measurement noises that are assumed to be uncorrelated and zero-mean white Gaussian. Note that every sensor exhibits bias errors that include not only constant offset errors but also moving bias errors. The bias errors are a highly complex function of environmental conditions, particularly to the ambient temperature. However, once the sensor signals have been stabilized following a few minutes of sensor warm-up time, the biases change very slowly, and their effect is minimal. Therefore, the proposed algorithm does not take biases into consideration. In (6b), the external acceleration Sa is modeled as a first-order low-pass filtered white noise process as in [18], i.e.,
| (7) |
where ca is a dimensionless constant between 0 and 1 that determines the cutoff frequency and εt is the time-varying error of the acceleration process model.
KF Design
In the proposed algorithm, a linear KF is used, which can be defined by the following process and measurement models [21]:
| (8a) |
| (8b) |
where x is the state vector, z is the measurement vector, Φ is the state transition matrix, H is the observation matrix, and w and v are the white Gaussian process and measurement noises, respectively. Since the purpose of our KF is to estimate SZ, the state vector is simply defined as x = SZ.
First, the process model is based on the gyro measurement under UC2. Hence, the orientation can be found by considering a first-order approximation of a strapdown integration step
| (9) |
where Δt is the sampling time interval and the 3 × 3 matrix ω̃ denotes a skew-symmetric matrix function of the vector ω, the so-called cross-product matrix (i.e., ãb = a × b). The specific form of (9) for SZ is
| (10) |
Since the ideal angular velocity ω in (10) is unavailable in practice due to the measurement noise, (10) needs to be expressed using the actual gyro output yG(= ω + nG) which leads to
| (11) |
The derivations from (10) to (11) can be found in the Appendix. From (11), the transition matrix Φ t−1 and the process noise wt−1 can be defined as follows:
| (12) |
| (13) |
The process noise covariance matrix Qk−1 is then defined by
| (14) |
where E is the expectation operator. Using (13), Qt−1 can be redefined as
| (15) |
ΣG in (15) is the covariance matrix of the gyro’s measurement noise and is defined as . ΣG is set equal to where is obtained by assuming that the gyro noise variance is equal in the x-, y-, and z-directions when the same type of gyro is used for all three axes.
Second, the measurement model is based on the accelerometer measurement under UC1. Although the role of the measurement model is to correct the estimation error introduced during the time propagation (associated with DC2) in the process model, the measurement model should properly address DC1 as well, in order to achieve high estimation accuracy during dynamic conditions. Therefore, the external acceleration model in (7) is inserted into the accelerometer model in (6b) along with (5). For this purpose, let us define the error of the predicted acceleration as
| (16) |
where the minus superscript denotes the a priori (or predicted) estimate while the plus superscript in (17) below denotes the a posteriori estimate after the filter correction. In (16), the predicted external acceleration of the current time step is which is available from the previous step. Then, (6b) can be rewritten as
| (17) |
Note that the left side of (17) represents the subtraction of the external acceleration from the accelerometer signal in order to keep UC1 valid even in the dynamic conditions so that it becomes capable of handling DC1. From (17), the measurement vector zt, the observation matrix H, and the measurement noise vt in the measurement model of (8b) are
| (18) |
| (19) |
| (20) |
The measurement noise covariance matrix Mt is defined by
| (21) |
Since is uncorrelated to nA, (21) can be divided into
| (22) |
where Σacc is the covariance matrix of the acceleration model error and defined as and ΣA is the covariance matrix of the accelerometer’s measurement noise and defined as . Now, using (16) and then assuming that is uncorrelated to Sat, i.e., (by taking and considering that a white noise process is serially uncorrelated), and that, on average, the expectation of external acceleration is zero, i.e., , ∑acc can be simplified as
| (23) |
Note that, since Σacc is time varying and cannot be analytically obtained, it is approximated to have only diagonal elements where the square of the vector norm of is evenly distributed to each diagonal elements, i.e., . If we compare (17) with the corresponding equation during static conditions, i.e., yA,t = gSZt + nA, the covariance matrix Σacc plays a key role in compensating for the effect of external acceleration by increasing Mt. Next, ΣA is set as (similarly with ΣG) where is the accelerometer noise variance.
Once the process and measurement models are defined as the above, the procedure of the proposed linear KF can be summarized as follows.
- Compute the a priori state estimate
(24) - Compute the a priori error covariance matrix
(25) - Compute the Kalman gain
(26) - Compute the a posteriori state estimate
(27) - Compute the a posteriori error covariance matrix
(28)
Since Step 4) does not preserve the unit-norm property of , it needs to be normalized, i.e., , which is subsequently redefined as . In Steps 3)–5), a scalar matrix H reduces the overall computational cost. Once is estimated, the external acceleration is obtained by
| (29) |
The overall structure of the proposed algorithm is illustrated in Fig. 1.
Fig. 1.
Overview of the proposed algorithm’s structure.
III. Experimental Results
A. Test Setup
For verification of the proposed algorithm, which was implemented using C programming, an MTx inertial/magnetic sensor (from Xsens Technologies B.V., Netherlands) that includes a triaxial gyroscope and a triaxial accelerometer was used. It provided measurement inputs to the proposed algorithm at a 100-Hz sampling rate (i.e., Δt = 0.01 s). Also, in order to check the orientation estimation accuracy, VisualEyez VZ3000 3-D optical tracking system (from Phoenix Technologies Inc., Canada) was used with the same sampling rate. For taking simultaneous measurements, a plastic right triangle ruler (with a 14-cm hypotenuse) was mounted on top of the MTx sensor, and then, three LED markers from the VisualEyez system were attached to each vertex of the ruler using double-sided adhesive tapes. These three markers form a plane that defines a unique 3-D orientation with respect to the optical tracker’s predefined reference frame. This 3-D orientation was used to obtain the reference attitude vector SZref. Next, the reference external acceleration Saref was obtained as yA − gSZref due to the unavailability of nA.
B. Various Test Conditions and Estimation Modes
To study the proposed algorithm’s performance under various dynamic conditions, three different tests in terms of the magnitude and duration of the external accelerations were performed. All tests involved rotating the sensor manually in a random manner by hand. Test A (related to Fig. 2) was carried out with slow movements: the averaged magnitude of the reference external acceleration, , of around 0.40 m/s2 with a maximum of 1.83 m/s2. Test B (related to Figs. 3 and 4) was performed with a considerable amount of external accelerations: of around 3.06 m/s2 with a maximum of 16.71 m/s2. In this test, the sensor experienced two external accelerations, first for 2.4 s during 1.3–3.7 s followed by 1.6 s of rest and then for 2.5 s during 5.3–7.8 s [see Fig. 3(a)]. Test C (related to Figs. 5 and 6) involved much higher external acceleration magnitudes than Test B: of around 6.29 m/s2 with a maximum of 37.22 m/s2. The sensor was subjected to the major external accelerations, first for 8.0 s during 7.5–15.5 s followed by 1.4 s of rest, then for 5.8 s during 16.9–22.7 s followed by 0.3 s of rest, and, lastly, for 2.4 s during 23.0–25.4 s [see Fig. 5(a)]. Therefore, in comparison to Test B, Test C was performed not only with a higher magnitude of external acceleration but also with longer acceleration and shorter resting periods. In addition, the sensor experienced repetitive and abrupt acceleration changes in terms of the direction, which makes the condition of Test C highly severe in relation to the algorithm providing accurate estimations. Note that the purpose of Test C is to see the limitation of the estimation capability of the proposed algorithm.
Fig. 2.
Results of Test A—(solid lines) attitude (i.e., roll and pitch) estimation errors with respect to (dashed lines) the reference attitude from (a and b) Mode 1 and (c and d) Mode 2.
Fig. 3.
Magnitudes of (a) the external acceleration and (b) the accelerometer signal of Test B. In (b), two horizontal dashed lines centered by the solid line represent the lower and upper bounds of the gravity range with the threshold of 0.2 m/s2.
Fig. 4.
Results of Test B—(solid lines) estimated attitudes and external accelerations in comparison to (dashed lines) the references from (a–e) Mode 1, (f–j) Mode 2, and (k–o) Mode 3. The first two rows are the roll and pitch, and the last three rows are the x, y, and z components of the external accelerations.
Fig. 5.
Results of Test C—(a) magnitude of external acceleration. (b–d) are the magnitudes (m/s2) of the estimated external acceleration errors from Modes 1–3, respectively.
Fig. 6.
Results of Test C from Mode 1—(a) magnitude of external acceleration. (b–f) (Solid lines) Attitude and external acceleration estimation errors with respect to (dashed lines) the references.
For each of the aforementioned tests, the orientation was estimated using three different estimation modes. First, Mode 1 is the proposed KF algorithm which adopts the acceleration model to deal with DC1. In the proposed KF, there are three parameters that need to be set: the gyroscope noise variance , the accelerometer noise variance , and the external acceleration model-related constant ca. and were set to 10−4 rad2/s2 and 10−4 m2/s4, respectively, which were obtained from static measurements with the sensor lying still on a floor. ca was set to 0.1, which was experimentally chosen by testing a range of trial and error values of ca that gives satisfactory results for the algorithm. Second, Mode 2 is based on the assumption of static accelerometer measurement without explicitly considering DC1, i.e., yA = Sg + nA instead of (6b). Accordingly, (18), (20), and (22) were replaced with zt = yA,t, vt = nA, and Mt = ΣA, respectively. Also, (7), (16), and (17) were not used in Mode 2. The rest of its procedure follows that of Mode 1. Third, Mode 3 is based on the aforementioned threshold-based switching scheme, which can be implemented by adding the following equation to the procedure of Mode 2:
| (30) |
where εA is the threshold for the magnitude of the accelerometer output and was set to 0.2 m/s2. This value was chosen since it produced the best estimation results in our tests (which will be shown in Table III). The same value was also chosen in the previous works [11] and [15]. It should be noted that, even during dynamic conditions, the norm of the accelerometer output, ||yA||, can still lie within the range designated as the static condition (i.e., [g − εA, g + εA]). An example of this case would be when the accelerometer quickly alternates between acceleration and deceleration [see Fig. 3(b)], resulting in ||yA|| passing in and out of the range. Therefore, in order to avoid erroneous switches from the dynamic phase (where ΣA,t = ∞) to the static phase (where ) in such a case, the switching condition ||yA|| − g| ≤ εA should be assured for a certain amount of time, i.e., nΔt where n was set to four. The only difference of Mode 3 from Mode 2 is the addition of the threshold-based conditional equation (30).
TABLE III.
Root Mean Square Errors (°) of Attitude Estimations of Mode 3 for Different Values of εA’s and n’s
| εA (m/s2), n | Test A | Test B | Test C | |||
|---|---|---|---|---|---|---|
| Roll | Pitch | Roll | Pitch | Roll | Pitch | |
| 0.05, 1 | 1.89 | 1.34 | 1.29 | 0.77 | 8.46 | 4.11 |
| 0.1, 2 | 1.82 | 1.38 | 1.28 | 0.78 | 8.50 | 4.04 |
| 0.2, 4 | 1.86 | 1.39 | 1.15 | 0.76 | 7.41 | 5.19 |
| 0.5, 7 | 1.86 | 1.40 | 3.59 | 1.67 | 5.85 | 3.48 |
| 1.0, 10 | 1.86 | 1.40 | 9.13 | 7.45 | 5.57 | 3.47 |
C. Estimation Results
In Test A, all of the three modes produced almost the same results (see Table I). Since Test A essentially simulates a quasi-static condition, UC1 was satisfied without encountering DC1, and even Mode 2 was able to provide accurate attitude estimations (see Fig. 2).
TABLE I.
Root Mean Square Errors of Attitude and External Acceleration Estimations From Different Modes
| Attitude (°) | External acceleration (m/s2) | ||||||
|---|---|---|---|---|---|---|---|
| Roll | Pitch | Sax | Say | Saz | ||Sa|| | ||
| Test A | Mode 1 | 1.84 | 1.39 | 0.23 | 0.26 | 0.15 | 0.27 |
| Mode 2 | 1.86 | 1.40 | 0.23 | 0.27 | 0.15 | 0.28 | |
| Mode 3 | 1.86 | 1.39 | 0.23 | 0.27 | 0.15 | 0.27 | |
|
| |||||||
| Test B | Mode 1 | 1.77 | 0.92 | 0.15 | 0.17 | 0.24 | 0.23 |
| Mode 2 | 18.21 | 10.88 | 1.71 | 1.86 | 2.31 | 2.01 | |
| Mode 3 | 1.15 | 0.76 | 0.12 | 0.11 | 0.16 | 0.15 | |
|
| |||||||
| Test C | Mode 1 | 5.28 | 4.00 | 0.55 | 0.53 | 0.69 | 0.52 |
| Mode 2 | 17.08 | 6.78 | 0.98 | 2.09 | 1.41 | 1.77 | |
| Mode 3 | 7.41 | 5.19 | 0.81 | 0.91 | 0.71 | 0.81 | |
In Test B, the static accelerometer measurement assumption of UC1 was no longer valid because of the presence of large external acceleration magnitudes. Accordingly, Mode 2 produced significant estimation errors [see Fig. 4(f)–(j)], which confirms that accurate attitude and external acceleration estimations during dynamic conditions cannot be achieved without a proper consideration of DC1. However, due to the explicit consideration of the external acceleration in the procedures, Modes 1 and 3 were able to provide accurate attitude and external acceleration estimates (see Fig. 4(a)–(e) and (k)–(o), respectively). Although the estimation accuracy from Mode 3 was slightly better than that from Mode 1, the difference was almost negligible (i.e., < 1° in angular position).
In Test C, which involves the most severe condition (see Fig. 5(a) for the magnitude of the applied external acceleration), Mode 1 experienced some degree of gradually increasing estimation errors during prolonged severely excited periods (see Fig. 5(b) for the magnitude of the estimated external acceleration error). However, when the sensor returned to the quasi-static condition (e.g., between 15.5–16.9 s and 22.7–23.0 s), the estimation accuracy was recovered gradually but quickly. Due to the prolonged exposure to the accelerated conditions as well as the acceleration changes that were applied in a repetitive fashion, as expected, Test C produced the largest estimation errors among the three results from Mode 1 (see Fig. 6 for each estimation error). As expected, the estimation result from Mode 2 was severely deviated from the reference [see Fig. 5(c)]. Similarly with Mode 1, Mode 3 also experienced the gradually increasing estimation errors during the excited periods. However, while the estimation error from Mode 1 was decreased to zero in a gradual fashion when the static conditions reappeared, the decrease was more abrupt for Mode 3 when the static condition in (30) was satisfied [see Fig. 5(d)]. Clearly, this is due to the conditional switching of the threshold-based method in Mode 3. However, because of the setting of the small threshold value and the requirement of some number of successive satisfactions of ||yA|| − g| ≤ εA in (30), the onset of switching occurred later than that of Mode 1’s estimation recovery. In terms of Test C’s estimation accuracy, Mode 1 showed a slightly higher accuracy than Mode 3 (i.e., about 2° in angular position and 0.3 m/s2 in acceleration). This difference was mainly caused by the estimation performance after 25.4 s [see Fig. 5(d) in comparison to Fig. 5(b)]. Mode 3 was not able to enter the static phase via switching for the drift correction at around 25.4 s (when the motion condition became the static condition for a short time) and remained in the dynamic phase.
IV. Discussion
A. Mode 1
In Mode 1 (the proposed algorithm), the insertion of the external acceleration model in (7) plays a critical role in achieving the required high estimation accuracy during dynamic conditions. In the acceleration model, the constant coefficient ca is the only tuning parameter that can lead to variations in the estimation performance. Note that the effect of ca on estimation varies for each test conditions (see Table II). In Test A, a small ca such as 0.001 worked well, while a large ca such as 1 caused relatively large estimation errors. On the other hand, in Test B, the estimation error showed the opposite tendency to that of Test A. Basically, ca adjusts how much the accelerometer signal affects the estimation. When ca is small, zt in (18) and Mt in (22) are close to yA,t and ΣA, respectively. If zt and Mt become yA,t and ΣA by setting ca = 0, the algorithm essentially becomes Mode 2, which is based on the assumption of static accelerometer measurement. Therefore, a smaller ca puts more weight on the accelerometer signal rather than the gyro signal. Inversely, a larger ca makes the algorithm rely more on the gyro signal. Fig. 7 shows representative examples of the effect of ca on the estimation. Since Test A was performed in a quasi-static condition, ca = 0.001 produced accurate estimation [see Fig. 7(b)] while the estimation with ca = 1 exhibited a drift [see Fig. 7(c)] similar to the case when only the gyro signal was integrated without using the accelerometer signal [see Fig. 7(a)]. Contrariwise, since Test B was performed with short-period external acceleration, which required the gyro signal, the estimation with ca = 0.001 [see Fig. 7(e)] produced the similar result as in Mode 2 [see Fig. 7(d)], while the estimation with ca = 1 showed accurate results [see Fig. 7(f)]. Note that the accurate estimation from ca = 1 in Test B was only possible since the test duration of Test B was short (i.e., 10 s). In Test C, even with the optimally selected coefficient value (i.e., ca = 0.2), the estimation error gradually increased until the sensor returned to the static conditions as shown in Fig. 6. This accumulation of the errors can be explained from the requirement for the external acceleration of the previous time step in (17). This implies that the measurement model is not only based on the current sensor measurement but also takes into account the previously estimated value. Hence, there is a propagation of errors in the estimation, indicating that the estimation during a prolonged accelerated condition may not be able to maintain an acceptable accuracy level. With regard to the comparison of the external acceleration model in our method to that in [18], although the model itself represented in (7) is similar in form with the counterpart in [18], the detailed implementation of the model in each KF is different due to the entirely different KF structure. For example, in [18], the covariance matrix of εt in (7) is treated as constant while that of our method is dealt with a time-varying matrix as described in (23).
TABLE II.
Root Mean Square Errors (°) of Attitude Estimations of Mode 1 for Different Values of ca’s
| Ca | Test A | Test B | Test C | |||
|---|---|---|---|---|---|---|
| Roll | Pitch | Roll | Pitch | Roll | Pitch | |
| 0.001 | 1.86 | 1.40 | 17.98 | 10.80 | 13.02 | 7.43 |
| 0.01 | 1.86 | 1.40 | 9.03 | 6.28 | 6.92 | 8.87 |
| 0.05 | 1.85 | 1.40 | 2.86 | 1.76 | 5.79 | 5.42 |
| 0.1 | 1.84 | 1.39 | 1.77 | 0.92 | 5.28 | 4.00 |
| 0.3 | 1.85 | 1.35 | 1.11 | 0.74 | 6.43 | 4.76 |
| 0.5 | 1.99 | 1.38 | 1.05 | 0.82 | 9.40 | 7.09 |
| 0.7 | 17.72 | 10.87 | 1.09 | 1.02 | 11.93 | 8.54 |
| 1.0 | 44.13 | 19.96 | 1.20 | 1.53 | 16.25 | 10.34 |
Fig. 7.
(Solid lines) Roll estimations in comparison to (dashed lines) the references of (a–c) Test A and (d–f) Test B. (a) When only the gyro signal was integrated without using the accelerometer signal. (b and e) When ca = 0.001 in Mode 1. (c and f) When ca = 1 in Mode 1. (d) From Mode 2.
B. Mode 3 and Its Comparison With Mode 1
In Mode 3, there are two tuning parameters: the threshold εA and the time-related constant n in (30). First, regarding the threshold, a smaller threshold value (implying a narrower bandwidth for satisfying the static condition) decreases the chance for the drift to be corrected by the accelerometer signal, which is undesirable. However, it can avoid the chance for the estimation to be seriously affected by the perturbed accelerometer signal before the phase is switched from the dynamic phase to the static phase, which is desirable. By considering the noise level in the accelerometer measurement, εA needs to be larger than σA, which is the standard deviation of ||yA||(practically, larger than 3σA that corresponds to 0.03 m/s2 in our accelerometer). Second, the requirement to assign some number (n) of successive satisfactions of |||yA|| − g| ≤ εA in (30) to enter (or switch back to) the static phase is important in avoiding a false entrance to the static phase during dynamic conditions. Such a case is typical when ||yA|| passes through the gravity level due to the fast direction change in the acceleration. For the given sampling rate, the number of samples that can be collected within the range [g − εA, g + εA] during the passing depends on the width of the range determined by the threshold. Therefore, the selection of n is related to the selection of εA, i.e., the larger εA requires the larger n. However, the larger n (implying more number of successive satisfactions of |||yA|| − g| ≤ εA) reduces the chance for the drift to be corrected by the accelerometer signal when actual static conditions are encountered by delaying the phase switching. Table III shows the attitude estimation results for different values of εA’s and the corresponding n’s. Trial and error was used to manually select the latter values to provide the best estimations. Although Test A was not sensitive to the setting of εA due to the quasi-static motion condition, the estimation of Test B was severely deteriorated when εA was set to a large value as it was already affected by the perturbed accelerometer signal before the phase switching.
It is important to note that we do not make claims that the proposed method (Mode 1) is superior to Mode 3 in terms of the estimation accuracy based on the result of Test C in Table I since a different threshold in Mode 3 could produce a similar degree of accuracy in Test C. For example, in the case of εA = 1.0 m/s2 in Table III, Mode 3 entered the static phase for the drift correction at around 25.4 s in contrast to the estimation with εA = 0.2 m/s2 shown in Fig. 5(d). Also, a different test scenario may yield different accuracies for Modes 1 and 3. However, one particular problem with the threshold-based switching approach of Mode 3 is that the proper selection of εA and n is very tricky in practice because each test scenario may require different settings, while the estimation performance is highly sensitive to such settings. Note that, in the proposed acceleration model-based approach of Mode 1, a properly determined ca can work generally in most scenarios, which makes Mode 1 relatively easy to use in practice. Furthermore, the threshold-based switching approach often produces discontinuity or abrupt changes in the estimation at the time of the phase switching, depending on the set level of the threshold. This problem can be readily observed in Fig. 5(d).
C. Orientation Representation
In terms of the orientation representation, Euler angles, quaternion, and rotation matrix (also known as the direction cosine matrix) are the most common. First, the Euler angles are conceptually intuitive and have only three parameters that are the minimal number to represent a 3-D orientation. In case of the attitude estimation problem (i.e., 2-D orientation estimation), only two of the parameters (i.e., roll and pitch) are needed to be set as state variables (e.g., [22] and [23]). However, the singularity issue of the Euler angles hinders the estimation when full range rotations are involved. Second, the quaternion is very effective due to its singularity-free aspect and less computing time (e.g., does not require any trigonometric transformations to construct rotation matrices) and thus can arguably be considered as the most popular representation for 3-D orientation estimation (e.g., [8], [10], [11], and [15]). However, when it is used for the attitude estimation, all four parameters of the quaternion still need to be employed, which makes it not as efficient as when it is used for the 3-D orientation estimation. Last, since the rotation matrix has nine parameters, it is less popular than the Euler angles and the quaternion in the 3-D orientation estimation problem. However, the aforementioned advantage of the quaternion over the rotation matrix in the 3-D orientation problem (i.e., less number of parameters) does not apply for the 2-D attitude estimation problem. In fact, with respect to the attitude estimation, the rotation matrix can be considered as the best choice because only three parameters of the rotation matrix (composing one unit axis vector) can be used for the estimation without the singularity issue of the Euler angles. Therefore, the proposed algorithm uses the unit axis vector (SZ) for attitude representation in order to achieve both computational efficiency and nonsingularity.
D. Limitation and Future Work
As mentioned previously, the external acceleration estimation is a by-product of the attitude estimation problem. Accordingly, the estimation error of external acceleration (i.e., ) is related to that of attitude (i.e., ). Using (29) and (6b), can be expressed in terms of , i.e., . By considering the fact that SZ is a unit vector and ignoring nA, it can be noticed that each component of cannot exceed 2g in magnitude, regardless of the value of Sa and yA (i.e., the acceleration estimation error is bounded). In fact, during dynamic conditions, an exact orientation estimation requires an exact external acceleration estimation and vice versa, which are not possible in practice. In other words, any approaches that deal with the DC1 issue will exhibit some inherent limitations in this regard. Therefore, when we apply an inertial sensor to estimate attitude and/or external acceleration of a body or an object, the operating kinematic conditions must be considered in term of the duration and severity of the external accelerations in order to justify the accuracy and validity of the resulting estimation performance. For example, a moving automotive vehicle may generate significant and continuous accelerations, which will cause significant estimation errors if the estimation algorithm is not given a chance to correct the accumulated errors from time to time. However, typical human motions pertain to slow motion conditions or only intermittent fast motion conditions, and thus, the inertial sensing-based estimations become more reliable and suitable for such applications. In order to increase the feasibility of applying the proposed method in various conditions, a potential future research direction would be to add an inference step or estimation scheme for learning the parameter (i.e., the constant coefficient ca) on the fly as the data come from the sensors in real time.
V. Conclusion
In this paper, a KF-based attitude estimation method has been presented. The proposed algorithm was evaluated under various conditions to investigate the variations in the estimation performance with respect to the attitude and also external acceleration. Furthermore, two different approaches, acceleration model-based (Mode 1) versus threshold-based switching (Mode 3), that deal with dynamic conditions were discussed. Based on the external acceleration model, the proposed algorithm is capable of providing accurate estimates of attitude and external accelerations for short accelerated periods (e.g., a few seconds, which can vary depending on the sensor performance and the duration and severity of accelerations). When the testing condition involved prolonged high external accelerations, the proposed algorithm exhibited gradually increasing errors. However, as soon as the condition returned to static or quasi-static conditions, the algorithm was able to stabilize the estimation error, which tended to zero mean and a small variance. In terms of the estimation accuracy, due to the variations in accuracy with respect to varying operating conditions, this paper does not claim the superiority of the proposed model-based approach over the threshold-based approach. However, in terms of the stability and practicality, the proposed method may be advantageous due to its continuous estimation capability and simpler parameter settings, respectively.
Acknowledgments
This work was supported in part by the Natural Sciences and Engineering Research Council of Canada (RGPIN-298219-2007) and in part by the Canadian Institutes of Health Research. The Associate Editor coordinating the review process for this paper was Dr. Antonios Tsourdos.
Biographies
Jung Keun Lee (M’11) received the B.Sc. and M.Sc. degrees in mechanical engineering from Hanyang University, Seoul, Korea, in 1997 and 1999, respectively, and the Ph.D. degree in mechatronic systems engineering from the School of Engineering Science, Simon Fraser University (SFU), Surrey, BC, Canada, in 2010.
Prior to his Ph.D. study, he was a Naval Officer with the Republic of Korea Navy and, then, was a Research Engineer with the Powertrain R&D Centre, Hyundai Motor Company. After his Ph.D. study, he was a Postdoctoral Fellow with the School of Engineering Science, SFU. Since 2012, he has been with Hankyong National University, Anseong, Korea, where he is currently a Faculty Member with the Department of Mechanical Engineering. His research interests include inertial-sensing-based human motion tracking, biomechatronics, wearable sensor applications, dynamics and control, and automotive engineering.
Edward J. Park (S’02–M’03) received the B.A.Sc. degree from the University of British Columbia, Vancouver, BC, Canada, in 1996 and the M.A.Sc. and Ph.D. degrees in mechanical engineering from the University of Toronto, Toronto, ON, Canada, in 1999 and 2003, respectively.
He is currently an Associate Professor of Mechatronic Systems Engineering with the School of Engineering Science, Simon Fraser University, Surrey, BC, where he is also the Director of the Biomechatronic Systems Laboratory. His current research interests include the following: 1) biomechatronics and biomedical technologies for life sciences, rehabilitation, and medicine and 2) mechatronics applied to next-generation vehicular, robotic, and space systems. He has authored or coauthored close to 100 journal and conference papers in these areas.
Stephen N. Robinovitch received the B.A.Sc. degree in mechanical engineering from the University of British Columbia, Vancouver, BC, Canada, in 1988, the M.Sc. degree in mechanical engineering from Massachusetts Institute of Technology (MIT), Cambridge, in 1990, and the Ph.D. degree in medical engineering from MIT/Harvard in 1995.
He is a Professor and Canada Research Chair in Injury Prevention and Mobility Biomechanics at Simon Fraser University, Burnaby, BC. His research focuses on improving our understanding of the cause and prevention of fall-related injuries (particularly hip fracture) in older adults, through laboratory experiments, mathematical modeling, field studies in residential care facilities, and product design.
Appendix A
By applying and subsequently, (10) becomes
| (31) |
If we replace ω with yG − nG according to (6a) and use , (31) becomes
| (32) |
After expanding the right side of (32) and applying ñG,t−1SZt−1 = −SZ̃t−1nG,t−1 to the last term, (32) becomes (11).
Contributor Information
Jung Keun Lee, School of Engineering Science, Simon Fraser University, Burnaby, BC V5A 1S6, Canada. He is now with the Department of Mechanical Engineering, Hankyong National University, Anseong 456-749, Korea.
Edward J. Park, Mechatronic Systems Engineering, School of Engineering Science, Simon Fraser University, Burnaby, BC V5A 1S6, Canada.
Stephen N. Robinovitch, School of Engineering Science, Simon Fraser University, Burnaby, BC V5A 1S6, Canada, and also with the Department of Biomedical Physiology and Kinesiology, Simon Fraser University, Burnaby, BC V5A 1S6, Canada
References
- 1.Barbour N, Schmidt G. Inertial sensor technology trends. IEEE Sens J. 2001 Dec;1(4):332–339. [Google Scholar]
- 2.Lee JK, Park EJ. Quasi real-time gait event detection using shank-attached gyroscopes. Med Biol Eng Comput. 2011 Jun;49(6):707–712. doi: 10.1007/s11517-011-0736-0. [DOI] [PubMed] [Google Scholar]
- 3.Roetenberg D, Slycke PJ, Veltink PH. Ambulatory position and orientation tracking fusing magnetic and inertial sensing. IEEE Trans Biomed Eng. 2007 May;54(5):883–890. doi: 10.1109/TBME.2006.889184. [DOI] [PubMed] [Google Scholar]
- 4.Yun X, Bachmann ER, Moore H, Calusdian J. Proc IEEE Int Conf Robot Autom. Roma; Italy: 2007. Self-contained position tracking of human movement using small inertial/magnetic sensor modules; pp. 2526–2533. [Google Scholar]
- 5.Lee JK, Park EJ. 3D spinal motion analysis during staircase walking using an ambulatory inertial and magnetic sensing system. Med Biol Eng Comput. 2011 Jul;49(7):755–764. doi: 10.1007/s11517-011-0738-y. [DOI] [PubMed] [Google Scholar]
- 6.Salarian A, Horak FB, Zampieri C, Carlson-Kuhta P, Nutt JG, Aminian K. iTUG, a sensitive and reliable measure of mobility. IEEE Trans Neural Syst Rehab Eng. 2010 Jun;18(3):303–310. doi: 10.1109/TNSRE.2010.2047606. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Chen BR, Patel S, Buckley T, Rednic R, McClure DJ, Shih L, Tarsy D, Welsh M, Bonato P. A web-based system for home monitoring of patients with Parkinson’s disease using wearable sensors. IEEE Trans Biomed Eng. 2011 Mar;58(3):831–836. doi: 10.1109/TBME.2010.2090044. [DOI] [PubMed] [Google Scholar]
- 8.Lee JK, Park EJ. Minimum-order Kalman filter with vector selector for accurate estimation of human body orientation. IEEE Trans Robot. 2009 Oct;25(5):1196–1201. [Google Scholar]
- 9.Roetenberg D, Luinge HJ, Baten CT, Veltink PH. Compensation of magnetic disturbances improves inertial and magnetic sensing of human body segment orientation. IEEE Trans Neural Syst Rehab Eng. 2005 Sep;13(3):395–405. doi: 10.1109/TNSRE.2005.847353. [DOI] [PubMed] [Google Scholar]
- 10.Yun X, Bachmann ER. Design, implementation, and experimental results of a quaternion-based Kalman filter for human body motion tracking. IEEE Trans Robot. 2006 Dec;22(6):1216–1227. [Google Scholar]
- 11.Suh YS. Orientation estimation using a quaternion-based indirect Kalman filter with adaptive estimation of external acceleration. IEEE Trans Instrum Meas. 2010 Dec;59(12):3296–3305. [Google Scholar]
- 12.Yun X, Bachmann ER, McGhee RB. A simplified quaternion-based algorithm for orientation estimation from Earth gravity and magnetic field measurements. IEEE Trans Instrum Meas. 2008 Mar;57(3):638–650. [Google Scholar]
- 13.Weinberg MS, Wall C, Robertsson J, ONeil E, Sienko K, Fields R. Tilt determination in MEMS inertial vestibular prosthesis. J Biomech Eng. 2006 Dec;128(6):943–956. doi: 10.1115/1.2378922. [DOI] [PubMed] [Google Scholar]
- 14.Ryu J, Gerdes JC. Integrating inertial sensors with GPS for vehicle dynamics control. J Dyn Syst Meas Control. 2004 Jun;126(2):243–254. [Google Scholar]
- 15.Sabatini AM. Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans Biomed Eng. 2006 Jul;53(7):1346–1356. doi: 10.1109/TBME.2006.875664. [DOI] [PubMed] [Google Scholar]
- 16.Rehbinder H, Hu X. Drift-free attitude estimation for accelerated rigid bodies. Automatica. 2004;40(4):653–659. [Google Scholar]
- 17.Harada T, Uchino H, Mori T, Sato T. Proc IEEE Int Conf Robot Autom. New Orleans, LA: Apr. 2004. Portable absolute orientation estimation device with wireless network under accelerated situation; pp. 1412–1417. [Google Scholar]
- 18.Luinge HJ, Veltink PH. Measuring orientation of human body segments using miniature gyroscopes and accelerometers. Med Biol Eng Comput. 2005 Mar;43(2):273–282. doi: 10.1007/BF02345966. [DOI] [PubMed] [Google Scholar]
- 19.Bourke AK, ODonovan KJ, O’Laighin G. The identification of vertical velocity profiles using an inertial sensor to investigate pre-impact detection of falls. Med Eng Phys. 2008 Sep;30(7):937–946. doi: 10.1016/j.medengphy.2007.12.003. [DOI] [PubMed] [Google Scholar]
- 20.Wu G, Xue S. Portable preimpact fall detector with inertial sensors. IEEE Trans Neural Syst Rehab Eng. 2008 Apr;16(2):178–183. doi: 10.1109/TNSRE.2007.916282. [DOI] [PubMed] [Google Scholar]
- 21.Welch G, Bishop G. An introduction to the Kalman filter. Dept. Comput. Sci., Univ. North Carolina Chapel Hill; Chapel Hill, NC, TR95-041: 1995. [Google Scholar]
- 22.Suh YS, Park SK, Kang HJ, Ro YS. Attitude estimation adaptively compensating external acceleration. JSME Int J, Ser C. 2006;49(1):172–179. [Google Scholar]
- 23.Vaganay J, Aldon MJ, Fournier A. Proc IEEE Int Conf Robot Autom. Atlanta, GA: May, 1993. Mobile robot attitude estimation by fusion of inertial data; pp. 277–282. [Google Scholar]







