0% found this document useful (0 votes)
21 views

Design of An Embedded Icosahedron Mechatronics For Robust Iterative IMU Calibration

Uploaded by

nexperiencer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Design of An Embedded Icosahedron Mechatronics For Robust Iterative IMU Calibration

Uploaded by

nexperiencer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

IEEE/ASME TRANSACTIONS ON MECHATRONICS, VOL. 27, NO.

3, JUNE 2022 1467

Design of an Embedded Icosahedron


Mechatronics for Robust Iterative
IMU Calibration
Chao-Chung Peng , Jing-Jie Huang, and Ho-Yang Lee

Abstract—Applications of low-cost microelectromechan- into actual quantities. However, information on these factors is
ical systems inertial measurement units (IMUs) have broad- often ambiguous and the value of the scaling factors may differ
ened over the past few years. Currently, IMUs are imple- because of different axes or environments. Therefore, the IMU
mented in a wide variety of consumer electronics such as
smartphones, smartwatches, and augmented reality/virtual needs to be calibrated before use. Moreover, during calibrations,
reality (AR/VR) devices to detect human poses and real- the IMU may be perturbed by its surroundings, which leads to
time orientation of unmanned aerial vehicles. However, in inaccurate parameter estimates.
order to precisely monitor objects’ poses, calibration of Calibration of the IMU is essential before the development of
the IMU is crucial. In most cases, calibration procedures
the so-called attitude heading and reference system (AHRS) [1].
are conducted under a clean and perturbation free en-
vironment. However, such ideal environments and condi- The function of the AHRS is to provide the attitudes and heading
tions may not always be available. Moreover, expensive of a drone in air, the pose of AR/VR devices, and part of the
and heavy calibration systems are usually required and information for robotics localization [2]. Therefore, in order to
unaffordable for general users. As a result, in this article, provide accurate three-degree-of-freedom pose information, the
a low-cost, lightweight, and portable IMU calibration em-
calibration of the IMU is necessary. Furthermore, calibration of
bedded icosahedron platform is developed. Since a clean
calibration environment cannot be guaranteed, a calibra- accelerometers and magnetometers is relatively important since
tion algorithm, with the consideration of external pertur- they will provide roll/pitch references and heading reference,
bations, is presented. An iterative weighted Levenberg– respectively. As a result, the calibration considered in this article
Marquardt algorithm is proposed to cope with perturba- is very essential, especially for flight control design.
tions. The highly integrated hardware/software codesign
A low-cost microelectromechanical systems (MEMS) type
provides user-friendly operations for IMU calibration. Fi-
nally, simulations, as well as experiments, are presented IMU is usually affected by some primary sensor errors, including
to demonstrate the effectiveness and robustness of the scaling, nonorthogonality errors, nonzero measurement bias,
proposed system. and noise [3]–[7]. In order to provide precise references, the
Index Terms—Attitude heading and reference system calibration of an IMU is usually completed with expensive
(AHRS), calibration, complementary filter, inertial measure- multiaxis motion stages [8], or a camera-based robot arm [9].
ment unit (IMU), Levenberg–Marquardt (LM), quaternion. To achieve a fast IMU calibration procedure, method [10] is
incorporated with a previously well-calibrated IMU to serve as
a reference for measurement. The work [11] utilized the fact that
I. INTRODUCTION the norm of the measured output of the accelerometer and gyro
REDOMINANTLY, inertial measurement unit (IMU) man- are equal to the magnitude of the applied force and rotational
P ufacturers provide all the calibrated sensitivity parame-
ters in datasheets, allowing end-users to convert the raw data
velocity, respectively. Parameter calibration is then formulated
as a nonlinear cost function minimization problem. A calibration
algorithm without the use of external equipment is presented and
achieved in [12]. The parameter estimation is also formulated
Manuscript received May 14, 2020; revised January 12, 2021 and May
11, 2021; accepted July 17, 2021. Date of publication July 26, 2021; date as a cost function minimization problem and is solved using
of current version June 16, 2022. Recommended by Technical Editor H. Newton’s method. An interesting method that uses the motion
Ishii and Senior Editor Q. Zou. This work was supported by the Min- of the pendulum as a reference platform is presented in [13]. The
istry of Science and Technology under Grant MOST 107-2221-E-006-
114-MY3 and Grant MOST 108-2923-E-006-005-MY3. (Corresponding device provides reference angular rates as well as translational
author: Chao-Chung Peng.) accelerations. In [14], the calibration process is completed via
The authors are with the Department of Aeronautics and As- signal spectral analysis produced by continuous rotation of the
tronautics, National Cheng Kung University, Tainan 70101, Tai-
wan (e-mail: [email protected]; [email protected]; IMU. Along with vision-SLAM technology, a camera-IMU
[email protected]). calibration method is proposed in [15]. A low-cost and achiev-
This article has supplementary material provided by the authors and able method that uses a 3-D printed cube as a calibration tool
color versions of one or more figures available at https://doi.org/10.1109/
TMECH.2021.3099119. is presented in [16]. The work also integrates simultaneous
Digital Object Identifier 10.1109/TMECH.2021.3099119 localization and mapping (SLAM) technology to generate the

1083-4435 © 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
1468 IEEE/ASME TRANSACTIONS ON MECHATRONICS, VOL. 27, NO. 3, JUNE 2022

IMU rotation reference angle; however, these works [15], [16] II. IMU SENSOR MODEL
involve optical measurement techniques such as the calibration
A. Sensor Error Mathematical Model
reference, which may be sensitive to light reflection from the
environment. The nine-axis MEMS type IMU includes a three-axis ac-
Recently, certain nonlinear optimization frameworks were celerometer, three-axis gyroscope, and three-axis magnetome-
developed to solve initialization and extrinsic calibration issues ter. In this study, the axes in each sensor are assumed to be mutu-
for the IMU–IMU, IMU–Camera, and IMU–light detection and ally orthogonal. Thus, the installation errors [7] are negligible.
ranging (LiDAR) configurations in an online manner [17]. The Among the sensors, the accelerometer and magnetometer are
work [18] provides a 3-D LiDAR-based IMU calibration method the most sensitive to environmental interferences. Moreover, the
that can be used to correct motion distortion during SLAM. To calibration of the gyroscope usually counts on a high precision
address fiber optic gyroscope IMU parameter variation for long- alignment mechanism and a high-resolution rotational speed ref-
term sailing, a standalone online calibration is suggested in [19]. erence. These demands are usually fulfilled by using a high-cost,
By integrating the swing ship characteristics, system parameters heavy multiaxis servo stages [25]. Therefore, calibrations of
are updated iteratively and the method is able to prevent sailing gyroscopes usually consider the bias compensation as the ones
drift. appeared in [26] and [27]. As a consequence, in the following
In order to describe error behaviors, error sources and mod- sections, the calibration of an accelerometer and magnetometer
els for the IMUs are derived and analyzed [8]. Moreover, the is analyzed in depth, but the calibration of a gyroscope is
calibration also utilizes the Kalman filter for state estimation. neglected.
In [20], an unscented Kalman filter was utilized to calibrate a Since the scaling factors are not the same for all the axes,
gyroscope-free IMU. An efficient thermal variation model was each axis is also accompanied by different noise and bias levels.
proposed and the effectiveness of the calibration method was Therefore, a mathematical model to account for the sensor’s
investigated through a kinematic test platform using integrated errors should be established. For the accelerometer, gyroscope,
GPS and MEMS-IMU [21]. The calibration estimates magne- and magnetometer, there are scaling errors and measurement
tometer scale factors, misalignment, and constant/time-varying biases that appear in the axial directions [3]. These errors can
bias. This method simplifies the satellite design process by be represented by the scaling matrices (Ka , Km ) and the bias
reducing the need for booms and strict magnetic cleanliness vectors (ba , bm ), where the subscripts a and m represent the
requirements [22]. A complete error model, including instru- accelerometer and magnetometer, respectively.
mentation errors (scale factors, nonorthogonality, and offsets) The scaling factors are assumed to be independent, which can
and magnetic deviations (soft and hard iron) on the host platform, be represented by
is utilized [23].
Ka = diag (sax , say , saz ) , Km = diag (smx , smy , smz )
Inspired by the works [3], [7], [16], and [24], this article
(1)
explores the online IMU calibration idea and designs an af-
and the measurement bias vectors are defined by
fordable, portable, and highly integrated IMU calibration plat-
 T  T
form. Second, to cope with online calibrations for environ- ba = bax bay baz , bm = bmx bmy bmz (2)
ment subjects to unknown perturbation, an iterative weighted
Levenberg–Marquardt algorithm (IWLMA) is presented. With Define the raw body frame measurements for the accelerom-
the aid of the IWLMA, the outlier from the raw data can eter and magnetometer, respectively, as follows:
be recognized iteratively and the corresponding weights are  T
araw = araw,x araw,y araw,z
going to be adjusted by means of the Gaussian model ac-  T (3)
mraw = mraw,x mraw,y mraw,z
cordingly. It will be demonstrated later that the IWLMA si-
multaneously deals with nonlinear optimization problems and Therefore, the sensor error model of the accelerometer can be
decreases weights of outliers iteratively to attenuate biased described as [3]
estimations.
acal = Ka (araw + ba + va ) (4)
For practical implementation, to cope with the limited mem-
ory size in the microprocessor, certain recursive techniques where va ∈ R 3×1
is the measurement white noise vector of the
are involved so that the icosahedron platform can calibrate accelerometer and acal ∈ R3×1 is the calibrated acceleration.
multiple IMUs simultaneously. Moreover, based on the hard- Similarly for the magnetometer, the sensor model can be de-
ware/software’s highly integrated codesign, the proposed plat- scribed as follows:
form provides user-friendly operation for IMU calibration.
mcal = Km (mraw + bm + vm ) (5)
Since this method does not require costly and high-precision
equipment, the proposed systems are affordable for general where vm ∈ R 3×1
is the measurement white noise vector of the
users. To verify the feasibility and effectiveness of the proposed magnetometer and mcal ∈ R3×1 is the calibrated magnetic field.
system, simulations, as well as experiments, are carried out. Based on the given sensor models (1)–(5), the target of the
Based on the advantage of the proposed algorithm together calibration is to convert the measured raw data into calibrated
with the mechatronics, the IMU calibration can be applied data through optimal scaling matrices and optimal bias vectors.
anytime and anywhere, even outside of a clean laboratory Determination of the optimal scaling matrices and bias vectors
environment. can be formulated as a nonlinear optimization problem. The

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
PENG et al.: DESIGN OF AN EMBEDDED ICOSAHEDRON MECHATRONICS FOR ROBUST ITERATIVE IMU CALIBRATION 1469

Fig. 1. Prototype of the handheld icosahedron platform. (a) Solid ob-


ject version. (b) Weight reduced version.

Fig. 3. Detailed circuit diagram of the developed calibration device.

which helps users identify the faces of the device and apply a
standard data collection procedure. However, there are no strict
restrictions that users must follow. The number is solely used to
recognize which faces have already been placed. Apparently, the
proposed device can be rotated to any orientation freely and the
total weight is about 260 g only, including a battery, electrical
circuit, a microprocessor, and an IMU.
The icosahedron platform contains a highly integrated soft-
Fig. 2. Prototype realization. (a) Integrated icosahedron platform. ware and hardware codesign, which can provide a low-cost,
(b) Kernel data processing unit. light-weight, and easy-to-use calibration process. For design
reproduction purpose, the detailed circuit and related devices
optimal estimates will be solved using the Levenberg–Marquardt are presented in Fig. 3, where the microprocessor unit (MCU)
(LM) method introduced in the following section. Teensy 3.6 powered by a 5 V battery is used as the core compu-
tational unit and a data log device. The IMU considered in this
work is called MPU-9255. Internal statuses of the MCU respond
III. PLATFORM DESIGN AND CALIBRATION ALGORITHM
via the LEDs, which helps end-users to complete the calibration
A. IMU Calibration Device Development process.
To fulfill a low-cost effective IMU calibration platform,
robustness, light weight, portability, and user-friendliness are B. IMU Calibration Data Collection Procedure
considered the chief design demands. For data collections of The calibration data can be collected sequentially in accor-
accelerometer and magnetometer, the calibration system must dance with the order of the numbers. The calibration procedure
be capable of providing various poses for the IMU. Hence, of the accelerometer is summarized in Fig. 4. In the beginning,
multiaxis motion stages [8] and robot arms with high degrees the IMU is left static at a certain pose for T seconds, then the
of freedom are usually implemented [9]. Contrary to expensive IMU is rotated to another different pose for another T seconds.
calibration systems, effective and smart mechatronics are more Repeat this process N times. During the measurement stages,
preferable to design. Moreover, the calibration process should raw data are collected and processed immediately. Note that
be made as simple as possible without a specific rotation scheme the minimum value of N depends on the number of unknown
[7]. variables, denoted as M, according to the prescribed sensor
To obtain a wide variety of observations, a regular icosahedron error model. Generally speaking, N is greater than or equal to
platform is developed, where the prototype is illustrated in M. The reason that the IMU has to be maintained static for T
Fig. 1(a) and (b). The platform is designed using the engineering seconds is that the accelerometer is assumed to measure the
graphics software SolidWorks. Fig. 2(a) illustrates the final gravitational acceleration g only. However, as pointed out in
model printed out by a 3-D printer. This portable platform [28], this requirement is somewhat difficult to be guaranteed in
can have up to 20 different postures, which provides sufficient most instances. Therefore, the following sections in this article
orientation information for the calibration of IMU accelerom- are going to prove that, using the proposed IWLMA, the outliers
eters. Moreover, an embedded computational unit, as shown in can be recognized and the corresponding weights would be fur-
Fig. 2(b), is used to realize the calibration algorithm online. It ther suppressed during the calibration process. Moreover, based
is mounted at the center of the icosahedron platform and is able on the illustration in Fig. 1(a), the change of the pose from one
to communicate with multiple IMUs through the I2C interface. surface to another can be detected automatically by computing
In regard to the icosahedron platform, each surface of the the included angle between two normal vectors measured from
device is marked with an ascending number from 1 to 20, the accelerometer. Once the variation of the included angle is

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
1470 IEEE/ASME TRANSACTIONS ON MECHATRONICS, VOL. 27, NO. 3, JUNE 2022

g is related to the local terrain, latitude, and other factors, this
article assumes the reference g = 9.8 m/s2 .
Similarly, the unknown parameters, measurement functions,
and the cost functions for the magnetometer calibration are
defined as
 T
θmag = smx smy smz bmx bmy bmz (9)
hm (mraw , θmag ) = Km (mraw + bm ) (10)
N 
 2
L (θmag ) = m2 − hm (mraw,k , θmag )2 (11)
k=1

In (11), m is the magnetic field vector and its magnitude is


related to the local terrain, latitude, and other factors. In this
study, the reference magnitude m = 32 μT is considered.
Based on cost functions (11) and (12), the LM method is
considered. The following equation considers a general form of
Fig. 4. IMU accelerometer data collection and calibration procedure.
the cost function:
N 
 2
L (θ) = x2 − h (xraw,k , θ)2 (12)
greater than 38°, the pose is identified as changed. This routine
k=1
is repeated until all the faces of the icosahedron platform are
browsed. The general form is applied to represent the cost function (11)
For magnetometer calibration, the measurement phase is not and (12) for parameter estimation analysis and it can be rewritten
necessarily static. This is because the measurement of the mag- in a more simple form as follows:
netometer is not sensitive to translational movement. Therefore,
one can continuously rotate the magnetometer till sufficient raw L (θ) = yN ×1 − fN ×1 2 (13)
data are collected. However, collecting a large amount of data where the variables in (13) are defined by
may cause a shortage of microprocessor memory. This issue can
 T
be solved by using recursive computations addressed later. yN ×1 = x1 2 x2 2 · · · xN 2 (14)
Based on the gravity and local magnetometer force, both of
the associated calibration reference models should be spheres. fN ×1 = [ f1 f2 · · · fN ] T (15)
However, for the uncalibrated accelerometer and magnetometer,
2
the measurement raw data usually shows biased ellipsoids due fk = h (xraw,k , θ) , k = 1, 2, . . . , N. (16)
to scaling errors and unknown offsets.
Let jk denote the Jacobian matrix of fk as follows:
C. Calibration Algorithm
According to (4), the unknown parameters for the accelerom- ∂ fk ∂fk ∂fk ∂fk
(jk )1×6 = = ··· , k = 1, 2, . . . , N
eter calibration are defined as follows: ∂θ ∂ sx ∂ sy ∂ bz
 T (17)
θacc = sax say saz bax bay baz (6) where jk represents a row vector. In addition, let J denote the
Jacobian matrix of f
As presented in [3], since va in (4) is white noise, the effect
∂f  T
can be removed by taking the data averaging under the data JN ×6 = = jT1 jT2 · · · jTN (18)
collection procedures. ∂θ
Based on this assumption, the accelerometer measurement According to the LM, under a given initial guess of θ , the
model is modified by correction step δθ can be calculated as follows:
ha (araw , θacc ) = Ka (araw + ba ) (7)   −1 T
δθ = JT J + λ · diag JT J J (y − f ) (19)
Theoretically, the magnitude of gravitational acceleration is Therefore, the parameter update law is
constant. Therefore, a cost function is defined as follows:
N  2 θt ← θt−1 + δθt−1 (20)
 2 2
L (θacc ) = g − ha (araw,k , θacc ) (8) In (19), λ is a damping factor that is used to adjust the
k=1
magnitude of correction step δθ. The larger λ is, the smaller
where k = 1 ∼ N represents the number of each sensor data, the correction step size δθ is. In (20), θt represents the latest
and g is the gravitational acceleration vector. Since the value of estimate of θ after each iteration.

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
PENG et al.: DESIGN OF AN EMBEDDED ICOSAHEDRON MECHATRONICS FOR ROBUST ITERATIVE IMU CALIBRATION 1471

D. Proposed IWLMA
In real-world applications, calibration of the IMU outside
laboratory-level environments may result in the IMU suffering
from unpredictable perturbations: sudden vibration, high g im-
pact, or magnetic distortion. Under these unpredictable situa-
tions, the collected data are going to be interfered by exogenous
perturbations. In addition, if the collected data has a cluster of
outliers, the conventional LM will lead to incorrect estimation
results.
Unlike the works [3], [11], [12], and [24], to deal with im-
perfect scenarios, an IWLMA is proposed and is integrated into
the developed mechatronics. The kernel concept is to design
different weights for each data point during the iterations. Put it
simply, by recognizing each outlier, the corresponding weight-
ing value is manipulated iteratively so that the impact brought
by those outliers can be significantly reduced.
Taking the procedures in (13)–(20), a preliminary optimal θ
is obtained. Note that the very first estimate could be deviated
from the actual value due to the existence of outliers.
The preliminary calibrated measurement output can be de-
Fig. 5. Flowchart of the proposed IWLMA for calibration.
scribed by

xo = h(xraw , θ) (21) where


∂fk 2 ∂fk
where xraw represents raw data. Based on the estimated θ, one ∂ sax = 2sax (araw,x,k + bax ) , ∂ bax = 2s2ax (araw,x,k + bax )
∂fk 2 ∂fk
∂ say = 2say (araw,y,k + bay ) , ∂ bay = 2s2ay (araw,y,k + bay )
can evaluate the mean for the calibration error εk , which is
∂fk 2 ∂fk
N ∂ saz = 2saz (araw,z,k + baz ) , ∂ bza = 2s2az (araw,z,k + baz )
1 
μ= εk , εk = x2 − xok 2 (22) (27)
N Demonstrations through simulations as well as experiments
k=1
that with the aid of (22)–(24) show that the weights of the
Further, define a standard deviation interfered data point are attenuated gradually. This feature leads
 to satisfactory calibration precision especially under perturbed
1 N
environments.
σ= (εk − μ) 2 (23)
N Fig. 5 summarizes the procedure of the proposed IWLMA
k=1
method. The proposed iteration algorithm consists of two main
Finally, the cost function is modified by the following form: loops. One is an outer loop, whereas the other is an inner loop.
The outer loop is used to adjust the weight of the input data
N
  2  2 according to (22)–(24), which provides great contribution for
|εk − μ|
L (θ) = exp − x2 − h (xraw,k , θ)2 outliers suppression; the inner loop is the main iteration section
κσ
k=1 for the optimal parameter searching and is also where high
(24)
computational resources are needed. For reproduction purposes,
where κ is an extra scaling factor used to modify the dissipation
the pseudocode of the proposed IWLMA is summarized in Table
property of the weight function. In (24), x represents g
I. Moreover, the proposed IWLMA can also be extended to a
and m whenever an accelerometer and magnetometer are
wide variety of optimal fitting problems.
considered, respectively.
In most studies, experimental data sets are obtained in the
Here, a calibration of the accelerometer is taken as an exam-
laboratory, which is without data interferences, so the data
ple. Based on (3), (6) and (7), (16) can be represented in detail
processing will be relatively simple. On the contrary, the method
by
proposed in this article can be used in general nonlaboratory-
fk = (sax (araw,x,k + bax ))2 + (say (araw,y,k + bay ))2 level environments. The developed IWLMA can be used to
(25) perform calibrations easily without the aid of other instruments.
+(saz (araw,z,k + baz ))2
Furthermore, the IWLMA is capable of overcoming the biased
where the subscript k denotes as the kth measurement. estimation in an environment with interferences.
For (25), the corresponding Jacobian vector (17) is
E. Microprocessor Recursive Realization
jk =∂∂θfacc
k

∂fk ∂fk ∂fk ∂fk ∂fk ∂fk (26) Recall the calibration process of the accelerometer where one
= ∂ sax ∂ say ∂ saz ∂ bax ∂ bay ∂ baz has to place the icosahedron platform at 20 different faces. Each

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
1472 IEEE/ASME TRANSACTIONS ON MECHATRONICS, VOL. 27, NO. 3, JUNE 2022

TABLE I TABLE III


PSEUDOCODE OF THE IWLMA PROCEDURE MAGNETOMETER IWLMA CALIBRATION PARAMETERS

recursive mean is applied


μk = k1 (x1 + · · · + xk−1 + xk )
= k−1
k k−1 (x1 + · · · + xk−1 ) +
1 1
k−1 xk (28)
k−1
= k μk−1 + k1 xk
In addition, examining the update law (19), the formula con-
tains a Jacobian matrix J ∈ RN ×6 and JT ∈ R6×N . If the matrix
JT J is well defined, λ = 0 can be directly applied and (19)
reduces to the so-called Gaussian–Newton method. Regarding
the declaration of the Jacobian matrix in the microprocessor,
construction of the matrix requires many independent variables
and thereby, resulting in memory burden. To address this prob-
lem, rewrite (19) under λ = 0 as follows:
Aδθ = Y (29)
where A := JT J and Y := JT (y − f ).
It is trivial to show that the solution of (29) is
−1
δθ = AT A AT Y (30)
Since (29) meets the standard form of least square, the well-
known recursive least square, which is stated as follows, can be
applied.
Step 1: Select an initial covariance matrix as P(0) = αI ∈
Rm×m and an initial guess δθ(0) ∈ Rm×1 . The dimension m =
6 in this study.
Step 2: Calculate the gain value
Pk aTk
Kk = ∈ Rm×1 (31)
1 + ak Pk−1 aTk
where ak ∈ R1×m represents the latest measurement row vector
in A.
Step 3: Update the estimate
TABLE II δθk = δθk−1 + Kk · (yk − ak δθk−1 ) (32)
ACCELEROMETER IWLMA CALIBRATION PARAMETERS
Step 4: Renew the covariance matrix
Pk+1 = [Im×m − Kk ak ] Pk (33)
Note that the recursive least square method poses two po-
tential weaknesses for finding the solution. First, the selection
of α should be large enough in order to approach the exact
least square solution as fast as possible. However, the estimated
solution may cause severe oscillations during transient conver-
face measures the three-axis raw data at a 400 Hz sampling rate gence. Applying these initial guesses still cause estimation bias
for T seconds and calculates their respective mean values. To compared to the analytic solution (30). Second, if the damping
save memory, the mean should be calculated recursively. Let xi , factor λ = 0, (31)–(33) cannot be directly applied. To solve the
i ∈ [1, k] be the raw measurement data from a single axis. The issues mentioned above, the following method is used instead.

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
PENG et al.: DESIGN OF AN EMBEDDED ICOSAHEDRON MECHATRONICS FOR ROBUST ITERATIVE IMU CALIBRATION 1473

TABLE IV
GRAVITY MEASUREMENT BY THE ACCELEROMETER BEFORE CALIBRATION

TABLE V
ABSOLUTE ERROR PERCENTAGE (%) OF THE MEASURED GRAVITY BEFORE CALIBRATION

TABLE VI
GRAVITY MEASUREMENT BY THE ACCELEROMETER AFTER CALIBRATION

TABLE VII
ABSOLUTE ERROR PERCENTAGE (%) OF THE MEASURED GRAVITY AFTER CALIBRATION

Define Γ(0) = 06×6 , then the square matrix JT J can be easily IV. SIMULATION DEMONSTRATION OF THE IWLMA
calculated by the following update law: To simulate the magnetic field, the magnitude of the reference
⎡ 2 ⎤
jk1 jk1 jk2 · · · jk1 jk6 magnetics force is set to be 32 μT. In the following simulations,
⎢ ∗ j2k2 · · · jk2 jk6 ⎥ it will be shown that after the calibration by using the presented
⎢ ⎥
Γk = Γk−1 + jTk jk = Γk−1 + ⎢ .. .. ⎥ (34) IWLMA, the distribution of the measurement data can be cen-
⎣ ∗ ∗ . . ⎦ tralized and the data fit the reference sphere very well even in
∗ ∗ ∗ j2k6 the presence of outliers.
where ∗ represents the associated symmetric element. Updating
(34) only requires 27 variables no matter how long the data
collection length is.
A. Magnetometer Reference Parameters Setting
In a similar manner, the term Y = JT (y − f ) can be exactly
replaced by the following update law: For an IMU, the magnetometer is the most sensitive device
⎡ ⎤ with respect to the external environment. Therefore, to demon-
jk1
⎢ jk2 ⎥ strate the effectiveness of the proposed IWLMA, the magne-
⎢ ⎥ tometer is taken as the example. The magnetometer parameters
Φk = Φk−1 + jTk (yk − fk ) = Φk−1 + ⎢ . ⎥ (yk − fk )
⎣ .. ⎦ Km,ref = diag (1.2306, 0.9927, 1.1609), bm,ref = [−3.6071
jk6 22.7945 −16.1675]T μT are considered as references. The ref-
(35) erence data points are perfectly located on the red grid spheres
As a result, the final update law will be as depicted in Figs. 6 and 7, respectively. In addition, 2 μT
Gaussian measurement noises as well as external electromag-
δθk = (Γk + λ · diag (Γk ))−1 Φk (36)
netic interferences, which are taken as measurement outliers,
which is equivalent to the result obtained by (19). But, the are considered simultaneously. Due to the presence of outliers,
computation memory can be saved significantly. Because of this it causes a non-Gaussian distribution of the measurement error
advantage, the platform is able to calibrate multiple IMUs at a and leads to a biased parameters estimation. In the following
time. sections, we are going to show that by using the proposed

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
1474 IEEE/ASME TRANSACTIONS ON MECHATRONICS, VOL. 27, NO. 3, JUNE 2022

Fig. 8. Magnetometer measurement residue and the corresponding


Fig. 6. Calibration of magnetometer in the presence of perturbed data weight of the IWLMA after the first iteration.
(pink region).

Fig. 9. Magnetometer measurement residue and the corresponding


weight of the IWLMA after the third iteration.
Fig. 7. Applying IWLMA after three iterations in the presence of per-
turbed data (pink region).
to the theoretical reference sphere, as shown in Fig. 7. Appar-
ently, adding the iterative weighting mechanism into the LM
IWLMA, precise parameter estimations can be achieved even optimization process provides great assistance to the suppression
in the presence of measurement outliers. of interference from the outliers.
Figs. 8 and 9 illustrate the detailed transient evolutions of the
B. Magnetometer Calibration Result weights during the iterations. It clearly shows that the weighting
values are determined adaptively according to their associated
To exemplify the main advantage of the proposed
residues. In general, the weights for the clear data are higher
method, in the following simulation, both noisy and
than those experiencing uncertain perturbations. For accelerom-
perturbed conditions are considered. Based on the cost
eters, one can also obtain similar results and therefore omit the
function (12), the estimated scaling factor and bias are
calibrations.
Km,LM A = diag[ 1.0198 1.0068 1.1574 ] and bm,LM A =
Based on the simulations, it is evident that by using the
[−6.2143 23.4583 −15.5620]T μT, respectively. Nevertheless,
proposed IWLMA, the weight of the outliers is going to be
due to the existence of outliers, the calibrated parameters
dissipated after iterations. As a result, the calibration precision
deviate from the true values. These incorrect parameters give
of the IMU parameters can be significantly improved especially
rise to a blue grid ellipsoidal magnetic field, which is shown in
for environments subject to external perturbations.
Fig. 6.
On the contrary, when applying the proposed IWLMA,
where κ = 2, the experiment leads to Km,IW LM A = V. EXPERIMENT VERIFICATION OF IMU CALIBRATION
ALGORITHM
diag[ 1.1891 0.9873 1.1540 ] and bm,IW LM A = [−3.9450
23.0972 −15.9281]T μT. Surprisingly, even after only three In the following, calibrations for an accelerometer and a
iterations, the resulting magnetic envelop is already very close magnetometer are conducted, separately. During the practical

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
PENG et al.: DESIGN OF AN EMBEDDED ICOSAHEDRON MECHATRONICS FOR ROBUST ITERATIVE IMU CALIBRATION 1475

Fig. 12. Gravity calibration comparison.

Fig. 10. Calibration steps using the developed icosahedron mecha-


tronics. (a) Illustration of pose change by end-users. (b) Firmware state
machine for pose change guidance.

Fig. 13. Proposed system used in real-world calibration procedure


for three-axis accelerometer. (a) Pose of Face-1. (b) Pose of Face-2.
(c) Pose of Face-3.

Fig. 11. Data collection of the accelerometer using the icosahedron


platform. clusters suffered from unknown perturbations during the data
collection. Therefore, the calibration algorithm must be capable
experiments, the developed icosahedron is rotated manually. of suppressing the effects caused by inevitable uncertainties. The
Numbers are engraved on each face, from 1 to 20, as shown in calibration results are summarized in Table II. After the IWLMA
Fig. 10(a). Of course, the timing for pose change will be counted calibration, the resulting gravity force is close to 9.8 m/s2 .
precisely and launched by status LEDs mounted on a kernel data Moreover, the calibrated data were precisely attached to the
processing unit as shown in Fig. 2, where the detailed circuit is reference gravity even in the presence of certain measurement
illustrated in Fig. 3. The processing unit has status LEDs and a outliers, as demonstrated in Fig. 11.
beeper. At proper timing, the processing unit will trigger a beep In order to demonstrate the effectiveness of this method,
and will blink LED green to inform end-users that it is ready for experimental results before and after the correction of the ac-
data collection. During the data collection, the LED turns red and celerometer are compared in detail. Obviously, Fig. 11 shows
the LED will be turned OFF once the data collection is completed. that after the calibration by using the presented IWLMA, the dis-
Consider the accelerometer calibration as an example, at the tribution of the measurement data can be centralized and the data
green LED stage, we need to make the icosahedron standstill. fit the reference sphere very well even in the presence of outliers.
Next, the data collection begins and the status LED is switched The associated experimental calibration details are summarized
to red for 10 s. Finally, when data collection is completed, in Tables III–VI, where the absolution error percentage is calcu-
the status LEDs will be switched OFF. At this moment, users lated by err = |g − gest |/g × 100%. Finally, Fig. 12 illustrates
can then rotate to the next face by following the numbers for the gravity estimation comparison w.r.t. the reference gravity
the next pose data collection. This procedure is going to be g = 9.8 m/s2 for the calibrations. Experiments show that using
executed 20 times. The operation procedure is illustrated in the proposed method, the calibrated data can fit the reference
Fig. 10(b). sphere with better precision.
Based on the procedure presented in Fig. 4, the associated Apparently, through the highly integrated software/hardware
data collection of the accelerometer is presented in Fig. 11. By codesign, the developed calibration portable mechatronics pro-
using the proposed icosahedron platform, the device collects vides a simple calibration process. In view of end-users, one can
20 data clusters. Since it is difficult to guarantee a purely easily complete calibration requirements anytime and anywhere,
static calibration environment, Fig. 11 shows that part of the regardless of environmental constraints.

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
1476 IEEE/ASME TRANSACTIONS ON MECHATRONICS, VOL. 27, NO. 3, JUNE 2022

Fig. 14. (a) Magnetometer calibration result for the first iteration, which
leads to an ellipsoid magnetic force. (b) Magnetometer calibration result
with ten iterations, which leads to a spherical magnetic force.

Fig. 13 demonstrates the real-world calibration procedure


as displayed in Fig. 4 and illustrated in Fig. 10, respectively. Fig. 15. Proposed system used in real-world calibration procedure for
During the practical calibration procedure, the proposed system three-axis magnetometer. (a) Pose at time instant t1 . (b) Pose at time
provides user-friendly steps: change to the next pose of the instant t2 . (c) Pose at time instant t3 . (d) Pose at time instant t4 .
icosahedron when the LED changes sign.
As pointed out by Wahdan et al. [29], the magnetometer VI. CONCLUSION
readings are usually affected by magnetic fields, other than the
earth’s field, and by other error perturbation sources. As a result, This article has considered the development of a low-cost,
calibration of a magnetometer is essential to providing a reliable portable and easy-to-use IMU calibration mechatronic system.
source of heading. The mathematical formulation of the IMU parameters estimation
During the practical calibration process, the magnetometer is presented in terms of a nonlinear cost function and is further
was also interfered with by external environment interferences solved using the proposed IWLMA. The proposed method is
such as unknown magnetic fields from other electrical devices. capable of suppressing uncertainties during the calibration pro-
Fig. 14 shows the experimental calibration result by using the cess and is suitable for high mobility demand, such as onsite
proposed IWLMA for the first iteration loop, which is identical recalibration. Based on the highly integrated hardware/software
to the traditional LMA. It is evident that due to the presence codesign, the developed icosahedron platform is able to provide
of external magnetic force perturbations, the data results in a immediate, efficient, and robust calibration results. Moreover,
serious distortion estimate. with the aid of the algorithm computation reorganization, a
According to the aforementioned analysis, the magnitude of significant amount of memory of the embedded system can be
the weights used in (24) is updated adaptively according to saved. As a result, the proposed platform is able to provide multi-
the residuals for each iteration. Therefore, the perturbed mag- ple IMU calibrations. Finally, the effectiveness of the proposed
netic forces are recognized as outliers and thus the associated system is verified by simulations and the advantage is further
weights are attenuated iteratively. In other words, the IWLMA validated by experiments as well. While providing systematic
simultaneously deals with nonlinear optimization problem and and user-friendly calibration procedures, the proposed system
decreases weights of outliers to attenuate biased calibration also achieves hardware/software’s highly integrated codesign
results. Fig. 14(a) illustrates the general LM method without without the use of expensive equipment.
any weight iteration. It can be seen that the cluster of outliers
influences final calibration results severely, contrary to Fig. 14(b) REFERENCES
where the IWLMA is applied. After the iterations, the weighting [1] L. Chang, F. Zha, and F. Qin, “Indirect Kalman filtering based attitude esti-
values of the outlier data become smaller and smaller so that the mation for low-cost attitude and heading reference systems,” IEEE/ASME
outliers will not influence calibration result. Thus, the proposed Trans. Mechatronics, vol. 22, no. 4, pp. 1850–1858, Aug. 2017.
[2] K. Wang, Y. Liu, and L. Li, “A simple and parallel algorithm for real-
method can lead to superior sphere fitting even in the presence time robot localization by fusing monocular vision and odometry/AHRS
of measurement outliers. sensors,” IEEE/ASME Trans. Mechatronics, vol. 19, no. 4, pp. 1447–1457,
The calibration results are summarized in Table VII. The Aug. 2014.
[3] D. Tedaldi, A. Pretto, and E. Menegatti, “A robust and easy to implement
resulting magnetic force at the location is 29.09 μT, where the method for IMU calibration without external equipments,” in Proc. IEEE
expected value at the experiment location is 32 μT according to Int. Conf. Robot. Autom., 2014, pp. 3042–3049.
the Central Weather Bureau, Taiwan. Experiments firmly verify [4] Z. F. Syed, P. Aggarwal, C. Goodall, X. Niu, and N. El-Sheimy, “A new
multi-position calibration method for MEMS inertial navigation systems,”
the effectiveness of the proposed method. Meas. Sci. Technol., vol. 18, pp. 1897–1907, 2007.
Finally, Fig. 15 demonstrates the real-world calibration pro- [5] A. Eldesoky, A. M. Kamel, M. Elhabiby, and H. Elhennawy, “Performance
cedure for the three-axis magnetometer. The user simply needs enhancement of low-cost MEMS inertial sensors using extensive calibra-
tion technique,” in Proc. 34th Nat. Radio Sci. Conf., 2017, pp. 415–424.
to continuously rotate the icosahedron with arbitrary poses. The [6] Q. Yuan, E. Asadi, Q. Lu, G. Yang, and I. Chen, “Uncertainty-based IMU
embedded system will launch a beep when a sufficient amount orientation tracking algorithm for dynamic motions,” IEEE/ASME Trans.
of measurements are collected. Mechatronics, vol. 24, no. 2, pp. 872–882, Apr. 2019.

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.
PENG et al.: DESIGN OF AN EMBEDDED ICOSAHEDRON MECHATRONICS FOR ROBUST ITERATIVE IMU CALIBRATION 1477

[7] M. Dai, C. Zhang, and J. Lu, “In-Field calibration method for DTG [29] A. Wahdan, J. Georgy, and A. Noureldin, “Three-dimensional magnetome-
IMU including g-sensitivity biases,” IEEE Sensors J., vol. 19, no. 13, ter calibration with small space coverage for pedestrians,” IEEE Sensors
pp. 4972–4981, Jul. 2019. J., vol. 15, no. 1, pp. 598–609, Jan. 2015.
[8] G. A. Aydemir and A. Saranlı, “Characterization and calibration of MEMS
inertial sensors for state and parameter estimation applications,” Measure-
ment, vol. 45, pp. 1210–1225, 2012.
[9] P. Zhang, X. Liu, and G. Du, “Online robot auto-calibration using IMU
with CMAC and EKF,” in Proc. IEEE Int. Conf. Cyber Technol. Autom.,
Chao-Chung Peng was born in Kaohsiung, Tai-
Control, Intell. Syst., 2015, pp. 896–901.
wan, in 1980. He received the B.S. and Ph.D.
[10] W. Ilewicz and A. Nawrat, “Direct method of IMU calibration,” in Ad-
degrees in control engineering from the Depart-
vanced Technologies for Intelligent Systems of National Border Security, ment of Aeronautics and Astronautics, National
A. Nawrat, K. Simek, and A. Świerniak, Eds. Berlin, Germany: Springer,
Cheng Kung University (NCKU), Tainan, Tai-
2013, pp. 155–171.
wan, in 2003 and 2009, respectively.
[11] I. Skog and P. Händel, “Calibration of a MEMS inertial measurement unit,”
From 2008 to 2009, he was a Research As-
in Proc. XVIIth IMEKO World Congr. Metrol. Sustain. Develop., 2006. sistant with the Department of Engineering, Le-
[12] U. Qureshi and F. Golnaraghi, “An algorithm for the in-field calibration of a
icester University, Leicester, U.K. From 2010 to
MEMS IMU,” IEEE Sensors J., vol. 17, no. 22, pp. 7479–7486, Nov. 2017.
2012, he was a Postdoctoral Fellow with the De-
[13] K. Choi, S. Jang, and Y. Kim, “Calibration of inertial measurement units
partment of Mechanical Engineering, NCKU. He
using pendulum motion,” Int. J. Aeronaut. Space Sci., vol. 11, pp. 234–239,
was a Senior Engineer with the Embedded System Development Sec-
2010.
tion, Measurement and Automation Department, ADLINK Technology,
[14] K. Draganová, P. Lipovský, and M. Šmelko, “IMU accelerometer and
Taipei, Taiwan, in 2012. From 2014 to 2016, he was with the Automation
magnetometer calibration using spectral analysis,” in Proc. XIIIth Int. Sci. and Instrumentation System Development Section, Iron and Steel Re-
Conf.—New Trends Aviation Develop., 2018, pp. 41–45.
search and Development Department, China Steel Corporation. Since
[15] L. Tao and D. Hongwang, “A camera-IMU system extrinsic parameter
2016, he has been an Assistant Professor with the Department of Aero-
calibration method,” in Proc. IEEE 2nd Inf. Technol., Netw., Electron.
nautics and Astronautics, NCKU. He was promoted as an Associated
Autom. Control Conf., 2017, pp. 1063–1066. Professor, in 2020. His research interests include high-performance
[16] J. Lv, A. A. Ravankar, Y. Kobayashi, and T. Emaru, “A method of low-
motion control and applications, unmanned vehicle design, advanced
cost IMU calibration and alignment,” in Proc. IEEE/SICE Int. Symp. Syst.
flight control system development, autonomous robotics, intelligence
Integration, 2016, pp. 373–378.
SLAM technology, system modeling, and diagnosis.
[17] D. Kim, S. Shin, and I. S. Kweon, “On-Line initialization and extrinsic Dr. Peng was awarded a membership in the Phi Tau Phi Scholastic
calibration of an inertial navigation system with a relative preintegration
Honor Society, in 2009, and was the recipient of the Excellent Young
method on manifold,” IEEE Trans. Autom. Sci. Eng., vol. 15, no. 3,
Engineering Professor Award by Chinese Society of Mechanical Engi-
pp. 1272–1285, Jul. 2018.
neers, in 2019.
[18] C. L. Gentil, T. Vidal-Calleja, and S. Huang, “3D Lidar-IMU calibration
based on upsampled preintegrated measurements for motion distortion
correction,” in Proc. IEEE Int. Conf. Robot. Autom., 2018, pp. 2149–2155.
[19] C. Jiachong, D. Dezhi, Y. Fei, Z. Ya, and F. Shiwei, “A swing online
calibration method of ship-based FOG-IMU,” in Proc. Forum Cooperative
Positioning Service, 2017, pp. 33–38.
[20] P. Schopp, L. Klingbeil, C. Peters, A. Buhmann, and Y. Manoli, “Sensor Jing-Jie Huang received the B.S. and M.S. de-
fusion algorithm and calibration for a gyroscope-free IMU,” Proc. Chem., grees in control engineering from the Depart-
vol. 1, pp. 1323–1326, 2009. ment of Aeronautics and Astronautics, National
[21] P. Aggarwal, Z. Syed, X. Niu, and N. El-Sheimy, “A standard testing Cheng Kung University, Tainan, Taiwan, in 2016
and calibration procedure for low cost MEMS inertial sensors and units,” and 2018, respectively.
J. Navig., vol. 61, pp. 323–336, 2008. His research interests include IMU calibration,
[22] J. C. Springmann and J. W. Cutler, “Attitude-independent magnetometer AHRS design, dynamics analysis, signal pro-
calibration with time-varying bias,” J. Guid., Control, Dyn., vol. 35, cessing, and optimization technology.
pp. 1080–1088, 2012.
[23] V. Renaudin, M. H. Afzal, and G. Lachapelle, “Complete triaxis magne-
tometer calibration in the magnetic domain,” J. Sensors, vol. 2010, 2010,
Art. no. 967245.
[24] R. Zhang, F. Hoflinger, and L. M. Reind, “Calibration of an IMU using
3-D rotation platform,” IEEE Sensors J., vol. 14, no. 6, pp. 1778–1787, Ho-Yang Lee was born in Yilan, Taiwan, in
Jun. 2014. 1995. He received the B.S. degree in control
[25] F. Ghanipoor, M. Hashemi, and H. Salarieh, “Toward calibration of low- engineering from the Department of Aerospace
precision MEMS IMU using a nonlinear model and TUKF,” IEEE Sensors and Systems Engineering, Feng Chia Univer-
J., vol. 20, no. 8, pp. 4131–4138, Apr. 2020. sity, Taichung, Taiwan, in 2017. He is currently
[26] M. Glueck, D. Oshinubi, and Y. Manoli, “Automatic realtime offset working toward the M.S. degree in control engi-
calibration of gyroscopes,” in Proc. IEEE Sensors Appl. Symp., 2013, neering with the Department of Aeronautics and
pp. 214–218. Astronautics, National Cheng Kung University,
[27] Y. H. Tu and C. C. Peng, “An ARMA-based digital twin for MEMS Tainan, Taiwan.
gyroscope drift dynamics modeling and real-time compensation,” IEEE He currently focuses on CAE, hardware de-
Sensors J., vol. 21, no. 3, pp. 2712–2724, Feb. 2021. sign and integration, and 3-D printer develop-
[28] G. Lu and F. Zhang, “IMU-based attitude estimation in the presence of ment. His research interests include system modeling, motor system
narrow-band noise,” IEEE/ASME Trans. Mechatronics, vol. 24, no. 2, diagnosis, and mechatronic system designs.
pp. 841–852, Apr. 2019.

Authorized licensed use limited to: Hong Kong University of Science and Technology. Downloaded on October 31,2024 at 09:26:33 UTC from IEEE Xplore. Restrictions apply.

You might also like