A quad-rotor unmanned aerial vehicle attitude intelligent control method and system
By combining multi-channel decoupled control and adaptive laws, the attitude control stability problem of quadcopter UAVs in complex environments is solved, and effective responses to strong nonlinearity and unknown disturbances are achieved, thereby improving the stability and robustness of the system.
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-07-31
AI Technical Summary
In the existing technology, the attitude control methods of quadcopter UAVs are difficult to effectively cope with strong nonlinearity and unknown disturbances in complex environments, resulting in poor stability. Furthermore, the parameter drift and out-of-bounds problems of sliding mode controllers affect the operational stability of UAVs.
A multi-channel decoupling control method is adopted, which adjusts the sliding surface parameters online through virtual control variables and adaptive laws. Combined with projection operator constraints and extended state observers for disturbance compensation, a composite control law is constructed to improve system stability and anti-interference capability.
It improves the control stability and anti-interference ability of quadcopter UAVs in complex environments, reduces the risk of instability caused by parameter drift and out-of-bounds, and enhances the controllability and robustness of the system.
Smart Images

Figure CN122488751A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicle (UAV) control technology, and in particular to a method and system for intelligent attitude control of a quadcopter UAV. Background Technology
[0002] Quadrotor UAVs, as a typical multi-rotor flight platform, are characterized by their compact structure, vertical takeoff and landing capabilities, and strong hovering ability, and are used in scenarios such as inspection and monitoring, emergency response, and logistics transportation. Their attitude control system directly affects flight stability and mission execution accuracy; therefore, high-precision attitude control methods for complex environments have become a research focus in this field.
[0003] Quadrone UAVs are multi-input multi-output nonlinear coupled systems. Their dynamic models include nonlinear terms (such as gyroscopic effects and Coriolis force terms). Furthermore, during actual flight, they are inevitably affected by external wind disturbances, parameter perturbations, and unmodeled dynamics. These factors typically act on the system as "lumped disturbances," making the attitude control problem highly uncertain and complex.
[0004] To address this type of problem, existing technologies often employ proportional-integral-derivative (PID) control methods or control strategies based on linearized models. However, these methods rely on accurate models and are difficult to effectively handle strong nonlinearity and unknown disturbances. In recent years, sliding mode control has been applied to the field of UAV attitude control due to its strong robustness to uncertainties and external disturbances.
[0005] For example, Chinese patent document CN115185185B discloses a method for establishing an adaptive sliding mode control system for a quadcopter. This method estimates the total system disturbance in real time using a linearly extended state observer and designs a variable gain switching term that automatically adjusts the switching gain according to the disturbance magnitude, achieving rapid suppression of large disturbances and suppression of chattering under small disturbances. While this patent achieves disturbance estimation and gain adjustment, its switching gain adjustment logic is relatively simple, and the sliding surface parameters are fixed. It lacks the ability to actively optimize deep parameters within the controller (such as the sliding surface slope), making it difficult to maintain optimal control performance when faced with large-scale parameter perturbations.
[0006] In related technologies, key parameters (such as sliding surface coefficients) in sliding mode controllers usually rely on manual presets or simple adaptive adjustments, lacking effective boundary constraint mechanisms. Under continuous disturbances or parameter perturbations, parameter drift or even exceeding the limits can easily occur, thus affecting the stability of the UAV during operation. Summary of the Invention
[0007] To address the issue of poor stability in traditional UAV control processes, this application provides a method and system for intelligent attitude control of a quadcopter UAV.
[0008] Firstly, this application provides an intelligent attitude control method for a quadcopter unmanned aerial vehicle (UAV), employing the following technical solution: A method for intelligent attitude control of a quadcopter unmanned aerial vehicle (UAV) includes: obtaining attitude tracking errors of multiple channels for controlling the UAV based on the difference between the actual attitude angle and the desired attitude angle, wherein the channels for controlling the UAV include roll angle, pitch angle and yaw angle channels. Based on the attitude tracking error, calculate virtual control quantities for multiple channels used to control the UAV, and control the UAV based on the virtual control quantities; The virtual control quantity includes an equivalent control term; the equivalent control term is obtained by setting the derivative of the sliding surface variable to zero. The sliding surface variable includes multiple sliding surface parameters. The update rate of the sliding surface parameters is calculated in real time based on the adaptive law of the projection operator and adjusted online to constrain the sliding surface parameters within a preset parameter range.
[0009] By uniformly mapping the deviation between the actual attitude angle and the desired attitude angle to attitude tracking error, the system can uniformly measure the degree of attitude deviation across the three axes and use this as the sole driving source for control input, fundamentally reducing the problem of difficult unified adjustment of multi-variable coupling in traditional methods. Based on this, the overall control task is decomposed into three channels: roll angle, pitch angle, and yaw angle. Channel-level control is achieved through virtual control variables, transforming the originally highly coupled multi-input multi-output system into a clearly structured combination of subsystems, reducing control design complexity and improving system controllability and stability.
[0010] In the overall composition of virtual control variables, equivalent control ensures that the system can maintain a stable trajectory under ideal conditions, forming the basic stability framework of the control system. At the same time, by introducing an adaptive law based on projection operators, the sliding surface parameters are updated with bounded constraints, enabling the system to automatically adjust the control strength when facing continuous disturbances or parameter perturbations. This reduces instability caused by parameter drift or out-of-bounds errors, thereby further enhancing the long-term stability of the system and solving the problem of parameter drift or even out-of-bounds errors affecting the stability of UAV operation in traditional technologies.
[0011] Optionally, the sliding surface variables are a weighted sum of the attitude tracking error, the nonlinear fractional power of the attitude tracking error, and the fractional power of the error change rate, which characterizes the rate of change of the attitude tracking error.
[0012] A composite sliding surface representation is constructed, incorporating attitude tracking error, fractional powers of error nonlinearity, and fractional powers of the error rate of change. This expands the characterization of the system's error state from a single linear dimension to a multi-scale nonlinear fusion description, thereby enhancing the controller's overall responsiveness to dynamic processes. Furthermore, by modulating the error and error rate of change in a fractional power form, the sliding surface acquires nonsingularity and finite-time convergence characteristics mathematically. This avoids the singularity problem caused by integer power structures in traditional sliding mode control, enabling the control system to maintain stable evolution capabilities across the entire state space.
[0013] Optionally, the formula for calculating the update rate of the sliding surface parameters is: In the formula, Indicates the first The update rate of the sliding surface parameters of the channel. This represents a projection operator function with upper and lower bound truncation properties. Indicates the first Adaptive learning rate of the channel, Indicates the first The sliding surface variable of the channel, This indicates the sensitivity of the sliding mode to this parameter. Indicates the first The preset attenuation coefficient of the channel; Indicates the first The sliding surface parameters of the channel; Indicates sliding surface parameters Allowable minimum value boundary; Indicates sliding surface parameters Allowed maximum value boundaries.
[0014] An adaptive update mechanism with projection operator constraints is introduced, enabling the adjustment process of sliding surface parameters to exhibit synergistic characteristics of adaptive optimization and boundary constraints, thereby achieving stable and controllable parameter evolution in dynamic environments. By combining sliding surface variables with attenuation coefficients, parameters can be automatically adjusted according to the degree of system deviation. Simultaneously, the projection operator constrains the parameter update direction, keeping the sliding surface parameters within a preset range, thus avoiding the parameter divergence or drift problems found in traditional adaptive methods.
[0015] Optionally, the minimum boundary of the sliding surface parameter is 0.1, and the maximum boundary is 20.0.
[0016] Setting this range can prevent slow response due to excessively small sliding surface parameters or high-frequency oscillations due to excessively large sliding surface parameters, thereby maintaining the dynamic balance of the control system as a whole.
[0017] Optionally, the virtual control quantity also includes a switching control item. The calculation method of the switching control item includes: exponentially calculating the absolute value of the sliding surface variable to obtain a first influence coefficient, multiplying the first influence coefficient by the sign function of the sliding surface variable to obtain a second influence coefficient, and multiplying the second influence coefficient by a preset constant switching gain to obtain the switching control item.
[0018] By constructing a switching control term based on sliding surface variables and employing a structure of absolute value exponentiation plus a sign function, the control strength continuously varies with the magnitude of the attitude tracking error. When the attitude tracking error is large, the exponential amplification effect enhances the control strength and improves the convergence speed; when the error is small, the control effect weakens, thereby reducing chattering.
[0019] Optionally, the virtual control quantity also includes an observation feedforward term, which is used to compensate for the lumped disturbance of the corresponding control channel obtained based on a preset extended state observer; the extended state observer is a third-order extended state observer, which is used to simultaneously estimate the attitude tracking error, the rate of change of error, and the lumped disturbance.
[0020] A third-order extended state observer is introduced to jointly estimate attitude tracking error, error rate of change, and lumped disturbance, acquiring disturbance information in real time and compensating through observation feedforward terms. This enables UAV control to estimate and compensate for unknown disturbances without relying on an accurate model, improving the system's anti-interference capability and reducing model dependence.
[0021] Optionally, the extended state observer includes multiple observer gain parameters; a first observer gain parameter group is set for the roll and pitch channels; a second observer gain parameter group is set for the yaw channel, wherein the parameter values of the second observer gain parameter group are less than the corresponding parameter values of the first observer gain parameter group.
[0022] Different observer gain parameter sets are set for different channels controlling the UAV to match the control strategy with the physical characteristics of each channel. Roll and pitch angles have fast responses, so larger gains are used to improve response speed; yaw angles have slow responses, so smaller gains are used to suppress noise effects.
[0023] Optionally, the virtual control quantity also includes a neural network compensation term, which is obtained from the output of a radial basis function neural network and is used to compensate for unmodeled dynamics and inter-channel coupling interference. The steps for obtaining the neural network compensation term are: constructing a hidden layer with a Gaussian function as the activation function and calculating the output activation degree of each hidden layer neuron. The sum of the output activations of all hidden layer neurons is taken as the network activation level, and the negative of the product of the network activation level and the preset compensation gain coefficient is taken as the neural network compensation term.
[0024] A neural network compensation term based on radial basis functions is introduced into the virtual control quantity to compensate for unmodeled dynamics and inter-channel coupling disturbances online, thereby overcoming the shortcomings of model-based control methods in complex nonlinear systems. Hidden layers with Gaussian functions as activation functions are constructed, and the output activation degree of each hidden layer neuron is calculated, enabling the network to perform nonlinear mapping of the system's current dynamic state based on the input state (including attitude tracking error, error rate of change, and lumped disturbance estimation). The local response characteristics of the Gaussian function make each neuron sensitive only to inputs in specific regions, thus achieving regional characterization of complex dynamic features and improving the fitting accuracy of local nonlinear features. The output activation degrees of all hidden layer neurons are summed to obtain the overall activation degree of the network, and then multiplied by a preset compensation gain coefficient to obtain the neural network compensation term.
[0025] Optionally, the hidden layer neurons of the radial basis function neural network use a Gaussian function as the activation function, and the center vector of each hidden layer neuron is determined by K-means clustering of the expected running data.
[0026] The approximation capability of radial basis function neural networks largely depends on the distribution of the center vectors. If the center vectors are not selected appropriately, it will lead to insufficient or redundant coverage in some areas, thus affecting the approximation accuracy. By using the K-means clustering method, the center vectors can be automatically distributed in data-dense areas, making the network structure match the distribution characteristics of the actual operating state space, thereby enabling the focused characterization of frequently occurring states.
[0027] Secondly, this application provides an intelligent attitude control system for a quadcopter unmanned aerial vehicle (UAV), which adopts the following technical solution: A quadcopter drone attitude intelligent control system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-described quadcopter drone attitude intelligent control method is implemented.
[0028] The above-mentioned intelligent attitude control method for quadcopter UAVs is used to generate a computer program, which is then stored in a memory for loading and execution by a processor. This allows for the creation of a system based on the memory and processor, making it convenient to use.
[0029] This application has the following technical effects: it constructs a multi-channel decoupled nonlinear control law, sets the derivative of the sliding surface variable to zero to obtain the equivalent control term, introduces an adaptive constraint update law based on the projection operator to adjust the sliding surface parameters online, and solves the instability problem caused by parameter drift and out-of-bounds in traditional methods. Attached Figure Description
[0030] Figure 1This is a schematic diagram of an intelligent attitude control method for a quadcopter unmanned aerial vehicle according to an embodiment of this application.
[0031] Figure 2 This is a schematic diagram illustrating the steps for obtaining the equivalent compensation term in an intelligent attitude control method for a quadcopter unmanned aerial vehicle according to an embodiment of this application.
[0032] Figure 3 This is a schematic diagram illustrating the steps for obtaining neural network compensation terms in an intelligent attitude control method for a quadcopter unmanned aerial vehicle according to an embodiment of this application. Detailed Implementation
[0033] This application discloses an intelligent attitude control method for a quadrotor unmanned aerial vehicle (UAV). It establishes a UAV attitude dynamics model and implements multi-channel decoupling to construct a single-channel tracking error system. Subsequently, an extended state observer is introduced to obtain real-time feedforward estimates of the error derivative and lumped disturbance. During the control law design stage, a sliding mode surface is constructed, and a projection operator is introduced to achieve adaptive constraint updates of the sliding mode parameters, preventing system instability induced by parameter drift due to continuous disturbances. Based on this, a radial basis function neural network is used for deep learning and online compensation of unmodeled dynamics and strongly coupled disturbances. Finally, a composite control law including equivalent control, robust switching, and multi-source compensation mechanisms is synthesized and inversely solved to output physical torque. This improves the stability of the UAV control process.
[0034] Reference Figure 1 A method for intelligent attitude control of a quadcopter unmanned aerial vehicle includes steps S1-S2.
[0035] S1: Obtain the attitude tracking error of multiple channels for controlling the UAV based on the difference between the actual attitude angle and the desired attitude angle. The channels for controlling the UAV include roll angle, pitch angle and yaw angle channels.
[0036] To describe the rotational motion of a quadcopter drone in three-dimensional space, a reference coordinate system needs to be established. The inertial coordinate system is defined as follows: Define the body coordinate system as The attitude angle vector in the body coordinate system is selected as... ,in For roll angle, The pitch angle, For the yaw angle, the angular velocity vector is selected as... ,in For the roll rate, For pitch rate, This is the yaw rate.
[0037] The attitude angle vector is used to characterize the degree of deflection of the UAV relative to the horizontal plane and due north; the angular velocity vector is used to characterize the speed at which the UAV rotates around its own axis.
[0038] To establish the conversion relationship between the rate of change of attitude angle and the angular velocity of the body, the following kinematic equations are constructed: ; In the formula, This represents the rate of change of the roll angle of a quadcopter drone. This represents the rate of change of pitch angle of a quadcopter drone. This represents the rate of change of the yaw angle of a quadcopter drone; , , These are the angular velocities of the quadcopter drone's body around the three coordinate axes of the body coordinate system; , , These are the roll angle, pitch angle, and yaw angle of the quadcopter drone, respectively.
[0039] When a UAV has an angular velocity about its body axis, due to the rotation of the coordinate system, the rate of change of its Euler angles is a nonlinear combination of trigonometric functions of multiple channel angular velocities. As the roll or pitch angle increases, the rate of change of the yaw angle will be affected by the cross-effect of the roll and pitch angular velocities.
[0040] Furthermore, to describe how the applied torque changes the angular velocity of the body, the following dynamic equations are constructed based on the principles of rigid body dynamics: ; In the formula, , , The UAV in the body coordinate system axis, Shaft and Moment of inertia of the shaft; , , Angular acceleration for roll, pitch, and yaw angles; , , These represent the angular velocity components of the aircraft around the three coordinate axes of the aircraft coordinate system; , , The control torques generated by the respective actuators (i.e., the speed difference of the four rotors) act on the roll, pitch, and yaw axes; , , These are the external lumped disturbance torques acting on the roll, pitch, and yaw axes, respectively.
[0041] The angular acceleration (i.e., the rate of change of angular velocity) on a certain axis is positively correlated with the control torque applied to that axis and inversely correlated with the moment of inertia. It is also affected by the gyroscopic effect of the angular velocities of the other two axes and the superposition of external disturbances. In actual flight, this means that when crosswinds apply external lumped disturbance torques, in order to keep the angular acceleration zero, the controller must output a control torque of equal magnitude but opposite direction.
[0042] In this embodiment, the moment of inertia and The preferred value is to , Preferred to This parameter range corresponds to common small and medium-sized reconnaissance quadcopter UAVs. When the parameter is too large, it requires excessive torque output from the control side, which can cause motor saturation; when the parameter is too small, even a slight external disturbance can cause the aircraft to roll violently. The selected range can achieve a balance between maneuverability and wind resistance stability.
[0043] To achieve standardized design for controllers, it is necessary to combine the kinematic equations and dynamic equations, eliminate the intermediate angular velocity variable, and construct a second-order nonlinear standard form.
[0044] The specific formula for establishing the standard equation is as follows: ; In the formula, This is the attitude angular acceleration vector; The vector represents a known nonlinear function, which represents known nonlinear terms caused by gravity, Coriolis force, etc. To control the input gain matrix, where , , ; To control the torque vector; The lumped disturbance vector includes external airflow disturbances and perturbations of the model's own parameters.
[0045] The attitude angular acceleration of the machine is determined by the sum of the known nonlinear coupling dynamics, the proportionally scaled input torque provided by the actuator, and all unknown external disturbances.
[0046] Furthermore, the desired attitude angle vector is defined. By calculating the actual attitude angle vector With the desired attitude angle vector The difference is used to obtain the attitude tracking error. .
[0047] To decouple a multiple-input multiple-output (MIMO) system, a virtual control input vector is defined. and order This breaks down the coupled system into three independent single-channel subsystems: For the One channel ( The formula for calculating the error acceleration of attitude tracking error change can be expressed as: ; In the formula, For the first The second derivative of the attitude tracking error of each channel, i.e., the error acceleration; For the first The known nonlinear components of each channel; For the first Virtual control input for each channel; For the first Lumped interference in the channel; For the first The second derivative of the desired attitude angle of the channel, i.e. the desired angular acceleration.
[0048] This part represents the actual angular acceleration. The change in error acceleration is jointly determined by the known nonlinearity of the system, the virtual control input applied by the control system, the external disturbance component, and the acceleration of the target command itself. When the value of the virtual control input can completely cancel out the known nonlinear component and the external disturbance component, and track the target acceleration, the error acceleration will tend to zero.
[0049] Assuming the current pitch channel ( The known nonlinear components of ) External lumped interference components The desired attitude angle is constant (therefore) If the system outputs virtual control input. Then the error acceleration .
[0050] S2: Calculate virtual control quantities for multiple channels used to control the UAV based on the attitude tracking error, and control the UAV based on the virtual control quantities.
[0051] The virtual control quantity for any channel controlling a UAV consists of an equivalent control term, a switching control term, an observation feedforward term, and a neural network compensation term.
[0052] Specifically, the formula for calculating the virtual control quantity can be expressed as: In the formula, Indicates the action on the first aisle( That is, the virtual control quantity of the three channels for controlling the drone; For the first The equivalent control term of the channel is used to keep the state sliding on the sliding surface; Provide robust actions to suppress uncertainty when switching control items; For prediction-based feedforward compensation terms; This is a neural network compensation term.
[0053] Finally, based on the inverse operation of the diagonal matrix, the virtual control quantity is solved into the actual control torque of the UAV. The actual control torque is then converted into the rotation speed command of each rotor of the quadcopter UAV, which drives the quadcopter to rotate through the electronic speed controller module, thereby completing a highly robust and high-precision intelligent attitude control closed loop.
[0054] The steps for obtaining the equivalent compensation term include steps F1-F2.
[0055] F1: Construct a sliding surface and design an adaptive parameter update law based on the projection operator to adjust and constrain the sliding surface parameters online.
[0056] To ensure that the UAV control system converges on the sliding surface in a finite time and avoids control singularities, a nonlinear term including a fractional exponent is used to construct the sliding surface function.
[0057] For any channel controlling the UAV, the sliding surface function can be expressed as: ; In the formula, For sliding surface variables; This refers to attitude tracking error; The rate of change of error; and These are the sliding surface parameters in this step, and their values need to be adjusted adaptively. All are positive odd constants, and satisfy the following conditions: , This ensures the nonsingularity and finite-time convergence properties of the sliding surface.
[0058] The sliding surface variable is a weighted sum of the current attitude tracking error of the UAV system, the nonlinear fractional power of the attitude tracking error, and the fractional power of the rate of change of the error. When the sliding mode occurs (i.e....) The attitude tracking error and its rate of change are mutually constrained by a nonlinear combination. Due to the ratio... , By limiting it to a specific range, the error term in the denominator after differentiation is avoided, which leads to division by zero error, thus overcoming singularity.
[0059] Meanwhile, to reduce instability caused by excessive adjustment of sliding surface parameters when encountering extreme attitudes, a projection operator is introduced to forcibly constrain the adaptive evolution direction.
[0060] Specifically, for the sliding surface parameter update law, the formula for the projection operator can be expressed as: ; In the formula, Indicates the first The update rate of the sliding surface parameters of the channel. This represents a projection operator function with upper and lower bound truncation properties. Indicates the first Adaptive learning rate of the channel, Indicates the first The sliding surface variable of the channel, This indicates the sensitivity of the sliding mode to this parameter. Indicates the first The attenuation coefficient set for the channel to prevent parameters from slowly drifting under noise; Indicates the first The sliding surface parameters of the channel; Indicates sliding surface parameters The minimum allowable value boundary can be set to, for example, 0.1; Indicates sliding surface parameters The maximum allowed boundary can be set to, for example, 20.
[0061] The change reflects the degree to which the system deviates from the predetermined sliding trajectory. When the system has a deviation but has not touched the physical boundary, the update rate... It consists of an error-driven term and an anti-drift term, thus spontaneously seeking the optimal parameter solution. When the parameters When the variable is continuously increased or decreased and attempts to cross the allowed preset boundary, the projection operator will immediately intervene and truncate the update rate to zero or change its sign to ensure that the independent variable never goes out of bounds.
[0062] In this embodiment, the parameter constraint range is preferably... When the parameter is below the limit value At this time, the feedback convergence speed of the sliding surface is extremely slow, resulting in a deterioration in dynamic response; when the parameters are higher than Excessive feedback can trigger unmodeled oscillations in the system and cause high-frequency chattering. By strictly limiting the amplitude within this optimal region, the system's parameter convergence rate can be maintained above the optimal level during the extreme attitude protection phase, reducing flight instability accidents.
[0063] Similarly, the parameters can be derived. The corresponding sliding surface parameter update rate.
[0064] F2: The equivalent control term derived by setting the derivative of the sliding surface variable to zero. The derivation process is a conventional technique in this field and will not be elaborated here. Essentially, it represents the balancing torque that must be applied to maintain the sliding state on the sliding surface, assuming the system is in an ideal, undisturbed state.
[0065] For any channel controlling the UAV, the prediction-based feedforward compensation term is: It constructs an extended state observer for the attitude tracking error, estimates the lumped interference of each attitude channel, obtains the estimated value of the lumped interference, and uses the inverse of the estimated value as a feedforward compensation term.
[0066] Specifically, in order to achieve active feedforward compensation for unknown disturbances, the unmeasurable lumped disturbance is expanded into a new state variable, and a third-order extended state observer is constructed using finite-time convergence theory.
[0067] For any channel, define an extended state variable. , , ; Indicates the first The attitude tracking error of the channel; This represents the rate of change of error, i.e., the first derivative of the attitude tracking error. Represented as the first The lumped interference of the channel, and the calculation formula of its extended state observer, can be expressed as: ; In the formula, , and They represent the first The observed estimates of attitude tracking error, error rate of change, and lumped disturbance for each channel; representing... , and This represents the preset observer gain parameter. This represents a nonlinear function used to improve convergence performance. This represents the first-order estimation error of the extended state observer, which is the difference between the attitude tracking error output by the extended state observer and the true attitude tracking error input to it. , , This represents the power constant in the nonlinear tracking function, typically taking a value between 0 and 1, and is used to change the degree of nonlinearity of the function; This represents the width of the linear interval of the nonlinear tracking function, used to eliminate numerical switching chattering near the origin; Indicates the first The virtual control input for each channel, that is, the control signal output by the controller and applied to that channel; For the first The known nonlinear components of each channel; For the first The second derivative of the desired attitude angle of the channel.
[0068] In response to the physical characteristics of different motion channels of the quadcopter UAV, this embodiment has made differentiated configurations of the gain parameters: the extended state observer includes multiple observer gain parameters; for the roll angle channel and the pitch angle channel, a first observer gain parameter group is set; for the yaw angle channel, a second observer gain parameter group is set, wherein the parameter values of the second observer gain parameter group are less than the corresponding parameter values of the first observer gain parameter group.
[0069] Specifically, the first observer gain parameter set takes the value of , , This configuration ensures rapid tracking of drastic attitude changes through a high first-order gain, while using a smaller third-order gain to smooth disturbance estimation and prevent high-frequency noise from being injected into the control loop. The gain parameter set for the second observer is [value to be inserted here]. , , Since the yaw angle channel has a relatively large moment of inertia and a slow aerodynamic disturbance response, appropriately reducing the gain can effectively filter high-frequency interference caused by motor reverse torque fluctuations and improve heading stability.
[0070] Among them, the nonlinear function used to improve convergence performance The calculation formula for this conventional anti-jerkiness filtering method is as follows: ; In the formula, This represents the estimation bias of the input; It is a power constant; The width of the linear interval; It is a symbolic function.
[0071] From the extended state observer formula, it can be seen that when the estimation error... When deviating from zero, the nonlinear function The output increases rapidly, and a reverse correction signal is generated through weighted adjustment of the gain coefficient. This forces the derivatives of the estimated state variables at each order to be updated for compensation, thus ensuring that the evolution direction of the internal state always approximates the actual physical state. This extended state observer can transform complex high-frequency perturbations into deterministic estimated outputs without requiring an exact analytical model of the controlled object, thereby reducing the conservatism of the control system.
[0072] Switching control items for any channel controlling the drone.
[0073] The calculation method includes: exponentially powering the absolute value of the sliding surface variable to obtain a first influence coefficient; multiplying the first influence coefficient by the sign function of the sliding surface variable to obtain a second influence coefficient; and multiplying the second influence coefficient by a preset constant switching gain to obtain the switching control term. The calculation formula can be expressed as: ; In the formula, For the first Channel switching control items; For the first The channel constant switching gain is usually set by those skilled in the art based on experience. In this embodiment, the value of the constant switching gain is set between 0.5 and 2.0. For the first The nonlinear power parameter of the channel is determined based on the experience of those skilled in the art; This refers to the current sliding surface variable.
[0074] In the formula, as soon as the UAV deviates from the sliding surface, a reverse pulling torque will be applied immediately, and the pulling force will be greater the further it deviates, thereby forcing the system to return to the designed trajectory.
[0075] For any neural network compensation term of a channel controlling a drone, the acquisition steps include steps D1-D2.
[0076] D1: Construct hidden layers with Gaussian activation functions and calculate the output activation of neurons in each hidden layer.
[0077] A radial basis function neural network compensator is constructed to compensate for unmodeled dynamics and inter-channel coupling interference in the online learning compensation system. Since strong wind disturbances and the unique aerodynamic cross-coupling of the quadrotor platform are difficult to completely linearize and separate using conventional observers, a three-input, single-output neural network is built for each channel. Its real-time approximation output is directly superimposed into the final control signal.
[0078] To measure the degree of activation response of an input state to a specific neuron's feature pattern, a Gaussian radial basis function is used as the activation mechanism for the hidden layer. Specifically, the formula for calculating the output of a hidden layer neuron can be expressed as: ; In the formula, Indicates the first In the neural network corresponding to the channel, the first The output activation level of each hidden layer neuron Indicates the first The input to the neural network corresponding to the channel includes the error, the error derivative, and the system state vector of the disturbance estimate. This represents the center vector of the hidden neuron. Indicates the first The width parameter in the neural network corresponding to the channel determines the coverage of the receptive field.
[0079] From the Gaussian function formula, it can be seen that when the real-time input system state vector... Gradually approaching the central anchor point of a hidden neuron in multidimensional space. When the square of the Euclidean distance in the molecule decreases, the influence coefficient of the exponential operation approaches that of the Euclidean distance. This means that the neuron reaches its highest activity level when the input state is far from the central region; conversely, when the input state is far from the central region, the output decays exponentially and rapidly towards zero. This indicates that the network achieves precise isolation and pattern response to the local coupling characteristics of the nonlinear system through distance measures.
[0080] Optionally, in this embodiment, to ensure that the radial basis function network has sufficient nonlinear expressive power and generalization performance, the center vector of the hidden neuron can be obtained by using the K-means clustering algorithm in the expected operating space to obtain the data density center as the center vector. Alternatively, the normalized working interval of the input variables can be uniformly gridded and fixed nodes can be selected.
[0081] At the same time, the width parameter It can usually be calculated using a formula, which is to take the maximum distance between all cluster centers and divide it by 1 / 2. The calculation results in which This represents the total number of hidden nodes. This hyperparameter design allows for a moderate overlap of the receptive fields of adjacent neurons, avoiding recognition dead zones or high-frequency oscillations in the input space and ensuring a smooth approximation of the unmodeled dynamic learning process.
[0082] D2: The sum of the output activations of all hidden layer neurons is taken as the network activation level, and the negative of the product of the network activation level and the preset compensation gain coefficient is taken as the neural network compensation term.
[0083] The formula for calculating the compensation term in a neural network can be expressed as: ; In the formula, For the first The neural network compensation term corresponding to the channel; This is the compensation gain coefficient; Indicates the first In the neural network corresponding to the channel, the first The output activation of neurons in the hidden layer.
[0084] By adjusting the gain coefficient, the activation state of the network can be scaled to the corresponding virtual control torque level to counteract the corresponding unknown coupling.
[0085] This application also discloses a quadcopter drone attitude intelligent control system, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a quadcopter drone attitude intelligent control method according to this application is implemented.
[0086] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0087] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for intelligent attitude control of a quadcopter unmanned aerial vehicle (UAV), characterized in that, include: The attitude tracking error of the UAV is obtained by the difference between the actual attitude angle and the desired attitude angle. The channels for controlling the UAV include roll angle, pitch angle and yaw angle channels. Based on the attitude tracking error, calculate virtual control quantities for multiple channels used to control the UAV, and control the UAV based on the virtual control quantities; The virtual control quantity includes an equivalent control term; the equivalent control term is obtained by setting the derivative of the sliding surface variable to zero. The sliding surface variable includes multiple sliding surface parameters. The update rate of the sliding surface parameters is calculated in real time based on the adaptive law of the projection operator and adjusted online to constrain the sliding surface parameters within a preset parameter range.
2. The intelligent attitude control method for a quadcopter UAV according to claim 1, characterized in that, The sliding surface variables are a weighted sum of the attitude tracking error, the nonlinear fractional power of the attitude tracking error, and the fractional power of the rate of change of the error, which characterizes the rate of change of the attitude tracking error.
3. The intelligent attitude control method for a quadcopter UAV according to claim 1, characterized in that, The formula for calculating the update rate of the sliding surface parameters is: In the formula, Indicates the first The update rate of the sliding surface parameters of the channel. This represents a projection operator function with upper and lower bound truncation properties. Indicates the first Adaptive learning rate of the channel, Indicates the first The sliding surface variable of the channel, This indicates the sensitivity of the sliding mode to this parameter. Indicates the first The preset attenuation coefficient of the channel; Indicates the first Parameters of the sliding surface of the channel; Indicates sliding surface parameters Allowable minimum value boundary; Indicates sliding surface parameters Allowed maximum value boundaries.
4. The intelligent attitude control method for a quadcopter UAV according to claim 3, characterized in that, The minimum boundary value of the sliding surface parameter is 0.1, and the maximum boundary value is 20.
0.
5. The intelligent attitude control method for a quadcopter unmanned aerial vehicle according to claim 1, characterized in that, The virtual control quantity also includes a switching control term. The calculation method of the switching control term includes: exponentially calculating the absolute value of the sliding surface variable to obtain the first influence coefficient, multiplying the first influence coefficient by the sign function of the sliding surface variable to obtain the second influence coefficient, and multiplying the second influence coefficient by the preset constant switching gain to obtain the switching control term.
6. The intelligent attitude control method for a quadcopter unmanned aerial vehicle according to claim 1, characterized in that, The virtual control quantity also includes an observation feedforward term, which is used to compensate for the lumped interference of the corresponding control channel obtained based on a preset extended state observer. The extended state observer is a third-order extended state observer used to simultaneously estimate attitude tracking error, error rate of change, and lumped disturbance.
7. The intelligent attitude control method for a quadcopter unmanned aerial vehicle according to claim 6, characterized in that, The extended state observer includes multiple observer gain parameters; a first observer gain parameter group is set for the roll and pitch channels; a second observer gain parameter group is set for the yaw channel, wherein the parameter values of the second observer gain parameter group are less than the corresponding parameter values of the first observer gain parameter group.
8. The intelligent attitude control method for a quadcopter UAV according to claim 1, characterized in that, The virtual control quantity also includes a neural network compensation term, which is obtained from the output of a radial basis function neural network and is used to compensate for unmodeled dynamics and inter-channel coupling interference. The steps for obtaining the neural network compensation term are: constructing a hidden layer with a Gaussian function as the activation function and calculating the output activation degree of each hidden layer neuron; The sum of the output activations of all hidden layer neurons is taken as the network activation level, and the negative of the product of the network activation level and the preset compensation gain coefficient is taken as the neural network compensation term.
9. The intelligent attitude control method for a quadcopter unmanned aerial vehicle according to claim 8, characterized in that, The hidden layer neurons of the radial basis function neural network use a Gaussian function as the activation function, and the center vector of each hidden layer neuron is determined by K-means clustering of the expected running data.
10. A quadcopter unmanned aerial vehicle (UAV) attitude intelligent control system, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a method for intelligent attitude control of a quadcopter unmanned aerial vehicle according to any one of claims 1-9.