Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

This article has been accepted for inclusion in a future issue of this journal.

Content is final as presented, with the exception of pagination.

IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS 1

Accurate Attitude Estimation of a Moving Land


Vehicle Using Low-Cost MEMS IMU Sensors
Hamad Ahmed, Member, IEEE, and Muhammad Tahir, Member, IEEE

Abstract— This paper presents a novel Kalman filter for the control [2], lane keeping [3], assisted parking [4]), vehi-
accurate determination of a vehicle’s attitude (pitch and roll cle stability systems (yaw stability control [5], roll stability
angles) using a low-cost MEMS inertial measurement unit (IMU) control [6], suspension control [7]) and vehicle safety sys-
sensor, comprising a tri-axial gyroscope and a tri-axial accelerom-
eter. Currently, vehicles deploy expensive gyroscopes for atti- tems (crash avoidance by active steering [8], roll over
tude determination. A low-cost MEMS gyro cannot be used mitigation [9]). The foremost requirement for all these systems
because of the drift problem. Typically, an accelerometer is used is an accurate knowledge of the vehicular states at all times.
to correct this drift by measuring the attitude from gravita- These vehicular states include vehicle attitude, vehicle speeds
tional acceleration. This is, however, not possible in vehicular and vehicle accelerations (longitudinal, lateral and vertical).
applications, because accelerometer measurements are corrupted
by external accelerations produced due to vehicle movements. Due to the highly critical nature and low latency requirement
In this paper, we show that vehicle kinematics allow the removal of a driving related system, high precision sensors are required
of external accelerations from the lateral and vertical axis to obtain a very accurate estimate of these states. The cost of
accelerometer measurements, thus giving the correct estimate of these sensors serves as an inhibitive factor towards using them
lateral and vertical axis gravitational accelerations. An estimate in vehicles covering a wide range of prices. Subsequently,
of the longitudinal axis gravitational acceleration can then be
obtained by using the vector norm property of gravitational these assistance and safety systems have seen deployment in
acceleration. A Kalman filter is designed, which implements the only expensive sophisticated vehicles uptill now and remain
proposed solution and uses the accelerometer in conjunction unreachable to the general masses.
with the gyroscope to accurately determine the attitude of a In recent years, much research effort has been directed
vehicle. Hence, this paper enables the use of extremely low-cost towards developing affordable sensors for automotive
MEMS IMU for accurate attitude determination in vehicular
domain for the first time. The proposed filter was tested by both applications [10]–[12]. When designing a sensor for driving
simulations and experiments under various dynamic conditions applications, two requirements have to be met. First, the sensor
and results were compared with five existing methods from should give continuous measurements under all circumstances.
the literature. The proposed filter was able to maintain sub- The Global Positioning System (GPS) is not a viable option
degree estimation accuracy even under very severe and prolonged due to this requirement, as it suffers from signal outage in
dynamic conditions. To signify the importance of the achieved
accuracy in determining accurate attitude, we investigated its use urban areas, parking lots and tunnels etc [13], [14]. Secondly,
in two vehicular applications: vehicle yaw estimate and vehicle the sensor must show robust performance under all vehicle
location estimate by dead reckoning and showed the performance maneuvers regardless of their severity or duration.
improvements obtained by the proposed filter. Consequently, low cost Inertial Navigation Systems (INS) are
Index Terms— Vehicle attitude, attitude estimation, external not viable because their estimation error grows under severe
acceleration, MEMS IMU, Kalman filter. and prolonged maneuvers [15].
Automotive grade gyroscopes are the simplest and most
I. I NTRODUCTION accurate sensors for determining the attitude of a vehicle.
A tri-axial gyroscope measures angular velocities along all

V EHICLE population around the globe crossed the


1.2 billion mark in 2014 and this number is expected
to grow only incrementally in the years to come. Owing to
three axis which are integrated w.r.t. time to obtain the attitude
angles. The integration process also accumulates any noise or
bias, if present in the sensor measurements and the estimate
the escalated use of vehicles on the roads, several advances can drift away with time. Hence a near perfect measurement
have been made in vehicular technology to assist the drivers requirement is imposed on the gyroscope. Automotive gyro-
and make driving an effortless, comfortable and a safe task [1]. scopes use ring-laser or fiber-optic technology and deliver the
These systems include driver assistance systems (active cruise level of accuracy necessary for driving applications. However
Manuscript received March 22, 2016; revised July 22, 2016 and as mentioned before, their cost is strictly prohibitive and
September 28, 2016; accepted October 28, 2016. The Associate Editor for sometimes, comparable to the price of the vehicle itself.
this paper was A. Hegyi. The advent of MEMS (Micro-Electro-Mechanical Systems)
The authors are with the Department of Electrical Engineering,
Syed Babar Ali School of Science and Engineering, Lahore University technology has shrunk both the size and cost of inertial
of Management Sciences, Lahore 54792, Pakistan (e-mail: sensors [16]. Now miniature gyroscopes and accelerometers
hamad.ahmed@lums.edu.pk; tahir@lums.edu.pk). are available at a very low cost but their performance is too
Color versions of one or more of the figures in this paper are available
online at http://ieeexplore.ieee.org. much degraded to be used in vehicular applications. While an
Digital Object Identifier 10.1109/TITS.2016.2627536 automotive grade gyroscope typically gives drift performance
1524-9050 © 2016 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

2 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

TABLE I
C OMPARISON OF THE S PECIFICATIONS AND P RICES OF VARIOUS G YROSCOPES .1

of 1°/hour, a MEMS gyroscope has a typical performance In this paper, we use the kinematic model of a vehicle
of 70°/hour [17]. Moreover this bias is subject to variations to estimate and subtract the external accelerations from the
due to temperature as well [18]. Though work is being done accelerometer measurements and fuse them with the gyro-
to improve the quality of MEMS gyroscopes and make them scope measurements to accurately determine the vehicle atti-
robust to vibrations and other noise sources for automotive tude. Specifically, we observe that the external accelerations
applications [19], the drift issue still remains unmitigated. along the lateral and vertical axis of a vehicle are either
A comparison of the performance characteristics and prices centripetal accelerations about the respective axes, which
of automotive grade and MEMS gyroscopes is presented in can be calculated, or small linear acceleration components
Table I. The trend of performance deterioration resulting from which can be accurately estimated using a first order process
the decrease in cost is easily noticeable. Even a nominal auto- model. Subtracting these external accelerations give the correct
motive grade gyroscope costs approximately 10, 000 USD. gravitational acceleration measurements along the lateral and
The goal of this paper is to enable the cheapest gyroscope vertical axes. The same cannot be done for the longitudinal
(price in the range of 10 USD) to function accurately in axis because significant external accelerations are present in it
vehicular applications. when the vehicle is accelerating/braking which can neither be
A typical MEMS gyroscope suffers from the drift problem calculated nor accurately estimated through a model. However,
and cannot provide an attitude estimate alone. A MEMS since we have the lateral and vertical gravitational acceleration
accelerometer is usually packaged with this gyroscope to form components, we can determine the longitudinal component by
an Inertial Measurement unit (IMU). A tri-axial accelerom- using the fact that magnitude of the vector norm of the three
eter measures the gravitational force of acceleration, and components should equal 9.8m/s 2 . Thus we get an attitude
its orientation can be determined by the modulation of the estimate by determining all three gravitational accelerations
gravity vector about its axes [20] but these measurements and fuse it with the gyroscope estimate. Accurately determin-
are very noisy even under very stable conditions [21]. Thus ing the attitude also enables us to accurately determine the
both of these sensors are fused using either complementary linear accelerations of a vehicle which is useful for several
filters [22] or Kalman filters [23], [24] to overcome their applications requiring velocity or position of the car. This
individual shortcomings and obtain an overall accurate attitude method discards the longitudinal accelerometer measurement
estimate. This fusion works very well for static or quasi-static during attitude estimation hence it is immune to the duration
state because the accelerometer readings are dominated by or severity of the external accelerations caused by vehicle
the gravitational acceleration but in dynamical conditions, the movement. Enabling the MEMS accelerometer to provide
accelerometer measures the linear or external acceleration as a correct attitude estimate allows the use of a very low
well, rendering its measurements unusable for attitude deter- quality MEMS gyroscope as fusion of both of these sensors
mination. A compensation of this external acceleration has will eventually overcome their individual shortcomings, as
to be somehow done to extract the gravitational acceleration discussed before and will provide better estimation accuracy.
measurement and determine the attitude. Only then it can The proposed solution is implemented and tested on the cheap-
be fused with the gyroscope estimate. Another implication est MEMS IMU to confirm its performance in demanding
of this problem is the inability of using an accelerometer vehicular applications. The results are also compared with
to measure vehicular accelerations because it measures the existing methods in the literature to highlight the significant
gravitational accelerations as well. If the attitude is accu- performance improvement obtained by the proposed solution.
rately known then these gravitational forces can be canceled The rest of the paper is organized as follows: Section II
out to determine only the linear acceleration of the reviews the literature with respect to the attitude estimation
vehicle. problem. Section III presents the formulation of the proposed
filter. Section IV details the testing of the filter through
1 Pricing as of January 2016. simulations as well as comparison with previous techniques.
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 3

Two applications are also presented where a significant perfor- An accelerometer is a good choice for complementing
mance improvement is achieved by using the proposed attitude the gyroscope however if the vehicle is accelerating then
estimation method. Section V shows filter results over real the accelerometer also measures the external accelerations
driving data. Finally, the work is concluded in Section VI. in addition to the gravitational acceleration. A compensation
is required to remove this external acceleration from the
II. R ELATED W ORK measurements for correct attitude estimation.
We provide below, a very brief review of the literature
addressing three aspects: different attitude representations C. Dealing With External Acceleration
used, different attitude estimation methods used and different Four popular types of approaches exist in the literature for
methods used to deal with external acceleration problem. dealing with the problem of external acceleration: threshold
based switching techniques, adaptive estimation techniques,
A. Attitude Representation model based estimation of external acceleration and direct
Three main approaches are used for attitude representation estimation of external acceleration.
while constructing a Kalman filter algorithm in the litera- In threshold based switching approaches, a threshold is
ture. First is the Euler Angle representation in which the defined for the accelerometer measurements, i.e. if their norm
pitch (θ ), roll (φ) and yaw (ψ) angles are directly used as state is close to 9.8m/s 2 then the accelerometer is termed as
variables [25]. It is the simplest approach however it makes static otherwise it is said to be in dynamic conditions. Under
the Kalman Filter non-linear by introducing trigonometric dynamic conditions, the estimation of attitude is provided
functions into its measurement model. The second is the using only gyroscope. As soon as the accelerometer is static,
Direction Cosine Matrix (DCM) representation in which those its measurement is again used as a reference to correct the
elements of the DCM that are involved in pitch and roll gyroscope drift [26], [27], [31], [39]. Instead of using a hard
calculation are used as state variables [26]–[29]. This approach threshold, a fuzzy logic based system to detect the dynamic
allows the construction of a linear Kalman Filter but suffers conditions has also been proposed [40]. All these threshold
from singularity under certain values of pitch and roll. The based systems are only able to maintain the estimation accu-
third is the quaternion approach which represents orientations racy for a short amount of time during dynamic conditions
in four dimensions [30]–[32]. It allows a linear Kalman Filter since the gyroscope starts to drift if not corrected for a certain
and does not suffer from singularity however the dimensions duration. Also, the threshold based state (static or dynamic
of the system are increased to four. condition) determination induces error in the estimation since
noise and faulty conditions can lead to the incorrect detection
B. Attitude Estimation Methods of the state.
Several sensors including camera [33], LIDAR [34] and Instead of using a threshold, an adaptive method which esti-
GPS [35] have been used to estimate the attitude of both static mates the amount of external acceleration from the residual of
or accelerated vehicles however these are costly and involve the Kalman Filter and correspondingly decreases the weights
expensive computational algorithms. of the accelerometer corrections to decrease their effect on the
Perhaps the simplest method for attitude determination is attitude estimate, has also been proposed [32]. This method
by using only a gyroscope, but as discussed before, it requires alleviates the problem of incorrect state estimation but the
gyroscopes of extremely high accuracy. The conventional attitude estimate in this method is again dependent on the
INS theory [36] is also based on this technique assuming very gyroscope only and tends to drift if the dynamic condition
accurate sensors. Modern aircrafts still use it with very accu- lasts for a prolonged duration.
rate mechanical gyros that give sub-degree drift performance In model based estimation approach, the external accel-
per hour. Their electrical counter-parts have also been created eration is modeled as a first order low pass process and
using ring-laser and fiber-optic technologies. These gyroscopes adaptively estimated from the filter [28], [41]. This approach
are very expensive and not cost effective to be used in a mass is seemingly more accurate then the threshold or adaptive
production vehicle. estimation approach but due to a naive model of the external
Now a days, low-quality gyros fabricated using MEMS acceleration, it loses its accuracy under severe and prolonged
technology are available however they exhibit a time varying accelerated conditions. Lee et al. [41] make a comment in the
bias which causes the integral to drift away with time [37]. concluding section of the paper that this technique cannot work
To correct the bias, a periodic reference of the attitude from in a moving land vehicle where the acceleration disturbances
another sensor is needed. Both magnetometers and accelerom- are lengthy and severe.
eters can be used to complement the gyroscope. In direct external acceleration estimation approach, the
A tri-axial magnetometer measures the Earth’s magnetic external acceleration is somehow determined and subtracted
field acting upon its three axes. Any change in the orientation from the accelerometer. The invention in [42] uses a wheel
of the sensor changes the modulation of this magnetic field speed sensor to estimate the longitudinal acceleration and
vector allowing estimation of the change in orientation [38]. subtract it from the longitudinal accelerometer measurement
However the magnetometers are highly susceptible to mag- while the lateral and vertical accelerations are ignored. This
netic interferences from surrounding magnetic materials and method requires installation of extra wheel speed sensors and
often serve as an inaccurate source of reference for comple- cannot function during conditions that cause lateral or vertical
menting the gyroscope. accelerations. In [43], one pitch estimate is obtained using
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

4 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

only the longitudinal accelerometer measurement and another measurements. These measurements are compensated for
pitch estimate is obtained using only the vertical accelerom- centripetal, lateral and vertical accelerations.
eter measurement. Roll measurement is not considered. • In the second step, a measurement for the longitudinal
A reference selector selects the either one of the two estimates gravity component is formed by using the updated lateral
based on which one has lesser external acceleration. This and vertical components of the state vector from the first
method is not applicable for low quality sensors because pitch step and the second measurement update is applied using
estimate from vertical acceleration estimate suffers from large this measurement.
errors due to measurement noise. Oh and Choi [44], [45]
first estimate the longitudinal velocity from wheel speed A. Sensor Models
sensors and lateral velocity from bicycle model & a model
for tire cornering stiffness, then use it in a kinematic model The system uses three sensors: tri-axial accelerometer, tri-
to determine the longitudinal and vertical velocities. They axial gyroscope and the vehicle speed obtained from the
differentiate these velocities w.r.t. time to obtain the respective CAN (Controller Area Network) bus which is provided on
external accelerations. Though the results presented in the all commercially available vehicles. The measurements from
paper are accurate but this approach has several shortcomings. these sensors at time instant t can be expressed in the vehicle
To compute longitudinal velocity, individual wheel speeds are coordinate frame as:
required. To compute lateral velocity, the slip angle is required
yG t = ω t + n G (1a)
and cornering stiffness has been estimated by a linear model
whereas it is highly non-linear during severe maneuvers. This y At = gt + at + n A (1b)
estimation error in lateral velocity propagates into other veloc- yv t = v t + n v (1c)
ity estimates, deteriorating the overall estimation performance.  T
where yG t is a vector G xt G yt G zt containing the actual
III. M ETHODOLOGY gyroscope measurements about the x, y and z-axis of the
vehicle coordinate frame. These  measurements
T are a sum of
As discussed before, the complication in using a low cost the true angular rates ωt = ωxt ω yt ωzt about each axis
IMU for attitude estimation of a vehicle lies in the fact that and zero mean white Gaussian noise in each axis contained in
T
gyroscope suffers from the drift problem and no aiding sensor the vector nG . In (1b), y At is a vector A xt A yt A zt which
is available to correct the drift because accelerometer measure- contains the actual accelerometer measurements about the x, y
ments are corrupted by external accelerations. Only if these  T
and z-axis. These are a sum of the vector gt = gxt g yt gzt
accelerations could somehow be removed then the accelerom-  T
eter would be able to aid the gyroscope in determining the containing the gravitational accelerations, at = axt a yt azt
correct attitude. Though external accelerations along lateral containing the external accelerations and white Gaussian noise
and vertical axes are removable due to specific kinematics vector n A . Similarly in (1c), yv t is the speed reading from the
of a moving vehicle, accelerations along longitudinal axis CAN bus of the vehicle, v t is the actual vehicle speed and
remain a problem and cannot be determined and removed. n v is the measurement noise.
We noted that by at least obtaining the correct gravitational
acceleration along the lateral and vertical axes, the longitudinal B. State Vector
gravitational acceleration can be determined by virtue of the
While choosing an attitude representation for the Kalman
vector norm property of gravitational acceleration i.e. the mag-
Filter, we noted that during the typical motion of land vehicle,
nitude of norm of the three components should equal 9.8m/s 2 .
pitch or roll angles are never 90° and the singularity condition
Determining all three gravitational accelerations enables the
does not occur. Hence the Direction Cosine Matrix approach
accelerometer to be fused with the gyroscope providing the
for formulating the state vector is the most suitable since it
correct attitude of the vehicle.
allows a linear Kalman filter and the dimensions are only three.
The proposed filter is motivated by this discussion however
Let us denote the pitch, roll and heading of a vehicle by θ ,
we make a slight improvement to increase the accuracy.
φ and ψ respectively. The relationship between the Earth and
An accelerometer is a noisy sensor and trying
 to determine the
Vehicle coordinate frames E X and V X can be expressed as
longitudinal acceleration by Along = 9.82 − Alat 2 − A2
vert
where A denotes the accelerometer measurement, would be E
X = R.V X (2)
even more noisy because it will be influenced by the noise of
both lateral and vertical axis measurements. In order to deal where R is the rotation matrix to rotate any vector in the
with this issue, we formulate a Kalman filter to implement vehicle coordinate frame (V X) into the Earth coordinate
the complete fusion process by considering the state vector frame ( E X). This rotation matrix is given by
as a 3 dimensional vector representing the orientation of the ⎡ ⎤
cψcθ cψsθ sφ − sψcφ cψsθ cφ + sψsφ
vehicle w.r.t. the Earth coordinate frame. The filter first updates R = ⎣sψcθ sψsθ sφ + cψcφ sψsθ cφ − cψsφ ⎦ (3)
the state estimate using gyroscope as the process model and −sθ cθ sφ cθ cφ
then performs the measurement update in two steps.
• In the first step, only the lateral and vertical components where c and s denote the cos and si n operations. We observe
of the state vector are updated from the accelerometer that the last row of the rotation matrix does not contain the
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 5

yaw angle and we can calculate pitch and roll angles using we obtain our state transition matrix and a model for process
noise
R32
φ = atan
R33 t −1 = I3 + t ỹG t−1 (11a)
−R31 wt −1 = t x̃t −1 nG (11b)
θ = atan
R32 /si nφ Though the process noise wt −1 appears to be state-dependent
where Ri j denotes the (i, j )t h
element of R. Using any in (11b), it does not violate any underlying assumption of the
of the other two rows for computing pitch and roll will Kalman filter (see [47]). The process noise covariance Qt −1
require computing the yaw angle as well, which requires a is given by
magnetometer sensor and is beyond the scope of this paper. Qt −1 = E[wt −1 wtT−1 ] (12)
We define our state vector at time t as
⎡ ⎤ Substituting (11b) into (12) and using x̃tT−1 = −x̃t −1 we get
R31
xt = ⎣ R32 ⎦ (4) Qt −1 = −t 2 x̃t −1  G x̃t −1 (13)
R33
Here   G is the
 covariance matrix of gyroscope’s noise given
Also note that in Eq (1b), the gravitational acceleration by E nG nTG which is set equal to σG2 I3 by assuming that
vector gt at any time t as measured in the vehicle coordinate variance of gyroscope noise σG2 is same along all three axes.
frame is given by Note that our Kalman filter uses sensor measurements in both
the process model (11a) and measurement model (to follow),
gt = gxt (5) this type of formulation is common in sensor fusion [31], [41].
where g is the gravitational acceleration constant 9.81m/s 2 .
D. Measurement Model
C. Process Model The purpose of the measurement update is to mitigate the
The general equation for the process model is given by error propagated in the state estimate by the process model.
Since we will apply the measurement update in two steps, the
xt = t −1 xt −1 + wt −1 (6) general equations of these measurement models are given by

where t −1 is the state transition matrix and wt −1 is the zt,1 = H1 xt + ϒ t,1 (14a)
process noise with covariance matrix Qt −1 . The expressions z t,2 = H2 xt + ϒ t,2 (14b)
for t −1 and Qt −1 are derived below.
To determine the state vector xt from xt −1 , we use the fact where zt,1 and z t,2 are the measurement vectors, H1 and H2
that the rotation matrix at time t, Rt , can be computed from are the observation matrices and ϒ t,1 and ϒ t,1 are the mea-
Rt −1 using the integral of the vector differential equation [46]: surement noise with covariance matrices Mt,1 and Mt,2 for
updates 1 and 2 respectively.
Rt = Rt −1 (I 3 + t ω̃t −1 ) (7) We will use the accelerometer measurements y At for the
measurement updates which were defined in (1b) as a sum of
where t is the sampling time interval, ωt −1 contains the ideal the gravitational gt and external acceleration at components.
angular rates of rotation of the body and ∼ is a cross product If at were zero, y At would only consist of gt and could
operator on a 3 × 1 vector p such that [46]: be directly used for measurement update, however external
⎡ ⎤ accelerations are always present when the vehicle is moving
0 − p3 p2
p̃ = ⎣ p3 0 − p1⎦ (8) and need to be subtracted from y At before using it for the
− p2 p1 0 measurement update.
To determine these external accelerations, we resolve them
Since we are only interested in the 3rd row of Rt which is into their constituent components using the kinematic model
our state vector, so instead of using (7) we can directly use of a car. If the directions of velocities and angular rates are
taken as in Fig. 1, the external accelerations are given by [48]
xt = (I 3 + t ω̃ t −1 )xt −1 . (9)
axt = v̇ xt − ωzt .v yt + ωxt .v zt (15a)
As the ideal angular rates ωt −1 are not known in practice and a yt = v̇ yt + ωzt .v xt − ω yt .v zt (15b)
are measured by the gyroscope, we substitute (1a) into (9) and
azt = v̇ zt − ωxt .v xt + ω yt .v yt (15c)
use the identity 
p − q = p̃ − q̃ to get
Note that the term ‘kinematic model’ does not refer to a
xt = (I 3 + t ỹG t−1 − t ñG )xt −1 dynamical model for the car which can be used for state tran-
= (I 3 + t ỹG t−1 )xt −1 − t ñG xt −1 sition, rather it just resolves the accelerations into constituent
= (I 3 + t ỹG t−1 )xt −1 + t x̃t −1 nG (10) components. In (15a), v̇ xt cannot be estimated by the available
sensors and is too significant to ignore. Though v t read from
where the last equation is obtained by using identity CAN bus in (1c) can be used as the longitudinal velocity v xt
ãb = −b̃a. Comparing (10) with the process model in (6), of the vehicle but it cannot be differentiated to obtain v̇ xt
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

6 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

where αt is an external acceleration component at time t,


ca is a dimensionless constant which determines the cut-off
frequency and t is the error in this model. Modeling v̇ yt and
v̇ zt by α yt and αzt according to (16), we obtain
α yt = ca1 .α yt−1 + yt (17a)
αzt = ca2 .αzt−1 + zt (17b)
For simplicity, we take ca1 = ca2 = ca . Substituting these
in (15a) & (15b) and ignoring the negligible products ω yt .v zt
& ω yt .v yt , we obtain

Fig. 1. Directions of linear and angular velocities. a yt = ca .α yt−1 + ωzt .v xt + yt (18a)


azt = ca .αzt−1 − ωxt .v xt + zt (18b)
1) Measurement Update 1: Substituting gyroscope and
CAN bus measurements from (1a) and (1c) into (18a)
and (18b), we obtain
a yt = ca .α yt−1 + (G zt − n G z ).(yv t − n v ) + yt (19a)
azt = ca .αzt−1 − (G xt − n G x ).(yv t − n v ) + zt (19b)
which can be re-arranged in matrix form as
at,1 = ca .α t −1 + yG t,1 .v t + nG,1 .nv,1 +  t (20)
 T  T
where at,1 = a yt azt , α t −1 = α yt−1 αzt−1 ,
 T  T  T
yG t,1 = G zt −G xt , nG,1 = n G z n G x , nv,1 = n v n v
 T
and  t = yt z t . Note that here we are ignoring the
cross-product terms for simplicity because eventually their
contribution to the measurement noise will be negligible. For
the first update, we discard the x-axis accelerometer reading
Fig. 2. Comparison of actual vehicle speed and speed coming from
a CAN bus. and apply the update from y- and z-axes readings. Hence the
accelerometer measurement for this update can be arranged in
because the speed given by the CAN bus is a very low rate the vector form as
approximation of the actual speed as demonstrated in Fig. 2  T
y At,1 = A yt A zt (21)
which shows the actual (coming from GPS sensor) and the
CAN bus recorded speed of a vehicle during a test drive, From (20), (21) and (1b), we obtain
thus its differentiation will yield an incorrect estimate of v̇ xt .
So we have to discard the x-axis accelerometer measurements y At,1 = Hm gxt + ca .α t −1 + yG t,1 .v t + nG,1 .nv,1 +  t + n A,1
because we cannot determine the external acceleration axt (22)
and subtract from it. We can however, determine a yt and azt
from (15b) and (15c) and subtract from y and z-axes where Hm is a matrix which maps three dimensional state
accelerometer readings to form the measurement vector zt,1 vector to two dimensional measurement vector y At,1 and n A,1
which will update the state vector xt in the first measurement is a vector
 containing
T last two entries of n A in (1b) i.e.
update. n A,1 = n A y n Az . Now, we can write
It is important to note that the most significant quantities
y At,1 − ca .α t −1 − yG t,1 .v t = Hm gxt + nG,1 .nv,1 +  t + n A,1
in (15b) and (15c) are the longitudinal velocity v xt , and the
yaw rate ωzt which is observed when the vehicle is being (23)
turned. The velocities v yt and v zt should ideally be zero, Comparing with the measurement model in (14a) we get
however when the tires are being steered, a small lateral
velocity component v yt is experienced due to the tire cornering zt,1 = y At,1 − ca .α t −1 − yG t,1 .v t (24a)
stiffness. Likewise, when the car hits a bump on the road, a 010
small vertical velocity component v zt is observed. Since these H1 = g Hm = g (24b)
001
components are small and short lived, we can model their
ϒ t,1 =  t + nG,1 .nv,1 + n A,1 (24c)
derivatives i.e. v̇ yt and v̇ zt using the following first order low
pass process: The measurement noise covariance Mt,1 is
αt = ca .αt −1 + t (16) Mt,1 = E[ϒ t,1 ϒ t,1
T
] (25)
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 7

Under the assumption that  t , nG,1 nv,1 and n A,1 are uncorre-
lated, we can write Mt,1 as
Mt,1 =  αt +  G V +  A (26)
Here,  G V is the measurement noise from the velocity and
gyroscope product terms which is set equal to σv2 σg2 I 2 .  A is
the accelerometer noise which is set equal to σ A2 I 2 assuming
that the accelerometer variance is the same along both y and
z axes.  αt is the contribution to the measurement noise by
 
the model based estimation of α t which is given by E  t  tT .
Since it cannot be determined analytically, it is approximated
by  αt = 2−1 ca2 ||α t −1 ||2 as suggested in [41].
2) Measurement Update 2: In measurement update 1, we
used the y and z-axes accelerometer readings to obtain the
corrected estimates of xt (2) and xt (3) where xt (i ) indicates
the i -th element of the state vector xt in (4). We note
from (3) that the state vector has the property
xt (1)2 + xt (2)2 + xt (3)2 = 1. Thus given the fact that
we have obtained correct estimates of xt (2) and xt (3), we
can use the above property to calculate 1 − xt (2)2 − xt (3)2
which is an estimate of the xt (1) and can be used as a
measurement for correcting the state vector in next step.
We denote this measurement by yxt .
yxt = 1 − xt (2)2 − xt (3)2 + δt (27)
where δt is the noise in this measurement.
yxt = xt (1) + δt (28)
Comparing with Eq (14b), we obtain
z t,2 = yxt (29a)
 
H2 = 1 0 0 (29b)
ϒt,2 = δt (29c)
 T Fig. 3. Proposed filter’s structure.
The measurement noise covariance Mt,2 is given by E δt δt
and can be tuned to give acceptable performance. Note that
(27) is non-linear, but the actual system is still linear (29b)
4) Compute Kalman gain for the first measurement update
and does not require any special treatment such as EKF etc.
Kt,1 = P− T − T
t H1 (H1 Pt H1 + Mt,1 )
−1
(33)
E. Filter Procedure
5) Apply the first measurement update
The Kalman filter algorithm using the above models is
described below and the procedure is summarized in Fig. 3. x+ − −
t = xt + Kt,1 (zt,1 − H1 xt ) (34)
The − superscript denotes the a priori estimate, + superscript
denotes the a posteriori estimate after first measurement 6) Compute the error covariance matrix after first update
update and ++ denotes the a posteriori estimate after the P+ −
t = (I − Kt,1 H1 )Pt (35)
second measurement update. Pt is the error covariance matrix
and Kt,1 & Kt,2 are the Kalman gains for the first and second 7) Form the second measurement
measurement updates respectively at time t. (a) 
z t,2 = 1 − xt (2)+ − xt (3)+
2 2
1) Compute the a priori state estimate (36)
x−
t = t −1 x++
t −1 (30) 8) Compute Kalman gain for the second measurement
update
2) Compute the a priori error covariance matrix
P− ++ T Kt,2 = P+ T + T
t H2 (H2 Pt H2 + Mt,2 )
−1
(37)
t = t −1 Pt −1 t −1 + Qt −1 (31)
3) Form the first measurement 9) Apply the second measurement update

zt,1 = y At,1 − v t .yG t,1 − ca .α t −1 (32) x++


t = x+ +
t + Kt,2 (z t,2 − H2 xt ) (38)
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

8 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

10) Compute the a posteriori error covariance matrix 2) Method 2 [23]:


The measurement model uses the accelerometer without
P++
t = (I − Kt,2 H2 )P+
t (39)
considering or dealing with external accelerations.
We can calculate the roll and pitch angles from the a posteriori
zt = y A t , Mt = σ A3 I3 (45)
state estimate
x++
t (1) −x++
t (1)
3) Method 3 [27]:
φt = atan θt = atan (40) The filter uses only gyroscope for attitude estimation
x++
t (2)
++
xt (2)/si nφt
while the device is experiencing dynamic conditions.
The external accelerations at can be calculated using the A threshold for detecting the dynamic conditions is used.
accelerometer measurements and a-posteriori state estimate
zt = y A t (46a)
at = y A − gx++ (41) ⎧
t ⎨σ A3 I3 , i f | ||y A || − g| ≤ A ∀τ ∈ [t − nt, t]
τ
These external accelerations are a sum of the centripetal Mt = (46b)
⎩∞ Other wi se
accelerations and linear acceleration components. We can
separate the linear acceleration components for use in step (c) where A is the threshold by which the norm of the
of the next iteration by accelerometer outputs must exceed 9.8m/s 2 and n is
α t = at − v t .yG (t, 1) (42) the number of consecutive times this should happen to
trigger the dynamic condition.
4) Method 4 [32]:
IV. S IMULATIONS
The measurement noise covariance is adaptively
To verify the proposed algorithm’s performance, it was increased in dynamic conditions instead of switching it
first tested on simulated sensor data generated in MATLAB to infinity.
Simulink. The purpose of these simulations was to test the
algorithm’s performance under a host of dynamic conditions zt = y A t , Mt = σ A3 I3 +  acc (47)
and verifying its performance under all possible driving sce- where
narios. Also, to establish that the filter is able to maintain
its performance with very low quality sensors as well, the  acc = 3−1 ||rt ||2 I3 , with rt = zt − Hx−
t (48)
simulated sensor’s quality was varied to see the performance
5) Method 5 [41]:
deterioration vs sensor quality.
The external acceleration is modeled as a first-order low-
A. Simulation Environment pass filtered white noise process (Eq. 49) and estimated
adaptively from the filter.
IMU sensors were set up to provide data at 100√Hz sampling
√ set to 0.2 mg/ H z for the
rate. The noise variances were at = ca at −1 (49)
accelerometer and 0.03 d ps/ H z for the gyroscope to match zt = y At − ca at −1 , Mt = σ A3 I3 +  acc (50)
the MEMS IMU from ST Microelectronics. Mt,2 was tuned
to 0.0001. Accelerations were deliberately added to each of the where
accelerometer axes to simulate different driving conditions.  acc = 3−1 ca2 ||at −1 ||2 I3 (51)
B. Various Reference Methods and at is obtained from the a-posteriori state estimate by
We compared our results with five methods present in at = y At − gx+
t (52)
the literature. All these methods were implemented using
the same process model as given in Eqs. (6), (11a) & (13).
The difference being in the use of the accelerometer measure- C. Various Test Conditions
ments. All these filters used a one step measurement update as: In order to test and compare the accuracy of the proposed
method, seven different tests w.r.t. the magnitude and duration
Kt = P− T − T
t H (HPt H + Mt )
−1
of external accelerations were performed. In real scenarios,
+ − −
xt = xt + Kt (zt − Hxk ) the lateral axis of the vehicle experiences accelerations
P+
t = (I − Kt H)Pt
− only for short durations, when the vehicle is making turns.
Hence tests with accelerations of different magnitude but
at = y A,t − gx+
t
short duration in the lateral direction were performed. The
(a) longitudinal axis observes prolonged accelerations hence tests
1) Method 1: with both magnitude and duration of longitudinal acceleration
The attitude is estimated using only the gyroscope and were performed. The details of each test is given below and
accelerometer is not used for correction. This can be the average and maximum magnitude of accelerations are
achieved by setting the measurement noise covariance shown in Table II. T1:
to infinity. 1) Vehicle is static (No External Accelerations)
2) Vehicle is in steady state (No Longitudinal Acceleration)
zt = y A t , Mt = ∞I3 (44) and makes a soft turn (Minor Lateral Acceleration)
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 9

TABLE II degree performance threshold. The proposed method subtracts


A CCELERATIONS A DDED D URING T ESTS the centripetal acceleration from the accelerometer hence it
remains unaffected by the disturbance as expected.
3) Test T3: In T3, considerable lateral accelerations are
added to simulate hard or aggressive turning. Method 2’s
estimation is severely deteriorated as expected however
Method 3’s estimation is better as compared to the previous
test. This can be attributed to the fact that hard accelerations
triggered the dynamic condition flag which shifted the esti-
mation to gyroscope only. Method 4 and 5’s accuracies are
also poor indicating that they are not able to maintain their
performance under severe dynamical conditions. One thing
evident from Method 5’s results is that it takes more time
3) Vehicle is in steady state and makes a hard turn (Severe to return to the reference value after the dynamic condition
Lateral Acceleration) has ended as compared to the other methods. The proposed
4) Vehicle is softly accelerating/braking (Minor Longitudi- method remains unaffected by the severe disturbances because
nal Acceleration). they are being removed from the accelerometer measurements.
5) Vehicle is aggressively accelerating/braking (Severe 4) Test T4: In test T4, minor longitudinal accelerations
Longitudinal Acceleration) are added to simulate a vehicle softly accelerating/braking.
6) Vehicle is continuously accelerating/braking (Prolonged Method 2 gives erroneous estimates and Method 3 again
Longitudinal Accelerations) could not enter the dynamic mode for the whole test due
7) Vehicle is accelerating/braking, turning and hitting to the small magnitude of added accelerations. Method 4
bumps (Accelerations in all three axes) showed lesser error than Method 3 however Method 5 was
The most challenging scenario is the last one in which able to maintain sub degree accuracy for these magnitudes
all three disturbances are present with severe magnitude. and duration of acceleration. The proposed method performed
Its purpose is to test the limitations of the proposed method. exceedingly well showing that the measurement formed by
the accelerometer norm property is sufficient for attitude
D. Estimation Results estimation.
Simulation results for one run are shown in Fig. 4 in 5) Test T5: In test T5, major longitudinal accelerations
the form of estimated pitch and roll angles. Table III and are applied for hard acceleration/braking. All the algorithms
Table IV provide the root mean square (RMS) error in attitude give deteriorated performance. Method 3 is able to detect
estimation and external acceleration estimation respectively. the dynamic condition but erroneous mode switching induces
Note that the desired performance threshold here is set equal to large errors. Method 5 which was able to maintain sub-degree
1 degree. Method 1 uses only gyroscope for estimation hence accuracy during the previous test, could not do so here thus
its estimate is independent of any accelerations that might establishing its limitation to handling external accelerations of
be exerted upon the vehicle. This is evident from Fig 4(b) large magnitudes. However the proposed algorithm remained
where we can see the roll and pitch estimate drifting away unaffected by these accelerations because it does not use the
with time but not showing any effect of external acceleration. x-axis accelerometer measurements at all in the filter.
Methods 2-5 and the proposed method use the accelerometer 6) Test T6: Test T6 tests the algorithms for a long duration
measurements hence their performance will be affected by the of acceleration. This algorithm further exposes the shortcom-
external accelerations. Method 3 also identifies the state of the ings of Methods 4 and 5 whose errors are observed to be
vehicle as either static or dynamic, which is shown in Fig. 4 increasing continuously with time. Method 3 again suffers
as the ‘dynamic flag’ where positive value indicates dynamic from incorrect switching of the dynamical mode, further high-
and negative indicates static state of the vehicle. lighting the state detection issue inherent to this approach. The
1) Test T1: During T1, no external accelerations are present proposed method being immune to all x-axis accelerations,
and all the algorithms give sub-degree estimation accuracy. maintain sub-degree estimation accuracy.
2) Test T2: Small lateral accelerations are added in this 7) Test T7: In test T7, accelerations of different magnitudes
test to simulate soft turning. Since these accelerations are and durations are applied in all three axes. The purpose of this
added along y-axis, the roll angle estimate is expected to test was to study the limit of each method. Only the proposed
get corrupted. Methods 2 and 3 show the worst performance, filter was able to maintain its performance even for those
giving an error of the order of 5 degrees. Method 3 relies instants when all three axes contained external accelerations.
on a threshold for dynamic condition detection, which is not Remaining algorithms gave incomparable results. Method 5’s
being detected for such minor acceleration. Method 4 does estimation again monotonically drifts away with time.
not depend upon the threshold and adaptively tunes itself in
the presence of acceleration, hence its accuracy is better as E. External Acceleration Estimation
compared to Method 3. Method 5 shows better performance A bi-product of attitude estimation is the external acceler-
than the rest because the external accelerations are of small ation estimation because removing gravitational acceleration
magnitude for little duration but its estimate still goes over one from the accelerometer measurements leaves us with the
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

10 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

Fig. 4. Estimation results of tests T1-T7. Thick dashed line indicates start and thin indicates end of test. (a) Accelerations used to corrupt sensor data
(b) Method 1 (c) Method 2 (d) Method 3 (e) Method 4 (f) Method 5 (g) Proposed method.

external accelerations. Fig. 5 shows the external accelerations centripetal accelerations along the respective axes observed
along all three axes measured by the proposed filter versus the by the vehicle during its motion and linear acceleration com-
reference accelerations. These accelerations are a sum of both ponents. Not only longitudinal and lateral accelerations have
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 11

TABLE III
RMS ATTITUDE E STIMATION E RROR IN DEGREES FOR T ESTS T1-T7

TABLE IV
RMS A CCELERATION E STIMATION E RROR IN m/s 2

lengthy or severe accelerations. The proposed filter effectively


calculates the centripetal accelerations acting along the lateral
and vertical axis and estimates the linear accelerations by a
first order process, thus properly removing them from the
accelerometer measurements instead of switching to gyro
based estimation. The virtues of this technique are evident
in Tests T2 and T3 in the previous section when lateral
accelerations cause problems with the other techniques but the
proposed filter is able to maintain accuracy. The longitudinal
axis measurements are completely discarded which alleviates
the problem of having to deal with longitudinal accelerations.
The benefits are evident from Tests T4-T7 where neither the
duration nor the severity of accelerations has any effect on the
proposed filter. Hence the proposed method is most suitable
for automotive applications due to its ability to function in
Fig. 5. External accelerations estimated by the proposed filter for the acceleration conditions.
total length of simulation. (a) x-axis external acceleration. (b) y-axis external There is a slight similarity between Method 5 and the
acceleration. (c) z-axis external acceleration. proposed method. Method 5 uses the same first order process
model to deal with external accelerations as done in the
been estimated but the vertical accelerations have also been proposed filter. However this modeling process only works
estimated accurately. The acceleration estimate is compared for accelerations of short durations and mild magnitudes.
with the estimation results from other techniques in Table IV. Method 5 applies this modeling on all three axes for all
The proposed filter shows the best estimation accuracy as accelerations due to which it fails, whereas the proposed
compared to the other methods. This accurate acceleration method only applies it only to the small linear acceler-
estimation can help in determining the speed or position of ation components in only the lateral and vertical axes,
the vehicle as will be shown in next section. which are incurred only under specific conditions and not
the centripetal acceleration components which are of larger
F. Discussion magnitudes.
1) Immunity Against External Accelerations: The major 2) Validity of Measurement 2: To verify whether the longi-
problem in using accelerometer for attitude estimation in tudinal gravitational acceleration measurement formed by the
vehicular applications was the presence of external accel- proposed method from the vector norm property of gravita-
erations. While other reference methods proposed different tional acceleration is valid or not, it is compared with the
techniques to deal with these accelerations, their effect was actual longitudinal gravitational acceleration in Fig. 6. It can
limited and the estimation errors grew under conditions of be seen that it is approximately the same as the true value
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

12 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

Fig. 6. Measurement 2 formed by the filter.

Fig. 8. Yaw angle estimate.

G. Significance
To signify the importance of the proposed work, we show
the performance improvements delivered by the proposed
method in two important vehicular applications as compared
to existing methods.
1) Yaw Angle Estimation Accuracy: The yaw angle of a
vehicle is typically measured using a magnetometer which
is a tri-axial device that measures the magnetic forces acting
upon its axes. The Earth exerts a magnetic force towards the
North pole hence the yaw angle can be calculated from the
Fig. 7. Estimation performance as a function of sensor quality. Dashed line
shows the performance threshold of 1 degree.
modulation of this force on the magnetometer axes.
If the magnetometer measurements are given by
yM = m + nM (53)
after the filter has converged. This confirms the validity of the
proposed idea and the integrity of measurement 2. we can calculate the yaw angle ψ using
3) Robustness to Sensor Quality: The main objective of y M,y
this work is to determine the attitude of a vehicle using low ψ = atan (54)
y M,x
cost sensors. To test how much low can the senor quality go
before the proposed method’s estimation starts to deteriorate, However due to a change in the pitch or roll angle of
we simulated sensors of varying quality by increasing their the vehicle, the orientation of this magnetic field vector on
noise power and studied their effect on all estimation methods. the magnetometer axes changes. For instance a car traveling
Only a small amount of external acceleration was added for a straight on a road undergoing a change in its pitch will
short duration such that all the methods were able to maintain also give a change in its yaw angle. To avoid this, the
sub degree accuracy when the sensor quality was good. Then magnetometer’s orientation needs to be compensated w.r.t the
the sensor noise was gradually increased to test the endurance vehicle’s pitch and roll angles using [49]
of each method. Fig. 7 shows the results in which the 1 degree y M,z .si nφ − y M,y .cosφ
performance threshold has been marked and the RMS error of ψ = atan
y M,x .cosθ + y M,y .si nθ.si nφ + y M,z .si nθ.cosφ
each technique has been plotted against the gyroscope noise (55)
power. It can be seen that all methods give sub-degree accuracy
when the sensor quality is good but the error starts to increase Accurate estimation of the pitch and roll angles are necessary
as soon as the quality is decreased. in order to obtain an accurate yaw angle from a magnetometer.
Increasing gyroscope noise power not only corrupts nor- Any error in the attitude will automatically induce an error in
mal attitude estimate but also causes problem with the way the yaw estimate. We estimated the yaw angle obtained by
each technique deals with external acceleration. The proposed performing pitch and roll compensation using the proposed
method can be seen to be performing much better than all filter and compared it with Methods 1 and 5. The results are
the other techniques. The reason being that external accelera- shown in Fig. 8. We calculated MSE of yaw angle using the
tions are handled most effectively and thus decreasing sensor pitch and roll estimated from five reference methods and the
quality has little effect on it. This verifies that the proposed proposed methods. The results are shown in Table V.
method enables the use of low cost MEMS IMU in vehicular It is quite evident that the proposed method gives
applications for the first time. ten-folds better performance in yaw estimate than the
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 13

TABLE V
RMS E RROR OF YAW E STIMATE

TABLE VI
E RROR OF L OCATION BY D EAD R ECKONING

Fig. 9. Comparison of divergence of location error estimates by dead


reckoning.

previous techniques. This is only because of accurate attitude


angles are available to completely compensate the magnetome-
ter orientation.
2) Dead Reckoning: In dead reckoning, the position of the
vehicle is calculated by advancing an initially known position
in time using the estimated speed and pose of the vehicle.
Because the speed is estimated by integration of the noisy
accelerometer measurements and drifts away after some time,
such systems are able to maintain accuracy over only very
small periods of time and are mostly used to augment GPS sys-
tems to maintain localization during GPS signal outages. The
proposed filter is able to completely separate the gravitational
and linear acceleration components from the accelerometer Fig. 10. Experimental testbed. (a) Instrumented vehicle. (b) MEMS IMU in
the boot. (c) Reference GPS assisted IMU on roof.
measurements hence it gives the most accurate estimate of the
vehicle’s acceleration which is integrated to obtain the speed,
A. Experimental Setup
and we have already shown that the heading estimate obtained
through the proposed method is also the most accurate. Dead MEMS IMU from STMicroelectronics consisting of a
reckoning is performed using the following equations. tri-axial accelerometer (LSM303DHLC) and tri-axial gyro-
scope (L3GD20) were used for experiments. They were
ẋ cos(ψ)
= .v (56) mounted in the boot of a test vehicle (Fig. 10a, 10b) on
ẏ si n(ψ) a rubber damper platform to decrease the vibrational and
Therefore the dead reckoning system formed using the pro- noise effects. Data was logged at 150 Hz and processed offline.
posed method is able to maintain location accuracy for a In order to obtain the actual pitch and roll measurements
much longer time as compared to other techniques. To test for comparison, a high accuracy GPS assisted IMU from
this aspect, we set an error threshold of 1 meter and observed Advanced Navigation Technologies was used which has a
the divergence of location error estimates of all methods. The maximum attitude error of 0.1° even under high dynamic
results are depicted in Fig. 9. The proposed method is able to conditions. The GPS assisted IMU was mounted on the roof
keep an accurate estimate up to 500m while the other methods of the vehicle as shown in Fig. 10c. The algorithm was
hardly crossed 50m. The RMS location error after driving implemented by using the same noise variance values as
800 meters is presented in Table VI. mentioned in Section IV-A.

V. E XPERIMENTS B. Experiment A
The performance improvement obtained using the proposed For the first experiment, the car was driven over a straight
method has been experimentally verified by collecting data road containing a speed breaker. Thus this test involved
from an instrumented vehicle during some test drives. In this changes in pitch while the sensor experienced longitudinal
section, we present the results obtained from experiments. accelerations. The speed breaker introduces a sine-wave like
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

14 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

Fig. 11. Estimation results of experiment A. (a) Pitch estimate. (b) Roll estimate. (c) x-axis acceleration estimate. (d) Yaw estimate.

this drive are shown in Figs. 11a-11b. The pitch estimate from
Method 1 is unaffected by external accelerations however it
drifts away with time. Methods 2-5 are affected by external
accelerations. The proposed method is immune to both exter-
nal accelerations and drift problems. For the roll estimate,
since the vehicle was driven over a straight road and no lateral
external accelerations were experienced, none of the methods
suffer from external acceleration problem. However, since the
vehicle is moving, reference methods rely more on gyroscope
measurements and hence suffer from the drift problem. The
proposed method is still accurate and provides the correct roll
estimate. Fig. 11c shows the estimation of longitudinal/x-axis
Fig. 12. Fly-over test track for Experiment B. acceleration. Owing to the accurate estimation of pitch angle,
the proposed method provides accurate x-axis acceleration
pattern in the pitch response of the vehicle. The vehicle estimation as well whereas the other methods show poor
was accelerating during 0-3s & 15-18s and braking during performance. Yaw estimation accuracy, as discussed before,
19-23s. The results of pitch and roll angle estimates during also depends upon the accuracy of pitch and roll estimation
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 15

Fig. 13. Estimation results for experiment B. (a) Pitch estimate. (b) Roll estimate. (c) x-axis acceleration estimate. (d) Yaw estimate.

which is evident from Fig. 11d, where it has been shown for shown in Figs. 13a-13b. We observe again that Method 1 drifts
that portion where performance difference is significant. whereas Methods 2-5 give poor performance in the presence of
acceleration however the proposed method provides accurate
C. Experiment B estimates.

In the second test, the car was driven over a fly-over to VI. C ONCLUSION
introduce changes in pitch and lane changes were performed The problem of estimating the attitude of a moving vehicle
at the same time to produce simultaneous longitudinal and using only low cost MEMS IMU sensors have been con-
lateral accelerations during changes in pitch. The test track is sidered in this paper. We proposed a novel Kalman filter to
shown in Fig. 12. The results of x-axis acceleration estimate estimate the attitude of the vehicle under dynamic conditions
and yaw angle estimation are also shown in Figs. 13c-13e by applying the measurement updates in two steps. Extensive
indicating the superiority of the proposed method over the simulations and real driving tests were performed to study the
reference methods. The pitch and roll estimation results are performance of the filter under various dynamic conditions.
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

16 IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS

Some reference methods from the literature were considered [20] K. Tuck, “Tilt sensing using linear accelerometers,” Freescale
for performance comparison. The proposed method showed Semicond., Austin, TX, USA, Tech. Rep. AN3107, 2007.
[21] M. Park and Y. Gao, “Error analysis and stochastic modeling of low-cost
enhanced performance under different dynamic conditions MEMS accelerometer,” J. Intell. Robot. Syst., vol. 46, no. 1, pp. 27–41,
in terms of accuracy of both attitude estimation and exter- 2006.
nal acceleration estimation. The robustness of the proposed [22] L. Benziane, A. E. Hadri, A. Seba, A. Benallegue, and
Y. Chitour. (Mar. 2015). “Attitude estimation and control using
method against deteriorating sensor quality was also tested linear-like complementary filters: Theory and experiment.” [Online].
and it was verified that the proposed method maintains good Available: https://arxiv.org/abs/1503.02718
performance even with the lowest quality sensors. In this [23] E. J. Lefferts, F. L. Markley, and M. D. Shuster, “Kalman filtering for
way, the proposed method has enabled the use of very low spacecraft attitude estimation,” J. Guid., Control, Dyn., vol. 5, no. 5,
pp. 417–429, 1982.
cost MEMS IMU sensors for vehicle attitude estimation for [24] H. Ahmed and M. Tahir, “Terrain-based vehicle localization using
challenging automotive applications. low cost MEMS-IMU sensors,” in Proc. IEEE 83rd Veh. Technol.
Conf. (VTC Spring), May 2016, pp. 1–5.
[25] E. Foxlin, “Inertial head-tracker sensor fusion by a complementary
R EFERENCES separate-bias Kalman filter,” in Proc. IEEE Virtual Reality Annu. Int.
Symp., 1996, pp. 185–194.
[1] K. Bengler, K. Dietmayer, B. Farber, M. Maurer, C. Stiller, and [26] H. Rehbinder and X. Hu, “Drift-free attitude estimation for accelerated
H. Winner, “Three decades of driver assistance systems: Review and rigid bodies,” Automatica, vol. 40, no. 4, pp. 653–659, 2004.
future perspectives,” IEEE Intell. Transp. Syst. Mag., vol. 6, no. 4, [27] T. Harada, H. Uchino, T. Mori, and T. Sato, “Portable absolute ori-
pp. 6–22, Apr. 2014. entation estimation device with wireless network under accelerated
[2] A. Vahidi and A. Eskandarian, “Research advances in intelligent colli- situation,” in Proc. IEEE Int. Conf. Robot. Autom. (ICRA), vol. 2.
sion avoidance and adaptive cruise control,” IEEE Trans. Intell. Transp. Jun. 2004, pp. 1412–1417.
Syst., vol. 4, no. 3, pp. 143–153, Sep. 2003. [28] H. J. Luinge and P. H. Veltink, “Measuring orientation of human body
[3] J. McCall and M. M. Trivedi, “Video-based lane estimation and tracking segments using miniature gyroscopes and accelerometers,” Med. Biol.
for driver assistance: Survey, system, and evaluation,” IEEE Trans. Intell. Eng. Comput., vol. 43, no. 2, pp. 273–282, Mar. 2005.
Transp. Syst., vol. 7, no. 1, pp. 20–37, Mar. 2006. [29] J. K. Lee and E. J. Park, “A minimum-order Kalman filter for ambulatory
[4] M. Wada, K. S. Yoon, and H. Hashimoto, “Development of advanced real-time human body orientation tracking,” in Proc. IEEE Int. Conf.
parking assistance system,” IEEE Trans. Ind. Electron., vol. 50, no. 1, Robot. Autom. (ICRA), May 2009, pp. 3565–3570.
pp. 4–17, Feb. 2003. [30] X. Yun, E. R. Bachmann, and R. B. Mcghee, “A simplified quaternion-
[5] C. Zhao, W. Xiang, and P. Richardson, “Vehicle lateral control and yaw based algorithm for orientation estimation from earth gravity and
stability control through differential braking,” in Proc. IEEE Int. Symp. magnetic field measurements,” IEEE Trans. Instrum. Meas., vol. 57,
Ind. Electron., vol. 1. Jun. 2006, pp. 384–389. no. 3, pp. 638–650, Mar. 2008.
[6] R. Rajamani, Vehicle Dynamics and Control. New York, NY, USA: [31] A. M. Sabatini, “Quaternion-based extended Kalman filter for determin-
Springer, 2011. ing orientation by inertial and magnetic sensing,” IEEE Trans. Biomed.
[7] J. Cao, H. Liu, P. Li, and D. J. Brown, “State of the art in vehicle active Eng., vol. 53, no. 7, pp. 1346–1356, Jul. 2006.
suspension adaptive control systems based on intelligent methodologies,” [32] Y. S. Suh, “Orientation estimation using a quaternion-based indirect
IEEE Trans. Intell. Transp. Syst., vol. 9, no. 3, pp. 392–405, Sep. 2008. Kalman filter with adaptive estimation of external acceleration,” IEEE
[8] D. F. Llorca et al., “Autonomous pedestrian collision avoidance using Trans. Instrum. Meas., vol. 59, no. 12, pp. 3296–3305, Dec. 2010.
a fuzzy steering controller,” IEEE Trans. Intell. Transp. Syst., vol. 12, [33] C. Demonceaux, P. Vasseur, and C. Pegard, “Robust attitude estimation
no. 2, pp. 390–401, Jun. 2011. with catadioptric vision,” in Proc. IEEE/RSJ Int. Conf. Intell. Robots
[9] S. Yim, K. Jeon, and K. Yi, “An investigation into vehicle rollover Syst., Oct. 2006, pp. 3448–3453.
prevention by coordinated control of active anti-roll bar and elec- [34] M. Zhao and D. Wang, “A model of target position for UAV based
tronic stability program,” Int. J. Control, Autom. Syst., vol. 10, no. 2, attitude measuring/laser range-finder,” Fire Control Command Control,
pp. 275–287, 2012. vol. 28, no. 5, pp. 14–17, 2003.
[10] J. M. Clanton, D. M. Bevly, and A. S. Hodel, “A low-cost solution for
[35] J. Rath and P. Ward, “Attitude estimation using GPS,” in Proc. Nat.
an integrated multisensor lane departure warning system,” IEEE Trans.
Tech. Meeting Inst. Navigat., vol. 1. 1989, pp. 169–178.
Intell. Transp. Syst., vol. 10, no. 1, pp. 47–59, Mar. 2009.
[36] J. Farrell, Aided Navigation: GPS With High Rate Sensors. New York,
[11] R. Toledo-Moreo and M. A. Zamora-Izquierdo, “IMM-based lane-
NY, USA: McGraw-Hill, 2008.
change prediction in highways with low-cost GPS/INS,” IEEE Trans.
Intell. Transp. Syst., vol. 10, no. 1, pp. 180–185, Mar. 2009. [37] F. Gulmammadov, “Analysis, modeling and compensation of bias drift in
[12] G. H. Elkaim, M. Lizarraga, and L. Pederseny, “Comparison of low- MEMS inertial sensors,” in Proc. IEEE 4th Int. Conf. (RAST), Jun. 2009,
cost GPS/INS sensors for autonomous vehicle applications,” in Proc. pp. 591–596.
IEEE/ION Position Location Navigat. Symp., May 2008, pp. 1133–1144. [38] M. L. Psiaki, F. Martel, and P. K. Pal, “Three-axis attitude determination
[13] L. Wang, P. D. Groves, and M. K. Ziebart, “Multi-constellation GNSS via Kalman filtering of magnetometer data,” J. Guid. Control Dyn.,
performance evaluation for urban canyons using large virtual reality city vol. 13, no. 3, pp. 506–514, 1990.
models,” J. Navigat., vol. 65, no. 3, pp. 459–476, 2012. [39] J. K. Schiffmann, “Vehicle attitude angle estimator and method,”
[14] M. Tahir and K. Mazher, “Singular spectrum based smoothing of U.S. Patent 6 678 631, Jan. 13, 2004.
GNSS pseudorange dynamics,” IEEE Commun. Lett., vol. 20, no. 8, [40] J.-H. Wang and Y. Gao, “Fuzzy logic expert rule-based multisensor data
pp. 1551–1554, Aug. 2016. fusion for land vehicle attitude estimation,” in Proc. 19th Int. CODATA
[15] M. Tanenhaus, D. Carhoun, T. Geis, E. Wan, and A. Holland, “Miniature Conf., 2004, pp. 7–10.
IMU/INS with optimally fused low drift MEMS gyro and accelerometers [41] J. K. Lee, E. J. Park, and S. N. Robinovitch, “Estimation of attitude
for applications in GPS-denied environments,” in Proc. IEEE/ION and external acceleration using inertial sensor measurement during
Position Location Navigat. Symp. (PLANS), Apr. 2012, pp. 259–264. various dynamic conditions,” IEEE Trans. Instrum. Meas., vol. 61, no. 8,
[16] N. Barbour and G. Schmidt, “Inertial sensor technology trends,” IEEE pp. 2262–2273, Aug. 2012.
Sensors J., vol. 1, no. 4, pp. 332–339, Dec. 2001. [42] J. Lu and T. A. Brown, “Attitude sensing system for an automotive
[17] O. J. Woodman, “An introduction to inertial navigation,” Comput. Lab., vehicle relative to the road,” U.S. Patent 6 556 908, Apr. 29, 2003.
Univ. Cambridge, Cambridge, U.K., Tech. Rep. UCAMCL-TR-696, [43] J. S. Puhalla and N. R. Tevs, “Tilt sensor and method for determining
2007, p. 15, vol. 14. the tilt of a vehicle,” U.S. Patent 8 548 722, Oct. 1, 2013.
[18] M. El-Diasty, A. El-Rabbany, and S. Pagiatakis, “Temperature variation [44] J. J. Oh and S. B. Choi, “Vehicle velocity observer design using 6-D
effects on stochastic characteristics for low-cost MEMS-based inertial IMU and multiple-observer approach,” IEEE Trans. Intell. Transp. Syst.,
sensor error,” Meas. Sci. Technol., vol. 18, no. 11, p. 3321, 2007. vol. 13, no. 4, pp. 1865–1879, Dec. 2012.
[19] C. Acar, A. R. Schofield, A. A. Trusov, L. E. Costlow, and A. M. Shkel, [45] J. Oh and S. B. Choi, “Design of a new composite observer for vehicle
“Environmentally robust MEMS vibratory gyroscopes for automotive velocity and attitude estimation,” in Proc. IASTED Int. Conf., Control
applications,” IEEE Sensors J., vol. 9, no. 12, pp. 1895–1906, Dec. 2009. Appl., Vancouver, BC, Canada, 2011.
This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

AHMED AND TAHIR: ACCURATE ATTITUDE ESTIMATION OF A MOVING LAND VEHICLE 17

[46] S. Ayub, A. Bahraminisaab, and B. Honary, “A sensor fusion method for Muhammad Tahir (M’15) received the M.S. and
smart phone orientation estimation,” in Proc. 13th Annu. Post Graduate Ph.D. degrees in electronics and communication
Symp. Converg. Telecommun., Netw. Broadcast., Liverpool, U.K., 2012. engineering from Politecnico di Torino in 2009
[47] Y. Luo, Y. Zhu, D. Luo, J. Zhou, E. Song, and D. Wang, and 2013, respectively. In 2013, he was a Research
“Globally optimal multisensor distributed random parameter matrices Associate with the Navigation Signal Analysis and
Kalman filtering fusion with applications,” Sensors, vol. 8, no. 12, Simulation Group, ISMB. In 2014, he joined the
pp. 8086–8103, 2008. Lahore University of Management Sciences as an
[48] H. Pacejka, Tire and Vehicle Dynamics. Amsterdam, The Netherlands: Assistant Professor with the Electrical Engineering
Elsevier, 2005. Department. His primary research areas of interest
[49] T. Ozyagcilar, “Implementing a tilt-compensated ecompass using include statistical signal processing, estimation and
accelerometer and magnetometer sensors,” Freescale Semicond., Austin, detection theory, and non-linear Bayesian filtering
TX, USA, Tech. Rep. 4248, 2012. with applications to wireless positioning, navigation, and communications.

Hamad Ahmed (M’15) received the B.Sc. degree in


electrical engineering from University of Engineer-
ing and Technology, Lahore, in 2015, with majors
in telecommunication and electronics engineering.
He is a Research Assistant with the Signal Process-
ing and Navigation Algorithms Group, Department
of Electrical Engineering, Lahore University of Man-
agement Sciences, where he is involved with the
development of low-cost alternatives to GPS for
vehicle localization. His research interests lie in
the areas of statistical signal processing, optimal
estimation theory, wireless localization techniques, and machine learning.

You might also like