A magnetic gradient tensor two-point positioning method based on ESCA
Patent Information
- Application Number
- CN202610951853.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-10-23
AI Technical Summary
[0006]针对现有技术存在的不足,本发明提供一种基于改进ESCA的磁梯度张量两点定位方法,目的在于针对现有磁梯度张量定位方法中存在的单点定位易受背景磁场干扰、两点定位物理约束不足以及优化求解过程易陷入局部最优等问题
[0079](1)建立了一个基于相邻两点测量数据与磁矩一致性约束的非线性目标函数,在该目标函数的构建中,充分利用了测量点处的磁场矢量、磁梯度张量及其张量不变量等丰富信息。此外,为了有效削弱背景磁场对传统单点定位的干扰,引入了两点对同一磁性目标的归一化磁矩一致性惩罚项。综合考虑了多点空间分布信息与目标的物理约束特性,能够更好地评估和剔除环境噪声干扰,实现了对待测磁性目标的高精度、高稳定性定位。
Smart Images

Figure CN122962656A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of magnetic anomaly detection and magnetic target localization technology. In the two-point localization scenario based on magnetic gradient tensor measurement, by introducing the magnetic moment consistency constraint of adjacent measurement points and the magnetic gradient tensor invariant, and combining the metaheuristic algorithm to optimize the magnetic target position solution process, high-precision localization and path inversion of magnetic targets are achieved, so as to improve the localization accuracy, stability and anti-local optimum ability in complex background magnetic field environment. Specifically, it involves a magnetic gradient tensor two-point localization method based on improved ESCA (EscapeAlgorithm). Background Technology
[0002] The Earth itself is a giant magnet, and its surrounding space possesses an inherent geomagnetic field. Under the influence of the Earth's magnetic field, ships, underwater, or underground ferromagnetic targets inevitably become magnetized, generating an additional magnetic field superimposed on the normal geomagnetic field, leading to localized geomagnetic field distortion, or "magnetic anomaly." Magnetic anomaly signals are important sources for detecting and locating magnetic targets. As a passive geophysical detection method, magnetic anomaly detection has the advantages of being covert and efficient, and can quickly cover large areas, including complex environments that are difficult for humans to access. Existing magnetic anomaly detection technologies mainly cover total magnetic field, magnetic vector, and magnetic gradient tensor detection. Compared to the former two, the magnetic gradient tensor method can measure more complete magnetic field characteristic information, has higher resolution, and is less affected by changes in the geomagnetic background field and the attitude of the measurement system. Therefore, it can more accurately describe the characteristics of magnetic targets, thereby improving the accuracy and reliability of magnetic target detection.
[0003] However, despite the significant advantages of magnetic gradient tensor detection, existing magnetic target localization methods based on this technology still have obvious limitations in practical applications. Current target localization methods are mainly divided into single-point localization methods and multi-point localization methods. Traditional single-point localization methods suffer from the problem that a single measurement point cannot determine a unique solution or is difficult to accurately separate the target's magnetic vector field components. Under complex geomagnetic field backgrounds, single-point localization methods are highly susceptible to background magnetic field interference, leading to significant deviations in the localization results, making it difficult to guarantee localization accuracy and stability. Even if the introduction of higher-order tensor information can offset background field interference to some extent, the overall performance still needs improvement.
[0004] To overcome the limitation of single-point localization methods being heavily influenced by background magnetic fields, multi-point localization methods have been widely proposed to obtain richer magnetic field information. Existing multi-point localization methods typically utilize data from two or more measurement points to establish and solve linear or nonlinear equations. However, these methods reveal new problems during task execution: on the one hand, some methods based on linear equations heavily rely on distance calculations when solving for direction vectors, easily leading to error accumulation and, under certain conditions, significant localization errors; on the other hand, many localization methods based on nonlinear inversion and heuristic optimization algorithms, while improving noise and interference resistance, often have a strong dependence on initial values. In complex multi-extremum environments, these local optimization algorithms are prone to getting trapped in local optima, making it difficult to guarantee global search capabilities and directly affecting the final localization result.
[0005] Furthermore, existing methods, when establishing functional models of magnetic target locations, mostly rely solely on the geometric constraints of the magnetic gradient tensor, neglecting the target's physical properties. This modeling approach leads to insufficient constraints in the solution space under strong background interference, further reducing the accuracy and robustness of inversion positioning. Therefore, there is an urgent need for a high-precision magnetic target positioning method that can effectively suppress geomagnetic background interference, avoid getting trapped in local optima, and fully utilize the target's physical properties to enhance constraints. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a two-point localization method based on improved ESCA magnetic gradient tensor. The aim is to address the problems of single-point localization being susceptible to background magnetic field interference, insufficient physical constraints in two-point localization, and the tendency to get trapped in local optima during the optimization process, which are inherent in existing magnetic gradient tensor localization methods. By comprehensively utilizing the magnetic gradient tensor information and invariants of two adjacent measurement points, introducing magnetic moment consistency constraints, and employing an improved escape algorithm to optimize the target position, this invention improves the accuracy, stability, and robustness of magnetic target localization in complex background magnetic field environments, achieving high-precision localization and path inversion for magnetic targets. To achieve the above objectives, this invention adopts the following technical solution:
[0007] In a first aspect, embodiments of this application provide a two-point localization method based on the magnetic gradient tensor of an improved ESCA, comprising the following steps:
[0008] S1. Under far-field conditions, the magnetic field vector of the magnetic target under test is described by the magnetic dipole model.
[0009] S2. Obtain the magnetic field vectors at two adjacent measurement points on the space detection trajectory in sequence according to the preset sampling frequency, and reconstruct the corresponding magnetic gradient tensor matrix data based on the difference principle.
[0010] S3. Based on the acquired magnetic gradient tensor matrix data, calculate the eigenvalues of the magnetic gradient tensor matrix and the magnetic gradient tensor invariants at each measurement point.
[0011] S4. Establish a nonlinear objective function that includes a magnetic moment consistency penalty term.
[0012] S5. The nonlinear objective function is optimized globally through the improved escape algorithm ESCA. The improved escape algorithm ESCA introduces a dynamic population ratio adjustment strategy and optimizes the position update and dimension update mechanisms.
[0013] S6. Output the global optimal solution of the nonlinear objective function and realize the positioning of the magnetic target.
[0014] In one possible implementation, the specific process of describing the magnetic field vector of the magnetic target under test using a magnetic dipole model in step S1 under far-field conditions is as follows:
[0015] When the distance between the measurement point and the magnetic target is greater than 2.5 times the length of the detected magnetic target, the magnetic target can be considered equivalent to a magnetic dipole. In this case, the magnetic field vector B generated by the magnetic target at a distance r from itself can be written as:
[0016] (1)
[0017] Where μ0≈4π×10 -7 H / m is the magnetic permeability in vacuum; m = (m x m y m z Let be the magnetic moment of the magnetic target; R be the distance vector r = (x, y, z). T The model.
[0018] In one possible implementation, in step S3, the magnetic gradient tensor matrix G is the rate of change of the magnetic field vector B in three mutually orthogonal directions, expressed as:
[0019] (2)
[0020] Among them B ij(i,j=x,y,z) Let G be the nine components of the magnetic gradient tensor. The eigenvalues of the magnetic gradient tensor matrix G are defined as λ1, λ2, and λ3, where λ1 > λ2 > λ3. To simplify calculations, two magnetic gradient tensor invariants are defined as follows:
[0021] (3)
[0022] To simplify the expression for solving the eigenvalues, intermediate parameters C and D are introduced, let... , The eigenvalues of the magnetic gradient tensor matrix G can be further expressed as:
[0023] (4)
[0024] In one possible implementation, step S4 involves establishing a nonlinear objective function that includes a magnetic moment consistency penalty term. The specific process is as follows:
[0025] First, using the single-point localization formula of the magnetic dipole, which is based on the magnetic gradient tensor invariant, and combining the magnetic field vectors B1 and B2 of two adjacent measurement points with the corresponding magnetic gradient tensor matrices G1 and G2, a two-point localization equation is jointly constructed:
[0026] (5)
[0027] Where Q is an intermediate parameter in the simplified formula expression. , A1 and A2 are the position parameter matrices at measurement points 1 and 2 as defined by equation (1), respectively; r1 and r2 are the distance vectors from the target to measurement points 1 and 2, respectively; λ 1,1 , λ 1,2 , λ 1,3 These are the three eigenvalues of the magnetic gradient tensor matrix at measurement point 1; λ 2,1 , λ 2,2 , λ 2,3 These are the three eigenvalues of the magnetic gradient tensor matrix at measurement point 2. Based on the obtained magnetic gradient tensors and eigenvalues of the two measurement points, the localization equation for the two points is transformed into an initial nonlinear objective function without penalty terms:
[0028] (6)
[0029] Furthermore, using the magnetic gradient tensor invariant, the magnetic moment moduli M1 and M2 at the two measurement points with respect to the same target are calculated respectively. The formula for calculating the single-point magnetic moment modulus M is:
[0030] (7)
[0031] Where μ0 is the free magnetic permeability, R is the magnitude of the distance vector, and μ is the normalized source intensity (NSS) defined by the tensor invariant.
[0032] Furthermore, to ensure physical consistency in the magnetic moment estimates of the same magnetic target from different measurement points, a normalized magnetic moment consistency penalty term based on the difference in magnetic moment modulus between the two measurement points is introduced into the initial nonlinear objective function. This establishes the final nonlinear objective function, which serves as the fitness function for the improved escape algorithm ESCA.
[0033] (8)
[0034] Where p is a weighting coefficient that controls the strength of the penalty term, minimizing the value of f; the corresponding position parameter is the optimal solution of the equation. Preferably, the weighting coefficient p of the penalty term is 0.5.
[0035] In one possible implementation, the improvement to ESCA in step S5 specifically includes:
[0036] Introducing a dynamic population ratio adjustment strategy:
[0037] The fixed proportions of the calm, conformist, and panicked groups in the exploration phase of the original escape algorithm ESCA are replaced with a non-linear smooth function with respect to the iteration number t. The proportions of the three groups are dynamically adjusted during the iteration process, and the dynamic adjustment formula is as follows:
[0038] (9)
[0039] (10)
[0040] (11)
[0041] Where p(t), c(t), and h(t) represent the proportions of the panicked group, the calm group, and the conformist group at the t-th iteration, respectively, and T exp Let T be the maximum number of iterations in the exploration phase. exp =T / 2, where T is the total number of iterations, p initial and p final These represent the initial and final proportions of the panicked group, respectively. initial and c final These represent the initial and final proportions of the calm group, respectively. Preferably, the initial value p of the panic group... initial Set to 0.7, final value p final The initial value c of the calming group is set to 0.1. initial Set to 0.1, final value c final Set it to 0.7.
[0042] Optimize the location update guide for individuals in the Calm Group:
[0043] During the exploration phase, the guiding term in the formula for updating the individual position of the calming group was changed from the center C of the original group. j Modified to the current optimal solution E in the elite pool j This allows individuals in the calming group to move directly towards the known optimal region, thereby accelerating the algorithm's convergence speed towards the global optimum.
[0044] Optimize the individual dimension update mechanism:
[0045] To address the physical coupling between the spatial position of the target and the magnetic moment height, the binary variables m1 and m2 used in the original escape algorithm ESCA individual position update formula to simulate partial dimensional updates caused by crowd congestion are both kept constant at 1. This ensures that all individuals undergo continuous and synchronous updates across all dimensions in each iteration, preventing the destruction of the physical latent solution.
[0046] In one possible implementation, S5 specifically includes the following steps:
[0047] S5.1 Randomly initializes the positions of individuals in the population within the search space, sets the maximum number of iterations, population size, upper and lower bounds of the search space, and solution dimension, calculates the initial fitness of individuals, and extracts the best individuals into the elite pool for retention.
[0048] S5.2 Calculate global dynamic parameters: Calculate the panic index for the current iteration, and introduce and utilize a nonlinear smoothing function to dynamically calculate the proportions of the calm group, panic group, and conformity group.
[0049] S5.3 Position Update Based on Iterative Process: The optimization process is divided into an early exploration phase and a later development phase, and only one update strategy is executed in a single iteration:
[0050] Exploration Phase: When the current iteration count is less than or equal to 50% of the total iteration count, the population is divided into three groups based on the obtained group proportions: Calm Group, Panic Group, and Conformity Group. Considering the high coupling between the target spatial location and the magnetic moment, the binary mask variable of the original escape algorithm ESCA is kept constant at 1, forcing all individuals in all groups to continuously synchronize their positions across all dimensions.
[0051] Development phase: When the current iteration count is greater than 50% of the total iteration count, stop dynamic grouping and directly use individuals in the elite pool to perform full-dimensional differential-guided position updates for the entire population.
[0052] S5.4 Boundary Control and Elite Pool Update: After the position update during the exploration or development phase, boundary control is performed on all new individuals generated in the current iteration. The fitness of the new individuals is recalculated. If the new individuals are better, they are replaced with the original individuals, and the optimal solution in the elite pool is updated.
[0053] In one possible implementation, S6 specifically operates as follows: repeatedly iterate to find the best solution until the number of iterations reaches the preset maximum number of iterations, output the best approximation solution, and use it as the final position coordinates of the magnetic target to be tested, thereby achieving positioning.
[0054] Secondly, embodiments of this application provide a magnetic gradient tensor two-point positioning system based on improved ESCA, comprising the following modules:
[0055] Magnetic field vector description module: Under far-field conditions, the magnetic field vector of the magnetic target under test is described using a magnetic dipole model.
[0056] Data acquisition module: Sequentially acquire the magnetic field vectors at two adjacent measurement points on the space exploration trajectory according to the preset sampling frequency, and reconstruct the corresponding magnetic gradient tensor matrix data based on the difference principle.
[0057] Calculation module: Based on the acquired magnetic gradient tensor matrix data, calculate the eigenvalues of the magnetic gradient tensor matrix and the magnetic gradient tensor invariants at each measurement point.
[0058] Function building module: Creates a nonlinear objective function that includes a magnetic moment consistency penalty term.
[0059] Iterative optimization module: The nonlinear objective function is globally iteratively optimized by using the improved escape algorithm ESCA. The improved escape algorithm ESCA introduces a dynamic population ratio adjustment strategy and optimizes the position update and dimension update mechanism.
[0060] The positioning module outputs the global optimal solution of the nonlinear objective function and realizes the positioning of the magnetic target.
[0061] In one possible implementation, the function construction module specifically includes the following operations:
[0062] First, based on the eigenvalues of the magnetic gradient tensor and the magnetic field vector, the distance vector, which introduces tensor invariants, is calculated.
[0063] Then, based on the nonlinear relationship between the distance vectors of two adjacent points, a benchmark objective function containing the location of the magnetic target is established.
[0064] Using the magnetic gradient tensor invariant, the magnetic moment modulus measured at two measurement points relative to the same target is calculated.
[0065] Finally, using the consistency criterion of the magnetic moment modes measured at two measurement points, a normalized magnetic moment consistency penalty term is introduced, and the penalty term coefficient p is determined. Combined with the benchmark objective function that includes the position of the magnetic target, the final nonlinear objective function is constructed as the fitness function of the improved escape algorithm ESCA.
[0066] In one possible implementation, the iterative optimization module specifically includes the following operations:
[0067] Randomly initialize the positions of individuals in the population within the search space, set the maximum number of iterations, population size, upper and lower bounds of the search space, and solution dimension, calculate the initial fitness of individuals, and extract the best individuals into the elite pool for retention.
[0068] Calculate the panic index for the current iteration, and introduce and utilize a nonlinear smoothing function to dynamically calculate the proportions of the calm group, the panic group, and the conformist group.
[0069] The optimization process is divided into an early exploration phase and a later development phase, and only one update strategy is executed in a single iteration:
[0070] Exploration Phase: When the current iteration count is less than or equal to 50% of the total iteration count, the population is divided into three groups based on the obtained group proportions: Calm Group, Panic Group, and Conformity Group. Considering the high coupling between the target spatial location and the magnetic moment, the binary mask variable of the original escape algorithm ESCA is kept constant at 1, forcing all individuals in all groups to continuously synchronize their positions across all dimensions.
[0071] Development phase: When the current iteration count is greater than 50% of the total iteration count, stop dynamic grouping and directly use individuals in the elite pool to perform full-dimensional differential-guided position updates for the entire population.
[0072] After the position update during the exploration or development phase, boundary control is applied to all new individuals generated in the current iteration. The fitness of the new individuals is recalculated. If the new individuals are better, they are replaced with the original individuals, and the optimal solution in the elite pool is updated.
[0073] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory.
[0074] The memory is used to store computer programs.
[0075] When the processor executes the program stored in the memory, it implements any of the magnetic gradient tensor two-point localization methods described in this application.
[0076] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the magnetic gradient tensor two-point localization methods described in this application.
[0077] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the magnetic gradient tensor two-point localization methods described in this application.
[0078] Compared with the prior art, the present invention has the following technical effects:
[0079] (1) A nonlinear objective function based on the measurement data of two adjacent points and the magnetic moment consistency constraint was established. In the construction of this objective function, the rich information such as the magnetic field vector, magnetic gradient tensor and its tensor invariants at the measurement point were fully utilized. In addition, in order to effectively reduce the interference of the background magnetic field on traditional single-point positioning, a normalized magnetic moment consistency penalty term for the same magnetic target at two points was introduced. By comprehensively considering the spatial distribution information of multiple points and the physical constraint characteristics of the target, environmental noise interference can be better evaluated and eliminated, and high-precision and high-stability positioning of the magnetic target under test can be achieved.
[0080] (2) An improved ESCA is used for global optimization. By introducing a dynamic population ratio strategy, the system can effectively balance global exploration and local development in complex nonlinear magnetic positioning environments. At the same time, considering the high coupling between the target position and the magnetic moment, the binary variable mechanism is removed to achieve synchronous updates across all dimensions, avoiding distortion of the physical potential solution. This physical adaptability ensures that the optimization strategy can converge quickly and escape local optima in complex magnetic anomaly scenarios, maximizing positioning accuracy and solution success rate. Attached Figure Description
[0081] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0082] Figure 2 This is a translational positioning model of the system in an embodiment of the present invention.
[0083] Figure 3 This is a schematic diagram of a planar cross-shaped magnetic gradient tensor measurement system.
[0084] Figure 4 Line graph showing the two-point positioning error of the magnetic gradient tensor using different methods.
[0085] Figure 5 Flowchart for improving the escape algorithm ESCA Detailed Implementation
[0086] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0087] Example:
[0088] like Figure 1As shown, this application provides a two-point localization method based on ESCA magnetic gradient tensor, including the following steps:
[0089] S1. Under far-field conditions, the magnetic field vector of the magnetic target under test is described by the magnetic dipole model.
[0090] S2. The magnetic gradient tensor measurement system mounted on the mobile platform moves with the mobile platform and sequentially acquires the magnetic field vectors at two adjacent measurement points on the spatial detection trajectory according to a preset sampling frequency. The corresponding magnetic gradient tensor matrix data is then reconstructed based on the difference principle.
[0091] S3. Based on the acquired magnetic gradient tensor matrix data, calculate the eigenvalues of the magnetic gradient tensor matrix and the magnetic gradient tensor invariants for each measurement point, providing a parameter basis for the subsequent nonlinear solution of the target position.
[0092] S4. Establish a nonlinear objective function that includes a magnetic moment consistency penalty term to determine the fitness function for the improved escape algorithm ESCA. Specifically, this includes the following steps:
[0093] S4.1 Calculates the distance vector by introducing tensor invariants based on the eigenvalues of the magnetic gradient tensor and the magnetic field vector.
[0094] S4.2 Based on the nonlinear relationship between the distance vectors of two adjacent points, a benchmark objective function containing the location of the magnetic target is established. The benchmark objective function is used to transform the nonlinear two-point positioning equation that cannot be solved analytically into an optimization problem of minimizing the target residual. This benchmark objective function is prone to getting trapped in local optima. It is used to provide a basic mathematical framework for the subsequent introduction of a normalized magnetic moment consistency penalty term, so as to jointly generate the final nonlinear objective function.
[0095] S4.3 Using the magnetic gradient tensor invariant, calculate the magnetic moment modulus measured at the two measurement points for the same target.
[0096] S4.4 utilizes the consistency criterion of the magnetic moment modes measured at two measurement points, introduces a normalized magnetic moment consistency penalty term, determines the penalty term coefficient p, and combines it with the benchmark objective function that includes the position of the magnetic target to construct the final nonlinear objective function as the fitness function of the improved escape algorithm ESCA.
[0097] S5. The established objective function is iteratively optimized globally using the improved escape algorithm ESCA. Specifically, the following steps are included:
[0098] S5.1 Randomly initializes the positions of individuals in the population within the search space, sets parameters such as the maximum number of iterations, population size, upper and lower bounds of the search space, and solution dimension, calculates the initial fitness of individuals, and extracts the best individuals into the elite pool for retention.
[0099] S5.2 Calculate global dynamic parameters: Calculate the panic index for the current iteration, and introduce and utilize a nonlinear smoothing function to dynamically calculate the proportions of the calm group, panic group, and conformity group.
[0100] S5.3 Position Update Based on Iteration Process: The algorithm divides the optimization process into an early exploration phase and a later development phase based on the proportion of the current iteration count to the maximum iteration count, and executes only one update strategy in a single iteration:
[0101] Exploration Phase: When the current iteration count is less than or equal to 50% of the total iteration count, the population is divided into three groups based on the obtained group proportions: Calm Group, Panic Group, and Conformity Group. Considering the high coupling between the target spatial location and the magnetic moment, the binary mask variable of the original escape algorithm ESCA is kept constant at 1, forcing all individuals in all groups to continuously synchronize their positions across all dimensions.
[0102] Development phase: When the current iteration count is greater than 50% of the total iteration count, stop dynamic grouping and directly use individuals in the elite pool to perform full-dimensional differential-guided position updates for the entire population.
[0103] S5.4 Boundary Control and Elite Pool Update: After the position update during the exploration or development phase, boundary control is performed on all new individuals generated in the current iteration. The fitness of the new individuals is recalculated. If the new individuals are better, they are replaced with the original individuals, and the optimal solution in the elite pool is updated.
[0104] S6 iterates repeatedly to find the optimal solution until the number of iterations reaches the preset maximum number of iterations. Then, it stops all position updates and population evolution operations and outputs the best approximation solution, which is used as the final position coordinates of the magnetic target to be tested, thereby achieving localization.
[0105] This embodiment is applicable to the verification and evaluation of a two-point localization algorithm for magnetic targets based on the magnetic gradient tensor under geomagnetic background. In this embodiment, the constructed system translational localization model is as follows: Figure 2 As shown, a Cartesian coordinate system is established with the target to be measured as the origin. A mobile platform equipped with a cross-shaped magnetic gradient tensor measurement system performs linear translational measurements along a certain trajectory in space. During the translation, the mobile platform sequentially acquires the magnetic field vector and magnetic gradient tensor data of two adjacent measurement points on the spatial translational trajectory through a set sampling frequency. This system, as the core of data processing, receives the above translational measurement data and integrates multi-point spatial distribution information for joint optimization and solution. This model can significantly reduce the interference of strong background magnetic fields such as the geomagnetic field on single-point positioning, effectively avoid the optimization process from getting trapped in local optima, and is suitable for high-precision magnetic target positioning scenarios where the background magnetic field interference is large, the target is relatively stationary, and has a clear translational detection trajectory. To ensure the mathematical rigor of the above algorithm model, this embodiment makes the following physical assumptions:
[0106] (1) The distance between the spatial sampling point where the measurement system is located and the magnetic target to be measured is much greater than the geometric size of the target itself (usually more than 2.5 times the length of the target), which satisfies the far-field condition. Therefore, the abnormal magnetic field generated by the target to be measured can be completely equivalent to the magnetic dipole model.
[0107] (2) Based on Figure 2 The system translational positioning model shown assumes that the magnetic target in real space remains stationary, while the detection platform equipped with a magnetic sensor moves in uniform linear motion relative to the magnetic target.
[0108] (3) The cross-shaped magnetic gradient tensor measurement system can accurately and synchronously acquire the magnetic field data of each component at a specific measurement point; and the baseline distance of the sensor array itself is constant. The non-orthogonal error and zero bias error of the sensor itself have been compensated in the early stage through conventional instrument calibration methods and are not within the scope of optimization of this objective function.
[0109] Specifically, the two-point localization method based on the improved ESCA magnetic gradient tensor in this embodiment includes the following steps:
[0110] S1. Under far-field conditions, the magnetic field vector of the magnetic target under test is described by the magnetic dipole model.
[0111] When the distance between the measurement point and the magnetic target is greater than 2.5 times the length of the target, the far-field detection condition is met. In this case, the shape characteristics of the magnetic target are ignored, and the target is physically equivalent to a magnetic dipole. In this embodiment, the magnetic field vector B at a distance r from the target can be written as:
[0112] (12)
[0113] In the formula: μ0≈4π×10⁻⁷ H / m is the permeability in vacuum; m=(m x m y m z Let be the magnetic moment of the magnetic target; R be the magnitude of the distance vector r = (x, y, z). Matrix A represents the coefficient matrix formed by the spatial coordinate system.
[0114] S2. Acquisition of magnetic gradient tensor data between two adjacent measurement points.
[0115] The magnetic gradient tensor measurement system mounted on the mobile platform moves with the mobile platform and sequentially acquires the magnetic field vectors at two adjacent measurement points on the spatial detection trajectory according to a preset sampling frequency. The corresponding magnetic gradient tensor matrix data is then reconstructed based on the difference principle.
[0116] In this embodiment, the magnetic gradient tensor measurement system adopts a planar cross-shaped array structure, such as... Figure 3As shown, the measurement system consists of four fluxgate sensors. Sensors 1 and 3 are located on the x-axis, and sensors 2 and 4 are located on the y-axis. The distance between two adjacent sensors on the same coordinate axis is the baseline distance d. Based on the difference principle of coaxiality and shared baseline, the expression for the magnetic gradient tensor matrix measured at the center of the cross-shaped magnetic gradient tensor measurement system can be obtained:
[0117] (13)
[0118] In the formula (B) x1 B y1 B z1 (B) represents the magnetic field strength value measured by sensor number 1. x2 B y2 B z2 (B) represents the magnetic field strength value measured by sensor number 2. x3 B y3 B z3 (B) represents the magnetic field strength value measured by sensor number 3. x4 B y4 B z4 () represents the magnetic field strength value measured by sensor 4. After the magnetic gradient tensor measurement system measures the magnetic gradient tensor matrix G1 at measurement point 1, the system performs system translation and measures the magnetic gradient tensor matrix G2 at measurement point 2. The distance vectors from the two measurement points to the magnetic target to be measured are r1 and r2, respectively.
[0119] S3. Based on the acquired magnetic gradient tensor matrix data, calculate the eigenvalues of the magnetic gradient tensor matrix and the magnetic gradient tensor invariants for each measurement point.
[0120] Magnetic gradient tensor measurements rely on the sensor's position and orientation. When the measurement system rotates, each component of the tensor undergoes complex changes, posing significant challenges to data measurement and interpretation. Magnetic gradient tensor invariants do not change with the observation coordinate system, thus reflecting the spatial distribution characteristics of the magnetic field source itself. Introducing such invariants into inversion algorithms can significantly improve positioning performance. Typical magnetic gradient tensor invariants include the trace, magnitude, and eigenvalues of the magnetic gradient tensor; all tensor invariants of the tensor matrix G can be represented by eigenvalues. The eigenvalues of G are defined as λ1, λ2, and λ3, where λ1 > λ2 > λ3. Two tensor invariants that do not change with coordinate system rotation can be defined:
[0121] (14)
[0122] make , The eigenvalues of the magnetic gradient tensor matrix G can be further expressed as:
[0123] (15)
[0124] The magnetic gradient tensor matrices measured at the two measurement points are calculated respectively, and the three eigenvalues λ corresponding to the magnetic gradient tensor matrix measured at measurement point 1 are obtained respectively. 1,1 , λ 1,2 , λ 1,3 And the three eigenvalues λ corresponding to the magnetic gradient tensor matrix measured at measurement point 2. 2,1 , λ 2,2 , λ 2,3 .
[0125] S4. Establish a nonlinear objective function that includes a magnetic moment consistency penalty term. This involves the following steps:
[0126] S4.1 Based on the eigenvalues of the magnetic gradient tensor and the magnetic field vector, calculate the distance vector by introducing tensor invariants;
[0127] First, a single-point localization formula based on a magnetic dipole, which is based on the magnetic gradient tensor invariant:
[0128] (16)
[0129] In the formula, E is a third-order identity matrix. To simplify the formula, two intermediate parameters Q1 and Q2 are set: , Thus, the expression for the distance vector between the two measurement points and the magnetic target to be measured is obtained:
[0130] (17)
[0131] S4.2 Based on the nonlinear relationship between the distance vectors between two adjacent points, establish a benchmark objective function that includes the location of the magnetic target;
[0132] Combining equation (17) with equation (12), we can obtain:
[0133] (18)
[0134] By considering the distance vector r1=(x,y,z) from the target to measurement point 1 in equation (18) T Solving this equation would allow for the localization of the magnetic target. However, since the equation is nonlinear, it cannot be solved directly. Therefore, a baseline objective function incorporating the magnetic target's position parameters is established:
[0135] (19)
[0136] S4.3 Using the magnetic gradient tensor invariant, calculate the magnetic moment modulus measured at the two measurement points for the same target.
[0137] Based on the eigenvalues of the magnetic gradient tensor matrix G generated by the magnetic dipole, a geometrical substitution is performed by introducing the angle between the relative position vector and the magnetic moment. Then, by multiplying and algebraically simplifying the eigenvalues, an equivalent expression for the invariant I² of the magnetic gradient tensor is derived, specifically as follows:
[0138] (20)
[0139] In the formula, M is the magnitude of the magnetic moment m of the magnetic target, R is the magnitude of the range vector, λ3 is an eigenvalue of the tensor matrix, and μ is the normalized source intensity (NSS) of the tensor invariant. Combining equation (14), we get I2 = λ1λ2λ3. Transforming equation (20), we obtain an expression for the magnetic moment magnitude:
[0140] (twenty one)
[0141] From equation (21), we can obtain the magnetic moment modes M1 and M2 corresponding to the two measurement points, respectively:
[0142] (twenty two)
[0143] S4.4 utilizes the consistency criterion of the magnetic moment modes measured at two measurement points, introduces a normalized magnetic moment consistency penalty term, determines the penalty term coefficient p, and combines it with the benchmark objective function that includes the position of the magnetic target to construct the final nonlinear objective function as the fitness function of the improved escape algorithm ESCA.
[0144] Since the magnetic moment moduli measured at two measurement points for the same magnetic target should be consistent, a normalized magnetic moment consistency penalty term is constructed:
[0145] (twenty three)
[0146] In the formula, p is the weight coefficient of the penalty term, which controls the intensity of the penalty term. The value range of the weight coefficient can be dynamically adjusted according to the actual engineering. Its reasonable value range should be 0.1~1.0. In this embodiment, the value of the subsequent penalty term weight coefficient is set to p=0.5. Simulation verification shows that this value can achieve the best balance between convergence speed and positioning accuracy. Combining formula (19) and formula (23), the final nonlinear objective function is constructed as the fitness function of the improved escape algorithm ESCA:
[0147] (twenty four)
[0148] The distance vector r1=(x,y,z) from the target to measurement point 1 in the above formula. T By optimizing the solution to minimize f, the magnetic target can be located.
[0149] S5. The established objective function is iteratively optimized globally using the improved escape algorithm ESCA. Specifically, the following steps are included:
[0150] S5.1 Randomly initializes the positions of individuals in the population within the search space, sets parameters such as the maximum number of iterations, population size, upper and lower bounds of the search space, and solution dimension, calculates the initial fitness of individuals, and extracts the best individuals into the elite pool for retention.
[0151] In this embodiment, an initial population of N individuals is first generated through random distribution, with a maximum number of iterations set to T. The initial position x of each individual in the population is calculated using the following formula:
[0152] (25)
[0153] After initialization, the fitness value of each individual is calculated using the fitness function and sorted in ascending order. The top m best individuals are stored in the elite pool E, representing the number of potential safe exits identified by the population, and used as a reference for subsequent iterations. The fitness function and the update formula for each individual in each iteration are as follows:
[0154] (26)
[0155] (27)
[0156] S5.2 Calculate global dynamic parameters: Calculate the panic index for the current iteration, and introduce and utilize a nonlinear smoothing function to dynamically calculate the proportions of the calm group, panic group, and conformity group.
[0157] At the beginning of each iteration, the panic index P(t) is first calculated to quantify the degree of volatility in the population:
[0158] (28)
[0159] Where t is the current iteration number, and further, the total number of iterations in the exploration phase is defined as T. exp =T / 2. To address the oscillation problem caused by the constant proportion switching in the original mechanism, a nonlinear smoothing cosine function is introduced to dynamically calculate the proportions of the three groups. The dynamic calculation formulas for the proportions of the panic group (p(t), the calm group (c(t), and the conformist group (h(t))) are established as follows:
[0160] (29)
[0161] (30)
[0162] (31)
[0163] In the formula T exp =T / 2, where the initial and final values for the panicked group and the calmed group are respectively set as p. initial =0.7,p final =0.1, c initial =0.1, c final =0.7, using the cosine function to ensure a smooth decrease in the population proportion, and the herd population uses equation (31) to ensure that the total population proportion is always 1.
[0164] S5.3 Position Update Based on Iteration Process: The algorithm divides the optimization process into an early exploration phase and a later development phase based on the ratio of the current iteration number t to the maximum iteration number T, and executes only one of the update strategies in a single iteration:
[0165] Exploration phase:
[0166] When t ≤ T, the population is sorted by fitness and then divided into calm, conformist, and panic groups based on dynamic proportions. Since the three-dimensional spatial position of a magnetic target is highly nonlinearly coupled to its magnetic moment, in this embodiment, the update mask for the crowded dimension in the update mechanism is kept constant at 1. Furthermore, the movement guidance term for individuals in the calm group is modified from the original group center to the elite optimal solution E. j The forced full-dimensional position update formulas for the calm group, conformist group, and panic group are as follows:
[0167] (32)
[0168] (33)
[0169] (34)
[0170] In the formula, w1 and w2 are position weight variables, and x p,j x represents the location of a randomly selected individual in the calming group. rand,j v represents the location of an individual randomly selected in the population. c,j v h,j v p,j The fluctuation speed control component is for the corresponding group.
[0171] Development phase:
[0172] When t > T / 2, the algorithm enters the development phase. Once in the development phase, all individuals in the population are considered to be in a quiescent state, and the algorithm's search focus shifts entirely to local fine-tuning. All individuals utilize the best individuals E from the elite pool. j and randomly selected population individuals x rand,j Perform differential-guided position updates. The update formula is:
[0173] (35)
[0174] S5.4 Boundary Control and Elite Pool Update: After the position update during the exploration or development phase, boundary control is performed on all new individuals generated in the current iteration. The fitness of the new individuals is recalculated. If the new individuals are better, they are replaced with the original individuals, and the optimal solution in the elite pool is updated.
[0175] First, regarding the updated Boundary checks are performed. If a dimension exceeds the upper and lower bounds (lb, ub), it is forcibly pulled back to the boundary value. Then, the fitness value of the new position is calculated using the fitness function. Based on a greedy principle, a decision is made on whether to accept the new position, and the update formula is given in equation (27). That is, replacement is only performed when the new position has a better fitness. After completing the position update for the entire population, the fitness of the entire group is recalculated and sorted. The latest top m optimal solutions are replaced and stored in the elite pool. The overall solution flowchart of the improved ESCA is shown below. Figure 5 As shown.
[0176] S6 repeats the process from S5.2 to S5.4. When the number of iterations reaches the preset maximum number of iterations, all position updates and population evolution operations are stopped and the best approximation solution is output. This solution is used as the final position coordinates of the magnetic target to be tested, thereby achieving localization.
[0177] In this embodiment, when the Improved Escape Algorithm (ESCA) reaches the preset maximum number of iterations, triggering the termination condition, the algorithm stops all position updates and population evolution operations. At this point, the optimal individual ranked first in the elite pool, i.e., with the smallest fitness value (representing that the sum of the nonlinear difference function and the magnetic moment consistency penalty term is closest to zero), is extracted. The 3D spatial coordinate parameters corresponding to this individual are the best approximation solution determined by the algorithm through global iterative optimization. Specifically, the best approximation solution corresponding to the optimal individual physically represents the distance vector r1 of the magnetic target to be measured relative to the measurement point 1. By mapping this global optimal solution vector parameter back to the actual three-dimensional physical measurement coordinate system and combining it with the absolute spatial coordinates of the measurement platform itself at the measurement point 1, the absolute spatial position of the magnetic target in the actual detection environment can be calculated and reconstructed.
[0178] To further verify the effectiveness of the embodiments, in this embodiment, corresponding code was written using Matlab, and the following simulation experiment was conducted. Figure 2 The system translational positioning model shown is used as the positioning model for the simulation experiment. The magnetic target is placed at the origin of the coordinate system, and its magnetic moment is (1×10⁻⁶). 5 2×10 5 4×10 5 Am 2The superimposed geomagnetic field is approximately (29229, 2741, 42323) nT. A cross-shaped measurement system is mounted on a mobile platform with a baseline distance d = 0.5 m and a sensor accuracy of 0.1 nT. The experiment uses a translational trajectory D3 to locate the magnetic target, starting from the relative origin position (20, -20, -20), with a velocity v = 4 m / s, a sampling frequency f = 1 Hz, and 6 samplings. The distance error is defined as:
[0179] (36)
[0180] Where (x0,y0,z0) is the position vector estimated by the positioning method, and (x,y,z) is the true position vector of the magnetic target at a certain moment.
[0181] In the simulation experiment, two methods proposed by Liu and Chi were used for comparison. These two methods are called LTPTP and CTPTP, and the method in this embodiment is called ESC-TPTP. Figure 4 The graphs show the line graphs of the two-point localization errors of the magnetic gradient tensor using different methods. The graphs reveal that LTPTP exhibits poor error stability, producing large error values in multiple locations. While CTPTP performs better than LTPTP, it is still worse than the ESC-TPTP proposed in this invention. Furthermore, from... Figure 4 As can be seen, the error value of the ESC-TPTP proposed in this invention is less than 2 m throughout the entire positioning process and no local optimum occurs, which indicates that this invention can achieve precise positioning of magnetic targets.
[0182] This application also provides a magnetic gradient tensor two-point positioning system based on improved ESCA, including the following modules:
[0183] Magnetic field vector description module: Under far-field conditions, the magnetic field vector of the magnetic target under test is described using a magnetic dipole model.
[0184] Data acquisition module: Sequentially acquire the magnetic field vectors at two adjacent measurement points on the space exploration trajectory according to the preset sampling frequency, and reconstruct the corresponding magnetic gradient tensor matrix data based on the difference principle.
[0185] Calculation module: Based on the acquired magnetic gradient tensor matrix data, calculate the eigenvalues of the magnetic gradient tensor matrix and the magnetic gradient tensor invariants at each measurement point.
[0186] Function building module: Creates a nonlinear objective function that includes a magnetic moment consistency penalty term.
[0187] Iterative optimization module: The nonlinear objective function is globally iteratively optimized by using the improved escape algorithm ESCA. The improved escape algorithm ESCA introduces a dynamic population ratio adjustment strategy and optimizes the position update and dimension update mechanism.
[0188] The positioning module outputs the global optimal solution of the nonlinear objective function and realizes the positioning of the magnetic target.
[0189] In one possible implementation, the function construction module specifically includes the following operations:
[0190] First, based on the eigenvalues of the magnetic gradient tensor and the magnetic field vector, the distance vector, which introduces tensor invariants, is calculated.
[0191] Then, based on the nonlinear relationship between the distance vectors of two adjacent points, a benchmark objective function containing the location of the magnetic target is established.
[0192] Using the magnetic gradient tensor invariant, the magnetic moment modulus measured at two measurement points relative to the same target is calculated.
[0193] Finally, using the consistency criterion of the magnetic moment modes measured at two measurement points, a normalized magnetic moment consistency penalty term is introduced, and the penalty term coefficient p is determined. Combined with the benchmark objective function that includes the position of the magnetic target, the final nonlinear objective function is constructed as the fitness function of the improved escape algorithm ESCA.
[0194] In one possible implementation, the iterative optimization module specifically includes the following operations:
[0195] Randomly initialize the positions of individuals in the population within the search space, set the maximum number of iterations, population size, upper and lower bounds of the search space, and solution dimension, calculate the initial fitness of individuals, and extract the best individuals into the elite pool for retention.
[0196] Calculate the panic index for the current iteration, and introduce and utilize a nonlinear smoothing function to dynamically calculate the proportions of the calm group, the panic group, and the conformist group.
[0197] The optimization process is divided into an early exploration phase and a later development phase, and only one update strategy is executed in a single iteration:
[0198] Exploration Phase: When the current iteration count is less than or equal to 50% of the total iteration count, the population is divided into three groups based on the obtained group proportions: Calm Group, Panic Group, and Conformity Group. Considering the high coupling between the target spatial location and the magnetic moment, the binary mask variable of the original escape algorithm ESCA is kept constant at 1, forcing all individuals in all groups to continuously synchronize their positions across all dimensions.
[0199] Development phase: When the current iteration count is greater than 50% of the total iteration count, stop dynamic grouping and directly use individuals in the elite pool to perform full-dimensional differential-guided position updates for the entire population.
[0200] After the position update during the exploration or development phase, boundary control is applied to all new individuals generated in the current iteration. The fitness of the new individuals is recalculated. If the new individuals are better, they are replaced with the original individuals, and the optimal solution in the elite pool is updated.
[0201] This application also provides an electronic device, including a processor and a memory.
[0202] The memory is used to store computer programs.
[0203] When the processor executes a program stored in the memory, it implements any of the methods described in this application.
[0204] In one possible implementation, the electronic device of this application embodiment further includes a communication interface and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0205] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.
[0206] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0207] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0208] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0209] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements any of the methods described in this application.
[0210] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the methods described in this application.
[0211] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0212] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0213] The various embodiments in this specification are described in a related manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
[0214] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A two-point localization method based on the magnetic gradient tensor of improved ESCA, characterized in that, Includes the following steps: S1. Under far-field conditions, the magnetic field vector of the magnetic target under test is described by the magnetic dipole model. S2. Obtain the magnetic field vectors at two adjacent measurement points on the space detection trajectory in sequence according to the preset sampling frequency, and reconstruct the corresponding magnetic gradient tensor matrix data based on the difference principle. S3. Based on the acquired magnetic gradient tensor matrix data, calculate the eigenvalues of the magnetic gradient tensor matrix and the magnetic gradient tensor invariants at each measurement point. S4. Establish a nonlinear objective function that includes a magnetic moment consistency penalty term; S5. The nonlinear objective function is globally iteratively optimized by using the improved escape algorithm ESCA. The improved escape algorithm ESCA introduces a dynamic population ratio adjustment strategy and optimizes the position update and dimension update mechanism. S6. Output the global optimal solution of the nonlinear objective function and realize the positioning of the magnetic target.
2. The two-point localization method based on the improved ESCA magnetic gradient tensor according to claim 1, characterized in that, In step S1, the specific process of describing the magnetic field vector of the magnetic target under far-field conditions using a magnetic dipole model is as follows: When the distance between the measurement point and the magnetic target is greater than 2.5 times the length of the detected magnetic target, the magnetic target can be considered equivalent to a magnetic dipole. In this case, the magnetic field vector B generated by the magnetic target at a distance r from itself can be written as: (1) Where μ0≈4π×10 -7 H / m is the magnetic permeability in vacuum; m = (m x m y m z Let be the magnetic moment of the magnetic target; R be the distance vector r = (x, y, z). T The model.
3. The two-point localization method based on the improved ESCA magnetic gradient tensor according to claim 2, characterized in that, In step S3, the magnetic gradient tensor matrix G is the rate of change of the magnetic field vector B in three mutually orthogonal directions, expressed as: (2) Among them B ij(i,j=x,y,z) Let G be the nine components of the magnetic gradient tensor; define the eigenvalues of the magnetic gradient tensor matrix G as λ1, λ2, and λ3, where λ1 > λ2 > λ3; to simplify calculations, define two magnetic gradient tensor invariants of the magnetic gradient tensor, expressed as: (3) To simplify the expression for solving the eigenvalues, intermediate parameters C and D are introduced, let... , The eigenvalues of the magnetic gradient tensor matrix G are further expressed as: (4)。 4. The two-point localization method based on the improved ESCA magnetic gradient tensor according to claim 1, characterized in that, In step S4, a nonlinear objective function including a magnetic moment consistency penalty term is established. The specific process is as follows: First, based on the magnetic gradient tensor invariant, and combining the magnetic field vectors B1 and B2 of two adjacent measurement points with their corresponding magnetic gradient tensor matrices G1 and G2, a two-point localization equation is jointly constructed: (5) Where Q is an intermediate parameter in the simplified formula expression. , A1 and A2 are the position parameter matrices at measurement points 1 and 2 as defined by equation (1), respectively; r1 and r2 are the distance vectors from the target to measurement points 1 and 2, respectively; λ 1,1 , λ 1,2 , λ 1,3 These are the three eigenvalues of the magnetic gradient tensor matrix at measurement point 1; λ 2,1 , λ 2,2 , λ 2,3 These are the three eigenvalues of the magnetic gradient tensor matrix at measurement point 2. Based on the obtained magnetic gradient tensors and eigenvalues of the two measurement points, the localization equations for the two points are transformed into an initial nonlinear objective function without penalty terms. (6) Furthermore, using the magnetic gradient tensor invariant, the magnetic moment moduli M1 and M2 at the two measurement points with respect to the same target are calculated respectively. The formula for calculating the single-point magnetic moment modulus M is: (7) Where μ0 is the free permeability, R is the magnitude of the distance vector, and μ is the normalized source strength (NSS) defined by the tensor invariant. Furthermore, a normalized magnetic moment consistency penalty term based on the difference in magnetic moment modes between the two measurement points is introduced into the initial nonlinear objective function to establish the final nonlinear objective function, which serves as the fitness function for the improved escape algorithm ESCA: (8) Where p is the weighting coefficient that controls the strength of the penalty term, so that f takes the minimum value, and the corresponding position parameter is the optimal solution of the equation; preferably, the weighting coefficient p of the penalty term takes the value of 0.
5.
5. The two-point localization method based on the improved ESCA magnetic gradient tensor according to claim 1, characterized in that, The improvements to ESCA in step S5 specifically include: Introducing a dynamic population ratio adjustment strategy: The fixed proportions of the calm, conformist, and panicked groups in the exploration phase of the original escape algorithm ESCA are replaced with a nonlinear smooth function with respect to the iteration number t; the proportions of the three groups are dynamically adjusted during the iteration process, and the dynamic adjustment formula is as follows: (9) (10) (11) Where p(t), c(t), and h(t) represent the proportions of the panicked group, the calm group, and the conformist group at the t-th iteration, respectively, and T exp Let T be the maximum number of iterations in the exploration phase. exp =T / 2, where T is the total number of iterations, p initial and p final These represent the initial and final proportions of the panicked group, respectively. initial and c final These represent the initial and final proportions of the calm group, respectively. Optimize the location update guide for individuals in the Calm Group: During the exploration phase, the guiding term in the formula for updating the individual position of the calming group was changed from the center C of the original group. j Modified to the current optimal solution E in the elite pool j ; Optimize the individual dimension update mechanism: In the original escape algorithm ESCA individual position update formula, the binary variables m1 and m2 used to simulate the partial dimension update caused by crowd congestion are both set to a constant 1.
6. The two-point localization method based on the improved ESCA magnetic gradient tensor according to claim 5, characterized in that, S5 specifically includes the following steps: S5.1 Randomly initializes the positions of individuals in the population within the search space, sets the maximum number of iterations, population size, upper and lower bounds of the search space, and solution dimension, calculates the initial fitness of individuals, and extracts the best individuals into the elite pool for retention; S5.2 Calculate global dynamic parameters: Calculate the panic index for the current iteration, and introduce and utilize a nonlinear smoothing function to dynamically calculate the proportions of the calm group, panic group, and conformity group; S5.3 Position Update Based on Iterative Process: The optimization process is divided into an early exploration phase and a later development phase, and only one update strategy is executed in a single iteration: Exploration phase: When the current iteration count is less than or equal to 50% of the total iteration count, the population is divided into calm group, panic group, and conformist group according to the obtained population proportion; In view of the high coupling between the target's spatial position and magnetic moment, the binary mask variable of the original escape algorithm ESCA is kept constant at 1, forcing all individuals in the group to perform continuous synchronous position updates in all dimensions. Development phase: When the current iteration count is greater than 50% of the total iteration count, stop dynamic grouping and directly use individuals in the elite pool to perform full-dimensional differential position updates for the entire population; S5.4 Boundary Control and Elite Pool Update: After the position update during the exploration or development phase, boundary control is performed on all new individuals generated in the current iteration. The fitness of the new individuals is recalculated. If the new individuals are better, they are replaced with the original individuals, and the optimal solution in the elite pool is updated.
7. The two-point localization method based on the improved ESCA magnetic gradient tensor according to claim 1, characterized in that, The specific operation of S6 is as follows: Repeatedly iterate to find the best solution until the number of iterations reaches the preset maximum number of iterations, and output the best approximation solution, which is used as the final position coordinates of the magnetic target to be tested, thereby achieving positioning.
8. A two-point positioning system based on improved ESCA magnetic gradient tensor, characterized in that, Includes the following modules: Magnetic field vector description module: Under far-field conditions, the magnetic field vector of the magnetic target under test is described using a magnetic dipole model; Data acquisition module: Sequentially acquires the magnetic field vectors at two adjacent measurement points on the space detection trajectory according to the preset sampling frequency, and reconstructs the corresponding magnetic gradient tensor matrix data based on the difference principle; Calculation module: Based on the acquired magnetic gradient tensor matrix data, calculate the eigenvalues of the magnetic gradient tensor matrix and the magnetic gradient tensor invariants at each measurement point; Function building module: Creates a nonlinear objective function that includes a magnetic moment consistency penalty term; Iterative optimization module: The nonlinear objective function is globally iteratively optimized by using the improved escape algorithm ESCA. The improved escape algorithm ESCA introduces a dynamic population ratio adjustment strategy and optimizes the position update and dimension update mechanism. The positioning module outputs the global optimal solution of the nonlinear objective function and realizes the positioning of the magnetic target.
9. A two-point positioning system based on an improved ESCA magnetic gradient tensor according to claim 8, characterized in that, The function building module specifically includes the following operations: First, based on the eigenvalues of the magnetic gradient tensor and the magnetic field vector, the distance vector, which introduces tensor invariants, is calculated. Then, based on the nonlinear relationship between the distance vectors between two adjacent points, a benchmark objective function containing the location of the magnetic target is established; Using the magnetic gradient tensor invariant, the magnetic moment modulus measured at two measurement points for the same target is calculated respectively. Finally, using the consistency criterion of the magnetic moment modes measured at two measurement points, a normalized magnetic moment consistency penalty term is introduced, and the penalty term coefficient p is determined. Combined with the benchmark objective function that includes the position of the magnetic target, the final nonlinear objective function is constructed as the fitness function of the improved escape algorithm ESCA.
10. A two-point positioning system based on an improved ESCA magnetic gradient tensor according to claim 8, characterized in that, The iterative optimization module specifically includes the following operations: Randomly initialize the positions of individuals in the population within the search space, set the maximum number of iterations, population size, upper and lower bounds of the search space, and solution dimension, calculate the initial fitness of individuals, and extract the best individuals into the elite pool for retention. Calculate the panic index for the current iteration, and introduce and utilize a nonlinear smoothing function to dynamically calculate the proportions of the calm group, the panic group, and the conformist group; The optimization process is divided into an early exploration phase and a later development phase, and only one update strategy is executed in a single iteration: Exploration phase: When the current iteration count is less than or equal to 50% of the total iteration count, the population is divided into calm group, panic group, and conformist group according to the obtained population proportion; In view of the high coupling between the target's spatial position and magnetic moment, the binary mask variable of the original escape algorithm ESCA is kept constant at 1, forcing all individuals in the group to perform continuous synchronous position updates in all dimensions. Development phase: When the current iteration count is greater than 50% of the total iteration count, stop dynamic grouping and directly use individuals in the elite pool to perform full-dimensional differential position updates for the entire population; After the position update during the exploration or development phase, boundary control is applied to all new individuals generated in the current iteration. The fitness of the new individuals is recalculated. If the new individuals are better, they are replaced with the original individuals, and the optimal solution in the elite pool is updated.