# Robust Finite-Time Tracking Control Based on Disturbance Observer for an Uncertain Quadrotor under External Disturbances

Authors: Hamid Hassani; Anass Mansouri; Ali Ahaitouf
Journal: Journal of Robotics
 (2022)

---

## Abstract

In this paper, a robust flight control system is proposed for an autonomous quadrotor to quickly and accurately achieve the targeted trajectories. A novel supertwisting nonsingular terminal sliding mode control (STNTSMC) has been developed to ensure that the tracking errors vanish in a short finite-time. A nonlinear disturbance observer (DO) is incorporated into the control system to estimate the unknown external perturbations and to strengthen the system’s robustness. The Lyapunov theory is used to verify the closed-loop stability of the synthesized controller. Moreover, processor-in-the-loop (PIL) implementations are performed to validate the efficacy of the suggested method. The merit of the proposed DO-STNTSMC is evaluated under multiple flight scenarios. The obtained results demonstrate that the proposed controller has a highly reduced tracking error and strong robustness against random parameter changes and external disturbances, compared to conventional nonsingular terminal sliding mode control. Finally, experimental tests are conducted to validate the performance of the suggested method.


---

## Body

## 1. Introduction

Quadrotor drones have received an increasing demand for multiple tasks accomplishment in both civilian and military sectors. The potential applications of these aircraft include photography, firefighting, agriculture precision, inspection/surveillance of cluttered spaces, mapping, product delivery, and so on. Quadrotors are multirotor aerial vehicles characterized by simple mechanics, great maneuverability, and an impressive capacity to perform repetitive tasks autonomously [1–3]. However, the tracking control of these vehicles is challenging because the vehicle dynamics are highly nonlinear, underactuated, and have strong coupling between the state variables. Moreover, quadrotors are subject to multiple sources of uncertainties and disturbances that may jeopardize the system’s stability [4].The problem of trajectory tracking control of autonomous robots has become an active research topic. Numerous control approaches were developed to solve this issue and achieve accurate path tracking; for instance, PID control [5, 6], backstepping control [7–9], sliding mode control (SMC) [10–13], dynamic inversion [14], and adaptive control [15–17]. Owing to the inherent robustness and the excellent tracking precision of the sliding mode technique, it is widely used to control nonlinear complex systems [18, 19]. As an example, Chen et al. [20] have proposed a robust flight control system to track a desired path that consists of a regular SMC method working together with a backstepping technique. Almakhles [21], provided the simulation results obtained with a hierarchical technique relying on the backstepping SMC for the quadrotor attitude and the integral SMC for the quadrotor position. However, the removal of the chattering problem, which decreases the system performance, has not been addressed in these papers [20, 21]. In order to deal with this issue, the supertwisting (ST) SMC is employed by some researchers for the tracking control of the quadrotor altitude [22]. To estimate the unmeasured signals and enforce the system robustness against external disturbances, the higher order sliding mode observer is also used in this research [22]. In the same way, the authors in [23] integrated the ST algorithm, the PID sliding mode control, and the disturbance observer to regulate the quadrotor attitude and altitude. However, the position tracking control is not considered in these works [22, 23]. In reference [24], a compounded control scheme, based on the ST algorithm and the PID sliding mode control, is designed for the position and orientation of the quadrotor system in the existence of sustained and time-varying disturbances. Although these approaches [20–24] achieved good tracking accuracy with reduced chattering influence, finite-time control has not been considered in these articles. The problem of formation control has been also considered in many research. For instance, in reference [25], two versions of the ST control have been tested on a quadrotor UAV. Another interesting working multirobots can be found in [26].Nevertheless, the problem of finite-time tracking control has been investigated in many research works; for instance, Hassani et al. [27], have proposed an adaptive sliding mode stabilizer and tracker with finite-time convergence for the position and attitude of the quadrotor. This control aims to improve the tracking performance against the impact of modelling errors and external disturbances. Mofid et al. [28] have proposed an adaptive ST tracking control for the quadrotor UAV under the influence of disturbances, uncertainties, and input delay. Experimental tests are also conducted to validate the effectiveness of this approach. In reference [29], a hybrid control strategy that combines the backstepping control, the adaptive backstepping control and the integral terminal SMC is employed for the guidance of a quadrotor UAV subjected to sustained disturbances. A fractional-order terminal SMC controller has been introduced for position and attitude tracking control [30]. In that work, adaptive mechanisms have also been used to deal with the unknown bounds of the external disturbances. To further strengthen the system robustness against disturbances/uncertainties, disturbance observers (DO) have been introduced in some works for the precise estimation of the unknown external factors [31, 32]. In reference [33], a dual closed-loop control architecture based on active disturbance rejection was developed for the robust control of the quadrotor attitude. In reference [34], a sliding mode controller with a DO was deployed to reject the impact of the external perturbations on the quadrotor system while achieving accurate performance for the attitude/altitude state. However, motion control in the horizontal plane has not been treated in this work. In reference [35], the DO is used to design an improved twisting control; afterward, the controller is applied for the real-time attitude control of a quadrotor aircraft subjected to the influence of wind gusts. Wang et al. [36] discussed the design of a hybrid control scheme for the quadrotor system. An adaptive integral SMC is used for the altitude subsystem. A conventional backstepping control is developed for the control of the horizontal position, while a nonsingular terminal SMC combined with a DO is deployed for the attitude subsystem. Using this approach, accurate tracking can be achieved. However, the chattering problem cannot be avoided using this method.In this work, considering the full dynamics of the quadrotor UAV with unknown external disturbances, a robust finite-time control architecture is designed for the precise tracking of the targeted trajectories. Given that the aircraft can encounter some severe uncertainties and disturbances, an improved supertwisting nonsingular terminal SMC controller has been developed to realize accurate path following. In addition, a nonlinear DO is introduced to estimate unknown external forces and torques. As a consequence, the resulting control law can stabilize the aerial robot with more precision and improve robustness against unknown aerodynamic factors. Processor-in-the-loop (PIL) implementations are conducted to confirm the validity of the suggested control law. Moreover, comparisons with the nonsingular terminal SMC (NTSMC) are provided to show the superiority of the proposed method. Finally, experimental tests on a real lab quadrotor are carried out to validate the highlighted performance of the proposed strategy.The organization of the current paper is given as follows: Section2, presents the dynamical model of the aerial vehicle. Section 3 explains the design of the proposed flight control algorithm. Section 4 describes the processor-in-the-loop experiments that validate the controller’s effectiveness. Experimental tests are conducted in section 5. At the end, section 6 concludes the work.


## 2. Quadrotor Dynamic Model and Problem Statement

A quadrotor aircraft can be viewed as an under-actuated rotary wing vehicle composed of four identical actuators installed at the endpoint of a crossframe as schematized in Figure1. Two motors rotate clockwise, and the two others rotate counterclockwise to compensate for the antitorque. The vehicle’s translational and rotational displacements are controlled by varying the motor’s velocity, thus producing the required thrust and torque. To describe the vehicle motions, two referential frames are considered: an Earth-frame E=OE,XE,YE,ZE is used to describe the translational displacement, while a Body-frame B=OB,XB,YB,ZB defines the rotational displacement.Figure 1
Representation of the quadrotor UAV.Based on the Newton–Euler principle, the perturbed nonlinear model of the quadrotor drone can be expressed as follows [37–40]:(1)x¨=U1mcosΦsinΘcosΨ+sinΦsinΨ−Kxmx˙+Δx,y¨=U1mcosΦsinΘsinΨ−sinΦcosΨ−Kymy˙+Δy,z¨=U1mcosΦcosΘ−g−Kzmz˙+Δz,Φ¨=Θ˙Ψ˙Jy−JzJx−JrJxΘ˙℧+UΦJx−KΦJxΦ˙2+ΔΦ,Θ¨=Φ˙Ψ˙Jz−JxJy+JrJyΦ˙℧+UΘJy−KΘJyΘ˙2+ΔΘ,Ψ¨=Φ˙Θ˙Jx−JyJz+UΨJz−KΨJzΨ˙2+ΔΨ,where Χ=x,y,z symbolizes the position coordinate vector, while Υ=Φ,Θ,Ψ is the orientation coordinates vector. J=diagJx,Jy,Jz stands for the inertia moments, and Jr is the rotor inertia. m represents the vehicle mass. g is the gravitational acceleration. Kℏ,ℏ=x,y,z,Φ,Θ,Ψ are the drag constants. U1 corresponds to the lift force. UΦ, UΘ, and UΨ are the command torques. Δℏ,ℏ=x,y,z,Φ,Θ,Ψ denotes the unknown exogenous perturbations. ℧=ω1−ω2+ω3−ω4, with ωi is the speed of motor i.The model of the aerial robot can be described by a second order nonlinear system which has the following form:(2)χ˙i=χi+1,χ˙i+1=Aiχ+BiχUi+Δi,withχ=χ1,χ2,χ3,…,χ12T=Φ,Φ˙,Θ,Θ˙,Ψ,Ψ˙,x,x˙,y,y˙,z,z˙T stands for the state vector. Aiχ and Biχ≠0 are nonlinear functions. Ui corresponds to the control inputs. Δi Represents the additive disturbances which is assumed to be bounded Δi<D with D>0 and satisfy Δ˙i=0.Using the state space representation, the quadrotor dynamics can be rewritten as follows:(3)χ˙1=χ2,χ˙2=a1Φχ4χ6+a2Φχ4+a2Φχ22+ΒΦUΦ+ΔΦ,χ˙3=χ4,χ˙4=a1Θχ2χ6+a2Θχ2+a3Θχ32+ΒΘUΘ+ΔΘ,χ˙5=χ6,χ˙4=a1Ψχ2χ4+a2Ψχ62+ΒΨUΨ+ΔΨ,χ˙7=χ8,χ˙8=U1mCχ1Sχ3Cχ5+Sχ1Sχ5+axχ8+Δx,χ˙9=χ10,χ˙10=U1mCχ1Sχ3Cχ5−Sχ1Sχ5+ayχ10+Δy,χ˙11=χ12,χ˙12=U1mCχ1Cχ3−g+azχ12+Δz,where, a1Φ=Jy−Jz/Jx,a2Φ=−Jr/Jx℧,a3Φ=−KΦ/Jx,a1Θ=Jz−Jx/Jy, a2Θ=Jr/Jy℧,ℙ3Θ=−KΘ/Jy,a1Ψ=Jx−Jy/Jz,a2Ψ=−KΨ/Jz, ax=−Kx/m, ay=−Ky/m, az=−Kz/m, ΒΦ=1/Jx, ΒΘ=1/Jy, ΒΨ=1/Jz.Cχ and Sχ stand for the cosχ and sinχ functions, respectively.The quadrotor, with its six degrees of freedom and four input commands is considered an underactuated nonlinear system. To overcome this situation, two virtual controls are considered as follows:(4)νx=U1mCχ1Sχ3Cχ5+Sχ1Sχ5,νy=U1mCχ1Sχ3Sχ5−Sχ1Cχ5.Using equation (4), the reference pitch Θd and roll Φd angles needed to accomplish the desired horizontal motions are calculated as follows [16]:(5)Θd=arctanνxCχ5d+νySχ5dUz,Φd=arctanCΘdνxSχ5d−νyCχ5dUz,withUz=Cχ1Cχ3U1/m.


## 3. Disturbance Observer-Based Finite-Time Tracking Control of the Quadrotor Position and Attitude

In this part, a robust finite-time flight control algorithm is synthetized for the quadrotor under the impact of nonlinearities, uncertain drag coefficients, and wind disturbances. The control structure of the proposed method is schematically illustrated in Figure2. A position controller is synthetized to drive the aircraft toward the desired locations xd,yd,zd by providing adequate control signals U1,νx,νy. For the vehicle orientation, an attitude controller is used to timely track the reference attitude angles. This controller generates the roll, pitch, and yaw torques UΦ,UΘ,UΨ. The technique used in both controllers integrates the STNTSMC and the DO, which allows an effective elimination of the disturbance influence without being impacted by the chattering influence.Figure 2
Proposed control flowchart for the quadrotor UAV.


### 3.1. Nonlinear Disturbance Observer

It is well known that external disturbances are not measurable or are expensive to measure. An alternative method for collecting information on external disturbances is to use a disturbance observer, which aims to detect and identify the additive disturbances from measurable variables [41].Considering the vehicle dynamics exposed to additive disturbances (equation (2)), a nonlinear DO can be designed as [42]:(6)z˙i=−Lizi−LiLiχi+1+Aiχ+BiχUi,Δ^i=zi+Liχi+1,where Li, zi, and Δ^i symbolize the observer gain, the observer’s internal state, and the estimation of the disturbance, respectively. χi+1=Φ˙,Θ˙,Ψ˙,x˙,y˙,z˙ correspond to the vehicle’s angular and translational velocities.With the appropriate configuration of the observer gainLi the error of observation ei=Δ^i−Δi will vanish asymptotically [42, 43]. Thus, the disturbances can be correctly estimated, that is Δ^i≡Δi.


### 3.2. Disturbance Observer-Based Nonsingular Terminal Sliding Mode Attitude-position Control of the Quadrotor UAV

For the model of the quadrotor vehicle given in (2), the tracking errors are defined as follows:(7)eΦ=χ1−Φd,eΘ=χ3−Θd,eΨ=χ5−Ψd;ex=χ7−xd,ey=χ9−yd,ez=χ11−zd.In order to achieve fast finite-time convergence for the position and attitude dynamics, nonsingular terminal sliding surfaces are selected as follows [44]:(8)σΦ=eΦ+κΦe˙ΦγΦsigne˙Φ,σΘ=eΘ+κΘe˙ΘγΘsigne˙Θ,σΨ=eΨ+κΨe˙ΨγΨsigne˙Ψ;σx=ex+κxe˙xγxsigne˙x,σy=ey+κye˙yγysigne˙y,σz=ez+κze˙zγzsigne˙z.Where κℏ are positive constants, and 1 <γℏ<2.The first-time derivative of the sliding surfaces can be given by the following equations:(9)σ˙Φ=e˙Φ+κΦγΦe˙ΦγΦ−1e¨Φ,σ˙Θ=e˙Θ+κΘγΘe˙ΘγΘ−1e¨Θ,σ˙Ψ=e˙Ψ+κΨγΨe˙ΨγΨ−1e¨Ψ.(10)σ˙x=e˙x+κxγxe˙xγx−1e¨x,σ˙y=e˙y+κyγye˙yγy−1e¨y,σ˙z=e˙z+κzγze˙zγz−1e¨z.Substituting the second-time derivative of the tracking errors into equations (9) and (10), we obtain the following equation:(11)σ˙Φ=e˙Φ+κΦγΦe˙ΦγΦ−1a1Φχ4χ6+a2Φχ4+a3Φχ22+ΒΦUΦ+Δ^Φ−Φ¨d,σ˙Θ=e˙Θ+κΘγΘe˙ΘγΘ−1a1Θχ2χ6+a2Θχ2+a3Θχ32+ΒΘUΘ+Δ^Θ−Θ¨d,σ˙Ψ=e˙Ψ+κΨγΨe˙ΨγΨ−1a1Ψχ2χ4+a2Ψχ62+ΒΨUΨ+Δ^Ψ−Ψ¨d,σ˙x=e˙x+κxγxe˙xγx−1U1mCχ1Sχ3Cχ5+Sχ1Sχ5+axχ8+Δ^x−x¨d,σ˙y=e˙y+κyγye˙yγy−1U1mCχ1Sχ3Sχ5−Sχ1Cχ5+ayχ10+Δ^y−y¨d,σ˙z=e˙z+κzγze˙zγz−1U1mCχ1Cχ3−g+azχ12+Δ^z−z¨d.Where Δ^ℏ is the estimate of Δℏ.Based on the sliding mode principle, the structure of the control law is as follows:(12)U=Ueq+Usw,where Ueq is the equivalent control that ensures the stability when the system is on the sliding surface σℏ=0, and Usw is the switching control that ensures the reachability of the predesigned sliding surface.The equivalent control law can be obtained by forcingσ˙ℏ=0; then, the control equations for the attitude and position are respectively given by equations (13) and (14):(13)UΦeq=1ΒΦΦ¨d−a1Φχ4χ6−a2Φχ4−a3Φχ22−Δ^Φ−e˙Φ2−γΦkΦγΦsigne˙Φ,UΘeq=1ΒΘΘ¨d−a1Θχ2χ6−a2Θχ2−a3Θχ32−Δ^Θ−e˙Θ2−γΘkΘγΘsigne˙Θ,UΨeq=1ΒΨΨ¨d−a1Ψχ2χ4−a2Ψχ62−Δ^Ψ−e˙Ψ2−γΨkΨγΨsigne˙Ψ,(14)νxeq=x¨d−axχ8−Δ^x−e˙x2−γxkxγxsigne˙x,νyeq=y¨d−ayχ10−Δ^y−e˙y2−γykyγysigne˙y,U1eq=mCχ1Cχ3z¨d+g−azχ12−Δ^z−e˙z2−γzkzγzsigne˙z.In order to reduce the effect of disturbances and parameter variations, a switching control based on the constant plus proportional reaching law is designed as follows:(15)UΦsw=1ΒΦ−τ1ΦσΦ−τ2ΦsignσΦ,UΘsw=1ΒΘ−τ1ΘσΘ−τ2ΘsignσΘ,UΨsw=1ΒΨ−τ1ΨσΨ−τ2ΨsignσΨ,(16)νxsw=−τ1xσx−τ2xsignσx,νysw=−τ1yσy−τ2ysignσy,U1sw=mCχ1Cχ3−τ1zσz−τ2zsignσz,τ1ℏ and τ2ℏ are positive constants.Using equations (13)–(16), the disturbance observer-based nonsingular terminal SMC for the quadrotor attitude and position can be formulated as follows:(17)UΦ=1ΒΦΦ¨d−a1Φχ4χ6−a2Φχ4−a3Φχ22−Δ^Φ−e˙Φ2−γΦkΦγΦsigne˙Φ−τ1ΦσΦ−τ2ΦsignσΦ,UΘ=1ΒΘΘ¨d−a1Θχ2χ6−a2Θχ2−a3Θχ32−Δ^Θ−e˙Θ2−γΘkΘγΘsigne˙Θ−τ1ΘσΘ−τ2ΘsignσΘ,UΨ=1ΒΨΨ¨d−a1Ψχ2χ4−a2Ψχ62−Δ^Ψ−e˙Ψ2−γΨkΨγΨsigne˙Ψ−τ1ΨσΨ−τ2ΨsignσΨ,(18)νx=x¨d−axχ8−Δ^x−e˙x2−γxkxγxsigne˙x−τ1xσx−τ2xsignσx,νy=y¨d−ayχ10−Δ^y−e˙y2−γykyγysigne˙y−τ1yσy−τ2ysignσy,U1=mCχ1Cχ3z¨d+g−azχ12−Δ^z−e˙z2−γzkzγzsigne˙z−τ1zσz−τ2zsignσz,Theorem 1.
Consider the roll subsystem. If the control equations are constructed as equation (17), then the finite-time convergence is ensured.Proof.
To prove the stability of the investigated system when using the established control law given by equation (17), we’ll be based on the Lyapunov theory. For this reason, let us consider the following Lyapunov function:(19)V=12σΦ2.
The derivative ofV is given by the following:(20)V˙=σΦσ˙Φ=σΦe˙Φ+κΦγΦe˙ΦγΦ−1a1Φχ4χ6+a2Φχ4+a3Φχ22+ΒΦUΦ+ΔΦ−Φ¨d.
Using equation (17), and after some calculation, V˙ becomes as follows:(21)V˙≤σΦ−τ1ΦσΦ−τ2ΦsignσΦ≤−τ1ΦσΦ2−τ2ΦσΦ≤0,
As the Lyapunov functionV is positive defined and its first-time derivative V˙ is negative; then, the closed-loop system stability of the roll motion is ensured.
The stability of the overall closed-loop system can be proved using the same procedure provided in Theorem1.


### 3.3. Disturbance Observer-Based Supertwisting Nonsingular Terminal Sliding Mode Control for the Quadrotor Position and Attitude

In order to improve the robustness and to vanish the effect of disturbances while reducing the chattering influence, a combination of the supertwisting algorithm with the NTSMC is established. Thus, the resulting disturbance observer-based supertwisting NTSMC (DO-STNTSMC) for the quadrotor system is designed as follows:(22)U=UNTSMC+UST,where UNTSMC is the NTSMC control laws given by equation (17) and (18). UST symbolizes the supertwisting algorithm defined in ref [45] as follows:(23)UST=−β1ℏσℏ1/2signσℏ−β2ℏ∫0tsignσℏdτ,withβ1ℏ and β2ℏ are positive constants.Using equation (17), (18) and (23), the proposed control laws can then be formulated as follows:(24)UΦ=1ΒΦΦ¨d−a1Φχ4χ6−a2Φχ4−a3Φχ22−Δ^Φ−e˙Φ2−γΦkΦγΦsigne˙Φ−τ1ΦσΦ−τ2ΦsignσΦ−β1ΦσΦ1/2signσΦ−β2Φ∫01signσΦdτ,Uθ=1ΒθΘ¨d−a1θχ2χ6−a2θχ2−a3θχ32−Δ^θ−e˙θ2−γθkθγθsigne˙θ−τ1θσθ−τ2θsignσθ−β1θσθ1/2signσθ−β2θ∫01signσθdτ,UΨ=1ΒΨΨ¨d−a1Ψχ2χ4−a2Ψχ62−Δ^Ψ−e˙Ψ2−γΨkΨγΨsigne˙Ψ−τ1ΨσΨ−τ2ΨsignσΨ−β1ΨσΨ1/2signσΨ−β2Ψ∫01signσΨdτ,νx=x¨d−axχ8−Δ^x−e˙x2−γxkxγxsigne˙x−τ1xσx−τ2xsignσx,−β1xσx1/2signσx−β2x∫otsignσxdτ,νy=y¨d−ayχ10−Δ^y−e˙y2−γykyγysigne˙y−τ1yσy−τ2ysignσy,−β1yσy1/2signσy−β2y∫otsignσydτ,U1=mCχ1Cχ3z¨d+g−azχ12−Δ^z−e˙z2−γzkzγzsigne˙z−τ1zσz−τ2zsignσz−β1zσz1/2signσz−β2z∫otsignσzdτ,Remark 1.
Equation (24) shows that the proposed control law takes into consideration the estimated disturbances Δ^ℏ, thus improving the controller robustness. Specifically, the observer gives a real-time estimation of the disturbance and updates the control law to compensate for the disturbance influence.Remark 2.
It should be mentioned that the selection of the controller gains plays a dominant role in the flight performance. An effective way to configure the controller parameters is to start by adjusting the parameters of the attitude controller separately. Then, we keep these gains and we configure the parameters of the position controller. In this work, all parameters were tuned by the trial and error method in the MATLAB/SIMULINK tool. Finally, we keep the best controller gains, which ensures the best consistency in the flight performance.


## 3.1. Nonlinear Disturbance Observer

It is well known that external disturbances are not measurable or are expensive to measure. An alternative method for collecting information on external disturbances is to use a disturbance observer, which aims to detect and identify the additive disturbances from measurable variables [41].Considering the vehicle dynamics exposed to additive disturbances (equation (2)), a nonlinear DO can be designed as [42]:(6)z˙i=−Lizi−LiLiχi+1+Aiχ+BiχUi,Δ^i=zi+Liχi+1,where Li, zi, and Δ^i symbolize the observer gain, the observer’s internal state, and the estimation of the disturbance, respectively. χi+1=Φ˙,Θ˙,Ψ˙,x˙,y˙,z˙ correspond to the vehicle’s angular and translational velocities.With the appropriate configuration of the observer gainLi the error of observation ei=Δ^i−Δi will vanish asymptotically [42, 43]. Thus, the disturbances can be correctly estimated, that is Δ^i≡Δi.


## 3.2. Disturbance Observer-Based Nonsingular Terminal Sliding Mode Attitude-position Control of the Quadrotor UAV

For the model of the quadrotor vehicle given in (2), the tracking errors are defined as follows:(7)eΦ=χ1−Φd,eΘ=χ3−Θd,eΨ=χ5−Ψd;ex=χ7−xd,ey=χ9−yd,ez=χ11−zd.In order to achieve fast finite-time convergence for the position and attitude dynamics, nonsingular terminal sliding surfaces are selected as follows [44]:(8)σΦ=eΦ+κΦe˙ΦγΦsigne˙Φ,σΘ=eΘ+κΘe˙ΘγΘsigne˙Θ,σΨ=eΨ+κΨe˙ΨγΨsigne˙Ψ;σx=ex+κxe˙xγxsigne˙x,σy=ey+κye˙yγysigne˙y,σz=ez+κze˙zγzsigne˙z.Where κℏ are positive constants, and 1 <γℏ<2.The first-time derivative of the sliding surfaces can be given by the following equations:(9)σ˙Φ=e˙Φ+κΦγΦe˙ΦγΦ−1e¨Φ,σ˙Θ=e˙Θ+κΘγΘe˙ΘγΘ−1e¨Θ,σ˙Ψ=e˙Ψ+κΨγΨe˙ΨγΨ−1e¨Ψ.(10)σ˙x=e˙x+κxγxe˙xγx−1e¨x,σ˙y=e˙y+κyγye˙yγy−1e¨y,σ˙z=e˙z+κzγze˙zγz−1e¨z.Substituting the second-time derivative of the tracking errors into equations (9) and (10), we obtain the following equation:(11)σ˙Φ=e˙Φ+κΦγΦe˙ΦγΦ−1a1Φχ4χ6+a2Φχ4+a3Φχ22+ΒΦUΦ+Δ^Φ−Φ¨d,σ˙Θ=e˙Θ+κΘγΘe˙ΘγΘ−1a1Θχ2χ6+a2Θχ2+a3Θχ32+ΒΘUΘ+Δ^Θ−Θ¨d,σ˙Ψ=e˙Ψ+κΨγΨe˙ΨγΨ−1a1Ψχ2χ4+a2Ψχ62+ΒΨUΨ+Δ^Ψ−Ψ¨d,σ˙x=e˙x+κxγxe˙xγx−1U1mCχ1Sχ3Cχ5+Sχ1Sχ5+axχ8+Δ^x−x¨d,σ˙y=e˙y+κyγye˙yγy−1U1mCχ1Sχ3Sχ5−Sχ1Cχ5+ayχ10+Δ^y−y¨d,σ˙z=e˙z+κzγze˙zγz−1U1mCχ1Cχ3−g+azχ12+Δ^z−z¨d.Where Δ^ℏ is the estimate of Δℏ.Based on the sliding mode principle, the structure of the control law is as follows:(12)U=Ueq+Usw,where Ueq is the equivalent control that ensures the stability when the system is on the sliding surface σℏ=0, and Usw is the switching control that ensures the reachability of the predesigned sliding surface.The equivalent control law can be obtained by forcingσ˙ℏ=0; then, the control equations for the attitude and position are respectively given by equations (13) and (14):(13)UΦeq=1ΒΦΦ¨d−a1Φχ4χ6−a2Φχ4−a3Φχ22−Δ^Φ−e˙Φ2−γΦkΦγΦsigne˙Φ,UΘeq=1ΒΘΘ¨d−a1Θχ2χ6−a2Θχ2−a3Θχ32−Δ^Θ−e˙Θ2−γΘkΘγΘsigne˙Θ,UΨeq=1ΒΨΨ¨d−a1Ψχ2χ4−a2Ψχ62−Δ^Ψ−e˙Ψ2−γΨkΨγΨsigne˙Ψ,(14)νxeq=x¨d−axχ8−Δ^x−e˙x2−γxkxγxsigne˙x,νyeq=y¨d−ayχ10−Δ^y−e˙y2−γykyγysigne˙y,U1eq=mCχ1Cχ3z¨d+g−azχ12−Δ^z−e˙z2−γzkzγzsigne˙z.In order to reduce the effect of disturbances and parameter variations, a switching control based on the constant plus proportional reaching law is designed as follows:(15)UΦsw=1ΒΦ−τ1ΦσΦ−τ2ΦsignσΦ,UΘsw=1ΒΘ−τ1ΘσΘ−τ2ΘsignσΘ,UΨsw=1ΒΨ−τ1ΨσΨ−τ2ΨsignσΨ,(16)νxsw=−τ1xσx−τ2xsignσx,νysw=−τ1yσy−τ2ysignσy,U1sw=mCχ1Cχ3−τ1zσz−τ2zsignσz,τ1ℏ and τ2ℏ are positive constants.Using equations (13)–(16), the disturbance observer-based nonsingular terminal SMC for the quadrotor attitude and position can be formulated as follows:(17)UΦ=1ΒΦΦ¨d−a1Φχ4χ6−a2Φχ4−a3Φχ22−Δ^Φ−e˙Φ2−γΦkΦγΦsigne˙Φ−τ1ΦσΦ−τ2ΦsignσΦ,UΘ=1ΒΘΘ¨d−a1Θχ2χ6−a2Θχ2−a3Θχ32−Δ^Θ−e˙Θ2−γΘkΘγΘsigne˙Θ−τ1ΘσΘ−τ2ΘsignσΘ,UΨ=1ΒΨΨ¨d−a1Ψχ2χ4−a2Ψχ62−Δ^Ψ−e˙Ψ2−γΨkΨγΨsigne˙Ψ−τ1ΨσΨ−τ2ΨsignσΨ,(18)νx=x¨d−axχ8−Δ^x−e˙x2−γxkxγxsigne˙x−τ1xσx−τ2xsignσx,νy=y¨d−ayχ10−Δ^y−e˙y2−γykyγysigne˙y−τ1yσy−τ2ysignσy,U1=mCχ1Cχ3z¨d+g−azχ12−Δ^z−e˙z2−γzkzγzsigne˙z−τ1zσz−τ2zsignσz,Theorem 1.
Consider the roll subsystem. If the control equations are constructed as equation (17), then the finite-time convergence is ensured.Proof.
To prove the stability of the investigated system when using the established control law given by equation (17), we’ll be based on the Lyapunov theory. For this reason, let us consider the following Lyapunov function:(19)V=12σΦ2.
The derivative ofV is given by the following:(20)V˙=σΦσ˙Φ=σΦe˙Φ+κΦγΦe˙ΦγΦ−1a1Φχ4χ6+a2Φχ4+a3Φχ22+ΒΦUΦ+ΔΦ−Φ¨d.
Using equation (17), and after some calculation, V˙ becomes as follows:(21)V˙≤σΦ−τ1ΦσΦ−τ2ΦsignσΦ≤−τ1ΦσΦ2−τ2ΦσΦ≤0,
As the Lyapunov functionV is positive defined and its first-time derivative V˙ is negative; then, the closed-loop system stability of the roll motion is ensured.
The stability of the overall closed-loop system can be proved using the same procedure provided in Theorem1.


## 3.3. Disturbance Observer-Based Supertwisting Nonsingular Terminal Sliding Mode Control for the Quadrotor Position and Attitude

In order to improve the robustness and to vanish the effect of disturbances while reducing the chattering influence, a combination of the supertwisting algorithm with the NTSMC is established. Thus, the resulting disturbance observer-based supertwisting NTSMC (DO-STNTSMC) for the quadrotor system is designed as follows:(22)U=UNTSMC+UST,where UNTSMC is the NTSMC control laws given by equation (17) and (18). UST symbolizes the supertwisting algorithm defined in ref [45] as follows:(23)UST=−β1ℏσℏ1/2signσℏ−β2ℏ∫0tsignσℏdτ,withβ1ℏ and β2ℏ are positive constants.Using equation (17), (18) and (23), the proposed control laws can then be formulated as follows:(24)UΦ=1ΒΦΦ¨d−a1Φχ4χ6−a2Φχ4−a3Φχ22−Δ^Φ−e˙Φ2−γΦkΦγΦsigne˙Φ−τ1ΦσΦ−τ2ΦsignσΦ−β1ΦσΦ1/2signσΦ−β2Φ∫01signσΦdτ,Uθ=1ΒθΘ¨d−a1θχ2χ6−a2θχ2−a3θχ32−Δ^θ−e˙θ2−γθkθγθsigne˙θ−τ1θσθ−τ2θsignσθ−β1θσθ1/2signσθ−β2θ∫01signσθdτ,UΨ=1ΒΨΨ¨d−a1Ψχ2χ4−a2Ψχ62−Δ^Ψ−e˙Ψ2−γΨkΨγΨsigne˙Ψ−τ1ΨσΨ−τ2ΨsignσΨ−β1ΨσΨ1/2signσΨ−β2Ψ∫01signσΨdτ,νx=x¨d−axχ8−Δ^x−e˙x2−γxkxγxsigne˙x−τ1xσx−τ2xsignσx,−β1xσx1/2signσx−β2x∫otsignσxdτ,νy=y¨d−ayχ10−Δ^y−e˙y2−γykyγysigne˙y−τ1yσy−τ2ysignσy,−β1yσy1/2signσy−β2y∫otsignσydτ,U1=mCχ1Cχ3z¨d+g−azχ12−Δ^z−e˙z2−γzkzγzsigne˙z−τ1zσz−τ2zsignσz−β1zσz1/2signσz−β2z∫otsignσzdτ,Remark 1.
Equation (24) shows that the proposed control law takes into consideration the estimated disturbances Δ^ℏ, thus improving the controller robustness. Specifically, the observer gives a real-time estimation of the disturbance and updates the control law to compensate for the disturbance influence.Remark 2.
It should be mentioned that the selection of the controller gains plays a dominant role in the flight performance. An effective way to configure the controller parameters is to start by adjusting the parameters of the attitude controller separately. Then, we keep these gains and we configure the parameters of the position controller. In this work, all parameters were tuned by the trial and error method in the MATLAB/SIMULINK tool. Finally, we keep the best controller gains, which ensures the best consistency in the flight performance.


## 4. PIL Experiments

In this section, processor-in-the-loop tests are performed to validate the feasibility and outperformance of the proposed method compared to the nonsingular terminal sliding mode control (NTSMC). The physical parameters of the quadrotor used in this study are listed in Table1. The parameters of the proposed controller are gathered in Table 2. Also, the same parameters are used for the NTSMC controller for comparison.Table 1
Quadrotor’s parameters [46].
ParametersValuemkg0.74Ix=IyKg⋅m20.004IzKg⋅m20.0084ℓm0.21gms−29.81Kx,y,zN/m/s5.567e−5KΦ,Θ,ΨN/m/s5.567e−5bN.s22.9e−5dN⋅m⋅s21.1e−6JrKg⋅m22.838e−5Table 2
Controller’s parameters.
ParametersValueκx,y,z0.5γx,y,z,Φ,Θ,Ψ1.5τ1x,y,z50Lx,y50β1x,y,z,Φ,Θ,Ψ3κΦ,Θ,Ψ0.01τ1Φ,Θ,Ψ500τ2Φ,Θ,Ψ0.001Lz,Φ,Θ,Ψ6β2x,y,z,Φ,Θ,Ψ4Remark 3.
The procedure of the PIL experiments used to verify the feasibility of the proposed method is illustrated in Figure3. The disturbed quadrotor model (equation (1)) as well as the developed control laws (equation 24) are first coded, and then simulated in the MATLAB/Simulink environment. To execute the PIL experiments, the MATLAB toolbox “Support Package for PX4 Autopilots” has been used. This toolbox automates the generation of C++ code directly from a MATLAB/Simulink program, as well as its deployment to the target hardware. Using a USB cable, this toolbox also permits connectivity between the Pixhawk board and MATLAB/Simulink for test visualization and monitoring. During the PIL experiments, the generated code will run on the platform hardware while the disturbed quadrotor model is simulated in MATLAB/ Simulink. Specifically, the control inputs UΦ,UΘ,UΨ computed by the autopilot board are transmitted back to MATLAB/ Simulink to control the vehicle’s behavior.
To verify the merits and performance of the proposed approach, two flight scenarios for the path following are carried out. In the first, the aircraft is asked to track a square path under the influence of time-varying disturbances, while in the second, the vehicle is mandated to follow an eight-shaped trajectory. In this latter, in addition to the influence of disturbances, a random variation of the drag coefficients in the position and attitude is also considered.Figure 3
Flow chart of the PIL implementation process.


### 4.1. Flight Scenario 1: Robustness against Disturbances

In this flight test, the drone is commanded to track a square path under the influence of disturbances. The initial conditions of the vehicle’s state arexi,yi,zi=0,0,0m, Φi,Θi,Ψi=0,0,0rad.The results of path tracking obtained by the PIL implementations of the proposed control scheme in comparison with conventional NTSMC are illustrated in Figures4–9. The actual and targeted trajectories in the presence of additive disturbances are displayed in Figure 4. From this figure, it can be noticed that, in comparison with the NTSMC strategy, the proposed method can provide significantly enhanced tracking performance. From the zoomed area in Figure 4, it is obvious that the proposed method compensates for the influence of disturbances and tracks perfectly the desired trajectories with reduced tracking errors. Attitude response is illustrated in Figure 5, where the reference attitude angles have been successfully reached by the suggested method, despite the influence of external disturbances. The accuracy of the proposed method is evaluated in more detail on the basis of the tracking errors between the commanded and real trajectories (see Figure 6). It can be observed that the errors converge to zero within a short time compared to the other strategy. The generated input commands are illustrated in Figure 7. It is clear that these signals have smooth responses.Figure 4
Quadrotor’s positionx,y,z in the presence of complex disturbances.Figure 5
Quadrotor’s attitude in the presence of complex disturbance.Figure 6
Evolution of the tracking errors in the first scenario.Figure 7
Control effort and torques.Figure 8
Estimation of external disturbances.Figure 9
Trajectory tracking in 2D space.The estimations of the disturbances affecting the position and attitude dynamics are displayed in Figure8. The disturbances are estimated exactly, which allows an affective suppression of their negative influence. The way in which the quadrotor tracks the prescribed path in the x−y plane for the investigated controllers is illustrated in Figure 9. The results indicate that by using the suggested method, the reference path can be tracked in a more precise and efficient way compared to the other method.


### 4.2. Flight Scenario 2: Robustness against Disturbances and Uncertain Drag Coefficients

In this scenario, the flight test is conducted under the influence of disturbances. In addition, a random variation of the drag coefficients for the translational and rotational motions is also considered to simulate real outdoor flight. The profile of the drag coefficients is illustrated in Figure10.Figure 10
Variation of random drag coefficients.The flight mission consists of tracking an eight-shaped trajectory while encountering additive disturbances. The desired time-varying trajectory of the position and heading angle is given by:(25)xd=0,m,tε0,10,21−cos0.2∗t−10,m,tε0,50;yd=0,m,tε0,10,2sin0.4∗t−10m,tε10,50;zd=5m,Ψd=0rad.The results of PIL implementation are given in Figures11–16. It can be seen that the proposed control scheme succeeded in maintaining the position and position of the quadrotor system in stable states. The reference and actual state of the quadrotor position are displayed in Figure 11, from which we can observe that the proposed DO-STNTSMC method effectively drives the vehicle toward the planned path more accurately compared to the other method. Note that the proposed controller is able to successfully compensate for the negative impact of time-varying disturbances and uncertain drag coefficients since the trajectory described by the quadrotor with the proposed flight controller is closer to the desired trajectory. Moreover, the resulting tracking errors are smaller compared to the NTSMC method (see Figure 12). This improved robustness of the proposed control scheme is due to the integration of the DO, which can provide an accurate online estimation of the unknown disturbances. Specifically, the profiles of the real and estimated disturbances are illustrated in Figure 13. This one confirms the judicious choice and the performance of the adopted DO. The time history of the quadrotor orientation Φ,Θ,Ψ is depicted in Figure 14. It can be concluded that the proposed controller ensures the accurate tracking of the desired attitude angles. The generated control signals are plotted in Figure 15; again, these inputs are smooth without chattering influence. The 3D path following of the eight-shaped trajectory using both controllers is portrayed in Figure 16. In Similarity to the first flight test, it can be seen that the synthesized method is able to overcome the effect of complex uncertain drag coefficients and external disturbances and rather follow the programmed path perfectly compared to the existing strategy.Figure 11
Response curves of the quadrotor’s positionx,y,z in the second scenario.Figure 12
Evolution of the tracking errors in the second scenario.Figure 13
Estimation of the disturbances affecting the quadrotor position and attitude.Figure 14
Time response evaluation of the quadrotor’s attitude in the second scenario.Figure 15
Control effort and torques.Figure 16
Trajectory tracking in 3D space.Finally, from the obtained results, it has been asserted that the stability of the proposed method is still maintained even under severe flight conditions. Moreover, the proposed controller remarkably attenuates the impact of uncertain drag coefficients and complex disturbances and tracks precisely the time-varying trajectories.


## 4.1. Flight Scenario 1: Robustness against Disturbances

In this flight test, the drone is commanded to track a square path under the influence of disturbances. The initial conditions of the vehicle’s state arexi,yi,zi=0,0,0m, Φi,Θi,Ψi=0,0,0rad.The results of path tracking obtained by the PIL implementations of the proposed control scheme in comparison with conventional NTSMC are illustrated in Figures4–9. The actual and targeted trajectories in the presence of additive disturbances are displayed in Figure 4. From this figure, it can be noticed that, in comparison with the NTSMC strategy, the proposed method can provide significantly enhanced tracking performance. From the zoomed area in Figure 4, it is obvious that the proposed method compensates for the influence of disturbances and tracks perfectly the desired trajectories with reduced tracking errors. Attitude response is illustrated in Figure 5, where the reference attitude angles have been successfully reached by the suggested method, despite the influence of external disturbances. The accuracy of the proposed method is evaluated in more detail on the basis of the tracking errors between the commanded and real trajectories (see Figure 6). It can be observed that the errors converge to zero within a short time compared to the other strategy. The generated input commands are illustrated in Figure 7. It is clear that these signals have smooth responses.Figure 4
Quadrotor’s positionx,y,z in the presence of complex disturbances.Figure 5
Quadrotor’s attitude in the presence of complex disturbance.Figure 6
Evolution of the tracking errors in the first scenario.Figure 7
Control effort and torques.Figure 8
Estimation of external disturbances.Figure 9
Trajectory tracking in 2D space.The estimations of the disturbances affecting the position and attitude dynamics are displayed in Figure8. The disturbances are estimated exactly, which allows an affective suppression of their negative influence. The way in which the quadrotor tracks the prescribed path in the x−y plane for the investigated controllers is illustrated in Figure 9. The results indicate that by using the suggested method, the reference path can be tracked in a more precise and efficient way compared to the other method.


## 4.2. Flight Scenario 2: Robustness against Disturbances and Uncertain Drag Coefficients

In this scenario, the flight test is conducted under the influence of disturbances. In addition, a random variation of the drag coefficients for the translational and rotational motions is also considered to simulate real outdoor flight. The profile of the drag coefficients is illustrated in Figure10.Figure 10
Variation of random drag coefficients.The flight mission consists of tracking an eight-shaped trajectory while encountering additive disturbances. The desired time-varying trajectory of the position and heading angle is given by:(25)xd=0,m,tε0,10,21−cos0.2∗t−10,m,tε0,50;yd=0,m,tε0,10,2sin0.4∗t−10m,tε10,50;zd=5m,Ψd=0rad.The results of PIL implementation are given in Figures11–16. It can be seen that the proposed control scheme succeeded in maintaining the position and position of the quadrotor system in stable states. The reference and actual state of the quadrotor position are displayed in Figure 11, from which we can observe that the proposed DO-STNTSMC method effectively drives the vehicle toward the planned path more accurately compared to the other method. Note that the proposed controller is able to successfully compensate for the negative impact of time-varying disturbances and uncertain drag coefficients since the trajectory described by the quadrotor with the proposed flight controller is closer to the desired trajectory. Moreover, the resulting tracking errors are smaller compared to the NTSMC method (see Figure 12). This improved robustness of the proposed control scheme is due to the integration of the DO, which can provide an accurate online estimation of the unknown disturbances. Specifically, the profiles of the real and estimated disturbances are illustrated in Figure 13. This one confirms the judicious choice and the performance of the adopted DO. The time history of the quadrotor orientation Φ,Θ,Ψ is depicted in Figure 14. It can be concluded that the proposed controller ensures the accurate tracking of the desired attitude angles. The generated control signals are plotted in Figure 15; again, these inputs are smooth without chattering influence. The 3D path following of the eight-shaped trajectory using both controllers is portrayed in Figure 16. In Similarity to the first flight test, it can be seen that the synthesized method is able to overcome the effect of complex uncertain drag coefficients and external disturbances and rather follow the programmed path perfectly compared to the existing strategy.Figure 11
Response curves of the quadrotor’s positionx,y,z in the second scenario.Figure 12
Evolution of the tracking errors in the second scenario.Figure 13
Estimation of the disturbances affecting the quadrotor position and attitude.Figure 14
Time response evaluation of the quadrotor’s attitude in the second scenario.Figure 15
Control effort and torques.Figure 16
Trajectory tracking in 3D space.Finally, from the obtained results, it has been asserted that the stability of the proposed method is still maintained even under severe flight conditions. Moreover, the proposed controller remarkably attenuates the impact of uncertain drag coefficients and complex disturbances and tracks precisely the time-varying trajectories.


## 5. Experimental Results

The proposed control scheme was tested on a lab quadrotor prototype. The experimental setup illustrated in Figure17 consists of an X450 quadrotor, a ground station, a fly sky remote controller, and an open-source Pixhawk autopilot. The Pixhawk board is used to generate the input commands to adjust the angular speeds of the four propulsion systems. An inertial measurement unit (IMU) integrated into the Pixhawk board is used to measure the vehicle orientation as well as the angular rate. Besides, the experimental tests are conducted using the external mode of Simulink, which allows real-time visualization of flight data as well as tuning of the controller’s parameters.Figure 17
Experimental setup [47].To validate the antidisturbance ability of the suggested control method, the experimental tests are conducted under the impact of wind gusts generated by an eclectic fan.The time histories of the attitude tracking are plotted in Figure18 and the responses of the generated control signals are illustrated in Figure 19. As can be observed from Figure 18, the suggested controller can produce sufficiently good tracking performance and can keep all the attitude angles Φ,Θ,Ψ tracking their desired time-varying trajectories with high accuracy. Moreover, despite the measurement noises and wind disturbances, the generated control signals have reduced chattering influence, which confirms the theoretical results.Figure 18
Experimental quadrotor attitude.Figure 19
Control signals.


## 6. Conclusion

In this research work, a robust control law is designed for a perturbed quadrotor to track multiple desired trajectories under the influence of uncertainties/disturbances. The nonlinear dynamic model of the quadrotor system is established based on the Newton–Euler principle; then, the appropriate state space representation is defined. The proposed flight control system consists of a perturbation estimator combined with a finite-time control strategy. A nonlinear DO is first conceived to estimate the unknown uncertainties and disturbances, which can effectively remove the negative impact caused by wind gusts. In addition, a supertwisting algorithm combined with a NTSMC is developed with the aims of enhancing the path following accuracy, reducing the tracking errors and improving the system robustness. The PIL implementations were performed to validate the feasibility of the proposed method. The obtained results demonstrate the superiority of the suggested controller compared to the NTSMC method. Furthermore, the advantages of the proposed method are validated experimentally in a lab quadrotor system. The following points will be investigated in our future research: one is to validate the synthetized controller in outdoor flight. Another is to design a state estimator to eliminate the requirement for full-state measurements. The adaptive version of the proposed controller will be also investigated in our future research.



---

*Source: 4581165-2022-08-10.xml*