#### Abstract

For searching and detecting near-field unknown ferromagnetic targets, four automatic search algorithms are proposed based on magnetic anomaly information from any position on planes or in space. Firstly, gradient search algorithms and enhanced gradient search algorithms are deduced using magnetic modulus anomaly information and magnetic vector anomaly information. In each algorithm, there are plane search forms and space search forms considering different practical search situations. Then the magnetic anomaly space data of typical magnetic source of oblique magnetization are forwardly simulated by ANSYS MAXWELL software. The plane distributions of some variables are numerically computed and the search destinations of different algorithms are predicted. Four automatic search algorithms are applied to simulate search paths on three characteristic orthogonal planes and in whole solution space. The factor affecting the performance of algorithms is analyzed. Features of each algorithm in different conditions are analyzed and suitable applications are discussed and verified by the experiment. The results show that proposed search algorithms require few prior information and have real-time performance for searching and tracking magnetic anomaly target.

#### 1. Introduction

With the development of magnetic signal processing technology [1–7], magnetic anomaly detection (MAD) has been widely applied for ferromagnetic object detection and location which plays important roles in many situations such as area surveillance and boundary security [8, 9], motion tracking [10, 11], and crack detection [12, 13].

According to objects’ features, there are two types of technologies for MAD. One considers the magnetic dipole model as the excitation source and the localization of magnetic dipole has been widely investigated in many cases, especially in submerged targets such as solid buried targets [14, 15] and underground pipes [16]. Conventionally, several nonlinear numerical estimation methods consisting of Bayesian [10] and optimization algorithms [17, 18] were applied in localization of magnetic dipole. In recent years, a set of linear equations was proposed for magnetic dipole localization which includes magnetic field vector and magnetic gradient tensor at a single measuring point [19–22]. Among them, the so-called Euler deconvolution method [19, 22] is one of the most elegant approaches, since the dipole is localized irrespective of its posture. Orientation tracking and moving direction identification [23–26] are another important research fields which can be potential technologies for intelligent transportation system [27] and intrusion detect system [28]. However, the prerequisite that regards the model as a magnetic dipole is that the characteristic size of magnetic object could be ignored comparing to the distance between magnetic sensors and the object. When it comes to the detection of near-field magnetic targets, these methods will no longer be applicable.

The other type technology of MAD concentrates on the detection of large-scale area with complex magnetic anomaly distribution which is mainly applied in mineral exploration and geologic mapping of prospective areas with buried igneous bodies. This kind of studies relies on magnetic inversion and quantitative interpretation [29–32] in whole data space, which can apply in source localization, buried depth estimation, and edge detection of mineral resources. However, these studies acquire numerous magnetic anomaly data in the wide range of areas by the magnetic sensor system in advance. Therefore, it requires accurate magnetic detection apparatus, proper detection manners, and extra cost and time which will result in analysis hysteresis and inconvenience of magnetic anomaly detection.

Limited by the hypothesis of magnetic dipole model, the first technology can only detect and track targets in a long distance so that it cannot be applied for the targets in near-field. The second method which acquires the whole magnetic field data in advance restricts its real-time application. Therefore, limited by shortcomings of existing methods, they can only realize locating targets and it is the first time that the magnetic anomaly information is employed in automatic search. In this paper, we focus on the situation when the magnetic measuring system is near a big-scale ferromagnetic target, which determines that the magnetic dipole model is no longer applicable. Four automatic search algorithms based on local magnetic anomaly information are proposed, which can be applied to search from any point on planes or in space without knowing the features of the target and the space magnetic anomaly data in advance. Comparing with the two types of technologies above, four different algorithms applied in automatic searching near-field unknown ferromagnetic targets we proposed require few prior information and have real-time performance for searching and tracking magnetic anomaly targets.

The remainder of this paper is organized as follows. In Section 2, two kinds of definition of magnetic anomaly information are put forward. Based on each definition, two sorts of algorithms are proposed with a plane search form and a space search form. In Section 3, the near-space magnetic anomaly data of ferromagnetic target are forwardly simulated by ANSYS MAXWELL. And the plane distributions of some characteristic parameters are numerically computed, which can be used to predict the plane search destinations of different algorithms. In Section 4, plane search paths and space search paths are simulated by four algorithms based on the near-space magnetic anomaly data. Features of each algorithm are compared and suitable applications are discussed. In Section 5, an experiment is designed to verify the practicability and effectiveness of algorithms. Conclusions are drawn in Section 6 and the recommendations is in Section 7.

#### 2. Automatic Search Algorithms Based on Magnetic Anomaly

##### 2.1. Definitions of Magnetic Anomaly Parameters

Consider measuring the magnetic anomaly vector at any point in space. Denote the geomagnetic field vector in this position by and assume it a constant quantity in near-space. represents the magnetic anomaly vector generated by a ferromagnetic object at the measuring point. Then the whole magnetic anomaly vector can be expressed by and as follows:

The main prospecting instruments such as proton magnetometers and optically pumped magnetometers measure the magnitude of . By subtracting the background geomagnetic modulus , a kind of magnetic anomaly definition can be derived by (2). It can also be called magnetic modulus anomaly (MMA).

According to the analysis of relations among vectors , , and [33]. can be approximately expressed by and as follows:where is the angle between magnetic field vectors and . The modulus of is defined as the second kind of magnetic anomaly parameter which can also be called Magnetic Vector Anomaly (MVA). In a real application, the magnetic field vector cannot be measured directly because the measurement data of is mixed with background geomagnetic field vector . If is a known quantity which can be expressed by and total magnetic field is directly measured as , and can be calculated as

From (4) and (5), the magnetic anomaly gradient vectors of MMA and MVA can be described as

The continuous form of magnetic field gradients is expressed by (6) and (7), while the magnetic field gradients obtained by differential measurement of discrete magnetic field values are discrete in engineering applications. The interior gradients are calculated by the central difference and the gradients along the edges are calculated by single-sided differences. The discrete form of interior magnetic field gradients can be expressed as

The discrete form of gradients along the edges is similar to interior gradient. The distinction is to calculate the difference with the adjacent node and the calculation process is omitted.

##### 2.2. Algorithms Based on Gradient of Magnetic Anomaly

In order to search for some underwater or buried targets, plane search is an important approach and needs to be studied. Choose* xoy* plane as a search area, is the start search point on the plane, and the magnetic modulus anomaly and magnetic vector anomaly are measured as and . According to (8) and (9), two gradient vectors on the plane can be calculated as and . Then we can define plane gradient modulus of MMA and MVA as

The gradient unit vectors of MMA and MVA at point can be described as

Then two kinds of automatic plane search algorithms based on magnetic anomaly gradients can be described as where* d *is the moving step length of every detection and search and is a correction factor which can solve some divergent search results caused by algorithm based on gradient of MMA. According to (3), MMA can be divided into positive MMA and negative MMA while MVA is always nonnegative. So is defined as follows:

If* yoz* plane or* xoz *plane is chosen as a search plane, algorithms are derived similarly as (10)-(16). Besides plane search applications, when the search area expands to the whole 3D space, space search algorithms are needed and the space gradient modulus of MMA and MVA can be defined as

Accordingly, (12)-(16) can be promoted to automatic space search algorithms by increasing one-dimensional vector.

##### 2.3. Algorithms Based on Enhanced Gradient of Magnetic Anomaly

In order to interpret magnetic anomaly field information better, enhanced gradients are derived from magnetic anomaly gradient modulus. Similarly, considering the* xoy* plane area detection, enhanced gradient vectors of MMA and MVA can be defined, according to (10) and (11), as follows:

The discrete form of the interior enhanced gradients in* xoy* plane, which is similar to (8) and (9), is expressed as

The discrete form of gradients along the edges is similar to interior gradient. The distinction is to calculate the difference with the adjacent node and the calculation process is omitted.

As for any point on the plane, two kinds of enhanced gradient vectors and can be measured and calculated by (4)-(11), (21), and (22). Then we can define plane enhanced gradient modulus of MMA and MVA as

The enhanced gradient unit vectors of MMA and MVA at point can be described as

Then two kinds of automatic plane search algorithms based on magnetic anomaly enhanced gradients can be defined as

Likewise, (19)-(28) can be applied to* yoz* plane or* xoz *plane. When the search area expands to the 3D space, (21) and (22) can also be promoted to 3D forms by (17) and (18). And the space enhanced gradient modulus of MMA and MVA of space search algorithms can be defined as

Accordingly, plane search algorithms described by (23)-(28) can also be promoted to automatic space search algorithms.

#### 3. Numerical Simulation of Typical Magnetic Anomaly Field

##### 3.1. Simulation Conditions

We firstly simulate the space magnetic anomaly field distribution of a typical object. A cubic solution space with length = 1000 m established by ANSYS MAXWELL shows in Figure 1. A cuboid ferromagnetic object (red component in Figure 1 and long direction along the Y axis) which size is 70 m by 300 m by 70 m is placed in the center of the solution space, which is a simplified ship model. The chosen material of the object is steel and the magnetic coercivity is set to 0A/m because the coercivity of soft-magnetic materials [34] is very small and generally less than 1A/m. The geomagnetic field condition of the solution space is assumed as homogeneous in which the total intensity is 50000nT. The geomagnetic field direction is set along the vector , namely, magnetizing the ferromagnetic object obliquely along its long direction. It should be noted that the geomagnetic field can be any direction which has limited influence on results. The geomagnetic field direction selected along the vector makes the simulation result more visual and clear which is symmetric on the* yoz* plane.

##### 3.2. Distributions of Magnetic Anomaly

By analyzing the simulated data of magnetic anomaly outside the cuboid object, it is found that the distribution laws are consistent separately with three groups of orthogonal planes parallel to* xoy*,* yoz*, and* xoz*. In order to predict the plane search destinations of each algorithm, three characteristic orthogonal planes are chosen as representatives of their plane families. These three planes are , , and .

According to (4) and (5), distributions of and are computed on three characteristic orthogonal planes which are shown in Figure 2. As for distributions of MMA, there are both two positions of maximum values, one position of minimum value in Figures 2(a) and 2(b) and only one position of maximum value in Figure 2(c). As for distributions of MVA, there are two positions of maximum values in Figure 2(e) and both only one position of maximum value in Figures 2(d) and 2(f). In addition, these extremum positions are somewhat offset or twisted in Figures 2(a)–2(e) because of the oblique magnetization while the distribution in Figure 2(f) is strictly symmetric. By analyzing the plane search algorithm based on gradient of MMA, the search destinations will get close to local extremum points, while the search destinations will only get close to the local maximum points based on the plane search algorithm based on gradient of MVA.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

Likewise, distributions of and are computed on three characteristic orthogonal planes using (8) and (9) which are shown in Figure 3. There is also certain regularity for the distribution of each plane, but the laws are unique. By analyzing positions of the local maximum values in Figures 3(a)–3(c), we can predict the search destinations based on the plane search algorithm of enhanced gradient of MMA. Also, positions of local maximum values in Figures 3(d)–3(f) indicate the search terminals based on the plane search algorithm of enhanced gradient of MVA.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

#### 4. Simulation and Analysis of Search Algorithms

##### 4.1. Search Algorithms Based on Gradient of Magnetic Anomaly

Automatic plane searches are also conducted on characteristic orthogonal planes of , , and . There are 25 points chosen as initial search starting points which are uniformly distributed on each plane. From every initial point, search paths are simulated by (14) and (15). The moving step length* d *is set as 1 m. And the profile of the magnetic target is projected on each orthogonal characteristic plane as transparent red area. The direction of each red arrow indicates the direction of search paths and search paths end with a blue dot as the destination. All terminals will either be the optimal position calculated by algorithms or be on the boundary of each characteristic plane.

As shown in Figure 4, automatic search paths are simulated by plane search algorithms based on gradient of magnetic anomaly on three characteristic orthogonal planes. Comparing the results of two kinds of algorithms, the gradient algorithm of MVA is better than that of MMA apparently. All initial points can be searched near the projection area of magnetic target in the vicinity of a certain point or at certain points on each plane. Moreover, points are more symmetrically and intensively distributed near the target. As for the gradient algorithm of MMA, it is worth noting that, with the distance of each characteristic orthogonal plane getting close to the ferromagnetic target, the search terminal points will become more concentrated and more symmetric by the target.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

Automatic space searches are conducted in the solution space. There are 25, 24, and 25 initial search points uniformly distributed on plane , and (the point inside the ferromagnetic target is omitted). Space search paths are simulated using the promoted automatic space search algorithms based on magnetic anomaly shown in Figure 5. It is found that both space algorithms can converge to the target from any initial search point in the whole space (as for the simulation of gradient algorithm of MMA, it is assumed that the search paths can move along the boundary of the solution space). However, the search distances are shorter and the search path envelopes are more concentrated base on the gradient algorithm of MVA.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

##### 4.2. Search Algorithms Based on Enhanced Gradient of Magnetic Anomaly

With the same initial search points condition, plane search paths are calculated by (27) and (28) on three characteristic orthogonal planes. As shown in Figures 6(a) and 6(b), based on enhanced gradient algorithm of MMA, search terminal points concentrate on several certain positions on planes of and and there are a few divergent paths away from the target on plane . Except some divergent paths on plane in Figure 6(c), the terminal points of convergent paths are distributed around the projection profile of the target. The search results based on enhanced gradient algorithm of MVA show more consistent in Figures 6(d) and 6(f), all paths are convergent and all terminal points distribute around the projection profile.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

Figure 7 shows space search paths based on two kinds of space enhanced gradient algorithms. Generally, paths convergences of both algorithms are the same and all terminal points can get close to the surface of the target with relative short paths. However, the simulated path curves are not very smooth by simulation because the calculated precision of the space enhanced gradient modulus of magnetic anomaly will be influenced by the introduction of high-order derivative.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

##### 4.3. The Analysis of Factors Affecting the Performance of Algorithms

The simulation conditions is the same as Section 3.1, except the geomagnetic field direction along the vector n=(√2,1,-1). In the simulation, the coordinate of the target is fixed and the magnetizing direction is determined by the geomagnetic field direction. Figure 8 shows space search paths based on gradient algorithms and Figure 9 shows space search paths based on enhanced gradient algorithms. Comparing with Figures 5 and 6, there are no obvious changes in the performance of algorithms. The magnetizing direction does not directly affect the performance of algorithms. In fact, the position of initial search starting points related to magnetizing direction has a large impact on the performance of algorithms. It is obvious that the initial search starting points have expansive search path envelopes and longer search distances which is away from the target in the direction perpendicular to the magnetizing direction in Figures 8(c)–8(e). This factor has a significant impact on the performance of the algorithm based on gradient of MMA and the other three are affected slightly.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

##### 4.4. Comparisons and Discussions

Comparing the results of four plane searches in Figures 4 and 6, algorithms based on gradient and enhanced gradient of MVA show better convergence and their difference mainly relies on the distribution of the terminal points. The former concentrates on several certain positions near the projection area of target and the latter is distributed around the projection profile of target. What is more, they are barely influenced by the magnetization condition and posture of target. As for algorithms based on gradient and enhanced gradient of MMA, they both have some divergent paths and the distance of convergent paths are longer than algorithms based on MVA.

Comparing the results of four space searches in Figures 5 and 7, all paths can converge to ferromagnetic target. The algorithm based on gradient of MMA shows longer search distance and worse efficiency. The other three algorithms show similar performances in general, but the distance of search paths based on gradient algorithm of MVA is comparatively the shortest one. Detailed comparisons of four automatic search algorithms are shown in Table 1.

However, when applying algorithms to real engineering tasks, some technological limitations need to be considered. For example, the attitude change of mobile magnetic sensors system critically affects the measurement precision of magnetic field vector which affects the precision of MVA, thereby increasing the ambiguity of searching direction. So the measurement of MVA is much more difficult and has higher requirements on measuring instruments. What is more, the coupling effect of the high-order derivative and the noise of sensors can also influence the application of enhanced gradient algorithms. By considering these factors, suitable applications are discussed for each algorithm. Firstly, it is simplest to implement based on gradient algorithm of MMA while the search results are of the worst. It can satisfy the preliminary detection. Considering the improvement of enhanced gradient algorithm of MMA, it is more suitable to search and track for target with relative low cost. As for algorithms based on MVA, gradient algorithm is the most precise and efficient approach for search and tracking. Finally, the most advantages of enhanced gradient algorithm of MVA are plane boundary search and identification.

#### 5. Experiment

To verify the practicability and effectiveness of algorithms proposed, an experiment is designed. Figure 10 shows experimental devices. It is a 1:1000 scaled model experiment and the target is a cuboid ferromagnetic object whose size is 70 mm 70 mm 300 mm on the ground center of the aluminum frame. The 3-axe magnetic sensor can move with the slider. The coordinate origin is set as the lower left corner of the device. The data of the point on the center of top is set as the geomagnetic field . Limited by the size of frame, the magnetic field data is collected from 340 mm to 660 mm in x axis, 260 mm to 740 in y axis, and 485 mm to 885 mm in z axis. Because the data is collected in static state, the error of vector is smaller than collecting in moving state, which has little influence on MVA. Running in real magnetic field, algorithms proposed can be verified.

The magnetizing direction is the same as Section 3.1 simulation condition which magnetizes the ferromagnetic object obliquely along its long direction. Figures 11 and 12 show automatic space search paths based on gradient and enhanced gradient of magnetic anomaly in real magnetic field. Comparing the results of algorithms based on gradient and enhanced gradient of MMA in Figure 11, the algorithm based on gradient of MMA just gives a general orientation of the target. Only a few points arrived at the target. Most points of the algorithm based on enhanced gradient of MMA close to the surface of the target. Both algorithms have several points stopping in the direction perpendicular to the magnetizing direction. Considering the results of algorithms based on gradient and enhanced gradient of MVA in Figure 12, both algorithms show better convergence than algorithms of MMA. All the points close or arrive the surface of the target in the algorithm based on gradient of MVA and the algorithm has the shortest search distance and the most concentrated search path envelopes shown in Figure 12(c). The algorithms based on enhanced gradient of MVA also has a good performance in which all the points are close to the surface of the target. The experiment demonstrates four algorithms proposed that can work in real magnetic field and the algorithm based on gradient of MVA is the most precise and efficient approach for search and tracking.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

#### 6. Conclusions

We have proposed four automatic search algorithms based on searching and tracking near-field magnetic anomaly targets. By measuring information of magnetic modulus anomaly or magnetic vector anomaly from any point, automatic search can be conducted on planes or in space. To study these algorithms, typical magnetic anomaly distributions are forwardly simulated. Then the magnetic field data on characteristic orthogonal planes and in solution space are extracted and search simulations are carried out. Next, the effects and features of each algorithms are analyzed and compared. Finally, an experiment is present to verify algorithms in real magnetic fields. To overcome the limitation of methods based on magnetic dipole model [19, 21, 22] which cannot be applied in near fields of targets, the algorithms can use the magnetic anomaly information directly without modeling the target. Different form methods relying on magnetic inversion and quantitative interpretation [30], the algorithms use local magnetic anomaly information instead of the whole space data that reduce the amount of calculation and guarantee the real-time process. Four algorithms proposed in this paper need no prior information about the searched target or the whole magnetic anomaly distribution, except the geomagnetic field scalar or vector. What is more, these algorithms are suitable for real-time search and tracking which can avoid inconvenience or analytical hysteresis problem caused by the detection of large range of magnetic anomaly.

#### 7. Recommendations

We have proposed four different algorithms based on the magnetic anomaly information to realize automatic search to near-field ferromagnetic targets and it is the first time that the magnetic anomaly information is used in automatic search. There are still some improved spaces:(1)The computational method of gradient is the simplest form. The performance of algorithms could be improved by changing the gradient form to shorten the path and accelerate converge speed.(2)Theoretically, algorithms proposed can be applied to moving objects. More simulation and experiment are expected to verify.(3)The measurement of : the magnetic anomaly data generated by the target is obtained indirectly by the measuring magnetic anomaly vector T or modulus minus the geomagnetic field vector or modulus . In other words, all the calculations are based on the geomagnetic field vector or modulus .In the simulation, has no effect on the method performance. However, in reality, has a strong impact on results. Different from the simulation which is given as an input parameter, is only measured once by sensors in reality. In engineering application, we use the magnetic field data of first point as the background field . This is the farthest point from the target. If is measured with a large error, it will have strong effect on the algorithms and even cause failure. Therefore, improving the measurement accuracy of is a research direction in future work.

#### Data Availability

All the data used in the article are simulated in ANSYS Maxwell and algorithms are implemented by Matlab. Magnetic field models and codes of algorithms are available if you email the authors.

#### Conflicts of Interest

The authors declare that we have no conflicts of interest.