A variable load UAV attitude control method based on adaptive cascade
By adopting an adaptive cascade control method in the drone attitude control system, the controller parameters are dynamically adjusted to adapt to system parameter changes, and the problem of sensitive to model parameter changes in the prior art is solved, and a high-precision and robust attitude control effect is achieved.
Patent Information
- Application Number
- CN202211033411.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-08-26
AI Technical Summary
The existing drone attitude control system is sensitive to changes in model parameters, especially in uncertain load situations, the control effect is reduced, and the parameter adjustment is complex, making it difficult to achieve high-precision control.
Adaptive cascade-based variable-load drone attitude control method is adopted, through modeling and analysis of the drone dynamic model, variable gain error state feedback function is preset, drone status information is obtained, and a cascade self-immune attitude controller is designed, and controller parameters are dynamically adjusted to adapt to system parameter changes.
It improves the robustness and immunity of the controller, can adapt to uncertain loads, achieve high-precision attitude control, and has excellent control effect.
Smart Images

Figure CN115494853B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle attitude control, and in particular to a variable load unmanned aerial vehicle attitude control method based on adaptive cascade. Background Art
[0002] In recent years, with the rapid development of drone technology, quadcopter drones have been widely used in various fields due to their advantages such as flexible flight, easy control, simple structure and low price. Drones can not only carry various sensors to perform reconnaissance, surveying and mapping tasks, but also transport a certain weight of materials and perform cargo transportation tasks. When performing engineering tasks, the overall mass and moment of inertia of the drone may change due to the additional load.
[0003] The existing UAVs are established through simple UAV models, and UAV control systems are designed based on the UAV models, and the flight of UAVs is controlled by the UAV control systems.
[0004] However, the existing technology is sensitive to controller parameters. When the model parameters (moment of inertia, mass, etc.) change, the control effect of the original controller parameters decreases and the parameters need to be readjusted. In the face of uncertain loads, the controller parameters are only adjusted based on the robustness of the controller without adjusting them according to the real-time parameter conditions of the system. The existing controller design is relatively complex, with many parameters, and it is difficult to adjust parameters with better effects. Summary of the invention
[0005] In view of the shortcomings of the above-mentioned related technologies, the present invention proposes a variable-load UAV attitude control method based on adaptive cascade, which has strong robustness, high anti-interference ability, adaptability to uncertain loads, high control accuracy and superior control effect.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a variable load UAV attitude control method based on adaptive cascade, comprising the following steps:
[0007] S1. Modeling and analysis of UAV dynamics model;
[0008] S2. Presetting a variable gain error state feedback function according to the UAV dynamics model;
[0009] S3. Obtaining the state information of the UAV according to the variable gain error state feedback function;
[0010] S4, presetting the UAV cascade anti-disturbance attitude controller and obtaining controller parameters of the controller;
[0011] S5, processing the controller parameters;
[0012] S6, performing linearization processing on the nonlinear UAV system of the UAV;
[0013] S7, performing linearization processing on the nonlinear UAV system and performing least squares identification based on optimized data collection;
[0014] S8. Dynamically adjust the controller parameters according to the identification results.
[0015] Preferably, the S1 specifically includes the following sub-steps:
[0016] S11, presetting the drone as a quad-rotor drone, and obtaining lift generated by four motors of the quad-rotor drone;
[0017] S12, respectively obtaining the pitch, roll and yaw torques generated by the rotors of the quad-rotor drone, and the total lift of the quad-rotor drone;
[0018] S13, obtaining a transfer matrix, a pitch angle, a roll angle, and a yaw angle from the coordinate system of the quadrotor drone to the earth coordinate system;
[0019] S14, using Newton's theorem and Euler's equation to obtain a dynamic model of the four-rotor drone with six degrees of freedom;
[0020] S15, analyzing the kinetic model.
[0021] Preferably, S2 specifically includes the following sub-steps:
[0022] S21, establishing a variable load nonlinear error feedback function according to the UAV dynamics model;
[0023] S22, comparing the variable load nonlinear error feedback function with the original nonlinear error state feedback function; when the external load remains unchanged, the error is within a preset range, and when the external load changes, the error exceeds the preset range.
[0024] Preferably, the S3 specifically includes the following sub-steps:
[0025] S31, obtaining real-time status information of the drone through a sensor carried by the drone;
[0026] S32, the controller is provided with an inertial measurement unit and a magnetic sensor, the three-axis acceleration and angular velocity of the drone are obtained by the inertial measurement unit, and the magnetic field strength data is obtained by the magnetic sensor;
[0027] S33, calculating three attitude angles of the UAV, wherein the three attitude angles are a pitch angle, a roll angle, and a yaw angle, respectively.
[0028] Preferably, the S4 specifically includes the following sub-steps:
[0029] The pitch, roll and yaw torques are defined as u2, u3 and u4 respectively, and the total lift of the quadrotor drone is u1; θ d (t) is the target angular velocity output by the outer loop controller, θ(t) is the actual angular velocity of the UAV, and F_ESO refers to the second-order extended state observer, whose expression (1) is as follows:
[0030]
[0031] Among them, e is defined as the error, y is defined as the tracking observation, and z 1 Defined as the output of the observer, z 2 is defined as variable gain error feedback, b is defined as the adjustable coefficient, and h is defined as the flight altitude of the UAV;
[0032] The UAV is controlled in a closed loop according to the error fed back by the variable gain error state feedback function.
[0033] Preferably, the S5 specifically includes the following sub-steps:
[0034] Turn off the disturbance compensation function of the controller, adjust the proportional and differential parameters of the controller, set the control frequency of the controller between the preset frequencies, and debug the parameters [hb 01 b 02 ] so that the output of the observer tracks the observed quantity.
[0035] Preferably, the S6 specifically includes the following sub-steps:
[0036] S61. Establish a non-characteristic quadrotor UAV power system;
[0037] S62, obtaining system parameters of the non-characteristic quadrotor UAV power system, and identifying the system parameters to obtain identification results;
[0038] S63: Identify the quality of the drone according to the identification result.
[0039] Preferably, the S7 specifically includes the following sub-steps:
[0040] S71, obtaining the observation quantity and system output of the nonlinear UAV system;
[0041] S72, according to the sampling frequency, time span and total amount of data of the nonlinear UAV system;
[0042] S73, determining the data selection range of the observation amount and system output;
[0043] S74, selecting the data according to equal time intervals;
[0044] S75. Identify the data using the least squares method.
[0045] Preferably, the S8 specifically includes the following sub-steps:
[0046] S81. Establishing a system dynamics equation according to the nonlinear UAV system;
[0047] S82, obtaining the system moment of inertia through system identification according to the system dynamics equation;
[0048] S83, obtaining controller parameters through manual parameter adjustment;
[0049] S84: construct an adaptive exchange law for the controller parameters, and adjust the controller parameters according to the adaptive exchange law.
[0050] Compared with the related art, the present invention models and analyzes the UAV dynamics model; presets a variable gain error state feedback function according to the UAV dynamics model; obtains the state information of the UAV according to the variable gain error state feedback function; presets the UAV cascade self-disturbance rejection attitude controller and obtains the controller parameters of the controller; processes the controller parameters; performs nonlinear UAV system linearization processing on the UAV; performs least squares identification based on optimized data acquisition according to the nonlinear UAV system linearization processing; and dynamically adjusts the controller parameters according to the identification results. The above method adopts a combination of cascade control and self-disturbance rejection controller to improve the robustness and anti-interference ability of the controller. On the other hand, the present invention adopts the least squares identification method to estimate the rotational inertia and mass of the system in view of the uncertainty of the external load, and adaptively switches the parameters of the controller according to the system parameters to make the controller more adaptable. Therefore, when the UAV is flying, it can adapt to uncertain loads and has the advantages of high control accuracy and superior control effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The present invention will be described in detail below in conjunction with the accompanying drawings. The above and other aspects of the present invention will become clearer and easier to understand through the detailed description made in conjunction with the following drawings. In the accompanying drawings:
[0052] Figure 1 The method flow chart of the variable load UAV attitude control method based on adaptive cascade of the present invention;
[0053] Figure 2 This is a specific method flow chart of step S1 of the present invention;
[0054] Figure 3This is a specific method flow chart of step S2 of the present invention;
[0055] Figure 4 This is a specific method flow chart of step S3 of the present invention;
[0056] Figure 5 This is a specific method flow chart of step S6 of the present invention;
[0057] Figure 6 This is a specific method flow chart of step S7 of the present invention;
[0058] Figure 7 This is a specific method flow chart of step S8 of the present invention;
[0059] Figure 8 This is the overall flow chart of the controller of the present invention;
[0060] Fig. 9 This is a schematic diagram of the power distribution of the UAV of the present invention;
[0061] Fig.10 is a function diagram of the gain error state feedback function of the present invention;
[0062] Fig.11 A schematic diagram comparing the gain error state feedback function of the present invention and the original nonlinear error state feedback function;
[0063] Fig.12 This is a schematic diagram of obtaining the status information of the drone of the present invention;
[0064] Fig.13 It is a structural schematic diagram of the attitude cascade controller of the present invention;
[0065] Fig.14 This is a schematic diagram of the overall structure of the three-axis posture control of the present invention;
[0066] Fig.15 Schematic diagram of the system linearization method of the present invention;
[0067] Fig.16 This is a flow chart of the quality identification of the UAV of the present invention;
[0068] Fig.17 System identification flow chart for optimizing data acquisition for the present invention. DETAILED DESCRIPTION
[0069] The specific implementation of the present invention will be described in detail below with reference to the accompanying drawings.
[0070] The specific implementation modes / embodiments recorded herein are specific implementation modes of the present invention, which are used to illustrate the concept of the present invention, are explanatory and exemplary, and should not be interpreted as limiting the implementation modes of the present invention and the scope of the present invention. In addition to the embodiments recorded herein, those skilled in the art can also adopt other obvious technical solutions based on the contents disclosed in the claims and the specification of this application, and these technical solutions include any obvious replacement and modification of the embodiments recorded herein, which are within the protection scope of the present invention.
[0071] Please refer to Figure 1 As shown, the present invention provides a variable load UAV attitude control method based on adaptive cascade, comprising the following steps:
[0072] S1. Model and analyze the UAV dynamics model, so as to obtain the dynamic characteristics of the UAV and adjust the flight effect of the UAV.
[0073] S2. Preset a variable gain error state feedback function according to the UAV dynamics model. The variable gain error state feedback function can be effectively designed to address the problem of system parameter changes and improve the applicable range of controller parameters.
[0074] S3. Obtaining the state information of the UAV according to the variable gain error state feedback function.
[0075] Among them, the status information of the drone can be geographical location, time and space location, motion status, stop status, automatic return status, etc.
[0076] S4, preset the UAV cascaded anti-disturbance attitude controller, and obtain the controller parameters of the controller. The cascaded anti-disturbance controller based on the second-order extended state observer combines the advantages of the cascaded PID controller and the anti-disturbance controller, so that the controller has better robustness and adaptability.
[0077] S5. Process the controller parameters.
[0078] S6. Performing linearization processing on the nonlinear UAV system of the UAV.
[0079] S7, according to the linearization processing of the nonlinear UAV system, and identification based on the least square method of optimizing data collection. The UAV system linearization method and the least square method parameter identification algorithm based on optimizing data sampling can estimate more accurate system parameters with only a small amount of data.
[0080] S8. Dynamically adjust the controller parameters according to the identification results. The controller parameter adaptive dynamic transformation law that depends on the system parameters can adjust the P and D parameters of the controller according to the system parameters to make the controller more adaptable.
[0081] Specifically, by modeling and analyzing the UAV dynamics model; according to the UAV dynamics model, presetting the variable gain error state feedback function; according to the variable gain error state feedback function, obtaining the state information of the UAV; presetting the UAV cascade self-disturbance rejection attitude controller, and obtaining the controller parameters of the controller; processing the controller parameters; performing nonlinear UAV system linearization processing on the UAV; according to the nonlinear UAV system linearization processing, and based on the least squares method identification of optimized data acquisition; according to the identification results, dynamically adjusting the controller parameters. The above method adopts the combination of cascade control and self-disturbance rejection controller to improve the robustness and anti-interference ability of the controller. On the other hand, the present invention adopts the least squares method identification method to estimate the rotational inertia and mass of the system in view of the uncertainty of the external load, and adaptively and dynamically switches the parameters of the controller according to the system parameters, so that the controller has stronger adaptability. Therefore, when the UAV is flying, it can adapt to uncertain loads, and has the advantages of higher control accuracy and better control effect.
[0082] In this embodiment, please refer to the attached Figure 2 , Figure 8-Figure 9 As shown, the S1 specifically includes the following sub-steps:
[0083] S11. Preset the drone as a quad-rotor drone, and obtain the lift generated by four motors of the quad-rotor drone.
[0084] S12, respectively obtaining the pitch, roll and yaw torques generated by the rotors of the quad-rotor drone, and the total lift of the quad-rotor drone.
[0085] S13, obtaining a transfer matrix, a pitch angle, a roll angle, and a yaw angle from the coordinate system of the quadrotor drone to the earth coordinate system.
[0086] S14. Using Newton's theorem and Euler's equation, a dynamic model of the four-rotor drone with six degrees of freedom is obtained.
[0087] S15, analyzing the kinetic model.
[0088] Specifically, for X-shaped distribution of drones, such as Fig. 9 As shown, the y-axis points toward the nose of the drone and the z-axis points upward.
[0089] pass Fig. 9 The motor distribution shown, let:
[0090]
[0091] where F 1 、F 2、F 3 、F 4 is the lift generated by the four motors, L is half of the distance between adjacent motors of the drone, B is half of the distance between diagonal motors of the drone, u2, u3, u4 are the pitch, roll, and yaw torques generated by the rotors, respectively, and u1 is the total lift of the drone rotors.
[0092] Define the transfer matrix from drone coordinates to the earth coordinate system Define the pitch angle, roll angle, and yaw angle of the drone coordinate system relative to the earth coordinate system as θ, γ,
[0093] Based on Newton's theorem and Euler's equation, the 6-DOF dynamic model expression of the UAV can be obtained:
[0094]
[0095] Among them, [I x I y I z ] represents the UAV’s moment of inertia, [Δx Δy Δz] represents the disturbance forces in three directions on the UAV, [ΔM x ΔM y ΔM z ] represents the disturbance torque of the UAV around the three axes, g represents the acceleration of gravity, c represents the cosine function, and s represents the sin function.
[0096] Through the above steps S11-S16, a dynamic model of the quad-rotor UAV can be established, and a model analysis is performed on the dynamic model, thereby obtaining a model analysis result of the UAV flight attitude.
[0097] In this embodiment, please refer to the attached Figure 3 , Figure 10-11 As shown, S2 specifically includes the following sub-steps:
[0098] S21. Establish a variable load nonlinear error feedback function according to the UAV dynamics model.
[0099] S22, comparing the variable load nonlinear error feedback function with the original nonlinear error state feedback function; when the external load remains unchanged, the error is within a preset range, and when the external load changes, the error exceeds the preset range.
[0100] Specifically, in order to deal with the impact of uncertain loads on UAV model parameters, the following variable gain error state feedback function is designed:
[0101]
[0102] When the absolute value of the error e is less than s, the feedback gain is fixed to P1. When the absolute value of the error is greater than s and less than d, the feedback gain increases linearly from P1 to P2. When the absolute value of the error is greater than d, the error gain takes a fixed value of P2, such as Fig.10 The complete graph of this function and the comparison with the original nonlinear error state feedback function are shown in Fig.11 shown.
[0103] Principle of variable load nonlinear error feedback function:
[0104] When the external load does not change, the error is generally within the interval [-s, s]. When the external load increases or a large external disturbance occurs, the error is likely to exceed the interval [-s, s]. Considering that when the external load increases, the system's moment of inertia and mass will increase accordingly, the feedback gain is gradually transitioned from the original P1 to P2 according to the error. Regarding the selection of P1, P1 is the feedback gain for achieving a better control effect when the drone is unloaded (neither too much overshoot nor too fast adjustment speed). For the selection of P2, P2 is 1.5 to 2 times of P1 to prevent overshoot due to excessive feedback gain. You only need to reasonably select the safety interval s, transition interval d, and control parameters P1 and P2 to obtain a better control effect. In view of the problem of system parameter changes, a variable gain error state feedback function is designed to improve the applicable range of controller parameters.
[0105] In this embodiment, please refer to the attached Figure 4 and Fig.12 As shown, the S3 specifically includes the following sub-steps:
[0106] S31. Acquire real-time status information of the drone through sensors carried by the drone.
[0107] S32. The controller is provided with an inertial measurement unit and a magnetic sensor. The three-axis acceleration and angular velocity of the drone are obtained through the inertial measurement unit, and the magnetic field strength data is obtained through the magnetic sensor.
[0108] S33, calculating three attitude angles of the UAV, wherein the three attitude angles are a pitch angle, a roll angle, and a yaw angle, respectively.
[0109] Specifically, the real-time status information of the drone is calculated through the sensors carried by the drone. The inertial measurement unit and magnetic sensor in the controller are used to obtain the data of the drone's three-axis acceleration, angular velocity, and magnetic field strength, and calculate the three attitude angles of the drone. The three attitude angles are pitch angle, roll angle, and yaw angle. Among them, p, q, and r refer to the pitch angular velocity, roll angular velocity, and yaw angular velocity in the drone coordinate system, respectively; the pitch angular velocity, roll angular velocity, and yaw angular velocity are the attitude angular velocities of the pitch angle, roll angle, and yaw angle flight, respectively, so that the obtained drone status information is more accurate and the drone flight control effect is good.
[0110] In this embodiment, please refer to the attached Figure 13-Figure 14 As shown, the S4 specifically includes the following sub-steps:
[0111] Design the UAV's cascaded active disturbance rejection (ADRC) attitude controller. Based on the above observations, the quadrotor UAV is controlled in a closed loop. The structure of the UAV angle cascade controller is as follows: Fig.13 shown.
[0112] The pitch, roll and yaw torques are defined as u2, u3 and u4 respectively, and the total lift of the quadrotor drone is u1; θ d (t) is the target angular velocity output by the outer loop controller, θ(t) is the actual angular velocity of the UAV, and F_ESO refers to the second-order extended state observer, whose expression (1) is as follows:
[0113]
[0114] Among them, e is defined as the error, y is defined as the tracking observation, and z 1 Defined as the output of the observer, z 2 is defined as variable gain error feedback, b is defined as an adjustable coefficient, and h is defined as the flight height of the drone; the drone is closed-loop controlled according to the error fed back by the variable gain error state feedback function. TD refers to the fastest differential tracker, and the standard fastest differential tracker is used here.
[0115] Preferably, the overall control method of the three-axis attitude control of the UAV is as follows: Fig.14 shown.
[0116] Obtain the target angle and altitude information of the drone, and obtain u1, u2, u3 and u4 corresponding to the altitude controller, cascaded anti-disturbance controller (pitch), cascaded anti-disturbance controller (roll), and cascaded anti-disturbance controller (yaw) according to the angle and altitude information; the quadrotor drone obtains the three-axis angular velocity p, q, r, three-axis angle θ, γ, According to the above information, and based on the second-order extended state observer, the cascade active disturbance rejection controller combines the advantages of the cascade PID controller and the active disturbance rejection controller, so that the controller has better robustness and adaptability.
[0117] In this embodiment, S5 specifically includes the following sub-steps: turning off the disturbance compensation function of the controller, adjusting the proportional and differential parameters in the controller, setting the control frequency of the controller between the preset frequencies, and debugging the parameters [hb in the F_ESO 01 b 02 ] so that the output of the observer tracks the observed quantity.
[0118] Specifically, first, turn off the disturbance compensation function in the ADRC, set b = 0, b 0 =1. At this time, the controller is similar to the cascade PD controller. Adjust the proportional and differential parameters in the controller and set the controller control frequency between 50 and 200 Hz to make the drone have better flight stability. At the same time, debug the parameters [hb 01 b 02 ], so that the output z of the observer 1 can track the observed quantity y very accurately, and z 2 The amplitude and phase of z 1 When the parameters are adjusted to make the observer output data normal (tracking is accurate and there is no divergence), the compensation coefficients b and b can be adjusted. 0 , so that b is in the interval [0,20], b 0 In the interval [0,1]. Prevent disturbance compensation from causing the drone to oscillate.
[0119] In this embodiment, please refer to the attached Figure 5 , Figure 15-16 As shown, the S6 specifically includes the following sub-steps:
[0120] S61. Establish a non-characteristic quadrotor UAV power system.
[0121] Specifically, the function of establishing the non-characteristic quadcopter power system is as follows:
[0122]
[0123]
[0124] Among them, ΔM x , ΔM y , ΔM z is the external disturbance torque about the three axes.
[0125] S62: Obtain system parameters of the non-characteristic quadrotor UAV power system, and identify the system parameters to obtain identification results.
[0126] Specifically, it can be obtained from the formula in step S61 that the quadrotor drone power system is a nonlinear system.
[0127]
[0128]
[0129] UAV system linearization method:
[0130] When identifying the moment of inertia around a certain axis in a system, if the angular velocity around an adjacent axis is close to 0, the system can be approximated as a linear system.
[0131] When the system parameter I x ,I y When performing identification, if ω z =0, the system can be regarded as a linear system.
[0132]
[0133] When the system parameter I z When performing identification, if ω x =0 or ω y =0, the system can be regarded as a linear system.
[0134]
[0135] For the above formula, the moment of inertia and external disturbance ΔM can be estimated in the form of y=kx+b. Therefore, the system state [ω x ,ω y ,ω z ] T The value of , select data to identify the system parameters, as follows Fig.15 shown.
[0136] S63: Identify the quality of the drone according to the identification result.
[0137] Specifically, when the drone is in a hovering state, it is only subject to the lift and gravity of the drone's rotor in the vertical direction.
[0138]
[0139] F = u1(cosθcosγ) = ma + mg;
[0140] u1(cosθcosγ)=ma+u10;
[0141] For the above formula, the UAV mass m and the UAV reference throttle u10 are estimated using the form of y=kx+b.
[0142] In order to make the recognition results as accurate as possible, it is necessary to perform recognition when the drone flies to a certain altitude to prevent the recognition results from being affected by the collision between the drone and the ground.
[0143] In this embodiment, please refer to the attached Figure 6 and Fig.17 As shown, the S7 specifically includes the following sub-steps:
[0144] S71. Obtain observation quantities and system outputs of the nonlinear UAV system.
[0145] S72. Based on the sampling frequency, time span and total amount of data of the nonlinear UAV system.
[0146] S73, determining the data selection range of the observation quantity and system output.
[0147] S74, selecting the data according to equal time intervals.
[0148] S75. Identify the data using the least squares method.
[0149] Specifically, after step S6, the system model can be approximated as a linear system. For a linear system, the least square method can be used for parameter identification. In order to avoid data redundancy and improve the accuracy of parameter identification, the present invention optimizes data collection based on the least square method and then performs parameter estimation:
[0150] For a linear system, y = Ku + B;
[0151] The system parameters K and B can be estimated through the system data y and u:
[0152]
[0153] In order to improve the accuracy and credibility of parameter estimation, the selected data to be identified must be unbiased and consistent. Considering the limited memory of small embedded systems, the amount of selected data cannot be too much. Therefore, the two parameters of time span (in seconds) and data length (in pieces) are introduced.
[0154] Maintaining an appropriate time span and taking a certain amount of data at equal time intervals can effectively reduce data redundancy and improve the accuracy of parameter identification. The least squares identification flow chart for optimizing data acquisition is shown in Figure 17.
[0155] Through the above steps S71-S5, the UAV system linearization method and the least squares parameter identification algorithm based on optimized data sampling can estimate more accurate system parameters with only a small amount of data.
[0156] In this embodiment, please refer to the attached Figure 7 , the S8 specifically includes the following sub-steps:
[0157] S81. Establish a system dynamics equation based on the nonlinear UAV system.
[0158] Specifically, according to the UAV system parameters obtained in the above step S7, the parameters of the controller are adaptively and dynamically adjusted, and a simplified system dynamics equation is obtained:
[0159]
[0160] When the system parameter [I x ,I y ,I z ] changes, the system output must also increase proportionally.
[0161] S82. Obtain the system moment of inertia through system identification according to the system dynamics equation.
[0162] Specifically, assuming that the drone battery voltage is at its maximum and the drone is unloaded, the system moment of inertia obtained through system identification is:
[0163]
[0164] S83. After manually adjusting the parameters, the controller parameters are obtained. After manually adjusting the parameters, the controller parameters with better control effect are shown in Table 1 below:
[0165] Table 1
[0166] Angle ring <![CDATA[K ap 1]]> <![CDATA[K ad 1]]> Angular velocity loop <![CDATA[K agp 1]]> <![CDATA[K agd 1]]> Pitch <![CDATA[K pp ]]> <![CDATA[K pd ]]> Pitch <![CDATA[K pgp ]]> <![CDATA[K pgp ]]> roll <![CDATA[K rp ]]> <![CDATA[K rd ]]> roll <![CDATA[K rgp ]]> <![CDATA[K rgp ]]> yaw <![CDATA[K yp ]]> <![CDATA[K yd ]]> yaw <![CDATA[K ygp ]]> <![CDATA[K ygp ]]>
[0167] When the drone battery voltage drops, or when flying with a load, due to the power drop or load increase, the system moment of inertia becomes:
[0168] I n1 ≥I n0 .
[0169] S84: construct an adaptive exchange law for the controller parameters, and adjust the controller parameters according to the adaptive exchange law.
[0170] Specifically, the following controller parameter adaptive transformation law is constructed:
[0171] Gn ∈[0,1];
[0172] Considering that the thrust-to-weight ratio of the quadrotor drone is in the range of [1.5,3], the drone coefficient G is limited n In the interval [0,1]. The adjusted controller parameters are shown in Table 2:
[0173] Table 2
[0174] Angle ring <![CDATA[K p 2]]> <![CDATA[K d 2]]> Pitch <![CDATA[K pp ·(1+G x / 5)]]> <![CDATA[K pd ·(1+G x / 6)]]> Roll Col <![CDATA[K rp ·(1+G y / 5)]]> <![CDATA[K rd ·(1+G y / 6)]]> Yaw <![CDATA[K yp ·(1+G z / 5)]]> <![CDATA[K yd ·(1+G z / 6)]]> Angular velocity loop <![CDATA[K agp 2]]> <![CDATA[K agd 2]]> Pitch <![CDATA[K pgp ·(1+G x )]]> <![CDATA[K pgp ·(1+G x )]]> Roll <![CDATA[K rgp ·(1+G y )]]> <![CDATA[K rgp ·(1+G y )]]> Yaw <![CDATA[K ygp ·(1+G z )]]> <![CDATA[K ygp ·(1+G z )]]>
[0175] Through the above steps S81-S84, the controller parameter adaptive dynamic transformation law that depends on the system parameters can adjust the P and D parameters of the controller according to the system parameters, making the controller more adaptable. The attitude controller of the present invention can adapt to uncertain loads when the drone is flying, and has the advantages of higher control accuracy and better control effect.
[0176] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.
Claims
1. A variable load UAV attitude control method based on adaptive cascade, characterized in that: The following steps are involved: S1. Modeling and analysis of UAV dynamics model; S2. Presetting a variable gain error state feedback function according to the UAV dynamics model; Wherein, the preset variable gain error state feedback function is: When the absolute value of the error e is less than s, the feedback gain is fixed to P1. When the absolute value of the error is greater than s and less than d, the feedback gain increases linearly from P1 to P2. When the absolute value of the error is greater than d, the error gain takes a fixed value of P2. S3. Obtaining the state information of the UAV according to the variable gain error state feedback function; S4, presetting the UAV cascade anti-disturbance attitude controller and obtaining controller parameters of the controller; The S4 specifically includes the following sub-steps: The controller parameters of the drone are defined as the pitch, roll and yaw torques u2, u3 and u4 respectively, and the total lift of the drone is u1; θ d (t) is the target angular velocity output by the outer loop controller, and θ(t) is the actual angular velocity of the UAV; F_ESO refers to the second-order extended state observer, and its expression (1) is as follows: Among them, e is defined as the error, y is defined as the tracking observation, z1 is defined as the output of the observer, z2 is defined as the variable gain error feedback, b is defined as the adjustable coefficient, and h is defined as the flight altitude of the UAV; Performing closed-loop control on the UAV according to the error fed back by the variable gain error state feedback function; S5, processing the controller parameters; The S5 specifically includes the following sub-steps: Turn off the disturbance compensation function of the controller, adjust the proportional and differential parameters in the controller, set the controller control frequency between the preset frequencies, and debug the parameters [hβ 01 β 02 ] so that the output of the observer tracks the observed quantity; S6, performing linearization processing on the nonlinear UAV system of the UAV; The S6 specifically includes the following sub-steps: S61. Establish a non-characteristic quadrotor UAV power system; S62, obtaining system parameters of the non-characteristic quadrotor UAV power system, and identifying the system parameters to obtain identification results; S63, identifying the quality of the drone according to the identification result; S7, performing linearization processing on the nonlinear UAV system and performing least squares identification based on optimized data collection; The S7 specifically includes the following sub-steps: S71, obtaining the observation quantity and system output of the nonlinear UAV system; S72, according to the sampling frequency, time span and total amount of data of the nonlinear UAV system; S73, determining the data selection range of the observation amount and system output; S74, selecting the data according to equal time intervals; S75, identifying the data by least square method; S8. Dynamically adjust the controller parameters according to the identification results.
2. The variable load UAV attitude control method based on adaptive cascade as claimed in claim 1 is characterized in that: The S1 specifically includes the following sub-steps: S11, presetting the drone as a quad-rotor drone, and obtaining lift generated by four motors of the quad-rotor drone; S12, respectively obtaining the pitch, roll and yaw torques generated by the rotors of the quad-rotor drone, and the total lift of the quad-rotor drone; S13, obtaining a transfer matrix, a pitch angle, a roll angle, and a yaw angle from the coordinate system of the quadrotor drone to the earth coordinate system; S14, using Newton's theorem and Euler's equation to obtain a dynamic model of the four-rotor drone with six degrees of freedom; S15, analyzing the kinetic model.
3. The variable load UAV attitude control method based on adaptive cascade as claimed in claim 1 is characterized in that: The S2 specifically includes the following sub-steps: S21, establishing a variable load nonlinear error feedback function according to the UAV dynamics model; S22, comparing the variable load nonlinear error feedback function with the original nonlinear error state feedback function; when the external load remains unchanged, the error is within a preset range, and when the external load changes, the error exceeds the preset range.
4. The variable load UAV attitude control method based on adaptive cascade as claimed in claim 3 is characterized in that: The S3 specifically includes the following sub-steps: S31, obtaining real-time status information of the drone through a sensor carried by the drone; S32, the controller is provided with an inertial measurement unit and a magnetic sensor, the three-axis acceleration and angular velocity of the drone are obtained by the inertial measurement unit, and the magnetic field strength data is obtained by the magnetic sensor; S33, calculating three attitude angles of the UAV, wherein the three attitude angles are a pitch angle, a roll angle, and a yaw angle, respectively.
5. The variable load UAV attitude control method based on adaptive cascade as claimed in claim 1 is characterized in that: The S8 specifically includes the following sub-steps: S81. Establishing a system dynamics equation according to the nonlinear UAV system; S82, obtaining the system moment of inertia through system identification according to the system dynamics equation; S83, obtaining controller parameters through manual parameter adjustment; S84: construct an adaptive exchange law for the controller parameters, and adjust the controller parameters according to the adaptive exchange law.
Citation Information
Patent Citations
Quad-rotor aircraft hovering control method employing cascade auto disturbances rejection control technology
CN104865968A
Improved active-disturbance-rejection and PID cascade control method
CN104932252A