Professional Documents
Culture Documents
Simplification of Calibration of Low-Cost MEMS Accelerometer and Its Temperature Compensation Whitout Accurate Laboratory Equipment
Simplification of Calibration of Low-Cost MEMS Accelerometer and Its Temperature Compensation Whitout Accurate Laboratory Equipment
Simplification of Calibration of Low-Cost MEMS Accelerometer and Its Temperature Compensation Whitout Accurate Laboratory Equipment
PAPER
Simplification of calibration of
low-cost MEMS accelerometer and its
temperature compensation without
accurate laboratory equipment
Saeed Khankalantary1, Saeed Ranjbaran2 and Saeed Ebadollahi2
1
Department of Electrical and Computer Engineering, Isfahan University of Technology, Isfahan, Iran
2
Department of Electrical Engineering, Iran University of Science and Technology, Tehran, Iran
E-mail: s_ranjbaran@alumni.iust.ac.ir
Abstract
A nonlinear cost function is defined for field calibration of the accelerometer, using the
rule that the norm of the measured vector in a static state is equal to the magnitude of the
gravity vector. To solve this cost function, various optimization methods like Newton and
Levenberg–Marquardt have been presented in different references. However, these methods are
complicated, time-consuming, and require an initial value. This study presents a method that
simplifies the cost function and obtains the error coefficients, including bias, scale factor, and
non-orthogonality using the linear least-squares method which is simpler and faster than other
optimization methods and does not need initial values. Also, the output of the low-cost MEMS
accelerometer depends on temperature due to its silicon property. Thus, by finding the
dependency of the error coefficients on temperature, they can be compensated. This paper
models dependency of error coefficients on temperature using cubic spline interpolation and
minimizes the temperature effect. Simulation results of MATLAB and the proposed field
calibration method and temperature compensation on the low-cost MPU6050 sensor show its
good performance.
Keywords: field calibration, temperature, bias, scale factor, non-orthogonality
1. Introduction [6]. These errors can be divided into two systematic and ran-
dom groups. Systematic errors like bias, scale factor, and non-
Today, MEMS accelerometers have found wide applications orthogonality can be compensated through a proper calibration
in a variety of industries and devices like robotics, physical method but random errors cannot be compensated easily due to
therapy and home-based rehabilitation, aeronautics, medicine, their random nature [7, 8]. Conventional calibration methods
mobile, tablet, etc, due to their low cost, small size, and low employ laboratory equipment like a centrifuge, a rate table,
power consumption [1–3]. The accelerometer is used in iner- and a temperature chamber to estimate error coefficients of
tial navigation systems to estimate the position and velocity the accelerometer is called laboratory calibration. Six-position
of the device when GPS signals are not available. Besides, calibration method can be mentioned as the most common and
the calibrated accelerometer is used to calibrate gyroscopes oldest laboratory calibration method in which accelerometer
[4, 5]. But, MEMS accelerometers are not accurate due to con- is installed on the table and it can be placed in six differ-
struction faults, installation faults, and external disturbances ent static positions; bias coefficient and scale factor are also
obtained where comparison reference of this method for the But, in the methods mentioned above for accelerometer cal-
sensor is gravity vector [9]. Furthermore, the accuracy of this ibration, the effect of temperature on the error coefficients has
method depends on the alignment of the sensor’s body and not been considered. Due to the high sensitivity of silicon to
table [10]. This method cannot estimate non-orthogonality and temperature, MEMS sensors which are made from silicon are
a method is proposed in [11] introduces enhanced six-position highly dependent on temperature compared to other optical or
method through which all three coefficients can be obtained. In mechanical sensors [34]. To study the behavior of sensors in
2002, Shin and El-Sheimy proposed a general multi-position different temperatures, the chamber is used in which temper-
in which sensors are placed in more than six positions, hence ature varies from −40 ◦ C to +80 ◦ C. Two common methods
calibration accuracy was increased [12]. for thermal calibration of inertial sensors are Soak and Ramp
In order to increase accuracy and obtaining more error methods. In the Soak method, the temperature is kept constant
coefficients like nonlinear scale factor, other equipment like at different points by the chamber and after stabilization at the
a centrifuge and mechanical arm have been used [13–15]. specific temperature (1–3 h), calibration is performed. But, in
Along with these equipment, other methods like Kalman Fil- the Ramp method, calibration is performed while the temper-
ter, nonlinear least squares and other optimization methods are ature is changed linearly several times so that the sensor exper-
used to increase the accuracy of obtaining error coefficients iences all temperatures to obtain dependency of error paramet-
[16–19]. ers on the temperature [9].
But laboratory calibration methods are very time consum- For thermal calibration of the accelerometer, the sensor is
ing and costly, therefore such methods are not cost-efficient placed in different positions using the positioning table in the
for MEMS sensors and sometimes calibration cost would chamber and the error coefficients are obtained in each tem-
be higher than the sensor’s price. Moreover, these methods perature. In the second step, the dependency of these coef-
require accurate equipment where the error of these equipment ficients is obtained using various methods. For example in
also affects the calibration procedure significantly [20, 21]. [35, 36] bias, in [37] bias and scale factor and in [38–40] bias,
Furthermore, after calibrating sensors and installing them on scale factor and non-orthogonality have been considered as
the device, they should be calibrated again after a short while a temperature-dependent polynomial and regression methods
due to installation errors and environmental conditions. There- have been used to obtain coefficients of these polynomials.
fore, fast and cheap methods that do not require accurate labor- In addition to regression, other methods have also been used
atory equipment are required for calibrating MEMS sensors; to model the dependency of the accelerometer coefficients
such methods are called field calibration methods. In these on temperature. Authors of [16] have used the neural-fuzzy
methods, natural rules like gravity vector are used instead of method and authors of [41, 42] have used neural networks to
accurate equipment [22]. compensate the temperature of the accelerometer.
Field calibration methods are around since 1995 when Fer- As mentioned, the above methods use the chamber to cal-
raris introduced field calibration method in [23]. In this ref- ibrate the accelerometer which is costly and time-consuming.
erence, accelerometer and gyroscope are calibrated without Unlike conventional methods, this study uses a simple device
accurate laboratory equipment and their bias and scale factors like a fan or a hairdryer to change the temperature of the sensor
are obtained. In 1998, Lötters et al calibrated accelerometer instead of the chamber and expensive devices, and dependency
using a static edge detector without equipment [24]. But in of the sensors’ error coefficients is obtained using cubic spline
both methods, the non-orthogonality coefficient is neglected interpolation and compensated.
and El-Sheimy and Shin have improved this and obtained the The rest of this paper is organized as follows. Section 2
non-orthogonality factor [12]. In this reference, authors have describes the output model of the accelerometer. In section 3,
employed the rule that the norm of the vector measured by the the proposed field calibration method for obtaining the
accelerometer in static conditions is equal to the input vector error coefficients, including bias, scale factor, and non-
(gravity vector). orthogonality is introduced. In section 4, the dependency of the
Using the above rule, a nonlinear cost function is defined error coefficients on temperature is modeled. Section 5 com-
for calibration of the accelerometer and gyroscope which pares the results of calibrating the accelerometer and temper-
different studies try to solve it using different optimization ature compensation simulated in MATLAB with conventional
methods like Newton, quasi-Newton, Powel, AFSA and other methods. Section 6 presents the results of calibration and tem-
algorithms and have obtained calibration coefficients of the perature compensation on the MPU6050 sensor. Finally, the
sensor [1, 25–30]. Auxiliary sensors like magnetometer, GPS, paper is concluded in section 7.
camera, and accurate IMU sensors can be used to calibrate
inertial sensors, but these methods like laboratory methods 2. Output model of the accelerometer
are costly and depend on the calibrated and accurate auxili-
ary sensors [31–33]. In this paper, to obtain the error coeffi- As mentioned before, the sensor’s output is not accurate due
cients of the accelerometer include bias, scale factor, and non- to error factors. These errors are considered as parameters of
orthogonality, the measurement vector norm law is used with the output that can be obtained and compensated through cal-
a proper variable change to simplify the nonlinear cost func- ibration. Accelerometer’s output in this paper is considered as
tion, and calibration is performed using the linear least-squares below equation [10, 20]
method which is simpler and faster than other optimization
methods. ⃗am = S⃗a + ⃗b + M⃗a +⃗n (1)
2
Meas. Sci. Technol. 32 (2021) 045102 S Khankalantary et al
T
where ⃗am = [amx amy amz ] is the measured acceleration vector Moreover, since non-orthogonality coefficients are small,
T their square can be neglected, thus equation (4) is simplified
sensor, ⃗a =[ax ay az ] is the real acceleration vector,
by the
sx 0 0 as follows
S = 0 sy 0 is the scale factor matrix, ⃗b = [bx by bz ]
T
∥⃗a∥ = g2 = k211 a2mx + 2k21 k22 amx amy + 2k31 k33 amx amz
0 0 sz
0 0 0 − 2b1 k11 amx − 2b2 k21 amx − 2b3 k31 amx + k222 a2my
is the bias vector, M = m1 0 0 is the non-orthogonality + 2k32 k33 amy amz − 2k22 b2 amy − 2k32 b3 amy
m2 m3 0
+ k233 a2mz − 2b3 k33 amz + b21 + b22 + b23 (6)
matrix and ⃗n is a Gaussian noise vector with zero mean and
standard deviation of σ. Now, the above equation can be rewritten as equation (7)
3. Field calibration of the accelerometer − a2mz
1 2
In the field calibration methods, nature laws are used to the = [amx 2amx amy 2amx amz 2amx a2my 2amy amz 2amy 2amz 1]∗
k233
absence of accurate laboratory devices. Here, the earth gravity 2
k11
vector is used as the reference. The main idea is similar to the k k
multiple position laboratory test and describes that magnitude 21 22
k31 k33
of the measured acceleration in static state is equal to the mag-
b1 k11 + b2 k21 + b3 k31
nitude of the gravity vector plus error factors, and this law is 2
k22 .
described as in equation (2) [26, 28].
k k
32 33
2
∥⃗a∥ = a2x + a2y + a2z = ∥⃗g∥ .
2
(2) 22 2
k b + k b
32 3
b3 k33
Using this law and putting the sensor in n different posi- b1 + b2 + b3 − g
2 2 2 2
4
Meas. Sci. Technol. 32 (2021) 045102 S Khankalantary et al
Table 1. Estimation of error coefficients using proposed field calibration and comparison with other methods in MATLAB.
Error coefficients Real value Newton method Levenberg–Marquardt method Proposed method
5
Meas. Sci. Technol. 32 (2021) 045102 S Khankalantary et al
6
Meas. Sci. Technol. 32 (2021) 045102 S Khankalantary et al
that its temperature variation is very small and not reliable and
it has used laboratory devices for calibration and finding the
error coefficients. Since the proposed method is a field method,
it requires no external device, and the bias, scale factor, and
non-orthogonality coefficients are obtained by manual move-
ment of the sensor and putting it in different static states.
Temperature compensation is carried out by changing the tem-
perature using a simple device like a hairdryer. The temper-
ature varies from 30 ◦ C to 75 ◦ C and vice versa. A loop is
Figure 9. MEMS MPU6050 accelerometer error after calibration generated because the sensor might show different behavior
with different methods along Y axis. while increasing and decreasing the temperature, therefore,
this effect is reduced well by creating the loop and consider-
ing both increasing and decreasing temperatures. Also, if the
This figure shows the temperature dependency of the error output of the hairdryer hits the sensor directly, noise is gener-
coefficients. ated. To resolve this problem, the sensor is covered by a small
To investigate the temperature dependency of the error porcelain bowl so that the heat does not hit it directly. This
coefficients, most studies use the chamber. But [49] has used a increases the run time of the experiment compared to when
cooler and heater fan, as shown in figure 12 and authors of [45] the warm wind hits the sensor directly, but this is unavoidable
have used no device to compensate for the temperature effect for preventing noise generation.
7
Meas. Sci. Technol. 32 (2021) 045102 S Khankalantary et al
ORCID iDs
The sensor is put in various static states manually while
changing the temperature, and the accelerometer output is Saeed Ranjbaran https://orcid.org/0000-0001-5879-3371
recorded in each temperature. The error coefficients are Saeed Ebadollahi https://orcid.org/0000-0003-2772-5880
obtained at different temperatures using the proposed calib-
ration method, and their temperature dependency is calcu-
lated using the cubic spline method. Similar to the previous References
section, to validate the obtaining temperature dependency of
the error coefficients using the cubic spline method, the sensor [1] Belkhouche F 2018 A differential accelerometer system:
offline calibration and state estimation IEEE Trans.
is installed on a three-axis positioning table, put in differ-
Instrum. Meas. 68 3109–18
ent positions, and the sensor temperature is changed between [2] Glueck M, Oshinubi D, Schopp P and Manoli Y 2013
30 ◦ C to 40 ◦ C using a hairdryer. Real-time autocalibration of MEMS accelerometers IEEE
MSE values of the MEMS MPU6050 accelerometer before Trans. Instrum. Meas. 63 96–105
calibration, after field calibration without temperature com- [3] Yurtman A and Barshan B 2014 Automated evaluation of
physical therapy exercises using multi-template dynamic
pensation and after field calibration with temperature com-
time warping on wearable sensor signals Comput. Methods
pensation, are given in table 5. Programs Biomed. 117 189–207
[4] Li Y, Georgy J, Niu X, Li Q and El-Sheimy N 2015
Autonomous calibration of MEMS gyros in consumer
7. Conclusion portable devices IEEE Sens. J. 15 4062–72
[5] Olivares A, Olivares G, Gorriz J and Ramirez J 2009
Accuracy of the MEMS accelerometer is reduced due to the High-efficiency low-cost accelerometer-aided gyroscope
presence of various errors, and it does not perform well; calibration 2009 Int. Conf. on Test and Measurement
pp 354–60
calibration can be used to reduce these errors. But laborat- [6] Cai Q, Yang G, Song N and Liu Y 2016 Systematic calibration
ory calibration methods are not proper for low-cost MEMS for ultra-high accuracy inertial measurement units Sensors
sensors because they are costly and time-consuming, require 16 940
8
Meas. Sci. Technol. 32 (2021) 045102 S Khankalantary et al
[7] Aggarwal P 2010 MEMS-Based Integrated Navigation [29] Tedaldi D, Pretto A and Menegatti E 2014 A robust and easy
(London: Artech House) to implement method for IMU calibration without external
[8] Secer G and Barshan B 2016 Improvements in deterministic equipments 2014 IEEE Int. Conf. on Robotics and
error modeling and calibration of inertial sensors and Automation (ICRA) pp 3042–9
magnetometers Sensors Actuators A 247 522–38 [30] Ma L, Chen W, Li B, You Z and Chen Z 2014 Fast field
[9] Titterton D, Weston J L and Weston J 2004 Strapdown Inertial calibration of MIMU based on the Powell algorithm
Navigation Technology vol 17 (London: IET) Sensors 14 16062–81
[10] Syed Z, Aggarwal P, Goodall C, Niu X and El-Sheimy N 2007 [31] Brink K and Soloviev A 2012 Filter-based calibration for an
A new multi-position calibration method for MEMS inertial IMU and multi-camera system 2012 IEEE/ION Position
navigation systems Meas. Sci. Technol. 18 1897 Location and Navigation Symp. (PLANS) pp 730–9
[11] Niu X-J, Gao Z-Y, Zhang R and Chen Z-Y 2002 Satellite TV [32] Ilewicz W and Nawrat A 2013 Direct method of IMU
antenna attitude stabilization system based on calibration Advanced Technologies for Intelligent Systems
micromachined inertial sensors J. Chin. Inertial Technol. of National Border Security (Berlin: Springer) pp 155–71
5 002 [33] Renaudin V and Combettes C 2014 Magnetic, acceleration
[12] Shin E-H and El-Sheimy N 2002 A new calibration method for fields and gyroscope quaternion (MAGYQ)-based attitude
strapdown inertial navigation systems Z. Vermess 127 1–10 estimation with smartphone sensors for indoor pedestrian
[13] Wang S and Ren S 2015 Calibration of cross quadratic term of navigation Sensors 14 22864–90
gyro accelerometer on centrifuge and error analysis Aerosp. [34] Fontanella R, Accardo D, Caricati E, Cimmino S,
Sci. Technol. 43 30–36 De Simone D and Lucignano G 2017 Improving inertial
[14] Choi K-Y Jang S-A, and Kim Y-H 2010 Calibration of inertial attitude measurement performance by exploiting MEMS
measurement units using pendulum motion Int. J. Aeronaut. gyros and neural thermal calibration AIAA Information
Space Sci. 11 234–9 Systems-AIAA Infotech@ Aerospace p 1134
[15] Pan J, Zhang C and Cai Q 2014 An accurate calibration [35] Ma L, Chen W W, Li B, Chen Z G and You Z 2014 Thermal
method for accelerometer nonlinear scale factor on a modeling and compensation of MEMS accelerometer Appl.
low-cost three-axis turntable Meas. Sci. Technol. Mech. and Mater. (Stafa-Zurich: Trans Tech Publications)
25 025102 668–669 1015–18
[16] Wang L and Wang F 2011 Intelligent calibration method of low [36] Ruzza G, Guerriero L, Revellino P and Guadagno F 2018
cost MEMS inertial measurement unit for an FPGA-based Thermal compensation of low-cost MEMS accelerometers
navigation system Int. J. Intell. Eng. Sys. 4 32–41 for tilt measurements Sensors 18 2536
[17] Eskin M 2006 Design of an inertial navigation unit using [37] Encarnacao J, Save H, Siemes C, Doornbos E and Tapley B
MEMS sensors A Design Project Report Presented to the 2017 Temperature corrected-calibration of GRACE’s
Engineering Division of the Graduate School of Cornell accelerometer AGU Fall Meeting Abstracts
University (January 2006) [38] Wang Q, Li Y and Niu X 2016 Thermal calibration procedure
[18] Gao P, Li K, Wang L and Liu Z 2016 A self-calibration and thermal characterisation of low-cost inertial
method for accelerometer nonlinearity errors in triaxis measurement units J. Navig. 69 373–90
rotational inertial navigation system IEEE Trans. Instrum. [39] Günhan Y and Ünsal D 2014 Polynomial degree determination
Meas. 66 243–53 for temperature dependent error compensation of inertial
[19] Lu J, Lei C, Liang S and Yang Y 2017 An all-parameter sensors 2014 IEEE/ION Position, Location and Navigation
system-level calibration for stellar-inertial navigation Symp.-PLANS 2014 pp 1209–12
system on ground IEEE Trans. Instrum. Meas. [40] Gheorghe M 2016 Advanced calibration method, with thermal
66 2065–73 compensation, for 3-axis MEMS accelerometers Rom. J.
[20] Liu B, Wei S, Su G, Wang J and Lu J 2018 An improved fast Inf. Sci. Technol. 19 255–68
self-calibration method for hybrid inertial navigation [41] Araghi G 2018 Temperature compensation model of MEMS
system under stationary condition Sensors 18 1303 inertial sensors based on neural network 2018 IEEE/ION
[21] Wang S, Yang G and Wang L 2019 An improve hybrid Position, Location and Navigation Symp. (PLANS) pp
calibration scheme for strapdown inertial navigation system 301–9
IEEE Access 7 151669–81 [42] Xu D, Yang Z, Zhao H and Zhou X 2016 A temperature
[22] Poddar S, Kumar V and Kumar A 2017 A comprehensive compensation method for MEMS accelerometer based on
overview of inertial sensor calibration techniques J. Dyn. LM_BP neural network 2016 IEEE SENSORS pp 1–3
Syst. Meas. Control 139 011006 [43] Fong W, Ong S and Nee A 2008 Methods for in-field user
[23] Ferraris F, Grimaldi U and Parvis M 1995 Procedure for calibration of an inertial measurement unit without external
effortless in-field calibration of three-axial rate gyro and equipment Meas. Sci. Technol. 19 085202
accelerometers Sens. Mater. 7 311–30 [44] Niu X, Li Y, Zhang H, Wang Q and Ban Y 2013 Fast thermal
[24] Lötters J C, Schipper J, Veltink P, Olthuis W and Bergveld P calibration of low-grade inertial sensors and inertial
1998 Procedure for in-use calibration of triaxial measurement units Sensors 13 12192–217
accelerometers in medical applications Sensors Actuators [45] Yang J, Wu W, Wu Y and Lian J 2012 Thermal calibration for
A 68 221–8 the accelerometer triad based on the sequential
[25] Ye L, Guo Y and Su S W 2017 An efficient autocalibration multiposition observation IEEE Trans. Instrum. Meas.
method for triaxial accelerometer IEEE Trans. Instrum. 62 467–82
Meas. 66 2380–90 [46] McKinley S and Levine M 1998 Cubic spline interpolation
[26] Qureshi U and Golnaraghi F 2017 An algorithm for the Coll. Redwoods 45 1049–60
in-field calibration of a MEMS IMU IEEE Sens. J. [47] Jorion P 2000 Value at risk
17 7479–86 [48] Qu D, Lu Y, Tao Y, Wang M, Zhao X and Lei X 2019 Study of
[27] Ren C, Liu Q and Fu T 2015 A novel self-calibration method laser Gyro temperature compensation technique on LINS
for MIMU IEEE Sens. J. 15 5416–22 2019 26th Saint Petersburg Int. Conf. on Integrated
[28] Särkkä O, Nieminen T, Suuriniemi S and Kettunen L 2017 A Navigation Systems (ICINS) pp 1–6
multi-position calibration method for consumer-grade [49] Reginya S, Nikolaenko V, Voronov R, Soloviev A, Sikora A
accelerometers, gyroscopes, and magnetometers to field and Moschevikin A 2018 MEMS sensors bias thermal
conditions IEEE Sens. J. 17 3470–81 profiles classification using machine learning