An efficient method for tracking a magnetic target using scalar magnetometer array

The position of a magnetic target can be obtained through magnetic anomaly which is measured by a magnetic sensor. Comparing with vector magnetic sensor, the measurement value of the scalar magnetic sensor is almost not influenced by its orientation in measurement coordinate axes. Therefore, scalar magnetic sensors can be easily assembled into an array. Based on analysis of the total scalar magnetic anomaly measured by scalar magnetometer, we present an efficient method for tracking a magnetic target using scalar magnetometer array. In this method, we separate the position information and magnetic moment information of magnetic target by matrix transformation. Then, we can obtain the position of the magnetic target in real time by a scalar magnetometer array and a particle swarm optimization algorithm. In addition, the magnetic moment of the target can be estimated when the target’s position had been calculated. The simulation shows that the position of the target can be calculated accurately and the relative error of the position is <5 %. The calculated magnetic moment of the target is close to the theoretical value. In addition, execution time of each calculation is <1 s. Thus, the position of the magnetic target can be obtained in real-time through this method.

are required. Thus, an array with magnetic vector sensors is widely used for locating or tracking position of moving object (Wahlstrom and Gustafsson 2014;Liu and Wang 2010;Song et al. 2014;Marschner and Fischer 2007;Nara et al. 2006). Nara et al. (2006) designed a magnetic sensor array for detecting the object position using the magnetic field and spatial gradients. Marschner and Fischer (2007) measured the magnetic object using a hall sensor array. Song et al. (2014) proposed the tracking method based on tri-axial transmitting coils and uniaxial sensing of the generated electromagnetic field. When the vector magnetic sensors are assembled into an array, they have a common alignment with the coordinate axes. If not, there will be large measurement error when alignment error of vector magnetic sensors exists (Sui et al. 2012). More important, it is difficult for us to deal with the alignment of vector sensor in the array.
However, scalar magnetic sensor such as optical pumped magnetometer is relatively insensitive to its orientation. In the theory of optical pumped magnetometer, the angle between the direction of the optical axis and the direction of the ambient field is called tumble angle q. The sensor can't be operating only when the optical axis is parallel with the ambient field (q = 0° or q = 180°) or perpendicular to the ambient field (q = 90°). The optical pumped magnetometer will perform satisfactorily when the angle q within a range, like 10° < q < 85° or 95° < q < 170° (CS-L, Scintrex), 6° < q < 84° or 96° < q < 174° (G882, Geometrics). Thus, the measurement value of it is almost not influenced by its orientation in measurement coordinate axes. Therefore, it has a great advantage to assemble an array with scalar magnetic sensors. In this paper, we propose a method based on a scalar magnetometer array to track the magnetic target. The position of the target can be obtained by the proposed method in real time. In order to compute in real time, we use the particle swarm optimization (PSO) algorithm. In addition, we can estimate the magnetic moment of the target after computing its position.

Localization theory
In the process of localization or track, the basic assumption is that the target can be modeled as a magnetic dipole. When the distance between the target and a sensors is three times longer than the size of itself, we can consider the target as the magnetic dipole (Wiegert and Gerovska 2000). The external magnetic field induced by the dipole can be described as: where r is the distance from the dipole with coordinates (0, 0, 0) to a sensor with coordinates (x, y, z). M x , M y , M z denote the components of the magnetic moment M of the dipole. μ 0 is the permeability.
In practice, the magnetic field measured by the sensor includes: the earth magnetic field B E and the external magnetic field B A . However, B A may vary from approximately 0.01-100 nT and is much smaller than B E . Therefore, it is valid that � B A ≪ � B E . And the magnetic anomaly ΔB generated by the magnetic target can be regarded as the projection of B A on B E and defined as (Stavrev and Gerovska 2000;Blakely 1996): where B m is the magnetic sensor output value. u denotes the direction of vector B E . I 0 and D 0 denote the inclination and declination of the normal geomagnetic field, respectively. ΔB can be expressed in matrix form as: We can separate the position and magnetic moment of the target by matrix transformation through Eq. (3). Then the expression is given by: We can see from Eq. (4) that M T (MM T ) −1 G T is a function of M x , M y , M z , I 0 , D 0 and µ 0 4π r 5 �B GKG T is a function of x, y, z, I 0 , D 0 , ΔB. The magnetic moment information (M x , M y , M z ) locates at the left side of Eq. (4) and the position information (x, y, z) locates at the right side of Eq. (4).
Based on the analysis, we design an array with four scalar magnetometers and an inertia instrument, shown in Fig. 1. The inertia instrument is fixed at the array center. L is the distance between the array center to the boundary.
We can see from Eq. (4) that M T (MM T ) −1 G T is same for four scalar magnetometers at each measurement. Thus we can obtain the equation as: (2) If the parameters-I 0 , D 0 , ΔB i -are known, the position of the target can be obtained by minimizing: In order to obtain the position of the target, a few assumptions of minor restrictiveness should be made. We assume that the geomagnetic field is constant or smoothly changes and its gradient remains very uniform in the measurement region (McFee and Das 1981). ΔB i can be easily calculated by ΔB i ≈ B mi − B E , when B E is known. B E can be measured through the method in paper (McFee and Das 1981). Therefore, we can calculate the position of the target through Eq. (6) using some algorithms.

Particle swarm optimization
In order to calculate the position of the target in real time, we use the PSO algorithm to obtain the solution, which can be rapidly converged and has few adjustable parameters (Eberhart and Kennedy 1995;Yang et al. 2010). In order to better understand the PSO algorithm, the detailed descriptions of some key terms in PSO are given as follows.
1. Particle A particle is an individual in the swarm. The position of each particle is adjusted by the velocity of them. 2. Position The position of each particle represents the candidate solution for the problem. 3. Velocity The direction and magnitude of the velocity determine the position of the particle in next iterative process. And the velocity of particle is changed according to the relative position of the personal best (pbest) and the global best (gbest). 4. pbest The pbest is a position with the best fitness value discovered by a particle in the solution space. 5. gbest The gbest is a position with the best fitness value discovered by the entire swarm in the solution space. 6. Fitness The fitness is a value of the fitness function with one solution. And it can represent the quality of the solution.
The solution space is a reasonable range in which the particles search for the optimal solution. 8. Fitness function The fitness function is a mathematical expression of the problem and is used to evaluate the position of each particle.
The PSO algorithm works on social behavior of particles in the swarm. Particles fly around in solution space. And in each iterative process, the position of each particle in the solution space is adjusted by dynamically altering the velocity of each particle, according to its own experience and the experience of other particles (Robinson and Rahmat-Samii 2004;Ratnaweera et al. 2004). Therefore, in the PSO algorithm, the ith particle is described by position vector x i = (x i1 , x i2 , . . . , x id ) and velocity vec- and d is the dimension of the solution space. According to the fitness function defined by user, the previous best position of the ith particle P i = (p i1 , p i2 , . . . , p id ) is the best fitness value obtained by that particle. And the previous best position of the group P g = (p g1 , p g2 , . . . , p gd ) is the best fitness value obtained by swarm. In each iterative process, the velocity and the position of a particle are updated according to the following equations: where c 1 and c 2 are acceleration factors, rand 1 and rand 2 are uniform random variables in the interval [0, 1]. w is the inertia weight.
Much work has been done to understand and develop the ideal parameters for PSO implementation. Eberhart and Shi (2001), Shi and Eberhart (1999) suggested varying the value of w from 0.9 at the beginning of search to 0.4 at the end of search and suggested that the best value of c 1 and c 2 is 1.49 in most problems. In addition, population size N is also an important parameter and should be selected carefully. Large size increases the execution time and reduces the efficiency of the algorithm. While, small size leads to low accuracy of the optimal solution. Parametric studies on the size (Shi and Eberhart 1998;Ratnaweera et al. 2004) have found that the size should be selected in the range from 10 to 60. And the best value of the population size should be determined according to the problem.

Experimental section
We conducted two simulation experiments in this section. In the first, we determined the best value of the population size of the PSO algorithm. And in the second, we tested the performance of the proposed method using the PSO algorithm. In the two experiments, the magnetic moment of the target was set [920, −102, 1100] A m 2 . The length L of the array was 3 m. The solution space of the problem was set {[−100, 100] ; [−100, 100] ; [10, 50]}m. Scalar magnetometers is with high sensitivity, and intrinsic noise was about 0.6 pT/ √ Hz at 1 Hz. Geomagnetic field measurement error was set as: the average is zero and the standard deviation is 0.1 nT.

Population size of the PSO algorithm
In the first experiment, the magnetic target was at a fixed position and we changed the population size of the PSO algorithm to calculate the position of the target. The algorithm ran 100 times at each population size, and the results were shown in Table 1.
In Table 1, we can see that the calculation accurate and execution time of the algorithm is related to the population size. The calculation accurate increases along with the size. And the execution time also increases along with the size. However, we find that the accurate is almost not improved when the size reaches a certain level. Thus, the population size of the PSO algorithm is 30.

Track results
In the second experiment, the target moved along a plan trajectory. And we used the PSO algorithm to locate the target. The localization result is shown in Fig. 2. It shows that the tracked trajectory obtained by this method is close to the plan trajectory. And the positions of the target are calculated accurately. Figure 3 shows the relative error of the position component at each sampling point. It can be seen that the localization error increases as the distance increases, because the useful magnetic anomaly information attenuates with three cubed function. The relative error of localization is <5 %. Statistically, the localization error will be larger when the distance becomes larger.

Fig. 2 Localization result of magnetic target
The magnetic moment of the target can be estimated when the target's position had been calculated, as: where M x , M y , M z denote the component of the magnetic moment M of the target. Scalar value of magnetic moment can be obtained by Eq. (9), which is related to the target size. We can also estimate the orientation of the magnetic target by magnetic moment (M x , M y , M z ). Figure 4 shows the magnetic moment of the target calculated by Eq. (9). Comparing the theoretical value and the calculated value of moment, there is a difference between the values. It is mainly because that the calculated position of the target is not accuracy. Therefore, the accurate of calculated moment depends on the accurate of calculated position. From (9), we can know that the error of calculated moment comes from the error of the target's position. In addition, we also investigate the execution time of the PSO algorithm. Figure 5 shows the execution time of the PSO algorithm. The maximum time is about 0.69 s and the average time is about 0.56 s. The execution time is possible for the method to track the target in real-time.

Discussion
Equation (4) is obtained in the case that the array is in the static state. Consider using a magnetometer array on a moving vehicle and trying to locate a magnetic target. Rotational vibrations due to the vehicle's motion will generate changes of the array attitude. Therefore, the position (x, y, z) in Eq. (4) should be corrected by the attitude angles. In our magnetometer array, the attitude angles (α, β, γ) of the array can be measured by the inertia instrument. And the corrected position of the target is expressed as: In this simulation, the array attitude angles were changed and measured by the inertia instrument: (α = 5°, β = 10°, γ = 5°). The target moved along a plan trajectory. And we used the PSO algorithm to locate the target. The localization result is shown in Fig. 6. When the array attitude is changed, the calculated position with attitude correction is close to the true position. However, the calculated position without attitude correction has a large difference from the true position. Therefore, we must correct the position (x, y, z) in Eq. (4) by using the array attitude angles if its attitude changes.
In the PSO algorithm, the fitness function is a link between the particles and the physical world. And the well fitness function should have a good performance both in the quality of the solution and in the convergence speed. Thus, well fitness function must fulfill two criteria. First, the fitness function should be sensitive enough to the global optimal (10) x ′ , y ′ , z ′ = (x, y, z)R α R β R γ In other words, it should be a steep function of the variables when the variables are close to the global optimal solution, otherwise it should be a smooth function of the variables. In our fitness function [Eq. (6)], it is a steep function when the variables are close to the global optimal solution. However, there are some local optima in the solution space. Sometimes, the PSO algorithm can't jump out from the local optima when trapping in it. This is the reason why the quality of the solution calculated by the PSO algorithm is not too high. Second, the fitness function should be simple enough to reduce calculating time. In our fitness function [Eq. (6)], it is relatively complex and consumes more computing time. Therefore, we will improve the PSO algorithm ability of finding the global optimal solution and construct a better fitness function in the future.

Conclusions
In this paper, we propose an efficient method for tracking the magnetic target in realtime, which consists of scalar magnetometers array and a PSO algorithm. The scalar magnetometers are used to measure the scalar value of the magnetic anomaly included by the magnetic target. We separate the position information and magnetic moment information by matrix transformation and build the function F of x, y and z. Then, we use the PSO algorithm to obtain the solution of the function F. The simulation result shows that the position of the magnetic target can be calculated accurately. Then the magnetic moment of the target can be estimated when the target's position had been calculated. The PSO algorithm can reduce the execution time. Therefore, this method can be used for real time localization of the magnetic target. In addition, because of the array formed by scalar magnetometers which are insensitive to its orientation, it is easy for this array to be mounted on the platform.
Authors' contributions LMF and CK conceived and designed the study. LMF performed the simulation experiment. XJZ organized and wrote the manuscript. CK reviewed the paper. QZ and MW help to revise the paper. All authors read and approved the final manuscript.