Quaternion-Based UKF for Accurate Indoor Heading Estimation Using Wearable Multi-Sensor System
1. 1Kyungpook National University
Quaternion-Based Unscented Kalman Filter for
Accurate Indoor Heading Estimation Using
Wearable Multi-Sensor System
Xuebing Yuan , Shuai Yu , Shengzhi Zhang , Guoping Wang and Sheng Liu
SENSORS JOURNAL,
May 7, 2015
2. 2Kyungpook National University
Contents
i. Abstract
ii. Introduction
iii. Wearable Multi-Sensor System
iv. Coordinate System and Heading Estimation
v. Quaternion-Based UKF
vi. Experiments and Result Analysis
vii. Conclusions
3. 3Kyungpook National University
Abstract
ο¬ One of the most important parts of inertial navigation is the heading estimation.
ο¬ Heading estimation using magnetometersο Magnetic disturbancesο Indoor concrete
structures and electronic equipment.
ο¬ Heading estimation using gyroscope ο Accuracy of gyroscope is unreliable with time
ο¬ This paper propose a wearable multi-sensor system to obtain the high-accuracy indoor
heading estimation (quaternion-based unscented Kalman filter (UKF) algorithm).
ο¬ The proposed multi-sensor system includes :
ο¬ One three-axis accelerometer
ο¬ Three single-axis gyroscopes
ο¬ One three-axis magnetometer
ο¬ One microprocessor
ο¬ The results show that the mean heading estimation errors are less than 10Β° and 5Β°
as compared to reference path.
4. 4Kyungpook National University
Introduction
ο¬ GPS has a wide range of applications for navigation (land, sea and aviation based fields).
ο¬ Weak reception of GPS make challenges to self-localization in indoor environment.
ο¬ Various positioning methods are developed:
ο¬ Ultra-Wide Band (UWB) communication, Wireless Local Area Network (WLAN), Wi-Fi based , Camera-based
, Ultrasonic sensors , Laser-based , Radio frequency identification (RFID) , Strap down inertial navigation
ο¬ Among these techniques, inertial measurement unit (IMU)-based navigation is more
competitive,
ο¬ Its independence of the existing infrastructures in buildings.
ο¬ In this paper, a miniature wearable multi-sensor system is designed for accurate indoor
heading estimation.
ο¬ The proposed quaternion-based UKF algorithm can make use of the complementary
features of gyroscopes not affected by magnetic disturbance and magnetometers without
long-term drift for heading estimation.
5. 5Kyungpook National University
Wearable Multi-Sensor System
ο¬ The multi-sensor system consists of :
ο¬ one three-axis accelerometer
ο¬ Three single-axis gyroscopes
ο¬ one magnetometer
ο¬ one microprocessor
ο¬ Size is 32 Γ 32 Γ 15 mm
ο¬ The accelerometer uses an ADXL312 made by
Analog Devices Inc.
ο¬ The gyroscope uses an ADXRS453
ο¬ The magnetometer uses the HMC1053 from
Honeywell Corp.
ο¬ The microprocessor uses STM32F407
Wearable multi-sensor system
6. 6Kyungpook National University
Coordinate System and Heading Estimation
ο¬ The designed multi-sensor system is based on the
geographical coordinate system and body
coordinate system shown in Figure.
ο¬ The geographical coordinate system determines
the north, east and vertical directions of the
position of the body.
ο¬ N, E and D represent the axis of north, east, and
upright respectively.
ο¬ π π, ππ and π π represent the directions of its head,
starboard and bottom respectively.
ο¬ The transformation matrix is written as:
ο¬ πΆ π
π
=
πππ ππππ π π ππππππ π βπ πππ
βπ ππππππ β + πππ ππ ππππ ππβ πππ ππππ β + π ππππ ππππ ππβ πππ ππ ππβ
π ππππ ππβ + πππ ππ ππππππ β βπππ ππ ππβ + π ππππ ππππππ β πππ ππππ β
Coordinate Systems
Transformation between NED and body
coordinate system.
7. 7Kyungpook National University
Heading Estimation
ο¬ Heading estimation using magnetometersο interferencesο steel of buildings and electronic
equipment.
ο¬ Heading estimation using gyroscope ο Accuracy of gyroscope is unreliable with time.
ο¬ A new heading estimation method is proposed to make use of complementary features of
gyroscopes and magnetometers.
ο¬ The quaternion-based UKF to eliminate the errors derived from the gyroscope and
magnetometer.
Flow chart of quaternion-based UKF for heading estimation
8. 8Kyungpook National University
Heading Estimation Using a Magnetometer
ο¬ The pitch angle and roll angle ο from acceleration signals and
ο¬ The yaw angle is determining by computing the magnetometer output.
π πππ = ππππππ
βπ π ππππ+π π ππππ
π π ππππ½+π π ππππππππ½+π π ππππππππ½
+ π«= arctan
π― π
π― π
+ π«
ππ’πππ‘ ππ§π π₯π = βππ«ππππ§(
π π
π π
π + π π
π
)
πΉπππ πππππ = ππ«ππππ§(
π π
π π
)
Geomagnetic field intensity (β π₯ , β π¦ , β π§ )
Local magnetic declination = D
9. 9Kyungpook National University
Heading Estimation Using a Gyroscope
ο¬ Quaternion has the advantage of no singularity when the pitch is approaching 90Β° and
higher computation efficiency than Euler angles.
ο¬ Quaternion is a four-dimension vector and subject to normalization, which is defined as
follows:
π = π0 π1 π2 π3
π
, π0
2
+ π1
2
+ π2
2
+ π3
2
= 1;
ο¬ Quaternion-based state update model with gyroscope measurement is shown as follows:
π =
1
2
πβ¨
0
π π₯
π π¦
ππ§
=
1
2
0 βπ π₯ βπ π¦ βππ§
π π₯ 0 π π§ βπ π¦
π π¦ βππ§ 0 π π₯
ππ§ π π¦ βπ π₯ 0
π0
π1
π2
π3
where π π₯, π π¦, π π§ are the measurements of gyroscope.
10. 10Kyungpook National University
ο¬ The quaternion-based traditional matrix from NED coordinate system to body coordinate
system in DCM form is written as:
ο¬ The attitude angles based on quaternion and gyroscope in form of Euler angles is expressed
as:
π = arctan
πΆ32
πΆ33
π = arcsin βπΆ31 ββ π ππ¦ππ = arctan
2 π1 π2 + π0 π3
π0
2
+ π1
2
β π2
2
β π3
2
π = arctan(
πΆ21
πΆ11
)
πͺ π
π
=
π0
2
+ π1
2
β π2
2
β π3
2
π(π1 π2 β π0 π3) π(π1 π3 + π0 π2)
π(π1 π2 + π0 π3) π0
2
β π1
2
+ π2
2
β π3
2
π(π2 π3 + π0 π1)
π(π1 π3 + π0 π2) π(π2 π3 + π0 π1) π0
2
β π1
2
β π2
2
+ π3
2
=
πͺ ππ πͺ ππ πͺ ππ
πͺ ππ πͺ ππ πͺ ππ
πͺ ππ πͺ ππ πͺ ππ
11. 11Kyungpook National University
Quaternion-Based UKF
Kalman Filter Design
ο¬ The state model X and measurement model Y are built respectively as follows:
π = π0 π1 π2 π3
π
, Y= π π π π
ο¬ The discrete time representation of Kalman filter is shown as:
π π + 1 = πΉ π π π + π€ π
π π = π» π π + π£ π
where the system matrix F and output function H[X(n)] are:
πΉ = cos
π
2
. πΌ +
sin(
π
2
)
π
2
.π΄. ππ‘
A=
1
2
0 βπ π₯ βπ π¦ βππ§
π π₯ 0 ππ§ βπ π¦
π π¦ βππ§ 0 π π₯
ππ§ π π¦ βπ π₯ 0
, π = (π π₯. ππ‘)2 + (π π¦. ππ‘)2 + (π π§. ππ‘)2 , dt is sampling time.
π» π π =
ππππ‘ππ
2 π0 π1 + π2 π3
π0
2
β π1
2
β π2
2
+ π3
2
arcsin 2(βπ0 π2 β π1 π3)
arctan
2 π0 π3 + π1 π2
π0
2
β π1
2
β π2
2
β π3
2
w and v are the process noise and measurement noise.
12. 12Kyungpook National University
Covariance of Process Noise and Measurement Noise
ο¬ The covariance of process noise Q is:
π =
1
4
βπ1 βπ2 βπ3
π0 βπ3 π2
π3 π0 βπ1
βπ2 π1 π0
π π€π₯
2
0 0
0 π π€π¦
2
0
0 0 π π€π§
2
βπ1 βπ2 βπ3
π0 βπ3 π2
π3 π0 βπ1
βπ2 π1 π0
π
Where π π€π₯
2 , π π€π¦
2 , π π€π§
2 are variance of gyroscope outputs π π₯ , π π¦ and π π§
ο¬ The covariance of measurement noise is decided by the measurement process.
ο¬ The covariance of pitch (ΞΈ) and roll (Ο) can be derived as:
π
π
=
0
π π§
π π
π+π π
π β
π π
π π
π+π π
π
β
π π
π+π π
π
π π
π+π π
π+π π
π
π π₯ π π¦
(π π
π+π π
π+π π
π) π π
π+π π
π
π π₯ π π§
(π π
π+π π
π+π π
π) π π
π+π π
π
π π₯
π π¦
π π§
=π ππ
π π₯
π π¦
π π§
With the π ππ₯
2 , π ππ¦
2 and π ππ§
2 are the variance of accelerometer π π₯ , π π¦ πππ π π§
π ππ = ππππ[ π ππ₯
2
π ππ¦
2
π ππ§
2
]
The covariance of pitch and roll is as follows: π ππ
2
= π ππ π ππ π ππ
π
13. 13Kyungpook National University
ο¬ The deviation of magnetometer based heading can be represented as:
π = β
π»2
π»1
2+π»2
2
π»1
π»1
2+π»2
2
πππ π π ππππ πππ πππ ππ πππ
0 βπππ π π πππ
β π₯
β π¦
β π§
=π π
β π₯
β π¦
β π§
The variance of magnetometer based heading ( Ο ) is expressed as:
π π
2
= π π π π π π
π
Where π π = diag[ πβπ₯
2
πβπ¦
2
πβπ§
2
] and πβπ₯
2
, πβπ¦
2
ππππβπ§
2
are variance of magnetometer
outputs β π₯ , β π¦ πππ β π§
The covariance of measurement noise matrix R as:
π =
π ππ
2
π π
2
ππ
2
Where ππ
2
is variance of quaternion normalization equation and its value is zero
14. 14Kyungpook National University
UKF Algorithm
Consider propagating random variable x
(dimension L) through a nonlinear function
y = h(x). Assume X has mean π₯ and
covariance ππ₯
π0 = π₯
ππ = π₯ + πΏ + π π , π = 1: πΏ
ππ = π₯ β πΏ + π π , π = πΏ + 1: 2πΏ
π0
π
=
π
πΏ + π
π0
π
=
π
πΏ + π
+ 1 β πΌ2 + π½
ππ
π
=
π
2(πΏ + π)
, π = 1: 2πΏ
where π = πΌ2
(L+π ) β πΏ is a scaling factor.
Ξ± is set to a small positive value (e.g., 1eβ3),
ΞΊ is set to 0 and
Ξ² is set for 2 for Gaussian distribution.
15. 15Kyungpook National University
Experiments and Result Analysis
ο¬ Carried out two Experiments in college building corridor.
Fixed on the waist of pedestrian Fixed on a quadrotor UAV
Skeleton map Picture of the actual corridor in the
position of the circle in (a)
18. 18Kyungpook National University
ο¬ The mean heading estimation error of the multi-sensor system on a pedestrianβs waist as
about 10Β° by contrast with the reference path.
ο¬ The mean heading estimation error of the multi-sensor system on a quadrotor is about 5Β°.
ο¬ The rates of mean heading errors are 5.56% (10Β°/180Β°) and 2.78% (5Β°/180Β°).
ο¬ Error rate β€ 5% can be identified as an accurate indoor heading estimation.
ο¬ The roll angle and pitch angle of the multi-sensor system on pedestrianβs waist have a
larger variation range than that of the multi-sensor system on the quadrotor.
ο¬ The heading estimation error of the quadrotor has more dynamic changes than that of the
pedestrian. (four brushless electric machines of the quadrotor can produce a certain
external magnetic disturbance to have an influence on the heading estimation)
Result Analysis
19. 19Kyungpook National University
CONCLUSION
ο¬ The proposed quaternion-based unscented Kalman filter can use the complementary features
of gyroscopes and magnetometers to get accurate heading estimations.
ο¬ The results show that the mean heading estimation errors are less than 10Β° and 5Β°as
compared to reference path.
ο¬ Carry out experiments in more complicated conditions such as sharp acceleration and
deceleration.
ο¬ Combine the accurate heading estimation with distance estimation.
ο¬ Combine Wi-Fi or a camera with the IMU.