AL-NN neural network integrated navigation method based on attention mechanism
By introducing an AL-NN neural network based on attention mechanism in the combined navigation system, predicting the GNSS position increment and performing adaptive Kalman filtering fusion, the problem of inaccurate navigation when GNSS signal is interrupted is solved, and higher navigation accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411557187.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-04
Smart Images

Figure CN119043315B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of navigation and positioning technology, and in particular to an AL-NN neural network combined navigation method based on an attention mechanism. Background Art
[0002] Integrated navigation is a method to improve positioning, attitude estimation and navigation accuracy by fusing data from multiple different sensors. At present, integrated navigation has been widely used in fields such as autonomous driving, drones, robots, ships, and aerospace. However, GNSS signals are fragile and easily affected by the surrounding environment. In complex environments such as urban buildings, tunnels, jungles, etc., the signal will be weak, produce multipath effects, or even be completely interrupted. When the number of satellites that can receive signals is less than 4, position calculation cannot be performed, which can be regarded as a GNSS interruption. At this time, the original integrated navigation system evolves into INS working alone, and its error will gradually accumulate. If the carrier device does not have GNSS for a long time, the positioning error will increase rapidly. It may mislead the user, and it is even more fatal for unmanned equipment that requires real-time and reliable positioning data. Therefore, how to obtain effective positioning results when GNSS is interrupted becomes a problem worth studying.
[0003] Generally speaking, there are several ways to solve this problem. One way is to start with hardware devices, such as using light detection and ranging (LiDAR), cameras, and odometers, increase system inputs and fuse with INS data to improve accuracy. Alternatively, a more accurate fiber optic gyroscope can be used directly. It has good stability and small sensor error. Even after a period of pure inertial estimation, the error divergence is negligible. These methods can effectively improve positioning accuracy, but will undoubtedly increase hardware costs.
[0004] The second method is algorithm improvement. However, traditional integrated navigation methods rely on filtering algorithms such as the extended Kalman filter (EKF), which are often limited in performance under nonlinear, noisy and complex dynamic environments. In recent years, with the rise of artificial intelligence (AI), more and more fields have chosen to merge with AI technology, especially in the application of intelligent diagnosis and prediction. Usually a large amount of data is required to train the AI model, and then add input data to complete the regression prediction task or classification task. Depending on the application scenario, the appropriate model can usually achieve better accuracy, showing its good nonlinear ability.
[0005] With the rapid development of deep learning and neural network technology, the application of neural networks in integrated navigation has gradually become a new research hotspot. Neural networks, especially those based on attention mechanisms, recurrent neural networks (RNNs) or convolutional neural networks (CNNs), have powerful nonlinear processing capabilities and can better capture complex relationships and dynamic changes in sensor data, thereby improving the robustness and accuracy of navigation systems in complex environments. Summary of the invention
[0006] In response to the above-mentioned technical problems to be solved, the present invention provides an AL-NN neural network combined navigation method based on the attention mechanism to solve the navigation problem when the GNSS signal is lost, which can effectively improve the robustness and accuracy of navigation while reducing the computational complexity.
[0007] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0008] An AL-NN neural network integrated navigation method based on an attention mechanism, wherein the integrated navigation method first obtains information, including GNSS position information, accelerometer and gyroscope data of an IMU, and position, velocity and attitude information solved by an INS; then, a relationship model between the IMU output, the INS solution and the GNSS position increment is established, and an AL-NN neural network model is constructed; when a GNSS signal is available, the model is trained; when the GNSS signal is lost, the model is used to predict the GNSS position increment during the loss of lock; finally, an adaptive Kalman filter fusion is performed through the GNSS position output by the model and an adjusted measurement noise covariance matrix.
[0009] As a further improvement of the above technical solution:
[0010] Preferably, the information is such that the carrier coordinate system is The inertial coordinate system is The IMU output is included in Department Relative to The acceleration measured by the three-axis accelerometer of the system and the angular velocity measured by the three-axis gyroscope ; Through and Integrate to get the carrier position ,speed and attitude angle .
[0011] Preferably, according to the relationship between the INS output and the navigation information, a relationship between the INS output and the GNSS increment is established. - Model, the position increment expression of GNSS is:
[0012] (1)
[0013] In the formula, For To the navigation coordinate system The direction cosine matrix of the system; for Always Earth-centered Earth-fixed coordinate system Relative to The acceleration of the system; for Always Department, Relative to The angular velocity of the system; for The gravity vector in the system.
[0014] Preferably, the specific structure of constructing the AL-NN neural network model is:
[0015] Input layer: used for data input, including original feature data;
[0016] Convolutional layer: Two convolutional layers are used to extract initial features. The function of each convolutional layer is to extract local features of the data and capture spatial dependencies. A residual connection is introduced to add the output of the first convolutional layer to the output of the second convolutional layer.
[0017] Pooling layer: Use maximum pooling to reduce the spatial dimension of feature data;
[0018] Fully connected layer: The fully connected layer abstracts features and integrates local information output by the convolutional layer;
[0019] LSTM layer: two LSTM layers for processing time information;
[0020] Attention layer: Introduce the attention mechanism after the LSTM layer to focus on key sequence information;
[0021] Output layer: Generates the output of the model through a fully connected layer to complete the prediction of the input data.
[0022] Preferably, when the GNSS signal is available, the model is trained, and when the GNSS signal is lost, the GNSS position increment is predicted, and the specific process is:
[0023] S3-1, the input data of the neural network model includes , , Navigation coordinate system The northeast velocity in the system , Pitch angle , Roll Angle and yaw angle A total of 12 parameters of time series data; one-dimensional CNN is used to process time series data, convolution operation is performed on the input data, and relevant features are extracted;
[0024] S3-2, introduces a residual module, which extracts preliminary features in the first convolutional layer and then extracts abstract features in subsequent convolutional layers; abstract features are added to the preliminary features to enhance the network's ability to effectively learn the mapping relationship between input and output;
[0025] S3-3, taking the processed time series vector as input, using the bidirectional LSTM neural network to obtain the hidden state, obtaining the attention weight through the attention mechanism layer, and then adding the weighted hidden states to obtain the output vector. After the output vector is processed by the linear layer, the predicted GNSS position increment is obtained. ;
[0026] S3-4, when GNSS signals are available, in training mode, Kalman filtering is used to fuse INS and GNSS information and the estimated position error is used , speed error and attitude angle error Correct the INS output to get the combined navigation output; at the same time, use the data of IMU output, INS output and GNSS output to train the model;
[0027] When the GNSS signal is lost, in the prediction mode, the trained AL-NN model is used to predict the GNSS position increment, and all GNSS position increments are accumulated to obtain The pseudo GNSS position at the moment is expressed as:
[0028] (4)
[0029] In the formula, The position when the GNSS signal loses lock; For passing GNSS position increment at time.
[0030] Preferably, the GNSS position information is subjected to adaptive Kalman filtering fusion, a scaling factor is set according to the GNSS signal state, and an adaptive factor is calculated according to the prediction residual to realize an adaptive measurement noise matrix.
[0031] Preferably, the GNSS position information is fused by adaptive Kalman filtering, specifically:
[0032] S4-1, A priori measurement uncertainty covariance matrix , according to the GNSS signal status is set to:
[0033] (5)
[0034] In the formula, and They represent the position error variances of the GNSS signal valid state and the GNSS signal predicted state respectively;
[0035] S4-2, the prediction residuals are expressed as follows:
[0036] (6)
[0037] In the formula, represents the difference between the measured and predicted state vector, express The forecast residual at time t, Indicates The measured value at the moment, Indicates The predicted state vector at time , is the measurement matrix;
[0038] According to the covariance matrix propagation theory, the theoretical covariance of the prediction residual is as follows:
[0039] (7)
[0040] In the formula, express The state prediction covariance matrix at time , is the covariance matrix of the measurement noise, represents the theoretical covariance matrix of the prediction residuals, represents the transpose of the measurement matrix;
[0041] The Sage window smoothing method is used to calculate the covariance matrix of the state prediction information. The prediction covariance matrix of is obtained as follows:
[0042] (8)
[0043] In the formula, is the forecast residual covariance matrix estimated using the Sage window smoothing method, is the window length, yes The forecast residual at time t, yes Transpose of the moment prediction residuals;
[0044] S4-3, when the theoretical value of the forecast residual is equal to the estimated value:
[0045] (9)
[0046] The estimate of the measurement vector covariance matrix is:
[0047] (10)
[0048] Constructing adaptive factors by tracking Adjust the measurement noise covariance matrix, and the adaptive factor formula is:
[0049] (11)
[0050] In the formula, Indicates the operation of matrix tracing, that is, the accumulation of elements on the diagonal of the matrix; "." indicates the matrix to be input; represents the prediction noise covariance matrix under the prediction state;
[0051] S4-4, using adaptive factors The scale factors under different states are expanded to obtain the estimated measurement noise matrix ; When the GNSS signal is in the prediction state, at time The measurement noise covariance matrix used at is:
[0052] (12)
[0053] The measurement error is estimated dynamically by calculating the measurement noise covariance matrix.
[0054] Preferably, the outputting of navigation data by adaptive Kalman filtering is specifically:
[0055] INS / GNSS integrated navigation adopts loose combination and uses 15-dimensional error state quantity, which is defined as:
[0056] (13)
[0057] In the formula, represents the zero bias error of the three-axis accelerometer, Indicates the three-axis gyroscope zero bias error, represents the position error, represents the speed error, Indicates attitude angle error;
[0058] The expressions of the observation vectors are:
[0059] (14)
[0060] In the formula, Indicates the position information output by INS. Indicates the location information output by GNSS;
[0061] Iteratively update the state equation and measurement equation. The expressions of the state vector and observation vector at the moment are:
[0062] (15)
[0063] (16)
[0064] Where: , , for The state vector at the moment; and Respectively The time mean is 0 and the covariance matrix is and , and the state noise and measurement noise obey Gaussian distribution; for Time to current time The state transition matrix of for The state control vector at time The coefficient matrix of for The state observation matrix at time;
[0065] The Kalman filter is solved according to the state equation and the measurement equation. The iterative process is divided into two parts: Kalman filter prediction and Kalman filter update. The expressions are:
[0066] (17)
[0067] (18)
[0068] Where: for Time has come The state prior estimation vector at time t; for The state posterior estimate vector at time t; for Time has come The prior error covariance matrix at time t; for The posterior error covariance matrix at time t; for The Kalman gain matrix at time t; is the identity matrix.
[0069] Compared with the prior art, the AL-NN neural network combined navigation method based on the attention mechanism provided by the present invention has the following advantages:
[0070] The AL-NN neural network combined navigation method based on the attention mechanism of the present invention improves the system prior prediction covariance, ensures the stability of the filter gain in the case of observation noise changes, improves the tracking ability of the filter, reduces the influence of the estimation error when the network makes an abnormal prediction, and improves the robustness of the system. Compared with KF, AKF has the advantages of lower sensitivity to the initial information of the system and stronger robustness to the actual state in actual complex environments, so that it can suppress both linear errors and random errors. While reducing the computational complexity, the present invention effectively improves the robustness and accuracy of navigation, and provides an efficient and accurate solution for combined navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is the framework diagram of the AL-NN neural network model of the present invention.
[0072] Figure 2 It is a schematic diagram of the LSTM neural network and attention mechanism module in the AL-NN neural network model of the present invention.
[0073] Figure 3 It is a schematic diagram of the bidirectional LSTM model structure of the present invention.
[0074] Figure 4 It is an AL-NN neural network combined navigation system based on the attention mechanism in the training mode of the present invention.
[0075] Figure 5 It is an AL-NN neural network combined navigation system based on the attention mechanism in the prediction mode of the present invention.
[0076] Figure 6 It is the basic framework diagram of the present invention. DETAILED DESCRIPTION
[0077] The specific embodiments of the present invention are described in detail below. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0078] like Figures 1 to 6As shown, the AL-NN neural network integrated navigation method based on the attention mechanism of the present invention first obtains the GNSS position information, the accelerometer and gyroscope data of the IMU, and the position, speed and attitude information solved by the INS through the sensor; then, according to the relationship between the combined navigation information, a relationship model between the IMU output, the INS solution and the GNSS position increment is established, and on this basis, an AL-NN neural network model is proposed, and when the GNSS signal is available, the model is trained; when the GNSS signal is lost, the model is used to predict the GNSS position increment during the loss of lock; finally, the GNSS position output by the model and the adjusted measurement noise covariance matrix are used to perform adaptive Kalman filtering fusion to improve the robustness and accuracy of navigation when the GNSS signal is lost.
[0079] The AL-NN neural network combined navigation method based on the attention mechanism of the present invention has the following specific steps:
[0080] Step S1, the three-axis gyroscope and three-axis acceleration collected by the IMU are then calculated by the INS to obtain the position, velocity and attitude of the carrier.
[0081] Let the carrier coordinate system be The inertial coordinate system is The IMU output is included in Department Relative to The acceleration measured by the three-axis accelerometer of the system and the angular velocity measured by the three-axis gyroscope ; Through and Integrate to get the carrier position ,speed and attitude angle .
[0082] Step S2: Establish the relationship between INS output and GNSS increment based on INS output and navigation information, with INS output as input and GNSS increment as output. - The model is used as an artificial intelligence model in the INS / GNSS integrated navigation system to describe the relationship between INS output and navigation information.
[0083] INS outputs the calculated carrier position ,speed and attitude angle , while GNSS outputs position measurements On this basis, according to the relationship between INS output and GNSS increment, - Model, the position increment expression of GNSS is:
[0084] (1)
[0085] In the formula, For To the navigation coordinate system The direction cosine matrix of the system; for Always Earth-centered Earth-fixed coordinate system Relative to The acceleration of the system; for Always Department, Relative to The angular velocity of the system; for The gravity vector in the system.
[0086] Step S3, constructing an AL-NN neural network model for assisting integrated navigation.
[0087] In this embodiment, the specific structure of the AL-NN neural network model is:
[0088] Input layer: Data is input into the model, usually including raw feature data.
[0089] Convolutional layer: Two convolutional layers are used to extract initial features. The role of each convolutional layer is to extract local features of the data and capture spatial dependencies. A residual connection is introduced to add the output of the first convolutional layer to the output of the second convolutional layer to help alleviate the gradient vanishing problem and ensure that information is effectively transferred from shallow layers to deep layers.
[0090] Pooling layer: Use max pooling to reduce the spatial dimension of feature data, thereby reducing data size and computation.
[0091] Fully connected layer: The fully connected layer further abstracts the features and integrates the local information output by the convolutional layer.
[0092] LSTM layer: Two LSTM (Long Short-Term Memory) layers, mainly used to process time information. These two layers can effectively capture the temporal dependencies in the data and are suitable for processing time series data or inputs with temporal characteristics.
[0093] Attention layer: The attention mechanism is introduced after the LSTM layer, so that the model can better focus on the key sequence information. This mechanism enhances the model's ability to process sequential data, especially for time series or sequence tasks.
[0094] Output layer: Finally, a fully connected layer is used to generate the output result of the model to complete the prediction of the input data.
[0095] In order to improve the accuracy of INS / GNSS integrated navigation when the GNSS signal is lost, this embodiment proposes a new model that seamlessly integrates CNN, attention mechanism and LSTM to construct an AL-NN neural network. In the initial feature extraction stage of the input data, two convolutional layers with the same structure are used. A residual module is introduced in the convolutional layer, which is achieved by adding the output of the first layer to the output of the second layer, which helps to alleviate the gradient vanishing problem in the deep network training process, thereby improving the training effect and convergence speed of the model. Subsequently, the spatial dimension of the feature data is reduced by max-pooling, and then further abstracted by the fully connected layer and reshaping. Next, the time information is processed by two LSTM layers. Subsequently, the introduced attention mechanism enables the model to pay more attention to key sequence information, thereby enhancing the model's understanding and modeling capabilities of sequential data, and further enhancing the model's expression capabilities. The final prediction result is generated by the fully connected layer. The attention mechanism is cited, and all data are assigned different weights. The key sequence information that needs to be paid attention to is the one with the largest weight. In this embodiment, sequence information refers to time series data.
[0096] This embodiment adopts the bidirectional LSTM model (Bi-LSTM) structure. LSTM divides the neurons of RNN into two directions, one is the forward state and the other is the backward state. The output layer can obtain information from both the forward and backward states. The forward LSTM reads the input time series from since , and calculate a series of forward hidden states ( ), output( ); The backward LSTM reads the input sequence in reverse order, i.e., from since , and generates a sequence of backward hidden states ( ), output ( ). By combining the forward and backward outputs and , we can get the final ( ). Therefore, compared with LSTM, Bi-LSTM can obtain more contextual information and is more suitable for time series prediction.
[0097] The specific steps include:
[0098] S3-1, the input data of the neural network model includes , , Navigation coordinate system The northeast velocity in the system , Pitch angle , Roll Angle and yaw angle A total of 12 parameters of time series data. One-dimensional CNN is used to process time series data. The convolution layer uses the kernel to perform convolution operations on the input data to extract relevant features. The two convolution layers have the characteristics of local connectivity, spatial layout and parameter sharing, and can efficiently extract rich features using fewer parameters.
[0099] The formula for one-dimensional convolution operation is as follows:
[0100] (2)
[0101] In the formula, Representative convolution kernels; Indicates Features Represents input data; Corresponding weights; Represents the bias of the convolution kernel; Indicates the dimension of the input data.
[0102] S3-2, in order to solve the problems of gradient vanishing, gradient exploding, and model degradation when blindly stacking convolutional layers and pooling layers. A residual module is introduced, which extracts preliminary features in the first convolutional layer and then extracts more abstract features in subsequent convolutional layers. Finally, these abstract features are added to the preliminary features, which enhances the network's ability to effectively learn the mapping relationship between input and output, solves problems such as gradient vanishing, and further optimizes network performance.
[0103] If The input of a residual block is expressed as , the output is , the relationship between them is expressed as follows:
[0104] (3)
[0105] In the formula, Activation represents the activation function, and F represents the residual operation.
[0106] S3-3, the processed time series vector ( ) as input, a bidirectional LSTM neural network is used to obtain the hidden state ( ), and the attention weight is obtained through the attention mechanism layer ( ), and then add the weighted hidden states to get the output vector =( ), the output vector is processed by the linear layer to obtain the predicted GNSS position increment ;
[0107] S3-4, in order to solve the problem of Kalman filter divergence when the GNSS signal is lost, the neural network model of the integrated navigation system is divided into two operating modes: training and prediction.
[0108] When GNSS signals are available, the integrated navigation system is in training mode. In training mode, Kalman filtering is used to fuse INS and GNSS information, and the fused position error is calculated. , speed error and attitude angle error Correct the INS output to get the combined navigation output. At the same time, the model is trained using the data of IMU output, INS output and GNSS output.
[0109] When the GNSS signal is lost, the integrated navigation system enters the prediction mode. In the prediction mode, the trained AL-NN model is used to predict the GNSS position increment, and all GNSS position increments are accumulated to obtain The pseudo GNSS position at the moment is expressed as:
[0110] (4)
[0111] In the formula, The position when the GNSS signal loses lock; For passing GNSS position increment at time.
[0112] By estimated replace The GNSS position information that is lost at all times is recovered, and the estimated pseudo-GNSS position is fused with the INS data through Kalman filtering to maintain the continuity of the integrated navigation system.
[0113] Step S4, adjusting the measurement noise covariance matrix according to the performance of the neural network model.
[0114] The prediction accuracy of the AL-NN neural network directly affects the subsequent filter estimation, and the covariance of the GNSS pseudo-position is unknown. The use of the traditional Kalman filter algorithm may cause filter divergence. In the recursive update of the process noise Q and the measurement noise R by the Sage-Husa adaptive filter, it is difficult to ensure the semi-positive definiteness and positive definiteness of Q and R.
[0115] This embodiment proposes a low-complexity improved adaptive Kalman filter (AKF) algorithm, which sets a proportional factor according to the GNSS signal state and calculates an adaptive factor according to the prediction residual to implement an adaptive measurement noise matrix R, thereby improving the positioning accuracy during GNSS interruption.
[0116] Specifically:
[0117] S4-1, A priori measurement uncertainty covariance matrix , according to the GNSS signal status is set to:
[0118] (5)
[0119] In the formula, and They represent the position error variance of the GNSS signal valid state and the GNSS signal predicted state respectively. According to the performance of the GNSS receiver and its output variance, we can get . It can be determined by the accuracy of neural network training and experimental error. The range of variation is much smaller than , since the research focus of the present invention is on how to improve the positioning accuracy of integrated navigation when the GNSS signal is missing. Therefore, the matrix R when the GNSS signal exists can be regarded as basically unchanged, and its filtering method can be regarded as a general Kalman filter. When the GNSS is interrupted, the error value is constantly changing. It can only reflect the overall accuracy and error of the model. Therefore, it is necessary to calculate the adaptive factor Adjust the measurement noise covariance matrix R.
[0120] S4-2, in integrated navigation, the prediction residual is expressed as follows:
[0121] (6)
[0122] In the formula, Represents the difference between the measured and predicted state vectors. express The forecast residual at time t, Indicates The measured value at the moment, Indicates The predicted state vector at time , is the measurement matrix.
[0123] The predicted state quantity is more reliable in the short time, so the prediction residual can reflect the measured value According to the covariance matrix propagation theory, the theoretical covariance of the prediction residual is as follows:
[0124] (7)
[0125] In the formula, express The state prediction covariance matrix at time , is the covariance matrix of the measurement noise, represents the theoretical covariance matrix of the prediction residuals, Represents the transpose of the measurement matrix.
[0126] In order to deal with the disturbance of the system state caused by the excessive error of the GNSS prediction value, this embodiment uses the Sage window smoothing method to calculate the covariance matrix of the state prediction information. The prediction covariance matrix of can be obtained as follows:
[0127] (8)
[0128] In the formula, is the forecast residual covariance matrix estimated using the Sage window smoothing method, is the window length, yes The forecast residual at time t, yes The transpose of the moment-by-moment forecast residuals.
[0129] S4-3, when the theoretical value of the forecast residual is equal to the estimated value:
[0130] (9)
[0131] The estimate of the measurement vector covariance matrix is:
[0132] (10)
[0133] When the estimate is accurate, yes , and the two traces are equal. If the error of the dynamic model is large, the prediction residual covariance The absolute value of is also large, and the estimated value will be very large. Therefore, this embodiment constructs the adaptive factor by tracking Adjust the measurement noise covariance matrix. The adaptive factor formula is:
[0134] (11)
[0135] In the formula, Indicates the operation of matrix tracing, that is, the accumulation of elements on the diagonal of the matrix; "." indicates the matrix to be input; Represents the forecast noise covariance matrix at the forecast state.
[0136] S4-4, using adaptive factors The scale factors under different states are expanded to obtain the estimated measurement noise covariance matrix Therefore, when the GNSS signal is in the prediction state, it should be The measurement noise covariance matrix used at is:
[0137] (12)
[0138] By calculating the measurement noise covariance matrix, the measurement error is dynamically estimated, thereby improving the accuracy and stability of the system.
[0139] Step S5: output navigation data through adaptive Kalman filtering (AKF) to improve navigation accuracy.
[0140] INS / GNSS integrated navigation adopts loose combination. In this embodiment, a 15-dimensional error state quantity is used, which is defined as:
[0141] (13)
[0142] In the formula, represents the zero bias error of the three-axis accelerometer, Indicates the three-axis gyroscope zero bias error, represents the position error, represents the speed error, Indicates the attitude angle error.
[0143] The expressions of the observation vectors are:
[0144] (14)
[0145] In the formula, Indicates the position information output by INS. Indicates the position information output by GNSS.
[0146] Iteratively update the state equation and measurement equation. The expressions of the state vector and observation vector at the moment are:
[0147] (15)
[0148] (16)
[0149] Where: , , for The state vector at the moment; and Respectively The time mean is 0 and the covariance matrix is and , and the state noise and measurement noise obey Gaussian distribution; for Time to current time The state transition matrix of for The state control vector at time The coefficient matrix of for The state observation matrix at time;
[0150] The Kalman filter is solved according to the state equation and the measurement equation. The iterative process is mainly divided into two parts: Kalman filter prediction and Kalman filter update. The expressions are:
[0151] (17)
[0152] (18)
[0153] Where: for Time has come The state prior estimation vector at time t; for The state posterior estimate vector at time t; for Time has come The prior error covariance matrix at time t; for The posterior error covariance matrix at time t; for The Kalman gain matrix at time t; is the identity matrix.
[0154] The combined navigation method of the present invention ensures the stability of the filter gain and improves the tracking ability of the filter by improving the system prior prediction covariance under the condition of observation noise changes. When the network has abnormal prediction, the influence of the estimation error is reduced and the system robustness is improved. Compared with KF, AKF has the advantages of lower sensitivity to the initial information of the system and stronger robustness to the actual state in actual complex environments, so that it can suppress both linear errors and random errors effectively.
[0155] Experimental verification
[0156] The verification method of the present invention is experimentally trained and tested in Python 3.8 on Windows 10 platform. At the same time, the Numpy library is used to read and process the data, and Pytorch is used as the training framework to implement the AL-NN neural network model based on the attention mechanism. During the training process, the maximum training cycle is set to 115, and the length of each time series is set to 3 to predict the position in a time step. Under the same test set and loss function, the model of the present invention is compared with the existing basic CNN-LSTM structure, which lacks residual blocks and attention mechanisms. The training cycle of both models is set to 115, and the learning rate is set to 0.1. The results are shown in Table 1.
[0157] Table 1 Comparison of experimental results
[0158]
[0159] It is an indicator for evaluating the performance of the regression model and reflects how well the model fits the data. The closer it is to 1, the better the model fits; the closer it is to 0, the weaker the model's ability to explain the data.
[0160] It can be observed that, under the same conditions, the performance of the AL-NN neural network model based on the attention mechanism proposed in the present invention on the test set is better than that of the basic CNN-LSTM model, indicating that the AL-NN structure based on the attention mechanism is more suitable for processing prediction tasks when the signal is interrupted.
[0161] In order to more comprehensively verify the performance of the AL-NN neural network model proposed in this invention, it is compared with various different methods. This verification designed a GNSS signal interruption experiment on the road. The GNSS interruption time was 90 seconds, and the experimental data used 2800s of data. This verification used the first 2400s as the neural network training data, and then the GNSS was interrupted for 90s, and the AI model began to predict. At the same time, this verification selected other LSTM and GRU networks to compare with the CNN-GRU and CNN-LSTM networks, and the results are shown in Table 2.
[0162] Table 2 Comparison of experimental results
[0163]
[0164] PURE-IMU, LSTM+AKF, GRU+AKF, CNN-GRU+AKF, and CNN-LSTM+AKF are existing methods. It can be seen that the navigation method proposed in the present invention improves the problem of speed error divergence.
[0165] The above implementation cases are only preferred embodiments of the present invention and are not intended to limit the present invention in any form. Although the present invention has been disclosed as above with preferred embodiments, they are not intended to limit the present invention. Therefore, any simple modification, equivalent changes and modifications made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. An AL-NN neural network combined navigation method based on attention mechanism, characterized in that: The integrated navigation method first obtains information, including GNSS position information, accelerometer and gyroscope data of IMU, and position, velocity and attitude information solved by INS; then, a relationship model between IMU output, INS solution and GNSS position increment is established, and an AL-NN neural network model is constructed; when the GNSS signal is available, the model is trained; when the GNSS signal is lost, the model is used to predict the GNSS position increment during the loss of lock; finally, an adaptive Kalman filter fusion is performed through the GNSS position output by the model and the adjusted measurement noise covariance matrix; The specific structure of constructing the AL-NN neural network model is: Input layer: used for data input, including original feature data; Convolutional layer: Two convolutional layers are used to extract initial features. The function of each convolutional layer is to extract local features of the data and capture spatial dependencies. A residual connection is introduced to add the output of the first convolutional layer to the output of the second convolutional layer. Pooling layer: Use maximum pooling to reduce the spatial dimension of feature data; Fully connected layer: The fully connected layer abstracts features and integrates local information output by the convolutional layer; LSTM layer: Two LSTM layers for processing time information; Attention layer: Introduce the attention mechanism after the LSTM layer to focus on key sequence information; Output layer: Generates the output of the model through a fully connected layer to complete the prediction of the input data; When the GNSS signal is available, the model is trained, and when the GNSS signal is lost, the GNSS position increment is predicted. The specific process is as follows: S3-1, the input data of the neural network model includes , , Navigation coordinate system n The northeast velocity in the system , Pitch angle , roll angle γ and yaw angle There are 12 time series data in total; among them, for b Relative to i The acceleration measured by the three-axis accelerometer of the system, for b Relative to i The angular velocity measured by the three-axis gyroscope of the system; a one-dimensional CNN is used to process time series data, and a convolution operation is performed on the input data to extract relevant features; S3-2, introduces a residual module, which extracts preliminary features in the first convolutional layer and then extracts abstract features in subsequent convolutional layers; abstract features are added to the preliminary features to enhance the network's ability to effectively learn the mapping relationship between input and output; S3-3, taking the processed time series vector as input, using the bidirectional LSTM neural network to obtain the hidden state, obtaining the attention weight through the attention mechanism layer, and then adding the weighted hidden states to obtain the output vector. After the output vector is processed by the linear layer, the predicted GNSS position increment is obtained. ; S3-4, when GNSS signals are available, in training mode, Kalman filtering is used to fuse INS and GNSS information and the estimated position error is used , speed error and attitude angle error Correct the INS output to get the combined navigation output; at the same time, use the data of IMU output, INS output and GNSS output to train the model; When the GNSS signal is lost, in the prediction mode, the trained AL-NN model is used to predict the GNSS position increment, and all GNSS position increments are accumulated to obtain the pseudo GNSS position at time k, which is expressed as: (4) In the formula, The position when the GNSS signal loses lock; For passing j GNSS position increment at time.
2. The AL-NN neural network integrated navigation method based on the attention mechanism according to claim 1 is characterized in that: The information obtained is to set the carrier coordinate system to b system and the inertial coordinate system to i The IMU output is included in the b system. The b system is relative to i The acceleration measured by the three-axis accelerometer of the system and the angular velocity measured by the three-axis gyroscope ; Through and Integrate to get the carrier position ,speed and attitude angle .
3. The AL-NN neural network integrated navigation method based on the attention mechanism according to claim 2 is characterized in that: Based on the relationship between INS output and navigation information, the relationship between INS output and GNSS position increment is established. Model, the GNSS position increment expression is: (1) In the formula, is the direction cosine matrix from the b system to the navigation coordinate system n system; for At the moment in the n system, the earth-centered earth-fixed coordinate system e system is relative to i The acceleration of the system; is the angular velocity of the n system relative to the e system in the n system at time t; is the gravity vector in the n system, is the velocity vector at time t in the n system.
4. The AL-NN neural network integrated navigation method based on the attention mechanism according to claim 1 is characterized in that: The GNSS position information is subjected to adaptive Kalman filtering fusion, a proportional factor is set according to the GNSS signal state, and an adaptive factor is calculated according to the prediction residual to realize an adaptive measurement noise matrix.
5. The AL-NN neural network integrated navigation method based on the attention mechanism according to claim 4 is characterized in that: The GNSS position information is subjected to adaptive Kalman filtering fusion, specifically: S4-1, A priori measurement uncertainty covariance matrix , according to the GNSS signal status is set to: (5) In the formula, and They represent the position error variances of the GNSS signal valid state and the GNSS signal predicted state respectively; S4-2, the prediction residuals are expressed as follows: (6) In the formula, represents the difference between the measured value and the predicted state vector, that is, represents the prediction residual at time k, represents the measured value at the kth moment, represents the predicted state vector at the kth moment, is the measurement matrix; According to the covariance matrix propagation theory, the theoretical covariance of the prediction residual is as follows: (7) In the formula, represents the state prediction covariance matrix at time k, is the covariance matrix of the measurement noise, represents the theoretical covariance matrix of the prediction residuals, represents the transpose of the measurement matrix; The Sage window smoothing method is used to calculate the covariance matrix of the state prediction information. The prediction covariance matrix of is obtained as follows: (8) In the formula is the prediction residual covariance matrix estimated using the Sage window smoothing method, m is the window length, yes k−j The forecast residual at time t, yes k−j Transpose of the moment prediction residuals; S4-3, when the theoretical value of the forecast residual is equal to the estimated value: (9) The estimate of the covariance matrix of the measurement noise is: (10) Constructing adaptive factors by tracking Adjust the measurement noise covariance matrix, and the adaptive factor formula is: (11) In the formula, tr(.) represents the matrix tracing operation, that is, the accumulation of elements on the diagonal of the matrix; represents the prediction noise covariance matrix under the prediction state; S4-4, using adaptive factors The scale factors under different states are expanded to obtain the estimated measurement noise covariance matrix ; When the GNSS signal is in the prediction state, the measurement noise covariance matrix used at time k is: (12) The measurement error is estimated dynamically by calculating the measurement noise covariance matrix.
6. The AL-NN neural network integrated navigation method based on the attention mechanism according to claim 1 is characterized in that: The navigation data is output through adaptive Kalman filtering, specifically: INS / GNSS integrated navigation adopts loose combination and uses 15-dimensional error state quantity, which is defined as: (13) In the formula, represents the zero bias error of the three-axis accelerometer, Indicates the three-axis gyroscope zero bias error, represents the position error, represents the speed error, Indicates attitude angle error; The expressions of the observation vectors are: (14) In the formula, Indicates the position information output by INS. Indicates the location information output by GNSS; Use the state equation and measurement equation for iterative update. The expressions of the state vector and observation vector at time k are: (15) (16) Where: ∈ , ∈ ; is the state vector at time k-1; and They respectively indicate that the mean at time k is 0 and the covariance matrix is and , and the state noise and measurement noise obey Gaussian distribution; It is the state transfer matrix from time k-1 to the current time k; is the state control vector at time k The coefficient matrix of is the state observation matrix at time k; The Kalman filter is solved according to the state equation and the measurement equation. The iterative process is divided into two parts: Kalman filter prediction and Kalman filter update. The expressions are: (17) (18) Where: is the state prior estimation vector from time k-1 to time k; is the state posterior estimation vector at time k; is the prior error covariance matrix from time k-1 to time k; is the posterior error covariance matrix at time k; is the Kalman gain matrix at time k; is the identity matrix.