Next Article in Journal
Corrugated-Diaphragm Based Fiber Laser Hydrophone with Sub-100 μPa/Hz1/2 Resolution
Previous Article in Journal
A Multiple Sensors Platform Method for Power Line Inspection Based on a Large Unmanned Helicopter
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Complete Tri-Axis Magnetometer Calibration with a Gyro Auxiliary

1
Department of Precision Instrument, Tsinghua University, Beijing 100084, China
2
State Key Laboratory of Precision Measurement Technology and Instruments, Tsinghua University, Beijing 100084, China
*
Author to whom correspondence should be addressed.
Sensors 2017, 17(6), 1223; https://doi.org/10.3390/s17061223
Submission received: 30 March 2017 / Revised: 22 May 2017 / Accepted: 24 May 2017 / Published: 26 May 2017
(This article belongs to the Section Physical Sensors)

Abstract

:
Magnetometers combined with inertial sensors are widely used for orientation estimation, and calibrations are necessary to achieve high accuracy. This paper presents a complete tri-axis magnetometer calibration algorithm with a gyro auxiliary. The magnetic distortions and sensor errors, including the misalignment error between the magnetometer and assembled platform, are compensated after calibration. With the gyro auxiliary, the magnetometer linear interpolation outputs are calculated, and the error parameters are evaluated under linear operations of magnetometer interpolation outputs. The simulation and experiment are performed to illustrate the efficiency of the algorithm. After calibration, the heading errors calculated by magnetometers are reduced to 0.5° (1σ). This calibration algorithm can also be applied to tri-axis accelerometers whose error model is similar to tri-axis magnetometers.

1. Introduction

Strap-down inertial measurement units (SIMU) which consist of gyroscopes and accelerometers, have been applied to orientation estimation for a long time [1]. Nowadays, magnetometers rigidly mounted to SIMU, also known as MARG (Magnetic, Angular Rate, and Gravity), are popular for achieving better performance. However, the magnetometer outputs suffer from magnetic field distortions and sensor errors, including the hard iron effect, soft iron effect, zero bias error, scale factor error, non-orthogonal error, misalignment error, and noise [2]. Magnetometer calibrations are always advisable to be done prior to application.
The calibration methods which generally rely on non-magnetic turntables [3,4,5] and Helmholtz coils [6,7,8,9], are proposed first. The magnetometer error parameters can be precisely calibrated. However, the cumbersome processes and calibration platforms bring about the issues of inconvenience and expense. Many stand-alone magnetometer calibration algorithms based on an ellipse-fitting method have been put forward [10,11,12,13,14,15]. These algorithms are low-cost and easy to use. The aim of these ellipse-fitting based algorithms is to compensate the magnetometer output data from lying on an ellipsoid to a sphere. However, the misalignment error between magnetometers and assembled platforms, which causes a rotation of the sphere, is unable to be calibrated. For complete tri-axis magnetometer calibration, a series of calibration algorithms in combination with accelerometers [16,17,18,19,20,21] are proposed. First, the ellipsoid-fitting algorithms are performed to calibrate errors, except the misalignment error. Then, optimization problems based on the inner products of the tri-axis magnetometer outputs and accelerometer outputs are established and solved for misalignment error estimation. The author further applies gyroscopes with magnetometers and accelerometers to run an EKF (Extended Kalman Filter) for a maximum likelihood calibration process [22,23]. The nonlinear and iterative operations as well as the reliance on initial values create the drawback of heavy computation burdens for these algorithms. Tri-axis magnetometers and gyroscopes are also simultaneously applied in [24,25] to establish an EKF and an adaptive identification algorithm for magnetometer calibration without the use of an accelerometer. The error models of a tri-axis magnetometer are simplified. Only parts of the errors are calibrated, which degrade the calibration performance.
In this work, a tri-axis gyroscope is applied as an auxiliary for complete tri-axis magnetometer calibration. Firstly, the sensor set of the tri-axis magnetometer and the tri-axis gyroscope is mounted into a non-magnetic cuboid frame. Then, the frame is put on a table and rotated for at least one cycle for each side of the frame, respectively. Finally, the complete tri-axis magnetometer calibration is achieved through linear algebra operations of the magnetometer and gyroscope output data. After calibration, the heading errors calculated by magnetometers are reduced to 0.5° (1σ). This algorithm requires a cuboid frame to mount the sensor set, which is easy to obtain and inexpensive. The proposed method, which employs the linear algebra operations, is of low computational complexity. Furthermore, because the error model of tri-axis accelerometers has a similar form to tri-axis magnetometers, this calibration algorithm can also be applied to tri-axis accelerometer calibrations.

2. Error Model

To illustrate the calibration algorithm, the error model of a tri-axis magnetometer is established. Similar models have been established in [10,11,12,13,14,15,16]. For convenience, the complete tri-axis error model is discussed again with misalignment errors included. The hysteresis errors, temperature-dependent errors, and time-varying errors will not be discussed in this paper. The output errors are classified into two categories: magnetic field distortions and sensor errors.

2.1. Magnetic Field Distortions

The magnetic field distortions are due to the ferromagnetic materials attached to the sensor frame, including the hard iron effect and soft iron effect. The hard iron effect is a constant additional magnetic field produced by permanent magnets on the assembled platform. It is represented as a 3 × 1 vector, denoted as bH. The soft iron effect is produced by the magnetization of soft magnets. It exerts effects on the magnitude and orientation of the magnetic field according to the external field orientation, which is represented as a 3 × 3 matrix, denoted as Csi. The i-row, j-column element in the matrix indicates the influence of the external j-direction field to the i-direction field.

2.2. Sensor Errors

The sensor errors of the tri-axis magnetometer include the zero bias error, scale factor error, non-orthogonal error, misalignment error, and noise. These errors are mainly due to machining and installation defects. The zero bias error makes constant offsets to each axis of the magnetometer, which is represented as a 3 × 1 vector, denoted as bzb. The scale factor error comes from the sensitivity inconsistencies of each sensor. It is represented as a 3 × 3 diagonal matrix, denoted as Csf. The elements on the diagonal represent the sensitivities of each axis sensor. The non-orthogonality between individual sensors introduces an inter-axis coupling output error, which is represented as a 3 × 3 upper triangular matrix, denoted as Cno. In general conditions of small angle errors, the diagonal elements of Cno are close to 1. The misalignment error represents the angular misalignment between the tri-axis magnetometer set and the assembled platform, which is represented as a 3 × 3 unit rotation matrix, denoted as Cm. It can be simplified into an anti-symmetric matrix, with diagonal elements equal to 1. The output noise of individual sensor is assumed as uncorrelated Gaussian white noise. The output noise is represented as a 3 × 1 vector, denoted as ε.
Above all, the error model of the tri-axis magnetometer is given as:
m = C n o C s f C s i C m ( m ˜ + b H ) + b z b + ε = K m ˜ + b + ε = [ k 11 k 12 k 13 k 21 k 22 k 23 k 31 k 32 k 33 ] ( [ m ˜ x m ˜ y m ˜ z ] ) + [ b x b y b z ] + [ ε x ε y ε z ]
In the equation, m stands for the magnetometer output vector. K stands for the total error coefficient matrix, and b stands for the total bias error vector. Note that in this paper, ~ stands for ideal quantities, ^ stands for interpolation quantities, and ⌢ stands for compensated quantities.

3. Calibration Algorithm Development

The calibration algorithm is developed for evaluating the error coefficient matrix K and the bias error vector b. In this calibration algorithm, the sensor set is firstly mounted into a non-magnetic cuboid frame. The six sides of the cuboid are numbered from 1 to 6. Side 1 is opposite to side 2. Side 3 is opposite to side 4, and side 5 is opposite to side 6. The sensor set is aligned with the frame. The z axis of the sensor set is perpendicular to side 1 and side 2. The y axis of the sensor set is perpendicular to side 3 and side 4. The x axis of the sensor set is perpendicular to side 5 and side 6, as shown in Figure 1. The calibration process is divided into two steps. In the first step, the tri-axis magnetometer interpolation outputs at specified spin angular intervals are calculated. In the second step, the error coefficient matrix and bias error vector are calculated through linear algebra operations of magnetometer interpolation outputs.

3.1. Magnetometer Interpolation Output Calculation

The cuboid frame is put on a table and rotated over one cycle by hand. This is repeated for each numbered side facing upwards. Then the tri-axis magnetometer output data mk and gyroscope output data ωk are obtained, k = 1–6, where k stands for the number of the upward side. The process is shown in Figure 2. Here are some points to note: (1) the sequence of which side is facing up can be arbitrary; (2) the orientation of the flank when putting the frame on the table can be arbitrary (finding north is not required); (3) both clockwise and anticlockwise rotations are accepted; (4) constant rotation speed is not required; and (5) the number of turns must be larger than 1.
The tri-axis magnetometer interpolation outputs at specified spin angular intervals are calculated from mk and ωk. The interpolation flowchart is shown in Figure 3. Firstly, the number of turns n, and the angular interval Δθ are set. The value of 360/Δθ must be an integer. The upward side number k is to be verified. Next, by integrating the output data ω k of the gyroscope whose sensitive axis is perpendicular to the table, the rotation angles θ k of each sample points are derived. After which, the interpolation outputs m ^ k are derived from m k and θ k . Then, the upward side k is changed to a different number, and the program is repeated. Finally, the interpolation outputs m ^ i k are obtained, where i = 1, 2,…, 360nθ, k = 1, 2,…, 6.

3.2. Error Coefficient Calculation

The geomagnetic field is stable. It can hardly change within days and is assumed to be constant in the calibration process. The geomagnetic field component perpendicular to the table is denoted as h . When side 1 faces upwards, m ~ z 1 is equal to h , and Equation (1) can be rewritten as:
[ m ^ x , i 1 m ^ y , i 1 m ^ z , i 1 ] = K [ m ˜ x , i 1 m ˜ y , i 1 h ] + [ b x b y b z ] = K C ˜ i z [ m ˜ x , 1 1 m ˜ y , 1 1 h ] + [ b x b y b z ]
where C ˜ i z is the ideal rotation matrix around z axis of sensor set, which is expanded as:
C ˜ i z = [ cos ( i Δ θ ) sin ( i Δ θ ) 0 sin ( i Δ θ ) cos ( i Δ θ ) 0 0 0 1 ] = [ C ˜ i , 1 C ˜ i , 2 C ˜ i , 3 ]
Considering that:
C ˜ i + 180 ° / Δ θ z = [ cos ( i Δ θ + 180 ° ) sin ( i Δ θ + 180 ° ) 0 sin ( i Δ θ + 180 ° ) cos ( i Δ θ + 180 ° ) 0 0 0 1 ] = [ C ˜ i , 1 C ˜ i , 2 C ˜ i , 3 ]
by substituting Equation (4) into Equation (2), there is:
[ m ^ x , i + 180 ° / Δ θ 1 m ^ y , i + 180 ° / Δ θ 1 m ^ z , i + 180 ° / Δ θ 1 ] = K C i + 180 ° / Δ θ z [ m ˜ x , i 1 m ˜ y , i 1 h ] + [ b x b y b z ] = K [ m ˜ x , i 1 m ˜ y , i 1 h ] + [ b x b y b z ]
Similarly, when side 2 faces upwards, m ~ z 2 is equals to − h . There are:
[ m ^ x , i 2 m ^ y , i 2 m ^ z , i 2 ] = K [ m ˜ x , i 2 m ˜ y , i 2 h ] + [ b x b y b z ]
[ m ^ x , i + 180 ° / Δ θ 2 m ^ y , i + 180 ° / Δ θ 2 m ^ z , i + 180 ° / Δ θ 2 ] = K [ m ˜ x , i 2 m ˜ x , i 2 h ] + [ b x b y b z ]
When side 3 faces upwards, m ~ y 3 is equals to h . There are:
[ m ^ x , i 3 m ^ y , i 3 m ^ z , i 3 ] = K [ m ˜ x , i 3 h m ˜ z , i 3 ] + [ b x b y b z ]
[ m ^ x , i + 180 ° / Δ θ 3 m ^ y , i + 180 ° / Δ θ 3 m ^ z , i + 180 ° / Δ θ 3 ] = K [ m ˜ x , i 3 h m ˜ z , i 3 ] + [ b x b y b z ]
When side 4 faces upwards, m ~ y 4 is equals to − h . There are:
[ m ^ x , i 4 m ^ y , i 4 m ^ z , i 4 ] = K [ m ˜ x , i 4 h m ˜ z , i 4 ] + [ b x b y b z ]
[ m ^ x , i + 180 ° / Δ θ 4 m ^ y , i + 180 ° / Δ θ 4 m ^ z , i + 180 ° / Δ θ 4 ] = K [ m ˜ x , i 4 h m ˜ z , i 4 ] + [ b x b y b z ]
When side 5 faces upwards, m ~ x 5 is equals to h . There are:
[ m ^ x , i 5 m ^ y , i 5 m ^ z , i 5 ] = K [ h m ˜ y , i 5 m ˜ z , i 5 ] + [ b x b y b z ]
[ m ^ x , i + 180 ° / Δ θ 5 m ^ y , i + 180 ° / Δ θ 5 m ^ z , i + 180 ° / Δ θ 5 ] = K [ h m ˜ y , i 5 m ˜ z , i 5 ] + [ b x b y b z ]
When side 6 faces upwards, m ~ x 6 is equals to − h . There are:
[ m ^ x , i 6 m ^ y , i 6 m ^ z , i 6 ] = K [ h m ˜ y , i 6 m ˜ z , i 6 ] + [ b x b y b z ]
[ m ^ x , i + 180 ° / Δ θ 6 m ^ y , i + 180 ° / Δ θ 6 m ^ z , i + 180 ° / Δ θ 6 ] = K [ h m ˜ y , i 6 m ˜ z , i 6 ] + [ b x b y b z ]
By Equations (2)–(15), the error coefficient matrix K and bias error vector b are solved through linear operations as follows:
  • By linear operation of Equations (2), (5)–(15), b is solved:
    k = 1 6 i = 1 360 n / Δ θ [ m ^ x , i k m ^ y , i k m ^ z , i k ] = 2160 n Δ θ [ b x b y b z ]
  • By linear operation of Equations (2), (5)–(7), h K 3 is solved:
    i = 1 360 n / Δ θ [ m ^ x , i 1 m ^ y , i 1 m ^ z , i 1 ] i = 1 360 n / Δ θ [ m ^ x , i 2 m ^ y , i 2 m ^ z , i 2 ] = 720 n Δ θ K [ 0 0 h ] = 720 n Δ θ h [ k 13 k 23 k 33 ]
  • By linear operation of Equations (8)–(11), h K 2 is solved:
    i = 1 360 n / Δ θ [ m ^ x , i 3 m ^ y , i 3 m ^ z , i 3 ] i = 1 360 n / Δ θ [ m ^ x , i 4 m ^ y , i 4 m ^ z , i 4 ] = 720 n Δ θ K [ 0 h 0 ] = 720 n Δ θ h [ k 12 k 22 k 32 ]
  • By linear operation of Equations (12)–(15), h K 1 is solved:
    i = 1 360 n / Δ θ [ m ^ x , i 5 m ^ y , i 5 m ^ z , i 5 ] i = 1 360 n / Δ θ [ m ^ x , i 6 m ^ y , i 6 m ^ z , i 6 ] = 720 n Δ θ K [ h 0 0 ] = 720 n Δ θ h [ k 11 k 21 k 31 ]
From Equations (16)–(19), h K and b are derived. h is a constant, which makes a scale for the tri-axis outputs. This scale has no effect on the orientation estimations. In many applications, the magnetometer outputs are normalized. Therefore, the tri-axis outputs can be compensated as:
m = ( h K ) 1 ( m b ) | ( h K ) 1 ( m b ) |
However, in some applications, such as magnetic field measurements, h needs to be determined. h can be obtained by geomagnetic field models, or by a single-axis calibrated magnetometer. In general cases, the non-diagonal elements of K are close to zero, so h can also be evaluated as:
h = Δ θ 2160 n i = 1 360 n / Δ θ ( m ^ z , i 1 m ^ z , i 2 + m ^ y , i 3 m ^ y , i 4 + m ^ x , i 5 m ^ x , i 6 )
Finally, the tri-axis magnetometer outputs are compensated as follows:
m = h ( h K ) 1 ( m b )
The program code of the calibration algorithm is presented in the Appendix A.

4. Calibration Error Analysis

The gyro errors, cuboid frame errors, and rotation operation errors may degrade the calibration performance. The calibration errors introduced by the gyro bias, gyro misalignment, non-orthogonality of the cuboid frame, and rotation deviation are analyzed, respectively.

4.1. Gyro Bias

Gyro bias is a main error of gyroscopes. Most of the bias error can be estimated during stationary time periods, and the residual tri-axis gyroscope bias error is assumed to be:
b g = [ b g x b g y b g z ] T
When side 1 faces upwards, the magnetometer interpolation outputs are:
[ m ^ x , i 1 m ^ y , i 1 m ^ z , i 1 ] = K C i z [ m ˜ x , 1 1 m ˜ y , 1 1 m ˜ z , 1 1 ] + [ b x b y b z ]
The actual rotation matrix around the z axis is:
C i z = [ cos ( i Δ θ i b g z Δ t ) sin ( i Δ θ i b g z Δ t ) 0 sin ( i Δ θ i b g z Δ t ) cos ( i Δ θ i b g z Δ t ) 0 0 0 1 ]
Δt is the time interval between two adjacent interpolation points.
The angle measurements by integrating the gyroscope output data are of good accuracy in the short-term, and the angle errors are of small value. The total time during one direction rotation is assumed to be less than 10 s, and by testing the gyroscope in the experiment, the bias error is less than 0.5°/s, which means the angle error estimated by the gyroscope is less than 5°. Under the condition of small angle errors, Equation (25) is rearranged as follows:
C i z = C ˜ i z + Δ C i z
where Δ C i z is the rotation matrix error caused by the gyro bias at i-th interpolation point, given as:
Δ C i z = ( i b g z Δ t ) [ sin ( i Δ θ ) cos ( i Δ θ ) 0 cos ( i Δ θ ) sin ( i Δ θ ) 0 0 0 0 ]
Λ 1 is defined as the sum of the rotation matrix errors caused by the gyro bias when side 1 faces upwards, derived as:
Λ 1 = i = 1 360 n / Δ θ Δ C i z = ( 180 Δ θ b g z n Δ t ) cot ( Δ θ 2 ) [ 1 0 0 0 1 0 0 0 0 ]
Similarly, there is:
{ Λ 1 = ( 180 Δ θ b g z n Δ t ) cot ( Δ θ 2 ) [ 1 0 0 0 1 0 0 0 0 ] , Λ 2 = ( 180 Δ θ b g z n Δ t ) cot ( Δ θ 2 ) [ 1 0 0 0 1 0 0 0 0 ] Λ 3 = ( 180 Δ θ b g y n Δ t ) cot ( Δ θ 2 ) [ 1 0 0 0 0 0 0 0 1 ] , Λ 4 = ( 180 Δ θ b g y n Δ t ) cot ( Δ θ 2 ) [ 1 0 0 0 0 0 0 0 1 ] Λ 5 = ( 180 Δ θ b g x n Δ t ) cot ( Δ θ 2 ) [ 0 0 0 0 1 0 0 0 1 ] , Λ 6 = ( 180 Δ θ b g x n Δ t ) cot ( Δ θ 2 ) [ 0 0 0 0 1 0 0 0 1 ]
Thus, the calibration error of b caused by gyro bias is derived by applying Equation (29) into Equation (16), as shown in Equation (30):
Δ b g b = Δ t 12 cot ( Δ θ 2 ) ( b g z [ m ˜ x , 1 1 m ˜ x , 1 2 m ˜ y , 1 1 m ˜ y , 1 2 0 ] + b g y [ m ˜ x , 1 3 m ˜ x , 1 4 0 m ˜ z , 1 3 m ˜ z , 1 4 ] + b g x [ 0 m ˜ y , 1 5 m ˜ y , 1 6 m ˜ z , 1 5 m ˜ z , 1 6 ] )
If the initial orientations of the flank when side k and side k + 1 (k = 1, 3, 5) face upwards are the same, the gyro bias error would cause little calibration error to b, and if the initial orientation of the flank are opposite, the gyro bias error would cause maximal calibration error to b.
The calibration error of K caused by the gyro bias is derived by applying Equation (29) into Equations (17)–(19), as shown in Equation (31):
Δ K g b = Δ t 4 h cot ( Δ θ 2 ) [ 0 b g y ( m ˜ x , 1 3 + m ˜ x , 1 4 ) b g z ( m ˜ x , 1 1 + m ˜ x , 1 2 ) b g x ( m ˜ y , 1 5 + m ˜ y , 1 6 ) 0 b g z ( m ˜ y , 1 1 + m ˜ y , 1 2 ) b g x ( m ˜ z , 1 5 + m ˜ z , 1 6 ) b g y ( m ˜ z , 1 3 + m ˜ z , 1 4 ) 0 ]
If the initial orientations of the flank when side k and side k + 1 (k = 1, 3, 5) face upwards are opposite, the gyro bias error would cause little calibration error to K, and if the initial orientation of the flank are the same, the gyro bias error would cause maximal calibration error to K.
Δ b gb and Δ K gb satisfy:
{ | Δ b g b | Δ t 6 cot ( Δ θ 2 ) b g F cos ( I ) [ 1 1 1 ] T | Δ K g b | Δ t 2 cot ( I ) cot ( Δ θ 2 ) b g [ 0 1 1 1 0 1 1 1 0 ]
where F is the total geomagnetic field intensity, and I is the geomagnetic inclination angle.
Considering I = 59°, Δt = 0.02 s, Δθ = 1°, b g = 0.5°/s, and that the magnetometer outputs are normalized, even under the worst initial orientation conditions, the elements of Δ b gb and Δ K gb are less than 0.0034 and 0.0060, respectively.

4.2. Gyro Misalignment

When installing the gyroscope into the cuboid frame, the misalignment between gyro axes and cuboid faces could be introduced. This would affect the gyro outputs, and cause estimation errors of the rotation angle. The gyro misalignment is presented as a rotation matrix of the small angle:
C g m = [ 1 + o ( 1 ) ψ θ ψ 1 + o ( 1 ) ϕ θ ϕ 1 + o ( 1 ) ]
o(∙) denotes the infinitesimal. The gyro output errors are:
[ Δ g 1 Δ g 2 Δ g ] = ( C g m I 3 ) [ 0 0 ω ] = [ θ ω ϕ ω o ( ω ) ]
Δ g 1 , Δ g 2 are the gyro output errors whose axes are parallel to the table, and Δ g is the gyro output error whose axis is perpendicular to the table. The misalignment angle causes little error on g , which is applied to rotation estimation.
Thus, the gyro misalignment error introduces slight calibration errors, which can be ignored.

4.3. Non-Orthogonality of Cuboid Frame

Non-orthogonality of the cuboid frame is indicated in Figure 4. The α, β and γ are the deviation angles, which are of small value.
When sides 1–6 are perpendicular to the table, respectively, the output errors of the gyroscope whose axis is perpendicular to the table are derived, respectively:
{ Δ g n o , 1 , 2 = ω 1 , 2 ( cos β 1 ) = o ( β ) Δ g n o , 3 , 4 = ω 3 , 4 ( cos α 1 ) = o ( α ) Δ g n o , 5 , 6 = ω 5 , 6 ( cos α cos γ 1 ) = o ( α ) + o ( γ )
It can be deduced from Equation (35) that the non-orthogonality of the cuboid frame has little effect on the vertical gyro outputs.
The magnetometer output error, caused by the non-orthogonality of the cuboid frame, is represented when side 1 faces upwards:
Δ m n o , i 1 = ( [ 1 0 0 0 1 β 0 β 1 ] [ 1 0 γ 0 1 0 γ 0 1 ] I 3 ) [ m ˜ x , i 1 m ˜ y , i 1 h ] = [ γ h β h γ m ˜ x , i 1 β m ˜ y , i 1 ]
In the same way, the magnetometer output errors with each side upwards are derived as:
{ Δ m n o , i 1 = [ γ h β h γ m ˜ x , i 1 β m ˜ y , i 1 ] T , Δ m n o , i 2 = [ γ h β h γ m ˜ x , i 2 β m ˜ y , i 2 ] T Δ m n o , i 3 = [ α h α m ˜ x , i 3 0 ] T , Δ m n o , i 4 = [ α h α m ˜ x , i 4 0 ] T Δ m n o , i 5 = [ γ m ˜ z , i 5 0 γ h ] T , Δ m n o , i 6 = [ γ m ˜ z , i 6 0 γ h ] T
Thus, by applying Equations (37) into Equation (16), the calibration error of b caused by the non-orthogonality of the cuboid frame is calculated:
Δ b n o = Δ θ 2160 n i = 1 360 n / Δ θ ( Δ m n o , i 1 + Δ m n o , i 2 + Δ m n o , i 3 + Δ m n o , i 4 + Δ m n o , i 5 + Δ m n o , i 6 ) = [ 0 0 0 ] T
By applying Equation (37) into Equations (17)–(19), the calibration error of K is calculated:
Δ K n o = Δ θ 720 n h i = 1 360 n / Δ θ [ Δ m n o , i 5 Δ m n o , i 6 Δ m n o , i 3 + Δ m n o , i 4 Δ m n o , i 1 Δ m n o , i 2 ] = [ 0 α γ 0 0 β γ 0 0 ]
The non-orthogonality error of the cuboid frame introduces calibration errors to four elements of K, and does not affect the other elements of K and b. The errors are equal to the deviation angles. Assuming the machining verticality is 0.02, which is easy to be satisfied, and the side length of the cuboid frame is 100 mm, the errors to the four elements of K are less than 2 × 10−4, which could be ignored.

4.4. Rotation Deviation

While rotating the frame, the orientation of the rotations may change slightly due to the table being uneven and vibrations caused by friction during the rotation. This can result in unwanted effects on the gyro outputs and magnetometer outputs. The orientation deviation is presented as:
C r d = [ 1 + o ( 1 ) 0 ε 1 0 1 0 ε 1 0 1 + o ( 1 ) ] [ 1 0 0 0 1 + o ( 1 ) ε 2 0 ε 2 1 + o ( 1 ) ] = [ 1 + o ( 1 ) o ( 1 ) ε 1 0 1 + o ( 1 ) ε 2 ε 1 ε 2 1 + o ( 1 ) ]
The gyro output error caused by the rotation deviation is:
[ Δ g r d , 1 Δ g r d , 2 Δ g r d , ] = ( C r d I 3 ) [ 0 0 ω ] + [ o ( ω ) o ( ω ) 0 ] = [ o ( ω ) ε 1 ω o ( ω ) + ε 2 ω o ( ω ) ]
g is slightly affected by the rotation deviation.
When side 1 faces upwards, the magnetometer output errors caused by the rotation deviation is:
Δ m r d , i 1 = ( C r d , i I 3 ) [ m ˜ x , i 1 m ˜ y , i 1 h ] = [ ε 1 , i 1 h ε 2 , i 1 h ε 1 , i 1 m ˜ x , i 1 ε 2 , i 1 m ˜ y , i 1 ]
In the same way, the magnetometer output errors when the other sides face upwards are obtained:
{ Δ m r d , i 1 = [ ε 1 , i 1 h ε 2 , i 1 h ε 1 , i 1 m ˜ x , i 1 ε 2 , i 1 m ˜ y , i 1 ] T , Δ m r d , i 2 = [ ε 1 , i 2 h ε 2 , i 2 h ε 1 , i 2 m ˜ x , i 2 ε 2 , i 2 m ˜ y , i 2 ] T Δ m r d , i 3 = [ ε 2 , i 3 h ε 1 , i 3 m ˜ x , i 3 ε 2 , i 3 m ˜ z , i 3 ε 1 , i 3 h ] T , Δ m r d , i 4 = [ ε 2 , i 4 h ε 1 , i 4 m ˜ x , i 4 ε 2 , i 4 m ˜ z , i 4 ε 1 , i 4 h ] T Δ m r d , i 5 = [ ε 1 , i 5 m ˜ x , i 5 ε 2 , i 5 m ˜ y , i 5 ε 1 , i 5 h ε 2 , i 5 h ] T , Δ m r d , i 6 = [ ε 1 , i 6 m ˜ x , i 6 ε 2 , i 6 m ˜ y , i 6 ε 1 , i 6 h ε 2 , i 6 h ] T
By applying Equation (43) into Equation (16), the calibration error of b caused by the rotation deviation is calculated:
Δ b r d = Δ θ 2160 n i = 1 360 n / Δ θ ( Δ m r d , i 1 + Δ m r d , i 2 + Δ m r d , i 3 + Δ m r d , i 4 + Δ m r d , i 5 + Δ m r d , i 6 )
By applying Equation (43) into Equations (17)–(19), the calibration error of K is calculated:
Δ K r d = Δ θ 720 n h i = 1 360 n / Δ θ [ Δ m r d , i 5 Δ m r d , i 6 Δ m r d , i 3 + Δ m r d , i 4 Δ m r d , i 1 Δ m r d , i 2 ]
The deviation angles ε j , i k are assumed to be normally distributed with zero mean and variance of Q ε , and the ε j , i k and m j , i k are uncorrelated. The variance of the calibration error caused by the rotation deviation satisfies:
{ V a r ( Δ b r d ) < F 2 Δ θ Q 3240 n [ 1 1 1 ] T V a r ( Δ K r d ) < Δ θ Q 720 n [ 2 cot 2 ( I ) 1 1 1 2 cot 2 ( I ) 1 1 1 2 cot 2 ( I ) ]
The magnetometer outputs are considered as being normalized, such that the norm of the magnetic field F is set as 1. If Q = 1°, I = 59°, Δθ = 1°, and n = 2, the standard deviations of the elements in Δ b rd are less than 1.2 × 10−3, and the standard deviations of diagonal elements and off-diagonal elements in Δ K rd are less than 2.2 × 10−3 and 2.6 × 10−3, respectively.
Above all, the calibration errors introduced by the gyro bias, gyro misalignment, non-orthogonality of the cuboid frame, and rotation deviation are slight and acceptable under normal conditions.

5. Simulation

To illustrate the calibration accuracy and computational requirements of the proposed method, the ellipsoid-fitting calibration method in [13] is performed for comparison. Hereafter, the ellipsoid-fitting calibration method in [13] is referred to as the EM, to distinguish from the proposed calibration method is referred to as the PM.
The local magnetic field is acquired from the world magnetic model [26]. As an example, the north, east, and down components of the Beijing area are 27,959.6 nT, −3296.3 nT, and 46,697.7 nT, respectively. Considering the sensor set used in the following experiment, the magnetometer output noise is set to 200 nT (1σ). The gyroscope output noise is 0.05°/s (1σ) and the zero drift is 0.5°/s for each individual sensor. The sample frequency is 100 Hz. The number of turns n is set to 2, and the interpolation angular interval Δθ is set to 1°.
Two error conditions of the tri-axis magnetometer are considered for further comparison. In the error condition 1, all of the tri-axis magnetometer errors are included. In the error condition 2, the misalignment error, soft iron error, and non-orthogonality error of the magnetometer, which cause rotations of the output data and degrade the calibration performance of the EM, are removed.

5.1. Error Condition 1

The magnetometer errors are set and shown in Table 1.
Then the ideal total error coefficient matrix and total bias error vector are derived:
K ˜ = [ 1.0780 0.1465 0.1529 0.0845 0.9149 0.1107 0.2112 0.1655 1.1250 ] , b ˜ = [ 7133.44 1668.75 976.57 ]
By applying the PM, the total error coefficient matrix KPM and total bias error vector bPM are calculated, as shown below. The average element estimation errors of KPM and bPM are 0.0008 and 24 nT, respectively.
K P M = [ 1.0778 0.1460 0.1511 0.0838 0.9148 0.1121 0.2134 0.1651 1.1251 ] , b P M = [ 7108.58 1657.84 1013.90 ]
By applying the EM, the total error coefficient matrix KEM and total bias error vector bEM are calculated as below. The average element estimation errors of K2 and b2 are 0.1010, and 94 nT, respectively.
K E M = [ 1.0903 0.0066 0.0071 0.0066 0.9175 0.0108 0.0071 0.0108 1.1473 ] , b E M = [ 7167.78 1770.43 1121.99 ]
The tri-axis magnetometer output data during the calibration process are plotted in Figure 5, where RD refers to raw data, and ID refers to ideal data. After calibration using the PM, the calibrated outputs are consistent with the ideal outputs. The distorted ellipses are rectified into circles, centered at [0, 0], and parallel to the sides of the cuboid, which means the hard iron effect, soft iron effect, zero bias error, scale factor error, non-orthogonal error, and misalignment error are compensated. After calibration using the EM, as shown in Figure 6, the distorted ellipses are rectified into circles, and the calibrated outputs are distributed on the surface of a sphere centered at [0, 0, 0], which means that the total scale error and total zero bias error, introduced by the scale factor error, zero bias error, soft iron error, and non-orthogonality error, are compensated. However, the calibrated outputs have a rotation error from the ideal outputs. The rotation error has the same matrix form as the misalignment error, which is considered as a total misalignment error introduced by the misalignment error, soft iron error, and non-orthogonality error [12].
Using the arctangent function, the heading angles are calculated from the output data of two-axis magnetometers parallel to the table. When side 1 faces upwards, the heading angle is calculated by the x- and y-axis magnetometer outputs. When side 3 faces upwards, the heading angle is calculated by the x- and z-axis magnetometer outputs. When side 5 faces upwards, the heading angle is calculated by the y- and z-axis magnetometer outputs. By comparing the raw and calibrated angle errors under the conditions of side 1, side 3, and side 5 facing upwards, respectively, the calibration performances of the EM and PM are illustrated, as shown in Figure 7.
After calibration using the EM, the angle errors are not reduced, but such errors become more consistent when different sides face upwards. After calibration using the PM, the angle errors are limited to 0.5° (1σ), with the maximum less than 1.5°, as shown in Table 2.

5.2. Error Condition 2

Under error condition 2, the misalignment error Cm, soft iron error Csi, and non-orthogonality error Cno of the magnetometer are removed and the other parameters keep the same. The simulation program is repeated under this condition. The angle errors are eliminated effectively both using the EM and the PM, as shown in Figure 8 and Table 3. When there is no misalignment error, soft iron error, and non-orthogonality error, this shows that the EM performs efficiently. The PM performs efficiently under both error conditions.
The amounts of computation of the EM and PM are compared. Both the EM and PM are divided into two steps. In the EM, step 1 is to perform ellipsoid-fitting using least squares technique, and step 2 is to extract the error coefficients from the ellipsoid parameters. In the PM, step 1 is to calculate the magnetometer interpolation outputs using the linear interpolation method, and step 2 is to calculate the error coefficients from the interpolation outputs by linear operations. The number of data for ellipsoid fitting is set to be equal to the number of interpolation outputs, which is equal to 360nθ. The simulation program is repeated ten times under both of the error conditions using Matlab, and the average computation time of these two algorithms is shown in Table 4. The step 1 in the EM requires large amounts of computation. The linear operations in the PM requires small computational amounts. The EM requires computations amounting to more than 10 times that of the PM.
In summary, three conclusions are drawn: (1) using the proposed calibration method, all of the magnetometer errors are compensated, including the hard iron effect, soft iron effect, zero bias error, scale factor error, non-orthogonal error, and misalignment error; (2) using the standalone ellipsoid-fitting calibration algorithm, the total scale factor error and the total zero bias error are compensated, but the total misalignment error is uncompensated; and (3) the computational requirements of the proposed method is much lower than the computational requirements of the ellipsoid-fitting method.

6. Experiment

In this experiment, an SBG IG-500N MARG unit is used. As specified in the manual, the norm of the tri-axis magnetometer output vector is approximately equal to 1 with an arbitrary unit. The noise characteristics of the magnetometer and gyroscope are tested first. The magnetometer output noise is about 0.006 (1σ). The gyroscope output noise and bias are about 0.07°/s (1σ) and 0.5°/s, respectively, and the gyro bias errors are not compensated in advance. The sample frequency is set to be 100 Hz.
The unit is mounted to a cuboid frame as shown in Figure 9. The number of turns n is set to 2, and the interpolation angular interval Δθ is set to 1°. The frame is put on a flat wooden table, and rotated by hand over n cycles for each side of the frame.
By applying the PM, the total error coefficient matrix and total bias error vector are calculated as follows:
K P M = [ 1.0757 0.0343 0.0214 0.0426 0.9534 0.0426 0.0199 0.0747 0.9709 ] , b P M = [ 0.0427 0.1020 0.0314 ]
By applying the EM, the total error coefficient matrix and total bias error vector are calculated as follows:
K E M = [ 1.0923 0.0203 0.0110 0.0203 0.9630 0.0299 0.0110 0.0299 0.9863 ] , b E M = [ 0.0396 0.0973 0.0253 ]
The raw and calibrated tri-axis magnetometer output data during the calibration process are plotted in Figure 10. After calibration using the PM, the data lie on the circles parallel to the sides of the cuboid, centered at (0, 0). After calibration using the EM, the data lie on the circles unparalleled to the sides of cuboid, which means that the misalignment error still exists. The results of the experiment are consistent with the results of the simulation.
For further verification of the quality of the calibrations, the frame is installed on a turntable. By choosing the installation location, the magnetic disturbance from the turntable is reduced to a low level. The turntable is rotated over 1 cycle. Assuming the output angle from turntable as the ideal heading angle, the angle errors after calibration using the EM and PM are derived under the conditions of side 1 upwards, side 3 upwards and side 5 upwards, respectively, as shown in Figure 11.
As shown in Table 5, by applying the EM, the angle errors are narrowed to 2.5° (1σ) with the maximum less than 4.2°. By applying the PM, the angle errors are narrowed to 0.5° (1σ) with the maximum less than 1.7°.
The average computation time is shown in Table 6. The EM requires computations amounting to more than 10 times that of the PM, which is consistent with the simulation results.

7. Conclusions

This article proposed a complete tri-axis magnetometer calibration algorithm with a gyroscope auxiliary. A non-magnetic cuboid frame was required to mount the sensor set, and was rotated by hand during the calibration, which was inexpensive and easy to operate.
The calibration errors introduced by the gyro bias error, gyro misalignment error, cuboid frame non-orthogonality error, and rotation deviation error were analyzed, respectively. The results of the analyses indicated that the calibration errors were slight and acceptable.
The computation time of the proposed method was compared with the ellipsoid-fitting calibration method, which indicated that the linear operations provided this algorithm with low computational complexity.
The calibration results of the ellipsoid-fitting method and the proposed method were compared using simulations and experiments. The tri-axis magnetometer output errors were calibrated using the proposed method, including the hard iron effect, soft iron effect, zero bias error, scale factor error, non-orthogonal error, and misalignment error, while the total misalignment error, introduced by the misalignment error, soft iron error, and non-orthogonality error, was unable to be calibrated under the stand-alone ellipsoid fitting calibration algorithms. The results from the simulations and experiments were consistent. After calibration using the proposed method, the heading error was reduced to 0.5° (1σ).

Acknowledgments

The calibration experiments were performed at the State Key Laboratory of Precision Measurement Technology and Instruments at Tsinghua University, which are gratefully acknowledged. We would like to thank Marcus Thang, Kai Shi and Shuai Shi for language polishing. We would also like to thank the reviewers for their beneficial comments and suggestions.

Author Contributions

Deng Yang proposed the idea of the calibration algorithm; Zheng You, Bin Li, and Wenrui Duan conceived and designed the experiments; Deng Yang and Binwen Yuan performed the experiments; Deng Yang and Wenrui Duan analyzed the data; Deng Yang prepared the final draft, and Zheng You guaranteed the critical reading.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The code of the proposed method is written for Matlab. Related data are posted online (https://www.researchgate.net/profile/Deng_Yang3/publication/316968794_Data_of_magnetometer_ang_gyro_for_Complete_Tri-Axis_Magnetometer_Calibration_with_Gyro_Auxiliary/data/591ae41aaca272fa34dbac01/MGData-YD.mat)
Algorithm Complete Tri-Axis Magnetometer Calibration with a Gyro Auxiliary
function [K,b,Mint]=MagCal_YD(MGdata,n,dA,dt,ht)
  % K: total error coefficient matrix
  % b: total bias error vector
  % Mint: tri-axis magnetometer interpolation outputs
  % MGdata: j x l x k matrix of tri-axis gyro and magnetometer outputs
  %  j is the j-th sample point
  %  l=1~6, represent the x-, y-, z-axis gyro outputs with unit of degree/s, and x-, y-, z-axis magnetometer outputs, respectively.
  %  k=1~6, represent the sensor direction of z-axis upward, z-axis downward, y-axis upward, y-axis downward, x-axis upward, x-axis downward, respectively.
  % n: number of rotations, n>=1.
  % dA: angular interval with unit of degree. 360/dA must be an integer.
  % dt: sampling period, with unit of s.
  % ht: the geomagnetic field component perpendicular to the table. If ht is unknow, set ht=0.
  %% step 1: Magnetometer Interpolation Output Calculation
  AR=360*n;
  ni= AR/dA;
  Mint=zeros(AR/dA,3,6);
  num=length(MGdata(:,1,1));
  angle=zeros(3*num,6);
  for k=1:6
    i=1;j=1;l=1;
    while abs(angle(j,k))<AR
     angle(j+1,k)=angle(j,k)+MGdata(j,4-floor(0.5*k+0.5),k)*dt;
     j=j+1;
    end
    if angle(j,k)>0
     angle(1:j,k)=angle(1:j,k);
    else
     angle(1:j,k)=-angle(1:j,k);
    end
    Mint(1,:,k)=MGdata(1,4:6,k);
    while i<(AR/dA)
     if angle(l,k)<(i)*dA && angle(l+1,k)>=(i)*dA
      Mint(i+1,:,k)=(i*dA-angle(l,k))/(angle(l+1,k)-angle(l,k))*MGdata(l+1,4:6,k)+(angle(l+1,k)-i*dA)/(angle(l+1,k)-angle(l,k))*MGdata(l,4:6,k);
      i=i+1;
     else
      l=l+1;
     end
    end
  end
  %% step 2: Error Coefficient Calculation
  if ht==0
   ht=1*(sum(Mint(:,3,1))-sum(Mint(:,3,2))+sum(Mint(:,2,3))-sum(Mint(:,2,4))+sum(Mint(:,1,5))-sum(Mint(:,1,6)))/(ni*6);
  end
    bx=sum(sum(Mint(:,1,:)))/(ni*6);
    by=sum(sum(Mint(:,2,:)))/(ni*6);
    b=sum(sum(Mint(:,3,:)))/(ni*6);
    b=[bx;by;bz];
    K=zeros(3,3);
    K(:,3)=(sum(Mint(:,1:3,1))-sum(Mint(:,1:3,2)))'/(ni*2*ht);
    K(:,2)=(sum(Mint(:,1:3,3))-sum(Mint(:,1:3,4)))'/(ni*2*ht);
    K(:,1)=(sum(Mint(:,1:3,5))-sum(Mint(:,1:3,6)))'/(ni*2*ht);
  end

References

  1. Ali, A.; Siddharth, S.; Syed, Z. Swarm optimization-based magnetometer calibration for personal handheld devices. Sensors 2012, 12, 12455–12472. [Google Scholar] [CrossRef]
  2. Gebre-Egziabher, D.; Elkaim, G.H.; Powell, J.D.; Parkinson, B.W. A non-linear, two-step estimation algorithm for calibrating solid-state strapdown magnetometers. In Proceedings of the 8th International Conference on Navigation Systems, St. Petersburg, Russia, 27–31 May 2001; pp. 200–299. [Google Scholar]
  3. Bowditch, N. The American Practical Navigator; Defense Mapping Agency, Hydrographic/Topographic Center: Bethesda, MD, USA, 1995.
  4. Merayo, J.M.G.; Brauer, P.; Primdahl, F. Scalar calibration of vector magnetometers. Meas. Sci. Technol. 2000, 11, 120. [Google Scholar] [CrossRef]
  5. Secer, G.; Barshan, B. Improvements in deterministic error modeling and calibration of inertial sensors and magnetometers. Sens. Actuator. A 2016, 247, 522–538. [Google Scholar] [CrossRef]
  6. Risbo, T.; Brauer, P.; Merayo, J.M.G.; Nielsen, O.V.; Petersen, J.R.; Primdahl, F.; Richter, I. Ørsted pre-flight magnetometer calibration mission. Meas. Sci. Technol. 2003, 14, 674. [Google Scholar] [CrossRef]
  7. Petrucha, V.; Kaspar, P. Calibration of a Triaxial Fluxgate Magnetometer and Accelerometer with an Automated Non-Magnetic Calibration System. In Proceedings of the 2009 IEEE Sensors, Christchurch, New Zealand, 25–28 October 2009; pp. 1510–1513. [Google Scholar]
  8. Zikmund, A.; Janosek, M.; Ulvr, M. Precise calibration method for triaxial magnetometers not requiring earth’s field compensation. IEEE Trans. Instrum. Meas. 2015, 64, 1242–1247. [Google Scholar] [CrossRef]
  9. Kliment, T.; Praslička, D.; Draganová, K.; Blažek, J. Gradient methodology for 3-axis magnetometer scalar calibration. J. Electr. Eng. 2015, 66, 157–160. [Google Scholar]
  10. Caruso, M.J. Applications of Magnetoresistive Sensors in Navigation Systems; SAE Technical Paper 970602; SAE International: Warrendale, PA, USA, 1997. [Google Scholar] [CrossRef]
  11. Gebre-Egziabher, D.; Elkaim, G.H.; David Powell, J. Calibration of strapdown magnetometers in magnetic field domain. J. Aerosp. Eng. 2006, 19, 87–102. [Google Scholar] [CrossRef]
  12. Foster, C.C.; Elkaim, G.H. Extension of a two-step calibration methodology to include nonorthogonal sensor axes. IEEE Trans. Aerosp. Electron. Syst. 2008, 44. [Google Scholar] [CrossRef]
  13. Renaudin, V.; Afzal, M.H.; Lachapelle, G. Complete triaxis magnetometer calibration in the magnetic domain. J. Sens. 2010, 2010. [Google Scholar] [CrossRef]
  14. Wu, Y.; Shi, W. On calibration of three-axis magnetometer. IEEE Sens. J. 2015, 15, 6424–6431. [Google Scholar] [CrossRef]
  15. Olivares, A.; Ruiz-Garcia, G.; Olivares, G. Automatic determination of validity of input data used in ellipsoid fitting MARG calibration algorithms. Sensors 2013, 13, 11797–11817. [Google Scholar] [CrossRef] [PubMed]
  16. Kok, M.; Hol, J.D.; Schon, T.B.; Gustafsson, F.; Luinge, H. Calibration of a magnetometer in combination with inertial sensors. In Proceedings of the 15th International Conference on Information Fusion, Singapore, 9–12 July 2012; pp. 787–793. [Google Scholar]
  17. Vasconcelos, J.F.; Elkaim, G.; Silvestre, C.; Oliveira, P.; Cardeira, B. Geometric approach to strapdown magnetometer calibration in sensor frame. IEEE Trans. Aerosp. Electron. Syst. 2011, 47, 1293–1306. [Google Scholar] [CrossRef]
  18. Li, X.; Li, Z. A new calibration method for tri-axial field sensors in strap-down navigation systems. Meas. Sci. Technol. 2012, 23, 2852–2855. [Google Scholar] [CrossRef]
  19. Salehi, S.; Mostofi, N.; Bleser, G. A practical in-field magnetometer calibration method for IMUs. In Proceedings of the IROS Workshop on Cognitive Assistive Systems, Vilamoura, Algarve, Portugal, 7 October 2012; pp. 39–44. [Google Scholar]
  20. Ammann, N.; Derksen, A.; Heck, C. A novel magnetometer-accelerometer calibration based on a least squares approach. In Proceedings of the 2015 International Conference on Unmanned Aircraft Systems (ICUAS), Denver, CO, USA, 9–12 June 2015; pp. 577–585. [Google Scholar]
  21. Liu, Y.X.; Li, X.S.; Zhang, X.J. Novel calibration algorithm for a three-axis strapdown magnetometer. Sensors 2014, 14, 8485–8504. [Google Scholar] [CrossRef] [PubMed]
  22. Kok, M.; Schön, T.B. Maximum likelihood calibration of a magnetometer using inertial sensors. IFAC Proc. Vol. 2014, 47, 92–97. [Google Scholar] [CrossRef]
  23. Kok, M.; Schön, T.B. Magnetometer calibration using inertial sensors. IEEE Sens. J. 2016, 16, 5679–5689. [Google Scholar] [CrossRef]
  24. Han, K.; Han, H.; Wang, Z. Extended Kalman Filter Based Gyroscope Aided Magnetometer Calibration for Consumer Electronic Devices. IEEE Sens. J. 2016, 99, 1. [Google Scholar] [CrossRef]
  25. Troni, G.; Whitcomb, L.L. Adaptive Estimation of Measurement Bias in Three-Dimensional Field Sensors with Angular Rate Sensors: Theory and Comparative Experimental Evaluation. In Proceedings of the Robotics: Science and Systems, Berlin, Germany, 24–28 June 2013. [Google Scholar]
  26. Chulliat, A.; Macmillan, S.; Alken, P.; Beggan, C.; Nair, M.; Hamilton, B.; Woods, A.; Ridley, V.; Maus, S.; Thomson, A. The US/UK World Magnetic Model for 2015–2020; Technical Report; National Geophysical Data Center, NOAA: Boulder, CO, USA, 2015.
Figure 1. Definition of cuboid sides and sensor set coordinates.
Figure 1. Definition of cuboid sides and sensor set coordinates.
Sensors 17 01223 g001
Figure 2. Cuboid frame rotation process.
Figure 2. Cuboid frame rotation process.
Sensors 17 01223 g002
Figure 3. Flowchart for magnetometer output interpolation.
Figure 3. Flowchart for magnetometer output interpolation.
Sensors 17 01223 g003
Figure 4. Non-orthogonality of the cuboid frame.
Figure 4. Non-orthogonality of the cuboid frame.
Sensors 17 01223 g004
Figure 5. Magnetometer output data (simulation under condition 1): (a) Isometric view; (b) z-axis view; (c) y-axis view; (d) x-axis view.
Figure 5. Magnetometer output data (simulation under condition 1): (a) Isometric view; (b) z-axis view; (c) y-axis view; (d) x-axis view.
Sensors 17 01223 g005
Figure 6. Magnetometer output data and fitting sphere (simulation under condition 1).
Figure 6. Magnetometer output data and fitting sphere (simulation under condition 1).
Sensors 17 01223 g006
Figure 7. Angle error (simulation under condition 1).
Figure 7. Angle error (simulation under condition 1).
Sensors 17 01223 g007
Figure 8. Angle errors (simulation under condition 2).
Figure 8. Angle errors (simulation under condition 2).
Sensors 17 01223 g008
Figure 9. Cuboid frame with the mounted sensor set.
Figure 9. Cuboid frame with the mounted sensor set.
Sensors 17 01223 g009
Figure 10. Magnetometer output data (experiment): (a) Isometric view; (b) z-axis view; (c) y-axis view; (d) x-axis view.
Figure 10. Magnetometer output data (experiment): (a) Isometric view; (b) z-axis view; (c) y-axis view; (d) x-axis view.
Sensors 17 01223 g010
Figure 11. Angle errors (experiment).
Figure 11. Angle errors (experiment).
Sensors 17 01223 g011
Table 1. Tri-axis magnetometer errors.
Table 1. Tri-axis magnetometer errors.
ErrorValueErrorValue
C m [ 1 0.01 0.03 0.01 1 0.02 0.03 0.02 1 ] C n o [ 1 0.04 0.02 0 1 0.01 0 0 1 ]
C s f [ 1.08 0 0 0 0.95 0 0 0 1.10 ] C s i [ 0.99 0.10 0.20 0.07 0.96 0.15 0.22 0.13 1.02 ]
b H [ 6000 2000 3000 ] ( n T ) b z b [ 500 1000 800 ] ( n T )
Table 2. Angle error (simulation under condition 1).
Table 2. Angle error (simulation under condition 1).
Calibration MethodSide 1 Upwards (°)Side 3 Upwards (°)Side 5 Upwards (°)
EσmaxEσmaxEσmax
Raw−6.616.3217.60−9.388.7123.44−7.7015.2024.95
EM−6.4613.8427.00−9.3113.0428.80−7.7613.8428.38
PM−0.010.441.36−0.030.371.130.050.401.29
Table 3. Angle error (simulation under condition 2).
Table 3. Angle error (simulation under condition 2).
Calibration MethodSide 1 Upwards (°)Side 3 Upwards (°)Side 5 Upwards (°)
EσmaxEσmaxEσmax
Raw−0.0310.0816.18−0.039.9214.90−0.034.719.44
EM−0.020.411.37−0.030.381.08−0.030.371.19
PM−0.030.411.34−0.030.381.07−0.010.391.36
Table 4. Computation time (simulation, CPU: Intel i7 @3.6 GHz, RAM: 8 GB).
Table 4. Computation time (simulation, CPU: Intel i7 @3.6 GHz, RAM: 8 GB).
Calibration MethodStep 1Step 2Total
EM0.3549s0.0012s0.3561s
PM0.0161s0.0014s0.0175s
Table 5. Angle errors (experiment).
Table 5. Angle errors (experiment).
Calibration MethodSide 1 Upwards (°)Side 3 Upwards (°)Side 5 Upwards (°)
EσmaxEσmaxEσmax
Raw−2.145.0012.031.422.836.173.8211.0416.01
EM0.180.972.580.532.124.140.262.323.68
PM−0.110.451.630.320.491.66−0.100.341.17
Table 6. Computation time (experiment, CPU: Intel i7 @3.6 GHz, RAM: 8 GB).
Table 6. Computation time (experiment, CPU: Intel i7 @3.6 GHz, RAM: 8 GB).
Calibration MethodStep 1Step 2Total
EM0.2177s0.0011s0.2188s
PM0.0163s0.0011s0.0174s

Share and Cite

MDPI and ACS Style

Yang, D.; You, Z.; Li, B.; Duan, W.; Yuan, B. Complete Tri-Axis Magnetometer Calibration with a Gyro Auxiliary. Sensors 2017, 17, 1223. https://doi.org/10.3390/s17061223

AMA Style

Yang D, You Z, Li B, Duan W, Yuan B. Complete Tri-Axis Magnetometer Calibration with a Gyro Auxiliary. Sensors. 2017; 17(6):1223. https://doi.org/10.3390/s17061223

Chicago/Turabian Style

Yang, Deng, Zheng You, Bin Li, Wenrui Duan, and Binwen Yuan. 2017. "Complete Tri-Axis Magnetometer Calibration with a Gyro Auxiliary" Sensors 17, no. 6: 1223. https://doi.org/10.3390/s17061223

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop