Dynamic compensation and control method for quadrotor drone faults based on deep learning
Through the fault dynamic compensation and control method based on deep learning, a deep neural network model is constructed that is independent of the motor fault state, identifies and adapts to faults in real time, and dynamically updates control parameters, solving the problem of poor flight stability of quad-rotor drones when motor faults occur. problem, achieving efficient fault response and improving control accuracy.
Patent Information
- Application Number
- CN202410903803.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-08
AI Technical Summary
It is difficult for quadcopter drones to maintain flight stability when motors fail. Traditional control methods perform poorly when dealing with nonlinear dynamic changes and complex environments, resulting in control delays or system crashes.
Using the fault dynamic compensation and control method based on deep learning, through data collection, preprocessing, building dynamics models and deep learning models, introducing discriminators and adversarial training mechanisms, building a deep neural network model that has nothing to do with the motor fault state, and identifying it in real time It also adapts to faults and dynamically updates control parameters to maintain flight stability.
It improves the flight stability and control accuracy of the quad-rotor UAV under fault conditions, enhances the generalization ability and robustness of the model, overcomes the limitations of traditional methods in processing noise and inconsistent data, and achieves online adaptation and self-control. Optimized, significantly improving control flexibility and long-term reliability.
Smart Images

Figure CN118444698B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of quad-rotor unmanned aerial vehicle control, and in particular to a quad-rotor unmanned aerial vehicle fault dynamic compensation and control method based on deep learning. Background Art
[0002] In many modern fields, quad-rotor drones are widely used due to their flexibility, stability and applicability in various environments, especially in terrain exploration, agricultural monitoring, logistics distribution, disaster relief and other fields. With the expansion of the scope of application, higher requirements are placed on the flight control of quad-rotor drones in complex environments and extreme conditions, especially when the motor encounters unforeseen failures. How to ensure that the drone can fly safely and complete the mission has become a key issue that needs to be solved urgently.
[0003] Traditional quadcopter control strategies are mainly based on classical control theory. For example, the PD (Proportion Differentiation) control method relies on accurate model parameters and good system identification, but its control performance often decreases significantly when facing hardware failures, external disturbances or environmental changes. When a single motor fails or multiple motors fail, the aircraft spins, loses stability, or even loses control completely. For another example, although MPC (Model Predictive Control) is a control strategy that can provide foresight and strong adaptability, its limitations are particularly prominent in the case of motor failure. Motor failure will introduce unexpected dynamic changes, such as thrust asymmetry and speed fluctuations, which are often difficult to be accurately captured by the preset model of MPC. The nonlinear increase and uncertainty of motor behavior in the fault state lead to inaccurate predictions based on the normal working model, reducing the accuracy of control. When a motor fails, the system may need more frequent control adjustments to maintain flight stability, which increases the demand for MPC real-time calculations. However, the embedded computing platform carried by the quadrotor drone is relatively limited in processing power and memory. The complex MPC algorithm may exceed the hardware limit under high computing load, resulting in control delays or even system crashes.
[0004] In recent years, with the advancement of deep learning technology, there are many advantages in the control of quad-rotor drones. First of all, the dynamic model of quad-rotor drones has highly nonlinear characteristics, and traditional control methods cannot solve such problems. Deep learning, especially DNN (Deep Neural Networks), can learn to capture this nonlinear relationship to improve the stability and dynamic performance of flight. Drones can learn online and adapt to different flight environments and deal with some fault conditions, such as motor failure. The system can adjust the control strategy based on real-time feedback, which greatly improves its robustness and adaptability under position and changing conditions. At the same time, quad-rotor drone control involves multiple input and output variables, such as attitude angle, position, speed, acceleration, etc. Traditional control methods are more difficult to deal with complex coupling relationships between multiple variables, while the model generated by deep learning can process multiple input signals at the same time, automatically extract features and perform comprehensive optimization. Under the framework of deep learning, the control model of the drone will be continuously optimized through continuous learning, and the model parameters will be adjusted based on new data, so that the model will continue to evolve and improve the control performance.
[0005] Therefore, it is of great significance to develop a deep learning-based quadcopter control algorithm that can identify and adapt to various possible fault conditions in real time, enable the drone to make rapid adjustments when encountering a fault, and ensure that the drone can maintain stable flight, which can greatly improve the reliability of the drone system. Summary of the invention
[0006] The problem to be solved by the present invention is to provide a deep learning-based dynamic compensation and control method for quadrotor UAV faults, aiming to solve the adaptive control of motor faults during the flight of the quadrotor UAV system and ensure the flight stability of the quadrotor UAV.
[0007] The present invention adopts the following technical solution: a method for dynamic compensation and control of a quad-rotor drone fault based on deep learning, comprising the following steps:
[0008] S1. Data collection: simulate the situation where the motors in different parts of the quadrotor drone fail, and collect the flight status data of the quadrotor drone under each motor failure state;
[0009] S2. Data preprocessing: clean and standardize the collected flight status data;
[0010] S3. Build dynamic model and integrate flight data set: Based on the preprocessed flight state data, the dynamic equation of the quadrotor UAV is obtained by combining the system dynamic equation to represent the real dynamic behavior of the quadrotor UAV;
[0011] S4. Build a deep learning model: Through the deep learning algorithm, a deep neural network model that is independent of the motor fault state is obtained; introduce a discriminator to build the objective function, and optimize the objective function through an adversarial meta-learning framework;
[0012] S5. Perform iterative optimization of the deep learning model: including adaptation step, training step, and regularization step;
[0013] S6, online adaptation stage: When the quadrotor drone is flying along the set trajectory and a motor failure is detected, a hybrid control strategy is used to dynamically update the control parameters and calculate the control output to ensure flight stability and accuracy.
[0014] Specifically, step S1 simulates motor failures in different parts of the quadrotor drone, uses a passive fault-tolerant controller to track the flight state of the quadrotor drone along a random trajectory under each motor failure state, and collects flight state data;
[0015] The random trajectory includes several segments of polynomial trajectories, each of which starts at the current position and ends at the target position. The speed, acceleration and jerk of the spline are limited to 0 at the start and end points. After the quadcopter reaches the end of the spline, a new polynomial trajectory is generated, and the training is repeated to obtain flight status data.
[0016] The flight status data includes: the quadcopter's position, speed, flight attitude, angular velocity, acceleration, motor speed PWM command, and calculated fault compensation force.
[0017] Specifically, the data preprocessing in step S2 includes the following sub-steps:
[0018] S2.1. Supplement missing values in flight status data and perform outlier detection; find missing values through SPSS missing value analysis method, fill missing values through mean filling method, find outliers through box plot analysis method, delete outliers or replace them with the average value of adjacent points;
[0019] S2.2. Feature selection and construction of flight status data, selecting key features of flight control and fault analysis, taking fault compensation force as target label, taking position, speed, flight attitude angle and attitude angle change rate, angular velocity, acceleration as input features, and reducing the dimension of flight status data;
[0020] S2.3. Standardize the flight status data to eliminate the dimension and scale differences between different features.
[0021] Specifically, in step S3, a dynamic model is constructed based on the preprocessed flight state data, including the following sub-steps:
[0022] S3.1, integrating the flight status data on each polynomial trajectory into a data format with a timestamp;
[0023] S3.2, introduce the system dynamics model equation;
[0024] S3.3, bring the data with timestamps into the system dynamics model equation to obtain the dynamics equation representing the real dynamics behavior of the quadrotor drone;
[0025] S3.4. Integrate the dynamic equations obtained from each polynomial trajectory to construct the flight data set D.
[0026] Specifically, step S4 constructs a deep learning model based on the integrated flight data set, including the following sub-steps:
[0027] S4.1. Construct a deep neural network model with aircraft status information as input and a fault compensation force as output to capture the dynamic characteristics related to motor faults and be invariant to motor fault states;
[0028] S4.2, introduce the discriminator, define the objective function, and distinguish the representations under different fault states;
[0029] S4.3. Construct an adversarial meta-learning framework and optimize the objective function: Through the adversarial training mechanism, the ability of the deep neural network model to learn fault-invariant representation is enhanced, and feature representations that the discriminator cannot distinguish are generated.
[0030] Specifically, in step S5, a data set is randomly selected from a flight data set containing a plurality of data subsets of different fault state conditions, and two mutually exclusive batches are randomly selected therefrom as an adaptation set and a training set for solving the least squares problem and iterative optimization of the deep learning model, specifically including the following sub-steps;
[0031] S5.1, Adaptation step: In the meta-learning stage, by minimizing the loss function on the adaptation set, the optimal linear coefficients under each fault state are found, and the UAV control parameters are adjusted when different faults occur to maintain the flight control accuracy;
[0032] S5.2, training step: Based on the meta-learning framework constructed in step S4.3.1, back-propagation is used to update the parameters of the deep neural network model on the training set to capture the commonalities between fault states;
[0033] S5.3, Regularization step: Train the discriminator so that the parameter representation learned by the deep neural network model is invariant to the motor fault state, thereby improving the generalization ability and robustness of the deep neural network model between different fault states.
[0034] S5.4. Repeat steps S5.1 to S5.3 for iterative optimization until the model performance meets the preset requirements.
[0035] Specifically, in step S6, during the flight of the quadrotor drone, when a motor failure is detected, the control parameters are dynamically updated through a hybrid control strategy according to the Kalman filter-inspired adaptive update law.
[0036] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0037] 1. The dynamic compensation and control method for quad-rotor UAV faults of the present invention utilizes deep learning in fault identification and compensation adaptive control. By constructing a deep neural network that is independent of the motor fault state, it learns and expresses the fault compensation force, captures the nonlinear characteristics of the quad-rotor UAV dynamics, identifies and adapts to motor faults in real time, and maintains the flight stability of the UAV even in a fault state.
[0038] 2. The quadrotor UAV fault dynamic compensation and control method of the present invention strengthens the ability of the DNN model to learn fault invariant representations by introducing a discriminator network and adversarial training mechanism, making it difficult to distinguish the representations generated by the model under different fault states, thereby enhancing the generalization ability and robustness of the model.
[0039] 3. The quad-rotor UAV fault dynamic compensation and control method of the present invention performs strict data preprocessing after data collection, including missing value supplementation, outlier processing, feature selection, standardization, etc., which effectively improves the accuracy and efficiency of model training and overcomes the limitations of traditional methods in dealing with noise and inconsistent data. At the same time, the model is trained using a limited flight data set, and the model performance is continuously improved through iterative optimization (adaptation step, training step, regularization step). The control strategy is adjusted according to the real-time flight status and fault conditions, thereby improving the adaptability and control accuracy in complex environments.
[0040] 4. The method for dynamic fault compensation and control of a quad-rotor UAV of the present invention uses an online adaptive mode. When a motor fault is detected during flight, the control output can be dynamically adjusted based on the current state and the pre-learned model to ensure flight stability and accuracy. This is a significant improvement in real-time performance over traditional offline training models. At the same time, continuous learning is performed during flight, and model parameters are adjusted based on new data. Through self-evolution, the control strategy can be optimized over time and environmental changes, thereby improving the flexibility and long-term reliability of control. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of the dynamic compensation and control method for faults of a quad-rotor drone of the present invention;
[0042] Figure 2 This is a motor serial number diagram of the quad-rotor drone of the present invention;
[0043] Figure 3 A flowchart of data processing of the present invention;
[0044] Figure 4 Flow chart of offline model building of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the application is further elaborated in detail below in conjunction with the accompanying drawings. The described embodiments are only a part of the embodiments involved in the present invention. All non-innovative embodiments of other researchers in the field on this embodiment belong to the protection scope of the present invention. At the same time, for the step numbering in the embodiment of the present invention, it is only set for the convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0046] The present invention is a method for dynamic fault compensation and adaptive control of a quad-rotor UAV based on deep learning, which aims to improve the stability and reliability of the UAV when the motor fails, enhance its ability to cope with failures, and continuously learn during flight to continuously improve the accuracy of the model. Figure 1 As shown, the following steps are included:
[0047] S1. Data collection: In an indoor laboratory, simulate the failure of motors in different parts of the quadrotor drone and collect the flight status data of the quadrotor drone under each motor failure state;
[0048] S2. Data preprocessing: Clean and standardize the collected flight status data to prepare data for the deep learning model;
[0049] S3. Build dynamic model and integrate flight data set: Based on the preprocessed flight state data, the dynamic equation of the quadrotor UAV is obtained by combining the system dynamic equation to represent the real dynamic behavior of the quadrotor UAV;
[0050] S4. Build a deep learning model: Through the deep learning algorithm, use the limited flight data set to learn a deep neural network representation that is independent of the motor fault state, and obtain a DNN that is independent of the motor fault state; this DNN is trained into a basic function set ; Introduce the discriminator h, construct the objective function, use the gradient descent method to learn, use it to represent the relationship between the robot state and dynamics, and optimize the objective function through an adversarial meta-learning framework;
[0051] S5. Iterate the optimization of deep learning models: including adaptation, training, and regularization steps. Perform iterative optimization;
[0052] S6, online adaptation stage: When the quadcopter is flying along the set trajectory and a motor failure is detected, the quadcopter will automatically adapt to the current state and the pre-learned , through hybrid control strategy, dynamically update control parameters, calculate control output, and ensure flight stability and flight accuracy.
[0053] In one embodiment of the present invention, the method for dynamic compensation and adaptive control of a quadrotor drone fault is as follows:
[0054] Step S1, data collection:
[0055] During the data collection stage, it is very important to ensure the controllability of the environment. In order to eliminate the impact of environmental disturbances such as wind disturbances, temperature fluctuations, light exposure, etc. on the flight performance of the quadcopter, an indoor laboratory is selected as the experimental site in this embodiment. This environment can provide a highly stable and repeatable testing condition. In this controlled environment, the flight conditions of the drone with different motor failures are simulated.
[0056] In this embodiment, the motor serial number of the drone is first defined, such as Figure 2 As shown, the motor on the front right of the quadcopter is motor 1, and the motors in clockwise order are motors 2, 3, and 4.
[0057] In order to obtain training data to learn the deep neural network DNN, the motor failure conditions of the drone are divided into three types:
[0058] The first method is to make the motors 1 to 4 of the quadcopter stand still respectively, simulating the situation where one motor fails;
[0059] The second method is to randomly select two motors 1 to 4 of the quadcopter and keep them stationary to simulate the situation where two motors fail;
[0060] The third method is to randomly select three motors 1 to 4 of the quadrotor drone and keep them stationary to simulate the situation where three motors fail.
[0061] Next, let the UAV use the passive fault-tolerant controller to track random trajectories under these three fault conditions for 3 minutes each time. Collect their positions, velocities, attitude angles, and motor speed PWM commands respectively. The set of k such input-output pairs is called dataset D. The different motor fault conditions are x, and the dataset consists of 14 sub-datasets.
[0062] The random trajectory of a quadrotor drone is a polynomial trajectory. Each polynomial trajectory consists of two waypoints, namely the current position and the target position. The speed, acceleration and jerk of the spline at the start and end waypoints are limited to 0. Once the drone reaches the end of a spline, a new polynomial trajectory is generated, and this operation is repeated during the flight to obtain a large amount of training data.
[0063] S2, data preprocessing, such as Figure 3 As shown, the method is as follows:
[0064] First, the missing values of the original data are processed. In a large amount of flight data, missing values cannot be found, so the missing value analysis function of SPSS is used to analyze the variables to find out the distribution of missing values. If there are missing values, the mean filling strategy is adopted, that is, the following formula is used to calculate the mean of the surrounding 4 values to fill the missing values:
[0065] ;
[0066] Then, outlier processing is performed.
[0067] First, outliers were identified and box plot analysis (IQR method) was used, which showed the data distribution by drawing a five-number summary of the data (minimum value, lower quartile Q1, median, upper quartile Q3, and maximum value).
[0068] In this embodiment, an outlier is defined as a data point that is less than Q1 minus 1.5 times the IQR (interquartile range, i.e., Q3-Q1) or greater than Q3 plus 1.5 times the IQR, using the following formula:
[0069] ;
[0070] Among them, MAX is the upper limit of the outlier value, and MIN is the lower limit of the outlier value;
[0071] Then, the identified outliers are replaced with the mean or deleted directly.
[0072] Next, feature selection and construction of the data are performed. According to the constructed dynamic model, the most critical variables are identified from the raw data, namely, flight state features such as attitude angles (pitch, roll, yaw), position, velocity, acceleration, and motor control-related variables (such as motor speed PWM commands) are selected as input features.
[0073] Finally, the data is standardized to eliminate the differences in dimensions and scales between different features and ensure that all features are on the same scale, which is especially important for the following deep learning model based on gradient descent.
[0074] For each eigenvalue, the following formula is used:
[0075] ;
[0076] in, is the value after standardization, is the original value, It is a feature The average value of It is a feature After standardization, the mean of all features becomes 0 and the standard deviation becomes 1, which makes the weight distribution of each feature in the model training process more fair and avoids the deviation caused by different feature scales.
[0077] S3. Build a dynamic model and integrate it into a data set:
[0078] Based on the data preprocessed in step S2, a timestamp is generated, which is shown as follows:
[0079] ;
[0080] Among them, q describes the position and attitude of the drone, are the speed and angular velocity of the quadrotor drone, Describes the acceleration and angular acceleration of the quadcopter, and u represents the total thrust and torque generated by the motor, as follows:
[0081] ;
[0082] Where T is the total thrust generated by the motor, They are the torques in roll, pitch and yaw directions respectively.
[0083] The system dynamics model equation is introduced, which is the basic equation to describe the dynamic behavior of general robots or aircraft:
[0084] ;
[0085] Where M(q) is the mass inertia matrix of the system, is the Coriolis and centrifugal force matrix, which describes the inertial force due to motion, g is the acceleration due to gravity, and f represents an equation related to the dynamic behavior of the system;
[0086] The sorted Substitute it into the system dynamics model equation and get f. Since f here has sensor noise and numerical errors, f is also an equation with noise. The dynamics equation of the drone is expressed as follows:
[0087] ;
[0088] Among them, z is a two-dimensional vector group , It's noise interference.
[0089] Finally, the dynamic equations obtained from each polynomial trajectory are integrated to construct the flight data set D:
[0090] ;
[0091] in, It represents the state quantity at different timestamps , Refers to the specific motor fault conditions, which are used to reflect how different fault conditions affect the disturbance force. is the output variable, which represents the noisy estimate of the force.
[0092] S4. Build a deep learning model:
[0093] In this process, we hope to find a function that represents the best result by minimizing the objective function error of the data points under different motor fault conditions. and a set of latent variables related to the motor fault condition , so that for any motor fault condition, It can approximate the real dynamic model very well .
[0094] Here is a function that maps a 2n-dimensional state vector to an n×h-dimensional space, and are the linear coefficients of the h dimension and are independent of each other.
[0095] First, construct the prediction error function
[0096] ;
[0097] in, It maps a 2n-dimensional input space to an n*h-dimensional feature space, where the h-dimensional vector is a linear coefficient related to the motor fault condition, which is used to adjust The extracted features, is the dynamic equation of the quadrotor drone obtained in step S3, It means .
[0098] Next, we solve the minimum value of the prediction error function to find the optimal representation function and the set of hidden variables related to the motor fault condition .
[0099] It is necessary to pay special attention to is a common feature in all motor fault conditions, and the linear coefficient These are the characteristics of different motor failure conditions;
[0100] Then, define a loss function. The loss function used by the discriminator h is the cross entropy loss. The formula is as follows:
[0101] ;
[0102] in, is an indicator function, if If yes, it is 1, otherwise it is 0. It represents the probability of the discriminator predicting the i-th fault, is the cross entropy loss.
[0103] After initialization, the inherent state variable z changes with the fault state, which brings challenges to deep learning. The distribution of z under different state conditions may be memorized, so that the difference in the set of dynamic changes is reflected in the distribution of rather than directly in the set of fault states x.
[0104] The optimization process may lead to overfitting, so it is necessary to build an adversarial meta-learning framework to optimize the target formula. The function is as follows:
[0105] ;
[0106] Among them, h is the discriminator and α is the regularization hyperparameter.
[0107] Next, the inner layer is minimized to minimize the prediction error, that is, the true output of the flight state With through After mapping, multiply by the corresponding linear coefficient The difference between the predicted outputs obtained. This ensures that It can effectively learn the mapping relationship from flight status to required output.
[0108] Then the outer layer is maximized, the goal is to maximize the performance of the discriminator h, that is, to enable h to accurately predict the motor fault category k corresponding to the current flight state.
[0109] S5. Iterative optimization:
[0110] In this process, Figure 4 As shown in FIG, the model parameters are optimized through three steps: adaptation step, training step and regularization step to achieve the purpose of rapid adaptation and precise control.
[0111] First, an adaptation step is performed to find an optimal set of linear coefficients by minimizing the squared error on the adaptation set. At the beginning of each iteration, a dataset containing a subset of data with different fault state conditions is first Randomly extract a data set from , then from Two mutually exclusive batches are randomly selected from the training set A and the adaptation set B.
[0112] The adaptation set A is used to solve the least squares problem to find a set of optimal linear coefficients , satisfying the following formula:
[0113] ;
[0114] Next, the training step is performed to improve the generalization ability of the model and make the learned representation It is possible to extract general features that are not related to motor failure. By using SGD to update , that is, using the meta-learning framework constructed in step S4 and combining it with the regularization term to counter the classification ability of the discriminator h, Learn feature representations that are more robust and invariant across motor fault conditions.
[0115] Then, a regularization step is performed by updating the discriminator h with a certain probability In each iteration, it is decided whether to update the discriminator h. If it is decided to update, SGD is also used to optimize it on the training set B, with the aim of improving its accuracy in fault classification.
[0116] The loss function focuses only on the classification performance of the discriminator:
[0117] ;
[0118] in, is the cross entropy loss, which measures the degree of inconsistency between the fault condition label k predicted by the discriminator h and the actual fault condition label.
[0119] In this way, the model's performance in distinguishing different fault conditions can be strengthened, further promoting Learn more denoised and abstract features, which increases the model's ability to distinguish.
[0120] Finally, the above three steps are continuously performed for iterative optimization to enhance the performance of the model;
[0121] S6, online adaptation stage:
[0122] Through the previous steps, a set of parameters a has been obtained using least squares fitting to minimize the force prediction error of each data batch. In the online adaptation stage, it is necessary to minimize the position tracking error. The use of an adaptive law based on the Kalman filter allows the controller to quickly estimate parameters with large uncertainties and further upgrade it to a composite adaptive law, that is, the parameter update depends not only on the prediction error in the dynamic model, but also on the tracking error.
[0123] First, a hybrid control strategy is proposed, which consists of three parts: one is based on the system's dynamic model, one is the proportional differential feedback term, and the other is the feedforward term based on deep learning. The formula is as follows:
[0124] ;
[0125] where x is the different fault conditions, is a feedforward term based on deep learning, is the linear parameter estimated in the adaptive control stage and used to adjust the system in real time; is the feedback item, is the proportionality coefficient, is the differential coefficient, is the difference between the target state and the current state. It is the differential of the difference between the target state and the current state.
[0126] Through the adaptive update law, the prediction error and tracking error are integrated, and the regularization term is added. The formula is as follows:
[0127] ;
[0128] in, It is used to avoid overfitting. A is the covariance matrix, which is used to guide the direction and rate of parameter update. B is the covariance of measurement noise and process noise. y is the actual measurement value including noise. e is the tracking error. is the derivative of the linear parameter estimate, and the superscript T indicates the transpose.
[0129] At the same time, the covariance matrix A must also be updated dynamically with the system, the formula is as follows:
[0130] ;
[0131] Where Q is the covariance matrix of the process noise, is the differential of A. This process achieves efficient and real-time adjustment of control parameters through the adaptive update law of the Kalman filter concept.
[0132] Furthermore, simulation tests are conducted to locate and map the quadcopter through Fast_lio, collect drone data, and accurately locate the drone when it rotates at high speed. Then, when the drone rotates at high speed, the quadcopter fault dynamic compensation and adaptive control method of this embodiment is used. The aircraft can fly back to the origin at high speed and follow a general trajectory.
[0133] In summary, the present invention proposes an innovative deep learning-based dynamic compensation and adaptive control method for quadrotor drone faults, which aims to improve the drone's stable flight and mission execution capabilities under motor failure conditions. This method achieves efficient control and fault response of quadrotor drones through a carefully designed technical process.
[0134] The core of this invention is to use deep learning technology to learn and simulate the dynamic characteristics of a quadcopter under different motor failure conditions. First, by simulating motor failures in a controlled environment and collecting flight data, a data set is provided for subsequent analysis. Then, the data is preprocessed, including missing value filling, outlier processing, feature selection and standardization, to ensure the quality and efficiency of model training. The constructed dynamic model integrates the preprocessed data to further extract the real dynamic behavior of the system.
[0135] The deep learning model in the present invention can not only learn representations that are independent of motor fault states, but also introduces a discriminator network h, which enhances the generalization ability of the model through an adversarial training mechanism, so that it can maintain the learning invariance of features that are critical to flight stability under various motor fault conditions. Through iterative optimization, including adaptation steps, training steps, and regularization steps, the model parameters are continuously adjusted to ensure that the model can accurately compensate for the dynamic changes caused by motor failures while maintaining adaptability and learning capabilities to new data.
[0136] In the online adaptation stage, the present invention uses the pre-learned model and the adaptive update law inspired by the Kalman filter to monitor the status of the drone in real time. Once a motor failure is detected, the control strategy is dynamically adjusted based on the current flight status to ensure the stability and accuracy of the drone flight. In addition, the control strategy combines feedback control and learning-based feedforward control, and accurately compensates for the impact of the failure by updating parameters in real time, showing excellent online learning and adaptive control capabilities.
[0137] In summary, this method has taken an important step in improving the robustness, adaptability and reliability of quadrotor UAV flight control, especially in complex environments and motor failure scenarios, showing significant advantages over traditional control strategies. By continuously optimizing algorithms and models, the present invention provides a safer and more reliable control solution for the application of quadrotor UAVs in multiple fields such as terrain exploration, agricultural monitoring, logistics distribution, and disaster relief.
[0138] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for dynamic compensation and control of quadrotor drone faults based on deep learning. It is characterized in that The steps include: S1. Data collection: simulate the situation where the motors in different parts of the quadrotor drone fail, and collect the flight status data of the quadrotor drone under each motor failure state; S2. Data preprocessing: clean and standardize the collected flight status data; S3. Build dynamic model and integrate flight data set: Based on the preprocessed flight state data, the dynamic equation of the quadrotor UAV is obtained by combining the system dynamic equation to represent the real dynamic behavior of the quadrotor UAV; S4. Build a deep learning model: Through the deep learning algorithm, a deep neural network model that is independent of the motor fault state is obtained; introduce a discriminator to build the objective function, and optimize the objective function through an adversarial meta-learning framework; Based on the integrated flight data set, a deep learning model is constructed, which includes the following sub-steps: S4.
1. Building a deep neural network model , the input is the aircraft status information, and the output is a fault compensation force, which is used to capture the dynamic characteristics related to the motor fault and is invariant to the motor fault state; the deep neural network model is constructed as follows: S4.1.
1. Construct the prediction error function, which is expressed as follows: ; in, It maps the 2n-dimensional input space to the n*h-dimensional feature space; is the h-dimensional linear coefficient related to motor fault and is used to adjust The extracted features, It is used to represent the estimated value of the force with noise, K is the total number of motor fault categories; S4.1.
2. Solve the minimum value of the prediction error function and find the optimal representation function and the set of hidden variables related to the motor fault condition ; in, Common characteristics of all motor fault conditions, linear coefficient are the characteristics of different motor fault conditions; S4.2, introduce the discriminator h, define the objective function, and distinguish the representations under different fault states; the objective function is the cross entropy loss, and the formula is as follows: ; in, is an indicator function, if If yes, it is 1, otherwise it is 0. represents the probability of the discriminator h predicting the i-th fault, is the cross entropy loss; S4.
3. Constructing an adversarial meta-learning framework and optimizing the objective function: Strengthening the deep neural network model through adversarial training mechanism The ability to learn fault-invariant representations, generating feature representations that are indistinguishable to the discriminator h; Optimizing the objective function includes the following sub-steps: S4.3.
1. Construct an adversarial meta-learning framework, as follows: ; Among them, α is the regularization hyperparameter; S4.3.2, perform inner minimization to minimize the prediction error; The prediction error is the true output of the flight state With through After mapping, multiply by the corresponding linear coefficient The difference between the predicted outputs is Effectively learn the mapping relationship between flight state and required output; S4.3.3, perform outer maximization to maximize the performance of the discriminator h, so that h can accurately predict the motor fault category k corresponding to the current flight state; S5. Perform iterative optimization of the deep learning model: including adaptation step, training step, and regularization step; S6, online adaptation stage: When the quadcopter is flying along the set trajectory and a motor failure is detected, a hybrid control strategy is used to dynamically update the control parameters and calculate the control output according to the Kalman filter-inspired adaptive update law to ensure flight stability and accuracy; The hybrid control strategy is based on the system's dynamic model, combined with the proportional differential feedback term and the deep learning feedforward term, and the formula is as follows: ; where x is the different fault conditions, is a feedforward term based on deep learning, is the linear parameter estimated in the adaptive control stage and used to adjust the system in real time; is the feedback item, is the proportionality coefficient, is the differential coefficient, is the difference between the target state and the current state. It is the differential of the difference between the target state and the current state; The adaptive update law integrates the prediction error and the tracking error, and adds a regular term. The formula is as follows: ; in, It is used to avoid overfitting. A is the covariance matrix, which is used to guide the direction and rate of parameter update. B is the covariance of measurement noise and process noise. y is the actual measurement value including noise. e is the tracking error. is the differential of the linear parameter estimate, and the superscript T indicates the transpose; The covariance matrix A is updated dynamically with the system, and the formula is as follows: ; Where Q is the covariance matrix of the process noise, is the differential of A.
2. According to the deep learning-based quadrotor drone fault dynamic compensation and control method of claim 1, It is characterized in that Step S1 simulates motor failures in different parts of the quadrotor drone, uses a passive fault-tolerant controller to track the flight state of the quadrotor drone along a random trajectory under each motor failure state, and collects flight state data; The random trajectory includes several segments of polynomial trajectories, each of which starts at the current position and ends at the target position. The speed, acceleration and jerk of the spline are limited to 0 at the start and end points. After the quadcopter reaches the end of the spline, a new polynomial trajectory is generated, and the training is repeated to obtain flight status data. The flight status data includes: the quadcopter's position, speed, flight attitude, angular velocity, acceleration, motor speed PWM command, and calculated fault compensation force.
3. The method for dynamic compensation and control of quadrotor drone faults based on deep learning according to claim 2, It is characterized in that The data preprocessing in step S2 includes the following sub-steps: S2.
1. Supplement missing values in flight status data and perform outlier detection; find missing values through SPSS missing value analysis method, fill missing values through mean filling method, find outliers through box plot analysis method, delete outliers or replace them with the average value of adjacent points; S2.
2. Feature selection and construction of flight status data, selecting key features of flight control and fault analysis, taking fault compensation force as target label, taking position, speed, flight attitude angle and attitude angle change rate, angular velocity, acceleration as input features, and reducing the dimension of flight status data; S2.
3. Standardize the flight status data to eliminate the dimension and scale differences between different features. For each feature value, use the following formula: ; in, is the value after standardization, is the original value, is the mean value of feature i, is the standard deviation of feature i; after standardization, all features have a mean of 0 and a standard deviation of 1.
4. The method for dynamic compensation and control of quad-rotor drone faults based on deep learning according to claim 3, It is characterized in that In step S3, a dynamic model is constructed based on the preprocessed flight state data, including the following sub-steps: S3.
1. Integrate the flight status data on each polynomial trajectory into a data format with a timestamp, as shown below: ; Among them, q represents the position and attitude of the quadrotor drone, represents the speed and angular velocity of the quadrotor drone, represents the acceleration and angular acceleration of the quadrotor drone, and u represents the total thrust and torque generated by the motor; ; Where T is the total thrust generated by the motor, They are the torques in the roll, pitch and yaw directions of the quadrotor drone; S3.2, introduce the system dynamics model equation, expressed as follows: ; Where M(q) is the mass inertia matrix of the system, C(q,q') is the Coriolis and centrifugal force matrix used to describe the inertial forces generated by the motion, g is the gravitational acceleration, and f is the equation related to the dynamic behavior of the system; S3.3, bring the data with timestamps into the system dynamics model equation to obtain the dynamics equation representing the real dynamics behavior of the quadrotor drone, which is expressed as follows: ; Among them, z is a two-dimensional vector group , It is noise interference; S3.
4. Integrate the dynamic equations obtained from each polynomial trajectory to construct the flight data set D: ; in, Represents the state quantity at different timestamps , Indicates the specific motor fault conditions, which are used to reflect how different fault conditions affect the disturbance force. is the output variable representing the noisy estimate of the force.
5. The method for dynamic compensation and control of quad-rotor drone faults based on deep learning according to claim 4, It is characterized in that In step S5, a flight data set containing a plurality of data subsets of different fault status conditions is selected. Randomly extract the data set ,from Two mutually exclusive batches are randomly selected as the adaptation set A and the training set B to solve the least squares problem and the iterative optimization of the deep learning model, which specifically includes the following sub-steps; S5.1, Adaptation step: In the meta-learning stage, by minimizing the loss function on the adaptation set, the optimal linear coefficient a*(x) under each fault state is found, and the UAV control parameters are adjusted when different faults occur to maintain the flight control accuracy; From the adaptation set A, select and , to solve a set of optimal linear coefficients a*(x), the formula is as follows: ; S5.2, training step: Based on the meta-learning framework constructed in step S4.3.1, use the found a*(x) to back-propagate and update Parameters of,capture the commonalities between fault states; S5.3, Regularization step: Train the discriminator h so that The learned representation is invariant to motor fault states, improving Generalization and robustness to different fault conditions; Decide whether to update the discriminator h in each iteration with probability η. ; If updated, use the meta-learning framework to extract the timestamp on the training set B Optimize to improve the accuracy of fault classification and focus on the classification performance of the discriminator through the loss function, which is expressed as follows: ; Among them, the cross entropy loss Used to measure the inconsistency between the fault condition label k predicted by the discriminator h and the actual fault condition label; S5.
4. Repeat steps S5.1 to S5.3 for iterative optimization until the model performance meets the preset requirements.
