Unmanned aerial vehicle residual force prediction network training and control method based on deep learning
By training a deep learning-based UAV residual force prediction network, wind condition information is extracted and combined with wind field-specific linear coefficients for adaptation, high-precision residual force prediction of UAVs in dynamic wind fields is achieved, improving the robustness and flight stability of UAVs under complex airflow interference.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2025-10-09
- Publication Date
- 2026-05-05
AI Technical Summary
Existing methods for predicting residual forces of unmanned aerial vehicles (UAVs) have poor generalization ability under complex airflow disturbances, resulting in a sharp drop in prediction accuracy and failing to meet the real-time response requirements of dynamic wind fields.
A deep learning-based method for training UAV residual force prediction networks is adopted. By combining the Phi network and the domain discriminator, wind condition information is extracted, while the general physical laws related to aerodynamic residual forces are retained. The wind field-specific linear coefficients are updated in real time to achieve high-precision prediction.
Achieving high-precision prediction of aerodynamic residual forces in dynamic wind fields improves the robustness and flight stability of UAVs under complex airflow interference, and expands their application capabilities in harsh weather environments.
Smart Images

Figure CN121302546B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and more specifically, to a method for training and controlling a deep learning-based residual force prediction network for unmanned aerial vehicles (UAVs). Background Technology
[0002] As a key technology for improving the adaptability and flight stability of UAVs in complex environments, the aerodynamic residual force prediction technology of UAVs combines physical modeling and data-driven methods to try to achieve accurate prediction by fitting the relationship between flight state and aerodynamic residual force.
[0003] Traditional aerodynamic residual force modeling often employs pure physical modeling or single-condition data-driven methods. Data-driven methods rely on flight data under specific wind conditions. For example, pure physical models, under simplified assumptions, struggle to capture the transient effects of complex airflow disturbances (such as gusts and turbulence). Meanwhile, single-condition data-driven models are prone to a sharp drop in prediction accuracy due to data distribution shifts when wind conditions change. They also have poor generalization ability for unseen wind conditions and cannot meet the real-time response requirements of dynamic wind fields. Summary of the Invention
[0004] The problem that this invention aims to solve is that existing residual force prediction methods rely on pure physical modeling or single-condition data-driven approaches, resulting in poor generalization ability and a sharp drop in prediction accuracy under the influence of complex airflow disturbances.
[0005] To address the aforementioned problems, in a first aspect, this invention provides a method for training a deep learning-based UAV residual force prediction network, comprising:
[0006] The flight data of the UAV is acquired and preprocessed to obtain the raw dataset. The raw dataset includes multiple flight state feature data elements, each of which includes velocity, attitude quaternion, motor PWM signal and actual aerodynamic residual force.
[0007] The data in the flight state feature data element is input into the Phi network to obtain abstract features. The residual force prediction network includes the Phi network and the domain discriminator.
[0008] To minimize the prediction error model of aerodynamic residual force, the optimal wind field-specific linear coefficients are determined.
[0009] Based on abstract features and the optimal wind field-specific linear coefficient, the predicted residual force is obtained;
[0010] Abstract features are input into the domain discriminator to obtain the predicted probability of wind condition categories;
[0011] The loss value of the Phi network is determined based on the predicted residual force, the actual aerodynamic residual force, the predicted probability of wind condition category, and the bi-objective loss function.
[0012] The loss value of the domain discriminator is determined based on the predicted probability of wind condition categories, the actual wind condition labels, and the cross-entropy loss function.
[0013] Based on the loss values of the Phi network and the domain discriminator, the parameters of the Phi network and the domain discriminator are alternately optimized and adjusted until both the loss values of the Phi network and the domain discriminator converge.
[0014] Optionally, the step of acquiring the UAV's flight data and preprocessing the flight data to obtain the raw dataset, wherein the actual aerodynamic residual force is...
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021] Where m is the mass of the drone. Let g be the acceleration due to gravity, and R be the attitude rotation matrix. Let F be the total thrust vector in the body coordinate system, where F is the total thrust. Let n be the motor thrust of the nth rotor of the UAV. Let be the rated voltage of the nth rotor motor of the drone, and m be the total number of rotor motors of the drone. This refers to the thrust generated by a motor with a rated voltage of 14.8V; PWM is the motor's PWM signal value. The first characteristic parameter of a motor with a rated voltage of 14.8V. The second characteristic parameter for a motor with a rated voltage of 14.8V. , , and These are the attitude quaternions of the drone. The corresponding value in the middle.
[0022] Optionally, the aerodynamic residual force prediction error model is:
[0023]
[0024] The optimal wind field-specific linear coefficient is:
[0025]
[0026] in, This represents the actual aerodynamic residual force under the k-th wind condition. This represents the abstract feature corresponding to the i-th flight state feature data element under the k-th wind condition. This represents the wind field-specific linear coefficient for the k-th wind condition. This represents the optimal wind field-specific linear coefficient under the k-th wind condition. This represents the i-th flight state feature data element under the k-th wind condition. This represents the total number of flight status feature data elements.
[0027] Optionally, the bi-objective loss function is:
[0028]
[0029] in, This represents the actual aerodynamic residual force under the k-th wind condition. This represents the abstract feature corresponding to the i-th flight state feature data element under the k-th wind condition. This represents the wind field-specific linear coefficient for the k-th wind condition. Let 'a' represent the optimal wind field-specific linear coefficient under the k-th wind condition, and 'a' represent the adversarial weight. Let represent the i-th flight state feature data element under the k-th wind condition, where K represents the total number of wind conditions. This represents the total number of flight status feature data elements. The loss value of the domain discriminator.
[0030] Optionally, the cross-entropy loss function is:
[0031]
[0032]
[0033] in, The loss value of the domain discriminator is represented by k, which is the true wind condition label. , representing the prediction probability of the discriminator; =Fully connected network of domain discriminators , As an indicator function, when the true wind condition label is k, =1, otherwise =0; These are standard basis vectors; Let J be the abstract feature output by the Phi network, and J be the total number of wind condition categories.
[0034] Secondly, the present invention also provides a method for controlling an unmanned aerial vehicle (UAV), comprising:
[0035] The acquired UAV flight data is preprocessed and input into the Phi network to obtain abstract features, wherein the Phi network is a Phi network trained using the deep learning-based UAV residual force prediction network training method described in the first aspect.
[0036] To minimize the prediction error model of aerodynamic residual force, the optimal wind field-specific linear coefficients are determined.
[0037] Based on abstract features and the optimal wind field-specific linear coefficient, the predicted residual force is obtained;
[0038] The predicted residual force is input into the flight control PID controller to compensate for the motor thrust.
[0039] Optionally, the UAV control method further includes: updating the optimal wind field-specific linear coefficient when the wind speed fluctuation in the two data acquisitions is greater than the fluctuation threshold.
[0040] Thirdly, the present invention also provides a drone control system, comprising:
[0041] The data acquisition module is used to preprocess the acquired UAV flight data and input it into the Phi network to obtain abstract features. The Phi network is a Phi network trained using the deep learning-based UAV residual force prediction network training method described in the first aspect.
[0042] The coefficient confirmation and update module is used to determine the optimal wind field-specific linear coefficients with the goal of minimizing the aerodynamic residual force prediction error model.
[0043] The residual force prediction module is used to obtain the predicted residual force based on abstract features and the optimal wind field-specific linear coefficient;
[0044] The thrust compensation module is used to input the predicted residual force into the flight control PID controller to compensate for the motor thrust.
[0045] Fourthly, the present invention provides an electronic device, including a memory and a processor;
[0046] The memory is used to store computer programs;
[0047] The processor is configured to, when executing the computer program, implement the deep learning-based UAV residual force prediction network training method as described above or implement the UAV control method as described above.
[0048] Fifthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the deep learning-based UAV residual force prediction network training method or the UAV control method as described above.
[0049] This invention provides a method for training and controlling a deep learning-based residual force prediction network for unmanned aerial vehicles (UAVs). Compared with existing technologies, it has the following advantages:
[0050] By constructing a Phi network and a domain discriminator, data from the flight state feature data elements are input into the Phi network to obtain abstract features. With the goal of minimizing the aerodynamic residual force prediction error model, the optimal wind field-specific linear coefficients are determined to further obtain the predicted residual force. The abstract features are then input into the domain discriminator to obtain the predicted probability of the wind condition category. A Phi network is trained using a domain adversarial learning mechanism. The loss value of the Phi network is determined based on the predicted residual force, the actual aerodynamic residual force, the predicted probability of wind condition categories, and a bi-objective loss function. The loss value of the domain discriminator is determined based on the predicted probability of wind condition categories, the actual wind condition labels, and the cross-entropy loss function. The parameters of the Phi network and the domain discriminator are alternately optimized and adjusted until both the loss values of the Phi network and the domain discriminator converge. The abstract features output by the trained Phi network are stripped of wind condition interference, retaining only the general physical laws related to residual force. Simultaneously, by updating the wind field-specific linear coefficients in real time, the linear mapping relationship between features and residual force under different wind conditions is quickly adapted, achieving high-precision prediction of aerodynamic residual force in dynamic wind fields (including known wind conditions, sudden gusts, and untrained wind environments). Real-time requirements are met on a low-cost embedded platform, improving the robustness of the residual force prediction network to complex airflow interference, ensuring the flight stability of UAVs under a wide range of wind conditions, and expanding their application capabilities in harsh weather environments. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 A flowchart illustrating a deep learning-based method for training a drone residual force prediction network is provided in an embodiment of the present invention.
[0053] Figure 2 This is a schematic diagram of the residual force prediction network provided in an embodiment of the present invention;
[0054] Figure 3 This is a flowchart illustrating a drone control method provided in an embodiment of the present invention.
[0055] Figure 4 This is a schematic diagram of the structure of an unmanned aerial vehicle (UAV) control system provided in an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application are described clearly and completely. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0058] like Figure 1 As shown in the embodiment of this application, a method for training a deep learning-based UAV residual force prediction network includes:
[0059] S1: Acquire the flight data of the UAV and preprocess the flight data to obtain the raw dataset. The raw dataset includes multiple flight state feature data elements. Each flight state feature data element includes velocity, attitude quaternion, motor PWM signal and actual aerodynamic residual force.
[0060] Specifically, the data on three-dimensional velocity, attitude quaternions, PWM signals, wind speed and direction, and aerodynamic residual force are collected by drone sensors, and then filtered, outlier removed, and standardized to construct the original dataset.
[0061] S2: Input the data from the flight state feature data elements into the Phi network to obtain abstract features. The residual force prediction network includes the Phi network and the domain discriminator.
[0062] Specifically, a Phi network based on domain adversarial learning is constructed. Through adversarial training, wind condition information is extracted from the features, while retaining the general physical laws related to aerodynamic residual forces. For example... Figure 2 As shown, a Phi network (e.g., a deep neural network (DNN)) can adopt a 4-layer fully connected structure, with 11-dimensional flight state features as input (3-dimensional velocity + 4-dimensional attitude quaternion + 4-dimensional motor PWM signal) and 4-dimensional abstract features as output. The Phi network is used to learn aerodynamic features under constant wind conditions.
[0063] S3: Determine the optimal wind field-specific linear coefficients with the goal of minimizing the aerodynamic residual force prediction error model.
[0064] Specifically, based on the abstract features output by the Phi network and the corresponding aerodynamic residual forces under wind conditions, the linear coefficients are solved using the least squares method. Establish a mapping relationship between abstract features and residual forces.
[0065] S4: Based on the abstract features and the optimal wind field-specific linear coefficients, the predicted residual force is obtained.
[0066] Specifically, the Phi network is fused with the optimal wind field-specific linear coefficients to form a complete prediction model. The network structure and coefficient solving strategy are optimized through cross-validation to improve the model's generalization ability.
[0067] S5: Input the abstract features into the domain discriminator to obtain the predicted probability of the wind condition category.
[0068] Specifically, the domain discriminator includes a gradient inversion layer that uses wind condition categories as labels to adversarially work with the Phi network to extract wind condition information. The discriminator's fully connected network contains two hidden layers with ReLU activation functions, and the output layer uses Softmax to generate class probabilities.
[0069] S6: Determine the loss value of the Phi network based on the predicted residual force, the actual aerodynamic residual force, the predicted probability of wind condition category, and the bi-objective loss function.
[0070] S7: Determine the loss value of the domain discriminator based on the predicted probability of wind condition categories, the actual wind condition labels, and the cross-entropy loss function.
[0071] S8: Based on the loss value of the Phi network and the loss value of the domain discriminator, alternately optimize and adjust the parameters of the Phi network and the domain discriminator until both the loss value of the Phi network and the loss value of the domain discriminator converge.
[0072] Specifically, based on the domain adversarial learning mechanism, the Phi network learns wind-condition-invariant features through a game between itself and the domain discriminator. An alternating optimization process updates the Phi network while freezing the discriminator. Freeze the iterative process of updating the discriminator in the Phi network; update the Phi network: freeze the discriminator parameters w and minimize them using stochastic gradient descent (SGD). Update the Phi network parameters θ; Update the discriminator: Freeze the Phi network parameters θ and minimize them using SGD. The discriminator parameters w are updated; the iteration terminates when the prediction loss of the Phi network and the classification loss of the discriminator converge. The Phi network loss function integrates the prediction error (MSE) and the negative domain adversarial loss, ensuring the accuracy of aerodynamic residual force prediction while forcing features to hide wind condition differences. The domain discriminator uses wind condition categories as labels and optimizes classification ability through cross-entropy loss, forcing the Phi network to generate "de-conditionalized" features, forming a dynamic adversarial balance.
[0073] In this embodiment, by constructing a Phi network and a domain discriminator, the data in the flight state feature data elements are input into the Phi network to obtain abstract features; with the goal of minimizing the aerodynamic residual force prediction error model, the optimal wind field-specific linear coefficient is determined, thereby further obtaining the predicted residual force; the abstract features are input into the domain discriminator to obtain the predicted probability of wind condition categories. A Phi network is trained using a domain adversarial learning mechanism. The loss value of the Phi network is determined based on the predicted residual force, the actual aerodynamic residual force, the predicted probability of wind condition categories, and a bi-objective loss function. The loss value of the domain discriminator is determined based on the predicted probability of wind condition categories, the actual wind condition labels, and the cross-entropy loss function. The parameters of the Phi network and the domain discriminator are alternately optimized and adjusted until both the loss values of the Phi network and the domain discriminator converge. The abstract features output by the trained Phi network are stripped of wind condition interference, retaining only the general physical laws related to residual force. Simultaneously, by updating the wind field-specific linear coefficients in real time, the linear mapping relationship between features and residual force under different wind conditions is quickly adapted, achieving high-precision prediction of aerodynamic residual force in dynamic wind fields (including known wind conditions, sudden gusts, and untrained wind environments). Real-time requirements are met on a low-cost embedded platform, improving the robustness of the residual force prediction network to complex airflow interference, ensuring the flight stability of UAVs under a wide range of wind conditions, and expanding their application capabilities in harsh weather environments.
[0074] In an optional embodiment of this application, for S1, the fundamental equations of UAV dynamics are:
[0075]
[0076] in, These are the position, velocity, and acceleration vectors, respectively. The inertia matrix, For Coriolis matrix, is the gravity vector, and u is the control input (such as thrust). The residual aerodynamic force is affected by the wind condition k.
[0077] For quadcopter drones, due to position control focusing translational motion, Let m be the mass of the UAV and I be the identity matrix. In a translational scene without rotational coupling, Equals 0. The control input u is specified as "total thrust after attitude rotation": that is, the total thrust in the body coordinate system. (F is the total thrust,) The total thrust vector in the body coordinate system (due to the structural characteristics of the quadrotor, the thrust only travels along the z-axis of the body) is mapped to the global coordinate system via the attitude rotation matrix R (transformed by quaternions), resulting in... Gravity vector (Only the z-axis component is non-zero), acceleration (The derivative of velocity). Therefore, the position dynamics equation simplifies to The formula for calculating the actual aerodynamic residual force is obtained by deformation:
[0078]
[0079] Where m is the mass of the drone. Let g be the acceleration due to gravity, and R be the attitude rotation matrix. Let F be the total thrust vector in the body coordinate system, and F be the total thrust.
[0080] The total thrust vector in the machine coordinate system is analyzed based on the motor PWM signal, as follows.
[0081] PWM signal normalization: Maps PWM signals in the range of 4500~6500 to a duty cycle S of 0~1 to avoid the influence of extreme values.
[0082]
[0083] Wherein, PWM refers to the PWM signal values of a single motor (such as PWM1, PWM2, PWM3, and PWM4), which are calculated and then passed through... Limit range (to prevent motor stoppage / overload caused by 0 or 1).
[0084] Single-motor thrust calculation: Based on motor-propeller characteristics (e.g., using an APC9060 propeller, a KV880V motor, and a 15.6V voltage; confirming that thrust is proportional to the square of the voltage), the single-motor thrust is calculated in two steps:
[0085] (1) Calculation of 14.8V reference thrust: Correlation between duty cycle and thrust (unit: g) through current model:
[0086]
[0087] Where C is the intermediate mapping value. By multiplying by 16, floating-point numbers from 0 to 1 can be mapped to the integer range from 0 to 16 (precision is preserved to 1 / 16), which meets the numerical format requirements of the hardware interface.
[0088] The thrust generated by a motor with a rated voltage of 14.8V: Where k1 and k2 are motor characteristic parameters, for example k1=63.5 and k2=21.8.
[0089] (2) Voltage correction: Since the thrust is proportional to the square of the voltage, the correction formula is:
[0090]
[0091] For example, if a motor with a rated voltage of 15.6V is selected as mentioned above, the thrust of this motor will be corrected. .
[0092] Total thrust in body coordinate system For example, the thrust F1, F2, F3, and F4 of the four motors of the quadcopter can be calculated using the above method. The total thrust of the quadcopter is the sum of the thrust of the four motors, and in the body coordinate system, it is only along the z-axis (perpendicular to the fuselage upwards). Here, F is the total thrust (unit: N), (gravitational acceleration g = 9.81 m / s²). 2 ), This is the total thrust vector in the body coordinate system (the x-axis and y-axis components are 0, only the z-axis has thrust, and dividing by 1000 converts the gram-level thrust into a Newton-level total thrust).
[0093] The rotation matrix R is determined based on the attitude quaternion, and the global coordinate system thrust is further determined as follows.
[0094] Using attitude quaternions ( For the real part, , and The attitude of the UAV is described by the imaginary part and converted into a 3×3 rotation matrix R (satisfying...). The formula for an orthogonal matrix with a determinant of 1 is:
[0095]
[0096] In the formula The attitude quaternion is collected by the sensor. The physical meaning of the rotation matrix R is "to convert the vector in the body coordinate system into the vector in the global coordinate system".
[0097] Coordinate system transformation: The thrust in the computer volume coordinate system is multiplied by the rotation matrix R to obtain the control thrust in the global coordinate system. Expand the calculation:
[0098] .
[0099] The result is a 3D thrust vector in the global coordinate system (including x, y, and z axis components), i.e. Used for subsequent aerodynamic residual force The calculation.
[0100] In summary, the actual aerodynamic residual force is
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107] Where m is the mass of the drone. Let g be the acceleration due to gravity, and R be the attitude rotation matrix. Let F be the total thrust vector in the body coordinate system, where F is the total thrust. Let n be the motor thrust of the nth rotor of the UAV. Let be the rated voltage of the nth rotor motor of the drone, and m be the total number of rotor motors of the drone. This refers to the thrust generated by a motor with a rated voltage of 14.8V; PWM is the motor's PWM signal value. The first characteristic parameter of a motor with a rated voltage of 14.8V. The second characteristic parameter for a motor with a rated voltage of 14.8V. , , and These are the attitude quaternions of the drone. The corresponding value in the middle.
[0108] In an optional embodiment of this application, for S2-S4, the Phi network and its forward propagation are specifically described.
[0109] The Phi network can be a deep neural network (DNN) used to learn aerodynamic features under wind-invariant conditions. Its input is 11-dimensional flight state features (3-dimensional velocity v + 4-dimensional attitude quaternion q + 4-dimensional motor PWM signal), and its output is 4-dimensional abstract features.
[0110] The Phi network has the following structure: a 4-layer fully connected structure, with the architecture being 11→50→60→50→4, and the activation function is ReLU.
[0111] The forward propagation formula for Phi networks:
[0112]
[0113] in, As input features, These are the weight parameters of the Phi network. The output is the wind condition invariant feature, i.e., the abstract feature.
[0114] Additionally, spectral normalization is incorporated into the algorithm to control the Lipschitz continuity of the Phi network. The formula is implicit in the training process: spectral normalization is applied to the linear layers of the Phi network to ensure... (L is the Lipschitz constant), which improves the generalization of features.
[0115] The aerodynamic residual force prediction error model is as follows:
[0116]
[0117] The optimal wind field-specific linear coefficient is:
[0118]
[0119] in, This represents the actual aerodynamic residual force under the k-th wind condition. This represents the abstract feature corresponding to the i-th flight state feature data element under the k-th wind condition. This represents the wind field-specific linear coefficient for the k-th wind condition. This represents the optimal wind field-specific linear coefficient under the k-th wind condition. This represents the i-th flight state feature data element under the k-th wind condition. This represents the total number of flight status feature data elements.
[0120] The closed-form solution is derived using the least squares method, and the formula is:
[0121]
[0122] in, abstract features transpose, This is a simplified representation of abstract features. To ensure stability, [the following is omitted as it is not part of the original text]. Applying L2 norm constraints, if ( (where is the regularization constant), then the constraint is: To avoid overfitting.
[0123] In an optional embodiment of this application, for S5, the domain discriminator and its forward propagation are specifically described.
[0124] A domain discriminator, containing a gradient inversion layer, is used to adversarially work with the Phi network to extract wind condition information. The input is an abstract feature from the Phi network's output, and the output is the predicted probability of the wind condition category. .
[0125] Forward propagation formula for domain discriminator:
[0126]
[0127] in, This is a gradient reversal operation; For the weight parameters of the domain discriminator; It is a fully connected network for the domain discriminator, containing two hidden layers, with ReLU activation function and Softmax output layer to generate class probabilities.
[0128] In an optional embodiment of this application, for S6, the loss of the Phi network needs to simultaneously minimize the aerodynamic residual force prediction error and the leakage of wind condition information; the bi-objective loss function is:
[0129]
[0130] in, This represents the actual aerodynamic residual force under the k-th wind condition. This represents the abstract feature corresponding to the i-th flight state feature data element under the k-th wind condition. This represents the wind field-specific linear coefficient for the k-th wind condition. Let 'a' represent the optimal wind field-specific linear coefficient under the k-th wind condition, and 'a' represent the adversarial weight. Let represent the i-th flight state feature data element under the k-th wind condition, where K represents the total number of wind conditions. This represents the total number of flight status feature data elements. This represents the loss value of the domain discriminator. The negative sign in "-a" indicates that the domain discriminator is forced to fail to classify the wind condition.
[0131] In an optional embodiment of this application, for S7, the domain discriminator needs to maximize the classification accuracy of wind conditions, and the loss is the cross-entropy loss, the cross-entropy loss function being...
[0132]
[0133]
[0134] in, The loss value of the domain discriminator is represented by k, which is the true wind condition label. , representing the prediction probability of the discriminator; =Fully connected network of domain discriminators , As an indicator function, when the true wind condition label is k, =1, otherwise =0; These are standard basis vectors; Let J be the abstract feature output by the Phi network, and J be the total number of wind condition categories.
[0135] like Figure 3 As shown in the embodiment of this application, a drone control method includes:
[0136] Step 1: Preprocess the acquired UAV flight data and input it into the Phi network to obtain abstract features. The Phi network is the Phi network trained using the deep learning-based UAV residual force prediction network training method described above.
[0137] Specifically, the Phi network was quantized (using 8-bit integers) and pruned (removing redundant neurons), compressing the residual force prediction network size to below 500KB. Sensor data acquisition (10Hz) Preprocessing Input the Phi network to generate abstract features (time ≤ 5ms).
[0138] Step 2: Determine the optimal wind field-specific linear coefficients with the goal of minimizing the aerodynamic residual force prediction error model.
[0139] Specifically, the optimal wind field-specific linear coefficients under the current wind conditions are invoked. (Or solve in real time using the latest 3 collected data points) (Time taken ≤ 3ms)
[0140] Step 3: Based on the abstract features and the optimal wind field-specific linear coefficients, obtain the predicted residual force.
[0141] Specifically, the predicted residual force is calculated: (Time taken ≤ 2ms).
[0142] Step 4: Input the predicted residual force into the flight control PID controller to compensate for the motor thrust.
[0143] Specifically, when the wind speed fluctuation between two data acquisitions is found to be greater than the fluctuation threshold, the linear coefficient of the optimal wind field is updated to ensure that the update is completed within 10ms.
[0144] In this embodiment, during actual testing, the above method was used to achieve high-precision prediction of aerodynamic residual force (error ≤ 5%) in complex wind fields by combining the general characteristics of stripped wind conditions with the wind field-specific linear coefficients. This also meets the real-time control requirements of UAVs (single prediction time ≤ 10ms), significantly improving the wind resistance stability and environmental adaptability of UAVs.
[0145] Compared with the prior art, the beneficial effects of this application are as follows:
[0146] 1. Significantly improved cross-wind field generalization capability
[0147] Compared to traditional physical modeling or single wind field data-driven methods, this application adapts abstract features (i.e., stripping away invariant features of wind conditions) to wind field-specific linear coefficients, maintaining stable prediction accuracy under wind speeds of 0~12.1m / s (including untrained gusts and sinusoidal pulsating winds), reducing the average tracking error by 66% (compared to nonlinear controllers) and by 42% (compared to L1 adaptive controllers), with an error ≤5% under extreme wind fields.
[0148] 2. Enhanced real-time performance and engineering applicability
[0149] Compared with methods such as multi-model switching and online fine-tuning, this invention only requires updating the low-dimensional wind field-specific linear coefficients. (Instead of deep network parameters), the single prediction time is ≤10ms, meeting the 10Hz control cycle requirement of UAVs. It is also compatible with mainstream flight control systems such as PX4, requiring no custom hardware and reducing deployment costs by more than 40%.
[0150] 3. Improved robustness against interference
[0151] By removing wind condition interference through domain adversarial training and combining L2 regularization and coefficient constraints of wind field-specific linear coefficients, the robustness of the UAV residual force prediction network is significantly enhanced in scenarios of sudden wind speed changes and complex airflow (wind + temperature fluctuations). The error fluctuation amplitude is reduced by 35% compared with the INDI controller, ensuring flight stability in complex environments.
[0152] 4. Excellent cross-platform migration capabilities
[0153] The general physical laws learned by the feature extraction network (Phi network) can be transferred to different drone platforms (such as custom wide X configuration drones and Intel Aero drones). The average error increases by only 0.7cm after the transfer, and no retraining is required, which greatly reduces the cost of cross-model adaptation.
[0154] 5. Significant control and compensation effects
[0155] After the predicted aerodynamic residual force is integrated into the flight control PID controller, it can actively counteract wind interference, enabling the UAV to achieve centimeter-level trajectory tracking in missions with a 3m wide and narrow gate. The average tracking error is ≤7.5cm in outdoor light wind conditions, significantly expanding the application capabilities of UAVs in complex scenarios such as search and rescue and logistics.
[0156] like Figure 4 As shown in the figure, an embodiment of this application provides a drone control system, including:
[0157] The data acquisition module 10 is used to preprocess the acquired UAV flight data and input it into the Phi network to obtain abstract features. The Phi network is the Phi network trained using the deep learning-based UAV residual force prediction network training method described above.
[0158] The coefficient confirmation and update module 20 is used to determine the optimal wind field-specific linear coefficients with the goal of minimizing the aerodynamic residual force prediction error model.
[0159] The residual force prediction module 30 is used to obtain the predicted residual force based on abstract features and the optimal wind field-specific linear coefficient.
[0160] The thrust compensation module 40 is used to input the predicted residual force into the flight control PID controller to compensate for the motor thrust.
[0161] It also includes a network training module 50, which is used to perform the above-described deep learning-based UAV residual force prediction network training method.
[0162] An electronic device provided in this application includes a memory and a processor; the memory is used to store a computer program; the processor is used to implement the above-mentioned deep learning-based UAV residual force prediction network training method or the above-mentioned UAV control method when executing the computer program.
[0163] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described deep learning-based UAV residual force prediction network training method or the above-described UAV control method.
[0164] In this embodiment, the beneficial effects of the UAV control system, electronic equipment, and computer-readable storage medium are similar to the beneficial effects of the deep learning-based UAV residual force prediction network training method or the implementation of the UAV control method described above, and will not be repeated here.
[0165] The present invention describes electronic devices that can serve as servers or clients of this application, which are examples of hardware devices that can be applied to various aspects of this application. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital assistant devices, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the application described and / or claimed herein.
[0166] Electronic devices include a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM can also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0167] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0168] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0169] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for training a deep learning-based UAV residual force prediction network, characterized in that, include: The flight data of the UAV is acquired and preprocessed to obtain the raw dataset. The raw dataset includes multiple flight state feature data elements, each of which includes velocity, attitude quaternion, motor PWM signal and actual aerodynamic residual force. The data in the flight state feature data element is input into the Phi network to obtain abstract features. The residual force prediction network includes the Phi network and the domain discriminator. To minimize the prediction error model of aerodynamic residual force, the optimal wind field-specific linear coefficients are determined. Based on abstract features and the optimal wind field-specific linear coefficient, the predicted residual force is obtained; Abstract features are input into the domain discriminator to obtain the predicted probability of wind condition categories; The loss value of the Phi network is determined based on the predicted residual force, the actual aerodynamic residual force, the predicted probability of wind condition category, and the bi-objective loss function. The loss value of the domain discriminator is determined based on the predicted probability of wind condition categories, the actual wind condition labels, and the cross-entropy loss function. Based on the loss values of the Phi network and the domain discriminator, the parameters of the Phi network and the domain discriminator are alternately optimized and adjusted until the loss values of the Phi network and the domain discriminator converge. The aerodynamic residual force prediction error model is as follows: The optimal wind field-specific linear coefficient is: in, This represents the actual aerodynamic residual force under the k-th wind condition. This represents the abstract feature corresponding to the i-th flight state feature data element under the k-th wind condition. This represents the wind field-specific linear coefficient for the k-th wind condition. This represents the optimal wind field-specific linear coefficient under the k-th wind condition. This represents the i-th flight state feature data element under the k-th wind condition. This represents the total number of flight status feature data elements.
2. The method for training a deep learning-based UAV residual force prediction network as described in claim 1, characterized in that, The process involves acquiring flight data from the UAV and preprocessing the data to obtain a raw dataset, wherein the actual aerodynamic residual force is... Where m is the mass of the drone. Let g be the acceleration due to gravity, and R be the attitude rotation matrix. Let F be the total thrust vector in the body coordinate system, where F is the total thrust. Let n be the motor thrust of the nth rotor of the UAV. Let be the rated voltage of the nth rotor motor of the drone, and m be the total number of rotor motors of the drone. This refers to the thrust generated by a motor with a rated voltage of 14.8V; PWM is the motor's PWM signal value. The first characteristic parameter of a motor with a rated voltage of 14.8V. The second characteristic parameter for a motor with a rated voltage of 14.8V. , , and These are the attitude quaternions of the drone. The corresponding value in the middle.
3. The method for training a deep learning-based UAV residual force prediction network as described in claim 1, characterized in that, The bi-objective loss function is: in, This represents the actual aerodynamic residual force under the k-th wind condition. This represents the abstract feature corresponding to the i-th flight state feature data element under the k-th wind condition. This represents the wind field-specific linear coefficient for the k-th wind condition. Let 'a' represent the optimal wind field-specific linear coefficient under the k-th wind condition, and 'a' represent the adversarial weight. Let represent the i-th flight state feature data element under the k-th wind condition, where K represents the total number of wind conditions. This represents the total number of flight status feature data elements. The loss value of the domain discriminator.
4. The method for training a deep learning-based UAV residual force prediction network as described in claim 3, characterized in that, The cross-entropy loss function is: in, The loss value of the domain discriminator is represented by k, which is the true wind condition label. , representing the prediction probability of the discriminator; =Fully connected network of domain discriminators , As an indicator function, when the true wind condition label is k, =1, otherwise =0; These are standard basis vectors; Let J be the abstract feature output by the Phi network, and J be the total number of wind condition categories.
5. A method for controlling an unmanned aerial vehicle (UAV), characterized in that, include: The acquired UAV flight data is preprocessed and input into the Phi network to obtain abstract features, wherein the Phi network is the Phi network trained using the deep learning-based UAV residual force prediction network training method described in any one of claims 1-4. To minimize the prediction error model of aerodynamic residual force, the optimal wind field-specific linear coefficients are determined. Based on abstract features and the optimal wind field-specific linear coefficient, the predicted residual force is obtained; The predicted residual force is input into the flight control PID controller to compensate for the motor thrust.
6. The UAV control method as described in claim 5, characterized in that, When the wind speed fluctuation between two data acquisitions is found to be greater than the fluctuation threshold, the linear coefficient specific to the optimal wind field is updated.
7. A drone control system, characterized in that, include: The data acquisition module is used to preprocess the acquired UAV flight data and input it into the Phi network to obtain abstract features, wherein the Phi network is the Phi network trained using the deep learning-based UAV residual force prediction network training method described in any one of claims 1-4. The coefficient confirmation and update module is used to determine the optimal wind field-specific linear coefficients with the goal of minimizing the aerodynamic residual force prediction error model. The residual force prediction module is used to obtain the predicted residual force based on abstract features and the optimal wind field-specific linear coefficient; The thrust compensation module is used to input the predicted residual force into the flight control PID controller to compensate for the motor thrust.
8. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement the deep learning-based UAV residual force prediction network training method as described in any one of claims 1 to 4, or implement the UAV control method as described in any one of claims 5 to 6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the deep learning-based UAV residual force prediction network training method as described in any one of claims 1 to 4, or the UAV control method as described in any one of claims 5 to 6.
Citation Information
Patent Citations
Flight controller fusing PID control and neural network, method and storage medium
CN119472235A
Unmanned aerial vehicle obstacle avoidance method and system based on inertial navigation
CN120178918A