UWB-IMU fusion indoor positioning method based on space-time diagram and adaptive Kalman filtering
By using a fusion positioning architecture of spatiotemporal graph attention network and adaptive Kalman filter, the accuracy and robustness issues of UWB indoor positioning in non-line-of-sight environments are solved, achieving centimeter-level real-time 3D positioning, adapting to complex dynamic scenes and ensuring real-time performance.
Patent Information
- Application Number
- CN202511435939.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2026-02-10
AI Technical Summary
Existing UWB indoor positioning technologies have poor positioning accuracy and robustness in non-line-of-sight propagation environments. Traditional methods rely on noise model assumptions and cannot adapt to complex dynamic NLOS scenarios. Deep learning methods fail to effectively model spatiotemporal relationships, resulting in a decline in positioning performance.
A spatiotemporal graph attention network (STGAT) is used to model the dynamic graph structure between the UAV and the anchor point. Combined with an adaptive error state Kalman filter (AESKF), dynamic updates are performed by quantizing bias and uncertainty. An asynchronous batch processing inference mechanism is designed to solve the real-time problem.
It achieves centimeter-level real-time 3D indoor positioning in complex dynamic NLOS environments, significantly improving positioning accuracy and robustness, and solving the real-time bottleneck of traditional methods on resource-constrained platforms.
Smart Images

Figure CN121498682A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of indoor positioning technology, and more specifically, to a UWB-IMU fusion indoor positioning method based on spatiotemporal maps and adaptive Kalman filtering. Background Technology
[0002] Indoor 3D positioning technology is a core technology for industrial IoT tracking and robot autonomous navigation, widely used in numerous fields such as fire rescue, smart factories, automated warehousing, and augmented reality (AR). It demands centimeter-level real-time positioning accuracy in complex indoor environments filled with dynamic obstacles of varying materials. Among various indoor positioning technologies (such as Bluetooth, Wi-Fi, vision, and LiDAR), Wi-Fi and Bluetooth positioning accuracy are only at the meter level. Vision methods and LiDAR are extremely sensitive to occlusion and lighting conditions, are costly, and difficult to adapt to dynamic or complex scenarios. UWB (Ultra-Wide Band) has advantages such as strong penetration, resistance to multipath interference, and low cost, achieving centimeter-level positioning accuracy and becoming a highly promising indoor positioning technology. However, in complex scenarios such as fire rescue and workshops with mobile shelving, static or dynamic occlusion causes NLOS (Non-ine-of-sight) propagation, leading to UWB signal delay and ranging deviation, resulting in positioning drift and even data interruption, posing a serious challenge to positioning performance.
[0003] Existing UWB-based localization technologies primarily focus on the identification and suppression of Non-Non ...
[0004] Currently, relying solely on UWB is insufficient to completely resolve positioning errors caused by NLOS (Normally Inertial Measurement Unit). Therefore, integrating a high-frequency IMU (Inertial Measurement Unit) has become the mainstream solution. The IMU can provide high-frequency, continuous, and occlusion-independent acceleration and angular velocity data, compensating for pose drift caused by temporary data loss due to occlusion in UWB. Existing UWB-IMU fusion methods mainly fall into three categories: optimization methods based on traditional statistical filtering, data-driven deep learning methods, and hybrid architectures that integrate traditional filtering and deep learning.
[0005] 1) Optimization methods based on traditional statistical filtering, including Kalman filtering (KF), particle filtering (PF), and factor graph optimization (FGO), are used to perform anomaly detection and joint calibration based on the consistency between UWB measurements and IMU state predictions, thus mitigating the NLOS effect. For example, the literature... (D. Feng, C. Wang, C. He, Y. Zhuang and X. -G. Xia, "Kalman-Filter-Based Integration of IMU and UWB for High-Accuracy Indoor Positioning and Navigation," in IEEE Internet of Things Journal, vol. 7, no. 4, pp. 3133- 3146, April 2020. The extended Kalman filter (EKF) and the unscented Kalman filter (UKF) are used to suppress UWB observation errors by using the high-frequency motion prior knowledge provided by the IMU. However, the Kalman filter has limited nonlinear modeling capabilities, and its positioning performance is highly dependent on fixed preset noise model assumptions. It cannot adapt to time-varying and non-Gaussian measurement errors in complex dynamic NLOS scenarios.
[0006] 2) Data-driven deep learning methods utilize models such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and multilayer perceptrons (MLPs) to predict biases or coordinate values under NLOS classification, thereby uncovering the inherent features and correlations of signals. For example, literature (… L. Nosrati, S. H. Semnani, M. S. Fazel, S. Rakhshani and M. Ghavami, "Improving Indoor Localization Using Mobile UWB Sensor and Deep Reinforcement Learning," in IEEE Sensors Journal, vol. 24, no. 20, pp. 32546-32553, Oct.2024 This study employs a proximal policy optimization algorithm based on Deep Reinforcement Learning (DRL) to autonomously find the optimal anchor point location, thereby improving positioning accuracy. However, most models only function as "black box" feature extractors or bias regressors, failing to fully utilize the spatiotemporal structured information of spatial geometry and temporal motion states. Furthermore, they emphasize the direct weighting of UWB and IMU positioning results, failing to fully explore the potential complementary information enhancement between the two in the temporal sequence.
[0007] 3) Hybrid architectures integrating traditional filtering and deep learning: These methods first utilize deep neural networks to extract spatiotemporal features of UWB-IMU, or identify NLOS patterns and regress non-Gaussian biases. Then, the model output is used as observation information for factor maps or filters for online updates and corrections. For example, the literature (… P. Zhou, H. Wang, R. Gravina and F. Sun, "WIO-EKF: Extended Kalman Filtering-Based Wi-Fi and Inertial Odometry Fusion Method for Indoor Localization," inIEEE Internet of Things Journal, vol. 11, no. 13, pp. 23592-23603, July 2024A hybrid architecture (WIO-EKF) is constructed, using a convolutional denoising autoencoder and dual-branch deep inertial odometry (DbDIO) to process Wi-Fi fingerprints and IMU data respectively. Through dynamic fusion via EKF, its positioning accuracy surpasses that of single-sensor positioning. However, most models lack the ability to quantitatively evaluate prediction quality, leading to rigid fusion between filters and deep models. Blindly trusting the error quality of predictions results in even worse positioning outcomes, and the real-time performance of the hybrid architecture is limited on Internet of Things (IoT) platforms.
[0008] In summary, accurate indoor positioning is a key technology for the Industrial Internet of Things (IIoT) and autonomous robots, and positioning technology integrating ultra-wideband and inertial measurement units (IMU) shows great potential. However, non-line-of-sight (NOS) propagation leads to a significant decrease in positioning accuracy and robustness, making it difficult to adapt to complex dynamic environments with varying material occlusion. Furthermore, traditional optimized positioning methods heavily rely on pre-defined noise model assumptions and cannot accurately quantify dynamic non-line-of-sight time-varying biases. Deep learning-based methods fail to effectively model the complex spatiotemporal relationship between the UAV and the anchor point, lack the ability to quantitatively evaluate prediction quality, and face real-time bottlenecks on resource-constrained IoT platforms. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a UWB-IMU fusion indoor positioning method based on spatiotemporal maps and adaptive Kalman filtering. This method includes the following steps: A trained spatiotemporal graph attention model is obtained, which models the localization problem as a dynamic graph structure between the UAV and the anchor point. The model takes synchronized UWB measurement sequences and IMU measurement sequences as input, captures the temporal and spatial features of graph nodes through a graph attention mechanism, and outputs the quality assessment results of UWB measurements, which include the non-line-of-sight bias and uncertainty of UWB measurements. The spatiotemporal graph attention model is embedded into the update process of the error state Kalman filter (ESKF) to perform dynamic and adaptive updates based on the quality assessment results, thereby obtaining the localization results.
[0010] Compared with existing technologies, the advantages of this invention lie in proposing a fusion localization architecture (Spatiotemporal Graph-based Adaptive Kalman Filter, STG-AKF) based on a Spatiotemporal Graph Attention Network (STGAT) and an Adaptive Error State Kalman Filter (AESKF). In this architecture, firstly, the localization problem is modeled as a dynamic graph structure of "UAV-anchor point" based on STGAT, outputting quantized bias and uncertainty estimates. Then, a trained expert network is embedded into the update stage of the AESKF, and the update weights of the AESKF are adaptively adjusted based on the quality evaluation results of the STGAT network for elastic fusion. Furthermore, an asynchronous batch processing inference mechanism is designed to address the real-time issues arising from deep model inference. This invention solves the problem of poor localization accuracy and robustness in complex dynamic NLOS environments, achieving real-time, accurate, and centimeter-level three-dimensional indoor localization.
[0011] Other features and advantages of the invention will become clear from the following detailed description of exemplary embodiments of the invention with reference to the accompanying drawings. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the invention and, together with their description, serve to explain the principles of the invention.
[0013] FIG. 1 This is a block diagram of the localization process of a fusion localization architecture based on a spatiotemporal graph attention network and an adaptive error state Kalman filter according to an embodiment of the present invention. FIG. 2 This is a flowchart of a UWB-IMU fusion indoor positioning method based on spatiotemporal graph and adaptive Kalman filtering according to an embodiment of the present invention; FIG. 3 This is a schematic diagram of a spatiotemporal graph attention network modeling structure according to an embodiment of the present invention; FIG. 4 This is a schematic diagram of a spatiotemporal graph attention network architecture according to an embodiment of the present invention; FIG. 5 This is a schematic diagram of trajectory comparison in an NLOS scenario under a cross-scenario cross-validation method according to an embodiment of the present invention; FIG. 6 This is a schematic diagram of trajectory comparison in an NLOS scenario under a cross-trajectory cross-validation method according to an embodiment of the present invention. Detailed Implementation
[0014] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the invention.
[0015] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0016] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0017] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0018] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0019] This invention aims to address the degradation of accuracy and stability in 3D indoor positioning under dynamic and complex NLOS environments, as well as the real-time performance issues of positioning algorithms on resource-constrained IoT platforms. To this end, a two-stage fusion framework based on a spatiotemporal graph attention network and an adaptive error state Kalman filter is designed. This framework, for the first time, couples the uncertainty estimation of STGAT into AESKF and combines it with an asynchronous batch processing inference mechanism to achieve stable centimeter-level real-time 3D indoor positioning.
[0020] In summary, this invention utilizes publicly available UAV flight data under different NLOS scenarios and trajectories. It designs a hybrid framework, STG-AKF, by fusing a spatiotemporal graph attention network and an adaptive error state Kalman filter to achieve real-time, accurate, centimeter-level three-dimensional indoor positioning. The fusion framework mainly consists of two stages: 1) Offline expert network stage: Utilizing high-precision sensor data from UWB and IMU, along with real labels, a powerful STGAT is trained as a "UWB measurement quality assessment expert network" to output quantified bias and uncertainty estimates. 2) Online AESKF fusion stage: During real-time positioning, the pre-trained "expert network" is embedded into the ESKF update process, preventing ESKF from blindly trusting all UWB measurements. Instead, ESKF dynamically and adaptively updates based on the quality assessment results provided by STGAT, thereby reducing positioning errors. An asynchronous batch processing inference mechanism can also be used to address the real-time bottleneck caused by deep model inference.
[0021] SeeFIG. 1 As shown, in the offline expert network stage, a spatiotemporal graph attention network (or spatiotemporal graph attention model) is designed to model the localization problem as a dynamic graph structure between the UAV and the anchor point. Taking synchronized UWB and IMU measurement sequences as input, it captures the temporal and spatial features of graph nodes through a graph attention mechanism and uses a dual-head structure to output the NLOS bias and uncertainty of UWB measurements to evaluate measurement quality. In the online AESKF fusion stage, the trained expert network is embedded into the AESKF update process, and an asynchronous batch inference mechanism can be used to address the real-time bottleneck caused by deep model inference. For example, firstly, during real-time localization, the AESKF main loop performs real-time IMU prediction and caches newly arrived UWB sequence features; then, the expert network asynchronously infers the bias and uncertainty of the cached data within a 20ms period in a batch manner; finally, using the inference quality evaluation results, the UWB measurement values are corrected and the covariance of the AESKF update process is dynamically adjusted to asynchronously correct the cached historical state. The STG-AKF framework balances positioning error and real-time requirements. It leverages STGAT's accurate modeling capabilities for NLOS errors to significantly reduce positioning errors while ensuring high-frequency real-time updates of the AESKF fusion framework.
[0022] Specifically, see FIG. 2 As shown, the provided UWB-IMU fusion indoor positioning method based on spatiotemporal graph and adaptive Kalman filtering includes the following steps: Step S1: Construct a dataset that reflects the correlation between UWB measurements, IMU measurements, and positioning results.
[0023] For example, the training or test set used in this invention was constructed based on the publicly available Ultra-Wideband Time-Difference-of-Arrival IndoorLocalization (UTIL) dataset. This dataset was collected in an indoor flight field of 7.0 m × 8.0 m × 3.5 m, and approximately 150 minutes of real-world flight experiments were conducted using a custom quadcopter platform. The quadcopter UAV flew at an average speed of 0.45 m / s in both LOS and complex NLOS environments, using four different UWB anchor layouts, labeled as anchor layouts 1-4.
[0024] In one embodiment, three sets of synchronized raw sensor data were selected: UWB Time-Difference-of-Arrival (TDOA) measurements (UWB ranging data), accelerometer and gyroscope data from the IMU, and millimeter-level positioning coordinates from the motion capture system as ground truth labels. In anchor layout 4, seven challenging occlusion scenarios were designed, including three static NLOS environments, two dynamic NLOS environments, one artificial NLOS environment with human occlusion, and one LOS environment. Anchor layouts 1-3 were all in LOS environments, with six different trajectories repeatedly executed under each anchor layout.
[0025] Step S2: Model the NLOS error based on the spatiotemporal graph attention network to output the evaluation results of UWB measurement quality.
[0026] To simultaneously capture the complex temporal and spatial characteristics of the positioning system, one embodiment proposes an NLOS error modeling method based on the STGAT network. Unlike traditional Graph Neural Networks (GNNs), this invention employs dynamically hybridized nodes to construct a directed fully connected graph. Where t represents the time step, Mobile node by an unmanned aerial vehicle (UAV) and Anchor nodes constitute, An edge representing a fully connected network of all nodes, such as... FIG. 3 As shown. In the time step of the sliding window. Internally, an initial feature was constructed that integrates multi-source information from UWB and IMU: (1) in, Indicates that the IMU triaxial accelerometer is in The specific force vector measured at time t, i.e., the acceleration after removing gravity. This indicates that the IMU three-axis gyroscope is in The angular velocity vector measured at time t, Represents a node exist Initial characteristics of time , express The first difference of the UWB measurement at time t, This refers to the input feature dimension. It can be seen that dynamic UAV nodes are active information sources, containing all dynamic features of the UAV sensors: UWB measurements, UWB first-order difference, IMU acceleration, and IMU angular velocity. They are the initiation and final convergence points of information in the graph network. Static anchor nodes, on the other hand, are passive information receivers. Initially, they do not generate dynamic data; their initial features are set to zero vectors. They receive information from UAV nodes through the graph message passing mechanism, dynamically learning and updating spatiotemporal features. Furthermore, the edges of the fully connected graph are divided into two types: "UAV-anchor" and "anchor-anchor." "UAV-anchor" has real physical meaning, representing the signal propagation path and measurement relationship between the UAV and the anchor, and the TDOA measurement error between the UAV and the anchor. Closely related. "Anchor-anchor" represents the implicit spatial relationship between anchors, and higher-order spatial correlations can be learned based on the distance between the UAV and the anchor pair and the kinematic consistency of synchronized IMU information.
[0027] Step S3: Construct a spatiotemporal graph attention network and train it using the set loss function.
[0028] like FIG. 4 As shown, the Spatiotemporal Graph Attention Network (STGAT) mainly includes a temporal encoder based on a gated recurrent unit (GRU), a spatial encoder based on a graph attention network (GAT), and a dual-head output layer.
[0029] 1) GRU-based time encoder Unlike traditional methods, this invention employs a parallel design to independently extract temporal features for each node. First, the initial features... Perform linear projection to obtain the input. : .in, These are the weights and bias parameters of the linear layer. This represents the hidden dimensions used to represent features within the model; then, a GRU is used to capture the temporal features of each node in parallel. All samples in a batch... The feature sequences of each node within a window are fed in parallel into the GRU network to extract the temporal information of each node: .in, It is a node The final hidden state at the end of the window contains the temporal coding information for the entire window and serves as the initial node information for the next stage spatial encoder. This parallel design greatly improves computational efficiency by merging the dimensions of nodes and batches.
[0030] 2) Spatial encoder based on GAT Traditional GNNs have edges that are equal and unweighted, while GAT dynamically learns the weight of each edge through an attention mechanism, representing the importance of information transmission between nodes. For example, using... This indicates the number of GAT layers, with each layer having... Each attention head, then the node In the The layer update process is as follows.
[0031] First of all, the Attention score based on size The calculation is as follows: (2) in, It is the weight of the self-attention mechanism. Indicates the first The spatial feature dimension of each attention head These are nodes and In the Layer feature representation, It is an activation function. These are learnable parameters of a linear transformation. This indicates a splicing operation.
[0032] Next, attention weights This can be expressed as: (3) Represents a node The set of neighboring nodes.
[0033] Finally, stacking Layered GAT and introducing residual connections between each layer, all The height in Layer output It consists of features from the previous layer and new features aggregated from the current layer: (4) in, It is a non-linear activation function. Indicates the first Transformation matrix of the head, The learnable parameters represent the linear transformation of the residual connection. Represents a node Features of the previous layer The attention layer of the graph is represented by the first layer. The output feature dimension of the layer.
[0034] 3) Dual-head output layer For example, design two independent output heads to regress the NLOS bias and uncertainty of UWB measurements, respectively. After layer spatial encoding, the final feature of the UAV node, which aggregates the information of the entire spatiotemporal graph, is obtained, represented as: The input is fed into the dual-head output layer to obtain the evaluation results of the UWB measurements: (5) in, It is the first NLOS bias for each sample This indicates the uncertainty in NLOS bias prediction; and They are used for prediction and Two independent, small multilayer perceptrons are used. To enable the model to jointly optimize the dual-head output, a Gaussian negative log-likelihood (NLL) loss function is employed. Assume the true bias label measured by Vicon for a batch is: The average loss for the entire batch is: (6) in, Indicates the first True bias label for each sample These are the parameters of the spatiotemporal graph attention model, where n represents the index of a sample in a batch. G This represents the total number of training samples in a batch. Loss function. The first term is the mean squared error term weighted by the inverse of the variance, which is used when the model is very confident in its predictions. Very small We must get close Otherwise, it penalizes prediction bias. The second term is the log-variance regularization term; when prediction is difficult, the model acknowledges the increased uncertainty. This reduces the penalty of the first term. By optimizing the joint loss, the model is incentivized to produce accurate bias and low uncertainty for easily predictable samples, and to produce as accurate bias and high uncertainty as possible for difficult-to-predict samples, thereby reflecting the true error and uncertainty.
[0035] S4 embeds the trained spatiotemporal graph attention network into the AESKF update process to dynamically and adaptively update the localization results based on the evaluation results of UWB measurement quality.
[0036] In one embodiment, an AESKF-based fusion framework is proposed. When in the IMU time step, coordinate prediction is performed based on the IMU's acceleration and angular velocity. When in the UWB time step, a pre-trained STGAT network is used as an expert network to perform dynamic quality evaluation on each UWB measurement. The ESKF update weights are adjusted based on the bias and uncertainty of the network output to achieve adaptive elastic fusion.
[0037] 1) Prediction process The system prediction process is completed solely by high-frequency IMU measurements. The system state vector is defined as follows: ,in, Indicates UAV in Location at any given moment Indicates the corresponding speed. Indicates the corresponding posture. It is a "quaternion field". Using the above state... IMU sequences and kinematic laws, state equations for the prediction process Defined as: (7) in, It is the body coordinate system to inertial coordinate system The rotation matrix, This represents the acceleration and angular velocity of the IMU. It is the gravity vector. It is a time interval. To represent quaternion multiplication, It is a function that converts a small-angle rotation vector into a quaternion.
[0038] 2) Adaptive update process First, construct the UWB-IMU features within a sliding window at the current time, and feed them as the input sequence into the pre-trained STGAT to obtain the quality evaluation results: Next, the systematic bias is removed from the original UWB measurements using the bias output by STGAT: Subsequently, the observation noise covariance matrix is adaptively constructed using the log-variance output of STGAT: .in, This represents the measurement inherent noise covariance under LOS conditions. Finally, the corrected measurements are used. and adaptive Perform a standard ESKF update.
[0039] Step S5: In the AESKF update stage, an asynchronous batch processing real-time inference mechanism is used to optimize the localization results.
[0040] In one embodiment, the present invention also proposes an asynchronous batch processing real-time inference module, which decouples the ESKF main loop through caching and batch inference, reducing overhead while maintaining accuracy to meet the real-time requirements of IoT. Specifically, the framework consists of three parallel and asynchronous branches: 1) High-frequency prediction caching branch: The ESKF main loop runs at the highest frequency of the UWB-IMU sensor, immediately performing the prediction process for each IMU time step, while caching the IMU data within a sliding window at the current time; for each newly arrived UWB time step, the update process is not performed immediately, but the UWB measurement value within a sliding window at the current time, along with the prior state estimate at that time, is cached together. 2) Low-frequency batch inference branch: This is an independent background worker thread. When the UWB measurement values accumulate to a certain number (B) of sliding windows, the UWB features corresponding to the B windows and the synchronously cached IMU sequence features are constructed as a batch of inputs for the model and sent to STGAT parallel inference at once, and the quality evaluation results of the inference are stored in the result queue. 3) Asynchronous batch update branch: The main loop periodically checks whether there is a result queue that meets the conditions. Once a new evaluation result is found, it is matched with the original feature sequence and prior state in the cache, and the successfully matched evaluation result is distributed back to ESKF to perform adaptive update, ensuring that the asynchronous update is not misaligned.
[0041] To further verify the effectiveness of the present invention, experimental verification was conducted.
[0042] 1) Leave-one scenario cross-validation results The experiment used one complete scene from scenarios 1-6 as the test set, and the remaining five scenes, along with some LOS samples from anchor layouts 1-3, constituted the training and validation sets (90% for training, 10% for validation). Table 1 shows the cross-scene quality assessment results of STGAT. Each metric showed high consistency across the six different test scenarios. The root mean square error (RMSE) and mean absolute error (MAE) were 0.132 m and 0.251 m, respectively, indicating that STGAT can accurately regress the systematic biases in the predictions. Furthermore, the RMSE and MAE for scenarios 3-6 (metal occlusion) were significantly higher than those for scenarios 1-2 (LOS or wood occlusion). In addition, the NLL loss was -1.231, indicating that the model can provide reliable predictions despite uncertainty.
[0043] Table 2 details the localization results of the STG-AKF method and the baseline ESKF method for each scenario as a test set. It can be seen that STG-AKF significantly outperforms the baseline ESKF method in every test case, with the mean absolute trajectory error of all trajectories decreasing from 0.480 m for the baseline ESKF to 0.190 m, an average improvement of 60.53%. The most significant improvement in localization error was observed in scenarios 3 and 4 with static metallic occlusion, ranging from 61.59% to 86.27%. FIG. 5 The trajectory comparison of NLOS scenario 3 under the cross-scenario cross-validation method is depicted, and other... FIG. 5 (a) Corresponding trajectory 1, FIG. 5 (b) Corresponding trajectory 2, FIG. 5 (c) Corresponding trajectory 3. For scenario 3, the three trajectories predicted by STG-AKF under NLOS conditions are clearly closer to the standard trajectory than the baseline method, and even for the very complex trajectory 3, there is still a significant improvement in positioning error. In summary, cross-scenario cross-validation fully demonstrates that the STG-AKF architecture can effectively and stably improve positioning accuracy in unseen scenarios, providing practical deployment feasibility for complex and chaotic indoor 3D spatial positioning.
[0044] Table 1: UWB measurement quality evaluation results under cross-scenario cross-validation of the STGAT model
[0045] Table 2: ATE localization results under cross-scenario cross-validation of the STG-AKF method
[0046] It should be noted that the data sequence in the table represents the scene.trajectory, and the lift refers to the calculation relative to the ESKF baseline.
[0047] 2) Leave-one-out cross-validation results To verify the robustness of the STG-AKF framework in localization under completely unseen trajectories, leave-one-out trajectory cross-validation was performed on the anchor layout 4 dataset. One trajectory from each of scenarios 1-6 was used as the test set, and the remaining two trajectories from each scenario, along with 25% of the LOS samples from anchor layouts 1-3, constituted the training and validation sets (90% for training, 10% for validation). Table 3 shows that each metric exhibits high consistency across the three different test trajectories. From trajectory 1 to trajectory 3, the bias RMSE, MAE, and NLL loss gradually increase, indicating that the model's prediction bias and uncertainty increase with trajectory complexity, which is expected. The average RMSE and MAE are 0.138 m and 0.260 m, respectively, indicating that STGAT can accurately regress the bias of unseen trajectories. The NLL loss for trajectory 3 is 0.268; a large positive value indicates that the model has low confidence in predicting complex trajectories, thus requiring increased NLL loss in AESKF. Reduce the weight of UWB measurements in the update process to reduce error drift.
[0048] Table 4 details the localization results of the STG-AKF method and the baseline ESKF method during cross-track verification. Overall, the STG-AKF method reduced the average ATE of all tracks from 0.480 m in the baseline ESKF method to 0.230 m, an average improvement of 52.06%. In most challenging and complex scenarios (scenarios 3-6 with metal occlusion), the localization improvement of track 1 was the most significant, reaching 67.44%-84.44%, which is sufficient to demonstrate the superior localization capability of STG-AKF in complex NLOS scenarios. FIG. 6 The trajectory comparison in NLOS scenario 3 under the cross-trajectory cross-validation method is depicted, and other... FIG. 6 (a) Corresponding trajectory 1 FIG. 6 (b) Corresponding trajectory 2, FIG. 6 (c) Corresponding trajectory 3. It can be seen that the three trajectories predicted by STG-AKF are significantly better than the baseline ESKF. In summary, leave-one-out trajectory cross-validation further proves that the STG-AKF method can still obtain accurate 3D indoor positioning results under unseen complex trajectories, and has strong adaptive capabilities for complex scenes and novel trajectories.
[0049] Table 3: UWB measurement quality assessment results under STGAT model cross-trajectory cross-validation
[0050] Table 4: ATE localization results under cross-track cross-validation using the STG-AKF method
[0051] 3) Real-time assessment To verify the performance of STG-AKF, ablation experiments were conducted on 18 data sequences under different LOS / NLOS scenarios. Under the same experimental conditions, the runtime of STG-AKF with and without asynchronous batch processing modules was tested, and the online inference capability of the system was introduced by real-time factor (RTF) quantization. This represents the ratio of the total processing time of the algorithm to the processing time of the corresponding data. This indicates that real-time requirements are met. Referring to Table 5, after introducing the asynchronous batch processing module, the average processing time decreased from 406.05 s to 93.64 s, representing an overall speedup of 76.9%. The RTF of all test sequences was less than 1, with an average RTF of 0.74, meaning the system possesses real-time inference capabilities. Overall, the asynchronous batch processing framework enables STG-AKF to achieve an optimal performance-complexity balance while ensuring positioning performance, providing feasibility for real-time online deployment.
[0052] Table 5: STG-AKF Operational Performance Analysis: Ablation Experiment Results of Asynchronous Batch Processing Module
[0053] Experimental results show that on the public UTIL dataset, the leave-one-out scenario cross-validation method and the leave-one-out trajectory cross-validation method reduce the mean absolute trajectory error (ATE) of the STG-AKF method by 60.53% and 52.06% respectively compared with the baseline method ESKF. This significantly improves the indoor positioning accuracy and robustness of different NLOS scenarios while ensuring real-time performance.
[0054] In summary, this invention, based on spatiotemporal graph attention network-based NLOS error modeling, is the first to model the UWB-IMU fusion localization problem as a dynamic "UAV-anchor point" graph. It applies STGAT to explicitly learn the spatiotemporal dependency between the UAV and the anchor point, and through joint estimation of bias and uncertainty, more accurately quantifies the NLOS effect, improving error modeling accuracy. Furthermore, it abandons the traditional LOS / NLOS binary classification and proposes an adaptive ESKF fusion algorithm. Based on bias and uncertainty estimation, it dynamically corrects UWB measurements, improving ranging accuracy, and adaptively adjusts the ESKF update weights to achieve elastic fusion of NLOS measurements. Further, it designs an asynchronous batch processing real-time inference mechanism. Through a working mode of "first caching, then parallel batch processing, and finally asynchronous correction," it effectively decouples the time-consuming model inference from the high-frequency ESKF loop, greatly reducing computational overhead and solving the real-time problem of deploying models on resource-constrained UAVs.
[0055] In summary, this invention, based on UAV flight data from multiple sensors including UWB and IMU, develops and evaluates a hybrid framework integrating traditional statistical optimization methods and deep learning. This framework addresses the challenges of poor positioning accuracy and robustness in complex dynamic NLOS environments, achieving real-time, precise, and centimeter-level three-dimensional indoor positioning. Compared with existing technologies, this invention has the following significant advantages: 1) Existing methods often rely on simple outlier removal, treating each UWB measurement as an independent time-series data point. This approach is prone to information loss and performance degradation in complex and variable NLOS environments. This invention models the UWB-IMU system as a dynamic graph and employs a spatiotemporal graph attention network to explicitly learn the spatiotemporal dependencies between the UAV and multiple anchor points. This more accurately quantifies the systematic bias caused by NLOS. Experiments demonstrate that it significantly reduces absolute trajectory error and substantially improves positioning accuracy and stability in various static and dynamic NLOS scenarios.
[0056] 2) This invention achieves a shift from rigid correction to flexible fusion. Existing consistency detection methods and LOS / NLOS binary classification methods often discard a large amount of observation data and are sensitive to thresholds. At most, they can predict one NLOS bias for correction, but they cannot assess the uncertainty of this prediction, leading them to still adopt a "one-size-fits-all" correction strategy when facing variable scenarios. This invention, by jointly estimating bias and uncertainty, uses bias correction and uncertainty assessment to dynamically construct the measurement noise covariance matrix, achieving flexible fusion weighted by uncertainty. This significantly reduces information waste and improves adaptability to variable NLOS scenarios.
[0057] 3) The AESKF fusion algorithm proposed in this invention, based on joint estimation of bias and uncertainty, uses a Gaussian negative log-likelihood loss function to train the model. This not only predicts bias but also assesses the uncertainty of its own predictions. This bias and uncertainty are used to dynamically correct UWB measurements, improve ranging accuracy, adaptively adjust the update weights of ESKF, and guide ESKF to perform flexible and adaptive fusion.
[0058] 4) Existing localization methods, while pursuing high accuracy, neglect the real-time challenges posed by their high computational complexity on resource-constrained robots. This invention proposes an asynchronous batch processing inference mechanism and a synchronous filtering update engineering deployment scheme, effectively decoupling high-cost model inference from high-frequency filtering loops. This ensures real-time localization requirements on resource-constrained robot platforms and solves the key real-time problem of deploying complex models on resource-constrained robots.
[0059] 5) Existing methods often focus on single-scenario validation, resulting in insufficient generalization. This invention employs rigorous leave-one-out scenario and leave-one-out trajectory cross-validation on public datasets, and verifies the stability and generalization ability under different scenarios and trajectories through multi-dimensional evaluation metrics. Double leave-one-out cross-validation is used to verify the model's generalization ability on test sets with unseen NLOS scenarios and unseen trajectories, respectively. The results show that it outperforms existing solutions in terms of accuracy, robustness, and stability.
[0060] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0061] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0062] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0063] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, Python, etc., and conventional procedural programming languages such as "C" or similar languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0064] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0065] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0066] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0067] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0068] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.
Claims
1. A UWB-IMU fusion indoor positioning method based on spatiotemporal map and adaptive Kalman filtering, comprising the following steps: A trained spatiotemporal graph attention model is obtained, which models the localization problem as a dynamic graph structure between the UAV and the anchor point. The model takes synchronized UWB measurement sequences and IMU measurement sequences as input, captures the temporal and spatial features of graph nodes through a graph attention mechanism, and outputs the quality assessment results of UWB measurements, which include the non-line-of-sight bias and uncertainty of UWB measurements. The spatiotemporal graph attention model is embedded into the update process of the error state Kalman filter (ESKF) to perform dynamic and adaptive updates based on the quality assessment results, thereby obtaining the localization results.
2. The method according to claim 1, characterized in that, The process of embedding the spatiotemporal graph attention model into the update of the error state Kalman filter (ESKF) includes: In the main loop of the error state Kalman filter ESKF, it runs at the highest frequency of the UWB-IMU sensor. For each IMU time step, the prediction process is performed immediately, and the IMU data within a sliding window at the current time is cached. For each newly arrived UWB time step, the update process is not performed immediately, and the UWB measurement value within a sliding window at the current time, together with the prior state estimate at that time, is cached. When the UWB measurements accumulate to a set number of sliding windows B, the UWB features corresponding to the B windows and the synchronously cached IMU sequence features are constructed as a batch of inputs and sent into the spatiotemporal graph attention model for parallel inference at once, and the quality evaluation results of the inference are stored in the result queue. In the main loop of the error state Kalman filter (ESKF), it periodically checks whether there is a queue of results that meet the conditions. When a new evaluation result is found, it is matched with the cached feature sequence and prior state, and the successfully matched quality evaluation result is distributed back to the error state Kalman filter (ESKF) for adaptive update.
3. The method according to claim 1, characterized in that, The spatiotemporal graph attention model includes a time encoder based on a gated recurrent unit, a spatial encoder based on a graph attention network, and a dual-head output layer. The time encoder uses a gated recurrent unit to capture the temporal features of each node in parallel. The spatial encoder is used to extract spatial features using an attention mechanism. The dual-head output layer uses two independent output heads to regress the non-line-of-sight bias and uncertainty of UWB measurements, respectively.
4. The method according to claim 3, characterized in that, For the spatiotemporal graph attention model, the initial features of the input are obtained according to the following steps: Constructing a Directed Fully Connected Graph Using Dynamically Hybrid Nodes , represented as ,in Mobile node by a drone and Anchor nodes constitute, This represents an edge that fully connects all nodes; Time step of the sliding window The initial feature is constructed based on the following formula: in, Represents a node exist Initial characteristics of time, express The first difference of the UWB measurement at time t, It is the input feature dimension. Indicates that the IMU triaxial accelerometer is in The force vector measured at time t, This indicates that the IMU three-axis gyroscope is in The angular velocity vector measured at time t.
5. The method according to claim 4, characterized in that, The time encoder performs: Initial features Perform a linear projection to obtain : in, These are the weights and bias parameters of the linear layer. The hidden dimension representing the feature; A gated recurrent unit is used to capture the temporal features of each node in parallel. The extracted temporal information of each node is represented as follows: in, It is a node The final hidden state at the end of the window, and serves as the initial node information for the spatial encoder in the next stage. This indicates a gated loop unit.
6. The method according to claim 5, characterized in that, The space encoder performs: Calculate the first according to the following formula. Attention score based on size : in, It is the weight of the self-attention mechanism. These are nodes and In the Layer feature representation, It is an activation function. These are learnable parameters of a linear transformation; Calculate the attention weight using the following formula. : in, Represents a node The set of neighboring nodes; Calculate all according to the following formula The height in Layer output : in, It is a non-linear activation function. Indicates the first Transformation matrix of the head, The learnable parameters represent the linear transformation of the residual connection. Represents a node Features of the previous layer The attention layer of the graph is represented by the first layer. The output feature dimension of the layer Indicates the first The spatial feature dimension of the attention head.
7. The method according to claim 6, characterized in that, The quality assessment result of the UWB measurement output by the dual-head output layer is expressed as follows: in , It is the first Non-visual distance bias of each sample This indicates the uncertainty in non-line-of-sight bias prediction. and These are used for prediction and Two independent multilayer perceptrons.
8. The method according to claim 7, characterized in that, Based on the following loss function Training the spatiotemporal graph attention model: in, These are the parameters of the spatiotemporal graph attention model. Indicates the first The true deviation label of each sample, where n represents the index of a sample in a batch. G This represents the total number of training samples in a batch.
9. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
10. A computer device comprising a memory and a processor, wherein a computer program capable of running on the processor is stored in the memory, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Cited By
Enhanced cooperative positioning method and system for uncertainty perception gating network
CN121829513A