UWB / INS adaptive positioning method and system based on deep learning
By combining IMU sensors, Kalman filters and an LSTM model based on attention mechanism, the positioning accuracy and stability of the UWB/INS fusion system in the NLOS environment is solved, and high-precision positioning in complex environments is achieved.
Patent Information
- Application Number
- CN202510467728.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-15
AI Technical Summary
The existing UWB/INS fusion methods are difficult to achieve high-precision positioning in complex environments, especially under NLOS conditions, which have problems with insufficient positioning accuracy and poor stability, and the spatial and temporal correlation and dynamic adaptability are not fully explored during multi-sensor fusion.
The UWB/INS adaptive positioning method based on deep learning is adopted to calculate the INS drift cumulative error through the IMU sensor, and a priori state estimation is used using a Kalman filter. The LSTM model based on attention mechanism is constructed to predict the UWB increment, and the LSTM parameters are updated through the loss function, and the positioning accuracy optimization is performed in combination with the Kalman filter under NLOS conditions.
It significantly improves the positioning accuracy and robustness in the NLOS environment, slows down the accuracy degradation in UWB signal occlusion or multipath situations, reduces the cumulative error of INS, and provides higher positioning accuracy and stability.
Smart Images

Figure CN120368979A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated navigation and positioning in complex environments, and particularly to an adaptive positioning method and system for UWB / INS based on deep learning. Background Art
[0002] With the development of driverless vehicles, drone navigation, the Internet of Things, and intelligent transportation systems, there is an increasing demand for achieving high-precision positioning in complex environments such as cities. Ultra-wideband (UWB) technology, due to its high positioning accuracy and good anti-interference ability, is widely used in indoor and outdoor positioning scenarios. However, in scenarios with building blockages or multipath environments, the positioning performance of UWB is severely affected by non-line-of-sight (NLOS) propagation. In contrast, an inertial navigation system (INS) can provide continuous pose updates, but it has its own cumulative error drift. Therefore, integrating the complementary advantages of UWB and INS to achieve high-precision positioning has become a key issue for high-precision navigation in complex scenarios. UWB can provide high-precision ranging, and INS ensures the continuity and autonomy of the system. The combination of the two can improve the positioning robustness and accuracy.
[0003] Traditional UWB / INS integration mainly uses methods such as extended Kalman filter (EKF) or particle filter (PF). Although these methods can improve positioning accuracy to a certain extent, they are still inadequate in dealing with ranging anomalies and uneven distributions caused by NLOS, and their adaptability to dynamically changing environments is also relatively limited. With the rapid development of machine learning technology, the technology of using deep learning methods to generate UWB pseudo-observations has gradually been applied to the field of UWB / INS integration. For example, recurrent neural networks (RNNs), long short-term memory networks (LSTMs), etc. perform well in processing time-series data and can be used to predict lost or damaged UWB measurements to reduce the impact of NLOS on accuracy. In addition, the attention mechanism that has emerged in recent years can model long-distance dependencies by dynamically allocating weights and supports parallel processing, showing excellent performance in time-series data analysis, which also brings new research ideas for the positioning of UWB / INS systems in complex scenarios. Although some related research has made certain progress, there are still the following deficiencies: First, the generalization ability of many deep learning methods is still insufficient in highly dynamic and complex actual environments, and it is difficult to accurately capture the rapid changes in motion patterns. Second, when fusing multiple sensors, simple feature splicing is often performed, and the spatio-temporal correlation between UWB and INS cannot be fully exploited. Third, sequence models such as LSTM have the characteristic of serial processing, and the inference efficiency is relatively low, making it difficult to meet the requirements of real-time applications. In more complex NLOS scenarios and highly dynamic environments, the robustness of existing methods is still insufficient, and further research and exploration are urgently needed. Summary of the Invention
[0004] In view of the above problems, the present invention proposes a UWB / INS adaptive positioning method and system based on deep learning, which is used to solve the positioning accuracy and stability problems of the UWB / INS fusion system in the NLOS environment. To solve the above technical problems, the present invention provides the following technical solutions:
[0005] The present invention provides a UWB / INS adaptive positioning method based on deep learning, including:
[0006] S1: Under LOS conditions, through the IMU sensor data, calculate the attitude, velocity, and position of the INS, and calculate the cumulative INS drift error; obtain the UWB measurement through the UWB device;
[0007] S2: Use the Kalman filter to perform prior state estimation on UWB / INS and determine the fusion mode, and perform fusion according to the error state vector in the fusion mode;
[0008] S3: Construct an LSTM based on the attention mechanism, input the attitude, velocity, position of the INS and the UWB measurement into the LSTM based on the attention mechanism for training, and predict the UWB increment at the current moment;
[0009] S4: Define the difference between the predicted UWB increment and the actual observed value as the innovation sequence, calculate the loss function according to the innovation sequence and update the parameters of the LSTM based on the attention mechanism to obtain the trained LSTM based on the attention mechanism;
[0010] S5: Under NLOS conditions, use the trained LSTM based on the attention mechanism to update the Kalman filter to achieve positioning accuracy.
[0011] Further, the S1 includes:
[0012] Calculating the cumulative INS drift error specifically as:
[0013] The attitude error model of INS Is expressed as:
[0014]
[0015] Where the superscript n represents the navigation coordinate system, ω in And δω in Are respectively the angular velocity of the n system relative to the i system and its error, δω ib Is the angular velocity error of the b system relative to the i system, and θ is the attitude angle error;
[0016] The velocity error model Is:
[0017]
[0018] wherein, δa n is the acceleration error, ω ie and δω ie are the angular velocity of the e - system relative to the i - system and its error respectively, a is the acceleration, v and δv are the velocity and its error respectively, δg p is the gravitational acceleration error;
[0019] The position error model can be expressed as:
[0020]
[0021] wherein, and are the differentials of the latitude, longitude and altitude errors respectively, λ, h are the latitude, longitude and altitude respectively, δλ, δh are the latitude, longitude and altitude errors respectively, V N is the north - ward velocity, V E is the east - ward velocity, V D is the downward velocity, tan is the tangent function, cos is the cosine function, R M and R N are the local radii of curvature of the meridian and the prime vertical respectively.
[0022] Furthermore, the S2 includes:
[0023] Estimate the UWB / INS state using a Kalman filter, which is divided into two parts: prediction and update. Specifically:
[0024] Assume that the linear state - space model of UWB / INS is as follows:
[0025] The state - transition equation is:
[0026] x k = F k-1 x k-1 + w k-1
[0027] where x k is the state vector at time k, x k-1 is the state vector at time k - 1, F k-1 is the state - transition matrix, w k-1 is the process noise, which satisfies a zero - mean Gaussian distribution w k-1 ~ N(0, Q k-1 ), Q k -1 is the process - noise covariance distribution;
[0028] The measurement equation is:
[0029] z k= H k x k + v k
[0030] where z k is the measurement vector, H k is the measurement matrix, v k is the measurement noise, which also follows a zero-mean Gaussian distribution v k ~ N(0, R k ), and R k is the covariance distribution of the measurement noise;
[0031] The prediction step of the Kalman filter is as follows:
[0032]
[0033] where is the prior state estimate at time k, is the posterior state estimate, P k|k-1 is the predicted error covariance matrix, P k-1|k-1 is the posterior error covariance matrix, is the transition matrix;
[0034] The update step balances the uncertainties of prediction and measurement through the Kalman gain:
[0035]
[0036] where K k is the gain matrix, is the measurement matrix;
[0037] Obtain the new prior state estimate and the error covariance P k|k :
[0038]
[0039] P k|k = (I - K k H k ) P k|k-1 .
[0040] Furthermore, the S2 includes:
[0041] The fusion mode is the loose coupling mode. To fuse UWB / INS through the loose coupling mode, specifically:
[0042] In the loose coupling mode, UWB and INS calculate their positions independently, and then use the Kalman filter to perform data fusion based on the error state vector; the loose coupling error state vector can be written as:
[0043]
[0044] where δp k , δv k , and δθ k are the position, velocity, and attitude errors of the INS respectively, δb a and δb g represent the zero bias errors of the accelerometer and gyroscope respectively, [] T is the transpose;
[0045] The Kalman filter uses the loosely coupled error state vector and the measurement equation to recursively update the state estimate, thereby correcting the drift of the INS and improving the positioning accuracy.
[0046] Furthermore, the S2 includes:
[0047] The fusion mode is the tight coupling mode, and UWB / INS is fused through the tight coupling mode, specifically:
[0048] In the tight coupling mode, the UWB ranging information will directly enter the Kalman filter together with the INS data. The tight coupling error state vector is:
[0049]
[0050] where, δb r represents the UWB ranging bias;
[0051] The measurement equation in the tight coupling mode: Based on the original ranging values of several UWB base stations, the state is updated according to the difference between the INS estimate and the true measurement:
[0052]
[0053] After linearization, we can get:
[0054]
[0055] where, z i k is the measurement residual of the i-th UWB base station, and are the INS estimated position and the base station position respectively, represents the corresponding ranging bias error, is the measurement noise obeying the Gaussian distribution, |||| represents the modulus value, p k represents the current position vector calculated by the INS, represents the measurement matrix in the tight coupling mode, indicating the linear approximation influence of the measurement variable on the error state vector ;
[0056] The Kalman filter is used to recursively update the state estimate according to the tightly coupled error state vector and its measurement equation.
[0057] Furthermore, the S3 includes:
[0058] S31: Construct an attention mechanism, and weight the input by defining a normalized attention matrix to obtain the weighted output, specifically:
[0059] Let the input sequence be where \(R\) is the set of real numbers, \(n\) is the sequence length, and \(m\) is the feature dimension;
[0060] First, obtain the Key, Query, and Value matrices through linear transformation:
[0061] \(K = W\) k \(X\)
[0062] \(Q = W\) q \(X\)
[0063] \(V = W\) v \(X\)
[0064] where \(K\in R\) d×n , \(d\) is the hidden layer dimension; \(Q\in R\) d×n , \(V\in R\) m×n , \(W\) k \(\in R\) d×m , \(W\) q \(\in R\) d×m and \(W\) v \(\in R\) m×m are all trainable linear transformations;
[0065] The attention weight matrix \(E\in R\) n×n is calculated as:
[0066]
[0067] where Softmax is used to normalize each column to ensure that the sum of the attention weights is 1;
[0068] Finally, the output matrix \(O\) is:
[0069] \(O = VE\)
[0070] S32: Construct an LSTM by introducing a cell state and a gating mechanism internally. The gating mechanism includes a forget gate, an input gate, and an output gate, specifically:
[0071] Forget gate:
[0072] \(f\) t \(=\sigma(W\) f \(\cdot[h\) t-1 , \(x\)t +b f )
[0073] Among them, f t is the activation value of the forget gate, controlling the degree of forgetting of the previous cell state, W f is the weight matrix of the forget gate, h t-1 represents the previous hidden state, x t represents the current input, b f represents the bias term of the forget gate, and σ represents the Sigmoid activation function;
[0074] Input gate:
[0075] i t = σ(W i · [h t-1 , x t + b i )
[0076] Among them, i t is the activation value of the input gate, controlling the influence degree of the current input on the cell state, W i is the weight matrix of the input gate, b i is the bias term of the input gate;
[0077] Cell state:
[0078]
[0079] Among them, W C is the weight matrix of the cell state, b C is the bias of the cell state, is the cell state, and tanh is the hyperbolic tangent function;
[0080] Cell state update C t :
[0081]
[0082] Among them, ⊙ represents element-wise multiplication;
[0083] Output gate:
[0084] o t = σ(W o · [h t-1 , x t + b o )
[0085] Among them, o t is the activation value of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate;
[0086] Hidden state update:
[0087] h t = o t ☉tanh(C t )
[0088] where h t is the current hidden state;
[0089] S33: Learn the temporal features from the INS through LSTM and predict the UWB increment.
[0090] Furthermore, the S33 includes:
[0091] In the loose coupling mode, use the LSTM based on the attention mechanism to predict the UWB increment, and the UWB increment is the UWB position increment. Specifically:
[0092] The LSTM based on the attention mechanism learns to map the input to the UWB position increment at the current moment k within the time window T
[0093]
[0094] where f NN,LC represents the LSTM of the attention mechanism; is the IMU acceleration, high frequency n1; is the IMU angular velocity, with the same frequency as the acceleration; is the attitude angle solved by the INS, with a frequency of n2; is the velocity solved by the INS; the position solved by the INS, is the UWB position increment, the lowest frequency n3.
[0095] Furthermore, the S33 includes:
[0096] In the tight coupling mode, use the LSTM based on the attention mechanism to predict the UWB increment, and the UWB increment is the UWB ranging increment Specifically:
[0097] The LSTM based on the attention mechanism learns to map the input to the UWB ranging increment at the current moment k within the time window T:
[0098]
[0099] where is the UWB original ranging.
[0100] Furthermore, the S4 includes:
[0101] In the Kalman filter, calculate the innovation sequence:
[0102]
[0103] The covariance matrix is:
[0104]
[0105] where s k is the innovation covariance matrix;
[0106] Calculate the Mahalanobis distance statistic:
[0107]
[0108] where is the transpose of the innovation sequence;
[0109] Calculate the loss function:
[0110] The loss functions in both fusion modes can be defined as the sum of squared errors between the predicted value of the UWB increment and the actual observed value:
[0111]
[0112] where L is the loss function, is the predicted value of the UWB increment, and Δy k is the actual observed value of the UWB increment.
[0113] The present invention also provides a UWB / INS adaptive positioning system based on deep learning, including:
[0114] Drift cumulative error calculation module: Under LOS conditions, through the IMU sensor data, calculate the attitude, velocity, position of the INS and the UWB measurement, and calculate the INS drift cumulative error; obtain the UWB measurement through the UWB device;
[0115] UWB / INS fusion module: Use the Kalman filter to perform prior state estimation on UWB / INS and determine the fusion mode, and perform fusion according to the error state vector in the fusion mode;
[0116] LSTM training module based on attention mechanism: Construct an LSTM based on the attention mechanism, input the attitude, velocity, position and UWB measurement into the LSTM based on the attention mechanism for training, and predict the UWB increment at the current moment;
[0117] Attention mechanism-based LSTM update module: Define the difference between the predicted UWB increment and the actual observation value as the innovation sequence, calculate the loss function based on the innovation sequence, and update the parameters of the attention mechanism-based LSTM to obtain the trained attention mechanism-based LSTM.
[0118] Kalman filter update module: Under NLOS conditions, use the trained attention mechanism-based LSTM to update the Kalman filter to achieve positioning accuracy.
[0119] The beneficial effects brought by the technical solution provided by the present invention at least include:
[0120] By combining the attention mechanism, the present invention dynamically extracts and weights the key features of IMU sensor data, and then generates the predicted UWB increment when affected by NLOS. This predicted UWB increment can be combined with the Kalman filter to significantly improve the positioning accuracy and robustness in complex NLOS environments. The present invention can effectively slow down the accuracy degradation of UWB signals in case of occlusion or multipath, and reduce the cumulative error of INS, providing strong support for the application of multi-sensor fusion positioning in complex environments. Description of the Drawings
[0121] Figure 1 It is a flowchart of the deep learning-based UWB / INS adaptive positioning method provided by the embodiment of the present invention;
[0122] Figure 2 It is a result display diagram for NLOS detection according to the innovation sequence;
[0123] Figure 3 It is a Mahalanobis distance detection result diagram;
[0124] Figure 4 It is a positioning trajectory diagram of each model in the NLOS period in the loose coupling mode;
[0125] Figure 5 It is a positioning trajectory diagram of each model in the NLOS period in the tight coupling mode;
[0126] Figure 6 It is the loose coupling mode positioning trajectory;
[0127] Figure 7 It is the tight coupling mode positioning trajectory;
[0128] Figure 8 It is the training curve of different parameter configurations of the attention mechanism-based LSTM. Detailed Embodiments
[0129] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0130] Example 1:
[0131] This example will describe the UWB / INS adaptive positioning method based on deep learning of the present invention in more detail with the corresponding drawings, as Figure 1 shown, including the following steps:
[0132] The present invention provides a UWB / INS adaptive positioning method based on deep learning, including:
[0133] S1: Under LOS conditions, through the IMU sensor data, solve for the attitude, velocity, and position of the INS, and calculate the INS drift cumulative error; obtain the UWB measurement through the UWB device;
[0134] Calculating the INS drift cumulative error specifically is:
[0135] The attitude error model of the INS is expressed as:
[0136]
[0137] where the superscript n represents the navigation coordinate system, ω in and δω in are respectively the angular velocity of the n system relative to the i system and its error, δω ib is the angular velocity error of the b system relative to the i system, and θ is the attitude angle error;
[0138] The velocity error model is:
[0139]
[0140] where δa n is the acceleration error, ω ie and δω ie are respectively the angular velocity of the e system relative to the i system and its error, a is the acceleration, v and δv are respectively the velocity and its error, and δg p is the gravitational acceleration error;
[0141] The position error model can be expressed as:
[0142]
[0143] where, and are respectively the differentials of the latitude, longitude, and altitude errors, λ, h are respectively the latitude, longitude, and altitude, δλ, δh are respectively the latitude, longitude, and altitude errors, V N is the northward velocity, VE is the eastward velocity, V D is the geodetic velocity, tan is the tangent function, cos is the cosine function, R M and R N are the local radii of curvature of the meridian and prime vertical, respectively.
[0144] It should be noted that INS is the core system of inertial integrated navigation, providing information such as attitude, velocity, and position. However, IMU sensor errors may cause the navigation accuracy to diverge rapidly over time. By introducing small perturbations into the update equation of INS, the error equation of inertial integrated navigation can be derived.
[0145] S2: Use the Kalman filter to perform a priori state estimation on UWB / INS and determine the fusion mode, and perform fusion according to the error state vector in the fusion mode;
[0146] Estimate the UWB / INS state using the Kalman filter, which is divided into two parts: prediction and update, specifically:
[0147] Assume that the linear state space model of UWB / INS is as follows:
[0148] The state transition equation is:
[0149] x k = F k-1 x k-1 + w k-1
[0150] where x k is the state vector at time k, x k-1 is the state vector at time k-1, F k-1 is the state transition matrix, w k-1 is the process noise, which satisfies a zero-mean Gaussian distribution w k-1 ~ N(0, Q k-1 ), Q k -1 is the process noise covariance distribution;
[0151] The measurement equation is:
[0152] z k = H k x k + v k
[0153] where z k is the measurement vector, H k is the measurement matrix, v k is the measurement noise, which also satisfies a zero-mean Gaussian distribution v k ~ N(0, R k ), R kTo measure the covariance distribution of noise;
[0154] The prediction step of the Kalman filter is as follows:
[0155]
[0156] where is the prior state estimate at time k, is the posterior state estimate, P k|k-1 is the predicted error covariance matrix, P k-1|k-1 is the posterior error covariance matrix, is the transition matrix;
[0157] The update step balances the uncertainty of prediction and measurement through the Kalman gain:
[0158]
[0159] where, K k is the gain matrix, is the measurement matrix;
[0160] Obtain the new prior state estimate and the error covariance P k|k :
[0161]
[0162] P k|k =(I - K k H k )P k|k-1 .
[0163] It should be noted that the Kalman filter (KF) is a recursive least squares estimator based on the state space model and is widely used in fields such as signal processing, navigation systems, and control systems. The KF reduces uncertainty by estimating the system state and fusing measurement information. Fusing UWB and INS can leverage the complementary advantages of both to improve positioning accuracy. UWB measurements can provide high-precision distance information but are vulnerable to blockage, refraction, and multipath effects; INS can provide a well-continuous position estimate but has a drift error that accumulates over time. By using a Kalman filter to fuse the information of the two, the influence of sensor errors can be effectively reduced, and a more stable and accurate navigation result can be obtained. According to the different fusion methods, it can be divided into two modes: loosely coupled and tightly coupled. In the Error State Kalman Filter, the state vector represents the error of the INS rather than directly using absolute physical quantities. Such a design can often simplify the filter structure and improve numerical stability. The error state vector usually includes errors such as position, velocity, attitude, and sensor bias.
[0164] Furthermore, the fusion mode is the loosely coupled mode. Fusing UWB / INS through the loosely coupled mode is specifically as follows:
[0165] In the loosely coupled mode, UWB and INS calculate positions independently, and then use a Kalman filter to perform data fusion based on the error state vector. The loosely coupled error state vector can be written as:
[0166]
[0167] where δp k , δv k , δθ k are the position, velocity, and attitude errors of the INS respectively, δb a and δb g represent the zero bias errors of the accelerometer and gyroscope respectively, [][] T is the transpose;
[0168] The Kalman filter uses the loosely coupled error state vector and the measurement equation to recursively update the state estimate, thereby correcting the drift of the INS and improving the positioning accuracy.
[0169] It should be noted that in the loosely coupled mode, UWB and INS calculate positions independently, and then use a Kalman filter to perform data fusion based on the error state vector. Among them, the INS calculates the pose through the integration of acceleration and angular velocity; the UWB calculates the reference position by ranging to the known base station position. In order to effectively characterize the error of the INS during the fusion process and use the UWB observation for correction, we introduce the error state vector for description.
[0170] Furthermore, the fusion mode is a tight coupling mode, and UWB / INS is fused through the tight coupling mode.
[0171] Specifically:
[0172] In the tight coupling mode, the UWB ranging information will directly enter the Kalman filter together with the INS data. The tight coupling error state vector is:
[0173]
[0174] where δb r represents the UWB ranging bias, that is, the constant deviation between the measured value and the actual observed value;
[0175] The measurement equation in the tight coupling mode: Based on the original ranging values of several UWB base stations, the state is updated according to the difference between the INS estimate and the true measurement:
[0176]
[0177] After linearization, we can get:
[0178]
[0179] where z i k is the measurement residual of the i-th UWB base station, and are the INS estimated position and the base station position respectively, represents the corresponding ranging bias error, is the measurement noise that follows a Gaussian distribution, |||| represents the modulus value, p k represents the current position vector calculated by the INS, represents the measurement matrix in the tight coupling mode, which is obtained by the first-order Taylor expansion of the measurement equation with respect to the state vector, and represents the linear approximation influence of the measurement variable on the error state vector ;
[0180] The Kalman filter is used to recursively update the state estimate according to the tight coupling error state vector and its measurement equation.
[0181] S3: Construct an LSTM based on the attention mechanism, input the attitude, velocity, position of the INS and the UWB measurement quantity into the LSTM based on the attention mechanism for training, and predict the UWB increment at the current moment;
[0182] S31: Construct an attention mechanism, and weight the input by defining a normalized attention matrix to obtain the weighted output. Specifically:
[0183] Let the input sequence be where \(R\) is the set of real numbers, \(n\) is the sequence length, and \(m\) is the feature dimension;
[0184] First, obtain the Key, Query, and Value matrices through linear transformation:
[0185] \(K = W^{ k}X\) k X
[0186] \(Q = W^{ q}X\) q X
[0187] \(V = W^{ v}X\) v X
[0188] where \(K\in R^{ d×n}\), \(d\) is the hidden layer dimension; \(Q\in R^{ d×n}\), \(V\in R^{ m×n}\), \(W^{ k}\in R^{ d×m}\), \(W^{ q}\in R^{ d×m}\), and \(W^{ v}\in R^{ m×m}\) are all trainable linear transformations;
[0189] The attention weight matrix \(E\in R^{ n×n}\) is calculated as: n×n The calculation method is:
[0190]
[0191] where Softmax is used to normalize each column to ensure that the sum of the attention weights is 1;
[0192] Finally, the output matrix \(O\) is:
[0193] \(O = VE\);
[0194] It should be noted that the attention mechanism is the core module of the Transformer and can achieve parallel signal weighting. Different from the serial processing method of traditional recurrent neural networks (RNNs), the attention mechanism can process the input sequence in parallel, reduce the cumulative error in gradient propagation, and is more suitable for predicting the UWB position increment based on INS information. In addition, traditional serial processing is prone to forgetting information at earlier times, while the attention mechanism can dynamically focus on important time steps to improve the prediction accuracy.
[0195] S32: Construct an LSTM by introducing a cell state and a gating mechanism internally. The gating mechanism includes a forget gate, an input gate, and an output gate. Specifically:
[0196] Forget gate:
[0197] \(f^{ t}\) t = σ(W f · [h t-1 , x t + b f )
[0198] where f t is the activation value of the forget gate, controlling the degree of forgetting of the previous cell state. W f is the weight matrix of the forget gate, h t-1 represents the previous hidden state, x t represents the current input, b f represents the bias term of the forget gate, and σ represents the Sigmoid activation function;
[0199] Input gate:
[0200] i t = σ(W i · [h t-1 , x t + b i )
[0201] where i t is the activation value of the input gate, controlling the influence degree of the current input on the cell state. W i is the weight matrix of the input gate, b i is the bias term of the input gate;
[0202] Cell state:
[0203]
[0204] where W C is the weight matrix of the cell state, b C is the bias of the cell state, is the cell state, and tanh is the hyperbolic tangent function;
[0205] Cell state update C t :
[0206]
[0207] where ⊙ represents element-wise multiplication;
[0208] Output gate:
[0209] o t = σ(W o · [h t-1 , x t + b o )
[0210] where o t is the activation value of the output gate, W ois the weight matrix of the output gate, b o is the bias term of the output gate;
[0211] Hidden state update:
[0212] h t = o t ☉tanh(C t )
[0213] where h t is the current hidden state;
[0214] S33: Learn temporal features from INS through LSTM and predict UWB increment:
[0215] In the loose coupling mode, an LSTM based on the attention mechanism is used to predict the UWB increment, and the UWB increment is the UWB position increment, specifically:
[0216] The LSTM based on the attention mechanism learns to map the input to the UWB position increment at the current moment k within the time window T
[0217]
[0218] where fNN,LC represents the LSTM based on the attention mechanism; is the IMU acceleration, high frequency n1; is the IMU angular velocity, with the same frequency as the acceleration; is the attitude angle solved by INS, with a frequency of n2; is the velocity solved by INS; the position solved by INS, is the UWB position increment, the lowest frequency n3;
[0219] In the tight coupling mode, an LSTM based on the attention mechanism is used to predict the UWB increment, and the UWB increment is the UWB ranging increment Specifically:
[0220] The LSTM based on the attention mechanism learns to map the input to the UWB ranging increment at the current moment k within the time window T:
[0221]
[0222] where, is the original UWB ranging;
[0223] S4: Define the difference between the predicted UWB increment and the actual observation value as the innovation sequence, calculate the loss function according to the innovation sequence, and update the parameters of the LSTM based on the attention mechanism to obtain the trained LSTM based on the attention mechanism;
[0224] In the Kalman filter, calculate the innovation sequence:
[0225]
[0226] The covariance matrix is:
[0227]
[0228] where s k is the innovation covariance matrix;
[0229] Calculate the Mahalanobis distance statistic:
[0230]
[0231] where is the transpose of the innovation sequence;
[0232] Calculate the loss function:
[0233] The loss functions in both fusion modes can be defined as the sum of squared errors between the predicted value and the actual observed value of the UWB increment:
[0234]
[0235] where L is the loss function, is the predicted value of the UWB increment, and Δy k is the actual observed value of the UWB increment;
[0236] S5: Under NLOS conditions, use the trained LSTM based on the attention mechanism to update the Kalman filter to achieve positioning accuracy.
[0237] For further illustration, as Figure 2 shown, to verify the effectiveness of the proposed method, 10,000 groups of IMU and UWB data were first generated in a simulation environment, including various motion modes (straight line, turning, accelerating and decelerating) to enhance the generalization ability of the network. The network was trained using this dataset and tested for positioning in the NLOS scenario. Multiple deep learning models were compared, including DNN, RNN, GRU, LSTM, Attention - RNN, Attention - GRU, and the attention - mechanism - based LSTM (Attention - LSTM) of the present invention. The convergence performance of various models in predicting UWB increments in loose - coupling and tight - coupling systems was compared, as Figure 2-3As shown, the loss of the DNN model is the highest and the curve changes little, indicating that it is difficult to capture the temporal dependencies of sequence data. Although the loss of the RNN gradually decreases, it fluctuates greatly in the loose coupling system and lacks stability. GRU and LSTM are significantly superior to DNN and RNN, with smoother curves and lower final losses. In comparison, LSTM performs slightly better and can better learn complex long dependencies. After adding the attention mechanism, the model accuracy is further improved. Attention-RNN has a slight improvement compared to RNN, but it is still inferior to GRU and LSTM. Attention-GRU and Attention-LSTM perform best in both systems, with faster convergence and lower final losses. Among them, Attention-LSTM has the best effect, verifying that combining the long-dependency learning ability of LSTM with the key feature extraction of the attention mechanism can achieve better results in predicting UWB pseudo-observations.
[0238] As Figure 2 and Figure 3 shown, NLOS detection is performed according to the innovation sequence. It can be seen that the peak of the difference between the predicted UWB increment and the actual observation value basically corresponds to the real NLOS (red dots), but there are a small number of false alarms and missed detections. After setting the 95% confidence threshold for the Mahalanobis distance, it can also effectively distinguish most NLOS points, and the correct detection rate reaches 71.86%. Although there are still some undetected and misdetected cases, overall, this detection strategy can effectively improve the ability to identify NLOS and provide a reference for subsequent elimination or replacement of unreliable measurements.
[0239] Table 1 presents the statistical results of the positioning errors of each model in the loose coupling mode. Figure 4 The trajectories of each method during the NLOS period are shown. Compared with other models, Attention-LSTM achieves the smallest error in most scenarios. For example, the error in Scenario 2 is only 0.86 m; the error in Scenario 3 is only 0.22 m, significantly lower than other methods. Attention-GRU follows closely and also performs relatively prominently. RNN and Attention-RNN have poor stability, and DNN has a large deviation in some scenarios because it cannot capture sequence dependencies. Generally speaking, Attention-LSTM can best suppress the large error increase brought by the NLOS stage, and the trajectory it generates is closest to the true value.
[0240] Table 1 Positioning errors of each model in the loose coupling mode (unit: m)
[0241] Scenario KF DNN RNN GRU LSTM Att-RNN Att-GRU Att-LSTM 1 1.35 0.79 0.87 0.73 1.14 0.52 0.56 0.45 2 3.73 3.21 2.13 2.07 2.38 2.08 2.93 0.67 3 1.31 0.51 0.26 0.35 0.23 0.92 0.25 0.40 4 1.21 1.09 0.80 0.56 0.83 0.58 0.65 0.41 5 1.48 0.54 0.81 0.54 0.44 0.38 0.41 0.64 6 1.52 0.72 1.11 1.08 1.05 1.38 0.72 0.14
[0242] Table 2 shows the positioning errors of each model in the tight coupling system. Figure 5For the corresponding trajectory diagram. In the tight coupling mode, the original ranging can be directly used for update. Once NLOS occurs, it is difficult for the standard KF method to effectively model the abnormal ranging, resulting in a significant increase in deviation after noise is introduced. After introducing deep learning to generate low-noise pseudo-measurements, the overall accuracy is improved. Among them, Attention-LSTM also performs optimally, with the lowest error in most scenarios. For example, only 0.21m in Scenario 1 and only 0.13m in Scenario 2, and the trajectory almost coincides with the true value. LSTM and Attention-GRU also have good performances, but are slightly inferior to Attention-LSTM. The DNN and RNN-based methods have relatively high relative errors and cannot fully utilize the historical sequence features. It can be seen that the combination of the attention mechanism and LSTM can also effectively reduce the impact of NLOS in the tight coupling architecture.
[0243] Table 2 Statistical results of positioning errors based on the tight coupling mode (unit: m)
[0244] Scenario KF DNN RNN GRU LSTM Att-RNN Att-GRU Att-LSTM 1 0.97 0.57 0.63 0.46 0.37 0.32 0.38 0.17 2 0.36 0.66 0.52 0.46 0.30 0.84 0.46 0.33 3 0.23 0.14 0.28 0.25 0.08 0.30 0.24 0.08 4 0.57 0.40 0.22 0.30 0.26 0.59 0.15 0.21 5 0.23 0.39 0.31 0.39 0.28 0.24 0.21 0.17 6 0.36 0.51 0.21 0.39 0.26 0.23 0.40 0.14
[0245] Actual environment test:
[0246] Further tests were carried out in a real indoor environment. A UWB device based on the DW1000 chip and a consumer-grade inertial navigation module built into the mobile phone were used. Four UWB base stations were set up. During the test, the tester held the UWB tag and the smartphone and moved indoors. Both the loose coupling and tight coupling modes were experimentally verified. In the loose coupling system ( Figure 6 ), when entering the NLOS, the standard UWB / INS method showed a significant deviation, and the error could reach 0.52m; while the deep learning method significantly improved the positioning accuracy. The errors of DNN and RNN both reached 0.23m, GRU was slightly higher at 0.30m, and LSTM was 0.22m; among the models with the attention mechanism, Attention-RNN and Attention-GRU were 0.33m and 0.24m respectively, and Attention-LSTM was also 0.22m, which was the same as LSTM and the trajectory was highly close to the true value, reflecting the importance of the sequence modeling ability for the loose coupling NLOS scenario. In the tight coupling system ( Figure 7) All methods perform better. The standard method also drops to 0.14m, but it is still outperformed by deep learning. The DNN and RNN are 0.15m and 0.13m respectively, while the GRU and LSTM drop to 0.11m and 0.09m. The Attention-RNN and Attention-GRU are 0.09m and 0.12m, and the Attention-LSTM is the best, only 0.08m, and it can still closely follow the true trajectory during the NLOS period. The experimental results show that the tightly coupled system is generally better than the loosely coupled one, and deep learning has obvious advantages over the standard UWB / INS in both modes. Among them, the LSTM and the attention-based models have the best effects. The Attention-LSTM is the overall best, with an error of 0.22m in the loose coupling mode and 0.08m in the tight coupling mode, fully demonstrating the comprehensive utilization of temporal information and key features in the NLOS scenario.
[0247] Table 3 Positioning Errors in Actual Environment Tests (Unit: m)
[0248]
[0249] Figure 8 Shows the effects of different hidden layer sizes (h), number of layers (l), and learning rates (α) on the convergence and final loss of the Attention-LSTM. It can be seen that the network capacity and learning rate have a significant impact on the model performance. When h = 64, l = 2, α = 0.005 (red line), the model converges fastest and has the lowest final loss, indicating that a larger hidden layer dimension and a deeper network structure help capture more complex features, and an appropriate learning rate can also accelerate the training. While configurations such as h = 32, l = 1 are prone to underfitting or instability, resulting in slow convergence or large fluctuations in loss, indicating that insufficient network capacity is difficult to adapt to a faster learning rate. Generally speaking, appropriate parameter settings can significantly improve the model performance in complex scenarios.
[0250] Example 2:
[0251] The present invention also provides a UWB / INS adaptive positioning system based on deep learning, including:
[0252] Drift cumulative error calculation module: Under LOS conditions, through the IMU sensor data, the attitude, velocity, position of the INS and the UWB measurement are solved, and the INS drift cumulative error is calculated; the UWB measurement is obtained through the UWB device;
[0253] UWB / INS fusion module: Use the Kalman filter to perform prior state estimation on the UWB / INS and determine the fusion mode, and perform fusion according to the error state vector in the fusion mode;
[0254] LSTM Training Module Based on Attention Mechanism: Construct an LSTM based on the attention mechanism, and input the pose, speed, position, and UWB measurement into the LSTM based on the attention mechanism for training to predict the UWB increment at the current moment;
[0255] LSTM Update Module Based on Attention Mechanism: Define the difference between the predicted UWB increment and the actual observed value as the innovation sequence, calculate the loss function according to the innovation sequence, and update the parameters of the LSTM based on the attention mechanism to obtain the trained LSTM based on the attention mechanism;
[0256] Kalman Filter Update Module: Under NLOS conditions, use the trained LSTM based on the attention mechanism to update the Kalman filter to achieve the positioning accuracy.
[0257] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the term "including", "comprising" or any other variant thereof in this article is intended to cover a non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, device, article or method. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, device, article or method including the element.
Claims
1. An adaptive positioning method for UWB / INS based on deep learning, characterized in that, Including: S1: Under LOS conditions, by using the IMU sensor data, calculate the attitude, velocity, and position of the INS, and compute the cumulative drift error of the INS; Obtain the UWB measurement through the UWB device; S2: Use the Kalman filter to perform prior state estimation on UWB / INS and determine the fusion mode, and perform fusion according to the error state vector in the fusion mode; S3: Construct an LSTM based on the attention mechanism, input the attitude, velocity, position of the INS and the UWB measurement into the LSTM based on the attention mechanism for training, and predict the UWB increment at the current moment; S4: Define the difference between the predicted UWB increment and the actual observed value as the innovation sequence, calculate the loss function according to the innovation sequence and update the parameters of the LSTM based on the attention mechanism to obtain the trained LSTM based on the attention mechanism; S5: Under NLOS conditions, use the trained LSTM based on the attention mechanism to update the Kalman filter to achieve the positioning accuracy.
2. The UWB / INS adaptive positioning method based on deep learning according to claim 1, wherein The said S1 includes: Calculate the cumulative drift error of the INS, specifically: INS attitude error model It is expressed as: where the superscript n represents the navigation coordinate system, ω in and δω in are the angular velocity of the n - system relative to the i - system and its error respectively, δω ib is the angular velocity error of the b - system relative to the i - system, and θ is the attitude angle error; Speed error model is as follows: Among them, δa n is the acceleration error, ω ie and δω ie are the angular velocity of the e-system relative to the i-system and its error respectively, a is the acceleration, v and δv are the velocity and its error respectively, and δg p is the gravitational acceleration error; The position error model can be expressed as: Among them, and are the differential errors of latitude, longitude and altitude respectively, λ and h are latitude, longitude and altitude respectively, δλ and δh are the errors of latitude, longitude and altitude respectively, V N is the northward velocity, V E is the eastward velocity, V D is the geodetic velocity, tan is the tangent function, cos is the cosine function, R M and R N are the local radii of curvature of the meridian and prime vertical respectively.
3. The UWB / INS adaptive positioning method based on deep learning according to claim 2, wherein, The said S2 includes: Use the Kalman filter to estimate the UWB / INS state, which is divided into two parts: prediction and update, specifically: Assume the linear state space model of UWB / INS is as follows: The state transition equation is: x k = F k-1 x k-1 + w k-1 where x k is the state vector at time k, and x k-1 is the state vector at time k-1, F k-1 is the state transition matrix, w k-1 is the process noise, which satisfies a zero-mean Gaussian distribution w k-1 ~N(0, Q k-1 ), where Q k-1 is the process noise covariance distribution; The measurement equation is: z k = H k x k + v k where z k is the measurement vector, H k is the measurement matrix, v k is the measurement noise, which also satisfies a zero-mean Gaussian distribution v k ~N(0, R k ), and R k is the covariance distribution of the measurement noise; The prediction step of the Kalman filter is: wherein is the prior state estimate at time k, is the posterior state estimate, P k|k-1 is the predicted error covariance matrix, P k-1|k-1 is the posterior error covariance matrix, is the transition matrix; The update step balances the uncertainty of prediction and measurement through the Kalman gain: Among them, K k is the gain matrix, and is the measurement matrix; Obtain a new prior state estimate and the error covariance P k|k : P k|k = (I - K k H k )P k|k-1 .
4. The UWB / INS adaptive positioning method based on deep learning according to claim 3, wherein The said S2 includes: The fusion mode is the loose coupling mode, and UWB / INS is fused through the loose coupling mode, specifically: In the loose coupling mode, UWB and INS calculate the position independently, and then use the Kalman filter to perform data fusion based on the error state vector; the loose coupling error state vector can be written as: where δp k , δv k , δθ k are the position, velocity, and attitude errors of the INS, respectively, δb a and δb g represent the bias errors of the accelerometer and gyroscope, respectively, T is the transpose; The Kalman filter uses the loose coupling error state vector and the measurement equation to recursively update the state estimate, thereby correcting the drift of the INS and improving the positioning accuracy.
5. The UWB / INS adaptive positioning method based on deep learning according to claim 3, wherein The said S2 includes: The fusion mode is the tight coupling mode, and UWB / INS is fused through the tight coupling mode, specifically: In the tight coupling mode, the UWB ranging information will directly enter the Kalman filter together with the INS data, and the tight coupling error state vector is: Among them, δb r represents the UWB ranging bias; The measurement equation in the tight coupling mode: Based on the original ranging values of several UWB base stations, update the state according to the difference between the INS estimate and the actual measurement: After linearization, it can be obtained: where z i k is the measurement residual of the i-th UWB base station, and are the INS estimated position and the base station position respectively, represents the corresponding ranging bias error, is the measurement noise following a Gaussian distribution, |||| represents the modulus value, p k represents the current position vector calculated by INS, represents the measurement matrix in the tight coupling mode, representing the measurement variable for the error state vector of the linear approximation effect; Use the Kalman filter to recursively update the state estimate according to the tight coupling error state vector and its measurement equation.
6. The UWB / INS adaptive positioning method based on deep learning according to claim 3, characterized in that The said S3 includes: S31: Construct the attention mechanism, weight the input by defining the normalized attention matrix to obtain the weighted output, specifically: Let the input sequence be where \(R\) is the set of real numbers, \(n\) is the sequence length, and \(m\) is the feature dimension; First, obtain the Key, Query, and Value matrices through linear transformation: K = W k X Q = W q X V = W v X where \(K\in R\) d×n and \(d\) is the dimension of the hidden layer; \(Q\in R\) d×n , \(V\in R\) m×n , \(W\) k \(\in R\) d×m , \(W\) q \(\in R\) d×m and \(W\) v \(\in R\) m×m are all trainable linear transformations; The attention weight matrix E ∈ R n×n The calculation method is as follows: Among them, Softmax is used to normalize each column to ensure that the sum of the attention weights is 1; Finally, the output matrix O is: O = VE S32: Construct the LSTM by introducing the cell state and gating mechanism inside, and the gating mechanism includes the forget gate, input gate, and output gate, specifically: Forget gate: f t = σ(W f · [h t-1 , x t + b f ) Among them, f t is the activation value of the forget gate, which controls the degree of forgetting of the previous cell state. W f is the weight matrix of the forget gate, h t-1 represents the hidden state of the previous moment, x t represents the input of the current moment, b f represents the bias term of the forget gate, and σ represents the Sigmoid activation function; Input gate: i t = σ(W i · [h t-1 , x t + b i ) where, i t is the activation value of the input gate, controlling the influence degree of the current input on the cell state, W i is the weight matrix of the input gate, b i is the bias term of the input gate; Cell state: Among them, W C is the weight matrix of the cell state, b C is the bias of the cell state, is the cell state, and tanh is the hyperbolic tangent function; Cell status update C t : where, ⊙ represents element-wise multiplication; Output gate: o t = σ(W o · [h t-1 , x t + b o ) where, o t is the activation value of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate; Hidden state update: h t = o t ⊙tanh(C t ) where h t is the current hidden state; S33: Learn temporal features from INS through LSTM and predict UWB increment.
7. The UWB / INS adaptive positioning method based on deep learning according to claim 6, characterized in that, The S33 includes: In the loose coupling mode, use LSTM based on the attention mechanism to predict the UWB increment, and the UWB increment is the UWB position increment, specifically: Based on the attention mechanism, LSTM learning maps the input to the UWB position increment at the current moment k within the time window T Among them, f NN,LC represents the LSTM of the attention mechanism; is the IMU acceleration, high frequency n1; is the IMU angular velocity, with the same frequency as the acceleration; is the attitude angle solved by INS, with a frequency of n2; is the velocity solved by INS; the position solved by INS, is the UWB position increment, the lowest frequency n3.
8. The UWB / INS adaptive positioning method based on deep learning according to claim 6, wherein The S33 includes: In the tightly coupled mode, an LSTM based on the attention mechanism is used to predict the UWB increment, where the UWB increment is the UWB ranging increment Specifically: The LSTM based on the attention mechanism learns to map the input to the UWB ranging increment at the current time k within the time window T: Among them, is the UWB raw ranging.
9. The UWB / INS adaptive positioning method based on deep learning according to claim 6, wherein, The S4 includes: In the Kalman filter, calculate the innovation sequence: The covariance matrix is: Among them, S k is the innovation covariance matrix; calculate the Mahalanobis distance statistic: wherein, is the transpose of the innovation sequence; Calculate the loss function: The loss functions in both fusion modes can be defined as the sum of the squared errors between the predicted value and the actual observed value of the UWB increment: where L is the loss function, is the predicted value of the UWB increment, Δy k is the actual observed value of the UWB increment.
10. An UWB / INS adaptive positioning system based on deep learning, characterized in that, Includes: Drift cumulative error calculation module: Under LOS conditions, use IMU sensor data to calculate the attitude, velocity, position of INS and UWB measurements, and calculate the INS drift cumulative error; obtain UWB measurement values through UWB devices; UWB / INS fusion module: Use the Kalman filter to perform prior state estimation on UWB / INS and determine the fusion mode, and perform fusion according to the error state vector in the fusion mode; LSTM training module based on the attention mechanism: Construct an LSTM based on the attention mechanism, input the attitude, velocity, position and UWB measurements into the LSTM based on the attention mechanism for training, and predict the UWB increment at the current time; LSTM update module based on the attention mechanism: Define the difference between the predicted UWB increment and the actual observed value as the innovation sequence, calculate the loss function according to the innovation sequence and update the parameters of the LSTM based on the attention mechanism to obtain the trained LSTM based on the attention mechanism; Kalman filter update module: Under NLOS conditions, use the trained LSTM based on the attention mechanism to update the Kalman filter to achieve positioning accuracy; To implement the UWB / INS adaptive positioning method based on deep learning as described in any one of claims 1-9.
Citation Information
Patent Citations
Visual inertia tight coupling odometer based on UWB online anchor points and metering method
CN113124856A
Pipeline wall-climbing robot track plotting method and system based on multi-sensor fusion
CN115597606A
IMU attitude estimation method based on KF and LSTM fusion
CN117332813A
Target tracking control method based on double closed-loop control and adaptive Kalman filtering
CN118466203A
UWB ranging error compensation method and device based on cascade residual attention network
CN118915036A
Cited By
Ultra-wideband TDoA positioning error correction method based on Transform network
CN120916108A