An indoor UWB / IMU fusion positioning method and system
By using DeepPDR inertial pose increment estimation and UWB base station reliability weight learning, combined with differentiable factor graph optimization, the adaptability and accuracy issues of UWB/IMU fusion positioning in complex indoor environments were solved, achieving high-precision positioning under noisy and non-line-of-sight conditions.
Patent Information
- Application Number
- CN202611686383.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
In complex indoor environments, UWB ranging values are easily affected by noise, abnormal measurements, and non-line-of-sight propagation. IMU data errors accumulate over time. Existing UWB/IMU fusion positioning methods are not adaptable enough to environmental changes and cannot guarantee positioning accuracy and stability.
By employing DeepPDR inertial pose increment estimation, PDR motion prior construction, UWB base station reliability weight learning, and differentiable factor graph weighted fusion optimization, and through data preprocessing and end-to-end fusion positioning model training, the system adaptively evaluates base station reliability, eliminates ranging bias, and improves positioning accuracy and robustness.
It outputs a continuous and smooth indoor positioning trajectory under noise and non-line-of-sight interference, adapts to complex indoor working conditions, improves 2D positioning accuracy and trajectory robustness, and supports simulation data and real sensor data.
Smart Images

Figure CN123185658A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless indoor positioning technology, and in particular to an indoor UWB / IMU fusion positioning method and system. Background Technology
[0002] Indoor positioning is a crucial technology in wireless sensing and location services, commonly used in scenarios such as personnel navigation, mobile robots, asset management, and indoor trajectory tracking. Due to factors such as building structure obstruction, signal attenuation, and multipath propagation, Global Navigation Satellite Systems (GNSS) often struggle to provide continuous and reliable position output in indoor environments. To obtain more stable indoor positioning results, research typically employs methods such as ultra-wideband ranging, inertial measurement, and multi-source information fusion to estimate the target position.
[0003] Ultra-wideband (UWB) positioning technology primarily utilizes distance measurements between tags and multiple base stations to calculate target positions. This method features high temporal resolution and well-defined distance constraints, providing relatively reliable position information in scenarios with good line-of-sight conditions. However, real-world indoor environments often present factors such as walls, equipment, human bodies obstructing the view, and signal reflections, making UWB ranging values susceptible to noise, abnormal measurements, and non-line-of-sight propagation. Differences in the installation location, ranging stability, and system bias of different base stations can also lead to inconsistent contributions from each base station's measurements to the positioning results. When some base station ranging measurements are missing or their quality degrades, relying solely on UWB ranging for position calculation can easily cause fluctuations in the positioning results. Inertial measurement units (IMUs) can collect acceleration and angular velocity information of moving targets, which can be used to estimate their motion state over short periods. Compared to positioning methods that rely on external base stations or wireless propagation conditions, IMUs offer better autonomy and continuity, providing motion constraints when UWB ranging is insufficient or temporarily missing. However, IMU data typically contains noise and zero-bias errors, and position estimation relies on an integration process, so errors accumulate gradually over time. Without external observations for correction, inertial calculation results are prone to drift, making it difficult to meet the accuracy and stability requirements of long-term indoor positioning.
[0004] To compensate for the limitations of a single sensor, existing methods typically fuse UWB and IMU. These methods generally utilize the continuous motion prediction provided by the IMU, and then use UWB ranging or positioning results to correct inertial estimation, thus balancing short-term motion continuity and absolute position constraints to some extent. Common fusion methods include extended Kalman filtering, particle filtering, least squares optimization, and learning model-based positioning methods. These methods provide a foundation for indoor fusion positioning, but they still suffer from insufficient adaptability in complex indoor environments. Traditional filtering or optimization methods usually require pre-setting noise models, covariance parameters, or measurement weights. When the indoor environment changes, the quality of UWB ranging may vary due to base station location, obstruction, and signal propagation conditions; fixed weights cannot accurately reflect the reliability differences between measurements from different base stations. Abnormal ranging, uncorrected distance measurements, and missing short-term ranging data can all be directly introduced into the fusion process, affecting the position estimation results. Meanwhile, traditional methods have limited ability to represent IMU motion information, often relying on manually established motion models, making it difficult to fully extract the temporal features from inertial data.
[0005] Therefore, indoor UWB / IMU fusion positioning still needs to address the following issues: how to adaptively evaluate the reliability of different base stations based on UWB measurement status, reducing the impact of noisy ranging and abnormal measurements on positioning results; how to utilize motion information within the IMU time window to alleviate the problem of insufficient short-term ranging; and how to introduce explicit geometric constraints based on data-driven feature learning to ensure that the fusion positioning process is simultaneously trainable, constrained, and continuous. These issues directly relate to improving positioning accuracy, trajectory stability, and system robustness in complex indoor environments. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing an indoor UWB / IMU fusion positioning method and system, which realizes UWB base station deviation calibration, IMU temporal motion feature learning, base station observation reliability adaptive evaluation, and end-to-end joint optimization of differentiable factor graph, thereby improving the accuracy and trajectory robustness of indoor two-dimensional positioning under non-line-of-sight and ranging-missing conditions.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0008] On the one hand, the present invention provides an indoor UWB / IMU fusion positioning method, the overall process of which includes data acquisition, multi-source data preprocessing, UWB base station ranging deviation calibration, training sample construction, DeepPDR inertial pose increment estimation, PDR motion prior construction, UWB base station reliability weight learning, differentiable factor graph weighted fusion optimization, multi-constraint end-to-end fusion positioning model training, and autoregressive positioning inference.
[0009] The data preprocessing stage completes time alignment, converts the spatial slant distance between the UWB tag and the UWB base station into a two-dimensional plane ranging through height compensation, generates a distance derived from the signal strength based on the signal strength and a preset path loss model, and constructs ranging consistency features based on the difference between the distance derived from the signal strength and the UWB two-dimensional ranging; and performs Z-score standardization and deep learning input on the IMU six-axis data.
[0010] UWB base station ranging deviation calibration uses the true value of the reference trajectory to obtain the ranging residual of each base station, takes the median of the residual as the ranging deviation of the base station system, corrects the original ranging, and eliminates the systematic ranging difference between different base stations.
[0011] A fused positioning sample is constructed based on the preprocessed IMU data and UWB data. The fused positioning sample includes an IMU time window, a UWB feature matrix, a UWB ranging vector, a UWB effective mask, the previous time state, and the current two-dimensional location label.
[0012] The DeepPDR inertial pose increment estimation part takes the IMU time window sequence as input and extracts inertial temporal features by relying on one-dimensional convolution, residual temporal convolutional network, bidirectional gated recurrent unit, and attention pooling. The pose increment output by the dual output branches includes displacement length and heading change, while the output PDR variance represents the uncertainty of motion prior. The PDR motion prior is constructed by combining the state of the previous time step and the output pose increment, which provides initial estimation and motion constraints for subsequent differentiable factor graph optimization.
[0013] In the learning of UWB base station reliability weights, a learnable base station identity embedding is introduced. The base station identity embedding is concatenated with UWB features, and a reliability weight in the range of 0-1 is output through a multi-layer fully connected network to dynamically represent the reliability of the ranging of each base station at the current time.
[0014] In the differentiable factor graph weighted fusion optimization, an objective function is constructed that includes a PDR motion prior term and a weighted UWB distance residual term. The two-dimensional position is solved iteratively using damped least squares, with the PDR motion prior as the prior constraint and the effective UWB ranging as the distance constraint. Iterative optimization is performed by combining the effective UWB mask and the UWB base station reliability weights. The optimized two-dimensional position is combined with the predicted heading angle to form the current positioning state. All operations are implemented using differentiable tensors, and the positioning loss can be backpropagated, enabling joint training of the DeepPDR network, the UWB reliability network, and the factor graph optimization.
[0015] The DeepPDR pose estimation module, UWBWeightNet reliability estimation module, and differentiable factor graph optimization layer constitute an end-to-end fusion localization model. Model training employs multi-loss joint constraints, including absolute position loss, PDR relative displacement loss, PDR prior position loss, UWB residual loss, and physical constraint loss. During training, data augmentation is performed on UWB ranging and effective UWB masks, including randomly discarding some effective UWB rangings, adding random noise to effective UWB rangings, and adding anomalous perturbations to some effective UWB rangings. Closed-loop training and trajectory smoothing constraints are introduced during the training phase. Closed-loop training adapts the model to the state recursion form of the localization inference stage, while trajectory smoothing constraints reduce local jitter in continuous predicted trajectories and improve the stability of trajectory output.
[0016] In the localization inference phase, the initial state of the mobile node is first determined, and then an autoregressive recursion is performed in chronological order. The trained fusion localization model outputs the current localization state based on the current IMU time window, current UWB features, current UWB ranging, current UWB effective mask, and the state of the previous moment. The current localization state continues to serve as the input state for the next moment, and the two-dimensional position and heading are output time by time, outputting the complete indoor localization trajectory of the mobile node.
[0017] On the other hand, the present invention also provides an indoor UWB / IMU fusion positioning system for implementing the above-mentioned indoor UWB / IMU fusion positioning method, including a data preprocessing module, a base station deviation calibration module, a sample construction module, a DeepPDR pose estimation module, a UWBWeightNet reliability estimation module, a differentiable factor graph optimization module, a training and evaluation module, and a positioning output module. The output of the data preprocessing module is passed to the base station deviation calibration module and the sample construction module; the IMU time window generated by the sample construction module is input to the DeepPDR pose estimation module, the generated UWB features are input to the UWBWeightNet reliability estimation module, and the generated UWB ranging vector, UWB effective mask, and previous time state are input to the differentiable factor graph optimization module; the differentiable factor graph optimization module outputs the current positioning state, and the positioning output module recursively obtains the continuous trajectory in chronological order;
[0018] The UWB ranging data, IMU inertial data, and reference trajectory data are provided by external data sources, including but not limited to existing UWB positioning devices, IMU sensors, and public datasets.
[0019] The data preprocessing module is used to perform timestamp unification, time sorting, UWB altitude compensation, UWB ranging smoothing, signal strength feature construction, and IMU data standardization on UWB ranging data, IMU inertial data, and reference trajectory data received from external data sources. The preprocessed data is then output to the base station deviation calibration module and the sample construction module.
[0020] The base station deviation calibration module is used to calculate the ranging residual of each UWB base station based on the reference trajectory position and UWB base station coordinates, and to determine the ranging deviation of each UWB base station based on the ranging residual, which is used to correct the UWB ranging value of the subsequent input fusion positioning model.
[0021] The sample construction module is used to construct fused localization samples based on the IMU time window, UWB feature matrix, UWB ranging vector, UWB effective mask and previous state, and is also used to generate location labels for the training phase based on reference trajectory data.
[0022] The DeepPDR pose estimation module is used to extract short-time inertial motion features based on the IMU time window and output the pose increment and PDR variance of the moving node. The pose increment includes displacement length and heading change;
[0023] The UWBWeightNet reliability estimation module outputs reliability weights for each base station based on their UWB features and base station identity embedding. These reliability weights are used to adjust the effect of the corresponding UWB distance constraints in the differentiable factor graph optimization layer.
[0024] The differentiable factor graph optimization module is used to perform iterative optimization based on PDR motion priors, UWB ranging, UWB effective mask and UWB reliability weights, and output the optimized current positioning status.
[0025] The training and evaluation module is used to perform end-to-end training on the end-to-end fusion localization model composed of the DeepPDR pose estimation module, the UWBWeightNet reliability estimation module, and the differentiable factor graph optimization module based on reference trajectory data, and is used to calculate the error index of the fusion localization result.
[0026] The positioning output module is used to recursively calculate the status in chronological order during the positioning phase and output the two-dimensional position and heading angle of the moving node to obtain a continuous indoor positioning trajectory.
[0027] Thirdly, this application proposes an electronic device, including: one or more processors, and a memory for storing instructions, which, when executed by the one or more processors, cause the one or more processors to perform the indoor UWB / IMU fusion positioning method.
[0028] Fourthly, this application proposes a computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the indoor UWB / IMU fusion positioning method.
[0029] The beneficial effects of adopting the above technical solution are as follows: The indoor UWB / IMU fusion positioning method and system provided by this invention improves the quality of input observation: by using UWB height compensation, ranging smoothing, signal strength consistency features, and base station deviation calibration based on residual median, systematic ranging bias of base stations is eliminated; IMU standardization eliminates sensor dimension differences and reduces the interference of original sensor noise and system bias on positioning. Adaptive weighted fusion and end-to-end trainability are achieved: the DeepPDR deep network fully explores the short-term temporal motion features of the IMU time window, while outputting motion uncertainty; the UWBWeightNet reliability estimation module dynamically outputs the weights of each base station by combining base station identity embedding and ranging signal features, breaking away from the fixed weight limitations of traditional algorithms; all operators of the factor graph are differentiable, realizing joint training of deep learning networks and factor graph optimization. Strong robustness, adaptable to complex indoor conditions: Training incorporates UWB data augmentation, closed-loop training, and trajectory smoothing constraints, enabling the algorithm to handle random loss of UWB ranging data, Gaussian NLOS, and gamma-distributed NLOS non-line-of-sight errors. Validated in simulation environments and with publicly available real datasets, it still outputs continuous and smooth positioning trajectories even under noise and non-line-of-sight interference. High engineering practicality: The entire solution simultaneously supports simulation data and real sensor data; it outputs 2D position + heading, which can be directly used in indoor robot, indoor personnel navigation, and asset tracking scenarios. Attached Figure Description
[0030] Figure 1 This is a flowchart of the indoor UWB / IMU fusion positioning method provided in Embodiment 1 of the present invention;
[0031] Figure 2 This is an internal structure diagram of the DeepPDR pose estimation module provided in Embodiment 2 of the present invention;
[0032] Figure 3 This is an internal structure diagram of the UWBWeightNet reliability estimation module provided in Embodiment 2 of the present invention;
[0033] Figure 4 The position error CDF curve of the method in Embodiment 1 of the present invention when there is no NLOS error;
[0034] Figure 5 A schematic diagram illustrating the trajectory tracking effect of the method in Embodiment 1 of the present invention when there is no NLOS error;
[0035] Figure 6The CDF curves of the method in Embodiment 1 of the present invention are provided for different mean and standard deviation of NLOS error when the NLOS error follows a Gaussian distribution.
[0036] Figure 7 This is a schematic diagram illustrating the trajectory tracking effect of the method in Embodiment 1 of the present invention when the NLOS error follows a Gaussian distribution, with the mean and variance of the Gaussian distribution being 0.2 meters and 0.05 meters, respectively.
[0037] Figure 8 This is a schematic diagram illustrating the trajectory tracking effect of the method in Embodiment 1 of the present invention when the NLOS error follows a Gaussian distribution, with the mean and variance of the Gaussian distribution being 0.5 meters and 0.15 meters, respectively.
[0038] Figure 9 This is a schematic diagram illustrating the trajectory tracking effect of the method in Embodiment 1 of the present invention when the NLOS error follows a Gaussian distribution, with the mean and variance of the Gaussian distribution being 0.8 meters and 0.25 meters, respectively.
[0039] Figure 10 The CDF curves of the method in Embodiment 1 of the present invention are provided under different shape parameters and scale parameters of NLOS error when the NLOS error follows a gamma distribution.
[0040] Figure 11 This is a schematic diagram of the trajectory tracking effect of the method in Embodiment 1 of the present invention when the NLOS error follows a gamma distribution, and the shape parameter and scale parameter of the gamma distribution are 2 and 0.1 meters, respectively.
[0041] Figure 12 This is a schematic diagram of the trajectory tracking effect of the method in Embodiment 1 of the present invention when the NLOS error follows a gamma distribution, and the shape parameter and scale parameter of the gamma distribution are 2 and 0.25 meters, respectively.
[0042] Figure 13 A schematic diagram illustrating the trajectory tracking effect of the method in Embodiment 1 under the condition that the shape parameter and scale parameter of the gamma distribution are 2 and 0.4 meters respectively;
[0043] Figure 14 The CDF curve of the method in Embodiment 1 of the present invention is shown in the experiment on a real dataset.
[0044] Figure 15 This is a schematic diagram illustrating the trajectory tracking effect of the method in Embodiment 1 of the present invention in a real dataset experiment. Detailed Implementation
[0045] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0046] Example 1:
[0047] An indoor UWB / IMU fusion localization method based on deep learning and differentiable factor graph optimization, such as... Figure 1 As shown, the method is executed in the following order: data acquisition, data preprocessing, base station ranging deviation calibration, fusion positioning sample construction, DeepPDR pose estimation, UWB base station reliability estimation, differentiable factor graph optimization, model training, and positioning inference.
[0048] In this embodiment, the mobile node carries a UWB tag and an IMU sensor. The UWB tag measures distances with multiple UWB base stations at known coordinates to obtain UWB ranging data. The UWB ranging data includes a ranging timestamp, UWB base station number, UWB ranging value, and received signal strength value. The IMU sensor collects the three-axis acceleration and three-axis angular velocity of the mobile node during its movement. The reference trajectory data is used for position supervision during the training phase, UWB base station ranging deviation calibration, and positioning error evaluation during the testing phase.
[0049] This embodiment first unifies the timestamp dimensions of UWB ranging data, IMU inertial data, and reference trajectory data. The timestamps of each data type are converted to floating-point numbers. If the timestamp is in the nanosecond range, it is converted to a second-level timestamp. After timestamp unification, the UWB ranging data, IMU inertial data, and reference trajectory data are sorted according to time order. This process ensures that subsequent nearest-time matching and time window construction have a unified time reference.
[0050] This embodiment performs height compensation on the raw UWB ranging. Raw UWB ranging typically represents the spatial slant distance between the UWB tag and the UWB base station, while the positioning result in this embodiment is a two-dimensional planar position. Therefore, based on the height of the UWB base station and the height of the mobile node tag, the spatial slant distance is converted into a two-dimensional planar ranging. If the... Each UWB base station at time The original ranging value is The base station is at a height of The height of the mobile node label is Then the first Two-dimensional plane ranging corresponding to each UWB base station Represented as:
[0051] ;
[0052] in, This is a preset lower limit term used to avoid values within the square root being too small, thereby ensuring the stability of the two-dimensional distance measurement calculation process.
[0053] This embodiment performs singular spectral analysis to denoise the two-dimensional planar ranging sequences of each UWB base station. A trajectory matrix is constructed for the two-dimensional ranging sequences of the same UWB base station, and singular value decomposition is performed on this trajectory matrix. The main singular components are retained, and a smoothed two-dimensional ranging sequence is obtained through sequence reconstruction. This processing can reduce the impact of random ranging fluctuations on subsequent feature construction and fusion optimization.
[0054] This embodiment constructs ranging consistency features based on signal strength. If the reference signal strength is... The path loss index is The current signal strength is The signal strength is then used to derive the distance. Represented as:
[0055] ;
[0056] Further calculations reveal the difference between the 2D UWB ranging and the distance derived from the signal strength, yielding the ranging difference characteristics. for:
[0057] ;
[0058] Therefore, the first Each UWB base station at time UWB features The smooth two-dimensional ranging, the distance derived from signal strength, and the ranging difference characteristics can be represented as follows:
[0059] ;
[0060] in, This represents the denoised two-dimensional UWB ranging. This UWB feature... Used for subsequent UWB base station reliability weight estimation.
[0061] This embodiment standardizes the IMU inertial data. Triaxial acceleration and triaxial angular velocity are extracted, and Z-score normalization is performed on each IMU channel. For the first... Raw data from each IMU channel Standardized data Represented as:
[0062] ;
[0063] in, Indicates the first The mean of each IMU channel, Indicates the first Standard deviation of each IMU channel To prevent constant terms with zero denominators, standardization is performed so that data from different IMU channels have a more similar numerical scale, which is beneficial for the DeepPDR pose estimation module to learn temporal features.
[0064] This embodiment calibrates the ranging deviation of each UWB base station based on reference trajectory data. The UWB ranging data and reference trajectory data are aligned to the nearest time, and the true two-dimensional distance is calculated based on the two-dimensional coordinates of the UWB base station and the position of the reference trajectory. The two-dimensional coordinates of each base station are The two-dimensional coordinates of the moving node in the reference trajectory at time t are: Then the true two-dimensional distance Represented as:
[0065] ;
[0066] The first By comparing the two-dimensional planar ranging values of each UWB base station in the training trajectory with the actual two-dimensional distance, the ranging residual corresponding to that base station is obtained:
[0067] ;
[0068] in, Indicates the first Each UWB base station at time The ranging residual.
[0069] Summary of the first The effective ranging residuals of each UWB base station in the training trajectory are used, and the median of the residual sequence is used as the ranging bias of that base station.
[0070] ;
[0071] in, Indicates the first The ranging bias of each UWB base station. The median can reduce the impact of individual abnormal ranging values on the bias calibration results.
[0072] In subsequent sample construction and positioning calculations, the ranging value of the i-th UWB base station is corrected using ranging bias. The corrected UWB ranging value is expressed as:
[0073] ;
[0074] in, This indicates the corrected UWB ranging value. This represents the preset lower limit of distance measurement, which is used to prevent the corrected distance from being too small, thereby ensuring that subsequent distance constraints have physical meaning.
[0075] After data preprocessing and base station deviation calibration, fused positioning samples are constructed. In this embodiment, six-axis inertial data is extracted from the standardized IMU data according to a fixed time window to form the IMU time window input. As a preferred implementation, the IMU time window length is set to 10 and the sliding step size is set to 2. This embodiment is not limited to these parameters, and the window size can be adjusted according to the sampling rate. The end time of the IMU time window is taken as the current reference time, and the position closest to the current reference time is found in the reference trajectory data as the two-dimensional position label of the current sample.
[0076] The previous time-state is constructed based on the reference trajectory positions at the current reference time and the previous reference time. The previous time-state includes the previous two-dimensional position and heading angle. The heading angle is calculated based on the planar displacement direction between adjacent reference trajectory positions. The previous time-state is represented as follows:
[0077] ;
[0078] in, and This represents the two-dimensional position of the moved node at the previous moment. This represents the heading angle of the moving node at the previous moment.
[0079] The system searches for UWB ranging data near the current reference time. In one implementation, it searches for recent UWB ranging data within a 0.25-second range before and after the current reference time. A UWB feature matrix, a UWB ranging vector, and a UWB effective mask are constructed according to a preset UWB base station order. If a UWB base station has effective ranging within the current time range, the ranging data with the smallest time difference is selected, and the effective mask of that base station is set to 1. If the UWB base station does not have effective ranging within the current time range, the effective mask of that base station is set to 0. The effective mask representation of a UWB base station at time t is:
[0080] ;
[0081] Therefore, each fused localization sample includes an IMU time window, a UWB feature matrix, a UWB ranging vector, a UWB effective mask, the previous time step state, and the current 2D location label. During the training phase, the current 2D location label comes from the reference trajectory. During the inference phase, the previous time step state comes from the model's output state at the previous time step.
[0082] like Figure 2As shown, the DeepPDR pose estimation module processes the IMU time window and estimates the pose increment and PDR variance of the moving node within the current time window. DeepPDR pose estimation takes a standardized six-axis IMU time series as input. The DeepPDR pose estimation module sequentially includes a one-dimensional convolutional layer, a batch normalization layer, a GELU activation function, a residual TCN module, a bidirectional GRU module, an attention pooling layer, and a fully connected output layer.
[0083] One-dimensional convolutional layers are used to extract local inertial features within the IMU time window. The residual TCN module expands the temporal perception range and extracts higher-level temporal variation information while preserving input features. A bidirectional GRU module models temporal dependencies within the IMU time window from both forward and backward directions. Attention pooling layers assign weights to features at different time steps and aggregate temporal features into a fixed-length motion feature representation.
[0084] The motion features are input to a shared fully connected layer, and the pose increment and PDR variance are obtained through two output branches. The pose increment regression branch outputs the displacement length and heading change, while the uncertainty estimation branch outputs the PDR variance, which represents the uncertainty of the PDR motion prior. The output of DeepPDR pose estimation is expressed as:
[0085] ;
[0086] in, Indicates the current IMU time window. This represents the DeepPDR pose estimation module, which is composed of the various network layers described above. Indicates the pose increment. Indicates the displacement length. Indicates a change in course. This represents the variance of the PDR.
[0087] Based on the state of the previous moment and the pose increment output by DeepPDR pose estimation, the PDR motion prior for the current moment is constructed. First, the predicted heading angle is calculated based on the heading angle of the previous moment and the current heading change. Then, the prior two-dimensional position for the current moment is calculated based on the displacement length and the predicted heading angle. The PDR motion prior for the current moment is expressed as:
[0088] ;
[0089] in, This represents the prior position of the PDR at the current moment. This prior position provides initial estimates and motion constraints for subsequent differentiable factor graph optimization.
[0090] like Figure 3As shown, the UWBWeightNet reliability estimation module is used to estimate the reliability weight of each UWB base station based on UWB features and base station identity information. This process sets a learnable base station identity embedding for each UWB base station, and then... UWB characteristics of each base station With the identity of the base station The embeddings are concatenated, and the concatenated features are input into a multi-layer fully connected network. The multi-layer fully connected network includes a GELU activation function and a Sigmoid output function. Each UWB base station at time Reliability weight Represented as:
[0091] ;
[0092] in, This represents the UWBWeightNet reliability estimation module, which is a composite mapping composed of the network layers described above. The Sigmoid output function constrains the reliability weights within a stable range, allowing these weights to be used in subsequent UWB distance factor weighting. Through the above processing, the same fixed weights are no longer applied to all UWB base stations; instead, the observation reliability of each base station is estimated based on the current ranging characteristics and base station identity information.
[0093] The differentiable factor graph optimization layer is used to fuse PDR motion priors and UWB distance constraints. This layer receives the previous state, the pose increment and PDR variance output from the DeepPDR pose estimation process, the UWB ranging vector, the UWB effective mask, the UWB reliability weights, and the UWB base station coordinates. This layer first uses the PDR prior position as the initial estimate of the current 2D position, and then constructs the distance constraint based on the UWB base station coordinates and the corrected UWB ranging.
[0094] For the For each UWB base station, the theoretical distance is calculated based on the current estimated location and the base station's coordinates.
[0095] ;
[0096] in, This represents the two-dimensional position estimate of the moving node in the current iteration. and Represent the x-coordinate and y-coordinate in a two-dimensional plane, respectively. Indicates the first Two-dimensional coordinates of a UWB base station This represents the UWB ranging value after bias correction. This indicates the valid UWB mask. If If the distance measurement of that base station is not included in the current optimization, then the distance measurement of that base station will not be included in the current optimization.
[0097] The differentiable factor graph optimization layer constructs PDR motion prior weights based on the PDR variance and distance factor weights based on the UWB reliability weights and the UWB effective mask. A larger PDR variance indicates lower confidence in the PDR prior; a smaller PDR variance indicates higher confidence in the PDR prior. The UWB effective mask is used to eliminate missing ranging measurements, and the UWB reliability weights are used to adjust for the impact of ranging constraints from different base stations.
[0098] The differentiable factor graph optimization layer obtains the current optimization position by minimizing a weighted objective function, which is expressed as:
[0099] ;
[0100] in, Represents the prior weights of PDR motion. Indicates the first The UWB distance factor weight of each base station, where N represents the number of UWB base stations.
[0101] In each iteration, a two-dimensional normal equation is constructed based on the UWB distance residual and the Jacobian vector, and the two-dimensional position update is solved. For the For each UWB base station, its Jacobian vector is represented as:
[0102] ;
[0103] The position update is calculated based on the Jacobian vector, UWB distance residual, PDR motion prior weights, UWB distance factor weights, and damping term, and the current 2D position estimate is updated. In one implementation, the differentiable factor graph optimization layer performs 5 iterations. After the iterations, the optimized 2D position and the predicted heading angle are combined to form the current state.
[0104] ;
[0105] in, and This represents the optimized two-dimensional position. This represents the predicted heading angle obtained based on the heading angle of the previous moment and the heading change of DeepPDR.
[0106] This embodiment connects the DeepPDR pose estimation module, the UWBWeightNet reliability estimation module, and the differentiable factor graph optimization layer into an end-to-end fused positioning model. The current IMU time window is input to the DeepPDR pose estimation module to obtain the pose increment and PDR variance. The current UWB features are input to the UWBWeightNet reliability estimation module to obtain the reliability weights of each UWB base station. The previous state, pose increment, PDR variance, UWB ranging, UWB effective mask, UWB reliability weights, and UWB base station coordinates are jointly input to the differentiable factor graph optimization layer to obtain the current state. Since the differentiable factor graph optimization layer is composed of differentiable tensor operations, the positioning error can be backpropagated to the DeepPDR pose estimation module and the UWBWeightNet reliability estimation module through this layer.
[0107] The end-to-end fusion localization model is trained. During training, the reference trajectory position is used as the supervision label, and joint constraints are applied to the optimized position, PDR relative displacement, PDR prior position, UWB ranging consistency, and motion physics rationality. The total loss function for model training is expressed as:
[0108] ;
[0109] in, This represents the absolute position loss, used to constrain the error between the optimized position and the reference trajectory position. This represents the relative displacement loss of PDR, used to constrain the displacement length output by the DeepPDR pose estimation process; This represents the prior position loss of PDR, used to constrain the rationality of the PDR motion prior; This represents the UWB residual loss, used to constrain the consistency between the positioning results and the effective UWB ranging. This represents the physical constraint loss, used to limit unreasonable displacement lengths and heading changes; , , and This represents the weighting coefficient of each loss term.
[0110] During training, positional perturbations are added to the previous time step's state, and data augmentation is performed on UWB ranging and the effective UWB mask. This includes randomly discarding some effective UWB rangings, adding random noise to effective UWB rangings, and adding non-line-of-sight anomaly perturbations to some effective UWB rangings. This processing exposes the model to UWB observations of varying quality during training, thereby enhancing the model's adaptability to UWB missing data and ranging anomalies.
[0111] This embodiment also employs a closed-loop training method to enhance the stability of state recursion. During closed-loop training, the state output by the model at the previous time step is used as the input state at the next time step. The model parameters are updated based on the error between the predicted position obtained from the closed-loop recursion and the reference trajectory position. Furthermore, a smoothing constraint is applied to the continuous predicted trajectory. This smoothing constraint is constructed based on the changes in adjacent predicted positions to reduce local jitter in the predicted trajectory.
[0112] During the localization inference phase, the initial state of the mobile node is first determined. The initial two-dimensional position is estimated based on UWB ranging data from several initial time points. If multiple initial position estimates are available, the median of these positions is used as the initial position, and the initial heading angle is estimated based on the changes in the initial position sequence. If the initial UWB ranging is insufficient to stably estimate the position, the previous state from the sample is used as the initial state.
[0113] After determining the initial state, an autoregressive recursion is performed in chronological order. For the current moment, the current IMU time window, current UWB features, current UWB ranging, current UWB effective mask, and the state from the previous moment are input into the trained fusion localization model. The fusion localization model outputs the current state. Subsequently, the current output state is used as the input state for the next moment. This process is executed continuously in chronological order, ultimately yielding the indoor positioning trajectory of the mobile node.
[0114] Through the above process, this embodiment utilizes DeepPDR pose estimation to extract short-term motion information from the IMU time window, uses UWBWeightNet reliability estimation to estimate the ranging reliability of different UWB base stations, and uses a differentiable factor graph optimization layer to unify PDR motion priors and UWB distance constraints into a trainable optimization framework. This method can maintain continuous output of indoor positioning trajectories even when UWB ranging is missing, there is noise, or there are differences in base station reliability.
[0115] The following sections validate the indoor UWB / IMU fusion positioning method based on deep learning and differentiable factor graph optimization in this embodiment through two parts: simulation verification and real-dataset experiments. Simulation verification analyzes the positioning performance of the method under different ranging error conditions. Real-dataset experiments verify the applicability of the method on actually acquired UWB ranging data and IMU inertial data.
[0116] In the simulation verification, a continuous two-dimensional motion trajectory was constructed as the real trajectory of the mobile node. This trajectory includes multiple turning segments and motion segments in different directions to simulate the complex motion process of the indoor mobile node. The simulation trajectory contains a total of 520 sampling points. Five UWB base stations were set in the simulation area, with two-dimensional coordinates of (120.92,−72.95), (308.24,−71.36), (−38.97,330.65), (40.95,563.00), and (555.20,203.36) respectively, in cm. The simulation process calculates the true distance based on the real position of the mobile node and the coordinates of the UWB base stations, and adds ranging noise to the true distance. The standard deviation of the LOS ranging noise was set to 3.5 cm, and the probability of NLOS error occurrence was set to 0.35.
[0117] This embodiment sets up three simulation scenarios. The first scenario is a no-NLOS scenario, which only includes LOS random ranging noise. The second scenario is a Gaussian-distributed NLOS scenario, which superimposes a Gaussian-distributed positive bias onto some UWB ranging values, with the mean and standard deviation set to 20cm / 5cm, 50cm / 15cm, and 80cm / 25cm, respectively. The third scenario is a gamma-distributed NLOS scenario, which superimposes a gamma-distributed positive bias onto some UWB ranging values, with shape parameters... All are set to 2, scale parameter The distances were set to 10cm, 25cm, and 40cm, respectively. In each simulation scenario, the generated UWB ranging data and inertial motion priors were input into the method of this embodiment, and a predicted trajectory was output. Subsequently, the predicted trajectory was compared with the actual trajectory, and the two-dimensional position error of each sampling point was calculated. This embodiment uses root mean square error (RMSE) and P95 error to evaluate the positioning effect. The RMSE reflects the overall positioning deviation, while the P95 error reflects the upper bound of the position error for 95% of the test samples.
[0118] Figure 4 The cumulative distribution function curve of the position error of the method in this embodiment is shown when there is no NLOS error. Figure 5 The trajectory tracking performance of the method in this embodiment is demonstrated in the absence of NLOS error, with a sample size of 520 and a mean absolute error of 1.8 cm. In the NLOS-free scenario, the mean absolute error of the method in this embodiment is 1.8 cm, the maximum error is 5.7 cm, the root mean square error is 1.99 cm, and the P95 error is 3.54 cm. Experimental results show that, under the condition of only LOS random ranging noise, the method of this embodiment can output a continuous and stable predicted trajectory.
[0119] Figure 6The cumulative distribution function curves of the position error of the method in this embodiment are shown when the NLOS error follows a Gaussian distribution, under different NLOS mean and standard deviation conditions. Figure 7 , Figure 8 , Figure 9 This demonstrates the trajectory tracking performance of the method in this embodiment under different NLOS mean and standard deviation conditions when the NLOS error follows a Gaussian distribution. In a Gaussian NLOS scenario with a mean of 20cm and a standard deviation of 5cm, as shown... Figure 7 As shown, the root mean square error of the method in this embodiment is 9.17 cm, and the P95 error is 15.95 cm. In a Gaussian NLOS scenario with a mean of 50 cm and a standard deviation of 15 cm, as... Figure 8 As shown (legend and) Figure 7 (Same as above), the root mean square error of the method in this embodiment is 19.15 cm, and the P95 error is 34.36 cm. In a Gaussian NLOS scene with a mean of 80 cm and a standard deviation of 25 cm, such as Figure 9 As shown (legend and) Figure 7 (Same as above), the root mean square error of the method in this embodiment is 21.07 cm, and the P95 error is 42.69 cm. Experimental results show that as Gaussian NLOS interference increases, the overall positioning error increases, but the method in this embodiment can still maintain continuous trajectory output.
[0120] Figure 10 The cumulative distribution function curves of the position error of the method in this embodiment are shown under different shape and scale parameters when the NLOS error follows a gamma distribution. Figure 11 , Figure 12 , Figure 13 This demonstrates the trajectory tracking performance of the method in this embodiment under different shape and scale parameters when the NLOS error follows a gamma distribution. =2. Scale parameters In a gamma NLOS scene with a height of 10cm, such as Figure 11 As shown, the root mean square error of the method in this embodiment is 7.94 cm, and the P95 error is 14.48 cm. Regarding shape parameters... =2. Scale parameters In a gamma NLOS scene with a height of 25cm, such as Figure 12 As shown (legend and) Figure 11 (Same as above), the root mean square error of the method in this embodiment is 13.84 cm, and the P95 error is 24.88 cm. With shape parameter k=2 and scale parameter... In a gamma NLOS scene with a height of 40cm, such as Figure 13 As shown (legend and) Figure 11(Same as above), the root mean square error of the method in this embodiment is 15.89 cm, and the P95 error is 29.91 cm. Experimental results show that under NLOS ranging errors with positive skewness and asymmetric distribution characteristics, the method in this embodiment can still maintain a relatively stable trajectory tracking effect.
[0121] In the real-world dataset experiments, the RoboLoc-G multi-sensor localization dataset was used. This dataset contains UWB, IMU, and high-precision three-axis gantry reference positions, which can be used to verify multi-sensor fusion localization algorithms. This embodiment uses the UWB ranging data, IMU inertial data, and reference trajectory data from this dataset. The trajectories in the dataset include circle, zigzag1, zigzag2, random1, zigzag3, zigzag4, random2, and still. The circle, zigzag1, and random2 trajectories were used as training data, the zigzag3 trajectory was used as validation data, and the random1 trajectory was used as test data. During the training phase, data preprocessing, sample construction, and model training were performed according to the method described in this embodiment. During the testing phase, autoregressive localization inference was performed on the random1 trajectory, and the true 2D position, predicted 2D position, and position error were output.
[0122] Figure 14 The cumulative distribution function curve of the location error of the method in this embodiment is shown in a real dataset experiment. Figure 15 The trajectory tracking performance of the method in this embodiment is demonstrated in a real-world dataset experiment. On the random1 test trajectory, the root mean square error of the method in this embodiment is 11.97 cm, and the P95 error is 19.27 cm. Experimental results show that the method in this embodiment can process real-world UWB ranging data and IMU inertial data, and can output continuous indoor positioning trajectories.
[0123] In summary, the method of this embodiment was validated through experiments with no NLOS, Gaussian distributed NLOS, gamma distributed NLOS, and real datasets. The validation results show that the method of this embodiment can achieve continuous indoor positioning under different ranging error conditions and real data conditions, and can still maintain continuous and stable trajectory output even when the NLOS error distribution and interference intensity change. It has good adaptability to both Gaussian and gamma-type NLOS ranging errors with positive bias and asymmetric characteristics. Furthermore, it can still achieve stable position estimation under real-world UWB ranging data and IMU inertial data conditions, indicating that the method of this embodiment has good resistance to ranging noise and NLOS interference, trajectory continuity, and applicability to real indoor environments.
[0124] Example 2:
[0125] This embodiment provides an indoor UWB / IMU fusion positioning system based on deep learning and differentiable factor graph optimization, used to implement the method described in Embodiment 1. The system includes:
[0126] The data preprocessing module is used to preprocess UWB ranging data, IMU inertial data, and reference trajectory data. This module unifies the timestamps and sorts the UWB, IMU, and reference trajectory data by time, and performs height compensation on the raw UWB ranging data to obtain two-dimensional UWB ranging. This module also performs SSA denoising on the two-dimensional UWB ranging, constructs ranging difference features based on signal strength, and standardizes the IMU's three-axis acceleration and three-axis angular velocity.
[0127] The base station deviation calibration module is used to calibrate the ranging deviation of each UWB base station. This module aligns the UWB ranging data with the reference trajectory data in time and calculates the true 2D distance based on the base station coordinates and the reference trajectory position. The module further calculates the residual between the UWB 2D ranging and the true 2D distance, and uses the median of the residuals for the same base station in the training trajectory as the ranging deviation for that base station. This ranging deviation is used to correct the UWB ranging values input into the subsequent fusion positioning model.
[0128] The sample construction module is used to construct fused positioning samples. This module extracts IMU six-axis data according to a fixed time window to form the IMU time window input. The module also searches for UWB ranging data near the current reference time and constructs a UWB feature matrix, UWB ranging vector, and UWB effective mask according to a preset base station order. This module further constructs the previous time-state, which includes two-dimensional position and heading angle.
[0129] The DeepPDR pose estimation module estimates the pose increment and PDR variance of a moving node based on an IMU time window. This module includes one-dimensional convolution, residual TCN, bidirectional GRU, attention pooling, and a fully connected output layer. The pose increment output by this module includes displacement length and heading change, and the PDR variance represents the uncertainty of the motion prior.
[0130] The UWBWeightNet reliability estimation module estimates the reliability weights of each UWB base station. This module sets a learnable identity embedding for each base station and concatenates the base station identity embedding with the corresponding UWB features. The concatenated features are then processed through a fully connected network, a GELU activation function, and a sigmoid output function to obtain the reliability weights of the corresponding base station.
[0131] The differentiable factor graph optimization module is used to fuse PDR motion priors and UWB distance constraints. This module constructs the PDR motion prior based on the previous state and pose increment, and constructs the distance residual based on the UWB base station coordinates and the corrected UWB ranging. The module utilizes a valid UWB mask to eliminate missing ranging measurements and uses reliability weights to adjust for the impact of each base station's distance constraints. This module uses damped least squares iterative updates to the two-dimensional position and outputs the current two-dimensional position and heading angle.
[0132] The training and evaluation module is used to train the fusion localization model and evaluate the localization results. This module uses the reference trajectory position as supervision information to perform end-to-end training on the DeepPDR pose estimation module, the UWBWeightNet reliability estimation module, and the differentiable factor graph optimization module. The training process employs absolute position loss, PDR relative displacement loss, PDR prior position loss, UWB residual loss, and physical constraint loss. This module is also used to perform UWB data augmentation, loop closure training, and trajectory smoothing constraints.
[0133] The positioning output module is used to output a continuous indoor positioning trajectory during the positioning phase. This module outputs the current positioning status based on the initial state, the current IMU time window, the current UWB features, the current UWB ranging, and the effective UWB mask, and uses the current output status as the input status for the next moment until the positioning output of the entire trajectory is completed.
[0134] In this embodiment, the output of the data preprocessing module is passed to the base station deviation calibration module and the sample construction module. The IMU time window generated by the sample construction module is input to the DeepPDR pose estimation module, the generated UWB features are input to the UWBWeightNet reliability estimation module, and the generated UWB ranging vector, UWB effective mask, and previous time state are input to the differentiable factor graph optimization module. The differentiable factor graph optimization module outputs the current positioning state, and the positioning output module recursively obtains the continuous trajectory in chronological order.
[0135] Example 3:
[0136] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the indoor UWB / IMU fusion positioning method based on deep learning and differentiable factor graph optimization as described in Embodiment 1.
[0137] The electronic device can be a mobile phone, computer, or tablet computer, etc., and includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the indoor UWB / IMU fusion positioning method based on deep learning and differentiable factor graph optimization as described in Example 1. It is understood that the electronic device may also include input / output (I / O) interfaces and communication components.
[0138] The processor is used to execute all or part of the steps in the indoor UWB / IMU fusion positioning method based on deep learning and differentiable factor graph optimization as described in Embodiment 1 above. The memory is used to store various types of data, which may include, for example, instructions for any application or method in the electronic device, as well as application-related data.
[0139] The processor can be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, and is used to execute the indoor UWB / IMU fusion positioning method based on deep learning and differentiable factor graph optimization described in Embodiment 1 above.
[0140] Example 4:
[0141] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0142] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the indoor UWB / IMU fusion positioning method based on deep learning and differentiable factor graph optimization as described in various embodiments 1 of this application.
[0143] The aforementioned storage media include: flash memory, hard disk, multimedia card, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory, random access memory (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disk, optical disk, server, APP (Application) application store, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the indoor UWB / IMU fusion positioning method based on deep learning and differentiable factor graph optimization described in Embodiment 1.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the present invention.
Claims
1. An indoor UWB / IMU fusion positioning method, characterized in that: Includes the following steps: S1. Acquire UWB ranging data, IMU inertial data, and reference trajectory data for training or calibration of the mobile node; The UWB ranging data includes a ranging timestamp, base station number, ranging value, and signal strength value; the IMU inertial data includes triaxial acceleration and triaxial angular velocity; the reference trajectory data includes the position data of the moving node in the reference coordinate system. S2. Preprocess the UWB ranging data, IMU inertial data and reference trajectory data, including timestamp dimension unification, time sorting, UWB height compensation, UWB ranging smoothing, signal strength feature construction and IMU data standardization; The spatial slant range between the UWB tag and the base station is converted into a two-dimensional planar ranging through UWB height compensation; ranging consistency features are generated by constructing ranging features through signal strength features; and a standardized inertial sequence adapted to the input of the deep network is obtained through IMU data standardization. S3. Based on the reference trajectory data, complete the ranging deviation calibration of each UWB base station: The UWB ranging data is time-aligned with the reference trajectory data. The true two-dimensional distance is calculated based on the reference trajectory position and the coordinates of the UWB base station. The ranging residual between the UWB two-dimensional plane ranging and the true two-dimensional distance is calculated. The ranging deviation of each UWB base station is determined based on the residual distribution, and the UWB ranging value is corrected using the ranging deviation. S4. Construct fused localization samples; The fused positioning sample includes an IMU time window, a UWB feature matrix, a UWB ranging vector, a UWB effective mask, the previous time state, and a current two-dimensional position label; the IMU time window consists of continuous three-axis acceleration and three-axis angular velocity; the UWB effective mask indicates whether the corresponding base station has effective ranging near the current reference time; the previous time state includes the previous two-dimensional position and heading angle; S5. Input the IMU time window into the DeepPDR pose estimation module to estimate the pose increment of the moving node and the PDR variance within the current time window. The pose increment includes displacement length and heading change; The DeepPDR pose estimation module sequentially includes a one-dimensional convolutional layer, a batch normalization layer, a GELU activation function, a residual temporal convolutional network, a bidirectional gated recurrent unit, an attention pooling layer, and a fully connected output layer. S6. Combine the state of the previous moment with the pose increment output by the DeepPDR pose estimation module to construct the PDR motion prior. The predicted heading angle is obtained based on the heading angle and heading change at the previous moment. The PDR prior two-dimensional position at the current moment is calculated by combining the displacement length and the predicted heading angle. S7. Use the UWB reliability estimation module to estimate the reliability weight of each UWB base station; A learnable base station identity embedding is configured for each UWB base station. The base station UWB features and the base station identity embedding are concatenated and then input into a multi-layer fully connected network. The output is a reliability weight used to adjust the contribution of UWB distance constraints. The multi-layer fully connected network includes a GELU activation function and a Sigmoid output function. S8. The PDR motion prior and UWB distance constraint are fused through a differentiable factor graph optimization layer. Using the PDR motion prior as the initial estimate of the current two-dimensional position, and then constructing distance constraints based on the UWB base station coordinates and the corrected UWB ranging; By combining the effective UWB mask to eliminate missing ranging, and using the reliability weights of each base station to weight the UWB distance constraint, the weighted objective function is minimized. The optimized current two-dimensional position is obtained through damped least squares iteration, and the current positioning status is obtained by combining the predicted heading angle. S9, Model Training; The DeepPDR pose estimation module, the UWB reliability estimation module, and the differentiable factor graph optimization layer constitute an end-to-end fusion localization model. The differentiable factor graph optimization layer supports error backpropagation and uses a multi-constraint loss function to jointly train the end-to-end fusion localization model. The training process includes UWB data augmentation, closed-loop training, and trajectory smoothing constraints. S10, Localization Inference Stage: Determine the initial state of the mobile node, and input the IMU time window, UWB features, UWB ranging, UWB effective mask and the state of the previous moment into the trained end-to-end fusion localization model in an autoregressive manner, output the localization state at each moment, and use the output state at the current moment as the input state at the next moment, and continuously generate the indoor localization trajectory of the mobile node.
2. The indoor UWB / IMU fusion positioning method according to claim 1, characterized in that: The formula for calculating the two-dimensional plane ranging for UWB height compensation in step S2 is as follows: ; in, Let be the original ranging value of the i-th UWB base station at time t. Let i be the height of the i-th UWB base station. The height of the moving node label; This is a preset lower limit term, used to avoid the value within the square root being too small, thus ensuring calculation stability; The UWB ranging smoothing specifically involves: performing singular spectrum analysis to denoise the two-dimensional plane ranging sequence of each UWB base station, that is, constructing a trajectory matrix for the two-dimensional plane ranging sequence of the same UWB base station, performing singular value decomposition on the trajectory matrix, retaining the main singular components, and obtaining smooth two-dimensional ranging through sequence reconstruction. The specific method for constructing and generating ranging consistency features based on signal strength features is as follows: The signal strength of the i-th UWB base station at time t is used to derive the distance. Represented as: ; in, For reference signal strength, The current signal strength, The path loss index; Further calculations reveal the difference between the UWB height-compensated two-dimensional plane ranging and the distance derived from signal strength, yielding ranging difference characteristics. for: ; Therefore, the UWB characteristics of the i-th UWB base station at time t This includes smooth two-dimensional ranging, distance derived from signal strength, and ranging difference characteristics, expressed as: ; in, This represents UWB smoothed two-dimensional ranging after noise reduction processing; the UWB features That is, the ranging consistency feature is used for subsequent UWB base station reliability weight estimation; The IMU data standardization in step S2 specifically involves extracting triaxial acceleration and triaxial angular velocity, and performing Z-Score standardization on each IMU channel.
3. The indoor UWB / IMU fusion positioning method according to claim 2, characterized in that: The method for determining the ranging deviation in step S3 is as follows: The effective ranging residuals of the i-th UWB base station in the training trajectory are summarized, and the median of this effective ranging residual sequence is used as the ranging bias of the corresponding base station, as shown in the following formula: ; in, This represents the ranging error of the i-th UWB base station. This represents the ranging residual of the i-th UWB base station at time t; The corrected UWB ranging value is: ; in, This indicates the corrected UWB ranging value; This indicates the preset lower limit of the distance measurement, used to prevent the corrected distance from being too small for physical values.
4. The indoor UWB / IMU fusion positioning method according to claim 3, characterized in that: The effective UWB mask is determined in the following manner: If a UWB base station has valid ranging within the current time range, the ranging data with the smallest time difference is selected, and the effective mask of that base station is set to 1; if the UWB base station does not have valid ranging within the current time range, the effective mask of that base station is set to 0; The effective mask representation of a UWB base station at time t is: 。 5. The indoor UWB / IMU fusion positioning method according to claim 4, characterized in that: In the DeepPDR pose estimation module, a one-dimensional convolutional layer extracts local inertial features from the IMU time window; a residual temporal convolutional network expands the temporal perception range and extracts higher-level temporal change information while retaining input features; a bidirectional gated recurrent unit models the temporal dependencies in the IMU time window from both forward and reverse directions; an attention pooling layer assigns weights to features at different time steps and aggregates the temporal features into a fixed-length motion feature representation; a fully connected output layer receives the motion feature representation and sets up dual output branches, one branch outputting the pose increment; and the other branch outputting the PDR variance, which represents the prior uncertainty of PDR motion.
6. The indoor UWB / IMU fusion positioning method according to claim 5, characterized in that: The weighted objective function of the differentiable factor graph optimization layer is: ; in, Represents the prior weights of PDR motion. This represents the prior two-dimensional position of the PDR motion at the current moment; This represents the two-dimensional position estimate of the moving node in the current iteration. and Represent the x-coordinate and y-coordinate in a two-dimensional plane, respectively. Indicates the first UWB distance factor weights of each base station at time t Indicates the first The two-dimensional coordinates of a UWB base station, where N represents the total number of UWB base stations.
7. The indoor UWB / IMU fusion positioning method according to claim 6, characterized in that: The multi-constraint loss function is: ; in, This represents the absolute position loss, used to constrain the error between the optimized position and the reference trajectory position. This represents the relative displacement loss of PDR, used to constrain the displacement length output by the DeepPDR pose estimation process; This represents the prior position loss of PDR, used to constrain the rationality of the PDR motion prior; This represents the UWB residual loss, used to constrain the consistency between the positioning results and the effective UWB ranging. This represents the physical constraint loss, used to limit unreasonable displacement lengths and heading changes; , , and Represents the weighting coefficients of each loss term; The UWB data augmentation methods in the model training include: randomly discarding some effective UWB ranging, adding random noise to effective UWB ranging, and adding non-line-of-sight anomalies to some effective UWB ranging; closed-loop training uses the output state of the model at the previous time step as the input state at the next time step, and updates the model parameters based on the error between the predicted position obtained by closed-loop recursion and the reference trajectory position; trajectory smoothing constraints are constructed based on the changes of adjacent predicted positions to suppress local jitter in the predicted trajectory.
8. An indoor UWB / IMU fusion positioning system for implementing the indoor UWB / IMU fusion positioning method of claim 1, characterized in that: The system includes a data preprocessing module, a base station deviation calibration module, a sample construction module, a DeepPDR pose estimation module, a UWBWeightNet reliability estimation module, a differentiable factor graph optimization module, a training and evaluation module, and a positioning output module. The output of the data preprocessing module is passed to the base station deviation calibration module and the sample construction module. The IMU time window generated by the sample construction module is input to the DeepPDR pose estimation module, the generated UWB features are input to the UWBWeightNet reliability estimation module, and the generated UWB ranging vector, UWB effective mask, and previous time state are input to the differentiable factor graph optimization module. The differentiable factor graph optimization module outputs the current positioning status, and the positioning output module recursively obtains the continuous trajectory in chronological order. The UWB ranging data, IMU inertial data, and reference trajectory data are provided by external data sources, including but not limited to existing UWB positioning devices, IMU sensors, and public datasets. The data preprocessing module is used to perform timestamp unification, time sorting, UWB altitude compensation, UWB ranging smoothing, signal strength feature construction, and IMU data standardization on UWB ranging data, IMU inertial data, and reference trajectory data received from external data sources. The preprocessed data is output to the base station deviation calibration module and the sample construction module; The base station deviation calibration module is used to calculate the ranging residual of each UWB base station based on the reference trajectory position and UWB base station coordinates, and to determine the ranging deviation of each UWB base station based on the ranging residual, which is used to correct the UWB ranging value of the subsequent input fusion positioning model. The sample construction module is used to construct fused localization samples based on the IMU time window, UWB feature matrix, UWB ranging vector, UWB effective mask and previous state, and is also used to generate location labels for the training phase based on reference trajectory data. The DeepPDR pose estimation module is used to extract short-term inertial motion features based on the IMU time window and output the pose increment and PDR variance of the moving node; the pose increment includes displacement length and heading change. The UWBWeightNet reliability estimation module is used to output the reliability weight of each base station based on the UWB features and base station identity embedding of each base station; the reliability weight is used to adjust the role of the corresponding UWB distance constraint in the differentiable factor graph optimization layer. The differentiable factor graph optimization module is used to perform iterative optimization based on PDR motion priors, UWB ranging, UWB effective mask and UWB reliability weights, and output the optimized current positioning status. The training and evaluation module is used to perform end-to-end training on the end-to-end fusion localization model composed of the DeepPDR pose estimation module, the UWBWeightNet reliability estimation module, and the differentiable factor graph optimization module based on reference trajectory data, and is used to calculate the error index of the fusion localization result. The positioning output module is used to recursively calculate the status in chronological order during the positioning phase and output the two-dimensional position and heading angle of the moving node to obtain a continuous indoor positioning trajectory.
9. An electronic device, characterized in that: It includes one or more processors and a memory for storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the indoor UWB / IMU fusion positioning method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: It stores executable instructions that, when executed, cause the processor to perform the indoor UWB / IMU fusion positioning method according to any one of claims 1-7.
