Dynamic tracking and positioning method for multiple magnetic targets
By employing a hierarchical, progressive, multi-algorithm joint approach, utilizing the magnetic dipole model and improved differential evolution and sparrow positioning algorithms, the accuracy and real-time performance issues of multi-magnetic target tracking and positioning technology were resolved, achieving high-precision and fast multi-target positioning and tracking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (WUHAN)
- Filing Date
- 2025-11-18
- Publication Date
- 2026-04-24
AI Technical Summary
Multi-magnetic target tracking and positioning technology has significant shortcomings in terms of accuracy, real-time performance, and dynamic tracking stability. In particular, in scenarios involving multiple superimposed magnetic fields and high-dimensional environments, existing solutions struggle to achieve efficient and stable positioning and tracking.
A hierarchical, progressive multi-algorithm approach is adopted, including constructing a fitness function based on a magnetic dipole model, using an improved differential evolution algorithm and a sparrow localization algorithm for high-dimensional global coarse localization, and combining it with local fine optimization through dynamic gradient descent to achieve high-precision and stable tracking and localization.
It achieves high-precision, fast and stable tracking and positioning of multiple magnetic targets in complex scenarios, improving positioning accuracy and real-time performance, reducing tracking interruption rate, and significantly shortening positioning time.
Smart Images

Figure CN121920408A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of positioning, and in particular to a method for dynamic tracking and positioning of multiple magnetic targets. Background Technology
[0002] Multi-magnetic target tracking and positioning technology acquires magnetic field signals from multiple magnetic targets and combines signal processing and optimization algorithms to achieve real-time estimation of target position, trajectory, and attitude. Its core applications cover industry (monitoring of magnetic components in equipment, positioning of magnetic targets on production lines), security and search and rescue (tracking underground pipelines, post-disaster magnetic life detection), medicine (tracking of in-vivo magnetic devices, positioning of MRI magnetic implants), and defense (battlefield reconnaissance of multiple magnetic targets, tracking of underwater magnetic beacons). This technology faces core challenges such as superimposed interference from magnetic field signals, rapid spatial attenuation, and susceptibility to environmental interference, requiring a balance between positioning accuracy, real-time performance, and anti-interference capabilities.
[0003] Current localization algorithms are mainly based on the mathematical model that magnetic targets can be equivalent to magnetic dipoles to establish magnetic fields, and employ the classic nonlinear optimization algorithm LM. However, it suffers from extreme dependence on initial values. Some intelligent algorithms (GA, PSO, etc.) are also used to replace or provide initial values for the LM algorithm, taking advantage of their insensitivity to initial values. Existing solutions for multi-magnetic target localization have three major drawbacks: First, the superposition of magnetic fields from multiple targets leads to an increased scale of the equation system, with strong coupling between equations and extremely high parameter complexity; second, the real-time performance of algorithms in high-dimensional scenes is insufficient, with single localization taking over 5 seconds; and third, dynamic tracking stability is weak, and fixed motion models struggle to cope with sudden state changes, resulting in a high tracking interruption rate.
[0004] Existing solutions for multi-magnetic target tracking and positioning technology have significant shortcomings in terms of accuracy and real-time performance, and there is an urgent need to improve the positioning and tracking performance in complex scenarios. Summary of the Invention
[0005] The purpose of this invention is to provide a dynamic tracking and positioning method for multiple magnetic targets, in order to address the significant shortcomings in accuracy and real-time performance of existing multi-magnetic target tracking and positioning technologies.
[0006] The above-mentioned objective of this application is achieved through the following technical solution: S1: Establish a magnetic dipole model for multiple magnetic targets; S2: Construct a fitness function for multi-target localization based on the magnetic dipole model; S3: An improved differential evolution algorithm based on magnetic field data to drive the initial and dynamic population sizes is used to perform high-dimensional global coarse localization and obtain coarse localization results; S4: Based on the initial population generation and dynamic population size of the dynamic search space, the improved sparrow positioning algorithm and coarse positioning results are used to perform local fine-tuning positioning to obtain fine positioning results; S5: Based on the LM algorithm in the dynamic gradient descent space and the fine positioning results, dynamic tracking and positioning are performed to achieve high-precision and stable tracking and positioning.
[0007] Optionally, step S1 includes: Each magnetic target is equivalent to a magnetic dipole, and a model of the magnetic dipole it generates at any point P in space is established. The magnetic target is a cylindrical permanent magnet, and its magnetic moment direction vector is: The position vector of point P in space relative to the center of mass of the magnet is R; the formula for calculating the magnetic field strength B is: (1) in, Indicates relative permeability; The vacuum permeability; Indicates magnetization intensity; Represents a position vector, defined .
[0008] Optionally, step S2 includes: A sensor array consisting of N triaxial magnetic sensors is arranged in a global coordinate system. Let the first... The coordinates of each sensor are , From the center of the magnet to the first The distance of the first sensor, assuming the first... The position of the center point of the magnet is ,but ; Equation (1) can be further transformed into the following form: (2) in, for The model; , and This represents the actual measured value of each sensor along each axis; For equation (1) ;k represents the k-th magnet, , and Indicates the direction of the magnetic moment of the k-th magnet. ; Based on the three axial components of the magnetic field strength, and in conjunction with equation (2), the following fitness function is defined: (3) in, , and The magnitude of the magnetic field actually measured by each sensor in the sensor array along the x, y, and z axes; , and To derive the magnitude of the magnetic field generated by each magnet at the x, y, and z axes of the sensor based on the magnetic dipole model; N represents the number of triaxial magnetic sensors, and the total error is equal to the sum of the errors of the three components, i.e. , , and This represents the error of each sensor in each of the three axes.
[0009] Optionally, step S3 includes: S31: Initial population generation based on magnetic field data: Through strong magnetic field point screening, greedy clustering, chaotic perturbation and magnetic moment constraints, an initial population close to the real solution is generated; S32: Dynamically adjust the population size during the iteration process: the population size sizepop_current decreases linearly from the initial value sizepop_init to the minimum value sizepop_min as the number of iterations t increases; Adaptive updates of the mutation factor F and crossover probability CR; S33: Perform differential evolution operations, including mutation, crossover, boundary constraint handling, magnetic moment normalization correction, and update the population through selection operations; S34: Output the global optimal solution gbest for this stage as the coarse localization result.
[0010] Optionally, step S4 includes: The improved sparrow localization algorithm performs a local fine-grained search centered on the coarse localization result. Its execution process includes: S41: Generate an initial population based on the dynamic search space: Using the coarse localization result of the previous moment as the center and the preset search radius as the range, generate independent dynamic search boundaries for each target, and combine the global boundary to adaptively perturb the individual positions and magnetic moments of the population. S42: Dynamically adjust the population size during the iteration process; S43: Simulate the discoverer-joiner-watcher collaborative behavior of a sparrow population to update individual positions; S44: Perform boundary processing on the updated individual positions to ensure that the solution is within the feasible region; S45: Output the best solution for this stage as the fine-tuning result.
[0011] Optionally, step S5 includes: The inputs to the LM algorithm are the fine-grained localization results, the measured magnetic field data BL, the observation information obs_info, and the global boundary global_bound; Initialize LM parameters: including maximum number of iterations max_iter, initial damping factor tau, update factor v, error thresholds eps1 and eps2, and initial damping factor mu; Calculate the residual and Jacobian matrix J of the current solution; Construct and solve the system of linear equations; Calculate the gain ratio rho, and determine whether to accept an update and adjust the damping coefficient μ based on the rho value; The candidate solutions are constrained to ensure that they satisfy the position boundary and magnetic moment unit sphere constraints; Iterate until the convergence condition is met or the maximum number of iterations is reached, and output the best solution Best_pos and the best error Best_score at the current time.
[0012] An electronic device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform a multi-magnetic target dynamic tracking and positioning method.
[0013] A computer-readable storage medium storing instructions that, when executed, perform a method for dynamic tracking and positioning of multiple magnetic targets.
[0014] The beneficial effects of the technical solution provided in this application are: A multi-magnetic target dynamic tracking and localization method based on hierarchical progressive multi-algorithm joint operation is proposed. For global coarse optimization, an improved differential evolution algorithm based on magnetic field data-driven initial population and dynamic population size is proposed; for local fine optimization, an improved sparrow localization algorithm based on dynamic search space for initial population generation and dynamic population size is proposed. Attached Figure Description
[0015] The present application will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a step diagram of an embodiment of this application; Figure 2 This is a magnetic field analysis diagram of the cylindrical permanent magnet in the embodiments of this application; Figure 3 This is a global coordinate system diagram of the magnetic sensor array in the embodiments of this application; Figure 4 This is a flowchart of the initial population driven by magnetic field data in an embodiment of this application; Figure 5 This is a flowchart of the initial population generation based on dynamic search space in the embodiments of this application; Figure 6 This is a comparison chart of the multi-target tracking and localization results of the MDELA-MSSLA-LM joint algorithm in the embodiments of this application; Figure 7 This is a comparison diagram of the multi-target tracking and localization results of the SSLA algorithm in the embodiments of this application; Figure 8 This is a schematic diagram of the electronic device structure in the embodiments of this application. Detailed Implementation
[0016] To provide a clearer understanding of the technical features, objectives, and effects of this application, the specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0017] The embodiments of this application provide a method for dynamic tracking and positioning of multiple magnetic targets.
[0018] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of a multi-magnetic target dynamic tracking and positioning method according to an embodiment of this application, including: S1: Establish a magnetic dipole model for multiple magnetic targets; S2: Construct a fitness function for multi-target localization based on the magnetic dipole model; S3: An improved differential evolution algorithm based on magnetic field data to drive the initial and dynamic population sizes is used to perform high-dimensional global coarse localization and obtain coarse localization results; S4: Based on the initial population generation and dynamic population size of the dynamic search space, the improved sparrow positioning algorithm and coarse positioning results are used to perform local fine-tuning positioning to obtain fine positioning results; S5: Based on the LM algorithm in the dynamic gradient descent space and the fine positioning results, dynamic tracking and positioning are performed to achieve high-precision and stable tracking and positioning.
[0019] Step S1 includes: Each magnetic target is equivalent to a magnetic dipole, and a model of the magnetic dipole it generates at any point P in space is established. The magnetic target is a cylindrical permanent magnet, and its magnetic moment direction vector is: The position vector of point P in space relative to the center of mass of the magnet is R; the formula for calculating the magnetic field strength B is: (1) in, Indicates relative permeability; The vacuum permeability; Indicates magnetization intensity; Represents a position vector, defined .
[0020] In one specific embodiment of this application, magnetic positioning typically involves tightly integrating the target to be located with a cylindrical permanent magnet. This transforms the target's position and attitude information into six-dimensional position and attitude information of the permanent magnet. Therefore, the position and orientation relationship between the magnetic source and the magnetic sensor can be inverted using a mathematical model of the permanent magnet's magnetic field distribution. The magnetic dipole model greatly simplifies the mathematical expression of the magnet's magnetic field, approximating the permanent magnet as a magnetic dipole and using the magnetic dipole to approximate the magnetic field surrounding the magnet. For example... Figure 2 On the left is a Cartesian coordinate system with the center of mass of the cylindrical permanent magnet as the origin.
[0021] Step S2 includes: A sensor array consisting of N triaxial magnetic sensors is arranged in a global coordinate system. Let the first... The coordinates of each sensor are , From the center of the magnet to the first The distance of the first sensor, assuming the first... The position of the center point of the magnet is ,but ; Equation (1) can be further transformed into the following form: (2) in, for The model; , and This represents the actual measured value of each sensor along each axis; For equation (1) ;k represents the k-th magnet, , and Indicates the direction of the magnetic moment of the k-th magnet. ; Based on the three axial components of the magnetic field strength, and in conjunction with equation (2), the following fitness function is defined: (3) in, , and The magnitude of the magnetic field actually measured by each sensor in the sensor array along the x, y, and z axes; , and To derive the magnitude of the magnetic field generated by each magnet at the x, y, and z axes of the sensor based on the magnetic dipole model; N represents the number of triaxial magnetic sensors, and the total error is equal to the sum of the errors of the three components, i.e. , , and This represents the error of each sensor in each of the three axes.
[0022] Step S3 includes: S31: Initial population generation based on magnetic field data: Through strong magnetic field point screening, greedy clustering, chaotic perturbation and magnetic moment constraints, an initial population close to the real solution is generated; S32: Dynamically adjust the population size during the iteration process: the population size sizepop_current decreases linearly from the initial value sizepop_init to the minimum value sizepop_min as the number of iterations t increases; Adaptive updates of the mutation factor F and crossover probability CR; S33: Perform differential evolution operations, including mutation, crossover, boundary constraint handling, magnetic moment normalization correction, and update the population through selection operations; S34: Output the global optimal solution gbest for this stage as the coarse localization result.
[0023] As one example, the initial population generation method involves: "strong magnetic field point screening → greedy clustering (center selection - shielding - iteration) → chaotic perturbation + magnetic moment constraint" to generate the initial population, ensuring that each magnetic target corresponds to an independent magnetic field region, and that the initial solution closely approximates the actual location, thus improving the efficiency of subsequent optimization. The generation process is as follows: Figure 4 As shown.
[0024] The pseudocode for the MDELA algorithm with dynamic population size is shown in Algorithm 1 Improved Differential Evolutionary Localization Algorithm (MDELA):
[0025] Step S4 includes: The improved sparrow localization algorithm performs a local fine-grained search centered on the coarse localization result. Its execution process includes: S41: Generate an initial population based on the dynamic search space: Using the coarse localization result of the previous moment as the center and the preset search radius as the range, generate independent dynamic search boundaries for each target, and combine the global boundary to adaptively perturb the individual positions and magnetic moments of the population. S42: Dynamically adjust the population size during the iteration process; S43: Simulate the discoverer-joiner-watcher collaborative behavior of a sparrow population to update individual positions; S44: Perform boundary processing on the updated individual positions to ensure that the solution is within the feasible region; S45: Output the best solution for this stage as the fine-tuning result.
[0026] As one embodiment, the initial population generation method based on dynamic search space is as follows: Using the previous optimal solution of multiple magnetic targets as the center and a preset search radius as the range, an independent dynamic search boundary is generated for each target, combined with the global boundary; then, each population individual and magnetic target is traversed, and adaptive perturbations based on the dynamic boundary range are applied to the target position parameters, and slight perturbations are made to the magnetic moment and corrected by unit circle constraints; finally, all initial populations that meet the physical constraints and dynamic search range are generated, achieving a synergy of "dynamically narrowing the search space + retaining historical optimal information + ensuring population rationality." The initial population generation process based on dynamic search space is as follows: Figure 5 As shown.
[0027] The pseudocode for the MSSLA algorithm with dynamic population size is shown in Algorithm 2, Improved Sparrow Search Algorithm (MSSLA):
[0028] Step S5 includes: The inputs to the LM algorithm are the fine-grained localization results, the measured magnetic field data BL, the observation information obs_info, and the global boundary global_bound; Initialize LM parameters: including maximum number of iterations max_iter, initial damping factor tau, update factor v, error thresholds eps1 and eps2, and initial damping factor mu; Calculate the residual and Jacobian matrix J of the current solution; Construct and solve the system of linear equations; Calculate the gain ratio rho, and determine whether to accept an update and adjust the damping coefficient μ based on the rho value; The candidate solutions are constrained to ensure that they satisfy the position boundary and magnetic moment unit sphere constraints; Iterate until the convergence condition is met or the maximum number of iterations is reached, and output the best solution Best_pos and the best error Best_score at the current time.
[0029] This application provides an embodiment as follows, with pseudocode for the LM algorithm based on the dynamic gradient descent space, as shown in Algorithm 3, the multi-target LM localization algorithm:
[0030] In one embodiment, precise target separation and high-precision stable tracking and positioning were achieved for single, dual, triple, and quad targets with unknown information in a simulation environment. The maximum tracking and positioning time was 0.005s, and the minimum was 0.00006s. The trajectory overlap degree (TOD) for quad target positioning within a 1.5mm error band could also reach 95%. The multi-target tracking and positioning results are as follows: Figure 6 and Figure 7 As shown in Tables 1-4, the tracking performance of each algorithm on targets of various dimensions is as follows. From the tables, it can be analyzed that the MDELA-MSSLA-LM joint algorithm proposed in this invention is perfectly adapted to the core requirements of high-dimensional dynamic tracking and positioning problems. Compared with other ordinary algorithms, it greatly improves the positioning accuracy and real-time performance of multi-magnetic target tracking and positioning.
[0031] Table 1 Comparison of localization performance of the MDELA-MSSLA-LM joint algorithm
[0032] Table 2 Comparison of MDELA Algorithm Localization Performance
[0033] Table 3 Comparison of MSSLA Algorithm Localization Performance
[0034] Table 4 Comparison of LM Algorithm Localization Performance
[0035] This application also discloses an electronic device. (See reference...) Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0036] The communication bus 502 is used to enable communication between these components.
[0037] The user interface 503 may include a display screen, and optionally, the user interface 503 may also include a standard wired interface or a wireless interface.
[0038] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0039] This application also discloses a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute the above-described method for dynamic tracking and positioning of multiple magnetic targets.
[0040] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure.
[0041] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method for dynamic tracking and positioning of multiple magnetic targets, characterized in that, The method includes the following steps: S1: Establish a magnetic dipole model for multiple magnetic targets; S2: Construct a fitness function for multi-target localization based on the magnetic dipole model; S3: An improved differential evolution algorithm based on magnetic field data to drive the initial and dynamic population sizes is used to perform high-dimensional global coarse localization and obtain coarse localization results; S4: Based on the initial population generation and dynamic population size of the dynamic search space, the improved sparrow positioning algorithm and coarse positioning results are used to perform local fine-tuning positioning to obtain fine positioning results; S5: Based on the LM algorithm in the dynamic gradient descent space and the fine positioning results, dynamic tracking and positioning are performed to achieve high-precision and stable tracking and positioning.
2. The method for dynamic tracking and positioning of multiple magnetic targets as described in claim 1, characterized in that, Step S1 includes: Each magnetic target is equivalent to a magnetic dipole, and a model of the magnetic dipole it generates at any point P in space is established. The magnetic target is a cylindrical permanent magnet, and its magnetic moment direction vector is: The position vector of point P in space relative to the center of mass of the magnet is R; the formula for calculating the magnetic field strength B is: (1) in, Indicates relative permeability; Permeability of free space; Indicates magnetization intensity; Represents a position vector, defined .
3. The method for dynamic tracking and positioning of multiple magnetic targets as described in claim 2, characterized in that, Step S2 includes: A sensor array consisting of N triaxial magnetic sensors is arranged in a global coordinate system. Let the first... The coordinates of each sensor are , From the center of the magnet to the first The distance of the first sensor, assuming the first... The position of the center point of the magnet is ,but ; Equation (1) can be further transformed into the following form: (2) in, for The model; , and This represents the actual measured value of each sensor along each axis; For equation (1) ;k represents the k-th magnet, , and Indicates the direction of the magnetic moment of the k-th magnet. ; Based on the three axial components of the magnetic field strength, and in conjunction with equation (2), the following fitness function is defined: (3) in, , and The magnitude of the magnetic field actually measured by each sensor in the sensor array along the x, y, and z axes; , and To derive the magnitude of the magnetic field generated by each magnet at the x, y, and z axes of the sensor based on the magnetic dipole model; N represents the number of triaxial magnetic sensors, and the total error is equal to the sum of the errors of the three components, i.e. , , and This represents the error of each sensor in each of the three axes.
4. The method for dynamic tracking and positioning of multiple magnetic targets as described in claim 1, characterized in that, Step S3 includes: S31: Initial population generation based on magnetic field data: Through strong magnetic field point screening, greedy clustering, chaotic perturbation and magnetic moment constraints, an initial population close to the real solution is generated. S32: Dynamically adjust the population size during the iteration process: the population size sizepop_current decreases linearly from the initial value sizepop_init to the minimum value sizepop_min as the number of iterations t increases; Adaptive updates of the mutation factor F and crossover probability CR; S33: Perform differential evolution operations, including mutation, crossover, boundary constraint handling, magnetic moment normalization correction, and update the population through selection operations; S34: Output the global optimal solution gbest for this stage as the coarse localization result.
5. The multi-magnetic target dynamic tracking and positioning method as described in claim 4, characterized in that, Step S4 includes: The improved sparrow localization algorithm performs a local fine-grained search centered on the coarse localization result. Its execution process includes: S41: Generate an initial population based on the dynamic search space: Using the coarse localization result of the previous moment as the center and the preset search radius as the range, generate independent dynamic search boundaries for each target, and combine the global boundary to adaptively perturb the individual positions and magnetic moments of the population. S42: Dynamically adjust the population size during the iteration process; S43: Simulate the discoverer-joiner-watcher collaborative behavior of sparrow populations to update individual positions; S44: Perform boundary processing on the updated individual positions to ensure that the solution is within the feasible region; S45: Output the best solution for this stage as the fine-tuning result.
6. The method for dynamic tracking and positioning of multiple magnetic targets as described in claim 1, characterized in that, Step S5 includes: The inputs to the LM algorithm are the fine-grained localization results, the measured magnetic field data BL, the observation information obs_info, and the global boundary global_bound; Initialize LM parameters: including maximum number of iterations max_iter, initial damping factor tau, update factor v, error thresholds eps1 and eps2, and initial damping factor mu; Calculate the residual and Jacobian matrix J of the current solution; Construct and solve the system of linear equations; Calculate the gain ratio rho, and determine whether to accept an update and adjust the damping coefficient μ based on the rho value; The candidate solutions are constrained to ensure that they satisfy the position boundary and magnetic moment unit sphere constraints; Iterate until the convergence condition is met or the maximum number of iterations is reached, and output the best solution Best_pos and the best error Best_score at the current time.
7. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform the multi-magnetic target dynamic tracking and positioning method as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computer, perform the multi-magnetic target dynamic tracking and positioning method as described in any one of claims 1-6.