Inertial navigation data correction method based on neural network
By using a neural network-based inertial navigation data correction method, the error patterns are learned by utilizing the temporal characteristics of inertial data. This solves the problems of model dependence and high computational complexity in traditional methods, and achieves high-precision inertial navigation error compensation and navigation accuracy improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING AEROSPACE NEW CENTURY SATELLITE APPL TECH
- Filing Date
- 2026-03-31
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional inertial navigation data correction methods rely on accurate physical error models, which are computationally complex and difficult to apply in complex motion scenarios. They also fail to make full use of historical data for error prediction, resulting in a decrease in navigation accuracy.
A neural network-based approach is adopted to construct a hybrid neural network model by processing inertial data through timestamp alignment, outlier removal, zero-bias correction, and normalization. The model utilizes convolutional modules, bidirectional long short-term memory networks, and attention mechanisms to learn the temporal characteristics of inertial data to predict and compensate for errors at the current moment.
It achieves high-precision inertial navigation error compensation in the absence of an accurate physical model, significantly improving navigation accuracy. In particular, it suppresses attitude and position divergence when GPS signal is lost, and has good adaptability and real-time performance.
Smart Images

Figure CN121933002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inertial navigation technology, and in particular to an inertial navigation data correction method based on neural networks. Background Technology
[0002] An inertial navigation system (INS) is an autonomous navigation system that does not rely on external information. It measures the vehicle's own acceleration and angular velocity using accelerometers and gyroscopes (collectively known as inertial measurement units, IMUs) installed on the vehicle, and then continuously calculates the vehicle's velocity, position, and attitude information through integration.
[0003] Currently, traditional inertial navigation data correction methods mainly rely on Kalman filtering and its derivative algorithms (such as Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF)). Kalman filtering optimizes and corrects navigation errors by establishing kinematic and error models and combining them with Global Positioning System (GPS) or other external auxiliary information. However, it has the following limitations in practical applications:
[0004] Excessive model dependence: Kalman filtering requires precisely known statistical characteristics of system noise and error models. In real-world complex motion scenarios, the random noise of the IMU (such as angle random walk and velocity random walk) is time-varying, making it difficult to establish accurate analytical models.
[0005] High computational complexity: When dealing with nonlinear problems, EKF needs to calculate the Jacobian matrix, which involves a large amount of computation and linearization truncation error, which can easily lead to filter instability or even divergence.
[0006] Low data utilization: Traditional methods only utilize the observations at the current moment and the state at the previous moment, failing to fully leverage the long-term time-series dependency features in historical data to predict the error trend at the current moment. Summary of the Invention
[0007] The purpose of this invention is to provide an inertial navigation data correction method based on neural networks. In the absence of an accurate physical error model, this method uses historical time-series data output by the inertial sensor itself to predict and compensate for the cumulative error of inertial navigation at the current moment with high accuracy, thereby solving the problem of decreased navigation accuracy during long-endurance navigation caused by model mismatch in traditional methods.
[0008] To achieve the above objectives, the present invention provides an inertial navigation data correction method based on neural networks, comprising the following steps:
[0009] The process involves acquiring raw inertial data from the carrier, including specific force data from a three-axis accelerometer and angular velocity data from a three-axis gyroscope, with each frame of data accompanied by a hardware timestamp. The raw inertial data is then timestamped, including extracting the hardware timestamp from each frame, establishing a unified timeline, and generating time-synchronized six-axis inertial data frames using a linear interpolation algorithm. Outlier removal is performed on the timestamped data using an adaptive method combining a sliding window and statistical thresholds. Local mean and local standard deviation within the window are calculated, and points exceeding a preset multiple are identified as outliers and replaced using cubic spline interpolation. Zero-bias correction is applied to the outlier-removed data by collecting the average value of data within a stationary period as a static zero-bias estimate, which is then subtracted from the data at each sampling point. Finally, normalization is performed to obtain preprocessed inertial data.
[0010] Attitude reference data output from a reference navigation system is acquired. This attitude reference data is rigidly coaxially mounted with an inertial measurement unit via a fiber optic inertial navigation system and synchronized with the second pulse signal of the Global Positioning System (GPS). Simultaneously, the preprocessed inertial data is used to calculate the original attitude data using a strapdown inertial navigation algorithm. Specifically, this includes: integrating the preprocessed three-axis angular velocity data to update the attitude quaternions and converting them into attitude angles; performing coordinate transformation and integration on the three-axis specific force data to obtain velocity and position information; using the difference between the original attitude data and the attitude reference data as an error label; and extracting time-series samples from the preprocessed inertial data sequence using a fixed-length sliding window. The fixed length L of the sliding window is set according to the sampling frequency, ensuring that the time span corresponding to the window covers the main time scale of inertial navigation error accumulation, and is set to 2 seconds; the error label corresponding to the last moment of the window is used as the annotation for that sample, thus constructing a training dataset.
[0011] A hybrid neural network model is constructed and iteratively trained using the training dataset. This allows the model to learn the mapping relationship between historical inertial data sequences and the error at the current moment, resulting in a trained hybrid neural network model. The hybrid neural network model includes a convolutional module, a bidirectional long short-term memory network module, an attention mechanism module, and a fully connected output module, all connected in sequence. The convolutional module comprises two cascaded one-dimensional convolutional layers. The first convolutional layer is followed by a linear rectified activation function, a batch normalization layer, and a max-pooling layer, while the second convolutional layer is followed by a linear rectified activation function and a batch normalization layer, used to extract local fluctuation features from the input time-series data. The bidirectional long short-term memory network module includes a single layer of bidirectional long short-term memory network. Its forward layer processes the feature sequence in ascending time order to capture the positive accumulation pattern of error, and its backward layer processes the feature sequence in descending time order to infer the motion background. The forward hidden state and the backward hidden state at each time step are concatenated to output a comprehensive hidden state sequence. The attention mechanism module includes calculating the attention score of the hidden state at each time step output by the bidirectional long short-term memory network module, obtaining the attention weight after normalization, and performing weighted summation on each hidden state to generate a context vector focusing on the features of key historical moments. The fully connected output module is used to map the weighted features into three-dimensional pose error compensation values.
[0012] The system reads a sequence of historical inertial data, including the current moment, from a preset historical data buffer and inputs it into a trained hybrid neural network model to obtain the error compensation value for the current moment. The hybrid neural network model extracts local fluctuation features of the input data through a convolutional module, captures the temporal accumulation pattern of errors from both forward and backward directions through a bidirectional long short-term memory network module, and weights and focuses the features of each moment in the historical sequence through an attention mechanism module to highlight key information. Finally, a fully connected output module maps the weighted features into a three-dimensional attitude error compensation value. Simultaneously, the system calculates the original attitude data for the current moment in parallel, uses the error compensation value to correct the original attitude data, and outputs the corrected navigation data.
[0013] The establishment and maintenance of the historical data buffer includes:
[0014] Construct a first-in-first-out circular buffer with a fixed capacity of L. Each frame of newly acquired and preprocessed inertial data is written to the end of the buffer, while the earliest frame of data is removed, so that the buffer always holds the preprocessed inertial data of the most recent L time steps.
[0015] The historical data buffer is used to store preprocessed inertial data at consecutive time points; at each correction time.
[0016] The original attitude data is corrected using the error compensation value, and the corrected navigation data is output, including:
[0017] The corrected navigation data is obtained by subtracting the three-dimensional error compensation value output by the trained hybrid neural network model from the corresponding component of the original attitude data calculated by the strapdown inertial navigation system at the same time.
[0018] This invention discloses a neural network-based inertial navigation data correction method. First, it collects raw data from the inertial measurement unit (IMU) and performs preprocessing including timestamp alignment, anomaly removal, zero-bias correction, and normalization. Second, it generates attitude error labels using a high-precision reference system and constructs a training dataset containing historical time-series information using a sliding window approach. Then, it constructs a hybrid neural network model consisting of a convolutional module, a bidirectional long short-term memory (LSTM) network module, an attention mechanism module, and a fully connected output module, and iteratively trains it using the training dataset. Finally, in real-time navigation, it obtains the current inertial data sequence by maintaining a historical data buffer, inputs the predicted error compensation value to the trained model, corrects the original calculated attitude, and outputs the corrected value. This invention eliminates the reliance on precise physical models through a data-driven approach, utilizes a hybrid neural network to deeply mine the temporal cumulative characteristics of inertial data, achieves high-precision autonomous navigation with long endurance, and significantly suppresses attitude error divergence. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0020] Figure 1 This is a schematic diagram of steps S1 to S2 of an inertial navigation data correction method based on a neural network provided by the present invention.
[0021] Figure 2 This is a schematic diagram of steps S3 to S4 of an inertial navigation data correction method based on a neural network provided by the present invention.
[0022] Figure 3 This is a simplified flowchart illustrating an inertial navigation data correction method based on a neural network provided by the present invention.
[0023] Figure 4 This is a flowchart illustrating an inertial navigation data correction method based on a neural network provided by the present invention. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0025] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0026] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0027] Please see Figures 1-4 This invention provides a method for correcting inertial navigation data based on neural networks, comprising the following steps:
[0028] S1. Obtain the raw inertial data of the carrier, which includes specific force data output by a three-axis accelerometer and angular velocity data output by a three-axis gyroscope. Each frame of data is accompanied by a hardware timestamp. The raw inertial data is then timestamped, including extracting the hardware timestamps attached to each frame, establishing a unified time axis, and generating time-synchronized six-axis inertial data frames using a linear interpolation algorithm. Outlier removal is performed on the timestamped data using an adaptive method combining a sliding window and statistical thresholds. The local mean and local standard deviation within the window are calculated, and points exceeding a preset multiple are identified as outliers and replaced using cubic spline interpolation. Zero-bias correction is applied to the outlier-removed data by collecting the average value of the data during the stationary period as a static zero-bias estimate, and subtracting this zero-bias estimate from the data at each sampling point. Finally, normalization is performed to obtain preprocessed inertial data.
[0029] Specifically, a high-precision inertial measurement unit (IMU) is fixedly installed on a carrier (such as an unmanned vehicle, drone, or ship). This IMU integrates a three-axis microelectromechanical accelerometer (MEMS) and a three-axis MEMS gyroscope, used to sense the carrier's linear acceleration and angular velocity in space, respectively. The IMU operates continuously at a fixed preset sampling frequency (e.g., 200Hz), outputting in real-time three-axis specific force data (i.e., the specific force measured by the accelerometer, denoted as fx, fy, fz) and three-axis angular velocity data (denoted as ωx, ωy, ωz) in the carrier's coordinate system. Each set of data is appended with a hardware timestamp generated by a high-precision real-time clock, accurate to the microsecond level, marking the absolute acquisition time corresponding to that frame of data. To cover error characteristics under different dynamic scenarios, the acquisition process needs to encompass various typical motion states such as stationary, uniform speed, acceleration, deceleration, and turning, ensuring the richness and representativeness of the dataset.
[0030] Because data from different sensors (accelerometers and gyroscopes) within the inertial measurement unit may be transmitted through different channels or have slight phase delays, the triaxial acceleration and triaxial angular velocity output at the same moment are not strictly synchronized in time. To ensure that the data input to the neural network has a consistent time reference, this invention employs a software alignment method based on linear interpolation for timestamp alignment. Specifically, the hardware timestamps of all original data frames are first extracted to establish a unified time axis reference. For each target time point, two adjacent actual sampling points are found in the accelerometer and gyroscope data streams. Based on the data values and timestamps of these two adjacent points, the acceleration and angular velocity estimates corresponding to the target time point are calculated using a linear interpolation algorithm, thereby generating a set of six-axis inertial data frames that are strictly synchronized in time. This alignment process ensures that the acceleration and angular velocity components in each data frame correspond to the same physical moment, eliminating additional errors introduced by timing differences within the sensors.
[0031] In aligned inertial data sequences, due to electromagnetic interference or sensor transient failures, some outliers (abnormal jump points) may appear with amplitudes far exceeding the normal range. If these outliers are not handled, they will severely affect the subsequent learning of the true error patterns by the neural network. This invention employs an adaptive method combining a sliding window and statistical thresholds for outlier detection and removal. Specifically, for each axis of the data sequence, a sliding window of length N is set (N is set according to the sampling frequency, for example, N=20). The local mean and local standard deviation of the current data are calculated within the window. If the absolute value of the difference between the current data value and the local mean exceeds a preset multiple (e.g., 3 times) of the local standard deviation, the point is determined to be an outlier. For points determined to be outliers, instead of simple direct deletion, they are replaced using normal data within the window through cubic spline interpolation, thereby maintaining the continuity and length of the data sequence and avoiding disruption of temporal integrity due to data loss.
[0032] Even under static conditions, the output of an inertial measurement unit (IMU) contains a constant systematic bias, known as zero bias. The presence of zero bias causes the integrated velocity and position to drift rapidly over time. This step performs preliminary zero bias subtraction during data preprocessing to reduce the compensation burden on the subsequent neural network. Specifically, before the vehicle begins its actual motion, it is kept stationary for a preset time (e.g., 30 seconds). All aligned data within this stationary period are collected, and the arithmetic mean of each axis (including the three axes of the accelerometer and gyroscope) is calculated as the static zero bias estimate for that sensor. At each sampling point of the actual motion data, the corresponding axis's static zero bias estimate is subtracted to obtain the preliminarily corrected inertial data. It should be noted that this step only removes the static zero bias portion; the zero bias drift caused by temperature changes and dynamic stress, as well as other complex random errors, will be left for the subsequent neural network to learn and compensate for.
[0033] To accelerate the convergence speed of neural network training and improve model stability, the six-axis inertial data sequence after the above processing is normalized. The mean and standard deviation of each feature dimension are calculated based on the entire training dataset, and the Z-score normalization method is used to convert the data into a standard normal distribution with a mean of 0 and a standard deviation of 1. The normalized data sequence is used as the final input feature and stored in the training dataset for subsequent step S2 training dataset construction.
[0034] S2. Obtain attitude reference data output by the reference navigation system. The attitude reference data is obtained by rigidly coaxially mounting the fiber optic inertial navigation system and the inertial measurement unit, and by hardware synchronization with the second pulse signal of the global positioning system. Simultaneously, the original attitude data is obtained by using the preprocessed inertial data to solve the problem using the strapdown inertial navigation algorithm. Specifically, this includes: integrating the preprocessed three-axis angular velocity data to update the attitude quaternion and converting it into attitude angles; performing coordinate transformation and integration on the three-axis specific force data to obtain velocity and position information; using the difference between the original attitude data and the attitude reference data as an error label, and extracting time-series samples from the preprocessed inertial data sequence using a fixed-length sliding window. The fixed length L of the sliding window is set according to the sampling frequency so that the time span corresponding to the window covers the main time scale of inertial navigation error accumulation, and is set to 2 seconds; using the error label corresponding to the last moment of the window as the label of the sample, and constructing a training dataset.
[0035] Specifically, to obtain a true and reliable attitude error value, a reference navigation system with a precision far exceeding that of the inertial measurement unit (IMU) to be corrected is needed as a reference source. This invention employs a high-precision fiber optic gyroscope inertial navigation system (FORS) as the attitude reference device. This device features extremely high zero-bias stability (e.g., better than 0.01 / h) and extremely low angular random walk; its output attitude information can be considered a reliable approximation of the true value in both short and long-term scenarios. During data acquisition, the high-precision fiber optic FORS and the IMU to be corrected (i.e., the sensor collecting data in step S1) are rigidly coaxially mounted to ensure that both sense the same carrier motion. Both systems are powered on synchronously and record data simultaneously at the same sampling frequency. All data is synchronized using the GPS second pulse signal, ensuring that each frame of data has a precisely aligned absolute time stamp. The attitude reference data obtained in this way is legally sourced, reliable in precision, and strictly aligned in time with the data from the sensor to be corrected, providing a solid foundation for subsequent error calculations.
[0036] For the inertial data sequence preprocessed in step S1 (including time alignment, anomaly removal, zero-bias correction, and normalization), the raw, uncorrected navigation parameters need to be obtained first using a traditional strapdown inertial navigation (SINS) solution algorithm. In the navigation computer, a standard attitude update algorithm (such as the quaternion method) is used to integrate the normalized three-axis angular velocity data, updating the attitude quaternions of the vehicle coordinate system relative to the navigation coordinate system in real time, thereby calculating the vehicle's pitch, roll, and yaw angles—the raw attitude data. Simultaneously, coordinate transformation and integration are performed on the normalized three-axis specific force data to obtain velocity and position information. It is important to emphasize that this solution process does not introduce any external corrections or Kalman filtering; it relies entirely on pure inertial integration. Therefore, the raw attitude data contains all errors caused by sensor errors (such as zero-bias drift, random walk, and scaling factor error) and integration accumulation. This raw attitude data will be used to compare with attitude reference data to extract the true error values.
[0037] For each sampling moment, the attitude angle output by the high-precision attitude reference device (considered the true value) is subtracted from the original attitude data at the same moment to obtain a three-dimensional attitude error vector (including pitch angle error, roll angle error, and yaw angle error). This error vector is the target variable that the neural network needs to learn and predict. Because the errors in the original attitude data have strong temporal accumulation characteristics, the error at the current moment depends not only on the inertial data at the current moment but also closely related to the data from historical moments. Therefore, samples cannot be constructed using only single-point data; instead, a sliding window approach should be used to construct time-series samples.
[0038] This invention uses a fixed-length sliding window to extract input segments from the preprocessed inertial data sequence, and uses the three-dimensional attitude error vector corresponding to the last moment of the window as the label of the sample. The specific construction process is as follows:
[0039] Determine the window length: Based on the error characteristics of the inertial measurement unit and the requirements of the navigation application, set a suitable timing window length L (for example, L corresponds to 2 seconds of data; if the sampling frequency is 200Hz, then L = 400 time steps). The selection of the window length needs to take into account both the time scale of error accumulation and the processing capability of the neural network.
[0040] Sliding cut: A sliding window is moved across the complete preprocessed inertial data sequence with a step size of 1 (or the step size can be set as needed). For each window position, six-axis inertial data (a total of L time steps, each time step containing three axes of acceleration and three axes of angular velocity) are extracted from all time steps within the window to form a three-dimensional array (time steps × feature dimension) as the input feature of that sample.
[0041] Label determination: Take the 3D pose error vector corresponding to the last time step of the window as the label of the sample.
[0042] Sample set partitioning: All samples generated by the sliding window are randomly divided into training, validation, and test sets. The training set is used for model parameter updates, the validation set is used for hyperparameter tuning and early stopping to prevent overfitting, and the test set is used for final model performance evaluation.
[0043] By employing the above methods, each sample in the constructed training dataset contains sufficiently long historical inertial information, enabling the neural network to learn the cumulative pattern of error over time and predict the instantaneous error value at the end of the window. This sliding window-based sample construction method effectively utilizes the continuity of time-series data and is the key innovation of this step. It allows the neural network to capture the dynamic evolution of the error, rather than merely fitting the static relationship between instantaneous input and output.
[0044] S3. Construct a hybrid neural network model and iteratively train the model using the training dataset. This allows the model to learn the mapping relationship between historical inertial data sequences and the error at the current moment, resulting in a trained hybrid neural network model. The hybrid neural network model includes a convolutional module, a bidirectional long short-term memory network module, an attention mechanism module, and a fully connected output module connected in sequence. The convolutional module includes two cascaded one-dimensional convolutional layers. The first convolutional layer is followed by a linear rectified activation function, a batch normalization layer, and a max-pooling layer. The second convolutional layer is followed by a linear rectified activation function and a batch normalization layer, used to extract local waveforms from the input time-series data. The motion feature module includes a bidirectional long short-term memory network (LSTM) layer. Its forward layer processes the feature sequence in ascending time order to capture the positive accumulation pattern of errors, and its backward layer processes the feature sequence in descending time order to infer the motion background. The forward and backward hidden states at each time step are concatenated to output a comprehensive hidden state sequence. The attention mechanism module calculates the attention score for the hidden state at each time step output by the bidirectional LSM module, obtains the attention weight after normalization, and performs a weighted summation on each hidden state to generate a context vector focusing on the features of key historical moments. The fully connected output module is used to map the weighted features into three-dimensional pose error compensation values.
[0045] Specifically, the hybrid neural network model designed in this invention consists of four cascaded core modules: a convolutional module, a bidirectional long short-term memory network module, an attention mechanism module, and a fully connected output module. The model's input is the temporal sample constructed in step S2, i.e., a six-axis inertial data sequence (L×6 shape) within a fixed-length time window L. The model output is the three-dimensional attitude error vector (pitch error, roll error, and yaw error) corresponding to the end of the window. Through this end-to-end design, the model automatically completes the mapping from historical inertial data to the current error.
[0046] The convolutional module, located at the very front of the model, performs shallow feature extraction on the input raw inertial data sequence, capturing short-term fluctuation patterns and sensor noise features within a local time window. This module consists of two stacked one-dimensional convolutional layers, each performing convolution operations along the time dimension.
[0047] The first convolutional layer contains 32 kernels, each with a size of 3 and a stride of 1. After the convolution operation, a linear rectified function is used as the activation function, introducing a non-linear transformation that enables the model to learn complex feature relationships. To prevent overfitting and accelerate training, a batch normalization layer is added after this convolutional layer to normalize the output of each batch of data, maintaining a distribution with a mean of 0 and a variance of 1. Next, a max pooling layer is applied with a pooling window size of 2 and a stride of 2 to downsample the convolution results, reducing the data dimensionality, decreasing the computational load of subsequent modules, and preserving the main features.
[0048] The second convolutional layer is similar in structure to the first, containing 64 convolutional kernels, with a kernel size of 3 and a stride of 1. It also undergoes linear rectified activation and batch normalization. To maintain the length of the time series for subsequent time series modeling, pooling is not performed in this layer; instead, padding parameters are set to keep the sequence length unchanged before and after convolution. After two convolutional layers, the original inertial data is transformed into a higher-order local feature sequence with an output dimension of (L×64), where L is the original window length and 64 is the number of feature channels. This feature sequence is then fed into a bidirectional long short-term memory network module.
[0049] Since inertial navigation errors are not only related to the characteristics of the current moment, but also to the accumulation of errors in historical moments and future motion trends, this invention employs a bidirectional long short-term memory network to simultaneously capture the temporal dependencies between forward and backward directions. This module contains a single layer of bidirectional long short-term memory network with 128 hidden units.
[0050] In the bidirectional architecture, the input at each time step (i.e., the local feature vector output by the convolutional module) is simultaneously fed into two long short-term memory (LSTM) network layers: one processes the sequence in forward chronological order (forward layer), and the other processes it in reverse chronological order (backward layer). The forward layer captures the pattern of error accumulation over time, while the backward layer infers the potential impact of the current state from a future "perspective," helping the model to more comprehensively understand the motion context. At each time step, the hidden states of the forward and backward layers are concatenated to form a comprehensive hidden state vector containing both forward and backward information, with a dimension of 256 (128+128). Therefore, after processing by the bidirectional LSM network, the entire sequence outputs a hidden state sequence, where each time step corresponds to a 256-dimensional vector, and the sequence length remains L. These hidden states contain rich long and short-term temporal features, providing a foundation for the subsequent attention mechanism.
[0051] In the hidden state sequence obtained through a bidirectional long short-term memory network, the contribution of different historical moments to the current error prediction varies. Certain key moments (such as the start of a violent maneuver) may have a greater impact on subsequent errors. To enable the model to automatically focus on this key information, this invention introduces an attention mechanism module.
[0052] Specifically, an additive attention mechanism is employed. For the hidden state vector at each time step, its corresponding attention score is first calculated using a learnable shallow neural network (typically consisting of a single fully connected layer). This score reflects the importance of the state at that moment. Then, the attention scores for all time steps are normalized using the softmax function, resulting in an attention weight distribution that sums to 1. Finally, the hidden state vector at each time step is multiplied by its corresponding attention weight, and all weighted vectors are summed to obtain a fixed-length context vector. This context vector is a weighted summary of information from the entire historical window, highlighting the features of the moments most valuable for current error prediction. This mechanism allows the model to dynamically adjust its focus based on the input data, enhancing its expressive power and generalization performance.
[0053] The context vector output from the attention mechanism module is fed into the fully connected output module to generate the final 3D pose error predictions. This module contains two fully connected layers: the first layer has 64 neurons, employs a linear rectified activation function, and introduces a dropout operation (dropout rate set to 0.5) to prevent overfitting; that is, in each training iteration, the outputs of some neurons are randomly ignored, forcing the model to learn more robust features. The second layer is the output layer, containing 3 neurons, corresponding to the predicted pitch, roll, and yaw errors, respectively. This layer does not use an activation function and directly outputs linear values to allow the prediction range to cover arbitrary real numbers.
[0054] Using the training and validation sets constructed in step S2, the hybrid neural network model described above is subjected to supervised iterative training.
[0055] First, all learnable parameters in the model are initialized (convolutional kernel weights, biases, gating parameters in the Long Short-Term Memory network, weight matrices in the attention mechanism, weights of fully connected layers, etc.). Mean squared error is used as the loss function to measure the difference between the model's predicted 3D pose error and the true error label generated in step S2.3. An adaptive moment estimation algorithm is chosen as the optimizer, which dynamically adjusts the learning rate of each parameter to accelerate convergence.
[0056] Training is performed in batches. Within each training cycle, the training set data is randomly shuffled and divided into multiple mini-batches according to a preset batch size (e.g., 64 samples). For each mini-batch, the following operations are performed:
[0057] Forward propagation: The input features of the batch of samples are sequentially passed through the convolution module, the bidirectional long short-term memory network module, the attention mechanism module, and the fully connected output module to obtain the prediction error values of all samples in the batch.
[0058] Loss Calculation: Calculate the mean squared error loss value based on the prediction error and the actual error label of the current batch.
[0059] Backpropagation: Using the chain rule, the gradient of the loss function with respect to each parameter is calculated layer by layer from the output layer.
[0060] Parameter update: According to the update rules of the adaptive moment estimation algorithm, all parameters of the model are updated once using the calculated gradient.
[0061] After completing a small batch, the next small batch is processed, and so on, until the entire training set has been traversed, which completes one training cycle (one epoch). At the end of each training cycle, the current model is evaluated using the validation set, and the loss value on the validation set is calculated.
[0062] The convergence of the model and when to stop training are determined by monitoring changes in the validation set loss. The specific strategy is as follows: At the end of each training epoch, the validation set loss is recorded. If the validation set loss in the current epoch is lower than the previously recorded best validation set loss, the current model parameters are saved as the best model, and the early stopping counter is reset. If the validation set loss does not decrease for several consecutive epochs (e.g., 20 consecutive epochs), or even shows an upward trend, the model is considered to have overfitted or converged to a standstill, triggering the early stopping mechanism and immediately terminating training. At this point, the previously saved best model parameters are selected as the final trained model. Alternatively, an absolute threshold can be set to stop training when the validation set loss falls below a preset accuracy requirement. This approach ensures sufficient prediction accuracy while effectively preventing overfitting and guaranteeing the model's generalization ability.
[0063] S4. Read the historical inertial data sequence, including the current moment, from the preset historical data buffer, input it into the trained hybrid neural network model, and obtain the error compensation value for the current moment; wherein, the hybrid neural network model extracts the local fluctuation features of the input data through the convolution module, captures the temporal accumulation pattern of the error from both forward and backward directions through the bidirectional long short-term memory network module, and weights and focuses the features of each moment in the historical sequence through the attention mechanism module to highlight key information. Finally, the fully connected output module maps the weighted features into a three-dimensional attitude error compensation value; at the same time, the original attitude data of the current moment is calculated in parallel, and the original attitude data is corrected using the error compensation value to output the corrected navigation data.
[0064] Specifically, to accurately predict the error at the current moment, the hybrid neural network model needs input samples in the same format as during training, i.e., a continuous historical inertial data sequence including the current moment. To this end, a first-in-first-out (FIFO) circular buffer is allocated in the navigation computer's memory specifically for storing the real-time inertial data after the preprocessing described in step S1 (time alignment, anomaly removal, bias correction, and normalization). The buffer's capacity is fixed at L time steps, where L is exactly the same as the window length used when constructing the training samples in step S2 (e.g., for 2 seconds of data, if the sampling frequency is 200Hz, then L=400).
[0065] During actual navigation, the inertial measurement unit (IMU) continuously outputs raw inertial data at a fixed sampling frequency. Upon arrival of each new data frame, the preprocessing steps S1.2 to S1.5 are immediately executed to generate a preprocessed six-dimensional feature vector (including three-axis acceleration and three-axis angular velocity). This data frame is written to the tail of the circular buffer, while the oldest data frame at the head of the buffer is automatically removed. Through this mechanism, the buffer always stores the preprocessed inertial data from the most recent L time moments, forming a real-time updated sliding time window. When it is necessary to obtain the historical data sequence for the current time moment, all L frames of data can be read from the buffer in chronological order.
[0066] At each point in time when corrected navigation data needs to be output (e.g., each sampling period or each solution period), the navigation system performs the following operations:
[0067] First, obtain the preprocessed inertial data frame at the current time t, denoted as D. t At this point, the buffer already contains D. t−L+1 To D t A total of L frames of data are generated (assuming indices from t-L+1 to t). The system directly extracts all L frames of data from the buffer, forming a three-dimensional array (L × 6), which serves as the input sample for the hybrid neural network model. The end of this sample corresponds exactly to the features at the current time t, while the beginning contains complete historical information from the past L-1 times to the current time. This process achieves the goal of "simultaneously acquiring" the current time and its historical data sequence, providing the model with a temporal context completely consistent with the training phase.
[0068] The constructed input samples are fed into a trained hybrid neural network model deployed in the navigation computer. The model performs forward computation: the data flows sequentially through a convolutional module, a bidirectional long short-term memory network module, an attention mechanism module, and a fully connected output module, ultimately outputting a three-dimensional vector of error compensation values Et=[δθx,δθy,δθz], representing the predicted pitch angle error, roll angle error, and yaw angle error at the current time t, respectively. This process has low computational complexity and latency typically in the millisecond range, meeting the timeliness requirements of real-time navigation.
[0069] Meanwhile, a dual-task approach is adopted, where the traditional solution module of the inertial navigation system runs independently while calculating error compensation values. This module receives the same preprocessed inertial data (or unnormalized raw data), uses classic strapdown inertial navigation algorithms (such as the quaternion method) to integrate the three-axis angular velocities to update the attitude, and integrates the three-axis accelerations to update the velocity and position. Since no external corrections are introduced, the attitude data output by this module is the raw attitude data (expressed as pitch, roll, and yaw angles), which includes all uncompensated cumulative errors.
[0070] After obtaining the error compensation value predicted by the model and the original attitude data calculated by the inertial navigation system, the system performs a correction and fusion operation. Since the label learned by the model during training is the difference between the original attitude data and the reference attitude data (i.e., the true error value), the corrected attitude data is the original attitude data minus the error compensation value. Specifically, this is done by subtracting the corresponding attitude angular components.
[0071] The corrected attitude data, as the high-precision attitude output for the current moment, can be further used for position calculation (e.g., using the corrected attitude for force coordinate transformation) or directly provided to other task modules (such as control and navigation display). By repeating the above process in each calculation cycle, the system achieves real-time continuous correction of inertial navigation errors.
[0072] Unlike traditional Kalman filtering that relies on physical formulas, this invention utilizes a neural network to directly learn the evolution of errors from the IMU's historical raw data, eliminating the need for complex analytical models of random errors. The model combines a convolutional module, a bidirectional long short-term memory (LSTM) network module, and an attention mechanism module. The convolutional module extracts local features, the LSM network module captures forward and backward temporal cumulative effects, and the attention mechanism module automatically selects key historical moments. The synergistic effect of these three modules significantly improves the prediction accuracy of cumulative inertial navigation errors. It achieves an end-to-end mapping from "raw inertial data input" to "error compensation value output," avoiding the information loss caused by multi-level processing in traditional methods.
[0073] Compared with the prior art, the present invention has the following beneficial effects:
[0074] Improve navigation accuracy: By deeply mining the time-series information in historical data, the cumulative error of inertial navigation can be predicted more accurately. Especially in the pure inertial navigation stage when GPS signal lock is lost, the divergence rate of attitude and position can be effectively suppressed.
[0075] Strong generalization ability: Since it does not rely on a fixed noise model, this method has good adaptability and robustness to different types of errors generated under different motion states (uniform speed, acceleration, turning).
[0076] Excellent real-time performance: Once the model is trained, the computational cost of forward inference is much less than that of Kalman filtering for online solving of nonlinear equations, which can meet the computational requirements of real-time navigation.
[0077] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0078] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for correcting inertial navigation data based on neural networks, characterized in that, Includes the following steps: The process involves acquiring raw inertial data from the carrier, including specific force data from a three-axis accelerometer and angular velocity data from a three-axis gyroscope, with each frame of data accompanied by a hardware timestamp. The raw inertial data is then timestamped, including extracting the hardware timestamp from each frame, establishing a unified timeline, and generating time-synchronized six-axis inertial data frames using a linear interpolation algorithm. Outlier removal is performed on the timestamped data using an adaptive method combining a sliding window and statistical thresholds. Local mean and local standard deviation within the window are calculated, and points exceeding a preset multiple are identified as outliers and replaced using cubic spline interpolation. Zero-bias correction is applied to the outlier-removed data by collecting the average value of data within a stationary period as a static zero-bias estimate, which is then subtracted from the data at each sampling point. Finally, normalization is performed to obtain preprocessed inertial data. Attitude reference data output from a reference navigation system is acquired. This attitude reference data is rigidly coaxially mounted with an inertial measurement unit via a fiber optic inertial navigation system and synchronized with the second pulse signal of the Global Positioning System (GPS). Simultaneously, the preprocessed inertial data is used to calculate the original attitude data using a strapdown inertial navigation algorithm. Specifically, this includes: integrating the preprocessed three-axis angular velocity data to update the attitude quaternions and converting them into attitude angles; performing coordinate transformation and integration on the three-axis specific force data to obtain velocity and position information; using the difference between the original attitude data and the attitude reference data as an error label; and extracting time-series samples from the preprocessed inertial data sequence using a fixed-length sliding window. The fixed length L of the sliding window is set according to the sampling frequency, ensuring that the time span corresponding to the window covers the main time scale of inertial navigation error accumulation, and is set to 2 seconds; the error label corresponding to the last moment of the window is used as the annotation for that sample, thus constructing a training dataset. A hybrid neural network model is constructed and iteratively trained using the training dataset. This allows the model to learn the mapping relationship between historical inertial data sequences and the error at the current moment, resulting in a trained hybrid neural network model. The hybrid neural network model includes a convolutional module, a bidirectional long short-term memory network module, an attention mechanism module, and a fully connected output module, all connected in sequence. The convolutional module comprises two cascaded one-dimensional convolutional layers. The first convolutional layer is followed by a linear rectified activation function, a batch normalization layer, and a max-pooling layer, while the second convolutional layer is followed by a linear rectified activation function and a batch normalization layer, used to extract local fluctuation features from the input time-series data. The bidirectional long short-term memory network module includes a single layer of bidirectional long short-term memory network. Its forward layer processes the feature sequence in ascending time order to capture the positive accumulation pattern of error, and its backward layer processes the feature sequence in descending time order to infer the motion background. The forward hidden state and the backward hidden state at each time step are concatenated to output a comprehensive hidden state sequence. The attention mechanism module includes calculating the attention score of the hidden state at each time step output by the bidirectional long short-term memory network module, obtaining the attention weight after normalization, and performing weighted summation on each hidden state to generate a context vector focusing on the features of key historical moments. The fully connected output module is used to map the weighted features into three-dimensional pose error compensation values. The system reads a sequence of historical inertial data, including the current moment, from a preset historical data buffer and inputs it into a trained hybrid neural network model to obtain the error compensation value for the current moment. The hybrid neural network model extracts local fluctuation features of the input data through a convolutional module, captures the temporal accumulation pattern of errors from both forward and backward directions through a bidirectional long short-term memory network module, and weights and focuses the features of each moment in the historical sequence through an attention mechanism module to highlight key information. Finally, a fully connected output module maps the weighted features into a three-dimensional attitude error compensation value. Simultaneously, the system calculates the original attitude data for the current moment in parallel, uses the error compensation value to correct the original attitude data, and outputs the corrected navigation data.
2. The inertial navigation data correction method based on neural networks as described in claim 1, characterized in that, The establishment and maintenance of the historical data buffer includes: Construct a first-in-first-out circular buffer with a fixed capacity of L. Each frame of newly acquired and preprocessed inertial data is written to the end of the buffer, while the earliest frame of data is removed, so that the buffer always holds the preprocessed inertial data of the most recent L time steps. The historical data buffer is used to store preprocessed inertial data at consecutive time points; at each correction time.
3. The inertial navigation data correction method based on neural networks as described in claim 1, characterized in that, The original attitude data is corrected using the error compensation value, and the corrected navigation data is output, including: The corrected navigation data is obtained by subtracting the three-dimensional error compensation value output by the trained hybrid neural network model from the corresponding component of the original attitude data calculated by the strapdown inertial navigation system at the same time.
Citation Information
Patent Citations
Navigation error compensation method for micro-inertial satellite integrated navigation system
CN116380125A
Inertial navigation long-time auxiliary correction method based on time window attention mechanism
CN116718211A
Cited By
Soft-attached inertial measurement unit artifact compensation method and apparatus
CN122329368A