A multi-scene interference-oriented unmanned aerial vehicle attitude sliding mode control method and system
By dynamically updating sliding mode control parameters through multi-level control rules and finite-time disturbance observers, the problem of parameter fixation in traditional UAV sliding mode control under time-varying disturbances in multiple scenarios is solved, thereby improving the high precision and safety of UAVs in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AIR FORCE ENG UNIV OF PLA AIRCRAFT MAINTENACE MANAGEMENT SERGEANT SCHOOL
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional UAV sliding mode control methods, when faced with time-varying interference in multiple scenarios, rely on fixed controller parameters or simple adjustment rules, making it difficult to adapt to time-varying interference environments in multiple scenarios. They also lack coordinated control under multi-channel coupling conditions and lack safety protection under extreme attitudes, which can easily lead to high-frequency jitter and instability.
By employing multi-level control rules and a finite-time disturbance observer, the sliding mode control parameters are dynamically updated through attitude tracking error and error change rate. Combined with an adaptive terminal sliding surface and parameter smoothing transition mechanism, real-time estimation and compensation for external disturbances are achieved, enhancing the robustness and safety of the system.
It achieves high-precision control and enhanced safety of UAVs in complex interference environments. Through online intelligent adaptive adjustment, it enhances the robustness and safety of the system and avoids high-frequency jitter and instability.
Smart Images

Figure CN122308419A_ABST
Abstract
Description
Technical Field
[0001] This invention generally relates to the field of unmanned aerial vehicle (UAV) control technology. More specifically, this invention relates to a UAV attitude sliding mode control method and system for multi-scenario interference. Background Technology
[0002] Quadrotor drones, with their simple structure, vertical takeoff and landing, stable hovering, and high maneuverability, are widely used in aerial surveying, agricultural plant protection, power line inspection, logistics transportation, and disaster relief. However, in complex real-world environments, drones often face various types of external disturbances such as sudden gusts, strong winds, and airflow disturbances. Traditional control methods, due to fixed parameters and a lack of adaptive capabilities, struggle to simultaneously meet the requirements of rapid response and smooth suppression, leading to decreased control accuracy, increased chattering, and even instability. Their strong coupling and underactuated nonlinear characteristics make them susceptible to uncertainties such as external wind disturbances and parameter perturbations, making attitude control accuracy and robustness a persistent research hotspot.
[0003] Sliding mode control, due to its strong robustness, has become a research hotspot for solving the above problems, and the following three types of improvement methods have been mainly derived: One approach is the control method based on terminal sliding mode. While this method improves the error convergence speed, it often faces problems such as high computational complexity (e.g., combined with neural networks) or fixed controller parameters, making it difficult to adaptively adjust according to changes in the external environment.
[0004] The second is the observer-based disturbance rejection control method. This type of method achieves real-time estimation and compensation of disturbances, but its observer gain and controller parameters are mostly fixed values or complex to tune. When the type of disturbance changes or the scene switches, its estimation accuracy and adaptability are seriously insufficient.
[0005] Thirdly, there is the sliding mode control method based on the adaptive mechanism. This type of method can adjust parameters online, but the existing gain adjustment rules are relatively simple and fail to fully consider the error change trend and multi-channel coupling, which can easily lead to control conflicts.
[0006] Existing sliding mode control methods still have obvious shortcomings in practical applications: controller parameters are mostly fixed or have simple adjustment rules, making it difficult to adapt to time-varying interference environments in multiple scenarios; there is a lack of coordinated control mechanisms under multi-channel coupling conditions; there is a lack of effective safety protection strategies under dangerous conditions such as extreme attitudes; in addition, the parameter adjustment process often lacks a smooth transition mechanism, which can easily cause high-frequency chattering in the system. Summary of the Invention
[0007] To address the technical problems that traditional UAV sliding mode control methods may experience decreased attitude control accuracy, increased high-frequency jitter, or even instability risks when facing multiple scenarios, this invention provides solutions in the following aspects.
[0008] In a first aspect, a sliding mode control method for UAV attitude oriented to multi-scenario interference includes: acquiring desired attitude command data and current real-time attitude data of a quadcopter UAV, and calculating the attitude tracking error and error change rate; calculating a lumped interference estimate including external interference torque based on the attitude tracking error; matching rules in a preset multi-level control rule set based on the attitude tracking error, the error change rate, and the current control output torque, and updating a sliding mode control parameter set according to the matched rules, the sliding mode control parameter set including sliding mode gain, terminal index, and adaptive rate coefficient; constructing an adaptive terminal sliding surface based on the updated sliding mode control parameter set, the lumped interference estimate, and the attitude tracking error, and calculating a target control torque; and outputting the target control torque to the power actuator of the quadcopter UAV to adjust the flight attitude of the UAV.
[0009] Preferably, the lumped disturbance estimate, including external disturbance torque, is calculated using a preset finite-time disturbance observation algorithm by: decoupling the attitude system of the quadcopter UAV into three independent second-order error sub-models: roll, pitch, and yaw; defining a first observer state variable for tracking the attitude tracking error, a second observer state variable for tracking the error change rate, and a third observer state variable for estimating the lumped disturbance for each of the roll, pitch, and yaw channels; iteratively calculating the above observer state variables using a finite-time disturbance observer dynamic equation, and using the third observer state variable as the lumped disturbance estimate for that channel, wherein the expression of the finite-time disturbance observer dynamic equation is: .
[0010] in, e i For the first i The attitude tracking error of the channel, the first i The channel can be a roll channel, pitch channel, or yaw channel. sign () is the sign function. , , Both are observer gains, and , , , z i1 , z i2 , z i3 For observer state variables, u i For virtual control torque, f i For the preset nonlinear components, This is the estimated value of lumped interference.
[0011] Preferably, updating the sliding mode control parameter set includes: increasing the sliding mode gain and decreasing the terminal index when the absolute value of the attitude tracking error is greater than a preset large error threshold; setting the sliding mode control parameter set to a preset standard value when the absolute value of the attitude tracking error is less than or equal to the large error threshold and greater than a preset medium error threshold; decreasing the sliding mode gain and increasing the terminal index when the absolute value of the attitude tracking error is less than or equal to the medium error threshold and greater than a preset small error threshold; and further decreasing the sliding mode gain and increasing the terminal index when the absolute value of the attitude tracking error is less than or equal to the small error threshold.
[0012] Preferably, updating the sliding mode control parameter set further includes: calculating the product of the attitude tracking error and the error change; when the attitude tracking error and the error change have the same sign and the absolute value of the attitude tracking error is greater than a preset value, increasing the sliding mode gain at the current moment based on the value at the previous sampling moment, and adding feedforward compensation; obtaining the current control output torque; when its absolute value is greater than the maximum control torque threshold, reducing the sliding mode gain at the current moment, and using the hyperbolic tangent function combined with the maximum control torque threshold to smooth and limit the current control output torque.
[0013] Preferably, updating the sliding mode control parameter set further includes: when the system oscillation index is greater than the judgment threshold, increasing the terminal index at the current moment and adding virtual damping based on the virtual damping coefficient; wherein, the system oscillation index is related to the number of error zero crossover points; when the coupling index between multiple channels is greater than the preset coupling threshold, increasing the sliding mode gain of the mutually coupled channels; wherein, the coupling index is the ratio of the sum of the absolute values of the attitude tracking errors of the roll and pitch channels to the maximum absolute value of the two.
[0014] Preferably, updating the sliding mode control parameter set further includes: when the absolute value of the actual roll angle or the actual pitch angle is greater than the set safety boundary, increasing the sliding mode gain of the corresponding channel and superimposing an attitude recovery term pointing to the safety region; weighting and summing the calculated target parameters with the historical parameter values at the previous sampling time, and outputting the sliding mode control parameter set.
[0015] Preferably, the calculation of the target control torque includes: for each decoupled channel, constructing a nonlinear terminal sliding surface with a sign function based on the attitude tracking error, the error change rate, the updated adaptive gain, and the terminal index; and calculating the target control torque of each channel based on the terminal sliding surface, the preset nonlinear term components, the lumped disturbance estimate, and the updated sliding gain.
[0016] Preferably, before acquiring the desired attitude command data of the UAV, scene verification is also performed, including: generating multi-scene input verification signals according to time sequence segments to obtain preset desired attitude angle vectors and desired attitude angular velocity vectors; generating multi-scene interference signals according to the same time sequence as external interference torques injected into the quadrotor dynamics equations; the multi-scene input verification signals and multi-scene interference signals sequentially correspond to the large-angle step stage, medium-angle ramp stage, small-angle sine stage, rapid maneuver stage, extreme attitude stage, and multi-channel coupling stage.
[0017] Preferably, the multi-scenario input verification signal includes: a step function with multiple target amplitudes superimposed during the angle step input; a combined signal containing the slope and the held amplitude during the mid-angle ramp phase; a multi-frequency composite sine signal during the small-angle sine phase; a combined signal of square wave, high-frequency large-amplitude sine wave, and sudden large command during the rapid maneuver phase; a progressive approach safety limit command controlled by the safety limit approximation coefficient during the extreme attitude phase; and a combined signal of large-error in-phase sine wave with phase difference between each channel and alternating mode during the multi-channel coupling phase.
[0018] In a second aspect, a UAV attitude sliding mode control system for multi-scenario interference includes a processor and a memory, characterized in that the memory stores a computer program, and the processor executes the computer program to implement the UAV attitude sliding mode control method for multi-scenario interference as described in any one of the above inventions.
[0019] The beneficial effects of this invention are as follows: This invention enables online intelligent adaptive adjustment of controller parameters, improving control accuracy and safety under complex disturbances. Addressing the technical problems of traditional fixed-parameter control methods, such as poor adaptability, susceptibility to chattering, and risk of instability in the face of time-varying disturbances in multiple scenarios, this invention deeply integrates discrete expert rules with adaptive terminal sliding mode control. It can dynamically update the sliding mode gain and terminal index in real time based on error classification, changing trends, and multi-channel coupling states. Furthermore, it incorporates parameter smoothing transition and extreme attitude safety recovery mechanisms, thereby significantly enhancing the system robustness and safety of quadcopter UAVs under various strong external disturbance environments. Attached Figure Description
[0020] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1This is a schematic flowchart illustrating the steps of a UAV attitude sliding mode control method for multi-scenario interference according to an embodiment of the present invention; Figure 2 This is a schematic block diagram illustrating the structure of a UAV attitude sliding mode control system for multi-scenario interference according to this embodiment. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below 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.
[0022] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0023] Figure 1 This is a schematic flowchart illustrating the steps of a UAV attitude sliding mode control method for multi-scenario interference according to an embodiment of the present invention.
[0024] like Figure 1 As shown, a sliding mode control method for UAV attitude in response to multi-scenario interference includes steps S1 to S5.
[0025] Step S1: Obtain the desired attitude command data and the current real-time attitude data of the quadcopter UAV, and calculate the attitude tracking error and error change rate.
[0026] It should be noted that the control method of this invention is based on the following kinematic and dynamic model of a quadcopter unmanned aerial vehicle: This invention defines attitude angle vectors based on the kinematics and dynamics model of the quadcopter UAV. ,in , For the roll angle of the drone, The pitch angle of the drone. Let be the yaw angle of the UAV; define the angular rate vector Ω, where , p For the coordinate system around the body x angular velocity of the axis, q For the coordinate system around the body y angular velocity of the axis, r For the coordinate system around the body z Angular velocity of the axis.
[0027] The kinematic model expression is: .in, This is the attitude angular rate vector.
[0028] in, Let be the attitude transformation matrix, and .
[0029] The dynamic model expression is: .
[0030] in J Let be the rotational inertia matrix, and , Let be the moment of inertia of the UAV about the x-axis of the body coordinate system. Let be the moment of inertia of the UAV about the y-axis of the body coordinate system. Let be the moment of inertia of the UAV about the z-axis of the body coordinate system.
[0031] To control the torque, and , The control torque component of the roll channel, Here, represents the control torque component of the pitch channel, and represents the control torque component of the yaw channel. It is an external disturbance torque, and . This refers to the external disturbance torque component of the roll channel. For the external disturbance torque components of the pitch channel, This represents the external disturbance torque component of the yaw channel.
[0032] To facilitate the display of the conditions of each channel, the angular acceleration equations for each channel can be obtained by expanding the dynamic model expression: .
[0033] in, The angular acceleration component about the x-axis of the body coordinate system. The angular acceleration component about the y-axis of the body coordinate system. The angular acceleration component is the angular acceleration component about the z-axis of the body coordinate system.
[0034] The attitude sensor is configured to receive the desired attitude command. The attitude tracking error is defined as: .
[0035] Combining the kinematic model expression and the dynamic model expression, the dynamic equation of attitude error is obtained: .
[0036] in This is a lumped interference term.
[0037] To achieve three-channel decoupling control, variable substitution is introduced: .
[0038] in, f For the preset nonlinear term, μ For virtual control torque, d As the interference term, the system can be decoupled into three independent second-order error sub-models, wherein the expression of the second-order error sub-model is: .
[0039] in, The acceleration of attitude tracking error for the roll path. For the attitude tracking error acceleration of the pitch path, represents the attitude tracking error acceleration for the yaw path. represents the virtual control torque component corresponding to the channel. f 1. f 2. f All three are preset nonlinear components. d 1. d 2. d 3 are all preset lumped interference phase components.
[0040] Based on the second-order error sub-model, the attitude tracking error system is defined, and a three-channel finite-time disturbance observer is designed. The specific steps are as follows: For each channel... Define the observer state variables z i1 , z i2 , z i3 ,in Used for tracking errors , Used to track the rate of change of error. Used to estimate lumped disturbance , i For indexing.
[0041] Step S2: Calculate the lumped disturbance estimate, including the external disturbance torque, based on the attitude tracking error.
[0042] In one embodiment, the calculation of the lumped disturbance estimate including external disturbance torque using a preset finite-time disturbance observation algorithm includes: decoupling the attitude system of the quadcopter UAV into three independent second-order error sub-models: roll, pitch, and yaw; and defining a first observer state variable for tracking the attitude tracking error, a second observer state variable for tracking the error change rate, and a third observer state variable for estimating the lumped disturbance for each of the roll, pitch, and yaw channels. The dynamic equation of the finite-time interference observer is used to iteratively calculate the state variables of the above observers. The state variable of the third observer is used as the lumped interference estimate for this channel. The expression of the dynamic equation of the finite-time interference observer is as follows: ; in, e i For the first i The attitude tracking error of the channel, the first i The channel can be a roll channel, pitch channel, or yaw channel. sign () is the sign function. , , Both are observer gains, and , , , z i1 , z i2 , z i3 For observer state variables, u i For virtual control torque, f i For the preset nonlinear components, This is the estimated value of lumped interference.
[0043] It should be noted that in the above finite-time disturbance observer, if the observation error (| z i1 - e i1 If the value is large, it needs to be increased. β i1 To accelerate state convergence; if the disturbance changes drastically, it is necessary to increase the [unclear - possibly "increase"]. β i3 To enhance the tracking capability against time-varying disturbances; while when the error is small, the observer gain should be appropriately reduced to suppress the amplification of system measurement noise and prevent control commands from chattering.
[0044] Step S3: Based on the attitude tracking error, the error change rate, and the current control output torque, match the rules in the preset multi-level control rule set, and update the sliding mode control parameter set according to the matched rules. The sliding mode control parameter set includes sliding mode gain, terminal index, and adaptive rate coefficient.
[0045] In one embodiment, updating the sliding mode control parameter set includes: increasing the sliding mode gain and decreasing the terminal index when the absolute value of the attitude tracking error is greater than a preset large error threshold; setting the sliding mode control parameter set to a preset standard value when the absolute value of the attitude tracking error is less than or equal to the large error threshold and greater than a preset medium error threshold; decreasing the sliding mode gain and increasing the terminal index when the absolute value of the attitude tracking error is less than or equal to the medium error threshold and greater than a preset small error threshold; and further decreasing the sliding mode gain and increasing the terminal index when the absolute value of the attitude tracking error is less than or equal to the small error threshold.
[0046] If the disturbance changes drastically, then increase When the error is small, reduce the observer gain to suppress noise amplification.
[0047] It should be noted that the i-th channel mentioned above, where the index variable... These correspond to the roll, pitch, and yaw channels of a quadcopter UAV, respectively. By introducing the aforementioned variable substitution and nonlinear cancellation, the originally highly coupled multi-input multi-output UAV attitude system is successfully decoupled into three structurally identical and independent single-input single-output second-order error sub-models, thereby enabling the independent design of observers and sliding mode controllers for each attitude channel.
[0048] In one embodiment, updating the sliding mode control parameter set further includes: calculating the product of the attitude tracking error and the error change; when the attitude tracking error and the error change have the same sign and the absolute value of the attitude tracking error is greater than a preset value, increasing the sliding mode gain at the current moment based on the value at the previous sampling moment, and adding feedforward compensation; obtaining the current control output torque; when its absolute value is greater than the maximum control torque threshold, reducing the sliding mode gain at the current moment, and using the hyperbolic tangent function combined with the maximum control torque threshold to smooth and limit the current control output torque.
[0049] In one embodiment, updating the sliding mode control parameter set further includes: when the system oscillation index is greater than a judgment threshold, increasing the terminal index at the current moment and adding virtual damping based on the virtual damping coefficient; wherein the system oscillation index is related to the number of error zero crossover points; when the coupling index between multiple channels is greater than a preset coupling threshold, increasing the sliding mode gain of the mutually coupled channels; wherein the coupling index is the ratio of the sum of the absolute values of the attitude tracking errors of the roll and pitch channels to the maximum absolute value of the two.
[0050] In one embodiment, updating the sliding mode control parameter set further includes: when the absolute value of the actual roll angle or the actual pitch angle is greater than the set safety boundary, increasing the sliding mode gain of the corresponding channel and superimposing an attitude recovery term pointing to the safety region; weighting and summing the calculated target parameters with the historical parameter values at the previous sampling time, and outputting the sliding mode control parameter set.
[0051] The expert parameter tuning module dynamically adjusts the controller parameters based on sampled data and system status, making it an indirect expert controller. Its core variable definitions include... Error value at the current sampling time; Error value at the previous sampling time; : Error change; For the first k The sampling time of the first sampling moment i Channel sliding mode gain; For the first k Terminal index at each sampling time; For the first k The adaptive rate coefficient at each sampling time.
[0052] Specifically, the multi-level regulatory rule set includes: Rule 1 (Strong control rule for large errors): In response to , ( ), increase sliding mode gain, decrease terminal exponent and increase adaptive rate, among which M 1 represents the large error threshold. At the k-th sampling time, the formula for increasing the sliding mode gain is: , The base gain is 8.0 for roll / pitch and 6.0 for yaw. The gain boost factor is a preset value. ); Reduce terminal index: ,middle The formula for increasing the adaptive rate is: Among them, the standard adaptive rate η 0 satisfies the formula: It should be noted that reducing the terminal exponent is used to accelerate convergence.
[0053] Rule 2 (Standard Error Control Rule): In response to ( The sliding mode gain, terminal index, and adaptive rate are all preset standard values. M 2 represents the mean square error threshold, and the sliding mode gain equals the base gain. The terminal index equals the standard terminal index. The adaptive rate equals the standard adaptive rate. .
[0054] Rule 3 (Small Error Fine Control Rule): In response to ( This involves reducing the gain (to avoid oscillations), increasing the terminal exponent (to smooth convergence), and decreasing the adaptive rate. M 3 is the small error threshold. The formula for reducing the gain to avoid oscillation is: The formula for increasing the terminal index is: The formula for reducing the adaptive rate is: .
[0055] Rule 4 (Minimum Error Integral Control Rule): In response to Further reduce the gain: Significantly increased terminal index: Significantly reduce the adaptive rate: .
[0056] Rule 5 (Error Increase Enhancement Control Rule): when and At that time, the first k The error at each sampling time point has the same sign as the error change, meaning the error is increasing. Therefore, increase the sliding mode gain: Add feedforward compensation, i.e.: ;in Forward compensation coefficient, .
[0057] Rule 6 (Control Saturation Protection Rule): when hour( The maximum control torque threshold, When this happens, immediately reduce the gain: Enable smoothing limiting: , where tanh() is the hyperbolic tangent function.
[0058] Rule 7 (System Oscillation Detection and Suppression Rule): Calculate the system oscillation index The formula is ,if This is determined to be an oscillation. When the error sequence exhibits high-frequency oscillations, the terminal exponent is increased: Add virtual damping: ,in K d This is the virtual damping coefficient. , This indicates the number of error zero-crossing points detected within the set sampling window. This indicates the set sampling window length (usually referring to the total number of discrete sampling points contained within the window).
[0059] Rule 8 (Attitude Angle Safety Protection Rule): when or hour( (rad), enhancing the approach limit channel: Add attitude recovery item : ,in, Let $\frac{ ... Let $\frac{ ... To ensure safe roll angle boundaries, To ensure safe pitch angle boundaries, The sliding mode gain of the channel in its limiting state. K r The attitude recovery coefficient is... .
[0060] Rule 9 (Parameter Smooth Transition Rule): When adjusting all parameters, use a first-order low-pass filter to smooth parameter changes: .in, This is the target sliding mode gain newly calculated by the expert system.
[0061] .in, This is the target terminal index newly calculated by the expert system. α It is the smoothing coefficient, and α =3.
[0062] Rule 10 (Multi-channel Coordination Rule): When multiple channels simultaneously exhibit large errors, the coupling situation is detected, including calculating the coupling degree index. : ;if Enable coordination gain: , . The sliding mode gain after roll channel coordination. The sliding mode gain after pitch channel coordination.
[0063] It should be noted that rules 1 to 10 constitute a complete discrete expert parameter tuning decision center. Its core significance lies in breaking the limitations of fixed parameters in traditional sliding mode control: rules 1 to 4 achieve hierarchical parameter tuning based on error magnitude, pursuing rapid convergence with large errors and smoothing and eliminating steady-state error with small errors; rules 5 and 6 achieve dynamic trend prediction and anti-saturation protection, effectively preventing overload of actuators such as motors; rules 7 and 10 are specifically used to suppress high-frequency oscillations and multi-channel coupling conflicts; rules 8 and 9 establish a safety baseline for extreme attitudes and a buffer for parameter jumps. This rule set endows the system with complete closed-loop control capabilities of "state perception - intelligent decision-making - parameter adaptation - safety protection".
[0064] Step S4: Construct an adaptive terminal sliding surface based on the updated sliding mode control parameter set, the lumped disturbance estimate, and the attitude tracking error, and calculate the target control torque.
[0065] In one embodiment, calculating the target control torque includes: for each decoupled channel, constructing a nonlinear terminal sliding surface with a sign function based on the attitude tracking error, the error change rate, the updated adaptive gain, and the terminal index; and calculating the target control torque for each channel based on the terminal sliding surface, the preset nonlinear term components, the lumped disturbance estimate, and the updated sliding gain.
[0066] The adaptive sliding mode controller module is designed for each channel. The design expression for the sliding surface is as follows: ,in σ i Let i be the terminal sliding surface of the i-th channel. Let be the rate of change of attitude tracking error for the i-th channel. , For adaptive gain, Terminal index; target control torque The expression is: ; For the interference observer's estimated value, This is the sliding mode gain.
[0067] It should be noted that, in the target control torque In the expression, each term has a clear control meaning: The term is used to offset the known nonlinear dynamic characteristics of the system; This term is used to perform real-time feedforward compensation for the lumped interference estimated by the interference observer; This is a dynamic compensation term for the sliding surface, used to adjust the convergence quality of the system during the sliding phase; This is a robust switching control term used to overcome residual observation errors and ensure that the system state can reach and remain on the terminal sliding surface within a finite time.
[0068] Step S5: Output the target control torque to the power actuator of the quadcopter UAV to adjust the flight attitude of the UAV.
[0069] Wherein, the desired attitude angle vector is The desired attitude angular velocity vector is The input verification signal is divided into the following stages. For the desired roll angle, For the desired pitch angle, This is the desired yaw angle. For the desired roll rate, For the desired pitch angular velocity, The desired yaw rate.
[0070] In one embodiment, before acquiring the desired attitude command data of the UAV, scene verification is also performed, including: generating multi-scene input verification signals according to time sequence segments to obtain preset desired attitude angle vectors and desired attitude angular velocity vectors; generating multi-scene interference signals according to the same time sequence to inject external interference torque into the quadrotor dynamics equations; the multi-scene input verification signals and multi-scene interference signals sequentially correspond to the large-angle step stage, medium-angle ramp stage, small-angle sine stage, rapid maneuver stage, extreme attitude stage, and multi-channel coupling stage.
[0071] In one embodiment, the multi-scenario input verification signal includes: a step function with multiple target amplitudes superimposed during an angle step input; a combined signal containing the slope and the held amplitude during a mid-angle ramp phase; a multi-frequency composite sine signal during a small-angle sine phase; a combined signal of a square wave, a high-frequency large-amplitude sine wave, and a sudden large command during a rapid maneuver phase; a progressive approach safety limit command controlled by a safety limit approximation coefficient during an extreme attitude phase; and a combined signal of a large-error in-phase sine wave with phase difference between each channel and an alternating mode during a multi-channel coupling phase.
[0072] It should be noted that the multi-scenario input verification signals are divided into six stages: large-angle step, medium-angle ramp, small-angle sine wave, rapid maneuver, extreme attitude, and multi-channel coupling. The purpose is to construct a comprehensive control performance test environment. These six typical signals can accurately and sequentially trigger various rules in the aforementioned expert system (such as large error response, fine control, anti-saturation, and safe recovery), thereby objectively and comprehensively verifying the robustness and adaptability of the proposed control method under different flight conditions.
[0073] This invention also designs multi-scenario input verification signals to obtain preset desired attitude angle vectors and desired attitude angular velocity vectors. The external disturbance torque vector is defined as: Its effect on the quadrotor dynamics equations: ,in This refers to the rotational inertia matrix. The specific disturbance scenarios are divided into the following stages: Phase 1: A large-angle step signal (0-10 seconds) is used to trigger Rule 1 (strong control for large errors). The input signal is... , , ,in: It is a unit step function. (Exceeding the threshold) ), , , After the angular velocity is processed by low-pass filtering, ,in , is the time constant.
[0074] It should be noted that in stage 1, low-pass filtering is designed (introducing a time constant). The purpose of this is that, since the derivative of a pure step signal at the transition point is infinite, a physical motor cannot directly track it. Low-pass filtering can be used to detect the desired angular velocity. Smoothed into physically executable instructions. Simultaneously, the set... , The large step amplitude is designed to instantly induce huge attitude tracking errors, thereby specifically verifying the fast response and strong torque output capability of Expert Rule 1 (strong control for large errors).
[0075] Phase 2, mid-angle ramp signal (10-20 seconds), aims to trigger Rule 2 (standard error control). The input signal is... , , in The slope of the ramp is the roll angle. The slope of the ramp with pitch angle, and , , To maintain the amplitude of the roll angle target, and (exist (nearby), angular velocity signal is , ,in , t 5, t 6, t 7 represents the time point for the switching between the slope and the hold signal in the second stage.
[0076] It should be noted that in Phase 2, the ramp slope (representing the rate at which the attitude angle changes uniformly over time) is set to simulate the routine task of the UAV smoothly climbing or turning at a constant speed. This phase focuses on examining whether, within a moderate tracking error range, after triggering expert rule 2 (medium error standard control), the system can enable the UAV to smoothly and without significant overshoot follow the ramp command and maintain good steady-state tracking accuracy.
[0077] Phase 3, small-angle sinusoidal signal (20-30 seconds), aims to trigger Rule 3 (fine-grained control with small errors) and Rule 4 (integral control). The input signal is a multi-frequency composite sinusoidal signal, where: .
[0078] .
[0079] .
[0080] in, This refers to the amplitude component of the roll channel in a multi-frequency sinusoidal signal. This refers to the amplitude component of the pitch channel in a multi-frequency sinusoidal signal. This refers to the amplitude component of the yaw channel in a multi-frequency sinusoidal signal. , which is the frequency component of the sinusoidal signal in the roll channel. The frequency components of the pitch channel sinusoidal signal. The frequency components of the sinusoidal signal in the yaw channel. , All are initial phase components. When t8 = 20s, t8 is the time node at which the third-stage composite sine signal begins to trigger.
[0081] During sub-phase 3.1 (20-25 seconds): , .
[0082] During sub-phase 3.2 (25-27 seconds): , .
[0083] At that time, the angular velocity is Rule 4 (minimal error) is triggered.
[0084] It should be noted that in Phase 3, a composite sine wave containing multiple amplitude and frequency components is used to simulate the tiny, continuous, and fluctuating control commands received by the UAV during hovering or level flight. Due to the extremely small and continuous fluctuations in error, traditional controllers are prone to generating high-frequency jitter. This design is specifically used to trigger and verify the smoothing filtering and steady-state error elimination effects of expert rules 3 (fine control with small errors), 4 (integral control with minimal errors), and 7 (oscillation suppression).
[0085] Phase 4, rapid maneuver signal (30-40 seconds), aims to trigger rules 5 (error increase control) and 6 (saturation protection). The input signal is a square wave signal (triggering rule 5). ,in, , (Rapid changes) . The amplitude of the square wave signal. The frequency of the square wave signal is... This refers to the time point triggered by the square wave signal. High-frequency, large-amplitude sine waves (may cause saturation). , ,in, , , A sudden, major order (deliberately inducing saturation) , , . A hf The amplitude of the high-frequency sinusoidal signal. f hf For a high-frequency sinusoidal signal and its frequency, t 10 This refers to the time point triggered by the high-frequency sine wave signal. A burst For sudden large instruction amplitude, t 11 The time point when a sudden large instruction is triggered, t 12 This is the time point at which the sudden major instruction ends.
[0086] It should be noted that in phase 4, the high-frequency square wave signal simulates the drone's violent "Z"-shaped continuous tumbling maneuver, which will cause a sharp increase in error and trigger rule 5 (error increase prediction enhancement). Setting a sudden large command far exceeding the controller's physical capabilities is to deliberately induce the motor output torque to reach the physical limit, in order to rigorously verify whether rule 6 (control saturation protection) can intervene in time to perform hyperbolic tangent smoothing and limiting to prevent actuator burnout.
[0087] Phase 5, extreme attitude signal (40-50 seconds), aims to trigger rule 8 (attitude safety protection). The input signal is asymptotic approach to the safety limit. ,in, (Security restrictions) , Exceeding safety limits , Multi-axis approach limit, , , .
[0088] in The time-varying safety limit approximation coefficient, t 13 t is the start time point of the progressive safety limit signal. 14 This is the end time point for the progressive safety limit signal. t 15 For the start time node of the test signal exceeding the safety limit, t 16 The test signal ends when the safety limit is exceeded.
[0089] It should be noted that in Phase 5, the safety limit approximation coefficient is designed as a function that gradually increases over time to a limit value (0.7). The core logic is to artificially construct a dangerous scenario, controlling the desired attitude to gradually approach or even exceed the set physical safety threshold. This aims to test the mandatory intervention mechanism of Rule 8 (attitude angle safety protection) and verify whether the restoring torque can effectively pull the UAV's attitude back within the safety threshold, preventing overturning. Phase 6, multi-channel coupled signal (50-60 seconds), aims to trigger Rule 10 (multi-channel coordinated control) and Rule 7 (oscillation suppression). The input signal is in-phase with a large error. , ,in, , , , Coupled maneuvers (alternating mode), if If it is even, then ,like If it is not even, then in , .
[0090] Complex coupling patterns , , .
[0091] It should be noted that by setting the basic amplitude and frequency of the coupling signal, as well as the phase difference (or a specific alternation pattern) between each channel, a complex asymmetric helical maneuver in three-dimensional space was simulated. This leads to large errors in multiple channels simultaneously, thus verifying whether Rule 10 (the multi-channel coordination rule) can reasonably coordinate the distribution of control torque among the channels. In addition, various multi-scenario interference signals designed subsequently are injected in strict synchronization with the above-mentioned input verification signals in terms of timing, aiming to construct a dual extreme test of "extreme maneuver command + harsh external environment" to comprehensively evaluate the final robustness of this expert sliding mode control system.
[0092] Figure 2 This is a schematic block diagram illustrating the structure of a UAV attitude sliding mode control system for multi-scenario interference according to this embodiment.
[0093] This invention also provides a UAV attitude sliding mode control system for multi-scenario interference. For example... Figure 2 As shown, the system includes a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement a UAV attitude sliding mode control method for multi-scenario interference according to the first aspect of the present invention.
[0094] The system also includes other components well known to those skilled in the art, such as communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0095] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions that can be stored or otherwise maintained by such a computer-readable medium.
[0096] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.
[0097] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A sliding mode control method for UAV attitude accommodating multi-scenario interference, characterized in that, include: The desired attitude command data and current real-time attitude data of the quadcopter UAV are obtained, and the attitude tracking error and error change rate are calculated. The lumped disturbance estimate, including the external disturbance torque, is calculated based on the attitude tracking error. Based on the attitude tracking error, the error change rate, and the current control output torque, a matching rule is performed in a preset multi-level control rule set, and the sliding mode control parameter set is updated according to the matched rule. The sliding mode control parameter set includes sliding mode gain, terminal index, and adaptive rate coefficient. An adaptive terminal sliding surface is constructed based on the updated set of sliding mode control parameters, the estimated lumped disturbance, and the attitude tracking error, and the target control torque is calculated. The target control torque is output to the power actuator of the quadcopter drone to adjust the drone's flight attitude.
2. The UAV attitude sliding mode control method for multi-scenario interference as described in claim 1, characterized in that, Using a pre-defined finite-time disturbance observation algorithm, the estimated value of the lumped disturbance, including the external disturbance torque, is calculated as follows: The attitude system of the quadcopter UAV is decoupled into three independent second-order error sub-models: roll, pitch, and yaw. For each of the roll, pitch, and yaw channels, a first observer state variable is defined to track the attitude tracking error, a second observer state variable is defined to track the rate of change of the error, and a third observer state variable is defined to estimate the lumped disturbance. The dynamic equation of the finite-time interference observer is used to iteratively calculate the state variables of the above observers. The state variable of the third observer is used as the lumped interference estimate for this channel. The expression of the dynamic equation of the finite-time interference observer is as follows: ; in, e i For the first i The attitude tracking error of the channel, the first i The channel can be a roll channel, pitch channel, or yaw channel. sign () is the sign function. , , Both are observer gains, and , , , z i1 , z i2 , z i3 For observer state variables, u i For virtual control torque, f i For the preset nonlinear components, This is the estimated value of lumped interference.
3. The UAV attitude sliding mode control method for multi-scenario interference according to claim 1, characterized in that, The updated sliding mode control parameter set includes: When the absolute value of the attitude tracking error is greater than a preset large error threshold, the sliding mode gain is increased and the terminal index is decreased. When the absolute value of the attitude tracking error is less than or equal to the large error threshold and greater than the preset medium error threshold, the sliding mode control parameter set is set to the preset standard value. When the absolute value of the attitude tracking error is less than or equal to the medium error threshold and greater than the preset small error threshold, the sliding mode gain is reduced and the terminal index is increased. When the absolute value of the attitude tracking error is less than or equal to the small error threshold, the sliding mode gain is further reduced and the terminal index is increased.
4. The UAV attitude sliding mode control method for multi-scenario interference according to claim 1, characterized in that, The updated sliding mode control parameter set also includes: Calculate the product of the attitude tracking error and the error change. When the attitude tracking error and the error change have the same sign and the absolute value of the attitude tracking error is greater than a preset value, increase the sliding mode gain at the current time based on the value at the previous sampling time and add feedforward compensation. The current control output torque is obtained. When its absolute value is greater than the maximum control torque threshold, the sliding mode gain at the current moment is reduced, and the current control output torque is smoothed and limited by using the hyperbolic tangent function in combination with the maximum control torque threshold.
5. The UAV attitude sliding mode control method for multi-scenario interference according to claim 1, characterized in that, The updated sliding mode control parameter set also includes: When the system oscillation index is greater than the judgment threshold, the terminal index at the current moment is increased, and virtual damping is added based on the virtual damping coefficient; wherein, the system oscillation index is related to the number of error zero crossover points; When the coupling index between multiple channels is greater than the preset coupling threshold, the sliding mode gain of the mutually coupled channels is increased; wherein, the coupling index is the ratio of the sum of the absolute values of the attitude tracking errors of the roll and pitch channels to the maximum absolute value of the two.
6. The UAV attitude sliding mode control method for multi-scenario interference according to claim 1, characterized in that, The updated sliding mode control parameter set also includes: When the absolute value of the actual roll angle or actual pitch angle is greater than the set safety boundary, increase the sliding mode gain of the corresponding channel and add an attitude recovery term pointing to the safety area. The calculated target parameters are weighted and summed with the historical parameter values from the previous sampling time to output the sliding mode control parameter set.
7. The UAV attitude sliding mode control method for multi-scenario interference according to claim 1, characterized in that, The calculated target control torque includes: For each decoupled channel, a nonlinear terminal sliding surface with a sign function is constructed based on the attitude tracking error, the error change rate, the updated adaptive gain, and the terminal index. The target control torque for each channel is calculated based on the terminal sliding surface, the preset nonlinear term components, the estimated lumped interference value, and the updated sliding gain.
8. The UAV attitude sliding mode control method for multi-scenario interference according to claim 1, characterized in that, Before acquiring the desired attitude command data for the drone, scenario verification is also performed, including: Multi-scenario input verification signals are generated based on time-series segmentation to obtain the preset desired attitude angle vector and desired attitude angular velocity vector; Multiple scene interference signals are generated based on the same timing sequence and injected into the quadrotor dynamics equations as external interference torques. The multi-scenario input verification signal and multi-scenario interference signal, in sequence, include the large-angle step stage, the medium-angle ramp stage, the small-angle sine stage, the rapid maneuver stage, the extreme attitude stage, and the multi-channel coupling stage.
9. A sliding mode control method for UAV attitude oriented to multi-scenario interference according to claim 8, characterized in that, The multi-scenario input verification signals include: A step function is used to superimpose the amplitudes of multiple target values when an angle step input is applied. During the mid-angle ramp phase, input a combined signal containing the ramp slope and the holding amplitude; Input a multi-frequency composite sinusoidal signal during the small-angle sinusoidal phase; During the rapid maneuver phase, a combination of square wave, high-frequency large-amplitude sine wave, and sudden large command signal is input; During the extreme attitude phase, input the asymptotic approach safety limit command, which is controlled by the safety limit approximation coefficient; During the multi-channel coupling stage, input signals with large-error in-phase sinusoidal and alternating modes with phase differences are combined into each channel.
10. A UAV attitude sliding mode control system for multi-scenario interference, comprising a processor and a memory, characterized in that, The memory stores a computer program, and the processor executes the computer program to implement a UAV attitude sliding mode control method for multi-scenario interference as described in any one of claims 1-9.