Research on the Calibrated Method for MEMS Magnetometer Arrays

The MEMS magnetometer determines the orientation for the MEMS inertial system. Because of the large noise of the MEMS magnetometer and the interference of soft and hard iron outside, the measurement error of the MEMS magnetometer is large. To reduce the effects of the random noises, the MEMS magnetometer arrays are designed in this paper. In our design, thirty-two MEMS magnetometers are welding on a printed circuit board (PCB), which area is 5×5 cm2. The forty general-purpose input-output (GPIO) ports, which are thirty-two data ports and eight clock ports, are used to collect the data of MEMS magnetometers. Then, averaging the thirty-two measurements of the MEMS magnetometers, the random noises of the measurements of the MEMS magnetometers can be reduced. Based on the averaging operation for the collected sensors' data, a unified measurement model for the MEMS magnetometer arrays is constructed. Using the unified measurement model, an adaptive Kalman filter is developed to estimate the unknown parameters. To validate the performance of the MEMS magnetometer arrays, the simulation and experimental tests are designed. The test results show that, comparing with the single MEMS magnetometer, the random noises of the MEMS magnetometer arrays are reduced effectively.


I. INTRODUCTION
MEMS magnetometer is an important orientation reference in Micro Strapdown Inertial Navigation System (MSINS) [1]. By measuring the geomagnetic vector and comparing the measured magnetic vector with the geomagnetic vector, the carrier orientation information can be calculated [2][3]. However, the geomagnetic vector is easily disturbed by the external environment, which affects the accuracy of azimuth information measurement. Therefore, it is necessary to calibrate the outputs of MEMS magnetometer and use the calibrated data for azimuth calculation to improve the measurement accuracy [4][5].
At present, the MEMS magnetometer calibration methods are mainly divided into two categories: one is with the external equipment auxiliary, such as turntable; the other is autonomous calibration [6]. Among them, the autonomous calibrated method has become the main research topic of MEMS magnetometer calibration due to its advantages of simple calibration and low external equipment complexity [7][8][9][10][11][12][13]. In reference [7][8][9], a calibration method based on ellipsoid fitting principle is proposed. By analyzing the measurement model of MEMS magnetometer, the ellipsoid model under the parameter model is established, and the error parameters are algebraically combined. The least square algorithm is used to calculate the parameters and complete the calibration process. But this method cannot achieve the optimization of calibration results, because all parameters are only used once. For this reason, a two-step calibration method is proposed in references [10][11], which uses the least square method to calculate the initial value of the unknown parameters, and then uses the iterative model to optimize the calibration results, which improves the calibrated accuracy. Due to the measurement noises are contained in the parameter model, and the bias errors for parameter model are generated by these noises, thus the estimated unknown parameters always contain bias error. In [12], a maximum likelihood estimation method is proposed to suppress the influence of the measurement noises. However, this method needs to constructed a large Jacobian and Hessian matrices, these increasing the computational burden.
In this paper, a MEMS magnetometer arrays module is designed, and the calibrated method based on Adaptive Kalman filter is investigated. The advantages of the proposed method can be summarized as: firstly, to reduce the influence of the measurement noises, a unified processing method is proposed, and the parallel data acquisition is introduced; secondly, an iterative parameter estimation method based on Adaptive Kalman Filter (AKF) is proposed to reduce the computational burden; finally, taking advantage of the AKF, the calibrated results can be obtained at real-time.
This paper is organized as follows. Section II presents a measurement model of MEMS magnetometer. Then, the unified model and the parameter estimated method with the AKF are investigated in Section III. Section IV gives the simulation and experiment tests are designed to evaluate the performance of the proposed method. The conclusions are summarized in Section V.

II. THE MEASUREMENT MODEL OF MEMS MAGNETOMETER
The measurement error of magnetometer mainly comes from external environment interference and device design defects. Its full parameter measurement model can be expressed as [7]: Where, f S represents scale factor, no C represents nonorthogonal matrix, si C represents soft iron interference error, b n C represents direction cosine matrix from navigation frame to body frame, n m represents magnetic field vector under navigation system, hi b represents hard iron interference error, m b represents bias error, m η represents random noise.
In this paper, the navigation frame is defined as the North-East-Up (ENU) frame, and the carrier coordinate system is defined as the right front upper coordinate system.
Assuming the parameters f S , no C , si C , hi b , and m b are constant, it is reasonable because the soft iron and the hard iron are not change when the calibration is carried on the same position. Then, (2) can be simplified as where, Based on the aforementioned analysis, the measurement model of the MEMS magnetometer is given by (3). In the next section, we will give the measurement model for the MEMS magnetometer arrays, and the unified calibration method based on the adaptive Kalman filter is investigated.

A. The Unified Measurement Model
From (3), one measurement model of the magnetometer arrays can be given by: where, 1 i N   denotes the ith MEMS magnetometer of the arrays; i b denotes the body frame of the ith magnetometer.
It can be seen from reference [12] that the traditional parameter estimation based on the least square method will be affected by the random noise in the measurement model and cannot achieve the optimal estimation of the parameters. However, the maximum likelihood estimation and other methods are used to calibrate the parameters, which leads to the defect that the amount of calculation increases and the real-time calibration is impossible. In this paper, MEMS magnetometer arrays are used to optimize the calibration process, and iterative least square method is used to estimate the unknown parameters, with the purpose of achieving the real-time calibration. Firstly, it is necessary to analyze the equivalent model of MEMS magnetometer arrays and the feasibility of noise reduction process by modeling.
Taking the average of the N magnetometers, it has where, Assuming the body frame is the PCB board frame, then it has C is the constant matrix, thus the average model (6) can be expressed as the unified model: Comparing (9) with (3), it can be found that the form of the two equations is same. However, taking the advantage of the average operation, the measurement noises of (9) are less than the corresponding noises in (3). Thus the estimated bias error of the traditional methods is decreased. In the next subsection, we will show the estimated bias error, which is caused by the measurement noises, and give the adaptive Kalman filter for the parameter calibration.

B. Parameter Estimation with the Adaptive Kalman Filter
Before the parameter estimation, the parameter model is investigated firstly. Using (9), it has Due to the orthogonal property of the matrix b n C , it has It is well-known that the magnitude n m is constant in the fixed point of the earth. Thus, the magnitude b m is also constant.
Taking the magnitude calculation of (11) (13) can be calculated by , (14) can be expanded as represents the element of the matrix R . It is worth noting that there are nine unknown parameters in matrix C . However, due to the symmetric property of the matrix R , there are just six unknown parameters in matrix R . Thus, it is impossible using the matrix R to calculate the matrix C . The transformation from R to C can be described by the orthogonal matrix, the detailed analysis can be found in [12]. It is noted that this orthogonal matrix can be determined by the reference system, such as turntable, or accelerometer.
Based on the aforementioned analysis, the parameter model can be constructed as Based on this parameter model, the adaptive Kalman filter can be given by [14,15] Then, the parameter can be estimated by (22). In the next subsection, we will give the parameter transformation, which is using ˆk x to calculate R and b .

C. Parameter Transformation
 Calculating b Using (18), it is known that ,5ˆx x xˆˆx x x where,   , x 1 9 k i i   denotes the ith element of the estimated vector ˆk x .
 Calculating R Based on (18), the ,11 r k of k R can be calculated by Then, the other parameters of k R can be calculated by To calculate the calibration matrix C , the Singular Value Decomposition (SVD) method can be used. Using the SVD method for R , it has Then, the calibration matrix C can be expressed as Substituting (25) and (29) into (11), the calibrated outputs of the magnetometer arrays can be obtained.

IV. SIMULATION AND EXPERIMENT
In order to verify the effectiveness of the proposed method, simulation and experiment tests are designed, and the calibration results are analyzed.

A. Simulation Test
In the simulation test, the geomagnetic field information in Suzhou area is selected as reference. Referring to the international geomagnetic information database, it can be seen that the geomagnetic field intensity in Suzhou area is =491.682mG . In order to simplify the design, it is assumed that the soft iron interference and hard iron interference of each MEMS magnetometer are the same, and the scale factor error and non-orthogonality error of each sensor are the same. Referring to [12], the parameter matrix Ci in (5) is set as: The attitude angles of the matrix i b b C are set as the random angle, which mean value is 0° and standard deviation is 0.1°, the bias error i b in (5) is set as the vector, which mean value is 0 mG and standard deviation is 490 mG. The measurement noise of each magnetometer is set as the vector, which mean value is 0 mG and standard deviation is 1 mG. The attitude of the PCB board is changed as where, k  , k  , k  denote pitch, roll, yaw, respectively; M denotes the number of the samples of the magnetometer outputs. The sampling rate of the magnetometer is set as 50Hz.
Using the above setting parameters and the measurement model (5), the outputs of the magnetometer arrays, which contain 32 magnetometers, are depicted in Fig. 1.
It can be seen from the Fig. 1 that the outputs of MEMS magnetometer arrays contain different bias errors, but the change tendency of different magnetometers outputs is consistent. This is validating the above analysis. Due to the difference between R and C , we use the setting C to calculate the truth R , and the truth R is used as the reference matrix to validate the performance of the calibration method.
To validate the performance of the MEMS magnetometer arrays, the 1# magnetometer, which is also calibrated by the above method, is used for comparing. The unified calibrated errors are defined as where, M R denotes the estimated matrix R at the end of the whole calibrated procedure; M b denotes the estimated bias b at the end of the whole calibrated procedure; R and b denote the corresponding reference matrix and vector, respectively; vec() denotes the matrix operation, which is transforming the matrix into vector by column; denotes the normalized operation for a vector. It is noted that the whole calibration for the magnetometers is based on the normalized operation of the magnetometer operation, and this operation does not change the performance of the calibration method [12]. Thus, the unified calibrated errors are dimensionless. Table I gives the statistics of the calibrated results.
It can be seen from the above table that the calibration results of MEMS magnetometer arrays is closer to the true value than that of single MEMS magnetometer. According to formula (32) and (33), the unified error of calibration matrix R of 1# MEMS magnetometer is 7.8578, while the corresponding error of MEMS magnetometer arrays is only 0.354. The bias error of 1# MEMS magnetometer after calibration is 0.4385, while the corresponding error of MEMS magnetometer arrays is only 0.0748. It can be seen from the above results that the calibration results of the MEMS magnetometer arrays used in this paper have higher accuracy than the traditional single MEMS magnetometer.
The calibrated results are used to correct the measurements of the magnetometer by (11), and the normalized value of the calibrated results is shown in Fig. 2. Fig. 2 shows that the normalized value of the calibration results of the MEMS magnetometer arrays has higher stability, with the standard deviation of 0.0065, while the normalized standard deviation of the calibration results of the 1# MEMS magnetometer is 0.0774.

B. Experiment Test
In this subsection, the experiment test will be carried out for validating the performance of the magnetometer arrays. The designed MEMS magnetometer arrays is shown in Fig. 3.
The module is designed with 32 MPU9250 9-axis motion sensors, and the STM32F407ZET6 is used for data acquisition, the USB interface is used to transmit the raw data and the calibrated results to the computer. The data sampling frequency is 10Hz, and the unified clock line is used for control. The sampling results of 32 magnetometers are shown in Fig. 4. From the above sampling results, it can be seen that the outputs of MEMS magnetometer arrays are similar to the simulation results, that is, the change tendency of different magnetometers outputs is consistent.
Since no true value in the actual system, the ellipse fitting and magnitude of the measurements before and after calibration are used to evaluate the performance of the magnetometer arrays. As shown in Fig. 5, the ellipse fitting results of data in four cases are obtained. In Fig. 5, (a) shows ellipsoid fitting of the measurement results of 1# MEMS magnetometer; (b) shows ellipsoid fitting after calibration of 1# MEMS magnetometer; (c) shows ellipsoid fitting of the measurement results of the MEMS magnetometer arrays; (d) shows ellipsoid fitting after calibration of MEMS magnetometer arrays.
As can be seen from the above figures, (a) and (c) show an obvious ellipsoid shape, and the center of the circle deviates   Fig.6 The normalized magnitude from the origin. This characteristic can be seen clearly in (a). It can be seen from (b) and (d) that the fitting figure after calibration is closer to the sphere. Moreover, the measurement points in (d) are smoother than those in (b). Fig. 6 is the normalized value of the calibrated results.
It can be seen from Fig. 6 that the standard deviation of the normalized magnitude after the calibration of the MEMS magnetometer arrays is 0.00745, while the standard deviation of the normalized magnitude after the calibration of the 1# MEMS magnetometer is 0.02762. The results show that the MEMS magnetometer arrays have higher stability than the single magnetometer.

V. CONCLUSION
This paper presents a calibration method for MEMS magnetometer arrays. Firstly, the calibration model of MEMS magnetometer arrays based on unified error parameters is established; secondly, the real-time error parameter estimation method based on Adaptive Kalman filtering algorithm is designed; finally, simulation experiments and system experiments are designed to verify the effectiveness of the proposed method. The method designed in this paper reduces the calibration error of MEMS magnetometer, which is easily affected by random noise, and improves the stability of calibration results. This method can also be used in MEMS accelerometer calibration.