A nonlinear PID attitude control method for UAV based on state constraints
Through the nonlinear PID attitude control method based on state constraints, the problem of insufficient flight stability and obstacle avoidance ability of UAVs in dynamic environments is solved, and more accurate flight trajectory tracking and stability, and more adaptable control are achieved. Effect.
Patent Information
- Application Number
- CN202210789155.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-05
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-07-05
AI Technical Summary
When UAVs fly in a dynamic environment, traditional perception methods have low accuracy in obstacle recognition and motion trajectory prediction, resulting in unstable flight and insufficient safety. Moreover, their adaptive and self-learning capabilities are weak, making it difficult to operate in complex environments. Achieve stable and efficient flight.
The nonlinear PID attitude control method based on state constraints is used to construct a dynamic model through the 6-DOF dynamic model and state dependence function. The nonlinear PID control algorithm is used to calculate the system PID control rate, and the translation and rotation error equation control laws are realized. Combined with the state Conduct training under constrained conditions to ensure the flight stability of the UAV in a dynamic environment.
It achieves precise flight trajectory tracking of UAVs in dynamic environments, improves flight stability and obstacle avoidance capabilities, reduces the parameter adjustment complexity of traditional PID control, and makes it more adaptable.
Smart Images

Figure CN114967425B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicles, and in particular to a nonlinear PID attitude control method for unmanned aerial vehicles based on state constraints. Background Art
[0002] Currently, drones are widely used in the fields of high-voltage transmission lines, cable tunnel inspection, etc. Autonomous flight is the future development direction of drones. There are static and dynamic obstacles in the environment of drones, and there are unmeasurable disturbances in the outside world, which makes the complexity of their perception and decision-making systems and the difficulty of controller design show an exponential growth trend. Traditional perception, motion prediction, decision-making and modern control theory methods face major challenges, which are mainly manifested in the following aspects:
[0003] (1) The harshness and diversity of the operating environment of UAV systems result in low accuracy of traditional perception methods in identifying obstacles in the surrounding environment, and poor generalization of prediction of motion trajectories to avoid obstacles in dynamic environments, which may cause UAV systems to fail to correctly perceive the surrounding environment and cause serious accidents. UAVs need to perceive and correctly identify environmental obstacles and accurately predict the trajectory of dynamic obstacles;
[0004] (2) The rule-based control method of the complex UAV system in a dynamic environment often requires a lot of manpower costs. At the same time, the obstacle avoidance algorithm of the UAV in a dynamic environment has weak self-adaptation and self-learning capabilities. The UAV needs to fly stably, efficiently and safely in various complex dynamic environments, especially those with a large number of obstacles.
[0005] The safety and reliability of UAV operation not only requires basic motion path planning, but more importantly, it is necessary to introduce more rules and dynamic constraints to solve problems such as slow autonomous flight speed, stiff movements, limited motion continuity, and uneven flight under diverse conditions. Summary of the invention
[0006] In view of the above problems existing in the prior art, the technical problem to be solved by the present invention is: how to control the flight of a UAV in a dynamic environment, especially in the face of harsh and diverse operating environment conditions.
[0007] In order to solve the above technical problems, the present invention adopts the following technical solution: a nonlinear PID attitude control method of an unmanned aerial vehicle based on state constraints, comprising the following steps:
[0008] S100: Use the 6-DOF dynamics model of the quadcopter and define the translational expected v * (t) and the rotation expectation w * (t), the expression is as follows:
[0009]
[0010]
[0011]
[0012] Among them, A1 and B1 represent the coefficient matrix of the dynamic model, v represents the translation prediction value of the UAV operation, and w represents the rotation prediction value of the UAV operation. represents the first-order derivative of v, represents the first-order derivative of w, F=[F x ,F y ,F z ] T represents the component force vectors in the x, y, and z coordinate systems acting on the quadrotor drone, m represents the weight of the quadrotor drone, J represents the constant matrix, M = [u φ ,u θ ,u ψ ] T represents the input matrix vector vector, F / m represents Input, M represents Input;
[0013] S200: Define the initial translation control amount u t and the initial rotation control amount u r , will u t and u r Substitute the 6-DOF dynamics model of the quadrotor drone to obtain the initial dynamic model, which is expressed as follows:
[0014]
[0015] Among them, u t =[F x / m,F y / m,F z / m] T ,u r =[u φ ,u θ ,u ψ ] T , f a (·)=A1v and f b (·)=B1w represents the coupling term of the model, A=diag{1,1,1} and B=J -1 represents the augmented matrix; d a (.) represents the translation disturbance, d b (.) indicates rotational disturbance;
[0016] S300: Combine the state-dependent function and the initial power model to build a UAV power model based on state constraints. The expression is as follows:
[0017]
[0018] Among them, ξ v represents the translation state-dependent transfer function, ξ w represents the rotational state dependent transfer function, η v and η w represents a computable parameter, ω v and ω w denote the translation and rotation error variables respectively;
[0019] S400: Calculate the system PID control rate of the UAV power model based on the state constraint through the nonlinear PID control algorithm. The system PID control rate includes the translation error equation control law u′ t And the rotation error equation control law u′ r , the expressions are as follows:
[0020] Translation error equation control law:
[0021]
[0022] Among them, the adaptive PID parameters of the translation error equation control law are:
[0023]
[0024] Among them, z v represents the translation tracking error, k P represents the proportionality coefficient, k I represents the integral coefficient, k D represents the differential coefficient, γ represents the design constant, c represents the design constant, Δk p represents the time-varying proportionality coefficient, Δk I represents the time-varying integral coefficient, Δk D represents the time-varying differential coefficient, represents the adaptive parameter, Φ(·) represents the negative feedback parameter of the translation error equation control law;
[0025] Rotational error equation control law:
[0026]
[0027] Among them, the adaptive PID parameters of the rotating error equation control law are:
[0028]
[0029] Among them, z wrepresents the rotation tracking error, k P represents the proportionality coefficient, k I represents the integral coefficient, k D represents the differential coefficient, γ2 represents the design constant, d represents the design constant, Δk p represents the time-varying proportionality coefficient, Δk I represents the time-varying integral coefficient, Δk D represents the time-varying differential coefficient, represents the adaptive parameter, Φ w1 (·) represents the negative feedback parameter of the rotating error equation control law;
[0030] S500: Preset the state constraint range and train the UAV power model based on the state constraint. The specific steps are as follows:
[0031] S510: Input the system control signal into the translation error equation control law u′ t , the output is the translation prediction value ξ of the UAV under the state constraint v ; Input the system control signal into the rotation error equation control law u′ r , the output is the rotation prediction value ξ of the UAV running under the state constraints w ;
[0032] S520: Calculate the translation tracking error z respectively v and the rotation tracking error z w , the calculation expression is as follows:
[0033] z v =ξ v -α v
[0034] z w =ξ w -α w ; (10)
[0035] Among them, z v represents the translation tracking error, z w represents the rotation tracking error, ξ v represents the translation prediction value under state constraints, ξ w represents the rotation prediction value under state constraints, α v represents the expected value of the translation after the state-dependent function transformation, α w It represents the expected value of the rotation after the state-dependent function transformation, and the expression is as follows:
[0036]
[0037]
[0038] in, F v (t) represents the lower bound of the translation, represents the upper bound of translation, F w (t) represents the rotation lower bound, represents the upper bound of rotation;
[0039] S530: If the calculated translation tracking error z v and the rotation tracking error z w All decay within the range of state constraints, and a trained UAV power model based on state constraints is obtained. It is believed that the flight of the UAV can be realized under dynamic environment conditions.
[0040] If the calculated translation tracking error z v and the rotation tracking error z w If the decay does not fall within the state constraint range, the parameters of the UAV power model based on the state constraint are reversely updated, and the process returns to S510.
[0041] Preferably, the state-dependent function expression in S300 is:
[0042]
[0043] Among them, p = v represents the translation error at time t, p = w represents the rotation error at time t, and the initial state satisfies p k (0)∈D k ,k=1,2;ξ k (t) represents the state-dependent transition function, F k (t) represents the lower bound of the error, Represents the upper bound of the error.
[0044] From the state-dependent transformation, we can find that when the initial conditions are met, if and only if x k Reaching the boundary D k When the state dependence function tends to infinity; that is, under the initial condition x k (0) In subset D k As long as the state-dependent transition function is bounded, the system state x k (t) is always within the constraint range, thus achieving full-state constraint. Therefore, the full-state constraint problem is cleverly transformed into the problem of ensuring the boundedness of the state-dependent function.
[0045] Preferably, the state constraint condition range in S500 is [-1.5, 2.5].
[0046] Compared with the prior art, the present invention has at least the following advantages:
[0047] 1. The present invention describes a nonlinear PID attitude control method for a UAV based on state constraints. A nonlinear PID control algorithm is used to design translation control quantities and rotation control quantities for the UAV under state constraints. The translation control rate and rotation control rate designed based on the PID control algorithm can more accurately control the flight attitude of the UAV, so that the actual flight trajectory of the UAV and the expected trajectory basically coincide, thereby realizing the flight of the UAV in a dynamic environment, especially in the face of harsh and diverse operating environment conditions; the performance in the actual flight process is that obstacles in a complex environment can be avoided more accurately.
[0048] 2. The nonlinear PID attitude control method of UAV based on state constraints described in the present invention can transform the flight problem of UAV in a complex dynamic environment into a state and performance constraint control problem of a dynamic system. By constructing a state-dependent transfer function, the nonlinear dynamic constraint is converted into a state bounded control of a new dynamic system, thereby converting the key scientific problem of UAV attitude flight in a dynamic environment into a "constraint" control problem of a dynamic system to be solved.
[0049] 3. The control strategy proposed under the state constraint state can make the quadrotor drone follow the reference trajectory with very small time delay and good flight stability.
[0050] 4. Compared with traditional PID control, this nonlinear PID algorithm can automatically adjust parameters according to environmental changes, which is more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is the coordinate diagram of the dynamic model of the UAV in the present invention.
[0052] Figure 2 It is the linear speed tracking performance of the UAV in the experiment of the present invention.
[0053] Figure 3 It is the angular velocity tracking performance of the UAV in the experiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention is described in further detail below.
[0055] See also Figure 1 , a nonlinear PID attitude control method for UAV based on state constraints, comprising the following steps:
[0056] S100: Use the 6-DOF dynamics model of the quadcopter and define the translational expected v * (t) and the rotation expectation w * (t), the expression is as follows:
[0057]
[0058]
[0059]
[0060] Among them, A1 and B1 represent the coefficient matrix of the dynamic model, v represents the translation prediction value of the UAV operation, and w represents the rotation prediction value of the UAV operation. represents the first-order derivative of v, represents the first-order derivative of w, F=[F x ,F y ,F z ] T represents the component force vectors in the x, y, and z coordinate systems acting on the quadrotor drone, m represents the weight of the quadrotor drone, J represents the constant matrix, M = [u φ ,u θ ,u ψ ] T represents the input matrix vector vector, F / m represents Input, M represents Input;
[0061] When implementing the modeling process, we refer to the modeling method of the classic quadcopter. From the vector identity, we know that if the body coordinate system rotates by w in the ground coordinate system, for any vector A, the following equation is satisfied:
[0062]
[0063] In formula (13), represents the absolute derivative of A in the ground coordinate system, and represents the relative derivative of A in the body coordinate system. According to the momentum theorem, the change in momentum of the quadrotor drone is equal to the impulse of the force, satisfying formula (14):
[0064]
[0065] From the angular momentum theorem, we know that the change in the angular momentum of an object is equal to the impulse of the torque, and we get formula (15):
[0066] Mdt=d(Jw); (15)
[0067] Among them, J is the moment of inertia of the quadrotor drone in the body coordinate system and is assumed to be a constant, as shown below:
[0068]
[0069] Combining formula (13), formula (14), formula (15) and formula (16), we can get the dynamic model of the classic quadrotor UAV translation subsystem, which is expressed as follows:
[0070]
[0071] Generally, it can be assumed that the non-diagonal terms of the moment of inertia matrix J are regarded as a decimal term, which can be ignored when two decimal terms are multiplied. It is worth noting that this assumption considers the mass asymmetry of the quadrotor drone more carefully than the ordinary drone model. Therefore, formula (17) can be optimized to formula (18), which is expressed as follows:
[0072]
[0073] In formula (18), J is regarded as a constant matrix to make the calculation easier. By combining it with the dynamic model, the 6-DOF dynamic model of the quadrotor drone can be obtained, as shown in formula (1);
[0074] The coefficient matrix in formula (1) and its detailed expression are as follows:
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081] By choosing the control quantity u t =[F x / m,F y / m,F z / m] T and u r =[u φ ,u θ ,u ψ ] T , and adding the uncertainty of the system model, the initial dynamic model can be obtained, see formula (4).
[0082] S200: Define the initial translation control amount u t and the initial rotation control amount u r , will u t and u rSubstitute the 6-DOF dynamics model of the quadrotor drone to obtain the initial dynamic model, which is expressed as follows:
[0083]
[0084] Among them, u t =[F x / m,F y / m,F z / m] T ,u r =[u φ ,u θ ,u ψ ] T , f a (·)=A1v and f b (·)=B1w represents the coupling term of the model, A=diag{1,1,1} and B=J -1 represents the augmented matrix; d a (.) represents the translation disturbance, d b (.) indicates rotational disturbance;
[0085] S300: A UAV power model based on state constraints is constructed by combining the state dependency function and the initial power model. The state dependency function is an existing technology and is expressed as follows:
[0086]
[0087] Among them, ξ v represents the translation state-dependent transfer function, ξ w represents the rotational state dependent transfer function, η v and η w represents a computable parameter, ω v and ω w denote the translation and rotation error variables respectively;
[0088] The state-dependent function expression in S300 is:
[0089]
[0090] Among them, p = v represents the translation error at time t, p = w represents the rotation error at time t, and the initial state satisfies p k (0)∈D k ,k=1,2;ξ k (t) represents the state-dependent transition function, F k (t) represents the lower bound of the error, Represents the upper bound of the error.
[0091] The state dependency function is a prior art, and the state dependency function is derived to obtain formula (25):
[0092]
[0093] in,
[0094]
[0095]
[0096]
[0097]
[0098] Thus, the UAV power model based on state constraints can be obtained, see formula (5).
[0099] S400: Calculate the system PID control rate of the UAV power model based on the state constraint through the nonlinear PID control algorithm. The system PID control rate includes the translation error equation control law u′ t And the rotation error equation control law u′ r , the nonlinear PID control algorithm is the existing technology, and the expressions are as follows:
[0100] Translation error equation control law:
[0101]
[0102] Among them, the adaptive PID parameters of the translation error equation control law are:
[0103]
[0104] Among them, z v represents the translation tracking error, k P represents the proportionality coefficient, k I represents the integral coefficient, k D represents the differential coefficient, γ represents the design constant, c represents the design constant, Δk p represents the time-varying proportionality coefficient, Δk I represents the time-varying integral coefficient, Δk D represents the time-varying differential coefficient, represents the adaptive parameter, Φ(·) represents the negative feedback parameter of the translation error equation control law;
[0105] Rotational error equation control law:
[0106]
[0107] Among them, the adaptive PID parameters of the rotating error equation control law are:
[0108]
[0109] Among them, z w represents the rotation tracking error, k P represents the proportionality coefficient, k I represents the integral coefficient, k D represents the differential coefficient, γ2 represents the design constant, d represents the design constant, Δk p represents the time-varying proportionality coefficient, Δk I represents the time-varying integral coefficient, Δk D represents the time-varying differential coefficient, represents the adaptive parameter, Φ w1 (·) represents the negative feedback parameter of the rotating error equation control law;
[0110] When constructing the nonlinear PID control law, we first construct the following generalized error in the PID form:
[0111]
[0112] where ε1 and ε2 are constants that can be freely chosen;
[0113] Then the translation tracking error and rotation tracking error are further transformed by combining the generalized error to obtain formula (28):
[0114]
[0115]
[0116] Based on this, the control goal becomes to design a nonlinear PID control law so that the tracking error S v and S w It approaches 0 as time approaches infinity.
[0117] First, the control law is designed based on the translation error equation, and the translation tracking error is differentiated to obtain formula (29):
[0118]
[0119] Then, the generalized error is differentiated to obtain formula (30):
[0120]
[0121] Select the Lyapunov function Taking the derivative of the Lyapunov function, we can get formula (31):
[0122]
[0123] Defining functions The derivative formula of the Lyapunov function can be further simplified to formula (32):
[0124]
[0125] For the function Γ v1 , using RBF neural network for approximation, we get formula (33):
[0126]
[0127] Therefore, the derivative of the Lyapunov function can be simplified to formula (34):
[0128]
[0129] Here, a neural network is applied to fit multiple unknown items as a whole, and multiple unknown items are cleverly converted into the standard form of the neural network, thereby converting the problem into a controller design using an adaptive method in the case of one unknown item. v1 (S) and δ v1 (S), it is easy to get δ v1 (S) in the compact set Ω S and there is an upper limit, namely Therefore, we can apply Young's inequality to scale the equation and solve the problem of unknown terms, as shown in formula (35):
[0130]
[0131] From this, we can further obtain formula (36):
[0132]
[0133] in, is an unknown constant, and Φ v1 =φ T (S)φ(S)+1>0 is a computable function; therefore, the derivative of the Lyapunov function can be further simplified, as shown in formula (37):
[0134]
[0135] Thus, the PID control of the translation error equation can be obtained, as shown in formula (8).
[0136] The PID control law can be further simplified according to the PID parameters to obtain the following formula (38):
[0137]
[0138] Substituting the control law into ST η v Au v In the term, simplify it to get formula (39):
[0139]
[0140] Therefore, by further simplifying the derivative of the Lyapunov function, we can obtain formula (40):
[0141]
[0142] Furthermore, the adaptive parameter error is introduced into the Lyapunov candidate function to construct a new Lyapunov function Where γ>0 is a positive constant. Substituting the update law into the derivative of the Lyapunov function and further processing it as follows, we get formula (41):
[0143]
[0144] Where Υ=min{2c v λ v ,σ}>0,
[0145] Based on this, the following results can be obtained:
[0146] 1. Does not violate state constraints. When the Lyapunov function can ensure S v In the compact set Ω v In the above, we can know that |S v |<k b , because v <k b , and z v =ξ v -α v According to the theory of state constraint function, we can get |e v |<k b ; For v = e v +v * and |v * |≤A v , |v|≤|e v |+|v * |<k b +A v , and because k b =k v -A v , we know that |v|<k v ,Therefore, the state constraint is never violated;
[0147] 2. All closed-loop signals are bounded and continuous. By solving the differential inequality get Therefore, it can be concluded that V v (t) is bounded, so we can further obtain e v is bounded and convergent and confined to a small compact set Ω v , from the expression of the control law, we can know that u t ,a,Φ v are all bounded; in summary, all signals are bounded and continuous.
[0148] For the design of the control law of the rotation error equation, the same results and feasibility proof can be obtained by changing all the relevant parameters of the translation error to the relevant parameters of the rotation error;
[0149] S500: Preset the state constraint range and train the UAV power model based on the state constraint. When implementing it, Matlab simulation experiment can be used for training verification. The state constraint range in S500 is [-1.5, 2.5]. The specific steps are as follows:
[0150] S510: Input the system control signal into the translation error equation control law u′ t , the output is the translation prediction value ξ of the UAV under the state constraint v ; Input the system control signal into the rotation error equation control law u′ r , the output is the rotation prediction value ξ of the UAV running under the state constraints w ;
[0151] S520: Calculate the translation tracking error z respectively v and the rotation tracking error z w , the calculation expression is as follows:
[0152] z v =ξ v -α v
[0153] z w =ξ w -α w ; (10)
[0154] Among them, z v represents the translation tracking error, z w represents the rotation tracking error, ξ v represents the translation prediction value under state constraints, ξ w represents the rotation prediction value under state constraints, α v represents the expected value of the translation after the state-dependent function transformation, α w It represents the expected value of the rotation after the state-dependent function transformation, and the expression is as follows:
[0155]
[0156]
[0157] in, F v (t) represents the lower bound of the translation, represents the upper bound of translation, F w (t) represents the rotation lower bound, represents the upper bound of rotation;
[0158] S530: If the calculated translation tracking error z v and the rotation tracking error z w All decay within the range of state constraints, and a trained UAV power model based on state constraints is obtained. It is believed that the flight of the UAV can be realized under dynamic environment conditions.
[0159] If the calculated translation tracking error z v and the rotation tracking error z w If the decay does not fall within the state constraint range, the parameters of the UAV power model based on the state constraint are reversely updated, and the process returns to S510.
[0160] Simulation experiments verify the feasibility of the algorithm:
[0161] In order to verify the effectiveness and stability of the model-based controller described, a Matlab simulation experiment is conducted on a quadcopter with a suspended load. This experiment selects the system state constraint within the range of (-1.5, 2.5) for simulation, see Figure 2 and Figure 3 ,It can be seen from the figure that under the state constraint state, the ,proposed control strategy can make the quadrotor follow the reference trajectory with ,small time delay and good flight stability.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A nonlinear PID attitude control method for UAV based on state constraints, characterized by: The steps include: S100: Use the 6-DOF dynamics model of the quadcopter and define the translation expectation v * (t) and the rotation expectation w * (t), the expression is as follows: Among them, A1 and B1 represent the coefficient matrix of the dynamic model, v represents the translation prediction value of the UAV operation, and w represents the rotation prediction value of the UAV operation. represents the first-order derivative of v, represents the first-order derivative of w, F=[F x ,F y ,F z ] T represents the component force vectors in the x, y, and z coordinate systems acting on the quadrotor drone, m represents the weight of the quadrotor drone, J represents the constant matrix, M = [u φ ,u θ ,u ψ ] T represents the input matrix vector vector, F / m represents Input, M represents Input; S200: Define the initial translation control amount u t and the initial rotation control amount u r , will u t and u r Substitute the 6-DOF dynamics model of the quadrotor drone to obtain the initial dynamic model, which is expressed as follows: Among them, u t =[F x / m,F y / m,F z / m] T ,u r =[u φ ,u θ ,u ψ ] T , f a (·)=A1v and f b (·)=B1w represents the coupling term of the model, A=diag{1,1,1} and B=J -1 represents the augmented matrix; d a (.) represents the translation disturbance, d b (.) indicates rotational disturbance; S300: Combine the state-dependent function and the initial power model to build a UAV power model based on state constraints. The expression is as follows: Among them, ξ v represents the translation state-dependent transfer function, ξ w represents the rotational state dependent transfer function, η v and η w represents a computable parameter, ω v and ω w denote the translation and rotation error variables respectively; S400: Calculate the system PID control rate of the UAV power model based on the state constraint through the nonlinear PID control algorithm. The system PID control rate includes the translation error equation control law u′ t And the rotation error equation control law u′ r , the expressions are as follows: Translation error equation control law: Among them, the adaptive PID parameters of the translation error equation control law are: Among them, z v represents the translation tracking error, k P represents the proportionality coefficient, k I represents the integral coefficient, k D represents the differential coefficient, γ represents the design constant, c represents the design constant, Δk p represents the time-varying proportionality coefficient, Δk I represents the time-varying integral coefficient, Δk D represents the time-varying differential coefficient, represents the adaptive parameter, Φ(·) represents the negative feedback parameter of the translation error equation control law; Rotational error equation control law: Among them, the adaptive PID parameters of the rotating error equation control law are: Among them, z w represents the rotation tracking error, k P represents the proportionality coefficient, k I represents the integral coefficient, k D represents the differential coefficient, γ2 represents the design constant, d represents the design constant, Δk p represents the time-varying proportionality coefficient, Δk I represents the time-varying integral coefficient, Δk D represents the time-varying differential coefficient, represents the adaptive parameter, Φ w1 (·) represents the negative feedback parameter of the rotating error equation control law; S500: Preset the state constraint range and train the UAV power model based on the state constraint. The specific steps are as follows: S510: Input the system control signal into the translation error equation control law u′ t , the output is the translation prediction value ξ of the UAV under the state constraint v ; Input the system control signal into the rotation error equation control law u′ r , the output is the rotation prediction value ξ of the UAV running under the state constraints w ; S520: Calculate the translation tracking error z respectively v and the rotation tracking error z w , the calculation expression is as follows: z v =ξ v -a v z w =ξ w -a w (10) Among them, z v represents the translation tracking error, z w represents the rotation tracking error, ξ v represents the translation prediction value under state constraints, ξ w represents the rotation prediction value under state constraints, α v represents the expected value of the translation after the state-dependent function transformation, α w It represents the expected value of the rotation after the state-dependent function transformation, and the expression is as follows: in, F v (t) represents the lower bound of the translation, represents the upper bound of translation, F w (t) represents the rotation lower bound, represents the upper bound of rotation; S530: If the calculated translation tracking error z v and the rotation tracking error z w All decay within the range of state constraints, and a trained UAV power model based on state constraints is obtained. It is believed that the flight of the UAV can be realized under dynamic environment conditions. If the calculated translation tracking error z v and the rotation tracking error z w If the decay does not fall within the state constraint range, the parameters of the UAV power model based on the state constraint are reversely updated, and the process returns to S510.
2. The nonlinear PID attitude control method for unmanned aerial vehicle based on state constraints as claimed in claim 1, characterized in that: The state-dependent function expression in S300 is: Among them, p = v represents the translation error at time t, p = w represents the rotation error at time t, and the initial state satisfies p k (0)∈D k , k = 1, 2; ξ k (t) represents the state-dependent transition function, F k (t) represents the lower bound of the error, Represents the upper bound of the error.
3. A nonlinear PID attitude control method for unmanned aerial vehicle based on state constraints as claimed in claim 2, characterized in that: The state constraint condition range in S500 is [-1.5, 2.5].
