Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 6, No. 3, 2023 73 Study on the Error Correction Method of Three‐axis Fluxgate Sensor Yongxin Li*, Kun Wu, Zhiyu Lu College of Electrical & Information, Southwest Minzu University, Chengdu 610225, China * Corresponding author Abstract: Three-axis fluxgate sensors are quite widely used in various industries. However, due to the inherent limitations of their manufacturing process, various deviations can occur. In this paper, we study and analyze the sources of errors of three-axis fluxgate sensors, and construct a corresponding error model. The three-axis fluxgate sensor is successfully calibrated by the extended Kalman filter algorithm. Both simulations and experiments demonstrate that the method is effective in correcting the three-axis fluxgate sensor. In the experimental stage, the error was reduced by two orders of magnitude by applying the extended Kalman filter. Keywords: Three-axis magnetic sensor, Extended Kalman filter, Error correction 1. Introduction Magnetic exploration is one of the oldest geophysical exploration methods, which plays an important role in various fields such as national defense construction [1], aerospace [2, 3], mineral census, etc., in which the triaxial fluxgate sensor is widely used because of its good stability and high resolution. However, due to the influence of the processing technology and the field environment, when using the three- axis fluxgate sensor to detect the magnetic field of such a weak signal, the three-axis fluxgate sensor will appear scale factor error, non-orthogonal error, zero bias error and random noise and other errors. And the simulation shows that, Without error correction, the scale factor error of more than 0.001 will produce more than 50nT error on the measurement results, the non-orthogonal error of more than 0.1°will produce more than 51.08nT error on the measurement results, and the zero bias error of more than 10nT will produce more than 14.74nT on the measurement results, and the measurement accuracy of magnetic sensors will be directly related to the accuracy of the measured data, therefore, it is of great significance to study how to reduce the error of magnetic sensors to make them closer to the ideal state. Wu et al. used a particle swarm algorithm to estimate the magnetic sensor error, and effectively corrected the shortcut- connected three-axis magnetic sensor error [4].In 2017, Yuan et al. designed a spatial ellipsoidal magnetometer calibration method based on adaptive genetic algorithm [5], which simultaneously took into account the three-axis magnetic sensor error and its installation error.In 2019, Luo et al. corrected the three-axis magnetic flux gate sensor error [6].In 2022, Li et al. accomplished the calibration of a three-axis fluxgate sensor by a combination of DA algorithm and LM algorithm[7]. This paper analyzes the reasons for the error of the three- axis magnetic fluxgate sensor to establish an error model, based on the geomagnetic total field strength for a short time as a constant scalar, the three-axis magnetic sensors in a highly uniform, stable magnetic field rotation, the measured magnetic data synthesized modal value after a fixed value, the output value of the three-axis sensor is compared with the modal value output from the scalar sensor, the use of Extended Kalman Filtering algorithm to find out the parameters. After simulation and experiment, the algorithm estimates the parameters accurately and has a good calibration effect. 2. Error Modeling and Parameter Estimation 2.1. Error modeling Three mutually perpendicular magnetic measurement units are built into the fluxgate sensor in order to measure the vector magnetic field at various points in space. However, due to the limitations of the machining process, the positions of these three magnetic measurement units do not achieve an ideal perpendicular relationship, resulting in non-orthogonal errors. If the space magnetic field projection on the ideal sensor coordinate system for OXYZ, measured as Bx、By、Bz, there is a non-orthogonal error of the sensor's coordinate system for theO1X1Y1Z1, the measured value of the Bx1、By1、Bz1. O point coincides with theO1 point, the OZ and the O1Z1co-axial, the OY1 is in the OYZ plane, and let the OX1 in the OXY surface of the projection with the angle of the OX is α, the angle between OX1 and the OXY plane is β, and the angle betweenOY1 and OY is γ, as shown below. Figure 1. Schematic diagram of the relationship between the ideal triaxial sensor coordinate system and the non- orthogonal error coordinate system 74 At this point B=[Bx By Bz]T ,B1=[Bx1 By1 Bz1]T, then we have B1=AB, which is obtained from the pinch relation in the figure1, and the matrix A is as follows: Since α, β, and γ are small angles then it is known that cos(α) ≈ 1, cos(β) ≈ 1, cos(γ) ≈ 1, sin(α) ≈ α, sin(β) ≈ β, and sin(γ) ≈ γ. Then, the A-matrix can be simplified as follows: In the ideal case, when the measured magnetic field meets the three components are equal, if the magnetic sensor three- axis sensitivity element sensitivity is the same, then the three components should be measured equal output; however, due to the sensor technology limitations, often the three-axis sensitivity element does not have the same sensitivity, which leads to differences in the output value of each axis. Then there is the following scale factor error matrix K: Theoretically, under the ideal non-magnetic environment, the measured value of the three-axis fluxgate sensor should be zero. However, in practice there is residual magnetism in the core of the fluxgate and there are problems such as circuit drift, which results in the sensor's three-component output not being zero, and there is a zero output bias. Then there is a zero bias error matrix b as follows: From the above analysis, if the magnetic sensor measurement is B1=[Bx1 By1 Bz1]T and there is also Gaussian noise with mean 0 variance Σ[8] in the process ε , the following relation can be obtained: (1) 2.2. Parameter estimation After obtaining the relation (1), it is known that there are a total of 9 parameters to be estimated, which can be expressed as: (2) xk is the parameter estimated at k moments, B2k and Bk are the real and ideal values measured by the three-axis sensors at k moments, respectively. Using the principle of invariance of the modal value of the geomagnetic field at the measurement point, combined with the Extended Kalman Filtering the state equations and observation equations of the system can be obtained as: (3) (4) Then the calibration model is: (5) The mean µ and variance of V(k) in equation (5) are as follows: Since Z(k) is a second-order system with respect to X(K), so so the second-order h(k) is converted to first-order H(k) using extended Kalman filtering, and then the equations for the state estimation and state prediction parts are written. State prediction: State estimation: The process of calibrating a three-axis fluxgate sensor using extended Kalman filtering is complete by bringing the initial values of the set state quantities and covariance matrix as well as the data into the above equation to obtain the calibrated parameters. 3. Simulation and Experiment 3.1. Simulation Simulation experiments are carried out after completing the error modeling of the triaxial fluxgate sensor. In the simulation session, the geomagnetic field is set to be constant and unchanged at 5×105nT, and 80 sets of data with different attitudes are obtained by rotating the three-axis fluxgate sensor after adding the error, and Gaussian noise 2 K 75 with a mean of 0 and a variance of 1 is added to the sensor's three-component error data, and the set parameters are shown in Table 1. The parameters obtained by estimating the simulated data after substituting Kalman filter are shown in Table 1. Table 1. Comparison of set and predicted values of parameters in simulation non-orthogonal(°) scale factor zero deviation(nT) x-axis y-axis z-axis x-axis y-axis z-axis x-axis y-axis z-axis Simulation presets 0.15 0.08 -0.03 1.002 1.001 0.998 53 26 81 Simulation estimates 0.1501 0.08 -0.03 1.002 1.001 0.998 48.9444 25.9507 81.3939 Table 1 shows that the parameter values set in the simulation are very close to the estimated values. Figure 2 shows the comparison of the modal values before and after the Kalman filter correction. Before the correction, the modal values of the three-axis sensors fluctuated greatly, and the average error was as high as 1471nT, and after the correction was completed, the modal value error was reduced to 1.232nT, which can be found that the algorithm is really effective in the simulation session. Figure 2. Comparison between before and after modulus correction in simulation 3.2. Experiment After verifying the validity of the Kalman filter in the simulation session the experiment was carried out in the field, the experiment used a certain three-axis fluxgate sensor, which rotated on a non-magnetic rotary table to get 40 sets of data with different attitudes, and the accurate mode values were measured by the optical pump sensor. Figure3 is a photograph of the non-magnetic rotary table, and Figure 4 is a photograph of the three-axis fluxgate sensor. Figure 3. Schematic diagram of non-magnetic rotary table Figure 4. Schematic diagram of the three-axis magnetic sensor After processing the acquired data, the extended Kalman filter is used for correction, and Table 2 is the parameters estimated by the extended Kalman filter algorithm. It can be seen from Figure 5 that the average error before correction was as high as 254.4nT, and after correction, it was reduced to 1.169nT, which was reduced by 2 orders of magnitude, which proved the effectiveness of the algorithm. 76 Table 2. The estimated value of the parameters in the experiment non-orthogonal(°) scale factor zero deviation(nT) x-axis y-axis z-axis x-axis y-axis z-axis x-axis y-axis z-axis Experimental estimate -0.002 -0.001 -0.012 1.0006 0.9995 0.998 21.8107 -32.382826 82.0338 Figure 4 is a photograph of the three-axis fluxgate sensor Figure 5. In the experiment, the difference correction comparison between the modulus value before and after sensor correction and the modulus value of the optical pump sensor 4. Conclusion Aiming at the errors of non-orthogonality, scale factor and zero bias generated by the triaxial magnetic sensor, this paper adopts the correction method based on extended Kalman filter, which corrects the triaxial fluxgate sensor by the principle that the modal values of the triaxial magnetic sensor are the same in different attitudes. The simulation and experimental results prove that the method effectively reduces the error of the three-axis sensor and improves the measurement accuracy. References [1] Zhi Menghui. Research on high precision digital fluxgate sensor[D]. Soochow University,2017. [2] Han Y. MEMS aviation micro era[J]. Aviation Weapons,2013(05):18-21+51.DOI:10.19297/j.cnki.41- 1228/tj.2013.05.005 [3] Xu Dongfu. Research on multi-sensor integrated navigation control system of multi-rotoraircraft [D]. Graduate School of Chinese Academy of Sciences (Changchun Institute of Optics, Fine Mechanics and Physics), 2016. [4] Wu Z , Wu Y , Hu X , et al. Calibration of three-axis strapdown magnetometers using Particle Swarm Optimization algorithm[C]// IEEE International Symposium on Robotic & Sensors Environments. IEEE, 2011. [5] YUAN Guangmin,YUAN Weizheng,LUO Danyao,ZHAO Jing,XUE Liang,LI Xiaoying. Calibration of three-axis magnetometer based on adaptive genetic algorithm (in English)[J]. Chinese Journal of Inertial Technology,2017,25(03):382-386. DOI:10.13695/j.cnki. 12- 1222/o3.2017.03.019. [6] J.G. Luo,H.B. Li,J.X. Liu et al. Error correction method for three-axis fluxgate sensor[J]. Navigation and Control, 2019, 18(03): 52-58. [7] Li Caihong et al. Correction Method of Three-Axis Magnetic Sensor Based on DA–LM. Metals. vol. 12, no. 3, 2022, pp. 428. [8] Alonoso R , Shuster M D . Complete linear attitude independent magnetometer calibration[J] . The Journal of the Astro-nautical Sciences, 2002,50 (4) : 477-490.