Adaptive Super-Twisting Controller Design for Accurate Trajectory Tracking Performance of Unmanned Aerial Vehicles

—In this paper, an adaptive super-twisting controller is designed for an agile maneuvering quadrotor unmanned aerial vehicle to achieve accurate trajectory tracking in the presence of external disturbances. A cascaded control architecture is designed to determine the desired accelerations using the proposed controller and subsequently used to compute the desired orientation and angular rates. The ﬁnite-time convergence of sliding functions and closed-loop system stability are analytically proven. Furthermore, the restrictive assumption on the maximum variation of the disturbance is relaxed by designing a gain adaptation law and low-pass ﬁltering of the estimated equivalent control. The proper selection of design parameters is discussed in detail. Finally, the effectiveness of the proposed method is evaluated by high-ﬁdelity software-in-the-loop simulations and validated by experimental studies.

Nonetheless, whilst onboard low-level controllers show satisfactory tracking performance for low-speed operations, their performance deteriorates during agile maneuvers, considerably in the presence of disturbances [1].Autopilot control usually adopts linear controller structures [3].However, the underactuated and highly nonlinear dynamics of quadrotor UAVs impose challenges in the tracking performance with guaranteed stability for linear controllers [4].Moreover, the coupled translational and rotational dynamics cause most autopilot controllers to under-perform in practice, especially for agile maneuvers [1], [5], [6].Furthermore, the effects of disturbances, e.g., wind, and model uncertainty are inevitable and significant, as these are reported in some works with the experimental analysis [7].
The finite-time convergence, attenuation of disturbances and uncertainty, and small tracking errors for agile maneuvers are the main reported objectives for UAV controller design, taking into account the nonlinear underactuated coupled dynamics [7].To address these issues, many modern nonlinear controllers were proposed in the last decade.A feedforward/feedback control architecture is proposed in [8].Neural network-based feedback control is designed in [9], estimating the unknown disturbances.A set-point tracking problem is solved in [10], using a robust-guaranteed cost controller.Both structured and unstructured uncertainties are tackled by the design of a nonlinear internal model control approach in [11].The nonlinear dynamic inversion method is used in [12] considering wind gusts.A nonsmooth backstepping approach is adopted in [13] for a formation control design.Adaptive feedback control is designed in [14], [15], [16] to reduce the effects of uncertain dynamics and disturbances in real-time.In these works, however, fast finite-time convergence is not achieved, which is critical for UAV agile maneuvering.
To tackle these problems, Sliding Mode Control (SMC) has been shown to exhibit salient features for the attenuation of disturbances and uncertainty, and small tracking errors with fast finite-time convergence [17], [18].However, traditional SMC methods present asymptotic exponential convergence.Moreover, the associated chattering issue is considerable [19], [20].Therefore, fast finite-time convergence SMC methods have been proposed [21], [22].In [21] adaptive SMC for finitetime stabilization is designed with parametric uncertainties.In [22] a continuous multivariable attitude control is designed for finite-time convergence.An adaptive backstepping global SMC is designed in [23] for finite-time stabilization of attitude and position, with input saturation, model uncertainty, and wind perturbation.In [24] a finite-time robust constrained SMC is proposed.Among all the SMC methods, Super-Twisting Control (STC) has the capacity to guarantee fast finite-time convergence as well as to mitigate the chattering issue [25], [17].The latter can be further improved by using adaptive gains in the super-twisting algorithm [26].The STC method has been applied for UAV control design in some works, e.g., [27], [28], [29].However, the restrictive assumptions, chattering issues, the complexity of the final scheme, and lack of experimental evaluations expose practical limitations.
Motivated by these considerations, in this work, an Adaptive Super-Twisting Control (ASTC) is designed for the agile maneuvering of a quadrotor UAV under external disturbances, taking the nonlinear underactuated dynamics into account; in contrast to some works, e.g., [5], [6], [30], where a linearized model is considered.finite-time convergence and stability are proven, outperforming some works, e.g., [12], [14], [15], [16].Then, the UAV's thrust and orientation are computed, and, the desired angular velocity is designed.The main contributions of this paper can be summarized as follows.
i) The adaptive laws are designed to adjust the ASTC gains to reduce conservatism on the disturbance upper bound, and chattering issues associated with the SMC method.This prevails in some existing works, e.g., [19], [20].Furthermore, the adaptive gains are proven to be bounded, in contrast to, e.g., [28, eq.48],where the adaptive gain can grow unboundedly, which leads to saturation.ii) A low pass filter is implemented in the designed ASTC.
As analytically proven, this low-pass filter captures the variation of the disturbance.This is in contrast to some work, e.g., [28], where extra adaptive laws are included, which might lead to computational complexity.Moreover, the assumption on the boundedness of the disturbance is removed, which is presumed in some works [21], [22], [28].Also, the assumption on the known time derivative of disturbance is relaxed, via the provided the algorithm for the proper selection of the design parameters.iii) High-fidelity comparative Software-In-The-Loop (SITL) simulations in Gazebo and experimental analysis are conducted, which demonstrates accurate tracking performance.This highlights the applicability of the proposed method in practice, compared to some works, e.g., [17], [21], [18], [20], [23], [24], in which only numerical simulations are conducted.
The rest of the paper is organized as follows.In Section II, the UAV nonlinear model is presented with some technical preliminaries.The control design and the stability analysis are presented in Section III.The Gazebo simulation and the experimental results are evaluated in Section IV.Finally, some concluding remarks are given in Section V.
In the paper, the following notations are used.An underlined letter, e.g., x, represents a vector.Also, R and R + are the set of the real numbers and positive real numbers, respectively.SO(3) represents special orthogonal matrices, i.e., SO(3) = {R|R ∈ R 3×3 , R T R = RR T = I 3 , det(R) = 1}.|x| denotes the absolute value of x.Moreover, g = 9.81(m/s 2 ) represents gravity.Finally, × is the cross product of vectors.

II. MODEL DESCRIPTION AND TECHNICAL PRELIMINARIES
The dynamics of a quadrotor UAV can be presented as [3] ẋ where, T ∈ R 3 are position and velocity vectors of the center of gravity, respectively, in the inertial frame, and ω(t) ∈ R 3 is the angular velocity in the body frame.M is the known mass and J ∈ R 3×3 is the unknown mass moment inertia.The quantities Φ(t) = [θ (t), φ (t), ψ(t)] T ∈ R 3 is the Euler angle vector and F(t) = [0, 0, f (t)] T ∈ R 3 , both in the body frame.θ (t), φ (t) and ψ(t) denote pitch, roll and yaw angles, respectively.f (t) ∈ R + is the thrust and g = [0, 0, g] T ∈ R 3 is the vector of gravity in the inertial frame whilst τ(t) ∈ R 3 is the torque vector in the body frame.Moreover, f d (•) ∈ R 3 and τ d (•) ∈ R 3 are unknown disturbances affecting the translational and rotational dynamics, respectively.The rotation matrices R(t) ∈ SO(3) and R q (t) ∈ SO(3) are defined as [31]: where, C α and S α denote cosine and sine of α(t), respectively.For the sake of notational simplicity, we present the translational dynamics, i.e., (1b), as where, Assumption 1.It is assumed that the UAV's states x, v, and Φ are available for control design [32].Furthermore, it is assumed that the time derivative of f 1,i is bounded as ḟ1,i (•) ≤ a 1,i and f1,i (•) ≤ a 2,i for i ∈ {x, y, z}, where a 1,i and a 2,i are positive constants.
Considering (1), in this paper, we aim to design the desired thrust f (t), desired Euler angle 3 and desired angular velocity ω d (t), to steer the UAV position x(t) towards the known desired trajectory finite-time, for any initial conditions x(0).For this, we design u(t) in (3), and accordingly, the desired thrust f (t) and the orientation Φ d (t) are obtained.
Remark 1.In Assumption 1, the UAV's states are assumed to be known, via onboard sensors, the inertial measurement unit and extended Kalman filter or a motion capture system [5].However, irrespective of how the quantities are obtained, the measurement errors can be encapsulated in the lumped disturbance in (1).This further motivates the use of ASTC for compensating for the effects of these errors.Also, given the nature of the external disturbance, it is reasonable to assume its time derivatives are bounded [33].This is a relaxed condition, in comparison to the assumption of bounded disturbance norms, used in some works [21], [22], [28].
The following lemmas are used in the design procedure.Lemma 1. [34] Consider the dynamics under the assumption that ḋ ≤ d 1 and d ≤ d 2 , where d 1 and d 2 are positive constants.For any given x 1 (0), there exists a sufficiently large λ ≥ 0, such that, provided k(t) ≥ d 1 , both x 1 and ẋ1 converge to zero in finite-time, i.e., it induces a second order sliding mode, and w eq (t) = ḋ(t), where w eq (t) is the lowpass filtered version of w(t) = k(t)sign (x 1 (t)).The solution of (4) needs to be understood in a Filippov sense.
III. CONTROLLER DESIGN To construct the control, we define sliding surfaces as where is the desired linear velocity vector.In ( 5), the scalars λ x , λ y and λ z ∈ R + are design parameters.Now, we design the control u(t) in (3) as for i ∈ {x, y, z}, where k 1,i ∈ R + are the design parameters, and where a d (t) = [a d,x (t), a d,y (t), a d,z (t)] T = ẍd (t) ∈ R 3 is the desired linear acceleration vector, with the adaptive laws ẇi,eq (t) = 1 where 0 < τ c,i < 1 is constant, and r 0,i , γ i ∈ R + are design parameters.The signals δ i (t) and e i (t) in (8b) and (8c) are defined as respectively, where 0 < α i < 1 is selected sufficiently small, ε i ∈ R + is selected sufficiently large and q i > 1 to ensure d ŵi,eq (t)/dt ≤ q i a 2,i .
Remark 3. Regarding the design parameters, the following points are worth noting.In (5), λ i governs the exponential convergence rate.However, λ i needs to be selected carefully, to ensure a sufficiently fast convergence to zero on the sliding surface, without inducing chattering.In (6a), k 1,i should be selected sufficiently large to comply with the condition in Lemma 1, which affects the speed of reaching the sliding surface.The scalar τ c,i is the low pass filter time constant, which is to be selected small enough to capture the behaviour of the input signal.In (8b), r 0,i governs the convergence time.Therefore, it can be selected primarily to have fast convergence.The scalar α i must be sufficiently small and ε i is sufficiently large such that ḟ1,i (•) /α i + ε i ≥ a 1,i .Finally, q i > 1 is the user-defined safety margin [35], [26].
As shown in Lemma 4, the equivalent control approaches to the time derivative of the disturbance, after the sliding surface is reached.Therefore, the time derivative of the equivalent control renders the second time derivative of disturbance.This justifies the inclusion of a 2,i in (9b).Considering Lemma 4, for finite-time convergence of σ i (t) and σi (t) to zero, it is required that k 2,i (t) ≥ a 1,i .This is guaranteed by the adaptive laws (8b) and (8c), proven in Lemma 5.
Lemma 5.For i ∈ {x, y, z}, the adaptive laws (8b) and (8c), under the condition d ŵi,eq (t)/dt ≤ q i a 2,i , force δ i (t) and e i (t), defined in (9), to zero in finite-time, which can be made arbitrarily small by the proper selection of the design parameters.Furthermore the gain k 2,i (t) remains bounded.This further yields k 2,i (t) ≥ a 1,i , for sufficiently small 0 < α i < 1 and sufficiently large ε i ∈ R + .
Proof.Using (8b), (8c) and ( 9), one can obtain dt . Furthermore, by considering that d ŵi,eq (t)/dt ≤ q i a 2,i , it can be shown that Now, we define a positive definite Lyapunov function as Using Lemma 3, it is readily shown that Then, considering Lemma 2, for any initial condition V (0), δ i (t) and e i (t) converge to zero in finite-time smaller than T (V (0)) = 2V (0)/r 0,i .Furthermore, since r 0,i is a design parameter, the convergence time can be made arbitrarily.Also note that since e i (t) is bounded, from (9b), r i (t) is bounded.This implies the boundedness of k 2,i (t), considering (8c).finite-time convergence to zero implies δ i (t) = 0 for t ≥ T .Therefore, considering (9a) and the result of Lemma 4, there exist a sufficiently small 0 < α i < 1 and sufficiently large Now, the main properties of the proposed controller (6) are summarized in Theorem 1.
Theorem 1.Consider the UAV translational dynamics (1a) and (1b), represented as (3), subject to the lumped disturbance vector f 1 (•) satisfying Assumption 1. Design the control law (6), for large k 1,i , i ∈ {x, y, z}, with the adaptive laws in (8), for a large constant q i > 1, small 0 < α i < 1 and large ε i ∈ R + .Then, for any initial condition x(0), the sliding surfaces (5) converge to zero in finite-time, which can be adjusted by the user, and the UAV's position x(t) is stable and exponentially converges to the desired trajectory x d (t).
Proof.As proven in Lemma 5, k 2,i (t) ≥ a 1,i for i ∈ {x, y, z}, is satisfied.Then, considering Lemma 4, the finite-time convergence of σ i (t) is guaranteed, which can be adjusted by proper selection of r 0,i .Consequently, considering (5), the exponential convergence of x(t) towards x d (t) is obtained.
Considering (9b), a 2,i is required to be known.Even though this can be numerically obtained in the implementation, in some cases a 2,i is unknown.This is studied in Theorem 2.
Theorem 2. In the case of unknown a 2,i , the adaptive law (8b) is reformulated as for i ∈ {x, y, z}, where δ 0,i is a design parameter satisfying . Under Assumption 1, using the control law in (6) with the adaptive laws (8a) and (8c), then the results of Theorem 1 are obtained.
As stated in Theorem 1 and Remark 3, the gain k 1,i , i ∈ {x, y, z}, is constant and is only required to be sufficiently large to maintain the sliding surface.However, as studied in [38], a large k 1,i might create chattering.On the other hand, in [39] it has been suggested to select the super-twisting gains as k 1,i = 1.5 f1,i and k 2,i = 1.1 f1,i , where | f 1,i | ≤ f1,i to reduce the chattering.This convention has been commonly used in literature.Therefore, we design the gain k 1,i as for i ∈ {x, y, z}.This makes the gain k 1,i large when the upper limit of the time derivative of the disturbance, estimated by k 2,i , is increasing.Otherwise, it is reduced and an unnecessary large value for k 1,i which might lead to chattering, is avoided.
It should be noted that, as proven in Lemma 5, the gain k 2,i remains bounded.Thus, the boundedness of gain k 1,i , given by ( 16), is guaranteed.Now, based on the designed u(t) in ( 6) and considering u(t) = R(t)F(t) = [u x (t), u y (t), u z (t)] T and (2a), the thrust f (t) and desired Euler angle T , for a given yaw angle ψ d (t), are obtained as respectively.Then, using (2b), the desired angular velocity ω d (t) is designed as where λ ω ∈ R + is a design parameter.The control design procedure is given in Algorithm 1.
Remark 4. The onboard controller computes desired angular rates using the error between the desired and actual Euler angles at the frequency of 250 Hz, using a proportional controller.The onboard angular rate controller is a PID that runs at 1000 Hz to compute a scaled τ(t) in the form of the motor speed commands 1 .The tracking performance and robustness of the onboard angular rate controller have been already proven [40].Additionally, the desired angular rate is also computed offboard using (18) at a frequency of 50 Hz and it is fed-forwarded to the onboard angular rate controller to improve tracking performance, as verified in Section IV.
Remark 5.The proposed controller can be readily extended for the attitude dynamics.However, the designed offboard controller can only run at a maximum frequency of 50-100 Hz.On the other hand, the desired torque τ(t) and the corresponding motor speed commands need to be computed at a high rate, e.g., 1000 Hz.Due to this, these control inputs are left to be computed by the available onboard controller.Select λ i , τ c,i , γ i , r 0,i , α i , ε i and q i , as per Remark Compute sliding surface σ i (t), as ( if a 2,i is known then Take integral of ( 8) and (6b), using ( Take integral of (8a), (8b), ( 15) and (6b), using ( Compute k 1,i (t) as in ( 16), Compute u i (t) as in (6a), 12: end for 13: Compute f (t) and Φ d (t), as in (17), for given ψ d (t), 14: Compute ω d (t) as in (18), 15: Compute motor speed commands using onboard angular rate control.

IV. SITL SIMULATION AND EXPERIMENTAL RESULTS
In this section, high-fidelity SITL simulations in Gazebo and experimental results are presented, to evaluate the performance of the proposed controller.

A. Validation methodology and setups
SITL simulation setup is shown in Fig. 1.This setup uses the same autopilot software and mavros interface with Matlab that we adopted for the experiments.It is worth noting that the computed f (t) is scaled to [0, 1], representing the UAV thrust range since the low-level control takes the normalized thrust to compute the motor speed.The scaling factor is obtained from Gazebo simulation by hovering the UAV at a fixed point.The control parameters are selected as λ i = 2, τ c,i = 0.02, γ i = 2, r 0,i = 0.0001, α i = 0.9, ε x = 0.005, ε y = 0.005, ε z = 0.01, q x a 2,x = 0.04, q y a 2,y = 0.04 and q z a 2,z = 0.01 for i ∈ {x, y, z}.The desired trajectories considered here are the circle and lemniscate ones, defined as x d (t) = [Rcos(2πt/T ), Rsin(2πt/T ), 1] T and x d (t) = [Rcos(2πt/T ), Rsin(πt/T )cos(2πt/T ), 1] T , respectively, with radius R and time period T .In the simulations, the disturbance in (1b), is modelled as where C p = 0.1 is the drag coefficient, and ρ = 1.225(kg/m 3 ) is the air density.Also, v x,w (t) = sin(0.75πt/T) and v y,w (t) = cos(0.75πt/T) denote the wind speed in the x and y directions, respectively.f d (•) represents the drag effects which depend on the wind speed [1].To evaluate the performance of the proposed ASTC for high-speed maneuvers of the UAV, the time period T of the desired trajectory is considered as a variable, defined as In simulations, the radius R is selected as 4m.The shortest time period is selected to be 3π, which corresponds to the maximum speed, reachable by the UAV.The desired yaw angle is defined as ψ d (t) = arctan(v y (t)/v x (t)).For the sake of brevity, and to compare the numerous results, the absolute tracking error is considered, as e abs (t) = x(t) − x d (t) .For the experimental validations, we use a QAV250 UAV, as shown in Fig. 2. The UAV experimental setup includes an onboard computer, an indoor positioning system, and a communication network, as illustrated in Fig. 3.The UAV is equipped with a Pixhwak CUAV V5 Nano autopilot, running the PX4 operating system.It also has a Raspberry Model B, serving as an onboard computer.UAV position and orientation are determined by the Optitrack system, which comprises 12 infrared cameras fixed to the ceiling at a height of around 5 m and a high-performance desktop computer running Motive software.The onboard computer runs roscore, as an interface for communication between the Optitrack system, the autopilot, and the ground control station (GCS).Position and orientation are obtained over WiFi and relayed to the mavros node, which are sent to the autopilot.The autopilot fuses these with the IMU's high-frequency acceleration, and angularrate measurements and sends estimated position, velocity and orientation in the inertial frame to mavros.The controller is implemented in MATLAB and has access to all ROS topics, and sends back the computed control inputs to the autopilot via mavros.The desired trajectories include circle and lemniscate paths with the same time period as in the Gazebo simulation.Due to limited space, the radius R is selected as 1m.Moreover, different external wind disturbances are applied using a fan with three different speeds, namely, no disturbance (S0), slow (S1), medium (S2) and high (S3) speeds.

B. Gazebo simulation results
The SITL simulation results are shown in Figs.4-13.To highlight the superiority of the designed ASTC with both adaptive k 1,i and k 2,i , for i ∈ {x, y, z}, the results of a STC and a traditional ASTC are also studied.For the STC, the gains are selected as k 1,i = 1.5 √ ∆ i and k 2,i = 1.1∆ i , [39], with ∆ x = ∆ y = 0.04 and ∆ z = 0.002 .It should be noted that these design parameters were obtained via trial and error to achieve the best tracking performance.For the traditional ASTC the same k 1,i is used while only k 2,i is adaptive.This causes a larger value for k 2,i (t), compared to the time derivative of the applied disturbance f d (•).This is more obvious considering the variation of k 2,z (t) in Figs. 6 and 11, when no exogenous disturbance is applied in z direction.Compared to the STC [27] and traditional ASTC [28], given in Figs.7 and 12, the fast convergence of the proposed controller is seen in the presence of disturbances.This represents one main characteristic of the proposed controller.Even though a similar tracking performance is achieved by using the STC and traditional ASTC at high-speed maneuvers, chattering is significant for these two controllers for low speeds, considering the Euler angles, shown in Figs. 8 and 13.The chattering issue is avoided by using the proposed controller for both low and high-speed situations.This further highlights the advantage of the proposed controller.

C. Experimental results
The experimental results are shown in Figs.14-19.The video is available following this link2 .For the sake of brevity the mean, standard deviation (std) and maximum (max) of e abs (t) for different disturbance levels and trajectories are summarized in Table I after sliding surface is reached.Considering Figs.14-19, the proposed controller is able to track accurately different trajectories with variable speed.Moreover, after the sliding surface is reached, the tracking error is kept within the region around zero, for different disturbances.This is further confirmed considering Table I.It is obvious that the metrics are kept the same for different speeds and disturbance levels, owing to the adaptive laws of the proposed controller, which automatically tune the gains for different situations.finite-time convergence and attenuation of the disturbance.For this, the desired thrust and orientation were designed.Moreover, the assumption on the variation of the disturbance was relaxed by designing a low pass filter.More importantly, the chattering problem was resolved by the designed adaptive laws to tune the controller gains.The effectiveness of the proposed controller was demonstrated using high-fidelity software-inthe-loop simulations and experimental studies.

Fig. 9 :
Fig. 9: UAV position for circle trajectory using the proposed controller.

Fig. 11 :
Fig. 11: Adaptive gains using the proposed controller for circle trajectory.

TABLE I :
Experimental e abs results in centimetres for different disturbances and trajectories.