Recursive of Least Square Based Online Calibration Method in Geomagnetic Detection

. With the problem of attitude measurement accuracy is susceptible to various errors of geomagnetic survey, this paper establishes geomagnetic measurement error ellipsoid model by analysis of on the environment and own errors, uses the maximum likelihood algorithm for solving the static error correction coefficient. The experimental results show that, the maximum of attitude angle errors is less than 5° near blind direction, online combination correction can ensure the accuracy of attitude detection system under different shooting conditions.


Introduction
Earth's magnetic field is continuous distribution and very stable. The geomagnetic field can not only block the radiation of high-energy particles from the aerospace, but also provide a mild environment for the atmosphere and the hydrosphere of the earth's biological life. At the same time, the geomagnetic field elements (magnetic declination, dip, and intensity) can also be used to provide navigation information for many creatures during swimming, migration, foraging and other processes [1][2][3][4]. Many organisms such as bacteria, molluscs, arthropods and vertebrates have been found to be able to sense the geomagnetic field and use it for navigation. Geomagnetic navigation technology has been applied to many occasions base on the study of biological geomagnetic navigation [5][6][7][8][9]. Geomagnetic navigation technology can use the natural coordinate system formed by the Earth's magnetic field to complete the attitude control and positioning for ships and aircraft [10][11]. It is simple and reliable, and the navigation errors do not cumulate with the time. However, the three-axis magnetometers which is used to measure the earth's magnetic field exist all kinds of errors. Such as different scale, bias of each axis and nonorthogonality between axes. In addition, the ferromagnetic material of the projectile can cause the distortion of the geomagnetic field corrupting the measurements of the magnetometer. The calibration of geomagnetic measurement is the key to improve the performance of geomagnetic navigation technology.
The magnetic sensor output vector is equal to the position of the magnetic field vector. If any rotating magnetic sensor, magnetic field vector trajectory can be described as a sphere, its radius equal to the local geomagnetic field intensity. The magnetic sensor output vector located in an ellipsoid under the influence of various errors. The purpose of error correction is to identify the correlation coefficient of the error model with the relevant fitting method. In the basis of the ellipsoid theory, Gebre -Egziabher [12] uses the rotation sensor output data formed two-step estimation algorithm by the recursive least squares method to calculate different scale and bias of each axis. The two-step estimation algorithm solves the dependence of the "swing method" on the standard measurement platform and the external reference information, but also cannot correct non-orthogonality between axes. Kok, [13] used the maximum likelihood method to solve the error parameters of the three-axis geomagnetic sensor in the geomagnetic inertial integrated navigation. The Maximum likelihood to estimate non-orthogonality between axes, but it is too dependent on the accuracy of the iterative initial value which is not easy to obtain. Hoseini Tabatabaei et al. [14] proposed a fast and accurate iterative algorithm, which can ignore the impact of the iterative initial value, but it is susceptible to the influence of uncertainty factors. Renaudin established an integrated error model by analyzing magnetic resistance sensor errors and environmental interference errors. In this model, he put forward adaptive least squares fitting method to calculate the ellipsoid equation coefficient of the comprehensive error model, and then realize the error correction of the magnetic resistance sensor based on singular value decomposition of matrix calculation comprehensive error coefficient model [15]. This method can automatically adjust the correction factor according to the output of magnetic resistance sensor, but the change matrix is not symmetric matrix under the comprehensive influence of the magnetic sensor itself and environmental interference errors, so the method is not accurate, and needs a lot of iterative calculation.

Magnetic measurement error model 2.1 Geomagnetic measurement error source
The measurement error of geomagnetic sensor includes sensor error and environmental disturbance error. The sensor error is due to the limitation of the production process level and material characteristics, which makes the sensor unable to reach the ideal state. The error of geomagnetic sensor includes sensitivity, bias and nonorthogonal. The error of environmental interference is caused by the distortion of the geomagnetic field due to its own ferromagnetic material, which is divided into hard magnetic error and soft magnetic error [9] according to its influence. The magnetic field vector expressed by geomagnetic sensor is expressed as Eq. (1).
(1) can be expressed as: If the error correction matrix S is invertible, then the vector of the geomagnetic field in the sensor coordinate system can be expressed as 1 There is no compensation for the noise error in the calibration model of the measurement error of the geomagnetic detection component (3), and the compensation of the noise error can be done [10]. The real geomagnetic component can be calculated according to equation (3) using the output value of the geomagnetic sensor by identifying the correlation coefficients.

Establish the measurement error ellipsoid model.
First, defining the equations of the sphere and ellipsoid are as follows [11]: The magnetic sensor output vector is equal to the position of the magnetic field vector. If any rotating magnetic sensor, magnetic field vector trajectory can be described as a sphere, its radius equal to the local geomagnetic field intensity. So the trajectory of the true value of the magnetic field is a sphere  (8), b represents the position of the ellipsoidal sphere center, L R is the rotation matrix of the ellipsoid, L S is the long-minor axis scaling of the ellipsoid, and ε is the noise error. [9] 。 The magnetic sensor output vector located in an ellipsoid under the influence of various errors. The error matrix S=R L S L is the rotation and the long-short axis scaling of the ellipsoid, and the error vector b is the variation of the ellipsoid center in the space coordinate system. The measurement error of the geomagnetism detection component can be intuitively shown in Fig.1.

Ellipsoid Fitting Based on Maximum Likelihood
In this paper, the maximum likelihood estimation method is used to solve the equation (

H H H R S H b H b R S H
The problem of finding the maximum likelihood estimation value in equation (8) (14) Assuming that ( , , ) L L R S b is a solution of (14), for any orthogonal matrix L V , that

Turntable experiment and result analysis
In order to verify the effectiveness of the online combination correction algorithm, the geomagnetic attitude angle detection system is fixed in a steel housing of a three-axis rotary  The turn matrix experiment was performed using the error matrix correction matrix S -1 and the error vector b obtained from the static correction experiment as initial values. The tilt angle of the turntable is adjusted to a position of -33.3°, close to the direction of the geomagnetic measurement blind zone, and the turntable is rolling in the eight directions of north, east, south, west, northeast, southeast, southwest and northwest. The geomagnetic system was used to measure the roll and pitch angles. The obtained attitude angle error is compared with the attitude angle error that is simply compensated by the static correction.  The error curves of roll angle and pitch angle under the two correction methods are shown in Figure 3 and Figure 4. From the experimental results, it can be seen that the errors of roll angle and pitch angle under the two correction methods are relatively close when the directions of firing are north, east, south, and west. And the effect of the on-line correction method is significantly better than the static correction method when the directions of firing are northeast, southeast, southwest, and northwest. This is because the error correction matrix S-1 and the error vector b of the static correction method are obtained by fitting the geomagnetic field components of the north, east, south and west directions. The error compensation coefficients in these four directions are closest to the true value. In other directions, the error coefficient obtained by the static correction method has a certain deviation from the true value, and the accuracy of the obtained attitude angle must also be reduced. The online correction method is used to update the error coefficient online. The estimator information can be extracted from the geomagnetic measurements and used to correct the error compensation coefficients. In order to ensure the accuracy of the attitude detection system under different shooting conditions. However, it is worth noting that the amount of data fused in the initial stage of the recursive least squares algorithm is relatively small, so in the recursive process, when the calculation is started, the estimation error jumps violently. With the increase of the number of measurements, the estimated value gradually becomes stable and approaches the estimated value. Therefore, the online combination correction algorithm is more suitable for stable error compensation for a longer period.

Conclusion
The error correction of geomagnetic measurement is the key to improve the performance of geomagnetic measurement system. In this paper, the ellipsoid model of geomagnetic measurement error is derived, the error model is transformed by maximum likelihood method, and the error correction matrix and error vector are obtained by using Newton method. Then, taking the compensation coefficient obtained by static correction as the initial value, the ellipsoid coefficient is updated in real time by recursive least square method to realize the on-line combination correction of measurement errors of geomagnetic detection components. Final design magnetic detection system measurement error correction experiment, the experimental results show that the maximum error of the attitude angle is less than 5° near the blind area. The on-line combination correction can extract the estimation information from the geomagnetic measurement data, which can be used to correct the error compensation coefficient, to ensure the accuracy of attitude detection system in different directions.