1. Introduction
Under the influence of the Earth’s magnetic field, ferromagnetic targets inevitably undergo magnetization, leading to alterations in the distribution of the ambient magnetic field and the generation of magnetic anomalies [
1]. These anomaly signals serve as crucial sources for detecting and locating magnetic targets [
2]. Magnetic detection, known for its advantages of passive and high-precision detection, has gained widespread attention. Currently, it finds applications in various fields such as underwater intrusion detection [
3], UXO detection, iron ore exploration [
4], endoscopic capsule detection, and more.
In comparison to scalar [
5,
6] and vector [
7,
8,
9] magnetic measurements, magnetic gradient tensors provide rich information about the source field and exhibit the advantage of being less influenced by the Earth’s magnetic field. Consequently, they have garnered significant attention in recent years.
The measurement of magnetic gradient tensors, providing information on nine components containing source field information, has made methods utilizing this information for target localization a research hotspot. These localization methods can essentially be categorized into two types: single-point and multi-point methods. A prominent algorithm in single-point localization is the method proposed by Nara et al. [
10], from the University of Tokyo, which utilizes a target’s magnetic gradient tensor and vector field information to locate magnetic dipoles. This method calculates the target’s position information through a closed-form localization formula, making the computation straightforward. However, it relies on the target’s vector field information, which is challenging to separate from the geomagnetic background field, introducing estimation errors. Nara [
11] later addressed the singularity issue in this method during localization analysis. In response to this problem, Yin Gang [
12] proposed a corresponding solution. Nonetheless, these methods still face challenges associated with errors in estimating the geomagnetic field.
To overcome issues in single-point localization methods, several scholars proposed corresponding improvement methods [
13,
14,
15]. Typically, the approach involves not directly utilizing the magnetic field vector term from the original Nara algorithm. For instance, in reference [
16,
17], methods using higher-order tensor information for target localization were proposed. Due to the small magnitude of the magnetic gradient tensor after differencing and its susceptibility to measurement noise, these methods have high demands on the dynamic noise of the measuring instrument. In reference [
18], the characteristic of approximately equal geomagnetic field values at two closely spaced measurement points is exploited. An equation system of the target’s position is established for localization. However, this method requires a specific magnetic gradient tensor measurement structure to simultaneously measure information from two points, making it structurally complex. Reference [
19] replaces the target’s magnetic moment with the target’s vector magnetic field values and constructs a nonlinear objective function of the target position parameters. A genetic algorithm is then employed to solve the function with these parameters. However, the above optimization algorithm only utilizes the relationship between the positions of two measurement points and the measured values of the magnetic gradient tensor. The success rate of optimization is low, and it is greatly affected by the initial values. Liu Huan [
20] introduced a constraint term, magnetic moment constraints, to the aforementioned optimization algorithm, reducing localization errors. However, the issue of easily falling into a local optimum still persists.
The property of tensor invariants, remaining unchanged with variations in the carrier’s orientation, has garnered significant attention. Consequently, the method of utilizing magnetic gradient tensor invariants for localization has been extensively researched. Wiegert et al. [
21], from the U.S. Naval Surface Warfare Center, introduced a method (STAR) utilizing magnetic gradient tensor invariants for localization. Subsequently, several scholars [
22,
23,
24] conducted research on the properties satisfied by these invariants and proposed methods for localization using them. The method of using invariants for positioning is essentially a multi-point positioning method. However, achieving real-time localization with invariants requires a complex magnetic gradient tensor measurement system structure, involving a considerable number of magnetic fluxgate sensors. This complexity results in a higher number of error parameters to be corrected [
25,
26,
27,
28], posing challenges in practical applications.
In summary, the current single-point magnetic gradient tensor localization methods face challenges from the errors in estimating the geomagnetic field. Simultaneously, multi-point localization methods encounter issues of low optimization efficiency and a susceptibility to falling into local optima. To address these challenges, a two-point magnetic gradient tensor localization method is proposed, incorporating constraints from tensor geometric invariants. This method utilizes magnetic gradient tensor measurement data from two points, superimposes constraints from tensor geometric invariants, constructs a nonlinear objective function regarding the target’s position coordinates, and employs the Nara localization method to compute the initial target position. This initial value is then input into the Levenberg–Marquardt algorithm to obtain an accurate solution for the target’s position parameters. Finally, the effectiveness of the positioning method proposed in this paper is validated through simulation experiments using three measurement paths and experimental tests using one measurement path. The experimental results indicate that the proposed method can achieve the precise positioning of magnetic targets.
3. Simulations
To validate the effectiveness of the method proposed in this paper, simulation experiments were designed for verification. The computational process used in the simulation experiments of the method proposed in this paper is illustrated in
Figure 2. For comparison with existing methods, the Nara localization method, a two-point localization method from reference [
19], and another two-point localization method from reference [
20] were selected. For simplicity, the localization method from reference [
19] is referred to as the ZTPT (Zhang’s two-point tensor) method, the localization method from reference [
20] is referred to as the LTPT (Liu’s two-point tensor) method, and the proposed localization method in this paper is referred to as the PTPT (the proposed two-point tensor) method.
The simulation conditions are as follows: the magnetic gradient tensor measurement system is mounted on an underwater UUV platform for magnetic target localization. The commonly seen structural forms of magnetic gradient tensor systems include cross-shaped, square, tetrahedral, and hexahedral forms. Among them, the cross-shaped magnetic gradient tensor system is relatively easy to implement, and the center point of the structure is easy to determine. According to reference [
32], the system error of the cross-shaped magnetic gradient tensor system is relatively small. Therefore, in simulation experiments, the cross-shaped magnetic gradient tensor system is used for target localization. To minimize magnetic interference from the UUV platform to the detection system, the system is installed at the head of the UUV, as shown in
Figure 3. A Cartesian coordinate system is established with the center of the cross-shaped magnetic gradient tensor system as the origin. The baseline length of the system (the distance between two magnetic sensors on the same coordinate axis) is 0.5 m. The three measurement axes of the fluxgate magnetometer are overlaid with Gaussian white noise with a variance of 0.06 nT. The magnetic moment vector of the magnetic target is (4,000,000, 200,000, 100,000) Am
2. The geomagnetic field during simulation is simulated using the WMM2020 geomagnetic model. The model’s input latitude and longitude are 36°06′ N, 120°19′ E, and the time is January 2023.
The factors that may affect PTPT localization mainly include different initial values, different measurement routes, different measurement noise conditions, and different UUV platform position measurement errors. Therefore, simulation experiments are separately designed to analyze these factors. To verify the localization effectiveness of PTPT under different measurement paths, three typical measurement paths are selected for simulation, as shown in
Figure 3. Under the path 1 condition, at time t
0, the magnetic target is located at coordinates (40, −40, −40) m, and the displacement between two adjacent measurement points,
, is (4, −4, 0) m. Under the path 2 condition, at time t
0, the magnetic target is located at coordinates (40, 40, −40) m, and the displacement between two adjacent measurement points,
, is (4, 4, 0) m. Under the path 3 condition, at time t
0, the magnetic target is located at coordinates (−40, 40, −40) m, and the displacement between two adjacent measurement points,
, is (0, 4, 0) m. During simulation, according to the algorithm process in this paper, as shown in
Figure 2, the target position at time t
2 is calculated based on the measurement data of two consecutive measurement points, t
1 and t
2. The localization error
and the relative localization error
are calculated based on the calculated target position and the actual target position using the following equations:
where
represents the true value of the target’s position, and
is the estimated target position obtained through the localization algorithm. Therefore, the localization error
and the relative localization error
are calculated based on the comparison between the true and estimated positions.
3.1. Analysis of Positioning Results under Different Initial Conditions
Under different initial value conditions, the localization results of the PTPT method are analyzed. In the PTPT method, the LM algorithm is used to solve the nonlinear equations. However, the LM algorithm has some dependence on initial values, and inappropriate initial values may lead to failure in finding the optimal solution. To illustrate this situation, different initial values have been selected for solving the equation using the LM algorithm. Taking path 1 from
Figure 3 as an example for analysis, a coordinate system is established with the center of the measurement system as the origin. At the initial time t
0, the magnetic target is located at coordinates (40, −40, −40) m. At time t
1, the displacement of the UUV forward movement is (4, −4, 0) m. At this time, in the coordinate system with the center of the measurement system as the origin, the magnetic target is located at position (36, −36, −40) m. Utilizing the magnetic gradient tensor measurement data at t
0 and t
1, along with the position relationship between the two points, the target position can be solved.
Table 1 presents the results obtained by the LM algorithm under different initial value conditions.
In
Table 1, the first column represents the different initial values of the LM algorithm, the second column represents the target positions obtained by the LM algorithm, and the third column represents the relative error. From the simulation results, it can be observed that the LM algorithm can achieve optimal solutions when the initial values fall within a certain range of the true target position. If the initial values deviate beyond a specific range from the true target’s position, the LM algorithm may fail to converge to an optimal solution. Different planes have been selected to calculate the objective function values for points on those planes. Two typical planes, Z = −40 m and Z = −10 m, have been selected. The simulation results are shown in
Figure 4. From the simulation graph, it can be observed that the objective function distribution on the Z = −10 m plane exhibits multiple local minima, making it prone to getting trapped in local optima. On the Z = −40 m plane, there are two local minima, with one representing the true target position as the global minimum point. If the initial values are chosen closer to the global minimum point, the LM algorithm can compute the global minimum point. In practical scenarios, despite the Nara localization method being influenced by geomagnetic field estimation errors and having some inherent inaccuracies, it provides an accurate solution within a certain range of the true target position. Therefore, using the target position calculated by the Nara method as an initial value in the LM algorithm can yield a precise solution for the target position.
3.2. Analysis of Path 1 Positioning Results
The positioning results are computed using the Nara, ZTPT, LTPT, and PTPT methods.
Figure 5 illustrates the calculation results.
Figure 5a displays the variation in the positioning errors over time for the four methods. However, due to the presence of two significant error peaks in the results of the ZTPT method, it is challenging to visually discern the differences between the four positioning methods in
Figure 5a. Therefore, to enhance clarity,
Figure 5b zooms in on the
of
Figure 5a.
From
Figure 5b, it is evident that, among the four positioning methods, the PTPT method proposed in this paper consistently exhibits smaller positioning errors, indicating the best positioning performance. Due to the presence of geomagnetic field estimation errors, the Nara method exhibits relatively larger positioning errors. The ZTPT method, although not directly utilizing magnetic field tri-components for positioning, exhibits slightly smaller errors compared to the Nara method. However, it faces the issue of easily falling into local optimal solutions, as evidenced by the high calculation errors at t = 8 s and t = 13 s, reaching 65.6 m and 48.5 m, respectively, as shown in
Figure 5a. The LTPT method incorporates the constraint terms, effectively resolving the issues present in the ZTPT method. Nevertheless, as geometric invariance constraints are not included, significant errors still persist. With the addition of vertical vector constraints, the PTPT method further reduces the positioning errors. The statistical analysis of the positioning errors along path 1 reveals that the PTPT method has an average positioning error of 0.28 m, the lowest among the four methods. The Nara method has an average positioning error of 4.32 m, while the LTPT method’s average positioning error is 1.96 m. Due to the presence of two significant error peaks, the average positioning error of the ZTPT method is 7.62 m. However, upon excluding these two large error points, the average positioning error reduces to 2.13 m, still lower than that of the Nara method.
3.3. Analysis of Path 2 Positioning Results
The simulation analysis of the UUV’s positioning performance along path 2 using the four methods is presented in
Figure 6.
Figure 6a shows the original processing results, while
Figure 6b zooms in on the y-region of
Figure 6a. From the simulation results, it is evident that the positioning error of the PTPT method proposed in this paper consistently outperforms the other three methods. The ZTPT method still exhibits susceptibility to falling into local optimal solutions, with significant positioning errors occurring at t = 7 s, t = 13 s, and t = 14 s, reaching 47.89 m, 57.87 m, and 44.25 m, respectively. When a magnetic moment constraint is added to the ZTPT method, the positioning error of the LTPT method significantly decreases. However, the problem of susceptibility to local optimal solutions persists, with a positioning error of 5.3 m at t = 28 s, exceeding the 4.8 m positioning error of the Nara method. The statistical analysis of the average positioning errors of the four methods reveals that the Nara method has an average positioning error of 3.95 m, while the LTPT method’s average positioning error is 2.04 m, lower than that of the Nara method. The average positioning error of the ZTPT method is 9.6 m, but, upon removing the three points with significant errors, the average positioning error reduces to 2.47 m. The positioning error of the PTPT method is 0.39 m, indicating the best positioning performance.
3.4. Analysis of Path 3 Positioning Results
The simulation analysis of the positioning effect of UUV along path 3 motion isconducted using the Nara method, the LTPT method, the ZTPT method, and the PTPT method to locate the target. The positioning errors of different methods are calculated, as shown in
Figure 7, and it can be observed that both the LTPT method and the ZTPT method suffer from the problem of getting trapped in local optimal solutions. The positioning error of the LTPT method at t = 10 s reaches 15.32 m, while the ZTPT method’s positioning error at t = 11 s is 29.52 m. The statistical analysis of the average positioning errors for several methods reveals that the Nara method has an average positioning error of 4.8 m. Due to points with significant positioning errors, the ZTPT method has an average positioning error of 6.06 m, higher than that of the Nara method. The LTPT method has an average positioning error of 4.74 m, slightly lower than that of the Nara method. The PTPT method proposed in this paper shows the best positioning effect, with a positioning error of only 0.7 m, the lowest among all the methods.
3.5. Analysis of Positioning Results under Different Sensor Noise Conditions
Based on the simulation results of the above three typical measurement paths, it can be concluded that, among the four positioning methods, the PTPT method exhibits the smallest positioning error and the best performance. To validate the positioning effectiveness of the PTPT method under different sensor noise conditions, the following simulation experiment was designed. Path 1 was used for the simulation, and different measurement noises were added to the three measurement axes of the fluxgate sensors in the measurement system. The variances in the noises were set to 0.01 nT, 0.06 nT, and 0.2 nT, respectively. Then, the PTPT method proposed in this paper was employed to locate the target, and the calculation results are shown in
Figure 8.
From the simulation results, it can be observed that, when the three measurement axes of the fluxgate sensors are subjected to noise with a variance of 0.01 nT, the average positioning error of the PTPT method is 0.1 m. When the noise variance is increased to 0.06 nT, the average positioning error becomes 0.28 m, and, when it reaches 0.2 nT, the average positioning error further increases to 0.51 m. As the measurement noise increases, the average positioning error of the PTPT method continues to rise. However, even when the measurement noise is 0.2 nT, the average positioning error remains below 1 m. Therefore, the PTPT method proposed in this paper demonstrates insensitivity to measurement noise and exhibits good robustness.
The robustness of the PTPT method may not be suitable for all levels of noise intensity, which is speculated to be related to the size of the target magnetic moment and the level of noise. A simulation was conducted to examine the effect of target magnetic moment variations on localization errors when the noise variance in the magnetic fluxgate was 1 nT. During simulation, the target magnetic moment values were varied from the original value to one-tenth of the original value, with the intermediate values being half, one-third, and so forth. The simulation scenario involved a UUV platform moving along path 1, and localization of the target was performed using measurement data from two points, t0 and t1. The relationship between the calculated localization error and the target magnetic moment is shown in
Figure 9. Additionally, the relationship between the ratio of the target’s magnetic anomaly signal magnitude to the measurement noise magnitude and the target’s magnetic moment variations was analyzed, as depicted in
Figure 9. In
Figure 9, the light red curve represents the relationship between the target’s localization error and its magnetic moment variations, with the corresponding error values displayed on the right axis. The blue curve represents the relationship between the ratio and the target’s magnetic moment variations, with the corresponding ratio values displayed on the left axis.
From the simulation results in
Figure 9, it can be observed that, under constant noise levels, as the magnetic moment decreases, the target positioning error increases continuously. When the ratio of the target’s magnetic anomaly magnitude to the measurement noise magnitude is less than 15, corresponding to a magnetic moment of less than 1,335,420 Am², the target positioning error increases rapidly.
3.6. Analysis of the Influence of Position Measurement Errors on the Localization Results for a UUV Platform
The above simulation analysis assumes that the position of the magnetic sensor, i.e., the UUV carrier platform’s position, is accurate. However, in reality, the UUV platform itself has position measurement errors. If there are errors in the position of the magnetic sensor, it will affect the localization performance of the PTPT method proposed in this paper. In a simulation analysis where the variances in the UUV platform’s self-position measurement errors are 0.1 m, 0.2 m, and 0.5 m, respectively, the localization performance of the PTPT method is evaluated. Path 2 is chosen for the simulation experiments, and the simulation results are shown in
Figure 10.
From the simulation results, it can be observed that, as the distance between the UUV platform and the magnetic target decreases, the localization error of the magnetic target decreases continuously. Moreover, the larger the position measurement error of the UUV platform, the relatively larger the localization error of the magnetic target. When the variance in the position measurement error is 0.1 m, the average localization error is minimized, measuring 1.54 m. When the variance in the position measurement error is 0.2 m, the average error is 3.22 m. Lastly, when the variance in the position measurement error is 0.5 m, the maximum average localization error is 9.07 m.
3.7. Analysis of the Localization Effects of Different Objective Functions
The objective function proposed in this paper’s PTPT method incorporates constraints on geometric invariants. To verify the localization effects under different objective functions, this study compares the objective functions used in the LTPT method and the ZTPT method. When simulating the comparisons, only the objective functions are altered, while the rest of the conditions are set to the same values as the PTPT method. The initial values are computed using the Nara method, and Path 3 is selected for the simulation. The simulation results are depicted in
Figure 11 below.
From the simulation results, it can be observed that the objective function incorporating geometric invariants achieves the best localization effect, with an average localization error of 0.66 m. In contrast, the localization effects of the objective functions used in the LPTP method and ZTPT method are poorer, with average localization errors of 19.55 m and 19.64 m, respectively. It is worth noting that the LPTP method adds a magnetic moment constraint to the objective function of the ZTPT method, resulting in a slightly lower localization error compared to the ZTPT method.
4. Experiments and Result Analysis
To further validate the effectiveness and practicality of the proposed method, this study conducted real positioning experiments with ferromagnetic objects. The experiment took place in a plaza with minimal environmental magnetic field interference, as depicted in
Figure 12. A cross-shaped magnetic gradient tensor system was constructed using four domestically produced magnetic fluxgate magnetometers. The stand was made of non-magnetic materials, and the system’s baseline length was 0.26 m. The system errors were calibrated before use. During the experiment, a coordinate system was established with the center of the cross-shaped magnetic gradient tensor system as the origin, as shown in
Figure 12.
A ferromagnetic object was placed on a plastic bucket during the experiment, with the bucket’s height being 0.25 m. The magnetic gradient tensor system remained fixed, and the magnetic target was moved parallel to the Y-axis to simulate multi-point measurements. The magnetic target started at y = −1.2 m and then was moved to y = 1.2 m in increments of 0.3 m, resulting in a total of nine measurement points. The data from these points were processed using four different methods: Nara, PTPT, LTPT, and ZTPT.
The positioning results, shown in
Figure 13 and
Figure 14 and
Table 2, reveal that PTPT provides the most accurate positioning. The spatial distribution of the calculated positions closely aligns with the actual target positions.
Figure 13 illustrates the quantitative comparison of the positioning errors among the different algorithms. Due to estimation errors in the geomagnetic field, Nara’s method exhibits larger positioning errors when the measurement system is far from the magnetic target but decreases when closer. PTPT, LTPT, and ZTPT overcome the impact of geomagnetic field estimation errors, resulting in relatively smaller positioning errors. However, ZTPT faces the challenge of getting stuck in local optimal solutions, as seen in specific positions. LTPT, although slightly improving on ZTPT’s positioning errors, still has the potential to fall into local optimal solutions. The proposed PTPT method consistently demonstrates smaller positioning errors, making it capable of achieving a global optimal solution.
A statistical analysis of the relative errors calculated by the different positioning methods is presented in
Table 2. The table provides the average errors for the X, Y, and Z directions as well as the magnitude of the position vector. The results indicate that Nara’s method yields the highest average error in the X direction at 64.6%, while PTPT exhibits the lowest at 9.4%. For the Y direction, Nara’s method has the smallest average error at 11.1%, and ZTPT has the largest at 84.4%. In the Z direction, PTPT has the lowest average error at 6.9%, and ZTPT has the highest at 70.7%. Due to the local optimal solutions in ZTPT’s results, the average error is relatively high. Regarding the magnitude of the position vector, PTPT has the smallest average error at 7.3%, and ZTPT has the largest at 32.2%. This experimental verification effectively demonstrates the validity of the method proposed in this paper.