IMU attitude angle prediction method fusing physical information neural network
By integrating physical information neural networks, the loss function is constructed using the angular velocity differential equation, which solves the problems of increased error and high computational complexity in IMU pose estimation, and realizes the improvement of the autonomous correction and generalization ability of the gyroscope.
Patent Information
- Application Number
- CN202510275337.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-08-08
AI Technical Summary
The existing IMU-based pose estimation method has increased error and high computational complexity when facing the influence of dynamic noise. The deep learning method has poor generalization ability when it has not encountered a motion mode, making it difficult to suppress the integral drift of the gyroscope.
Using the method of fused physical information neural network, the loss function containing the angular velocity differential equation is constructed, the model is trained using the gradient descent method, and the loss weight is adjusted adaptively, the gyroscope is automatically corrected, and the hardware and calculation complexity is reduced.
It improves the generalization ability of neural networks to unknown motion patterns, effectively overcomes the accumulation error of gyroscope integrals, and realizes the independent calibration of gyroscope without the need for accelerometers and magnetometers to assist calibration.
Smart Images

Figure CN120449622A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of IMU attitude estimation, and in particular to an IMU attitude angle prediction method integrating physical information neural network. Background Art
[0002] IMU-based attitude estimation is a well-established research area. Traditional approaches, such as the classic Kalman filter or extended Kalman filter, fuse accelerometer and magnetometer data to correct for gyroscope bias and achieve accurate attitude estimation. However, these methods rely heavily on prior noise statistical models. When the accelerometer and magnetometer are affected by dynamic noise, the state estimation error increases with iteration, ultimately leading to divergence in the estimation results. Furthermore, the dimensionality of the state equations in the multi-sensor fusion framework is too large, increasing the computational complexity of the algorithm. One approach to improve attitude estimation performance is to incorporate deep learning techniques. Specifically, the robustness of the filter is enhanced by adaptively adjusting the filter covariance matrix. However, deep learning-based attitude estimation methods rely heavily on data-driven approaches and ignore real-world mechanics. This results in poor generalization of trained neural network models to unprecedented motion patterns. Furthermore, existing neural networks lack explicit modeling of the time-varying zero bias, making it difficult to suppress gyroscope integral drift. Therefore, in order to solve the above problems, the present invention proposes an IMU attitude angle prediction method that integrates physical information neural network. This method introduces physical information neural network, takes angular velocity differential equation as physical information item, constructs the constraint condition of loss function, effectively reduces the long-term cumulative error of gyroscope, and does not require auxiliary calibration of accelerometer and magnetometer, thus realizing autonomous correction of gyroscope and reducing hardware cost and algorithm complexity. Summary of the Invention
[0003] The purpose of the present invention is to provide an IMU attitude angle prediction method that integrates physical information neural network to solve the problems raised in the above background technology.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] A method for predicting IMU attitude angles by integrating physical information neural networks includes the following steps:
[0006] Step 1, establish the dynamic model of the gyroscope;
[0007] Step 2: Build a physical information neural network model and define the loss function;
[0008] Step 3: Use the gradient descent method to train the physical information neural network model and adaptively adjust the loss weights of the data items and the physical information items;
[0009] Step 4: Use the trained physical information neural network model to predict the attitude angle of the IMU;
[0010] Step 5: Repeat step 4 to obtain the pose estimation at all times.
[0011] Furthermore, in step 1, the gyroscope outputs angular velocity. By integrating the angular velocity over time, the change in attitude angle is calculated. Its dynamic model is given by the following formula:
[0012]
[0013] Where θ(t) is the attitude angle, which is equal to the initial attitude angle θ(0) plus the integral of the angular velocity ω(τ) from the initial moment to the current moment t over the time τ;
[0014] The angular velocity is obtained by taking the derivative of the attitude angle with respect to time:
[0015] dθ / dt=ω
[0016] Among them, θ is the attitude angle, t is the time, and ω is the angular velocity.
[0017] Furthermore, the physical information neural network model in step 2 is composed of a bidirectional LSTM layer and a fully connected layer. The structure of the bidirectional LSTM layer includes a forward LSTM and a backward LSTM. The forward information and backward information of the time series data are obtained respectively, and then connected to obtain the same output. The process is given by the following formula:
[0018]
[0019] in, is the output of bidirectional LSTM, subscript t represents time, Represents forward LSTM and backward LSTM respectively, ⊙ represents element-by-element multiplication, tanh is the activation function, is the output gate of the forward LSTM at time t, is the memory unit of the forward LSTM at time t, which is composed of the memory unit of the previous moment and the candidate memory unit. Similarly, is the output gate of the backward LSTM at time t, is the memory unit of the backward LSTM at time t, which consists of the memory unit at the next moment and the candidate memory unit.
[0020] Furthermore, in step 2, the input of the physical information neural network model is the data of the gyroscope, that is, the angular velocity values of the X, Y, and Z axes in the IMU coordinate system, and the output is the predicted attitude angle, which is expressed in Euler angles.
[0021] Furthermore, in step 2, the loss function Loss includes the data item L data and the physical information item L PDE , the data term uses the mean square error function, and the physical information term uses the angular velocity differential equation, which is defined as follows:
[0022] L data =||θ pre -θ true || 2
[0023]
[0024] Loss = λ PDE L PDE +λ data L data
[0025] Among them, θ pre is the posture angle predicted by the physical information neural network model, θ true is the label value collected by the high-precision optical motion capture system, ω data is the angular velocity of the IMU at the current moment, λ PDE and λ data are the weights of data items and physical information items respectively.
[0026] Furthermore, in step 3, the weights of the physical information neural network model and the loss term are adjusted by the gradient descent method. The weight of the loss term in the loss function is given by the following formula:
[0027]
[0028] Among them, λ i represents the loss term weight, σ i 2 is a learnable parameter that is adjusted to minimize the total loss, including the data loss L data and physical information loss L PDE .
[0029] Furthermore, in step 4, attitude angle prediction is performed based on the trained physical information neural network model, the input of the physical information neural network model is the gyroscope data at the current moment, the output is the predicted attitude angle, and the label value is provided by a high-precision optical motion capture system.
[0030] Compared with existing technologies, the present invention offers the following advantages: It proposes an IMU attitude angle prediction method that integrates a physical information neural network. By introducing a physical information neural network, using the angular velocity differential equation as the physical information term, and constructing the constraints of the loss function, this method enhances the neural network's ability to learn the IMU motion process, effectively improving the neural network model's generalization ability for unknown motion patterns. It also effectively overcomes the problem of gyroscope integration and accumulation errors, enabling gyroscope self-calibration without the need for accelerometer and magnetometer auxiliary calibration, reducing hardware cost and computational complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the present invention;
[0032] Figure 2 It is the overall framework diagram of the present invention;
[0033] Figure 3 It is a structural diagram of the physical information neural network model in the present invention. DETAILED DESCRIPTION
[0034] 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.
[0035] See also Figure 1-Figure 3 , an IMU attitude angle prediction method integrating physical information neural network, comprising the following steps:
[0036] Step 1: Establish the dynamic model of the gyroscope.
[0037] like Figure 1 As shown, the gyroscope outputs angular velocity. By integrating the angular velocity over time, the change in attitude angle can be calculated. Its dynamic model is given by the following formula:
[0038]
[0039] Where θ(t) is the attitude angle in radians (rad). The attitude angle θ(t) is equal to the initial attitude angle θ(0) plus the integral of the angular velocity ω(τ) from the initial time to the current time t over the time τ.
[0040] Furthermore, the angular velocity is obtained by taking the derivative of the attitude angle with respect to time:
[0041] dθ / dt=ω
[0042] Where θ is the attitude angle, t is the time in seconds (s), and ω is the angular velocity in radians per second (rad / s).
[0043] Step 2: Build a physical information neural network model and define the loss function.
[0044] like Figure 2 and Figure 3 As shown in the figure, a physical information neural network model is constructed. The input of the physical information neural network model is gyroscope data, which is specifically expressed as: g k =[g x g y g z ] T , the output of the physical information neural network model is the predicted attitude angle, specifically expressed as: θ k =[θ roll θ pitch θ yaw ] T The physical information neural network model consists of a bidirectional LSTM layer and a fully connected layer. The structure of the bidirectional LSTM layer includes a forward LSTM and a backward LSTM. The forward information and backward information of the time series data are obtained respectively. The process is given by the following formula:
[0045]
[0046] in, is the output of bidirectional LSTM, subscript t represents time, Represents forward LSTM and backward LSTM respectively, ⊙ represents element-by-element multiplication, tanh is the activation function, is the output gate of the forward LSTM at time t, is the memory unit of the forward LSTM at time t, which is composed of the memory unit of the previous moment and the candidate memory unit. Similarly, is the output gate of the backward LSTM at time t, is the memory unit of the backward LSTM at time t, which consists of the memory unit at the next moment and the candidate memory unit.
[0047] Calculate the loss function, the loss function Loss includes the data item L data and the physical information item L PDE , the data term uses the mean square error function, and the physical information term uses the angular velocity differential equation, which is defined as follows:
[0048] L data =‖θ pre -θ true || 2
[0049]
[0050] Loss = λ PDE L PDE +λ data L data (4)
[0051] Among them, θ pre is the posture angle predicted by the physical information neural network model, θ true is the label value collected by optitrack (high-precision optical motion capture system), ω data is the angular velocity of the IMU at the current moment, λ PDE and λ data are the weights of physical information items and data items respectively.
[0052] Step 3: Use the gradient descent method to train the model and adaptively adjust the loss weights of data items and physical information items.
[0053] The parameters and loss term weights of the physical information neural network model are updated using the gradient descent method. The weight of the loss term is given by the following formula:
[0054]
[0055] Among them, λ i represents the loss term weight, is a learnable parameter that is adjusted to minimize the total loss, including the data loss L data and physical information loss L PDE .
[0056] Step 4: Use the trained model to predict the attitude angle of the IMU.
[0057] The trained physical information neural network model is used for prediction. The input of the model is the current data of the gyroscope, and the output is the predicted attitude angle.
[0058] Step 5: Repeat step 4 to obtain the pose estimation at all times.
[0059] The present invention applies a physical information neural network to the IMU attitude estimation problem, adds physical information items during the neural network training process, constructs constraint conditions for the loss function, avoids the traditional neural network's dependence on data, uses the angular velocity differential equation to enhance the generalization ability of the neural network model for motion patterns that have never been encountered, and utilizes the powerful learning ability of the neural network to effectively overcome the integral accumulation error problem of the gyroscope, realizes the autonomous calibration of the gyroscope, and greatly reduces the hardware cost and algorithm complexity.
[0060] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. An IMU attitude angle prediction method integrating physical information neural network, characterized in that: The following steps are involved: Step 1, establish the dynamic model of the gyroscope; Step 2: Build a physical information neural network model and define the loss function; Step 3: Use the gradient descent method to train the physical information neural network model and adaptively adjust the loss weights of the data items and the physical information items; Step 4: Use the trained physical information neural network model to predict the attitude angle of the IMU; Step 5: Repeat step 4 to obtain the pose estimation at all times.
2. The IMU attitude angle prediction method integrating physical information neural network according to claim 1, characterized in that: In step 1, the gyroscope outputs angular velocity. By integrating the angular velocity over time, the change in attitude angle is calculated. Its dynamic model is given by the following formula: Where θ(t) is the attitude angle, which is equal to the initial attitude angle θ(0) plus the integral of the angular velocity ω(τ) from the initial moment to the current moment t over the time τ; The angular velocity is obtained by taking the derivative of the attitude angle with respect to time: dθ / dt=ω Among them, θ is the attitude angle, t is the time, and ω is the angular velocity.
3. The IMU attitude angle prediction method integrating physical information neural network according to claim 1, characterized in that: The physical information neural network model in step 2 is composed of a bidirectional LSTM layer and a fully connected layer. The structure of the bidirectional LSTM layer includes a forward LSTM and a backward LSTM. The forward information and backward information of the time series data are obtained respectively, and then connected to obtain the same output. The process is given by the following formula: in, is the output of bidirectional LSTM, subscript t represents time, Represents forward LSTM and backward LSTM respectively, ⊙ represents element-by-element multiplication, tanh is the activation function, is the output gate of the forward LSTM at time t, is the memory unit of the forward LSTM at time t, which is composed of the memory unit of the previous moment and the candidate memory unit. Similarly, is the output gate of the backward LSTM at time t, is the memory unit of the backward LSTM at time t, which consists of the memory unit at the next moment and the candidate memory unit.
4. The IMU attitude angle prediction method integrating physical information neural network according to claim 1, characterized in that: In step 2, the input of the physical information neural network model is the data of the gyroscope, that is, the angular velocity values of the X, Y, and Z axes in the IMU coordinate system, and the output is the predicted attitude angle, which is expressed in Euler angles.
5. The IMU attitude angle prediction method integrating physical information neural network according to claim 1, characterized in that: In step 2, the loss function Loss includes the data item L data and the physical information item L PDE , the data term uses the mean square error function, and the physical information term uses the angular velocity differential equation, which is defined as follows: L data =||θ pre -θ true || 2 Loss=λ PDE L PDE +λ data L data Among them, θ pre is the posture angle predicted by the physical information neural network model, θ true is the label value collected by the high-precision optical motion capture system, ω data is the angular velocity of the IMU at the current moment, λ PDE and λ data are the weights of data items and physical information items respectively.
6. The IMU attitude angle prediction method integrating physical information neural network according to claim 1, characterized in that: In step 3, the weights of the physical information neural network model and the loss term are adjusted by the gradient descent method. The weight of the loss term in the loss function is given by the following formula: Among them, λ i represents the loss term weight, is a learnable parameter that is adjusted to minimize the total loss, including the data loss L data and physical information loss L PDE .
7. The IMU attitude angle prediction method integrating physical information neural network according to claim 1, characterized in that: In step 4, attitude angle prediction is performed based on the trained physical information neural network model. The input of the physical information neural network model is the gyroscope data at the current moment, and the output is the predicted attitude angle. The label value is provided by a high-precision optical motion capture system.
Citation Information
Cited By
Security time keeping method and system based on physical information neural network, medium and product
CN121167149A
IMU (Inertial Measurement Unit) online self-adaptive calibration method, calibration device and automatic driving system
CN121657442A
Imu online self-adaptive calibration method, calibration device and automatic driving system
CN121657442B