A six-rotor unmanned aerial vehicle position-posture hierarchical composite adaptive sliding mode control method
By employing a position-attitude hierarchical composite adaptive sliding mode control method for hexacopter UAVs, the problems of control stability and accuracy of hexacopter UAVs in complex environments in existing technologies are solved. This method achieves fast response and high-precision finite-time convergence, thereby improving the robustness and adaptability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENYANG UNIV
- Filing Date
- 2025-07-10
- Publication Date
- 2026-07-31
AI Technical Summary
Existing hexacopter UAV control methods often suffer from overshoot, oscillation, slow response, and steady-state error when faced with strong uncertain disturbances, high-precision tracking, and real-time adaptive requirements, and cannot meet the high-performance motion control needs in complex environments.
A position-attitude hierarchical composite adaptive sliding mode control method for a six-rotor UAV is adopted. By establishing a dynamic model, designing the terminal sliding surface and adaptive law, online compensation is performed for external disturbances and model uncertainties. Combined with a gain adaptive superspiral sliding mode controller, finite-time convergence and high-precision control are achieved.
It achieves high robustness, fast response and high precision control of hexarotor UAV in complex environments, reduces steady-state error and high-frequency chattering of the system, and improves the system's anti-interference and adaptive capabilities.
Smart Images

Figure CN120652815B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of unmanned aerial vehicle (UAV) control technology, and specifically relates to a method for position and attitude control of a six-rotor UAV based on finite-time hierarchical composite adaptive sliding mode control. Background Technology
[0002] With the continuous advancement of multi-rotor UAV technology, hexacopter UAVs, due to their redundant propulsion systems and high payload capacity, possess significant advantages in complex environmental missions. However, as nonlinear, underactuated systems, hexacopter UAVs are susceptible to various factors such as external disturbances, parameter uncertainties, and modeling errors, making it difficult to guarantee flight control stability and accuracy. Currently, mainstream control methods include PID control, sliding mode control, model reference adaptive control (MRAC), and neural network compensation and model predictive control (MPC). While these methods have achieved certain results in specific scenarios, they often encounter problems such as overshoot, oscillation, slow response, and steady-state error when facing strong uncertain disturbances, high-precision tracking, and real-time adaptation requirements, failing to meet the high-performance motion control needs of hexacopter UAVs in complex environments. Therefore, developing a robust, fast-responding, and adaptive hexacopter UAV control method with complex disturbances has significant theoretical and engineering implications. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and propose a position-attitude hierarchical composite adaptive sliding mode control method for a hexacopter UAV, so as to achieve high-precision, robust, and finite-time convergence motion control of the hexacopter UAV in complex environments.
[0004] To achieve the above objectives, the technical solution provided by this invention is as follows:
[0005] Step 1: Establish a three-dimensional spatial position (x-axis, y-axis, z-axis) and attitude (roll, pitch, yaw) dynamic model of the six-rotor UAV, assuming it is a rigid body, lift is proportional to the square of the rotational speed, air resistance is ignored, and the mass distribution is uniform;
[0006] Determining the differential equation of the location model:
[0007]
[0008] in: Represents the position matrix of the UAV. Represents the velocity matrix of the drone. Indicates the quality of the drone. Represents gravitational acceleration. The unit vector representing the direction of gravity. The force representing the position channel, This indicates external interference;
[0009] Determine the differential equations of the attitude model:
[0010]
[0011] in, This represents the matrix indicating the roll, pitch, and yaw angles of the UAV. The angular velocity matrices of the UAV's roll, pitch, and yaw angles. This represents the diagonal matrix of the moment of inertia. A diagonal matrix representing the distance from the UAV's center of mass to the motor's center of mass. This represents the aerodynamic moment matrix of the UAV. This represents the external disturbance to the attitude angle, and R represents the three-axis transformation matrix between the angular velocity vector and the Euler angle vector.
[0012] Step 2: By defining the position error, design the terminal sliding mode surface and finite-time robust control law, and introduce an adaptive law to compensate for external disturbances and model uncertainties online. Finally, establish a terminal adaptive sliding mode robust controller in the position loop to achieve finite-time accurate tracking of the UAV's three-axis position.
[0013] Step 3: The desired acceleration and thrust signals output by the position loop are converted into desired pitch, roll and yaw reference values in real time through the attitude calculation module, thus completing the position-attitude calculation and command mapping.
[0014] Step 4: To address the nonlinearity and external disturbances in UAV attitude control, a super-helical sliding mode control law is designed. By introducing an adaptive law to dynamically adjust the sliding mode gain, high-frequency chattering is reduced. Finally, a gain-adaptive super-helical sliding mode controller is designed to achieve finite-time robust convergence of attitude angles.
[0015] Step 5: Based on the Lyapunov stability principle, Lyapunov functions were designed for position and attitude respectively, and the stability of the designed system and its ability to converge in a finite time were verified.
[0016] Step 6: The obtained attitude torque signal is transformed into six sets of motor speed commands through inverse dynamics calculation and combined with the hexarotor dynamics model. These commands are then used to drive the motors via PWM modulation, completing the hierarchical composite adaptive sliding mode control of the hexarotor UAV's position and attitude. This achieves precise control of the six-degree-of-freedom flight state. The motor allocation matrix is represented as follows:
[0017]
[0018] Furthermore, the mathematical model for position and orientation established in step 1 includes the following steps in its workflow:
[0019] Step 1.1: According to Newton's second law, we can obtain:
[0020]
[0021] in:
[0022]
[0023] Integrating all the formulas related to position in step 1, we get:
[0024]
[0025] Step 1.2: Since the attitude angle change of the UAV during flight is relatively small, in order to optimize the mathematical model of the UAV, the transformation matrix R can be approximated as an identity matrix:
[0026]
[0027] Integrating all the pose-related formulas from step 1, we get:
[0028]
[0029] Furthermore, in step 2, the terminal adaptive sliding mode robust controller's workflow includes the following steps:
[0030] Step 2.1: Define the error between the actual position and the desired position of the UAV as:
[0031]
[0032] In the formula: This indicates the desired location of the hexacopter drone. This indicates the position tracking error of the drone;
[0033] Step 2.2: Utilizing the properties of sign functions to accelerate convergence within a finite time and effectively suppress system uncertainties and external disturbances, the following terminal sliding surface is defined:
[0034]
[0035] in: , It is a diagonal gain matrix. These are the sign functions representing the position errors along the x, y, and z axes, respectively.
[0036] Step 2.3: To counteract external disturbances and accelerate the convergence speed of the sliding surface, the following robust control law is designed:
[0037]
[0038] Where: a represents the diagonal sliding gain matrix. For external disturbances The estimated value;
[0039] Step 2.4: To achieve asymptotic tracking of external disturbances, a sign function of the sliding mode surface is introduced, and the following adaptive law is designed to estimate the unknown disturbance in real time:
[0040]
[0041] in: For adaptive gain.
[0042] Furthermore, the position-attitude calculation and command mapping in step 3 includes the following steps:
[0043] Step 3.1: In the z-axis direction, establish the following relationship between the resultant force F and the thrust T along the z-axis:
[0044]
[0045] Step 3.2: Calculate the modulus of the total thrust T:
[0046]
[0047] Step 3.3: Calculate the vertical equilibrium equation of the UAV during its spatial motion:
[0048]
[0049] Step 3.4: Transfer the channel obtained from the position controller With channel control quantity , Transformed into the desired signal of the attitude path , :
[0050]
[0051] Furthermore, in step 4, the gain-adaptive superspiral sliding diaphragm control has the following workflow:
[0052] Step 4.1: Define the error between the actual attitude angle and the target attitude angle;
[0053]
[0054] in: This indicates the target attitude angle of the hexacopter UAV. This indicates the attitude tracking error of the drone;
[0055] Step 4.2: Calculate the first and second derivatives of the defined error to obtain the attitude angular velocity error and attitude angular acceleration error, and then make the following substitutions:
[0056]
[0057] Step 4.3: Based on the characteristics of super-spiral sliding film control, define the following sliding mold surface:
[0058]
[0059] in: Represents the diagonal gain matrix;
[0060] Step 4.4: After determining the sliding surface, differentiate the sliding surface function to obtain the controlled parameters. The relationship with the sliding mode derivative directly lets achievable control rate:
[0061]
[0062] Step 4.5: Establish the adaptive law of gain in the superspiral sliding diaphragm control law:
[0063]
[0064] in: and This represents the adaptive law parameter.
[0065] Furthermore, the stability and finite-time convergence verification of the closed-loop system in step 5 includes the following steps:
[0066] Step 5.1: Construct the Lyapunov functions for the position loop and attitude loop, respectively:
[0067]
[0068]
[0069] in: , This represents the error estimate. , , , For ideal gain;
[0070] Step 5.2: Calculate the time derivative And according to the Lyapunov stability determination principle: and hour, Determine whether the closed-loop system is stable;
[0071] Step 5.3: According to the finite-time convergence lemma, search for... and satisfy:
[0072]
[0073] Step 5.4: Calculate the convergence time of the system using the steps in Step 5.3 to ensure that the designed system can converge to a stable state within a finite time.
[0074] This invention proposes a finite-time hierarchical composite adaptive sliding mode control method for six-rotor unmanned aerial vehicles (UAVs). Compared with existing technologies, its advantages include the following:
[0075] 1. High robustness: Adaptive sliding mode gain and online disturbance estimation enable real-time compensation for external disturbances and modeling errors, effectively enhancing the anti-interference capability of the hexarotor system.
[0076] 2. Strong adaptability: The gain parameter can be dynamically adjusted according to the system status, eliminating the need for repeated trial and error, reducing reliance on manual parameter tuning, and adapting to changes in multiple tasks and environments.
[0077] 3. Finite-time convergence: Through terminal sliding mode and super-spiral sliding mode design, the system state converges within a finite time, improving task response speed and dynamic performance.
[0078] 4. High tracking accuracy: Both position and attitude channels significantly reduce steady-state error and overshoot, ensuring high accuracy of UAV attitude control, especially when dealing with complex environments or disturbances, demonstrating better control performance. Attached Figure Description
[0079] Figure 1 This is a flowchart of the position-attitude hierarchical composite adaptive sliding mode control method for a six-rotor UAV proposed in this invention.
[0080] Figure 2 This is a structural diagram of a position-attitude hierarchical composite adaptive sliding mode control system for a six-rotor UAV.
[0081] Figure 3 The image shows the trajectory tracking curve along the X-axis in Experiment Example 1.
[0082] Figure 4 The Y-axis trajectory tracking curve is shown in Experiment Example 1.
[0083] Figure 5 The curve shown is the Z-axis trajectory tracking curve in Experiment Example 1.
[0084] Figure 6 The curve showing the X-axis trajectory tracking error in Experiment Example 1.
[0085] Figure 7 The curve showing the trajectory tracking error in the Y-axis direction in Experiment Example 1.
[0086] Figure 8 The curve showing the trajectory tracking error in the Z-axis direction in Experiment Example 1.
[0087] Figure 9 This is the roll angle tracking curve in Experiment Example 1.
[0088] Figure 10 This is the pitch angle tracking curve in Experiment Example 1.
[0089] Figure 11 This is the yaw angle tracking curve in Experiment Example 1.
[0090] Figure 12 The roll angle tracking error curve is shown in Experiment Example 1.
[0091] Figure 13 The pitch angle tracking error curve is shown in Experiment Example 1.
[0092] Figure 14 The yaw angle tracking error curve is shown in Experiment Example 1.
[0093] Figure 15 The curves are comparison curves of spiral trajectory tracking in Experiment Example 1.
[0094] Figure 16 The image shows the X-axis trajectory tracking error curve of the layered composite control spiral trajectory in Experiment Example 1.
[0095] Figure 17 The image shows the Y-axis trajectory tracking error curve of the layered composite control spiral trajectory in Experiment Example 1.
[0096] Figure 18 The image shows the tracking error curve of the Z-axis direction of the layered composite control spiral trajectory in Experiment Example 1.
[0097] Figure 19 The image shows the roll angle tracking error curve for the layered composite control spiral trajectory in Experiment Example 1.
[0098] Figure 20 The image shows the pitch angle tracking error curve of the layered composite control spiral trajectory in Experiment Example 1.
[0099] Figure 21 The image shows the yaw angle tracking error curve of the layered composite control spiral trajectory in Experiment Example 1.
[0100] Figure 22 The output curve of the layered composite control spiral trajectory position control in Experiment Example 1 is shown.
[0101] Figure 23 The output curve of the hierarchical composite control spiral trajectory attitude control in Experiment Example 1 is shown. Detailed Implementation
[0102] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These fall within the scope of protection of the present application.
[0103] Example 1
[0104] This application discloses a position-attitude hierarchical composite adaptive sliding mode control scheme for a six-rotor unmanned aerial vehicle (UAV), comprising the following steps:
[0105] Step 1: Establish a three-dimensional spatial position (x-axis, y-axis, z-axis) and attitude (roll, pitch, yaw) dynamic model of the six-rotor UAV. It is assumed to be a rigid body, with lift proportional to the square of the rotational speed, and air resistance is ignored. The mass distribution is uniform.
[0106] Determining the differential equation of the location model:
[0107]
[0108] in: Represents the position matrix of the UAV. Represents the velocity matrix of the drone. Indicates the quality of the drone. Represents gravitational acceleration. The unit vector representing the direction of gravity. The force representing the position channel, It indicates external interference.
[0109] Determine the differential equations of the attitude model:
[0110]
[0111] in, This represents the matrix indicating the roll, pitch, and yaw angles of the UAV. The angular velocity matrices of the UAV's roll, pitch, and yaw angles. This represents the diagonal matrix of the moment of inertia. This represents the diagonal matrix representing the distance from the drone's center of mass to the motor's center of mass. Indicates the aerodynamic torque of the drone. R represents the external interference on the attitude angle, and R represents the three-axis transformation matrix between the angular velocity vector and the Euler angle vector.
[0112] Step 2: By defining the position error, designing the terminal sliding mode surface and finite-time robust control law, and introducing an adaptive law to compensate for external disturbances and model uncertainties online, a terminal adaptive sliding mode robust controller was finally designed for the position loop to achieve finite-time accurate tracking of the UAV's three-axis position;
[0113] Step 3: The desired acceleration and thrust signals output by the position loop are converted into desired pitch, roll and yaw reference values in real time through the attitude calculation module, thus completing the position-attitude calculation and command mapping.
[0114] Step 4: To address the nonlinearity and external disturbances in UAV attitude control, a super-helical sliding mode control law is designed. By introducing an adaptive law to dynamically adjust the sliding mode gain, high-frequency chattering is reduced. Finally, a gain-adaptive super-helical sliding mode controller is designed to achieve finite-time robust convergence of attitude angles.
[0115] Step 5: Based on the Lyapunov stability principle, Lyapunov functions were designed for position and attitude respectively, and the stability of the designed system and its ability to converge in a finite time were verified.
[0116] Step 6: System Closed-Loop Coordination and Control Implementation: The obtained attitude torque signal is transformed into six sets of motor speed commands through inverse dynamics calculation and combined with the six-rotor dynamics model. These commands are then used to drive the motors via PWM modulation, completing the hierarchical composite adaptive sliding mode control of the six-rotor UAV's position-attitude, achieving precise control of the six-degree-of-freedom flight state. The motor allocation matrix is represented as follows:
[0117]
[0118] in: Indicates the lift coefficient. This represents the anti-torque coefficient.
[0119] Furthermore, the mathematical model for position and orientation established in step 1 includes the following steps in its workflow:
[0120] Step 1.1: According to Newton's second law, we can obtain:
[0121]
[0122] in:
[0123]
[0124] Integrating all the formulas related to position in step 1, we get:
[0125]
[0126] Step 1.2: Since the attitude angle change of the UAV during flight is relatively small, in order to optimize the mathematical model of the UAV, the transformation matrix R can be approximated as an identity matrix:
[0127]
[0128] Integrating all the pose-related formulas from step 1, we get:
[0129]
[0130] Furthermore, in step 2, the terminal adaptive sliding mode robust controller's workflow includes the following steps:
[0131] Step 2.1: Define the error between the actual position and the desired position of the UAV as:
[0132]
[0133] In the formula: This indicates the desired location of the hexacopter drone. This indicates the position tracking error of the drone;
[0134] Step 2.2: Utilizing the properties of sign functions to accelerate convergence within a finite time and effectively suppress system uncertainties and external disturbances, the following terminal sliding surface is defined:
[0135]
[0136] in: , It is a diagonal gain matrix. These are the sign functions representing the position errors along the x, y, and z axes, respectively.
[0137] Step 2.3: To counteract external disturbances and accelerate the convergence speed of the sliding surface, the following robust control law is designed:
[0138]
[0139] Where: a represents the diagonal sliding gain matrix. For external disturbances The estimated value;
[0140] Step 2.4: To achieve asymptotic tracking of external disturbances, a sign function of the sliding mode surface is introduced, and the following adaptive law is designed to estimate the unknown disturbance in real time:
[0141]
[0142] in: For adaptive gain.
[0143] Furthermore, the position-attitude calculation and command mapping in step 3 includes the following steps:
[0144] Step 3.1: In the z-axis direction, establish the following relationship between the resultant force F and the thrust T along the z-axis:
[0145]
[0146] Step 3.2: Calculate the modulus of the total thrust T:
[0147]
[0148] Step 3.3: Calculate the vertical equilibrium equation of the UAV during its spatial motion:
[0149]
[0150] Step 3.4: Transfer the channel obtained from the position controller With channel control quantity , Transformed into the desired signal of the attitude path , :
[0151]
[0152] Furthermore, in step 4, the gain-adaptive superspiral sliding diaphragm control has the following workflow:
[0153] Step 4.1: Define the error between the actual attitude angle and the target attitude angle;
[0154]
[0155] in: This indicates the target attitude angle of the hexacopter UAV. This indicates the attitude tracking error of the drone;
[0156] Step 4.2: Calculate the first and second derivatives of the defined error to obtain the attitude angular velocity error and attitude angular acceleration error, and then make the following substitutions:
[0157]
[0158] Step 4.3: Based on the characteristics of super-spiral sliding film control, define the following sliding mold surface:
[0159]
[0160] in: Represents the diagonal gain matrix;
[0161] Step 4.4: After determining the sliding surface, the controlled parameters can be obtained by differentiating the sliding surface function. The relationship with the sliding mode derivative directly lets achievable control rate:
[0162]
[0163] Step 4.5: Establish the adaptive law of gain in the superspiral sliding diaphragm control law:
[0164]
[0165] in: and This represents the adaptive law parameter.
[0166] Furthermore, the stability and finite-time convergence verification of the closed-loop system in step 5 includes the following steps:
[0167] Step 5.1: Construct the Lyapunov functions for the position loop and attitude loop, respectively:
[0168]
[0169]
[0170] in: , This represents the error estimate. , , , For ideal gain;
[0171] Step 5.2: Calculate the time derivative And according to the Lyapunov stability determination principle: and hour, To determine whether the closed-loop system is stable;
[0172] Step 5.3: According to the finite-time convergence lemma, search for... and satisfy:
[0173]
[0174] Step 5.4: Calculate the convergence time of the system using the steps in Step 5.3 to ensure that the designed system can converge to a stable state within a finite time.
[0175] The following simulation demonstrates the effectiveness and feasibility of the position-attitude hierarchical composite adaptive sliding mode control method for a six-rotor UAV disclosed in this application, as shown in the following details:
[0176] The parameters of the UAV designed in the simulation experiment are listed below: the mass of the hexacopter UAV is m = 1.298 kg, and the number of arms of the hexacopter UAV is... =0.53m, moments of inertia along the x and y axes =0.035 kg·m², moment of inertia along the z-axis =0.06 kg·m², lift coefficient =1.1×10⁻⁴ N / (rpm) 2 ), counter-torque coefficient =3.5×10⁻⁶ N cdotpm / (rpm) 2 ).
[0177] The controller parameters designed in the simulation experiment are listed below: diagonal gain matrix , Hurwitz matrix Diagonal sliding mode gain matrix Adaptive gain Adaptive parameters .
[0178] The simulation results are as follows:
[0179] The results of the position simulation experiment are as follows Figures 3 to 8 As shown. Figures 3 to 5 The figure shows the position tracking curves of the x-axis, y-axis, and z-axis. As can be seen from the figure, the tracking speed of the traditional sliding mode control is lower than that of its terminal sliding mode robust control. The PID control has a certain range of oscillations. In the tracking of the z-axis, there is a tracking delay of 0.33s. The terminal sliding mode robust controller curve has a significantly better fit to the desired trajectory than the sliding mode controller and the PID controller. Figures 6 to 8 The figure shows the position tracking errors for the x, y, and z axes. As can be seen from the figure, the end sliding mode robust control exhibited overshoots of 0.12m and 0.26m in tracking the x and y axes, respectively. However, this controller can quickly recover to a stable state within 0.16s, and the stability error remains stable within ±0.05m. The rise time of the traditional sliding mode control for tracking the x and y axes is 1.25s and 2.91s, respectively, which is much slower than the end sliding mode robust control. The PID control not only has a long rise time, but also has a tracking error of ±0.8m for all three axes, which is lower than the tracking accuracy of the other two control methods.
[0180] The results of the attitude simulation experiment are as follows Figures 9 to 14 As shown. Figures 9 to 11The figure shows the tracking performance of roll angle, pitch angle and yaw angle. As can be seen from the figure, the gain adaptive super-spiral sliding mode controller designed in this paper exhibits fast convergence characteristics in all three degrees of freedom. The tracking of attitude angle reaches steady state within 1 second and there is no overshoot. Its settling time is improved by 48% and 60% compared with traditional sliding mode control and PID control, respectively. Figures 12 to 14 The figure shows the tracking errors for roll, pitch, and yaw. As can be seen from the figure, the roll error converges to within ±0.3° within 2 seconds, the pitch error stabilizes within ±0.2° after 3 seconds, and the yaw error converges 40% faster than SMC. SMC's inherent chattering problem results in a slightly higher steady-state error (roll error approximately ±0.5°), while PID control is significantly affected by nonlinear characteristics, leading to significant error fluctuations (pitch error reaches a maximum of 2.2°, and yaw steady-state error is ±0.6°).
[0181] The simulation experiments described above demonstrate the performance comparison between the TA-SMRC-based position controller and the GA-STSMC-based attitude controller and traditional sliding mode controllers and PID controllers. Through experimental comparison, the TA-SMRC position controller and the GA-STSMC attitude controller outperform sliding mode control and PID control in terms of response speed, tracking accuracy, and stability. To verify the feasibility and effectiveness of the position-attitude hierarchical composite control scheme designed in this paper, a spiral trajectory tracking experiment was designed and compared with the scheme using sliding mode control and PID control for both position and attitude. The simulation results are as follows: Figure 15 As shown.
[0182] Figures 16 to 18 The figure represents the tracking error of the position channel in the spiral trajectory tracking experiment. The results show that the proposed method achieves fast error convergence in all three axes (x, y, and z), with small overshoot, no significant oscillation, and the smallest steady-state error. On the x-axis, the PID error reaches a maximum of 0.23m and exhibits significant oscillation, while SMC is slightly better but still has fluctuations. The proposed strategy achieves fast convergence and stability. On the y-axis, the proposed method has almost no overshoot and minimal chattering. The z-axis directional error control is superior to SMC and PID, with a steady-state error of less than 0.05m. Overall, it demonstrates better tracking accuracy and control smoothness. Figures 19 to 21 The results show that in the spiral trajectory tracking experiment, the tracking error of the attitude channel is represented. The results indicate that, regardless of the error response in roll, pitch, or yaw angles, traditional PID control exhibits large periodic oscillations and high error peaks, with a maximum error of approximately ±0.4 degrees. SMC can suppress the error amplitude to some extent, but some periodic fluctuations still exist. The proposed scheme, however, can stably control the attitude error within ±0.1 degrees throughout the entire process, effectively suppressing high-frequency oscillations and error spikes. A comparison with sliding mode control shows that the proposed scheme significantly reduces the steady-state error and transient chattering of the system while maintaining dynamic response speed, effectively improving the system's robustness.
[0183] Figure 22 The figure shows the position control inputs (x, y, z axes) of the proposed strategy and the other two methods during simulated spiral trajectory tracking. As can be seen from the figure, for a given signal, the TA-SMRC controller reaches its peak value of 14.6 m / s² on the control inputs of the three position channels within 0.23 s. 2 23.8m / s 2 and 5.2m / s 2 Furthermore, it rapidly recovers to a steady state within 0.5 seconds. Compared to SMC and PID controllers, the TA-SMRC controller achieves a faster response speed, with the system acceleration command quickly converging to a steady state in a short time. Due to the introduction of the adaptive law, the TA-SMRC controller can maintain excellent tracking accuracy and dynamic performance under uncertainty and external disturbances, resulting in smoother control input, effectively suppressing high-frequency chattering, and improving the smoothness of actuator movements and system robustness.
[0184] Figure 23 The figure represents the acceleration of the attitude control inputs (roll, pitch, and yaw) of the proposed strategy compared to the other two methods during simulated spiral trajectory tracking. As shown in the figure, the GA-STSMC controller reaches its peak value of 0.68 rad / s in the three attitude channels within 0.21 seconds. 2 0.55 rad / s 2 0.37 rad / s 2 Compared to SMC and PID algorithms, GA-STSMC achieves faster response speed and smaller overshoot, with extremely smooth control input and almost no high-frequency chattering. Because this method relies on an adaptive algorithm to adaptively optimize the sliding mode gain parameters, the system can maintain high-precision tracking and strong robustness under various disturbance conditions, effectively suppressing the chattering problem common in traditional sliding mode methods.
[0185] The technical means disclosed in this invention are not limited to those disclosed in the above embodiments, but also include technical solutions that are any combination of the above technical features. It should be noted that for those skilled in the art, various improvements and modifications can be made without departing from the principle of this invention, and these modifications are also considered within the scope of protection of this invention.
Claims
1. A position-attitude hierarchical composite adaptive sliding mode control method for a six-rotor unmanned aerial vehicle, comprising the following steps: Step 1: Establish a three-dimensional spatial position and attitude dynamics model of the six-rotor UAV, assuming it is a rigid body, lift is proportional to the square of the rotational speed, air resistance is ignored, and the mass distribution is uniform. The differential equation for the location model is as follows: ; in: Represents the position matrix of the UAV. Represents the velocity matrix of the drone. Indicates the quality of the drone. Represents gravitational acceleration. The unit vector representing the direction of gravity. The force representing the position channel, This indicates external interference; The differential equations for the attitude model are determined as follows: ; in, This represents the matrix indicating the roll, pitch, and yaw angles of the UAV. The angular velocity matrices of the UAV's roll, pitch, and yaw angles. This represents the diagonal matrix of the moment of inertia. A diagonal matrix representing the distance from the UAV's center of mass to the motor's center of mass. This represents the aerodynamic moment matrix of the UAV. This represents the external disturbance to the attitude angle, and R represents the three-axis transformation matrix between the angular velocity vector and the Euler angle vector; Step 2: By defining the position error, design the terminal sliding mode surface and finite-time robust control law, and introduce an adaptive law to compensate for external disturbances and model uncertainties online. Finally, establish a terminal adaptive sliding mode robust controller in the position loop to achieve finite-time accurate tracking of the UAV's three-axis position. The terminal adaptive sliding mode robust controller described herein includes the following steps in its workflow: Step 2.1: Define the error between the actual position and the desired position of the UAV as: ; In the formula: This indicates the desired location of the hexacopter drone. This indicates the position tracking error of the drone; Step 2.2: Utilizing the properties of sign functions to accelerate convergence within a finite time and effectively suppress system uncertainties and external disturbances, the following terminal sliding surface is defined: ; in: , It is a diagonal gain matrix. These are the sign functions representing the position errors along the x, y, and z axes, respectively. Step 2.3: To counteract external disturbances and accelerate the convergence speed of the sliding surface, the following robust control law is designed: ; where: a represents a diagonal sliding gain matrix, is an estimate of the external disturbance Step 2.4: To achieve asymptotic tracking of external disturbances, a sign function of the sliding mode surface is introduced, and the following adaptive law is designed to estimate the unknown disturbance in real time: ; wherein: is an adaptive gain; Step 3: The desired acceleration and thrust signals output by the position loop are converted into desired pitch, roll and yaw reference values in real time through the attitude calculation module, thus completing the position-attitude calculation and command mapping. Step 4: To address the nonlinearity and external disturbances in UAV attitude control, a super-helical sliding mode control law is designed. By introducing an adaptive law to dynamically adjust the sliding mode gain, high-frequency chattering is reduced. Finally, a gain-adaptive super-helical sliding mode attitude controller is established to achieve finite-time robust convergence of the attitude angle. The gain-adaptive superspiral sliding mode controller described herein includes the following steps in its workflow: Step 4.1: Define the error between the actual attitude angle and the target attitude angle; ; in: This indicates the target attitude angle of the hexacopter UAV. This indicates the attitude tracking error of the drone; Step 4.2: Calculate the first and second derivatives of the defined error to obtain the attitude angular velocity error and attitude angular acceleration error, and then make the following substitutions: ; Step 4.3: Based on the characteristics of super-spiral sliding mode control, define the following sliding surface: ; wherein: denotes a diagonal gain matrix; Step 4.4: After determining the sliding surface, differentiate the sliding surface function to obtain the controlled parameters. The relationship with the sliding mode derivative directly lets achievable control rate: ; Step 4.5: Establish the adaptive law of gain in the superspiral sliding mode control law: ; in: and Represents the adaptive law parameters; Step 5: Based on the Lyapunov stability principle, Lyapunov functions were designed for position and attitude respectively, and the stability and convergence within a finite time of the designed system were verified. Step 6: The obtained attitude torque signal is transformed into six sets of motor speed commands through inverse dynamics calculation and combined with the hexarotor dynamics model. These commands are then used to drive the motors via PWM modulation, completing the hierarchical composite adaptive sliding mode control of the hexarotor UAV's position-attitude, achieving precise control of the six-degree-of-freedom flight state. The motor allocation matrix is represented as follows: ; where: represents the lift coefficient, represents the anti-torque coefficient.
2. The hexacopter position-pose hierarchical compound adaptive sliding mode control method according to claim 1, wherein, Step 3, position-attitude calculation and command mapping, includes the following steps in its workflow: Step 3.1: In the z-axis direction, establish the following relationship between the resultant force F and the thrust T along the z-axis: ; Step 3.2: Calculate the modulus of the total thrust T: ; Step 3.3: Calculate the vertical equilibrium equation of the UAV during its spatial motion: ; Step 3.4: Transfer the channel obtained from the position controller With channel control quantity , Transformed into the desired signal of the attitude path , : 。 3. The position-attitude hierarchical composite adaptive sliding mode control method for a six-rotor UAV according to claim 1, characterized in that, Step 5 verifies the stability and finite-time convergence of the closed-loop system. Its workflow includes the following steps: Step 5.1: Construct the Lyapunov functions for the position loop and attitude loop, respectively: ; ; in: , This represents the error estimate. , , , For ideal gain; Step 5.2: Calculate the time derivative And according to the Lyapunov stability criterion: and hour, To determine whether the closed-loop system is stable; Step 5.3: Based on the finite-time convergence lemma, search for the Lyapunov function in the constructed function. and satisfy: ; Step 5.4: Calculate the convergence time of the system using the steps in Step 5.3 to ensure that the designed system can converge to a stable state within a finite time.