A Robust Fixed-Time Sliding Mode Control for Quadrotor UAV

: This paper proposes a robust algorithm based on a ﬁxed-time sliding mode controller (FTSMC) for a Quadrotor aircraft. This approach is based on Lyapunov theory, which guarantees system stability. Nonlinear error dynamics techniques are used to achieve accurate trajectory tracking in the presence of disturbances. The performance of the FTSMC is compared with the typical non-singular terminal sliding mode controller (NTSMC) to evaluate its effectiveness. The numerical results show that FTSMC is more efﬁcient than the typical NTSMC in disturbance reduction.


Introduction
UAVs (Unmanned Aerial Vehicles), also known as drones, have revolutionized the way in which various operations are carried out in different fields of industry.The ability of UAVs to fly at high altitudes and in hard-to-reach areas, combined with advanced sensor and camera technologies, allows inspection and surveillance tasks to be carried out with greater precision and safety [1,2].In the field of precision agriculture, UAVs can be used to obtain detailed information on crop conditions, enabling more efficient land and water management [3,4].
Moreover, UAVs are also used to create detailed maps of specific terrains and geographical areas, which is of great help in activities such as infrastructure planning and natural resource management [5,6].In natural disaster situations, UAVs can be used to carry out rapid and accurate assessments of damage and the needs of affected communities [7].
Furthermore, in the field of air transport of payloads, UAVs offer an economical and safe alternative for the delivery of supplies and materials to remote or inaccessible areas.In addition, the versatility and efficiency of UAVs make them indispensable tools in various areas of industry and society [8][9][10][11].The following are just a few examples.
Proportional-Integral-Derivative (PID) control is a control technique commonly used in industry.Its implementation requires several iterative tunings of its parameters.In a recent study [12], a nonlinear PID controller for total thrust and torques applied to follow a desired trajectory of the Quadrotor aircraft was proposed.
This robust controller is highly adaptable to different types of UAVs and offers a promising approach for controlling aerial vehicles that require fast, accurate, and robust responses in challenging and dynamic situations.
On the other hand, the work in [13] compared the tracking capability of three different controllers in the design of a flight controller for a V-tail Quadrotor aircraft.The controllers compared were proportional derivative (PD), PID and sliding mode controller (SMC).According to their simulation results, the PD controller presented a steady-state error that was not corrected, which could be problematic in applications requiring high precision.In contrast, the SMC allowed the Quadrotor aircraft to quickly converge to the desired point.
In this context, controllers based on sliding modes present an inherent phenomenon called chattering, which is a problem for engineers because it wears out and reduces the useful life of the actuators in a given process [14].This effect is characterized by rapid oscillations and high frequency in the control signal.In addition, this phenomenon can cause problems in the operation of the system, such as noise high-frequency generation and wear on mechanical components, as well as degradation of the accuracy of the system response in some cases.For this reason, chattering has been studied to find solutions to reduce this effect.
Among the solutions proposed to reduce chattering in sliding mode control systems are the use of filtering techniques, the implementation of soft control laws, the modification of the controller gain and the design of adaptive control algorithms.These solutions have proven to be effective in reducing chattering and improving control system performance [15].
In the case of UAVs, chattering can be especially critical because these systems often operate in variable conditions and dynamic environments.Therefore, it is important to consider effective solutions to reduce chattering in UAV control systems, which can improve the navigation accuracy and energy efficiency of the system.
Therefore, this research focuses on one of the controls that have been investigated in the literature to improve the accuracy and robustness of flight control for UAVs.In reference [16], an SMC approach based on a fixed-time disturbance observer is proposed to improve flight control in the presence of external disturbances.Similarly, reference [17] presents a backstepping-sliding mode control using a closed-loop identification for Quadrotor aircraft trajectory tracking.
However, the problem of finite-time tracking control has been considered in many types of research.In reference [18], the authors perform an altitude control for a Quadrotor aircraft using an integral slip control (ISM) approach which aims to improve the robustness and accuracy of the altitude controller.Something similar is used in reference [19], where a sliding mode control approach is also presented to improve the accuracy and robustness of attitude and altitude control for a Quadrotor aircraft, while in references [20,21], the author focuses on trajectory tracking control for a Quadrotor aircraft using an approach combining a dynamic surface controller (DSC) and an extended state observer (ESO).Then, in reference [22], an adaptive sliding mode controller approach is proposed to improve the accuracy of the path tracking with rejection of external disturbances.Furthermore, in reference [23], the authors propose a robust adaptive non-singular fast terminal sliding mode tracking control for an uncertain Quadrotor UAV subject to disturbances.
Similarly, an adaptive controller was used in reference [24] to adjust the parameters of the SMC in real time, further improving the system's ability to adapt to adverse environmental conditions.The SMC technique is used to improve the robustness and adaptability of flight control to external disturbances such as gusts of wind.
In the same way, reference [25] deals with the characteristic chatter phenomenon of slider mode control.The characteristic oscillation of this type of control can affect the trajectory following tracking, so a sliding mode controller with integral action is proposed to minimize the vibration and improve the trajectory-tracking accuracy of the UAV.
The approach proposed in reference [26] uses an improved sliding mode speed control that combines a smoothed switching function and a low-pass filter to attenuate noise and improve motor speed control accuracy, while in reference [27], a control method is proposed where the estimated angles converge to the desired value for the scope of the orientation and therefore execute the tracking of the vehicle position to the given reference.
Then, in reference [28] also uses an observer based on a sliding mode controller to stabilize a Quadrotor aircraft in hover flight in outdoor environment, while reference [29] uses an observer to estimate disturbances and a finite-time tracking control law to achieve robust trajectory tracking in an aerial vehicle.In addition, in reference [30] a robust control based on fixed-time sliding modes is also used to control the attitude of a Quadrotor aircraft in the presence of external disturbances.
The contribution of this article is the implementation of a control algorithm based on a fixed-time sliding mode controller (FTSMC) to improve trajectory-tracking errors to zero, providing robust results in the presence of external disturbances such as gusts of wind.
FTSMC is a control technique used in nonlinear dynamic systems such as Quadrotor aircraft that allows for reaching a stable control state at a fixed time.This technique uses a sliding surface to maintain the system in a steady state, even in the presence of disturbances or uncertainties in the system [31].
The FTSMC is an advantageous control algorithm to apply in Quadrotor aircraft due to its ability to provide robust and fast real-time control performance.This algorithm uses a control law based on a sliding surface to reduce the error between the desired output and the actual system output.In addition, this strategy reduces external disturbances and considers the non-modeling dynamics.
Therefore, FTSMC is a powerful control technique for Quadrotor aircraft that allows for achieving high precision and stability in the navigation and positioning of these unmanned aerial vehicles.
At the same time, the results obtained have shown that the implemented FTSMC provides robustness by tracking the trajectory more precisely to the desired reference with an improvement capacity for the rejection of external disturbances that affect the aerial vehicle.This proposed algorithm is developed using the nonlinear errors of the Quadrotor aircraft dynamics.Finally, the simulations obtained from the proposed control are compared with an NTSMC (non-singular terminal sliding mode controller) to verify its effectiveness and good performance of the robust control algorithm proposed in this paper.
This paper is organized as follows: Section 2 presents the dynamic model of the Quadrotor aircraft, Section 3 describes the stabilization of a robust algorithm, which is divided into two parts, Section 3.1 presents the desired modes for the Y-axis dynamics of the vertical displacement, and Section 3.2 presents the desired modes for the X-axis dynamics of the horizontal displacement; the comparison of the proposed control FTSMC with NTSMC and the numerical simulations is visualized in Section 4. Finally, the conclusions are presented in Section 5.

Quadrotor Aircraft Modelling
The Quadrotor aircraft shown in Figure 1, is an unmanned aerial vehicle that has become increasingly popular in recent years due to its versatility and ability to perform a wide variety of tasks.This type of drone uses four electric motors to generate the power needed to stay in the air and control its movement in different directions.
Each motor in the Quadrotor aircraft is responsible for generating a force known as Thrust, which allows the drone to stay in the air and move in different directions.The four motors work together to control the Yaw (vertical axis turn), Roll (horizontal axis turn), and Pitch (lateral axis turn) movements of the drone, allowing it to perform precise maneuvers and respond to instructions from the pilot or the automatic control system.
The control of the four motors in a Quadrotor aircraft is essential to achieve balance and stability in the air since any change in the speed or force of one of the motors directly affects the drone's movement in all directions.Therefore, precision and careful control of all four motors are critical to achieving stable and safe flight.
Currently, one of these types of aerial vehicles is the IMU, which uses GPS, lidar, etc.; this allows knowledge of the position and attitude.However, for UAV navigation to be accurate and efficient, it is necessary to have a geodetic frame of reference that allows the device to be in a three-dimensional coordinate system.
The Quadrotor aircraft shows the simplified model of [32], which satisfies the following perturbed dynamic equations: where u is the total thrust, τ θ , τ φ and τ ψ are the torques of rotational movements, m is the mass, I is the inertia moment, x is the horizontal displacement, y is the vertical displacement, z is the altitude displacement and g is the gravitational acceleration.Γ x , Γ y and Γ z represent the perturbations of the translational motions of the x, y and z axes; now in Γ θ , Γ φ and Γ ψ represent the perturbations of the rotational motions of the angles θ, φ and ψ.All perturbations are external.In this model, we do not contemplate perturbations in the translational dynamics (y − x) due to this being the main focus of analysis, since we propose to use visual information to obtain references (x, y); for this, we will have a value of Γ z ≈ 0, and later we will use GPS information to stabilize the z-axis.

Robust Stabilization
The altitude z can be stabilized by using the following thrust control input.
where r is defined as: where k z is a positive constant and z d is the desired altitude; notice from Equation (2) and the above that if |θ| < π 2 , then u > 0. The yaw angular position can be controlled by applying a sliding mode approximation, where k ψ ≥ |Γ ψ |, β and k ψ >0; thus, Equation (1) can be rewritten as: For the Y-axis, it is: Now for the Z-axis, we obtain: Subsequently, for the rotation angles we have:

Desired Modes for the y-Axis Dynamics of the Vertical Displacement
From Equation (5b), it follows that: where we have ÿ = tan φ d (g + r) + e y (g + r) + Γ y (8) and the nonlinear error is: In addition, tan φ d is considered as the desired virtual control input.
The following variable is defined.
with k y > 0 and after introducing Equation ( 8): in order to obtain the following expression.νy = −ν y + e y (13) where the error e y is: We proposed the desired virtual control input tan φ d such that: getting tan φ d .
From Equations ( 9), ( 14) and ( 16), it follows that: Differentiating the above: Differentiating again and introducing Equation (5b), it follows that: It is important to mention that Γy is the double derivative of the perturbation in the translational movement of y and Γ φ is the perturbation in the rotational movement of φ.Notice that the second-and third-order derivatives of r, x and ν x which appear above can be computed as a function of their first-order derivatives as follows.
In view of Equation ( 19), a sliding surface s ey is proposed: Then, we propose a Lyapunov function at Equation ( 23): Differentiating the above, we have V = ṡey = s ey ( ëy + β y ėy ), β y > 0 (25) The The corresponding gains of this axis are the same as in the following section.
Let us now obtain τ φ and add a sliding mode controller.
where δ y is external perturbation such that |Γ φ + Γy | < δ y for a given δ y > 0; then it follows that e y → 0 on a fixed-time and from Equation ( 13): It is worth noting that the X and Y trajectories will be used by artificial vision and then analyzed by applying a low-pass filter that will allow us to filter the input disturbance in the y-axis information.

Desired Modes for the x-Axis Dynamics of the Horizontal Displacement
From Equation (5a): Assuming that cos φ must have a value close to 0 because the y-axis is stabilized in a fixed-time, the Equation ( 29) is: Then, from Equation (5a) it follows that: where we obtain: and follows the same procedure presented in the previous subsection.The following variable is defined and it is added that k x > 0.
and also by defining the variable s x .
Subsequently, the same y-axis methodology is performed to obtain e x , ėx and ëx on the x-axis.
Differentiating the above: Differentiating again and introducing Equation (5a), it follows that: where Γx is the double derivative of the perturbation in the translational movement of x and Γ θ is the perturbation in the rotational movement of θ.In view of Equation ( 37), we propose a sliding surface s ey : Then, a Lyapunov function is proposed: Differentiating the above: The following sliding mode controller is proposed: Finally, we have that: where δ x is an external perturbation such that |Γ θ + Γx | < δ x for a given δ x > 0.

Numerical Simulation Results
In this section, the results obtained are validated by numerical simulations and a comparison is made with the proposed NTSMC algorithm.This will allow us to determine the efficiency and superiority of the trajectory-tracking controller by visualizing the fast response speed, high tracking accuracy and minimization of perturbation; the following controller is compared concerning our proposed algorithm.To verify the robustness of the proposed control algorithm, the Dryden model has been implemented in the simulations in order to recreate a real environment with gusts of wind that could affect the trajectory of the aerial vehicle.
The Dryden wind model has become a valuable tool in the development and testing of UAVs, as it allows engineers to study and better understand how wind affects vehicle behavior and stability in different situations.By creating scaled-down models of UAVs and testing them in wind tunnels, engineers can measure and analyze the aerodynamic forces acting on the vehicle in different wind conditions.
These tests allow engineers to make improvements to the UAV design to maximize stability and maneuverability, reduce energy consumption and improve flight efficiency and safety.Overall, the use of the Dryden wind model has become an essential tool in creating and improving UAVs, enabling the development of more advanced and effective aerial vehicles for a wide variety of applications [33].
Non-singular terminal mode sliding control (NTSMC) is a highly accurate and robust control technique that has been successfully used in a wide range of applications.NTSMC combines the advantages of sliding mode sliding control (SMC) and terminal mode control (TMC) to achieve accurate and fast control of dynamic systems.
Compared with conventional SMC, NTSMC has the advantage of avoiding the problem of the singularity phenomenon, which may occur when the system is close to its equilibrium point.In addition, NTSMC can guarantee the global convergence of the system to its equilibrium point, even when the system model is uncertain or nonlinear.
The NTSMC was published in reference [34], where a nonlinear dynamical system is expressed as follows: where x = [x 1 , x 2 ] T is the system state vector, f (x) is the smooth nonlinear function of x and g(x) represents the uncertainties and perturbations satisfying g(x) l g where l g > 0, and u is the scalar control input.
The proposed NTSMC model is described as follows: where β > 0 is a design constant, and p and q are positive odd integers, which satisfy the following condition: For system (43) with the NTSMC (44), the obtained control input is: where 1 < p/q < 2, η > 0; stability proof is shown in reference [34].Now, to represent the NTSMC control in a Quadrotor aircraft, the sliding variable sy is expressed as follows: Defining: differentiating twice: and from Equation (5b) and considering that r converges to 0 after a certain time.
Then, proposing φ d y as the virtual input of the system (50), ëy converges to 0 based on [34].
For the sliding variable, s φ is represented as: Now defining: and from Equation (6b): then, proposing φ d φ as the virtual input of the system (55).
It is important to clarify that ëφ converges to 0 based on reference [34]; we will use for Y-axis and pitch controls the same procedure used in the previous section for roll and X-axis control.
To evaluate the effectiveness, numerical results have been performed using simulation tools such as Matlab.In addition, we compare the proposed FTSMC with the typical NTSMC in simulations using the same parameter values.
The objective of the proposed control is to achieve precise performance of the Quadrotor aircraft in the position and attitude in different flight conditions.The simulation results show that the FTSMC can successfully regulate the aerial vehicle, even in the presence of disturbances, noise and parasite dynamics.The Table 1 shows the parameters and initial conditions.
It is important to emphasize that we use the same parameter values and perturbations for each of the controllers in order to obtain a better result in the comparison and to identify the superiority of our proposed control algorithm.
The trajectory tracking performance of the proposed fixed-time sliding mode control (FTSMC) method is compared with that of the non-singular terminal sliding mode control (NTSM).The results of the comparison of the FTSMC and NTSMC controllers are shown in Figures 2-5.
Figure 2a shows the convergence of the y axis displacement to the desired y d trajectory; the proposed FTSMC controller has a higher response, while the NTSMC controller lags by a few seconds.It is important to mention that both have the same gains of the Γ y perturbation.Figure 2b shows the convergence of the x-axis displacement to the desired x d trajectory.The proposed FTSMC controller also performs better compared to the NTSMC controller, both with a Γ x perturbation, and Figure 2c shows the convergence to the desired altitude of 4 m with a perturbation of Γ z .Our proposal can provide higher tracking accuracy and less vibration at the control input.As we can see, the proposed FTSMC controller can provide fast convergence to the desired positions.
Figure 3a shows that the FTSMC control converges in a period of time of 12 s.However, the NTSMC has longer convergence time and a small chattering occurs in both Γ φ and θ. Figure 3b also presents a convergence of the FTSMC at about 10 s while NTSMC converges in 18 s, both with a perturbation of Γ θ .Finally, Figure 3c presents its convergence to the desired trajectory with a perturbation of Γ ψ .
Figure 4a,b shows the behavior of the control input τ φ of both FTSMC and NTSMC controls, and τ θ for both controls FTSMC and NTSMC where the chattering effect is presented.τ ψ is shown in Figure 4c.Finally, the result of the simulation of the control input u is shown in Figure 5; the values of the added perturbations are presented in Table 1.

Discussion
This paper presents a control algorithm based on a fixed-time sliding mode controller using the dynamics of nonlinear errors on the trajectories (x, y) of the Quadrotor aircraft.The reduced dynamic model of the aerial vehicle is employed.
To improve the performance of the dynamics of the translation system, a nonlinear sliding surface is used to reduce the convergence time and the aerial vehicle tracks the desired position of x d , y d and z d .Furthermore, the translational movements of the X − Y and rotational axes (φ d , θ d are calculated.
A Lyapunov function is also used to demonstrate the stabilization of each axis of the Quadrotor aircraft; we assume that between the axes there is a coupling which disappears by the robust algorithm proposed.
Numerical simulation results are performed to quantify the performance of the control, which shows that the designed control algorithm improves convergence response time, accuracy and robustness while outperforming the NTSMC controller and reducing chattering.
In future work, we seek to improve accuracy in the measurement of the position and attitude of a Quadrotor aircraft.This improvement will be achieved by increasing the number of sensors used to obtain a better performance in the mission to be executed, such as artificial vision, lidar, etc.

Figure 2 .Figure 3 .
Figure 2. (a) FTSMC algorithm displacement response compared with NTSMC control in the y axis, (b) FTSMC displacement response compared to NTSMC control in the x axis, and (c) z altitude response.

Table 1 .
Simulation parameters and initial conditions.