research article attitude estimation using kalman...

25
Research Article Attitude Estimation Using Kalman Filtering: External Acceleration Compensation Considerations Romy Budhi Widodo 1,2 and Chikamune Wada 1 1 Graduate School of Life Science and Systems Engineering, Kyushu Institute of Technology, Hibikino 2-4, Wakamatsu-ku, Kitakyushu, Fukuoka 808-0196, Japan 2 Informatics Engineering Study Program, Ma Chung University, Villa Puncak Tidar N-1, Malang 65151, Indonesia Correspondence should be addressed to Romy Budhi Widodo; romy [email protected] Received 26 January 2016; Revised 2 June 2016; Accepted 20 June 2016 Academic Editor: Pietro Siciliano Copyright © 2016 R. B. Widodo and C. Wada. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Attitude estimation is oſten inaccurate during highly dynamic motion due to the external acceleration. is paper proposes extended Kalman filter-based attitude estimation using a new algorithm to overcome the external acceleration. is 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. e experiment was conducted to verify the estimation accuracy, that is, one-axis and multiple axes sensor movement. Five approaches were used to test the estimation of the attitude: (1) the KF-based model without compensating for external acceleration, (2) the proposed KF-based model which employs the external acceleration compensation model, (3) the two-step KF using weighted-based switching approach, (4) the KF-based model which uses the threshold-based approach, and (5) the KF-based model which uses the threshold-based approach combined with a soſtened part approach. e proposed algorithm showed high effectiveness during the one-axis test. When the testing conditions employed multiple axes, the estimation accuracy increased using the proposed approach and exhibited external acceleration rejection at the right timing. e proposed algorithm has fewer parameters that need to be set at the expense of the sharpness of signal edge transition. 1. Introduction e inertial measurement unit (IMU) is typically used to determine attitude, that is, roll and pitch, by fusing accelerometer and gyro data. e most notable disturbance of attitude determination is external acceleration [1], which is caused by a change of velocity in magnitude or direction [2]. Recently, the IMU has been widely used in many applications, such as gait assessment systems [3–5]; classification of human movement and falls [6, 7]; and specific modeling on certain body movements—for example, sit-to-stand [8, 9]. Attitude estimation using IMU is an important theme in the literature, specifically on how to improve its accuracy and reliability. is leads us to the aim of this study, which is to present a new algorithm to overcome the existence of external acceleration in order to improve attitude estimation accuracy. e attitude solution provided by the gyro is prone to being unbounded, to bias, and to random-walk errors. In static or slow movement, the accelerometer measures roll and pitch by leveling to correct the gyro-unbounded error. is is due to the trustworthiness of the gravitational measurement. erefore, 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. e fusion technique evolved along two major paths: one approach incorporates the use of a Kalman filter [10–12] while the other algorithm consists of a complemen- tary filter [13, 14]. Suh et al. [1], Sabatini [11], and Harada et al. [12] proposed the adapted measurement noise covariance matrix to over- come some disturbances, including external acceleration. e adapted algorithm in [1] is based on the weighted-switching approach. In contrast, Sabatini in [11] used a threshold-based approach, while Harada et al. [12] proposed a threshold-based approach combined with soſtened part. Hindawi Publishing Corporation Journal of Sensors Volume 2016, Article ID 6943040, 24 pages http://dx.doi.org/10.1155/2016/6943040

Upload: others

Post on 10-May-2020

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Research ArticleAttitude Estimation Using Kalman FilteringExternal Acceleration Compensation Considerations

Romy Budhi Widodo12 and Chikamune Wada1

1Graduate School of Life Science and Systems Engineering Kyushu Institute of Technology Hibikino 2-4 Wakamatsu-kuKitakyushu Fukuoka 808-0196 Japan2Informatics Engineering Study Program Ma Chung University Villa Puncak Tidar N-1 Malang 65151 Indonesia

Correspondence should be addressed to Romy Budhi Widodo romy budhiyahoocom

Received 26 January 2016 Revised 2 June 2016 Accepted 20 June 2016

Academic Editor Pietro Siciliano

Copyright copy 2016 R B Widodo and C Wada This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

Attitude estimation is often inaccurate during highly dynamic motion due to the external acceleration This paper proposesextended Kalman filter-based attitude estimation using a new algorithm to overcome the external acceleration This algorithmis based on an external acceleration compensation model to be used as a modifying parameter in adjusting the measurement noisecovariance matrix of the extended Kalman filter The experiment was conducted to verify the estimation accuracy that is one-axisandmultiple axes sensormovement Five approacheswere used to test the estimation of the attitude (1) theKF-basedmodel withoutcompensating for external acceleration (2) the proposed KF-based model which employs the external acceleration compensationmodel (3) the two-step KF using weighted-based switching approach (4) the KF-based model which uses the threshold-basedapproach and (5) the KF-based model which uses the threshold-based approach combined with a softened part approach Theproposed algorithm showed high effectiveness during the one-axis test When the testing conditions employed multiple axes theestimation accuracy increased using the proposed approach and exhibited external acceleration rejection at the right timing Theproposed algorithm has fewer parameters that need to be set at the expense of the sharpness of signal edge transition

1 Introduction

The inertial measurement unit (IMU) is typically usedto determine attitude that is roll and pitch by fusingaccelerometer and gyro data The most notable disturbanceof attitude determination is external acceleration [1] which iscaused by a change of velocity in magnitude or direction [2]Recently the IMUhas beenwidely used inmany applicationssuch as gait assessment systems [3ndash5] classification of humanmovement and falls [6 7] and specific modeling on certainbody movementsmdashfor example sit-to-stand [8 9] Attitudeestimation using IMU is an important theme in the literaturespecifically on how to improve its accuracy and reliabilityThis leads us to the aim of this study which is to present a newalgorithm to overcome the existence of external accelerationin order to improve attitude estimation accuracy

The attitude solution provided by the gyro is prone tobeing unbounded to bias and to random-walk errors In

static or slowmovement the accelerometermeasures roll andpitch by leveling to correct the gyro-unbounded errorThis isdue to the trustworthiness of the gravitational measurementTherefore a proper fusion of IMU data and the algorithm tocompensate for external acceleration is needed to overcomethe shortcomings of each sensor and the effect of externalacceleration The fusion technique evolved along two majorpaths one approach incorporates the use of a Kalman filter[10ndash12] while the other algorithm consists of a complemen-tary filter [13 14]

Suh et al [1] Sabatini [11] andHarada et al [12] proposedthe adapted measurement noise covariance matrix to over-come some disturbances including external accelerationTheadapted algorithm in [1] is based on the weighted-switchingapproach In contrast Sabatini in [11] used a threshold-basedapproach whileHarada et al [12] proposed a threshold-basedapproach combined with softened part

Hindawi Publishing CorporationJournal of SensorsVolume 2016 Article ID 6943040 24 pageshttpdxdoiorg10115520166943040

2 Journal of Sensors

XY

Z

Figure 1 Orientation of axes of sensitivity for IMU

Inspired by Suh et al [1] Sabatini [11] and Harada et al[12] this paper proposed the extended Kalman filter- (EKF-)based attitude estimation using a new algorithm to overcomethe existence of external acceleration We extracted externalacceleration from the accelerometer signal with a model andused it to adjust the measurement noise covariance matrixThe aforementioned algorithm is verified by conducting one-axis and multiple axes movement experiments

The rest of the paper is organized as follows Section 2describes attitude determination and the proposed algorithmSection 3 discusses the experimental setup and results Sec-tion 4 then presents a discussion of the algorithm approachesand a comparison regarding the experimental results InSection 5 we present our conclusion

2 Method

21 Sensor Model The relative attitude (roll and pitch) of twoframes of reference used a direction cosine matrix (rotationmatrix) for coordinate transformation or rotation of object 120593(roll) 120579 (pitch) and 120595 (yaw) are the rotation angles about the119909- 119910- and 119911-axes on the sensor body as shown in Figure 1119862119868119861 indicates a rotation matrix that represents the relative

attitude of frame 119868 (inertial frame) with respect to frame 119861(body of sensor) thus allowing the relation as follows

x119868 = 119862119868119861x119861 (1)

where x119861 is the coordinate vector in frame 119861 and x119868 is thecoordinate in frame 119868

The well-known rotation matrix with the function of119885 rarr 119884 rarr 119883 Euler angles is as follows

119862119868119861

(120593 120579 120595) = 119862119883(120593) 119862119884 (120579) 119862119885 (120595)

=[[

[

119888120579119888120595 minus119888120593119904120595 + 119904120593119904120579119888120595 119904120593119904120595 + 119888120593119904120579119888120595

119888120579119904120595 119888120593119888120595 + 119904120593119904120579119904120595 minus119904120593119888120595 + 119888120593119904120579119904120595

minus119904120579 119904120593119888120579 119888120593119888120579

]]

]

(2)

where 119904 and 119888 are the short forms of sine and cosine respec-tively

Dfxk ak

Y

+minus

flowastxk

Compensatingmodel

Figure 2 The input-output diagram of external acceleration com-pensation

Measurements model for attitude determination usingaccelerometers is constructed by the third row of 119862119868119861 thatcontains 120593 and 120579 It is independent of rotation along the 119911-axis (120595)

Sensor signal from the accelerometer is modeled asfollows

119891119860= 119886 + 119892 [minus119904120579 119904120593119888120579 119888120593119888120579]

119879

(3)

where 119891119860is a vector of 119891

119909 119891119910 and 119891

119911 the acceleration is

measured by the three-axis accelerometer on the body frameThe unwanted external acceleration information (119886) in theaccelerometer will be estimated This acceleration is causedby the change of velocity in magnitude andor direction Theexternal acceleration is the main source of errors in attitudeestimation

22 External Acceleration Compensation Method In thissection we introduce the method for compensating for theexternal acceleration Our method is based on the viewthat external acceleration is a disturbance in the originalsignal and therefore should be removed from the originalsignal The disturbance rejection model was derived from acommon control ratio model [15] From this point on theterm ldquocompensation modelrdquo will be used to replace the termldquodisturbance rejection modelrdquo The three-axis accelerometerdata is input for the compensation model Each axis willbe treated in the same step therefore for the sake ofconvenience only the 119909-axis will be discussed In (4) ideallythe compensated 119909-axis accelerometer signal (119891lowast119909

119896) was

determined by subtracting the compensationmodel in the 119909-axis (119886

119896) from the original signal (119891119909

119896)

119891lowast119909119896= 119891119909119896minus 119886119896 (4)

The external acceleration (119886119896) is extracted from 119891119909

119896by

the compensation model Figure 2 shows the ideal modeldiagram of (4) However due to the dynamism of the systemand many uncertainties there is no ideal model Conse-quently we will use the result of the compensation model asone parameter for adjusting the noise covariance matrix insensor fusion in the next section The design approach fora compensation model is based on the specification that themodel should not be affected by the disturbance input 119889(119905) Inother words the steady-state output should be zero if possible

Journal of Sensors 3

or a small constant 119910(119905)ss = 0 119889(119905) = 0 A control ratio in the119904 domain [15] is commonly written as follows

119884 (119904)

119863 (119904)=119870 (119904119908+ 119888119908minus1

119904119908minus1

+ sdot sdot sdot + 1198881119904 + 1198880)

119904119899 + 119902119899minus1

119904119899minus1 + sdot sdot sdot + 1199021119904 + 1199020

(5)

Assuming a step disturbance signal 119863(119904) = 1198630119904 the output

will be

119884 (119904) =1198701198630(119904119908+ 119888119908minus1

119904119908minus1

+ sdot sdot sdot + 1198881119904 + 1198880)

119904 (119904119899 + 119902119899minus1

119904119899minus1 + sdot sdot sdot + 1199021119904 + 1199020)

(6)

where 119870 is gain constant 119870 gt 0 119888 and 119902 are constantcoefficients and119863

0is the final value of step disturbance The

condition 119910(119905)ss = 0 will be achieved if 1198880= 0 and requires

the numerator of 119884(119904)119863(119904) to have at least one zero at theorigin of the 119904-plane On the other side the location of thepoles on the 119904-plane determined its corresponding responseTo produce the damped response the poles should be on theleft-half 119904-planeThere are two possibilities for poles locationson the left-half side such as complex-conjugate poles and realpoles which have the output characteristics of exponentiallydamped sinusoid and damped exponential response respec-tively In our model we chose damped exponential responsebecause the disturbance should be suppressed without a sinu-soidally oscillating component Finally we determined thetransfer function of our model there is one zero at the originand one real pole on the left-half of the 119904-plane which is basedon (5) and becomes as follows

119884 (119904)

119863 (119904)=

119870119904

119904 + 1199020

(7)

The compensating model in (7) attenuates low frequen-cies and as a result a high frequency signal is obtained Thisis in line with the fact that the external acceleration occurswhen the change of velocity in magnitude andor directionof each axis exceeds a certain limit

The analysis of the stability of model (7) will be intro-duced in the time domain as follows In the time domain thestability will be achieved based on the principle that there isa limited response to the limited input We discuss the timeresponse of singularity input functions to this model such asstep ramp rectangular pulse and parabolic functions Thetime response model (7) for a unit step input 119906(119905) is 119910(119905) =119870119890minus1199020119905 We get steady-state response for 119910(119905) and the steady-

state error as in

119910 (119905)ss = lim119905rarrinfin

119870119890minus1199020119905 = 0 (8)

err (119905)ss = lim119905rarrinfin

(1 minus 119870119890minus1199020119905) = 1 (9)

The time response for ramp input (119889(119905) = 119905) is119910(119905) = 1198701199020(1minus

119890minus1199020119905) The steady-state output and error are calculated asfollows

119910 (119905)ss = lim119905rarrinfin

119870

1199020

(1 minus 119890minus1199020119905) =

119870

1199020

err (119905)ss = lim119905rarrinfin

119870

1199020

(119890minus1199020119905 minus 1) + 119905 = infin

(10)

A rectangular pulse of amplitude 1119886 and of duration 119886119889(119905) =(119906(119905) minus 119906(119905 minus 119886))119886 has a zero steady-state output and also azero steady-state error

For a parabolic function input 119889(119905) = 051199052 the time

response is calculated as follows with an infinity steady-stateoutput and infinity steady-state error

119910 (119905) =119870

1199020

119905 +119870

11990202(119890minus1199020119905 minus 1) (11)

These four kinds of singularity inputs and their combinationrepresent the possibility of disturbance waveforms All ofthem have the tendency to be rejected and damped by model(7) The response of the parabolic input has not shownconstant steady-state output however it represented theexponentially damped factor Figures 3(a) 3(b) 3(c) and 3(d)illustrate all time responses for each basic input signal usingmodel (7) within 119870 = 1 Each figure has two outputs that is1199101(119905) and 119910

2(119905) where 119902

0in 1199101(119905) is greater than 119902

0in 1199102(119905)

23 Attitude Determination through Sensor Fusion MethodAttitude determination from gyro had errors accumulatingalong the process of numerical integration but the gyro wassensitive to the change of rotation While the attitude deter-mination by the accelerometer does not show accumulationerrors or divergence the error in the roll and pitch axis istoo large because those two axes are mutually affected Whenthere is a movement in the roll axis the pitch axis also movesup and down with respect to the horizontal plane and viceversa In the proposedmethod both sensors are complemen-tary to each other to achieve performance in the sensor fusiontechnique using the extended Kalman filter (EKF)

In this paper the work will be divided into five modesMode 1 is the standard EKF using the proposed systemmodelbut without compensating the external acceleration Mode 2is the proposed system model also containing the proposedexternal acceleration compensation with a preprocessingtechnique for accelerometer data using model (7) before theEKF process The difference between Mode 2 and Mode 1is the addition of the measurement error covariance basedon the external acceleration compensation model A detailedexplanation of Mode 1 and Mode 2 is in Section 24 Mode3 is derived from [1] the two-step EKF which adjusts themeasurement noise covariance using the weighted-switchingapproach Mode 4 is the quaternion-based EKF which usesa threshold-based approach to set the measurement errorcovarianceThis mode is derived from [11]Mode 5 is derivedfrom [12] which uses an unscented Kalman filter (UKF)This method works as threshold-based approach combinedwith a softened part of measurement noise covariance matrixadjustment

24 Algorithm Description of Mode 1 and Mode 2

241 Process and Measurement Models We initially definedthe states and the observation variables for the systemmodelWe set attitude and gyro bias as state variables since thebias errors are a highly complex function to the ambienttemperature The Euler angle was the angle representation

4 Journal of Sensors

d(t)

y1(t)y2(t)

y(t)

KD

120572p

0

0 T1 tx1 tx2T2

t

(a)t

y(t)

d(t)

y1(t)

y2(t)

0

Kq02

Kq01

(b)

t

y(t)

d(t)

y1(t)

y2(t)

0

(c)

t

d(t)

1a

05a

0

t

1a

05a

minus05a

y1(t)

y2(t)

0

y(t)

y(t)

(d)

Figure 3 Time response plot corresponding to (7) for some basic input signals (a) step function (b) ramp (c) parabolic and (d) pulse

The state variable 119909(119905) and the measurement variable 119911(119905) aredefined as follows

119909 = [120593 120579 120595 119887119909

119887119910

119887119911]119879

119911 = [120593119886 120579119886

120595119886]119879

(12)

where 120593 (roll) and 120579 (pitch) are the rotation angles about the119909- and 119910-axes and 120595 is yaw angle but it is not of concernin this study These come from the integration of the rate ofchange from gyros while 119887

119909 119887119910 and 119887

119911are biases from gyro

in 119909- 119910- and 119911-axis respectively We use the measurementfrom the accelerometer in order to calculate 120593

119886 120579119886 and 120595

119886as

measurement variables The system equation is given by (119905) = 119891 (119909 (119905)) + 119908 (119905)

119911 (119905) = 119867119909 (119905) + V (119905) (13)

where 119891(119909(119905)) is a nonlinear function representing the rela-tion between gyros data and kinematic equation for the Euler

angles (119885 rarr 119884 rarr 119883) 119867 is state to measurement matrixas shown in (14) and 119908(119905) and V(119905) are process noise andmeasurement noise respectively which are assumed to beuncorrelated Gaussian distributed white noise Consider

119891 (119909) =

[[[[[[[[[[[

[

1 119904120593119905120579 119888120593119905120579 0 0 0

0 119888120593 minus119904120593 0 0 0

0 119904120593119904119888120579 119888120593119904119888120579 0 0 0

0 0 0 1 0 0

0 0 0 0 1 0

0 0 0 0 0 1

]]]]]]]]]]]

]

sdot

[[[[[[[[[[[

[

119901 minus 119887119909

119902 minus 119887119910

119903 minus 119887119911

119887119909

119887119910

119887119911

]]]]]]]]]]]

]

119867 =[[

[

1 0 0 0 0 0

0 1 0 0 0 0

0 0 1 0 0 0

]]

]

(14)

Journal of Sensors 5

Inertial sensor

Gyroscope

Accelerometer

External accelerationcompensation

ak a2k

EKF

Initial valuesx0 P0

Time updatexminusk = f(xkminus1)

Pminusk = APkminus1A

T + Q

Measurement update

Kk = Pminusk HT(HPminus

k HT + R)minus1

xk = xminusk + Kk(zk minus Hxminus

k )

Pk = Pminusk minus KkHPminus

k

Figure 4 Structure of the proposed algorithm

In (14) 119901 119902 and 119903 are angular velocities measured fromthe gyro along the 119909- 119910- and 119911-axes respectively Symbolsof 119904 119888 119905 and 119904119888 are short forms of sine cosine tangentand secant respectively This process model is nonlinearsince it contains trigonometric functions Therefore we useJacobian values of the nonlinear model of 119891(119909) to replacestate transition matrix (119860) where the values in that matrixare obtained by applying the previous estimated states in theEKF process In contrast matrix119867 is the linear expression

The measurement from the accelerometer which is usedto calculate 120593

119886and 120579119886as measurement variables is a common

initialized leveling equation [2 16]

120593119886= arctan

2(119891119910 119891119911)

120579119886= arctan(

minus119891119909

119891119910119904120593119886+ 119891119911119888120593119886

)

(15)

Figure 4 shows the structure of the proposed algorithmcombined with the extended Kalman filter algorithm Thenotations and meanings of

119896 minus119896 119875119896 and 119875

minus

119896are estimates

of state prediction of state estimate of the error covarianceand the prediction of the error covariance respectively

242 Error Covariance In Figure 4 the estimated errorcovariance is computed by 119875

119896= 119875minus

119896minus 119870119896119867119875minus

119896 Error covari-

ance indicates the difference between state estimation (119896)

and the unknown true state value (119909119896) It also can be defined

as the following [17]

119875119896= 119864 (119909

119896minus 119896) (119909119896minus 119896)119879 (16)

The error covariance of attitude states was initialized bycalculating the angle variance using (15) The rest of the errorcovariances of the bias states were approximated from gyrodata All the variances were calculated using (17) and (18)Equation (17) was used to calculate the estimated mean valueand (18) was used to calculate its covariance as follows

119864 119896 =

1

119873

119873

sum

119894=1

119896119894 (17)

cov 119896 =

1

119873

119873

sum

119894=1

(119899119896119894minus 119864

119896) (119899119896119894minus 119864

119896)119879

(18)

where119873 is a number of samples and 119896is a vector of acceler-

ometer data on the 119909- 119910- and 119911-axesAll calculations were taken from IMU and placed on the

table without movement for approximately one minute withsampling period119879 = 005 sec Figure 5 shows the accelerome-ter and gyroscope signals in static conditions on all three axesThe experimentally determined variance values for attitudestates are 1205902

120593= 605119864 minus 6 and 120590

2

120579= 498119864 minus 6 in rad2 And

for the gyroscope along the 119909- 119910- and 119911-axes the values are

6 Journal of Sensors

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

002

0025

003

0035

004

0 10 20 30 40 50 60Time (s)

minus018

minus017

minus016

minus015

minus014

0 10 20 30 40 50 60Time (s)

127

128

129

13

131

Three-axis gyro outputs

0 10 20 30 40 50 60Time (s)

minus026

minus025

minus024

minus023Three-axis accelerometer outputs

fz

(g)

gx

(rad

s)

gy

(rad

s)

gz

(rad

s)

fx

(g)

fy

(g)

Figure 5 Three-axis gyroscope and accelerometer in static condition

1205902

119887119909= 0046 1205902

119887119910= 0018 and 120590

2

119887119911= 0005 in rads2 These

values will be the diagonal elements of the initial 119875119896

243 Initial Values and Covariance of the Noise The initialvalue of the bias gyro was determined heuristically throughstatic IMU data in rads unit The initial value for attitudestateswas chosen as one degree for each stateThe initial statesvalue in EKF model is as follows

119909119896=1

= [120593 120579 120595 119887119909

119887119910

119887119911]119879

= [1 1 1 minus0019 minus0008 0029]119879

(19)

Since the noise is assumed to be in normal distributionand independent on each axis we use the variance ofnoise 119908(119905) and V(119905) Noise process matrix (119876) was selectedheuristically as 119902

11 11990222 and 119902

33are 1 and 119902

44 11990255 and 119902

66are

03The measurement noise covariance matrix (119877nom) is

defined by (20) and themeasurement comes from the attitudein (15) however the measurement noise covariance matrix isobtained by calculating the variance of accelerometer signal

through (17) and (18) These signals have a direct relation tothe attitude measurement

119877nom = 119864 [V119896

V119896

119879] (20)

To determine the diagonal element of 119877nom the variances of119891119909 119891119910 and 119891

119911are calculated 119903

11= 904 times 10minus6 119903

22= 104 times

10minus5 and 11990333

= 180 times 10minus5 g2 Since the accelerometer issensitive to disturbances for the sake of practicality we tunedthe value of 119877nom based on the application Related to theproposed method 119886

119896from the external acceleration model

is uncorrelated to noise V119896 and the discrete form of 119877 is now

modified to be as follows

119877119896= 119877nom + 120582119886

2

119896 (21)

where 120582 is a constant coefficient that is heuristically chosenbased on the application in Mode 1 120582 is set to zero Particu-larly inMode 2 119877 is tuned based on the external accelerationmodel and 119886

2

119896is the element of the diagonal matrix which

consists of 1198862119910 1198862119909 and 119886

2

119911 The diagonal matrix of 1198862

119896in (21)

plays a key role in compensating for the external accelerationby increasing the 119877

119896value During static conditions or slow

Journal of Sensors 7

movement (ie 1198862119896asymp 0) the covariance matrix will be the

same as 119877nomThe above process and measurement models construct

the procedure of the EKF as follows

(1) Set the initial values for states and error covariance

0 1198750 (22)

(2) Predict states and error covariance

minus

119896= 119891 (

119896minus1)

119875minus

119896= 119860119875119896minus1

119860119879+ 119876

(23)

(3) Compute the Kalman gain

119870119896= 119875minus

119896119867119879(119867119875minus

119896119867119879+ 119877)minus1

(24)

(4) Compute the states estimate

119896= minus

119896+ 119870119896(119911119896minus 119867minus

119896) (25)

(5) Compute the error covariance

119875119896= 119875minus

119896minus 119870119896119867119875minus

119896 (26)

25 System Model of Mode 3 The two-step EKF [1] usedseparate measurements between the gyro and accelerometerThe external acceleration compensation technique is basedonweighted-switching in setting the noise covariance of thosemeasurements and was proposed by Suh et al

The state 119909(119905) for Mode 3 is 119909(119905) = [120579 120593 119901 119902 119903]119879 and

the measurement variable is 119911(119905) = [119891119909 119891119910

119901 119902 119903]119879 The

system equation is given by

(119905) = 119860 (119905) 119909 (119905) + 119908 (119905)

119911 (119905) = 119891 (119909 (119905)) + V (119905) (27)

where

119860 (119905) =

[[[[[[[[

[

0 0 0 119888120593 minus119904120593

0 0 1 119904120593119905120579 119888120593119905120579

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

]]]]]]]]

]

119891 (119909 (119905)) =

[[[[[[[[

[

119904120579

119904120593119888120579

119901

119902

119903

]]]]]]]]

]

(28)

In Mode 3 there will be a setting for the measurementerror covariance matrix in which 119903

1and 119903

2belong to the

accelerometer and 1199033belongs to the gyroscope as in

119877 =

[[[[[[[[

[

1199031

0 0 0 0

0 1199032

0 0 0

0 0 1199033

0 0

0 0 0 1199033

0

0 0 0 0 1199033

]]]]]]]]

]

(29)

The two-step measurement updated Kalman filter was usedto update the Kalman gain state estimation and covariancematrix First the measurement was updated only for varianceof the error measurement in the gyroscope (119903

3) Second the

measurement was updated for 1199031and 119903

2using a weighted-

switching rule as in (32) based on the threshold rule of(31) to detect external acceleration The threshold rule isderived from a necessary condition for acceleration freemovement as in (30) The weighted-switching rule works onthe principle that when there is external acceleration thegyroscope outputs should be trusted more This can be doneby making 119903

1and 1199032larger For a more detailed explanation

refer to [1] Consider the following

1198912

119909+ 1198912

119910+ 1198912

119911= 1 (30)

100381610038161003816100381610038161198912

119909+ 1198912

119910+ 1198912

119911minus 1

10038161003816100381610038161003816gt 120575 (31)

[1199031119896

1199032119896

] = max(1205721[1199031119896minus1

1199032119896minus1

]

+ 1205722(1199111198961

minus 1198621119896119896119892) [

1199031nom

1199032nom

])

(32)

26 SystemModel of Mode 4 Mode 4 is proposed by Sabatini[11] using quaternion-based EKF The discrete state forMode4 is composed of the rotation quaternion accelerometer andmagnetometer bias vectors

119896+1= [

119896+1

119886119896+1

119898119896+1

]119879

Themeasurementmodel is constructed by accelerometer andmagnetometer measurement vectors

119896+1= [119896+1

119896+1]119879

The mechanism of adaptation of the measurement noisecovariance matrix of acceleration is implemented using athreshold-based approach

1198771205902

119886=

1205902

119886

10038161003816100381610038161003816

10038171003817100381710038171003817119895+1

10038171003817100381710038171003817minus10038171003817100381710038171003817100381710038171003817

10038161003816100381610038161003816lt 120576th forall119895 isin [119896 minus 119896

119886 119896]

infin otherwise(33)

The measured acceleration magnitude is tested in advance torecognize deviations from gravity If there is deviation greaterthan the threshold the observation variance 1198771205902

119886is set to a

high value

27 System Model of Mode 5 Mode 5 is proposed by Haradaet al [12] using quaternion-based UKF The method isthreshold-based combined with a softened part of the mea-surement covariance matrix adaptation The output of the

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 2: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

2 Journal of Sensors

XY

Z

Figure 1 Orientation of axes of sensitivity for IMU

Inspired by Suh et al [1] Sabatini [11] and Harada et al[12] this paper proposed the extended Kalman filter- (EKF-)based attitude estimation using a new algorithm to overcomethe existence of external acceleration We extracted externalacceleration from the accelerometer signal with a model andused it to adjust the measurement noise covariance matrixThe aforementioned algorithm is verified by conducting one-axis and multiple axes movement experiments

The rest of the paper is organized as follows Section 2describes attitude determination and the proposed algorithmSection 3 discusses the experimental setup and results Sec-tion 4 then presents a discussion of the algorithm approachesand a comparison regarding the experimental results InSection 5 we present our conclusion

2 Method

21 Sensor Model The relative attitude (roll and pitch) of twoframes of reference used a direction cosine matrix (rotationmatrix) for coordinate transformation or rotation of object 120593(roll) 120579 (pitch) and 120595 (yaw) are the rotation angles about the119909- 119910- and 119911-axes on the sensor body as shown in Figure 1119862119868119861 indicates a rotation matrix that represents the relative

attitude of frame 119868 (inertial frame) with respect to frame 119861(body of sensor) thus allowing the relation as follows

x119868 = 119862119868119861x119861 (1)

where x119861 is the coordinate vector in frame 119861 and x119868 is thecoordinate in frame 119868

The well-known rotation matrix with the function of119885 rarr 119884 rarr 119883 Euler angles is as follows

119862119868119861

(120593 120579 120595) = 119862119883(120593) 119862119884 (120579) 119862119885 (120595)

=[[

[

119888120579119888120595 minus119888120593119904120595 + 119904120593119904120579119888120595 119904120593119904120595 + 119888120593119904120579119888120595

119888120579119904120595 119888120593119888120595 + 119904120593119904120579119904120595 minus119904120593119888120595 + 119888120593119904120579119904120595

minus119904120579 119904120593119888120579 119888120593119888120579

]]

]

(2)

where 119904 and 119888 are the short forms of sine and cosine respec-tively

Dfxk ak

Y

+minus

flowastxk

Compensatingmodel

Figure 2 The input-output diagram of external acceleration com-pensation

Measurements model for attitude determination usingaccelerometers is constructed by the third row of 119862119868119861 thatcontains 120593 and 120579 It is independent of rotation along the 119911-axis (120595)

Sensor signal from the accelerometer is modeled asfollows

119891119860= 119886 + 119892 [minus119904120579 119904120593119888120579 119888120593119888120579]

119879

(3)

where 119891119860is a vector of 119891

119909 119891119910 and 119891

119911 the acceleration is

measured by the three-axis accelerometer on the body frameThe unwanted external acceleration information (119886) in theaccelerometer will be estimated This acceleration is causedby the change of velocity in magnitude andor direction Theexternal acceleration is the main source of errors in attitudeestimation

22 External Acceleration Compensation Method In thissection we introduce the method for compensating for theexternal acceleration Our method is based on the viewthat external acceleration is a disturbance in the originalsignal and therefore should be removed from the originalsignal The disturbance rejection model was derived from acommon control ratio model [15] From this point on theterm ldquocompensation modelrdquo will be used to replace the termldquodisturbance rejection modelrdquo The three-axis accelerometerdata is input for the compensation model Each axis willbe treated in the same step therefore for the sake ofconvenience only the 119909-axis will be discussed In (4) ideallythe compensated 119909-axis accelerometer signal (119891lowast119909

119896) was

determined by subtracting the compensationmodel in the 119909-axis (119886

119896) from the original signal (119891119909

119896)

119891lowast119909119896= 119891119909119896minus 119886119896 (4)

The external acceleration (119886119896) is extracted from 119891119909

119896by

the compensation model Figure 2 shows the ideal modeldiagram of (4) However due to the dynamism of the systemand many uncertainties there is no ideal model Conse-quently we will use the result of the compensation model asone parameter for adjusting the noise covariance matrix insensor fusion in the next section The design approach fora compensation model is based on the specification that themodel should not be affected by the disturbance input 119889(119905) Inother words the steady-state output should be zero if possible

Journal of Sensors 3

or a small constant 119910(119905)ss = 0 119889(119905) = 0 A control ratio in the119904 domain [15] is commonly written as follows

119884 (119904)

119863 (119904)=119870 (119904119908+ 119888119908minus1

119904119908minus1

+ sdot sdot sdot + 1198881119904 + 1198880)

119904119899 + 119902119899minus1

119904119899minus1 + sdot sdot sdot + 1199021119904 + 1199020

(5)

Assuming a step disturbance signal 119863(119904) = 1198630119904 the output

will be

119884 (119904) =1198701198630(119904119908+ 119888119908minus1

119904119908minus1

+ sdot sdot sdot + 1198881119904 + 1198880)

119904 (119904119899 + 119902119899minus1

119904119899minus1 + sdot sdot sdot + 1199021119904 + 1199020)

(6)

where 119870 is gain constant 119870 gt 0 119888 and 119902 are constantcoefficients and119863

0is the final value of step disturbance The

condition 119910(119905)ss = 0 will be achieved if 1198880= 0 and requires

the numerator of 119884(119904)119863(119904) to have at least one zero at theorigin of the 119904-plane On the other side the location of thepoles on the 119904-plane determined its corresponding responseTo produce the damped response the poles should be on theleft-half 119904-planeThere are two possibilities for poles locationson the left-half side such as complex-conjugate poles and realpoles which have the output characteristics of exponentiallydamped sinusoid and damped exponential response respec-tively In our model we chose damped exponential responsebecause the disturbance should be suppressed without a sinu-soidally oscillating component Finally we determined thetransfer function of our model there is one zero at the originand one real pole on the left-half of the 119904-plane which is basedon (5) and becomes as follows

119884 (119904)

119863 (119904)=

119870119904

119904 + 1199020

(7)

The compensating model in (7) attenuates low frequen-cies and as a result a high frequency signal is obtained Thisis in line with the fact that the external acceleration occurswhen the change of velocity in magnitude andor directionof each axis exceeds a certain limit

The analysis of the stability of model (7) will be intro-duced in the time domain as follows In the time domain thestability will be achieved based on the principle that there isa limited response to the limited input We discuss the timeresponse of singularity input functions to this model such asstep ramp rectangular pulse and parabolic functions Thetime response model (7) for a unit step input 119906(119905) is 119910(119905) =119870119890minus1199020119905 We get steady-state response for 119910(119905) and the steady-

state error as in

119910 (119905)ss = lim119905rarrinfin

119870119890minus1199020119905 = 0 (8)

err (119905)ss = lim119905rarrinfin

(1 minus 119870119890minus1199020119905) = 1 (9)

The time response for ramp input (119889(119905) = 119905) is119910(119905) = 1198701199020(1minus

119890minus1199020119905) The steady-state output and error are calculated asfollows

119910 (119905)ss = lim119905rarrinfin

119870

1199020

(1 minus 119890minus1199020119905) =

119870

1199020

err (119905)ss = lim119905rarrinfin

119870

1199020

(119890minus1199020119905 minus 1) + 119905 = infin

(10)

A rectangular pulse of amplitude 1119886 and of duration 119886119889(119905) =(119906(119905) minus 119906(119905 minus 119886))119886 has a zero steady-state output and also azero steady-state error

For a parabolic function input 119889(119905) = 051199052 the time

response is calculated as follows with an infinity steady-stateoutput and infinity steady-state error

119910 (119905) =119870

1199020

119905 +119870

11990202(119890minus1199020119905 minus 1) (11)

These four kinds of singularity inputs and their combinationrepresent the possibility of disturbance waveforms All ofthem have the tendency to be rejected and damped by model(7) The response of the parabolic input has not shownconstant steady-state output however it represented theexponentially damped factor Figures 3(a) 3(b) 3(c) and 3(d)illustrate all time responses for each basic input signal usingmodel (7) within 119870 = 1 Each figure has two outputs that is1199101(119905) and 119910

2(119905) where 119902

0in 1199101(119905) is greater than 119902

0in 1199102(119905)

23 Attitude Determination through Sensor Fusion MethodAttitude determination from gyro had errors accumulatingalong the process of numerical integration but the gyro wassensitive to the change of rotation While the attitude deter-mination by the accelerometer does not show accumulationerrors or divergence the error in the roll and pitch axis istoo large because those two axes are mutually affected Whenthere is a movement in the roll axis the pitch axis also movesup and down with respect to the horizontal plane and viceversa In the proposedmethod both sensors are complemen-tary to each other to achieve performance in the sensor fusiontechnique using the extended Kalman filter (EKF)

In this paper the work will be divided into five modesMode 1 is the standard EKF using the proposed systemmodelbut without compensating the external acceleration Mode 2is the proposed system model also containing the proposedexternal acceleration compensation with a preprocessingtechnique for accelerometer data using model (7) before theEKF process The difference between Mode 2 and Mode 1is the addition of the measurement error covariance basedon the external acceleration compensation model A detailedexplanation of Mode 1 and Mode 2 is in Section 24 Mode3 is derived from [1] the two-step EKF which adjusts themeasurement noise covariance using the weighted-switchingapproach Mode 4 is the quaternion-based EKF which usesa threshold-based approach to set the measurement errorcovarianceThis mode is derived from [11]Mode 5 is derivedfrom [12] which uses an unscented Kalman filter (UKF)This method works as threshold-based approach combinedwith a softened part of measurement noise covariance matrixadjustment

24 Algorithm Description of Mode 1 and Mode 2

241 Process and Measurement Models We initially definedthe states and the observation variables for the systemmodelWe set attitude and gyro bias as state variables since thebias errors are a highly complex function to the ambienttemperature The Euler angle was the angle representation

4 Journal of Sensors

d(t)

y1(t)y2(t)

y(t)

KD

120572p

0

0 T1 tx1 tx2T2

t

(a)t

y(t)

d(t)

y1(t)

y2(t)

0

Kq02

Kq01

(b)

t

y(t)

d(t)

y1(t)

y2(t)

0

(c)

t

d(t)

1a

05a

0

t

1a

05a

minus05a

y1(t)

y2(t)

0

y(t)

y(t)

(d)

Figure 3 Time response plot corresponding to (7) for some basic input signals (a) step function (b) ramp (c) parabolic and (d) pulse

The state variable 119909(119905) and the measurement variable 119911(119905) aredefined as follows

119909 = [120593 120579 120595 119887119909

119887119910

119887119911]119879

119911 = [120593119886 120579119886

120595119886]119879

(12)

where 120593 (roll) and 120579 (pitch) are the rotation angles about the119909- and 119910-axes and 120595 is yaw angle but it is not of concernin this study These come from the integration of the rate ofchange from gyros while 119887

119909 119887119910 and 119887

119911are biases from gyro

in 119909- 119910- and 119911-axis respectively We use the measurementfrom the accelerometer in order to calculate 120593

119886 120579119886 and 120595

119886as

measurement variables The system equation is given by (119905) = 119891 (119909 (119905)) + 119908 (119905)

119911 (119905) = 119867119909 (119905) + V (119905) (13)

where 119891(119909(119905)) is a nonlinear function representing the rela-tion between gyros data and kinematic equation for the Euler

angles (119885 rarr 119884 rarr 119883) 119867 is state to measurement matrixas shown in (14) and 119908(119905) and V(119905) are process noise andmeasurement noise respectively which are assumed to beuncorrelated Gaussian distributed white noise Consider

119891 (119909) =

[[[[[[[[[[[

[

1 119904120593119905120579 119888120593119905120579 0 0 0

0 119888120593 minus119904120593 0 0 0

0 119904120593119904119888120579 119888120593119904119888120579 0 0 0

0 0 0 1 0 0

0 0 0 0 1 0

0 0 0 0 0 1

]]]]]]]]]]]

]

sdot

[[[[[[[[[[[

[

119901 minus 119887119909

119902 minus 119887119910

119903 minus 119887119911

119887119909

119887119910

119887119911

]]]]]]]]]]]

]

119867 =[[

[

1 0 0 0 0 0

0 1 0 0 0 0

0 0 1 0 0 0

]]

]

(14)

Journal of Sensors 5

Inertial sensor

Gyroscope

Accelerometer

External accelerationcompensation

ak a2k

EKF

Initial valuesx0 P0

Time updatexminusk = f(xkminus1)

Pminusk = APkminus1A

T + Q

Measurement update

Kk = Pminusk HT(HPminus

k HT + R)minus1

xk = xminusk + Kk(zk minus Hxminus

k )

Pk = Pminusk minus KkHPminus

k

Figure 4 Structure of the proposed algorithm

In (14) 119901 119902 and 119903 are angular velocities measured fromthe gyro along the 119909- 119910- and 119911-axes respectively Symbolsof 119904 119888 119905 and 119904119888 are short forms of sine cosine tangentand secant respectively This process model is nonlinearsince it contains trigonometric functions Therefore we useJacobian values of the nonlinear model of 119891(119909) to replacestate transition matrix (119860) where the values in that matrixare obtained by applying the previous estimated states in theEKF process In contrast matrix119867 is the linear expression

The measurement from the accelerometer which is usedto calculate 120593

119886and 120579119886as measurement variables is a common

initialized leveling equation [2 16]

120593119886= arctan

2(119891119910 119891119911)

120579119886= arctan(

minus119891119909

119891119910119904120593119886+ 119891119911119888120593119886

)

(15)

Figure 4 shows the structure of the proposed algorithmcombined with the extended Kalman filter algorithm Thenotations and meanings of

119896 minus119896 119875119896 and 119875

minus

119896are estimates

of state prediction of state estimate of the error covarianceand the prediction of the error covariance respectively

242 Error Covariance In Figure 4 the estimated errorcovariance is computed by 119875

119896= 119875minus

119896minus 119870119896119867119875minus

119896 Error covari-

ance indicates the difference between state estimation (119896)

and the unknown true state value (119909119896) It also can be defined

as the following [17]

119875119896= 119864 (119909

119896minus 119896) (119909119896minus 119896)119879 (16)

The error covariance of attitude states was initialized bycalculating the angle variance using (15) The rest of the errorcovariances of the bias states were approximated from gyrodata All the variances were calculated using (17) and (18)Equation (17) was used to calculate the estimated mean valueand (18) was used to calculate its covariance as follows

119864 119896 =

1

119873

119873

sum

119894=1

119896119894 (17)

cov 119896 =

1

119873

119873

sum

119894=1

(119899119896119894minus 119864

119896) (119899119896119894minus 119864

119896)119879

(18)

where119873 is a number of samples and 119896is a vector of acceler-

ometer data on the 119909- 119910- and 119911-axesAll calculations were taken from IMU and placed on the

table without movement for approximately one minute withsampling period119879 = 005 sec Figure 5 shows the accelerome-ter and gyroscope signals in static conditions on all three axesThe experimentally determined variance values for attitudestates are 1205902

120593= 605119864 minus 6 and 120590

2

120579= 498119864 minus 6 in rad2 And

for the gyroscope along the 119909- 119910- and 119911-axes the values are

6 Journal of Sensors

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

002

0025

003

0035

004

0 10 20 30 40 50 60Time (s)

minus018

minus017

minus016

minus015

minus014

0 10 20 30 40 50 60Time (s)

127

128

129

13

131

Three-axis gyro outputs

0 10 20 30 40 50 60Time (s)

minus026

minus025

minus024

minus023Three-axis accelerometer outputs

fz

(g)

gx

(rad

s)

gy

(rad

s)

gz

(rad

s)

fx

(g)

fy

(g)

Figure 5 Three-axis gyroscope and accelerometer in static condition

1205902

119887119909= 0046 1205902

119887119910= 0018 and 120590

2

119887119911= 0005 in rads2 These

values will be the diagonal elements of the initial 119875119896

243 Initial Values and Covariance of the Noise The initialvalue of the bias gyro was determined heuristically throughstatic IMU data in rads unit The initial value for attitudestateswas chosen as one degree for each stateThe initial statesvalue in EKF model is as follows

119909119896=1

= [120593 120579 120595 119887119909

119887119910

119887119911]119879

= [1 1 1 minus0019 minus0008 0029]119879

(19)

Since the noise is assumed to be in normal distributionand independent on each axis we use the variance ofnoise 119908(119905) and V(119905) Noise process matrix (119876) was selectedheuristically as 119902

11 11990222 and 119902

33are 1 and 119902

44 11990255 and 119902

66are

03The measurement noise covariance matrix (119877nom) is

defined by (20) and themeasurement comes from the attitudein (15) however the measurement noise covariance matrix isobtained by calculating the variance of accelerometer signal

through (17) and (18) These signals have a direct relation tothe attitude measurement

119877nom = 119864 [V119896

V119896

119879] (20)

To determine the diagonal element of 119877nom the variances of119891119909 119891119910 and 119891

119911are calculated 119903

11= 904 times 10minus6 119903

22= 104 times

10minus5 and 11990333

= 180 times 10minus5 g2 Since the accelerometer issensitive to disturbances for the sake of practicality we tunedthe value of 119877nom based on the application Related to theproposed method 119886

119896from the external acceleration model

is uncorrelated to noise V119896 and the discrete form of 119877 is now

modified to be as follows

119877119896= 119877nom + 120582119886

2

119896 (21)

where 120582 is a constant coefficient that is heuristically chosenbased on the application in Mode 1 120582 is set to zero Particu-larly inMode 2 119877 is tuned based on the external accelerationmodel and 119886

2

119896is the element of the diagonal matrix which

consists of 1198862119910 1198862119909 and 119886

2

119911 The diagonal matrix of 1198862

119896in (21)

plays a key role in compensating for the external accelerationby increasing the 119877

119896value During static conditions or slow

Journal of Sensors 7

movement (ie 1198862119896asymp 0) the covariance matrix will be the

same as 119877nomThe above process and measurement models construct

the procedure of the EKF as follows

(1) Set the initial values for states and error covariance

0 1198750 (22)

(2) Predict states and error covariance

minus

119896= 119891 (

119896minus1)

119875minus

119896= 119860119875119896minus1

119860119879+ 119876

(23)

(3) Compute the Kalman gain

119870119896= 119875minus

119896119867119879(119867119875minus

119896119867119879+ 119877)minus1

(24)

(4) Compute the states estimate

119896= minus

119896+ 119870119896(119911119896minus 119867minus

119896) (25)

(5) Compute the error covariance

119875119896= 119875minus

119896minus 119870119896119867119875minus

119896 (26)

25 System Model of Mode 3 The two-step EKF [1] usedseparate measurements between the gyro and accelerometerThe external acceleration compensation technique is basedonweighted-switching in setting the noise covariance of thosemeasurements and was proposed by Suh et al

The state 119909(119905) for Mode 3 is 119909(119905) = [120579 120593 119901 119902 119903]119879 and

the measurement variable is 119911(119905) = [119891119909 119891119910

119901 119902 119903]119879 The

system equation is given by

(119905) = 119860 (119905) 119909 (119905) + 119908 (119905)

119911 (119905) = 119891 (119909 (119905)) + V (119905) (27)

where

119860 (119905) =

[[[[[[[[

[

0 0 0 119888120593 minus119904120593

0 0 1 119904120593119905120579 119888120593119905120579

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

]]]]]]]]

]

119891 (119909 (119905)) =

[[[[[[[[

[

119904120579

119904120593119888120579

119901

119902

119903

]]]]]]]]

]

(28)

In Mode 3 there will be a setting for the measurementerror covariance matrix in which 119903

1and 119903

2belong to the

accelerometer and 1199033belongs to the gyroscope as in

119877 =

[[[[[[[[

[

1199031

0 0 0 0

0 1199032

0 0 0

0 0 1199033

0 0

0 0 0 1199033

0

0 0 0 0 1199033

]]]]]]]]

]

(29)

The two-step measurement updated Kalman filter was usedto update the Kalman gain state estimation and covariancematrix First the measurement was updated only for varianceof the error measurement in the gyroscope (119903

3) Second the

measurement was updated for 1199031and 119903

2using a weighted-

switching rule as in (32) based on the threshold rule of(31) to detect external acceleration The threshold rule isderived from a necessary condition for acceleration freemovement as in (30) The weighted-switching rule works onthe principle that when there is external acceleration thegyroscope outputs should be trusted more This can be doneby making 119903

1and 1199032larger For a more detailed explanation

refer to [1] Consider the following

1198912

119909+ 1198912

119910+ 1198912

119911= 1 (30)

100381610038161003816100381610038161198912

119909+ 1198912

119910+ 1198912

119911minus 1

10038161003816100381610038161003816gt 120575 (31)

[1199031119896

1199032119896

] = max(1205721[1199031119896minus1

1199032119896minus1

]

+ 1205722(1199111198961

minus 1198621119896119896119892) [

1199031nom

1199032nom

])

(32)

26 SystemModel of Mode 4 Mode 4 is proposed by Sabatini[11] using quaternion-based EKF The discrete state forMode4 is composed of the rotation quaternion accelerometer andmagnetometer bias vectors

119896+1= [

119896+1

119886119896+1

119898119896+1

]119879

Themeasurementmodel is constructed by accelerometer andmagnetometer measurement vectors

119896+1= [119896+1

119896+1]119879

The mechanism of adaptation of the measurement noisecovariance matrix of acceleration is implemented using athreshold-based approach

1198771205902

119886=

1205902

119886

10038161003816100381610038161003816

10038171003817100381710038171003817119895+1

10038171003817100381710038171003817minus10038171003817100381710038171003817100381710038171003817

10038161003816100381610038161003816lt 120576th forall119895 isin [119896 minus 119896

119886 119896]

infin otherwise(33)

The measured acceleration magnitude is tested in advance torecognize deviations from gravity If there is deviation greaterthan the threshold the observation variance 1198771205902

119886is set to a

high value

27 System Model of Mode 5 Mode 5 is proposed by Haradaet al [12] using quaternion-based UKF The method isthreshold-based combined with a softened part of the mea-surement covariance matrix adaptation The output of the

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 3: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 3

or a small constant 119910(119905)ss = 0 119889(119905) = 0 A control ratio in the119904 domain [15] is commonly written as follows

119884 (119904)

119863 (119904)=119870 (119904119908+ 119888119908minus1

119904119908minus1

+ sdot sdot sdot + 1198881119904 + 1198880)

119904119899 + 119902119899minus1

119904119899minus1 + sdot sdot sdot + 1199021119904 + 1199020

(5)

Assuming a step disturbance signal 119863(119904) = 1198630119904 the output

will be

119884 (119904) =1198701198630(119904119908+ 119888119908minus1

119904119908minus1

+ sdot sdot sdot + 1198881119904 + 1198880)

119904 (119904119899 + 119902119899minus1

119904119899minus1 + sdot sdot sdot + 1199021119904 + 1199020)

(6)

where 119870 is gain constant 119870 gt 0 119888 and 119902 are constantcoefficients and119863

0is the final value of step disturbance The

condition 119910(119905)ss = 0 will be achieved if 1198880= 0 and requires

the numerator of 119884(119904)119863(119904) to have at least one zero at theorigin of the 119904-plane On the other side the location of thepoles on the 119904-plane determined its corresponding responseTo produce the damped response the poles should be on theleft-half 119904-planeThere are two possibilities for poles locationson the left-half side such as complex-conjugate poles and realpoles which have the output characteristics of exponentiallydamped sinusoid and damped exponential response respec-tively In our model we chose damped exponential responsebecause the disturbance should be suppressed without a sinu-soidally oscillating component Finally we determined thetransfer function of our model there is one zero at the originand one real pole on the left-half of the 119904-plane which is basedon (5) and becomes as follows

119884 (119904)

119863 (119904)=

119870119904

119904 + 1199020

(7)

The compensating model in (7) attenuates low frequen-cies and as a result a high frequency signal is obtained Thisis in line with the fact that the external acceleration occurswhen the change of velocity in magnitude andor directionof each axis exceeds a certain limit

The analysis of the stability of model (7) will be intro-duced in the time domain as follows In the time domain thestability will be achieved based on the principle that there isa limited response to the limited input We discuss the timeresponse of singularity input functions to this model such asstep ramp rectangular pulse and parabolic functions Thetime response model (7) for a unit step input 119906(119905) is 119910(119905) =119870119890minus1199020119905 We get steady-state response for 119910(119905) and the steady-

state error as in

119910 (119905)ss = lim119905rarrinfin

119870119890minus1199020119905 = 0 (8)

err (119905)ss = lim119905rarrinfin

(1 minus 119870119890minus1199020119905) = 1 (9)

The time response for ramp input (119889(119905) = 119905) is119910(119905) = 1198701199020(1minus

119890minus1199020119905) The steady-state output and error are calculated asfollows

119910 (119905)ss = lim119905rarrinfin

119870

1199020

(1 minus 119890minus1199020119905) =

119870

1199020

err (119905)ss = lim119905rarrinfin

119870

1199020

(119890minus1199020119905 minus 1) + 119905 = infin

(10)

A rectangular pulse of amplitude 1119886 and of duration 119886119889(119905) =(119906(119905) minus 119906(119905 minus 119886))119886 has a zero steady-state output and also azero steady-state error

For a parabolic function input 119889(119905) = 051199052 the time

response is calculated as follows with an infinity steady-stateoutput and infinity steady-state error

119910 (119905) =119870

1199020

119905 +119870

11990202(119890minus1199020119905 minus 1) (11)

These four kinds of singularity inputs and their combinationrepresent the possibility of disturbance waveforms All ofthem have the tendency to be rejected and damped by model(7) The response of the parabolic input has not shownconstant steady-state output however it represented theexponentially damped factor Figures 3(a) 3(b) 3(c) and 3(d)illustrate all time responses for each basic input signal usingmodel (7) within 119870 = 1 Each figure has two outputs that is1199101(119905) and 119910

2(119905) where 119902

0in 1199101(119905) is greater than 119902

0in 1199102(119905)

23 Attitude Determination through Sensor Fusion MethodAttitude determination from gyro had errors accumulatingalong the process of numerical integration but the gyro wassensitive to the change of rotation While the attitude deter-mination by the accelerometer does not show accumulationerrors or divergence the error in the roll and pitch axis istoo large because those two axes are mutually affected Whenthere is a movement in the roll axis the pitch axis also movesup and down with respect to the horizontal plane and viceversa In the proposedmethod both sensors are complemen-tary to each other to achieve performance in the sensor fusiontechnique using the extended Kalman filter (EKF)

In this paper the work will be divided into five modesMode 1 is the standard EKF using the proposed systemmodelbut without compensating the external acceleration Mode 2is the proposed system model also containing the proposedexternal acceleration compensation with a preprocessingtechnique for accelerometer data using model (7) before theEKF process The difference between Mode 2 and Mode 1is the addition of the measurement error covariance basedon the external acceleration compensation model A detailedexplanation of Mode 1 and Mode 2 is in Section 24 Mode3 is derived from [1] the two-step EKF which adjusts themeasurement noise covariance using the weighted-switchingapproach Mode 4 is the quaternion-based EKF which usesa threshold-based approach to set the measurement errorcovarianceThis mode is derived from [11]Mode 5 is derivedfrom [12] which uses an unscented Kalman filter (UKF)This method works as threshold-based approach combinedwith a softened part of measurement noise covariance matrixadjustment

24 Algorithm Description of Mode 1 and Mode 2

241 Process and Measurement Models We initially definedthe states and the observation variables for the systemmodelWe set attitude and gyro bias as state variables since thebias errors are a highly complex function to the ambienttemperature The Euler angle was the angle representation

4 Journal of Sensors

d(t)

y1(t)y2(t)

y(t)

KD

120572p

0

0 T1 tx1 tx2T2

t

(a)t

y(t)

d(t)

y1(t)

y2(t)

0

Kq02

Kq01

(b)

t

y(t)

d(t)

y1(t)

y2(t)

0

(c)

t

d(t)

1a

05a

0

t

1a

05a

minus05a

y1(t)

y2(t)

0

y(t)

y(t)

(d)

Figure 3 Time response plot corresponding to (7) for some basic input signals (a) step function (b) ramp (c) parabolic and (d) pulse

The state variable 119909(119905) and the measurement variable 119911(119905) aredefined as follows

119909 = [120593 120579 120595 119887119909

119887119910

119887119911]119879

119911 = [120593119886 120579119886

120595119886]119879

(12)

where 120593 (roll) and 120579 (pitch) are the rotation angles about the119909- and 119910-axes and 120595 is yaw angle but it is not of concernin this study These come from the integration of the rate ofchange from gyros while 119887

119909 119887119910 and 119887

119911are biases from gyro

in 119909- 119910- and 119911-axis respectively We use the measurementfrom the accelerometer in order to calculate 120593

119886 120579119886 and 120595

119886as

measurement variables The system equation is given by (119905) = 119891 (119909 (119905)) + 119908 (119905)

119911 (119905) = 119867119909 (119905) + V (119905) (13)

where 119891(119909(119905)) is a nonlinear function representing the rela-tion between gyros data and kinematic equation for the Euler

angles (119885 rarr 119884 rarr 119883) 119867 is state to measurement matrixas shown in (14) and 119908(119905) and V(119905) are process noise andmeasurement noise respectively which are assumed to beuncorrelated Gaussian distributed white noise Consider

119891 (119909) =

[[[[[[[[[[[

[

1 119904120593119905120579 119888120593119905120579 0 0 0

0 119888120593 minus119904120593 0 0 0

0 119904120593119904119888120579 119888120593119904119888120579 0 0 0

0 0 0 1 0 0

0 0 0 0 1 0

0 0 0 0 0 1

]]]]]]]]]]]

]

sdot

[[[[[[[[[[[

[

119901 minus 119887119909

119902 minus 119887119910

119903 minus 119887119911

119887119909

119887119910

119887119911

]]]]]]]]]]]

]

119867 =[[

[

1 0 0 0 0 0

0 1 0 0 0 0

0 0 1 0 0 0

]]

]

(14)

Journal of Sensors 5

Inertial sensor

Gyroscope

Accelerometer

External accelerationcompensation

ak a2k

EKF

Initial valuesx0 P0

Time updatexminusk = f(xkminus1)

Pminusk = APkminus1A

T + Q

Measurement update

Kk = Pminusk HT(HPminus

k HT + R)minus1

xk = xminusk + Kk(zk minus Hxminus

k )

Pk = Pminusk minus KkHPminus

k

Figure 4 Structure of the proposed algorithm

In (14) 119901 119902 and 119903 are angular velocities measured fromthe gyro along the 119909- 119910- and 119911-axes respectively Symbolsof 119904 119888 119905 and 119904119888 are short forms of sine cosine tangentand secant respectively This process model is nonlinearsince it contains trigonometric functions Therefore we useJacobian values of the nonlinear model of 119891(119909) to replacestate transition matrix (119860) where the values in that matrixare obtained by applying the previous estimated states in theEKF process In contrast matrix119867 is the linear expression

The measurement from the accelerometer which is usedto calculate 120593

119886and 120579119886as measurement variables is a common

initialized leveling equation [2 16]

120593119886= arctan

2(119891119910 119891119911)

120579119886= arctan(

minus119891119909

119891119910119904120593119886+ 119891119911119888120593119886

)

(15)

Figure 4 shows the structure of the proposed algorithmcombined with the extended Kalman filter algorithm Thenotations and meanings of

119896 minus119896 119875119896 and 119875

minus

119896are estimates

of state prediction of state estimate of the error covarianceand the prediction of the error covariance respectively

242 Error Covariance In Figure 4 the estimated errorcovariance is computed by 119875

119896= 119875minus

119896minus 119870119896119867119875minus

119896 Error covari-

ance indicates the difference between state estimation (119896)

and the unknown true state value (119909119896) It also can be defined

as the following [17]

119875119896= 119864 (119909

119896minus 119896) (119909119896minus 119896)119879 (16)

The error covariance of attitude states was initialized bycalculating the angle variance using (15) The rest of the errorcovariances of the bias states were approximated from gyrodata All the variances were calculated using (17) and (18)Equation (17) was used to calculate the estimated mean valueand (18) was used to calculate its covariance as follows

119864 119896 =

1

119873

119873

sum

119894=1

119896119894 (17)

cov 119896 =

1

119873

119873

sum

119894=1

(119899119896119894minus 119864

119896) (119899119896119894minus 119864

119896)119879

(18)

where119873 is a number of samples and 119896is a vector of acceler-

ometer data on the 119909- 119910- and 119911-axesAll calculations were taken from IMU and placed on the

table without movement for approximately one minute withsampling period119879 = 005 sec Figure 5 shows the accelerome-ter and gyroscope signals in static conditions on all three axesThe experimentally determined variance values for attitudestates are 1205902

120593= 605119864 minus 6 and 120590

2

120579= 498119864 minus 6 in rad2 And

for the gyroscope along the 119909- 119910- and 119911-axes the values are

6 Journal of Sensors

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

002

0025

003

0035

004

0 10 20 30 40 50 60Time (s)

minus018

minus017

minus016

minus015

minus014

0 10 20 30 40 50 60Time (s)

127

128

129

13

131

Three-axis gyro outputs

0 10 20 30 40 50 60Time (s)

minus026

minus025

minus024

minus023Three-axis accelerometer outputs

fz

(g)

gx

(rad

s)

gy

(rad

s)

gz

(rad

s)

fx

(g)

fy

(g)

Figure 5 Three-axis gyroscope and accelerometer in static condition

1205902

119887119909= 0046 1205902

119887119910= 0018 and 120590

2

119887119911= 0005 in rads2 These

values will be the diagonal elements of the initial 119875119896

243 Initial Values and Covariance of the Noise The initialvalue of the bias gyro was determined heuristically throughstatic IMU data in rads unit The initial value for attitudestateswas chosen as one degree for each stateThe initial statesvalue in EKF model is as follows

119909119896=1

= [120593 120579 120595 119887119909

119887119910

119887119911]119879

= [1 1 1 minus0019 minus0008 0029]119879

(19)

Since the noise is assumed to be in normal distributionand independent on each axis we use the variance ofnoise 119908(119905) and V(119905) Noise process matrix (119876) was selectedheuristically as 119902

11 11990222 and 119902

33are 1 and 119902

44 11990255 and 119902

66are

03The measurement noise covariance matrix (119877nom) is

defined by (20) and themeasurement comes from the attitudein (15) however the measurement noise covariance matrix isobtained by calculating the variance of accelerometer signal

through (17) and (18) These signals have a direct relation tothe attitude measurement

119877nom = 119864 [V119896

V119896

119879] (20)

To determine the diagonal element of 119877nom the variances of119891119909 119891119910 and 119891

119911are calculated 119903

11= 904 times 10minus6 119903

22= 104 times

10minus5 and 11990333

= 180 times 10minus5 g2 Since the accelerometer issensitive to disturbances for the sake of practicality we tunedthe value of 119877nom based on the application Related to theproposed method 119886

119896from the external acceleration model

is uncorrelated to noise V119896 and the discrete form of 119877 is now

modified to be as follows

119877119896= 119877nom + 120582119886

2

119896 (21)

where 120582 is a constant coefficient that is heuristically chosenbased on the application in Mode 1 120582 is set to zero Particu-larly inMode 2 119877 is tuned based on the external accelerationmodel and 119886

2

119896is the element of the diagonal matrix which

consists of 1198862119910 1198862119909 and 119886

2

119911 The diagonal matrix of 1198862

119896in (21)

plays a key role in compensating for the external accelerationby increasing the 119877

119896value During static conditions or slow

Journal of Sensors 7

movement (ie 1198862119896asymp 0) the covariance matrix will be the

same as 119877nomThe above process and measurement models construct

the procedure of the EKF as follows

(1) Set the initial values for states and error covariance

0 1198750 (22)

(2) Predict states and error covariance

minus

119896= 119891 (

119896minus1)

119875minus

119896= 119860119875119896minus1

119860119879+ 119876

(23)

(3) Compute the Kalman gain

119870119896= 119875minus

119896119867119879(119867119875minus

119896119867119879+ 119877)minus1

(24)

(4) Compute the states estimate

119896= minus

119896+ 119870119896(119911119896minus 119867minus

119896) (25)

(5) Compute the error covariance

119875119896= 119875minus

119896minus 119870119896119867119875minus

119896 (26)

25 System Model of Mode 3 The two-step EKF [1] usedseparate measurements between the gyro and accelerometerThe external acceleration compensation technique is basedonweighted-switching in setting the noise covariance of thosemeasurements and was proposed by Suh et al

The state 119909(119905) for Mode 3 is 119909(119905) = [120579 120593 119901 119902 119903]119879 and

the measurement variable is 119911(119905) = [119891119909 119891119910

119901 119902 119903]119879 The

system equation is given by

(119905) = 119860 (119905) 119909 (119905) + 119908 (119905)

119911 (119905) = 119891 (119909 (119905)) + V (119905) (27)

where

119860 (119905) =

[[[[[[[[

[

0 0 0 119888120593 minus119904120593

0 0 1 119904120593119905120579 119888120593119905120579

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

]]]]]]]]

]

119891 (119909 (119905)) =

[[[[[[[[

[

119904120579

119904120593119888120579

119901

119902

119903

]]]]]]]]

]

(28)

In Mode 3 there will be a setting for the measurementerror covariance matrix in which 119903

1and 119903

2belong to the

accelerometer and 1199033belongs to the gyroscope as in

119877 =

[[[[[[[[

[

1199031

0 0 0 0

0 1199032

0 0 0

0 0 1199033

0 0

0 0 0 1199033

0

0 0 0 0 1199033

]]]]]]]]

]

(29)

The two-step measurement updated Kalman filter was usedto update the Kalman gain state estimation and covariancematrix First the measurement was updated only for varianceof the error measurement in the gyroscope (119903

3) Second the

measurement was updated for 1199031and 119903

2using a weighted-

switching rule as in (32) based on the threshold rule of(31) to detect external acceleration The threshold rule isderived from a necessary condition for acceleration freemovement as in (30) The weighted-switching rule works onthe principle that when there is external acceleration thegyroscope outputs should be trusted more This can be doneby making 119903

1and 1199032larger For a more detailed explanation

refer to [1] Consider the following

1198912

119909+ 1198912

119910+ 1198912

119911= 1 (30)

100381610038161003816100381610038161198912

119909+ 1198912

119910+ 1198912

119911minus 1

10038161003816100381610038161003816gt 120575 (31)

[1199031119896

1199032119896

] = max(1205721[1199031119896minus1

1199032119896minus1

]

+ 1205722(1199111198961

minus 1198621119896119896119892) [

1199031nom

1199032nom

])

(32)

26 SystemModel of Mode 4 Mode 4 is proposed by Sabatini[11] using quaternion-based EKF The discrete state forMode4 is composed of the rotation quaternion accelerometer andmagnetometer bias vectors

119896+1= [

119896+1

119886119896+1

119898119896+1

]119879

Themeasurementmodel is constructed by accelerometer andmagnetometer measurement vectors

119896+1= [119896+1

119896+1]119879

The mechanism of adaptation of the measurement noisecovariance matrix of acceleration is implemented using athreshold-based approach

1198771205902

119886=

1205902

119886

10038161003816100381610038161003816

10038171003817100381710038171003817119895+1

10038171003817100381710038171003817minus10038171003817100381710038171003817100381710038171003817

10038161003816100381610038161003816lt 120576th forall119895 isin [119896 minus 119896

119886 119896]

infin otherwise(33)

The measured acceleration magnitude is tested in advance torecognize deviations from gravity If there is deviation greaterthan the threshold the observation variance 1198771205902

119886is set to a

high value

27 System Model of Mode 5 Mode 5 is proposed by Haradaet al [12] using quaternion-based UKF The method isthreshold-based combined with a softened part of the mea-surement covariance matrix adaptation The output of the

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 4: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

4 Journal of Sensors

d(t)

y1(t)y2(t)

y(t)

KD

120572p

0

0 T1 tx1 tx2T2

t

(a)t

y(t)

d(t)

y1(t)

y2(t)

0

Kq02

Kq01

(b)

t

y(t)

d(t)

y1(t)

y2(t)

0

(c)

t

d(t)

1a

05a

0

t

1a

05a

minus05a

y1(t)

y2(t)

0

y(t)

y(t)

(d)

Figure 3 Time response plot corresponding to (7) for some basic input signals (a) step function (b) ramp (c) parabolic and (d) pulse

The state variable 119909(119905) and the measurement variable 119911(119905) aredefined as follows

119909 = [120593 120579 120595 119887119909

119887119910

119887119911]119879

119911 = [120593119886 120579119886

120595119886]119879

(12)

where 120593 (roll) and 120579 (pitch) are the rotation angles about the119909- and 119910-axes and 120595 is yaw angle but it is not of concernin this study These come from the integration of the rate ofchange from gyros while 119887

119909 119887119910 and 119887

119911are biases from gyro

in 119909- 119910- and 119911-axis respectively We use the measurementfrom the accelerometer in order to calculate 120593

119886 120579119886 and 120595

119886as

measurement variables The system equation is given by (119905) = 119891 (119909 (119905)) + 119908 (119905)

119911 (119905) = 119867119909 (119905) + V (119905) (13)

where 119891(119909(119905)) is a nonlinear function representing the rela-tion between gyros data and kinematic equation for the Euler

angles (119885 rarr 119884 rarr 119883) 119867 is state to measurement matrixas shown in (14) and 119908(119905) and V(119905) are process noise andmeasurement noise respectively which are assumed to beuncorrelated Gaussian distributed white noise Consider

119891 (119909) =

[[[[[[[[[[[

[

1 119904120593119905120579 119888120593119905120579 0 0 0

0 119888120593 minus119904120593 0 0 0

0 119904120593119904119888120579 119888120593119904119888120579 0 0 0

0 0 0 1 0 0

0 0 0 0 1 0

0 0 0 0 0 1

]]]]]]]]]]]

]

sdot

[[[[[[[[[[[

[

119901 minus 119887119909

119902 minus 119887119910

119903 minus 119887119911

119887119909

119887119910

119887119911

]]]]]]]]]]]

]

119867 =[[

[

1 0 0 0 0 0

0 1 0 0 0 0

0 0 1 0 0 0

]]

]

(14)

Journal of Sensors 5

Inertial sensor

Gyroscope

Accelerometer

External accelerationcompensation

ak a2k

EKF

Initial valuesx0 P0

Time updatexminusk = f(xkminus1)

Pminusk = APkminus1A

T + Q

Measurement update

Kk = Pminusk HT(HPminus

k HT + R)minus1

xk = xminusk + Kk(zk minus Hxminus

k )

Pk = Pminusk minus KkHPminus

k

Figure 4 Structure of the proposed algorithm

In (14) 119901 119902 and 119903 are angular velocities measured fromthe gyro along the 119909- 119910- and 119911-axes respectively Symbolsof 119904 119888 119905 and 119904119888 are short forms of sine cosine tangentand secant respectively This process model is nonlinearsince it contains trigonometric functions Therefore we useJacobian values of the nonlinear model of 119891(119909) to replacestate transition matrix (119860) where the values in that matrixare obtained by applying the previous estimated states in theEKF process In contrast matrix119867 is the linear expression

The measurement from the accelerometer which is usedto calculate 120593

119886and 120579119886as measurement variables is a common

initialized leveling equation [2 16]

120593119886= arctan

2(119891119910 119891119911)

120579119886= arctan(

minus119891119909

119891119910119904120593119886+ 119891119911119888120593119886

)

(15)

Figure 4 shows the structure of the proposed algorithmcombined with the extended Kalman filter algorithm Thenotations and meanings of

119896 minus119896 119875119896 and 119875

minus

119896are estimates

of state prediction of state estimate of the error covarianceand the prediction of the error covariance respectively

242 Error Covariance In Figure 4 the estimated errorcovariance is computed by 119875

119896= 119875minus

119896minus 119870119896119867119875minus

119896 Error covari-

ance indicates the difference between state estimation (119896)

and the unknown true state value (119909119896) It also can be defined

as the following [17]

119875119896= 119864 (119909

119896minus 119896) (119909119896minus 119896)119879 (16)

The error covariance of attitude states was initialized bycalculating the angle variance using (15) The rest of the errorcovariances of the bias states were approximated from gyrodata All the variances were calculated using (17) and (18)Equation (17) was used to calculate the estimated mean valueand (18) was used to calculate its covariance as follows

119864 119896 =

1

119873

119873

sum

119894=1

119896119894 (17)

cov 119896 =

1

119873

119873

sum

119894=1

(119899119896119894minus 119864

119896) (119899119896119894minus 119864

119896)119879

(18)

where119873 is a number of samples and 119896is a vector of acceler-

ometer data on the 119909- 119910- and 119911-axesAll calculations were taken from IMU and placed on the

table without movement for approximately one minute withsampling period119879 = 005 sec Figure 5 shows the accelerome-ter and gyroscope signals in static conditions on all three axesThe experimentally determined variance values for attitudestates are 1205902

120593= 605119864 minus 6 and 120590

2

120579= 498119864 minus 6 in rad2 And

for the gyroscope along the 119909- 119910- and 119911-axes the values are

6 Journal of Sensors

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

002

0025

003

0035

004

0 10 20 30 40 50 60Time (s)

minus018

minus017

minus016

minus015

minus014

0 10 20 30 40 50 60Time (s)

127

128

129

13

131

Three-axis gyro outputs

0 10 20 30 40 50 60Time (s)

minus026

minus025

minus024

minus023Three-axis accelerometer outputs

fz

(g)

gx

(rad

s)

gy

(rad

s)

gz

(rad

s)

fx

(g)

fy

(g)

Figure 5 Three-axis gyroscope and accelerometer in static condition

1205902

119887119909= 0046 1205902

119887119910= 0018 and 120590

2

119887119911= 0005 in rads2 These

values will be the diagonal elements of the initial 119875119896

243 Initial Values and Covariance of the Noise The initialvalue of the bias gyro was determined heuristically throughstatic IMU data in rads unit The initial value for attitudestateswas chosen as one degree for each stateThe initial statesvalue in EKF model is as follows

119909119896=1

= [120593 120579 120595 119887119909

119887119910

119887119911]119879

= [1 1 1 minus0019 minus0008 0029]119879

(19)

Since the noise is assumed to be in normal distributionand independent on each axis we use the variance ofnoise 119908(119905) and V(119905) Noise process matrix (119876) was selectedheuristically as 119902

11 11990222 and 119902

33are 1 and 119902

44 11990255 and 119902

66are

03The measurement noise covariance matrix (119877nom) is

defined by (20) and themeasurement comes from the attitudein (15) however the measurement noise covariance matrix isobtained by calculating the variance of accelerometer signal

through (17) and (18) These signals have a direct relation tothe attitude measurement

119877nom = 119864 [V119896

V119896

119879] (20)

To determine the diagonal element of 119877nom the variances of119891119909 119891119910 and 119891

119911are calculated 119903

11= 904 times 10minus6 119903

22= 104 times

10minus5 and 11990333

= 180 times 10minus5 g2 Since the accelerometer issensitive to disturbances for the sake of practicality we tunedthe value of 119877nom based on the application Related to theproposed method 119886

119896from the external acceleration model

is uncorrelated to noise V119896 and the discrete form of 119877 is now

modified to be as follows

119877119896= 119877nom + 120582119886

2

119896 (21)

where 120582 is a constant coefficient that is heuristically chosenbased on the application in Mode 1 120582 is set to zero Particu-larly inMode 2 119877 is tuned based on the external accelerationmodel and 119886

2

119896is the element of the diagonal matrix which

consists of 1198862119910 1198862119909 and 119886

2

119911 The diagonal matrix of 1198862

119896in (21)

plays a key role in compensating for the external accelerationby increasing the 119877

119896value During static conditions or slow

Journal of Sensors 7

movement (ie 1198862119896asymp 0) the covariance matrix will be the

same as 119877nomThe above process and measurement models construct

the procedure of the EKF as follows

(1) Set the initial values for states and error covariance

0 1198750 (22)

(2) Predict states and error covariance

minus

119896= 119891 (

119896minus1)

119875minus

119896= 119860119875119896minus1

119860119879+ 119876

(23)

(3) Compute the Kalman gain

119870119896= 119875minus

119896119867119879(119867119875minus

119896119867119879+ 119877)minus1

(24)

(4) Compute the states estimate

119896= minus

119896+ 119870119896(119911119896minus 119867minus

119896) (25)

(5) Compute the error covariance

119875119896= 119875minus

119896minus 119870119896119867119875minus

119896 (26)

25 System Model of Mode 3 The two-step EKF [1] usedseparate measurements between the gyro and accelerometerThe external acceleration compensation technique is basedonweighted-switching in setting the noise covariance of thosemeasurements and was proposed by Suh et al

The state 119909(119905) for Mode 3 is 119909(119905) = [120579 120593 119901 119902 119903]119879 and

the measurement variable is 119911(119905) = [119891119909 119891119910

119901 119902 119903]119879 The

system equation is given by

(119905) = 119860 (119905) 119909 (119905) + 119908 (119905)

119911 (119905) = 119891 (119909 (119905)) + V (119905) (27)

where

119860 (119905) =

[[[[[[[[

[

0 0 0 119888120593 minus119904120593

0 0 1 119904120593119905120579 119888120593119905120579

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

]]]]]]]]

]

119891 (119909 (119905)) =

[[[[[[[[

[

119904120579

119904120593119888120579

119901

119902

119903

]]]]]]]]

]

(28)

In Mode 3 there will be a setting for the measurementerror covariance matrix in which 119903

1and 119903

2belong to the

accelerometer and 1199033belongs to the gyroscope as in

119877 =

[[[[[[[[

[

1199031

0 0 0 0

0 1199032

0 0 0

0 0 1199033

0 0

0 0 0 1199033

0

0 0 0 0 1199033

]]]]]]]]

]

(29)

The two-step measurement updated Kalman filter was usedto update the Kalman gain state estimation and covariancematrix First the measurement was updated only for varianceof the error measurement in the gyroscope (119903

3) Second the

measurement was updated for 1199031and 119903

2using a weighted-

switching rule as in (32) based on the threshold rule of(31) to detect external acceleration The threshold rule isderived from a necessary condition for acceleration freemovement as in (30) The weighted-switching rule works onthe principle that when there is external acceleration thegyroscope outputs should be trusted more This can be doneby making 119903

1and 1199032larger For a more detailed explanation

refer to [1] Consider the following

1198912

119909+ 1198912

119910+ 1198912

119911= 1 (30)

100381610038161003816100381610038161198912

119909+ 1198912

119910+ 1198912

119911minus 1

10038161003816100381610038161003816gt 120575 (31)

[1199031119896

1199032119896

] = max(1205721[1199031119896minus1

1199032119896minus1

]

+ 1205722(1199111198961

minus 1198621119896119896119892) [

1199031nom

1199032nom

])

(32)

26 SystemModel of Mode 4 Mode 4 is proposed by Sabatini[11] using quaternion-based EKF The discrete state forMode4 is composed of the rotation quaternion accelerometer andmagnetometer bias vectors

119896+1= [

119896+1

119886119896+1

119898119896+1

]119879

Themeasurementmodel is constructed by accelerometer andmagnetometer measurement vectors

119896+1= [119896+1

119896+1]119879

The mechanism of adaptation of the measurement noisecovariance matrix of acceleration is implemented using athreshold-based approach

1198771205902

119886=

1205902

119886

10038161003816100381610038161003816

10038171003817100381710038171003817119895+1

10038171003817100381710038171003817minus10038171003817100381710038171003817100381710038171003817

10038161003816100381610038161003816lt 120576th forall119895 isin [119896 minus 119896

119886 119896]

infin otherwise(33)

The measured acceleration magnitude is tested in advance torecognize deviations from gravity If there is deviation greaterthan the threshold the observation variance 1198771205902

119886is set to a

high value

27 System Model of Mode 5 Mode 5 is proposed by Haradaet al [12] using quaternion-based UKF The method isthreshold-based combined with a softened part of the mea-surement covariance matrix adaptation The output of the

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 5: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 5

Inertial sensor

Gyroscope

Accelerometer

External accelerationcompensation

ak a2k

EKF

Initial valuesx0 P0

Time updatexminusk = f(xkminus1)

Pminusk = APkminus1A

T + Q

Measurement update

Kk = Pminusk HT(HPminus

k HT + R)minus1

xk = xminusk + Kk(zk minus Hxminus

k )

Pk = Pminusk minus KkHPminus

k

Figure 4 Structure of the proposed algorithm

In (14) 119901 119902 and 119903 are angular velocities measured fromthe gyro along the 119909- 119910- and 119911-axes respectively Symbolsof 119904 119888 119905 and 119904119888 are short forms of sine cosine tangentand secant respectively This process model is nonlinearsince it contains trigonometric functions Therefore we useJacobian values of the nonlinear model of 119891(119909) to replacestate transition matrix (119860) where the values in that matrixare obtained by applying the previous estimated states in theEKF process In contrast matrix119867 is the linear expression

The measurement from the accelerometer which is usedto calculate 120593

119886and 120579119886as measurement variables is a common

initialized leveling equation [2 16]

120593119886= arctan

2(119891119910 119891119911)

120579119886= arctan(

minus119891119909

119891119910119904120593119886+ 119891119911119888120593119886

)

(15)

Figure 4 shows the structure of the proposed algorithmcombined with the extended Kalman filter algorithm Thenotations and meanings of

119896 minus119896 119875119896 and 119875

minus

119896are estimates

of state prediction of state estimate of the error covarianceand the prediction of the error covariance respectively

242 Error Covariance In Figure 4 the estimated errorcovariance is computed by 119875

119896= 119875minus

119896minus 119870119896119867119875minus

119896 Error covari-

ance indicates the difference between state estimation (119896)

and the unknown true state value (119909119896) It also can be defined

as the following [17]

119875119896= 119864 (119909

119896minus 119896) (119909119896minus 119896)119879 (16)

The error covariance of attitude states was initialized bycalculating the angle variance using (15) The rest of the errorcovariances of the bias states were approximated from gyrodata All the variances were calculated using (17) and (18)Equation (17) was used to calculate the estimated mean valueand (18) was used to calculate its covariance as follows

119864 119896 =

1

119873

119873

sum

119894=1

119896119894 (17)

cov 119896 =

1

119873

119873

sum

119894=1

(119899119896119894minus 119864

119896) (119899119896119894minus 119864

119896)119879

(18)

where119873 is a number of samples and 119896is a vector of acceler-

ometer data on the 119909- 119910- and 119911-axesAll calculations were taken from IMU and placed on the

table without movement for approximately one minute withsampling period119879 = 005 sec Figure 5 shows the accelerome-ter and gyroscope signals in static conditions on all three axesThe experimentally determined variance values for attitudestates are 1205902

120593= 605119864 minus 6 and 120590

2

120579= 498119864 minus 6 in rad2 And

for the gyroscope along the 119909- 119910- and 119911-axes the values are

6 Journal of Sensors

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

002

0025

003

0035

004

0 10 20 30 40 50 60Time (s)

minus018

minus017

minus016

minus015

minus014

0 10 20 30 40 50 60Time (s)

127

128

129

13

131

Three-axis gyro outputs

0 10 20 30 40 50 60Time (s)

minus026

minus025

minus024

minus023Three-axis accelerometer outputs

fz

(g)

gx

(rad

s)

gy

(rad

s)

gz

(rad

s)

fx

(g)

fy

(g)

Figure 5 Three-axis gyroscope and accelerometer in static condition

1205902

119887119909= 0046 1205902

119887119910= 0018 and 120590

2

119887119911= 0005 in rads2 These

values will be the diagonal elements of the initial 119875119896

243 Initial Values and Covariance of the Noise The initialvalue of the bias gyro was determined heuristically throughstatic IMU data in rads unit The initial value for attitudestateswas chosen as one degree for each stateThe initial statesvalue in EKF model is as follows

119909119896=1

= [120593 120579 120595 119887119909

119887119910

119887119911]119879

= [1 1 1 minus0019 minus0008 0029]119879

(19)

Since the noise is assumed to be in normal distributionand independent on each axis we use the variance ofnoise 119908(119905) and V(119905) Noise process matrix (119876) was selectedheuristically as 119902

11 11990222 and 119902

33are 1 and 119902

44 11990255 and 119902

66are

03The measurement noise covariance matrix (119877nom) is

defined by (20) and themeasurement comes from the attitudein (15) however the measurement noise covariance matrix isobtained by calculating the variance of accelerometer signal

through (17) and (18) These signals have a direct relation tothe attitude measurement

119877nom = 119864 [V119896

V119896

119879] (20)

To determine the diagonal element of 119877nom the variances of119891119909 119891119910 and 119891

119911are calculated 119903

11= 904 times 10minus6 119903

22= 104 times

10minus5 and 11990333

= 180 times 10minus5 g2 Since the accelerometer issensitive to disturbances for the sake of practicality we tunedthe value of 119877nom based on the application Related to theproposed method 119886

119896from the external acceleration model

is uncorrelated to noise V119896 and the discrete form of 119877 is now

modified to be as follows

119877119896= 119877nom + 120582119886

2

119896 (21)

where 120582 is a constant coefficient that is heuristically chosenbased on the application in Mode 1 120582 is set to zero Particu-larly inMode 2 119877 is tuned based on the external accelerationmodel and 119886

2

119896is the element of the diagonal matrix which

consists of 1198862119910 1198862119909 and 119886

2

119911 The diagonal matrix of 1198862

119896in (21)

plays a key role in compensating for the external accelerationby increasing the 119877

119896value During static conditions or slow

Journal of Sensors 7

movement (ie 1198862119896asymp 0) the covariance matrix will be the

same as 119877nomThe above process and measurement models construct

the procedure of the EKF as follows

(1) Set the initial values for states and error covariance

0 1198750 (22)

(2) Predict states and error covariance

minus

119896= 119891 (

119896minus1)

119875minus

119896= 119860119875119896minus1

119860119879+ 119876

(23)

(3) Compute the Kalman gain

119870119896= 119875minus

119896119867119879(119867119875minus

119896119867119879+ 119877)minus1

(24)

(4) Compute the states estimate

119896= minus

119896+ 119870119896(119911119896minus 119867minus

119896) (25)

(5) Compute the error covariance

119875119896= 119875minus

119896minus 119870119896119867119875minus

119896 (26)

25 System Model of Mode 3 The two-step EKF [1] usedseparate measurements between the gyro and accelerometerThe external acceleration compensation technique is basedonweighted-switching in setting the noise covariance of thosemeasurements and was proposed by Suh et al

The state 119909(119905) for Mode 3 is 119909(119905) = [120579 120593 119901 119902 119903]119879 and

the measurement variable is 119911(119905) = [119891119909 119891119910

119901 119902 119903]119879 The

system equation is given by

(119905) = 119860 (119905) 119909 (119905) + 119908 (119905)

119911 (119905) = 119891 (119909 (119905)) + V (119905) (27)

where

119860 (119905) =

[[[[[[[[

[

0 0 0 119888120593 minus119904120593

0 0 1 119904120593119905120579 119888120593119905120579

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

]]]]]]]]

]

119891 (119909 (119905)) =

[[[[[[[[

[

119904120579

119904120593119888120579

119901

119902

119903

]]]]]]]]

]

(28)

In Mode 3 there will be a setting for the measurementerror covariance matrix in which 119903

1and 119903

2belong to the

accelerometer and 1199033belongs to the gyroscope as in

119877 =

[[[[[[[[

[

1199031

0 0 0 0

0 1199032

0 0 0

0 0 1199033

0 0

0 0 0 1199033

0

0 0 0 0 1199033

]]]]]]]]

]

(29)

The two-step measurement updated Kalman filter was usedto update the Kalman gain state estimation and covariancematrix First the measurement was updated only for varianceof the error measurement in the gyroscope (119903

3) Second the

measurement was updated for 1199031and 119903

2using a weighted-

switching rule as in (32) based on the threshold rule of(31) to detect external acceleration The threshold rule isderived from a necessary condition for acceleration freemovement as in (30) The weighted-switching rule works onthe principle that when there is external acceleration thegyroscope outputs should be trusted more This can be doneby making 119903

1and 1199032larger For a more detailed explanation

refer to [1] Consider the following

1198912

119909+ 1198912

119910+ 1198912

119911= 1 (30)

100381610038161003816100381610038161198912

119909+ 1198912

119910+ 1198912

119911minus 1

10038161003816100381610038161003816gt 120575 (31)

[1199031119896

1199032119896

] = max(1205721[1199031119896minus1

1199032119896minus1

]

+ 1205722(1199111198961

minus 1198621119896119896119892) [

1199031nom

1199032nom

])

(32)

26 SystemModel of Mode 4 Mode 4 is proposed by Sabatini[11] using quaternion-based EKF The discrete state forMode4 is composed of the rotation quaternion accelerometer andmagnetometer bias vectors

119896+1= [

119896+1

119886119896+1

119898119896+1

]119879

Themeasurementmodel is constructed by accelerometer andmagnetometer measurement vectors

119896+1= [119896+1

119896+1]119879

The mechanism of adaptation of the measurement noisecovariance matrix of acceleration is implemented using athreshold-based approach

1198771205902

119886=

1205902

119886

10038161003816100381610038161003816

10038171003817100381710038171003817119895+1

10038171003817100381710038171003817minus10038171003817100381710038171003817100381710038171003817

10038161003816100381610038161003816lt 120576th forall119895 isin [119896 minus 119896

119886 119896]

infin otherwise(33)

The measured acceleration magnitude is tested in advance torecognize deviations from gravity If there is deviation greaterthan the threshold the observation variance 1198771205902

119886is set to a

high value

27 System Model of Mode 5 Mode 5 is proposed by Haradaet al [12] using quaternion-based UKF The method isthreshold-based combined with a softened part of the mea-surement covariance matrix adaptation The output of the

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 6: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

6 Journal of Sensors

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

minus003

minus002

minus001

0

0 10 20 30 40 50 60Time (s)

002

0025

003

0035

004

0 10 20 30 40 50 60Time (s)

minus018

minus017

minus016

minus015

minus014

0 10 20 30 40 50 60Time (s)

127

128

129

13

131

Three-axis gyro outputs

0 10 20 30 40 50 60Time (s)

minus026

minus025

minus024

minus023Three-axis accelerometer outputs

fz

(g)

gx

(rad

s)

gy

(rad

s)

gz

(rad

s)

fx

(g)

fy

(g)

Figure 5 Three-axis gyroscope and accelerometer in static condition

1205902

119887119909= 0046 1205902

119887119910= 0018 and 120590

2

119887119911= 0005 in rads2 These

values will be the diagonal elements of the initial 119875119896

243 Initial Values and Covariance of the Noise The initialvalue of the bias gyro was determined heuristically throughstatic IMU data in rads unit The initial value for attitudestateswas chosen as one degree for each stateThe initial statesvalue in EKF model is as follows

119909119896=1

= [120593 120579 120595 119887119909

119887119910

119887119911]119879

= [1 1 1 minus0019 minus0008 0029]119879

(19)

Since the noise is assumed to be in normal distributionand independent on each axis we use the variance ofnoise 119908(119905) and V(119905) Noise process matrix (119876) was selectedheuristically as 119902

11 11990222 and 119902

33are 1 and 119902

44 11990255 and 119902

66are

03The measurement noise covariance matrix (119877nom) is

defined by (20) and themeasurement comes from the attitudein (15) however the measurement noise covariance matrix isobtained by calculating the variance of accelerometer signal

through (17) and (18) These signals have a direct relation tothe attitude measurement

119877nom = 119864 [V119896

V119896

119879] (20)

To determine the diagonal element of 119877nom the variances of119891119909 119891119910 and 119891

119911are calculated 119903

11= 904 times 10minus6 119903

22= 104 times

10minus5 and 11990333

= 180 times 10minus5 g2 Since the accelerometer issensitive to disturbances for the sake of practicality we tunedthe value of 119877nom based on the application Related to theproposed method 119886

119896from the external acceleration model

is uncorrelated to noise V119896 and the discrete form of 119877 is now

modified to be as follows

119877119896= 119877nom + 120582119886

2

119896 (21)

where 120582 is a constant coefficient that is heuristically chosenbased on the application in Mode 1 120582 is set to zero Particu-larly inMode 2 119877 is tuned based on the external accelerationmodel and 119886

2

119896is the element of the diagonal matrix which

consists of 1198862119910 1198862119909 and 119886

2

119911 The diagonal matrix of 1198862

119896in (21)

plays a key role in compensating for the external accelerationby increasing the 119877

119896value During static conditions or slow

Journal of Sensors 7

movement (ie 1198862119896asymp 0) the covariance matrix will be the

same as 119877nomThe above process and measurement models construct

the procedure of the EKF as follows

(1) Set the initial values for states and error covariance

0 1198750 (22)

(2) Predict states and error covariance

minus

119896= 119891 (

119896minus1)

119875minus

119896= 119860119875119896minus1

119860119879+ 119876

(23)

(3) Compute the Kalman gain

119870119896= 119875minus

119896119867119879(119867119875minus

119896119867119879+ 119877)minus1

(24)

(4) Compute the states estimate

119896= minus

119896+ 119870119896(119911119896minus 119867minus

119896) (25)

(5) Compute the error covariance

119875119896= 119875minus

119896minus 119870119896119867119875minus

119896 (26)

25 System Model of Mode 3 The two-step EKF [1] usedseparate measurements between the gyro and accelerometerThe external acceleration compensation technique is basedonweighted-switching in setting the noise covariance of thosemeasurements and was proposed by Suh et al

The state 119909(119905) for Mode 3 is 119909(119905) = [120579 120593 119901 119902 119903]119879 and

the measurement variable is 119911(119905) = [119891119909 119891119910

119901 119902 119903]119879 The

system equation is given by

(119905) = 119860 (119905) 119909 (119905) + 119908 (119905)

119911 (119905) = 119891 (119909 (119905)) + V (119905) (27)

where

119860 (119905) =

[[[[[[[[

[

0 0 0 119888120593 minus119904120593

0 0 1 119904120593119905120579 119888120593119905120579

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

]]]]]]]]

]

119891 (119909 (119905)) =

[[[[[[[[

[

119904120579

119904120593119888120579

119901

119902

119903

]]]]]]]]

]

(28)

In Mode 3 there will be a setting for the measurementerror covariance matrix in which 119903

1and 119903

2belong to the

accelerometer and 1199033belongs to the gyroscope as in

119877 =

[[[[[[[[

[

1199031

0 0 0 0

0 1199032

0 0 0

0 0 1199033

0 0

0 0 0 1199033

0

0 0 0 0 1199033

]]]]]]]]

]

(29)

The two-step measurement updated Kalman filter was usedto update the Kalman gain state estimation and covariancematrix First the measurement was updated only for varianceof the error measurement in the gyroscope (119903

3) Second the

measurement was updated for 1199031and 119903

2using a weighted-

switching rule as in (32) based on the threshold rule of(31) to detect external acceleration The threshold rule isderived from a necessary condition for acceleration freemovement as in (30) The weighted-switching rule works onthe principle that when there is external acceleration thegyroscope outputs should be trusted more This can be doneby making 119903

1and 1199032larger For a more detailed explanation

refer to [1] Consider the following

1198912

119909+ 1198912

119910+ 1198912

119911= 1 (30)

100381610038161003816100381610038161198912

119909+ 1198912

119910+ 1198912

119911minus 1

10038161003816100381610038161003816gt 120575 (31)

[1199031119896

1199032119896

] = max(1205721[1199031119896minus1

1199032119896minus1

]

+ 1205722(1199111198961

minus 1198621119896119896119892) [

1199031nom

1199032nom

])

(32)

26 SystemModel of Mode 4 Mode 4 is proposed by Sabatini[11] using quaternion-based EKF The discrete state forMode4 is composed of the rotation quaternion accelerometer andmagnetometer bias vectors

119896+1= [

119896+1

119886119896+1

119898119896+1

]119879

Themeasurementmodel is constructed by accelerometer andmagnetometer measurement vectors

119896+1= [119896+1

119896+1]119879

The mechanism of adaptation of the measurement noisecovariance matrix of acceleration is implemented using athreshold-based approach

1198771205902

119886=

1205902

119886

10038161003816100381610038161003816

10038171003817100381710038171003817119895+1

10038171003817100381710038171003817minus10038171003817100381710038171003817100381710038171003817

10038161003816100381610038161003816lt 120576th forall119895 isin [119896 minus 119896

119886 119896]

infin otherwise(33)

The measured acceleration magnitude is tested in advance torecognize deviations from gravity If there is deviation greaterthan the threshold the observation variance 1198771205902

119886is set to a

high value

27 System Model of Mode 5 Mode 5 is proposed by Haradaet al [12] using quaternion-based UKF The method isthreshold-based combined with a softened part of the mea-surement covariance matrix adaptation The output of the

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 7: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 7

movement (ie 1198862119896asymp 0) the covariance matrix will be the

same as 119877nomThe above process and measurement models construct

the procedure of the EKF as follows

(1) Set the initial values for states and error covariance

0 1198750 (22)

(2) Predict states and error covariance

minus

119896= 119891 (

119896minus1)

119875minus

119896= 119860119875119896minus1

119860119879+ 119876

(23)

(3) Compute the Kalman gain

119870119896= 119875minus

119896119867119879(119867119875minus

119896119867119879+ 119877)minus1

(24)

(4) Compute the states estimate

119896= minus

119896+ 119870119896(119911119896minus 119867minus

119896) (25)

(5) Compute the error covariance

119875119896= 119875minus

119896minus 119870119896119867119875minus

119896 (26)

25 System Model of Mode 3 The two-step EKF [1] usedseparate measurements between the gyro and accelerometerThe external acceleration compensation technique is basedonweighted-switching in setting the noise covariance of thosemeasurements and was proposed by Suh et al

The state 119909(119905) for Mode 3 is 119909(119905) = [120579 120593 119901 119902 119903]119879 and

the measurement variable is 119911(119905) = [119891119909 119891119910

119901 119902 119903]119879 The

system equation is given by

(119905) = 119860 (119905) 119909 (119905) + 119908 (119905)

119911 (119905) = 119891 (119909 (119905)) + V (119905) (27)

where

119860 (119905) =

[[[[[[[[

[

0 0 0 119888120593 minus119904120593

0 0 1 119904120593119905120579 119888120593119905120579

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

]]]]]]]]

]

119891 (119909 (119905)) =

[[[[[[[[

[

119904120579

119904120593119888120579

119901

119902

119903

]]]]]]]]

]

(28)

In Mode 3 there will be a setting for the measurementerror covariance matrix in which 119903

1and 119903

2belong to the

accelerometer and 1199033belongs to the gyroscope as in

119877 =

[[[[[[[[

[

1199031

0 0 0 0

0 1199032

0 0 0

0 0 1199033

0 0

0 0 0 1199033

0

0 0 0 0 1199033

]]]]]]]]

]

(29)

The two-step measurement updated Kalman filter was usedto update the Kalman gain state estimation and covariancematrix First the measurement was updated only for varianceof the error measurement in the gyroscope (119903

3) Second the

measurement was updated for 1199031and 119903

2using a weighted-

switching rule as in (32) based on the threshold rule of(31) to detect external acceleration The threshold rule isderived from a necessary condition for acceleration freemovement as in (30) The weighted-switching rule works onthe principle that when there is external acceleration thegyroscope outputs should be trusted more This can be doneby making 119903

1and 1199032larger For a more detailed explanation

refer to [1] Consider the following

1198912

119909+ 1198912

119910+ 1198912

119911= 1 (30)

100381610038161003816100381610038161198912

119909+ 1198912

119910+ 1198912

119911minus 1

10038161003816100381610038161003816gt 120575 (31)

[1199031119896

1199032119896

] = max(1205721[1199031119896minus1

1199032119896minus1

]

+ 1205722(1199111198961

minus 1198621119896119896119892) [

1199031nom

1199032nom

])

(32)

26 SystemModel of Mode 4 Mode 4 is proposed by Sabatini[11] using quaternion-based EKF The discrete state forMode4 is composed of the rotation quaternion accelerometer andmagnetometer bias vectors

119896+1= [

119896+1

119886119896+1

119898119896+1

]119879

Themeasurementmodel is constructed by accelerometer andmagnetometer measurement vectors

119896+1= [119896+1

119896+1]119879

The mechanism of adaptation of the measurement noisecovariance matrix of acceleration is implemented using athreshold-based approach

1198771205902

119886=

1205902

119886

10038161003816100381610038161003816

10038171003817100381710038171003817119895+1

10038171003817100381710038171003817minus10038171003817100381710038171003817100381710038171003817

10038161003816100381610038161003816lt 120576th forall119895 isin [119896 minus 119896

119886 119896]

infin otherwise(33)

The measured acceleration magnitude is tested in advance torecognize deviations from gravity If there is deviation greaterthan the threshold the observation variance 1198771205902

119886is set to a

high value

27 System Model of Mode 5 Mode 5 is proposed by Haradaet al [12] using quaternion-based UKF The method isthreshold-based combined with a softened part of the mea-surement covariance matrix adaptation The output of the

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 8: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

8 Journal of Sensors

X

ZY

IMU

(a)

IMU

RSH3 slider

(b)

Figure 6 Test A setup for validating attitude estimation The RSH3 table slider moves along the 119909-axis

accelerometer is detected as reliable if it satisfies the followingcondition |

119896 minus | lt 120576th where

119896is the output of

the accelerometer on the body frame The mechanism ofthe adaptation of the measurement covariance matrix is asfollows

1205902

119886119896= 1205902

1198860+ 120572119886

10038171003817100381710038171003817

119887119896minus119887119896

10038171003817100381710038171003817

2

(34)

where1205901198860is the offset and120572

119886119887119896minus1198871198962 is the softened part of

the adaptation mechanism 119887119896is the predicted acceleration

that comes from 119877(119902) sdot If the orientation quaternion 119902 =

[ 119890119879 1199024] where 119890 = [119902

1 1199022 1199023]119879 is the vector part and 119902

4is the

scalar part of the quaternion then

119887119896=

1

radic 1198902+ 11990224

[[[

[

2 (11990211199023minus 11990221199024)

2 (11990221199023minus 11990211199024)

minus1199022

1minus 1199022

2+ 1199022

3+ 1199022

4

]]]

]

(35)

3 Experimental Setup and Results

31 Various Test Conditions We have five modes of attitudeestimation as stated in Section 23There will be three tests ineachmode aimed at studying the performance under variousdynamic conditions

Test A was performed by placing the IMU sensor on theslider table of a MISUMI RSH3 single-axis robot By movingthe slider back and forth with the robot controller externalacceleration is applied on the 119909-axis of the IMU sensor TestA intended to test proposedmethod on the lateral movementas is done in [1] which will affect the pitch angle In Test Awe conducted the trial by using such conditions as follows(1) four acceleration coefficients in ascending order from theMISUMI software settings that is 01 075 15 and 25ms2(2) four 119902

0parameter values that is 05 01 005 and 001 (3)

six 120582 values that is 35 80 100 150 170 and 200Test B involved movement using free hand in the 119909- and

119910-axes of the IMU as performed in our previous study [13] bymimicking the pendulum swing movement The movementalong the 119909-axis was considered as roll and the movementalong the 119910-axis was considered as pitch angle In contrast

with Test A Test B was performed using external accelerationon a combination of axes

Test C was executed based on the application of attitudeestimation on a shoe-type measurement device An IMUsensor was placed on the top of one shoe The subject wasasked to walk straight 3-4 strides at a normal speed

32 Test Setup To verify and validate the proposed methodall tests were conducted using an IMU sensor consisting ofan accelerometer (plusmn16 g) a gyro (plusmn1500 degs) and a magne-tometer (plusmn09Ga) (from Logical Product Japan) Sensor datawere transmitted to the PC wirelessly A combination of NILabVIEW and Simulink was used for data acquisition andthe MATLAB program was used to execute the proposedmethod InTestA theMISUMIRSH3 single-axis robot (fromMISUMI Group Inc Japan) had a max speed of 300mmshad an effective stroke of 500mm and was controlled by theRS-Manager support software used as a testbed (see Figures6(a) and 6(b)) Note that the attitude is not changed becausethe IMU sensor was moving in a lateral direction withoutrotation that is in order to validate the proposed methodthe reference values are 120579 = 0∘ and 120593 = 0∘

In Test B the IMU sensor was placed in plastic jarsurrounded by styrofoam to avoid magnetic interferencebetween the IMU and the electromagnetic motion trackingsystem receiver (Fastrak from Polhemus Inc USA) We usedFastrak as the reference by recording the roll and pitch anglesof the receiver using C data acquisition program Fastrakattitude data were transmitted to the PC via a cable using anRS-232 protocol (see Figure 7)

In Test C we mounted the IMU sensor on the shoe Fora reference measurement the experiment setup containedsix OptiTrack cameras and four reflective markers wereplaced at the forefoot and heel Figures 8(a) and 8(b) showthe measurement setup for validating Test C In Tests Band C we calculated cross-correlation in order to comparereferences and IMU data from different data acquisitionprogramsThe timewhen the correlationwasmaximal will beused to synchronize bothmeasurements To accomplish timenormalization between the reference and the IMU sensorcubic spline data interpolation was employed

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 9: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 9

IMU

transmitterFastrak

receiverFastrak

Figure 7 Test B setup consisted of Fastrak attitude referencesystem and IMU inside a plastic jar

The quantitative performance assessment for Test A TestB and Test C is using mean squared error (MSE or 119878) indegree2 and maximum error (119872) in degree between pre-dicted attitude and reference attitude as described in

119878120579=

1

119873

119873

sum

119896=1

( (119896119879) minus 120579 (119896119879))2

119872120579= max119896

10038161003816100381610038161003816 (119896119879) minus 120579 (119896119879)

10038161003816100381610038161003816

(36)

33 Experiment Results

331 Test A Mode 1 is not related to the compensationmodelin (7) while the measurement error covariance in (21) wasset to 119877nom = 15 and 120582 = 0 As with Mode 1 neither thecompensation model nor updating covariance were used inMode 3 but the constant parameters were heuristic choicesbased on trial and error that is 120575 = 01 g2 120572

1= 04 and 120572

2

= 80 The experimental results of Mode 1 and Mode 3 arepresented in Tables 1(a) and 1(b)

To follow the adaptation of measurement noise covari-ance matrix (33) inMode 4 the threshold 120576th used is 002 and1205902

119886= 15 as used inMode 1 andMode 2 Tomeet themechanism

of external acceleration (34) inMode 5 12059021198860is 15 which is the

same value as we used inMode 1 andMode 2120572119886is determined

to be 5 which comes from experiments using 120572119886= 2 to 10

The MSE will decrease in value when 120572119886becomes greater

although the MSE decrease is smooth it is in line with thefunction of 120572

119886as the softened part of adaptation mechanism

The results ofMode 4 andMode 5 are also presented in Tables1(a) and 1(b) Overall the results of Modes 1 3 4 and 5 areshown in Tables 1(a) and 1(b)ThemeanMSE ofMode 5 is the

lowest amongModes 1 3 and 4 that is 2363 and 282 deg2 forpitch and roll respectively

For the purpose of looking at the effect of the reduction ofexternal acceleration theMode 2 experiment was performedusing a different compensating parameter value Table 2shows the average MSE of the attitude estimation from fourdifferent accelerations with some variation in the values of 119902

0

and 120582The variation value of 1199020is 05 01 005 and 001 all of

themusing119870 = 1While the variation value of120582 is 35 80 100150 170 and 200 in ascending order the value settings of theEKF parameters are 119877nom = 15 The relationship between 120582

and 1199020in one-axismovement test is as followsTheMSE trend

decreases as the value of 120582 increases or 1199020decreases The best

combination for one-axismovement in this experiment is 120582 =200 and 119902

0= 001 the MSE is 857 and 148 deg2 for pitch and

roll respectivelyThe influence of the presented 119902

0and 120582 for Mode 2 in

Table 2 was also displayed as a column bar in Figures 9 and10 for the pitch and roll respectively In the meantime theMSE difference 119905-test [18] betweenMode 2 andMode 1 Mode2 andMode 3 andMode 2 andMode 4 as well as that betweenMode 2 andMode 5 was evolved in those figures In Figures 9and 10 ldquoardquo ldquobrdquo ldquocrdquo and ldquodrdquo denote the significant differencebetween MSE of Mode 2 and Mode 1 Mode 3 Mode 4 andMode 5 (119901 lt 005) respectively Figures 11(a) 11(b) 11(c)11(d) 11(e) 11(f) 11(g) 11(h) 11(i) and 11(j) show an exampleof the attitude estimation We choose the fastest movementof the MISUMI table slider (25ms2) in this test as a figureof attitude example As can be seenMode 2 (as compared toModes 1 3 and 5) has the smallest amplitude of MSE that is1347 deg2

332 Test B Test B was executed by rotating the IMU sensorin a randommanner by hand along the119909- and119910-axis In orderto determine the optimal 119902

0value forMode 2 we conduct the

variability of the 1199020test to calculate the MSE and maximum

error along the timeline of the whole experiment Table 4presents theMSE andmaximum errors using different valuesof 1199020 It was found that 119902

0=005 has an optimumperformance

among all the possible choices Figures 12(a) 12(b) and 12(c)show the influence of 119902

0variability to the square output of

the proposed compensation model 119886119896 as in the proposed

model of Mode 2 in (7) and (21) Figures 13(a) 13(b) 13(c)13(d) 13(e) 13(f) 14(a) 14(b) 14(c) 14(d) 15(a) 15(b) 15(c)15(d) 15(e) 15(f) 15(g) 15(h) 15(i) 15(j) 15(k) and 15(l)are produced by using this parameter value to present theanalysis and the result of attitude estimation

Figures 13(a) 13(b) and 13(c) present the accelerometersignal and Figures 13(d) 13(e) and 13(f) present the com-pensation model signal along the 119909- 119910- and 119911-axis of theaccelerometer using model parameters 119870 = 1 and 119902

0= 005

When the sensor is not experiencing external accelerationthe compensating signal tends to be around zero Whilethe sensor is being moved quickly it experiences two majorexternal acceleration periods along the 119909- and 119910-axes asshown in Figures 13(a) and 13(b) In Figure 13(a) we callthe periods Phase I and Phase II (indicated by the dash-dot line) Phase I is for 24 s during 58ndash82 s and followedby Phase II 2 s during 128ndash148 s Observing accelerometer

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 10: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

10 Journal of Sensors

Y

X

35 (m)

25

(m)

Camera

X

(a)

IMU

Reflective marker(b)

Figure 8 Measurement setup for Test C (a) Room setup for recording the attitude (b) four reflective markers were placed on the forefootand heel

Table 1 (a) Test A MSE (119878) of Mode 1 Mode 3 Mode 4 and Mode 5 in detail (b) Test A maximum error (119872) of Mode 1 Mode 3 Mode 4andMode 5 in detail

(a)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119878120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2) 119878

120579pitch (deg2) 119878

120593roll (deg2)

01 960 292 931 271 9942 2673 904 289075 2477 322 2466 320 9256 18310 2292 28215 2979 359 2941 402 11320 22713 2879 28625 3684 488 3449 560 4494 16843 3382 403Mean (sd) 2525 (10) 365 (08) 2447 (94) 388 (11) 8753 (257) 15135 (751) 2364 (93) 315 (05)

(b)

Acc (ms2) Mode 1 Mode 3 Mode 4 Mode 5119872120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg) 119872

120579pitch (deg) 119872

120593roll (deg)

01 2605 861 2605 861 1852 1019 2197 899075 2793 776 2793 776 2087 1902 2297 65615 2916 681 2916 681 2372 2544 2245 57425 2970 1230 2970 1230 1644 2074 2369 935Mean (sd) 2821 (14) 887 (21) 2821 (14) 887 (21) 1989 (27) 1885 (55) 2277 (06) 766 (15)

Table 2 Test A MSE ofMode 2 during the variability of 1199020and 120582 presented as mean (standard deviation)

MSE 1199020

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

Pitch (deg2)

05 1528 (695) 1294 (586) 1231 (556) 112 (502) 1086 (486) 1044 (465)01 1377 (611) 1152 (508) 1093 (480) 989 (430) 958 (415) 917 (394)005 1350 (604) 1129 (502) 89 (588) 967 (423) 935 (407) 894 (386)001 1313 (612) 1094 (506) 1036 (476) 931 (421) 899 (403) 857 (381)

Roll (deg2)

05 262 (096) 232 (102) 225 (104) 213 (109) 210 (110) 207 (112)01 239 (100) 211 (107) 204 (109) 194 (112) 191 (113) 187 (114)005 227 (102) 199 (108) 181 (120) 182 (111) 179 (112) 175 (112)001 191 (104) 167 (108) 162 (109) 153 (110) 151 (110) 148 (111)

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 11: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 11

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

0

20

40

60

80

100

120

05

10152025303540

MSE

pitc

h (d

eg2)

120582 = 35 120582 = 80 120582 = 100 120582 = 150 120582 = 170 120582 = 200

q0 = 05

q0 = 01

q0 = 005

q0 = 001

c c c c c c c c c c c c

a aa a a a a a

2525 2447 23638753

ab b b b b bbb b c c c

cc c c

cccc d d d d d dc

ab

Mode 1 Mode 3 Mode 5 Mode 4

Mode 4

Figure 9 MSE pitch ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 1700

50

100

150

200

250

0123456

2)

MSE

roll

(deg

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

c c c c c c c ca a a

a a a aa a a a

365 388

28215135

ab b b b b b b bc

c cc c c c

c c c cc c c c

c d

Mode 4Mode 3120582 = 100 120582 = 200 Mode 1 Mode 5120582 = 35 120582 = 80 120582 = 150 120582 = 170

q0 = 05

q0 = 01

q0 = 005

q0 = 001

Mode 4

Figure 10 MSE roll ofMode 2 in Test A influence of the variability of 1199020and 120582 ldquoa b c drdquo denote significant difference fromMode 1Mode

3Mode 4 andMode 5 respectively

signal along the 119910-axis in Figure 13(b) we use Phase III andPhase IV (indicated by the dash-dot line) to refer to theexternal acceleration experienced for 2 s during 92ndash112 s and19 s during 162ndash181 s respectively The external accelerationduring Phases I and II is closely related to the pitch anglewhile Phases III and IV are related to the roll angle

Mode 2 works based on an automatically adjusted mea-surement noise covariance matrix as (21) The square ofcompensation model output was needed to adjust the mea-surement error covariance matrix and the squared signaloutput shown in Figures 14(a) 14(b) and 14(c)The timing ofthe occurrence of the enlarged amplitude of the square of thesignal is alignedwith the timing of the external acceleration inPhases I to IV This means that 119877

119896in (21) will increase during

the dynamic condition of this phase However Figure 14(d)presents the necessary condition ofMode 3 as a comparison

Parameter values are used in each mode in Test B Mode1 uses 119877nom = 15 while Mode 2 uses 119902

0= 005 119877nom = 15

and 120582 = 35Mode 3 uses thresholds 120575 = 01 g2 1205721= 04 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 01 and 1205902

119886= 03 We did experiments with

some value of 1205902119886 that is 02 03 and 04 1205902

119886= 03 produced a

minimum MSEMode 5 works using 12059021198860= 15 and the factor

of softened part 120572119886= 3 One of the results of Test B using five

modes is presented in Figures 15(b) 15(c) 15(d) 15(e) and

15(f) for pitch and Figures 15(h) 15(i) 15(j) 15(k) and 15(l)for roll estimation

Attitude reference signal fromFastrak is shown in Figures15(a) and 15(g) for pitch and roll respectivelyThequantitativeevaluation using MSE between each mode at the time theexternal acceleration occurred that is during Phase I toPhase IV is shown in Table 5 Figures 16(a) and 16(b) presentthe column bar of Table 5 for the MSE of pitch and rollrespectively In Table 6 and Figure 17 we conclude the MSEresult of Test B the average MSE of Phases I and II as pitchestimation error and the average of Phases III and IV as rollestimation error

333 Test C Test Cwas executed bywalking straight forwardthree strides along the 119909-axis of the measurement roomcoordinate frame Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f)18(g) 18(h) 18(i) 18(j) 18(k) and 18(l) show the result ofattitude estimation using five modes and the MSE result ispresented in Table 7

Some parameters values are used in Test C for eachmodeMode 1 uses 119877nom = 15 whileMode 2 uses 119902

0= 20 119877nom = 15

and 120582 = 31198904Mode 3 uses thresholds 120575 = 02 g2 1205721= 08 120572

2=

03 and 1199031= 0093 119903

2= 0034 and 119903

3= 15 Mode 4 uses the

thresholds 120576th = 08 and 1205902119886= 60Mode 5works using 1205902

1198860= 15

and the factor of softened part 120572119886= 50

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 12: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

12 Journal of Sensors

Mode 1 pitch (120579) estimation (S120579 = 3684 M120579 = 297)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(a)

Mode 1 roll (120601) estimation (S120601 = 488 M120601 = 123)

5 10 15 200Time (s)

minus5

0

5

10

15

(deg

)

(b)

Mode 2 pitch (120579) estimation (S120579 = 1347 M120579 = 139)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(c)

Mode 2 roll (120601) estimation (S120601 = 341 M120601 = 551)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(d)

Mode 3 pitch (120579) estimation (S120579 = 3449 M120579 = 3227)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(e)

Mode 3 roll (120601) estimation (S120601 = 56 M120601 = 115)

minus5

0

5

10

15

(deg

)

5 10 15 200Time (s)

(f)

Figure 11 Continued

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 13: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 13

Mode 4 pitch (120579) estimation (S120579 = 4494 M120579 = 1644)

5 10 15 200Time (s)

minus30

minus20

minus10

0

10

20

30(d

eg)

(g)

Mode 4 roll (120601) estimation (S120601 = 168 M120601 = 2074)

5 10 15 200Time (s)

minus25

minus20

minus15

minus10

minus5

0

5

(deg

)

(h)

Mode 5 pitch (120579) estimation (S120579 = 3382 M120579 = 2369)

minus30

minus20

minus10

0

10

20

30

(deg

)

5 10 15 200Time (s)

(i)

Mode 5 roll (120601) estimation (S120601 = 403 M120601 = 9347)

minus5

0

5

10

15(d

eg)

5 10 15 200Time (s)

(j)

Figure 11 The MSE (119878) in deg2 and maximum error (119872) in deg of pitch and roll estimation by five modes in Test A acceleration = 25ms2Specifically forMode 2 119902

0= 005 120582 = 150Mode 1 in (a) and (b)Mode 2 in (c) and (d)Mode 3 in (e) and (f)Mode 4 in (g) and (h) andMode

5 in (i) and (j)

4 Discussion

41 Mode 1 External acceleration compensation does notplay a role inMode 1Mode 1 used 119877nom in the measurementnoise covariance matrix as in (20) and did not use theexternal acceleration compensation model An experimentresult of Mode 1 in Test A was presented in Tables 1(a) and1(b) as well as in Figures 9 and 10The comparison in Table 3shows that the MSE of pitch and roll estimation is 2525 and365 deg2 respectively The attitude estimation accuracy ofMode 1 is lower thanMode 2This result confirms the findingspresented in the literature [1] where the standard EKF haslower accuracy in the one-axis test type

The result of Mode 1 in Test B as shown in Figures15(b) and 15(h) demonstrates that the effect of external

acceleration during Phases I to IV on the pitch and rollestimation is still dominant The final result of Mode 1 inTest B as shown in Table 6 and Figure 17 indicates thatMode 1 estimation accuracy is also lower thanMode 2Mode3 and Mode 5 Kalman filtering employs a compensationmechanism that surpassesMode 1rsquos accuracy except inMode4 Mode 1 has a MSE of pitch 36 greater than that of Mode2 26 greater than that ofMode 3 and 43 greater than thatof Mode 5 The result of Mode 1 in Test C is also in line withthe result in Test B which is thatMode 1 estimation accuracyis lower than that inModes 2 3 and 5

42 Mode 2 Theproposed algorithm inMode 2 involved theexternal acceleration compensation models (7) and covari-ance matrix updating process (21) which plays an important

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 14: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

14 Journal of Sensors

g2

a2x (q0 = 001)

0

005

01

015

02

10 200Time (s)

(a)

g2

a2x (q0 = 01)

10 200Time (s)

0

005

01

015

02

(b)

g2

a2x (q0 = 03)

10 200Time (s)

0

005

01

015

02

(c)

Figure 12 Graphs of the square of compensation model output of various value of 1199020along the 119909-axis (a) 119902

0= 001 (b) 119902

0= 01 and (c) 119902

0=

03

Table 3 Test A MSE of all modes presented as mean (standard deviation)

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 2525 (10) 857 (38) 2447 (94) 8753 (257) 2364 (93)Roll (deg2) 365 (08) 148 (11) 388 (11) 15135 (751) 282 (01)

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 15: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 15

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

X-axis

g

02

0

minus02

minus04

minus060 5 10 15 20

Time (s)

y-axis

g

12

11

1

09

080 5 10 15 20

Time (s)

z-axis

g

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ax

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

ay

02

0

minus02

minus04

0 5 10 15 20

Time (s)

g

az

(a)

(b)

(c) (f)

(e)

(d)

Figure 13 External acceleration compensation original accelerometer signal is shown in (a) (b) and (c) compensation model output isshown in (d) (e) and (f) along the 119909- 119910- and 119911-axis respectively In (a) the dash-dot line indicates Phases I and II respectively while in (b)the dash-dot line indicates Phases III and IV respectively

role in improving the attitude estimation accuracy during fastmovement If 119870 = 1 was imposed for all experiments thenthe only setting parameters are 119902

0and 120582

The two parameters 1199020and 120582 are chosen heuristically

However there is some consideration when choosing theseparameters As shown in (7) a smaller 119902

0reduces the cutoff

frequency The value of 1199020that determines the cutoff fre-

quency affects the value of the compensating model output119886119896 where the effect continues to the value of the measure-

ment noise covariance matrix (119877) in attitude estimationThe impact of the 119902

0variability to the square output of 119886

119896

along the 119909-axis was presented in Figures 12(a) and 12(b)It appears that the smaller value of 119902

0has an increasing

amplitude of 1198862

119896 which will simultaneously increase the

value of the measurement error covariance matrix In themeantime the effect of the 120582 is as an amplified factor for the

softened part (1205821198862119896) The increasing value of 120582 simultaneously

increases the value matrix 119877 which reduces the Kalmangain Therefore the contribution of the measurement to theestimation process also decreases thus the estimate is lessaffected by measurement from an accelerometer

The result of Mode 2 in Test A is shown in Figures 9 and10 and Table 3 as a concluding table As can be seen theMode 2MSE of pitch is 857 and 148 deg2 which is the lowestamong all those tested The significant difference with Mode1 is generally started at 120582 = 150 and with 119902

0up to 01

For Test A the variability of 1199020influences the estimation

error however the attitude reference is always zero degreesand therefore we cannot observe the effect of the 119902

0variability

to the attenuation of some important signal by model (7)Therefore we need a test like Test B and Test C to observethe variability effect of 119902

0on the appearance of the signal

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 16: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

16 Journal of Sensors

a2x

0

01

02

g2

5 10 15 200

Time (s)

(a)

a2y

0

005

01

g2

5 10 15 200

Time (s)

(b)

a2z

0

005

g2

5 10 15 200

Time (s)

(c)

(f2x + f2

y + f2z ) minus 1

0

05

1

g2

5 10 15 200

Time (s)

(d)

Figure 14 (a) (b) and (c) graphs of the square of compensation model output for 119909- 119910- and 119911-axis ofMode 2 As a comparison is shownin (d) necessary condition ofMode 3

Table 4 Test BMSE (119878) (in deg2) andmaximum error (119872) (in deg)of attitude estimation of Mode 2 at various values of 119902

0during all

periods of time

1199020

Mode 2119878120579pitch 119878

120593roll 119872

120579pitch 119872

120593roll

001 1392 1154 1191 1392003 1321 1148 1144 1419005 1314 1158 1142 144201 1370 1196 1263 1492015 1448 1223 1393 152802 1514 1245 1481 1554025 1568 1262 1540 157303 1611 1276 1586 1590

InTest B quantitative assessment ofMSEonpitch and rollis done in Phases I to IV as shown in Table 6 and Figure 17Mode 2 has a MSE value of 3436 and 3024 degree2 forpitch and roll estimation respectively The MSE of pitch islower than that in Modes 1 3 and 4 and Mode 5rsquos accuracysurpasses the accuracy of Mode 2 In roll estimation theaccuracy of Mode 2 outperformed the accuracy of Modes 1and 4 It was observed that Mode 2 is able to reduce theeffect of external acceleration on the correct timing when itoccurs that is during Phases I II III and IV The resultsof real world application such as in Test C are in Table 7and Figures 18(a) 18(b) 18(c) 18(d) 18(e) 18(f) 18(g) 18(h)18(i) 18(j) 18(k) and 18(l) the MSE of Mode 2 is 17597 deg2and 2458 deg2 in pitch and roll estimation respectivelyThis means that the average estimation error in every pointcalculation is around 133 deg and 157 deg In Test CMode 2accuracy outperformed the accuracy ofMode 1 andMode 4 inpitch estimation and outperformedMode 1 in roll estimation

Overall for Test C Mode 3 outperformed the accuracy ofother modes on both pitch and roll estimation

43 Mode 3 In our Test A andTest B experimentMode 3 haslower estimation accuracy in pitch estimation (a biggerMSE)as compared toMode 2 andMode 5 as shown in Figure 9 andTable 6 It is important that we do not make the criticism thatMode 2 is superior toMode 3 in Test B since different settingson the combinations of 120575 120572

1 and 120572

2as in (31) and (32) might

result in a better performanceThe result in Table 7 for Test C indicates that Mode 3

outperformed all modes The number of setting parametersin Mode 3 is higher than in other modes (ie three settingparameters) which provides a more softened setting How-ever this also requires more effort than in the other modesOur proposed algorithm in Mode 2 has fewer parametersettings that is 119902

0and 120582 Furthermore the execution of the

compensation algorithm is fully dependent on the existenceand magnitude of the square of external acceleration modelas in (7) and (21) rather than threshold-based approach asin (31) However we observed that themeasurementmodel inMode 3 (as in (28)) has an advantage overMode 2This modelincorporates the data from gyro as well as accelerometer dataTherefore the setting mechanism of matrix 119877 consists of twoparts accelerometer and gyro When the level of trust in theaccelerometer lowers then it is possible to set the level of trusthigher in gyro

44 Mode 4 Of all the tests the estimation accuracy ofMode 4 is the lowest We suspect that this is caused bythe presence of magnetometer measurement vectors in themeasurement model of Mode 4 The earthrsquos magnetic vector119887119898 has amagnitude that is always changing over a large rangeof time [19] Furthermore the experiment room we used isnot guaranteed to be free of magnetic interference and soft

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 17: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 17

(a) (g)

(b) (h)

(i)(c)

References

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

References

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)Mode 1

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 1

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 2

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 2

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Continued

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 18: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

18 Journal of Sensors

(d) (j)

(e) (k)

(l)(f)

Mode 3

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 3

minus30

minus20

minus10

0

10

20

Roll

(deg

)

5 10 15 200Time

Mode 4

5 10 15 200Time

minus30

minus20

minus10

0

10

20Ro

ll (d

eg)

Mode 4

5 10 15 200Time

minus10

0

10

20

30

40

Pitc

h (d

eg)

Mode 5

minus10

0

10

20

30

40

Pitc

h (d

eg)

5 10 15 200Time

Mode 5

5 10 15 200Time

minus30

minus20

minus10

0

10

20

Roll

(deg

)

Figure 15 Test B attitude estimation result five modes in comparison to the references (a and g) for pitch (left column) and roll (rightcolumn)

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 19: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 19

Table5TestB

MSE

(119878)(in

deg2)a

ndmaxim

umerror(119872)(in

deg)

fora

llmod

esdu

ringmajor

externalacceleratio

nperio

ds(in

detail)

Externalacceleratio

nperio

dMode1

Mode2

Mode3

Mode4

Mode5

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

119878120579pitch(deg2)

119872120579pitch(deg)

PhaseI

7459

1851

4203

1142

5192

1247

12383

1945

3046

1031

PhaseII

7059

2170

2669

1045

3307

1239

6692

1348

2798

969

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

119878120593roll(deg2)

119872120593roll(deg)

PhaseIII

5034

1729

3785

1442

1512

857

4816

1008

2546

813

PhaseIV

4763

1695

2263

951

2435

1148

4207

1178

1896

918

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 20: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

20 Journal of Sensors

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Phase I Phase II

140

120

100

80

60

40

20

0

MSE

pitc

h (d

eg2)

(a)

Phase III Phase IV

60

50

40

30

20

10

0

MSE

roll

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

(b)

Figure 16 Test B (a) MSE pitch of five modes (b) MSE roll of five modes during external acceleration all in deg2

Pitch Roll

120

100

80

60

40

20

0

MSE

(deg

2)

Mode 1

Mode 2

Mode 3

Mode 4

Mode 5

Figure 17 Test B the final MSE pitch and roll of each mode duringexternal acceleration in deg2

Table 6 Test B MSE of all modes in degree2

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 7259 3436 4249 9537 2922Roll (deg2) 4898 3024 1973 4511 2221

Table 7 Test C MSE in degree2 of all modes

MSE Mode 1 Mode 2 Mode 3 Mode 4 Mode 5Pitch (deg2) 39535 17597 14792 10362 16087Roll (deg2) 36757 24580 5524 14135 21794

iron distortion In [19] it is suggested that to overcome thisproblem initialization must be done carefully to find out theexact magnitude and orientation of the magnetic field Thisvector can be used during the experiment

45 Mode 5 In our experiments the accuracy of Mode 5outperformed Mode 2 in Test B by around 81 and 153for pitch and roll respectively (as shown in Table 6) Thisalso happened in Test C As shown in Table 7 the estimationaccuracy ofMode 5 is 45 and 6 overMode 2rsquos in pitch androll estimation respectively In Test A Mode 2 outperformsMode 5 in all 120582 and 119902

0combinations

The difference betweenMode 2 andMode 5 is in the soft-ened part of the measurement error covariance matrixMode5 in (34) uses the absolute difference between measurementand predicted acceleration However in Mode 2 we use themodel of external acceleration as the softened part

46 Experimental Limitation and Future Work In all teststhe proposed Mode 2 outperformed Mode 1 From theseresults we were able to ensure that a mechanism of externalacceleration compensation has the influence to improveestimation accuracy Even though there is an advantageto improving the estimation accuracy some of the majorlimitations to the experiments will be described

First is the limitation of measurement model Modes 12 and 3 used Euler representation The model in Mode 1and Mode 2 in (12) did not include the measurement froma gyroscope With a slow motion sensor this measurementmodel might be not a problem because it is not necessaryto compensate the external acceleration The setting of themeasurement noise covariance matrix (119877) in (21) primarilyrelies on the roll and pitch from accelerometer data Whenthe value of 119877 becomes larger due to the presence of externalacceleration the estimation process in Kalman filtering is lessaffected by accelerometer but at the same time we cannot

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 21: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 21

(a)

References

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(g)

References

minus20

minus15

minus10

minus5

0

5

10

Roll

(deg

)

1 2 3 4 50Time (s)

(b)

Mode 1

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(h)

Mode 1

minus20

minus10

0

10

20

30

40Ro

ll (d

eg)

1 2 3 4 50Time (s)

(c)

Mode 2

1 2 3 4 50Time (s)

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

(i)

Mode 2

minus20

minus10

0

10

20

30

Roll

(deg

)

1 2 3 4 50Time (s)

Figure 18 Continued

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 22: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

22 Journal of Sensors

Mode 3

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(d)

Mode 3

minus30

minus20

minus10

0

10

Roll

(deg

)

1 2 3 4 50Time (s)

(j)

Mode 4

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(e)

Mode 4

minus25

minus20

minus15

minus10

minus5

0Ro

ll (d

eg)

1 2 3 4 50Time (s)

(k)

Mode 5

minus80

minus60

minus40

minus20

0

20

40

Pitc

h (d

eg)

1 2 3 4 50Time (s)

(f)

Mode 5

1 2 3 4 50Time (s)

minus10

0

10

20

30

40

Roll

(deg

)

(l)

Figure 18 Test C attitude estimation result five modes in comparison to the motion capture system as references (a and g)

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 23: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

Journal of Sensors 23

increase the level of trust in the gyroscope Furthermore itis important to consider a modification of the measurementmodel in future work

The second limitation is that the proposed externalacceleration compensation in (7) did not include automaticcalculation of parameter 119902

0 The model in (7) is used as an

additional part for the measurement noise covariance in (21)This model relies on the frequency of the application that themodel will use Before using the model the determination ofthe 1199020value is important One prospective improvement of

this model is the additional step of calculating the optimumvalue of 119902

0from IMU data before the Kalman filtering

processThe third limitation is considering the application of

Mode 2 whenever the pitch angle (120579) reached the 1205872 radianeven though there is an advantage of Euler representationover the quaternion representation The limitation of Eulerrepresentation in this experiment is that whenever pitch angle(120579) reaches 1205872 the state in Mode 2 will be singular Thislimitation need not be considered as long as the applicationis still able to accept the range of angle

The fourth limitation is related to the linearization pro-cess in the process model of Mode 2 which leads to first-order approximation error Mode 2 uses EKF-based filteringthat employs linearizing the nonlinear model The first-orderlinearization might be the cause of degraded accuracy in allmodes that employed EKF that is Mode 1 Mode 2 Mode 3andMode 4 HoweverMode 5 employs an unscented Kalmanfilter (UKF) that is free from linearizing through Jacobianmatrix As a resultMode 5 outperformed almost all modes inTest B and outperformedMode 2 in Test COne considerationto avoid the first-order approximation error besides usingUKF is using a direction cosine matrix (DCM) method

5 Conclusion

In this paper the main contribution is the algorithm forexternal acceleration compensation which aims to improvethe attitude estimation accuracy A Kalman filter-basedattitude estimation using a compensating algorithm hasbeen discussed The experiment was performed using threetypes of tests movement on one axis dynamic movementusing free-hand movement and walking We employed fivedifferent approaches to deal with the dynamic test and theproposed method is placed on Mode 2 The first approach isthe standard KF model without using external accelerationcompensation (Mode 1)The second approach is themodifiedKF model using the proposed compensating procedure(Mode 2) the third is a weighted-switching method (Mode 3)the fourth is a quaternion-based EKF using a threshold-basedmethod (Mode 4) and the fifth (Mode 5) uses an unscentedKalman filter and is threshold-based combined with a softenedpart

The experiment results showed that by using the externalacceleration compensation process the estimation accuracyof the proposed algorithm is improved when compared withthe standard EKF procedure in Mode 1 in all tests Mode 2also outperformed all modes in Test A by using the optimalparameter setting In dynamic Test B Mode 5 outperformed

other modes we suspect that this is caused by using UKF inMode 5TheUKFwas free fromfirst-order approximation of anonlinear systemThe advantage ofMode 3 over other modesis presented in Test C Mode 3 used a measurement modelthat included accelerometer and gyroscope data while themeasurement model in Mode 2 was related to accelerometerdata

There is a lack of efficiency comparison to some modesin the experiments Compared to the other modes theadvantage ofMode 2 overMode 3 is the number of parametersset Mode 2 has fewer parameters Mode 3 takes a two-step EKF which leads to additional computational overheadThe advantage of Mode 2 over Mode 4 and Mode 5 is theparameterized spatial rotation quaternion as used in Mode4 andMode 5 is hardly used because it is a burden to updateits four variables [19] However Euler needs to update twovariables Specifically comparing Mode 2 and Mode 5 theireffectiveness has been unexplored the computational timeof the extended Kalman filter is much lower than in theunscented Kalman filter [20]

Nevertheless as a future problem to be solved in order toincrease the estimation accuracy potential for other applica-tions it needs the addition of a step that can perform adaptiveparameter settings (119902

0and 120582) based on the present input from

the IMU Using UKF and DCM is also one considerationto improve accuracy in order to be free from linearizationapproximation error

Competing Interests

The authors declare that there are no competing interestsregarding the publication of this paper

References

[1] Y-S Suh S-K Park H-J Kang and Y-S Ro ldquoAttitude esti-mation adaptively compensating external accelerationrdquo JSMEInternational Journal Series C Mechanical Systems MachineElements and Manufacturing vol 49 no 1 pp 172ndash179 2006

[2] P D Groves Principles of GNSS Inertial and MultisensorIntegrated Navigation Systems Artech House (Horizon House)London UK 2nd edition 2013

[3] C Wada D Takigawa F Wada K Hachisuka T Ienaga andY Kimuro ldquoImprovement research of shoe-type measurementdevice for a walking rehabilitation support systemrdquo in Cross-Cultural Design Cultural Differences in Everyday Life 5thInternational Conference CCD 2013 Held as Part of HCI Inter-national 2013 Las Vegas NV USA July 21ndash26 2013 ProceedingsPart II P L P Rau Ed vol 8024 of Lecture Notes in ComputerScience pp 157ndash164 Springer Berlin Germany 2013

[4] B Mariani C Hoskovec S Rochat C Bula J Penders andK Aminian ldquo3D gait assessment in young and elderly subjectsusing foot-worn inertial sensorsrdquo Journal of Biomechanics vol43 no 15 pp 2999ndash3006 2010

[5] F Dadashi B Mariani S Rochat C J Bula B Santos-Eggimann and K Aminian ldquoGait and foot clearance param-eters obtained using shoe-worn inertial sensors in a large-population sample of older adultsrdquo Sensors vol 14 no 1 pp443ndash457 2014

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 24: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

24 Journal of Sensors

[6] D M Karantonis M R Narayanan M Mathie N H Lovelland B G Celler ldquoImplementation of a real-time human move-ment classifier using a triaxial accelerometer for ambulatorymonitoringrdquo IEEE Transactions on Information Technology inBiomedicine vol 10 no 1 pp 156ndash167 2006

[7] J Klenk C Becker F Lieken et al ldquoComparison of accelerationsignals of simulated and real-world backward fallsrdquo MedicalEngineering amp Physics vol 33 no 3 pp 368ndash373 2011

[8] CWada Y Tang and T Arima ldquoDevelopment of a standing-upmotion guidance systemusing an inertial sensorrdquo inAdvances inIntelligent Systems and Computing Advanced Intelligent SystemsY S Kim Y J Ryoo M S Jang and Y C Bae Eds vol 268 pp179ndash187 Springer Berlin Germany 2014

[9] J Music R Kamnik and M Munih ldquoModel based inertialsensing of human body motion kinematics in sit-to-standmovementrdquo Simulation Modelling Practice and Theory vol 16no 8 pp 933ndash944 2008

[10] S Romaniuk and Z Gosiewski ldquoKalman filter realization fororientation and position estimation on dedicated processorrdquoActa Mechanica et Automatica vol 8 no 2 pp 88ndash94 2014

[11] A M Sabatini ldquoQuaternion-based extended Kalman filter fordetermining orientation by inertial and magnetic sensingrdquoIEEE Transactions on Biomedical Engineering vol 53 no 7 pp1346ndash1356 2006

[12] T Harada T Mori and T Sato ldquoDevelopment of a tinyorientation estimation device to operate under motion andmagnetic disturbancerdquo The International Journal of RoboticsResearch vol 26 no 6 pp 547ndash559 2007

[13] R B Widodo H Edayoshi and C Wada ldquoComplementary fil-ter for orientation estimation adaptive gain based on dynamicacceleration and its changerdquo in Proceedings of the 15th Inter-national Symposium on Soft Computing and Intelligent Systems(SCIS rsquo14) Joint 7th International Conference on and AdvancedIntelligent Systems (ISIS rsquo14) pp 906ndash909 Kitakyushu JapanDecember 2014

[14] J Calusdian X Yun and E R Bachmann ldquoAdaptive-gain com-plementary filter of inertial and magnetic data for orientationestimationrdquo in Proceedings of the IEEE International ConferenceonRobotics andAutomation (ICRA rsquo11) pp 1916ndash1922 ShanghaiChina May 2011

[15] J J DrsquoAzzo C H Houpis and S N Sheldon Linear ControlSystem Analysis and Design with MATLAB Marcel Dekker 5thedition 2003

[16] T Ozyagcilar ldquoImplementing a tilt-compensated ecompassusing accelerometer and magnetometer sensorsrdquo ApplicationNote AN4248 Freescale Semiconductor 2012

[17] M S Grewal and A P Andrews Kalman Filtering Theory andPractice Using MATLAB John Wiley amp Sons Hoboken NJUSA 3rd edition 2008

[18] J C F deWinter ldquoUsing the studentrsquos t-testwith extremely smallsample sizesrdquo Practical Assessment Research and Evaluationvol 18 no 10 pp 1ndash12 2013

[19] N H Q Phuong H-J Kang Y-S Suh and Y-S Ro ldquoA DCMbased orientation estimation algorithm with an inertial mea-surement unit and a magnetic compassrdquo Journal of UniversalComputer Science vol 15 no 4 pp 859ndash876 2009

[20] J J LaViola Jr ldquoA comparison of unscented and extendedkalman filtering for estimating quaternion motionrdquo in Proceed-ings of the American Control Conference vol 3 pp 2435ndash2440June 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 25: Research Article Attitude Estimation Using Kalman ...downloads.hindawi.com/journals/js/2016/6943040.pdf · Attitude Estimation Using Kalman Filtering: External Acceleration Compensation

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of