Adaptive Flight Attitude Control for Quadcopter Drones Based on Backstepping Sliding Mode

In recent years, quadcopter drones have gained widespread application across various fields due to their operational flexibility and simple structure. However, these advantages come with significant challenges in flight attitude control. During flight, a quadcopter is subject to multiple disturbances, such as wind forces and gravitational effects, which can lead to instability if not properly managed. Existing control methods often result in divergent or oscillatory behaviors, failing to achieve desired positions and attitudes. To address these issues, we propose an adaptive control method for quadcopter flight attitude based on the backstepping sliding mode algorithm. This approach integrates dynamic modeling, sensor measurements, and advanced control strategies to enhance stability and precision in complex environments.

The structure of a quadcopter typically includes a frame, flight control system, GPS, brushless motors, electronic speed controllers, propellers, and a power source. The frame serves as the carrier for all components, while the flight control system acts as the central processing unit, utilizing microprocessors and high-precision sensors, including MEMS inertial sensors, to manage attitude and position. The propulsion system, comprising motors and propellers, provides the necessary thrust for flight. Quadcopters operate in various modes, such as hover, ascent/descent, forward/backward movement, lateral flight, and yaw motion, each requiring precise control of rotor speeds. For instance, hover is achieved by balancing lift and gravity, while forward flight involves adjusting motor speeds to create pitch moments. These operational principles underscore the need for an accurate dynamic model to facilitate effective control.

To model the quadcopter dynamics, we consider it as a rigid body with six degrees of freedom—three translational and three rotational. The dynamics are derived from Newton’s laws, with assumptions of uniform mass distribution, rigidity, and negligible Earth rotation effects. The equations of motion are expressed as follows:

$$ x = \frac{\alpha_1 (\cos\phi \sin\vartheta \cos\psi + \sin\phi \sin\psi)}{M} $$

$$ y = \frac{\alpha_1 (\cos\phi \sin\vartheta \sin\psi – \sin\phi \cos\psi)}{M} $$

$$ z = -G + \frac{\alpha_1 \cos\phi \cos\vartheta}{M} $$

$$ \dot{\phi} = \frac{\dot{\vartheta} \dot{\psi} (H_y – H_z)}{H_x} – \frac{\dot{\vartheta} \upsilon H_r}{H_x} + \frac{L \alpha_2}{H_x} $$

$$ \dot{\vartheta} = \frac{\dot{\phi} \dot{\psi} (H_z – H_x)}{H_y} + \frac{\dot{\phi} \upsilon H_r}{H_y} + \frac{L \alpha_3}{H_y} $$

$$ \dot{\psi} = \frac{\dot{\phi} \dot{\vartheta} (H_x – H_y)}{H_z} + \frac{\alpha_4}{H_z} $$

Here, \(x\), \(y\), and \(z\) represent the position coordinates in the navigation frame; \(\phi\), \(\vartheta\), and \(\psi\) denote the roll, pitch, and yaw angles, respectively; \(M\) is the mass; \(G\) is gravitational acceleration; \(H_x\), \(H_y\), and \(H_z\) are the moments of inertia; \(H_r\) is the rotor inertia; \(L\) is the arm length; and \(\upsilon\) represents motor disturbances. The parameters \(\alpha_1\) to \(\alpha_4\) are defined as \(\alpha_1 = b (\upsilon_1^2 + \upsilon_2^2 + \upsilon_3^2 + \upsilon_4^2)\), \(\alpha_2 = b (\upsilon_4^2 – \upsilon_2^2)\), \(\alpha_3 = b (\upsilon_3^2 – \upsilon_1^2)\), and \(\alpha_4 = b (\upsilon_2^2 + \upsilon_4^2 – \upsilon_1^2 – \upsilon_3^2)\), where \(b\) is the conversion coefficient between body and navigation frames, and \(\upsilon_1\) to \(\upsilon_4\) are the motor speeds.

Accurate measurement of the quadcopter’s attitude is crucial for control. We employ MEMS inertial sensors, including gyroscopes and accelerometers, to estimate the roll, pitch, and yaw angles. The gyroscope measures angular velocity, while the accelerometer provides linear acceleration data. The measured angular velocity \(\omega_m\) and acceleration \(a_m\) are given by:

$$ \omega_m = (\bar{\omega}_m + B_g + N_g) t $$

$$ a_m = \bar{a}_m – G + N_a $$

where \(\bar{\omega}_m\) and \(\bar{a}_m\) are the true values, \(B_g\) is gyroscope drift, \(N_g\) and \(N_a\) are measurement noises, and \(t\) is time. The roll and pitch angles are estimated from accelerometer data as:

$$ \phi = \arctan\left(\frac{a_{my}}{a_{mz}}\right) $$

$$ \vartheta = \arctan\left(-\frac{a_{mx}}{\sqrt{a_{my}^2 + a_{mz}^2}}\right) $$

Here, \(a_{mx}\), \(a_{my}\), and \(a_{mz}\) are the components of acceleration along the x, y, and z axes. The yaw angle is derived from magnetometer measurements \(\delta_m = \bar{\delta}_m + N_\delta\), where \(N_\delta\) is noise, and is computed as:

$$ \psi = \arctan\left(\frac{\delta_{my} \cos\phi – \delta_{mz} \sin\phi}{\delta_{mx} \cos\vartheta + \delta_{my} \sin\phi \sin\vartheta + \delta_{mz} \cos\phi \sin\vartheta}\right) $$

To improve accuracy, we apply the Kalman filter algorithm to decouple the attitude angles, reducing errors from sensor noise and drift. For example, the roll angle state equation is:

$$ \phi_t = \phi_{t-1} + (\omega_{m_{t-1}} – B_{t-1}) \times T + \tau_\phi $$
$$ B_t = B_{t-1} $$

where \(T\) is the sampling time, and \(\tau_\phi\) is process noise. Defining the state vector \(\chi_t = [\phi_t, B_t]^T\), the state update and correction are performed using Kalman filtering to obtain decoupled results \(\bar{\phi}_t\), \(\bar{\vartheta}_t\), and \(\bar{\psi}_t\).

The core of our method lies in the backstepping sliding mode controller design. Backstepping breaks down the nonlinear system into subsystems, each with a control law designed using Lyapunov theory, while sliding mode control provides robustness against disturbances. The combined approach ensures that the quadcopter’s state reaches and maintains a sliding surface, achieving stable attitude control. The controller inputs are the decoupled attitude angles \(\bar{\phi}_t\), \(\bar{\vartheta}_t\), and \(\bar{\psi}_t\), and the outputs are control parameters \(U = \{U_1, U_2, U_3, U_4\}\) for height and attitude channels. The control parameters are derived as:

$$ U_1 = \frac{1}{c_1} \left( \frac{\bar{x}_t – x_o}{\Delta x} + \frac{\bar{y}_t – y_o}{\Delta y} + \frac{\bar{z}_t – z_o}{\Delta z} \right) $$

$$ U_2 = \frac{1}{c_2} \left( \frac{\bar{\phi}_t – \phi_o}{\Phi(\kappa)} \right) $$

$$ U_3 = \frac{1}{c_3} \left( \frac{\bar{\vartheta}_t – \vartheta_o}{\Phi(\mu)} \right) $$

$$ U_4 = \frac{1}{c_4} \left( \frac{\bar{\psi}_t – \psi_o}{\Phi(\Omega)} \right) $$

where \(c_1\) to \(c_4\) are coefficients from the Lyapunov function, \((\bar{x}_t, \bar{y}_t, \bar{z}_t)\) is the current position, \((x_o, y_o, z_o)\) is the desired position, \((\phi_o, \vartheta_o, \psi_o)\) is the desired attitude, and \(\Delta x\), \(\Delta y\), \(\Delta z\), \(\Phi(\kappa)\), \(\Phi(\mu)\), \(\Phi(\Omega)\) are control factors. The adaptive sliding mode control law is:

$$ \sigma = \bar{\chi}_t \times O_0 \frac{U(x_o, y_o, z_o, \phi_o, \vartheta_o, \psi_o)}{c} + O_1 $$

where \(O_0\) is control input, \(O_1\) is the sliding mode output, and the equivalent control law is \(Z\sigma + V\dot{\sigma} = 0\). The output is adjusted based on real-time attitude changes to minimize errors.

We developed an experimental platform to validate the proposed method, centered on a Pixhawk 4 autopilot controller. The quadcopter configuration includes key components such as motors, ESCs, propellers, GPS, and power modules, as summarized in Table 1.

Table 1: Quadcopter Component Specifications
Component Model Key Parameters
Autopilot Pixhawk 4 Processor: STM32F765
Motor X2212 KV980 KV Rating: 980
ESC 20A Current: 20A
Propeller 9×4.5 Self-locking Diameter: 9.4 inches
GPS Module NEO-M8N Sensitivity: 167 dBm
Power Module PM07 Voltage: 5V
Telemetry V5 Telemetry Frequency: 915 MHz
Receiver R9DS Channels: 9
Frame F450 Wheelbase: 450 mm
Battery 3S LiPo Capacity: 5200 mAh, Voltage: 11.1V

The ground control system consists of a computer running Mission Planner software, a remote controller, and telemetry modules. Before flight, firmware calibration was performed to ensure accuracy and safety. The quadcopter’s flight performance was evaluated using the “Flight Evaluation” website, confirming that all components meet experimental requirements.

To assess position control accuracy, we compared the proposed method with three existing approaches: composite continuous fast non-singular terminal sliding mode control (Method 1), extended state observer-based control (Method 2), and backstepping integral-iterative learning control (Method 3). The results for desired and actual positions are shown in Table 2.

Table 2: Quadcopter Position Control Results
Group Desired Position (x, y, z) Proposed Method Method 1 Method 2 Method 3
1 13, 25, 39 13, 25, 39 13, 10, 39 10, 25, 39 13, 25, 36
2 10, 5, 26 10, 5, 26 23, 5, 26 10, 5, 20 10, 11, 26
3 15, 23, 30 15, 23, 31 10, 23, 30 15, 15, 30 15, 23, 30
4 30, 12, 11 30, 12, 11 30, 12, 10 30, 12, 11 42, 12, 11
5 5, 12, 35 5, 12, 35 5, 9, 35 5, 10, 35 12, 12, 35
6 30, 25, 18 30, 25, 19 30, 25, 18 30, 25, 18 15, 25, 18
7 24, 20, 16 24, 20, 16 24, 15, 16 16, 20, 16 24, 20, 16
8 9, 11, 22 9, 10, 22 9, 21, 22 7, 10, 22 9, 21, 22
9 20, 31, 26 20, 31, 26 20, 30, 26 20, 31, 31 17, 31, 26
10 19, 14, 17 19, 14, 17 19, 10, 17 10, 14, 17 19, 14, 9

The proposed method achieves position control results nearly identical to the desired positions, with minor deviations of only 1 unit in groups 3, 6, and 8. In contrast, the comparison methods show significant errors, indicating superior performance of our approach in quadcopter position control.

For attitude control, we evaluated the roll, pitch, and yaw angles against desired values. The results, illustrated in Figure 1, demonstrate that the proposed method maintains attitudes close to the desired ones, with maximum deviations not exceeding 4°. Method 1 exhibits a roll angle deviation of up to 36°, Method 2 shows a yaw deviation of 54°, and Method 3 has a pitch deviation of 36°. This highlights the precision of our backstepping sliding mode-based control in managing quadcopter flight attitudes.

The effectiveness of the proposed method stems from the integration of dynamic modeling, sensor fusion, and adaptive control. The Kalman filter reduces measurement uncertainties, while the backstepping sliding mode controller ensures robustness against disturbances. The quadcopter’s ability to maintain stable flight under varying conditions validates the design. Future work could explore real-time parameter tuning and application in more complex scenarios, such as obstacle avoidance or swarm coordination.

In conclusion, the adaptive flight attitude control method for quadcopter drones, based on backstepping sliding mode algorithm, significantly enhances position and attitude control accuracy. By leveraging MEMS sensors, Kalman filtering, and a novel controller design, the method achieves precise tracking of desired states, outperforming existing techniques. This approach provides a reliable solution for stable quadcopter operations in diverse environments, contributing to advancements in unmanned aerial vehicle technology.

Scroll to Top