Neural network inertial attitude estimation method fusing physical information constraint
By introducing a neural network method with physical information constraints in inertial pose estimation, using sliding windows to process IMU data and optimize the model loss function, the problem of reduced accuracy and insufficient generalization ability of IMU pose estimation in a high dynamic environment is solved, and high-precision and robust pose estimation is achieved.
Patent Information
- Application Number
- CN202510618914.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-26
AI Technical Summary
The existing inertial measurement unit (IMU) attitude estimation methods have decreased accuracy in high dynamic environments, and the data-driven methods lack physical constraints, resulting in insufficient generalization capabilities and strong dependence on high-frequency supervision data.
By introducing a neural network method with physical information constraints, using sliding windows to process IMU data, combining physical consistency to screen pseudo-truth values, construct a neural network model, and using physical constraint loss and supervision loss function optimization model, sliding window smooth design optimization prediction results.
It improves the accuracy and robustness of inertial pose estimation, reduces the dependence on high-frequency supervised data, enhances the generalization ability of the network, and ensures the temporal continuity and stability of pose estimation.
Smart Images

Figure CN120538501A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inertial navigation and attitude estimation, and more particularly to a neural network inertial attitude estimation method integrating physical information constraints. Background Art
[0002] Inertial Measurement Units (IMUs) are widely used in aerospace, autonomous driving, robotic navigation, augmented reality, and other fields. They measure the angular velocity and acceleration of a vehicle in real time to calculate its attitude changes. However, due to inherent noise, drift, and nonlinear errors in IMUs, relying solely on IMUs for attitude estimation often results in cumulative errors, leading to decreased accuracy over long periods of time. Therefore, improving the accuracy and robustness of IMU attitude estimation has become a key research topic in the field of inertial navigation.
[0003] Currently, two approaches are commonly used to reduce the impact of IMU cumulative error on pose estimation. Traditional filter-based methods, such as Kalman Filter (KF), Extended Kalman Filter (EKF), and Complementary Filter (CF), rely on state-space models to model and estimate noise and error, making them suitable for low-dynamic scenarios. However, in high-dynamic environments, IMU error characteristics are complex, making it difficult to accurately model filter parameters, resulting in reduced pose estimation accuracy. Data-driven methods based on deep learning utilize neural networks to learn the mapping from IMU data to pose, which can partially compensate for modeling errors. However, purely data-driven methods are prone to overfitting the training data and lack physical constraints, resulting in insufficient generalization. These methods can lead to significant estimation errors, particularly in unseen motion patterns or under different vehicle conditions.
[0004] Furthermore, existing data-driven methods typically require high-precision ground-truth pose data during training, such as pose data acquired through optical motion capture systems, visual odometry, or lidar odometry. However, the output frequency of these methods is often lower than the sampling frequency of the IMU (e.g., the common output frequency of visual odometry is 10-20Hz, while the common output frequency of IMU is above 200Hz), resulting in sparse pose supervision data, which affects training effectiveness. Furthermore, the angular velocity data measured by the IMU may be affected by noise, making it difficult for existing methods to ensure the high quality of training samples during data preprocessing, further reducing the learning effect of the network.
[0005] Therefore, how to introduce physical constraints into deep learning methods, reduce dependence on high-frequency supervisory data, improve generalization capabilities, and improve the quality of training data remains an important challenge in the field of inertial pose estimation. Summary of the Invention
[0006] In view of this, the present invention provides a neural network inertial attitude estimation method that integrates physical information constraints; the generalization ability of the neural network is enhanced by physical information constraints, and the accuracy and robustness of inertial attitude estimation are improved.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] The present invention provides a neural network inertial attitude estimation method integrating physical information constraints, comprising the following steps:
[0009] S1. Obtain IMU data and attitude quaternion values at corresponding moments; perform windowing on the IMU data, and filter the attitude quaternion values as attitude quaternion pseudo-true values based on physical consistency;
[0010] S2. Using the windowed processed data and the pseudo-true values of the attitude quaternions as a data set, training the constructed neural network prediction model; and optimizing the neural network prediction model through a model loss function; wherein the neural network prediction model includes an input layer, a time series feature extraction layer, a quaternion prediction layer, and an output layer; and the model loss function includes a physical constraint loss function and a supervision loss function;
[0011] S3. When performing target carrier attitude estimation, the IMU data of the corresponding window is input into the trained neural network prediction model, and the target carrier attitude quaternion estimation value of the corresponding window is calculated based on the attitude quaternion change estimation value obtained by the quaternion prediction layer and the attitude quaternion value at the initial moment.
[0012] Furthermore, it also includes:
[0013] S4. The calculated attitude quaternion estimate of the corresponding window is weighted averaged according to the overlapping area of adjacent sliding windows; when the window switches, the weighted average is smoothly transitioned based on spherical linear interpolation to ensure the continuity of the attitude estimation.
[0014] Furthermore, the IMU data in step S1 includes the absolute timestamp, three-axis angular velocity and three-axis acceleration of the data.
[0015] Furthermore, in step S1, the IMU data is subjected to windowing processing, specifically including:
[0016] The IMU data is segmented using a fixed window length, and an overlapping sliding window method is used to enhance the continuity of the time series to obtain windowed IMU data;
[0017] Convert the absolute timestamp corresponding to the windowed IMU data into a relative timestamp;
[0018] The windowed IMU data and the relative timestamp are combined to obtain windowed processed data.
[0019] Furthermore, in step S1, the posture quaternion value is screened based on physical consistency as a posture quaternion pseudo-true value, specifically including:
[0020] Calculate the rate of change of the attitude quaternion values at adjacent supervision moments, and calculate the physical consistency error based on the angular velocity measurements at the supervision moments;
[0021] comparing the physical consistency error with a preset error threshold;
[0022] Filter out the corresponding attitude quaternion value whose physical consistency error is less than the preset error threshold as the attitude quaternion pseudo-true value;
[0023] The error threshold is set based on the mean and standard deviation of the calculated errors of the posture quaternion values.
[0024] Furthermore, the input layer in step S2 includes a normalization layer and a fully connected layer; the normalization layer is used to normalize the windowed data, and the fully connected layer is used to perform nonlinear mapping on the normalized data;
[0025] The temporal feature extraction layer is constructed using a Transformer encoder and uses a self-attention mechanism to extract the temporal features of the data processed by the input layer;
[0026] The quaternion prediction layer includes a fully connected layer and a quaternion normalization layer; the fully connected layer is used to map the time series features to the quaternion space, and the values of the quaternion space are normalized as the estimated value of the attitude quaternion change at the current moment relative to the initial moment of the sliding window;
[0027] The output layer calculates the estimated value of the attitude quaternion at the current moment based on the estimated value of the attitude quaternion change and the pseudo-true value of the attitude quaternion at the initial moment.
[0028] Furthermore, the model loss function in step S2 includes a physical constraint loss function and a supervision loss function; specifically, it includes:
[0029] The model loss function is expressed as follows:
[0030] L(θ)=λ physL phys (θ)+λ sup L sup (θ)
[0031] The physical constraint loss function is constructed based on the quaternion differential equation and is expressed as follows:
[0032]
[0033] The supervision loss function is constructed based on the posture quaternion estimate at the current moment and the pseudo-true value of the posture quaternion at the supervision moment after windowing processing; it is expressed as follows:
[0034]
[0035] Among them, λ phys and λ sup are weight coefficients, respectively, physical constraint loss L phys (θ) and the supervision loss L sup (θ) is the weight of the window, N is the window length; is the derivative of the quaternion output by the neural network model with respect to the input time t, which is obtained by automatic differentiation of the neural network model; q([t i|k ,u k ]|θ) is the attitude quaternion estimated by the neural network model, ω i,k is the measured value of the angular velocity at the i-th timestamp in the k-th window; t i,k is the i-th timestamp in the k-th window; represents quaternion multiplication, ||·|| represents vector modulus; D k is the set of supervised sample numbers within the k-th sliding window, |D k | for D k The number of sample points, To supervise the data The conjugate quaternion, q([t j|k ,u k ]|θ) is the quaternion predicted by the neural network model, With q([t j|k ,u k ]|θ) have the same timestamp, and rotvec(·) converts the quaternion into a rotation vector.
[0036] Furthermore, in step S2, the windowed processed data and the pseudo-true value of the attitude quaternion are used as a data set to train the constructed neural network prediction model; and the neural network prediction model is optimized by a model loss function; specifically, the following steps are included:
[0037] S21, taking the windowed processed data and the pseudo-true value of the attitude quaternion as a data set, and dividing it into a training set and a validation set; wherein the training set optimizes the parameters of the neural network prediction model, and the validation set evaluates the generalization ability of the neural network prediction model;
[0038] S22. Using the training set to train the neural network prediction model, calculating the physical constraint loss and the supervision loss, setting weight coefficients to balance the physical constraints and data-driven learning, and using an optimizer to optimize the parameters of the neural network prediction model to minimize the total loss function;
[0039] S23. Dynamically adjust the weight coefficients of the physical constraint loss function and the supervision loss function;
[0040] S24. Use the validation set to evaluate the generalization ability of the neural network prediction model; calculate the validation set loss, monitor the model performance under different weight coefficients, and select the neural network prediction model that performs best on the validation set as the final training result.
[0041] Furthermore, the step S3 specifically includes:
[0042] When performing attitude estimation, the IMU data of the corresponding window is input into the neural network prediction model, and the attitude quaternion change estimation value is obtained through the quaternion prediction layer;
[0043] Calculate the estimated value of the attitude quaternion at the target timestamp; the formula is expressed as:
[0044]
[0045] Among them, q i,k Represents the timestamp t i,k The estimated quaternion value of the attitude at q 0,k Represents the timestamp t 0,k The estimated value of the attitude quaternion at t is given by the historical attitude estimation, 0,k represents the initial timestamp of the kth window, Δq i|k It is the estimated value of the attitude quaternion change output by the neural network prediction model.
[0046] As can be seen from the above technical solutions, compared with the prior art, the present invention discloses a neural network inertial attitude estimation method integrating physical information constraints, which has the following advantages:
[0047] The present invention processes IMU data based on a sliding window and introduces the time dimension to construct the input of the neural network model; combines the pseudo-true value based on physical consistency screening to improve the quality of neural network model training data, reduce the impact of low-quality data on model learning, and further enhance the generalization ability of the network.
[0048] Physical constraint loss and supervision loss are used to optimize the neural network prediction model; posture estimation that conforms to physical laws is achieved, the problem of decreased generalization ability due to changes in data distribution is reduced, and the accuracy and stability of posture estimation are improved.
[0049] When performing attitude estimation, a sliding window smoothing design is used to optimize the prediction results, ensure the temporal continuity of attitude estimation, reduce short-term jitter, and improve the stability of attitude estimation.
[0050] The present invention effectively reduces the dependence on high-frequency attitude pseudo-true value data in inertial navigation scenarios, improves the adaptability of neural network prediction models on different carriers, and provides an efficient and robust inertial attitude estimation solution for application scenarios such as pedestrian navigation, vehicle-mounted inertial navigation, and robot positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0052] Figure 1 A flowchart of a neural network inertial attitude estimation method integrating physical information constraints is provided in an embodiment of the present invention.
[0053] Figure 2 A schematic diagram of training data screening based on physical consistency provided by an embodiment of the present invention.
[0054] Figure 3 Schematic diagram of the neural network prediction model structure and loss function optimization provided by an embodiment of the present invention.
[0055] Figure 4 Schematic diagram of sliding window and posture smoothing processing in the posture estimation and reasoning stage provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0057] The present invention discloses a neural network inertial attitude estimation method integrating physical information constraints, comprising the following steps:
[0058] S1. Obtain IMU data and the attitude quaternion value at the corresponding moment; perform windowing on the IMU data and filter the attitude quaternion value as the attitude quaternion pseudo-true value based on physical consistency;
[0059] S2. Using the windowed processed data and the pseudo-true values of the attitude quaternions as a data set, the constructed neural network prediction model is trained; and the neural network prediction model is optimized using a model loss function; wherein the neural network prediction model includes an input layer, a time series feature extraction layer, a quaternion prediction layer, and an output layer; and the model loss function includes a physical constraint loss function and a supervision loss function;
[0060] S3. When performing target carrier attitude estimation, the IMU data of the corresponding window is input into the trained neural network prediction model, and the target carrier attitude quaternion estimation value of the corresponding window is calculated based on the attitude quaternion change estimation value obtained by the quaternion prediction layer and the attitude quaternion value at the initial moment.
[0061] S4. The calculated attitude quaternion estimate of the corresponding window is weighted averaged according to the overlapping area of adjacent sliding windows; when the window switches, the weighted average is smoothly transitioned based on spherical linear interpolation to ensure the continuity of the attitude estimation.
[0062] The present invention first obtains the IMU data and the attitude quaternion values at the corresponding moments obtained by the high-precision attitude estimation system, performs window processing and screening to obtain the training set of the neural network prediction model, and then performs training; reduces the impact of low-quality data on model learning, and further enhances the generalization ability of the network.
[0063] Secondly, the neural network prediction model is optimized by minimizing the model loss function, and physical constraint loss and supervision loss are used to achieve posture estimation that conforms to physical laws, reduce the problem of decreased generalization ability caused by changes in data distribution, and improve the accuracy and stability of posture estimation.
[0064] When performing attitude estimation, the attitude quaternion estimate at the target moment of the corresponding window is calculated based on the IMU data of the corresponding window, the attitude quaternion value at the initial moment, and the estimated value of the attitude quaternion change. Finally, the sliding window smoothing design is used to optimize the prediction result to ensure the temporal continuity of the attitude estimation, reduce short-term jitter, and improve the stability of the attitude estimation.
[0065] The present invention is described below with reference to specific embodiments.
[0066] Example 1
[0067] This embodiment is applied to pedestrian inertial posture estimation, refer to Figure 1As shown in the figure, a neural network inertial attitude estimation method that integrates physical information constraints is used to achieve high-precision inertial attitude estimation. Specifically, this embodiment mainly includes six core parts: IMU data acquisition and preprocessing, training data acquisition and screening, neural network modeling, loss function design, neural network training, and attitude estimation in the inference stage.
[0068] Among them, IMU data acquisition and preprocessing mainly include obtaining three-axis angular velocity and three-axis acceleration data, and performing windowing and time information embedding; training data acquisition and screening use a high-precision attitude estimation system to obtain pseudo-true values, and eliminate samples with large errors based on a physical consistency screening strategy; the neural network modeling part uses a deep temporal neural network for feature extraction and predicts the attitude quaternion at any time; the loss function design part combines physical constraint loss and supervision loss to optimize the neural network learning objective; the loss weight is dynamically adjusted during the neural network training process, so that the network relies on supervision data in the early stage of training, and the physical constraint weight is enhanced in the later stage of training to improve the generalization ability of the model; the inference stage uses a sliding window to input IMU data, and predicts the attitude changes at the target moment through timestamp queries, and combines smoothing processing strategies to improve the time continuity and stability of attitude estimation.
[0069] The following describes the implementation steps of this embodiment in detail:
[0070] Step 1: IMU data acquisition and preprocessing.
[0071] In this embodiment, the IMU sensor is fixed on the pedestrian (such as worn on the waist, foot or handheld) to collect three-axis angular velocity and three-axis acceleration data. The sampling frequency is set to 200 Hz to ensure sufficient timing resolution.
[0072] The acquired IMU sensor data includes: IMU sampling time information t, three-axis angular velocity ω=(ω x ,ω y ,ω z )(unit: rad / s), triaxial acceleration a=(a x ,a y ,a z )(Unit: m / s 2 ); The collected IMU data will be windowed and prepared for subsequent training data acquisition and screening.
[0073] The specific steps of data preprocessing include:
[0074] Step 1.1: Segment the collected IMU data according to a fixed window length N, and use an overlapping sliding window method to enhance the continuity of the time series;
[0075] After segmentation, each window contains N consecutive data points. In this embodiment, a time window of 1 second is formed, and each window contains N = 200 groups of data points. Using overlapping sliding windows, this embodiment uses an overlap rate of 50% and a single window sliding amount of M = 100. After windowing, the data of the kth window is The format of each row of data is [ω x ,ω y ,ω z ,a x ,a y ,a z ].
[0076] Step 1.2: To enhance the time modeling capability of the neural network, add time information to the input data and convert it into relative time information; that is, convert the absolute timestamps of the data in the window into relative timestamps, with the i-th absolute timestamp t in the k-th window as the value. i,k For example, convert it to relative to the initial time of the window t 0,k The relative timestamp t i|k =t i,k -t 0,k , i={1,2,...,N}.
[0077] Step 1.3: Set the relative timestamp t i|k With windowed IMU data u k Combined into neural network input data, the complete input data form is
[0078] X i,k =[t i|k ,u k ],i={1,2,...,200}
[0079] That is, 6N+1-dimensional data, where the first dimension is relative timestamp information and the next 6N dimensions are IMU data; in this embodiment, the data is 1201-dimensional data, and the next 1200 dimensions are IMU data.
[0080] Step 2: Acquisition and screening of training data.
[0081] This embodiment uses a high-precision visual inertial odometry system as the source of attitude pseudo-truth. The visual inertial odometry system outputs high-precision attitude quaternion q at a frequency of 20 Hz. gt , as the pseudo-true value of the attitude quaternion, to construct a training dataset. The training data is filtered based on the physical consistency error to improve the quality of the training data.
[0082] In step 2, the specific steps of screening training data include:
[0083] Step 2.1: Calculate the quaternion change rate between the supervision data, taking the adjacent supervision time tj , t j+1 The pseudo-true quaternion of For example, its rate of change is This rate of change reflects the evolution of the pose of the pseudo-truth between two supervision moments;
[0084] Step 2.2: Calculate the physical consistency error based on the IMU measurement, using the formula:
[0085]
[0086] Where, E j t j The physical consistency error of the training data at each moment, and t j and t j+1 The pseudo-true value quaternion at the moment, ω j t j The angular velocity measurement value at the moment, represents quaternion multiplication, and ||·|| represents the vector modulus.
[0087] Step 2.3: Screen the training samples based on the 3σ criterion and calculate the mean error μ of the training data points E and standard deviation σ E , set the screening threshold to
[0088] E>μ E +3σ E
[0089] For data points that meet this condition, it is considered that they may be affected by large noise or false true value errors and do not meet the physical consistency requirements. They need to be removed from the data set to improve the quality of training data. Figure 2 As shown in the figure, the horizontal axis represents the sample acquisition time, the vertical axis represents the physical consistency error value, and E is the screening threshold; the screened data is used for neural network training to improve the generalization ability of the network.
[0090] Step 3: Build a deep neural network.
[0091] This embodiment adopts a deep temporal neural network based on Transformer, and its structure is referenced Figure 3 As shown, it mainly includes input layer, time series feature extraction layer, quaternion prediction layer and output layer ( Figure 3 not shown).
[0092] The specific steps of building a deep neural network in step 3 of this embodiment include:
[0093] Step 3.1: Build the input layer and use the normalization layer to normalize the input IMU data to improve training stability and convergence speed. Use the fully connected layer to perform nonlinear mapping on the input data to improve feature expression capabilities.
[0094] The normalization layer includes methods such as mean-variance normalization and Min-Max normalization. This embodiment uses time encoding to enhance the learning ability of time series changes, including methods such as Fourier feature mapping and MLP time embedding.
[0095] Step 3.2: Build a time series feature extraction layer. The neural network structure can use Transformer encoder, bidirectional long short-term memory network (Bi-LSTM), and hybrid structure to extract the time series features of the data.
[0096] This embodiment uses the Transformer encoder to build a temporal feature extraction layer and uses the self-attention mechanism to extract the temporal features of IMU data;
[0097] Step 3.3: Build the quaternion prediction layer, use the fully connected layer to map the time series features to the quaternion space, and normalize the quaternion to ensure that its modulus is always 1, as the estimated value Δq([t i|k ,u k ]|θ), where θ represents the trainable parameters of the neural network.
[0098] Step 3.4: Build the output layer and estimate the value of the attitude quaternion change Δq([t i|k ,u k ]|θ) and the pseudo-true value of the attitude quaternion at the initial moment of the sliding window The current time t can be calculated i,k The estimated attitude quaternion is
[0099]
[0100] In the formula, q([t i|k ,u k ]|θ) is the current time t i,k The quaternion estimate of the attitude, is the pseudo-true value of the attitude quaternion at the initial moment of the sliding window, Δq([t i|k ,u k ]|θ) is the estimated value of the attitude quaternion change output by the neural network, and θ is a trainable parameter of the neural network.
[0101] Step 4: Construct the loss function.
[0102] Construct physical constraint loss L based on quaternion differential equation phys (θ), combined with the pseudo-true value of the pose quaternion to construct the supervision loss L sup (θ), comprehensive physical loss and supervision loss, construct the total loss function L(θ), the loss function calculation process refers to Figure 3 shown.
[0103] In step 4, the specific steps of constructing the loss function include:
[0104] Step 4.1: Construct physical constraint loss based on quaternion differential equation
[0105]
[0106] Where, The derivative of the quaternion output by the neural network model with respect to the input time t is obtained by automatic differentiation of the neural network, q([t i|k ,u k ]|θ) is the attitude quaternion estimated by the neural network model, ω i,k is the measured value of the angular velocity at the i-th timestamp in the k-th window, provided by the IMU and does not depend on the supervision data, represents quaternion multiplication, and ||·|| represents the vector norm.
[0107] Step 4.2: For supervised sample points, use the neural network to predict the quaternion q([t j|k ,u k ]|θ) and supervised data The gap between the constructed supervision loss
[0108]
[0109] Where D k is the set of supervised sample numbers within the k-th sliding window, |D k | for D k The number of sample points, To supervise the data The conjugate quaternion, q([t j|k ,u k ]|θ) is the quaternion predicted by the neural network, With q([t j|k ,u k ]|θ) need to have the same timestamp, rotvec(·) converts the quaternion into a rotation vector, represents quaternion multiplication, and ||·|| represents the vector norm.
[0110] Step 4.3: Combine physical constraint loss and supervision loss to construct the total loss function
[0111] L(θ)=λ phys L phys (θ)+λ sup L sup (θ)
[0112] Where λ phys and λ sup is the weight coefficient, which dynamically adjusts the physical constraint loss L during training. phys (θ) and the supervision loss L sup The proportion of (θ) is mainly based on supervision loss in the early stage, and the weight of physical loss is gradually increased in the later stage.
[0113] Step 5: Neural network training.
[0114] The neural network is trained using the filtered training data to calculate the physical constraint loss and supervision loss. The weights between physical constraints and data supervision are dynamically adjusted during the training process to guide the network to learn inertial posture estimation capabilities that conform to physical laws.
[0115] The specific steps for training a neural network include:
[0116] Step 5.1: Divide the dataset into a training set and a validation set according to a certain ratio. The training set is used to optimize the neural network parameters, and the validation set is used to evaluate the generalization ability of the model. The data can be divided randomly to ensure a balanced distribution of training and validation data.
[0117] Step 5.2: Use the training set to train the neural network and calculate the physical constraint loss L phys (θ) and the supervision loss L sup (θ), and set weight parameters to balance physical constraints and data-driven learning, and then calculate the total loss function value L(θ). Use optimizers (such as Adam) to optimize the neural network parameters to minimize the total loss function and improve the network prediction accuracy;
[0118] Step 5.3: Dynamically adjust the loss weights. In the early stages of training, the supervised loss is used as the main weight, allowing the network to learn the basic pose mapping relationship. In the later stages of training, the weight of the physical loss is gradually increased to make the network rely more on physical information and improve generalization ability.
[0119] Step 5.4: Evaluate the trained model on the validation set, calculate the validation set loss, and monitor the model performance under different weight parameter settings. Select the model with the best performance on the validation set as the final training result and save it for the inference stage.
[0120] Step 6: Pose estimation in the inference phase.
[0121] Reference Figure 4As shown in the figure, the inference stage relies only on IMU data for attitude estimation, adopts a sliding window input strategy, and predicts the attitude change at the target moment through timestamp query. Finally, smoothing is performed to improve the continuity and stability of the estimation results.
[0122] Step 6.1: During the inference process, only IMU data is used for attitude estimation. In the IMU data stream, a sliding window method is used to take N length data u each time. k As input, and record the relative time t i|k ; For each sliding window, the network outputs an estimated value of the quaternion change over time Δq([t i|k ,u k ]|θ), abbreviated as Δq i|k ;
[0123] Step 6.2: Calculate an arbitrary timestamp t i,k Attitude quaternion estimate
[0124]
[0125] Where q i,k Represents the timestamp t i,k The estimated quaternion value of the attitude at q 0,k Represents the timestamp t 0,k The estimated value of the attitude quaternion at is given by the historical attitude estimation, and q 0,0 =q initial is the initial carrier posture, Δq i|k Output the estimated value of the attitude quaternion change to the network.
[0126] Step 6.3: Perform a weighted average of the attitude estimation values in the overlapping area of adjacent sliding windows, and when switching windows, perform a smooth transition on the attitude quaternion based on spherical linear interpolation (Slerp) to ensure the continuity of the attitude estimation.
[0127] This paper combines quaternion differential equations as physical constraints to construct a deep learning model based on a time-series neural network, improving the accuracy and stability of data-driven inertial attitude estimation. During the training phase, the present invention uses high-precision, low-frequency attitude data as a supervisory signal and optimizes the training data based on a physical consistency screening strategy to improve the model's generalization capabilities. During the inference phase, high-precision attitude estimation can be achieved using only IMU data, and a sliding window strategy is used to improve the temporal continuity and stability of the attitude estimation results. This forms a neural network inertial attitude estimation method and system that integrates physical information constraints, improving the robustness and generalization capabilities of inertial navigation systems in highly dynamic environments.
[0128] The present invention addresses the problems of existing neural network inertial attitude estimation methods being susceptible to pure data-driven limitations, the risk of overfitting, and a strong dependence on high-frequency attitude pseudo-true values. By introducing quaternion differential equations as physical constraints in the neural network training process and constructing a loss function that combines physical information, the attitude estimation that conforms to physical laws is achieved, the problem of decreased generalization ability caused by changes in data distribution is reduced, and the accuracy and stability of attitude estimation are improved. At the same time, the present invention screens training data based on physical consistency, calculates the physical constraint error of the training data using quaternion differential equations, and eliminates data samples with poor physical consistency through the 3σ criterion, thereby improving the quality of training data, reducing the impact of low-quality data on model learning, and further enhancing the generalization ability of the network. In addition, in the inference stage, the present invention only relies on IMU data for attitude estimation, optimizes the prediction results using a sliding window smoothing strategy, ensures the temporal continuity of attitude estimation, reduces short-term jitter, and improves the stability of attitude estimation. Through the above technical solution, the present invention effectively reduces the dependence on high-frequency attitude pseudo-true value data in the inertial navigation scenario, improves the adaptability of the model on different carriers, and provides an efficient and robust inertial attitude estimation solution for application scenarios such as pedestrian navigation, vehicle-mounted inertial navigation, and robot positioning.
[0129] Example 2
[0130] This embodiment of the present invention is applied to vehicle-mounted inertial attitude estimation, using a neural network inertial attitude estimation method that integrates physical information constraints to achieve high-precision attitude estimation during vehicle motion. Compared to the pedestrian inertial navigation system in Example 1, the vehicle-mounted inertial navigation system differs in terms of data acquisition method, window length, and source of false positives.
[0131] In terms of data acquisition, the IMU sensor in this embodiment is fixedly mounted within the vehicle's inertial navigation unit (INSU), with a sampling frequency of 100 Hz to accommodate the vehicle's motion characteristics. Because vehicle posture changes are more stable than those of pedestrians, the data window length is set to 2 seconds, meaning each window contains N = 200 data points. An overlapping sliding window is used with a 50% overlap ratio and a single window sliding distance of M = 100. After windowing and time encoding, the IMU data enters the training data screening phase.
[0132] When acquiring and filtering training data. The pseudo-truth attitude data in this embodiment is obtained by the vehicle-mounted GNSS / IMU fusion system. Compared to the visual-inertial odometry used in Example 1, this method has higher accuracy and stability in large-scale high-speed motion scenarios (such as highways and urban roads). The pseudo-truth frequency of the GNSS / IMU fusion system is set to 50Hz, which is lower than the IMU sampling frequency.
[0133] The other processes are the same as those in Example 1 and will not be described in detail here.
[0134] The present invention addresses the problems of traditional filter-based inertial attitude estimation methods relying on state-space models and pure data-driven methods being prone to overfitting and having a strong dependence on high-frequency pseudo-true value data. By introducing a deep neural network that integrates physical information constraints, a high-precision and robust inertial attitude estimation method is constructed. The present invention combines quaternion differential equations as physical constraints during the neural network training process, so that the network follows physical laws while learning the characteristics of IMU data, thereby reducing the demand for high-frequency supervision data and improving the generalization ability of attitude estimation. In addition, the present invention is based on a physical consistency screening strategy to eliminate training data points with large errors to improve data quality and reduce the impact of IMU noise on model training. In the inference stage, the present invention adopts a sliding window strategy to achieve attitude estimation, and combines timestamp query to predict attitude changes at any time. At the same time, spherical linear interpolation is used for attitude smoothing optimization to reduce the discontinuity problem of attitude estimation and improve the stability of reasoning results. The present invention can maintain good adaptability in different application scenarios (such as pedestrian inertial navigation, vehicle-mounted inertial navigation), and is particularly suitable for application scenarios such as inertial navigation, robot positioning, autonomous driving, motion tracking, etc., effectively improving the accuracy and robustness of attitude estimation.
[0135] The neural network inertial attitude estimation method integrating physical information constraints described in the above embodiment is programmed and implemented, and a computer processor or embedded device is used to perform IMU data processing, training data screening, neural network inference calculation and other tasks to form a neural network inertial attitude estimation system integrating physical information constraints, so that the terminal system has high-precision inertial attitude estimation capabilities.
[0136] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by program instructions in combination with hardware. The aforementioned program may be stored in a computer-readable storage medium and, when executed, completes the various steps of the above-mentioned method embodiments. The aforementioned storage medium includes, but is not limited to, a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, or other media that can store program code.
[0137] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. The system devices disclosed in the embodiments correspond to the methods disclosed in the embodiments, so the description is relatively simple. For relevant parts, refer to the method description.
[0138] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A neural network inertial attitude estimation method integrating physical information constraints, characterized in that: The following steps are involved: S1. Obtain IMU data and attitude quaternion values at corresponding moments; perform windowing on the IMU data, and filter the attitude quaternion values as attitude quaternion pseudo-true values based on physical consistency; S2. Using the windowed processed data and the pseudo-true values of the attitude quaternions as a data set, training the constructed neural network prediction model; and optimizing the neural network prediction model through a model loss function; wherein the neural network prediction model includes an input layer, a time series feature extraction layer, a quaternion prediction layer, and an output layer; and the model loss function includes a physical constraint loss function and a supervision loss function; S3. When performing target carrier attitude estimation, the IMU data of the corresponding window is input into the trained neural network prediction model, and the target carrier attitude quaternion estimation value of the corresponding window is calculated based on the attitude quaternion change estimation value obtained by the quaternion prediction layer and the attitude quaternion value at the initial moment.
2. A neural network inertial attitude estimation method integrating physical information constraints according to claim 1, characterized in that: Also includes: S4. The calculated attitude quaternion estimate of the corresponding window is weighted averaged according to the overlapping area of adjacent sliding windows; when the window switches, the weighted average is smoothly transitioned based on spherical linear interpolation to ensure the continuity of the attitude estimation.
3. The neural network inertial attitude estimation method integrating physical information constraints according to claim 1, characterized in that: The IMU data in step S1 includes the absolute timestamp, three-axis angular velocity and three-axis acceleration of the data.
4. A neural network inertial attitude estimation method integrating physical information constraints as claimed in claim 3, characterized in that: In step S1, the IMU data is subjected to windowing processing, specifically including: The IMU data is segmented using a fixed window length, and an overlapping sliding window method is used to enhance the continuity of the time series to obtain windowed IMU data; Convert the absolute timestamp corresponding to the windowed IMU data into a relative timestamp; The windowed IMU data and the relative timestamp are combined to obtain windowed processed data.
5. The neural network inertial attitude estimation method integrating physical information constraints according to claim 1, characterized in that: In step S1, the posture quaternion value is selected based on physical consistency as the posture quaternion pseudo-true value, specifically including: Calculate the rate of change of the attitude quaternion values at adjacent supervision moments, and calculate the physical consistency error based on the angular velocity measurements at the supervision moments; comparing the physical consistency error with a preset error threshold; Filter out the corresponding attitude quaternion value whose physical consistency error is less than the preset error threshold as the attitude quaternion pseudo-true value; The error threshold is set based on the mean and standard deviation of the calculated errors of the posture quaternion values.
6. The neural network inertial attitude estimation method integrating physical information constraints according to claim 1, characterized in that: The input layer in step S2 includes a normalization layer and a fully connected layer; the normalization layer is used to normalize the windowed data, and the fully connected layer is used to perform nonlinear mapping on the normalized data; The temporal feature extraction layer is constructed using a Transformer encoder and uses a self-attention mechanism to extract the temporal features of the data processed by the input layer; The quaternion prediction layer includes a fully connected layer and a quaternion normalization layer; the fully connected layer is used to map the time series features to the quaternion space, and the values of the quaternion space are normalized as the estimated value of the attitude quaternion change at the current moment relative to the initial moment of the sliding window; The output layer calculates the estimated value of the attitude quaternion at the current moment based on the estimated value of the attitude quaternion change and the pseudo-true value of the attitude quaternion at the initial moment.
7. A neural network inertial attitude estimation method integrating physical information constraints as claimed in claim 6, characterized in that: The model loss function in step S2 includes a physical constraint loss function and a supervision loss function; specifically, it includes: The model loss function is expressed as follows: L(θ)=λ phys L phys (θ)+λ sup L sup (i) The physical constraint loss function is constructed based on the quaternion differential equation and is expressed as follows: The supervision loss function is constructed based on the posture quaternion estimate at the current moment and the pseudo-true value of the posture quaternion at the supervision moment after windowing processing; it is expressed as follows: Among them, λ phys and λ sup are weight coefficients, respectively, physical constraint loss L phys (θ) and the supervision loss L sup (θ) is the weight of the window, N is the window length; is the derivative of the quaternion output by the neural network model with respect to the input time t, which is obtained by automatic differentiation of the neural network model; q([t i|k ,u k ]|θ) is the attitude quaternion estimated by the neural network model, ω i,k is the measured value of the angular velocity at the i-th timestamp in the k-th window; t i,k is the i-th timestamp in the k-th window; represents quaternion multiplication, ||·|| represents vector modulus; D k is the set of supervised sample numbers within the k-th sliding window, |D k | for D k The number of sample points, To supervise the data The conjugate quaternion, q([t j|k ,u k ]|θ) is the quaternion predicted by the neural network model, With q([t j|k ,u k ]|θ) have the same timestamp, and rotvec(·) converts the quaternion into a rotation vector.
8. The neural network inertial attitude estimation method integrating physical information constraints according to claim 1, characterized in that: In step S2, the windowed processed data and the pseudo-true value of the attitude quaternion are used as a data set to train the constructed neural network prediction model; And optimize the neural network prediction model through the model loss function; specifically including: S21, taking the windowed processed data and the pseudo-true value of the attitude quaternion as a data set, and dividing it into a training set and a validation set; wherein the training set optimizes the parameters of the neural network prediction model, and the validation set evaluates the generalization ability of the neural network prediction model; S22. Using the training set to train the neural network prediction model, calculating the physical constraint loss and the supervision loss, setting weight coefficients to balance the physical constraints and data-driven learning, and using an optimizer to optimize the parameters of the neural network prediction model to minimize the total loss function; S23. Dynamically adjust the weight coefficients of the physical constraint loss function and the supervision loss function; S24. Use the validation set to evaluate the generalization ability of the neural network prediction model; calculate the validation set loss, monitor the model performance under different weight coefficients, and select the neural network prediction model that performs best on the validation set as the final training result.
9. A neural network inertial attitude estimation method integrating physical information constraints as claimed in claim 8, characterized in that: The step S3 specifically includes: When performing attitude estimation, the IMU data of the corresponding window is input into the neural network prediction model, and the attitude quaternion change estimation value is obtained through the quaternion prediction layer; Calculate the estimated value of the attitude quaternion at the target timestamp; the formula is expressed as: Among them, q i,k Represents the timestamp t i,k The estimated quaternion value of the attitude at q 0,k Represents the timestamp t 0,k The estimated value of the attitude quaternion at t is given by the historical attitude estimation, 0,k represents the initial timestamp of the kth window, Δq i|k It is the estimated value of the attitude quaternion change output by the neural network prediction model.
Citation Information
Cited By
Space target orbit intelligent prediction method fusing orbit dynamics constraint
CN121145644A
An intelligent prediction method for space target orbit combining with orbit dynamics constraints
CN121145644B
Inertial navigation positioning method and system based on attitude dynamics and neural network
CN121655509A
IMU array data fusion method and system based on physical constraint self-supervised learning
CN122113059A
A Data Fusion Method and System for IMU Arrays Based on Physically Constrained Self-Supervised Learning
CN122113059B