Four-rotor real-time inertial odometer method inspired by aerodynamics
By using an aerodynamically inspired approach, combined with Transformer neural networks and self-attention mechanisms, a mapping relationship between the rotor speed and the system velocity of a quadcopter was established. This solved the input-output mismatch problem in the inertial odometry of quadcopters, achieving higher prediction accuracy and robustness.
Patent Information
- Application Number
- CN202511747350.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-03-03
AI Technical Summary
In existing inertial odometry methods for quadcopter aircraft, the network input and output lack a clear physical correspondence, resulting in insufficient observability of velocity estimation, affecting prediction accuracy and generalization ability, and lacking verification on real flight platforms.
Using an aerodynamically inspired approach, data is collected by manually piloting a quadcopter to construct a Transformer-based neural network model. A complete mapping relationship is established using rotor speed and IMU data. The model is trained using a self-attention mechanism and a piecewise loss function to output the system speed.
It improved speed prediction accuracy by 36.9%, enhanced robustness and generalization ability, and can quickly adapt to different aircraft platforms, reduce deployment costs, and maintain high accuracy and stability in complex environments.
Smart Images

Figure CN121594918A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inertial odometry, and more particularly to an aerodynamically inspired quadcopter real-time inertial odometry method. Background Technology
[0002] Inertial odometry (IoD) is a commonly used state estimation method, typically relying on acceleration and angular velocity information provided by an inertial measurement unit (IMU). Traditional IoD methods (such as dead reckoning) are susceptible to random noise and zero-bias noise, leading to accumulated errors and long-term drift. To improve IoD accuracy, a common approach is to incorporate domain-specific prior constraints. For example, for ground vehicles and pedestrians, zero-velocity updates and other techniques are often used to correct the IoD estimate.
[0003] However, quadcopters lack the prior constraints of ground vehicles and pedestrians in terms of motion patterns, and their attitude and velocity changes are more flexible. This makes it difficult to directly extend existing methods based on explicit motion constraints to quadcopter state estimation. In recent years, the academic community has proposed some learning-based methods to improve quadcopter inertial odometry. These methods typically utilize neural networks to predict changes in position or velocity. However, existing methods generally suffer from the following problems: The lack of a clear physical correspondence between network inputs and outputs is a significant problem. For example, some methods directly substitute thrust for acceleration or rely solely on IMU data and attitude information without adequately considering aerodynamic effects. This flawed design of network inputs leads to insufficient observability in velocity estimation, consequently impacting the network's prediction accuracy and generalization ability. Furthermore, these methods generally lack validation on real-world flight platforms.
[0004] Therefore, how to combine the aerodynamic characteristics of quadcopters to establish a reasonable input-output mapping relationship, thereby improving the accuracy and robustness of real-time inertial odometry, has become an urgent technical problem to be solved. People skilled in the art are committed to developing an aerodynamic-inspired quadcopter real-time inertial odometry method. Summary of the Invention
[0005] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is how to establish a correct mapping relationship between the input and output of a quadcopter network to improve the accuracy and robustness of real-time inertial odometry.
[0006] To achieve the above objectives, this invention provides an aerodynamically inspired real-time inertial odometry method for quadcopters, the method comprising the following steps: S101: Collect flight data of the quadcopter under different environments by manually piloting the quadcopter and setting the quadcopter's flight trajectory in advance; S103: Preprocess the raw sensor data in the collected flight data, and divide the processed data into training dataset, validation dataset and test dataset; S105: Construct a Transformer-based neural network model and train the neural network model using the partitioned dataset; S107: Deploy the trained neural network model onto the embedded computing module to predict the system velocity of the quadcopter and output the system velocity of the quadcopter.
[0007] Furthermore, in step S101, a quadcopter flight platform is used as the experimental carrier, and the sensors equipped on the quadcopter flight platform include: An inertial measurement unit (IMU) is used to collect triaxial acceleration and triaxial angular velocity data. ESC feedback is used to record the rotational speed of each rotor. Lightweight embedded computing module for real-time computing.
[0008] Furthermore, in step S101, the flight data of the quadcopter includes diverse flight data collected under different environments, covering multiple flight modes and different speed distributions. The flight modes include straight-line, turning, acceleration, and deceleration.
[0009] Furthermore, in step S103, when preprocessing the raw sensor data, the raw data is time-aligned using a linear interpolation method at a certain frequency so that each sensor data corresponds to a unified timestamp.
[0010] Furthermore, the mapping relationship between the accelerometer output and the system velocity of the quadcopter during flight is as follows:
[0011]
[0012]
[0013] in, The output values of the accelerometer in each direction, For the speed of the aircraft system, The sum of the squares of the rotational speeds of the four rotors. These are constants related to the physical properties of the aircraft. For zero bias noise of accelerometer output, This is the white noise output from the accelerometer.
[0014] Furthermore, in step S105, the neural network model uses a Transformer encoder to extract features from the input sequence through a self-attention mechanism. The attention mechanism adaptively allocates weights to different time steps, highlighting the time segments most relevant to velocity prediction under vibration and noise interference, thereby achieving robust feature fusion.
[0015] Furthermore, the neural network model uses preprocessed IMU data and rotor speed as network inputs, the body velocity of the quadcopter as supervision, and a piecewise loss function.
[0016] Furthermore, the loss function employs a piecewise design, initially using Huber loss based on velocity prediction error. After convergence, negative log-likelihood loss based on velocity prediction error is used. The loss function is specifically defined as follows: (The loss function is used to output the uncertainty of the predicted speed.)
[0017]
[0018] in, For Huber's losses, For negative log-likelihood loss, For the true value of the system velocity of the quadcopter, The predicted values for the airframe velocity of the quadcopter are given. This is a hyperparameter in the Huber loss. This is the covariance matrix of the network prediction.
[0019] Furthermore, the weights of the neural network model are fine-tuned and optimized using small-scale data, allowing the neural network model to be quickly applied to quadcopter platforms with different qualities and appearances, thereby reducing the deployment cost of practical applications.
[0020] Furthermore, when fine-tuning the weights of the neural network model, the pre-trained weights of the neural network model are used as initial weights. A small amount of flight data is collected, and the model is trained based on the weights to achieve fine-tuning and optimization of the weights of the neural network model.
[0021] In a preferred embodiment of the present invention, compared with the prior art, the present invention has the following beneficial technical effects: 1. Based on the aerodynamic model of a quadcopter, this invention confirms that the rotor speed of a quadcopter is a very important physical quantity for speed prediction, and establishes a complete mapping relationship between input and output. After adding the rotor speed as the network input, the accuracy of the network's speed prediction is improved by 36.9%.
[0022] 2. This invention uses the Transformer neural network model as the main network architecture. By leveraging the powerful attention mechanism of Transformer, it has stronger temporal modeling capabilities. Compared with traditional temporal modeling networks, the accuracy of network prediction speed is improved by 22.4% after using Transformer.
[0023] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0024] Figure 1 These are the specific implementation steps of a preferred embodiment of the quadcopter real-time inertial odometry method of the present invention; Figure 2 This is a flowchart of a preferred embodiment of the quadcopter real-time inertial odometry method of the present invention; Figure 3 This is a framework diagram of the actual deployment of a quadcopter real-time inertial odometry method according to a preferred embodiment of the present invention. Detailed Implementation
[0025] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.
[0026] In the accompanying drawings, components with the same structure are indicated by the same numerical designation, and components with similar structures or functions are indicated by similar numerical designations. The dimensions and thicknesses of each component shown in the drawings are arbitrary, and the present invention does not limit the dimensions and thicknesses of each component. To make the illustrations clearer, the thickness of some components has been appropriately exaggerated in the drawings.
[0027] like Figure 1 As shown, existing inertial odometry methods lack a clear physical correspondence between network input and output, leading to insufficient observability of velocity estimation and consequently affecting the network's prediction accuracy and generalization ability. This invention provides an aerodynamically inspired quadrotor real-time inertial odometry method, which includes the following steps: S101: Collects flight data of quadcopters in different environments by manually piloting the quadcopter and setting the quadcopter's flight path in advance.
[0028] In this embodiment, a quadcopter flight platform is used as the experimental carrier, and the sensors equipped on the quadcopter flight platform include: An inertial measurement unit (IMU) is used to collect triaxial acceleration and triaxial angular velocity data. ESC feedback is used to record the rotational speed of each rotor. Lightweight embedded computing module for real-time computing.
[0029] When collecting flight data from quadcopters, we collect diverse flight data from different environments, covering multiple flight modes and different speed distributions. Flight modes include straight lines, turns, acceleration, and deceleration.
[0030] S103: Preprocess the raw sensor data in the collected flight data and divide the processed data into training dataset, validation dataset and test dataset.
[0031] In this embodiment, since the collected data includes data from multiple sensors, it is necessary to unify the time of each sensor. To achieve multi-sensor time synchronization, the raw sensor data is preprocessed, and a linear interpolation method is used at a certain frequency to align the time of the raw data, so that each sensor data corresponds to a unified timestamp.
[0032] S105: Construct a Transformer-based neural network model and train the neural network model using the partitioned dataset.
[0033] Based on the aerodynamic model of the quadcopter, the analysis confirms that the rotor speed has a significant impact on the aircraft's drag and is a key physical quantity in speed prediction. Therefore, it is necessary to establish a complete mapping relationship between input and output.
[0034] In this embodiment, based on the aerodynamic drag model of a quadcopter and Newton's laws, the mapping relationship between the accelerometer output and the system velocity during the flight of the quadcopter is derived as follows:
[0035]
[0036]
[0037] in, The output values of the accelerometer in each direction, For the speed of the aircraft system, The sum of the squares of the rotational speeds of the four rotors. These are constants related to the physical properties of the aircraft. For zero bias noise of accelerometer output, This is the white noise output from the accelerometer.
[0038] In this embodiment, the neural network model uses a Transformer encoder and a self-attention mechanism to extract features from the input sequence. The attention mechanism adaptively allocates weights at different time steps, highlighting the time segments most relevant to velocity prediction under vibration and noise interference, thus achieving robust feature fusion. The neural network model uses preprocessed IMU data and rotor speed as network input, and the quadcopter's body velocity as supervision. A piecewise loss function is used. The loss function employs a piecewise design, initially using Huber loss based on velocity prediction error. After convergence, negative log-likelihood loss based on velocity prediction error is used. This is used to output the uncertainty of the predicted speed.
[0039] The loss function is specifically designed as follows:
[0040]
[0041] in, For Huber's losses, For negative log-likelihood loss, For the true value of the system velocity of the quadcopter, The predicted values for the airframe velocity of the quadcopter are given. This is a hyperparameter in the Huber loss. This is the covariance matrix of the network prediction.
[0042] Because the weights of the trained model are related to the physical properties of the aircraft itself, a single set of weights cannot be used for velocity prediction for quadrotor aircraft with different masses and shapes. However, experiments have shown that if pre-trained model weights are used as initial weights, only a small amount of flight data needs to be collected. Training on the pre-trained model weights allows for rapid convergence and achieves accuracy comparable to training with more data. In other words, compared to training from scratch, fine-tuning can achieve higher prediction accuracy and shorter training time. By fine-tuning the neural network model weights using small-scale data, the neural network model can be quickly applied to quadrotor platforms with different masses and shapes, reducing deployment costs for practical applications.
[0043] When fine-tuning the weights of a neural network model, the pre-trained neural network model weights are used as initial weights. A small amount of flight data is collected, and the model is trained based on the model weights to achieve fine-tuning and optimization of the neural network model weights.
[0044] S107: Deploy the trained neural network model onto the embedded computing module to predict the system velocity of the quadcopter and output the system velocity of the quadcopter.
[0045] Compared with existing technologies, the aerodynamic-inspired quadcopter real-time inertial odometry method provided in this invention has the following advantages: 1. To address the issue of establishing a correct mapping relationship between network input and output, this invention is based on the aerodynamic model of a quadcopter. It confirms that the rotor speed has a significant impact on the drag of the aircraft, and that the rotor speed of the quadcopter is a very important physical quantity for speed prediction. Thus, a complete mapping relationship between input and output is established. After adding the rotor speed as a network input, the accuracy of the network speed prediction is improved by 36.9%.
[0046] 2. To address the issue of the rationality of network architecture design in existing technologies, this invention uses the Transformer neural network model as the main network architecture. The powerful attention mechanism of Transformer enables it to have stronger temporal modeling capabilities. Compared with traditional temporal modeling networks, the accuracy of network prediction speed is improved by 22.4% after using Transformer.
[0047] The present invention will now be described in detail with reference to preferred embodiments.
[0048] To address the limitations of existing technologies in combining the aerodynamic characteristics of quadcopters to establish a reasonable input-output mapping relationship, thereby improving the accuracy and robustness of real-time inertial odometry, this invention provides an aerodynamically inspired quadcopter real-time inertial odometry method.
[0049] Since the aerodynamic drag of a quadcopter during flight is directly related to the system velocity, and Newton's laws can be used to characterize the relationship between aerodynamic drag and accelerometer output, the following formula can be approximately derived.
[0050]
[0051]
[0052] in, It's the accelerometer output. It is the speed of the aircraft's airframe system. It is the sum of the squares of the rotational speeds of the four rotors. These are constants related to the physical properties of the aircraft. and These are the zero-bias noise and white noise output by the accelerometer, respectively.
[0053] Taking into account the Coriolis force generated by the rotation of the coordinate system, the angular velocity of the quadcopter (i.e., the output of the gyroscope in the IMU) will be reflected in this item.
[0054] In the above formula, the rotor speed of the quadcopter is closely related to the induced drag term in the horizontal direction and the thrust term in the vertical direction. Therefore, the rotor speed plays an important role in the speed prediction of this method.
[0055] Based on the above formula, a complete mapping relationship between input and output can be constructed. The rotor speed is used as a key physical variable and is input into the model together with IMU data. The output corresponds to the system velocity. The implicit mapping of the aerodynamic equation is learned through neural network. The complete input improves the observability and accuracy of the model prediction.
[0056] In the construction of the neural network, a Transformer encoder is used, and a self-attention mechanism is employed to extract features from the input sequence. This attention mechanism adaptively allocates weights at different time steps, thereby highlighting the time segments most relevant to velocity prediction under vibration and noise interference, achieving robust feature fusion. Compared to traditional temporal networks, the attention mechanism can capture global information more quickly, extracting the most important features from the time series for modeling and reducing the impact of noise.
[0057] The specific training and deployment phase mainly includes the following steps, such as: Figure 2 As shown: 1. Data Collection A quadcopter flight platform was selected as the experimental vehicle. This platform is equipped with: An inertial measurement unit (IMU) is used to acquire triaxial acceleration and triaxial angular velocity. ESC feedback is used to record the rotational speed of each rotor. Lightweight embedded computing modules (such as Radxa Zero3W, quad-core Cortex-A55, with a maximum clock speed of 1.6GHz) are used for real-time computing.
[0058] By manually piloting the aircraft and setting its flight path in advance, diverse flight data is collected in different environments, covering various flight modes such as straight lines, turns, acceleration, and deceleration, as well as different speed distributions.
[0059] 2. Data Preprocessing
[0060] The raw sensor data collected is preprocessed. The raw data includes acceleration and angular velocity collected by the IMU, rotor speed fed back by the electronic speed controller, and the actual attitude of the aircraft collected by the motion capture system. To achieve time synchronization of multiple sensors, linear interpolation is used to align the raw data at a certain frequency, so that each sensor data corresponds to a unified timestamp. Then, the datasets are divided into training, validation, and test datasets according to a certain ratio.
[0061] 3. Model Training
[0062] A Transformer-based neural network model was constructed and trained using a partitioned dataset. Preprocessed IMU data and rotor speed were used as network inputs, and the aircraft's body velocity was used as supervision.
[0063] The loss function uses a piecewise design, initially employing Huber loss based on velocity prediction error. After convergence, negative log-likelihood loss based on velocity prediction error is used. Output the uncertainty of the predicted speed.
[0064]
[0065]
[0066] in, and These are the true and predicted values of the system velocity of the quadcopter, respectively. It is a hyperparameter in the Huber loss. This is the covariance matrix predicted by the network. In this method, the network only outputs its diagonal elements, therefore It is a diagonal matrix.
[0067] Because the weights of the trained model are related to the physical properties of the aircraft itself, a single set of weights cannot be used for velocity prediction for quadcopters with different masses, shapes, etc. However, experiments have shown that if pre-trained model weights are used as initial weights, only a small amount of flight data needs to be collected. Training on the basis of pre-trained model weights can converge quickly and achieve accuracy comparable to training with more data. In other words, compared to training from scratch, fine-tuning can achieve higher prediction accuracy and shorter training time.
[0068] 4. Actual Deployment
[0069] The trained model was deployed to an embedded computing module and run. Experimental results show that: The average inference time of the neural network is about 8.9ms, and it can output the speed of the machine system in real time at a frequency of 100 Hz.
[0070] Based on this, combined with an extended Kalman filter (EKF), the state estimation of the aircraft is achieved at a frequency of 20Hz. The specific deployment framework is as follows: Figure 3As shown, the estimated states include the aircraft's attitude, velocity, position, and accelerometer and gyroscope bias. The EKF prediction step is based on inertial navigation calculations, using IMU-measured acceleration and angular velocity for state propagation at a 100Hz frequency. The update step is based on the airframe velocity output from the network. The network input consists of IMU-measured acceleration and angular velocity sequences and rotor speed sequences obtained from ESC feedback. Therefore, a certain range of historical observations needs to be stored in a buffer to facilitate the retrieval and time interpolation synchronization of observations from two different sources.
[0071] 5. Experimental Verification
[0072] The effectiveness of the method of the present invention was verified through indoor flight experiments, specifically including: Generalization test: When replacing with an aircraft of different quality and appearance, only about 7 minutes of new flight data need to be collected for fine-tuning, and the model can quickly adapt, verifying good cross-platform generalization ability; Comparative Experiments: The method of this invention is compared with existing learning-based inertial odometry methods (such as AirIO) and commercial visual inertial odometry (such as T265 VIO). The method of this invention outperforms existing learning-based inertial odometry methods in all aspects; under normal lighting conditions, the accuracy of the method of this invention is comparable to VIO; when the lighting disappears or the texture is missing, VIO shows significant degradation, while the method of this invention still maintains high accuracy and stability.
[0073] Experimental verification shows that the present invention can achieve efficient real-time operation on a real flight platform, has cross-platform adaptability and robustness in complex environments, and can meet the actual navigation and positioning needs of quadcopter aircraft.
[0074] Compared with existing technologies, the aerodynamic-inspired real-time inertial odometry method for quadrotors proposed in this invention can operate stably on real quadrotor flight platforms and has good practicality and promotion value.
[0075] First, this invention can be deployed in real time on embedded computing platforms. For example, on a lightweight computing module equipped with a quad-core Cortex-A55 processor (up to 1.6GHz), the average inference time of the velocity prediction network of this invention is only 8.9ms, and it can output the system velocity estimate in real time at a frequency of 100Hz. Combined with extended Kalman filter for state fusion at a frequency of 20Hz, this invention can maintain high accuracy in state estimation during complex flight.
[0076] Secondly, this invention exhibits strong generalization ability. The training data covers diverse flight trajectories, enabling the model to generalize naturally in different environments. Furthermore, when fine-tuning small-scale data based on pre-trained weights, this invention efficiently utilizes the data and quickly converges to a low error level. Experimental results show that, compared to training from scratch, this invention can adapt to quadrotor platforms of varying mass and appearance using only about 7 minutes of new flight data, significantly reducing deployment costs for practical applications.
[0077] Finally, the invention demonstrates superiority in real-world testing. In comparative experiments with existing inertial odometry methods and visual inertial odometry (VIO), the invention maintains high accuracy and stability even under harsh environmental conditions such as varying lighting and texture loss. It outperforms the most advanced existing inertial odometry methods while avoiding the severe degradation problem of traditional VIO in the absence of light.
[0078] Therefore, this invention can not only run in real time on resource-constrained embedded platforms, but also has cross-platform adaptability and robustness in complex environments. It is applicable to state estimation and navigation tasks of various quadcopter aircraft and has broad application prospects.
[0079] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. An aerodynamically inspired real-time inertial odometry method for quadcopters, characterized in that, The method includes the following steps: S101: Collect flight data of the quadcopter under different environments by manually piloting the quadcopter and setting the quadcopter's flight trajectory in advance; S103: Preprocess the raw sensor data in the collected flight data, and divide the processed data into training dataset, validation dataset and test dataset; S105: Construct a Transformer-based neural network model and train the neural network model using the partitioned dataset; S107: Deploy the trained neural network model onto the embedded computing module to predict the system velocity of the quadcopter and output the system velocity of the quadcopter.
2. The method as described in claim 1, characterized in that, In step S101, a quadcopter flight platform is used as the experimental carrier, and the sensors equipped on the quadcopter flight platform include: An inertial measurement unit (IMU) is used to collect triaxial acceleration and triaxial angular velocity data. ESC feedback is used to record the rotational speed of each rotor. Lightweight embedded computing module for real-time computing.
3. The method as described in claim 2, characterized in that, In step S101, the flight data of the quadcopter includes diverse flight data collected under different environments, covering multiple flight modes and different speed distributions. The flight modes include straight-line, turning, acceleration and deceleration.
4. The method as described in claim 3, characterized in that, In step S103, when preprocessing the raw sensor data, a linear interpolation method is used at a certain frequency to align the raw data to a unified timestamp.
5. The method as described in claim 4, characterized in that, The mapping relationship between the accelerometer output and the airframe velocity during the flight of the quadcopter is as follows: in, The output values of the accelerometer in each direction, For the speed of the aircraft system, The sum of the squares of the rotational speeds of the four rotors. These are constants related to the physical properties of the aircraft. For zero bias noise of accelerometer output, This is the white noise output from the accelerometer.
6. The method as described in claim 5, characterized in that, In step S105, the neural network model uses a Transformer encoder to extract features from the input sequence through a self-attention mechanism. The attention mechanism adaptively assigns weights to different time steps, highlighting the time segments most relevant to velocity prediction under vibration and noise interference, thereby achieving robust feature fusion.
7. The method as described in claim 6, characterized in that, The neural network model uses preprocessed IMU data and rotor speed as network inputs, the body velocity of the quadcopter as supervision, and a piecewise loss function.
8. The method as described in claim 7, characterized in that, The loss function uses a piecewise design, initially employing Huber loss based on velocity prediction error. After convergence, negative log-likelihood loss based on velocity prediction error is used. The loss function is specifically defined as follows: (The loss function is used to output the uncertainty of the predicted speed.) in, For Huber's losses, For negative log-likelihood loss, For the true value of the system velocity of the quadcopter, The predicted values for the airframe velocity of the quadcopter are given. This is a hyperparameter in the Huber loss. This is the covariance matrix of the network prediction.
9. The method as described in claim 8, characterized in that, The weights of the neural network model are fine-tuned and optimized using small-scale data, and the neural network model can be quickly applied to quadcopter platforms with different qualities and appearances, reducing the deployment cost of practical applications.
10. The method as described in claim 9, characterized in that, When fine-tuning the weights of the neural network model, the pre-trained weights of the neural network model are used as the initial weights. A small amount of flight data is collected, and the model is trained based on the weights to achieve fine-tuning and optimization of the weights of the neural network model.