Unmanned aerial vehicle attitude control method and system based on flight aerodynamic stability
Through multi-threaded flight control model and real-time aerodynamic data processing, control parameters are dynamically adjusted, and the problem of insufficient accuracy and response speed of traditional flight control methods under complex conditions is solved, and more efficient drone attitude control is achieved.
Patent Information
- Application Number
- CN202510088370.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2045-01-21
AI Technical Summary
In the case of high dynamic changes and large external disturbances, the control accuracy and response speed are often limited, making it difficult to ensure the accuracy of drone attitude control.
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 flight wind speed and angle of attack are collected in real time, the aerodynamic disturbances are calculated, and the proportional parameters, integral parameters and differential parameters are dynamically adjusted to generate an updated attitude control signal.
It improves the accuracy and stability of drone attitude control, and can maintain high control accuracy and response speed under complex external conditions.
Smart Images

Figure CN119512200A_ABST
Abstract
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: 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.
[0006] Optionally, 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.
[0007] Optionally, 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.
[0008] Optionally, the 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, includes: 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.
[0009] Optionally, the generating of the attitude control signal based on the control main thread, attitude angle error, proportional parameter, integral parameter and differential parameter includes: 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.
[0010] Optionally, 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 , the identification parameters are The rate of change of acceleration when Refers to the angular velocity weight parameter, The flight time is , the identification parameters are The rate of change of angular velocity.
[0011] Optionally, the calculating aerodynamic moment disturbance 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.
[0012] Optionally, dynamically adjusting the proportional parameter, integral parameter and differential parameter based on the first auxiliary thread, flight wind speed, flight angle of attack, aerodynamic disturbance, proportional upper limit, integral upper limit and differential upper limit to obtain adjusted proportional parameter, adjusted integral parameter and 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.
[0013] Optionally, the step 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.
[0014] To achieve the above object, the present invention also provides a UAV attitude control system based on flight aerodynamic stability, comprising: 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.
[0015] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising: A memory storing at least one instruction; The processor executes the instructions stored in the memory to implement the above-mentioned UAV attitude control method based on flight aerodynamic stability.
[0016] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned drone attitude control method based on flight aerodynamic stability.
[0017] The present invention solves the problems described in the background technology. Firstly, 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. The multi-threading improves the response speed and processing capability of the flight controller. By processing different tasks in parallel, the burden of a single thread can be significantly reduced, and the real-time performance and computing capability of the flight controller can be improved, thereby ensuring the accuracy of attitude adjustment. Secondly, the system attitude angle is collected, the ideal attitude angle is set, and 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 is calculated, and the attitude deviation of the current unmanned aerial vehicle can be accurately identified. The attitude angle error provides a quantitative index for the attitude deviation of the unmanned aerial vehicle, which is used as the basis for adjusting the control signal, so that the unmanned aerial vehicle can reduce the error and converge to the ideal state through gain adjustment. Afterwards, the proportional parameter, the integral parameter and the differential parameter are adjusted based on the attitude angle error, which is helpful to flexibly adapt to different flight states of the unmanned aerial vehicle. The proportional parameter control corrects the error, the integral parameter control eliminates the long-term error, and the differential parameter control improves the response speed. By adjusting these parameters, the control accuracy of the drone can be optimized according to the 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 drone. By continuously collecting these data, the flight controller can obtain the flight environment information of the drone in real time, identify the impact of external disturbances on the aircraft attitude, and ensure that the drone can maintain a high control accuracy under different flight conditions; then, the aerodynamic torque disturbance is calculated. By calculating the aerodynamic torque disturbance, the main source of the drone attitude error can be identified, the impact of external disturbances can be reduced, the stability and accuracy of attitude control can be improved, and effective control compensation can be made; finally, the proportional parameter, integral parameter and differential parameter are dynamically adjusted to generate an update control signal. The dynamic adjustment of the proportional parameter, integral parameter and differential parameter ensures that the drone can remain stable under different flight conditions. The update control signal is generated according to the dynamically adjusted proportional parameter, integral parameter and differential parameter, which helps to maintain the stability of the drone and improve the accuracy of the drone attitude control. Therefore, the present invention can improve the accuracy of the drone attitude control. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic flow chart of a method for controlling the attitude of a UAV based on flight aerodynamic stability provided by an embodiment of the present invention; Figure 2 A functional module diagram of a UAV attitude control system based on flight aerodynamic stability provided by one embodiment of the present invention; Figure 3 A schematic diagram of the structure of an electronic device for implementing the UAV attitude control method based on flight aerodynamic stability provided by an embodiment of the present invention.
[0019] Description of reference numerals: 1. Electronic device; 10. Processor; 11. Memory; 12. Bus.
[0020] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] 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.
[0022] The embodiment of the present application provides a method for controlling the attitude of a drone based on flight aerodynamic stability. The execution subject of the method for controlling the attitude of a drone based on flight aerodynamic stability includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for controlling the attitude of a drone 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.
[0023] Reference Figure 1 FIG. 1 is a flow chart of a method for controlling the attitude of a UAV based on flight aerodynamic stability according to an embodiment of the present invention. In this embodiment, the method for controlling the attitude of a UAV based on flight aerodynamic stability includes: S1. 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.
[0024] It can be explained that the flight control model refers to a model that simulates and controls the attitude of the drone, and uses the flight controller to control the drone according to the data in the simulation process. The flight controller refers to a unit that controls the attitude of the drone, which can maintain the stability of the drone's flight. The attitude of the drone refers to the attitude angle of the drone during flight. The attitude angle includes 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 executes multiple threads simultaneously in a single process. The main control thread, the first auxiliary thread and the second auxiliary thread are all threads that can be executed independently. The main control thread refers to the thread directly responsible for the attitude control of the drone. The first auxiliary thread refers to the thread that is executed according to the corresponding The second auxiliary thread refers to the thread that transfers data to the main control thread. The relevant parameters refer to the upper limit of the proportion, the upper limit of the integral, the upper limit of the differential, the flight wind speed, the flight angle of attack and the gas disturbance. The upper limit of the proportion refers to the upper limit of the difference between the adjustment proportion parameter and the proportion parameter. The adjustment proportion parameter refers to the parameter obtained by adjusting the proportion parameter based on the flight wind speed, the flight angle of attack and the gas disturbance. The flight wind speed refers to the speed of the airflow around the drone, 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 drone. The lateral wind speed refers to the wind speed component along the direction of the drone wing. The drone Wing direction refers to the left and right direction along the drone's wing. The lateral wind speed has an important influence on the sideslip, roll angle and lateral stability of the drone. Lateral stability refers to the stability of the drone along the lateral axis of the drone during flight. The lateral axis of the drone refers to the axis in the direction of the drone's wing. The longitudinal wind speed refers to the wind speed and volume parallel to the vertical direction of the ground. The vertical direction of the ground refers to the direction of gravity. The flight angle of attack refers to the angle between the flight direction of the drone and the airflow. When the angle of attack is too large, the drone is prone to stall, causing the drone to lose lift. Gas disturbance refers to the force and torque caused by the interaction between the airflow and the drone's fuselage, which refers to the impact of airflow unevenness on the drone. The proportional parameter refers to the impact on flight control. 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 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 condition of the UAV due to aerodynamics during the flight. The specific state is affected by factors such as the system attitude angle and the 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.
[0025] It can be understood that the integral upper limit refers to the upper limit of adjusting the integral parameter and the integral parameter difference, adjusting the integral parameter refers to the parameter obtained by adjusting the integral parameter based on the flight wind speed, flight angle of attack and gas disturbance, the integral parameter refers to the parameter that reduces the static error, and the integral parameter can avoid long-term deviations caused by static errors. The differential upper limit refers to the upper limit of adjusting the differential parameter and the differential parameter difference, adjusting the differential parameter refers to the parameter obtained by adjusting the differential parameter based on the flight wind speed, flight angle of attack and gas disturbance, the differential parameter refers to the parameter that affects the response degree of the flight controller to the error change rate, the differential parameter can suppress the rapid change of attitude angle error, can respond to the speed of error change, and reduce oscillation, the error change rate refers to the rate of change of attitude angle error over time, and the error change refers to the change of attitude angle error.
[0026] S2. 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.
[0027] In detail, the acquisition 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.
[0028] It can be explained that the filtering level refers to the level of filtering after the attitude acquisition unit collects the attitude angle of the system. The filtering level includes the first filtering level, the second filtering level and the third filtering level. The first filtering level refers to the filtering level when the filtering coefficient is 0.1 to 0.3, the second filtering level refers to the filtering level when the filtering coefficient is 0.6 to 0.7, and the third filtering level refers to the filtering level when the filtering coefficient is 0.4 to 0.5. The filtering coefficient refers to the parameter that affects the degree of noise removal. The range of the filtering coefficient is The system flight state refers to the current state of the drone during flight. The system flight state includes: stable flight state, fast turning state, accelerated flight state and flight transition state. The stable flight state refers to the acceleration change range of the drone. , the angular velocity range is The acceleration change range refers to the range of acceleration change during the flight of the drone. The fast turning state refers to the range of acceleration change of the drone. , the angular velocity range is The accelerated flight state refers to the acceleration change range of the drone. , the angular velocity range is The flight transition state refers to the state of transition between the stable flight state, the fast turning state and the accelerated flight state. The attitude acquisition unit refers to the unit for collecting the system pitch angle, the system roll angle and the system yaw angle. The attitude acquisition unit is composed of a gyroscope, an accelerometer and a magnetometer. The system pitch angle refers to the pitch angle collected by the attitude acquisition unit when the UAV is flying. The system roll angle refers to the roll angle collected by the attitude acquisition unit when the UAV is flying. The system yaw angle refers to the yaw angle collected by the attitude acquisition unit when the UAV is flying. The pitch attitude error refers to the influence of temperature on the system pitch angle. The roll attitude error refers to the influence of temperature on the system roll angle. The yaw attitude error refers to the influence of temperature on the system yaw angle. The corrected pitch angle refers to the pitch angle obtained by adjusting the system pitch angle based on the temperature attitude error. The corrected roll angle refers to the roll angle obtained by adjusting the system roll angle based on the temperature attitude error. The corrected yaw angle refers to the yaw angle obtained by adjusting the system yaw angle based on the temperature attitude error.
[0029] In detail, the process of 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.
[0030] It can be explained that the filter coefficient range refers to the range of the filter coefficient, the first filter range refers to the range of the filter coefficient corresponding to the first filter level, the second filter range refers to the range of the filter coefficient corresponding to the second filter level, the third filter range refers to the range of the filter coefficient corresponding to the third filter level, the acceleration change range refers to the range of acceleration change during the flight of the UAV, and the angular velocity change range refers to the range of angular velocity change during the flight of the UAV.
[0031] In detail, 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, include: 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.
[0032] It can be explained that 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 of the UAV during the flight, the real-time flight altitude refers to the flight altitude of the UAV during the flight, and the characteristic attitude function refers to a function that dynamically predicts the temperature attitude error based on the system pitch angle, system roll angle, system yaw angle, real-time flight temperature, real-time flight speed and real-time flight altitude. The characteristic attitude function is obtained by inputting historical data into the long short-term memory network for training. 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.
[0033] S3. Setting proportional parameters, integral parameters and differential parameters 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 parameters, the integral parameters and the differential parameters.
[0034] Explainably, the attitude control signal refers to the signal for controlling the attitude of the UAV.
[0035] In detail, the generating of the attitude control signal based on the control main thread, attitude angle error, proportional parameter, integral parameter and differential parameter includes: 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.
[0036] 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, then the flight time is 1:00 at night, the control channel refers to the channel used to control the attitude of the UAV, and the control channels include: pitch channel, roll channel and yaw channel. The pitch channel refers to the channel for controlling the pitch angle of the UAV, the roll channel refers to the channel for controlling the roll angle of the UAV, and the yaw channel refers to the channel for controlling the yaw angle of the UAV. The identification parameter refers to the parameter for traversing the control channel. The channel angle error refers to the error between the attitude of the UAV of 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.
[0037] In detail, 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 , the identification parameters are The rate of change of acceleration when Refers to the angular velocity weight parameter, The flight time is , the identification parameters are The rate of change of angular velocity.
[0038] It can be explained that the acceleration change rate refers to the rate of change of acceleration when the UAV is flying, the angular velocity change rate refers to the rate of change of angular velocity when the UAV is flying, the acceleration weight parameter refers to the parameter for adjusting the influence of the acceleration change rate on the channel weight, and the angular velocity weight parameter refers to the parameter for adjusting the influence of the angular velocity change rate on the channel weight.
[0039] S4. 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.
[0040] It can be explained that the collection time refers to the time for collecting the flight wind speed and flight angle of attack. The aerodynamic drag parameter refers to the parameter for measuring the air resistance of the UAV when it is flying in the air. The aerodynamic drag parameter is obtained through wind tunnel experiments. The aerodynamic torque parameter refers to the parameter for measuring the size of the aerodynamic torque of the UAV in the air. The aerodynamic torque 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. The aerodynamic torque disturbance refers to the degree of influence of the aerodynamic torque on the UAV. The larger the aerodynamic torque, the greater the aerodynamic torque disturbance.
[0041] In detail, the calculation of aerodynamic moment disturbance based on 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.
[0042] It can be explained that air density refers to the density of air when the UAV is flying, characteristic length refers to the length of the UAV's body, body length refers to the length from the tail of the UAV to the nose of the UAV, angular velocity sensitivity parameter refers to the parameter that describes the degree of influence of the change of the angular velocity of the UAV on the aerodynamic torque disturbance, the first angular velocity refers to the angular velocity of the UAV, angle of attack sensitivity parameter refers to the parameter that describes the degree of influence of the change of the UAV's flight angle of attack on the aerodynamic torque disturbance, the larger the angle of attack sensitivity parameter, the greater the influence of the change of the UAV's flight angle of attack on the aerodynamic torque disturbance, the angle of attack change rate reflects the speed of change of the UAV's flight angle of attack during the acquisition time, the larger the angle of attack change rate, the faster the speed of change of the UAV's flight angle of attack.
[0043] S5. Obtain the surface area of the UAV, and calculate the aerodynamic disturbance based on the aerodynamic torque disturbance, the aerodynamic drag parameter, the flight wind speed and the surface area of the UAV.
[0044] It can be explained that the surface area of the drone refers to the area of the drone surface, and the aerodynamic disturbance refers to the aerodynamic force generated by the airflow on the drone.
[0045] It can be understood that the aerodynamic disturbance is calculated based on the aerodynamic moment disturbance, aerodynamic drag parameter, flight wind speed, drone surface area and air density: , in, Refers to the surface area of the drone, Refers to the aerodynamic resistance parameter.
[0046] S6. Set a proportional upper limit, an integral upper limit and a differential upper limit, and 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.
[0047] In detail, the proportional parameter, integral parameter and differential parameter are dynamically adjusted based on the first auxiliary thread, flight wind speed, flight angle of attack, aerodynamic disturbance, proportional upper limit, integral upper limit and differential upper limit to obtain adjusted proportional parameter, adjusted integral parameter and adjusted differential parameter, including: 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.
[0048] It can be explained that the proportional adjustment parameter refers to the parameter for adjusting the influence of flight wind speed and aerodynamic disturbance on the adjustment of proportional factor, the integral adjustment parameter refers to the parameter for adjusting the influence of aerodynamic disturbance and attitude angle error on the adjustment of integral factor, the differential adjustment parameter refers to the parameter for adjusting the influence of flight wind speed and flight angle of attack on the adjustment of differential factor, the UAV mass refers to the mass of the UAV, the adjustment of proportional factor refers to the parameter for adjusting the proportional parameter, which represents the change of the proportional parameter caused by external factors, and the external factors refer to wind speed and aerodynamic disturbance. The adjustment of integral factor refers to the parameter for adjusting the integral parameter, which is the change of the integral parameter. The adjustment of differential factor refers to the parameter for adjusting the differential parameter, which is the change of the differential parameter.
[0049] S7. 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 UAV attitude control according to the updated attitude control signal and the flight control model.
[0050] It can be explained that the updated control signal refers to a signal generated by adjusting the proportional parameter, adjusting the integral parameter and adjusting the differential parameter, which is used to adjust the drone.
[0051] In detail, the step of generating an update control signal using the received adjustment proportion parameter, adjustment integral parameter, and adjustment differential parameter includes: 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.
[0052] It can be explained that updating the proportional parameter, integral parameter and differential parameter based on the adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter refers to replacing the proportional parameter, the integral parameter and the differential parameter respectively by adjusting the proportional parameter, the adjusted integral parameter and the adjusted differential parameter, and generating an update control signal based on the adjusted proportional parameter, the adjusted integral parameter, the adjusted differential parameter, the flight time, the control channel, the identification parameter, the channel angle error and the channel weight refers to generating an update control signal using an update signal formula: , in, Refers to the update control signal.
[0053] It can be understood that the update signal formula refers to the formula obtained by replacing the proportional parameter, the integral parameter and the differential parameter by adjusting the proportional parameter, the integral parameter and the differential parameter, which is similar to the above-mentioned generation of the attitude control signal and will not be repeated here.
[0054] The present invention solves the problems described in the background technology. Firstly, 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. The multi-threading improves the response speed and processing capability of the flight controller. By processing different tasks in parallel, the burden of a single thread can be significantly reduced, and the real-time performance and computing capability of the flight controller can be improved, thereby ensuring the accuracy of attitude adjustment. Secondly, the system attitude angle is collected, the ideal attitude angle is set, and 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 is calculated, and the attitude deviation of the current unmanned aerial vehicle can be accurately identified. The attitude angle error provides a quantitative index for the attitude deviation of the unmanned aerial vehicle, which is used as the basis for adjusting the control signal, so that the unmanned aerial vehicle can reduce the error and converge to the ideal state through gain adjustment. Afterwards, the proportional parameter, the integral parameter and the differential parameter are adjusted based on the attitude angle error, which is helpful to flexibly adapt to different flight states of the unmanned aerial vehicle. The proportional parameter control corrects the error, the integral parameter control eliminates the long-term error, and the differential parameter control improves the response speed. By adjusting these parameters, the control accuracy of the drone can be optimized according to the 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 drone. By continuously collecting these data, the flight controller can obtain the flight environment information of the drone in real time, identify the impact of external disturbances on the aircraft attitude, and ensure that the drone can maintain a high control accuracy under different flight conditions; then, the aerodynamic torque disturbance is calculated. By calculating the aerodynamic torque disturbance, the main source of the drone attitude error can be identified, the impact of external disturbances can be reduced, the stability and accuracy of attitude control can be improved, and effective control compensation can be made; finally, the proportional parameter, integral parameter and differential parameter are dynamically adjusted to generate an update control signal. The dynamic adjustment of the proportional parameter, integral parameter and differential parameter ensures that the drone can remain stable under different flight conditions. The update control signal is generated according to the dynamically adjusted proportional parameter, integral parameter and differential parameter, which helps to maintain the stability of the drone and improve the accuracy of the drone attitude control. Therefore, the present invention can improve the accuracy of the drone attitude control.
[0055] like Figure 2 , which is a functional module diagram of a UAV attitude control system based on flight aerodynamic stability provided by one embodiment of the present invention.
[0056] The UAV attitude control system 100 based on flight aerodynamic stability of the present invention can be installed in an electronic device. According to the functions to be implemented, the UAV attitude control system 100 based on flight aerodynamic stability can include an attitude angle calculation module 101, a torque disturbance calculation module 102, an aerodynamic disturbance calculation module 103 and an adjustment parameter update module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0057] The attitude angle calculation module 101 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; The torque disturbance calculation module 102 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 parameter and the aerodynamic torque parameter, and calculate the aerodynamic torque disturbance based on the flight wind speed and the aerodynamic torque parameter; The aerodynamic disturbance calculation module 103 is used to obtain the surface area of the drone 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 drone; The adjustment parameter update module 104 is used to set the proportional upper limit, the integral upper limit and the differential upper limit, and 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 the adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter; the adjusted proportional parameter, the adjusted integral parameter and the adjusted differential parameter are sent to the control main thread by using the second auxiliary 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 by 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.
[0058] In detail, the modules in the UAV attitude control system 100 based on flight aerodynamic stability in the embodiment of the present invention are used in the same manner as described above. Figure 1 The technical means are the same as the UAV attitude control method based on flight aerodynamic stability described in, and can produce the same technical effects, so they will not be repeated here.
[0059] like Figure 3 , is a schematic diagram of the structure of an electronic device for implementing a method for controlling the attitude of a UAV based on flight aerodynamic stability, provided by an embodiment of the present invention.
[0060] 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 method program for controlling the attitude of a drone based on flight aerodynamic stability.
[0061] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the drone attitude control method program based on flight aerodynamic stability, but also can be used to temporarily store data that has been output or is to be output.
[0062] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as a method program for controlling the attitude of a drone based on flight aerodynamic stability, etc.), and calls data stored in the memory 11, so as to execute various functions of the electronic device 1 and process data.
[0063] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0064] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0065] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0066] Furthermore, the electronic device 1 may also 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.
[0067] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or 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-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0068] The program of the method for controlling the attitude of a drone based on flight aerodynamic stability stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, the following can be achieved: 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.
[0069] 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 embodiments will not be repeated here.
[0070] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it 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 disk, a computer memory, and a read-only memory (ROM).
[0071] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement: 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.
[0072] In the 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 only illustrative, and actual implementation may have other division methods.
[0073] 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 on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0075] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution 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 attitude angle of the system is collected, wherein the attitude angle of the system 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 time refers to the integral parameter, refers to the differential parameter, The flight time is , 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
Rocket last-stage front and rear wing upper anti-control surface control method in large attack angle flight state
CN117572887A
Normalization method and system for transition mode of composite vertical take-off and landing unmanned aerial vehicle
CN118244788A
Inertial navigation system
US20170016728A1
Cited By
Multi-rotor unmanned aerial vehicle mechanical arm control method considering mass center offset constraint
CN120233789A
Unmanned aerial vehicle anti-wind disturbance stable control method
CN121857773A