# Adaptive Backstepping Sliding Mode Control for Quadrotor UAV

Authors: Sibo Huang; Jianfeng Huang; Zhaoquan Cai; Han Cui
Journal: Scientific Programming
 (2021)

---

## Abstract

Quadrotor UAV has a strong mobility and flexibility in flight and has been widely used in military and civil fields in recent years. An adaptive backstepping sliding mode control (ABSMC) method is proposed to address the trajectory tracking control problem of quadrotor UAV based on actuator fault and external disturbance. In the proposed method, the switching gain of adaptive sliding mode control is constructed in the backstepping design process in order to suppress the chattering effect of sliding mode control effectively by differential iteration. Firstly, the dynamic model of quadrotor UAV with actuator fault and external disturbance is proposed, and then the controllers are designed based on the ABSMC method. Finally, the comparison experiments between sliding mode control (SMC) method and ABSMC method show that the ABSMC method can not only effectively suppress the chattering problem for the SMC method but also perform a perfect control effect.


---

## Body

## 1. Introduction

In recent years, UAVs have been widely used in military and civilian applications, such as environmental supervision, geological analysis, agricultural operations, search and rescue, and mail delivery [1, 2]. In particular, due to its simple mechanical structure and good maneuverability, the quadrotor UAV can take off vertically, land vertically, hover, or move in a small and disorderly area, which has been developed rapidly [3, 4].The control problems of a quadrotor UAV are complicated, which contain some parts: its own highly coupled nonlinear problems, unstable and multivariable nature, possibly nonminimum phase, underactuated, existence parameter uncertainties and external disturbances, and the actuator fault [5, 6]. Aiming at the external disturbance encountered during the flight of quadrotor UAV, a double closed-loop active disturbance rejection control scheme was proposed and the extended state observer was used to estimate the external disturbance online and in real time [7]. However, if the observer was used to obtain the external disturbance information in the high-order system, noises can always be introduced. The sliding mode control method [8] was often used to control the nonlinear system with random noise because it was insensitive to noise and did not need to estimate the disturbance online.And the sliding mode control (SMC) method is widely used in the field of UAV control because it has a strong robustness to disturbance and unmodeled dynamics and good control effect to nonlinear systems [9–12]; however, the setting of its switching gain often causes severe chattering on the control input signal, which often generates a huge burden on the operation of the actuator [13–15]. Usually, setting a small gain can reduce the chattering of the control signal, but it can weaken the robustness of the sliding mode control method under disturbance. Therefore, it is necessary to make the switching gain follow the disturbance or adjust it adaptively according to the corresponding criteria so that it can select the switching gain adaptively under different disturbances. To construct an adaptive switching gain method, the sliding surface was used as a benchmark [16]. The size of the switching gain changes following the change of the sliding surface to ensure that there is an appropriate switching gain corresponding to the tracking error when the tracking error is large or small, which can avoid over adaptation of the gain. In addition, with the help of the neural network model, the switching gain can be considered as a dynamic model approximation value, and the tracking error can be reduced. Neural network was used to estimate unknown dynamics and disturbances [17].As a kind of controller design method, the backstepping method is widely used because of its brief design process. The designed controller can guarantee the system convergence in finite time, and the convergence time can be proved. Moreover, the combination of the backstepping method and other methods can organically integrate the advantages of the two methods. Accordingly, the backstepping method and sliding mode method were combined to ensure the system convergence [18], where the fuzzy control method combined with the backstepping method was used to control a multi input multi output nonlinear input saturation system [19] so that the controller can make the system converge to the expected value in finite time within a given range. In addition, there are a lot of research studies on controller design [20–25].Considering that the traditional sliding mode control method is insensitive to the nonlinear problems such as disturbance and failure in the flight of the quadrotor UAV system and the setting of its switching gain can cause huge chattering of input, an adaptive backstepping sliding mode control (ABSMC) method is proposed in this paper, which can estimate the upper bound of the sliding mode switching gain in real time and modify the sliding mode controller in combination with the backstepping method to suppress the chattering of the sliding mode control. The switching gain adaptive method proposed in this paper can update the switching gain adaptively when the upper bound of disturbance is unknown so as to ensure the robustness of sliding mode control as well as the control tracking accuracy. Finally, the effectiveness of the proposed method is verified by comparing the control effect of the ABSMC method with the SMC method.


## 2. Dynamics Model of Quadrotor UAV

The motion of a quadrotor UAV in space has six degrees of freedom, which are roll, pitch, and yaw around its center of mass and its translational motion in three-dimensional space with two horizontal and one vertical direction. The quadrotor UAV can be regarded as an underactuated rigid body with four inputs. Its thrust is generated by four propellers, which can be controlled by command to keep the UAV in a certain attitude and follow the desired trajectory. Figure1 shows the structural diagram of the quadrotor UAV. According to reference [20, 21], the expression of its dynamic equation is shown in equation (1) based on the actuator fault and external disturbance.(1)x¨=1muxU1+εU1+f1,y¨=1muyU1+εU1+f2,z¨=1mcosϕcosθU1+εU1−g+f3,ϕ¨=θ˙ψ˙Iy−IzIx+JrIxθ˙ωr+lIxU2+εU2+f4,θ¨=ψ˙ϕ˙Iz−IxIy−JrIyϕ˙ωr+lIyU3+εU3+f5,ψ¨=ϕ˙θ˙Ix−IyIz+1IzU4+εU4+f6,in which(2)ux=cosϕsinθcosψ+sinϕsinψ,uy=cosϕsinθcosψ−sinϕsinψ,U1=bω12+ω22+ω32+ω42,U2=bω42−ω22,U3=bω32−ω12,U4=dω22+ω42−ω12−ω32,ωr=ω4+ω2−ω1−ω3,where U1−U4 are the control input of UAV; εU1−εU4 denote the unknown actuator fault; f1−f6 are defined as the unknown external interference; Ix, Iy, and Iz present the inertia matrix; b and d are the drag coefficient and lift coefficient, respectively; m is the mass of the quadrotor UAV; g is the gravity acceleration; l represents the length of the quadrotor UAV from the end of each rotor to the center of gravity; Jr is the moment of inertia of the motor rotor; ϕ,θ,ψ represent the roll angle, pitch angle, and yaw angle, respectively; x,y,z are the position coordinates of the center of mass of the quadrotor UAV relative to the fixed coordinate system; and ωii=1,2,3,4 are the rotation speed of four propellers of quadrotor UAV.Figure 1
A structure diagram of quadrotor UAV.


## 3. Adaptive Backstepping Sliding Mode Control for Quadrotor UAV

### 3.1. Control Strategy

The quadrotor UAV is a nonlinear system with strong coupling and is an underactuated system. As an underactuated system, it has only four control inputs, but it has to control six states. The control strategy adopted in this paper is double loop control, and the outer loop is position control, which is composed of altitude and horizontal position. The difference between the real value and the expected value is calculated, and then the altitude and level control of the ABSMC method are used to design control input terms, the desired attitude angle is obtained by inverse solution, and then the inner loop is used for attitude control, which mainly controls the pitch, yaw, and roll motion of UAV. The specific control flow is shown in Figure2.Figure 2
Control flow chart.


### 3.2. Controller Design

Firstly, the design process of the controllerU1 is given based on the ABSMC method, and then the controllers ux, uy, U2, U3, and U4 are obtained based on the same design process.


#### 3.2.1. The Design of the Altitude Controller

Firstly, the controller for quadrotor UAVs’ height based on the adaptive backstepping sliding mode method is designed.In equation (1), the second-order system controlling the height of quadrotor UAV can be equivalent as follows:(3)z¨=1mcosϕcosθU1−g+Δz.In equation (3), z represents the height of quadrotor UAV and Δz=cosϕcosθεU1+f3. Let z1=z and z2=z˙, equation (3) can be rewritten as follows:(4)z˙1=z2,z˙2=1mcosϕcosθU1−g.Firstly, an integral sliding surface is defined as follows:(5)sz1=∫ez+kze˙z.In equation (5), kz is a positive constant and ez=z−zd, where zd is the reference height. The first and second derivatives of equation (5) are defined as follows:(6)sz2=s˙z1=ez+kze˙z,(7)sz3=s˙z2=e˙z+kze¨z.In particular, we use the sliding mode differentiator to obtain the differential value of the state as follows:(8)z^=v+k1z−z^2/3signz−z^,v˙=k2z−z^1/2signz−z^,where k1 and k2 are normal numbers, and the differentiator can ensure that v converges to z˙ in finite time. In the following controller design process, v is used instead of z˙ to construct the sliding surface and related error terms.It can be obtained by combining equations (3), (6), and (7):(9)s˙z1=sz2,s˙z2=sz3,s˙z3=ddte˙z+kz1mcosϕcosθU1−g+Δz−z¨d.Then, according to the backstepping method, combine equations (5)–(7), with following transformation:(10)σz1=sz1,(11)σz2=sz2−α1,(12)σz3=sz3−α2,where α1 and α2 are the virtual controllers to be designed.Combining equation (11) and deriving equation (10), we can get(13)σ˙z1=s˙z1=σz2+α1.A Lyapunov function is defined asV1=1/2σz12. Let the virtual controller α1=−ξ1σz1, and we can get the derivative of V1 as follows:(14)V˙1=σz1σz2+α1=σz1σz2−ξ1σz12.In equation (14), ξ1 is a positive constant. When σz2=0 and V˙1=−ξ1σz12≤0, σz1 can be asymptotically stable.Similar to equation (13), by combining equations (11) and (12) with derivation, we can get the following equation:(15)σ˙z2=s˙z2−α˙1=σz3+α2−α˙1=σz3+α2+ξ1sz2.A Lyapunov function is defined as follows:(16)V2=V1+12σz22.According to equation (15), the virtual controller α2 can be defined as the following equation:(17)α2=−ξ2σz2−σz1−ξ1sz2.In equation (17), ξ2 is a positive constant. Combined with equation (17), we can get equation (18) through the differential of equation (16), which is the Lyapunov function V2 as follows:(18)V˙2=V˙1+σz2σ˙z2=−ξ1σz12+σz1σz2+σz2σz3−ξ2σz2−σz1=−ξ1σz12−ξ2σz22+σz2σz3.Similar to equation (14), when σz3=0 and V˙2=−ξ1σz12−ξ2σz22≤0, σz1 and σz2 can be asymptotically stable.According to the above derivation, we define a Lyapunov function with the following equation:(19)V3=V2+12σz32.Then, combining equations (9) and (19), we obtain the following equation by deriving equation (19):(20)V˙3=V˙2+σz3σ˙z3=−ξ1σz12−ξ2σz22+σz2σz3+σz3ddte˙z+kz1mcosϕcosθU1−g+Δz−z¨d−α˙2.Thus, the controllerU1 can be designed as follows:(21)U1=mkzcosϕcosθu1n−u1s.In equation (21), u1n and u1s can be given as equations (22) and (23), respectively.(22)u1n=−kz−g−z¨d−e˙z+α2−∫ξ3σz3+σz2,(23)u1s=∫Λz+ςzsignσz3.In equations (22) and (23), ξ3 and ςz are positive constant and Λz is the gain of sliding mode switching. Substituting equation (21) into equation (20) yields the following:(24)V˙3=−ξ1σz12−ξ2σz22−ξ3σz32+σz3ddt−u1s+kzΔz≤−ξ1σz12−ξ2σz22−ξ3σz32−Λz+ςzσz3+Γσz3.In particular, it can be seen from equation (24) that if no switching gain is set to counteract the influence of interference, equation (24) needs to be rewritten as follows:(25)V˙3≤−ξ1σz12−ξ2σz22−ξ3σz32+Γσz3≤−ξV3+Γσz3.In the above equation,ξ=minξ1,ξ2,ξ3; under the influence of interference term Γ, V3 cannot converge to zero but can only converge to the neighbourhood V3≤Γσz3/ξ. Therefore, by setting the switching gain, i.e., introducing formula (23), the tracking error can be guaranteed to converge to zero.In equation (24), Γ=kzd/dtΔz; when Γ≤Λz, V˙3≤−ξ1σz12−ξ2σz22−ξ3σz32≤−ξV3 is strictly negative, in which ξ=minξ1,ξ2,ξ3. As a result, the proposed control method can ensure that the tracking error converges to zero.However, uncertain fault or external disturbanceΔz is usually time-varying in the actual control system, and the upper bound of function Γ cannot be obtained accurately. If the value of switching gain Λz is too large, it can counteract the influence of interference Γ and ensure the robustness of the control method, but it will cause chattering to the control input because of the too large switching gain.IfΛz in equation (23) is a tiny fixed constant, it cannot well counteract the effect of Δz. Thus, we construct an adaptive switching gain function, and then equation (23) can be updated as follows:(26)u1s=∫Λ^z+ςzsignσz3,where Λ^z is the adaptive switching gain, and the adaptive law is shown in following equation:(27)Λ^˙z=1δzσz3.In equation (27), δz is a positive constant. Let Λ˜z=Λ^z−Λz∗, where Λz∗ is the optimal switching gain, and Λz∗≥Γ; then, combined with equation (19), we define a Lyapunov function as follows:(28)V4=V3+12δzΛ˜2.Then, we can obtain the following equation through deriving equation (28):(29)V˙4=V˙3+δzΛ˜Λ˜˙=−ξ1σz12−ξ2σz22+σz2σz3+δzΛ^z−Λz∗Λ˜˙z+σz3ddte˙+kz1mcosϕcosθU1−g+Δz−z¨d−α˙2.Substituting equations (20) and (21) and equation (26) into equation (29), then equation (29) can be updated as follows:(30)V˙4=−ξ1σz12−ξ2σz22−ξ3σz32+σz3ddtu1as+kzΔz+δzΛ^z−Λz∗Λ˜˙z=−ξ1σz12−ξ2σz22−ξ3σz32+δzΛ^z−Λz∗Λ˜˙z+σz3−Λ^z+ςzsignσz3+kzddtΔz≤−ξ1σz12−ξ2σz22−ξ3σz32−Λz∗+ςzσz3+Γσz3,in which Λz∗≥Γ, so we have V˙4≤−ξ1σz12−ξ2σz22−ξ3σz32≤−ξV3. It can be concluded that V˙4≤0 is strictly negative. Therefore, σz1, σz2, and σz3 can converge to zero in limited time eventually, and the system can be asymptotically stable; finally, the UAV can track the expected position accurately.


#### 3.2.2. The Design of Horizontal Plane Motion Controller

The horizontal motion control includes two parts:x-axis and y-axis. The derivation process of horizontal plane motion controller is the same as that of altitude controller; therefore, only the derivation of the x and y direction controller is given here.The controller in thex direction can be expressed as follows:(31)ux=mkxU1uxn−uxas,uxn=kxx¨d−e˙x+ax2−∫ξ3σx3+σx2,uxas=∫Λ^x+ςxsignσx3,Λ^˙x=1δxσx3.The controller in they direction can be expressed as follows:(32)uy=mkyU1uyn−uyas,uyn=kyy¨d−e˙y+ay2−∫ξ3σy3+σy2,uxas=∫Λ^y+ςysignσy3,Λ^˙y=1δyσy3,where in equations (31) and (32),(33)ex=x−xd,ey=y−yd,σx1=sx1,σy1=sy1,σx2=sx2−αx1,σx3=sx3−αx2,σy2=sy2−αy1,σy3=sy3−αy2,αx1=−ξ1σx1,αy1=−ξ1σy1,sx1=∫ex+kxe˙x,sy1=∫ey+kye˙y,ex=x−xd,ey=y−yd,sx2=s˙x1,sx3=s¨x1,sy2=s˙y1,sy3=s¨y1,kx,ky,δx,δy,ςx,ςy>0,where xd and yd are the reference values in x direction and y direction, respectively.


#### 3.2.3. The Design of Attitude Controller

Likewise, the design process of attitude controller is the same as that of altitude controller. Therefore, only the derivation of the controllers of attitudeϕ, θ, and ψ is given here.According to equation (2) and combined with equations (31) and (32), the expected values of pitch angle and roll angle can be obtained as follows:(34)ϕd=arcsinuxsinψ−uycosψ,θd=arcsinux−sinϕdsinψcosϕdcosψ.The controller of attitudeϕ is as follows:(35)U2=Ixkϕluϕn−uϕas,uϕn=−kϕθ˙ψ˙Iy−IzIx+JrIxθ˙ωr−ϕ¨d−e˙ϕ+aϕ2−∫ξ3σϕ3+σϕ2,uϕas=∫Λ^ϕ+ςϕsignσϕ3,Λ^˙ϕ=1δϕσϕ3.The controller of attitudeθ is as follows:(36)U3=Iykθluθn−uθas,uθn=−kθψ˙ϕ˙Iz−IxIy−JrIyϕ˙ωr−θ¨d−e˙θ+aθ2−∫ξ3σθ3+σθ2,uθas=∫Λ^θ+ςθsignσθ3,Λ^˙θ=1δθσθ3.The controller of attitudeψ is as follows:(37)U4=Izkψluψn−uψas,uψn=−kψϕ˙θ˙Ix−IyIz−ψ¨d−e˙ψ+aψ2−∫ξ3σψ3+σψ2,uψas=∫Λ^ψ+ςψsignσψ3,Λ^˙ψ=1δψσψ3,where in equations (33) to (35),(38)eϕ=ϕ−ϕd,eθ=θ−θd,eψ=ψ−ψd,σϕ1=sϕ1,σθ1=sθ1,σψ1=sψ1,σϕ2=sϕ2−αϕ1,σϕ3=sϕ3−αϕ2,σθ2=sθ2−αθ1,σθ3=sθ3−αθ2,σψ2=sψ2−αψ1,σψ3=sψ3−αψ2,αϕ1=−ξ1σϕ1,αθ1=−ξ1σθ1,αψ1=−ξ1σψ1,sϕ1=∫eϕ+kϕe˙ϕ,sθ1=∫eθ+kθe˙θ,sψ1=∫eψ+kψe˙ψ,eϕ=ϕ−ϕd,eθ=θ−θd,eψ=ψ−ψd,sϕ2=s˙ϕ1,sϕ3=s¨ϕ1,sθ2=s˙θ1,sθ3=s¨θ1,sψ2=s˙ψ1,sψ3=s¨ψ1,kϕ,kθ,kψ,δϕ,δθ,δψ,ςϕ,ςθ,ςψ>0.


## 3.1. Control Strategy

The quadrotor UAV is a nonlinear system with strong coupling and is an underactuated system. As an underactuated system, it has only four control inputs, but it has to control six states. The control strategy adopted in this paper is double loop control, and the outer loop is position control, which is composed of altitude and horizontal position. The difference between the real value and the expected value is calculated, and then the altitude and level control of the ABSMC method are used to design control input terms, the desired attitude angle is obtained by inverse solution, and then the inner loop is used for attitude control, which mainly controls the pitch, yaw, and roll motion of UAV. The specific control flow is shown in Figure2.Figure 2
Control flow chart.


## 3.2. Controller Design

Firstly, the design process of the controllerU1 is given based on the ABSMC method, and then the controllers ux, uy, U2, U3, and U4 are obtained based on the same design process.


### 3.2.1. The Design of the Altitude Controller

Firstly, the controller for quadrotor UAVs’ height based on the adaptive backstepping sliding mode method is designed.In equation (1), the second-order system controlling the height of quadrotor UAV can be equivalent as follows:(3)z¨=1mcosϕcosθU1−g+Δz.In equation (3), z represents the height of quadrotor UAV and Δz=cosϕcosθεU1+f3. Let z1=z and z2=z˙, equation (3) can be rewritten as follows:(4)z˙1=z2,z˙2=1mcosϕcosθU1−g.Firstly, an integral sliding surface is defined as follows:(5)sz1=∫ez+kze˙z.In equation (5), kz is a positive constant and ez=z−zd, where zd is the reference height. The first and second derivatives of equation (5) are defined as follows:(6)sz2=s˙z1=ez+kze˙z,(7)sz3=s˙z2=e˙z+kze¨z.In particular, we use the sliding mode differentiator to obtain the differential value of the state as follows:(8)z^=v+k1z−z^2/3signz−z^,v˙=k2z−z^1/2signz−z^,where k1 and k2 are normal numbers, and the differentiator can ensure that v converges to z˙ in finite time. In the following controller design process, v is used instead of z˙ to construct the sliding surface and related error terms.It can be obtained by combining equations (3), (6), and (7):(9)s˙z1=sz2,s˙z2=sz3,s˙z3=ddte˙z+kz1mcosϕcosθU1−g+Δz−z¨d.Then, according to the backstepping method, combine equations (5)–(7), with following transformation:(10)σz1=sz1,(11)σz2=sz2−α1,(12)σz3=sz3−α2,where α1 and α2 are the virtual controllers to be designed.Combining equation (11) and deriving equation (10), we can get(13)σ˙z1=s˙z1=σz2+α1.A Lyapunov function is defined asV1=1/2σz12. Let the virtual controller α1=−ξ1σz1, and we can get the derivative of V1 as follows:(14)V˙1=σz1σz2+α1=σz1σz2−ξ1σz12.In equation (14), ξ1 is a positive constant. When σz2=0 and V˙1=−ξ1σz12≤0, σz1 can be asymptotically stable.Similar to equation (13), by combining equations (11) and (12) with derivation, we can get the following equation:(15)σ˙z2=s˙z2−α˙1=σz3+α2−α˙1=σz3+α2+ξ1sz2.A Lyapunov function is defined as follows:(16)V2=V1+12σz22.According to equation (15), the virtual controller α2 can be defined as the following equation:(17)α2=−ξ2σz2−σz1−ξ1sz2.In equation (17), ξ2 is a positive constant. Combined with equation (17), we can get equation (18) through the differential of equation (16), which is the Lyapunov function V2 as follows:(18)V˙2=V˙1+σz2σ˙z2=−ξ1σz12+σz1σz2+σz2σz3−ξ2σz2−σz1=−ξ1σz12−ξ2σz22+σz2σz3.Similar to equation (14), when σz3=0 and V˙2=−ξ1σz12−ξ2σz22≤0, σz1 and σz2 can be asymptotically stable.According to the above derivation, we define a Lyapunov function with the following equation:(19)V3=V2+12σz32.Then, combining equations (9) and (19), we obtain the following equation by deriving equation (19):(20)V˙3=V˙2+σz3σ˙z3=−ξ1σz12−ξ2σz22+σz2σz3+σz3ddte˙z+kz1mcosϕcosθU1−g+Δz−z¨d−α˙2.Thus, the controllerU1 can be designed as follows:(21)U1=mkzcosϕcosθu1n−u1s.In equation (21), u1n and u1s can be given as equations (22) and (23), respectively.(22)u1n=−kz−g−z¨d−e˙z+α2−∫ξ3σz3+σz2,(23)u1s=∫Λz+ςzsignσz3.In equations (22) and (23), ξ3 and ςz are positive constant and Λz is the gain of sliding mode switching. Substituting equation (21) into equation (20) yields the following:(24)V˙3=−ξ1σz12−ξ2σz22−ξ3σz32+σz3ddt−u1s+kzΔz≤−ξ1σz12−ξ2σz22−ξ3σz32−Λz+ςzσz3+Γσz3.In particular, it can be seen from equation (24) that if no switching gain is set to counteract the influence of interference, equation (24) needs to be rewritten as follows:(25)V˙3≤−ξ1σz12−ξ2σz22−ξ3σz32+Γσz3≤−ξV3+Γσz3.In the above equation,ξ=minξ1,ξ2,ξ3; under the influence of interference term Γ, V3 cannot converge to zero but can only converge to the neighbourhood V3≤Γσz3/ξ. Therefore, by setting the switching gain, i.e., introducing formula (23), the tracking error can be guaranteed to converge to zero.In equation (24), Γ=kzd/dtΔz; when Γ≤Λz, V˙3≤−ξ1σz12−ξ2σz22−ξ3σz32≤−ξV3 is strictly negative, in which ξ=minξ1,ξ2,ξ3. As a result, the proposed control method can ensure that the tracking error converges to zero.However, uncertain fault or external disturbanceΔz is usually time-varying in the actual control system, and the upper bound of function Γ cannot be obtained accurately. If the value of switching gain Λz is too large, it can counteract the influence of interference Γ and ensure the robustness of the control method, but it will cause chattering to the control input because of the too large switching gain.IfΛz in equation (23) is a tiny fixed constant, it cannot well counteract the effect of Δz. Thus, we construct an adaptive switching gain function, and then equation (23) can be updated as follows:(26)u1s=∫Λ^z+ςzsignσz3,where Λ^z is the adaptive switching gain, and the adaptive law is shown in following equation:(27)Λ^˙z=1δzσz3.In equation (27), δz is a positive constant. Let Λ˜z=Λ^z−Λz∗, where Λz∗ is the optimal switching gain, and Λz∗≥Γ; then, combined with equation (19), we define a Lyapunov function as follows:(28)V4=V3+12δzΛ˜2.Then, we can obtain the following equation through deriving equation (28):(29)V˙4=V˙3+δzΛ˜Λ˜˙=−ξ1σz12−ξ2σz22+σz2σz3+δzΛ^z−Λz∗Λ˜˙z+σz3ddte˙+kz1mcosϕcosθU1−g+Δz−z¨d−α˙2.Substituting equations (20) and (21) and equation (26) into equation (29), then equation (29) can be updated as follows:(30)V˙4=−ξ1σz12−ξ2σz22−ξ3σz32+σz3ddtu1as+kzΔz+δzΛ^z−Λz∗Λ˜˙z=−ξ1σz12−ξ2σz22−ξ3σz32+δzΛ^z−Λz∗Λ˜˙z+σz3−Λ^z+ςzsignσz3+kzddtΔz≤−ξ1σz12−ξ2σz22−ξ3σz32−Λz∗+ςzσz3+Γσz3,in which Λz∗≥Γ, so we have V˙4≤−ξ1σz12−ξ2σz22−ξ3σz32≤−ξV3. It can be concluded that V˙4≤0 is strictly negative. Therefore, σz1, σz2, and σz3 can converge to zero in limited time eventually, and the system can be asymptotically stable; finally, the UAV can track the expected position accurately.


### 3.2.2. The Design of Horizontal Plane Motion Controller

The horizontal motion control includes two parts:x-axis and y-axis. The derivation process of horizontal plane motion controller is the same as that of altitude controller; therefore, only the derivation of the x and y direction controller is given here.The controller in thex direction can be expressed as follows:(31)ux=mkxU1uxn−uxas,uxn=kxx¨d−e˙x+ax2−∫ξ3σx3+σx2,uxas=∫Λ^x+ςxsignσx3,Λ^˙x=1δxσx3.The controller in they direction can be expressed as follows:(32)uy=mkyU1uyn−uyas,uyn=kyy¨d−e˙y+ay2−∫ξ3σy3+σy2,uxas=∫Λ^y+ςysignσy3,Λ^˙y=1δyσy3,where in equations (31) and (32),(33)ex=x−xd,ey=y−yd,σx1=sx1,σy1=sy1,σx2=sx2−αx1,σx3=sx3−αx2,σy2=sy2−αy1,σy3=sy3−αy2,αx1=−ξ1σx1,αy1=−ξ1σy1,sx1=∫ex+kxe˙x,sy1=∫ey+kye˙y,ex=x−xd,ey=y−yd,sx2=s˙x1,sx3=s¨x1,sy2=s˙y1,sy3=s¨y1,kx,ky,δx,δy,ςx,ςy>0,where xd and yd are the reference values in x direction and y direction, respectively.


### 3.2.3. The Design of Attitude Controller

Likewise, the design process of attitude controller is the same as that of altitude controller. Therefore, only the derivation of the controllers of attitudeϕ, θ, and ψ is given here.According to equation (2) and combined with equations (31) and (32), the expected values of pitch angle and roll angle can be obtained as follows:(34)ϕd=arcsinuxsinψ−uycosψ,θd=arcsinux−sinϕdsinψcosϕdcosψ.The controller of attitudeϕ is as follows:(35)U2=Ixkϕluϕn−uϕas,uϕn=−kϕθ˙ψ˙Iy−IzIx+JrIxθ˙ωr−ϕ¨d−e˙ϕ+aϕ2−∫ξ3σϕ3+σϕ2,uϕas=∫Λ^ϕ+ςϕsignσϕ3,Λ^˙ϕ=1δϕσϕ3.The controller of attitudeθ is as follows:(36)U3=Iykθluθn−uθas,uθn=−kθψ˙ϕ˙Iz−IxIy−JrIyϕ˙ωr−θ¨d−e˙θ+aθ2−∫ξ3σθ3+σθ2,uθas=∫Λ^θ+ςθsignσθ3,Λ^˙θ=1δθσθ3.The controller of attitudeψ is as follows:(37)U4=Izkψluψn−uψas,uψn=−kψϕ˙θ˙Ix−IyIz−ψ¨d−e˙ψ+aψ2−∫ξ3σψ3+σψ2,uψas=∫Λ^ψ+ςψsignσψ3,Λ^˙ψ=1δψσψ3,where in equations (33) to (35),(38)eϕ=ϕ−ϕd,eθ=θ−θd,eψ=ψ−ψd,σϕ1=sϕ1,σθ1=sθ1,σψ1=sψ1,σϕ2=sϕ2−αϕ1,σϕ3=sϕ3−αϕ2,σθ2=sθ2−αθ1,σθ3=sθ3−αθ2,σψ2=sψ2−αψ1,σψ3=sψ3−αψ2,αϕ1=−ξ1σϕ1,αθ1=−ξ1σθ1,αψ1=−ξ1σψ1,sϕ1=∫eϕ+kϕe˙ϕ,sθ1=∫eθ+kθe˙θ,sψ1=∫eψ+kψe˙ψ,eϕ=ϕ−ϕd,eθ=θ−θd,eψ=ψ−ψd,sϕ2=s˙ϕ1,sϕ3=s¨ϕ1,sθ2=s˙θ1,sθ3=s¨θ1,sψ2=s˙ψ1,sψ3=s¨ψ1,kϕ,kθ,kψ,δϕ,δθ,δψ,ςϕ,ςθ,ςψ>0.


## 3.2.1. The Design of the Altitude Controller

Firstly, the controller for quadrotor UAVs’ height based on the adaptive backstepping sliding mode method is designed.In equation (1), the second-order system controlling the height of quadrotor UAV can be equivalent as follows:(3)z¨=1mcosϕcosθU1−g+Δz.In equation (3), z represents the height of quadrotor UAV and Δz=cosϕcosθεU1+f3. Let z1=z and z2=z˙, equation (3) can be rewritten as follows:(4)z˙1=z2,z˙2=1mcosϕcosθU1−g.Firstly, an integral sliding surface is defined as follows:(5)sz1=∫ez+kze˙z.In equation (5), kz is a positive constant and ez=z−zd, where zd is the reference height. The first and second derivatives of equation (5) are defined as follows:(6)sz2=s˙z1=ez+kze˙z,(7)sz3=s˙z2=e˙z+kze¨z.In particular, we use the sliding mode differentiator to obtain the differential value of the state as follows:(8)z^=v+k1z−z^2/3signz−z^,v˙=k2z−z^1/2signz−z^,where k1 and k2 are normal numbers, and the differentiator can ensure that v converges to z˙ in finite time. In the following controller design process, v is used instead of z˙ to construct the sliding surface and related error terms.It can be obtained by combining equations (3), (6), and (7):(9)s˙z1=sz2,s˙z2=sz3,s˙z3=ddte˙z+kz1mcosϕcosθU1−g+Δz−z¨d.Then, according to the backstepping method, combine equations (5)–(7), with following transformation:(10)σz1=sz1,(11)σz2=sz2−α1,(12)σz3=sz3−α2,where α1 and α2 are the virtual controllers to be designed.Combining equation (11) and deriving equation (10), we can get(13)σ˙z1=s˙z1=σz2+α1.A Lyapunov function is defined asV1=1/2σz12. Let the virtual controller α1=−ξ1σz1, and we can get the derivative of V1 as follows:(14)V˙1=σz1σz2+α1=σz1σz2−ξ1σz12.In equation (14), ξ1 is a positive constant. When σz2=0 and V˙1=−ξ1σz12≤0, σz1 can be asymptotically stable.Similar to equation (13), by combining equations (11) and (12) with derivation, we can get the following equation:(15)σ˙z2=s˙z2−α˙1=σz3+α2−α˙1=σz3+α2+ξ1sz2.A Lyapunov function is defined as follows:(16)V2=V1+12σz22.According to equation (15), the virtual controller α2 can be defined as the following equation:(17)α2=−ξ2σz2−σz1−ξ1sz2.In equation (17), ξ2 is a positive constant. Combined with equation (17), we can get equation (18) through the differential of equation (16), which is the Lyapunov function V2 as follows:(18)V˙2=V˙1+σz2σ˙z2=−ξ1σz12+σz1σz2+σz2σz3−ξ2σz2−σz1=−ξ1σz12−ξ2σz22+σz2σz3.Similar to equation (14), when σz3=0 and V˙2=−ξ1σz12−ξ2σz22≤0, σz1 and σz2 can be asymptotically stable.According to the above derivation, we define a Lyapunov function with the following equation:(19)V3=V2+12σz32.Then, combining equations (9) and (19), we obtain the following equation by deriving equation (19):(20)V˙3=V˙2+σz3σ˙z3=−ξ1σz12−ξ2σz22+σz2σz3+σz3ddte˙z+kz1mcosϕcosθU1−g+Δz−z¨d−α˙2.Thus, the controllerU1 can be designed as follows:(21)U1=mkzcosϕcosθu1n−u1s.In equation (21), u1n and u1s can be given as equations (22) and (23), respectively.(22)u1n=−kz−g−z¨d−e˙z+α2−∫ξ3σz3+σz2,(23)u1s=∫Λz+ςzsignσz3.In equations (22) and (23), ξ3 and ςz are positive constant and Λz is the gain of sliding mode switching. Substituting equation (21) into equation (20) yields the following:(24)V˙3=−ξ1σz12−ξ2σz22−ξ3σz32+σz3ddt−u1s+kzΔz≤−ξ1σz12−ξ2σz22−ξ3σz32−Λz+ςzσz3+Γσz3.In particular, it can be seen from equation (24) that if no switching gain is set to counteract the influence of interference, equation (24) needs to be rewritten as follows:(25)V˙3≤−ξ1σz12−ξ2σz22−ξ3σz32+Γσz3≤−ξV3+Γσz3.In the above equation,ξ=minξ1,ξ2,ξ3; under the influence of interference term Γ, V3 cannot converge to zero but can only converge to the neighbourhood V3≤Γσz3/ξ. Therefore, by setting the switching gain, i.e., introducing formula (23), the tracking error can be guaranteed to converge to zero.In equation (24), Γ=kzd/dtΔz; when Γ≤Λz, V˙3≤−ξ1σz12−ξ2σz22−ξ3σz32≤−ξV3 is strictly negative, in which ξ=minξ1,ξ2,ξ3. As a result, the proposed control method can ensure that the tracking error converges to zero.However, uncertain fault or external disturbanceΔz is usually time-varying in the actual control system, and the upper bound of function Γ cannot be obtained accurately. If the value of switching gain Λz is too large, it can counteract the influence of interference Γ and ensure the robustness of the control method, but it will cause chattering to the control input because of the too large switching gain.IfΛz in equation (23) is a tiny fixed constant, it cannot well counteract the effect of Δz. Thus, we construct an adaptive switching gain function, and then equation (23) can be updated as follows:(26)u1s=∫Λ^z+ςzsignσz3,where Λ^z is the adaptive switching gain, and the adaptive law is shown in following equation:(27)Λ^˙z=1δzσz3.In equation (27), δz is a positive constant. Let Λ˜z=Λ^z−Λz∗, where Λz∗ is the optimal switching gain, and Λz∗≥Γ; then, combined with equation (19), we define a Lyapunov function as follows:(28)V4=V3+12δzΛ˜2.Then, we can obtain the following equation through deriving equation (28):(29)V˙4=V˙3+δzΛ˜Λ˜˙=−ξ1σz12−ξ2σz22+σz2σz3+δzΛ^z−Λz∗Λ˜˙z+σz3ddte˙+kz1mcosϕcosθU1−g+Δz−z¨d−α˙2.Substituting equations (20) and (21) and equation (26) into equation (29), then equation (29) can be updated as follows:(30)V˙4=−ξ1σz12−ξ2σz22−ξ3σz32+σz3ddtu1as+kzΔz+δzΛ^z−Λz∗Λ˜˙z=−ξ1σz12−ξ2σz22−ξ3σz32+δzΛ^z−Λz∗Λ˜˙z+σz3−Λ^z+ςzsignσz3+kzddtΔz≤−ξ1σz12−ξ2σz22−ξ3σz32−Λz∗+ςzσz3+Γσz3,in which Λz∗≥Γ, so we have V˙4≤−ξ1σz12−ξ2σz22−ξ3σz32≤−ξV3. It can be concluded that V˙4≤0 is strictly negative. Therefore, σz1, σz2, and σz3 can converge to zero in limited time eventually, and the system can be asymptotically stable; finally, the UAV can track the expected position accurately.


## 3.2.2. The Design of Horizontal Plane Motion Controller

The horizontal motion control includes two parts:x-axis and y-axis. The derivation process of horizontal plane motion controller is the same as that of altitude controller; therefore, only the derivation of the x and y direction controller is given here.The controller in thex direction can be expressed as follows:(31)ux=mkxU1uxn−uxas,uxn=kxx¨d−e˙x+ax2−∫ξ3σx3+σx2,uxas=∫Λ^x+ςxsignσx3,Λ^˙x=1δxσx3.The controller in they direction can be expressed as follows:(32)uy=mkyU1uyn−uyas,uyn=kyy¨d−e˙y+ay2−∫ξ3σy3+σy2,uxas=∫Λ^y+ςysignσy3,Λ^˙y=1δyσy3,where in equations (31) and (32),(33)ex=x−xd,ey=y−yd,σx1=sx1,σy1=sy1,σx2=sx2−αx1,σx3=sx3−αx2,σy2=sy2−αy1,σy3=sy3−αy2,αx1=−ξ1σx1,αy1=−ξ1σy1,sx1=∫ex+kxe˙x,sy1=∫ey+kye˙y,ex=x−xd,ey=y−yd,sx2=s˙x1,sx3=s¨x1,sy2=s˙y1,sy3=s¨y1,kx,ky,δx,δy,ςx,ςy>0,where xd and yd are the reference values in x direction and y direction, respectively.


## 3.2.3. The Design of Attitude Controller

Likewise, the design process of attitude controller is the same as that of altitude controller. Therefore, only the derivation of the controllers of attitudeϕ, θ, and ψ is given here.According to equation (2) and combined with equations (31) and (32), the expected values of pitch angle and roll angle can be obtained as follows:(34)ϕd=arcsinuxsinψ−uycosψ,θd=arcsinux−sinϕdsinψcosϕdcosψ.The controller of attitudeϕ is as follows:(35)U2=Ixkϕluϕn−uϕas,uϕn=−kϕθ˙ψ˙Iy−IzIx+JrIxθ˙ωr−ϕ¨d−e˙ϕ+aϕ2−∫ξ3σϕ3+σϕ2,uϕas=∫Λ^ϕ+ςϕsignσϕ3,Λ^˙ϕ=1δϕσϕ3.The controller of attitudeθ is as follows:(36)U3=Iykθluθn−uθas,uθn=−kθψ˙ϕ˙Iz−IxIy−JrIyϕ˙ωr−θ¨d−e˙θ+aθ2−∫ξ3σθ3+σθ2,uθas=∫Λ^θ+ςθsignσθ3,Λ^˙θ=1δθσθ3.The controller of attitudeψ is as follows:(37)U4=Izkψluψn−uψas,uψn=−kψϕ˙θ˙Ix−IyIz−ψ¨d−e˙ψ+aψ2−∫ξ3σψ3+σψ2,uψas=∫Λ^ψ+ςψsignσψ3,Λ^˙ψ=1δψσψ3,where in equations (33) to (35),(38)eϕ=ϕ−ϕd,eθ=θ−θd,eψ=ψ−ψd,σϕ1=sϕ1,σθ1=sθ1,σψ1=sψ1,σϕ2=sϕ2−αϕ1,σϕ3=sϕ3−αϕ2,σθ2=sθ2−αθ1,σθ3=sθ3−αθ2,σψ2=sψ2−αψ1,σψ3=sψ3−αψ2,αϕ1=−ξ1σϕ1,αθ1=−ξ1σθ1,αψ1=−ξ1σψ1,sϕ1=∫eϕ+kϕe˙ϕ,sθ1=∫eθ+kθe˙θ,sψ1=∫eψ+kψe˙ψ,eϕ=ϕ−ϕd,eθ=θ−θd,eψ=ψ−ψd,sϕ2=s˙ϕ1,sϕ3=s¨ϕ1,sθ2=s˙θ1,sθ3=s¨θ1,sψ2=s˙ψ1,sψ3=s¨ψ1,kϕ,kθ,kψ,δϕ,δθ,δψ,ςϕ,ςθ,ςψ>0.


## 4. Simulation Results

To verify the effectiveness of the proposed ABSMC method, the SMC method and ABSMC method are used to perform trajectory tracking control of quadrotor UAV based on MATLAB 2019b. The expected trajectory of the UAV is set as shown in equation (39). Actuator fault and external disturbance of the aircraft are set as shown in equation (40). The relevant physical parameters of quadrotor UAV are shown in Table 1, and the control parameters are shown in Table 2.(39)xd=201−cosπt20,yd=−14sinπt10,zd=5,ψd=0,(40)εU1=0.4sintU1,εU3=0.2sint+costU3,εU2=0.4costU2,εU4=0.2sint−costU4,f1=−cos2t−3cost,f2=−cos2t−3cost,f3=−3cost,f4=cos2t+cost,f5=−cos2t−3cost,f6=cos2t+cost.Table 1
Physical parameters of quadrotor UAV.
ParametersNumerical valueThe physical meaning of parameterm1.0The mass of the quadrotor UAV (kg)g9.8Gravity acceleration (m/s2)Iy0.005The moment of inertias of theY-axis (kg/m2)Ix0.005The moment of inertias of theX-axis (kg/m2)Iz0.01The moment of inertias of theZ-axis (kg/m2)l0.2The length of the quadrotor UAV from the end of each rotor to the center of gravity (m)Jr0.00002The moment of inertia of the motor rotor (kg/m2)b0.00003The drag coefficientd0.00000006The lift coefficientTable 2
Parameters of controller.
The parameters of controllersNumerical valuekii=x,y,z0.5kjj=ϕ,θ,ψ0.3ξii=1,2,33δii=x,y,z0.5δii=ϕ,θ,ψ5It can be seen that the sliding mode control method has a good control effect in the case of actuator failure and external interference, as shown in Figures3–6; however, since its switching gain is fixed, it still has disadvantages in the face of interference beyond the upper bound of its gain. At this time, the adaptive backstepping sliding mode control method with adaptive switching gain can adaptively adjust its switching. Compared with the SMC method, it is clear that the ABSMC method significantly suppresses the chattering phenomenon of sliding mode control input after the adaptive switching gain being introduced and the backstepping method being used for correction, as shown in Figures 7 and 8. And the chattering caused by the SMC method is limited in a small range. Therefore, the adaptive backstepping sliding mode control method shows better control performance from the pose tracking effect in Figures 3 to 6.Figure 3
UAV’s position tracking.Figure 4
UAV’s attitude tracking.Figure 5
The absolute error of UAV’s position tracking.Figure 6
The absolute error of UAV’s attitude tracking.Figure 7
Control input based on the ABSMC method.Figure 8
Control input based on the SMC method.


## 5. Conclusion

Aiming at the trajectory tracking control problem of quadrotor UAV based on actuator fault and external disturbance, the ABSMC method is proposed in this paper by constructing the switching gain of adaptive sliding mode control in the backstepping design process and using differential iteration scheme to suppress the chattering effect of sliding mode control, then the dynamic model of quadrotor UAV is setup, and the control strategy and controllers are designed based on the proposed method. In order to verify the effectiveness of the proposed method, the sliding mode control method and the adaptive stepping sliding mode control method proposed in this paper are used to simulate the actuator fault and external disturbance during the flight of the quadrotor UAV, and the control effect of the two methods is compared. According to the simulation results, it is found that the adaptive backstepping sliding mode control method proposed in this paper not only guarantees the convergence performance of the sliding mode control method but also effectively suppresses the chattering problem caused by the gain of the switching reaching rate. Therefore, the accuracy of trajectory tracking control for quadrotor UAV during external flight disturbances and uncertainties can be improved by the proposed method.



---

*Source: 3997648-2021-09-14.xml*