Abstract
The robust control problem in attitude tracking of an unmanned aerial vehicle quadrotor is a challenging task due to strong parametric uncertainties, large nonlinearities and high couplings in flight dynamics. In this paper, a continuous nonsingular fast terminal sliding mode controller based on linear extended state observer is proposed for attitude tracking control of a quadrotor under lumped disturbances. The proposed control method requires no prior knowledge of the attitude dynamics. It can ensure rapid convergence rate and high tracking precision due to terminal sliding mode surface and fast reaching law. The controller uses the linear extended state observer to reject the influence of both parametric uncertainties and external disturbances. Meanwhile, the nonsingular fast terminal sliding mode control strategy is designed to ensure the state variables to slide to desired points in finite time. To enhance the control performance, a self-adaptive fruit fly optimization algorithm is applied to parameters tuning of the proposed controller. The effectiveness of the proposed control approach is illustrated through numerical simulations and experimental verification.
Keywords
Introduction
As a typical aerial robot, quadrotor has major advantages when used for aerial photography, environmental monitoring and surveillance in dangerous and complex environments.1–3 Indeed, quadrotors have gained much attention in the academic community since their complex nonlinear dynamic characteristics offer a challenge for flight control designers. Much effort has been made to search advanced robust control approaches, such as model predictive control, 4 adaptive control, 5 backstepping control, 6 sliding mode control (SMC) 7 and neural network methods. 8 In the formulation of aircraft control problem, there will always be a discrepancy between the actual system and its mathematical model used for the controller design. These discrepancies or mismatches arise from lumped disturbances, i.e. unknown environment effects, parameter drift and unmodelled dynamics. The lumped disturbances will bring extra difficulty for the above controller design, which may greatly limit the application of controllers in practice.
Developing disturbance estimation techniques would be a good choice to alleviate the restriction faced by the traditional robust controller design. The main idea of disturbance estimation techniques is to use an effective disturbance observer to estimate the lumped disturbances of the system and compensate them in control law. 9 A disturbance observer can improve the tracking performance for the controllers and show satisfactory disturbance attenuation and robustness against uncertainties. Hence, many control methods have combined disturbance observer to process the undesirable effects caused by lumped disturbances, especially in quadrotor control issue. Dong et al. 10 combined backstepping control and nonlinear disturbance observer for high-performance trajectory tracking control of a quadrotor. Similarly, Chen et al. 11 constructed a nonlinear disturbance observer separately from backstepping controller to reject external disturbances. The effectiveness and robustness of these controllers had been verified in simulation. But it is also noticed that the nonlinear disturbance observer always has an unsatisfactory practical application due to the complex structure. Furthermore, Ma et al. 12 used a high-gain disturbance observer to enhance the robustness of a fault tolerant controller for quadrotor model uncertainties. However, this method requires rather high control energy to achieve fast-tracking and disturbance rejection performance. To overcome the above disadvantages, this paper uses the linear extended state observer (LESO) as a disturbance observer to estimate the lumped disturbances. With a simple structure, LESO relies only on an observer bandwidth to decide the ability of disturbance estimation. 13
SMC uses a discontinuous control signal to ensure the outputs converge to the sliding mode surface. But the discontinuity of SMC may cause undesirable transient control performance, such as larger overshoot, longer settling time and stronger chattering. SMC with different structures has been already proposed to mitigate the effects of the above disadvantages, such as integral SMC, 14 fuzzy SMC, 15 backstepping SMC, 16 etc. However, these methods mainly improve the structure of SMC to reject lumped disturbances, which may induce serious control chattering. Recently, several reports about integrating SMC and disturbance observer had drawn the attention of researchers. In Song et al. 17 a multivariable high-order SMC with fixed-time extended state observer (ESO) approach was proposed to solve the attitude tracking problem for a quadrotor system with uncertain modelled exogenous disturbance and unknown parameters. In Rios et al. 18 a continuous SMC combined with sliding mode observer approach was proposed to design a robust controller for quadrotors, where the sliding mode observer is applied to reject the external disturbances and uncertainties. In Wang et al. 19 a real-time robust control scheme provided the efficient performance of a quadrotor using a disturbance-observer-based adaptive SMC method. It is necessary to highlight that the above works can provide a bounded tracking error for disturbances acting on the quadrotor dynamics, also ensuring the tracking error converges to zero. In the same vein, terminal SMC (TSMC) and its evolved versions have been known as one of the important techniques for achieving finite-time stability and giving rise to high steady-state tracking precision performance. For tracking control of a quadrotor, TSMC based on three kinds of disturbance observers was presented in Anwar and Malik. 20 However, the TSMC faces the singularity problem and has a slow convergence speed. To overcome these defects, an attitude control was developed for quadrotors using continuous nonsingular fast terminal SMC (NFTSMC) and ESO techniques, 21 which provides a bounded tracking error. A similar asymptotic tracking controller for a quadrotor was developed in Ke et al. 22 based on NFTSMC and high gain disturbance observer methods. Unlike the above works, this paper will integrate the advantages of both NFTSMC and LESO, which naturally breaks through their engineering application limitations. Different from general robust control methods, the proposed continuous nonsingular fast terminal sliding mode controller based on linear extended state observer (NFTSMC-LESO) provides an active approach to process disturbances, which can improve the robustness of the closed-loop system. Moreover, a continuous hyperbolic tangent function called Tanh is introduced to reduce the chattering, which has robustness to unbounded disturbances. 23
Whether the aim is to design a robust controller or improve the design of a quadrotor system, a performance index must be selected and calculated. Then the system is treated as an optimized mathematical object since the control parameters are adjusted so that the index can reach an extremum value, commonly a minimum value. The best control performance is defined as the one that minimizes the index of controller. In this paper, we try to investigate a quantitative performance index that adequately represents the performance of the control system. Additionally, a self-adaptive fruit fly optimization algorithm (AFOA) is introduced to find the suboptimal or optimal control parameters. As one of the most important artificial intelligence algorithms, AFOA has the advantages of less parameters, easy implementation, fast calculation speed and strong ability of local search. 24 Meanwhile, the self-adaptive operator can help AFOA to jump out of local optimum.
Motivated by the above controller and observation, we have developed a robust attitude control strategy for a quadrotor. The main contributions of this paper are threefold. (1) The composition and the principle of the continuous NFTSMC-LESO are studied. More specially, a LESO is used to estimate and compensate the lumped disturbances. A continuous nonsingular fast terminal sliding mode surface is proposed to ensure the fast convergence to zero of the tracking error dynamics. (2) An improved fruit fly optimization algorithm is proposed to adjust the parameters of our controller. A self-adaptive operator is introduced to help traditional algorithm jump out of local optimum. Then through step response test comparison and performance analysis, it is verified that the improved algorithm is feasible and effective. (3) The simulation and real application of the proposed controller are studied in attitude tracking control of an X450 quadrotor aircraft. The results prove that the proposed controller has better control performance and anti-interference ability. To the best of our knowledge, no reports on NFTSMC-LESO attitude control technique for quadrotor are available until now.
The outline of this paper is as follows. The attitude modelling of X450 quadrotor by the Euler–Lagrange method is described in ‘Attitude dynamics’ section. In ‘LESO-based controller design’ section, a robust control strategy and stability analysis are presented. Parameters tuning of the control system based on AFOA is illustrated in ‘Parameters tuning based on AFOA’ section. Three simulation cases are performed to demonstrate the effectiveness of the proposed controller in ‘Numerical simulation’ section. An experimental validation with flight tests is provided in ‘Experimental results’ section. Finally, some conclusions and contributions are summarized in ‘Conclusion’ section.
Attitude dynamics
The X450 quadrotor is actuated by the angular velocities of four electric motors as depicted in Figure 1. Define the thrust and torque produced by each motor as

The reference frames and vectors of X450 quadrotor.
The model of the attitude dynamics is obtained by Euler–Lagrange equations, which is expressed as
26
Without loss of generality, the aforementioned external disturbance acting upon the quadrotor is chosen as crosswind,
27
as shown in Figure 2. A crosswind will occur perpendicular to the aircraft but parallel to the ground. The crosswind can overturn the aircraft or change the direction of forwarding motion. If the aircraft is disturbed by the crosswind, an additional force

Mechanical analysis of the propeller under crosswind.
Substituting (4) into (3), one gets
In addition, the motor torque is opposed by aerodynamic drag, such that
Wind gusts acting on the aircraft adopt the form of torque. Hence, the detailed information of the wind gusts in (2) is given by
Other physical parameters of the X450 quadrotor are listed in Table 1.
Physical parameters of X450 quadrotor.
LESO-based controller design
Linear extended state observer
Equation (2) is recalled and rewritten as follows
28
Taking roll channel as an example, the controller design is developed as follows
System (9) in state-space form can be rewritten as
An effective approach to estimate the lumped disturbances is to add an extended state term to the observer. Specifically, (10) can be modified to the following form
Let the LESO for (11) be defined as follows
Define the estimation error of LESO as
Subtracting (13) from (11), one gets
From (17), we know that
By using the exponential form, (19) can be rewritten as
For any
Solution of the error in (17) is calculated as
Obviously, the error is state-stable with Assumption 1. Moreover, according to the compatibility between
Design of NFTSMC-LESO control law
SMC is deemed as one of the important nonlinear control techniques with the ability to process the coupling disturbances and strong nonlinearities. 30 It can be divided into two subparts: the design of a stable sliding mode surface and the design of a control law to compel the system states into the chosen surface.
Consider a continuous NFTSM surface defined as
31
Proof. The proof process of Lemma 1 can be found in Yu et al. 28
Substituting the first derivative of (24) into (8), one obtains an equivalent input
To ease chattering and reconcile the need for fast finite-time convergence, we design a fast terminal sliding mode type as the reaching law
32
Then, the reaching input is defined as
Hence, the NFTSMC-LESO is obtained by combining the equivalent input and reaching input
Stability analysis for NFTSMC
The proof process of Lemma 2 can be found in Nekoukar and Erfanian. 33
Consider the Lyapunov function
Combining (29) and (9), the first derivative of the proposed sliding mode surface is rewritten as
Then
Equation (33) can also be described as the following forms
For (36), if
Similarly, if
According to the feature of (37) and (38), the sliding mode surface can converge into the following region in finite time
Since
This implies that the system state will slide to the desired equilibrium area asymptotically under the proposed control law NFTSMC-LESO.
Parameters tuning based on AFOA
Basic principle of FOA
FOA is a swarm intelligence optimization algorithm firstly proposed by Pan et al.,
34
which can obtain global optimization using the food search mechanism of the fruit fly. During the searching process, the fruit flies search for food sources in several points and fly toward the point according to greatest odour intensity. Then the rest of fruit flies swarm are called upon to fly towards the point. The detailed steps of FOA are described as follows:
Parameter initialization. Initial the group size Stochastic distance calculation. Give stochastic distance and direction to individual fruit fly for finding food through the smell
3. Odour intensity calculation. Since the food location is unknown, the distance between the original location and fruit fly is estimated with an evaluation index of the odour intensity
4. Objective function calculation. Substitute evaluation index
5. Population evolution. Keep maximal odour intensity and
6. Termination criterion. FOA will stop when the maximum iteration is reached. Otherwise, the algorithm repeats Steps (2) to (5) and judge whether the odour intensity is higher than that in the previous iteration. If yes, implement Step (6).
Self-adaptive operator
The step size in traditional FOA is fixed, which may be trapped into local optimum.
35
The convergence rate and iteration precision depend on the step size. Hence, a self-adaptive operator is introduced to provide a variable step size for FOA, which is given by
Furthermore, (44) can be rewritten as
With the self-adaptive operator, AFOA has a large random step size at the early iteration to avoid premature convergence. At the subsequent iteration, small step size will enhance its local optimization ability.
Numerical simulation
In this section, evaluation of the proposed controller NFTSMC-LESO is presented through three cases. The Simulink model is established using the nonlinear model of a quadrotor defined in (2). And the proposed controller is applied on the aircraft to check the control performance.
As a standard test input signal, the step signal

Iteration curves.

Disturbances and their estimation: (a) roll loop; (b) pitch loop; (c) yaw loop.

Attitude response.

Angular velocities response.

Attitude control laws.
Optimal control parameters using ITSE index.
In this case, wind gusts with different amplitudes are considered to test the ability of anti-disturbance of the two observers. The simulation runs for 10 s, and the results are shown in Figure 8. As a result, the robustness values of the observers will decrease with the increased amplitude of the lumped disturbance. When the amplitude belongs to the interval [0.01,1], the robustness of ESO is stronger than that of LESO. Alternatively, the robustness of LESO becomes stronger than that of ESO when the amplitude belongs to the interval [10,100]. Hence, the LESO is more suitable for dealing with big amplitude of disturbances; a similar conclusion can be found in Li et al. 38

Robustness of ESO and LESO.

Roll angle response.

Input of roll channel.
To further analyze the tracking performance intuitively and precisely, Table 3 presents a set of statistical indicators which includes root mean square error (RMSE), maximum error (ME), mean error (MeanE) and robustness. The RMSE value of NFTSMC-LESO is 66.67% and 81.16% of those of SMC-LESO and LADRC, respectively. Similar results can be calculated with ME and MeanE. It is obvious that the trajectory precision of NFTSMC-LESO is higher than that of the other two controllers. Additionally, the observer bandwidth
Performance comparison of controllers.
LADRC: linear active disturbance rejection control; ME: maximum error; MeanE: mean error; NFTSMC-LESO: nonsingular fast terminal sliding mode control based on linear extended state observer; RMSE: root mean square error; SMC-LESO: sliding mode control-linear extended state observer.
Experimental results
The proposed controller is tested on an X450 quadrotor experimental platform depicted in Figure 11. The platform contains an X450 quadrotor, two wireless routers, a ground station, an open-source flight control module called Auto Pilot Mega (APM) and a Futaba remote control unit. The APM is employed to generate the commands to control the angular speeds of four propellers. An inertial measurement unit installed on the APM is used to measure attitude angles and angular speeds. The quadrotor communicates with the ground station via a pair of wireless routers at a frequency of 50 Hz. Before the experiment, the control algorithms are embedded into the APM directly from Matlab/Simulink through a plug-in called APM2 Simulink Blockset. 39 It is pointed out that the GPS module is not used in the experiment for closed-loop attitude control.

X450 quadrotor experimental platform.
The quadrotor is installed on a universal joint bracket with a negative 70° initial angle. The connection restricts the translational motion of the aircraft. During the experiment, a pilot operates the aircraft flying in hover by Futaba controller. Then, the Futaba is switched into the automatic flight mode for desired trajectories tracking using NFTSMC-LESO. Lastly, the hovering operation is activated again to keep the quadrotor from striking the bracket. Three kinds of wind gusts with fixed speeds are added into the experiments through an electric fan. And the initial angle of the fan is 90°, i.e. the central line of the fan is perpendicular to the central line of the propeller hub of quadrotor when the aircraft flies in hovering. We select three kinds of referenced trajectories for attitude tracking control experiments. To show the efficiency of the proposed controller, a comparison between NFTSMC-LESO with SMC-LESO, and LADRC is performed. The collected experimental data lasts 10 s, and the results are shown in Figures 12 to 17. It can be observed from Figures 12 to 14 that all the three controllers can make the attitude angles track the referenced trajectories in spite of mechanical vibration and unmeasured wind gusts. Since all three controllers use the same DOB technology, the results demonstrate that the attitude responses obtained by NFTSMC-LESO ensure faster convergence and higher precision than the other controllers. As the wind speed increases, the proposed controller still performs good tracking performance and robustness.

The tested roll angle response when

The tested pitch angle response when

The tested yaw angle response when
Furthermore, the attitude tracking error described by RMSE is presented in Table 4 to evaluate the three controllers. For roll angle, the RMSE value of NFTSMC-LESO is 35.37% and 54.12% than those of SMC-LESO and LADRC, respectively. For pitch angle, the percentages are 47.25% and 55.19%, respectively. For the yaw angle, the percentages are 46.81% and 52.55%, respectively. It is obvious that the quadrotor equipped with NFTSMC-LESO controller tracks the desired commands with higher precision. These results also verify the conclusions given in ‘Numerical simulation’ section.
The input torques of the three controllers are depicted in Figures 15 to 17. From the results, it can be observed that NFTSMC-LESO requires smaller rotational torques than the other two controllers. This implies that both disturbances and chattering have been significantly reduced by the proposed controller. In addition, from Figures 15 and 17, LADRC requires larger rotational torques to reject the lumped disturbances when the aircraft tracks non-smooth trajectories. This implies that the SMC structures of NFTSMC-LESO and SMC-LESO are superior to the control structure of LADRC.

The response of roll torque.

The response of pitch torque.

The response of pitch torque.
RMSE of the three controllers.
LADRC: linear active disturbance rejection control; NFTSMC-LESO: nonsingular fast terminal sliding mode control based on linear extended state observer; RMSE: root mean square error; SMC-LESO: sliding mode control-linear extended state observer.
Conclusion
In this paper, a novel NFTSMC-LESO controller is designed and investigated for the attitude tracking control of a quadrotor. The new controller is model-free and can guarantee rapid convergence rate and high accuracy control performance subjected to lumped disturbances. Stability of the closed-loop system is analyzed based on Lyapunov function. Simulation cases and experiments are conducted to demonstrate the effectiveness of our proposed controller. Some results are summarized into the following points: (1) The proposed controller can ensure a satisfactory attitude tracking control performance both in simulations and experiments. (2) For parameters tuning, AFOA based on ITSE index can obtain a set of optimal control parameters for NFTSMC-LESO controller. (3) Compared with ESO, the LESO is more suitable for dealing with big amplitude of disturbances. (4) Under lumped disturbances, the proposed controller performs a better control than the existing SMC-LESO and LADRC.
In future, we will use the NFTSMC-LESO method to design the position tracking control for the quadrotor. Furthermore, outdoor flight experiments will be carried out to test the performance of the control technology in the presence of real wind gusts.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Natural Science Foundation of China under Grant No. 5180522, the Foundation Research Project of Jiangsu Province under Grant No. BK20170315.
