research article low-cost mems-based pedestrian navigation

11
Hindawi Publishing Corporation Journal of Sensors Volume 2013, Article ID 197090, 10 pages http://dx.doi.org/10.1155/2013/197090 Research Article Low-Cost MEMS-Based Pedestrian Navigation Technique for GPS-Denied Areas Abdelrahman Ali and Naser El-Sheimy Department of Geomatics Engineering, e University of Calgary, 2500 University Drive N.W., Calgary, AB, Canada T2N 1N4 Correspondence should be addressed to Abdelrahman Ali; [email protected] Received 10 April 2013; Accepted 22 July 2013 Academic Editor: Kai-Wei Chiang Copyright © 2013 A. Ali and N. El-Sheimy. 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. e progress in the micro electro mechanical system (MEMS) sensors technology in size, cost, weight, and power consumption allows for new research opportunities in the navigation field. Today, most of smartphones, tablets, and other handheld devices are fully packed with the required sensors for any navigation system such as GPS, gyroscope, accelerometer, magnetometer, and pressure sensors. For seamless navigation, the sensors’ signal quality and the sensors availability are major challenges. Heading estimation is a fundamental challenge in the GPS-denied environments; therefore, targeting accurate attitude estimation is considered significant contribution to the overall navigation error. For that end, this research targets an improved pedestrian navigation by developing sensors fusion technique to exploit the gyroscope, magnetometer, and accelerometer data for device attitude estimation in the different environments based on quaternion mechanization. Results indicate that the improvement in the traveled distance and the heading estimations is capable of reducing the overall position error to be less than 15 m in the harsh environments. 1. Introduction Personal navigation requires technologies that are immune to signal obstructions and fading. One of the major challenges is obtaining a good heading solution in different environments and for different user positions without external absolute reference signals. Part of this challenge arises from the complexity and freedom of movement of a typical handheld user where the heading observability considerably degrades in low-speed walking, making this problem even more challenging. However, for short periods, the relative attitude and heading information is quite reliable. Self-contained systems requiring minimal infrastructure, for example, iner- tial measurement units (IMUs), stand as a viable option, since pedestrian navigation is not only focused on outdoor navigation but also on indoor navigation. Nowadays, most of the smartphones are programmable and equipped with self-contained, low cost, small size, and power-efficient sensors, such as magnetometers, gyroscopes, and accelerometers. Hence, integrating IMUs navigation solution with a magnetometer-based heading can play an important role in pedestrian navigation in all environments. In the current state of the art in MEMS technology, the accuracy of gyroscopes is not good enough for deriving an absolute heading or relative heading over longer durations of time. However, for short periods, the relative attitude information is quite reliable. Magnetometers, on the other hand, provide absolute heading information once calibrated. However, they can easily be disturbed by ferrous objects nearby, making them unreliable for brief intervals. is calls for the investigation of possible sources of heading error in complementary sensors such as a gyroscope and a magnetometer and improving the accuracy of the result based on an improved Kalman filter design. Much research towards the heading estimation for per- sonal positioning applications has been conducted in the recent years. Some approaches use magnetometers exclu- sively for heading estimation [1] while others integrate it tightly with an IMU [2, 3]. One commercially avail- able personal locator system based on this principle is

Upload: others

Post on 24-Jan-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Hindawi Publishing CorporationJournal of SensorsVolume 2013 Article ID 197090 10 pageshttpdxdoiorg1011552013197090

Research ArticleLow-Cost MEMS-Based Pedestrian NavigationTechnique for GPS-Denied Areas

Abdelrahman Ali and Naser El-Sheimy

Department of Geomatics Engineering The University of Calgary 2500 University Drive NW Calgary AB Canada T2N 1N4

Correspondence should be addressed to Abdelrahman Ali asaliucalgaryca

Received 10 April 2013 Accepted 22 July 2013

Academic Editor Kai-Wei Chiang

Copyright copy 2013 A Ali and N El-Sheimy 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

The progress in the micro electro mechanical system (MEMS) sensors technology in size cost weight and power consumptionallows for new research opportunities in the navigation field Today most of smartphones tablets and other handheld devicesare fully packed with the required sensors for any navigation system such as GPS gyroscope accelerometer magnetometerand pressure sensors For seamless navigation the sensorsrsquo signal quality and the sensors availability are major challengesHeading estimation is a fundamental challenge in the GPS-denied environments therefore targeting accurate attitude estimationis considered significant contribution to the overall navigation error For that end this research targets an improved pedestriannavigation by developing sensors fusion technique to exploit the gyroscope magnetometer and accelerometer data for deviceattitude estimation in the different environments based on quaternion mechanization Results indicate that the improvement inthe traveled distance and the heading estimations is capable of reducing the overall position error to be less than 15m in the harshenvironments

1 Introduction

Personal navigation requires technologies that are immune tosignal obstructions and fading One of themajor challenges isobtaining a good heading solution in different environmentsand for different user positions without external absolutereference signals Part of this challenge arises from thecomplexity and freedom of movement of a typical handhelduser where the heading observability considerably degradesin low-speed walking making this problem even morechallenging However for short periods the relative attitudeand heading information is quite reliable Self-containedsystems requiring minimal infrastructure for example iner-tial measurement units (IMUs) stand as a viable optionsince pedestrian navigation is not only focused on outdoornavigation but also on indoor navigation

Nowadays most of the smartphones are programmableand equipped with self-contained low cost small size andpower-efficient sensors such as magnetometers gyroscopesand accelerometers Hence integrating IMUs navigation

solution with a magnetometer-based heading can play animportant role in pedestrian navigation in all environmentsIn the current state of the art in MEMS technology theaccuracy of gyroscopes is not good enough for deriving anabsolute heading or relative heading over longer durationsof time However for short periods the relative attitudeinformation is quite reliable Magnetometers on the otherhand provide absolute heading information once calibratedHowever they can easily be disturbed by ferrous objectsnearby making them unreliable for brief intervals Thiscalls for the investigation of possible sources of headingerror in complementary sensors such as a gyroscope and amagnetometer and improving the accuracy of the result basedon an improved Kalman filter design

Much research towards the heading estimation for per-sonal positioning applications has been conducted in therecent years Some approaches use magnetometers exclu-sively for heading estimation [1] while others integrateit tightly with an IMU [2 3] One commercially avail-able personal locator system based on this principle is

2 Journal of Sensors

theDead ReckoningModuleDRM-4000made byHoneywell[4] A quaternion-based method to integrate IMU withmagnetometer is presented by [5] Three body angular ratesand four quaternion elements were used to express attitudeand were selected as the states of the Kalman filter Themethod needs to model the angular motion of the body In[6] a linear system error model based on the Euler angleserrors expressing the local frame errors is developed andthe corresponding system observation model is derived Theproposedmethod does not need to model the system angularmotion and also avoids the nonlinear problemwhich is inher-ent in the customarily used methods A similar technique isproposed by [7] where the angular rates were modeled to be aconstant A nonlinear derivative equation for the Euler angleintegration kinematics is investigated in [8] Work in [9 10]presented an Euler angle error based method to integrateIMU with magnetometer data where three Euler angle errorsand three gyroscope biases were used as states for the Kalmanfilter The estimated states were used to correct the Eulerangles and to compensate gyroscope drifts respectively Thework at [11] presented a mathematical model for compassdeviation by creating an a priori look-up table for headingcorrections A Kalman filtering approach was investigatedby [12] to estimate the angular rotation from the input ofa magnetometer compass and three gyroscopes References[13 14] presented a least squares techniquewith improvementwhich is used for the estimation of the compass deviationmodel In addition much research has been conducted to usethe 3Dmagnetometer-based heading for personal navigationapplications in the recent years [15]

The magnetometer cannot be used as standalone sourcefor heading information in the harsh environments espe-cially indoor [16] In addition it is required to have knowl-edge about the preexisted magnetic anomalies resulted fromsome of the man-made infrastructure [17] Using magneticfield measurements in heading estimation for indoor navi-gation also has some limitations as the magnetic field signalneeds to be strong enough Also themobile navigation deviceshould be away from any source of disturbances to avoidany perturbation effect [18] Besides that the magnetic fieldduring the indoor environment is not completely constantdue to the presence of the electronic and electrical deviceseverywhere To avoid the problem ofmagnetometer anomalyarising out of ferrous materials in the vicinity of the mag-netometers a perturbation detection technique is requiredIn such scenario the filter works only in the propagationmode without any update for the attitude Also the gyroscopebias drifts with time and temperature can be compensatedby magnetometers In this paper a method is presentedto obtain seamless attitude information by integrating theheading outputs based on magnetometer accelerometer andgyroscope measurements using the Kalman filter (KF)

2 Pedestrian Dead Reckoning (PDR)

Pedestrian dead reckoning is a relative means of positioningwhere the initial position and heading of the user are sup-posed to be knownThe basic concept and components of the

Table 1 Sensors manufacture and ranges

Sensor Manufacture RangeGyroscope mpu-3050 plusmn250 to plusmn2000∘secAccelerometer BMA220 plusmn2 plusmn4 plusmn8 plusmn16 gMagnetometer YAS530 plusmn800120583T

proposed PDR algorithm are shown in Figure 1 Generallysteps of the user are detected based on the accelerometerdata To get the travelled distance the total number of stepsis multiplied by the step length With known heading andreference point the user can be tracked by successive stepscount

Step detection is a basic step for any PDR algorithmUsually the accelerometer signal is used to detect the stepsof the person Once the step is detected the total numberof steps for a pedestrian can be counted As a result thetotal travelled distance can be estimated by multiplying thestep length with the total number of steps Using travelleddistance and heading user can be located during a typicaltrip Step detection algorithm can be performed based ondifferent kinds of sensors that is not only accelerometersbut even gyroscopes and magnetometers However our stepevent detection scheme is based on using the accelerometersignal The norm of the three accelerometers is used as in (1)where it is possible to clearly identify the steps by observingfor example the signal over time

accelnorm = radic(1198651199092

+ 1198651199102

+ 1198651199112

) (1)

Steps are detected as peaks in the resulting norm where thestep is the highest local maximum in the norm accelerationbetween the current peak and the previous step peak

3 Sensors Performance

The used device in the test Samsung Galaxy Nexus smart-phone is shown in Figure 2 with axes definition

Besides other sensors the device is equipped with triadmagnetometer (M) triad gyroscope (G) and triad accel-erometer (A) The manufactures and the ranges of the mainused sensors are listed in Table 1

31 Gyroscope Drift Gyroscopes are mainly used to deter-mine device attitude The output of such sensor is rotationalrate and performing a single integration on the gyroscopesoutputs is necessary to obtain a relative change in angleDue to the integration process which is very sensible tothe systematic errors of the gyroscopes the bias introducesa quadratic error in the velocity and a cubic error in theposition [19] Gyroscopes measurements can generally bedescribed using

119868120596= 120596 + 119887

120596+ 119878120596+ 119873120596+ 120576 (120596) (2)

where 119868120596is the measured angular rate 120596 is the true angular

rate 119887120596is the gyroscope bias 119878 is the linear scale factormatrix

119873 is the nonorthogonality matrix and 120576(120596) is the sensor

Journal of Sensors 3

3D gyroscope 3D magnetometer 3D accelerometer

Measurements leveling

Measurements leveling

Measurements leveling

Multi-heading fusion technique (device heading)

User heading estimation

Step detection length estimationPDR algorithm Initial

position and attitude

Initial orientation

Navigate the user

Misalignment estimation

Figure 1 The main concept of the PDR algorithm

Z vertical (down)

Y (lateral)

X (forward)

Figure 2 Device axis definition

noise With integration the gyroscope bias will introducean angle error in pitch or roll proportional to time that is120575120579 = int 119887

120596119889119905 = 119887

120596119905 this small angle will cause misalignment

of the IMUTherefore when projecting the acceleration fromfor example the gravity vector 119892 from the body frame to thelocal-level frame the acceleration vector will be incorrectlyprojected due to this misalignment error This will introducean error in one of the horizontal acceleration that is 120575119886 =

119892 sin(120575120579) asymp 119892120575120579 asymp 119892119887120596119905 Consequently this leads to an error

in velocity 120575V = int 119887120596119892119905 119889119905 = (12) 119887

1205961198921199052 and in position

120575119901 = int 120575V 119889119905 = int(12)1198871205961198921199052

119889119905 = (16)1198871205961198921199053 To overcome

the problem of error drift a bias compensation of gyro-scopes is required When the device is in stationary modethe deterministic bias of the gyroscope can be estimatedby calculating the average gyroscope output during thattime

32 Magnetometer Perturbation During operation espe-cially inside buildings a magnetometer is subject to manyexternal disturbances such as large metal objects [20] Otherobjects like steel structures and electromagnetic power linescan affect the solution of the magnetometer These kindsof disturbance lead to unpredictable performance of themagnetometer which is a major drawback of using magneticsensors In the meanwhile the magnetic field parameterssuch as strength horizontal and vertical magnetic field andchange in the inclination angle can be checked to detect theperturbation in magnetometer measurement by comparingto the reference values which can be found at [21] Figure 3shows an example for harsh environment as the magnetome-ter is totally disturbed due to the steel constructions Thefigure shows the total magnetic field in a perturbed areaduring a walking test compared to the reference value whichis 570 mGauss for Calgary [21]

4 Multisensors Heading Fusion Filter

The attitude of the device is commonly estimated using theinertial sensor There are three main approaches for attituderepresentation DCM Euler angle and quaternion Amongthe three techniques quaternion algebra is the preferredHowever the estimated attitude from the gyroscope is verynoisy leading to unbounded growth in the heading errorsAn integration scheme for the gyroscope accelerometerand magnetometer data is proposed to estimate the deviceattitude and the gyroscope bias The proposed scheme is aquaternion-based KF as shown in Figure 4

In order to use the KF-based estimator for quaternionparameters and gyroscope biases estimation for a devicewhich is carried by a pedestrian the required model for thestates and measurements and their respective system andmeasurement error models are presented in this section

4 Journal of Sensors

Steel

(a) The structure at the CCIT 2nd floor

0 100 200 300 400 500 600300

400

500

600

700

800

900

Time (s)

Mag

netic

fiel

d (m

Gau

ss)

Normal areaPerturbed areaReference value

Total magnetic field

(b) Total magnetic field

Figure 3 Magnetic field perturbation

41 QuaternionMechanization The relationship between thedirect cosine matrix (DCM) and Euler angles is given in(3) with the sequence of azimuth pitch and roll (120595120579120601) or(119877119909120601

119877119910

120579

119877119911

120595

) [22]

119862119887

119897

=[[

[

119888120579119888120595 119888120579119904120595 minus119904120579

119904120601119904120579119888120595 minus 119888120601119904120595 119904120601119904120579119904120595 + 119888120601119888120595 119904120601119888120579

119888120601119904120579119888120595 + 119904120601119904120595 119888120601119904120579119904120595 minus 119904120601119888120595 119888120601119888120579

]]

]

(3)

A quaternion is a four-dimensional vector which is definedbased on a vector 119902 and a rotation angleThe vector 119902 is givenas

119902 = (1199021 1199022 1199023 1199024) (4)

The DCM matrix in terms of quaternion vector componentscan be obtained from using

119862119899

(119902) =

[[[

[

21199022

1

minus 1 + 1199022

2

211990221199023+ 211990211199024

211990221199024minus 211990211199023

211990221199023minus 211990211199024

21199022

1

minus 1 + 1199022

3

211990231199024+ 211990211199022

211990221199024+ 211990211199023

211990231199024minus 211990211199022

21199022

1

minus 1 + 1199022

4

]]]

]

(5)

where 119862119899 represents the DCMmatrix in terms of the quater-

nion vector

The matrix transforms from the body frame to the locallevel (navigation) frame The roll pitch and azimuth valuescan be obtained by using the 119886 tan 2 math function on thevalues of the 119862

119899 propagated inside the sensors navigationequations

120601 = tanminus1 (119862119899

(2 3)

119862119899

(3 3)

)

120579 = minussinminus1 (119862119899 (1 3))

120595 = tanminus1 (119862119899

(1 2)

119862119899

(1 1)

)

(6)

42 Filter States Basically the target of the proposed filteris to estimate the device attitude based on the quaterniontechnique Consequently any improvement in the quaternionestimate leads to improving the estimated attitude valuesTheimplementation of the KF is optimal for linear systems drivenby additive white Gaussian noise (AWGN) The state modelcan be written in the following form

= 119865119909 + 119866119908 (7)

where 119909 is the state vector 119865 is the state transition matrixand 119866119908 represents the covariance matrix of the applied statemodel The measurement system can be represented by alinear equation of the following form

119885 = 119867119909 + V (8)

where119885 is the vector ofmeasurement updates119867 is the design(observation) matrix that relates the measurements to thestate vector and V is the measurement noise

The nonlinear form of the systemmodel in the absence ofthe known input can be written as

(119905) = 119865 (119909 (119905) 119905) + 119866 (119905)119882 (119905) (9)

where 119865(119909(119905) 119905) is now a nonlinear function describing thetime evolution of the states Consider a nominal trajectory119909nom

(119905) related to the actual trajectory 119909(119905) as

120575119909 (119905) = 119909 (119905) minus 119909nom

(119905) (10)

where 120575119909(119905) is a perturbation from nominal trajectory per-forming a Taylor series expansion equation (10) about thenominal trajectory yields

(119905) asymp 119865 (119909nom

(119905) 119905)

+120597119865 (119909(119905) 119905)

120597119909(119905)

10038161003816100381610038161003816100381610038161003816119909(119905)=119909nom(119905)

120575119909 (119905)

+ 119866 (119905)119882 (119905)

= nom

(119905) + 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(119905) minus nom

(119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

120575 (119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(11)

Journal of Sensors 5

minus

+

Z

(Φ HR Q)

Quaternion q(120593 120579 120595)

Gyroscope data (120596)

Initial estimate

Pred

ictio

n

UpdateNo

Accelerometer data (f)

Magnetometer data (B)

xminusk+1 = Φk+1kx+k

Pminusk+1 = Φk+1kP

+k Φ

Tk+1k + Qk

x+k = xminusk + Kk(zk minus Hkxminusk )

P+k = Pminus

k minus KkHTk x

minusk

Yes

Upd

ate

Parameters

Kk = Pminusk H

Tk (HkP

minusk H

Tk + Rk)

minus1

Quaternion q(120596)

Figure 4 Flow of the Kalman filter process

where 119865 is now the dynamic matrix for a system with statevector which consists of the perturbed states 120575119909 Thus themain states to be estimated are the errors in the quaternionparameters given by

120575119902 = [1205751199021

1205751199022

1205751199023

1205751199024]119879

(12)

where 120575119902119894is the error in the 119894th quaternion parameter

The quaternion parameters are primarily determinedusing the angular rates obtained from gyroscopesrsquo measure-ments The deterministic errors associated with the gyro-scope can be compensated using data from static interval atthe beginning of the test while the stochastic errors in biasesare given by

119887120596= [119887120596119909

119887120596119910

119887120596119911

]119879

(13)

where 119887120596119909 119887120596119910 and 119887

120596119911are the gyroscope biases

The complete state vector is defined as a 7-dimensionalvector with the first four components being errors in theelements of the quaternion and the last three being theelements of the gyroscope biases

119909 = [1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]119879

(14)

43 The State Transition Model The angular rate is linked tothe quaternion parameters as in the following

119902 =1

2

sdot 119902 otimes 120596 =1

2

[[[[

[

minus1199022

minus1199023

minus1199024

1199021

minus1199024

1199023

1199024

1199021

minus1199022

minus1199023

1199022

1199021

]]]]

]

[[

[

120596119909

120596119910

120596119911

]]

]

(15)

where 119902 is the attitude quaternion 120596119909 120596119910 and 120596

119911represent

angular rate measurements in the sensor frame obtainedusing the rate gyroscopes Quaternion is used to representattitude in the filter design because it does not have the sin-gularity problem associated with Euler angles The previousequation can be rewritten as

[[[[[

[

1199021

1199022

1199023

1199024

]]]]]

]

=1

2

[[[[[

[

minus1199022120596119909minus 1199023120596119910minus 1199024120596119911

1199021120596119909minus 1199024120596119910+ 1199023120596119911

1199024120596119909+ 1199021120596119910minus 1199022120596119911

minus1199023120596119909+ 1199022120596119910+ 1199021120596119911

]]]]]

]

(16)

6 Journal of Sensors

R(t)

1205902

03671205902

minus120591 = minus1

120573120591 =

1

120573

t

(a) Gauss Markov parameters

minus1000 minus800 minus600 minus400 minus200 0 200 400 600 800 1000minus2

0

2

4

6

8

10times10minus9

120591(s)

R(120591)

X gyroscope autocorrelation fit-Gauss Markov process

AutocorrelationGauss Markov

(b) Autocorrelation fit for the 119909 gyroscope

Figure 5 Gauss-Markov model representation

The Taylor series expansion to first order is shown in thefollowing

120575 119903 =120597 119903

120597119903

120575119903 (17)

where 119903 is the state vector 120575119903 is the error in the stateThus thequaternion parameters error can be obtained as

[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

]]]]

]

=1

2

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

(18)

A general equation for the 1st order Gauss-Markov model isgiven as

= minus120573119887 + radic21205731205902

119908 (119905) (19)

where 120573 is the reciprocal of the correlation time and 1205902 is

the variance of the gyroscope signalThe different parametersof the Gauss-Markov model can be determined as shown inFigure 5

According to (19) the gyroscopes bias can be modeled as

120596

=[[

[

120596119909

120596119910

120596119911

]]

]

= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

[[

[

119887120596119909

119887120596119910

119887120596119911

]]

]

+

[[[[[

[

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]

]

119908

(20)

The complete state model can be written as the following

[[[[[[[[[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

120596119909

120596119910

120596119911

]]]]]]]]]]]]

]

= [

119865120596

04times3

03times4

119865119887

] sdot

[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]

]

+

[[[[[[[[[[[[

[

0

0

0

0

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]]]]]]]]

]

sdot 119908 (21)

where

119865120596=

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

119865119887= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

(22)

Using the dynamic matrix in (21) the state transition matrixcan be defined as

Φ119896+1119896

= 119890(119865sdotΔ119905)

= 119868 + 119865 sdot Δ119905 +(119865 sdot Δ119905)

2

2

(23)

44MeasurementModels Themagnetometermeasurementsalong with the accelerometer data are used as main source ofupdate The measured magnetic field is tested for perturba-tion Once the magnetic field is free of disturbances the geo-magnetic heading is estimated from the calibrated data Alsothe accelerometer measurements are experienced to be noisyas low cost MEMS sensors are used and usually measured athigher rate Therefore the average of the measured data overthe step time is used to estimate the roll and pitch valuesThe roll pitch and heading estimates are used to calculatethe quaternion parameters

The only source of update is the quaternion parametersThus the design matrix can be set as

120575119911 =

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

=

[[[

[

1 0 0 0 0 0 0

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

]]]

]

sdot

[[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]]

]

(24)

Journal of Sensors 7

45 Modeling of Process and Measurement Noises In orderto complete the design of the KF it is necessary to definethe noise covariance matrices the process noise covariancematrix 119876 and the measurement noise covariance matrix 119877Thesematrices reflect the confidence in the systemmodel andthe measurements respectivelyThe covariance of119908

119896is often

called the process noise matrix 119876119896 and can be computed as

119876119896= 119864 [119908

119896sdot 119908119879

119896

] (25)

The 119876119896matrix is a 7-dimension square matrix which can be

computed using as follows [23 24]

119876119896= int

119905119896+1

119905119896

Φ119905119896+1120591

sdot 119866 (120591) sdot 119876 (120591) sdot 119866119879

(120591)Φ119879

119905119896+1120591119889120591 (26)

The measurement noise covariance matrix 119877 is alsoknown as the covariance matrix for V The 119877

119896matrix repre-

sents the level of confidence placed in the accuracy of themeasurements and is given by

119877119896= 119864 [V

119896sdot V119879119896

] (27)

The 119877119896matrix is a 4-dimension diagonal square matrix

The diagonal elements are the variances of the individualmeasurements which can be determined experimentallyusing measurement data from the used sensors

46 Filter State Initialization The state vector should beinitialized at the beginning of the process For the gyroscopebias states all biases are initialized as zeros The quaternionstates can be initialized from theDCMmatrix using the Eulerangles The mean of the accelerometer calibrated data duringa stationary period can be used to estimate the initial roll andpitch using the following relationships [25]

120601119900

= tanminus1(minus119891119910

radic119891

2

119909

+ 119891

2

119911

)

120579119900= tanminus1(

radic119891

2

119909

+ 119891

2

119910

minus119891119911

)

(28)

where 119891 is the mean of the accelerometer data During thesame interval the roll and pitch estimates are used for levelingthe magnetometer data to be in the navigation frame Thecalibrated magnetometer data is used to estimate the initialazimuth as

120595119900= tanminus1 (

119867119910

119867119909

) (29)

The DCM is calculated using the initial Euler angles valuesas in (3)Then the following relation between the quaternion

and the DCM [22] is used to calculate the initial quaternionvector

119902 =

[[[[[[[[[[[[

[

cos120601

2

cos 120579

2

cos120595

2

+ sin120601

2

sin 120579

2

sin120595

2

sin120601

2

cos 120579

2

cos120595

2

minus cos120601

2

sin 120579

2

sin120595

2

cos120601

2

sin 120579

2

cos120595

2

+ sin120601

2

cos 120579

2

sin120595

2

cos120601

2

cos 120579

2

sin120595

2

minus sin120601

2

sin 120579

2

cos120595

2

]]]]]]]]]]]]

]

(30)

The initial quaternion vector 119902119900 is calculated using the initial

Euler angles values (120601119900 120579119900 120595119900) Equation (30) is also used to

get the updated quaternion parameters

5 Results and Discussion

In this section the performance of the proposed attitudealgorithm is assessed The device is held in the textingmode All tests start with around 30 seconds of stationaryperiod to calibrate for the gyroscope while themagnetometeris calibrated by moving the device in the 3D space Thefirst scenario is conducted to assess the performance of theproposed technique in the indoor environments while thesecond scenario is performed in the downtown area

51 Environment Change Test In this scenario the test isstarted outside the building close to the Olympic Oval atthe University of Calgary The PDR solution is initializedusing initial position from GPS and initial heading fromthe magnetometer The device is held in stationary at thebeginning of the test for about 40 s to calibrate for thegyroscope deterministic bias and to estimate the initialorientation roll and pitch of the deviceThe device is held inthe compass texting mode and the user keeps going throughthe first floor with a long corridor inside the building Thetrajectory is ended outside the McEwan Student Center infront of Taylor Family Digital Library (TDFL) The time forthis trajectory was about 55 minutes taken in 594 steps witha total travelled distance of 461m Various reasons made thisplace a candidate for the test

(i) It is a popular and attractive place for studentsrsquoactivities

(ii) It has a long corridor which is a challenging area formagnetometer

(iii) At the starting point in front of the building there isa huge metal structure which can affect the magne-tometer performance

(iv) This place is full of students and simulates the normalwalking scenario of a smartphone user

The derived heading form the magnetometer is totallyaffected at the beginning due to the presence of a huge metalobject in the surrounding area as shown in Figure 6 Thetotal magnetic field is distorted yielding incorrect headingestimation from magnetometer during the first 40 seconds

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

2 Journal of Sensors

theDead ReckoningModuleDRM-4000made byHoneywell[4] A quaternion-based method to integrate IMU withmagnetometer is presented by [5] Three body angular ratesand four quaternion elements were used to express attitudeand were selected as the states of the Kalman filter Themethod needs to model the angular motion of the body In[6] a linear system error model based on the Euler angleserrors expressing the local frame errors is developed andthe corresponding system observation model is derived Theproposedmethod does not need to model the system angularmotion and also avoids the nonlinear problemwhich is inher-ent in the customarily used methods A similar technique isproposed by [7] where the angular rates were modeled to be aconstant A nonlinear derivative equation for the Euler angleintegration kinematics is investigated in [8] Work in [9 10]presented an Euler angle error based method to integrateIMU with magnetometer data where three Euler angle errorsand three gyroscope biases were used as states for the Kalmanfilter The estimated states were used to correct the Eulerangles and to compensate gyroscope drifts respectively Thework at [11] presented a mathematical model for compassdeviation by creating an a priori look-up table for headingcorrections A Kalman filtering approach was investigatedby [12] to estimate the angular rotation from the input ofa magnetometer compass and three gyroscopes References[13 14] presented a least squares techniquewith improvementwhich is used for the estimation of the compass deviationmodel In addition much research has been conducted to usethe 3Dmagnetometer-based heading for personal navigationapplications in the recent years [15]

The magnetometer cannot be used as standalone sourcefor heading information in the harsh environments espe-cially indoor [16] In addition it is required to have knowl-edge about the preexisted magnetic anomalies resulted fromsome of the man-made infrastructure [17] Using magneticfield measurements in heading estimation for indoor navi-gation also has some limitations as the magnetic field signalneeds to be strong enough Also themobile navigation deviceshould be away from any source of disturbances to avoidany perturbation effect [18] Besides that the magnetic fieldduring the indoor environment is not completely constantdue to the presence of the electronic and electrical deviceseverywhere To avoid the problem ofmagnetometer anomalyarising out of ferrous materials in the vicinity of the mag-netometers a perturbation detection technique is requiredIn such scenario the filter works only in the propagationmode without any update for the attitude Also the gyroscopebias drifts with time and temperature can be compensatedby magnetometers In this paper a method is presentedto obtain seamless attitude information by integrating theheading outputs based on magnetometer accelerometer andgyroscope measurements using the Kalman filter (KF)

2 Pedestrian Dead Reckoning (PDR)

Pedestrian dead reckoning is a relative means of positioningwhere the initial position and heading of the user are sup-posed to be knownThe basic concept and components of the

Table 1 Sensors manufacture and ranges

Sensor Manufacture RangeGyroscope mpu-3050 plusmn250 to plusmn2000∘secAccelerometer BMA220 plusmn2 plusmn4 plusmn8 plusmn16 gMagnetometer YAS530 plusmn800120583T

proposed PDR algorithm are shown in Figure 1 Generallysteps of the user are detected based on the accelerometerdata To get the travelled distance the total number of stepsis multiplied by the step length With known heading andreference point the user can be tracked by successive stepscount

Step detection is a basic step for any PDR algorithmUsually the accelerometer signal is used to detect the stepsof the person Once the step is detected the total numberof steps for a pedestrian can be counted As a result thetotal travelled distance can be estimated by multiplying thestep length with the total number of steps Using travelleddistance and heading user can be located during a typicaltrip Step detection algorithm can be performed based ondifferent kinds of sensors that is not only accelerometersbut even gyroscopes and magnetometers However our stepevent detection scheme is based on using the accelerometersignal The norm of the three accelerometers is used as in (1)where it is possible to clearly identify the steps by observingfor example the signal over time

accelnorm = radic(1198651199092

+ 1198651199102

+ 1198651199112

) (1)

Steps are detected as peaks in the resulting norm where thestep is the highest local maximum in the norm accelerationbetween the current peak and the previous step peak

3 Sensors Performance

The used device in the test Samsung Galaxy Nexus smart-phone is shown in Figure 2 with axes definition

Besides other sensors the device is equipped with triadmagnetometer (M) triad gyroscope (G) and triad accel-erometer (A) The manufactures and the ranges of the mainused sensors are listed in Table 1

31 Gyroscope Drift Gyroscopes are mainly used to deter-mine device attitude The output of such sensor is rotationalrate and performing a single integration on the gyroscopesoutputs is necessary to obtain a relative change in angleDue to the integration process which is very sensible tothe systematic errors of the gyroscopes the bias introducesa quadratic error in the velocity and a cubic error in theposition [19] Gyroscopes measurements can generally bedescribed using

119868120596= 120596 + 119887

120596+ 119878120596+ 119873120596+ 120576 (120596) (2)

where 119868120596is the measured angular rate 120596 is the true angular

rate 119887120596is the gyroscope bias 119878 is the linear scale factormatrix

119873 is the nonorthogonality matrix and 120576(120596) is the sensor

Journal of Sensors 3

3D gyroscope 3D magnetometer 3D accelerometer

Measurements leveling

Measurements leveling

Measurements leveling

Multi-heading fusion technique (device heading)

User heading estimation

Step detection length estimationPDR algorithm Initial

position and attitude

Initial orientation

Navigate the user

Misalignment estimation

Figure 1 The main concept of the PDR algorithm

Z vertical (down)

Y (lateral)

X (forward)

Figure 2 Device axis definition

noise With integration the gyroscope bias will introducean angle error in pitch or roll proportional to time that is120575120579 = int 119887

120596119889119905 = 119887

120596119905 this small angle will cause misalignment

of the IMUTherefore when projecting the acceleration fromfor example the gravity vector 119892 from the body frame to thelocal-level frame the acceleration vector will be incorrectlyprojected due to this misalignment error This will introducean error in one of the horizontal acceleration that is 120575119886 =

119892 sin(120575120579) asymp 119892120575120579 asymp 119892119887120596119905 Consequently this leads to an error

in velocity 120575V = int 119887120596119892119905 119889119905 = (12) 119887

1205961198921199052 and in position

120575119901 = int 120575V 119889119905 = int(12)1198871205961198921199052

119889119905 = (16)1198871205961198921199053 To overcome

the problem of error drift a bias compensation of gyro-scopes is required When the device is in stationary modethe deterministic bias of the gyroscope can be estimatedby calculating the average gyroscope output during thattime

32 Magnetometer Perturbation During operation espe-cially inside buildings a magnetometer is subject to manyexternal disturbances such as large metal objects [20] Otherobjects like steel structures and electromagnetic power linescan affect the solution of the magnetometer These kindsof disturbance lead to unpredictable performance of themagnetometer which is a major drawback of using magneticsensors In the meanwhile the magnetic field parameterssuch as strength horizontal and vertical magnetic field andchange in the inclination angle can be checked to detect theperturbation in magnetometer measurement by comparingto the reference values which can be found at [21] Figure 3shows an example for harsh environment as the magnetome-ter is totally disturbed due to the steel constructions Thefigure shows the total magnetic field in a perturbed areaduring a walking test compared to the reference value whichis 570 mGauss for Calgary [21]

4 Multisensors Heading Fusion Filter

The attitude of the device is commonly estimated using theinertial sensor There are three main approaches for attituderepresentation DCM Euler angle and quaternion Amongthe three techniques quaternion algebra is the preferredHowever the estimated attitude from the gyroscope is verynoisy leading to unbounded growth in the heading errorsAn integration scheme for the gyroscope accelerometerand magnetometer data is proposed to estimate the deviceattitude and the gyroscope bias The proposed scheme is aquaternion-based KF as shown in Figure 4

In order to use the KF-based estimator for quaternionparameters and gyroscope biases estimation for a devicewhich is carried by a pedestrian the required model for thestates and measurements and their respective system andmeasurement error models are presented in this section

4 Journal of Sensors

Steel

(a) The structure at the CCIT 2nd floor

0 100 200 300 400 500 600300

400

500

600

700

800

900

Time (s)

Mag

netic

fiel

d (m

Gau

ss)

Normal areaPerturbed areaReference value

Total magnetic field

(b) Total magnetic field

Figure 3 Magnetic field perturbation

41 QuaternionMechanization The relationship between thedirect cosine matrix (DCM) and Euler angles is given in(3) with the sequence of azimuth pitch and roll (120595120579120601) or(119877119909120601

119877119910

120579

119877119911

120595

) [22]

119862119887

119897

=[[

[

119888120579119888120595 119888120579119904120595 minus119904120579

119904120601119904120579119888120595 minus 119888120601119904120595 119904120601119904120579119904120595 + 119888120601119888120595 119904120601119888120579

119888120601119904120579119888120595 + 119904120601119904120595 119888120601119904120579119904120595 minus 119904120601119888120595 119888120601119888120579

]]

]

(3)

A quaternion is a four-dimensional vector which is definedbased on a vector 119902 and a rotation angleThe vector 119902 is givenas

119902 = (1199021 1199022 1199023 1199024) (4)

The DCM matrix in terms of quaternion vector componentscan be obtained from using

119862119899

(119902) =

[[[

[

21199022

1

minus 1 + 1199022

2

211990221199023+ 211990211199024

211990221199024minus 211990211199023

211990221199023minus 211990211199024

21199022

1

minus 1 + 1199022

3

211990231199024+ 211990211199022

211990221199024+ 211990211199023

211990231199024minus 211990211199022

21199022

1

minus 1 + 1199022

4

]]]

]

(5)

where 119862119899 represents the DCMmatrix in terms of the quater-

nion vector

The matrix transforms from the body frame to the locallevel (navigation) frame The roll pitch and azimuth valuescan be obtained by using the 119886 tan 2 math function on thevalues of the 119862

119899 propagated inside the sensors navigationequations

120601 = tanminus1 (119862119899

(2 3)

119862119899

(3 3)

)

120579 = minussinminus1 (119862119899 (1 3))

120595 = tanminus1 (119862119899

(1 2)

119862119899

(1 1)

)

(6)

42 Filter States Basically the target of the proposed filteris to estimate the device attitude based on the quaterniontechnique Consequently any improvement in the quaternionestimate leads to improving the estimated attitude valuesTheimplementation of the KF is optimal for linear systems drivenby additive white Gaussian noise (AWGN) The state modelcan be written in the following form

= 119865119909 + 119866119908 (7)

where 119909 is the state vector 119865 is the state transition matrixand 119866119908 represents the covariance matrix of the applied statemodel The measurement system can be represented by alinear equation of the following form

119885 = 119867119909 + V (8)

where119885 is the vector ofmeasurement updates119867 is the design(observation) matrix that relates the measurements to thestate vector and V is the measurement noise

The nonlinear form of the systemmodel in the absence ofthe known input can be written as

(119905) = 119865 (119909 (119905) 119905) + 119866 (119905)119882 (119905) (9)

where 119865(119909(119905) 119905) is now a nonlinear function describing thetime evolution of the states Consider a nominal trajectory119909nom

(119905) related to the actual trajectory 119909(119905) as

120575119909 (119905) = 119909 (119905) minus 119909nom

(119905) (10)

where 120575119909(119905) is a perturbation from nominal trajectory per-forming a Taylor series expansion equation (10) about thenominal trajectory yields

(119905) asymp 119865 (119909nom

(119905) 119905)

+120597119865 (119909(119905) 119905)

120597119909(119905)

10038161003816100381610038161003816100381610038161003816119909(119905)=119909nom(119905)

120575119909 (119905)

+ 119866 (119905)119882 (119905)

= nom

(119905) + 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(119905) minus nom

(119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

120575 (119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(11)

Journal of Sensors 5

minus

+

Z

(Φ HR Q)

Quaternion q(120593 120579 120595)

Gyroscope data (120596)

Initial estimate

Pred

ictio

n

UpdateNo

Accelerometer data (f)

Magnetometer data (B)

xminusk+1 = Φk+1kx+k

Pminusk+1 = Φk+1kP

+k Φ

Tk+1k + Qk

x+k = xminusk + Kk(zk minus Hkxminusk )

P+k = Pminus

k minus KkHTk x

minusk

Yes

Upd

ate

Parameters

Kk = Pminusk H

Tk (HkP

minusk H

Tk + Rk)

minus1

Quaternion q(120596)

Figure 4 Flow of the Kalman filter process

where 119865 is now the dynamic matrix for a system with statevector which consists of the perturbed states 120575119909 Thus themain states to be estimated are the errors in the quaternionparameters given by

120575119902 = [1205751199021

1205751199022

1205751199023

1205751199024]119879

(12)

where 120575119902119894is the error in the 119894th quaternion parameter

The quaternion parameters are primarily determinedusing the angular rates obtained from gyroscopesrsquo measure-ments The deterministic errors associated with the gyro-scope can be compensated using data from static interval atthe beginning of the test while the stochastic errors in biasesare given by

119887120596= [119887120596119909

119887120596119910

119887120596119911

]119879

(13)

where 119887120596119909 119887120596119910 and 119887

120596119911are the gyroscope biases

The complete state vector is defined as a 7-dimensionalvector with the first four components being errors in theelements of the quaternion and the last three being theelements of the gyroscope biases

119909 = [1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]119879

(14)

43 The State Transition Model The angular rate is linked tothe quaternion parameters as in the following

119902 =1

2

sdot 119902 otimes 120596 =1

2

[[[[

[

minus1199022

minus1199023

minus1199024

1199021

minus1199024

1199023

1199024

1199021

minus1199022

minus1199023

1199022

1199021

]]]]

]

[[

[

120596119909

120596119910

120596119911

]]

]

(15)

where 119902 is the attitude quaternion 120596119909 120596119910 and 120596

119911represent

angular rate measurements in the sensor frame obtainedusing the rate gyroscopes Quaternion is used to representattitude in the filter design because it does not have the sin-gularity problem associated with Euler angles The previousequation can be rewritten as

[[[[[

[

1199021

1199022

1199023

1199024

]]]]]

]

=1

2

[[[[[

[

minus1199022120596119909minus 1199023120596119910minus 1199024120596119911

1199021120596119909minus 1199024120596119910+ 1199023120596119911

1199024120596119909+ 1199021120596119910minus 1199022120596119911

minus1199023120596119909+ 1199022120596119910+ 1199021120596119911

]]]]]

]

(16)

6 Journal of Sensors

R(t)

1205902

03671205902

minus120591 = minus1

120573120591 =

1

120573

t

(a) Gauss Markov parameters

minus1000 minus800 minus600 minus400 minus200 0 200 400 600 800 1000minus2

0

2

4

6

8

10times10minus9

120591(s)

R(120591)

X gyroscope autocorrelation fit-Gauss Markov process

AutocorrelationGauss Markov

(b) Autocorrelation fit for the 119909 gyroscope

Figure 5 Gauss-Markov model representation

The Taylor series expansion to first order is shown in thefollowing

120575 119903 =120597 119903

120597119903

120575119903 (17)

where 119903 is the state vector 120575119903 is the error in the stateThus thequaternion parameters error can be obtained as

[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

]]]]

]

=1

2

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

(18)

A general equation for the 1st order Gauss-Markov model isgiven as

= minus120573119887 + radic21205731205902

119908 (119905) (19)

where 120573 is the reciprocal of the correlation time and 1205902 is

the variance of the gyroscope signalThe different parametersof the Gauss-Markov model can be determined as shown inFigure 5

According to (19) the gyroscopes bias can be modeled as

120596

=[[

[

120596119909

120596119910

120596119911

]]

]

= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

[[

[

119887120596119909

119887120596119910

119887120596119911

]]

]

+

[[[[[

[

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]

]

119908

(20)

The complete state model can be written as the following

[[[[[[[[[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

120596119909

120596119910

120596119911

]]]]]]]]]]]]

]

= [

119865120596

04times3

03times4

119865119887

] sdot

[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]

]

+

[[[[[[[[[[[[

[

0

0

0

0

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]]]]]]]]

]

sdot 119908 (21)

where

119865120596=

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

119865119887= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

(22)

Using the dynamic matrix in (21) the state transition matrixcan be defined as

Φ119896+1119896

= 119890(119865sdotΔ119905)

= 119868 + 119865 sdot Δ119905 +(119865 sdot Δ119905)

2

2

(23)

44MeasurementModels Themagnetometermeasurementsalong with the accelerometer data are used as main source ofupdate The measured magnetic field is tested for perturba-tion Once the magnetic field is free of disturbances the geo-magnetic heading is estimated from the calibrated data Alsothe accelerometer measurements are experienced to be noisyas low cost MEMS sensors are used and usually measured athigher rate Therefore the average of the measured data overthe step time is used to estimate the roll and pitch valuesThe roll pitch and heading estimates are used to calculatethe quaternion parameters

The only source of update is the quaternion parametersThus the design matrix can be set as

120575119911 =

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

=

[[[

[

1 0 0 0 0 0 0

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

]]]

]

sdot

[[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]]

]

(24)

Journal of Sensors 7

45 Modeling of Process and Measurement Noises In orderto complete the design of the KF it is necessary to definethe noise covariance matrices the process noise covariancematrix 119876 and the measurement noise covariance matrix 119877Thesematrices reflect the confidence in the systemmodel andthe measurements respectivelyThe covariance of119908

119896is often

called the process noise matrix 119876119896 and can be computed as

119876119896= 119864 [119908

119896sdot 119908119879

119896

] (25)

The 119876119896matrix is a 7-dimension square matrix which can be

computed using as follows [23 24]

119876119896= int

119905119896+1

119905119896

Φ119905119896+1120591

sdot 119866 (120591) sdot 119876 (120591) sdot 119866119879

(120591)Φ119879

119905119896+1120591119889120591 (26)

The measurement noise covariance matrix 119877 is alsoknown as the covariance matrix for V The 119877

119896matrix repre-

sents the level of confidence placed in the accuracy of themeasurements and is given by

119877119896= 119864 [V

119896sdot V119879119896

] (27)

The 119877119896matrix is a 4-dimension diagonal square matrix

The diagonal elements are the variances of the individualmeasurements which can be determined experimentallyusing measurement data from the used sensors

46 Filter State Initialization The state vector should beinitialized at the beginning of the process For the gyroscopebias states all biases are initialized as zeros The quaternionstates can be initialized from theDCMmatrix using the Eulerangles The mean of the accelerometer calibrated data duringa stationary period can be used to estimate the initial roll andpitch using the following relationships [25]

120601119900

= tanminus1(minus119891119910

radic119891

2

119909

+ 119891

2

119911

)

120579119900= tanminus1(

radic119891

2

119909

+ 119891

2

119910

minus119891119911

)

(28)

where 119891 is the mean of the accelerometer data During thesame interval the roll and pitch estimates are used for levelingthe magnetometer data to be in the navigation frame Thecalibrated magnetometer data is used to estimate the initialazimuth as

120595119900= tanminus1 (

119867119910

119867119909

) (29)

The DCM is calculated using the initial Euler angles valuesas in (3)Then the following relation between the quaternion

and the DCM [22] is used to calculate the initial quaternionvector

119902 =

[[[[[[[[[[[[

[

cos120601

2

cos 120579

2

cos120595

2

+ sin120601

2

sin 120579

2

sin120595

2

sin120601

2

cos 120579

2

cos120595

2

minus cos120601

2

sin 120579

2

sin120595

2

cos120601

2

sin 120579

2

cos120595

2

+ sin120601

2

cos 120579

2

sin120595

2

cos120601

2

cos 120579

2

sin120595

2

minus sin120601

2

sin 120579

2

cos120595

2

]]]]]]]]]]]]

]

(30)

The initial quaternion vector 119902119900 is calculated using the initial

Euler angles values (120601119900 120579119900 120595119900) Equation (30) is also used to

get the updated quaternion parameters

5 Results and Discussion

In this section the performance of the proposed attitudealgorithm is assessed The device is held in the textingmode All tests start with around 30 seconds of stationaryperiod to calibrate for the gyroscope while themagnetometeris calibrated by moving the device in the 3D space Thefirst scenario is conducted to assess the performance of theproposed technique in the indoor environments while thesecond scenario is performed in the downtown area

51 Environment Change Test In this scenario the test isstarted outside the building close to the Olympic Oval atthe University of Calgary The PDR solution is initializedusing initial position from GPS and initial heading fromthe magnetometer The device is held in stationary at thebeginning of the test for about 40 s to calibrate for thegyroscope deterministic bias and to estimate the initialorientation roll and pitch of the deviceThe device is held inthe compass texting mode and the user keeps going throughthe first floor with a long corridor inside the building Thetrajectory is ended outside the McEwan Student Center infront of Taylor Family Digital Library (TDFL) The time forthis trajectory was about 55 minutes taken in 594 steps witha total travelled distance of 461m Various reasons made thisplace a candidate for the test

(i) It is a popular and attractive place for studentsrsquoactivities

(ii) It has a long corridor which is a challenging area formagnetometer

(iii) At the starting point in front of the building there isa huge metal structure which can affect the magne-tometer performance

(iv) This place is full of students and simulates the normalwalking scenario of a smartphone user

The derived heading form the magnetometer is totallyaffected at the beginning due to the presence of a huge metalobject in the surrounding area as shown in Figure 6 Thetotal magnetic field is distorted yielding incorrect headingestimation from magnetometer during the first 40 seconds

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

Journal of Sensors 3

3D gyroscope 3D magnetometer 3D accelerometer

Measurements leveling

Measurements leveling

Measurements leveling

Multi-heading fusion technique (device heading)

User heading estimation

Step detection length estimationPDR algorithm Initial

position and attitude

Initial orientation

Navigate the user

Misalignment estimation

Figure 1 The main concept of the PDR algorithm

Z vertical (down)

Y (lateral)

X (forward)

Figure 2 Device axis definition

noise With integration the gyroscope bias will introducean angle error in pitch or roll proportional to time that is120575120579 = int 119887

120596119889119905 = 119887

120596119905 this small angle will cause misalignment

of the IMUTherefore when projecting the acceleration fromfor example the gravity vector 119892 from the body frame to thelocal-level frame the acceleration vector will be incorrectlyprojected due to this misalignment error This will introducean error in one of the horizontal acceleration that is 120575119886 =

119892 sin(120575120579) asymp 119892120575120579 asymp 119892119887120596119905 Consequently this leads to an error

in velocity 120575V = int 119887120596119892119905 119889119905 = (12) 119887

1205961198921199052 and in position

120575119901 = int 120575V 119889119905 = int(12)1198871205961198921199052

119889119905 = (16)1198871205961198921199053 To overcome

the problem of error drift a bias compensation of gyro-scopes is required When the device is in stationary modethe deterministic bias of the gyroscope can be estimatedby calculating the average gyroscope output during thattime

32 Magnetometer Perturbation During operation espe-cially inside buildings a magnetometer is subject to manyexternal disturbances such as large metal objects [20] Otherobjects like steel structures and electromagnetic power linescan affect the solution of the magnetometer These kindsof disturbance lead to unpredictable performance of themagnetometer which is a major drawback of using magneticsensors In the meanwhile the magnetic field parameterssuch as strength horizontal and vertical magnetic field andchange in the inclination angle can be checked to detect theperturbation in magnetometer measurement by comparingto the reference values which can be found at [21] Figure 3shows an example for harsh environment as the magnetome-ter is totally disturbed due to the steel constructions Thefigure shows the total magnetic field in a perturbed areaduring a walking test compared to the reference value whichis 570 mGauss for Calgary [21]

4 Multisensors Heading Fusion Filter

The attitude of the device is commonly estimated using theinertial sensor There are three main approaches for attituderepresentation DCM Euler angle and quaternion Amongthe three techniques quaternion algebra is the preferredHowever the estimated attitude from the gyroscope is verynoisy leading to unbounded growth in the heading errorsAn integration scheme for the gyroscope accelerometerand magnetometer data is proposed to estimate the deviceattitude and the gyroscope bias The proposed scheme is aquaternion-based KF as shown in Figure 4

In order to use the KF-based estimator for quaternionparameters and gyroscope biases estimation for a devicewhich is carried by a pedestrian the required model for thestates and measurements and their respective system andmeasurement error models are presented in this section

4 Journal of Sensors

Steel

(a) The structure at the CCIT 2nd floor

0 100 200 300 400 500 600300

400

500

600

700

800

900

Time (s)

Mag

netic

fiel

d (m

Gau

ss)

Normal areaPerturbed areaReference value

Total magnetic field

(b) Total magnetic field

Figure 3 Magnetic field perturbation

41 QuaternionMechanization The relationship between thedirect cosine matrix (DCM) and Euler angles is given in(3) with the sequence of azimuth pitch and roll (120595120579120601) or(119877119909120601

119877119910

120579

119877119911

120595

) [22]

119862119887

119897

=[[

[

119888120579119888120595 119888120579119904120595 minus119904120579

119904120601119904120579119888120595 minus 119888120601119904120595 119904120601119904120579119904120595 + 119888120601119888120595 119904120601119888120579

119888120601119904120579119888120595 + 119904120601119904120595 119888120601119904120579119904120595 minus 119904120601119888120595 119888120601119888120579

]]

]

(3)

A quaternion is a four-dimensional vector which is definedbased on a vector 119902 and a rotation angleThe vector 119902 is givenas

119902 = (1199021 1199022 1199023 1199024) (4)

The DCM matrix in terms of quaternion vector componentscan be obtained from using

119862119899

(119902) =

[[[

[

21199022

1

minus 1 + 1199022

2

211990221199023+ 211990211199024

211990221199024minus 211990211199023

211990221199023minus 211990211199024

21199022

1

minus 1 + 1199022

3

211990231199024+ 211990211199022

211990221199024+ 211990211199023

211990231199024minus 211990211199022

21199022

1

minus 1 + 1199022

4

]]]

]

(5)

where 119862119899 represents the DCMmatrix in terms of the quater-

nion vector

The matrix transforms from the body frame to the locallevel (navigation) frame The roll pitch and azimuth valuescan be obtained by using the 119886 tan 2 math function on thevalues of the 119862

119899 propagated inside the sensors navigationequations

120601 = tanminus1 (119862119899

(2 3)

119862119899

(3 3)

)

120579 = minussinminus1 (119862119899 (1 3))

120595 = tanminus1 (119862119899

(1 2)

119862119899

(1 1)

)

(6)

42 Filter States Basically the target of the proposed filteris to estimate the device attitude based on the quaterniontechnique Consequently any improvement in the quaternionestimate leads to improving the estimated attitude valuesTheimplementation of the KF is optimal for linear systems drivenby additive white Gaussian noise (AWGN) The state modelcan be written in the following form

= 119865119909 + 119866119908 (7)

where 119909 is the state vector 119865 is the state transition matrixand 119866119908 represents the covariance matrix of the applied statemodel The measurement system can be represented by alinear equation of the following form

119885 = 119867119909 + V (8)

where119885 is the vector ofmeasurement updates119867 is the design(observation) matrix that relates the measurements to thestate vector and V is the measurement noise

The nonlinear form of the systemmodel in the absence ofthe known input can be written as

(119905) = 119865 (119909 (119905) 119905) + 119866 (119905)119882 (119905) (9)

where 119865(119909(119905) 119905) is now a nonlinear function describing thetime evolution of the states Consider a nominal trajectory119909nom

(119905) related to the actual trajectory 119909(119905) as

120575119909 (119905) = 119909 (119905) minus 119909nom

(119905) (10)

where 120575119909(119905) is a perturbation from nominal trajectory per-forming a Taylor series expansion equation (10) about thenominal trajectory yields

(119905) asymp 119865 (119909nom

(119905) 119905)

+120597119865 (119909(119905) 119905)

120597119909(119905)

10038161003816100381610038161003816100381610038161003816119909(119905)=119909nom(119905)

120575119909 (119905)

+ 119866 (119905)119882 (119905)

= nom

(119905) + 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(119905) minus nom

(119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

120575 (119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(11)

Journal of Sensors 5

minus

+

Z

(Φ HR Q)

Quaternion q(120593 120579 120595)

Gyroscope data (120596)

Initial estimate

Pred

ictio

n

UpdateNo

Accelerometer data (f)

Magnetometer data (B)

xminusk+1 = Φk+1kx+k

Pminusk+1 = Φk+1kP

+k Φ

Tk+1k + Qk

x+k = xminusk + Kk(zk minus Hkxminusk )

P+k = Pminus

k minus KkHTk x

minusk

Yes

Upd

ate

Parameters

Kk = Pminusk H

Tk (HkP

minusk H

Tk + Rk)

minus1

Quaternion q(120596)

Figure 4 Flow of the Kalman filter process

where 119865 is now the dynamic matrix for a system with statevector which consists of the perturbed states 120575119909 Thus themain states to be estimated are the errors in the quaternionparameters given by

120575119902 = [1205751199021

1205751199022

1205751199023

1205751199024]119879

(12)

where 120575119902119894is the error in the 119894th quaternion parameter

The quaternion parameters are primarily determinedusing the angular rates obtained from gyroscopesrsquo measure-ments The deterministic errors associated with the gyro-scope can be compensated using data from static interval atthe beginning of the test while the stochastic errors in biasesare given by

119887120596= [119887120596119909

119887120596119910

119887120596119911

]119879

(13)

where 119887120596119909 119887120596119910 and 119887

120596119911are the gyroscope biases

The complete state vector is defined as a 7-dimensionalvector with the first four components being errors in theelements of the quaternion and the last three being theelements of the gyroscope biases

119909 = [1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]119879

(14)

43 The State Transition Model The angular rate is linked tothe quaternion parameters as in the following

119902 =1

2

sdot 119902 otimes 120596 =1

2

[[[[

[

minus1199022

minus1199023

minus1199024

1199021

minus1199024

1199023

1199024

1199021

minus1199022

minus1199023

1199022

1199021

]]]]

]

[[

[

120596119909

120596119910

120596119911

]]

]

(15)

where 119902 is the attitude quaternion 120596119909 120596119910 and 120596

119911represent

angular rate measurements in the sensor frame obtainedusing the rate gyroscopes Quaternion is used to representattitude in the filter design because it does not have the sin-gularity problem associated with Euler angles The previousequation can be rewritten as

[[[[[

[

1199021

1199022

1199023

1199024

]]]]]

]

=1

2

[[[[[

[

minus1199022120596119909minus 1199023120596119910minus 1199024120596119911

1199021120596119909minus 1199024120596119910+ 1199023120596119911

1199024120596119909+ 1199021120596119910minus 1199022120596119911

minus1199023120596119909+ 1199022120596119910+ 1199021120596119911

]]]]]

]

(16)

6 Journal of Sensors

R(t)

1205902

03671205902

minus120591 = minus1

120573120591 =

1

120573

t

(a) Gauss Markov parameters

minus1000 minus800 minus600 minus400 minus200 0 200 400 600 800 1000minus2

0

2

4

6

8

10times10minus9

120591(s)

R(120591)

X gyroscope autocorrelation fit-Gauss Markov process

AutocorrelationGauss Markov

(b) Autocorrelation fit for the 119909 gyroscope

Figure 5 Gauss-Markov model representation

The Taylor series expansion to first order is shown in thefollowing

120575 119903 =120597 119903

120597119903

120575119903 (17)

where 119903 is the state vector 120575119903 is the error in the stateThus thequaternion parameters error can be obtained as

[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

]]]]

]

=1

2

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

(18)

A general equation for the 1st order Gauss-Markov model isgiven as

= minus120573119887 + radic21205731205902

119908 (119905) (19)

where 120573 is the reciprocal of the correlation time and 1205902 is

the variance of the gyroscope signalThe different parametersof the Gauss-Markov model can be determined as shown inFigure 5

According to (19) the gyroscopes bias can be modeled as

120596

=[[

[

120596119909

120596119910

120596119911

]]

]

= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

[[

[

119887120596119909

119887120596119910

119887120596119911

]]

]

+

[[[[[

[

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]

]

119908

(20)

The complete state model can be written as the following

[[[[[[[[[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

120596119909

120596119910

120596119911

]]]]]]]]]]]]

]

= [

119865120596

04times3

03times4

119865119887

] sdot

[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]

]

+

[[[[[[[[[[[[

[

0

0

0

0

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]]]]]]]]

]

sdot 119908 (21)

where

119865120596=

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

119865119887= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

(22)

Using the dynamic matrix in (21) the state transition matrixcan be defined as

Φ119896+1119896

= 119890(119865sdotΔ119905)

= 119868 + 119865 sdot Δ119905 +(119865 sdot Δ119905)

2

2

(23)

44MeasurementModels Themagnetometermeasurementsalong with the accelerometer data are used as main source ofupdate The measured magnetic field is tested for perturba-tion Once the magnetic field is free of disturbances the geo-magnetic heading is estimated from the calibrated data Alsothe accelerometer measurements are experienced to be noisyas low cost MEMS sensors are used and usually measured athigher rate Therefore the average of the measured data overthe step time is used to estimate the roll and pitch valuesThe roll pitch and heading estimates are used to calculatethe quaternion parameters

The only source of update is the quaternion parametersThus the design matrix can be set as

120575119911 =

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

=

[[[

[

1 0 0 0 0 0 0

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

]]]

]

sdot

[[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]]

]

(24)

Journal of Sensors 7

45 Modeling of Process and Measurement Noises In orderto complete the design of the KF it is necessary to definethe noise covariance matrices the process noise covariancematrix 119876 and the measurement noise covariance matrix 119877Thesematrices reflect the confidence in the systemmodel andthe measurements respectivelyThe covariance of119908

119896is often

called the process noise matrix 119876119896 and can be computed as

119876119896= 119864 [119908

119896sdot 119908119879

119896

] (25)

The 119876119896matrix is a 7-dimension square matrix which can be

computed using as follows [23 24]

119876119896= int

119905119896+1

119905119896

Φ119905119896+1120591

sdot 119866 (120591) sdot 119876 (120591) sdot 119866119879

(120591)Φ119879

119905119896+1120591119889120591 (26)

The measurement noise covariance matrix 119877 is alsoknown as the covariance matrix for V The 119877

119896matrix repre-

sents the level of confidence placed in the accuracy of themeasurements and is given by

119877119896= 119864 [V

119896sdot V119879119896

] (27)

The 119877119896matrix is a 4-dimension diagonal square matrix

The diagonal elements are the variances of the individualmeasurements which can be determined experimentallyusing measurement data from the used sensors

46 Filter State Initialization The state vector should beinitialized at the beginning of the process For the gyroscopebias states all biases are initialized as zeros The quaternionstates can be initialized from theDCMmatrix using the Eulerangles The mean of the accelerometer calibrated data duringa stationary period can be used to estimate the initial roll andpitch using the following relationships [25]

120601119900

= tanminus1(minus119891119910

radic119891

2

119909

+ 119891

2

119911

)

120579119900= tanminus1(

radic119891

2

119909

+ 119891

2

119910

minus119891119911

)

(28)

where 119891 is the mean of the accelerometer data During thesame interval the roll and pitch estimates are used for levelingthe magnetometer data to be in the navigation frame Thecalibrated magnetometer data is used to estimate the initialazimuth as

120595119900= tanminus1 (

119867119910

119867119909

) (29)

The DCM is calculated using the initial Euler angles valuesas in (3)Then the following relation between the quaternion

and the DCM [22] is used to calculate the initial quaternionvector

119902 =

[[[[[[[[[[[[

[

cos120601

2

cos 120579

2

cos120595

2

+ sin120601

2

sin 120579

2

sin120595

2

sin120601

2

cos 120579

2

cos120595

2

minus cos120601

2

sin 120579

2

sin120595

2

cos120601

2

sin 120579

2

cos120595

2

+ sin120601

2

cos 120579

2

sin120595

2

cos120601

2

cos 120579

2

sin120595

2

minus sin120601

2

sin 120579

2

cos120595

2

]]]]]]]]]]]]

]

(30)

The initial quaternion vector 119902119900 is calculated using the initial

Euler angles values (120601119900 120579119900 120595119900) Equation (30) is also used to

get the updated quaternion parameters

5 Results and Discussion

In this section the performance of the proposed attitudealgorithm is assessed The device is held in the textingmode All tests start with around 30 seconds of stationaryperiod to calibrate for the gyroscope while themagnetometeris calibrated by moving the device in the 3D space Thefirst scenario is conducted to assess the performance of theproposed technique in the indoor environments while thesecond scenario is performed in the downtown area

51 Environment Change Test In this scenario the test isstarted outside the building close to the Olympic Oval atthe University of Calgary The PDR solution is initializedusing initial position from GPS and initial heading fromthe magnetometer The device is held in stationary at thebeginning of the test for about 40 s to calibrate for thegyroscope deterministic bias and to estimate the initialorientation roll and pitch of the deviceThe device is held inthe compass texting mode and the user keeps going throughthe first floor with a long corridor inside the building Thetrajectory is ended outside the McEwan Student Center infront of Taylor Family Digital Library (TDFL) The time forthis trajectory was about 55 minutes taken in 594 steps witha total travelled distance of 461m Various reasons made thisplace a candidate for the test

(i) It is a popular and attractive place for studentsrsquoactivities

(ii) It has a long corridor which is a challenging area formagnetometer

(iii) At the starting point in front of the building there isa huge metal structure which can affect the magne-tometer performance

(iv) This place is full of students and simulates the normalwalking scenario of a smartphone user

The derived heading form the magnetometer is totallyaffected at the beginning due to the presence of a huge metalobject in the surrounding area as shown in Figure 6 Thetotal magnetic field is distorted yielding incorrect headingestimation from magnetometer during the first 40 seconds

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

4 Journal of Sensors

Steel

(a) The structure at the CCIT 2nd floor

0 100 200 300 400 500 600300

400

500

600

700

800

900

Time (s)

Mag

netic

fiel

d (m

Gau

ss)

Normal areaPerturbed areaReference value

Total magnetic field

(b) Total magnetic field

Figure 3 Magnetic field perturbation

41 QuaternionMechanization The relationship between thedirect cosine matrix (DCM) and Euler angles is given in(3) with the sequence of azimuth pitch and roll (120595120579120601) or(119877119909120601

119877119910

120579

119877119911

120595

) [22]

119862119887

119897

=[[

[

119888120579119888120595 119888120579119904120595 minus119904120579

119904120601119904120579119888120595 minus 119888120601119904120595 119904120601119904120579119904120595 + 119888120601119888120595 119904120601119888120579

119888120601119904120579119888120595 + 119904120601119904120595 119888120601119904120579119904120595 minus 119904120601119888120595 119888120601119888120579

]]

]

(3)

A quaternion is a four-dimensional vector which is definedbased on a vector 119902 and a rotation angleThe vector 119902 is givenas

119902 = (1199021 1199022 1199023 1199024) (4)

The DCM matrix in terms of quaternion vector componentscan be obtained from using

119862119899

(119902) =

[[[

[

21199022

1

minus 1 + 1199022

2

211990221199023+ 211990211199024

211990221199024minus 211990211199023

211990221199023minus 211990211199024

21199022

1

minus 1 + 1199022

3

211990231199024+ 211990211199022

211990221199024+ 211990211199023

211990231199024minus 211990211199022

21199022

1

minus 1 + 1199022

4

]]]

]

(5)

where 119862119899 represents the DCMmatrix in terms of the quater-

nion vector

The matrix transforms from the body frame to the locallevel (navigation) frame The roll pitch and azimuth valuescan be obtained by using the 119886 tan 2 math function on thevalues of the 119862

119899 propagated inside the sensors navigationequations

120601 = tanminus1 (119862119899

(2 3)

119862119899

(3 3)

)

120579 = minussinminus1 (119862119899 (1 3))

120595 = tanminus1 (119862119899

(1 2)

119862119899

(1 1)

)

(6)

42 Filter States Basically the target of the proposed filteris to estimate the device attitude based on the quaterniontechnique Consequently any improvement in the quaternionestimate leads to improving the estimated attitude valuesTheimplementation of the KF is optimal for linear systems drivenby additive white Gaussian noise (AWGN) The state modelcan be written in the following form

= 119865119909 + 119866119908 (7)

where 119909 is the state vector 119865 is the state transition matrixand 119866119908 represents the covariance matrix of the applied statemodel The measurement system can be represented by alinear equation of the following form

119885 = 119867119909 + V (8)

where119885 is the vector ofmeasurement updates119867 is the design(observation) matrix that relates the measurements to thestate vector and V is the measurement noise

The nonlinear form of the systemmodel in the absence ofthe known input can be written as

(119905) = 119865 (119909 (119905) 119905) + 119866 (119905)119882 (119905) (9)

where 119865(119909(119905) 119905) is now a nonlinear function describing thetime evolution of the states Consider a nominal trajectory119909nom

(119905) related to the actual trajectory 119909(119905) as

120575119909 (119905) = 119909 (119905) minus 119909nom

(119905) (10)

where 120575119909(119905) is a perturbation from nominal trajectory per-forming a Taylor series expansion equation (10) about thenominal trajectory yields

(119905) asymp 119865 (119909nom

(119905) 119905)

+120597119865 (119909(119905) 119905)

120597119909(119905)

10038161003816100381610038161003816100381610038161003816119909(119905)=119909nom(119905)

120575119909 (119905)

+ 119866 (119905)119882 (119905)

= nom

(119905) + 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(119905) minus nom

(119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

120575 (119905) = 119865120575119909 (119905) + 119866 (119905)119882 (119905)

(11)

Journal of Sensors 5

minus

+

Z

(Φ HR Q)

Quaternion q(120593 120579 120595)

Gyroscope data (120596)

Initial estimate

Pred

ictio

n

UpdateNo

Accelerometer data (f)

Magnetometer data (B)

xminusk+1 = Φk+1kx+k

Pminusk+1 = Φk+1kP

+k Φ

Tk+1k + Qk

x+k = xminusk + Kk(zk minus Hkxminusk )

P+k = Pminus

k minus KkHTk x

minusk

Yes

Upd

ate

Parameters

Kk = Pminusk H

Tk (HkP

minusk H

Tk + Rk)

minus1

Quaternion q(120596)

Figure 4 Flow of the Kalman filter process

where 119865 is now the dynamic matrix for a system with statevector which consists of the perturbed states 120575119909 Thus themain states to be estimated are the errors in the quaternionparameters given by

120575119902 = [1205751199021

1205751199022

1205751199023

1205751199024]119879

(12)

where 120575119902119894is the error in the 119894th quaternion parameter

The quaternion parameters are primarily determinedusing the angular rates obtained from gyroscopesrsquo measure-ments The deterministic errors associated with the gyro-scope can be compensated using data from static interval atthe beginning of the test while the stochastic errors in biasesare given by

119887120596= [119887120596119909

119887120596119910

119887120596119911

]119879

(13)

where 119887120596119909 119887120596119910 and 119887

120596119911are the gyroscope biases

The complete state vector is defined as a 7-dimensionalvector with the first four components being errors in theelements of the quaternion and the last three being theelements of the gyroscope biases

119909 = [1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]119879

(14)

43 The State Transition Model The angular rate is linked tothe quaternion parameters as in the following

119902 =1

2

sdot 119902 otimes 120596 =1

2

[[[[

[

minus1199022

minus1199023

minus1199024

1199021

minus1199024

1199023

1199024

1199021

minus1199022

minus1199023

1199022

1199021

]]]]

]

[[

[

120596119909

120596119910

120596119911

]]

]

(15)

where 119902 is the attitude quaternion 120596119909 120596119910 and 120596

119911represent

angular rate measurements in the sensor frame obtainedusing the rate gyroscopes Quaternion is used to representattitude in the filter design because it does not have the sin-gularity problem associated with Euler angles The previousequation can be rewritten as

[[[[[

[

1199021

1199022

1199023

1199024

]]]]]

]

=1

2

[[[[[

[

minus1199022120596119909minus 1199023120596119910minus 1199024120596119911

1199021120596119909minus 1199024120596119910+ 1199023120596119911

1199024120596119909+ 1199021120596119910minus 1199022120596119911

minus1199023120596119909+ 1199022120596119910+ 1199021120596119911

]]]]]

]

(16)

6 Journal of Sensors

R(t)

1205902

03671205902

minus120591 = minus1

120573120591 =

1

120573

t

(a) Gauss Markov parameters

minus1000 minus800 minus600 minus400 minus200 0 200 400 600 800 1000minus2

0

2

4

6

8

10times10minus9

120591(s)

R(120591)

X gyroscope autocorrelation fit-Gauss Markov process

AutocorrelationGauss Markov

(b) Autocorrelation fit for the 119909 gyroscope

Figure 5 Gauss-Markov model representation

The Taylor series expansion to first order is shown in thefollowing

120575 119903 =120597 119903

120597119903

120575119903 (17)

where 119903 is the state vector 120575119903 is the error in the stateThus thequaternion parameters error can be obtained as

[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

]]]]

]

=1

2

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

(18)

A general equation for the 1st order Gauss-Markov model isgiven as

= minus120573119887 + radic21205731205902

119908 (119905) (19)

where 120573 is the reciprocal of the correlation time and 1205902 is

the variance of the gyroscope signalThe different parametersof the Gauss-Markov model can be determined as shown inFigure 5

According to (19) the gyroscopes bias can be modeled as

120596

=[[

[

120596119909

120596119910

120596119911

]]

]

= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

[[

[

119887120596119909

119887120596119910

119887120596119911

]]

]

+

[[[[[

[

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]

]

119908

(20)

The complete state model can be written as the following

[[[[[[[[[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

120596119909

120596119910

120596119911

]]]]]]]]]]]]

]

= [

119865120596

04times3

03times4

119865119887

] sdot

[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]

]

+

[[[[[[[[[[[[

[

0

0

0

0

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]]]]]]]]

]

sdot 119908 (21)

where

119865120596=

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

119865119887= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

(22)

Using the dynamic matrix in (21) the state transition matrixcan be defined as

Φ119896+1119896

= 119890(119865sdotΔ119905)

= 119868 + 119865 sdot Δ119905 +(119865 sdot Δ119905)

2

2

(23)

44MeasurementModels Themagnetometermeasurementsalong with the accelerometer data are used as main source ofupdate The measured magnetic field is tested for perturba-tion Once the magnetic field is free of disturbances the geo-magnetic heading is estimated from the calibrated data Alsothe accelerometer measurements are experienced to be noisyas low cost MEMS sensors are used and usually measured athigher rate Therefore the average of the measured data overthe step time is used to estimate the roll and pitch valuesThe roll pitch and heading estimates are used to calculatethe quaternion parameters

The only source of update is the quaternion parametersThus the design matrix can be set as

120575119911 =

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

=

[[[

[

1 0 0 0 0 0 0

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

]]]

]

sdot

[[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]]

]

(24)

Journal of Sensors 7

45 Modeling of Process and Measurement Noises In orderto complete the design of the KF it is necessary to definethe noise covariance matrices the process noise covariancematrix 119876 and the measurement noise covariance matrix 119877Thesematrices reflect the confidence in the systemmodel andthe measurements respectivelyThe covariance of119908

119896is often

called the process noise matrix 119876119896 and can be computed as

119876119896= 119864 [119908

119896sdot 119908119879

119896

] (25)

The 119876119896matrix is a 7-dimension square matrix which can be

computed using as follows [23 24]

119876119896= int

119905119896+1

119905119896

Φ119905119896+1120591

sdot 119866 (120591) sdot 119876 (120591) sdot 119866119879

(120591)Φ119879

119905119896+1120591119889120591 (26)

The measurement noise covariance matrix 119877 is alsoknown as the covariance matrix for V The 119877

119896matrix repre-

sents the level of confidence placed in the accuracy of themeasurements and is given by

119877119896= 119864 [V

119896sdot V119879119896

] (27)

The 119877119896matrix is a 4-dimension diagonal square matrix

The diagonal elements are the variances of the individualmeasurements which can be determined experimentallyusing measurement data from the used sensors

46 Filter State Initialization The state vector should beinitialized at the beginning of the process For the gyroscopebias states all biases are initialized as zeros The quaternionstates can be initialized from theDCMmatrix using the Eulerangles The mean of the accelerometer calibrated data duringa stationary period can be used to estimate the initial roll andpitch using the following relationships [25]

120601119900

= tanminus1(minus119891119910

radic119891

2

119909

+ 119891

2

119911

)

120579119900= tanminus1(

radic119891

2

119909

+ 119891

2

119910

minus119891119911

)

(28)

where 119891 is the mean of the accelerometer data During thesame interval the roll and pitch estimates are used for levelingthe magnetometer data to be in the navigation frame Thecalibrated magnetometer data is used to estimate the initialazimuth as

120595119900= tanminus1 (

119867119910

119867119909

) (29)

The DCM is calculated using the initial Euler angles valuesas in (3)Then the following relation between the quaternion

and the DCM [22] is used to calculate the initial quaternionvector

119902 =

[[[[[[[[[[[[

[

cos120601

2

cos 120579

2

cos120595

2

+ sin120601

2

sin 120579

2

sin120595

2

sin120601

2

cos 120579

2

cos120595

2

minus cos120601

2

sin 120579

2

sin120595

2

cos120601

2

sin 120579

2

cos120595

2

+ sin120601

2

cos 120579

2

sin120595

2

cos120601

2

cos 120579

2

sin120595

2

minus sin120601

2

sin 120579

2

cos120595

2

]]]]]]]]]]]]

]

(30)

The initial quaternion vector 119902119900 is calculated using the initial

Euler angles values (120601119900 120579119900 120595119900) Equation (30) is also used to

get the updated quaternion parameters

5 Results and Discussion

In this section the performance of the proposed attitudealgorithm is assessed The device is held in the textingmode All tests start with around 30 seconds of stationaryperiod to calibrate for the gyroscope while themagnetometeris calibrated by moving the device in the 3D space Thefirst scenario is conducted to assess the performance of theproposed technique in the indoor environments while thesecond scenario is performed in the downtown area

51 Environment Change Test In this scenario the test isstarted outside the building close to the Olympic Oval atthe University of Calgary The PDR solution is initializedusing initial position from GPS and initial heading fromthe magnetometer The device is held in stationary at thebeginning of the test for about 40 s to calibrate for thegyroscope deterministic bias and to estimate the initialorientation roll and pitch of the deviceThe device is held inthe compass texting mode and the user keeps going throughthe first floor with a long corridor inside the building Thetrajectory is ended outside the McEwan Student Center infront of Taylor Family Digital Library (TDFL) The time forthis trajectory was about 55 minutes taken in 594 steps witha total travelled distance of 461m Various reasons made thisplace a candidate for the test

(i) It is a popular and attractive place for studentsrsquoactivities

(ii) It has a long corridor which is a challenging area formagnetometer

(iii) At the starting point in front of the building there isa huge metal structure which can affect the magne-tometer performance

(iv) This place is full of students and simulates the normalwalking scenario of a smartphone user

The derived heading form the magnetometer is totallyaffected at the beginning due to the presence of a huge metalobject in the surrounding area as shown in Figure 6 Thetotal magnetic field is distorted yielding incorrect headingestimation from magnetometer during the first 40 seconds

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

Journal of Sensors 5

minus

+

Z

(Φ HR Q)

Quaternion q(120593 120579 120595)

Gyroscope data (120596)

Initial estimate

Pred

ictio

n

UpdateNo

Accelerometer data (f)

Magnetometer data (B)

xminusk+1 = Φk+1kx+k

Pminusk+1 = Φk+1kP

+k Φ

Tk+1k + Qk

x+k = xminusk + Kk(zk minus Hkxminusk )

P+k = Pminus

k minus KkHTk x

minusk

Yes

Upd

ate

Parameters

Kk = Pminusk H

Tk (HkP

minusk H

Tk + Rk)

minus1

Quaternion q(120596)

Figure 4 Flow of the Kalman filter process

where 119865 is now the dynamic matrix for a system with statevector which consists of the perturbed states 120575119909 Thus themain states to be estimated are the errors in the quaternionparameters given by

120575119902 = [1205751199021

1205751199022

1205751199023

1205751199024]119879

(12)

where 120575119902119894is the error in the 119894th quaternion parameter

The quaternion parameters are primarily determinedusing the angular rates obtained from gyroscopesrsquo measure-ments The deterministic errors associated with the gyro-scope can be compensated using data from static interval atthe beginning of the test while the stochastic errors in biasesare given by

119887120596= [119887120596119909

119887120596119910

119887120596119911

]119879

(13)

where 119887120596119909 119887120596119910 and 119887

120596119911are the gyroscope biases

The complete state vector is defined as a 7-dimensionalvector with the first four components being errors in theelements of the quaternion and the last three being theelements of the gyroscope biases

119909 = [1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]119879

(14)

43 The State Transition Model The angular rate is linked tothe quaternion parameters as in the following

119902 =1

2

sdot 119902 otimes 120596 =1

2

[[[[

[

minus1199022

minus1199023

minus1199024

1199021

minus1199024

1199023

1199024

1199021

minus1199022

minus1199023

1199022

1199021

]]]]

]

[[

[

120596119909

120596119910

120596119911

]]

]

(15)

where 119902 is the attitude quaternion 120596119909 120596119910 and 120596

119911represent

angular rate measurements in the sensor frame obtainedusing the rate gyroscopes Quaternion is used to representattitude in the filter design because it does not have the sin-gularity problem associated with Euler angles The previousequation can be rewritten as

[[[[[

[

1199021

1199022

1199023

1199024

]]]]]

]

=1

2

[[[[[

[

minus1199022120596119909minus 1199023120596119910minus 1199024120596119911

1199021120596119909minus 1199024120596119910+ 1199023120596119911

1199024120596119909+ 1199021120596119910minus 1199022120596119911

minus1199023120596119909+ 1199022120596119910+ 1199021120596119911

]]]]]

]

(16)

6 Journal of Sensors

R(t)

1205902

03671205902

minus120591 = minus1

120573120591 =

1

120573

t

(a) Gauss Markov parameters

minus1000 minus800 minus600 minus400 minus200 0 200 400 600 800 1000minus2

0

2

4

6

8

10times10minus9

120591(s)

R(120591)

X gyroscope autocorrelation fit-Gauss Markov process

AutocorrelationGauss Markov

(b) Autocorrelation fit for the 119909 gyroscope

Figure 5 Gauss-Markov model representation

The Taylor series expansion to first order is shown in thefollowing

120575 119903 =120597 119903

120597119903

120575119903 (17)

where 119903 is the state vector 120575119903 is the error in the stateThus thequaternion parameters error can be obtained as

[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

]]]]

]

=1

2

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

(18)

A general equation for the 1st order Gauss-Markov model isgiven as

= minus120573119887 + radic21205731205902

119908 (119905) (19)

where 120573 is the reciprocal of the correlation time and 1205902 is

the variance of the gyroscope signalThe different parametersof the Gauss-Markov model can be determined as shown inFigure 5

According to (19) the gyroscopes bias can be modeled as

120596

=[[

[

120596119909

120596119910

120596119911

]]

]

= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

[[

[

119887120596119909

119887120596119910

119887120596119911

]]

]

+

[[[[[

[

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]

]

119908

(20)

The complete state model can be written as the following

[[[[[[[[[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

120596119909

120596119910

120596119911

]]]]]]]]]]]]

]

= [

119865120596

04times3

03times4

119865119887

] sdot

[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]

]

+

[[[[[[[[[[[[

[

0

0

0

0

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]]]]]]]]

]

sdot 119908 (21)

where

119865120596=

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

119865119887= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

(22)

Using the dynamic matrix in (21) the state transition matrixcan be defined as

Φ119896+1119896

= 119890(119865sdotΔ119905)

= 119868 + 119865 sdot Δ119905 +(119865 sdot Δ119905)

2

2

(23)

44MeasurementModels Themagnetometermeasurementsalong with the accelerometer data are used as main source ofupdate The measured magnetic field is tested for perturba-tion Once the magnetic field is free of disturbances the geo-magnetic heading is estimated from the calibrated data Alsothe accelerometer measurements are experienced to be noisyas low cost MEMS sensors are used and usually measured athigher rate Therefore the average of the measured data overthe step time is used to estimate the roll and pitch valuesThe roll pitch and heading estimates are used to calculatethe quaternion parameters

The only source of update is the quaternion parametersThus the design matrix can be set as

120575119911 =

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

=

[[[

[

1 0 0 0 0 0 0

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

]]]

]

sdot

[[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]]

]

(24)

Journal of Sensors 7

45 Modeling of Process and Measurement Noises In orderto complete the design of the KF it is necessary to definethe noise covariance matrices the process noise covariancematrix 119876 and the measurement noise covariance matrix 119877Thesematrices reflect the confidence in the systemmodel andthe measurements respectivelyThe covariance of119908

119896is often

called the process noise matrix 119876119896 and can be computed as

119876119896= 119864 [119908

119896sdot 119908119879

119896

] (25)

The 119876119896matrix is a 7-dimension square matrix which can be

computed using as follows [23 24]

119876119896= int

119905119896+1

119905119896

Φ119905119896+1120591

sdot 119866 (120591) sdot 119876 (120591) sdot 119866119879

(120591)Φ119879

119905119896+1120591119889120591 (26)

The measurement noise covariance matrix 119877 is alsoknown as the covariance matrix for V The 119877

119896matrix repre-

sents the level of confidence placed in the accuracy of themeasurements and is given by

119877119896= 119864 [V

119896sdot V119879119896

] (27)

The 119877119896matrix is a 4-dimension diagonal square matrix

The diagonal elements are the variances of the individualmeasurements which can be determined experimentallyusing measurement data from the used sensors

46 Filter State Initialization The state vector should beinitialized at the beginning of the process For the gyroscopebias states all biases are initialized as zeros The quaternionstates can be initialized from theDCMmatrix using the Eulerangles The mean of the accelerometer calibrated data duringa stationary period can be used to estimate the initial roll andpitch using the following relationships [25]

120601119900

= tanminus1(minus119891119910

radic119891

2

119909

+ 119891

2

119911

)

120579119900= tanminus1(

radic119891

2

119909

+ 119891

2

119910

minus119891119911

)

(28)

where 119891 is the mean of the accelerometer data During thesame interval the roll and pitch estimates are used for levelingthe magnetometer data to be in the navigation frame Thecalibrated magnetometer data is used to estimate the initialazimuth as

120595119900= tanminus1 (

119867119910

119867119909

) (29)

The DCM is calculated using the initial Euler angles valuesas in (3)Then the following relation between the quaternion

and the DCM [22] is used to calculate the initial quaternionvector

119902 =

[[[[[[[[[[[[

[

cos120601

2

cos 120579

2

cos120595

2

+ sin120601

2

sin 120579

2

sin120595

2

sin120601

2

cos 120579

2

cos120595

2

minus cos120601

2

sin 120579

2

sin120595

2

cos120601

2

sin 120579

2

cos120595

2

+ sin120601

2

cos 120579

2

sin120595

2

cos120601

2

cos 120579

2

sin120595

2

minus sin120601

2

sin 120579

2

cos120595

2

]]]]]]]]]]]]

]

(30)

The initial quaternion vector 119902119900 is calculated using the initial

Euler angles values (120601119900 120579119900 120595119900) Equation (30) is also used to

get the updated quaternion parameters

5 Results and Discussion

In this section the performance of the proposed attitudealgorithm is assessed The device is held in the textingmode All tests start with around 30 seconds of stationaryperiod to calibrate for the gyroscope while themagnetometeris calibrated by moving the device in the 3D space Thefirst scenario is conducted to assess the performance of theproposed technique in the indoor environments while thesecond scenario is performed in the downtown area

51 Environment Change Test In this scenario the test isstarted outside the building close to the Olympic Oval atthe University of Calgary The PDR solution is initializedusing initial position from GPS and initial heading fromthe magnetometer The device is held in stationary at thebeginning of the test for about 40 s to calibrate for thegyroscope deterministic bias and to estimate the initialorientation roll and pitch of the deviceThe device is held inthe compass texting mode and the user keeps going throughthe first floor with a long corridor inside the building Thetrajectory is ended outside the McEwan Student Center infront of Taylor Family Digital Library (TDFL) The time forthis trajectory was about 55 minutes taken in 594 steps witha total travelled distance of 461m Various reasons made thisplace a candidate for the test

(i) It is a popular and attractive place for studentsrsquoactivities

(ii) It has a long corridor which is a challenging area formagnetometer

(iii) At the starting point in front of the building there isa huge metal structure which can affect the magne-tometer performance

(iv) This place is full of students and simulates the normalwalking scenario of a smartphone user

The derived heading form the magnetometer is totallyaffected at the beginning due to the presence of a huge metalobject in the surrounding area as shown in Figure 6 Thetotal magnetic field is distorted yielding incorrect headingestimation from magnetometer during the first 40 seconds

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

6 Journal of Sensors

R(t)

1205902

03671205902

minus120591 = minus1

120573120591 =

1

120573

t

(a) Gauss Markov parameters

minus1000 minus800 minus600 minus400 minus200 0 200 400 600 800 1000minus2

0

2

4

6

8

10times10minus9

120591(s)

R(120591)

X gyroscope autocorrelation fit-Gauss Markov process

AutocorrelationGauss Markov

(b) Autocorrelation fit for the 119909 gyroscope

Figure 5 Gauss-Markov model representation

The Taylor series expansion to first order is shown in thefollowing

120575 119903 =120597 119903

120597119903

120575119903 (17)

where 119903 is the state vector 120575119903 is the error in the stateThus thequaternion parameters error can be obtained as

[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

]]]]

]

=1

2

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

(18)

A general equation for the 1st order Gauss-Markov model isgiven as

= minus120573119887 + radic21205731205902

119908 (119905) (19)

where 120573 is the reciprocal of the correlation time and 1205902 is

the variance of the gyroscope signalThe different parametersof the Gauss-Markov model can be determined as shown inFigure 5

According to (19) the gyroscopes bias can be modeled as

120596

=[[

[

120596119909

120596119910

120596119911

]]

]

= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

[[

[

119887120596119909

119887120596119910

119887120596119911

]]

]

+

[[[[[

[

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]

]

119908

(20)

The complete state model can be written as the following

[[[[[[[[[[[[

[

120575 1199021

120575 1199022

120575 1199023

120575 1199024

120596119909

120596119910

120596119911

]]]]]]]]]]]]

]

= [

119865120596

04times3

03times4

119865119887

] sdot

[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]

]

+

[[[[[[[[[[[[

[

0

0

0

0

radic21205731199091205902

119909

radic21205731199101205902

119910

radic21205731199111205902

119911

]]]]]]]]]]]]

]

sdot 119908 (21)

where

119865120596=

[[[

[

0 minus120596119909

minus120596119910

minus120596119911

120596119909

0 120596119911

minus120596119910

120596119910

minus120596119911

0 120596119909

120596119911

120596119910

minus120596119909

0

]]]

]

119865119887= [

[

minus120573119909

0 0

0 minus120573119910

0

0 0 minus120573119911

]

]

(22)

Using the dynamic matrix in (21) the state transition matrixcan be defined as

Φ119896+1119896

= 119890(119865sdotΔ119905)

= 119868 + 119865 sdot Δ119905 +(119865 sdot Δ119905)

2

2

(23)

44MeasurementModels Themagnetometermeasurementsalong with the accelerometer data are used as main source ofupdate The measured magnetic field is tested for perturba-tion Once the magnetic field is free of disturbances the geo-magnetic heading is estimated from the calibrated data Alsothe accelerometer measurements are experienced to be noisyas low cost MEMS sensors are used and usually measured athigher rate Therefore the average of the measured data overthe step time is used to estimate the roll and pitch valuesThe roll pitch and heading estimates are used to calculatethe quaternion parameters

The only source of update is the quaternion parametersThus the design matrix can be set as

120575119911 =

[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

]]]]

]

=

[[[

[

1 0 0 0 0 0 0

0 1 0 0 0 0 0

0 0 1 0 0 0 0

0 0 0 1 0 0 0

]]]

]

sdot

[[[[[[[[[[[[

[

1205751199021

1205751199022

1205751199023

1205751199024

119887120596119909

119887120596119910

119887120596119911

]]]]]]]]]]]]

]

(24)

Journal of Sensors 7

45 Modeling of Process and Measurement Noises In orderto complete the design of the KF it is necessary to definethe noise covariance matrices the process noise covariancematrix 119876 and the measurement noise covariance matrix 119877Thesematrices reflect the confidence in the systemmodel andthe measurements respectivelyThe covariance of119908

119896is often

called the process noise matrix 119876119896 and can be computed as

119876119896= 119864 [119908

119896sdot 119908119879

119896

] (25)

The 119876119896matrix is a 7-dimension square matrix which can be

computed using as follows [23 24]

119876119896= int

119905119896+1

119905119896

Φ119905119896+1120591

sdot 119866 (120591) sdot 119876 (120591) sdot 119866119879

(120591)Φ119879

119905119896+1120591119889120591 (26)

The measurement noise covariance matrix 119877 is alsoknown as the covariance matrix for V The 119877

119896matrix repre-

sents the level of confidence placed in the accuracy of themeasurements and is given by

119877119896= 119864 [V

119896sdot V119879119896

] (27)

The 119877119896matrix is a 4-dimension diagonal square matrix

The diagonal elements are the variances of the individualmeasurements which can be determined experimentallyusing measurement data from the used sensors

46 Filter State Initialization The state vector should beinitialized at the beginning of the process For the gyroscopebias states all biases are initialized as zeros The quaternionstates can be initialized from theDCMmatrix using the Eulerangles The mean of the accelerometer calibrated data duringa stationary period can be used to estimate the initial roll andpitch using the following relationships [25]

120601119900

= tanminus1(minus119891119910

radic119891

2

119909

+ 119891

2

119911

)

120579119900= tanminus1(

radic119891

2

119909

+ 119891

2

119910

minus119891119911

)

(28)

where 119891 is the mean of the accelerometer data During thesame interval the roll and pitch estimates are used for levelingthe magnetometer data to be in the navigation frame Thecalibrated magnetometer data is used to estimate the initialazimuth as

120595119900= tanminus1 (

119867119910

119867119909

) (29)

The DCM is calculated using the initial Euler angles valuesas in (3)Then the following relation between the quaternion

and the DCM [22] is used to calculate the initial quaternionvector

119902 =

[[[[[[[[[[[[

[

cos120601

2

cos 120579

2

cos120595

2

+ sin120601

2

sin 120579

2

sin120595

2

sin120601

2

cos 120579

2

cos120595

2

minus cos120601

2

sin 120579

2

sin120595

2

cos120601

2

sin 120579

2

cos120595

2

+ sin120601

2

cos 120579

2

sin120595

2

cos120601

2

cos 120579

2

sin120595

2

minus sin120601

2

sin 120579

2

cos120595

2

]]]]]]]]]]]]

]

(30)

The initial quaternion vector 119902119900 is calculated using the initial

Euler angles values (120601119900 120579119900 120595119900) Equation (30) is also used to

get the updated quaternion parameters

5 Results and Discussion

In this section the performance of the proposed attitudealgorithm is assessed The device is held in the textingmode All tests start with around 30 seconds of stationaryperiod to calibrate for the gyroscope while themagnetometeris calibrated by moving the device in the 3D space Thefirst scenario is conducted to assess the performance of theproposed technique in the indoor environments while thesecond scenario is performed in the downtown area

51 Environment Change Test In this scenario the test isstarted outside the building close to the Olympic Oval atthe University of Calgary The PDR solution is initializedusing initial position from GPS and initial heading fromthe magnetometer The device is held in stationary at thebeginning of the test for about 40 s to calibrate for thegyroscope deterministic bias and to estimate the initialorientation roll and pitch of the deviceThe device is held inthe compass texting mode and the user keeps going throughthe first floor with a long corridor inside the building Thetrajectory is ended outside the McEwan Student Center infront of Taylor Family Digital Library (TDFL) The time forthis trajectory was about 55 minutes taken in 594 steps witha total travelled distance of 461m Various reasons made thisplace a candidate for the test

(i) It is a popular and attractive place for studentsrsquoactivities

(ii) It has a long corridor which is a challenging area formagnetometer

(iii) At the starting point in front of the building there isa huge metal structure which can affect the magne-tometer performance

(iv) This place is full of students and simulates the normalwalking scenario of a smartphone user

The derived heading form the magnetometer is totallyaffected at the beginning due to the presence of a huge metalobject in the surrounding area as shown in Figure 6 Thetotal magnetic field is distorted yielding incorrect headingestimation from magnetometer during the first 40 seconds

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

Journal of Sensors 7

45 Modeling of Process and Measurement Noises In orderto complete the design of the KF it is necessary to definethe noise covariance matrices the process noise covariancematrix 119876 and the measurement noise covariance matrix 119877Thesematrices reflect the confidence in the systemmodel andthe measurements respectivelyThe covariance of119908

119896is often

called the process noise matrix 119876119896 and can be computed as

119876119896= 119864 [119908

119896sdot 119908119879

119896

] (25)

The 119876119896matrix is a 7-dimension square matrix which can be

computed using as follows [23 24]

119876119896= int

119905119896+1

119905119896

Φ119905119896+1120591

sdot 119866 (120591) sdot 119876 (120591) sdot 119866119879

(120591)Φ119879

119905119896+1120591119889120591 (26)

The measurement noise covariance matrix 119877 is alsoknown as the covariance matrix for V The 119877

119896matrix repre-

sents the level of confidence placed in the accuracy of themeasurements and is given by

119877119896= 119864 [V

119896sdot V119879119896

] (27)

The 119877119896matrix is a 4-dimension diagonal square matrix

The diagonal elements are the variances of the individualmeasurements which can be determined experimentallyusing measurement data from the used sensors

46 Filter State Initialization The state vector should beinitialized at the beginning of the process For the gyroscopebias states all biases are initialized as zeros The quaternionstates can be initialized from theDCMmatrix using the Eulerangles The mean of the accelerometer calibrated data duringa stationary period can be used to estimate the initial roll andpitch using the following relationships [25]

120601119900

= tanminus1(minus119891119910

radic119891

2

119909

+ 119891

2

119911

)

120579119900= tanminus1(

radic119891

2

119909

+ 119891

2

119910

minus119891119911

)

(28)

where 119891 is the mean of the accelerometer data During thesame interval the roll and pitch estimates are used for levelingthe magnetometer data to be in the navigation frame Thecalibrated magnetometer data is used to estimate the initialazimuth as

120595119900= tanminus1 (

119867119910

119867119909

) (29)

The DCM is calculated using the initial Euler angles valuesas in (3)Then the following relation between the quaternion

and the DCM [22] is used to calculate the initial quaternionvector

119902 =

[[[[[[[[[[[[

[

cos120601

2

cos 120579

2

cos120595

2

+ sin120601

2

sin 120579

2

sin120595

2

sin120601

2

cos 120579

2

cos120595

2

minus cos120601

2

sin 120579

2

sin120595

2

cos120601

2

sin 120579

2

cos120595

2

+ sin120601

2

cos 120579

2

sin120595

2

cos120601

2

cos 120579

2

sin120595

2

minus sin120601

2

sin 120579

2

cos120595

2

]]]]]]]]]]]]

]

(30)

The initial quaternion vector 119902119900 is calculated using the initial

Euler angles values (120601119900 120579119900 120595119900) Equation (30) is also used to

get the updated quaternion parameters

5 Results and Discussion

In this section the performance of the proposed attitudealgorithm is assessed The device is held in the textingmode All tests start with around 30 seconds of stationaryperiod to calibrate for the gyroscope while themagnetometeris calibrated by moving the device in the 3D space Thefirst scenario is conducted to assess the performance of theproposed technique in the indoor environments while thesecond scenario is performed in the downtown area

51 Environment Change Test In this scenario the test isstarted outside the building close to the Olympic Oval atthe University of Calgary The PDR solution is initializedusing initial position from GPS and initial heading fromthe magnetometer The device is held in stationary at thebeginning of the test for about 40 s to calibrate for thegyroscope deterministic bias and to estimate the initialorientation roll and pitch of the deviceThe device is held inthe compass texting mode and the user keeps going throughthe first floor with a long corridor inside the building Thetrajectory is ended outside the McEwan Student Center infront of Taylor Family Digital Library (TDFL) The time forthis trajectory was about 55 minutes taken in 594 steps witha total travelled distance of 461m Various reasons made thisplace a candidate for the test

(i) It is a popular and attractive place for studentsrsquoactivities

(ii) It has a long corridor which is a challenging area formagnetometer

(iii) At the starting point in front of the building there isa huge metal structure which can affect the magne-tometer performance

(iv) This place is full of students and simulates the normalwalking scenario of a smartphone user

The derived heading form the magnetometer is totallyaffected at the beginning due to the presence of a huge metalobject in the surrounding area as shown in Figure 6 Thetotal magnetic field is distorted yielding incorrect headingestimation from magnetometer during the first 40 seconds

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

8 Journal of Sensors

(a) Area at the starting point

0 50 100 150 200 250 300 3500

50

100

150

200

250

300

350

400

Time (s)

Hea

ding

(deg

)

Heading estimation

Mag headingFilter heading

(b) Heading estimate

Figure 6 Heading estimation and the effect of the surroundingenvironment

In addition the calibration process is performed based ondata taken outside the building and so once the user ismoved to be inside the building the distribution of themagnetic field is different from that outside as shown inFigure 6 Thus magnetometer-based heading is still notaccurate However after around 2 minutes the heading fromthe magnetometer starts to be the main source of updatefor the attitude filter As a result during the perturbationinterval the attitude filter does not perform the update stageand keeps propagating the attitude of the device based on thegyroscopesrsquo measurements

The magnified part in Figure 7 shows the magnetometerheading during a perturbation areaThe figure shows that theheading is diverted and scattered when the magnetic field isdistorted in contrast to the attitude filter heading during thesame interval

To evaluate the overall accuracy of the PDR algorithma reference trajectory plotted on the map of the test site isused A reference trajectory for the actual direction of thetest is plotted on the map of the first floor of the Universityof Calgary As shown in Figure 8 the maximum error is less

minus1141355

minus114135

minus1141345

minus114134

minus1141335

minus114133

minus1141325

minus114132

minus1141315

minus114131

minus1141305

510765

51077

510775

51078

510785

51079

510795

5108

FilterMag

Latit

ude (

deg)

Tracks

Longitude (deg)

Figure 7 Magnetometer heading direction during perturbationarea

Figure 8 PDR trajectory compared to a reference trajectory

than 5m during the test Also the trajectory is finished at thecorrect point with position drift of less than 4mThe error inthe distance is about 11 of the total traveled distance

52 Downtown Test Downtown is an attractive place fortourists in addition tomost people in the city It has themajorattractive sites such as shopping centers administrationoffices museums restaurants cafes and theaters So it isimportant to have a good navigation system which is able tohelp the pedestrians to their destinations Some conventionaltechniques such as GPS suffer from the multipath and signaldestruction due to the high buildingsThe test is conducted indowntownCalgary to assess the performance of the proposedalgorithm in the harsh environmentsThe performance of themagnetometer is totally affected due to the distortion of themagnetic field in the downtown areaThehigh buildings carsand traffic signals add more complications for the headingestimation based on the magnetometer The test is startedat the intersection of the 7th street SW and the 8th avenueSW downtown Calgary as shown in Figure 9 The selectedtrajectory is a square starting in the east direction followed bynorth west and south directionsThe length of the trajectoryis 490m taking about 6 minutes of walking

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

Journal of Sensors 9

Figure 9 Test starting point

150

200

250

300

350

00

50

50

100

100

150 200 250 300 350

400

Time (s)

Heading estimation

Hea

ding

(deg

)

Mag headingFilter heading

Figure 10 Heading estimation

Although the magnetometer gets good maneuvering atthe start of the test the presence of a strong perturbationsource affected the heading estimate As shown in Figure 10the estimated heading from magnetometer is totally unusedformajor part of the test due to the distortion in themagneticfield It shows that the heading update is available only for twominutes during the interval of 140 s to 260 s

Figure 11 shows the PDR solution using the attitude filtercompared to the same solution based on the heading from themagnetometer stand-alone gyroscope heading stand-aloneandGPS solution As shown in the figure there is no accuratestand-alone solution for the test trajectory

(i) The gyroscope stand-alone solution gives the accuratedirection with position drift due to the uncompen-sated bias

(ii) The magnetometer stand-alone solution is divertedat many parts of the test however in certain parts itperforms well and provides the correct heading

Figure 11 PDR trajectory compared to a reference trajectory

(iii) The GPS is considered the poorest solution as it doesnot provide any correct information at all during thetest due to the satellites unavailability

However the PDR algorithm based on the attitude filterin corporation with the magnetometer anomaly detectiontechnique provides an acceptable solution

The overall accuracy of the PDR algorithm is evaluated bycomparing the PDR solution with a reference trajectory onGoogle map As shown in Figure 11 the maximum error inposition happens at the north direction side of the trajectorywhere no update is available yet and it was around 10m Alsothe trajectory is finished at the correct place with positiondrift of less than 4m The overall error in distance is about1 of the total traveled distance

6 Conclusion

An enhanced attitude estimation technique based on twodifferent attitude sensors is presentedThe algorithm is basedon the quaternion mechanization to estimate the deviceattitude The filter is working as a complementary techniquethe Earthrsquos magnetic field and the angle rate are integratedto estimate the device heading The filter is propagated inthe prediction mode using the gyroscope measurementswhile the magnetometer and accelerometer measurementsare used for the update stageThe improvement in the attitudeestimation leads to an improved PDR result The PDR-based estimated trajectory results are compared to referencetrajectories to show the accuracy of the proposed techniqueThe results show that the presented algorithm is able toprovide the necessary navigation information accurately evenin the harsh environments

Acknowledgments

This work was supported in part by research funds fromTECTERRA Commercialization and Research Centre theCanada Research Chairs Program and the Natural Scienceand Engineering Research Council of Canada (NSERC)

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

10 Journal of Sensors

References

[1] S Y Cho K W Lee C G Park and J G Lee ldquoA personalnavigation system using low-cost MEMSGPSFluxgaterdquo inProceedings of the 59th AnnualMeeting of the Institute of Naviga-tion and CIGTF 22nd Guidance Test Symposium AlbuquerqueNM USA 2003

[2] C Aparicio Implementation of a Quaternion-Based KalmanFilter for Human Body Motion Tracking Using MARG SensorsCalifornia Naval Postgraduate School Monterey Calif USA2004

[3] X Yun and E R Bachmann ldquoDesign implementation andexperimental results of a quaternion-based Kalman filter forhuman body motion trackingrdquo IEEE Transactions on Roboticsvol 22 no 6 pp 1216ndash1227 2006

[4] Honeywell ldquoDRM4000DeadReckoningModulerdquo 2009 httpwww51honeywellcomaerocommondocumentsmyaero-spacecatalog-documentsMissiles-MunitionsDRM4000pdf

[5] J L Marins X Yun E R Bachmann R B McGhee and MJ Zyda ldquoAn extended Kalman filter for quaternion-based ori-entation estimation using MARG sensorsrdquo in Proceedings ofIEEERSJ International Conference on Intelligent Robots andSystems vol 4 pp 2003ndash2011 November 2001

[6] S Han and J Wang ldquoA novel method to integrate IMU andmagnetometers in attitude and heading reference systemsrdquoJournal of Navigation vol 64 no 4 pp 727ndash738 2011

[7] S Emura and S Tachi ldquoCompensation of time lag betweenactual and virtual spaces by multi-sensor integrationrdquo in Pro-ceedings of IEEE International Conference onMultisensor Fusionand Integration for Intelligent Systems (MFI rsquo94) pp 463ndash469October 1994

[8] J M Cooke M J Zyda D R Pratt and R B McGheeldquoNPSNET flight simulation dynamic modeling using quater-nionsrdquo Presence vol 1 pp 404ndash420 1992

[9] E Foxlin ldquoInertial head-tracker sensor fusion by a comple-mentary separate-bias Kalman filterrdquo in Proceedings of the IEEEVirtual Reality Annual International Symposium pp 185ndash194April 1996

[10] P Setoodeh A Khayatian and E Farjah ldquoAttitude estimationby separate-bias Kalman filter-based data fusionrdquo Journal ofNavigation vol 57 no 2 pp 261ndash273 2004

[11] S-W Liu Z-N Zhang and J C Hung ldquoHigh accuracy mag-netic heading system composed of fluxgate magnetometers andamicrocomputerrdquo inProceedings of the IEEENational Aerospaceand Electronics Conference (NAECON rsquo89) pp 148ndash152 May1989

[12] B Hoff and R Azuma ldquoAutocalibration of an electronic com-pass in an outdoor augmented reality systemrdquo in Proceedings ofIEEE and ACM International Symposium on Augmented Realitypp 159ndash164 Munich Germany October 2000

[13] D Gebre-Egziabher G H Elkaim J D Powell and B WParkinson ldquoA non-linear two step estimation algorithm for cal-ibrating solid-state Strapdown magnetometersrdquo in Proceedingsof the 8th International St Petersburg Conference on NavigationSystems IEEEAIAA St Petersburg Russia 2001

[14] C L Tsai Motion-based differential carrier phase positioningheading determination and its applications [PhD dissertation]National Taiwan University of Science and Technology 2006

[15] S Kwanmuang L Ojeda and J Borenstein ldquoMagnetometer-enhanced personal locator for tunnels andGPS-denied outdoor

environmentsrdquo in Sensors and Command Control Communi-cations and Intelligence (C3I) Technologies for Homeland Secu-rity and Homeland Defense X Proceedings of SPIE OrlandoFla USA April 2011

[16] L Xue W Yuan H Chang and C Jiang ldquoMEMS-based multi-sensor integrated attitude estimation technology for MAVapplicationsrdquo in Proceedings of the 4th IEEE International Con-ference on NanoMicro Engineered and Molecular Systems(NEMS rsquo09) pp 1031ndash1035 January 2009

[17] W F Storms and J F Raquet ldquoMagnetic field aided vehicletrackingrdquo in Proceedings of the 22nd International TechnicalMeeting of the Satellite Division of the Institute of Navigation(ION GNSS rsquo09) pp 1767ndash1774 September 2009

[18] E R Bachmann X Yun and C W Peterson ldquoAn investigationof the effects of magnetic variations on inertialmagnetic orien-tation sensorsrdquo in Proceedings of IEEE International Conferenceon Robotics and Automation (ICRA rsquo04) pp 1115ndash1122 May2004

[19] N El-Sheimy Inertial Techniques and INSDGPS IntegrationLecture Notes ENGO 623 Department of Geomatics Engineer-ing the University of Calgary Calgary Canada 2012

[20] A S Ali S Siddharth Z Syed C L Goodall and N El-SheimyldquoAn efficient and robustmaneuveringmode to calibrate low costmagnetometer for improved heading estimation for pedestriannavigationrdquo Journal of Applied Geodesy vol 7 no 1 pp 65ndash732013

[21] C C Finlay S Maus C D Beggan et al ldquoInternational geo-magnetic reference field the eleventh generationrdquo GeophysicalJournal International vol 183 no 3 pp 1216ndash1230 2010

[22] J B Kuipers Quaternions and Rotation Sequences PrincetonUniversity Press Princeton NJ USA 1999

[23] R G Brown and P Y Hwang Introduction to Random Signalsand Applied Kalman Filtering Wiley New York NY USA 1992

[24] A Gelb Applied Optimal Estimation MIT Press 1974[25] H J Luinge and P H Veltink ldquoMeasuring orientation of human

body segments using miniature gyroscopes and accelerome-tersrdquoMedical and Biological Engineering andComputing vol 43no 2 pp 273ndash282 2005

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

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