Magnetic field information plays an important role in determining the heading angle and attitude information
but it is highly susceptible to interference from surrounding ferromagnetic materials. The traditional ellipsoid fitting algorithm for magnetic field calibration requires high quality magnetometer data
which is not customer-friendly. This paper implemented a more convenient and accurate real-time magnetic field calibration using a smartphone-based platform. Firstly
according to the physical relationship between angular velocity and magnetic field
the state transition equation of magnetometer data was derived by using the gyro data recursively. The magnetometer measurements were used in the measurement equation
and the extended Kalman filter algorithm was used to complete the real-time EKF magnetic field compensated by the gyroscope. Then
the data from the magnetometer and the gyroscope were retrieved in real time on the mobile phone
and a real-time EKF magnetic field calibration operation was performed on the two
producing the calibration result as the output.It was then compared with the uncalibrated data and the calibration data obtained via the ellipsoid fitting algorithm.During the comparison experiment
the gyroscope compensation algorithm can not only achieve real-time calibration with any change to the external magnetic field environment
but can also complete the calibration of the magnetometer data within 2 s. In terms of calibration accuracy
when the mobile phone is stationary
the EKF algorithm can reduce the magnetic field interference in real time
with the value of the quality parameter
Q
of the calibration being 0.72.When the mobile phone is wound around "8"
the quality parameter
Q
of the calibration is observed to be 0.53
which is better than 0.03 - its value for the ellipsoid fitting algorithm. When four scenarios of daily activities on the mobile phone are simulated
the quality parameters
Q
obtained are 0.73
0.54
0.52
and 0.48
respectively
and in these cases
the ellipsoid fitting algorithm is observed to be incapableof calibration. Thus
real-time
high-precision
easy-to-use magnetic field calibration is achieved. Experimental testsdemonstrate that the magnetic field calibration method based on extended Kalman filter can dynamically calibrate magnetic field interference in real time. Its calibration speed is fast
its precision is high
and its anti-interference ability is adequate. Therefore
it has a wide range of applications in consumer electronics
LIU G X, SHI L F. An overview about development of indoor navigation and positioning technology [J]. Journal of Navigation and Positioning , 2018, 6(2): 7-14. (in Chinese)
PAN X F, MU H, HU X P. A survey of autonomous navigation technology for individual solder [J]. Navigation Positioning and Timing , 2018, 5(1): 1-11. (in Chinese)
PEI L, LIU D H, QIAN J C. A survey of indoor positioning technology and application [J]. Navigation Positioning and Timing , 2017, 4(3): 1-10. (in Chinese)
WANG Y J, LI ZH, LI X. Research of heading measurement for UAV based on combined filter [J]. Application of Electronic Technique , 2018, 44(2): 39-43. (in Chinese)
ZHANG X M, ZHAO Y. New auto-calibration and compensation method for vehicle magnetic field based on ellipse restriction [J]. Chinese Journal of Scientific Instrument , 2009, 30(11):2438-2443. (in Chinese)
ZHOU N B, WANG Y B, WANG Q. A brief review of geomagnetic navigation technology [J]. Journal of Navigation and Positioning , 2018, 6(2): 15-19. (in Chinese)
ZHOU J, GE ZH L, SHI G G, et al .. Development and key technologies of geomagnetic navigation [J]. Journal of Astronautics , 2008, 29(5): 1467-1472. (in Chinese)
YANG B F, FAN B Y, XU J M, et al .. Research on error compensation in geomagnetic field measurement based on least squares [J]. Journal of Air Force Engineering University ( Natural Science Edition ), 2017, 18(6): 34-39. (in Chinese)
QIN G, GUNA X Y, LI W SH. Compensation method of magnetic field error of three dimensional vector based on ellipsoid compensation [J]. Electronic Measurement Technology , 2018, 41(2): 34-39. (in Chinese)
WU Y, PEI L.Gyroscope calibration via magnetometer [J]. IEEE Sensors Journal , 2017, 17(16): 5269-5275.
WU Y, ZOU D, LIU P, et al .. Dynamic magnetometer calibration and alignment to inertial sensors by kalman filtering [J]. IEEE Transactions on Control Systems and Technology , 2018, 26(2): 716-723.
ZHU J L, WANG X Q, WU P L, et al .. Three-dimensional magnetic compass error compensation algorithm based on ellipsoid surface fitting [J]. Journal of Chinese Inertial Technology , 2012, 20(5): 562-566. (in Chinese)
MARKOVSKY I, VAN H S. Overview of total least-squares methods [J]. Signal Processing , 2007, 87(10): 2283-2302.
SABATINI A M. Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing [J]. IEEE transactions on bio-medical engineering , 2006, 53(7): 1346-1356.
宋丽英.角速度和旋转矩阵导数的分析[J].甘肃工业大学学报, 1993(4):100-106.
SONG L Y. Analysis of angular velocity and rotation matrix derivative [J]. Journal of GanSu University of Technology , 1993(4):100-106. (in Chinese)