1. Introduction
Attitude measurement is an essential technology in projectile trajectory correction. Only a few types of attitude sensors are suitable for spinning projectiles since the sensors must withstand extremely large loads at launch and rapid spins during flight [
1,
2]. Magnetometers have been used for projectile attitude measurement systems as they are small in size, lightweight, and low cost [
3]. The magnetometers are normally aligned with the body axes of the spinning projectile, and the attitudes of projectiles are calculated by the measured magnetic field information [
4,
5]. However, magnetometers are easily disturbed by external magnetic fields, and the magnetometer measurement outputs are corrupted by different kinds of error sources, e.g., bias errors, scale factors and misalignment errors [
6,
7,
8]. Therefore, calibration of strap-down magnetometers must be performed to ensure their measurement accuracy [
9]. The conventional calibration methods of magnetometer, such as the swinging method and the multi-position method [
10], require external references or auxiliary equipment. To reduce the cost of the calibration procedures, many previous studies on calibration have focused on methods that require no external equipment [
7,
8,
11,
12], i.e., auto-calibration and the ellipsoid fitting method [
12,
13,
14]. In addition, several researchers have proposed specific filtering methods for strap-down magnetometers [
15], and an EKF filter is used to estimate the error parameters of magnetometers [
16,
17,
18]. Since the filter models normally are nonlinear functions, nonlinear filter algorithms (EKF, UKF, and PF) are used to estimate the state of the system [
19,
20,
21]. These calibration methods are effective for most applications, but they have several shortcomings such as the need for external equipment or auxiliary filter information is required.
Previous calibration studies have mainly focused on magnetic compasses, satellites, UAVs and various low-cost attitude measurement systems [
17,
22,
23]. Note that these calibration methods are not suitable for projectile applications. First, the attitude measurement system is more seriously disturbed by the artillery magnetic field during launch [
16]. In addition, the error parameters of the magnetometers, which are calibrated in advance, usually change after long duration storage, and the changed parameters will have negative effects on the attitude estimation of the projectiles. Therefore, to improve the accuracy of attitude estimation, the magnetometers must be calibrated again before launch or during flight. For weapon systems, a fast and simple calibration method is the most important. Thus, how to process a low cost calibration quickly and precisely remains a challenging problem for projectile attitude measurement systems.
This paper aims to present a fast site calibration method specific for spinning projectiles. At the launch site, the tri-axial magnetometer is calibrated again, and the parameters of the tri-axial magnetometer including bias errors, scale factors and misalignment angles are obtained quickly by optimal ellipsoid fitting based on a least squares criterion. Then, these calibration parameters are used to compensate for magnetometer measured data during flight. The rest of this paper is organized as follows:
Section 2 describes the magnetometer error model, and
Section 3 discusses the calibration principle.
Section 4 introduces numerical simulations, and
Section 5 focuses on semi-physical experiments. The last section provides the conclusions.
2. Magnetometer Error Model
The measurement error of single-axis magnetometer mainly contains zero bias error and scale factor error, and the error model of single-axial magnetometer can be described as:
where,
is ideal scale factor,
is scale factor error;
is actual scale factor, and
is zero bias.
is the magnetometer measured output.
In general, a tri-axial magnetometer is used to measure the strength of Earth’s magnetic field. Therefore, the ideal error model of tri-axial magnetometer can be described as:
where
is a diagonal matrix,
,
and
indicate scale factors.
indicate ideal outputs of the tri-axial magnetometer.
The magnetometers are normally aligned with the body axes of the projectile, but non-orthogonal angles are unavoidable.
Figure 1 shows the non-orthogonal angles, where, O-XYZ defines the body coordinate frame, and O-X
1Y
1Z
1 defines the sensor coordinate frame. Obviously, the magnetometers are not aligned with the body axes of the projectile. There are non-orthogonal angles (
) between O-XYZ and O-X
1Y
1Z
1.
According to the vector relations shown in
Figure 1, the non-orthogonal errors or misalignment errors which can be described as:
If the non-orthogonal errors are taken into account, and the measurement error model of tri-axial magnetometer can be described as:
According to magnetometer measurement error model (4), the compensation model of the tri-axial magnetometer can be described as:
To compensate the magnetometer measured outputs, the error parameters in
, matrix
, and inverse of matrix
(
) must be determined. Since the non-orthogonal angles (
) normally are small angles (
), and the matrix
in Equation (3) can be simplified as follows:
Substituting the approximate matrix of (6) into error model (4), the tri-axial magnetometer error model (4) can be simplified the follows:
Similarly, by substituting inverse of matrix (6) into (5), the tri-axial magnetometer compensation model (5) also can be simplified as follows:
3. The Least Squares Ellipsoid Fitting
The total intensity of Earth’s magnetic field that is measured by an ideal tri-axial magnetometer should be a constant scalar [
12,
24].
, the
indicates the total intensity of Earth’s magnetic field. Thus, according to the tri-axial magnetometer measurement error model (5), the total intensity of Earth’s magnetic field can be calculated:
Equation (9) indicates that the magnetic measured outputs are constrained to an ellipsoid or sphere [
12]. Equation (9) can be rewrote as follows:
Equation (10) is an ellipsoid surface equation, but an actual tri-axial magnetometer normally has measurement errors, and magnetometer measured data can’t fit on a standard sphere. In general, the shape and origin of the sphere maybe changed. Here, the shifted origin indicates the existence of zero bias errors, and the changed shape indicates the existence of scale factor errors or misalignment angles. The equation of an ellipsoid can be described as [
25]:
where, vector
defines
, and
.
To ensure the procedure is optimal fitting, a least-squares criteria is used to the ellipsoid fitting:
where, the matrix
is given by:
In order to obtain the optimal ellipsoid parameters, the ellipsoid fitting Equation (11) can be rewritten as follows:
where,
is the shape parameter matrix (3 × 3),
is the origin of the optimal ellipsoid.
In contrast to Equations (14) and (10), the following formulas can be obtained:
Using the simplified magnetometer error model (4), and the matrix operation (
) can be calculated by:
Therefore, the optimal ellipsoid parameter matrix A and ellipsoid origin X0 can be obtained by ellipsoid fitting, and the error parameters of the tri-axial magnetometer can be estimated by (15).
Assuming that the inverse matrix of A is
, and the error parameters of the tri-axial magnetometer (
) can be calculated by:
where,
is the total intensity of Earth’s magnetic field in the calibration site. Therefore, the algorithm flow chart for the calibration and compensation is shown in
Figure 2.
4. Algorithm Performance
This section describes how numerical simulations assess the performance of the proposed magnetometer calibration method based on ellipsoid fitting. The section is shown by considering the calibration of magnetometers in two different error sources.
Table 1 lists the magnetometer error parameters assumed in the simulation. As can be seen from
Table 1, the difference between two magnetometers is that the magnetometer (case 2) is affected by strong magnetic interference, and has large error parameters. In the numerical simulation, firstly, the ideal outputs are generated by the ideal model of tri-axial magnetometer. Then, according to the error model of the magnetometer, the actual measurement outputs including bias errors, scale factor errors and alignment angle errors are generated. Here, the International Geomagnetic Reference Model generates the local magnetic field of the Earth in the simulation.
Calibration of the tri-axial magnetometer is carried out according to the following four different attitude changes, as follows: (1) At horizontal state, as shown in
Figure 3a, each axis of a tri-axial magnetometer successively spins 360°. (2) One axis of the tri-axial magnetometer successively spins 360° under different inclination angles, as shown in
Figure 3b, the magnetometer successively spins 360° around X-axis when the inclination angles are 30°, 60°, and 90°, etc. (3) The magnetometer spins 360° at the same time. (4) The magnetometer randomly rotates in various directions.
Figure 4,
Figure 5,
Figure 6,
Figure 7,
Figure 8,
Figure 9,
Figure 10 and
Figure 11 show optimal ellipsoid fitting results. The ellipsoid is obtained by the ellipsoid fitting method described in this paper. Here, the blue points of the sphere surface indicate measured magnetic data. For example, in
Figure 4, the magnetometer calibration attitude change is the same as change (1), the x-circle, y-circle and z-circle indicate magnetometer measured data when each axis spins 360°, respectively. As shown in
Figure 5,
Figure 6 and
Figure 7, these calibration attitudes correspond to the change (2)–(4), respectively. In
Figure 7, it can be seen that the magnetometer measured data almost fits on an ellipsoid, which is consistent with the previous conclusion.
Table 2 shows the calibration results. It can be seen that magnetometers can be calibrated by four different attitude changes. In case1, the ellipsoid fitting results correspond to the EF1–EF4. Where, there are minimal estimation errors in EF4. On the contrary, the EF1 has maximal estimation errors. In the case 2, the ellipsoidal fitting results show in
Figure 8,
Figure 9,
Figure 10 and
Figure 11. Because the magnetometer have large error parameters, the ellipsoid fitting results (EF5–EF8) are obviously different from case 1 (EF1–EF4). It can be seen that the EF8 calibration precision is the highest, and the EF5 has the maximal error. The numerical simulation results show that the proposed calibration method can effectively determine zero bias, scale factors, and alignment angle errors. Moreover, if the measured data can cover the whole ellipsoid surface such as EF4 and EF8, the calibration result is optimal.
To further evaluate calibration algorithm performance, the calibration parameters of the EF4 are used to compensate the tri-axial magnetometer measured outputs. The compensation results are shown in
Figure 12,
Figure 13,
Figure 14 and
Figure 15, where,
Figure 12 shows tri-axial magnetometer measured outputs before and after compensation.
Figure 13 shows the magnetometer measurement error curve before calibration, while
Figure 14 shows the magnetometer measurement error curve after compensation.
It can be seen that without compensation, the each axis error standard deviation is 1440 nT, 890 nT and 360 nT, respectively, and the errors reduce to less than 200 nT after compensation.
Figure 15 shows total intensity of Earth’s magnetic field before and after calibration. It can be seen that without calibration, the total intensity of Earth’s magnetic field varies from 50,822 nT to 56,000 nT. However, after calibration, the total intensity of Earth’s magnetic field is approximately constant (52,600 nT). It can be seen that the calibration method brings a significant enhancement of the magnetometer measurement accuracy. The numerical simulations verify effectiveness of the calibration method mentioned in this paper.
5. An Application in Spinning Projectile
In this section, the calibration method is used for a spinning projectile. The correction is experimentally assessed to evaluate the effectiveness of the calibration method in practice.
Figure 16 shows the three-dimensional flight trajectory of the spinning projectile. The flight starting point is (0, 0, 0), and the end is marked by a red circle.
Figure 17 shows the full attitude of the projectile. The simulated trajectory has 20° initial pitch angle and 0° initial yaw angle. The initial roll is random variables, and its initial roll rate is 720 deg s
−1.
A semi-physical experimental system was designed for the simulation experiments.
Figure 18 illustrates the homemade prototype. The experimental system is consist of two parts, one is attitude measurement unite (AMU) which contains a tri-axial magnetometer (HMC1043) circuit board, accelerometers and a data recorder, the other one is a flying simulation turntable. The flying simulation turntable can realize the simulation of any kind of projectile movement. To reduce the impact of turntable magnetic interference on the tri-axial magnetometer, the AMU is strap-down installed on a long aluminum pole (similar to a projectile), and the pole was fixed in the flying simulation turntable.
The AMU is mainly comprised of tri-axial magnetometer circuit, data recorder, battery and protective shell. The hardware components diagram of the AMU is shown in
Figure 19. The data recorder collects and stores the tri-axial magnetometer measurement output at a sampling frequency of 1000 Hz. Then, through the USB port, the magnetometer measured data was transferred to computer for attitude calculation.
The experimental verification is carried out in two steps. Firstly, in the test field (projectile launch site), the tri-axial magnetometer is calibrated again. The calibration of the magnetometer is carried out by rotating the AMU in various directions, and the parameters of magnetometer including bias errors, scale factors and misalignment angles are quickly obtained by optimal ellipsoid fitting. These calibration parameters are used to compensate for the measured data during flight. Then, semi-physical simulation is carried out to verify the effectiveness of calibration in the launch site. The semi-physical simulation system simulates the attitude movement of the spinning projectile, and the AMU measured data is used to calculate the attitude of the projectile. Calibration results are shown in
Figure 20,
Figure 21 and
Figure 22. Here, the solid blue lines represent each axis magnetometer measured outputs before calibration, the dotted red lines represent the each axis measured outputs after calibration. In order to see the details, the lower charts of each figures describe the local details in 5–8 seconds.
Figure 23 shows each axis measurement error of the tri-axial magnetometer. It can be seen that without calibration, the each axis measurement error (standard deviation) is 3513.4 nT, 4029.5 nT and 1743.5 nT, respectively. However, as expected, after performing the magnetometer calibration, the errors are reduced to less than 350 nT. The reduction of magnetic measurement errors comes from the compensation of magnetometer outputs.
In order to further illustrate the calibration results, the attitude of spinning projectile is calculated using the magnetometer measured data before and after compensation. The definition of coordinate frame is shown in
Figure 24. Where, the O-X
bY
bZ
b defines body coordinate frame (b-frame), and O-X
nY
nZ
n defines navigation coordinate frame (n-frame), the local level frame is selected as n-frame.
According to the definition of the Euler angle and rotation order, the directional cosine matrix is:
where
,
and
represent yaw, pitch and roll angles, respectively. Therefore, the tri-axial magnetometer output is given by:
where
is the magnetic vector of the Earth in the b-frame,
is magnetic field vector of the Earth in the n-frame.
Note that for projectile applications, if only the output information of the magnetometer is adopted for attitude estimation, the three attitude angles are not completely observable. Therefore, all the Euler angles cannot be estimated. To solve the problem, a common solution is the use of other auxiliary attitude sensor such as a gyroscope. Here, the yaw angle is assumed to be known (using the attitude feedback from the turntable), and the pitch and roll angles of the projectile can be calculated by:
Therefore, substituting the magnetometer output into Equation (20), the pitch and roll angles are calculated by using the measured data. The pitch angle error is shown in
Figure 25, where, the solid blue line represents the pitch angle error before correction, and the dotted red line represents the pitch angle error after correction. It can be seen that the attitude error increases with time.
The increase of the errors is due to the magnetic interference of the turntable. When the pitch angle is 20 °, the turntable magnetic interference is small. On the contrary, it is the largest at a −45° pitch angle. It can be seen that without compensation, the pitch angle error is 3.52° (1σ), and the maximum pitch error reaches 14.79°. However, after calibration, the pitch angle error reduces to 0.58° (1σ), and maximum pitch error reduces to more than 3.20°.
Figure 26 shows the roll angle error before and after calibration. It can be seen that the roll angle error is 2.59° (1σ) before calibration, while the roll angle error reduces to 0.65° (1σ) after calibration. The maximum roll angle error reduces from 8.85° to less than 2.81°. Obviously, the attitude error reduction would have imposed significant positive effects on control performance of spinning projectiles. Simulation and experiment results show that the accuracy of the tri-axial magnetometer has been greatly enhanced, and the attitude estimation errors have been reduced after calibration.
6. Conclusions
This paper presents a fast calibration method specific for a spinning projectile. At the launch site, the tri-axial magnetometer is calibrated again, and the error parameters of the magnetometer including bias errors, scale factors and misalignment angles are quickly obtained by optimal ellipsoid fitting based on a least squares criterion. Then, the calibration parameters are used to compensate the magnetometer outputs during flight. This method has the following advantages: First, using a least-squares fitting criteria to ensure the procedure is an optimal ellipsoid fitting. Second, without need for a precision turntable or other equipment, the calibration process is simple and easy to implement. Moreover, the method is also suitable for tri-axial accelerometers. Finally, a physical simulation system was designed to further verify the performance of the calibration method. The results show that pitch angle error is reduced from 3.52° to 0.58° (1σ) after calibration. Meanwhile, the roll angle error is reduced from 2.59° to 0.65° (1σ). Simulations and experimental results indicate that the accuracy of magnetometer in a strap-down spinning projectile has been greatly enhanced, and the attitude estimation errors of projectile have been reduced after calibration.