Adaptive UAV control method and system based on back propagation neural network
Through the adaptive control method based on backpropagation neural network, the bandwidth and design adaptive law of the drone controller are adjusted, and the problems of parameter adjustment difficulties and load quality changes in various scenarios are solved, and the problem of improvement is improved. Control accuracy and response speed.
Patent Information
- Application Number
- CN202410906470.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-08
AI Technical Summary
The existing UAV control methods are difficult to effectively adjust the controller parameters when facing a variety of working scenarios, and the bandwidth of the linearly extended state observer is limited, resulting in poor control effect, especially when the mass of the quadrotor load is changed.
Adaptive control method based on backpropagation neural network is adopted, and the bandwidth gain value of the linear extended state observer in the linear self-immune controller is adjusted by constructing the backpropagation neural network, and the adaptive law of quality change is designed to achieve the four-rotor Adaptive control of the drone adapts to internal and external disturbances and load mass changes.
Real-time adjustment of controller parameters is realized, the total disturbance of the four-rotor system is compensated, the control accuracy and system response speed are improved, the adaptability to load mass changes is enhanced, and the problem of limited bandwidth of linearly expanded state observers is reduced.
Smart Images

Figure CN118444578B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle control, and more specifically, to an adaptive unmanned aerial vehicle control method and system based on a back propagation neural network. Background Art
[0002] Nowadays, quadcopters are popular in many application scenarios due to their high flexibility and high degree of freedom, such as power inspection, data collection, surveillance and reconnaissance missions, forest fire rescue and precision agriculture. Quadcopter drones have the characteristics of strong coupling, multivariable, nonlinear, and are easily affected by uncertain interference during flight. In order to ensure their normal flight, the design of their control system is particularly important. Among the design schemes of drone flight control systems, there are control methods such as PID control, sliding mode control, fuzzy control, adaptive control, and backstepping. Control technologies such as sliding mode control, adaptive control, fuzzy control, and backstepping all rely on the establishment of system models, and have high requirements for the accuracy of the models. The low accuracy of system modeling has a great impact on the control effect. Among these methods, sliding mode control has strong robustness, but this method cannot estimate external disturbances in real time, which has a direct impact on the control results. Adaptive control can effectively compensate for the disturbances caused by the parameters of the controlled system, but its speed is fast, the feedback speed is fast, the feedback speed is slow, the adjustment time is long, and the rapidity is poor. Quadrotors are difficult to model or have low model accuracy, and conventional PID control algorithms are difficult to effectively control due to their "internal disturbances". In addition, quadrotors are usually affected by external unknown wind disturbances and unmodeled dynamics within the system, which will lead to poor stability of the quadrotor system. In order to ensure the stability of quadrotors, how to design a robust controller to suppress external interference has become a research hotspot at home and abroad.
[0003] At present, in order to solve the unknown disturbance problem of the quadrotor system, many scholars have conducted in-depth research on the quadrotor control system based on the theory of active disturbance rejection control. ADRC does not require an accurate mathematical model of the controlled object, and its structure is simple, so it can be used for the controller design of the quadrotor system. In view of the problem that the active disturbance rejection controller has many parameters, it is difficult to adjust these parameters.
[0004] Linear Active Disturbance Rejection Control (LADRC) is widely used due to its small number of controller parameters and easy adjustment. Although the number of controller parameters that need to be adjusted in LADRC is much smaller than that in ADRC, it is still a difficult task to readjust the controller parameters for different systems or the same system in different working scenarios. At the same time, the linear extended state observer (LESO) in LADRC often has the problem of limited bandwidth, which may lead to poor control effect in practical applications.
[0005] For systems with large and fast parameter changes of controlled objects and serious and uncertain external disturbances, the fixed-parameter extended state observer (ESO) has the problem of reduced "total disturbance" estimation accuracy and poor control effect. Some studies have proposed to improve the anti-interference performance by combining back-propagation neural network with auto-disturbance rejection controller. For example, the existing Chinese patent technology document 1 (CN108646572B) proposes a control method for a three-axis gimbal servo motor based on a back-propagation neural network combined with an auto-disturbance rejection controller, including the following steps: 1) Establishing the dynamic equation of a three-axis gimbal arbitrary frame servo system with a friction model; 2) Designing an auto-disturbance rejection controller based on the dynamic equation; 3) Designing a back-propagation neural network parameter online tuning module and combining it with an auto-disturbance rejection controller to realize online parameter tuning of the auto-disturbance rejection controller. There are at least the following technical problems in the prior art: In the face of various working scenarios of drones, it consumes a lot of computing resources to readjust the controller parameters for different systems or the same system. The linear extended state observer in the auto-disturbance rejection controller often has the problem of limited bandwidth, which will lead to poor control effect in practical applications. Summary of the invention
[0006] In order to solve the deficiencies in the prior art, the present invention provides an adaptive UAV control method based on a back propagation neural network, which can solve the technical problems in the existing UAV control methods that the controller parameters are difficult to adjust and the control process is susceptible to interference.
[0007] The present invention adopts the following technical solution.
[0008] An adaptive UAV control method based on back propagation neural network includes the following steps:
[0009] Establish a coordinate system for the quadrotor drone, and build a dynamic model of the quadrotor drone based on the coordinate system, including a displacement dynamic model and an attitude dynamic model;
[0010] Based on the displacement dynamics model and attitude dynamics model of the quadrotor UAV, a linear active disturbance rejection controller is constructed;
[0011] Construct a back propagation neural network, and adjust the bandwidth gain value of the linear extended state observer in the linear active disturbance rejection controller through the back propagation neural network;
[0012] An adaptive law for mass change is designed, and a linear active disturbance rejection controller consisting of the adaptive law for mass change and an extended state observer is used to adaptively control the quadrotor UAV.
[0013] Preferably, the displacement dynamics model constructed is:
[0014] ,
[0015] In the formula, Respectively represent the three-system position coordinates of the quadrotor drone in the ground coordinate system ( ) to perform a second derivative, It represents the mass of the quadcopter after the load changes. The quadcopter rotates three times around the body coordinate axis to coincide with the ground coordinate system. The angles of the three rotations are respectively the roll angle , pitch angle , yaw angle , It represents the total lift of the four rotors of the quadcopter, is the proportionality coefficient, =9.8N / kg.
[0016] Preferably, the total lift of the four rotors of the quad-rotor drone is satisfy:
[0017] ,
[0018] In the formula, They are the lifts corresponding to the four rotors of the quad-rotor drone respectively;
[0019] The power generated by the i-th rotor and rotor of the quadrotor drone and the rotation speed of the i-th motor Proportional to the square of:
[0020] ,
[0021] In the formula, is the proportional coefficient, i=1,2,3,4.
[0022] Preferably, the constructed posture dynamics model satisfies:
[0023] ,
[0024] In the formula, , , They represent the angular velocity of the quadcopter on the x, y, and z axes respectively. Represents the total moment of inertia of the entire motor rotor and propeller shaft; , , They represent the rolling moment, pitching moment and yaw moment of the quadrotor drone respectively. They respectively represent the moments of inertia of the x-axis, y-axis, and z-axis in the quadrotor drone coordinate system.
[0025] Preferably, the rolling moment and pitching moment of the quadrotor drone satisfy:
[0026] ,
[0027] ,
[0028] Where L is the distance between the center of the drone and the center of the rotor motor. , , , They represent the lift corresponding to each of the four rotors of the quadcopter;
[0029] During the flight of the drone, each rotor will generate reverse torque. is the resistance coefficient, then the reverse torque of the i-th rotor is The calculation formula is as follows:
[0030] ,
[0031] The yaw moment of the quadrotor drone is:
[0032] ,
[0033] Among them, L refers to the distance between the center of the drone and the center of the rotor motor.
[0034] Preferably, the designed linear extended state observer is as follows:
[0035] ,
[0036] In the formula, is the observed state vector of the linear extended state observer, used to observe the extended state space Status; is the observation gain vector of the linear extended state observer; represents the output of the observer; Representation parameters An estimated value of represents the gain of the linear extended state observer observing the state vector; Respectively represent the first observation state vector, the second observation state vector, and the third observation state vector; Respectively represent the first observation gain vector, the second observation gain vector, and the third observation gain vector; Indicates the quality of the quadrotor drone, represents the coefficient of the linear expansion state observer input, represents the input of the perturbation system, Indicates the parameters Perform derivation.
[0037] Preferably, adaptive predictive control is applied to dynamically adjust the proportional coefficient and the differential coefficient in the proportional-differential controller to compensate for the observation error caused by the bandwidth selection, specifically:
[0038] Control Law of Linear Extended State Observer satisfy:
[0039] ,
[0040] In the formula, represents the output of the PD controller, represents the estimated value of the third observed state vector, is a preset constant;
[0041] Calculate tracking error :
[0042] ,
[0043] In the formula, Indicates expected signal;
[0044] According to the output of the linear extended state observer, we can get:
[0045] ,
[0046] In the formula, q(t) represents the control signal, and d(t) represents the external interference;
[0047] N represents the input coefficient,
[0048] F(x,u(x)) Indicates about x and u ( x ) function;
[0049] u(x) represents the input of the linear extended state observer;
[0050] Intermediate satisfy:
[0051] ,
[0052] ,
[0053] In the formula, is the system state variable; z represents the z-axis coordinate of the quadrotor drone in the quadrotor drone coordinate system, They represent the roll angle of the quadrotor drone rotating around its own coordinate axis. , pitch angle , yaw angle ;
[0054] According to the extended state space , defining the filter tracking error :
[0055] ,
[0056] In the formula, Indicates a tracking error;
[0057] Represents the expanded state space Perform matrix transposition;
[0058] Input of the Linear Active Disturbance Rejection Controller as follows:
[0059] ,
[0060] In the formula, Represents the error coefficient, which can be any positive number;
[0061] According to the above calculation formula, the filter tracking error is obtained The derivative of satisfies:
[0062] ,
[0063] In the formula, Represents the filter tracking error The derivative of , They represent the proportional coefficient and differential coefficient of the proportional-derivative controller respectively.
[0064] Preferably, the bandwidth gain value of the linear extended state observer is adjusted online through a back propagation neural network, specifically including:
[0065] Output Error of Linear Extended State Observer Defined as:
[0066] ,
[0067] In the formula, is the expected signal, is the system state variable.
[0068] Output Error of Linear Extended State Observer The derivation of can be obtained by the following method:
[0069] ,
[0070] Backpropagating the input signal of the neural network It can be expressed as:
[0071] ,
[0072] Hidden layer input and output They are:
[0073] ,
[0074] In the formula, represents the input weight of the ath hidden layer in the back-propagation neural network; tan sig (·) represents the hyperbolic tangent function;
[0075] The number of hidden units of the back propagation neural network is 6. The hyperbolic tangent function uses the tangent s-type transfer function. The formula of the hyperbolic tangent function is:
[0076] ,
[0077] Where tansig(k) is the output value of the hyperbolic tangent function, and k represents the input value of the hyperbolic tangent function;
[0078] The back propagation neural network that adjusts the bandwidth gain value of the linear extended state observer is divided into a three-layer network structure; the input signal of the back propagation neural network is the output error and the bias value of the differential signal. The number of neurons in each hidden unit is 6 to ensure the strong approximation ability of the back propagation neural network to the error; the output layer contains three neurons, corresponding to the gain vector of the linear extended state observer;
[0079] Back propagation neural network k-th output value It can be expressed as follows:
[0080] ,
[0081] In the formula, Represents a nonlinear activation function in the hidden unit of a back-propagation neural network;
[0082] Represents a nonlinear activation function in a back-propagation neural network;
[0083] Represents the weight connecting the i-th neuron and the k-th neuron;
[0084] represents the total number of neurons;
[0085] represents the weight connecting the mth input unit and the ith hidden unit neuron;
[0086] M represents the total number of input units;
[0087] Represents the mth input value.
[0088] The output is denormalized to satisfy the gain vector of the linear extended state observer in the back-propagation-ALADRC controller. The requirement is that the gain vector of the linearly extended state observer It can be obtained as:
[0089] ,
[0090] Wherein, k=1, 2 or 3, corresponding to the first gain vector, the second gain vector and the third gain vector of the linear extended state observer respectively; Represents the initial value of the gain vector.
[0091] Preferably, the quality change adaptive law is constructed, specifically including:
[0092] The mass adaptive law based on the height channel is established, and the acceleration calculation formula of the drone on the z-axis is obtained according to the drone dynamics equation as follows:
[0093] ,
[0094] In the formula, Indicates the acceleration of the drone on the z-axis; Indicates the desired z-axis coordinate.
[0095] According to the principle of equivalent determinism, we can get:
[0096] ,
[0097] is a given adjustable parameter, represents the air resistance coefficient of the quadcopter in the z-axis, g represents the proportional coefficient, and the estimated error of the mass It can be obtained by the following formula:
[0098] ,
[0099] In the formula, the first quality parameter and the second quality parameter Respectively meet:
[0100] ,
[0101] ,
[0102] In the formula, represents an estimate of the change in the UAV load;
[0103] Combining the calculation formula of the acceleration of the drone on the z-axis and the estimated error of the mass, the adaptive law of mass change is obtained after equation transformation as follows:
[0104] .
[0105] The present invention also proposes an adaptive UAV control system based on a back propagation neural network, comprising: a UAV model building module, a controller building module, a regulation module, an adaptive law building module and a control module;
[0106] The UAV model building module is used to establish the coordinate system of the quad-rotor UAV and build the dynamic model of the quad-rotor UAV based on the coordinate system, including the displacement dynamic model and the attitude dynamic model;
[0107] The controller building module is used to build a linear active disturbance rejection controller based on the displacement dynamics model and attitude dynamics model of the quadrotor drone;
[0108] The regulating module includes a back propagation neural network, and the bandwidth gain value of the linear extended state observer in the linear active disturbance rejection controller is adjusted by the back propagation neural network;
[0109] The adaptive law building block is used to design the adaptive law for mass variation;
[0110] The control module performs adaptive control of the quadrotor UAV based on a linear active disturbance rejection controller composed of the mass change adaptive law and the extended state observer.
[0111] The present invention also provides a terminal, comprising a processor and a storage medium;
[0112] The storage medium is used to store instructions;
[0113] The processor is used to operate according to the instructions to execute the steps of the adaptive drone control method based on back propagation neural network.
[0114] The present invention also proposes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the adaptive drone control method based on a back propagation neural network are implemented.
[0115] The beneficial effects of the present invention are that, compared with the prior art, the present invention designs a control method combining a back-propagation neural network with an adaptive linear anti-disturbance control, which can adjust the controller parameters in real time according to different working scenarios of the unmanned aerial vehicle, and can realize the self-tuning of the observer bandwidth parameters; for the disturbance caused by the change of the load mass of the quad-rotor, the total disturbance in the working process of the quad-rotor system is compensated; the control method not only takes into account the internal and external disturbances of the system, but also has strong adaptability to the change of the load mass; for the linear extended state observer (LESO), there is often a problem of limited bandwidth. The present invention realizes adaptive adjustment of the bandwidth gain value of the linear extended state observer through a back-propagation neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0116] Figure 1 is a flow chart of an adaptive UAV control method based on a back propagation neural network in the present invention;
[0117] Figure 2 is a schematic diagram of the drone coordinate system constructed in the present invention;
[0118] Figure 3 It is a design block diagram of the controller in the present invention;
[0119] Figure 4 Schematic diagram of the back propagation neural network in the present invention;
[0120] Figure 5 (a) is a height output diagram in a simulation example of the present invention;
[0121] Figure 5 (b) is a pitch angle output diagram in a simulation example of the present invention;
[0122] Figure 5 (c) is a graph of the roll angle output in the simulation example of the present invention;
[0123] Figure 5 (d) is a diagram of the yaw angle output in the simulation example of the present invention;
[0124] Figure 6 (a) is a height output error diagram in a simulation example of the present invention;
[0125] Figure 6 (b) is a diagram of the pitch angle output error in the simulation example of the present invention;
[0126] Figure 6 (c) is a graph of the roll angle output error in a simulation example of the present invention;
[0127] Figure 6 (d) is a diagram of the yaw angle output error in the simulation example of the present invention;
[0128] Figure 7It is a structural diagram of the adaptive UAV control system based on back propagation neural network in the present invention. DETAILED DESCRIPTION
[0129] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0130] like Figure 1 As shown, the present invention proposes an adaptive UAV control method based on back propagation neural network, which specifically includes the following steps:
[0131] Step 1, establish a coordinate system of the quadrotor drone, and build a dynamic model of the quadrotor drone based on the coordinate system, including a displacement dynamic model and an attitude dynamic model;
[0132] Specifically, step 1 also includes:
[0133] Step 1-1, establish the coordinate system of the quadrotor drone;
[0134] The coordinate system and structure of the quadrotor drone are as follows Figure 1 The present invention uses six variables to describe the quadrotor drone, including the drone position and attitude angle As the load gradually decreases, the center of mass of the quadrotor drone moves continuously upward from below the origin of the fuselage bracket.
[0135] exist Figure 2 In the coordinate system of is the origin of the quadrotor drone’s body coordinate system;
[0136] They are the x-axis, y-axis, and z-axis of the quadrotor drone's body coordinate system;
[0137] They represent the four rotors of a quad-rotor drone;
[0138] They are the origin, x-axis, y-axis, and z-axis of the ground coordinate system respectively;
[0139] The quad-rotor drone uses an underactuated system with 4 input channels and 6 degrees of freedom. Its main part is composed of four motor-driven propellers. Different actions can be achieved by adjusting the rotation speed of each propeller. This is the basic framework of the quad-rotor drone. In order to simplify the establishment of the drone model, the quad-rotor drone is simplified as follows in this invention:
[0140] 1) Assume that the drone is a uniform and symmetrical rigid body;
[0141] 2) The body coordinate origin, the drone's center of mass, and the structure center completely coincide with each other;
[0142] 3) Ignore the effect of gravity acceleration on the flight altitude of the drone and keep it unchanged;
[0143] 4) The change of the UAV’s flight attitude angle can be ignored.
[0144] After simplification, the basic posture changes of drones mainly include the following types of motion: hovering motion, rolling motion, pitching motion and yaw motion:
[0145] Hovering motion: refers to the body keeping balance in the air, maintaining stability through the lift and gravity of the drone being equal in magnitude; rolling motion: the body rotates around the X-axis; pitching motion: the body rotates around the Y-axis; yaw motion: the body rotates around the Z-axis.
[0146] With reference to the body coordinate system and the ground fixed coordinate system, the dynamic model of the variable mass quadrotor is established.
[0147] Step 1-2, construct the displacement dynamics model of the quadrotor drone;
[0148] In order to describe the movement and position of the quadrotor drone in space, we establish Figure 2 The body coordinate system and the ground coordinate system shown, the ground coordinate system Fixed on the ground, used to describe the position of the drone in the air. Fixed on the fuselage, used to describe the attitude. The model is analyzed and modeled using the Euler equation; the drone rotates three times around its own coordinate axis to coincide with the ground coordinate system. The angles of the three rotations are respectively , pitch angle , yaw angle The specific rotation angle is as follows Figure 2 shown.
[0149] The coordinate transformation matrices corresponding to the three rotations are:
[0150] ,
[0151] ,
[0152] ,
[0153] In the formula, , , Respectively represent the coordinates of the quadrotor drone on the X-axis, Y-axis, and Z-axis.
[0154] From this, we can get the transformation matrix from the body coordinate system to the ground coordinate system: :
[0155] ,
[0156] The transformation between the body coordinate system and the ground coordinate system satisfies the following equation:
[0157] ,
[0158] The power generated by the i-th rotor and rotor of the quadrotor drone and the rotation speed of the i-th motor Proportional to the square of:
[0159] ,
[0160] In the formula, is the proportionality coefficient, i=1,2,3,4;
[0161] Total lift of the four rotors for:
[0162] ,
[0163] In the formula, They are the lifts corresponding to the four rotors of the quad-rotor drone respectively;
[0164] In the body coordinate system, the lift provided by the quadcopter is vertically upward, so the lift provided by the quadcopter is for:
[0165] ,
[0166] By transforming the matrix The lift force on the quadrotor drone is transformed into the ground coordinate system through the conversion matrix:
[0167] ,
[0168] In the formula, It is the three-axis component of the quadrotor drone’s own lift in the ground coordinate system.
[0169] According to Newton's second law, the translational motion equation of the quadrotor drone in the ground coordinate system is as follows;
[0170] ,
[0171] In the formula, ( ) represents the position coordinates of the quadrotor drone on the x, y, and z axes in the ground coordinate system. They respectively represent the second derivative of the three-system coordinates of the quadrotor drone in the ground coordinate system; Indicates the quality of the quadrotor drone, is the proportionality coefficient, =9.8N / kg;
[0172] The three-axis components of the quadcopter's own lift in the ground coordinate system Substituting the above formula, the displacement dynamics mathematical equation of the quadrotor drone is as follows:
[0173] ,
[0174] As the mass of the load decreases, the center of mass of the quadrotor gradually moves upward, thus affecting the attitude angle of the quadrotor drone. Since the quadrotor drone is loaded by the mounting platform, the two can be regarded as a whole.
[0175] Assume that the initial coordinates of the center of mass of the quadrotor drone are , the center of mass coordinates of the load part that is reduced during operation is .
[0176] When the load mass decreases, the change of the center of mass coordinates of the quadrotor drone is shown in the following formula:
[0177] ,
[0178] Among them, the coordinates of the center of mass of the quadrotor drone after the change are ; Indicates the change in load;
[0179] Combining the above formula, the displacement dynamics model of the quadrotor drone can be obtained as follows:
[0180] ,
[0181] In the formula, It means to derive the z-axis coordinate of the quadrotor drone in the ground coordinate system. represents the mass of the quadcopter after the load changes, ;
[0182] Steps 1-3, constructing the attitude dynamics model of the quadrotor drone;
[0183] The rotation balance equation of the quadrotor drone can be obtained from the Euler equation:
[0184] ,
[0185] In the formula, It represents the angular velocity in the body coordinate system, usually expressed as ; represents the gyroscopic torque, It indicates the torque generated by the propeller on the fuselage; Represents the total moment of inertia of the entire motor rotor and propeller shaft; They represent rolling moment, pitching moment and yaw moment respectively; They represent the angular velocity of the quadrotor drone on the x, y, and z axes of the ground coordinate system respectively;
[0186] Gyroscopic torque It can be expressed as:
[0187] ,
[0188] In the formula, They represent the motor rotation speeds of the four rotors of the quadrotor drone respectively;
[0189] Assuming that the quadcopter has a symmetrical and uniform structure, the total moment of inertia is It can be expressed as:
[0190] ,
[0191] In the formula, Represent the moment of inertia of the x-axis, y-axis, and z-axis respectively;
[0192] Since the quadrotor drone has been assumed to be structurally symmetrical, the lateral rolling and forward pitching motions can be regarded as the pulling force difference between the propellers on the same axis. Combined with the flight principle of the quadrotor drone described above, it can be concluded that its rolling moment and pitching moment are respectively and Respectively meet:
[0193] ,
[0194] ,
[0195] Where L refers to the distance between the center of the UAV and the center of the rotor motor;
[0196] They represent the lift corresponding to each of the four rotors of the quadcopter, and , is the lift of the two rotors located on the same axis, , is the lift of the two rotors located on the same axis.
[0197] At the same time, during the flight of the drone, each rotor will generate reverse torque. is the resistance coefficient, then the reverse torque of the i-th rotor is The calculation formula is as follows:
[0198] ,
[0199] In the formula, represents the motor rotation speed of the i-th rotor;
[0200] Then the yaw moment of the quadrotor drone is obtained by combining the reverse torque: for:
[0201] ,
[0202] Among them, L refers to the distance between the center of the drone and the center of the rotor motor.
[0203] Combining the above formulas, we can get the attitude dynamics model of the quadrotor drone:
[0204] ,
[0205] In the formula, Respectively represent the derivation of the angular velocity p, q, and r of the quadrotor drone on the three axes of x, y, and z. Represents the total moment of inertia of the entire motor rotor and propeller shaft; , , They represent the rolling moment, pitching moment and yaw moment of the quadrotor drone respectively.
[0206] Step 2, design a linear active disturbance rejection controller based on the displacement dynamics model and attitude dynamics model of the quadrotor drone;
[0207] like Figure 3 As shown, Figure 3 This is a design block diagram of the controller in the present invention, which specifically includes:
[0208] Combining the displacement dynamics model and attitude dynamics model of the quadrotor drone, the dynamic equation of the quadrotor drone is obtained as follows:
[0209] ,
[0210] The dynamic equation of the quadrotor drone is rewritten as:
[0211] ,
[0212] in, is a two-dimensional measurable state variable; y is the output signal; f(t) is the unknown nonlinear function of the dynamic system; d(t) is the external disturbance; G is the coefficient, the coefficient G is partially known, and the known part is recorded as ; , denote the first variable and the second variable respectively; q(t) denotes the control signal; u(x) denotes the input signal of the dynamic system;
[0213] Consider all uncertainties in the system and all disturbances to the system as total disturbances, and define total disturbance for:
[0214] ,
[0215] In the formula, g(t) represents the function affected by time, is a constant, g(t) and Together they form the gain factor, which is used to control the input Impact on the perturbation system; represents the input signal of the disturbance system; represents the control signal of the disturbance system, Represents the disturbance signal.
[0216] In order to observe the total disturbance, the expanded state space is defined for:
[0217] ,
[0218] in, , , .
[0219] The design of the Linear Extended State Observer (LESO) is as follows:
[0220] ,
[0221] In the formula, is the observed state vector of the linear extended state observer, used to observe the extended state space Status; is the observation gain vector of the linear extended state observer; Indicates the quality of the quadrotor drone, represents the coefficient of the linear expansion state observer input, represents the input of the perturbation system, Indicates the parameters Perform derivation.
[0222] represents the output of the observer;
[0223] Representation parameters An estimated value of
[0224] represents the gain of the linear extended state observer observing the state vector;
[0225] Respectively represent the first observation state vector, the second observation state vector, and the third observation state vector; Respectively represent the first observation gain vector, the second observation gain vector, and the third observation gain vector:
[0226] ,
[0227] In the formula, represents the gain value of the linear extended state observer;
[0228] s represents a complex domain variable;
[0229] denote the coefficients of the zeroth, first, second, and third order s respectively;
[0230] The control law u can be written as follows:
[0231] ,
[0232] In the formula, represents the output of the PD controller, represents the estimated value of the third observed state vector;
[0233] The present invention dynamically adjusts the PD controller (proportional-differential controller) by applying APC (adaptive predictive control) and The value is calculated to compensate for the observation error caused by bandwidth selection. This not only simplifies the controller parameter tuning process, but also improves the control accuracy of the linear active disturbance rejection controller (LADRC) and the dynamic performance of the system.
[0234] Defining Tracking Errors :
[0235] ,
[0236] In the formula, Indicates expected signal;
[0237] From the output of the linear extended state observer, we can get:
[0238] ,
[0239] Where N represents the input coefficient,
[0240] F(x,u(x)) Indicates about x and u ( x ) function;
[0241] u(x) represents the input of the linear extended state observer;
[0242] Intermediate satisfy:
[0243] ,
[0244] ,
[0245] In the formula, is the system state variable.
[0246] According to the extended state space , defining the filter tracking error :
[0247] ,
[0248] In the formula, Indicates a tracking error;
[0249] Represents the expanded state space Perform matrix transposition;
[0250] Input of the Linear Active Disturbance Rejection Controller as follows:
[0251] ,
[0252] In the formula, Represents the error coefficient, which can be any positive number;
[0253] The filter tracking error can be obtained by combining the above calculation formula: The derivative of satisfies:
[0254] ,
[0255] In the formula, Represents the filter tracking error The derivative of
[0256] , They represent the proportional coefficient and differential coefficient of the PD controller respectively.
[0257] Step 3, constructing a back propagation neural network, and adjusting the bandwidth gain value of the linear extended state observer in the linear active disturbance rejection controller through the back propagation neural network;
[0258] Continuously time-varying wind disturbances and decreasing load mass will make the controller's control effect worse. The linear extended state observer observes the system state and the total disturbance. However, in the face of continuously time-varying wind disturbances and changing load mass, a fixed observer bandwidth will lead to large observation errors and poor control effect. Figure 4 The back-propagation neural network shown online adjusts the bandwidth gain value of the linear extended state observer, improves the observation performance of the linear extended state observer, and compensates for the adverse effects of wind disturbances and load mass changes.
[0259] Output Error of Linear Extended State Observer Defined as:
[0260] ,
[0261] In the formula, is the expected signal, is the system state variable.
[0262] Output Error of Linear Extended State Observer The derivation of can be obtained by the following method:
[0263] ,
[0264] Backpropagating the input signal of the neural network It can be expressed as:
[0265] ,
[0266] Hidden layer input and output They are:
[0267] ,
[0268] In the formula, represents the input weight of the ath hidden layer in the back-propagation neural network; tan sig (·) represents the hyperbolic tangent function;
[0269] In the present invention, the number of hidden units of the back propagation neural network is 6, the hyperbolic tangent function adopts a tangent s-type transfer function, and the formula of the hyperbolic tangent function is:
[0270] ,
[0271] Where tansig(k) is the output value of the hyperbolic tangent function, and k represents the input value of the hyperbolic tangent function;
[0272] The back propagation neural network that adjusts the bandwidth gain value of the linear extended state observer is divided into a three-layer network structure; the input signal of the back propagation neural network is the output error and the bias value of the differential signal. The number of neurons in each hidden unit is 6 to ensure the strong approximation ability of the back propagation neural network to the error. The output layer contains three neurons, corresponding to the gain vector of the linear extended state observer.
[0273] Back propagation neural network k-th output value It can be expressed as follows
[0274] ,
[0275] In the formula, Represents a nonlinear activation function in the hidden unit of a back-propagation neural network;
[0276] Represents a nonlinear activation function in a back-propagation neural network;
[0277] Represents the weight connecting the i-th neuron and the k-th neuron;
[0278] represents the total number of neurons;
[0279] represents the weight connecting the mth input unit and the ith hidden unit neuron;
[0280] M represents the total number of input units;
[0281] Represents the mth input value.
[0282] Since the back propagation neural network converts the input signal [ ] normalized, its output signal will also be mapped to the range of [−1,1], so the output of the back-propagation neural network cannot be directly used as the bandwidth gain value of the linear extended state observer.
[0283] In order to make the back-propagation-ALADRC controller converge, the output is denormalized to satisfy the gain vector of the linear extended state observer in the back-propagation-ALADRC controller. The requirement is that the gain vector of the linearly extended state observer It can be obtained as:
[0284] ,
[0285] Wherein, k=1, 2 or 3, corresponding to the first gain vector, the second gain vector and the third gain vector of the linear extended state observer respectively; Represents the initial value of the gain vector.
[0286] Step 4: Design the adaptive law of mass change.
[0287] In the actual working process, the mass of the load carried by the quadrotor may change continuously, which is not conducive to the stability of the system. Therefore, a mass adaptive law based on the height channel is established to reduce the adverse effect of mass change on the stability of the system. According to the UAV dynamics equation, the acceleration calculation formula of the UAV on the z-axis can be obtained:
[0288] ,
[0289] In the formula, Indicates the acceleration of the drone on the z-axis; Indicates the desired z-axis coordinate.
[0290] According to the principle of equivalent determinism, we can get:
[0291] ,
[0292] is a given adjustable parameter, represents the air resistance coefficient of the quadcopter in the z-axis, g represents the proportional coefficient, and the estimated error of the mass It can be obtained by the following formula:
[0293] ,
[0294] In the formula, the first quality parameter and the second quality parameter Respectively meet:
[0295] ,
[0296] ,
[0297] Substituting the above formula into the calculation formula of the acceleration of the drone on the z-axis, the adaptive law of mass change can be obtained after equation transformation as follows:
[0298] ,
[0299] This completes the design of the controller.
[0300] By constructing the mass change adaptive law and extended state observer, the adaptive parameter adjustment of the linear active disturbance rejection controller is realized, and the quadrotor UAV is controlled based on the linear active disturbance rejection controller.
[0301] In order to verify the control effect of the adaptive UAV control method proposed in the present invention on the quadrotor UAV in practical applications, the UAV is controlled by the method proposed in the present invention, the control method based on LADRC in the prior art, and the control method based on back propagation-LADRC, and the following results are obtained: Figure 5 The results comparison chart shown in Figure 5 (a) Figure 5 (c) is the height and roll angle output diagram; Figure 5 (b) Figure 5 (d) is the output diagram of the pitch angle and yaw angle; Figure 5 It can be seen that when the quadrotor drone is disturbed, the tracking curve fluctuation of the reference input by backpropagation-ALADRC is the smallest; the tracking speed of backpropagation-ALADRC is the fastest, while the tracking speed of LADRC is the slowest; the overshoot of backpropagation-ALADRC is significantly smaller than that of backpropagation-LADRC without PD adaptive law;
[0302] In summary, the introduction of the back propagation neural network can reduce overshoot and speed up the response of the system. At the same time, the addition of the PD adaptive law further increases the stability of the system, eliminates the adverse effects of parameter deviation on the system, and further reduces the overshoot of the system. At the same time, the response speed of the system is further accelerated on the height channel, and the control effect of the controller is improved.
[0303] Furthermore, Figure 6 (a) Figure 6 (c) is a diagram of the height and roll angle output errors in a simulation example of the present invention; Figure 6 (b) Figure 6 (d) is a diagram showing the pitch angle and yaw angle output errors in the simulation example of the present invention; Figure 6 It can be seen that the back propagation-ALADRC controller with mass adaptive law can effectively reduce the error caused by the change of load mass, while the back propagation-ALADRC controller without mass adaptive law has significantly larger overshoot in pitch angle and roll angle channels. At the same time, the response speed of the system is not as good as the back propagation-ALADRC controller with mass adaptive law.
[0304] like Figure 7 As shown, the present invention also proposes an adaptive UAV control system based on a back propagation neural network, which is used to implement the above-mentioned adaptive UAV control method based on a back propagation neural network. The system includes a UAV model building module, a controller building module, a regulation module, an adaptive law building module and a control module;
[0305] The UAV model building module is used to establish the coordinate system of the quad-rotor UAV and build the dynamic model of the quad-rotor UAV based on the coordinate system, including the displacement dynamic model and the attitude dynamic model;
[0306] The controller building module is used to build a linear active disturbance rejection controller based on the displacement dynamics model and attitude dynamics model of the quadrotor drone;
[0307] The regulating module includes a back propagation neural network, and the bandwidth gain value of the linear extended state observer in the linear active disturbance rejection controller is adjusted by the back propagation neural network;
[0308] The adaptive law building block is used to design the adaptive law for mass variation;
[0309] The control module performs adaptive control of the quadrotor UAV based on a linear active disturbance rejection controller composed of the mass change adaptive law and the extended state observer.
[0310] The beneficial effects of the present invention are that, compared with the prior art, a control method combining a back-propagation neural network with an adaptive linear anti-disturbance control is designed, which can adjust the controller parameters in real time according to different working scenarios of the UAV; for the disturbance caused by the change of the mass of the quad-rotor load, the total disturbance in the working process of the quad-rotor system is compensated; the control method not only takes into account the internal and external disturbances of the system, but also has strong adaptability to the change of the load mass; for the linear extended state observer (LESO), there is often a problem of limited bandwidth. The present invention realizes adaptive adjustment of the bandwidth gain value of the linear extended state observer through a back-propagation neural network.
[0311] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0312] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0313] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0314] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0315] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An adaptive UAV control method based on back propagation neural network, It is characterized in that The steps include: Establish a coordinate system for the quadrotor drone, and build a dynamic model of the quadrotor drone based on the coordinate system, including a displacement dynamic model and an attitude dynamic model; The displacement dynamics model constructed is: In the formula, Respectively represent the three-system position coordinates of the quadrotor drone in the ground coordinate system ( ) to perform a second derivative, It represents the mass of the quadcopter after the load changes. The quadcopter rotates three times around the body coordinate axis to coincide with the ground coordinate system. The angles of the three rotations are respectively the roll angle , pitch angle , yaw angle , It represents the total lift of the four rotors of the quadcopter, is the proportionality coefficient, ; The constructed posture dynamics model satisfies: In the formula, They represent the angular velocity of the quadcopter on the x, y, and z axes respectively. Represents the total moment of inertia of the entire motor rotor and propeller shaft; They represent the rolling moment, pitching moment and yaw moment of the quadrotor drone respectively. They represent the moments of inertia of the x-axis, y-axis, and z-axis in the quadrotor drone coordinate system respectively; Based on the displacement dynamics model and attitude dynamics model of the quadrotor UAV, a linear active disturbance rejection controller is constructed; Adaptive predictive control is used to dynamically adjust the proportional coefficient and differential coefficient in the proportional-derivative controller to compensate for the observation error caused by bandwidth selection. Specifically: Control Law of Linear Extended State Observer satisfy: In the formula, represents the output of the PD controller, represents the estimated value of the third observed state vector; Defining Tracking Errors : In the formula, Indicates expected signal; According to the output of the linear extended state observer, we can get: In the formula, q(t) represents the control signal, and d(t) represents the external interference; N represents the input coefficient, F(x,u(x)) Indicates about x and u ( x ) function; u(x) represents the input of the linear extended state observer; Intermediate satisfy: In the formula, is the system state variable; z represents the z-axis coordinate of the quadrotor drone in the quadrotor drone coordinate system, They represent the roll angle of the quadrotor drone rotating around its own coordinate axis. , pitch angle , yaw angle ; According to the extended state space , defining the filter tracking error : In the formula, Indicates a tracking error; Represents the expanded state space Perform matrix transposition; Input of the Linear Active Disturbance Rejection Controller as follows: In the formula, Represents the error coefficient, which can be any positive number; According to the above calculation formula, the filter tracking error is obtained The derivative of satisfies: In the formula, Represents the filter tracking error The derivative of , They represent the proportional coefficient and differential coefficient of the proportional-derivative controller respectively; Construct a back propagation neural network, and adjust the bandwidth gain value of the linear extended state observer in the linear active disturbance rejection controller through the back propagation neural network; The bandwidth gain value of the linear extended state observer is adjusted online through the back propagation neural network, including: Output Error of Linear Extended State Observer Defined as: In the formula, is the expected signal, is the system state variable; Output Error of Linear Extended State Observer The derivation of can be obtained by the following method: Backpropagating the input signal of the neural network It can be expressed as: Hidden layer input and output They are: In the formula, represents the input weight of the ath hidden layer in the back-propagation neural network; tan sig (·) represents the hyperbolic tangent function; The number of hidden units of the back propagation neural network is 6. The hyperbolic tangent function uses the tangent s-type transfer function. The formula of the hyperbolic tangent function is: Where tansig(k) is the output value of the hyperbolic tangent function, and k represents the input value of the hyperbolic tangent function; The back propagation neural network for adjusting the bandwidth gain value of the linear extended state observer is divided into a three-layer network structure; the input signal of the back propagation neural network is the output error and the bias value of the differential signal; the number of neurons in each hidden unit is 6 to ensure the strong approximation ability of the back propagation neural network to the error; the output layer contains three neurons, corresponding to the gain vector of the linear extended state observer; Back propagation neural network k-th output value It can be expressed as follows: In the formula, Represents a nonlinear activation function in the hidden unit of a back-propagation neural network; Represents a nonlinear activation function in a back-propagation neural network; Represents the weight connecting the i-th neuron and the k-th neuron; represents the total number of neurons; represents the weight connecting the mth input unit and the ith hidden unit neuron; M represents the total number of input units; Represents the mth input value; The output is denormalized to satisfy the gain vector of the linear extended state observer in the back-propagation-ALADRC controller. The requirement is that the gain vector of the linearly extended state observer It can be obtained as: Wherein, k=1, 2 or 3, corresponding to the first gain vector, the second gain vector and the third gain vector of the linear extended state observer, respectively; represents the initial value of the gain vector; Construct a mass change adaptive law, and adaptively control the quadrotor UAV based on the linear active disturbance rejection controller composed of the mass change adaptive law and the extended state observer; Construct an adaptive law for quality change, including: The mass adaptive law based on the height channel is established, and the acceleration calculation formula of the drone on the z-axis is obtained according to the drone dynamics equation as follows: In the formula, Indicates the acceleration of the drone on the z-axis; Indicates the desired z-axis coordinate; According to the principle of equivalent determinism, we can get: is a given adjustable parameter, represents the air resistance coefficient of the quadcopter in the z-axis, g represents the proportional coefficient, and the estimated error of the mass It can be obtained by the following formula: In the formula, the first quality parameter and the second quality parameter Respectively meet: In the formula, An estimated value representing the change in the UAV load; Combining the calculation formula of the acceleration of the drone on the z-axis and the estimated error of the mass, the adaptive law of mass change is obtained after equation transformation as follows: 。 2. The adaptive drone control method based on back propagation neural network according to claim 1, It is characterized in that The total lift of the four rotors of a quadcopter satisfy: In the formula, They are the lifts corresponding to the four rotors of the quad-rotor drone respectively; The power generated by the i-th rotor and rotor of the quadrotor drone and the rotation speed of the i-th motor Proportional to the square of: In the formula, is the proportional coefficient, i=1,2,3,4.
3. The adaptive drone control method based on back propagation neural network according to claim 1, It is characterized in that The rolling moment and pitching moment of the quadrotor drone meet the following requirements: Where L is the distance between the center of the drone and the center of the rotor motor. They represent the lift corresponding to each of the four rotors of the quadcopter; During the flight of the drone, each rotor will generate reverse torque. is the resistance coefficient, then the reverse torque of the i-th rotor is The calculation formula is as follows: The yaw moment of the quadrotor drone is: Among them, L refers to the distance between the center of the drone and the center of the rotor motor.
4. The adaptive drone control method based on back propagation neural network according to claim 1, It is characterized in that The designed linear extended state observer is as follows: In the formula, is the observed state vector of the linear extended state observer, used to observe the extended state space Status; is the observation gain vector of the linear extended state observer; represents the output of the observer; Representation parameters An estimated value of represents the gain of the linear extended state observer observing the state vector; Respectively represent the first observation state vector, the second observation state vector, and the third observation state vector; Respectively represent the first observation gain vector, the second observation gain vector, and the third observation gain vector; represents the mass of the quadcopter, N represents the coefficient of the linear extended state observer input, represents the input of the perturbation system, Indicates the parameters Perform derivation.
5. An adaptive UAV control system based on a back propagation neural network, using the adaptive UAV control method based on a back propagation neural network as described in any one of claims 1 to 4, It is characterized in that include: UAV model building module, controller building module, regulation module, adaptive law building module and control module; The UAV model building module is used to establish the coordinate system of the quad-rotor UAV and build the dynamic model of the quad-rotor UAV based on the coordinate system, including the displacement dynamic model and the attitude dynamic model; The controller building module is used to build a linear active disturbance rejection controller based on the displacement dynamics model and attitude dynamics model of the quadrotor drone; The regulating module includes a back propagation neural network, and the bandwidth gain value of the linear extended state observer in the linear active disturbance rejection controller is adjusted by the back propagation neural network; The adaptive law building block is used to design the adaptive law for mass variation; The control module performs adaptive control of the quadrotor UAV based on a linear active disturbance rejection controller composed of the mass change adaptive law and the extended state observer.
6. A terminal comprising a processor and a storage medium; Features: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the adaptive drone control method based on back propagation neural network according to any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the adaptive drone control method based on back propagation neural network described in any one of claims 1 to 4 are implemented.
