2.5 D magnetic map lightweight matching positioning method

By employing a lightweight matching and positioning method based on 2.5D magnetic maps, utilizing inertial measurement data and a Transformer encoder for altitude compensation, and combining this with an adaptive integrated particle filter algorithm, the accuracy and adaptability issues of magnetic maps in scenarios with varying altitudes are resolved, resulting in an efficient and low-cost positioning solution.

CN121932999APending Publication Date: 2026-04-28XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610207457.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-12
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing magnetic map positioning technology suffers from high cost and low efficiency in constructing 3D magnetic maps when dealing with changes in altitude, while 2D compensation methods have low accuracy and poor adaptability, thus limiting their application in real 3D motion scenarios.

Method used

A lightweight matching and positioning method based on 2.5D magnetic maps is adopted. Three-dimensional trajectory is calculated using inertial measurement data. A height compensation model is learned by combining the Transformer encoder to establish an accurate mapping from sparsely sampled 3D magnetic fingerprints to height parameters. An adaptive ensemble particle filter algorithm is used for dynamic matching and positioning.

Benefits of technology

It significantly reduces the cost of magnetic map construction and storage, expands the altitude applicability margin, achieves consistent matching across altitude ranges, improves positioning accuracy and robustness, and is suitable for autonomous navigation of UAVs, unmanned vehicles, underwater vehicles, etc. in GNSS-denied environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121932999A_ABST
    Figure CN121932999A_ABST
Patent Text Reader

Abstract

The invention discloses a 2.5 D magnetic map lightweight matching positioning method, which is used for solving the problem of matching failure of a traditional 2D magnetic map when the height of a carrier is remarkably changed. Acquiring inertial measurement data and magnetic characteristics of a to-be-positioned target based on an inertial sensor and a magnetometer; performing three-dimensional track plotting on the inertial measurement data to obtain state information including relative position estimation, step length, course and height estimation; based on a height compensation model of a Transform encoder, 3D magnetic features are compressed into consistent 2D representation by learning a non-linear relationship between magnetic fingerprints and height, so that reliable map construction is realized under a sparse sampling condition; inertial prediction and a magnetic map observation result are fused by adopting a self-adaptive integrated particle filter algorithm, and integral operation is accelerated by utilizing a BPIT table, so that the overall complexity is reduced. According to the method, the height applicable boundary of the magnetic map is improved by three times, the positioning precision is improved by 20%-50%, and positioning which is insensitive to height change, light in calculation and robust is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of magnetic map positioning technology, specifically relating to a lightweight matching and positioning method for 2.5D magnetic maps. Background Technology

[0002] In environments where Global Navigation Satellite System (GNSS) signals are limited or completely blocked, such as indoor spaces, underground facilities, underwater areas, dense jungles, or urban canyons, traditional satellite positioning methods cannot provide continuous and reliable navigation services. To maintain the autonomous operation capabilities of unmanned vehicles such as drones, unmanned vehicles, and underwater vehicles, as well as individual soldier equipment, in such environments, magnetic map-based matching positioning technology has attracted widespread attention as an important alternative or backup solution. This technology relies on a pre-constructed magnetic map, a magnetic fingerprint database that records spatial locations within a specific area and their corresponding magnetic field characteristics. Magnetic fingerprints can include various features such as total magnetic field strength, three-axis components, and magnetic inclination. Because magnetic fields have relatively stable spatial distribution characteristics within a local area and do not depend on external man-made signals, magnetic map-based positioning technology has advantages such as no cumulative error, strong concealment, and no reliance on infrastructure, making it valuable for applications in military reconnaissance, emergency rescue, indoor robot navigation, and underwater positioning.

[0003] However, the practical application of magnetic map matching positioning technology faces several key challenges, one of the most prominent being the sensitivity of magnetic field characteristics to altitude. Influenced by ubiquitous 3D magnetic distortion sources, the attenuation and change of the magnetic field in the vertical direction are not linear, leading to significant differences in magnetic fingerprints at the same horizontal coordinate at different altitudes. Traditional positioning methods are mostly based on two-dimensional (2D) planar magnetic maps, whose core assumption is that the altitude of the vehicle during positioning remains consistent with the altitude during mapping. When this condition is not met—for example, when drones fly at different altitudes, robots move between different floors, or underwater vehicles cruise at different depths—direct 2D matching will produce huge errors, even leading to complete positioning failure. Therefore, how to adapt 2D magnetic map positioning technology to changes in the altitude of the vehicle in three-dimensional space has become a core technical problem that urgently needs to be solved.

[0004] To address the challenges posed by changes in elevation, various solutions have been proposed in existing research. One approach involves constructing a fully three-dimensional (3D) magnetic map. This method aims to build a realistic 3D magnetic map that comprehensively covers both horizontal and vertical areas by densely collecting magnetic fingerprint data from a 3D spatial grid. For example, some studies have used mobile robotic arms equipped with Gaussian Process Regression (GPR) models for systematic 3D mapping, or specialized robots integrated with fiber optic sensors for 3D reconstruction. While this method theoretically solves the elevation matching problem completely, its drawbacks are significant: it requires the collection and processing of massive amounts of 3D spatial data, resulting in extremely high mapping time, hardware costs, and data storage overhead, making it unsuitable for practical engineering scenarios requiring rapid deployment, large-scale coverage, or limited resources. Another approach involves introducing elevation compensation within the framework of a 2D magnetic map. To circumvent the high cost of constructing a 3D magnetic map, most studies attempt to compensate for elevation changes using algorithmic models based on the 2D magnetic map. These methods typically employ spatial interpolation or regression models, such as GPR and Convolutional Neural Networks (CNNs), to attempt to learn a mapping function from latitude, longitude, and altitude to magnetic field features. However, these traditional or shallow models have limited ability to capture the complex nonlinear, global dependencies between altitude and magnetic field. They often fail to effectively extract and map altitude-invariant feature representations from sparse, non-uniform altitude sampling data, resulting in poor compensation performance of the generated magnetic maps when altitude variations are large, leading to decreased positioning accuracy and robustness. This constitutes the main drawback of existing 2D compensation methods.

[0005] In summary, existing technologies suffer from high costs and low efficiency in constructing 3D magnetic maps when dealing with the height dimension in magnetic map positioning, while existing 2D compensation methods suffer from low accuracy and poor adaptability. This contradiction severely restricts the widespread application of magnetic map positioning technology in real-world 3D motion scenarios. Summary of the Invention

[0006] To address the aforementioned problems in the existing technology, this invention provides a lightweight matching and positioning method for 2.5D magnetic maps.

[0007] The technical problem to be solved by this invention is achieved through the following technical solution: This invention provides a lightweight matching and positioning method for 2.5D magnetic maps, comprising: Acquire inertial measurement data and magnetic characteristics of the target to be located; Three-dimensional trajectory estimation is performed on inertial measurement data to obtain the relative position estimate, horizontal motion state data and altitude estimate of the target to be located; The relative position estimate and height estimate are input into a pre-trained target height compensation model, which outputs a local two-dimensional magnetic map that matches the height estimate. Based on horizontal motion data, magnetic characteristics, and a local two-dimensional magnetic map, the positioning result of the target to be located is determined.

[0008] This invention provides a lightweight matching and localization method for 2.5D magnetic maps. By introducing a target altitude compensation model, it explicitly learns and establishes a precise mapping from sparsely sampled 3D magnetic fingerprints to altitude parameters. This effectively compresses and projects 3D spatial magnetic features into a unified 2D magnetic map representation, forming a 2.5D local 2D magnetic map with an expanded altitude applicability range, while avoiding the extremely high cost of constructing 3D magnetic maps. Furthermore, by integrating 3D trajectory extrapolation technology, it uses inertial measurement data to infer the altitude range of the target to be located in real time and dynamically selects or generates corresponding local 2D magnetic maps for matching, thereby achieving adaptive 2.5D matching and localization.

[0009] The present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating a lightweight matching and positioning method for 2.5D magnetic maps provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the processing procedure of a lightweight matching and positioning method for 2.5D magnetic maps according to an embodiment of the present invention; Figures 3A to 3D This is a schematic diagram comparing the positioning accuracy of different height compensation models and positioning methods in the experiment provided in the embodiments of the present invention; Figure 4 This is a schematic diagram comparing the RMSE of AIPF across different models in the experiment provided in this embodiment of the invention; Figures 5A to 5C This is a schematic diagram comparing the positioning performance of different IMU levels in the experiment provided in the embodiments of the present invention; Figure 6A and Figure 6B This is a schematic diagram comparing the performance of different localization methods on a flat magnetic fingerprint distribution dataset in an experiment provided by an embodiment of the present invention; Figure 7 This is a schematic diagram illustrating the correlation between positioning accuracy and map construction granularity in an experiment provided by an embodiment of the present invention. Detailed Implementation

[0011] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0012] This invention provides a lightweight matching and positioning method for 2.5D magnetic maps. See also... Figure 1 and Figure 2 The method includes the following steps: S10. Obtain inertial measurement data and magnetic characteristics of the target to be located.

[0013] For example, inertial measurement data is acquired in real time by the inertial measurement unit (IMU) of the target to be located. The inertial measurement data includes three-axis acceleration data (including specific force, used to calculate displacement and attitude changes) and three-axis gyroscope data (including angular velocity, used to calculate carrier attitude and heading). Magnetic features are acquired in real time by the magnetometer of the target to be located. The magnetic features include a magnetic field strength sequence.

[0014] S20. Perform three-dimensional trajectory calculation on the inertial measurement data to obtain the relative position estimate, horizontal motion state data and altitude estimate of the target to be located.

[0015] For example, the relative position estimation includes latitude estimation data and longitude estimation data, and the horizontal motion state data includes step length (the amount of displacement estimated within one filtering cycle), heading (the angle between the vehicle's forward direction and the reference direction) and its uncertainty.

[0016] 3D Dead Reckoning (3DDR) is an autonomous 3D space navigation technology. Its core is based on measurement data from the vehicle's own sensors (such as IMU, odometer, barometer, etc.) to estimate the vehicle's 3D position, velocity, and attitude information in the East-North-Sky (ENU) coordinate system in real time through recursive calculations of attitude, velocity, and position. It is suitable for scenarios without satellite signals, such as indoors, underground, dense forests, and underwater.

[0017] This embodiment not only provides the horizontal displacement and heading of the target through a three-dimensional trajectory calculation process, but also calculates the change in altitude of the target relative to the starting point by double integration of the vertical acceleration and sensor error compensation, thus obtaining a real-time altitude estimate with an uncertainty range. Although this altitude estimate may have cumulative errors, its relative change trend is accurate and can reflect the current absolute altitude range of the target.

[0018] S30. Input the relative position estimate and height estimate into the target height compensation model based on the Transformer encoder, and output a local two-dimensional magnetic map that matches the height estimate.

[0019] For example, a local two-dimensional magnetic map, or 2.5D magnetic map, is essentially a set of predicted magnetic field strength values ​​for different discrete height planes.

[0020] Optionally, refer toFigure 2 The target height compensation model includes an input layer, a position encoding layer, and a Transformer encoder.

[0021] Based on this, step S30 may specifically include: S301. Input the relative position estimate and height estimate into the input layer, perform feature mapping and dimensionality increase, and output a high-dimensional feature vector.

[0022] For example, since the Transformer encoder cannot directly process numerical data such as latitude, longitude, and altitude, an input layer (using a fully connected layer) is used to estimate the relative position and altitude of the input. Mapped to a high-dimensional feature vector, it can be represented as:

[0023] in, Represents a high-dimensional feature vector. and These represent latitude and longitude estimates, respectively. This indicates a high estimate. Indicates the feature dimension.

[0024] S302. Input the relative position estimate and height estimate into the position coding layer for position coding, and output the relative position code and height code.

[0025] For example, to preserve positional relationships, a position encoding (PE) layer is applied to enhance the model's ability to perceive longitude, latitude, and altitude:

[0026]

[0027]

[0028] in, These represent longitude location code, latitude location code, and altitude code, respectively. It is a data index. It is a dimensional index. This represents a preset constant, which can take a value of 10000. Relative position encoding includes longitude position encoding and latitude position encoding.

[0029] The preset constant in the above formula This parameter controls the spatial variation scale corresponding to different encoding dimensions. Its essential function is to map spatial coordinates to a sine-cosine function space that covers a multi-scale variation range, enabling the model to simultaneously perceive local positional changes and large-scale spatial differences. This parameter affects the distribution of positional encoding in high- and low-frequency dimensions, thereby affecting the model's ability to distinguish and stabilize spatial coordinate changes.

[0030] It should be noted that the preset constant The value can be adjusted based on the latitude and longitude coverage, altitude variation, and model feature dimensions in the application scenario. For example, when the altitude variation range in the target application scenario is large, this parameter can be increased to expand the encoding scale; when focusing on local fine spatial variations, this parameter can be appropriately decreased to enhance position sensitivity. This embodiment does not limit the specific value of this parameter; as long as it can effectively distinguish position changes at different spatial scales, it falls within the protection scope of this embodiment. This embodiment injects position awareness into the model through a position encoding layer to distinguish points in different spatial locations.

[0031] S303. Input the high-dimensional feature vector, relative position encoding, and height encoding into the Transformer encoder for processing, and output a local two-dimensional magnetic map that matches the height estimation.

[0032] Optionally, the Transformer encoder includes a multi-head self-attention layer, a first residual connection layer, a feedforward network, a second residual connection layer, and an output layer.

[0033] Based on this, step S303 may specifically include: S3041. Input the high-dimensional feature vector, relative position encoding, and height encoding into the multi-head self-attention layer to extract feature correlation and output the first feature.

[0034] S3042. Input the high-dimensional feature vector, relative position encoding, height encoding and the first feature into the first residual connection layer, and output the second feature.

[0035] S3043. Input the second feature into the feedforward network for nonlinear transformation and feature extraction, and output the third feature.

[0036] S3044. Input the second and third features into the output layer through the second residual connection layer, and output a local two-dimensional magnetic map that matches the height estimate.

[0037] For example, the input features of a Transformer encoder It can be represented as:

[0038] The core mechanism of the Transformer encoder is self-attention, which models the magnetic field characteristics at different heights and spatial locations to learn the intrinsic laws governing magnetic field variations with height. Specifically, the input features... First, a linear transformation is used to map the vectors to a query vector, a key vector, and a value vector, represented as follows:

[0039] Where Q represents the query vector used for the current attention calculation, used to match the key; K represents the key vector used to calculate the similarity with the query vector; V represents the value vector used for the final weighted sum to generate the attention output; parameters This is a trainable parameter matrix.

[0040] In the magnetic map modeling scenario of this embodiment, the query vector is used to represent the magnetic field query requirement of the current spatial location, the key vector is used to describe the feature representation of the historical magnetic fingerprint at different heights and locations, and the value vector carries the corresponding magnetic field information to generate the final weighted magnetic field features.

[0041] To enhance the model's expressive power, the Transformer encoder employs a multi-head attention (MHA) mechanism:

[0042]

[0043] in, Indicates by the first Features of attention head computation , It is a linear transformation matrix used to map the concatenated multi-head attention output back to the original feature space.

[0044] The expression for a single attention head is:

[0045] in, It is the dimension of the key vector, usually set to This involves distributing the feature dimensions evenly across multiple attention heads.

[0046] Furthermore, the Transformer encoder extracts features through a feed-forward network (FFN), as follows:

[0047] in, and It is a weight matrix. and This is the bias term. This structure enhances the model's nonlinear expressive power, and is particularly suitable for situations where the magnetic field does not follow a simple linear relationship with altitude in complex environments.

[0048] In addition, both the first residual connection layer and the second residual connection layer are used to perform residual connection and layer normalization on the features.

[0049] To further enhance the model's ability to focus on height range, this embodiment introduces a height-aware attention gate structure in the output layer of the Transformer encoder:

[0050] At the end of the Transformer encoder, the final output feature vector is... The input is fed into a highly perceptive attention gate to generate highly weighted predictions of magnetic field strength. .in, The highly perceived attention weight is a scalar value between 0 and 1. It is the Sigmoid activation function, used to map attention weights to the range (0,1). Indicates the first The feature vector output from the Lth layer of the Transformer encoder corresponding to each training data point contains the input data. High-dimensional feature representation after multi-layer attention computation. It is the attention gate weight matrix, used to... Project onto the scalar value range to generate attention weights. The training process learns to determine the optimal height compensation weights. This represents the predicted value of the magnetic field strength. It is a magnetic field feature projection matrix used to adjust the Transformer output features. The distribution of the data is aligned with the feature space of the final magnetic field prediction task.

[0051] Optionally, the process of pre-training a target height compensation model includes: A1. Obtain relative position sample data, height sample data, and magnetic field strength sample data.

[0052] A2. Using sample pairs consisting of relative position sample data and height sample data as training data, and magnetic field strength sample data as labels, supervised training is performed on the pre-built height compensation model based on the Transformer encoder to obtain the target height compensation model.

[0053] For example, to address the issue of uneven data distribution at different heights in actual magnetic fingerprint acquisition, this embodiment introduces a height-correlation-weighted loss mechanism to improve the model's predictive ability within sparse height ranges. The height weight function is defined as:

[0054] in, This represents a preset sparse region. The weight settings described above are used to enhance the model's learning of the magnetic field characteristics of sparse height regions during the training phase. These weights do not necessarily have to be discrete values; in practical applications, a continuously varying weight function can be constructed based on the height sampling density. For example, sparse regions can be automatically determined based on height histograms or kernel density estimation methods, thereby achieving adaptive adjustment of the weights. This embodiment does not limit the specific form of the weights.

[0055] The model is trained by minimizing the magnetic field feature reconstruction loss. Optionally, the target loss function used in the pre-trained target height compensation model is expressed as:

[0056] in, Describes the target loss function. This represents the total number of training data. Indicates high weight. Indicates the first One height sample data, This represents sample data of magnetic field strength. This represents the predicted value of the magnetic field strength. Indicates hyperparameters, Denotes KL divergence, express The probability distribution, Indicates the first The feature vector output from the Lth layer of the Transformer encoder corresponding to each training data point. Indicates a normal distribution. Represents the identity matrix.

[0057] For example, This is used to control the effect of the KL divergence regularization term. The formula for KL divergence is as follows:

[0058] in, It is the true distribution of the data. This is the target distribution. This regularization term is used to constrain the continuity of the distribution of model output features in the latent space, promoting a smooth transition between magnetic field features at different heights, thereby improving height interpolation and extrapolation capabilities.

[0059] S40. Based on the horizontal motion state data, magnetic characteristics, and local two-dimensional magnetic map, determine the positioning result of the target to be located.

[0060] Optionally, step S40 may specifically include: An adaptive ensemble particle filter algorithm is used to process horizontal motion state data, magnetic features, and local two-dimensional magnetic maps to obtain the localization result of the target to be located.

[0061] Furthermore, specific steps may include: S401. Based on the horizontal motion state data, the fan-shaped particle distribution area is predicted and divided into multiple particle distribution sub-regions.

[0062] S402. Based on multiple particle distribution sub-regions and a pre-computed Bayesian probability integral table, determine the integrated particles corresponding to each particle distribution sub-region.

[0063] For example, the Bayesian Probability Integral Table (BPIT) is obtained by pre-computing the cumulative probability function and expectation auxiliary function of the standard normal distribution. The Bayesian Probability Integral Table is a lookup table of probabilities and expectations for a standard normal distribution.

[0064] S403. Based on magnetic features and local two-dimensional magnetic maps, update the weights of the integrated particles corresponding to each particle distribution sub-region to obtain the target weights of each integrated particle.

[0065] S404. Based on the target weight of each integrated particle, perform weighted calculation on multiple integrated particles to determine the positioning result of the target to be located.

[0066] For example, the particle state transition follows an inertial navigation motion model:

[0067] Among them, step size and heading Follows Gaussian distribution and This is to ensure the diversity of particle distribution.

[0068] In the discrete fingerprint region of the magnetic field map, the particle weight update is equivalent to the integral particle. The coordinates of the integrated particle are:

[0069] in, Indicates the location The joint posterior probability density function at the location. This function consists of two parts: first, the prior probability distribution of the predicted location calculated from inertial measurement data using a motion model; and second, the likelihood probability of matching the fingerprint in the magnetic map at that location under the current magnetometer observation conditions. Therefore, In essence, it quantifies the confidence that the target to be located is at that point after integrating inertial prediction and magnetic observation information.

[0070] The above formula calculates the "probability centroid" of the specified region, i.e., the coordinates of the equivalent integrated particle, by performing a weighted positional integration of the probability density over the specified region.

[0071] The weights of the integrated particles are:

[0072] The total probabilistic mass of the region was calculated, which is the weight of the integrated particles. This mathematical formulation transforms the operation on a large number of discrete particles in traditional methods into an integral problem over a continuous probability distribution, laying a theoretical foundation for subsequent efficient calculations using analytical or table lookup methods.

[0073] The region predicted based on horizontal motion state data is defined as a fan-shaped particle distribution region within the two-dimensional positioning framework, the geometric extent of which is determined by both step size uncertainty and heading uncertainty. To improve matching accuracy, this region is further subdivided into smaller intervals, i.e., divided into multiple particle distribution sub-regions.

[0074] In complex operating conditions where prediction errors exhibit a multi-peak distribution due to motion mode switching, sudden disturbances, etc., the Gaussian Mixture Model (GMM) can be further used to extend the above-mentioned unimodal Gaussian uncertainty assumption, so as to more finely characterize the uncertainty structure of step size and heading prediction, thereby improving the modeling accuracy and robustness of integrated particles under non-stationary motion conditions.

[0075] Assuming that all noises can be composed of Gaussian white noise, and utilizing the Gaussian distribution... Principle: Values ​​fall within the interval The probability within the range is 0.9974. Therefore, the distribution area of ​​the sector-shaped particles is determined by the following formula:

[0076] The root mean square error of historical filtering results is superimposed to dynamically adjust... and To prevent excessive particle convergence:

[0077] in, and These are the step size uncertainty parameter and the heading uncertainty parameter used for prediction at the current moment, respectively. They directly determine the dispersion range of particles in the distance and angular directions. and It represents the fundamental uncertainty of step size and heading, reflecting the inherent noise level of the inertial measurement unit under steady motion conditions, and is usually obtained from sensor performance indicators. and It is the root mean square value of the step size and heading estimation error in the historical filtering results, serving as a quantitative feedback of historical performance; when the historical error increases, it will automatically increase the prediction uncertainty, thereby enhancing robustness in complex motion or disturbance environments. and This is the minimum threshold for the uncertainty of step size and heading, serving as a safety lower limit to ensure that the predicted fan-shaped particle distribution area does not shrink indefinitely. Its value is usually set based on the noise characteristics of the inertial sensor and the system sampling period, generally 1 to 2 times the corresponding theoretical error lower limit, to ensure that the maximum possible motion of the carrier within a single sampling period can still be covered by the search area. The core of this adaptive mechanism is to make the prediction uncertainty adaptively adjusted according to the historical estimation error, thereby effectively preventing premature convergence of the particle set or tracking loss while ensuring convergence accuracy.

[0078] In the prediction phase, this embodiment assumes that the step size and heading errors introduced by the inertial measurement unit can be approximated as a unimodal, symmetrical Gaussian distribution over a short time scale. This assumption conforms to the classical statistical model of inertial navigation errors under continuous motion conditions. Based on this, utilizing the analytical integral form of the Gaussian distribution, the calculation process of particle weights and state expectations within the particle distribution sub-region is transformed from traditional numerical integration or large-scale particle sampling into querying the standard normal distribution function of a pre-constructed Bayesian Probability Integral Table (BPIT). This significantly reduces the online computational complexity and ensures the consistency and stability of the calculation results.

[0079] In complex operating conditions such as motion mode switching, sudden disturbances, or multimodal uncertainties, step size or heading errors may exhibit multimodal distribution characteristics. In such cases, a Gaussian mixture model can be used to more finely characterize the prediction uncertainty.

[0080]

[0081] The above formula defines the weights of the integrated particles. ,in, and These are the horizontal motion state data (including predicted step size and heading) provided for three-dimensional trajectory estimation. and Its corresponding uncertainty (standard deviation). , and , This defines the integral boundaries of the currently computed particle distribution sub-region in the radial (step size) and angular (heading) dimensions. It is the cumulative distribution function of the standard normal distribution. This weight... The physical meaning is: the true state of the target to be located falls within the area defined by... and The total probability within the enclosed two-dimensional subinterval.

[0082]

[0083]

[0084] The above equations define the equivalent step size of the integrated particle. With equivalent heading In the formula, It is the expectation function associated with the standard normal distribution, where It is the standard normal probability density function. and Specifically: within the sub-region of particle distribution, for all possible particle states, it obeys the following... , Center , The expected value of the state, i.e. the position of the "center of mass" of the integrated particle, is obtained by taking a probability-weighted average of the Gaussian distribution with standard deviation.

[0085] In the above calculation process, and The value can be quickly obtained by querying the pre-computed Bayesian Probability Integral Table (BPIT). This mechanism transforms complex online numerical integration into efficient table lookup and linear operations, which is the core mathematical foundation for achieving lightweight real-time positioning in this embodiment. In complex working conditions where motion mode switching, sudden disturbances, etc., lead to a multi-peaked error distribution, a Gaussian mixture model can be used to extend the above-mentioned unimodal Gaussian assumption to more finely characterize the prediction uncertainty.

[0086] Based on the magnetic characteristic z, the likelihood function is calculated using a multivariate normal distribution:

[0087] in, Magnetic characteristics For relative position estimation, Relative position estimation in a local two-dimensional magnetic map Predicted magnetic field strength at the location, Let covariance matrix be the variance matrix. This represents the prior weights in the prediction phase.

[0088] The weights of each integrated particle are updated as follows:

[0089] Each time a new set of inertial measurement data and magnetic characteristics is received, a complete filtering iteration is initiated. A fixed process of prediction, integration, correction, and estimation is executed sequentially, outputting the integrated particle state at the current moment. After processing, the system waits for data from the next time step, triggering and executing the above process again. The final positioning result is calculated as a weighted average of all integrated particle states. The positioning result includes the longitude, latitude, altitude, and corresponding magnetic field strength of the target to be located.

[0090] The following experiment further illustrates the lightweight matching and positioning method for 2.5D magnetic maps provided by this invention.

[0091] The experiment employs a comprehensive set of quantitative evaluation metrics, primarily including Normalized Root Mean Square Error (NRMSE) and Normalized Average Error (NAE), to eliminate the impact of map granularity differences and thus objectively assess the effectiveness of the algorithm itself. The experiment rigorously evaluates the performance of the invention by comparing it with current mainstream height compensation models and positioning algorithms in multi-mode, multi-domain scenarios.

[0092] The experimental setup covered comprehensive verification from simulation to real-world scenarios. The evaluation metric focused on localization accuracy, selecting three height compensation models as benchmarks: GPR, CNN, and the core of this invention (Transformer Encoder, TE). Simultaneously, four localization algorithms were selected for combined testing: standard particle filter (PF), adaptive optimization of firefly algorithm (AOFA), extended Kalman particle filter (EKPF), and the adaptive ensemble particle filter algorithm AIPF of this invention.

[0093] The experimental data sources include: 1) Real UAV aerial survey datasets: collected using a magnetic survey system at altitudes ranging from 140 to 210 meters, encompassing diverse motion patterns; 2) International Geomagnetic Reference Field (IGRF) benchmark datasets: used to analyze the theoretical relationship between positioning accuracy and map granularity; 3) Additional measured datasets: such as deep-sea datasets with flat magnetic features, used to verify generalization ability. Through systematic experiments, the following key conclusions were obtained, fully demonstrating the feasibility and superiority of this invention: 1) Significantly superior positioning accuracy compared to existing height compensation models: Under the same test conditions for a 160-170 meter altitude plane, the combination of different height compensation models and positioning algorithms was compared using a tactical-grade IMU. Experimental results are as follows: Figure 3A (This shows the positioning accuracy of the GPR model.) Figure 3B (This demonstrates the localization performance of the CNN model.) Figure 3C (This demonstrates the positioning performance of the Transformer encoder) and Figure 3D (The comparison of positioning accuracy between different height compensation models and positioning methods is shown.) As illustrated, the TE-AIPF combination of this invention achieves the best positioning accuracy among all combinations, with an average NRMSE of 8.225 and an average NAE of 6.418, both lower than GPR-AIPF's 10.754 and 8.436, and CNN-AIPF's 8.877 and 6.216. This directly proves that the Transformer encoder used in this invention significantly outperforms traditional GPR and CNN models in learning and compensating for nonlinear distortions in magnetic fingerprints caused by height.

[0094] 2) Effective cross-altitude positioning compensation with high adaptability: To evaluate the effectiveness of the constructed 2.5D magnetic map database, experiments were conducted to test the positioning performance of test trajectories with the same altitude variation within a range of 165±10 meters on different altitude planes from 155 to 185 meters. The TE-AIPF of this invention maintained the lowest and most stable positioning error within this core altitude range. Even when the test altitude slightly exceeded the core range, the error increase was the most gradual. This verifies that the TE model successfully compresses magnetic features at different altitudes into a highly consistent two-dimensional representation, and the constructed 2.5D map can support stable positioning within a vertical range of approximately 40 meters.

[0095] 3) Demonstrates good algorithm robustness and generalization ability: Experiments verify the system's robustness from multiple perspectives. First, under different levels of IMU noise (from high precision to industrial grade), Figure 5A (As shown in the error model parameters for different IMU levels), the TE-AIPF of this invention consistently maintains the best positioning accuracy among all comparison algorithms, such as...Figure 5B (This shows a comparison of positioning performance data at different IMU levels) and Figure 5C (The positioning performance based on different IMU levels is shown.) Secondly, tested on another deep-sea dataset with a flat magnetic field distribution, AIPF also achieved the lowest error, with an NRMSE of 5.301, as shown... Figure 6A (This shows a performance comparison of different localization methods on a flat magnetic fingerprint distribution dataset) and Figure 6B (The localization performance on a flat magnetic fingerprint distribution dataset is shown.) These results demonstrate that the proposed architecture exhibits good adaptability and generalization ability to sensor errors and different spatial distributions of magnetic fields.

[0096] 4) Revealed a clear linear relationship between positioning accuracy and map granularity: experiments based on the IGRF dataset (corresponding to...) Figure 7 The correlation between positioning accuracy and map building granularity was shown, and the sensitivity of positioning accuracy to map building granularity was quantitatively analyzed. The results show that, across multiple orders of magnitude granularity ranging from 0.01 to 1, NRMSE exhibits a strictly linear relationship with granularity, with a slope ≈ 1.004. This finding provides a crucial theoretical basis and design principle for guiding map acquisition and building resolution based on the required positioning accuracy in practical applications of this invention.

[0097] Comprehensive experimental results demonstrate that this invention utilizes the Transformer model to construct an effective 2.5D magnetic map at low cost. Based on 3D trajectory extrapolation and the AIPF algorithm, it achieves a positioning accuracy 20%–50% higher than existing comparative methods within a 70-meter vertical span without requiring prior precise altitude information, while also exhibiting excellent robustness. These results fully validate the feasibility and advancement of the technical solution of this invention from multiple perspectives, as well as its practical value in solving reliable positioning problems across altitudes in GNSS-denied environments.

[0098] This embodiment of a lightweight matching and positioning method for 2.5D magnetic maps offers the following advantages over existing technologies that face high costs and low accuracy when dealing with height-sensitive positioning on magnetic maps: 1) Significantly reduced magnetic map construction and storage costs, enabling lightweight 2.5D magnetic map modeling: In traditional 3D magnetic map solutions, to cover vertical height variations, dense field data collection is typically required across multiple height layers, with the data volume increasing approximately linearly with the height coverage. For example, with a height variation range of approximately 100 m and a vertical sampling resolution of 0.5 m, approximately 200 layers of data are needed for the height dimension alone, and the overall mapping data scale is usually hundreds to thousands of times larger than that of a 2D magnetic map. This embodiment introduces height as a continuous conditional variable into 2D magnetic map modeling, requiring only the collection of coarse-grained magnetic fingerprint data at a few representative height locations to learn the dominant law of magnetic field variation with height. Based on a typical application scenario with a height variation range of 100 m, this embodiment only requires the collection of magnetic data from approximately 3–5 height layers to complete the modeling, with the mapping data volume on the order of 0.01% to 0.05% of that of a 3D magnetic map of equal precision. As a result, while ensuring positioning performance, the workload of field surveying and mapping, data storage overhead and offline modeling costs have been significantly reduced, making the engineering deployment of large-scale, highly sensitive magnetic maps a reality.

[0099] 2) Significantly expands the height applicability margin of magnetic maps, achieving consistent matching capabilities across height ranges: Addressing the insufficient accuracy of existing 2D height compensation models, the Transformer encoder employed in this embodiment demonstrates a significant advantage in capturing the deep nonlinear dependency between height and magnetic field thanks to its powerful global attention mechanism. Experimental data confirms that this embodiment achieves the lowest positioning error under the same test conditions, with an average NRMSE of 8.225. Within a vertical span of up to 70 meters, the average positioning accuracy of this embodiment can reach 3 to 8 times that of the map granularity, improving positioning accuracy by 20% to 50% compared to other height compensation methods. This fully demonstrates that this embodiment can effectively compensate for magnetic fingerprint distortion caused by height changes, achieving stable and high-precision matching positioning without height sensitivity, providing effective support for scenarios with significant vertical movement, such as drones, display building environments, and underground spaces.

[0100] 3) While maintaining high adaptability, significantly faster online matching and positioning speed is achieved: The adaptive ensemble particle filtering method used in this embodiment performs interval-based equivalent processing on continuous particle distribution within the prediction area, and combines it with the lookup calculation method of Bayesian probability integral table, transforming the core matching calculation from high-complexity numerical integration to constant-time complexity lookup and linear combination operations. Compared with existing height compensation methods that require repeated switching or parallel matching between multiple height maps, the online matching speed of this invention is improved by more than an order of magnitude, while avoiding the additional computational burden brought by the height dimension, enabling stable operation in navigation tasks with high real-time requirements.

[0101] 4) More stable and predictable positioning accuracy under large height span conditions: Experimental results show that under test conditions with a vertical span of 70 m, the average positioning error of this embodiment can be stably maintained within the range of 3 to 8 times the spatial resolution of the magnetic map, and the error shows a good linear relationship with the change of map granularity, without the height-related accuracy degradation phenomenon commonly seen in traditional methods. Compared with other height compensation methods, this embodiment improves the positioning accuracy by about 20% to 50% under the same test conditions, effectively achieving high-precision, controllable error matching positioning in scenarios with varying heights.

[0102] 5) Excellent real-time performance and engineering adaptability even on platforms with limited hardware and software resources: The lightweight nature of this embodiment is reflected not only in the scale of model parameters and storage requirements, but also in key engineering indicators such as online computational complexity, memory access patterns, and real-time response capabilities. By using a region integration strategy to aggregate a large number of particles into a small number of equivalent particles, combined with fast table lookup calculations based on BPIT, the core computation is transformed from complex numerical integration into efficient lookup and linear combination. This makes the online positioning loop computationally lightweight and fast-responding, enabling stable operation on embedded platforms with limited computing power and memory resources, such as UAV flight control computers, meeting real-time navigation and positioning requirements, and providing a feasible path for the deployment of this technology in practical systems.

[0103] 6) Excellent environmental robustness and algorithm generalization ability: This embodiment demonstrates strong stability in the face of sensor noise and different magnetic field environments. Experimental verification shows that under the influence of IMU noise of different levels, from high precision to industrial grade, this embodiment can maintain optimal or near-optimal positioning accuracy. Meanwhile, test results on another dataset with flat magnetic characteristics show that its average positioning error NRMSE is 5.301, also the lowest, proving that this embodiment has good adaptability and generalization ability to different sensor error characteristics and diverse magnetic field spatial distributions, reducing the dependence on parameter tuning for specific scenarios and facilitating the widespread application of the technology.

[0104] Furthermore, the invention possesses high adaptability, environmental universality, and lightweight system characteristics, making it promising for applications in numerous fields where GNSS denial or failure occurs. Navigation and Positioning for Underwater Vehicles: Providing covert and reliable passive positioning for Autonomous Underwater Vehicles (AUVs) or Remotely Operated Vehicles (ROVs) in underwater environments without GPS signals. Utilizing the differences in magnetic fields at different water depths to construct a 2.5D geomagnetic / hydromagnetic map, combined with depth sensors and inertial navigation, enables precise positioning and track tracking across depths.

[0105] Indoor Multi-Level Space Personnel and Service Robot Localization: In multi-story buildings such as large shopping malls, hospitals, airports, and warehousing and logistics centers, a 2.5D magnetic map covering different floors is constructed using the complex magnetic field characteristics inherent in the building. Integrated into smartphones, smartwatches, or the robot itself, it achieves seamless meter- to sub-meter-level positioning and navigation across floors, independent of WiFi / Bluetooth.

[0106] Navigation for Underground Space and Tunnel Engineering: Providing continuous positioning for inspection robots, engineering equipment, or personnel in linear enclosed spaces such as subway tunnels, mine roadways, and underground utility tunnels. Utilizing the longitudinal magnetic field variations of tunnels to construct a 2.5D map, combined with odometers and IMUs, overcomes the challenge of completely missing satellite signals.

[0107] Unmanned Aerial Vehicle (UAV) Flight and Swarm Collaboration in Complex Environments: This invention supports autonomous flight of UAVs in environments with unstable or obstructed GNSS signals, such as forests, canyons, and urban buildings. It achieves highly sensitive and stable positioning, which can be used for precise flight path tracking, hovering, and collaborative formation and obstacle avoidance of UAV swarms in complex three-dimensional spaces.

[0108] High-precision backup navigation and autonomous driving: Serving as a redundant positioning module for Advanced Driver Assistance Systems (ADAS) and autonomous driving systems. When traversing areas where onboard GNSS may fail, such as under overpasses, long tunnels, or underground parking lots, it utilizes pre-stored 2.5D magnetic maps along the road and the vehicle's onboard sensors to provide continuous and reliable position feedback, ensuring driving safety and the continuity of autonomous driving functions.

[0109] Emergency Rescue and Individual Situational Awareness: Providing firefighters, rescue team members, and special operations soldiers with autonomous positioning and tracking capabilities in complex and communication-constrained environments such as inside buildings, underground, and jungles. Enabling navigation and teammate location sharing via portable devices without relying on external infrastructure, improving mission efficiency and personnel safety.

[0110] These detailed design changes and extended applications demonstrate that the core ideas and technical framework of this invention possess high flexibility and industrial value. Through the reasonable substitution and combination of different technical components, and deep penetration into different vertical industries, this invention can provide an efficient, economical, and reliable systematic solution for solving the challenges of autonomous positioning and navigation in various harsh environments, possessing significant market prospects and social benefits.

[0111] It should be noted that the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention.

[0112] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.

[0113] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings and the disclosure in carrying out the claimed invention. In the description of the invention, the word "comprising" does not exclude other components or steps, "a" or "an" does not exclude a plurality, and "a plurality" means two or more, unless otherwise explicitly specified. Furthermore, while different embodiments may describe certain measures, this does not mean that these measures cannot be combined to produce good results.

[0114] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A lightweight matching and positioning method for 2.5D magnetic maps, characterized in that, include: Acquire inertial measurement data and magnetic characteristics of the target to be located; The inertial measurement data includes triaxial accelerometer data and triaxial gyroscope data; The inertial measurement data is used to perform three-dimensional trajectory calculation to obtain the relative position estimate, horizontal motion state data, and altitude estimate of the target to be located; the horizontal motion state data includes step length and heading. The relative position estimate and the height estimate are input into the target height compensation model based on the Transformer encoder, and the output is a local two-dimensional magnetic map that matches the height estimate; Based on the horizontal motion state data, the magnetic features, and the local two-dimensional magnetic map, the positioning result of the target to be located is determined.

2. The lightweight matching and positioning method for 2.5D magnetic maps according to claim 1, characterized in that, The target height compensation model includes an input layer, a position encoding layer, and a Transformer encoder. The step of inputting the relative position estimate and the height estimate into a pre-trained target height compensation model and outputting a local two-dimensional magnetic map matching the height estimate includes: The relative position estimate and the height estimate are input into the input layer for feature mapping and dimensionality upscaling, and a high-dimensional feature vector is output. The relative position estimate and the height estimate are input into the position encoding layer for position encoding, and the relative position code and height code are output. The high-dimensional feature vector, the relative position encoding, and the height encoding are input into the Transformer encoder for processing, and a local two-dimensional magnetic map matching the height estimate is output.

3. The lightweight matching and positioning method for 2.5D magnetic maps according to claim 2, characterized in that, The Transformer encoder includes a multi-head self-attention layer, a first residual connection layer, a feedforward network, a second residual connection layer, and an output layer; The step of inputting the high-dimensional feature vector, the relative position encoding, and the height encoding into the Transformer encoder for processing, and outputting a local two-dimensional magnetic map that matches the height estimate, includes: The high-dimensional feature vector, the relative position encoding, and the height encoding are input into the multi-head self-attention layer for feature correlation extraction, and the first feature is output. The high-dimensional feature vector, the relative position encoding, the height encoding, and the first feature are input into the first residual connection layer, and the second feature is output. The second feature is input into the feedforward network for nonlinear transformation and feature extraction, and the third feature is output. The second feature and the third feature are input into the output layer through the second residual connection layer to output a local two-dimensional magnetic map that matches the height estimate.

4. The lightweight matching and positioning method for 2.5D magnetic maps according to claim 1, characterized in that, The process of pre-training the target height compensation model includes: Acquire relative position sample data, height sample data, and magnetic field strength sample data; Using the sample pairs consisting of the relative position sample data and the height sample data as training data, and the magnetic field strength sample data as labels, a pre-built height compensation model based on a Transformer encoder is trained in a supervised manner to obtain the target height compensation model.

5. The lightweight matching and positioning method for 2.5D magnetic maps according to claim 3, characterized in that, The target loss function used in the pre-training of the target height compensation model is expressed as: in, Describes the target loss function. This represents the total number of training data. Indicates high weight. Indicates the first One height sample data, This represents sample data of magnetic field strength. This represents the predicted value of the magnetic field strength. Indicates hyperparameters, Denotes KL divergence, express The probability distribution, Indicates the first The feature vector output from the Lth layer of the Transformer encoder corresponding to each training data point. Indicates a normal distribution. Represents the identity matrix.

6. The lightweight matching and positioning method for 2.5D magnetic maps according to claim 1, characterized in that, The step of determining the positioning result of the target to be located based on the horizontal motion state data, the magnetic features, and the local two-dimensional magnetic map includes: An adaptive ensemble particle filter algorithm is used to process the horizontal motion state data, the magnetic features, and the local two-dimensional magnetic map to obtain the positioning result of the target to be located.

7. A lightweight matching and positioning method for 2.5D magnetic maps according to claim 6, characterized in that, The adaptive ensemble particle filter algorithm is used to process the horizontal motion state data, the magnetic features, and the local two-dimensional magnetic map to obtain the positioning result of the target to be located, including: Based on the horizontal motion state data, a fan-shaped particle distribution region is predicted, and the fan-shaped particle distribution region is divided into multiple particle distribution sub-regions; Based on the multiple particle distribution sub-regions and the pre-calculated Bayesian probability integral table, the integrated particles corresponding to each particle distribution sub-region are determined; the Bayesian probability integral table is obtained by pre-calculating the cumulative probability function and the expectation auxiliary function of the standard normal distribution. Based on the magnetic features and the local two-dimensional magnetic map, the weights of the integrated particles corresponding to each particle distribution sub-region are updated to obtain the target weights of each integrated particle. The positioning result of the target to be located is determined by weighting multiple integrated particles based on the target weights of each integrated particle.