Attitude estimation is often inaccurate during highly dynamic motion due to the external acceleration. This paper proposes extended Kalman filterbased attitude estimation using a new algorithm to overcome the external acceleration. This algorithm is based on an external acceleration compensation model to be used as a modifying parameter in adjusting the measurement noise covariance matrix of the extended Kalman filter. The experiment was conducted to verify the estimation accuracy, that is, oneaxis and multiple axes sensor movement. Five approaches were used to test the estimation of the attitude: (1) the KFbased model without compensating for external acceleration, (2) the proposed KFbased model which employs the external acceleration compensation model, (3) the twostep KF using weightedbased switching approach, (4) the KFbased model which uses the
The inertial measurement unit (IMU) is typically used to determine attitude, that is, roll and pitch, by fusing accelerometer and gyro data. The most notable disturbance of attitude determination is external acceleration [
The attitude solution provided by the gyro is prone to being unbounded, to bias, and to randomwalk errors. In static or slow movement, the accelerometer measures roll and pitch by leveling to correct the gyrounbounded error. This is due to the trustworthiness of the gravitational measurement. Therefore, a proper fusion of IMU data and the algorithm to compensate for external acceleration is needed to overcome the shortcomings of each sensor and the effect of external acceleration. The fusion technique evolved along two major paths: one approach incorporates the use of a Kalman filter [
Suh et al. [
Inspired by Suh et al. [
The rest of the paper is organized as follows: Section
The relative attitude (roll and pitch) of two frames of reference used a direction cosine matrix (rotation matrix) for coordinate transformation or rotation of object.
Orientation of axes of sensitivity for IMU.
The wellknown rotation matrix, with the function of
Measurements model for attitude determination using accelerometers is constructed by the third row of
Sensor signal from the accelerometer is modeled as follows:
In this section, we introduce the method for compensating for the external acceleration. Our method is based on the view that external acceleration is a disturbance in the original signal and therefore should be removed from the original signal. The disturbance rejection model was derived from a common control ratio model [
The external acceleration (
The inputoutput diagram of external acceleration compensation.
The compensating model in (
The analysis of the stability of model (
For a parabolic function input,
Time response plot corresponding to (
Attitude determination from gyro had errors accumulating along the process of numerical integration, but the gyro was sensitive to the change of rotation. While the attitude determination by the accelerometer does not show accumulation errors or divergence, the error in the roll and pitch axis is too large because those two axes are mutually affected. When there is a movement in the roll axis, the pitch axis also moves up and down with respect to the horizontal plane, and vice versa. In the proposed method, both sensors are complementary to each other to achieve performance in the sensor fusion technique using the extended Kalman filter (EKF).
In this paper, the work will be divided into five modes.
We initially defined the states and the observation variables for the system model. We set attitude and gyro bias as state variables, since the bias errors are a highly complex function to the ambient temperature. The Euler angle was the angle representation. The state variable
In (
The measurement from the accelerometer which is used to calculate
Figure
Structure of the proposed algorithm.
In Figure
All calculations were taken from IMU and placed on the table without movement for approximately one minute with sampling period
Threeaxis gyroscope and accelerometer in static condition.
The initial value of the bias gyro was determined heuristically through static IMU data in rad/s unit. The initial value for attitude states was chosen as one degree for each state. The initial states value in EKF model is as follows:
Since the noise is assumed to be in normal distribution and independent on each axis, we use the variance of noise
The measurement noise covariance matrix (
The above process and measurement models construct the procedure of the EKF as follows:
Set the initial values for states and error covariance
Predict states and error covariance
Compute the Kalman gain
Compute the states estimate
Compute the error covariance
The twostep EKF [
The state
We have five modes of attitude estimation, as stated in Section
Test A was performed by placing the IMU sensor on the slider table of a MISUMI RSH3 singleaxis robot. By moving the slider back and forth with the robot controller, external acceleration is applied on the
Test B involved movement using free hand in the
Test C was executed based on the application of attitude estimation on a shoetype measurement device. An IMU sensor was placed on the top of one shoe. The subject was asked to walk straight, 34 strides, at a normal speed.
To verify and validate the proposed method, all tests were conducted using an IMU sensor consisting of an accelerometer (±16 g), a gyro (±1500 deg/s), and a magnetometer (±0.9 Ga) (from Logical Product, Japan). Sensor data were transmitted to the PC wirelessly. A combination of NI LabVIEW® and Simulink® was used for data acquisition and the MATLAB® program was used to execute the proposed method. In Test A, the MISUMI RSH3 singleaxis robot (from MISUMI Group Inc., Japan) had a max speed of 300 mm/s, had an effective stroke of 500 mm, and was controlled by the RSManager support software used as a testbed (see Figures
Test A setup for validating attitude estimation. The RSH3 table slider moves along the
In Test B, the IMU sensor was placed in plastic jar surrounded by styrofoam to avoid magnetic interference between the IMU and the electromagnetic motion tracking system receiver (Fastrak from Polhemus Inc., USA). We used Fastrak as the reference by recording the roll and pitch angles of the receiver using C# data acquisition program. Fastrak attitude data were transmitted to the PC via a cable using an RS232 protocol (see Figure
Test B setup consisted of Fastrak® attitude reference system and IMU inside a plastic jar.
In Test C, we mounted the IMU sensor on the shoe. For a reference measurement, the experiment setup contained six OptiTrack® cameras, and four reflective markers were placed at the forefoot and heel. Figures
Measurement setup for Test C. (a) Room setup for recording the attitude; (b) four reflective markers were placed on the forefoot and heel.
The quantitative performance assessment for Test A, Test B, and Test C is using mean squared error (MSE or
(a) Test A: MSE (
Acc (m/s^{2}) 















0.1  9.60  2.92  9.31  2.71  99.42  26.73  9.04  2.89 
0.75  24.77  3.22  24.66  3.20  92.56  183.10  22.92  2.82 
1.5  29.79  3.59  29.41  4.02  113.20  227.13  28.79  2.86 
2.5  36.84  4.88  34.49  5.60  44.94  168.43  33.82  4.03 
Mean (sd)  25.25 (10)  3.65 (0.8)  24.47 (9.4)  3.88 (1.1)  87.53 (25.7)  151.35 (75.1)  23.64 (9.3)  3.15 (0.5) 
Acc (m/s^{2}) 















0.1  26.05  8.61  26.05  8.61  18.52  10.19  21.97  8.99 
0.75  27.93  7.76  27.93  7.76  20.87  19.02  22.97  6.56 
1.5  29.16  6.81  29.16  6.81  23.72  25.44  22.45  5.74 
2.5  29.70  12.30  29.70  12.30  16.44  20.74  23.69  9.35 
Mean (sd)  28.21 (1.4)  8.87 (2.1)  28.21 (1.4)  8.87 (2.1)  19.89 (2.7)  18.85 (5.5)  22.77 (0.6)  7.66 (1.5) 
To follow the adaptation of measurement noise covariance matrix (
For the purpose of looking at the effect of the reduction of external acceleration, the
Test A: MSE of
MSE 








Pitch (deg^{2})  0.5  15.28 (6.95)  12.94 (5.86)  12.31 (5.56)  11.2 (5.02)  10.86 (4.86)  10.44 (4.65) 
0.1  13.77 (6.11)  11.52 (5.08)  10.93 (4.80)  9.89 (4.30)  9.58 (4.15)  9.17 (3.94)  
0.05  13.50 (6.04)  11.29 (5.02)  8.9 (5.88)  9.67 (4.23)  9.35 (4.07)  8.94 (3.86)  
0.01  13.13 (6.12)  10.94 (5.06)  10.36 (4.76)  9.31 (4.21)  8.99 (4.03) 




Roll (deg^{2})  0.5  2.62 (0.96)  2.32 (1.02)  2.25 (1.04)  2.13 (1.09)  2.10 (1.10)  2.07 (1.12) 
0.1  2.39 (1.00)  2.11 (1.07)  2.04 (1.09)  1.94 (1.12)  1.91 (1.13)  1.87 (1.14)  
0.05  2.27 (1.02)  1.99 (1.08)  1.81 (1.20)  1.82 (1.11)  1.79 (1.12)  1.75 (1.12)  
0.01  1.91 (1.04)  1.67 (1.08)  1.62 (1.09)  1.53 (1.10)  1.51 (1.10) 

The influence of the presented
MSE pitch of
MSE roll of
The MSE (
Test B was executed by rotating the IMU sensor in a random manner by hand along the
Graphs of the square of compensation model output of various value of
External acceleration compensation: original accelerometer signal is shown in (a), (b), and (c); compensation model output is shown in (d), (e), and (f) along the
(a), (b), and (c): graphs of the square of compensation model output for
Test B attitude estimation result: five modes in comparison to the references (a and g) for pitch (left column) and roll (right column).
Figures
Parameter values are used in each mode in Test B.
Attitude reference signal from Fastrak is shown in Figures
Test B: (a) MSE pitch of five modes, (b) MSE roll of five modes during external acceleration, all in deg^{2}.
Test B: the final MSE pitch and roll of each mode during external acceleration in deg^{2}.
Test C was executed by walking straight forward three strides along the
Test C attitude estimation result: five modes in comparison to the motion capture system as references (a and g).
Some parameters values are used in Test C for each mode.
External acceleration compensation does not play a role in
Test A: MSE of all modes, presented as mean (standard deviation).
MSE  Mode 1  Mode 2  Mode 3  Mode 4  Mode 5 

Pitch (deg^{2})  25.25 (10)  8.57 (3.8)  24.47 (9.4)  87.53 (25.7)  23.64 (9.3) 
Roll (deg^{2})  3.65 (0.8)  1.48 (1.1)  3.88 (1.1)  151.35 (75.1)  2.82 (0.1) 
Test B: MSE (









0.01  13.92  11.54  11.91 

0.03  13.21 

11.44  14.19 
0.05 

11.58 

14.42 
0.1  13.70  11.96  12.63  14.92 
0.15  14.48  12.23  13.93  15.28 
0.2  15.14  12.45  14.81  15.54 
0.25  15.68  12.62  15.40  15.73 
0.3  16.11  12.76  15.86  15.90 
Test B: MSE (
External acceleration period 


















Phase I  74.59  18.51  42.03  11.42  51.92  12.47  123.83  19.45  30.46  10.31 
Phase II  70.59  21.70  26.69  10.45  33.07  12.39  66.92  13.48  27.98  9.69 















Phase III  50.34  17.29  37.85  14.42  15.12  8.57  48.16  10.08  25.46  8.13 
Phase IV  47.63  16.95  22.63  9.51  24.35  11.48  42.07  11.78  18.96  9.18 
Test B: MSE of all modes in degree
MSE  Mode 1  Mode 2  Mode 3  Mode 4  Mode 5 

Pitch (deg^{2})  72.59  34.36  42.49  95.37  29.22 
Roll (deg^{2})  48.98  30.24  19.73  45.11  22.21 
Test C: MSE in degree
MSE  Mode 1  Mode 2  Mode 3  Mode 4  Mode 5 

Pitch (deg^{2})  395.35  175.97  147.92  1036.2  160.87 
Roll (deg^{2})  367.57  245.80  55.24  141.35  217.94 
The result of
The proposed algorithm in
The two parameters
The result of
For Test A, the variability of
In Test B, quantitative assessment of MSE on pitch and roll is done in
In our Test A and Test B experiment,
The result in Table
Of all the tests, the estimation accuracy of
In our experiments, the accuracy of
The difference between
In all tests, the proposed
First is the limitation of measurement model.
The second limitation is that the proposed external acceleration compensation in (
The third limitation is considering the application of
The fourth limitation is related to the linearization process in the process model of
In this paper, the main contribution is the algorithm for external acceleration compensation, which aims to improve the attitude estimation accuracy. A Kalman filterbased attitude estimation using a compensating algorithm has been discussed. The experiment was performed using three types of tests: movement on one axis, dynamic movement using freehand movement, and walking. We employed five different approaches to deal with the dynamic test and the proposed method is placed on
The experiment results showed that, by using the external acceleration compensation process, the estimation accuracy of the proposed algorithm is improved when compared with the standard EKF procedure in
There is a lack of efficiency comparison to some modes in the experiments. Compared to the other modes, the advantage of
Nevertheless, as a future problem to be solved, in order to increase the estimation accuracy potential for other applications, it needs the addition of a step that can perform adaptive parameter settings (
The authors declare that there are no competing interests regarding the publication of this paper.