=Paper=
{{Paper
|id=Vol-2498/short26
|storemode=property
|title=In use IMU calibration and pose estimation
|pdfUrl=https://ceur-ws.org/Vol-2498/short26.pdf
|volume=Vol-2498
|authors=Henk Kortier
|dblpUrl=https://dblp.org/rec/conf/ipin/Kortier19
}}
==In use IMU calibration and pose estimation==
In use IMU calibration and pose estimation?
Henk Kortier[0000−0002−6736−0540]
Saxion University of Applied Sciences
Mechatronics research department, 7513 AB Enschede, The Netherlands
h.g.kortier@saxion.nl
Abstract. This paper describes a calibration method for inertial and
magnetic sensors using a batched optimization procedure. Well estab-
lished sensor, motion and constraint models are applied which include
sensor gains, biases, misalignments and inter-triad misalignments. For
the magnetometer, hard and soft iron model parameters and local dip-
angle are embodied in the framework as well. The method does not
require any additional equipment, is minimal restrictive with respect to
the required movements, and can be performed within one minute. Our
approach is applicable for both single and multi Inertial Measurement
Units (IMU) and leverages from the relative pose between rigidly con-
nected IMU’s. We demonstrated that our approach resulted in improved
dead reckoning estimates and showed good agreements with an optical
reference system for both position and orientation estimates.
Keywords: Inertial sensor · magnetometer · IMU calibration · opti-
mization · sensor fusion · MIMU array
1 Introduction
Inertial Measurement Unit (IMU’s) have a profound role in the control of mobile
vehicles, robotic manipulators, capturing human body motions and augmented
reality applications in smartphones. Fused with a magnetometer, an IMU en-
ables precise orientation estimates. In addition, IMU’s provide velocity and po-
sition change estimates over short time periods. The quality of those estimates
largely depend on correct sensor models. Hence, estimating the model parame-
ters, known as calibration, is an important procedure that has major effect on
the eventual usability of the IMU.
The upswing of micro-electromechanical (MEMS) based IMU’s resulted in many
scientific publications describing calibration methods [6, 10]. Traditionally an
external system is used that applies suitable reference signals for a one-time
calibration procedure right after the IMU was manufactured.
However, environmental influences, like temperature changes and mechanical
stress, cause deviations of the true parameter values over time. Hence, an easy to
perform, without the need for extra equipment, calibration procedure is desired
to correct for those recurred systematic errors.
?
Supported by the Dutch SIA RAAK Postdoc program
2 H. Kortier
While most literature focusses on the calibration of a single sensor, or only
the gyroscope and accelerometer triads, do some include the magnetometer as
well [8]. However, the complementary relations between inertial and magnetic
signals are often minimally exploited [2, 4]. Estimating the sensors jointly, with-
out the need to perform complex movements or equipment, was only recently
published by Chow et.al. [3]. It illustrates the possibilities of a powerful, yet easy
to use calibration procedure. However, their choice for marginalization the nav-
igation states puts some restrictions on the prior, the movement, its bandwidth
and outlier handling.
We propose a similar method, yet different approach for an easy in-use cal-
ibration of consumer grade triaxial inertial and magnetometer sensors without
the need for external equipment. The novelty can be found in various aspects:
– A tight coupled, batched, sensor fusion approach is used to benefit from all
sensor observations in a joint manner.
– Flexible in the number of rigidly connected IMU’s (MIMU), their sampling
rates, and the motion trajectory.
– Exploiting the centripletal and tangential forces of a MIMU constellation.
– Simultaneous estimation of all inertial and magnetic calibration parameters.
– Simultaneous estimation of the navigation states.
– Sample based handling of measurement outliers.
– Robust for any magnetic disturbance and temporally or spatially inhomoge-
nous fields.
This paper is structured as follows: we will first outline the theoretical framework
and highlight the method. Then, the method is demonstrated in three different
situations. First, a MIMU array is calibrated, where the orientation state is
compared with an optical reference system. In the second situation a MIMU
array is calibrated using multiple static periods and compared with an existing
popular calibration approach. Third, the method is applied on an IMU embodied
in an Apple iPhone X during typical smartphone usage.
2 Method
This section elaborates on the sensor, motion and constraint models.
Diagonal gain matrices are indicated with K, lower triangular matrices de-
scribing the misalignments between the senstive axes with N , biases vectors with
b and Gaussian noise vectors with e [11]. Super or sub-script upper-case letters
represent the local world frame L, module body frame B, magnetometer Mi ,
gyroscope Gi , sensor frame Si . Orientation are indicated with an orientation
matrix R.
We assume a rigid body on which one or multiple sensors (Si ) are attached.
Hence, the sensor’s orientation with respect to the global frame can be written
as:
RtSi L = RSi B RtBL (1)
In use IMU calibration and pose estimation 3
2.1 Sensor models
Accelerometer: The output of an accelerometer at time t is modeled as the sum
of the linear aSSii ,t and gravitational acceleration g Si :
Si Si L L
ya,t = KaSi NaSi RSi B aB Si ,t + Rt g + bSa i + ea,t , ea,t ∼ N (0, Σ a ) (2)
This linear acceleration at pick-up point (Si ) is a summation of the body, cen-
tripetal and tangential accelerations. Latter can be expressed using the lever-arm
pB
Si , angular velocity and angular acceleration:
aB BL L B B B B B
Si ,t = Rt aB,t + αLB,t × pSi + ωLB,t × ωLB,t × pSi (3)
where RGi Si is the relative orientation, or triad misalignment, between the ac-
celerometer and gyroscope pair.
Gyroscope: The output of a gyroscope is modeled as an angular velocity mea-
Gi
sured in the gyroscope frame with respect to the inertial frame (ωLG i ,t
). We
assume that the gyroscope and accelerometer are rigidly connected to the un-
derlying body, hence ωBSi = ωSi Gi = 0:
Gi
yg,t = KgGi NgGi RGi Si RSi B ωLB,t
B
+ bG g
g + eg,t , eg,t ∼ N (0, Σ )
i
(4)
Magnetometer: The output of a magnetometer at time t is modeled as a local
measured homogenous magnetic field mL which is affected by soft (D) and hard
iron (o) effects:
Mi
ym,t = DMi RSi B RBL mL + oM
m + em,t ,
i
em,t ∼ N (0, Σ m ) (5)
It should be noted that the triad misalignment between magnetometer and ac-
celerometer is captured in matrix DMi and the magnetometer bias is captured in
the offset vector oMi . The local magnetic field is a function of the local magnetic
dip angle θ and modeled as:
T
mL = cos θ 0 − sin θ
(6)
2.2 Motion and constraint models
Motion model: The kinematic relations of the position p, velocity v , acceleration
a, orientation q, angular velocity ω and angular acceleration α are given by the
following proces model which is driven by a zero mean acceleration noise model:
2
pL = pL L T
aL p
t+T t + T vt + 2 t +w
L
= vtL + T aL v
vt+T t +w
aL
t+T = 0 + wa
LB
= qtLB T B T B
+ wq
qt+T exp 2 ωLB,t + 2 αLB,t
B B B
+ wω
ωLB,t+T = ωLB,t +T αLB,t
B
αLB,t+T = 0 + wα
4 H. Kortier
where T is the sample period, is the quaternion product operator and exp the
quaternion exponential. The process noises are being described by:
L
wXBt ∼ N (0, Σ X ), X ∈ {p, v, a, q, ω, α, } (7)
It should be noted that wp , wv , wa represent the same linear acceleration uncer-
tainty, and wq , wω , wα the same angular acceleration uncertainty.
Zero net position: The user is asked to return the IMU to approximately the
same position as where it has been picked-up. This knowledge is modeled as a
zero net position change measurement:
pt+Tp = pt + enp (8)
where Tp is the time difference between pick-up and return.
Zero velocity: Whenever a zero movement period is detected using a moving-
variance detector [9] on the inertial sensor readings, the angular and translational
velocities are assumed to be zero:
vtL = 0 + ev0 (9)
B
ωLB,t = 0 + eω0 . (10)
2.3 Calibration procedure
The model parameters and navigation states are estimated simultaneously us-
ing a large scale iterative non-linear least squares solver [1]. By rewriting and
summing the model terms, one can rephrase the entire cost function as a bundle
adjustment problem. The following set of unknown are included:
1) Accelerometer and Gyroscope gains, misalignments, biases:
Si Gi Si Gi Si Gi
Ka , Kg , Na , Ng , ba , bg ∀i ∈ S (11)
2) Magnetometer gains, magnetometer offsets, and the magnetic dip angle:
Mi Mi
D ,o ,θ ∀i ∈ S (12)
2) Boresights, lever arms and sensor triad misalignments:
BSi B Si Gi
R , pSi , R ∀i ∈ S (13)
2) Body kinematics:
L L
pB,t , vB,t , aL LB B B
B,t , qt , ωLB,t , αLB,t ∀t ∈ T (14)
where S denotes the set of IMU and magnetic sensors and T the set of time
instances.
Outliers are efficiently detected and suppressed by embedding a Cauchy Loss
function for each observation individually. Sensor covariances are either obtained
from data-sheets or derived from an Allan Variance plot. Other covariance values
were chosen such that they have a realistic meaning, e.g. sub-centimeter level zero
net position change, millimeter/s and millidegree/s zero velocity uncertainties.
In use IMU calibration and pose estimation 5
3 Experiments
Our approach has been evaluated in different indoor experiments. Before start
of the recording sensors were running long enough to stabilize the temperature.
In each experiment a different estimation aspect will be emphasized:
1. MIMU module, calibrated with two static poses. The orientation of the in-
sample trial is compared with an optical reference.
2. MIMU module, calibrated with 20 static poses. The position of an out-of-
sample trial is compared with a different calibration set and optical reference.
3. Smartphone IMU module, calibrated with two static periods, representing a
typical smartphone movement. The pose of the in-sample trial is presented.
3.1 MIMU two static periods
An Inertial Elements MIMU22BT multi IMU, sampled at 62.5Hz, module was
used, see Fig. 1. The MIMU was manipulated indoors in a rather arbitrary way
for about one minute while its movements were recorded by a passive optical ref-
erence system (Vicon @100Hz). Processing the raw inertial and magnetic sensor
readings yielded the estimated calibration parameters. Uncalibrated and cali-
brated sensor values are depicted in Fig. 2. In addition, the in-sample orientation
estimate was compared with the optical reference, see Fig. 3.
Fig. 1. Inertial Elements MIMU22BT, a MIMU module with 4 InvenSense MPU-9150
motion tracking devices. Top and bottom IC’s are mirrored and approximately 2.1mm
separated, whereas the distance between the two IC’s on the same side is approximately
6.1mm.
3.2 MIMU 20 static periods
In our previous work we described a new method for Pedestrian Dead Reckoning
(PDR) based on MIMU sensors [5]. For the experiments, a popular joint gyro-
acc calibration method described by Tedali et.al. [10] was used to calibrate to
inertial sensors.
We re-used both the calibration and experimental datasets. The calibration
dataset was used to calibrate the sensor using the method described in this
6 H. Kortier
acc gyr mag
15
4 1.0
10
2 0.5
5
[rad/s]
m [a. u. ]
a [m/s2]
0 0 0.0
5 2 0.5
10 4 1.0
15
15 1.0
4
10
2 0.5
5
[rad/s]
m [a. u. ]
a [m/s2]
0 0 0.0
5 2 0.5
10 4
1.0
0 20 40 60 80 0 20 40 60 80 0 20 40 60 80
time [s] time [s] time [s]
Fig. 2. MIMU experiment 1: Uncalibrated (top) and calibrated (bottom) gyroscope
(left), accelerometer (middle) and magnetometer (right) reading of 4 independent, but
rigidly connected, IMU modules. Each colored trace represents a different sensitive
sensor axis whereas the norms are given in black.
1
Orientation Optical [-] Orientation IMU [-]
0
1
1
0
1
10
Difference [deg]
5
0 x
5 y
z
10
0 10 20 30 40 50 60 70 80
Time [s]
Fig. 3. MIMU experiment 1: Estimation of orientation (quaternions) provided by the
calibration algorithm (top) and optical reference (middle). The error between both
orientation sequences is expressed using Euler angles.
paper. The experimental data set contains the intertial data of a subject who
traversed repeatedly an indoor oval path (800 m). Subsequently, the estimated
trajectory using a Kalman based PDR approach [7] for the dataset that has been
calibrated with the two differente parametersets is depicted in Fig. 4.
In use IMU calibration and pose estimation 7
Fig. 4. MIMU experiment 2: The position of a subject traversing a path (108 rounds).
Visible are an optical reference (left), an EKF estimate based on the original inertial
calibration set (middle) and a reconstruction using a calibration set obtained from our
method (right).
3.3 Smartphone, single IMU, 2 static periods
Typical smartphone usage includes a movement sequence of picking it up from a
table, perform a phoning or texting activity, and finally place the phone back on
the table top. We simulated this situation by picking up the phone, rotating it
in different directions while translating in the global vertical-direction for about
30 cm, and finally return it to the initial resting spot.
Figure 5a illustrates the in-sample estimates of the translational kinematics.
In addition, in-sample orientation estimates are visible by the (un)calibrated
magnetometer readings in Fig. 5b.
4 Conclusion and Discussion
This paper describes a novel method for the calibration of inertial and mag-
netic measurement units. It allows for simultaneous estimation of calibration
parameter and navigation states and flexible in the number of sensors used.
The advantages, suitability and performance is demonstrated in different
experiments. Especially experiment 2 shows the added value of proper estimated
parameters when a MIMU module is used for PDR activities.
In a follow up study we would like to include the uncertainty on the parameter
estimates by evaluating the Hessian matrix. In addition, the framework can be
easily extended by inclusion of the sensor covariances and time-dependent bias
states.
References
1. Agarwal, S., Mierle, K., Others: Ceres solver. http://ceres-solver.org
2. Bonnet, S., Bassompierre, C., Godin, C., Lesecq, S., Barraud, A.: Calibration meth-
ods for inertial and magnetic sensors. Sensors and Actuators A: Physical 156(2),
302–311 (2009)
8 H. Kortier
0.3
0.2
p [m]
x
0.1 y
z
0.0 norm
0.2
0.1
v [m/s]
x
0.0 y
z
0.1 norm
1.0
0.5
a [m/s2]
0.0 x
0.5 y
z
1.0 norm
0 2 4 6 8 10 12 14 16
time [s]
(a) In sample position, velocity and ac- (b) Mapping on the unit sphere (orange)
celeration estimates of the sensor module of the uncalibrated (red) and calibrated
expressed in the global reference frame. (blue) magnetometer output.
Fig. 5. IMU experiment: Example of algorithm output mimicking a typical smartphone
activity motion.
3. Chow, J., Hol, J., Luinge, H.: Tightly-coupled joint user self-calibration of ac-
celerometers, gyroscopes, and magnetometers. Drones 2(1), 6 (2018)
4. Dorveaux, E., Vissière, D., Martin, A.P., Petit, N.: Iterative calibration method for
inertial and magnetic sensors. In: Proceedings of the 48h IEEE Conference on De-
cision and Control (CDC) held jointly with 2009 28th Chinese Control Conference.
pp. 8296–8303. IEEE (2009)
5. Kortier, H., Bonestroo, W., Tangelder, R.: Mimu pdr with bias estimation using
an optimization-based approach. IPIN2018 (2018)
6. Nieminen, T., Kangas, J., Suuriniemi, S., Kettunen, L.: An enhanced multi-position
calibration method for consumer-grade inertial measurement units applied and
tested. Measurement Science and Technology 21(10), 105204 (2010)
7. Nilsson, J.O., Gupta, A.K., Händel, P.: Foot-mounted inertial navigation made
easy. In: 2014 International Conference on Indoor Positioning and Indoor Naviga-
tion (IPIN). pp. 24–29. IEEE (2014)
8. Särkkä, O., Nieminen, T., Suuriniemi, S., Kettunen, L.: A multi-position calibra-
tion method for consumer-grade accelerometers, gyroscopes, and magnetometers
to field conditions. IEEE Sensors Journal 17(11), 3470–3481 (2017)
9. Skog, I., Handel, P., Nilsson, J.O., Rantakokko, J.: Zero-velocity detection—an
algorithm evaluation. IEEE transactions on biomedical engineering 57(11), 2657–
2666 (2010)
10. Tedaldi, D., Pretto, A., Menegatti, E.: A robust and easy to implement method for
imu calibration without external equipments. In: 2014 IEEE International Confer-
ence on Robotics and Automation (ICRA). pp. 3042–3049. IEEE (2014)
11. Zhang, H., Wu, Y., Wu, W., Wu, M., Hu, X.: Improved multi-position calibra-
tion for inertial measurement units. Measurement Science and Technology 21(1),
015107 (2009)