Disturbance Rejection Attitude Control for a Quadrotor: Theory and Experiment

In this article, an attitude tracking controller is designed for a quadrotor unmanned aerial vehicle (UAV) subject to lumped disturbances. Firstly, the attitude dynamical model of the quadrotor under external disturbances is established. Subsequently, an improved sliding mode control (SMC) strategy is designed based on the linear extended state observer (LESO). In this control scheme, the SMC will guarantee the sliding surface is finite time reachable and the LESO will estimate and compensate for the lumped disturbances. Then, the robustness and asymptotic stability of the proposed controller are proved by the stability analyses. Finally, three numerical simulation cases and comparative flight experiments validate the effectiveness of the developed controller.


Introduction
In recent years, researchers and engineers have worked intensively to develop practical aerial robots capable of performing missions with minimum or no human intervention. Among the aerial robots, it is postulated that a quadrotor will be applied in the future extensively for environmental monitoring, agricultural services, urban modeling, mapping and photographing, and wild fore surveillance, to name several applications [1][2][3]. An essential requirement for UAV aircraft consists of robust and autonomous navigation, guidance, and control equipped with the onboard flight microcontroller/microcomputer or with limited operation by a pilot if required. However, quadrotors are highly unstable, nonlinear, and coupled underactuated systems. When they are needed to accomplish tasks through complex environments, the electronic signal may be noisy and even unavailable, which leads to low or undesirable performance of the quadrotor. Hence, flight controller design for the quadrotor is a rather challenging problem, especially in the presence of the parametric uncertainties and external disturbances.
Generally, the flight controller design of the quadrotor can be handled using the following two approaches: termed linear control approach and nonlinear control approach. In the former method, several common control strategies such as linear quadratic regulator [4], model predictive control [5] and H ∞ technique [6] were first applied to stabilize the states of the quadrotor in some specified equilibrium points. However, these methods excessively depended on the accurate dynamic model and cannot offer a satisfactory control performance for a broad flight range with high nonlinearity. It is evident while constructing these control strategies that require the continuously updated information about the working model of the quadrotor in the real-time implementation. The aftereffects of any occurring instability are then accommodated using a high gain. In that case, undesirable transients may occur, which causes saturation of actuators and damage to the components in the system.
On the other hand, the nonlinear control approach becomes an alternative way to design the flight controller independent of model information. For instance, Honglei et al. [7] proposed a backstepping-based inverse optimal attitude controller for a quadrotor, which had the property of a maximum convergence rate in the sense of a control Lyapunov function. Dydek et al. [8] developed a modified adaptive controller to stabilize the attitude angles of quadrotors. Later, Refs. [9][10][11] had reported some adaptive control laws with different structures, and the effectiveness of these controllers was also verified through simulations or experiments. Chang et al. [12] used a nonlinear dynamic inversion method for the attitude control of quadrotors, where a linear observer was designed to eliminate the dependence of modeling precision.
Antidisturbance and robustness issues can be critical for the attitude control of quadrotors. As a robust control tool for disturbance rejection, SMC is insensitive to the model parameters and has a fast convergence speed [13]. Generally, SMC is used to solve against model errors and uncertain disturbances. It can guarantee the state variables slide to the desired equilibrium point with some inevitable oscillation. Unfortunately, the traditional SMC cannot hold the robustness anymore if lacking the information of bound of the disturbance. Instead, it needs the knowledge of the disturbances in order to compensate for the influence of the disturbances in the controlled system. This demands the SMC to be combined with a disturbance observer (DOB) to design a modified sliding mode controller.
The SMC controller based on DOB has provided a novel approach to overcome the model mismatches and external disturbances, rather than the use of high control gains or extensive iterative calculations [14,15]. The estimation of the information of the external disturbances and model mismatches can be realized by the DOB technique, which only relies on the knowledge of the nominal model and bound of the disturbances. In Ref. [16], an SMC based on the extended high gain observer was proposed to stabilize the quadrotor system under both mismatched and matched external disturbances. Zhao and Jiang [17] adopted nonlinear extended state observer (NESO) for SMC design of a quadrotor. The NESO made the SMC design more flexible and reduced the complexities. In Ref. [18], a continuous SMC was designed for the quadrotor with ESO, and an adaptive method of parameter tuning was used for this controller to obtain a good control performance. However, there is a disadvantage in the above NESO technique that it has large amounts of control parameters that need to be tuned [19][20][21]. As pointed in Refs. [22][23][24][25], a LESO might be preferred for multiple-input-multiple-output (MIMO) control systems since it has fewer control parameters. Moreover, this DOB method has some advantages such as simple in structure and fast convergence rate. Typically, a linear active disturbance rejection controller which combines LESO and proportion derivative (PD) was developed for the quadrotors under persistent disturbances or wind gusts [26,27].
Considering the superiority of LESO, it may be a feasible way to integrate the LESO with SMC to design a novel robust controller. Moreover, there is no generalized method to design SMC based on LESO (SMC-LESO) for attitude tracking control of a quadrotor having both parametric uncertainties and external disturbance. The main contribution of this article is to use the LESO to improve the performance of the classical SMC in terms of disturbance rejection. Specially, the LESO can effectively reduce the chattering effect in SMC through estimating the lumped disturbances. Moreover, the artificial bee colony algorithm has been used for parameter tuning for the proposed controller, which can realize the optimal control. Practically, the proposed controller is investigated through a series of simulation cases and flight experiments.
The outline of this article is given as follows. The attitude dynamical modeling of a quadrotor is described in Section 2. In Section 3, a robust control strategy is designed, and the stability analysis of the control scheme is presented. Comparative numerical simulations are performed to demonstrate the effectiveness of the proposed controller in Section 4. An experimental validation with flight tests is provided in Section 5. Finally, some conclusions and contributions are summarized in Section 6.

Attitude Dynamics
The quadrotor aircraft considered in this article is displayed in Figure 1. There are two frames subjected to the quadrotor, namely, the earth-fixed frame fO E X E Y E Z E g and the bodfixed frame fO B X B Y B Z B g. In these frames, the 3-DOF atti- where U 1 is the collective control command.
The physical parameters of our quadrotor are listed in Table 1. Some parameters can be directly obtained through measuring approach, and other parameters are received by the experimental method. For example, the principal moment of inertia can be measured by using a bifilar pendulum, as shown in Figure 2.
The goal in this article is to design a robust control law for system (1) with lumped disturbances in the time domain, and the system output ðϕ, θ, ψÞ would track the reference commands ðϕ r , θ r , ψ r Þ under Assumption 1.

LESO-Based Controller Design
3.1. Linear Extended State Observer. From equation (1), the input and output present a second-order derivative relation. In other words, the attitude dynamical model can be regarded as three second-order subsystems. The attitude model is rewritten as where w i is the external disturbance and f i is the uncertain function, also known as the lumped disturbances.
Take roll channel as an example; the uncertain secondorder system under the standard consideration is usually an integral chain system, described by [32] where x 1 and x 2 are the state variables, u is the control input, b is a system parameter, y is the system output, and f also is the lumped disturbances.
For the sake of simplicity, system (5) has the following state-space model: where x = ½x 1 , x 2 T , u = ½u 1 , u 2 T , and y = ½y 1 , y 2 T are the state variable, control input, and measured output, respectively, and A, B 1 , B 2 , and C are the given system matrices, which contents are similar to the following equation (8).

Remark 1.
The lumped disturbances f contain parametric uncertainties, external disturbance, and measured noise, which are the function of f ðx, wðtÞ, tÞ.
Remark 2. System (6) represents a general class of system compared with system (5) since the former is not confined to integral chained form and may be subject to lumped disturbance.
Assumption 2. In practice, the energy of the lumped disturbances is finite, and its rate of variation is bounded. Hence, assume that the lumped disturbances f are differentiable and bounded. It means k f k < ∞, k _ f k < ∞, and their bounds are defined as sup In LESO, the lumped disturbance of the system (6) is regarded as an extended state to estimate except for the actual system state, i.e., x 1 and x 2 . The extended state Figure 1: The configuration of the quadrotor.
3 International Journal of Aerospace Engineering equation of the system (6) by adding x 3 = f as the extended state is given by The LESO of the system (7) is constructed as follows [33]: where b z = ½x∧ 1 , x∧ 2 , x∧ 3 T is the estimate of the state variable z in the system (7). Matrix L is the observer gain, which can be obtained using a pole placement method [34].
where ω o > 0 is the observer bandwidth. ς i ði = 1, 2, 3Þ is chosen such that λðsÞ = s 3 + ς 1 s 2 + ς 2 s + ς 3 is Hurwitz. And ς i satisfies   International Journal of Aerospace Engineering The error of estimation in equation (9) is defined as Subtracting (9) from (7), one gets where Assumption 3. The error of estimation in equation (12) is bounded, and it is chosen as e * z = sup Proof. For any λ i < λ j ði < j and i, j = 1, 2, 3Þ, one obtains In that case, A e has three unique characteristic values. Therefore, there exists an invertible real matrix T which satisfies

International Journal of Aerospace Engineering
Using the following e-exponent equation form to rewrite equation (15), one gets For any t > 0, equation (17) can be expressed as the following form using the m ∞ norm: where βð⋅Þ is a weight function and m ∞ norm of a square matrix is equal to the product of its order value and maximum element.
The solution of error in equation (12) is calculated as With Assumption 2, the error in equation (13) is input to state-stable. Moreover, according to the compatibility between m ∞ norm and vector norm of a complex field, one gets where e z ð0Þ is the initial condition. Since lim t→∞ e −λ 1 t = 0, the system asymptotically reaches Remark 5. Assuming the first derivative of lumped disturbance satisfies lim t→∞ k _ f k = h b , the estimation error will be ultimately uniformly bounded.

Design of Sliding Mode Control Based on Linear Extended
State Observer. SMC is deemed as one of the nonlinear control techniques with the ability to process the coupling disturbances and strong nonlinearities [35][36][37]. To reduce the interferences of the lumped disturbance in the attitude   International Journal of Aerospace Engineering system of the quadrotor, a LESO is designed to estimate the disturbances from the external environment and internal dynamics. Combing the SMC and LESO, the robustness of the attitude system would be enhanced. A sliding mode surface for the system (5) under the lumped disturbances is defined as where k is a control parameter to be tunned. The tracking error e is equal tox 1 minus x r . The first derivative _ e is equal tox 2 minus _ x r . x r and _ x r are the referenced signal and its first derivative, respectively.
The first derivative of equation (22) is calculated as Substituting system (5) into equation (23), one gets an equivalent input where the lumped disturbances are estimated by the LESO.
To ease chattering and reconcile the need for fast convergence, we design a reaching law as where η is a gain to be tuned.
The SMC-LESO control law is designed as follows, which can ensure the sliding surface is finite time reachable: Proof. Consider the Lyapunov function and its derivative is This implies that the system state will converge to the desired equilibrium area asymptotically when η ≥ 0.
The block diagram of the designed control scheme has been shown in Figure 3.

Numerical Simulation
In this section, some comparative cases are considered to demonstrate the main ideas of the article. In Case 1, the control performance of the proposed controller is tested by tracking step commands compared with two other controllers. In Case 2, the robustness of the proposed controller is analyzed. In Case 3, the ability of antidisturbance of the proposed controller is investigated under the lumped disturbances with different amplitudes. All the simulation cases are conducted in Matlab 2019b programming environment on an Intel Core i7-3770 PC running Windows 10.
Case 1 (simulation about performance index). To show the efficiency of the proposed control strategy, a comparison between the SMC-LESO and SMC-NESO with the PD-LESO is presented. The control laws of the latter controllers are described in Appendix A. Three kinds of step signals are selected as the reference. Meanwhile, all the control parameters are tuned by the artificial bee colony algorithm (ABC), similar to our previous work in Refs. [38][39][40]. And the detailed flow chart of ABC in parameter tuning is given in Appendix B. In the ABC, the integral of time multiplied by absolute error (ITAE) is employed as the performance index. Hence, the objective function is defined as  (1) are simulated by three random signals, as shown in Figure 4. Figures 5-7 show the simulation results. Especially, the evolutions of attitude are shown in Figure 5, from which it can be observed that the referenced attitude can be tracked       Figure 4 from which it can be seen that the LESO performs higher prediction accuracy and faster convergence speed than the NESO. It should be noted that the sensitivity analysis for the variable disturbances will be given in Case 3. Furthermore, the tracking errors of three controllers are plotted in Figure 6, from which it is observed that the SMC-LESO demonstrates the highest tracking accuracy. The evolution curves of the objective function based on ABC for the three control methods are given in Figure 7, where the SMC-LESO obtained the smallest value. Hence, the simulation results of Case 1 demonstrate the proposed SMC-LESO has a good control performance in tracking accuracy and convergence speed. The other role of Case 1 is to provide a set of appropriate control parameters for the following simulations and flight experiments.
Case 2 (simulation about robustness). Consider the input command of the system (1) as a periodic sine trajectory. And the model parameter uncertainty ΔI determined randomly in ð0~25%ÞI is added, which indicates that the real moment of inertia I + ΔI is calculated in this case. The initial values of the attitude angles and angular velocities are set to 0 deg and 0 deg/s. The simulation results are shown in Figures 8 and 9. From the results, all the proposed controllers have the satisfied robustness even in the presence of parameters uncertainties and parameters perturbation, but the SMC-LESO performs best both in tracking performance and in control law.
Case 3 (simulation with variable disturbances). The goal of this simulation is to compare the ability of disturbance rejection between the NESO and LESO in the presence of unstable disturbances. In system (1), we chose two piecewise functions as the reference. Meanwhile, random noise with a covariance of 0.01 and a mean of 0 is added to the three input ports, respectively. And the amplitude of the random noise is variable. The simulation results are displayed in Figures 10 and 11. Results show that both the SMC-NESO and SMC-LESO can estimate and compensate for the disturbances. It is to be noted that when the amplitude of the disturbance d M ∈ ½−3, 3, the ability of antidisturbance of LESO is stronger than that of NESO. However, when the disturbance is small, i.e., d M ∈ ½−0:3, 0:3, NESO has a better performance than LESO. This phenomenon may be attributable to the research conclusion from Ref. [41]. More specially, the tracking performance of LESO hardly changes along with the amplitude of the disturbance, and the control gains of NESO are limited by the amplitude of the disturbance such that it could not accurately estimate the disturbance. Furthermore, when applying the two controllers to practical systems, SMC-LESO has an obvious advantage on the number of control parameters and simple control structure in comparison with the SMC-NESO.      International Journal of Aerospace Engineering

Experiment Results
For the purpose of validating the proposed control strategy SMC-LESO, some experiments are implemented on a quadrotor testbed as displayed in Figure 12. The testbed contains an X450 quadrotor, a couple of wireless routers, a ground station, an open-source flight control module called Pixhawk, a remote control unit, wind gust source (fan), and steel bracket. To eliminate the influence of position loop, the quadrotor is installed on a universal joint of the steel bracket. Our control algorithm is embedded into Pixhawk directly from Matlab/Simulink through a plug-in called PX4 PSP [42], where the computer and flight control extension board including inertial measurement unit, compass, accelerator, and gyroscopes are integrated. During the experiment, the vehicle is manually driven to the hovering point by the remote control unit. Then, the attitude tracking tests are carried out by switching an automatic flight mode. The Pixhawk generates the commands as inputs to control the angular speeds of four propellers. The quadrotor communicates with the ground station via a pair of wireless routers at a frequency of 50 Hz. In this work, the performance of the proposed controller for the quadrotor is preliminarily examined by flight experiments in the presence of wind gusts.
Case 1 (comparison with LADRC and SMC-NESO). Take the roll angle as an example, the quadrotor follows a step reference when the wind disturbances produced by fan are adopted to demonstrate the advantages of the SMC-LESO strategy. Similar to Case 2 in Section 4, the comparison between the SMC-LESO and other two controllers is shown in Figure 13. A step input reference of 60 deg is applied at t = 0 when wind speed is 2.75 m/s. It is possible to see how the response of the three controllers matches the desired trajectory. Based on the data, it can be seen that SMC-LESO has better performance. Additionally, error indicators, including the absolute values of mean values (AME), standard deviation (STD), and root mean squared (RMS), are introduced to analyze the tracking performance. The calculated results are listed in Table 2.
From the results, it is self-evident that the three controllers have offered good tracking performance in attitude tracking control for the quadrotors, which demonstrates the validation of the DOB technique. Furthermore, the SMC-LESO obtains a better dynamic output and higher tracking accuracy than SMC-NESO and LADRC. More specially, take the AME values of the tracking error for quality analysis, the AME value of SMC-LESO is 69.6% and 88.6% compared to those of SMC-NESO and LADRC, respectively. The same calculations can be directly observed from STD and RMS. It can be summarized that the attitude tracking performance has been enhanced with the SMC-LESO compared with the SMC-NESO and LADRC. Considering the fact that the attitude control under unexpected disturbances is also crucial in the long-distance flight; an additional experiment is carried out to test the proposed controller.

11
International Journal of Aerospace Engineering Case 2 (experiments with unexpected wind gusts). To rigorously test our controller, attitude tracking experiment with unexpected wind gusts is carried out. The experiment is divided into three stages: (1) when t ∈ ½35, 55, the roll channel works; (2) when t ∈ ½80, 88, the yaw channel works; and (3) when t ∈ ½300, 340, the pitch channel works. Several snapshots in Figure 14 show the process of the quadrotor tracking the given trajectories. In order to create the wind gusts, the fan is set up near the quadrotor and faces to the positive direction of each axis. In Figure 15(a), wind with the speed of 1.25 m/s is introduced in the positive direction of the Y axis at t = 46 s. In Figures 15(b) and 15(c), the wind speeds are 3.5 m/s at t = 307 s and 2.75 m/s at t = 82 s, respectively. All of these results indicate that the SMC-LESO can effectively compensate for the lumped disturbances in attitude tracking, thus provides better performances. Moreover, better robustness against lumped disturbances of the proposed control scheme has been observed when the quadrotor moves under different wind gusts. It is also crucial that the inaccurate control parameters do not affect the reference tracking performance, which is always desirable for off-line parameter tuning. Figure 16 shows the controller response of the proposed controller.

Conclusion
This article presented an improved sliding mode control based on linear extended state observer for the attitude control of a quadrotor. A LESO is designed to estimate the parametric uncertainties, external disturbance, and complex nonlinear dynamics, while a linear SMC control law is developed to compensate for the lumped disturbance. Results have shown that the SMC-LESO is asymptotically stable, and reachability of the system stability is guaranteed. Three simulation cases show the superiority of the proposed approach over the SMC-NESO and LADRC on control performance, particularly regarding the tracking accuracy, converge rate and robustness. Moreover, real-time experiments on the X450 quadrotor testbed verifies the effectiveness of the proposed algorithm. A future work will be focused on the expansion of the controller so that not only attitude but also for other elements of translational motion, namely, position and velocity, are collectively controlled by this controller. Furthermore, other control strategies will be researched for trajectory tracking control of the quadrotor, such as finite time control and self-adaptive control.    (1) ABC u y

Control system
Objective function (28) Initialization N s, T max, limit T max >limit?

Employed bees search new solution and generate v ij
Reinitialize the parameters and scout bees search x r SMC-LESO controller (21) Initialization N s, T max, limit Figure 17: Flow chart of ABC in parameter tuning (explain of the variables can be found in Ref. [41]).
13 International Journal of Aerospace Engineering