An Unmanned Aerial Vehicle Attitude Control Method and System Based on Flight Aerodynamic Stability

Through the multi-threaded flight control model and real-time data acquisition and dynamic parameter adjustment methods, the problem of insufficient accuracy and response speed in complex environments of traditional flight control methods is solved, and the high accuracy and stability of drone attitude control is achieved.

CN119512200BActive Publication Date: 2025-06-13XIAN HANG CHEN ELECTROMECHANICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510088370.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-06-13
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

In the case of high dynamic changes and large external disturbances, traditional flight control methods are often limited in control accuracy and response speed, making it difficult to meet the stable flight needs of drones in complex environments.

Method used

The multi-threaded flight control model is adopted to improve the response speed and processing capability of the flight controller by controlling the main thread, the first auxiliary thread and the second auxiliary thread in parallel processing tasks. At the same time, the system's attitude angle, flight wind speed and attack angle are collected in real time, aerodynamic disturbances and attitude angle errors are calculated, proportional parameters, integral parameters and differential parameters are dynamically adjusted, and the control signals are generated for attitude control.

Benefits of technology

It improves the accuracy and stability of drone attitude control, and can maintain high flight accuracy and response speed under complex external conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512200B_ABST
    Figure CN119512200B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of unmanned aerial vehicles. A method and system for controlling the attitude of an unmanned aerial vehicle based on flight aerodynamic stability include: constructing a flight control model, collecting the attitude angles of the system, setting the ideal attitude angles, calculating the attitude angle errors, setting the proportional parameter, integral parameter, and differential parameter, generating an attitude control signal, setting the acquisition time, continuously collecting the flight wind speed and flight angle of attack, setting the aerodynamic drag parameter and aerodynamic moment parameter, calculating the aerodynamic moment disturbance, obtaining the surface area of the unmanned aerial vehicle, calculating the aerodynamic disturbance, setting the proportional upper limit, integral upper limit, and differential upper limit, dynamically adjusting to obtain the adjusted proportional parameter, adjusted integral parameter, and adjusted differential parameter, and generating an updated control signal based on the adjusted proportional parameter, adjusted integral parameter, and adjusted differential parameter to complete the attitude control of the unmanned aerial vehicle. The present invention can improve the accuracy of the attitude control of the unmanned aerial vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicles, and in particular to a method and system for controlling the attitude of an unmanned aerial vehicle based on flight aerodynamic stability. Background Art

[0002] With the continuous development of UAV technology, flight control systems have become an important part of modern UAVs, especially in autonomous flight and complex environments. Attitude control plays a vital role in the stability and flight accuracy of UAVs. The flight control system ensures that UAVs can fly safely in complex environments through precise attitude adjustment, especially under complex external conditions such as strong winds and turbulence. Attitude control plays a decisive role in the stability, response speed and flight accuracy of UAVs.

[0003] Traditional flight control methods mainly rely on a single feedback control system. Although these methods can ensure the basic flight stability of UAVs, their control accuracy and response speed are often limited in the case of high dynamic changes and large external disturbances. Therefore, how to improve the accuracy of UAV attitude control is an important issue that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a method and system for controlling the attitude of an unmanned aerial vehicle (UAV) based on flight aerodynamic stability, the main purpose of which is to improve the accuracy of the attitude control of the UAV.

[0005] To achieve the above object, the present invention provides a method for controlling the attitude of a UAV based on flight aerodynamic stability, comprising:

[0006] Constructing a flight control model, wherein the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread;

[0007] Collect the system attitude angle, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle;

[0008] Setting a proportional parameter, an integral parameter and a differential parameter based on the flight control model and the attitude angle error, and generating an attitude control signal based on the control main thread, the attitude angle error, the proportional parameter, the integral parameter and the differential parameter;

[0009] Set the collection time, collect the flight wind speed and flight angle of attack in real time based on the collection time, set the aerodynamic drag parameters and aerodynamic torque parameters, and calculate the aerodynamic torque disturbance based on the flight wind speed and aerodynamic torque parameters;

[0010] Obtaining the surface area of ​​the drone, and calculating the aerodynamic disturbance based on the aerodynamic moment disturbance, the aerodynamic drag parameter, the flight wind speed and the surface area of ​​the drone;

[0011] Set the proportional upper limit, integral upper limit, and derivative upper limit, and dynamically adjust the proportional parameter, integral parameter, and derivative parameter based on the first auxiliary thread, flight wind speed, flight angle of attack, aerodynamic disturbance, proportional upper limit, integral upper limit, and derivative upper limit to obtain the adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter;

[0012] Use the second auxiliary thread to send the adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter to the control main thread, generate an updated control signal using the received adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter, update the attitude control signal using the flight controller and the updated control signal, and complete the attitude control of the UAV according to the updated attitude control signal and the flight control model.

[0013] Optionally, the acquisition system acquires the attitude angle, sets the ideal attitude angle, and calculates the attitude angle error based on the system attitude angle and the ideal attitude angle, including:

[0014] Judge the system flight state of the UAV and set the filtering level, where the system flight state includes: steady flight state, rapid turning state, and accelerating flight state, and the filtering level includes: first filtering level, second filtering level, and third filtering level;

[0015] When the system flight state is in the steady flight state, confirm the filtering level as the first filtering level;

[0016] When the system flight state is in the rapid turning state or the accelerating flight state, confirm the filtering level as the second filtering level;

[0017] When the system flight state is in the flight transition state, confirm the filtering level as the third filtering level;

[0018] Acquire the system attitude angle based on the filtering level and the preset attitude acquisition unit, where the system attitude angle includes: system pitch angle, system roll angle, and system yaw angle;

[0019] Calculate the pitch attitude error, roll attitude error, and yaw attitude error, and adjust the system pitch angle, system roll angle, and system yaw angle respectively based on the pitch attitude error, roll attitude error, and yaw attitude error to obtain the corrected pitch angle, corrected roll angle, and corrected yaw angle;

[0020] Calculate the attitude angle error based on the ideal attitude angle, corrected pitch angle, corrected roll angle, and corrected yaw angle.

[0021] Optionally, the judgment of the system flight state of the UAV and the setting of the filtering level include:

[0022] Obtain the acceleration change range and the angular velocity change range. When the acceleration change range is , and the angular velocity change range is , confirm that the system flight state is a steady flight state;

[0023] When the acceleration change range is , and the angular velocity change range is , confirm that the system flight state is a rapid turning state;

[0024] When the acceleration change range is , and the angular velocity change range is , confirm that the system flight state is an accelerating flight state;

[0025] When it is determined based on the acceleration change range and the angular velocity change range that the system flight state is not in the steady flight state, the rapid turning state, and the accelerating flight state, confirm that the system flight state is in a flight transition state;

[0026] Judge the system flight state based on the steady flight state, the rapid turning state, the accelerating flight state, and the flight transition state;

[0027] Obtain the filtering coefficient, and set the filtering coefficient range based on the filtering coefficient. Among them, the filtering coefficient range includes: a first filtering range, a second filtering range, and a third filtering range. The first filtering range is: , the second filtering range is: , the third filtering range is: ;

[0028] Set the filtering level based on the first filtering range, the second filtering range, and the third filtering range. Among them, set the first filtering range as the first filtering level, set the second filtering range as the second filtering level, and set the third filtering range as the third filtering level.

[0029] Optionally, calculating the pitch attitude error, the roll attitude error, and the yaw attitude error, and adjusting the system pitch angle, the system roll angle, and the system yaw angle respectively based on the pitch attitude error, the roll attitude error, and the yaw attitude error to obtain the corrected pitch angle, the corrected roll angle, and the corrected yaw angle, includes:

[0030] Obtain the real-time flight temperature, the real-time flight speed, the real-time flight height, and the characteristic attitude function in real time, and calculate the pitch attitude error, the roll attitude error, and the yaw attitude error based on the system pitch angle, the system roll angle, the system yaw angle, the real-time flight temperature, the real-time flight speed, the real-time flight height, and the characteristic attitude function:

[0031] ,

[0032] Among them, denotes the pitch attitude error, denotes the roll attitude error, denotes the yaw attitude error, denotes the characteristic attitude function, denotes the real-time flight temperature, denotes the real-time flight speed, denotes the real-time flight altitude, denotes the system pitch angle, denotes the system roll angle, denotes the system yaw angle;

[0033] Calculate the corrected pitch angle, corrected roll angle and corrected yaw angle based on the system pitch angle, system roll angle, system yaw angle and temperature attitude error:

[0034] ,

[0035] Among them, denotes the corrected pitch angle, denotes the corrected roll angle, denotes the corrected yaw angle.

[0036] Optionally, the generating the attitude control signal based on the control main thread, attitude angle error, proportional parameter, integral parameter and differential parameter includes:

[0037] Set the channel weights, set the flight time and control channels according to the system flight state, where the control channels include: pitch channel, roll channel and yaw channel;

[0038] Identify the pitch channel, roll channel and yaw channel respectively to obtain the pitch channel, roll channel and yaw channel with identification parameters, where the identification parameter corresponding to the pitch channel is 1, the identification parameter corresponding to the roll channel is 2, and the identification parameter corresponding to the yaw channel is 3;

[0039] Calculate the channel angle error based on the attitude angle error, pitch channel, roll channel and yaw channel, where the channel angle error includes: pitch channel error, roll channel error and yaw channel error;

[0040] Generate the attitude control signal based on the proportional parameter, integral parameter, differential parameter, flight time, control channel, identification parameter, channel angle error and channel weight:

[0041] ,

[0042] Among them, denotes the attitude control signal at when the flight time is denotes the flight time, Refers to the identification parameter, Refers to the proportional parameter, Refers to the flight time being and the identification parameter being the channel angle error of the control channel at this time, Refers to the integral parameter, Refers to the differential parameter, Refers to the flight time being and the identification parameter being the channel weight of the control channel at this time.

[0043] Optionally, setting the channel weight according to the flight state of the system includes:

[0044] Obtain the acceleration change rate and angular velocity change rate of all control channels, set the acceleration weight parameter and angular velocity weight parameter, and set the channel weight based on the acceleration change rate, angular velocity change rate, acceleration weight parameter and angular velocity weight parameter:

[0045] ,

[0046] Among them, Refers to the natural exponential function, Refers to the acceleration weight parameter, Refers to the absolute value symbol, Refers to the flight time being and the identification parameter being the acceleration change rate at this time, Refers to the angular velocity weight parameter, Refers to the flight time being and the identification parameter being the angular velocity change rate at this time.

[0047] Optionally, calculating the aerodynamic moment perturbation based on the flight wind speed and aerodynamic moment parameters includes:

[0048] Obtain the air density, characteristic length, angular velocity sensitivity parameter, first angular velocity, angle of attack sensitivity parameter and angle of attack change rate;

[0049] Calculate the aerodynamic moment perturbation based on the air density, characteristic length, angular velocity sensitivity parameter, first angular velocity, angle of attack sensitivity parameter, angle of attack change rate, flight wind speed and aerodynamic moment parameters:

[0050] ,

[0051] Among them, Refers to the aerodynamic moment perturbation, Refers to the air density, Refers to the flight wind speed, Refers to the characteristic length, Refers to the aerodynamic moment parameter, Refers to the angular velocity sensitivity parameter, Refers to the first angular velocity, Refers to the acquisition time, Refers to the angle of attack sensitivity parameter, Refers to the rate of change of the angle of attack.

[0052] Optionally, the dynamic adjustment of the proportional parameter, integral parameter, and derivative parameter based on the first auxiliary thread, flight wind speed, flight angle of attack, aerodynamic disturbance, proportional upper limit, integral upper limit, and derivative upper limit to obtain the adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter includes:

[0053] Set the proportional adjustment parameter, integral adjustment parameter, and derivative adjustment parameter, obtain the mass of the unmanned aerial vehicle, and construct an adjustment proportional factor based on the proportional adjustment parameter, flight wind speed, flight angle of attack, aerodynamic disturbance, and the mass of the unmanned aerial vehicle:

[0054] ,

[0055] Wherein, Refers to the adjustment proportional factor, Refers to the proportional adjustment parameter, Refers to the flight angle of attack, Refers to the mass of the unmanned aerial vehicle, Refers to the aerodynamic disturbance;

[0056] Construct an adjustment integral factor based on the integral adjustment parameter, the mass of the unmanned aerial vehicle, the attitude angle error, and the flight time:

[0057] ,

[0058] Wherein, Refers to the adjustment integral factor, Refers to the integral adjustment parameter, Refers to the attitude angle error when the flight time is ;

[0059] Construct an adjustment derivative factor based on the derivative adjustment parameter, the flight time, the flight wind speed, and the flight angle of attack:

[0060] ,

[0061] Wherein, Refers to the adjustment derivative factor, Refers to the derivative adjustment parameter;

[0062] Calculate the adjusted proportional parameter based on the adjustment proportional factor, the proportional parameter, the proportional upper limit, and a pre-constructed minimum function:

[0063] ,

[0064] Wherein, Refers to the adjustment ratio parameter, Refers to the minimum function, Refers to the upper limit of the ratio;

[0065] Calculate the adjusted integral parameter based on the adjusted integral factor, integral parameter, integral upper limit, and minimum function:

[0066] ,

[0067] Among them, Refers to the adjusted integral parameter, Refers to the integral upper limit;

[0068] Calculate the adjusted differential parameter based on the adjusted differential factor, differential parameter, differential upper limit, and minimum function:

[0069] ,

[0070] Among them, Refers to the adjusted differential parameter, Refers to the differential upper limit.

[0071] Optionally, the generating of the updated control signal by using the received adjusted ratio parameter, adjusted integral parameter, and adjusted differential parameter includes:

[0072] Update the ratio parameter, integral parameter, and differential parameter based on the adjusted ratio parameter, adjusted integral parameter, and adjusted differential parameter, and generate an updated control signal by using the updated ratio parameter, updated integral parameter, updated differential parameter, flight time, control channel, identification parameter, channel angle error, and channel weight.

[0073] To achieve the above object, the present invention also provides an unmanned aerial vehicle attitude control system based on flight aerodynamic stability, including:

[0074] An attitude angle calculation module for constructing a flight control model, where the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread; collect the system attitude angle, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle;

[0075] A torque disturbance calculation module for setting the ratio parameter, integral parameter, and differential parameter based on the flight control model and the attitude angle error, generating an attitude control signal based on the control main thread, attitude angle error, ratio parameter, integral parameter, and differential parameter; setting the acquisition time, collecting the flight wind speed and flight angle of attack in real time based on the acquisition time, setting the aerodynamic drag parameter and aerodynamic moment parameter, and calculating the aerodynamic moment disturbance based on the flight wind speed and the aerodynamic moment parameter;

[0076] An aerodynamic disturbance calculation module, configured to obtain the surface area of the drone, and calculate the aerodynamic disturbance based on the aerodynamic moment disturbance, aerodynamic drag parameter, flight wind speed, and the surface area of the drone;

[0077] An adjustment parameter update module, configured to set the proportional upper limit, integral upper limit, and derivative upper limit, and dynamically adjust the proportional parameter, integral parameter, and derivative parameter based on the first auxiliary thread, flight wind speed, flight angle of attack, aerodynamic disturbance, proportional upper limit, integral upper limit, and derivative upper limit to obtain an adjusted proportional parameter, an adjusted integral parameter, and an adjusted derivative parameter; use the second auxiliary thread to send the adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter to the control main thread, and generate an updated control signal using the received adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter, and update the attitude control signal using the flight controller and the updated control signal, and complete the attitude control of the drone according to the updated attitude control signal and the flight control model.

[0078] To solve the above problems, the present invention further provides an electronic device, which includes:

[0079] A memory, storing at least one instruction;

[0080] A processor, executing the instruction stored in the memory to implement the above-mentioned method for controlling the attitude of a drone based on flight aerodynamic stability.

[0081] To solve the above problems, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned method for controlling the attitude of a drone based on flight aerodynamic stability.

[0082] To solve the problems described in the background art, first, a multi-threaded flight control model is constructed. The flight control model includes a flight controller. The multi-threads include a control main thread, a first auxiliary thread, and a second auxiliary thread. Using multi-threads improves the response speed and processing ability of the flight controller. By parallel processing different tasks, the burden on a single thread can be significantly reduced, and the real-time performance and computing ability of the flight controller can be improved, thus ensuring the accuracy of attitude adjustment. Secondly, the system attitude angle is collected, and an ideal attitude angle is set. The attitude angle error is calculated based on the system attitude angle and the ideal attitude angle. By comparing the actual attitude with the ideal attitude angle, the attitude angle error can be accurately identified. The attitude angle error provides a quantitative index for the attitude deviation of the UAV and serves as the basis for adjusting the control signal, enabling the UAV to reduce the error and converge to the ideal state through gain adjustment. After that, the proportional parameter, integral parameter, and derivative parameter are adjusted based on the attitude angle error, which helps to flexibly adapt to different flight states of the UAV. The proportional parameter controls the correction of the error, the integral parameter controls the elimination of long-term errors, and the derivative parameter controls the improvement of the response speed. By adjusting these parameters, the control accuracy of the UAV can be optimized according to different flight environments. Then, the flight wind speed and flight angle of attack are collected in real time. The flight wind speed and flight angle of attack are important factors affecting the attitude control of the UAV. By continuously collecting these data, the flight controller can obtain the flight environment information of the UAV in real time, identify the influence of external disturbances on the attitude of the aircraft, and ensure that the UAV can maintain a high control accuracy under different flight conditions. After that, the aerodynamic moment disturbance is calculated. By calculating the aerodynamic moment disturbance, the main source of the UAV attitude error can be identified, the influence brought by external disturbances can be reduced, the stability and accuracy of attitude control can be improved, and then effective control compensation can be made. Finally, the proportional parameter, integral parameter, and derivative parameter are dynamically adjusted to generate an updated control signal. The dynamic adjustment of the proportional parameter, integral parameter, and derivative parameter ensures that the UAV can maintain stability under different flight states. Generating an updated control signal based on the dynamically adjusted proportional parameter, integral parameter, and derivative parameter helps to maintain the stability of the UAV and improve the accuracy of UAV attitude control. Therefore, the present invention can improve the accuracy of UAV attitude control. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 FIG. is a schematic flowchart of a UAV attitude control method based on flight aerodynamic stability provided by an embodiment of the present invention;

[0084] Figure 2 FIG. is a functional module diagram of a UAV attitude control system based on flight aerodynamic stability provided by an embodiment of the present invention;

[0085] Figure 3Schematic structural diagram of an electronic device for implementing the UAV attitude control method based on flight aerodynamic stability provided by an embodiment of the present invention.

[0086] Description of reference numerals:

[0087] 1. Electronic device; 10. Processor; 11. Memory; 12. Bus.

[0088] The realization, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners

[0089] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0090] An embodiment of the present application provides a UAV attitude control method based on flight aerodynamic stability. The execution subject of the UAV attitude control method based on flight aerodynamic stability includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the UAV attitude control method based on flight aerodynamic stability can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0091] Referring to Figure 1 As shown, it is a flowchart of a UAV attitude control method based on flight aerodynamic stability provided by an embodiment of the present invention. In this embodiment, the UAV attitude control method based on flight aerodynamic stability includes:

[0092] S1. Construct a flight control model, where the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread.

[0093] Interpretability: The flight control model refers to a model that simulates and controls the attitude of an unmanned aerial vehicle (UAV), and uses a flight controller to control the UAV based on the data during the simulation process. The flight controller refers to a unit that controls the attitude of the UAV, which can maintain the flight stability of the UAV. The attitude of the UAV refers to the attitude angle during the flight of the UAV, and the attitude angle includes the pitch angle, roll angle, and yaw angle. The flight controller in the present invention is a PID controller. The multi-threaded model refers to a model that simultaneously executes multiple threads in a single process. The control main thread, the first auxiliary thread, and the second auxiliary thread are all threads that can execute independently. The control main thread refers to the thread directly responsible for controlling the attitude of the UAV. The first auxiliary thread refers to the thread that calculates and adjusts the proportional parameter, integral parameter, and differential parameter according to relevant parameters. The second auxiliary thread refers to the thread that transmits data to the control main thread. The relevant parameters refer to the proportional upper limit, integral upper limit, differential upper limit, flight wind speed, flight angle of attack, and gas disturbance. The proportional upper limit refers to the upper limit of the difference between the adjusted proportional parameter and the proportional parameter. The adjusted proportional parameter refers to the parameter obtained by adjusting the proportional parameter based on the flight wind speed, flight angle of attack, and gas disturbance. The flight wind speed refers to the speed of the airflow around the UAV, including the lateral wind speed and the longitudinal wind speed. These two wind speed components will jointly affect the speed, flight path, and attitude of the UAV. The lateral wind speed refers to the wind speed component along the direction of the UAV's wing. The direction of the UAV's wing refers to the left-right direction along the UAV's wing. The lateral wind speed has an important impact on the sideslip, roll angle, and lateral stability of the UAV. The lateral stability refers to the stability of the UAV along the lateral axis during flight. The lateral axis of the UAV refers to the axis in the direction of the UAV's wing. The longitudinal wind speed refers to the wind speed and air volume parallel to the direction perpendicular to the ground. The direction perpendicular to the ground refers to the direction of gravity. The flight angle of attack refers to the angle between the flight direction of the UAV and the airflow. When the angle of attack is too large, the UAV is prone to enter a stall state, resulting in the loss of lift of the UAV. The gas disturbance refers to the forces and torques caused by the interaction between the airflow and the UAV fuselage, referring to the influence of the non-uniformity of the airflow on the UAV. The proportional parameter refers to the parameter that affects the response degree of the flight controller to the attitude angle error. The proportional parameter is proportional to the attitude angle error. By increasing the proportional parameter, the response to the attitude angle error can be increased. The attitude angle error refers to the error value between the ideal attitude angle and the system attitude angle. The ideal attitude angle refers to the most ideal attitude angle of the UAV under the current aerodynamic state. The aerodynamic state refers to the specific state of the UAV in the air flow. The specific state refers to the force situation shown by the UAV during flight due to aerodynamic effects. The specific state is affected by factors such as the system attitude angle and flight wind speed. The current aerodynamic state refers to the aerodynamic state of the UAV at the current time. The system attitude angle refers to the actual attitude angle of the UAV under the current aerodynamic state.

[0094] It is understandable that the upper limit of integration refers to the upper limit of the difference between the adjusted integration parameter and the integration parameter. The adjusted integration parameter refers to the parameter obtained after adjusting the integration parameter based on the flight wind speed, flight angle of attack, and gas disturbance. The integration parameter refers to the parameter for reducing the static error. The integration parameter can avoid long-term deviation caused by the static error. The upper limit of differentiation refers to the upper limit of the difference between the adjusted differentiation parameter and the differentiation parameter. The adjusted differentiation parameter refers to the parameter obtained after adjusting the differentiation parameter based on the flight wind speed, flight angle of attack, and gas disturbance. The differentiation parameter refers to the parameter that affects the response degree of the flight controller to the rate of change of the error. The differentiation parameter can suppress the rapid change of the attitude angle error and can respond to the speed of change of the error to reduce oscillation. The rate of change of the error refers to the rate of change of the attitude angle error with time, and the change of the error refers to the change of the attitude angle error.

[0095] S2. Collect the attitude angle of the system, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle.

[0096] Specifically, the step of collecting the attitude angle of the system, setting the ideal attitude angle, and calculating the attitude angle error based on the system attitude angle and the ideal attitude angle includes:

[0097] Judge the system flight state of the unmanned aerial vehicle and set the filtering level. Among them, the system flight state includes: steady flight state, rapid turning state, and accelerating flight state; the filtering level includes: the first filtering level, the second filtering level, and the third filtering level;

[0098] When the system flight state is in the steady flight state, confirm the filtering level as the first filtering level;

[0099] When the system flight state is in the rapid turning state or the accelerating flight state, confirm the filtering level as the second filtering level;

[0100] When the system flight state is in the flight transition state, confirm the filtering level as the third filtering level;

[0101] Collect the system attitude angle based on the filtering level and the preset attitude acquisition unit. Among them, the system attitude angle includes: system pitch angle, system roll angle, and system yaw angle;

[0102] Calculate the pitch attitude error, roll attitude error, and yaw attitude error, and adjust the system pitch angle, system roll angle, and system yaw angle respectively based on the pitch attitude error, roll attitude error, and yaw attitude error to obtain the corrected pitch angle, corrected roll angle, and corrected yaw angle;

[0103] Calculate the attitude angle error based on the ideal attitude angle, corrected pitch angle, corrected roll angle, and corrected yaw angle.

[0104] Interpretive. The filtering level refers to the level of filtering performed after the attitude acquisition unit acquires the attitude angle of the system. The filtering levels include a first filtering level, a second filtering level, and a third filtering level. The first filtering level refers to the filtering level when the filtering coefficient is between 0.1 and 0.3. The second filtering level refers to the filtering level when the filtering coefficient is between 0.6 and 0.7. The third filtering level refers to the filtering level when the filtering coefficient is between 0.4 and 0.5. The filtering coefficient refers to the parameter that affects the degree of noise removal, and the range of the filtering coefficient is The system flight state refers to the state of the UAV during current flight. The system flight states include: a steady flight state, a rapid turning state, an accelerating flight state, and a flight transition state. The steady flight state refers to the state when the acceleration change range of the UAV is within and the angular velocity change range is within The acceleration change range refers to the range of acceleration change during the flight of the UAV. The rapid turning state refers to the state when the acceleration change range of the UAV is within and the angular velocity change range is within The accelerating flight state refers to the state when the acceleration change range of the UAV is within and the angular velocity change range is within The flight transition state refers to the state of transition between the steady flight state, the rapid turning state, and the accelerating flight state. The attitude acquisition unit refers to the unit that acquires the pitch angle, roll angle, and yaw angle of the system. The attitude acquisition unit consists of a gyroscope, an accelerometer, and a magnetometer. The system pitch angle refers to the pitch angle acquired by the attitude acquisition unit during the flight of the UAV. The system roll angle refers to the roll angle acquired by the attitude acquisition unit during the flight of the UAV. The system yaw angle refers to the yaw angle acquired by the attitude acquisition unit during the flight of the UAV. The pitch attitude error refers to the influence value of temperature on the system pitch angle. The roll attitude error refers to the influence value of temperature on the system roll angle. The yaw attitude error refers to the influence value of temperature on the system yaw angle. The corrected pitch angle refers to the pitch angle obtained after adjusting the system pitch angle based on the temperature attitude error. The corrected roll angle refers to the roll angle obtained after adjusting the system roll angle based on the temperature attitude error. The corrected yaw angle refers to the yaw angle obtained after adjusting the system yaw angle based on the temperature attitude error.

[0105] Specifically, the determination of the system flight state of the UAV and the setting of the filtering level include:

[0106] Obtain the acceleration change range and the angular velocity change range. When the acceleration change range is and the angular velocity change range is confirm that the system flight state is the steady flight state;

[0107] When the acceleration change range is and the angular velocity change range is When it is confirmed that the system flight state is in the rapid turn state;

[0108] When the acceleration change range is and the angular velocity change range is it is confirmed that the system flight state is in the accelerated flight state;

[0109] When it is determined based on the acceleration change range and the angular velocity change range that the system flight state is not in the steady flight state, the rapid turn state, or the accelerated flight state, it is confirmed that the system flight state is in the flight transition state;

[0110] Judge the system flight state based on the steady flight state, the rapid turn state, the accelerated flight state, and the flight transition state;

[0111] Obtain a filtering coefficient, and set a filtering coefficient range based on the filtering coefficient. Among them, the filtering coefficient range includes: a first filtering range, a second filtering range, and a third filtering range. The first filtering range is: The second filtering range is: The third filtering range is: ;

[0112] Set filtering levels based on the first filtering range, the second filtering range, and the third filtering range. Among them, set the first filtering range as the first filtering level, set the second filtering range as the second filtering level, and set the third filtering range as the third filtering level.

[0113] It can be explained that the filtering coefficient range refers to the range of the filtering coefficient, the first filtering range refers to the range of the filtering coefficient corresponding to the first filtering level, the second filtering range refers to the range of the filtering coefficient corresponding to the second filtering level, the third filtering range refers to the range of the filtering coefficient corresponding to the third filtering level, the acceleration change range refers to the range of the acceleration change during the flight of the UAV, and the angular velocity change range refers to the range of the angular velocity change during the flight of the UAV.

[0114] Specifically, calculating the pitch attitude error, the roll attitude error, and the yaw attitude error, and adjusting the system pitch angle, the system roll angle, and the system yaw angle respectively based on the pitch attitude error, the roll attitude error, and the yaw attitude error to obtain the corrected pitch angle, the corrected roll angle, and the corrected yaw angle, includes:

[0115] Obtain the real-time flight temperature, the real-time flight speed, the real-time flight altitude, and the characteristic attitude function in real time, and calculate the pitch attitude error, the roll attitude error, and the yaw attitude error based on the system pitch angle, the system roll angle, the system yaw angle, the real-time flight temperature, the real-time flight speed, the real-time flight altitude, and the characteristic attitude function:

[0116] ,

[0117] Among them, refers to the pitch attitude error, refers to the roll attitude error, refers to the yaw attitude error, refers to the characteristic attitude function, refers to the real-time flight temperature, refers to the real-time flight speed, refers to the real-time flight altitude, refers to the system pitch angle, refers to the system roll angle, refers to the system yaw angle;

[0118] Calculate the corrected pitch angle, corrected roll angle and corrected yaw angle based on the system pitch angle, system roll angle, system yaw angle and temperature attitude error:

[0119] ,

[0120] Among them, refers to the corrected pitch angle, refers to the corrected roll angle, refers to the corrected yaw angle.

[0121] Interpretably, the real-time flight temperature refers to the temperature of the attitude acquisition unit during the flight of the UAV, the real-time flight speed refers to the flight speed during the flight of the UAV, the real-time flight altitude refers to the flight altitude during the flight of the UAV, and the characteristic attitude function refers to a function that dynamically predicts the temperature attitude error according to the system pitch angle, system roll angle, system yaw angle, real-time flight temperature, real-time flight speed and real-time flight altitude. This characteristic attitude function is obtained by training historical data input into a long short-term memory network, and the historical data refers to the system pitch angle, system roll angle, system yaw angle, real-time flight temperature, real-time flight speed and real-time flight altitude generated during the historical flight of the UAV.

[0122] S3. Set the proportional parameter, integral parameter and differential parameter based on the flight control model and the attitude angle error, and generate an attitude control signal based on the control main thread, the attitude angle error, the proportional parameter, the integral parameter and the differential parameter.

[0123] Interpretably, the attitude control signal refers to a signal for controlling the attitude of the UAV.

[0124] Specifically, generating the attitude control signal based on the control main thread, the attitude angle error, the proportional parameter, the integral parameter and the differential parameter includes:

[0125] Set the channel weight according to the system flight state, and set the flight time and control channels, where the control channels include: pitch channel, roll channel and yaw channel;

[0126] Identify the pitch channel, roll channel, and yaw channel respectively to obtain the pitch channel, roll channel, and yaw channel with identification parameters. Among them, the identification parameter corresponding to the pitch channel is 1, the identification parameter corresponding to the roll channel is 2, and the identification parameter corresponding to the yaw channel is 3;

[0127] Calculate the channel angle error based on the attitude angle error, pitch channel, roll channel, and yaw channel. Among them, the channel angle error includes: pitch channel error, roll channel error, and yaw channel error;

[0128] Generate an attitude control signal based on the proportional parameter, integral parameter, derivative parameter, flight time, control channel, identification parameter, channel angle error, and channel weight:

[0129] ,

[0130] where, refers to the attitude control signal when the flight time is , refers to the flight time, refers to the identification parameter, refers to the proportional parameter, refers to when the flight time is and the identification parameter is the channel angle error of the control channel, refers to the integral parameter, refers to the derivative parameter, refers to when the flight time is and the identification parameter is the channel weight of the control channel.

[0131] It can be explained that the channel weight refers to the parameter used to dynamically adjust the attitude control signal of different control channels of the UAV. The flight time refers to the time when the UAV is flying. For example, if it is currently 1:00 at night, the flight time is 1:00 at night. The control channel refers to the channel used to control the attitude of the UAV. The control channels include: pitch channel, roll channel, and yaw channel. The pitch channel refers to the channel used to control the pitch angle of the UAV. The roll channel refers to the channel used to control the roll angle of the UAV. The yaw channel refers to the channel used to control the yaw angle of the UAV. The identification parameter refers to the parameter used to traverse the control channels. The channel angle error refers to the error between the attitude of the UAV in each control channel and the ideal attitude angle. The pitch channel error refers to the error between the corrected pitch angle corresponding to the pitch channel and the pitch angle corresponding to the ideal attitude angle. The roll channel error refers to the error between the corrected roll angle corresponding to the roll channel and the roll angle corresponding to the ideal attitude angle. The yaw channel error refers to the error between the corrected yaw angle corresponding to the yaw channel and the yaw angle corresponding to the ideal attitude angle.

[0132] Specifically, setting the channel weights according to the flight state of the system includes:

[0133] Obtain the acceleration change rate and angular velocity change rate of all control channels, set the acceleration weight parameter and angular velocity weight parameter, and set the channel weights based on the acceleration change rate, angular velocity change rate, acceleration weight parameter, and angular velocity weight parameter:

[0134] ,

[0135] Among them, refers to the natural exponential function, refers to the acceleration weight parameter, refers to the absolute value symbol, refers to the flight time being and the identification parameter being the acceleration change rate at this time, refers to the angular velocity weight parameter, refers to the flight time being and the identification parameter being the angular velocity change rate at this time.

[0136] It can be explained that the acceleration change rate refers to the change rate of the acceleration when the UAV is flying, the angular velocity change rate refers to the change rate of the angular velocity when the UAV is flying, the acceleration weight parameter refers to the parameter that adjusts the influence degree of the acceleration change rate on the channel weights, and the angular velocity weight parameter refers to the parameter that adjusts the influence degree of the angular velocity change rate on the channel weights.

[0137] S4. Set the acquisition time, collect the flight wind speed and flight angle of attack in real time based on the acquisition time, set the aerodynamic drag parameter and aerodynamic moment parameter, and calculate the aerodynamic moment perturbation based on the flight wind speed and the aerodynamic moment parameter.

[0138] It can be explained that the acquisition time refers to the time for collecting the flight wind speed and flight angle of attack, the aerodynamic drag parameter refers to the parameter that measures the air resistance suffered by the UAV when flying in the air, the aerodynamic drag parameter is obtained through wind tunnel experiments, the aerodynamic moment parameter refers to the parameter that measures the magnitude of the aerodynamic moment suffered by the UAV in the air, the aerodynamic moment refers to the rotational force generated by the aerodynamic force at the geometric center of the UAV, the aerodynamic force refers to the force generated by the interaction between the air and the surface of the UAV, the rotational force refers to the force generated by the air on the UAV, and the aerodynamic moment perturbation refers to the influence degree of the aerodynamic moment on the UAV. The greater the aerodynamic moment, the greater the aerodynamic moment perturbation.

[0139] Specifically, calculating the aerodynamic moment perturbation based on the flight wind speed and the aerodynamic moment parameter includes:

[0140] Obtain the air density, characteristic length, angular velocity sensitivity parameter, first angular velocity, angle of attack sensitivity parameter, and angle of attack change rate;

[0141] Calculate the aerodynamic moment perturbation based on the air density, characteristic length, angular velocity sensitivity parameter, first angular velocity, angle of attack sensitivity parameter, angle of attack change rate, flight wind speed, and aerodynamic moment parameter:

[0142] ,

[0143] where, denotes the aerodynamic moment perturbation, denotes the air density, denotes the flight wind speed, denotes the characteristic length, denotes the aerodynamic moment parameter, denotes the angular velocity sensitivity parameter, denotes the first angular velocity, denotes the acquisition time, denotes the angle of attack sensitivity parameter, denotes the angle of attack change rate.

[0144] Interpretably, the air density refers to the density of the air when the UAV is flying, the characteristic length refers to the body length of the UAV, the body length refers to the length from the tail to the nose of the UAV, the angular velocity sensitivity parameter refers to the parameter that describes the influence degree of the change in the angular velocity of the UAV on the aerodynamic moment perturbation, the first angular velocity refers to the angular velocity of the UAV, the angle of attack sensitivity parameter refers to the parameter that describes the influence degree of the change in the flight angle of attack of the UAV on the aerodynamic moment perturbation. The larger the angle of attack sensitivity parameter, the greater the influence degree of the change in the flight angle of attack of the UAV on the aerodynamic moment perturbation. The angle of attack change rate reflects the speed of the change in the flight angle of attack of the UAV during the acquisition time. The larger the angle of attack change rate, the faster the speed of the change in the flight angle of attack of the UAV.

[0145] S5. Obtain the surface area of the UAV, and calculate the aerodynamic perturbation based on the aerodynamic moment perturbation, aerodynamic drag parameter, flight wind speed, and the surface area of the UAV.

[0146] Interpretably, the surface area of the UAV refers to the area of the surface of the UAV, and the aerodynamic perturbation refers to the aerodynamic force generated by the airflow on the UAV.

[0147] Understandably, calculate the aerodynamic perturbation based on the aerodynamic moment perturbation, aerodynamic drag parameter, flight wind speed, the surface area of the UAV, and the air density:

[0148] ,

[0149] where, denotes the surface area of the UAV, denotes the aerodynamic drag parameter.

[0150] S6. Set the proportional upper limit, integral upper limit, and derivative upper limit, and dynamically adjust the proportional parameter, integral parameter, and derivative parameter based on the first auxiliary thread, flight wind speed, flight angle of attack, aerodynamic disturbance, proportional upper limit, integral upper limit, and derivative upper limit to obtain the adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter.

[0151] Specifically, the dynamically adjusting the proportional parameter, integral parameter, and derivative parameter based on the first auxiliary thread, flight wind speed, flight angle of attack, aerodynamic disturbance, proportional upper limit, integral upper limit, and derivative upper limit to obtain the adjusted proportional parameter, adjusted integral parameter, and adjusted derivative parameter includes:

[0152] Set the proportional adjustment parameter, integral adjustment parameter, and derivative adjustment parameter, obtain the UAV mass, and construct an adjustment proportional factor based on the proportional adjustment parameter, flight wind speed, flight angle of attack, aerodynamic disturbance, and UAV mass:

[0153] ,

[0154] where, denotes the adjustment proportional factor, denotes the proportional adjustment parameter, denotes the flight angle of attack, denotes the UAV mass, denotes the aerodynamic disturbance;

[0155] Construct an adjustment integral factor based on the integral adjustment parameter, UAV mass, attitude angle error, and flight time:

[0156] ,

[0157] where, denotes the adjustment integral factor, denotes the integral adjustment parameter, denotes the attitude angle error when the flight time is ;

[0158] Construct an adjustment derivative factor based on the derivative adjustment parameter, flight time, flight wind speed, and flight angle of attack:

[0159] ,

[0160] where, denotes the adjustment derivative factor, denotes the derivative adjustment parameter;

[0161] Calculate the adjusted proportional parameter based on the adjustment proportional factor, proportional parameter, proportional upper limit, and pre-constructed minimum function:

[0162] ,

[0163] Among them, refers to the adjustment ratio parameter, refers to the minimum function, refers to the ratio upper limit;

[0164] Calculate the adjusted integral parameter based on the adjusted integral factor, integral parameter, integral upper limit and minimum function:

[0165] ,

[0166] Among them, refers to the adjusted integral parameter, refers to the integral upper limit;

[0167] Calculate the adjusted differential parameter based on the adjusted differential factor, differential parameter, differential upper limit and minimum function:

[0168] ,

[0169] Among them, refers to the adjusted differential parameter, refers to the differential upper limit.

[0170] Interpretably, the proportional adjustment parameter refers to the parameter that adjusts the influence degree of the flight wind speed and aerodynamic disturbance on the adjustment ratio factor, the integral adjustment parameter refers to the parameter that adjusts the influence degree of the aerodynamic disturbance and attitude angle error on the adjustment integral factor, the differential adjustment parameter refers to the parameter that adjusts the influence degree of the flight wind speed and flight angle of attack on the adjustment differential factor, the UAV mass refers to the mass of the UAV, the adjustment ratio factor refers to the parameter that adjusts the ratio parameter, representing the change amount of the ratio parameter caused by external factors, the external factors refer to the wind speed and aerodynamic disturbance, the adjustment integral factor refers to the parameter that adjusts the integral parameter, which is the change amount of the integral parameter, and the adjustment differential factor refers to the parameter that adjusts the differential parameter, which is the change amount of the differential parameter.

[0171] S7. Use the second auxiliary thread to send the adjusted ratio parameter, adjusted integral parameter and adjusted differential parameter to the control main thread, generate an updated control signal using the received adjusted ratio parameter, adjusted integral parameter and adjusted differential parameter, update the attitude control signal using the flight controller and the updated control signal, and complete the UAV attitude control according to the updated attitude control signal and the flight control model.

[0172] Interpretably, the updated control signal refers to the signal generated using the adjusted ratio parameter, adjusted integral parameter and adjusted differential parameter, and is used to adjust the UAV.

[0173] Specifically, the generating of the updated control signal using the received adjusted ratio parameter, adjusted integral parameter and adjusted differential parameter includes:

[0174] Update the proportional parameter, integral parameter, and derivative parameter based on the adjustment proportional parameter, adjustment integral parameter, and adjustment derivative parameter, and generate an updated control signal using the updated proportional parameter, updated integral parameter, updated derivative parameter, flight time, control channel, identification parameter, channel angle error, and channel weight.

[0175] Interpretably, updating the proportional parameter, integral parameter, and derivative parameter based on the adjustment proportional parameter, adjustment integral parameter, and adjustment derivative parameter means respectively replacing the proportional parameter, integral parameter, and derivative parameter with the adjustment proportional parameter, adjustment integral parameter, and adjustment derivative parameter. Generating an updated control signal based on the adjustment proportional parameter, adjustment integral parameter, adjustment derivative parameter, flight time, control channel, identification parameter, channel angle error, and channel weight means generating an updated control signal using the updated signal formula:

[0176] ,

[0177] where, denotes the updated control signal.

[0178] Understandably, the updated signal formula refers to the formula obtained by replacing the proportional parameter, integral parameter, and derivative parameter with the adjustment proportional parameter, adjustment integral parameter, and adjustment derivative parameter. Similar to generating the attitude control signal above, it will not be elaborated here.

[0179] To solve the problems described in the background art, first, a multi-threaded flight control model is constructed. The flight control model includes a flight controller. The multi-threading includes a control main thread, a first auxiliary thread, and a second auxiliary thread. Using multi-threading improves the response speed and processing ability of the flight controller. By processing different tasks in parallel, the burden on a single thread can be significantly reduced, improving the real-time performance and computing ability of the flight controller, thereby ensuring the accuracy of attitude adjustment. Secondly, the system attitude angle is collected, and an ideal attitude angle is set. The attitude angle error is calculated based on the system attitude angle and the ideal attitude angle. By comparing the actual attitude with the ideal attitude angle, the attitude angle error can be accurately identified. The attitude angle error provides a quantitative index for the attitude deviation of the UAV and serves as the basis for adjusting the control signal, enabling the UAV to reduce the error and converge to the ideal state through gain adjustment. After that, the proportional parameter, integral parameter, and differential parameter are adjusted based on the attitude angle error, which helps to flexibly adapt to different flight states of the UAV. The proportional parameter controls the correction of the error, the integral parameter controls the elimination of long-term errors, and the differential parameter controls the improvement of the response speed. By adjusting these parameters, the control accuracy of the UAV can be optimized according to different flight environments. Then, the flight wind speed and flight angle of attack are collected in real time. The flight wind speed and flight angle of attack are important factors affecting the attitude control of the UAV. By continuously collecting these data, the flight controller can obtain the flight environment information of the UAV in real time, identify the impact of external disturbances on the aircraft attitude, and ensure that the UAV can maintain a high control accuracy under different flight conditions. After that, the aerodynamic moment disturbance is calculated. By calculating the aerodynamic moment disturbance, the main source of the UAV attitude error can be identified, the impact of external disturbances can be reduced, the stability and accuracy of attitude control can be improved, and then effective control compensation can be made. Finally, the proportional parameter, integral parameter, and differential parameter are dynamically adjusted to generate an updated control signal. The dynamic adjustment of the proportional parameter, integral parameter, and differential parameter ensures that the UAV can maintain stability under different flight states. Generating an updated control signal based on the dynamically adjusted proportional parameter, integral parameter, and differential parameter helps to maintain the stability of the UAV and improve the accuracy of UAV attitude control. Therefore, the present invention can improve the accuracy of UAV attitude control.

[0180] As Figure 2 shown, it is a functional module diagram of a UAV attitude control system based on flight aerodynamic stability provided by an embodiment of the present invention.

[0181] The UAV attitude control system 100 based on flight aerodynamic stability according to the present invention can be installed in an electronic device. According to the implemented functions, the UAV attitude control system 100 based on flight aerodynamic stability can include an attitude angle calculation module 101, a moment disturbance calculation module 102, an aerodynamic disturbance calculation module 103, and an adjustment parameter update module 104. The modules in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0182] The attitude angle calculation module 101 is configured to construct a flight control model, where the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread; collect the system attitude angle, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle;

[0183] The moment disturbance calculation module 102 is configured to set proportional parameters, integral parameters, and differential parameters based on the flight control model and the attitude angle error, generate an attitude control signal based on the control main thread, the attitude angle error, the proportional parameters, the integral parameters, and the differential parameters; set the acquisition time, collect the flight wind speed and the flight angle of attack in real time based on the acquisition time, set the aerodynamic drag parameter and the aerodynamic moment parameter, and calculate the aerodynamic moment disturbance based on the flight wind speed and the aerodynamic moment parameter;

[0184] The aerodynamic disturbance calculation module 103 is configured to obtain the surface area of the UAV, and calculate the aerodynamic disturbance based on the aerodynamic moment disturbance, the aerodynamic drag parameter, the flight wind speed, and the surface area of the UAV;

[0185] The adjustment parameter update module 104 is configured to set the proportional upper limit, the integral upper limit, and the differential upper limit, dynamically adjust the proportional parameter, the integral parameter, and the differential parameter based on the first auxiliary thread, the flight wind speed, the flight angle of attack, the aerodynamic disturbance, the proportional upper limit, the integral upper limit, and the differential upper limit, to obtain an adjusted proportional parameter, an adjusted integral parameter, and an adjusted differential parameter; use the second auxiliary thread to send the adjusted proportional parameter, the adjusted integral parameter, and the adjusted differential parameter to the control main thread, and generate an updated control signal using the received adjusted proportional parameter, adjusted integral parameter, and adjusted differential parameter, update the attitude control signal using the flight controller and the updated control signal, and complete the UAV attitude control according to the updated attitude control signal and the flight control model.

[0186] Specifically, each module in the UAV attitude control system 100 based on flight aerodynamic stability in the embodiment of the present invention is used in the same manner as the above Figure 1The same technical means as the UAV attitude control method based on flight aerodynamic stability described in [reference] and capable of achieving the same technical effects are not elaborated here.

[0187] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing the UAV attitude control method based on flight aerodynamic stability provided by an embodiment of the present invention.

[0188] The electronic device 1 may include a processor 10, a memory 11, and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a UAV attitude control method program based on flight aerodynamic stability.

[0189] Among them, the memory 11 includes at least one type of readable storage medium, which includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as the mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. Further, the memory 11 also includes the internal storage unit of the electronic device 1 and the external storage device. The memory 11 can be used not only to store application software installed in the electronic device 1 and various types of data, such as the code of the UAV attitude control method program based on flight aerodynamic stability, but also to temporarily store data that has been output or will be output.

[0190] The processor 10 may be composed of integrated circuits in some embodiments. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including a combination of one or more Central Processing Units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines, and executing various functions of the electronic device 1 and processing data by running or executing programs or modules stored in the memory 11 (such as the UAV attitude control method program based on flight aerodynamic stability, etc.) and calling data stored in the memory 11.

[0191] The bus 12 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to implement connection communication between the memory 11 and at least one processor 10, etc.

[0192] Figure 3 Only an electronic device with components is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have a different component layout.

[0193] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for powering each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device 1 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0194] Further, the electronic device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0195] Optionally, the electronic device 1 may further include a user interface. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.

[0196] The program of the UAV attitude control method based on flight aerodynamic stability stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can achieve:

[0197] Construct a flight control model, where the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread;

[0198] Collect the system attitude angle, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle;

[0199] Set the proportional parameter, integral parameter, and differential parameter based on the flight control model and the attitude angle error, and generate an attitude control signal based on the control main thread, the attitude angle error, the proportional parameter, the integral parameter, and the differential parameter;

[0200] Set the acquisition time, collect the flight wind speed and flight angle of attack in real time based on the acquisition time, set the aerodynamic drag parameter and aerodynamic moment parameter, and calculate the aerodynamic moment disturbance based on the flight wind speed and the aerodynamic moment parameter;

[0201] Obtain the surface area of the UAV, and calculate the aerodynamic disturbance based on the aerodynamic moment disturbance, the aerodynamic drag parameter, the flight wind speed, and the surface area of the UAV;

[0202] Set the proportional upper limit, integral upper limit, and differential upper limit, and dynamically adjust the proportional parameter, integral parameter, and differential parameter based on the first auxiliary thread, the flight wind speed, the flight angle of attack, the aerodynamic disturbance, the proportional upper limit, the integral upper limit, and the differential upper limit to obtain the adjusted proportional parameter, adjusted integral parameter, and adjusted differential parameter;

[0203] Use the second auxiliary thread to send the adjusted proportional parameter, adjusted integral parameter, and adjusted differential parameter to the control main thread, and generate an updated control signal using the received adjusted proportional parameter, adjusted integral parameter, and adjusted differential parameter. Update the attitude control signal using the flight controller and the updated control signal, and complete the UAV attitude control according to the updated attitude control signal and the flight control model.

[0204] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiment, which will not be repeated here.

[0205] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory).

[0206] The present invention also provides a computer-readable storage medium storing a computer program, which when executed by a processor of an electronic device, can implement:

[0207] Construct a flight control model, where the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread;

[0208] Collect the attitude angle of the system, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle;

[0209] Set proportional parameters, integral parameters, and differential parameters based on the flight control model and the attitude angle error, and generate an attitude control signal based on the control main thread, the attitude angle error, the proportional parameters, the integral parameters, and the differential parameters;

[0210] Set the acquisition time, collect the flight wind speed and the flight angle of attack in real time based on the acquisition time, set the aerodynamic drag parameter and the aerodynamic moment parameter, and calculate the aerodynamic moment perturbation based on the flight wind speed and the aerodynamic moment parameter;

[0211] Obtain the surface area of the unmanned aerial vehicle, and calculate the aerodynamic perturbation based on the aerodynamic moment perturbation, the aerodynamic drag parameter, the flight wind speed, and the surface area of the unmanned aerial vehicle;

[0212] Set the proportional upper limit, the integral upper limit, and the differential upper limit, and dynamically adjust the proportional parameters, the integral parameters, and the differential parameters based on the first auxiliary thread, the flight wind speed, the flight angle of attack, the aerodynamic perturbation, the proportional upper limit, the integral upper limit, and the differential upper limit to obtain the adjusted proportional parameters, the adjusted integral parameters, and the adjusted differential parameters;

[0213] Use the second auxiliary thread to send the adjusted proportional parameters, the adjusted integral parameters, and the adjusted differential parameters to the control main thread, and generate an updated control signal using the received adjusted proportional parameters, the adjusted integral parameters, and the adjusted differential parameters. Update the attitude control signal using the flight controller and the updated control signal, and complete the attitude control of the unmanned aerial vehicle according to the updated attitude control signal and the flight control model.

[0214] In several embodiments provided by the present invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and there may be other partitioning methods in actual implementation.

[0215] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0216] In addition, the functional modules in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.

[0217] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0218] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for controlling the attitude of an unmanned aerial vehicle based on flight aerodynamic stability, characterized in that: The method comprises: Constructing a flight control model, wherein the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread; Collect the system attitude angle, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle; Setting a proportional parameter, an integral parameter and a differential parameter based on the flight control model and the attitude angle error, and generating an attitude control signal based on the control main thread, the attitude angle error, the proportional parameter, the integral parameter and the differential parameter; Set the collection time, collect the flight wind speed and flight angle of attack in real time based on the collection time, set the aerodynamic drag parameters and aerodynamic torque parameters, and calculate the aerodynamic torque disturbance based on the flight wind speed and aerodynamic torque parameters; Obtaining the surface area of ​​the drone, and calculating the aerodynamic disturbance based on the aerodynamic moment disturbance, the aerodynamic drag parameter, the flight wind speed and the surface area of ​​the drone; Setting a proportional upper limit, an integral upper limit and a differential upper limit, dynamically adjusting the proportional parameter, the integral parameter and the differential parameter based on the first auxiliary thread, the flight wind speed, the flight angle of attack, the aerodynamic disturbance, the proportional upper limit, the integral upper limit and the differential upper limit, and obtaining an adjusted proportional parameter, an adjusted integral parameter and an adjusted differential parameter; The second auxiliary thread is used to send the adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter to the control main thread, and the received adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter are used to generate an update control signal, the attitude control signal is updated using the flight controller and the update control signal, and the attitude control of the UAV is completed according to the updated attitude control signal and the flight control model.

2. The method for controlling the attitude of an unmanned aerial vehicle based on flight aerodynamic stability according to claim 1, characterized in that: The collecting system attitude angle, setting the ideal attitude angle, and calculating the attitude angle error based on the system attitude angle and the ideal attitude angle include: Determine the flight state of the drone system and set the filter level, wherein the flight state of the system includes: stable flight state, fast turning state and accelerated flight state, and the filter level includes: first filter level, second filter level and third filter level; When the flight state of the system is in a stable flight state, confirming the filtering level as the first filtering level; When the flight state of the system is in a fast turning state or an accelerated flight state, the filtering level is confirmed as a second filtering level; When the flight state of the system is in a flight transition state, confirming the filtering level as a third filtering level; Based on the filtering level and the preset attitude acquisition unit, the system attitude angle is collected, wherein the system attitude angle includes: a system pitch angle, a system roll angle and a system yaw angle; Calculating a pitch attitude error, a roll attitude error, and a yaw attitude error, and adjusting the system pitch angle, the system roll angle, and the system yaw angle based on the pitch attitude error, the roll attitude error, and the yaw attitude error, respectively, to obtain a corrected pitch angle, a corrected roll angle, and a corrected yaw angle; The attitude angle error is calculated based on the ideal attitude angle, the corrected pitch angle, the corrected roll angle and the corrected yaw angle.

3. The method for controlling the attitude of an unmanned aerial vehicle based on flight aerodynamic stability according to claim 2, characterized in that: The determining the flight status of the drone system and setting the filtering level includes: Get the acceleration change range and angular velocity change range. When the acceleration change range is , the angular velocity range is , confirm that the system flight status is stable flight status; When the acceleration range is , the angular velocity range is , confirm that the system flight status is fast turning state; When the acceleration range is , the angular velocity range is , confirm that the system flight state is accelerated flight state; When it is determined based on the acceleration variation range and the angular velocity variation range that the flight state of the system is not in a stable flight state, a fast turning state, and an accelerated flight state, confirming that the flight state of the system is in a flight transition state; Determine the flight state of the system based on the steady flight state, fast turning state, accelerated flight state and flight transition state; Obtain a filter coefficient, and set a filter coefficient range based on the filter coefficient, wherein the filter coefficient range includes: a first filter range, a second filter range, and a third filter range, and the first filter range is: , the second filtering range is: , the third filtering range is: ; The filtering level is set based on the first filtering range, the second filtering range and the third filtering range, wherein the first filtering range is set to the first filtering level, the second filtering range is set to the second filtering level, and the third filtering range is set to the third filtering level.

4. The method for controlling the attitude of an unmanned aerial vehicle based on flight aerodynamic stability according to claim 3, characterized in that: The calculating of the pitch attitude error, the roll attitude error and the yaw attitude error, and adjusting the system pitch angle, the system roll angle and the system yaw angle based on the pitch attitude error, the roll attitude error and the yaw attitude error to obtain a corrected pitch angle, a corrected roll angle and a corrected yaw angle, comprises: Real-time flight temperature, real-time flight speed, real-time flight altitude and characteristic attitude function are acquired in real time, and pitch attitude error, roll attitude error and yaw attitude error are calculated based on the system pitch angle, system roll angle, system yaw angle, real-time flight temperature, real-time flight speed, real-time flight altitude and characteristic attitude function: , in, Pitch attitude error, Refers to the roll attitude error, refers to the yaw attitude error, refers to the characteristic posture function, Refers to the real-time flight temperature, Refers to the real-time flight speed. Refers to the real-time flight altitude. Refers to the system pitch angle, Refers to the system roll angle, Refers to the system yaw angle; The corrected pitch angle, the corrected roll angle and the corrected yaw angle are calculated based on the system pitch angle, the system roll angle, the system yaw angle and the temperature attitude error: , in, Refers to the corrected pitch angle, Refers to the corrected roll angle, Refers to the correction of yaw angle.

5. The method for controlling the attitude of a UAV based on flight aerodynamic stability according to claim 4, characterized in that: The generating of the attitude control signal based on the control main thread, attitude angle error, proportional parameter, integral parameter and differential parameter comprises: Setting channel weights, flight time and control channels according to the flight status of the system, wherein the control channels include: a pitch channel, a roll channel and a yaw channel; The pitch channel, the roll channel and the yaw channel are respectively labeled to obtain the pitch channel, the roll channel and the yaw channel with identification parameters, wherein the identification parameter corresponding to the pitch channel is 1, the identification parameter corresponding to the roll channel is 2, and the identification parameter corresponding to the yaw channel is 3; Calculating a channel angle error based on the attitude angle error, the pitch channel, the roll channel and the yaw channel, wherein the channel angle error includes: a pitch channel error, a roll channel error and a yaw channel error; Generate attitude control signal based on proportional parameter, integral parameter, differential parameter, flight time, control channel, identification parameter, channel angle error and channel weight: , in, The flight time is The attitude control signal at Refers to the flight time, Refers to the identification parameter, refers to the scale parameter, The flight time is , the identification parameters are The channel angle error of the control channel at refers to the integral parameter, refers to the differential parameter, The flight time is , the identification parameters are The channel weight of the control channel at that time.

6. The method for controlling the attitude of an unmanned aerial vehicle based on flight aerodynamic stability according to claim 5, characterized in that: The step of setting the channel weight according to the flight state of the system includes: Get the acceleration change rate and angular velocity change rate of all control channels, set the acceleration weight parameter and angular velocity weight parameter, and set the channel weight based on the acceleration change rate, angular velocity change rate, acceleration weight parameter and angular velocity weight parameter: , in, refers to the natural exponential function, refers to the acceleration weight parameter, Refers to the absolute value symbol, The flight time is , identification parameters are The rate of change of acceleration when Refers to the angular velocity weight parameter, The flight time is , identification parameters are The rate of change of angular velocity.

7. The method for controlling the attitude of a UAV based on flight aerodynamic stability according to claim 6, characterized in that: The aerodynamic moment disturbance calculation based on the flight wind speed and aerodynamic moment parameters includes: Obtain air density, characteristic length, angular velocity sensitive parameter, first angular velocity, angle of attack sensitive parameter and angle of attack change rate; The aerodynamic moment disturbance is calculated based on the air density, characteristic length, angular velocity sensitive parameter, first angular velocity, angle of attack sensitive parameter, angle of attack change rate, flight wind speed and aerodynamic moment parameter: , in, refers to the aerodynamic torque disturbance, Refers to the air density, Refers to the flying wind speed, refers to the characteristic length, Refers to the aerodynamic torque parameter, Refers to the angular velocity sensitivity parameter, refers to the first angular velocity, Refers to the collection time, Refers to the angle of attack sensitivity parameter, Refers to the rate of change of angle of attack.

8. The method for controlling the attitude of a UAV based on flight aerodynamic stability according to claim 7, characterized in that: The method of dynamically adjusting the proportional parameter, the integral parameter and the differential parameter based on the first auxiliary thread, the flight wind speed, the flight angle of attack, the aerodynamic disturbance, the proportional upper limit, the integral upper limit and the differential upper limit to obtain the adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter includes: Set the proportional adjustment parameters, integral adjustment parameters and differential adjustment parameters, obtain the UAV mass, and construct the adjustment proportional factor based on the proportional adjustment parameters, flight wind speed, flight angle of attack, aerodynamic disturbance and UAV mass: , in, Refers to the adjustment scale factor, refers to the proportional adjustment parameter, The flight angle of attack. Refers to the quality of the drone, Refers to aerodynamic disturbance; The adjustment integral factor is constructed based on the integral adjustment parameters, the drone mass, the attitude angle error and the flight time: , in, Refers to the adjustment of the integral factor, refers to the integral adjustment parameter, The flight time is Attitude angle error at ; The adjustment differential factor is constructed based on the differential adjustment parameter, flight time, flight wind speed and flight angle of attack: , in, Refers to the adjustment differential factor, Refers to the differential adjustment parameter; The adjustment scale parameter is calculated based on the adjustment scale factor, the scale parameter, the scale upper limit and the pre-constructed minimum function: , in, Refers to adjusting the scale parameter, refers to the minimum function, Refers to the upper limit of the ratio; The adjusted integral parameter is calculated based on the adjusted integral factor, integral parameter, integral upper limit and minimum function: , in, Refers to adjusting the integral parameter, Refers to the upper limit of points; The adjusted differential parameter is calculated based on the adjusted differential factor, differential parameter, differential upper limit and minimum function: , in, Refers to adjusting the differential parameter, Refers to the upper limit of differentiation.

9. The method for controlling the attitude of a UAV based on flight aerodynamic stability according to claim 8, characterized in that: The method of generating an update control signal using the received adjustment proportion parameter, adjustment integral parameter and adjustment differential parameter comprises: The proportional parameter, integral parameter and differential parameter are updated based on the adjusted proportional parameter, adjusted integral parameter and adjusted differential parameter, and an updated control signal is generated using the updated proportional parameter, updated integral parameter, updated differential parameter, flight time, control channel, identification parameter, channel angle error and channel weight.

10. An unmanned aerial vehicle attitude control system based on flight aerodynamic stability, characterized in that: The system comprises: The attitude angle calculation module is used to construct a flight control model, wherein the flight control model includes: a flight controller, and the flight control model is a multi-threaded model, and the multi-threaded model includes: a control main thread, a first auxiliary thread, and a second auxiliary thread; collect the system attitude angle, set the ideal attitude angle, and calculate the attitude angle error based on the system attitude angle and the ideal attitude angle; A torque disturbance calculation module is used to set proportional parameters, integral parameters and differential parameters based on the flight control model and the attitude angle error, and generate an attitude control signal based on the control main thread, the attitude angle error, the proportional parameters, the integral parameters and the differential parameters; set the collection time, collect the flight wind speed and the flight angle of attack in real time based on the collection time, set the aerodynamic drag parameters and the aerodynamic torque parameters, and calculate the aerodynamic torque disturbance based on the flight wind speed and the aerodynamic torque parameters; An aerodynamic disturbance calculation module, used to obtain the surface area of ​​the UAV, and calculate the aerodynamic disturbance based on the aerodynamic moment disturbance, the aerodynamic drag parameter, the flight wind speed and the surface area of ​​the UAV; The adjustment parameter update module is used to set the proportional upper limit, the integral upper limit and the differential upper limit, dynamically adjust the proportional parameter, the integral parameter and the differential parameter based on the first auxiliary thread, the flight wind speed, the flight angle of attack, the aerodynamic disturbance, the proportional upper limit, the integral upper limit and the differential upper limit, and obtain the adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter; use the second auxiliary thread to send the adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter to the control main thread, and use the received adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter to generate an update control signal, use the flight controller and the update control signal to update the attitude control signal, and complete the attitude control of the unmanned aerial vehicle according to the updated attitude control signal and the flight control model.

Citation Information

Patent Citations

  • Method and device for controlling attitude of rotor unmanned aerial vehicle and unmanned aerial vehicle thereof

    CN107065901A

  • Unmanned tilt rotor auto-disturbance rejection attitude control method

    CN109062237A