Self-adaptive flight control method and device, electronic equipment and storage medium

Through the adaptive flight control method, combined with historical data and Kalman filtering algorithm, the problems of integral drift and high-frequency noise in drone attitude angle estimation are solved, and more accurate and stable attitude angle estimation and control are achieved.

CN118897571APending Publication Date: 2024-11-05YUNNAN POWER GRID CO LTD NUJIANG POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410930541.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-05

Smart Images

  • Figure CN118897571A_ABST
    Figure CN118897571A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a self-adaptive flight control method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a predicted attitude angle of an unmanned plane based on a historical attitude angle and a historical control signal of the unmanned plane at a previous moment; determining a covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and a historical control matrix corresponding to the historical control signal; acquiring a current attitude angle of the unmanned aerial vehicle, and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix; generating a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle; and controlling the current flight attitude in response to the control signal. According to the scheme, the accuracy of attitude angle estimation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an adaptive flight control method, device, electronic device and storage medium. Background Art

[0002] At present, drones are being used more and more widely. The attitude estimation of drones is not only crucial for the attitude control of drones, but also for the positioning and navigation of drones. The attitude angle calculated by the micro-electromechanical system (MEMS) gyroscope has high accuracy in a short period of time, but there is an integral drift that increases over time. The attitude angle calculated by the MEMS accelerometer does not go through the integration process, so it is more stable. However, there is a high-frequency noise problem, so it cannot be directly applied to the attitude estimation of drones. It is difficult to achieve accurate and stable attitude angle estimation at the same time using only one of the above sensors. Summary of the invention

[0003] The embodiments of the present application provide an adaptive flight control system, method, electronic device, and storage medium, which can improve the accuracy of attitude angle estimation of a drone.

[0004] In a first aspect, an embodiment of the present application provides an adaptive flight control method, including:

[0005] Determine the predicted attitude angle of the UAV based on the historical attitude angle and historical control signal of the UAV at the previous moment;

[0006] Determine a covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal;

[0007] Obtaining a current attitude angle of the drone, and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle, and the covariance matrix;

[0008] Based on the updated attitude angle and the current attitude angle, generating a control signal corresponding to the current moment;

[0009] In response to the control signal, the current flight attitude is controlled.

[0010] Optionally, in some embodiments of the present application, determining the covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal includes:

[0011] Obtaining a historical covariance matrix corresponding to the previous moment, a historical control matrix corresponding to the historical control signal, and a state transfer matrix from the previous moment to the current moment;

[0012] Determine the process noise covariance matrix;

[0013] The covariance matrix corresponding to the current moment is determined according to the historical covariance matrix, the historical control matrix, the state transfer matrix and the process noise covariance matrix.

[0014] Optionally, in some embodiments of the present application, obtaining the current attitude angle of the drone and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix includes:

[0015] Acquiring sensor data of the drone;

[0016] Fusing the sensor data and solving the fused data to obtain the current attitude angle of the UAV;

[0017] Calculating the residual between the current attitude angle and the predicted attitude angle;

[0018] The predicted attitude angle is updated according to the residual and the covariance matrix between the current attitude angle and the predicted attitude angle.

[0019] Optionally, in some embodiments of the present application, updating the predicted attitude angle according to the residual and covariance matrix between the current attitude angle and the predicted attitude angle includes:

[0020] Determining a Kalman gain according to a residual between the current attitude angle and the predicted attitude angle;

[0021] The predicted attitude angle is updated based on the residual between the current attitude angle and the predicted attitude angle and the covariance matrix of the Kalman gain.

[0022] Optionally, in some embodiments of the present application, generating a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle includes:

[0023] Calculating an attitude angle error between the updated attitude angle and the current attitude angle;

[0024] Obtain the preset integral sliding mode control law;

[0025] According to the attitude angle error and the integral sliding mode control law, a control signal corresponding to the current moment is generated.

[0026] Optionally, in some embodiments of the present application, generating a control signal corresponding to the current moment according to the attitude angle error and the integral sliding mode control law includes:

[0027] When a fault is detected in the actuator, the current fault signal is determined;

[0028] adjusting the integral sliding mode control law according to the fault signal;

[0029] A control signal corresponding to the current moment is generated according to the attitude angle error and the adjusted integral sliding mode control law.

[0030] Optionally, in some embodiments of the present application, determining the predicted attitude angle of the drone based on the historical attitude angle and historical control signal of the drone at the previous moment includes:

[0031] Determine the system dynamic model that describes the change of the attitude angle of the UAV over time;

[0032] The predicted attitude angle of the UAV is determined according to the system dynamic model, the historical attitude angle of the UAV at the last moment, and the historical control signal.

[0033] In a second aspect, an embodiment of the present application provides an adaptive flight control device, comprising:

[0034] A first determination module, configured to determine a predicted attitude angle of the UAV based on a historical attitude angle and a historical control signal of the UAV at a previous moment;

[0035] A second determination module is used to determine the covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal;

[0036] An updating module, used for acquiring a current attitude angle of the UAV, and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix;

[0037] A generating module, used for generating a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle;

[0038] The control module is used to control the current flight attitude in response to the control signal.

[0039] Correspondingly, the present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of any of the above methods when executing the program.

[0040] The present application also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements any of the above methods when the computer program is executed by a processor.

[0041] The present application provides an adaptive flight control method, device, electronic device and storage medium. After determining the predicted attitude angle of the drone based on the historical attitude angle and historical control signal of the drone at the previous moment, the covariance matrix corresponding to the current moment is determined based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal. Then, the current attitude angle of the drone is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix. Then, based on the updated attitude angle and the current attitude angle, a control signal corresponding to the current moment is generated. Finally, in response to the control signal, the current flight attitude is controlled. In the adaptive flight control scheme provided by the present application, the current attitude angle of the drone is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix. The control signal corresponding to the current moment is generated based on the updated attitude angle and the current attitude angle, thereby improving the accuracy of the attitude angle estimation. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 is a flowchart of an adaptive flight control method provided by an embodiment of the present application;

[0044] Figure 2 is a schematic diagram of the structure of an adaptive flight control device provided in an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of systems and methods consistent with the examples detailed in the attached claims, or with some aspects of the present application.

[0047] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover descriptions such as non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

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

[0049] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0050] Embodiments of the present application provide an adaptive flight control method, device, electronic device, and storage medium.

[0051] The adaptive flight control device can be deployed in a drone. A drone (UAV), also known as a remote-controlled aircraft or an unmanned aircraft system (UAS), is an aircraft that does not require a pilot to operate in the cabin. The drone can communicate with a server via wired or wireless means. The server can include an independently operated server or a distributed server, or a server cluster consisting of multiple servers. The terminal can include a mobile phone, a tablet computer or a personal computer (PC).

[0052] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.

[0053] The present application provides an adaptive flight control method, comprising: determining a predicted attitude angle of a drone based on a historical attitude angle and a historical control signal of the drone at a previous moment; determining a covariance matrix corresponding to a current moment based on a historical covariance matrix corresponding to a previous moment and a historical control matrix corresponding to a historical control signal; obtaining a current attitude angle of the drone, and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix; generating a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle; and controlling the current flight attitude in response to the control signal.

[0054] See also Figure 1 , Figure 1 : is a schematic diagram of the process of the adaptive flight control method provided by the present application, and the adaptive flight control method specifically includes the following process:

[0055] 101. Determine a predicted attitude angle of the UAV based on a historical attitude angle and a historical control signal of the UAV at a previous moment.

[0056] First, the state vector of the drone at the initial moment is required, which usually includes the attitude angle and angular velocity of the drone, etc. The historical attitude angles and historical control signals of the drone at the previous moment are collected. According to the dynamic model of the drone, the state transfer matrix Fk is constructed, which describes how the state evolves in the time interval. The historical control signal is applied to the system state transfer matrix Fk to calculate the state prediction without the influence of measurement noise and process noise. Using the state transfer matrix and the state estimate of the previous moment, the predicted state vector of the current moment is calculated. The predicted attitude angle can be obtained from the predicted state vector, which usually contains the pitch angle, roll angle and yaw angle of the drone.

[0057] In this application, the multi-sensor data is fused by the Kalman filter algorithm. Kalman filter is a recursive algorithm widely used in multi-sensor data fusion to calculate the optimal estimate of the state x. Kalman filtering can use all the information measured by the gyroscope, accelerometer and magnetometer sensors to obtain the optimal attitude estimate. The system state equation and measurement equation can be expressed as:

[0058] x k =Fx k-1 +Bu k +w k

[0059] z k =Hx k +v k

[0060] Where: x kis the system state vector at time k, F is the system state transfer matrix, u k is the control quantity, B is the gain matrix of the control quantity, z k is the system measurement vector at time k, H is the gain matrix of the system state vector to the measurement vector, w k is the system process noise, v k Measure the noise for the system.

[0061] Among them, the dynamic range of the drone's pitch angle is usually within ±90°, and there is no singularity at a pitch angle close to 90°. Therefore, the Euler angle method calculated using the gyroscope output data is used as the Kalman filter prediction information.

[0062] The inclination measurement equation of the gyroscope is expressed as:

[0063]

[0064] Where: θ k is the attitude angle, b k is the gyro constant bias, is the angular velocity output by the gyroscope, and Δt is the sensor sampling time interval.

[0065] Since the angle and angular velocity of the drone are derivative relations, the second-order equation is constructed with the drone attitude angle θ and the gyroscope constant deviation b as state variables. The system state equation of the Kalman filter can be expressed as:

[0066]

[0067] The measurement equation of the system is:

[0068]

[0069] In the formula, θ k_acc is the attitude angle calculated by the accelerometer, the formula is as follows:

[0070]

[0071] where a x ,a y ,a z are the accelerations measured by the accelerometer on the X, Y, and Z axes, respectively.

[0072] Assume that w k is the process noise, which is Gaussian distributed at time k, with a mean of zero and a covariance of Q, i.e. w k ~N(0,Q k ). Q kis the process noise covariance matrix, which in this case is the covariance matrix of the state estimate and bias of the accelerometer. Assuming the bias is independent of the accelerometer, the process noise covariance can be defined as:

[0073]

[0074] If the measurement noise is Gaussian with a mean of zero, then v k ~N(0,R k ), where R is the covariance of the measurement noise, which can be expressed as:

[0075]

[0076] If the measurement noise is assumed to be time-invariant, the covariance can be expressed as:

[0077] var (v k )=var (v)

[0078] Optionally, in some embodiments of the present application, the step of “determining the predicted attitude angle of the drone based on the historical attitude angle and historical control signal of the drone at the previous moment” may specifically include:

[0079] Determine the system dynamic model that describes the change of the attitude angle of the UAV over time;

[0080] The predicted attitude angle of the UAV is determined based on the system dynamic model, the historical attitude angle of the UAV at the previous moment, and the historical control signal.

[0081] For example, specifically, the attitude angle at the last moment, the angular velocity at the last moment and the control input are collected, and then the attitude angle and angular velocity at the current moment are calculated based on the system dynamic model, the attitude angle at the last moment, the angular velocity at the last moment and the control input.

[0082] According to the above Kalman filter algorithm, the statistical characteristics of the noise are predetermined and remain unchanged during the filtering iteration. In the actual movement process, the surrounding environment and movement state of the drone may change at any time, so the noise covariance matrix Q and R should change over time.

[0083] In some embodiments of the present application, an adaptive Kalman filter is used to estimate the attitude angle. The adaptive Kalman filter monitors the change of the innovation sequence by estimating the covariance matrix of the system and measurement noise in real time, and then adjusts the noise model in the filter.

[0084] Assuming that the system is not affected by measurement and the state is a white noise sequence, the covariance matrix can be calculated as:

[0085]

[0086] Where M is a sliding window, and its size is selected manually.

[0087] Although the covariance matrix can be used to obtain the measurement noise model more accurately, the filter may still diverge due to the system model error. The attenuation factor is introduced to attenuate the old measurement innovation, so that the external observation information can effectively constrain the system model error.

[0088] Covariance matrix P of adaptive Kalman filter with attenuation factor k∣k-1 Defined as:

[0089]

[0090] Where s is the attenuation factor, and s>1.

[0091] The Kalman gain is:

[0092]

[0093] The variance matrix of system process noise and measurement noise can be calculated as follows:

[0094]

[0095] Finally, the posterior estimated covariance can be expressed as:

[0096]

[0097] In this way, the adaptive Kalman filter can adjust its parameters in real time to adapt to changes in the environment and changes in sensor noise, thereby providing more accurate and robust pose estimates.

[0098] 102. Determine a covariance matrix corresponding to the current moment based on a historical covariance matrix corresponding to the previous moment and a historical control matrix corresponding to the historical control signal.

[0099] According to the previous error covariance matrix P k-1 , estimate the prior error covariance matrix P k∣k-1 , defined as:

[0100] P k∣k-1 =FP k-1 F T +Q

[0101] It calculates the measurement z k and The difference between:

[0102]

[0103] The covariance calculation formula is:

[0104] Sk =HP k∣k-1 H T +R

[0105] The Kalman gain is defined as:

[0106]

[0107] The estimate of the current state is defined as:

[0108]

[0109] Finally, the error covariance matrix is ​​updated as:

[0110] P k =(IK k H)P k∣k-1

[0111] Forecast error covariance matrix

[0112] P k∣k-1 =FP k-1 F T +Q

[0113] Optionally, in some embodiments of the present application, the step of “determining a covariance matrix corresponding to the current moment based on a historical covariance matrix corresponding to the previous moment and a historical control matrix corresponding to the historical control signal” may specifically include:

[0114] Obtain the historical covariance matrix corresponding to the previous moment, the historical control matrix corresponding to the historical control signal, and the state transfer matrix from the previous moment to the current moment;

[0115] Determine the process noise covariance matrix;

[0116] The covariance matrix corresponding to the current moment is determined according to the historical covariance matrix, the historical control matrix, the state transfer matrix and the process noise covariance matrix.

[0117] Obtain the historical covariance matrix corresponding to the previous moment, which represents the uncertainty of the state estimate after considering all available measurements; obtain the historical control matrix corresponding to the historical control signal, which is a matrix representation of how the control input affects the system state; obtain the state transfer matrix from the previous moment to the current moment, which describes the state transfer from the previous moment to the current moment, and determine the process noise covariance matrix, which quantifies the uncertainty in the state transfer process, such as due to external disturbances or unmodeled dynamics, and then use the state transfer matrix, historical covariance matrix, control matrix and process noise covariance matrix to predict the error covariance matrix at the current moment.

[0118] 103. Obtain the current attitude angle of the drone, and update the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix.

[0119] For example, the current attitude angle estimation is obtained using the sensors carried by the drone (such as gyroscopes, accelerometers, magnetometers, etc.). Next, the residual e between the observed current attitude angle and the attitude angle predicted by the system dynamic model is calculated, and the residual e = observed attitude angle - predicted attitude angle; then, the observation model matrix Hk is determined, which maps the state vector to the observation vector. For the attitude angle, if only the pitch angle and roll angle are observed, the expression of the observation model matrix Hk can be as follows:

[0120]

[0121] The 1s in the observation model matrix Hk correspond to the positions of the pitch and roll angles in the state vector.

[0122] Then, calculate the residual covariance matrix s k , which is the product of the observation model and prediction error covariance matrix plus the observation noise covariance matrix R, that is, S k =HP k∣k-1 H T +R, then calculate the Kalman gain K k , which is the product of the prediction error covariance matrix and the inverse of the residual covariance, where Finally, the Kalman gain and residual are used to update the predicted attitude angle.

[0123] Optionally, in some embodiments of the present application, the step of “updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix” may specifically include:

[0124] Determine the Kalman gain based on the residual between the current attitude angle and the predicted attitude angle;

[0125] The predicted attitude angle is updated based on the Kalman gain, the residual between the current attitude angle and the predicted attitude angle, and the covariance matrix.

[0126] 104. Generate a control signal corresponding to the current moment based on the updated posture angle and the current posture angle.

[0127] For example, determine the attitude angle target that the drone needs to achieve. This may be a specific flight mission or instruction. Calculate the error between the current attitude angle and the target attitude angle Error = target attitude angle - updated attitude angle; then, design a control law based on the dynamic model of the drone and the required control performance (such as stability, response speed, etc.). Common control laws include PID control, LQR (linear quadratic regulator) or more advanced nonlinear control strategies. Next, use the control law and attitude error to calculate the required control input, ensuring that the calculated control input is within the actual physical constraints of the system, such as the maximum speed or torque limit of the motor, and then generate control signals based on the calculation results, which will be sent directly to the actuators (such as motors) of the drone.

[0128] Specifically, the target attitude angle is 0°, the updated attitude angle is -2°, and the gain K of the PID control rate is determined. p =5, K I =1, K D =0.5, first, calculate the attitude angle error E between the updated attitude angle and the current attitude angle: E = 0°-(-2°) = 2°, then calculate the control input (assuming no integral and differential terms, only proportional control), v = K p xE=5x2°=10, this control input will be converted into a control signal of the motor, such as the PWM (pulse width modulation) value of the motor to adjust the attitude of the drone.

[0129] It should be noted that PID control is a control strategy widely used in the fields of industry and robotics. It uses three parts: proportional (P), integral (I), and derivative (D) to calculate the control input to reduce the deviation between the system output and the desired set point.

[0130] However, the PID control law is a linear control method, and the flight control of the UAV is often uncertain. Therefore, the present application adopts an integral sliding mode control law to generate a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle. That is, optionally, in some embodiments of the present application, the step of "generating a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle" may specifically include:

[0131] Calculate the attitude angle error between the updated attitude angle and the current attitude angle;

[0132] Obtain the preset integral sliding mode control law;

[0133] According to the attitude angle error and the integral sliding mode control law, the control signal corresponding to the current moment is generated.

[0134] Integral Sliding Mode Control (ISMC) is a nonlinear control strategy. It is a variant of Sliding Mode Control (SMC) and solves the steady-state error problem of the system by introducing an integral term. ISMC combines the robustness of sliding mode control and the accuracy of integral control, and is particularly suitable for systems with uncertainties and strong nonlinearities. The sliding surface is a boundary of the system state. The sliding surface is designed so that the system state can slide along it after reaching this boundary, thereby achieving the control target. The integral term is introduced in the design of the sliding surface to ensure the elimination of the steady-state error, even if the system has internal uncertainties and external disturbances. ISMC usually consists of two parts: one is a continuous control law, and the other is a switching control law, which is activated when the system state reaches the sliding surface.

[0135] For example, the target attitude angle is 0°, the updated attitude angle is -2°, the sliding surface parameter a=0.5, and the control gain k p =2, k d =1, first, calculate the attitude angle error E between the updated attitude angle and the current attitude angle: E=0°-(-2°)=2°, then calculate the sliding membrane surface s=Exa=2°x0.5=1, and then calculate the integral term, which can be approximated by the rate of change of the error, wherein the rate of change of the error, that is, the error derivative, reflects the change of the error over time. The rate of change of the approximate error is not the focus of this application, and the existing method can be used to solve it. For the sake of ease of description, in the embodiment of this application, the integral term is replaced by J, that is, the control signal u=-k is generated according to ISMC p sk d j=-2x(2°x0.5xaccumulated error)-1xJ, converting u into a specific signal suitable for the drone control system, such as the PWM value of the motor.

[0136] When an actuator fault is detected, the control system needs to be able to adapt to this situation and reconfigure to maintain system performance. The following are the steps to handle actuator faults, adjust the control law, and generate the corresponding control signals:

[0137] 1. Detect and identify fault signals

[0138] Faults are detected by monitoring the performance parameters of the actuator (such as the motor's response time, output torque, current, etc.).

[0139] Once an anomaly is detected, the system needs to diagnose the type of fault (such as complete failure, performance degradation, etc.) and the extent.

[0140] 2. Adjust the integral sliding mode control law according to the fault signal

[0141] Fault identification: Determining the type and scope of a fault, such as through a fault detection and diagnostics system (FDD).

[0142] Control law adjustment: Adjust the control law parameters according to the type and severity of the fault. For example, if a motor fails, the control gain of other normally working motors may need to be increased to compensate for the missing torque of the failed motor.

[0143] Redistribute control inputs: Adjust the control inputs to the individual actuators to ensure that overall the control objective can still be achieved.

[0144] 3. Generate the control signal corresponding to the current moment

[0145] Calculate attitude angle error: Determine the difference between the desired attitude angle and the current attitude angle.

[0146] Use the adjusted control law: Calculate the new control input based on the attitude angle error and the adjusted integral sliding mode control law.

[0147] Apply control signals: Send the calculated control signals to the actuators to adjust the attitude of the drone.

[0148] For example, in the attitude control system of a quadcopter drone, a motor fails due to a fault as follows: . Here is an example of handling this situation:

[0149] It is detected that the current of motor A is lower than the normal operating range and is determined to be a failure. Since motor A fails, the control law is adjusted to increase the output of motors B, C, and D to compensate for the missing torque of motor A. The control gain in the integral sliding mode control law is adjusted. For example, if motors A and B are motors on the diagonal, the gain of motor B may need to be doubled. First, the attitude angle error is calculated, and then the sliding film surface and its derivative are calculated. The new control input is calculated using the adjusted control law, and the new control signal is applied to each motor of the drone to ensure that the drone can maintain a stable attitude even when motor A fails.

[0150] 105. In response to the control signal, control the current flight attitude.

[0151] Based on the current attitude angle of the drone, the desired attitude angle, sensor data, and flight environment, a control signal is generated using an appropriate control algorithm (such as PID control, integral sliding mode control, etc.). The generated control signal is parsed into specific instructions for each actuator (such as a motor) of the drone. For example, in a quad-rotor drone, the control signal will determine the speed of each motor.

[0152] According to the control signal, the input power of each motor is adjusted to change the motor speed. The change of motor speed will directly affect the attitude of the drone.

[0153] The drone's flight controller receives the control signal and converts it into control instructions for the actuators to achieve the following attitude adjustments:

[0154] Pitch: Tilt forward and backward, achieved by the pitch control torque of the drone.

[0155] Roll: Tilt left and right, achieved by the drone’s roll control torque.

[0156] Yaw: Rotation around the vertical axis, achieved by differential control of the motor at the tail of the drone.

[0157] The drone's attitude sensors (such as gyroscopes, accelerometers, etc.) monitor the current attitude in real time and provide feedback to the flight controller.

[0158] The flight controller continuously adjusts the control signal according to the attitude error and control algorithm to form a closed-loop control to ensure that the drone is stable in the desired attitude. During the execution process, the system needs to detect the status of the actuator (such as the motor) in real time, and immediately start the fault-tolerant control strategy once a fault is detected. According to the type of fault, adjust the control signal or redistribute the control load to ensure that the drone can maintain stable flight even if some actuators fail. According to the flight status of the drone and changes in the external environment, dynamically adjust the control parameters to optimize the control performance. Use adaptive control or intelligent control algorithms to improve the adaptability of drones to complex environments.

[0159] For example, the current attitude angle of the drone is estimated by the adaptive Kalman filter, and the integral sliding mode control law is used to generate a control signal based on the attitude error and the output of the adaptive Kalman filter. The control signal is converted into a specific control instruction for each motor. For example, if the pitch angle needs to be increased, the speed of the first two motors may need to be increased and the speed of the last two motors may need to be reduced. The motor adjusts the speed according to the control instruction to change the attitude of the drone. The attitude sensor of the drone monitors the attitude changes in real time and feeds the data back to the flight controller, which adjusts the control signal based on the feedback information. If the system detects that a motor fails, the flight controller will adjust the control signal of other motors to keep the drone in stable flight. Through this series of steps, the drone can respond to the control signal, adjust the flight attitude in real time, and achieve precise flight control.

[0160] As can be seen from the above, the embodiment of the present application provides an adaptive flight control method. After determining the predicted attitude angle of the drone based on the historical attitude angle and historical control signal of the drone at the previous moment, the covariance matrix corresponding to the current moment is determined based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal. Then, the current attitude angle of the drone is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix. Then, based on the updated attitude angle and the current attitude angle, the control signal corresponding to the current moment is generated. Finally, in response to the control signal, the current flight attitude is controlled. In the adaptive flight control scheme provided by the present application, the current attitude angle of the drone is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix. The control signal corresponding to the current moment is generated based on the updated attitude angle and the current attitude angle, thereby improving the accuracy of the attitude angle estimation.

[0161] In order to better implement the adaptive flight control method of the embodiment of the present application, the embodiment of the present application also provides an adaptive flight control device, wherein the meanings of the terms are the same as those in the above-mentioned adaptive flight control system, and the specific implementation details can refer to the description in the system embodiment.

[0162] See also Figure 2 , Figure 2 A schematic diagram of the structure of an adaptive flight control device provided in an embodiment of the present application, wherein the adaptive flight control device may specifically include a first determination module 201, a second determination module 202, an update module 203, a generation module 204 and a control module 205, which may be specifically as follows:

[0163] The first determination module 201 is used to determine the predicted attitude angle of the UAV based on the historical attitude angle and historical control signal of the UAV at the last moment.

[0164] The second determination module 202 is used to determine the covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal.

[0165] The updating module 203 is used to obtain the current attitude angle of the UAV and update the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix.

[0166] The generating module 204 is used to generate a control signal corresponding to the current moment based on the updated posture angle and the current posture angle.

[0167] The control module 205 is used to control the current flight attitude in response to the control signal.

[0168] The embodiment of the present application provides an adaptive flight control device, wherein the first determination module 201 determines the predicted attitude angle of the drone based on the historical attitude angle and the historical control signal of the drone at the previous moment, and the second determination module 202 determines the covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal, then the update module 203 obtains the current attitude angle of the drone, and updates the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix, and then the generation module 204 generates the control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle, and finally, the control module 205 controls the current flight attitude in response to the control signal. In the adaptive flight control scheme provided by the present application, the current attitude angle of the drone is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix, and the control signal corresponding to the current moment is generated based on the updated attitude angle and the current attitude angle, thereby improving the accuracy of the attitude angle estimation.

[0169] In addition, the present application also provides an electronic device, such as Figure 3 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0170] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Figure 3 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0171] The processor 301 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.

[0172] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and adaptive flight control methods by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0173] The electronic device also includes a power supply 303 for supplying power to each component. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 303 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0174] The electronic device may further include an input unit 304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0175] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application programs stored in the memory 302, thereby realizing various functions, as follows:

[0176] Based on the historical attitude angle and historical control signal of the UAV at the previous moment, the predicted attitude angle of the UAV is determined; based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal, the covariance matrix corresponding to the current moment is determined; the current attitude angle of the UAV is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix; based on the updated attitude angle and the current attitude angle, the control signal corresponding to the current moment is generated; in response to the control signal, the current flight attitude is controlled.

[0177] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0178] In the embodiment of the present application, after determining the predicted attitude angle of the drone based on the historical attitude angle and historical control signal of the drone at the previous moment, the covariance matrix corresponding to the current moment is determined based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal. Then, the current attitude angle of the drone is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix. Then, based on the updated attitude angle and the current attitude angle, the control signal corresponding to the current moment is generated. Finally, in response to the control signal, the current flight attitude is controlled. In the adaptive flight control scheme provided by the present application, the current attitude angle of the drone is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix. The control signal corresponding to the current moment is generated based on the updated attitude angle and the current attitude angle, thereby improving the accuracy of the attitude angle estimation.

[0179] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0180] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the adaptive flight control methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0181] Based on the historical attitude angle and historical control signal of the UAV at the previous moment, the predicted attitude angle of the UAV is determined; based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal, the covariance matrix corresponding to the current moment is determined; the current attitude angle of the UAV is obtained, and the predicted attitude angle is updated according to the current attitude angle, the predicted attitude angle and the covariance matrix; based on the updated attitude angle and the current attitude angle, the control signal corresponding to the current moment is generated; in response to the control signal, the current flight attitude is controlled.

[0182] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0183] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0184] Since the instructions stored in the storage medium can execute the steps in any one of the adaptive flight control methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the adaptive flight control methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0185] The above is a detailed introduction to an adaptive flight control method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An adaptive flight control method, characterized in that: include: Determine the predicted attitude angle of the UAV based on the historical attitude angle and historical control signal of the UAV at the previous moment; Determine a covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal; Obtaining a current attitude angle of the drone, and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle, and the covariance matrix; Based on the updated attitude angle and the current attitude angle, generating a control signal corresponding to the current moment; In response to the control signal, the current flight attitude is controlled.

2. The adaptive flight control method according to claim 1, characterized in that: The determining the covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal includes: Obtaining a historical covariance matrix corresponding to the previous moment, a historical control matrix corresponding to the historical control signal, and a state transfer matrix from the previous moment to the current moment; Determine the process noise covariance matrix; The covariance matrix corresponding to the current moment is determined according to the historical covariance matrix, the historical control matrix, the state transfer matrix and the process noise covariance matrix.

3. The adaptive flight control method according to claim 1, characterized in that: The obtaining of the current attitude angle of the drone and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix include: Acquiring sensor data of the drone; Fusing the sensor data and solving the fused data to obtain the current attitude angle of the UAV; Calculating the residual between the current attitude angle and the predicted attitude angle; The predicted attitude angle is updated according to the residual and the covariance matrix between the current attitude angle and the predicted attitude angle.

4. The adaptive flight control method according to claim 3, characterized in that: The updating of the predicted attitude angle according to the residual and the covariance matrix between the current attitude angle and the predicted attitude angle comprises: Determining a Kalman gain according to a residual between the current attitude angle and the predicted attitude angle; The predicted attitude angle is updated based on the Kalman gain, the residual between the current attitude angle and the predicted attitude angle, and the covariance matrix.

5. The adaptive flight control method according to claim 1, characterized in that: The step of generating a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle comprises: Calculating an attitude angle error between the updated attitude angle and the current attitude angle; Obtain the preset integral sliding mode control law; According to the attitude angle error and the integral sliding mode control law, a control signal corresponding to the current moment is generated.

6. The adaptive flight control method according to claim 5, characterized in that: The step of generating a control signal corresponding to the current moment according to the attitude angle error and the integral sliding mode control law comprises: When a fault is detected in the actuator, the current fault signal is determined; adjusting the integral sliding mode control law according to the fault signal; A control signal corresponding to the current moment is generated according to the attitude angle error and the adjusted integral sliding mode control law.

7. The adaptive flight control method according to any one of claims 1 to 6, characterized in that: The step of determining the predicted attitude angle of the UAV based on the historical attitude angle and the historical control signal of the UAV at the previous moment includes: Determine the system dynamic model that describes the change of the attitude angle of the UAV over time; The predicted attitude angle of the UAV is determined according to the system dynamic model, the historical attitude angle of the UAV at the last moment, and the historical control signal.

8. An adaptive flight control device, characterized in that: include: A first determination module, configured to determine a predicted attitude angle of the UAV based on a historical attitude angle and a historical control signal of the UAV at a previous moment; A second determination module is used to determine the covariance matrix corresponding to the current moment based on the historical covariance matrix corresponding to the previous moment and the historical control matrix corresponding to the historical control signal; An updating module, used for acquiring a current attitude angle of the UAV, and updating the predicted attitude angle according to the current attitude angle, the predicted attitude angle and the covariance matrix; A generating module, used for generating a control signal corresponding to the current moment based on the updated attitude angle and the current attitude angle; The control module is used to control the current flight attitude in response to the control signal.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the adaptive flight control method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the adaptive flight control method according to any one of claims 1 to 7.