Академический Документы
Профессиональный Документы
Культура Документы
2, FEBRUARY 2013
281
I. I NTRODUCTION
HE THREE-AXIS magnetometer consists of three individual transducers. It is a device that continuously provides the vector information of near magnetic field with respect
to the body frame coordinate to aid in the vehicles attitude
determination or position estimation [1], [2]. This sensor is
inexpensive, low in size, lightweight, and reliable and has low
power requirement. It has been widely applied to autonomous
air, ground, and underwater vehicles.
The calibration of the three-axis magnetometer must be
performed prior to its application because the onboard magnetometer (rigidly fixed to a vehicle) readings are seriously
distorted by sensor errors and external magnetic field sources.
Compared with accuracies of 1 2 without calibration, the
attitude knowledge is achieved in accuracies of 0.1 0.5
by using well-calibrated sensors [3]. The measurement error
sources are mainly classified into two kinds. One is the technological limitations in sensor manufacturing, installation, and
materials, which results in nonorthogonality, scale factor, and
bias. The other is the presence of ferromagnet around the
sensor, which generates hard iron and soft iron magnetic errors
induced by external magnetic field. These two kinds of error
sources contribute to sensor readings together and are hard to
be distinguished.
Magnetometer calibration is not a new problem, and a few
calibration techniques have been presented in the literature. A
class of methods called attitude-dependent methods was proposed to calibrate the magnetic compass or magnetometer [4]
[6]. The major shortcoming of these methods is the necessity
of external attitude information, which is difficult to obtain in
many applications. Another class of methods relies on the principle of scalar checking [7], which minimizes the square of the
differences between the norms of magnetometer outputs and the
magnitude of geomagnetic field. These attitude-independent
methods do not need additional calibration instruments and
are easy to realize. One main drawback of these approaches
is the cost function presented as a quadratic equation or
quartic equation, and therefore admits multiple minima [8].
Gambhir [9] linearized the cost function using the centering
approximation algorithm and adopted the least squares method
to estimate the magnetometer bias. This method is practical
but introduces linearization error and ignores several kinds of
sensor errors. Alonso and Shuster [10] put forward an approach
called TWOSTEP method by extending Gambhirs approach.
Crassidis et al. [11] converted the centering approximation algorithm to a recursive form and then applied nonlinear Kalman
filtering techniques to estimate magnetometer parameters. Both
methods are not feasible for onboard magnetometer calibration
because they do not take magnetic deviations (hard and soft
iron errors) into account. In addition, their solutions may result
in suboptimal or divergence in case of bad initial guess.
In recent work, Gebre-Egziabher et al. [12] proposed an
algorithm called nonlinear two-step estimator (Two-Step) to
calibrate a 2-D or 3-D magnetometer. This method was expanded to include nonorthogonality and soft iron errors in [13].
Although the Two-Step method does not need an initial guess or
linearization, it is sensitive to data noise (see [14] for more details). Worse still, Two-Step will lead to bad estimates when the
overdetermined equations are ill posed. Vasconcelos et al. [16]
proposed a maximum likelihood estimator (MLE) algorithm
which uses the Two-Step estimate as initial approximation. The
algorithm treats the measurement noise as a normal distribution
and maximizes the likelihood of the parameter estimation by an
MLE. As the likelihood function is quadratic, it is solved by the
282
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 2, FEBRUARY 2013
(1)
Fig. 1.
where
()s
()e
s
B
Bee
Ces
s
s
and BSI
BHI
sensor frame;
earth frame;
sensor output vector in sensor frame;
geomagnetic field vector in earth frame;
attitude matrix from earth to sensor frame;
hard iron and soft iron error vectors in sensor
frame, respectively;
CN O and CSF nonorthogonality matrix and scale factor matrix, respectively;
sensor bias vector in sensor frame;
bso
Gaussian white noise in sensor frame.
ws
Due to the limitations in sensor manufacturing, the three
sensitive axes of the sensor are nonorthogonal. Assume that
the three skew axes are denoted by XS , YS , and ZS and
the orthogonal axes of the reference frame (sensor frame) are
denoted by XO , YO , and ZO . Define ZO to coincide with ZS
and YO to lie in the YS ZS plane, and XO is defined to constitute
a right-handed orthogonal frame with YO and ZO . The angle
between YO and YS denotes , the angle between XO and
XS YS plane denotes , and the angle between XO and XS ZS
plane denotes . Fig. 1 shows the relationship between the skew
axes and the orthogonal axes. Thus, CN O can be modeled as
bso = [box
boy
boz ]T
(3)
(4)
where CSI is a soft iron matrix whose elements are small and
constant.
Substituting (4) into (1) and reorganizing the terms yield
s = ACes Bes + bs + ws
B
(5)
s
+ bso .
where A = CN O CSF (I33 + CSI ) and bs = ABHI
B. Calibration Model
Neglecting the measurement noise, a calibration model is
constructed by inversing the inputoutput model
e = C e A1 (B
s bs )
B
e
s
(6)
(8)
(9)
(11)
283
N
2
i bs
RA B
r0 .
s
(13)
i=1
284
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 2, FEBRUARY 2013
algorithm is insensitive to the initial value and easy to be implemented. It has fast convergence rate as well. Furthermore, PSO
has the advantage of parallel computing, which is an important
motivation to be applied to the magnetometer calibration. The
concept of PSO is that each particle in the swarm is a potential
solution in the search space of an optimization problem and is
initialized with a random velocity and a random position. At
each time step, the particle moves through the solution space
and updates itself by following two best values. One is its
own best position that the particle achieved so far, called Pbest.
The other is the overall best position of all particles obtained so
far, called Gbest. All particles are attracted to the best solution
or nearness by minimizing a fitness value [32].
Assume that, in an N -dimensional search space, there are m
particles in the swarm. At the k step, the position vector of the
ith particle can be presented as
(14)
(15)
w = wmax
wmax wmin
iter
itermax
(16)
where wmax and wmin denote higher and lower values of w, respectively. itermax denotes the maximum number of iteration,
and iter is the current iteration.
In order to estimate the calibration parameters (RA , b) in (13)
using the PSO algorithm, we define a particle that contains all
calibration parameters. Let vecs : 33 6 be a vectorization operator that stacks the upper triangular part of a matrix to
a vector. Then, the particle is
T
(17)
X := vecs(RA )T bT .
285
TABLE I
PSEUDOCODE OF THE SPSO
TABLE II
PARAMETER VALUES FOR PSO AND SPSO
sign (f (x) f (x )) + 1
tanh ((G (x) G(x )))
(20)
(23)
S2 = x|x , f (x) f (x ) .
Thus, the two transformations can be rewritten as follows:
f (x) + 21 x x x S1
G(x) =
(24)
f (x) x S2
22
x S1
G(x) + tanh((G(x)G(x
))) ,
H(x) = f (x),
x S2 \{x }
maximum,
x = x .
(25)
From (24), the values of the objective function with x S1
are stretched by 1 and the Euclidean distance between x and
x . In contrast, the values of the objection function with x S2
are unaltered by the transformation. After this stage, all local
minima with higher values than f (x ) will be eliminated, and
all minima with lower or equal values remain unchanged.
From (25), the values of the objective function with x S1
are further stretched. H(x ) is turned into a maximum, and the
values of the objective function with x S2 \ {x } are still
unaltered.
The two-stage transformation does not modify the minima
with equal or lower function values except the detected one.
However, it alleviates all minima with higher function values
by reshaping the objective function. As a result, using this technique can decrease the chance of converging to local minima.
The pseudocode of the SPSO is described in Table I.
TABLE III
COMPARISONS OF THE PSO AND THE SPSO
5
i=1
j=1
(26)
286
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 2, FEBRUARY 2013
which means that the algorithm locates the global minima in all
60 runs, in contrast to 86.6% of the PSO. However, the SPSO
has heavier computational cost than the PSO since the mean and
standard deviation of SPSO are larger than those of the PSO.
This is balanced by the increased success rates, which implies
that the SPSO has high probability to find the global minima.
The procedure of the SPSO is shown in Figs. 35. Fig. 3
shows the original plot of the function. Fig. 4 shows the effect
of stretching after the first stage of G(x) transformation with
a detected local minimum x = (0.3521, 0.8003)T , and its
function value is f (x ) = 144.3250. All candidate solutions
with higher function values than f (x ) are stretched. Fig. 5
shows the second stage of H(x) transformation. The detected
local minimum x is transformed to a maximum.
It is clear from the aforementioned figures that the SPSO can
alleviate the local minima problem by reshaping the objective
function. Most local minima are eliminated after the two-stage
transformation. Although SPSO shows good performance in
many test functions in the literature (see [37]), it has not yet
been applied to any real-life problem to our best knowledge.
287
TABLE V
PARAMETER S ETTINGS
288
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 2, FEBRUARY 2013
TABLE VI
PARAMETER E STIMATION
M EAN =
N
1
ri
N i=1
(28)
1
(
ri M EAN )2
n i=1
(29)
ST D =
289
TABLE VII
PERFORMANCE C OMPARISONS (nT)
lower in size. The hub receives raw sensor readings from the
magnetometer and then sends it to the INS for storage.
Obtaining high accuracy measurements of geomagnetic field
in an AUV environment is a challenging task since the AUV is
instrumented with a lot of magnetic field-generating electronics
and ferromagnet. The fixed position for the magnetometer
should be taken into account carefully to isolate those undesired magnetic fields. As shown in Fig. 12 the experimental
instruments are mounted in the head of the AUV. The threeaxis magnetometer is strapped down to the body and separated
from other equipments.
B. Field Experimental Description
Prior to the field experiment, we had a geomagnetic survey of the water field and built up a high-precision contour
map of geomagnetic field. We selected an experimental spot
with nearly constant magnetic magnitude (less than 10-nT
variations). Fig. 13 shows the the AUV trajectory during the
experiment in the calibration area, overlapped by the contour
map of geomagnetic field. The red line is the vehicle trajectory,
indicated by the INS, which starts from the blue star. Fig. 14
shows the measurement locus of raw sensor readings. Each axis
of the raw sensor readings, as well as the total magnitude of raw
data, is shown in Fig. 15.
290
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 2, FEBRUARY 2013
TABLE IX
RMSE OF PSO AND SPSO (nT)
291
TABLE X
SPSO RESULTS OF T EN I NDEPENDENT RUNS
292
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 62, NO. 2, FEBRUARY 2013