A global sliding mode based pose control method for quadrotor unmanned aerial vehicles
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HARBIN ENG UNIV
- Filing Date
- 2025-03-18
- Publication Date
- 2026-08-07
AI Technical Summary
本发明提出了一种基于全局滑模的四旋翼无人机位姿控制方法,在常规约束的基础上,通过将全局滑模控制律作为收缩约束,解决了四旋翼无人机的轨迹跟踪问题
[0057] Compared with the prior art, the present invention:
Smart Images

Figure CN120255564B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) control technology, and is a method for attitude control of a quadrotor UAV based on global sliding mode. Background Technology
[0002] Quadrotor unmanned aerial vehicles (UAVs) have been widely used in military, agricultural, surveying, and industrial fields due to their high flexibility and low cost. However, quadrotor UAV models exhibit strong coupling and nonlinear characteristics, making it difficult for traditional linear control methods to achieve accurate trajectory tracking control. In recent years, nonlinear control methods such as sliding mode control and backstepping have been widely used in quadrotor UAV control, but these methods still have certain limitations when dealing with the output constraints of actual controllers. Nonlinear model predictive control methods can effectively handle output constraints, and therefore have attracted widespread attention from researchers.
[0003] Currently, typical nonlinear model predictive control methods mainly involve direct optimization within a specified time domain, incorporating state and output constraints. For example, in Li Yuxi's paper "Research on Model Predictive Control Algorithm Based on State Estimation," the allowable control outputs are defined as a set, and this set is used as the output constraint for optimization. Similarly, in Yun Xingyu's paper "Nonlinear Model Predictive Control of Perception-Driven Quadruped Robots," the robot's joint constraints and collision avoidance constraints are treated as equality and inequality state constraints, upon which the nonlinear programming problem is solved.
[0004] In the controller design process described in the above literature, since the time domain of action is finite, the results obtained may not guarantee system state convergence. This invention proposes a quadrotor UAV attitude control method based on global sliding mode. By using a global sliding mode control law as a contraction constraint, the trajectory tracking problem of the quadrotor UAV is solved, building upon conventional constraints. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the purpose of this invention is to enable quadrotor UAVs to effectively track trajectories under output constraints and convergence assurance conditions, thereby improving control accuracy, response speed, and safety during flight. This invention provides a quadrotor UAV attitude control method based on global sliding mode.
[0006] This invention provides the following technical solutions:
[0007] A method for attitude control of a quadrotor unmanned aerial vehicle based on global sliding mode, the method comprising the following steps:
[0008] Step 1: Construct a quadcopter drone model and obtain the nonlinear state-space description of the quadcopter drone;
[0009] Step 2: Based on the constructed model, design the global sliding mode auxiliary control law;
[0010] Step 3: Based on the output of the position subsystem controller, establish a nonlinear model predictive controller to control the attitude of the quadcopter UAV;
[0011] Step 4: Evaluate the attitude control effect of the quadcopter drone.
[0012] Preferably, step 1 specifically comprises:
[0013] The motion model of the quadcopter drone is constructed and represented by the following formula:
[0014]
[0015] The state and input quantities of the quadcopter UAV dynamic model include: p = [xyz] T The position vector of the UAV; Let Θ be the velocity vector of the UAV in the ground frame; Θ = [φθψ] T Let be the attitude angle vector of the UAV; b ω=[ b ω x b ω y b ω z ] T U is the attitude angular velocity vector of the UAV; L The lift provided by the four rotors; τ = [τ x τ y τ z ] T The torque vector provided by the rotor; m is the mass of the quadcopter UAV, g is the acceleration due to gravity, J = diag(J x J y J z ) represents the moment of inertia matrix of the machine body.
[0016] Preferably, Formula 1 is converted into vector form and decomposed into a position subsystem and an attitude subsystem, as expressed by the following formula:
[0017]
[0018] Where, G = [00g] T And for matrices W(Θ) and C(Θ), b ω) and the virtual control vector u are respectively:
[0019]
[0020] Preferably, step 2 specifically comprises:
[0021] Step 2.1: The control law for the position subsystem is expressed by the following formula:
[0022]
[0023] Where u is the virtual control vector of the position subsystem corresponding to Formula 7; G is the known parameter vector; e is the desired acceleration vector; p =pp d Position deviation vector This is the velocity deviation vector; Let λ be the sliding surface of the position subsystem. p =diag(λ x ,λ y ,λ z ), where element λ x , λ y , λ z The parameters are designable and satisfy λ. x ,λ y ,λ z >0; Λ p =diag(a x ,a y ,a z ), where element a x a y a z The parameters are designable and satisfy a. x ,a y ,a z >0; k p =diag(k) x ,k y ,k z Similarly, k x k y k z The parameters are designable and satisfy k x ,k y ,k z >0; For the symbolic function sgn(·), it is expressed by the following formula:
[0024]
[0025] Step 2.2: Design the control law expression for the attitude subsystem, expressed by the following formula:
[0026]
[0027] Where, τ=[τ x τ y τ z ] TJ is the torque vector; J is the known parameter matrix; e is the second derivative vector of the desired attitude angle; a =Θ-Θ d This is the attitude angle deviation vector; The attitude angle derivative deviation vector; Let λ be the sliding surface of the attitude subsystem. a =diag(λ φ ,λ θ ,λ ψ ), where element λ φ , λ θ , λ ψ The parameters are designable and satisfy λ. φ ,λ θ ,λ ψ >0; Λ a =diag(a φ ,a θ ,a ψ ), where element a φ a θ a ψ The parameters are designable and satisfy a. φ ,a θ ,a ψ >0; k a =diag(k) φ ,k θ ,k ψ Similarly, k φ k θ k ψ The parameters are designable and satisfy k φ ,k θ ,k ψ >0, for matrix W -1 (Θ) They are respectively:
[0028]
[0029] Preferably, step 3 specifically comprises:
[0030] Step 3.1: Describe the NMPC of the location subsystem using a nonlinear programming problem, expressed by the following equation:
[0031]
[0032] Where the superscript "^" indicates a variable in the prediction time domain, P p and Q p The matrix is a designable positive definite matrix, and T is the prediction duration;
[0033] Due to virtual control quantity and The physical meaning is the acceleration provided by the rotor in the three axes of the ground coordinate system, since 0≤U L ≤U Lmax And according to Newton's second law, we can obtain:
[0034]
[0035] get As an inequality constraint, under the action of Formula 8 of the global sliding mode auxiliary control law for the position subsystem, the position subsystem satisfies:
[0036]
[0037] in, It is a Lyapunov function. Its derivative; β is the derivative of λ. p and Λ p The smallest element of the set consisting of all diagonal elements;
[0038] Step 3.2: Since the position subsystem controller output is a virtual control quantity Map it to the desired lift U by controlling the allocation. Ld Desired pitch angle θ d and expected roll angle φ d ,set up The control allocation expression is:
[0039]
[0040] By controlling the distribution, the desired lift U is obtained. Ld At the same time, it can also obtain the desired pitch angle θ d and expected roll angle φ d The desired yaw angle ψ is predicted by combining a nonlinear model with externally provided data from the controller. d This allows us to obtain the desired attitude angle vector Θ for the attitude subsystem. d =[φ d θ d ψ d ] T ;
[0041] Step 3.3: Describe the NMPC of the attitude subsystem using a nonlinear programming problem, expressed by the following equation:
[0042]
[0043] Among them, P a and Q a It is a designable positive definite matrix;
[0044] Under the action of global sliding mode auxiliary control law formula 10, the attitude subsystem satisfies:
[0045]
[0046] in, It is a Lyapunov function. Its derivative; α is the derivative of λ. a and Λ a The smallest element of the set consisting of all diagonal elements.
[0047] Preferably, the Lyapunov function V p For the exponential convergence to 0, the predictive controller of the nonlinear model of the position subsystem must allow the Lyapunov function V to... p It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, add As obtained from the solution Contraction constraints.
[0048] Preferably, the Lyapunov function V a The exponential convergence to 0 requires that the nonlinear model predictive controller of the attitude subsystem allow the Lyapunov function V to... a It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, add As obtained from the solution Contraction constraints.
[0049] A global sliding mode-based attitude control system for a quadcopter unmanned aerial vehicle (UAV), the system comprising:
[0050] The model building module constructs a quadcopter UAV model and obtains a nonlinear state-space description of the quadcopter UAV.
[0051] An auxiliary control law module, which designs a global sliding mode auxiliary control law based on the constructed model;
[0052] The predictive controller module establishes a nonlinear model predictive controller based on the output of the position subsystem controller to control the attitude of the quadcopter UAV.
[0053] The evaluation module evaluates the attitude control effect of the quadcopter UAV.
[0054] A computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a global sliding mode-based attitude control method for a quadcopter unmanned aerial vehicle.
[0055] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a quadcopter unmanned aerial vehicle (UAV) attitude control method based on global sliding mode.
[0056] The present invention has the following beneficial effects:
[0057] Compared with the prior art, the present invention:
[0058] The method proposed in this invention combines the convergence of global sliding mode control and the optimization capability of nonlinear model predictive control, enabling high-precision trajectory tracking control under complex nonlinear models and actual controller output constraints. By using the global sliding mode control law as a contraction constraint and incorporating stability analysis of Lyapunov functions, this invention ensures the stability of the system under complex nonlinear models, avoiding the distortion problem of traditional linearization methods at large angles. Simultaneously, the optimization capability of nonlinear model predictive control allows the system to optimize the control input in each control time domain, ensuring optimal trajectory tracking performance while satisfying constraints. Attached Figure Description
[0059] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0060] Figure 1 The flowchart shown is a flowchart of the method of the present invention;
[0061] Figure 2 The diagram shown is a structural diagram of the quadcopter drone of the present invention.
[0062] Figure 3 The diagram shown is a system structure block diagram corresponding to process 2 of the present invention.
[0063] Figure 4 The diagram shown is the system structure block diagram corresponding to process 3 of the present invention.
[0064] Figure 5 The image shown is a two-dimensional curve of trajectory tracking for simulation condition 1 of the present invention.
[0065] Figure 6The diagram shown is a position-time curve for simulation condition 1 of this invention.
[0066] Figure 7 The image shown is a three-dimensional curve of trajectory tracking in simulation condition 2 of the present invention.
[0067] Figure 8 The figure shown is the position-time curve for simulation condition 2 of this invention. Detailed Implementation
[0068] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0069] The present invention will be described in detail below with reference to specific embodiments. Specific Implementation Example 1:
[0071] according to Figures 1 to 8 As shown, the specific optimized technical solution adopted by the present invention to solve the above-mentioned technical problems is: The present invention relates to a quadrotor UAV attitude control method based on global sliding mode.
[0072] This invention provides a method for attitude control of a quadrotor unmanned aerial vehicle based on global sliding mode, the method comprising the following steps:
[0073] Step 1: Construct a quadcopter drone model and obtain the nonlinear state-space description of the quadcopter drone;
[0074] Step 2: Based on the constructed model, design the global sliding mode auxiliary control law;
[0075] Step 3: Based on the output of the position subsystem controller, establish a nonlinear model predictive controller to control the attitude of the quadcopter UAV;
[0076] Step 4: Evaluate the attitude control effect of the quadcopter drone. Specific Implementation Example 2:
[0078] The only difference between Embodiment 2 and Embodiment 1 of this application is that:
[0079] Step 1 specifically involves:
[0080] The motion model of the quadcopter drone is constructed and represented by the following formula:
[0081]
[0082] The state and input quantities of the quadcopter UAV dynamic model include: p = [xyz] T The position vector of the UAV; Let Θ be the velocity vector of the UAV in the ground frame; Θ = [φθψ] T Let be the attitude angle vector of the UAV; b ω=[ b ω x b ω y b ω z ] T U is the attitude angular velocity vector of the UAV; L The lift provided by the four rotors; τ = [τ x τ y τ z ] T The torque vector provided by the rotor; m is the mass of the quadcopter UAV, g is the acceleration due to gravity, J = diag(J x J y J z ) represents the moment of inertia matrix of the machine body. Specific Implementation Example 3:
[0084] The only difference between Embodiment 3 and Embodiment 2 of this application is that:
[0085] Equation 1 can be transformed into vector form and decomposed into a position subsystem and an attitude subsystem, as expressed by the following equation:
[0086]
[0087] Where, G = [00g] T And for matrices W(Θ) and C(Θ), b ω) and the virtual control vector u are respectively:
[0088] Specific Implementation Example 4:
[0090] The only difference between Embodiment 4 and Embodiment 3 of this application is that:
[0091] Step 2 specifically involves:
[0092] Step 2.1: The control law for the position subsystem is expressed by the following formula:
[0093]
[0094] Where u is the virtual control vector of the position subsystem corresponding to Formula 7; G is the known parameter vector; e is the desired acceleration vector; p =ppd Position deviation vector This is the velocity deviation vector; Let λ be the sliding surface of the position subsystem. p =diag(λ x ,λ y ,λ z ), where element λ x , λ y , λ z The parameters are designable and satisfy λ. x ,λ y ,λ z >0; Λ p =diag(a x ,a y ,a z ), where element a x a y a z The parameters are designable and satisfy a. x ,a y ,a z >0; k p =diag(k) x ,k y ,k z Similarly, k x k y k z The parameters are designable and satisfy k x ,k y ,k z >0; For the symbolic function sgn(·), it is expressed by the following formula:
[0095]
[0096] Step 2.2: Design the control law expression for the attitude subsystem, expressed by the following formula:
[0097]
[0098] Where, τ=[τ x τ y τ z ] T J is the torque vector; J is the known parameter matrix; e is the second derivative vector of the desired attitude angle; a =Θ-Θ d This is the attitude angle deviation vector; The attitude angle derivative deviation vector; Let λ be the sliding surface of the attitude subsystem. a =diag(λ φ ,λ θ ,λψ ), where element λ φ , λ θ , λ ψ The parameters are designable and satisfy λ. φ ,λ θ ,λ ψ >0; Λ a =diag(a φ ,a θ ,a ψ ), where element a φ a θ a ψ The parameters are designable and satisfy a. φ ,a θ ,a ψ >0; k a =diag(k) φ ,k θ ,k ψ Similarly, k φ k θ k ψ The parameters are designable and satisfy k φ ,k θ ,k ψ >0, for matrix W -1 (Θ) They are respectively:
[0099] Specific Implementation Example 5:
[0101] The difference between Embodiment 5 and Embodiment 4 of the present invention lies only in:
[0102] Step 3 specifically involves:
[0103] Step 3.1: Describe the NMPC of the location subsystem using a nonlinear programming problem, expressed by the following equation:
[0104]
[0105] Where the superscript "^" indicates a variable in the prediction time domain, P p and Q p The matrix is a designable positive definite matrix, and T is the prediction duration;
[0106] Due to virtual control quantity and The physical meaning is the acceleration provided by the rotor in the three axes of the ground coordinate system, since 0≤U L ≤U Lmax And according to Newton's second law, we can obtain:
[0107]
[0108] get As an inequality constraint, under the action of Formula 8 of the global sliding mode auxiliary control law for the position subsystem, the position subsystem satisfies:
[0109]
[0110] in, It is a Lyapunov function. Its derivative; β is the derivative of λ. p and Λ p The smallest element of the set consisting of all diagonal elements;
[0111] Step 3.2: Since the position subsystem controller output is a virtual control quantity Map it to the desired lift U by controlling the allocation. Ld Desired pitch angle θ d and expected roll angle φ d ,set up The control allocation expression is:
[0112]
[0113] By controlling the distribution, the desired lift U is obtained. Ld At the same time, it can also obtain the desired pitch angle θ d and expected roll angle φ d The desired yaw angle ψ is predicted by combining a nonlinear model with externally provided data from the controller. d This allows us to obtain the desired attitude angle vector Θ for the attitude subsystem. d =[φ d θ d ψ d ] T ;
[0114] Step 3.3: Describe the NMPC of the attitude subsystem using a nonlinear programming problem, expressed by the following equation:
[0115]
[0116] Among them, P a and Q a It is a designable positive definite matrix;
[0117] Under the action of global sliding mode auxiliary control law formula 10, the attitude subsystem satisfies:
[0118]
[0119] in, It is a Lyapunov function. Its derivative; α is the derivative of λ. a and Λ a The smallest element of the set consisting of all diagonal elements. Specific Implementation Example Six:
[0121] The difference between Embodiment Six and Embodiment Five of the present invention lies only in:
[0122] Lyapunov function V p For the exponential convergence to 0, the predictive controller of the nonlinear model of the position subsystem must allow the Lyapunov function V to... p It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, add As obtained from the solution Contraction constraints. Specific Implementation Example 7:
[0124] The difference between Embodiment Seven and Embodiment Six of the present invention lies only in:
[0125] Lyapunov function V a The exponential convergence to 0 requires that the nonlinear model predictive controller of the attitude subsystem allow the Lyapunov function V to... a It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, add As obtained from the solution Contraction constraints. Specific Implementation Example 8:
[0127] The difference between Embodiment 8 and Embodiment 7 of the present invention lies only in:
[0128] This invention provides a global sliding mode-based attitude control system for a quadcopter unmanned aerial vehicle (UAV), the system comprising:
[0129] The model building module constructs a quadcopter UAV model and obtains a nonlinear state-space description of the quadcopter UAV.
[0130] An auxiliary control law module, which designs a global sliding mode auxiliary control law based on the constructed model;
[0131] The predictive controller module establishes a nonlinear model predictive controller based on the output of the position subsystem controller to control the attitude of the quadcopter UAV.
[0132] The evaluation module evaluates the attitude control effect of the quadcopter UAV. Specific Implementation Example Nine:
[0134] The difference between Embodiment Nine and Embodiment Eight of the present invention lies only in:
[0135] The present invention provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a global sliding mode-based attitude control method for a quadcopter unmanned aerial vehicle. Specific Implementation Example 10:
[0137] The only difference between Embodiment 10 and Embodiment 9 of the present invention is that:
[0138] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a quadcopter unmanned aerial vehicle (UAV) attitude control method based on global sliding mode. Specific Implementation Example Eleven:
[0140] The only difference between Embodiment Eleven and Embodiment Ten of this invention is that:
[0141] The flowchart of this invention is as follows Figure 1 As shown, firstly, a dynamic model of the quadrotor UAV is modeled to obtain its nonlinear state-space description; then, for this nonlinear model, global sliding mode control laws are designed for the position and attitude subsystems respectively; next, for the output of the position subsystem controller, the desired acceleration is mapped to the desired lift and attitude angle by designing control assignment; finally, by using the previously designed global sliding mode control law as a contraction constraint, a nonlinear programming problem corresponding to the nonlinear model predictive controller is constructed, and the control quantity can be obtained by solving this problem.
[0142] The flowchart of the present invention is as follows Figure 1 As shown, the process comprises four steps. First, by studying the motion mechanism of the quadrotor UAV, a dynamic model of the quadrotor UAV is modeled, and the kinematic and dynamic models of the position and attitude subsystems of the quadrotor UAV are described by a set of nonlinear differential equations. Second, to ensure that the trajectory tracking of the quadrotor UAV satisfies stability in the Lyapunov sense, based on the nonlinear motion model obtained in the previous step, global sliding mode control laws are designed for the position and attitude subsystems of the quadrotor UAV using the global sliding mode control method. Third, to further improve the dynamic performance of the control system, corresponding finite-time objective functions are designed for the position and attitude subsystems. The dynamic model of the quadrotor UAV is used as an equality constraint, and the saturation limit of the actuator and the global sliding mode contraction constraint are used as inequality constraints. Solving the nonlinear programming problem composed of the aforementioned objective functions and constraints allows for better dynamic performance while ensuring the stability of the system in the Lyapunov sense.
[0143] 1. Quadrotor UAV Model Construction
[0144] Assumption 1: The quadcopter drone is a rigid body structure with uniform mass distribution, and its center of mass coincides with the origin of the body coordinate system.
[0145] The structure of a quadcopter drone is as follows Figure 2 As shown. Where 1, 2, 3, and 4 are the corresponding rotor numbers; O e x e y e z e Let x be the ground coordinate system. e The axis points due north, y e The axis points due east, z e The axis points to the Earth's center; O b x b y b z b Let φ be the body coordinate system, φ be the roll angle of the quadcopter UAV, θ be the pitch angle, and ψ be the yaw angle.
[0146] The expression for the motion model of a quadcopter drone is:
[0147]
[0148] In the above formula, the state and input quantities of the quadcopter UAV dynamic model include: p = [xyz] T The position vector of the UAV; Let Θ be the velocity vector of the UAV in the ground frame; Θ = [φθψ] T Let be the attitude angle vector of the UAV; b ω=[ b ω x b ω y b ω z ] T U is the attitude angular velocity vector of the UAV; L The lift provided by the four rotors; τ = [τ x τ y τ z ] T The torque vector provided to the rotor.
[0149] In addition, the above formula also includes relevant parameters of the quadcopter drone: m is the mass of the quadcopter drone, which can be directly measured by weighing; g is the acceleration due to gravity, which can be experimentally measured by methods such as free fall, pendulum, inclined plane, and photoelectric gate; J = diag(J x J y J z Let J be the moment of inertia matrix of the machine body, where the moment of inertia J about each axis is... x Jy J z It can be measured by methods such as the torsion pendulum method, the compound pendulum method, and the rotating disk method.
[0150] Furthermore, based on the above vector definitions, equation (1) can be transformed into vector form and decomposed into a position subsystem and an attitude subsystem as follows:
[0151]
[0152]
[0153] Where, G = [00g] T And for matrices W(Θ) and C(Θ), b ω) and the virtual control vector u are respectively:
[0154]
[0155] 2. Design of Global Sliding Mode Auxiliary Control Law
[0156] This section comprises two parts: the design of the control law for the position subsystem of the quadrotor UAV and the design of the control law for the attitude subsystem of the quadrotor UAV. It is important to note that... Figure 1 As can be seen, the global sliding mode control law designed in this section is an auxiliary control law. It does not directly act on the controlled object, but is used to provide contraction constraints for the next process. Therefore, only control laws need to be designed for the position and attitude subsystems respectively, without the need for intermediate control allocation links. The corresponding system structure block diagram for this section is as follows: Figure 3 As shown.
[0157] Step 1: Design of the control law for the position subsystem
[0158] This patent utilizes a global sliding mode control method to design auxiliary control laws for position and attitude subsystems. By simultaneously introducing sliding surfaces and state deviations into the Lyapunov function, the designed control law enables both the sliding surfaces and state deviations to converge to 0, ensuring that the system achieves global convergence of the sliding surfaces and state deviations while maintaining stability in the Lyapunov sense.
[0159] The control law expression for the position subsystem is:
[0160]
[0161] In the above formula, u is the virtual control vector of the position subsystem corresponding to formula (7); G is the known parameter vector; The desired acceleration vector can be obtained by performing a second-order difference on the desired position; e p =pp d Let p be the position deviation vector, where the position p can be obtained through measurement; Let be the velocity deviation vector, where the velocity vector is... It can be obtained through measurement, and the desired velocity vector It can be obtained by differencing the desired position; Let λ be the sliding surface of the position subsystem. p =diag(λ x ,λ y ,λ z ), where element λ x , λ y , λ z The parameters are designable and satisfy λ. x ,λ y ,λ z >0; Λ p =diag(a x ,a y ,a z ), where element a x a y a z The parameters are designable and satisfy a. x ,a y ,a z >0; k p =diag(k) x ,k y ,k z Similarly, k x k y k z The parameters are designable and satisfy k x ,k y ,k z >0. For the symbolic function sgn(·), its expression is:
[0162]
[0163] Step 2: Attitude Subsystem Control Law Design
[0164] The control law expression for the attitude subsystem is as follows:
[0165]
[0166] In the above formula, τ=[τ x τ y τ z ] T J is the torque vector; J is the known parameter matrix; The vector of the second derivative of the desired attitude angle can be obtained by performing a second-order difference on the desired attitude angle; e a =Θ-Θ d Let θ be the attitude angle deviation vector, where the attitude angle Θ can be obtained through measurement; Let be the attitude angle derivative deviation vector, where can be Calculations show that b ω can be obtained through measurement, and It can be obtained by differentiating the desired attitude angle; Let λ be the sliding surface of the attitude subsystem. a =diag(λ φ ,λ θ ,λ ψ ), where element λ φ , λ θ , λ ψ The parameters are designable and satisfy λ. φ ,λ θ ,λ ψ >0;
[0167] Λ a =diag(a φ ,a θ ,a ψ ), where element a φ a θ a ψ The parameters are designable and satisfy a. φ ,a θ ,a ψ >0;
[0168] k a =diag(k) φ ,k θ ,k ψ Similarly, k φ k θ k ψ The parameters are designable and satisfy k φ ,k θ ,k ψ >0. For matrix W -1 (Θ) They are respectively:
[0169]
[0170]
[0171] 3. Design of Nonlinear Model Predictive Controller
[0172] This section comprises three parts: the design of a nonlinear model predictive controller for the position subsystem of a quadrotor UAV, control assignment, and the design of a nonlinear model predictive controller for the attitude subsystem of a quadrotor UAV. Since the only externally given expected value for the controller is the expected position vector p... d =[x d y dz d ] T and desired yaw angle ψ d Furthermore, the output of the position subsystem controller is a virtual control vector u, therefore u must first be mapped to the desired lift U through control allocation. L Desired pitch angle θ d and expected roll angle φ d Based on this, the desired attitude angle Θ is obtained. d =[φ d θ d ψ d ] T The input is fed into the nonlinear model predictive controller of the attitude subsystem, and the corresponding desired torque is finally solved. The system structure block diagram corresponding to this section is as follows. Figure 4 As shown.
[0173] Step 1: Design of a Nonlinear Model Predictive Controller for the Position Subsystem
[0174] This patent provides actual control inputs for a controlled quadrotor UAV based on a nonlinear model predictive control method. For the nonlinear model predictive control method, firstly, an objective function is constructed for the prediction time domain. Then, the system dynamic model and initial state values are used as equality constraints, while control input saturation constraints and global sliding mode contraction constraints are used as inequality constraints. Finally, the nonlinear programming problem is solved to obtain the optimal control sequence that minimizes the objective function and satisfies all constraints. The first element of this sequence is taken as the control input at the current time step. This solution process is repeated for the control input at each subsequent time step.
[0175] The NMPC of the location subsystem can be described by the following nonlinear programming problem:
[0176]
[0177] In the above formula, the superscript "^" indicates a variable in the prediction time domain. For the objective function J... p It is designed to be based on the position deviation vector With virtual control vector The quadratic form, where P p and Q p Let T be a designable positive definite matrix, and T be the prediction duration. For the equality constraints, on the one hand, they contain the kinematic and dynamic equations of the position subsystem; on the other hand, for each time t, the control law should be calculated using the above equation. Therefore, the equality constraints include the initialization of assigning the current state to the initial time of the prediction time domain. For the inequality constraints, on the one hand, due to the virtual control quantity… and The physical meaning is the acceleration provided by the rotor in the three axes of the ground coordinate system, since 0≤U L≤U Lmax And according to Newton's second law, we can obtain:
[0178]
[0179] Therefore, we can obtain As an inequality constraint. On the other hand, under the action of the global sliding mode auxiliary control law (8) of the position subsystem, the position subsystem satisfies:
[0180]
[0181] In the above formula, It is a Lyapunov function. Its derivative; β is the derivative of λ. p and Λ p The smallest element of the set consisting of all diagonal elements. From equation (15), we know that the Lyapunov function V... p The exponential convergence to 0 is necessary. Therefore, for the position subsystem's nonlinear model predictive controller to allow the Lyapunov function V to converge to 0, the Lyapunov function V must be optimized. p It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, it is therefore necessary to add... As obtained from the solution Contraction constraints.
[0182] Step 2: Control Allocation
[0183] Because the position subsystem controller output is a virtual control quantity Therefore, it is necessary to map it to the desired lift U through control allocation. Ld Desired pitch angle θ d and expected roll angle φ d .set up The control allocation expression is:
[0184]
[0185] By controlling the distribution, the desired lift U is obtained. Ld At the same time, it can also obtain the desired pitch angle θ d and expected roll angle φ d The desired yaw angle ψ provided externally to the controller is predicted using a nonlinear model. d This allows us to obtain the desired attitude angle vector Θ for the attitude subsystem. d =[φ d θ d ψ d ] T .
[0186] Step 3: Design of Nonlinear Model Predictive Controller for Attitude Subsystem
[0187] The NMPC of the attitude subsystem can be described by the following nonlinear programming problem:
[0188]
[0189] For the objective function J a Similar to the position subsystem, it is designed based on the attitude angle deviation vector. With torque vector The quadratic form, where P a and Q a It is a designable positive definite matrix. For the equality constraints, on the one hand, it includes the kinematic and dynamic equations of the attitude subsystem; on the other hand, it includes the initialization of assigning the current state to the initial time of the prediction time domain. For the inequality constraints, on the one hand, the torque itself has saturation constraints. On the other hand, under the action of the global sliding mode auxiliary control law (10) of the attitude subsystem, the attitude subsystem satisfies:
[0190]
[0191] In the above formula, It is a Lyapunov function. Its derivative; α is the derivative of λ. a and Λ a The smallest element of the set consisting of all diagonal elements. From equation (18), we know that the Lyapunov function V... a The exponential convergence to 0 is necessary. Therefore, for the attitude subsystem's nonlinear model predictive controller to allow the Lyapunov function V to converge to 0, the following conditions must be met. a It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, it is therefore necessary to add... As obtained from the solution Contraction constraints.
[0192] 4. Evaluation of the attitude control effect of quadcopter UAV
[0193] In this section, simulation experiments will be conducted under two different operating conditions to verify the superiority of the method proposed in this patent in terms of dynamic performance and control accuracy compared with the traditional global sliding mode control method.
[0194] The relevant parameters of the quadcopter UAV used in the simulation are shown in Table 1, and the relevant parameters of the auxiliary control law and NMPC are shown in Table 2.
[0195] Table 1. Relevant parameters of the quadcopter UAV
[0196]
[0197] Table 2. Parameters related to the global sliding mode auxiliary control law and the nonlinear model predictive controller.
[0198]
[0199]
[0200] In the table above, h is the prediction period, ΔT is the simulation step size, and the prediction duration T is related to both by the formula T = h·ΔT. Furthermore, the initial state of the system is set to 0.
[0201] For performance metrics, this section uses the root mean square error (RMSE) for comparison, and its expression is as follows:
[0202]
[0203] Step 1: Planar "8"-shaped trajectory tracking
[0204] In this trajectory tracking experiment, the desired trajectory equation and the desired yaw angle are as follows:
[0205]
[0206] The simulation image of working condition 1 is provided by Figure 5 and Figure 6 As shown in the legend, "Desired" represents the desired trajectory; "NMPC" represents the actual trajectory of the quadrotor UAV under the method proposed in this patent; and "GSMC" represents the actual trajectory of the quadrotor UAV under the traditional global sliding mode method. Figure 5 and Figure 6 As can be seen, the method proposed in this patent significantly improves the response speed. Using the method proposed in this patent as the controller, the quadcopter UAV tracks its trajectory with almost no delay, while using the traditional global sliding mode method as the controller, the actual trajectory of the quadcopter UAV converges to near the desired trajectory after 6.7 seconds. Furthermore, in terms of accuracy, the RMSE of the method proposed in this patent is 0.0177, while the RMSE of the traditional global sliding mode method is 0.0491, representing an improvement of 177.4%.
[0207] Step 2: Tracking the spatial spiral trajectory
[0208] In this trajectory tracking experiment, the desired trajectory equation and the desired yaw angle are as follows:
[0209]
[0210] The simulation image of working condition 2 is from Figure 7 and Figure 8As shown in the previous simulation experiment, using the traditional global sliding mode method as the controller, the quadcopter UAV converged to the vicinity of the desired trajectory in about 4.5 seconds, while the method proposed in this patent consumed almost no time. In terms of accuracy, the RMSE of the method proposed in this patent is 0.0271, while the RMSE of the traditional global sliding mode method is 0.1014, representing an improvement of 274.2%.
[0211] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or N embodiments or examples. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of the present invention, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified. Any process or method described in the flowcharts or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logical functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain. The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection having one or N wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM).Furthermore, the computer-readable medium can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory. It should be understood that various parts of the invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0212] The above description is merely a preferred embodiment of a global sliding mode-based quadrotor UAV pose control method. The scope of protection for this method is not limited to the above embodiments; all technical solutions falling within this conceptual framework are within the scope of protection of this invention. It should be noted that for those skilled in the art, any improvements and variations made without departing from the principles of this invention should also be considered within the scope of protection of this invention.
Claims
1. A method for attitude control of a quadrotor unmanned aerial vehicle based on global sliding mode, characterized by: The method includes the following steps: Step 1: Construct a quadcopter drone model and obtain the nonlinear state-space description of the quadcopter drone; Step 2: Based on the constructed model, design the global sliding mode auxiliary control law; Step 3: Based on the output of the position subsystem controller, establish a nonlinear model predictive controller to control the attitude of the quadcopter UAV; Step 4: Evaluate the attitude control effect of the quadcopter drone; Step 1 specifically involves: The motion model of the quadcopter drone is constructed and represented by the following formula: (1) The states and inputs of the quadcopter drone dynamic model include: The position vector of the UAV; Let be the velocity vector of the UAV in the ground frame. Let be the attitude angle vector of the UAV; Let be the attitude angular velocity vector of the UAV; The lift provided to the four rotors; The torque vector provided to the rotor; For the mass of the quadcopter drone, It is the acceleration due to gravity. The moment of inertia matrix of the machine body; Step 2 specifically involves: Step 2.1: The control law for the position subsystem is expressed by the following formula: (8) in, This is the virtual control vector for the position subsystem corresponding to Formula 7; Given a vector of parameters; The desired acceleration vector; Position deviation vector This is the velocity deviation vector; For the sliding surface of the position subsystem, where , of which elements , , For designable parameters, and satisfying ; , of which elements , , For designable parameters, and satisfying ; Similarly, , , For designable parameters, and satisfying For symbolic functions It can be expressed by the following formula: (9) Step 2.2: Design the control law expression for the attitude subsystem, expressed by the following formula: (10) in, This is the torque vector; Given a parameter matrix; Let be the second derivative vector of the desired attitude angle; This is the attitude angle deviation vector; The attitude angle derivative deviation vector; For the attitude subsystem sliding surface, where , of which elements , , For designable parameters, and satisfying ; , of which elements , , For designable parameters, and satisfying ; Similarly, , , For designable parameters, and satisfying For matrix , They are respectively: (11) (12); Step 3 specifically involves: Step 3.1: Describe the NMPC of the location subsystem using a nonlinear programming problem, expressed by the following equation: (13) Among them, the superscript " " indicates the variable in the prediction time domain, and It is a designable positive definite matrix. For the predicted duration; Due to virtual control quantity , and The physical meaning is the acceleration provided by the rotor in the three axes of the ground coordinate system, due to And according to Newton's second law, we can obtain: (14) get As an inequality constraint, under the action of Formula 8 of the global sliding mode auxiliary control law for the position subsystem, the position subsystem satisfies: (15) in, It is a Lyapunov function. Its derivative; For the reason and The smallest element of the set consisting of all diagonal elements; Step 3.2: Since the position subsystem controller output is a virtual control quantity Mapping it to the desired lift by controlling the allocation Desired pitch angle and expected roll angle ,set up The control allocation expression is: (16) By controlling the distribution, the desired lift can be obtained. At the same time, it can also obtain the desired pitch angle. and expected roll angle Combined with a nonlinear model, the expected yaw angle provided externally to the controller is predicted. This allows us to obtain the desired attitude angle vector for the attitude subsystem. ; Step 3.3: Describe the NMPC of the attitude subsystem using a nonlinear programming problem, expressed by the following equation: (17) in, and It is a designable positive definite matrix; Under the action of global sliding mode auxiliary control law formula 10, the attitude subsystem satisfies: (18) in, It is a Lyapunov function. Its derivative; For the reason and The smallest element of the set consisting of all diagonal elements.
2. The method according to claim 1, characterized in that: Equation 1 can be transformed into vector form and decomposed into a position subsystem and an attitude subsystem, as expressed by the following equation: (2) (3) in, And for matrix , and virtual control vector They are respectively: (5) (6) (7)。 3. The method according to claim 2, characterized in that: Lyapunov function For the exponential function to converge to 0, the predictive controller of the nonlinear model of the position subsystem must allow the Lyapunov function to... It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, add As obtained from the solution Contraction constraints.
4. The method according to claim 3, characterized in that: Lyapunov function The exponential convergence to 0 requires that the nonlinear model predictive controller of the attitude subsystem allow the Lyapunov function to... It converges at a speed no slower than that of the auxiliary control law, and because the solution obtained... Only keep As the control variable at the current moment, add As obtained from the solution Contraction constraints.
5. A quadrotor UAV attitude control system based on global sliding mode, wherein the system is based on the quadrotor UAV attitude control method based on global sliding mode according to claim 1, characterized in that: The system includes: The model building module constructs a quadcopter UAV model and obtains a nonlinear state-space description of the quadcopter UAV. An auxiliary control law module, which designs a global sliding mode auxiliary control law based on the constructed model; The predictive controller module establishes a nonlinear model predictive controller based on the output of the position subsystem controller to control the attitude of the quadcopter UAV. The evaluation module evaluates the attitude control effect of the quadcopter UAV.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method as claimed in any one of claims 1-4.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the method of any one of claims 1-4.
Citation Information
Patent Citations
Sliding mode delay estimation control method for attitude of quad-rotor unmanned aerial vehicle and storage medium
CN111176311A
Quadrotor unmanned aerial vehicle attitude tracking control method based on nonsingular terminal sliding mode
CN117850212A