Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 3, 2024 21 An Improved Two‐Point Magnetic Target Localization Method Kun Wu1, * 1The School of Electronic and information, Southwest Minzu University, Chengdu 610054, China * Corresponding author: Kun Wu Abstract: This study addresses the existing limitations of methods for determining the location of magnetic targets. Traditional methods either require geomagnetic background field information or fail to obtain stable solutions in specific cases due to matrix inversion when geomagnetic background field is not required. In order to solve this problem, this paper first adopts a new sensor array, then rewrite the equation of its method, and then uses the least squares method (LMS) to solve the magnetic target position, solve the possible instability problem in the process of single point solution and finally achieve the magnetic target positioning. Simulation results show that the method can accurately and uniquely determine the position of a magnetic dipole in the presence of a geomagnetic field, while experimental results verify the superiority and practicality of the method. Keywords: LMS, Magnetic target localization method, Triaxial magnetic flux gate sensor. 1. Introduction Magnetic anomaly detection has a wide range of applications in the fields of unexploded ordnance detection [1], mineral resources exploration [2], and magnetic characterization of spacecraft [3]. Typically, raw data can be obtained from vector magnetometer or scalar magnetometer measurements, and then an estimate of the target position can be derived by analytically solving or solving nonlinear equations. In 1975, Wynn et al. proposed an algorithm for the magnetic dipole position using the magnetic field gradient tensor data inversion, pioneering the application of the magnetic gradient tensor [4]. Due to its rich information, the magnetic gradient tensor has become a hotspot for magnetic method detection research in recent years [5]. However, the magnetic gradient tensor measurement system is complex and the gradient tensor may amplify high-frequency noise, so it is challenging to accurately measure the magnetic gradient tensor. The magnetic gradient tensor matrix contains nine elements, but only five of them are independent, and this property can be utilized to modify or simplify the instrument design [6]. In 2006, Nara [7] et al. proposed a magnetic dipole localization method based on the three components of the magnetic field and their spatial derivatives, starting from the differentiation of the magnetic field vector expression of the magnetic dipole. Although the Nara method is computationally faster, it requires vector data of magnetic anomalies, and then it is difficult to separate the magnetic anomaly vectors from the total magnetic field in practical measurements, which has been improved by subsequent researchers.In 2007, Wiegert and his coworkers proposed a magnetic dipole localization method based on the spatial variations of invariants of the magnetic gradient tensor [8,9], called the Scalar Triangulation and Ranging ( STAR) method.The STAR method eliminates the need to measure the magnetic field vector and is virtually independent of the geomagnetic field. However, the STAR method assumes that the tensor invariants are perfect spheres, which deviates from the actual situation and leads to localization errors. The localization accuracy of the STAR method can be improved by aspherical error correction [10,11]. However, the STAR method requires a measurement system composed of multiple gradiometers, which is more complicated than the traditional magnetic gradient tensor system. Yin et al [12] proposed a method to realize the single-point localization of the magnetic dipole by deriving Nara's formula and combining it with the nature of the eigenvectors of the magnetic gradient tensor [13], which removes the influence of the geomagnetic field. However, the third-order tensor and the eigenvectors have a coupling matrix that is difficult to stabilize when the third- order tensor and eigenvector is singular, the solution is difficult to stabilize. Sui et al [14] used the magnetic gradient tensor and its derivatives to localize the magnetic dipole, and proposed a data measurement method for the second- and third-order gradient tensor. Xu et al [15] used two-point difference instead of the three components of the magnetic field to reduce the effect of the background. Although this method avoids the necessity to measure the three components of the magnetic field, the use of the forward difference method results in the method's error being greater. However, the methods proposed by current scholars for solving the magnetic dipole position either either require geomagnetic background field information, or fail to obtain a stable solution in a particular case due to matrix inversion when the geomagnetic background field is not required, or introduce other errors that lead to large errors in the estimated position. In order to solve the above problems, we improve the localization method of Xu[15] by first adopting a new sensor array and then rewriting the equations of his method to finally achieve magnetic target localization. This paper is organized as follows. In Section 2, we describe our method and the structure of the second-order magnetic gradient tensor system in detail. Section 3 verifies the effectiveness of the algorithm through simulation. Section 4 further validates the effectiveness of the algorithm through practical experiments, and Section 5 provides some summarization of the paper and future research directions. 22 2. Methods 2.1. Basic theory When the detection distance is much larger than the magnetic anomaly source, the magnetic anomaly source can be reduced to a magnetic dipole. When using a magnetic dipole as a magnetic anomaly source, the three components of the magnetic field can be expressed as:                                z y x m m m Rzyzxz yzRyxy xzxyRx R R m R rrm B 22 22 22 5 0 35 0 333 333 333 4 )(3 4      (1) where rR   and 0 is the vacuum permeability with magnitude ATm /104 7 .  zyx mmmm ,, is the magnetic moment of the magnetic dipole and  Tzyxr  is the displacement vector from the magnetic source to the measurement point. The magnetic gradient tensor represents the three components of the magnetic field along three orthogonal directions in space. Typically, the system selects the X, Y, and Z axes in the Cartesian coordinate system, and if B is the magnetic field vector, the magnetic gradient tensor G is shown in equation (2):                                                               zzzyzx yzyyyx xzxyxx zzz yyy xxx zyx BBB BBB BBB z B y B x B z B y B x B z B y B x B BBB z y x G (2) where zyx BBB ,, is the component of the magnetic field measured along the three orthogonal directions. Geomagnetic fields and magnetic anomalies generated by ferromagnetic materials are static magnetic fields that are not affected by conduction currents when measured in a non- conductive medium such as air. Therefore, according to Maxwell's static magnetic equations, the spin and scatter of the magnetic field are equal to zero. To wit:                0 0 B z B y B x B B zyx (3) According to Eqs. (2) and (3), the magnetic gradient tensor G is symmetric and traceless, so only five of the nine tensor components are independent. Namely:              zyyz zxxz yxxy zzyyxx BB BB BB BBBGtr 0 (4) Eq. (2) can be simplified through Eqs. (3) and (4):             yyxxyzxz yzyyxy xzxyxx BBBB BBB BBB G (5) 2.2. Localization method A linear relationship between the vector field due to a point dipole source and the gradient tensor components, given by the matrix equation, was derived by Nara et al:                                      z y x B B B G zz yy xx z y x r 1 01 01 01 3 (6) where T 0000 ),,( zyxr  is the position of the magnetic dipole and T 1111 ),,( zyxr  is the position of the measurement point. Although the Nara method solves for the magnetic target position is fast, the method must strip the magnetic anomaly from the measured data, but it is difficult to accurately know the value of the geomagnetic background field in practical application scenarios, which leads to a natural flaw in the Nara method. 2.3. Improved magnetic gradient tensor system Based on the Nara method, a two-point localization algorithm has been proposed, but the method uses the average value of the magnetic field measured by the four sensors of the cross-shaped array instead of the value of the magnetic field at the center of the array, which produces an additional error. For this reason, in this paper, a new sensor array structure is used to improve its method. According to Eq. (6), to achieve magnetic target localization, the magnetic field strength and magnetic gradient tensor (MGT) need to be measured. Therefore, we use the magnetic sensor array structure shown in Fig. 1 to measure these two quantities. Compared to the cross-shaped sensor array used in [15], the sensor array used in this paper adds a triaxial fluxgate sensor at the center of the array to reduce the measurement error. Figure 1 shows the configuration of the five vector sensors that make up the cross-shaped array, with each circle representing a triaxial fluxgate sensor. The baseline distance between the nearest neighbor magnetometers is d. The x and y axes point geographically east and geographically north, respectively, and the z-axis points upward to form a right-handed Cartesian system. 23 Figure 1. Improved magnetic gradient tensor system 2.4. Improvement of the method It is obtained from Nara's method:                         zA yA xA A A A A B B B zz yy xx G 3 0 0 0 (7)                         zB yB xB B B B B B B B zz yy xx G 3 0 0 0 (8) where  AAA zyx and  BBB zyx are the coordinates corresponding to the detection points A and B.                         zB yB xB A A A B B B B zzz yyy xxx G 3 0 0 0 (9) Assuming that the displacement vector between A,B is  Tzyxdr  .Equation (13) can be rewritten as: It follows from (7) and (9): ))(3()( 1 drGBBGGr BABAB   (10) rRr 0 (11) The displacement vector dr between the two points is known, and only the magnetic field value and magnetic gradient tensor value at the two points are measured by the cross-shaped tensor structure with a sensor at the center, which can be used to realize the positioning of the magnetic target, and at the same time the method eliminates the influence of the geomagnetic background field, and the model schematic of the method is shown in Fig. 2. In addition, the formula (10) shows that when the matrix is close to singular or singular, no stable solution cannot be obtained. Therefore, this paper adopts the method of multipoint measurement, measures the magnetic gradient tensor data of multiple measurement points, and combines the least squares method (LMS) to solve, which avoids the blind spot in the solution process and further improves the positioning accuracy. Figure 2. Schematic diagram of the model 3. Simulation 3.1. Simulation 1: Changing the magnetic target position The purpose of this simulation study is to analyze the effect of the relative position between the magnetic target and the detection point on the positioning accuracy of the magnetic target. It is assumed in the study that the magnetic target has a specific magnetic moment with a magnetic declination of 100°, a magnetic inclination of -30°, and a modulus of 100. In order to evaluate in detail the effect of changing the position of the magnetic target on the localization accuracy, the simulation process is set up with the following steps: 1) Detection plane setting: the detection plane extends from (0m,0m,0.7m) to (2m,2m,0.7m), totaling 36 uniformly distributed measurement points, with a spacing of 0.4m between each measurement point. 2) Magnetic target trajectory: the initial position of the magnetic target is set at (1.5m,2.5m,-1m), and moved along the xyz three directions, respectively, with a distance of 0.1m each time, i.e., emulated along the three directions sequentially, respectively. 3) Noise addition: During each measurement, each measurement component of the sensor was added to Gaussian noise with mean value 0 and variance 1. The measurement is repeated 100 times for each noise condition to ensure the reliability and stability of the results. 4) Solving algorithm: All localization algorithms are solved by the least squares method, and the localization error of each measurement is calculated and recorded. 5) Error analysis: The average value of positioning error under each measurement point position is counted to assess the influence of different relative positions on positioning accuracy. Using the localization error  as an evaluation metric for localization results.      2 0 2 0 2 0 zzyyxx  (12) Where 000 ,, zyx is the real value of the magnetic target position and zyx ,, is the estimated value of the localization algorithm. The simulation results are demonstrated by plots, and the distribution of localization errors at each measurement point 24 when the magnetic target moves along different paths is shown in Fig. (3) to Fig. (5). Fig. (3)(a) Before zooming in on the results in the black box Fig. (3)(b) After zooming in on the results in the black box Figure (3). Positioning error of each measurement point when the magnetic target moves along the x-direction Fig. (4)(a) Before zooming in on the results in the black box Fig. (4)(b) After zooming in on the results in the black box Figure (4). Positioning error of each measurement point when the magnetic target moves along the y-direction Fig. (5)(a) Before zooming in on the results in the black box Fig. (5)(b) After zooming in on the results in the black box Figure (5). Positioning error of each measurement point when the magnetic target moves along the z-direction 0 1 2 3 4 5 6 7 8 9 10 point 0 0.05 0.1 0.15 0.2 0.25 0.3 Error of moving in x direction Nara Two-point Imp-two-point 0 1 2 3 4 5 6 7 8 9 10 point 0 0.005 0.01 0.015 0.02 0.025 Error of moving in x direction Nara Two-point Imp-two-point 0 1 2 3 4 5 6 7 8 9 10 point 0 0.05 0.1 0.15 0.2 0.25 0.3 Error of moving in y direction Nara Two-point Imp-two-point 0 1 2 3 4 5 6 7 8 9 10 point 0 0.005 0.01 0.015 0.02 0.025 0.03 Error of moving in y direction Nara Two-point Imp-two-point 0 1 2 3 4 5 6 7 8 9 10 point 0 0.05 0.1 0.15 0.2 0.25 0.3 Error of moving in z direction Nara Two-point Imp-two-point 0 1 2 3 4 5 6 7 8 9 10 point 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 Error of moving in z direction Nara Two-point Imp-two-point 25 The simulation results show that the proposed method exhibits better robustness and smaller localization errors under different magnetic target positions, and its maximum localization error is less than 0.03 m, which verifies its effectiveness and reliability in noisy environments. Although the theoretical performance of Nara's method is slightly better under the same conditions, the proposed method is more advantageous in practical applications due to the difficulty in obtaining the background field. 3.2. Simulation 2: Changing the noise intensity The purpose of this simulation study is to investigate the sensitivity of different algorithms to noise in magnetic target localization. The magnetic target localization technique relies on detecting the magnetic field distribution generated by a magnetic dipole to determine the target location. In this study, the magnetic dipole is assumed to be located at coordinates (1.5m, 2.7m, 0m) and the detection plane is set to be consistent with that in the previous study to ensure comparable and consistent results. In order to evaluate the sensitivity of the algorithm to noise, Gaussian noise with different variances is introduced into the simulation process. The specific steps are as follows: 1) Noise setting: the mean value of Gaussian noise is set to 0, and the variance is gradually increased from 1 to 20. 2) Data generation: for each variance, 100 sets of Gaussian noise data are randomly generated and added to the magnetic field measurements respectively. 3) Localization Error Calculation: for each group of data with noise, the magnetic target is localized and its localization error is calculated. 4) Error mean statistics: take the mean value of the localization error under each noise condition as the final localization error under that condition. The simulation results are shown by plots, with the horizontal axis indicating the noise variance and the vertical axis indicating the mean value of the localization error. For comparison purposes, Figure (9) plots the The variation of localization error of multiple algorithms under different noise conditions is plotted. Fig. (6)(a) Before zooming in on the results in the black box Fig. (6)(b) After zooming in on the results in the black box Figure (6). Variation of localization error under different noise conditions Simulation results show that with the increase of noise, the errors of each algorithm increase, and the error of the improved two-point localization method is lower than that of the original algorithm, and the maximum localization error is less than 0.05m, which indicates that the proposed two-point localization method still shows good robustness and small localization error under the noisy conditions, and further proves its superiority in practical applications. 4. Experiment Fig.7 demonstrates a three-axis fluxgate sensor. Fluxgate magnetometers are reliable, lightweight, low-cost, vector sensors that are simple to operate and have low power requirements. Therefore, they are widely used in geomagnetism and other research. In this paper, a magnetic gradient tensor system was constructed using five three-axis fluxgate sensors, as shown in Fig.8: five three-axis fluxgate sensors were mounted on a stand made of acrylic, and the magnetometers were located at a distance of 20cm along the same axis. The fluxgate sensors were connected to a computer through a data acquisition module. Figure 7. Three-axis fluxgate sensor 1 2 3 4 5 6 7 8 9 10 noise/dB 0 0.1 0.2 0.3 0.4 0.5 0.6 Error under different noise Nara Two-point Imp-two-point 1 2 3 4 5 6 7 8 9 10 noise/dB 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 Error under different noise Nara Two-point Imp-two-point 26 Figure 8. Magnetic gradient tensor localization system Fig.9 shows the experimental schematic. In order to avoid the movement of the sensor array, the sensor array was fixed on the non-magnetic rotary table.Using a small magnetic magnet to simulate the magnetic dipole,and the magnet was in the magnetic target moving plane. The detection paths is shown in fig.10, and has a total of 36 points.At the same time, we record background field information for the Nara method. Figure 9. Experimental Schematic Figure 10. Detection Paths Table 1 shows the localization results of the threee different methods. It can be found that the localization accuracy of both the original method and the improved method is higher than that of the Nara method, which is because the Nara method 27 needs to know the geomagnetic background field in advance, and there is a deviation in the measurement of the geomagnetic background field in the experiments leading to the localization accuracy of the Nara method being much lower than that of the simulation; and the localization accuracy of the improved method is higher than that of the original method, which indicates that the localization effect of the improved method is better than that of the original method in the complex environment. Table 1. Localization results obtained using different methods methods Estimated parameters errors Preset parameters Position 1 1.25m,1.25m,0.56m Nara’s method 1.55m,0.93m,1.03m 0.64m Two-point method 1.43m,1.03m,0.90m 0.44m Imp-two-point method 1.38m,1.34m,0.68m 0.20m Position 2 1.00m,1.00m,0.56m Nara’s method 1.33m,0.85m,0.73m 0.40m Two-point method 1.22m,1.19m,0.46m 0.31m Imp-two-point method 1.08m,0.93m,0.71m 0.18m Position 3 0.75m,0.82m,0.56m Nara’s method 1.07m,0.43m,-0.16m 0.88m Two-point method 0.83m,1.07m,-0.05m 0.66m Imp-two-point method 1.06m,0.93m,0.37m 0.38m 5. Conclusion In this paper, the problem of requiring geomagnetic background field in existing magnetic target localization methods is solved. By using a new sensor array structure, the positioning equation is improved, and the least squares method (LMS) is used to avoid the blind spots of the magnetic target. Simulation results show that the method is able to accurately and uniquely determine the position of a magnetic dipole in the presence of a geomagnetic field. Experimental results show that the method's localization error is better than that of the original algorithm with improved accuracy, and the overall performance is more stable than the original algorithm. In addition, the positioning method of two-point magnetic target needs further research. The main problem focuses on the large number of measurement points of this method and the poor real-time performance. The subsequent research will focus on the accurate magnetic target positioning with a smaller number of measurement points. Acknowledgment This project was supported by the Innovative Research Project for Graduate Students of Southwest Minzu University (YCYB2024060). References [1] Li, Y.; Devriese, S.G.; Krahenbuhl, R.A.; Davis, K. Enhancement of Magnetic Data by Stable Downward Continuation for UXO Application. IEEE Trans. Geosci. Remote Sens. 2013, 51, 3605–3614. [2] Walter, C.; Braun, A.; Fotopoulos, G. High-resolution unmanned aerial vehicle aeromagnetic surveys for mineral exploration targets. Geophys. Prospect. 2020, 68, 334–349. [3] Mehlem, K. Magnetostatic cleanliness analysis by the multiple dipole modelling method. In Proceedings of the Spacecraft Electromagnetic Compatibility, Noordwijk, The Netherlands, 24–26 May 1978; pp. 165–179. [4] W Wynn, C Frahm, P Carroll.Advanced superconducting gradiometer Magnetometer arrays and a novel signal processing technique[J]. IEEE Transactions on Magnetics, 1975, 11(2):701-707. [5] Schmidt, P.W. and D.A. Clark, The magnetic gradient tensor: Its properties and uses in source characterization. The Leading Edge, 2006. 25(1): p. 75-78. [6] Heath, P., G. Heinson, and S. Greenhalgh, Some comments on potential field tensor data. Exploration Geophysics, 2003. 34(2): p. 57-62.] [7] T. Nara, S. Suzuki, and S. Ando, “A closed-form formula for magnetic dipole localization by measurement of its magnetic field and spatial gradients,” IEEE Trans. Magn., vol. 42, no. 10, pp. 3291–3293,Oct. 2006. [8] R. Wiegert, J. Oeschger, E. Tuovila, Demonstration of a novel man-portable magnetic STAR technology for real time localization of unexploded ordnance, Oceans. IEEE (2007) 1- 7. [9] R.F. Wiegert. Magnetic STAR technology for real-time localization and classification of unexploded ordnance and buried mines, Proceedings of SPIE - The International Society for Optical Engineering 73031U (2009) 1-9. [10] Y.Y. Sui, G. Li, S.L. Wang, J. Lin, Asphericity Errors Correction of Magnetic Gradient Tensor Invariants Method for Magnetic Dipole Localization, IEEE T.Magn. 48(12) (2012) 4701-4706. [11] C. Wang, X.J. Zhang, X.D. Qu, X. Pan, G.Y. Fang, L.Z. Chen, A Modified Magnetic Gradient Contraction Based Method for Ferromagnetic Target Localization, Sensors 16 (12) (2016) 2168-2181. [12] Gang Yin, Yingtang Z, Hongbo F, et al. Magnetic dipole localization based on magnetic gradient tensor data at a single point[J]. Journal of Applied Remote Sensing, 2014, 8(1): 083596-083596. [13] Beiki M, Clark D A, Austin J R, et al. Estimating source location using normalized magnetic source strength calculated from magnetic gradient tensor data[J]. Geophysics, 2012, 77(6):J23-J37.80 [14] Sui Y, Leslie K, Clark D. Multiple-order magnetic gradient tensors for localization of a magnetic dipole[J]. IEEE Magnetics Letters, 2017, 8: 1-5. [15] Xu, L.; Gu, H.; Chang, M.; Fang, L.; Lin, P.; Lin, C. Magnetic Target Linear Localization Method Using Two-Point Gradient Full Tensor. IEEE Trans. Instrum. Meas. 2021, 70, 6007808.