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

In this paper, a robust ight 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 nite-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.e 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 ecacy of the suggested method. e merit of the proposed DO-STNTSMC is evaluated under multiple ight scenarios. e 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.


Introduction
Quadrotor drones have received an increasing demand for multiple tasks accomplishment in both civilian and military sectors. e potential applications of these aircraft include photography, re ghting, 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][2][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]. e 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][8][9], sliding mode control (SMC) [10][11][12][13], dynamic inversion [14], and adaptive control [15][16][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 ight 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][21][22][23][24] achieved good tracking accuracy with reduced chattering influence, finite-time control has not been considered in these articles. e 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. is 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.
e organization of the current paper is given as follows: Section 2, 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.

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 Figure 1. Two motors rotate clockwise, and the two others rotate counterclockwise to compensate for the antitorque. e 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- Based on the Newton-Euler principle, the perturbed nonlinear model of the quadrotor drone can be expressed as follows [37][38][39][40]: Journal of Robotics where Χ � (x, y, z) symbolizes the position coordinate vector, while Υ � (Φ, Θ, Ψ) is the orientation coordinates vector. J � diag(J x , J y , J z ) stands for the inertia moments, and J r is the rotor inertia. m represents the vehicle mass. g is the gravitational acceleration. K Z , Z � (x, y, z, Φ, Θ, Ψ) are the drag constants. U 1 corresponds to the lift force. U Φ , U Θ , and U Ψ are the command torques. Δ Z , Z � (x, y, z, Φ, Θ, Ψ) denotes the unknown exogenous perturbations.
[ � ω 1 − ω 2 + ω 3 − ω 4 , with ω i is the speed of motor i. e model of the aerial robot can be described by a second order nonlinear system which has the following form: with χ � [χ 1 , χ 2 , χ 3 , . . . , z] T stands for the state vector. A i (χ) and B i (χ) ≠ 0 are nonlinear functions. U i 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: C χ and S χ stand for the cos(χ) and sin(χ) functions, respectively. e 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: Using equation (4), the reference pitch Θ d and roll Φ d angles needed to accomplish the desired horizontal motions are calculated as follows [16]: Figure 1: Representation of the quadrotor UAV.

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. e control structure of the proposed method is schematically illustrated in Figure 2. A position controller is synthetized to drive the aircraft toward the desired locations (x d , y d , z d ) by providing adequate control signals (U 1 , ] x , ] y ). For the vehicle orientation, an attitude controller is used to timely track the reference attitude angles.
is controller generates the roll, pitch, and yaw torques (U Φ , U Θ , U Ψ ). e 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.

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]: where L i , z i , and Δ i symbolize the observer gain, the observer's internal state, and the estimation of the disturbance, respectively.
z correspond to the vehicle's angular and translational velocities.
With the appropriate configuration of the observer gain L i the error of observation e i � (Δ i − Δ i ) will vanish asymptotically [42,43]. us, the disturbances can be correctly estimated, that is Δ i ≡ Δ i .

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: In order to achieve fast finite-time convergence for the position and attitude dynamics, nonsingular terminal sliding surfaces are selected as follows [44]: Where κ Z are positive constants, and 1 < c Z < 2. e first-time derivative of the sliding surfaces can be given by the following equations: Substituting the second-time derivative of the tracking errors into equations (9) and (10), we obtain the following equation: Where Δ Z is the estimate of Δ Z . Based on the sliding mode principle, the structure of the control law is as follows: where U eq is the equivalent control that ensures the stability when the system is on the sliding surface (σ Z � 0), and U sw is the switching control that ensures the reachability of the predesigned sliding surface. e equivalent control law can be obtained by forcing _ σ Z � 0; then, the control equations for the attitude and position are respectively given by equations (13) and (14):

Journal of Robotics
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: τ 1Z and τ 2Z are positive constants.
Using equations (13)-(16), the disturbance observerbased nonsingular terminal SMC for the quadrotor attitude and position can be formulated as follows: Theorem 1. Consider the roll subsystem. If the control equations are constructed as equation (17), then the finitetime 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: e derivative of V is given by the following: Using equation (17), and after some calculation, _ V becomes as follows: As the Lyapunov function V is positive defined and its first-time derivative _ V is negative; then, the closed-loop system stability of the roll motion is ensured. e stability of the overall closed-loop system can be proved using the same procedure provided in eorem 1.

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. us, the resulting disturbance observer-based supertwisting NTSMC (DO-STNTSMC) for the quadrotor system is designed as follows: where U NTSMC is the NTSMC control laws given by equation (17) and (18). U ST symbolizes the supertwisting algorithm defined in ref [45] as follows: with β 1Z and β 2Z are positive constants. Using equation (17), (18) and (23), the proposed control laws can then be formulated as follows: Remark 1. Equation (24) shows that the proposed control law takes into consideration the estimated disturbances Δ Z , 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. en, 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.

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). e physical parameters of the quadrotor used in this study are listed in Table 1. e parameters of the proposed controller are gathered in Table 2. Also, the same parameters are used for the NTSMC controller for comparison.

Remark 3.
e procedure of the PIL experiments used to verify the feasibility of the proposed method is illustrated in Figure 3. e disturbed quadrotor model (equation (1)) as Table 1: Quadrotor's parameters [46].

Parameters
Value m(kg) 0.74   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. is 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 eightshaped 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.

Flight Scenario 1: Robustness against Disturbances.
In this flight test, the drone is commanded to track a square path under the influence of disturbances. e initial conditions of the vehicle's state are e results of path tracking obtained by the PIL implementations of the proposed control scheme in comparison with conventional NTSMC are illustrated in  e 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. e 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. e generated input commands are illustrated in Figure 7. It is clear that these signals have smooth responses. e estimations of the disturbances affecting the position and attitude dynamics are displayed in Figure 8. e disturbances are estimated exactly, which allows an affective suppression of their negative influence. e way in which the quadrotor tracks the prescribed path in the x − y plane for the investigated controllers is illustrated in Figure 9. e 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.

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. e profile of the drag coefficients is illustrated in Figure 10. desired time-varying trajectory of the position and heading angle is given by: e results of PIL implementation are given in Figures 11-16. It can be seen that the proposed control scheme succeeded in maintaining the position and position of the quadrotor system in stable states. e 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). is 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.
is one confirms the judicious choice and the performance of the adopted DO. e 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. e generated control signals are plotted in Figure 15; again, these inputs are smooth without chattering influence. e 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. 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.

Experimental Results
e proposed control scheme was tested on a lab quadrotor prototype. e experimental setup illustrated in Figure 17 consists of an X450 quadrotor, a ground station, a fly sky remote controller, and an open-source Pixhawk autopilot.
e 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.
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. e time histories of the attitude tracking are plotted in Figure 18 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.

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. e nonlinear dynamic model of the quadrotor system is established based on the Newton-Euler principle; then, the appropriate state space representation is defined. e 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.
e PIL implementations were performed to validate the feasibility of the proposed method. e 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. e 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. e adaptive version of the proposed controller will be also investigated in our future research.

Data Availability
Data will be available on reasonable request after the publication of this paper.

Conflicts of Interest
e authors declare that there are no conflicts of interest.