Quadrotor UAV flight control via a novel saturation integral backstepping controller

ABSTRACT In this paper, in order to reduce the influence on quadrotor flight from different external disturbances, a novel nonlinear robust controller is designed and used in the quadrotor system. At first, a nonlinear dynamic model of the quadrotor is formulated mathematically. Then, a quadrotor flight controller is designed with the method of classical backstepping control (CBC) and the nonlinear system using this controller is proved to be asymptotically stabilized by the Lyapunov stability theory when there is no external disturbance. At last, a new nonlinear robust controller established by the introduction of both the saturation function and the integral of error into CBC is designed and named as saturation integral backstepping control (SIBC). The boundedness of the nonlinear system under external disturbances is verified by the uniformly ultimately bounded theorem of the nonvanishing perturbation. The numerical simulations of hovering and trajectory tracking are carried out using MATLAB/SIMULINK taking the external disturbances into consideration. In addition, a series of outdoor flight experiments were completed on the actual experimental equipments of quadrotor UAV under the time-varying disturbance from wind. According to the simulation and flight experiment results, the proposed SIBC strategy shows a superior robustness than CBC and integral backstepping control (IBC) strategy.


Introduction
As a new kind of small unmanned aerial vehicle (UAV), quadrotor aircraft has been widely concerned and used in military surveillance, rescue, disaster monitoring, photography and agricultural mapping due to its many advantages such as flight by high maneuverability and agility, hovering, vertical take-off and landing, etc. [1][2][3]. Despite the advantages of quadrotor compared to helicopter in terms of efficiency, dimensional flexibility, smaller spacial requirement and safety, its application has been greatly hindered owing to the complicated flight control design of the quadrotor, for it is an underactuated system with six outputs and only four control inputs [4,5]. In addition, the quadrotor system has high nonlinear, strongly coupled, multivariable, time-varying nature and can be easily affected by external disturbances. Therefore, a control strategy with excellent disturbance restraining capability is urgently required to achieve autonomous flight such as hovering, trajectory tracking, take-off and landing [6].
As a regressive design method, the backstepping control is commonly used in nonlinear control methods, because of its superior advantages such as better design flexibility and higher stability compared to other control methods. Based on Lyapunov stability theory, the backstepping control can combine controllers design with Lyapunov function selection perfectly, with the design process for controllers equaling the process of stability proof. Thus, the system can keep asymptotic stability by choosing a Lyapunov function reasonably. However, since the classical backstepping control (CBC) method could hardly resist the external disturbances, many improvements have been done to enhance the capability of resisting disturbance for the backstepping control. For example, to solve the trajectory tracking problem, an adaptive control algorithm is derived based on backstepping [17]. A new approach for the attitude control of a quadrotor aircraft is proposed by combining the backstepping technique and a nonlinear robust proportional integral (PI) controller [18]. Enhanced backstepping controller based on proportional derivative (PD) control is obtained, in which particle swarm optimization (PSO) algorithm has been utilized to determine the controller parameters [19].
Although, the disturbance restraining capability for the backstepping control has been proved to be improved to a certain extent under one kind of external disturbance in the previous reports, the different effects on quadrotor flight between various external disturbances have not been studied, and the proof for the uniformly ultimately boundedness of quadrotor control system in the nonvanishing perturbation condition was almost ignored. Therefore, in this work, three kinds of external disturbances (constant disturbance, periodic disturbance and random disturbance) have been taken into consideration separately during the flight control of quadrotor. In order to reduce the influence of these disturbances to the quadrotor flight (such as hovering and trajectory tracking), a novel saturation integral backstepping control (SIBC) has been proposed by combining saturation function and integral of error with the CBC. In addition, the boundedness of the nonlinear system is verified by the uniformly ultimately bounded theorem of the nonvanishing perturbation. Simulation and flight experiment results indicate that compared with CBC and integral backstepping control (IBC), SIBC strategy shows higher anti-disturbance capacity to the three disturbances in hovering and trajectory tracking respectively. This paper is organized as follows: a detailed dynamics model of the quadrotor is presented in Section 2. Classical backstepping control is described in Section 3. A saturation proportional integral backstepping controller and the proof of uniformly ultimately boundedness for the system are proposed in Section 4. The simulation results of two cases (hovering and trajectory tracking) are presented in Section 5. The outdoor flight experiments of the quadrotor are given in Section 6. Conclusions are presented in Section 7.

Control principle
The quadrotor is an underactuated system because it has six degrees of freedom but only four inputs. Each input has one rotor to generate the propeller forces. As shown in Figure 1, the four rotors were recorded as rotor 1, 2, 3 and 4. By varying the speed of the four motors, the quadrotor can produce three attitudes, namely pitch, roll and yaw. The altitude of the vehicle will be changed by varying the four rotor speeds with the same quantity. In order to keep balance or produce yaw motion, two pairs of rotors (rotor 1, 3 and rotor 2, 4) should rotate in two different directions, respectively. Roll motion is produced when the speed of rotor  2 is different from that of rotor 4. Similarly, when the speed of rotor 1 is different from that of rotor 3, pitch motion will be produced. The flight mechanisms of the quadrotor are shown in Figure 2.

Dynamic model
An earth fixed frame E(x e , y e , z e ) and a body fixed frame B(x b , y b , z b ) are used to study the system motion of quadrotor. The absolute position of the vehicle and the three Euler angles (roll, pitch and yaw) are described by ξ = [x, y, z] T and η = [φ, θ, ψ] T respectively in earth fixed frame E. The roll angle (φ) rotation around x baxis, the pitch angle (θ ) rotation around y b -axis and the yaw angle (ψ) rotation around z b -axis are shown in Figure 1. The linear velocity is denoted as V = [u, v, w] T and the angular velocity of the airframe as Ω = [p, q, r] T in the body fixed frame B [22,23]. The relation between the body fixed frame velocity and the earth fixed frame velocity can be written as [19,20] where R and N are the translation and rotation matrices, and they are given as below: where the abbreviations S (·) , C (·) and T (·) denote sin(·), cos(·) and tan(·), respectively. Using the Newton-Euler approach, the translational and rotational dynamic equations of motions can be written as follows: i , F i and ω i as the thrust force and speed of the rotor i respectively, b as the thrust factor, F d = k dξ = diag −k dx −k dy −k dz ξ and F g = 0 0 −mg T are the aerodynamic drag force and the gravitational force, respectively. Ω × IΩ is the gyroscopic effect due to rigid body rotation, while k dmx p k dmy q k dmz r T are torques produced by the propeller system torque and the aerodynamic torque, respectively, k dx , k dy , k dz , k dmx , k dmy and k dmz are drag coefficients, M f is given as where l and d are the distance from the rotors to the centre of mass and the drag factor, respectively.
Then, the final dynamic model of quadrotor can be formulated as where J r is the rotor inertia and ω r = ω 2 + ω 4 -ω 1 -ω 3 . The control inputs are given as

Classical backstepping control for the quadrotor UAV
Because the quadrotor UAV at a low speed, in this section, the aerodynamic drag force F d and the aerodynamic torque M d are ignored, while the external disturbance is not taken into account either. The nonlinear dynamic equation is described as [19] where the state vector and input vector are given as below: The two virtual control inputs are defined as follows: The dynamics model (6) can be rewritten as follows: and the abbreviations are given below: The state trajectory of quadrotor can track a desired reference trajectory turbance by using a suitable control law which was obtained with the CBC method. Take the control input U 1 for example, the design of CBC is given step-by-step as follows: Step 1. Introduce the first tracking error as The first Lyapunov function is chosen as the derivative of V 1 with respect to time iṡ For the purpose of stabilizing e 1 , a stabilizing function is designed as Substitutingẋ 1 by Equation (17), then the Equation (16) can be rewritten aṡ where the parameter k 1 is a positive constant.
Step 2. The deviation of α 1 from the desired valueẋ 1 can be defined as the second tracking error the derivative of e 2 can be represented aṡ The second Lyapunov function is selected as the derivative of V 2 with respect to time iṡ Step 3. For the purpose of stabilizing e 2 , the control law U 1 is given as where parameter k 2 is a positive constant. C φ > 0, C θ > 0 according to Assumption 4 and m > 0, so the g(x 11 ) is nonzero. Substituting (23) into (22), the derivative of V 2 can be rewritten aṡ namelyV 2 (e 1 , e 2 ) is negative semi-definite. According to Lyapunov stability theory, the nonlinear system of quadrotor with Equation (8) is asymptotically stabilized using the control law (23). The designs of the other control inputs are similar to U 1 .

Saturation integral backstepping control for the quadrotor UAV
The quadrotor UAV would be affected by some unpredictable external disturbance in actual application. Three different kinds of disturbances (constant disturbance, periodic disturbance and random disturbance) have been taken into account as the key disturbances in this section. The CBC method could hardly resist these external disturbances. Therefore, some effective auxiliary control is necessary to eliminate the effect on the quadrotor flight from the external disturbances. In this section, the saturation function and the integral of error are introduced into CBC to enhance its control robustness. With the external disturbance being taken into consideration, the nonlinear dynamic Equation (8) should be rewritten as where δ = δ 1 δ 2 δ 3 δ 4 δ 5 δ 6 T is defined as the external disturbance vector, and the bound of the disturbance is |δ i | ≤ β(i = 1 ∼ 6), while β is a given positive constant.
Taking U 1 as an example again and the design process of CBC and the reference [24] for reference. The design of SIBC is given step-by-step as follows: Step 1. Introducing the first tracking error as A new error variable (the integral of error e 1 ) is defined as The first Lyapunov function is chosen as where λ 1 is a parameter of integral and the derivative of V 1 with respect to time iṡ A new stabilizing function is designed as where the parameter k 1 is a positive constant.
Step 2. The second tracking error is defined as The derivative of e 2 can be represented aṡ Taking (31) into (29),V 1 (p 1 , e 1 ) iṡ The second Lyapunov function is selected as The derivative of V 2 with respect to time iṡ V 2 (p 1 , e 1 , e 2 ) =V 1 (p 1 , e 1 ) + e 2ė2 = − k 1 e 2 1 + e 2 (e 1 +ė 2 ) = − k 1 e 2 1 + e 2 (e 1 +ẍ 1d −ẍ 1 +k 1ė1 + λ 1ṗ1 ) In order to restrain the uncertain disturbance and stabilize the system, the control law U 1 can be designed as where the parameter k 2 is a positive constant, ε 1 is a design parameter, and the saturation function sat(e 2 /μ 1 ) is defined as follows:

Remark 4.1:
The design process and uniformly ultimately boundedness proving process of the attitude controllers U 2 , U 3 , U 4 and virtual control inputs u x , u y are similar to those of U 1 . u x and u y which were derived from Equation (45) and are substituted into Equation (11) to achieve the desired value φ d and θ d of the roll angle φ and the pitch angle θ . φ d and θ d which used as the control inputs of U 2 and U 3 are described as The quadrotor control scheme is shown in Figure 3.

Case 1: hovering problem
In the hovering simulation, the desired value of position and attitude is given by The simulation results show that the quadrotor can keep hovering with CBC, IBC and SIBC strategy from 0 to 6 s as shown in Figures 4 and 5. However, after the addition of constant disturbance from the 6th second on, the quadrotor could not keep hovering with CBC strategy at the original position. The IBC or SIBC was able to restore the quadrotor hovering at the original position after a few seconds, although some vibration occurred as the constant disturbance was added into the system. In addition the amplitude and the restore time using SIBC are much smaller than those using IBC as shown in Figure 4(a-d). Figure 4(e) and (f) show the change of roll and pitch using the three control strategies. When the periodic disturbance was added at the 6th second, the position and yaw of UAV have shown a certain vibration relative to the initial value. However, the amplitude using SIBC is much smaller than those using CBC and IBC, which indicates that SIBC can keep  quadrotor hovering more stable than either one of the other two control strategies as shown in Figure 5(a-d).
Therefore, the SIBC strategy shows a better performance of the disturbance restraint in the hovering condition compared to the other two control strategies. Figures 6 and 7 show the control inputs of the three control strategies under two different external disturbances, respectively.

Case 2: trajectory tracking problem
In the trajectory tracking simulation, the control objective is to ensure that the quadrotor can track the desired trajectory which is adopted by the helical trajectory. The desired trajectory is described as The initial values are given as ψ = 0, z = 0.5, x = 0, y = 1. The simulation is conducted based on 4order Runge-Kutta method with sampling time fixed on t = 0.01s, and the simulation time is 30 s. Three different external disturbances are given from 0th second on. Firstly, the constant disturbance is given   and random error under the constant disturbance, periodic disturbance and random disturbance situations, respectively. These demonstrate that the CBC and IBC strategies exhibits weak disturbance restraint to trajectory tracking under the above three disturbances. In contrast the errors for the three disturbances convergence rapidly and stay stable within a small region after a transitory fluctuation respectively using the SIBC strategy as shown in Figures 8(c), 9(c) and 10(c). The results indicate that the addition of saturation function and integral of tracking error into the original control laws can remarkably restrain the above disturbances respectively with a relatively high tracking accuracy.
Form Figures 11-13, the tracking errors of x, y, z and ψ are much smaller using SIBC under the three

Experimental results
In order to illustrate the effectiveness of the proposed SIBC strategy, a series of trajectory tracking experiments of quadrotor UAV under the random  disturbance from wind outdoors are presented in this section.

Experimental equipments
The actual experimental equipments of quadrotor UAV are shown in Figure 17. The main processor is STM32F407 (1M FLASH, 192K RAM, operates at 168 MHz) which is employed to control the propulsion system by PWM signals. A 12-Channel 2.4 GHz remote control system RadioLink-AT10 is used to keep communication with the main processor. The sensors (including ICM-20602, barometric pressure sensor SPL06 and 3-axis electronic compass AK8975) are utilized to measure the accelerations and angular rates in three directions, the altitude and the course angle, respectively. The relative height and the horizontal position of quadrotor UAV are measured by laser radar   TFmini and Ultra Wideband (UWB), respectively. The quadrotor UAV powered by a 2600 mAh LI-Po battery can keep flying for 10-15 mins.

Flight experimental results and analysis
The trajectory tracking experiment of quadrotor UAV outdoors is shown in Figure 18. The outdoor temperature was 2°C, and the speed of the wind was around 1 ∼ 2 m/s with uncertain wind direction. The desired trajectory on the x-y plane is described as x d − y d = 0, the desired value on z-axis is z d = 1.5m, and the initial value are x(0) = y(0) = 1m, z(0) = 1.5m. The flight time is 10 s.
As shown in Figure 18, the UWB distance detection operates at Tri-anchors model, in which the three anchors are vertically placed with the distance between anchor 0-1 and 0-2 both being 3 m. The experimental results using CBC, IBC and SIBC are shown in Figure 19. As shown in Figure 19(a) and (b), the   trajectories on x-y plane and z-axis using SIBC are in accordance with the desired trajectories with higher goodness of fit compared with those using CBC and IBC. In addition, the root mean square (RMS) errors of trajectory using CBC, IBC and SIBC are 1.14, 0.47 and 0.24 m, respectively, which indicates the RMS errors using SIBC is obviously smaller than those using CBC and IBC with the RMS errors reduced about 50 ∼ 80%.
The flight experiment results are in accordance with the simulation results in Section 5, which further confirmed that the SIBC strategy can restrain the uncertain external disturbances more effectively than the other two control strategies, and it will be a valuable control method in quadrotor UAV control field.

Conclusions
In order to reduce the effect from different external disturbances on quadrotor which is a highly unstable nonlinear system in actual application, a novel nonlinear robust controller SIBC for quadrotor is presented in this work. By introducing saturation function and integral of error into CBC, the SIBC strategy can remarkable reduce the interference with quadrotor system from the external disturbances such as constant disturbance, periodic disturbance and random disturbance. The boundedness of the nonlinear system has been proved by the uniformly ultimately bounded theorem of the nonvanishing perturbation. The results of hovering and trajectory tracking simulation and experiment show that the anti-disturbance capacity of SIBC is much better than that of CBC and IBC, which means that the SIBC with an excellent robustness has a potential application as a novel control strategy in actual quadrotor flight.

Disclosure statement
No potential conflict of interest was reported by the authors.