Next Article in Journal
Development of a High-Reliability Hybrid Data Transmission System for Unmanned Surface Vehicles Under Interference Conditions
Previous Article in Journal
Inland Water Quality Monitoring Using Airborne Small Cameras: Enhancing Suspended Sediment Retrieval and Mitigating Sun Glint Effects
Previous Article in Special Issue
UAV–UGV Formation for Delivery Missions: A Practical Case Study
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Third-Order Sliding Mode Control for Trajectory Tracking of Quadcopters Using Particle Swarm Optimization

by
Muhammad Rizwan Chughtai
1,2,3,*,
Iftikhar Ahmad
2,
Abdullah Mughees
2,
Muddesar Iqbal
1,
Dhafer Almakhles
1 and
Mahmoud Abdelrahim
1,4
1
Renewable Energy Laboratory, College of Engineering, Prince Sultan University, Riyadh 11586, Saudi Arabia
2
School of Electrical Engineering and Computer Science, National University of Sciences and Technology, Islamabad 44000, Pakistan
3
National Institute of Electronics, Islamabad 44000, Pakistan
4
Department of Mechatronics Engineering, Faculty of Engineering, Assiut University, Assiut 71515, Egypt
*
Author to whom correspondence should be addressed.
Drones 2025, 9(3), 172; https://doi.org/10.3390/drones9030172
Submission received: 21 January 2025 / Revised: 19 February 2025 / Accepted: 24 February 2025 / Published: 26 February 2025

Abstract

:
This study focuses on designing a controller for trajectory tracking of quadcopters using advanced sliding-mode techniques. Specifically, an integral terminal sliding-mode control based on an adaptive barrier function with a super-twisting reaching law is employed to achieve precise trajectory tracking. The performance of the controller is enhanced by applying Particle Swarm Optimization to fine-tune the gain values. The nonlinear dynamics of the quadcopter are modeled using the Euler–Lagrange approach, followed by a Lyapunov stability analysis to verify the stability of the controller. The adaptive barrier function is used to prevent control signal saturation, while the third-order sliding-mode controller effectively reduces the chattering. Additionally, a saturation function is introduced to further mitigate the chattering effect. The effectiveness of the proposed approach is demonstrated through numerical simulations, and its performance is further validated through controller-in-the-loop implementation. The results show that the proposed method significantly improves trajectory-tracking accuracy.

1. Introduction

The trajectory tracking of quadcopters remains a significant challenge due to their underactuated nature and complex dynamics. Researchers are increasingly focusing on designing controllers that can effectively manage these complexities to improve trajectory-tracking performance. Despite the challenges of underactuated systems, the simplified configurations, energy efficiency, agility, and versatility of quadcopters make them essential in various applications such as education [1], mapping and data collection [2,3], search and rescue operations [4,5], agricultural practices [6,7], military operations [8], and disaster response [9,10]. The widespread interest in quadcopters within the UAV research domain is driven by their simple design, ease of operation, robustness, and compact size. However, the nonlinear dynamics of quadcopters, influenced by aerodynamics, complicate the development of accurate trajectory-tracking control.
To address the trajectory-tracking control of quadcopter drones, various control techniques have been explored by researchers, each aiming to enhance performance and robustness in dynamic environments. For instance, in [11], the authors implemented a PID-based control scheme to regulate both the altitude and attitude of the quadrotor. A more advanced approach is presented in [12], where a quaternion-based tracking controller, utilizing the pseudo-linear feedback linearization method, was proposed for the attitude and altitude regulation of quadrotor drones. In another study, ref. [13] introduced physics-informed neural networks for estimating UAV dynamic models, effectively addressing uncertain data, non-linearities, and noise. Once trained, their neural network provides robust control with fast computation, eliminating the need for retraining. Furthermore, in [14], the authors proposed an image-based visual servoing control structure for UAV target tracking, combining a sliding-mode controller for tracking and disturbance rejection with a controller to correct velocity errors due to UAV dynamics.
Among the various strategies, the sliding-mode control (SMC) technique has gained prominence for controlling the nonlinear dynamics of quadcopter drones, making it a common choice in the literature. Numerous studies have applied SMC and its advanced variants to address the challenges of quadcopter control. In [15], the authors developed a sliding-mode control approach based on the backstepping method, effectively handling high-order nonholonomic constraints and incorporating essential physical phenomena into the dynamic model of a quadcopter. To further enhance SMC, ref. [16] proposed an integrated control strategy, combining integral SMC and backstepping SMC within a dual-loop framework, which significantly improved trajectory-tracking accuracy. In continuation of this, ref. [17] demonstrated the efficacy of nonlinear adaptive control through a modified adaptive SMC strategy, particularly for mini-drone quadcopters. Additionally, ref. [18] introduced an integral adaptive SMC scheme, which ensured robustness against nonlinear dynamics and external disturbances. Further advancements were made by [19], who integrated an adaptive super-twisting integral terminal sliding-mode control with a barrier function to address quadcopter attitude and altitude challenges. This approach was refined in [20] with a conditioned adaptive barrier-based double-integral super-twisting SMC designed to ensure robust trajectory tracking. To further improve trajectory tracking, ref. [21] employed a double-integral SMC approach, while ref. [22] introduced an adaptive SMC strategy with an adaptive switching gain to achieve rapid response against parameter uncertainties and disturbances. In [23], the authors addressed mass and inertia uncertainties using adaptive laws to compensate for input saturation, incorporating a disturbance observer to counter external disturbances. In another study [24], the authors proposed a sliding-mode controller for quadrotor attitude, integrating adaptive fuzzy gain scheduling to mitigate chattering, along with a PD controller for position control. Similarly, in [25], the authors introduced an adaptive distributed sliding-mode control strategy with a prescribed performance function, ensuring both transient and steady-state performance.
In addition, several researchers have explored various second-order and third-order sliding-mode control methods to further enhance the performance of quadcopters. For instance, ref. [26] developed a second-order sliding-mode control incorporating nonholonomic constraints and employed a sigmoid function to reduce chattering, effectively addressing position and attitude tracking challenges, while ref. [27] improved it by integrating the super-twisting algorithm, enhancing tracking accuracy. Further advancements include the work of [28], who introduced an adaptive proportional-integral-derivative-based SMC strategy to stabilize the attitude and position of quadrotor UAVs amid parameter uncertainties and external disturbances. Similarly, ref. [29] presented a robust adaptive second-order sliding-mode controller to enhance tracking performance for both attitude and altitude under such disturbances and uncertainties. In parallel, ref. [30] proposed a super-twisting algorithm-based second-order SMC method for trajectory tracking and ref. [31] introduced an improved adaptive sliding-mode control framework that integrates an adaptive switching gain for rapid adaptation and robustness against external disturbances. Moreover, third-order sliding-mode control has been applied to various engineering domains. Notably, ref. [32] proposed a novel adaptive integral terminal third-order sliding-mode control strategy for motion tracking in piezoelectric-driven nano-positioning systems, while ref. [33] utilized a third-order sliding-mode control based on a super-twisting algorithm for trajectory tracking in quadcopters. These contributions collectively demonstrate the ongoing development and versatility of sliding-mode control techniques in addressing complex control challenges, particularly in the context of quadcopter trajectory tracking.
Furthermore, recent studies have widely applied fractional-order sliding-mode control (FOSMC) techniques to enhance the performance of quadrotor systems. For instance, in [34], the authors proposed a FOSMC method specifically designed for fractional-order quadrotor systems, aiming to improve system stability and control accuracy. Similarly, in [35], a fractional-order sliding-mode control approach was introduced to address disturbances in quadrotor systems, just as in [36], where the author designed a proportional-derivative sliding-mode controller specifically to handle disturbances in a quadrotor system. This approach incorporates an adaptive strategy to estimate disturbance bounds, which significantly contributes to the robustness of the system. Additionally, in [37], a robust fractional-order sliding-mode control method was developed for quadrotor tracking under external disturbances, with the added objective of stabilizing the attached slung load system.
Additionally, several surveys have been conducted on control strategies for quadcopters, as detailed in [38], providing an overview of various approaches implemented for system control. Among these, sliding-mode control (SMC) techniques have gained significant attention, particularly for trajectory tracking, where they have proven effective in rejecting disturbances. While SMC has been successfully applied to path following in fixed-wing UAVs, its application in quadrotor path following remains largely unexplored. Another survey by the authors in [39] discusses recent advancements in motion control theory for multi-rotor aerial vehicles (MAVs), focusing on position and attitude control. The survey reviews control strategies for MAVs, emphasizing the importance of position and attitude controllers in ensuring stability and achieving desired movement. The authors highlight sliding-mode control as a widely researched nonlinear control method known for managing system dynamics using a discontinuous control signal that forces the system to “slide” along a trajectory. Initially proposed for attitude control, SMC has since been applied to position control, with real-world validation occurring in the past decade.
While the sliding-mode control approach is widely recognized for addressing the control challenges of quadcopters, certain aspects of the existing literature present opportunities for further enhancement. For example, several studies, including [20,22,23,30,31,40], employed a PD-based function to select the sliding surface, which may limit the controller flexibility. Additionally, works such as [15,16,23] have developed SMC controllers without thoroughly addressing the chattering phenomenon, which could potentially impact performance under specific operational conditions. Moreover, studies such as [15,16,21,30,31] show that there exists potential for further exploration in optimizing the gain parameters, which could lead to a more robust and efficient system performance. Furthermore, research including [19,20,23] has addressed the issue of control signal saturation, an area that still presents opportunities for further investigation to enhance the performance of the controller under specific constraints. Furthermore, many of these studies primarily focus on simulation-based evaluations, with only a few, such as [20,40,41], demonstrating their implementations on physical hardware or through hardware-in-the-loop (HIL) testing. This highlights valuable opportunities for advancing the design, optimization, and real-world application of quadcopter control systems.
In this study, we investigate the trajectory-tracking control problem of a quadcopter and design a controller to regulate its attitude, heading, position, and altitude. The cross configuration of the quadcopter is selected for its superior maneuverability. To enhance the robustness of traditional sliding-mode control (SMC), a third-order sliding-mode controller is used, incorporating a two-stage dynamic sliding surface. This approach is particularly effective for nonlinear systems, as it offers a flexible method for handling complex dynamics. In contrast, ref. [20] employs a simpler, single-stage sliding surface, where a PD sliding surface is used. Additionally, a barrier function is integrated to regulate excessive gain and ensure convergence to the origin. The integral terminal sliding-mode technique, in conjunction with the super-twisting reaching law, is used to mitigate chattering effects. To ensure continuous control actions, enable smoother transitions, and minimize chattering, a saturation function is used instead of the traditional signum function, as implemented in [20]. Additionally, Particle Swarm Optimization (PSO) is used to fine-tune the controller’s gain parameters, with Integral Time Absolute Error (ITAE) as the objective function. In contrast to [20], which uses Improved Grey Wolf Optimization (IGWO) with Integral Square Error (ISE) as the objective function, PSO with ITAE effectively minimizes both transient and steady-state errors. While ISE primarily focuses on steady-state error, it may not capture transient dynamics as effectively as ITAE.
Optimization of control strategies and the overall system is crucial for achieving optimal performance. To enhance controller performance, various optimization techniques have been employed by researchers. For instance, in [20], an Improved Grey Wolf Optimization technique was used to fine-tune the gain parameters of the controller. In contrast, ref. [36] employed a genetic algorithm for tuning the parameters of the controller. Meanwhile, ref. [41] used the Redfox algorithm for the same purpose. Among the numerous optimization methods, Particle Swarm Optimization (PSO) is particularly favored for its versatility and robustness. As highlighted in [42], PSO has been successfully applied in chemometrics for tasks such as metaparameter selection, signal warping, robust PCA, and variable selection. Similarly, ref. [43] explored PSO as a robust solution for large-scale nonlinear problems and its applications in power systems. In [44,45], PSO was employed to optimize controller gain values. Additionally, in [46], PSO was combined with an enumeration method to derive candidate chassis layout schemes for Unmanned Surface Vehicles, showcasing its adaptability across various engineering fields. Further applications of PSO include [47], where enhanced PSO methods were applied for UAV localization in GPS-denied environments. These studies highlight the diversity of optimization techniques, with PSO standing out as a powerful tool for enhancing control system performance and efficiency.
The primary limitations of SMC-based control laws include high control gains, increased computational load, chattering effects, and control input saturation. However, these limitations can be alleviated through the utilization of advanced SMC techniques. In this study, we implement a third-order SMC approach to address the trajectory-tracking control problem, utilizing the cross configuration of the quadcopter. The key contributions of this research are as follows:
  • The control input is regulated near the sliding surface through the integral terminal super-twisting technique, mitigating chattering and enhancing control performance.
  • Dynamic selection of the sliding surface is utilized to optimize the performance of the control algorithm.
  • The barrier function regulates excessive gain, improves control performance and increases robustness by protecting the system from uncertainties.
  • The barrier function effectively adapts to variations in time-varying systems.
  • The saturation function promotes smoother transitions and helps reduce chattering.
  • Particle Swarm Optimization is employed to optimize the gain parameters, further improving the overall performance of the controller.
Table 1 provides a comparative summary of the proposed approach and existing methods, highlighting the key differences.
This article is organized as follows: Section 2 introduces the dynamic mathematical model for the quadcopter. Section 3 describes the design of the third-order sliding-mode control technique, including the optimization of controller gain parameters through Particle Swarm Optimization. In Section 4, the numerical simulation results are presented, followed by a comparative analysis of control laws in Section 5. Section 6 outlines the implementation of the controller-in-the-loop experiment, and Section 7 provides the concluding remarks of the study.

2. Mathematical Modeling of Quadcopter

This section presents the development of the mathematical model for the quadcopter system using the Lagrangian approach. Numerous studies have investigated the modeling and design of quadcopters with various configurations, including the cross configuration (X-shape), plus-shape, and H-shape, each characterized by distinct dynamic models, aerodynamic properties, and flight characteristics. Among these configurations, the cross configuration is widely recognized for its superior stability and maneuverability, as highlighted in [11], with further modeling advancements discussed in [17,28,40]. Additionally, the thrust dynamics and component-level modeling of quadcopters are analyzed in [48], while [15,49] focus on the dynamic modeling and experimental validation of the plus-shape configuration.
In this study, a cross configuration is selected, where all four motors contribute to the maneuverability of the quadcopter, offering superior stability compared to the conventional plus configuration. The system dynamics are described using two primary coordinate frames: the Earth frame ( F E ), defined by the coordinates x E , y E , and z E , and the body frame ( F B ), represented by the axis x B , y B , and z B , as illustrated in Figure 1. The quadcopter consists of four symmetric arms, each equipped with a motor and propeller. The thrust generated by each motor is directly proportional to the square of its angular velocity, which can be mathematically expressed as:
f i ( t ) = K p ω i 2 ( t ) i = 1 , 2 , 3 , 4
where f i ( t ) refers to the upward thrust force measured in N produced by the i -th motor, K p denotes the thrust constant in Ns 2 rad 2 , and ω i ( t ) indicates the angular velocity in rads 1 . The movement of the quadcopter can be controlled by adjusting the angular velocities ( ω 1 ( t ) , ω 2 ( t ) , ω 3 ( t ) , and ω 4 ( t ) ) of the motors. Additionally, the arm length is denoted as l (in meters), and the gravitational force acts along the z E axis (in ms 2 ) as shown in Figure 1. Also, to minimize the net rotation, motors with angular velocities ω 1 ( t ) and ω 3 ( t ) rotate clockwise, while ω 2 ( t ) and ω 4 ( t ) rotate counterclockwise. This configuration enables both lift generation and maneuverability. The quadcopter system is inherently underactuated, requiring a model that incorporates certain simplifying assumptions for efficient control. These assumptions include:
  • The structure is rigid.
  • The system exhibits symmetry.
  • The origin of the body frame coincides with the center of gravity.
  • Blade flapping is neglected, and the propellers are assumed to be rigid.
  • All propellers operate under identical conditions, with equal thrust and response torque coefficients.
These assumptions simplify the modeling of the quadcopter, thus facilitating the development of effective control strategies.

2.1. Quadcopter Kinematics

In this section, the kinematics of the quadcopter are explained, where the Earth frame ( F E ) is used to describe the roll, pitch, and yaw angles, and the body frame ( F B ) is employed to represent the linear velocities and accelerations. The quadcopter is characterized by six degrees of freedom (6-DOF), which are defined by its position coordinates ( x ( t ) , y ( t ) , z ( t ) ) and orientation angles ( ϕ ( t ) , θ ( t ) , ψ ( t ) ), as shown in Figure 1. To provide a more comprehensive representation of the quadcopter states, these six degrees of freedom can be expressed as a single vector [27], as follows:
E ( t ) = x ( t ) y ( t ) z ( t ) ϕ ( t ) θ ( t ) ψ ( t ) T
Here, E ( t ) is the state vector, and its derivative E ˙ ( t ) represents the generalized velocity vector, can be described in the body frame as:
E ˙ ( t ) = Jv ( t )
In this equation, v ( t ) represents the velocity vector, and J is the generalize matrix that incorporates both the rotation and transformation between frames. The velocity vector in the body frame is given by:
v ( t ) = v B ( t ) ω B ( t ) T = v x ( t ) v y ( t ) v z ( t ) ω x ( t ) ω y ( t ) ω z ( t ) T
where v x ( t ) , v y ( t ) , v z ( t ) are the linear velocity components, and ω x ( t ) , ω y ( t ) , ω z ( t ) are the angular velocity components. The generalized matrix J facilitates the conversion of velocities from the body frame to the inertial frame, described as:
J = R 0 3 × 3 0 3 × 3 T
Here, R is the rotation matrix, and T is the transformation matrix. The rotation matrix defines the orientation of the object. The rotation matrix based on Euler angles [27] is expressed as:
R = C ψ C θ C ψ S θ S ϕ S ψ C ϕ C ψ S θ C ϕ + S ψ S ϕ S ψ C θ S ψ S θ S ϕ + C ψ C ϕ S ψ S θ C ϕ C ψ S ϕ S θ C θ S ϕ C ψ C θ
where C ϕ = c o s ( ϕ ) , C θ = c o s ( θ ) , C ψ = c o s ( ψ ) , S ϕ = s i n ( ϕ ) , S θ = s i n ( θ ) and S ψ = s i n ( ψ ) . The rotation matrix R represents the transformation between coordinate frames, and it is orthogonal, satisfying the property R 1 = R T . Typically, angles and angular velocities are measured in the inertial frame ( F E ), and the transformation matrix T is used to map angular velocities from the body-fixed frame ( F B ) to F E .
T = 1 S ϕ T θ C ϕ T θ 0 C ϕ S ϕ 0 S ϕ / C θ C ϕ / C θ
where T θ = t a n ( θ ) . The inverse transformation matrix T 1 is used to convert angular velocities from the inertial frame to the body frame.

2.2. Quadcopter Dynamics

In this section, the dynamics of a six-degrees-of-freedom (6-DOF) quadcopter are described, taking into account its mass (m) and inertia ( I ). The quadcopter frame is assumed to be symmetric, with the propellers aligned along the x and y axis. As explained in [11], the inertia matrix is diagonal. The dynamics of the quadcopter, expressed in terms of linear and angular forces, can be formulated as:
f B ( t ) τ B ( t ) = m v ˙ B ( t ) + ω B ( t ) × ( m v B ( t ) ) I ω ˙ B ( t ) + ω B ( t ) × ( I ω B ( t ) )
Here, v ˙ B ( t ) denotes linear acceleration, ω ˙ B ( t ) represents angular acceleration, f B ( t ) signifies linear force, and τ B ( t ) indicates torque, all defined in the body frame F B . The quadcopter executes four primary maneuvers: thrust ( F z ( t ) ), roll ( τ ϕ ( t ) ), pitch ( τ θ ( t ) ), and yaw ( τ ψ ( t ) ), each contributing to its overall motion as explained in [17].
The fundamental maneuvers of the quadcopter are controlled by four inputs, u 1 ( t ) , u 2 ( t ) , u 3 ( t ) , and u 4 ( t ) , which represent thrust, roll, pitch, and yaw control, respectively. Based on these inputs, Equation (8) can be reformulated as follows:
f B ( t ) τ B ( t ) = 0 0 F z ( t ) τ ϕ ( t ) τ θ ( t ) τ ψ ( t ) = 0 0 u 1 ( t ) u 2 ( t ) u 3 ( t ) u 4 ( t ) = 0 0 K p ( ω 1 2 ( t ) + ω 2 2 ( t ) + ω 3 2 ( t ) + ω 4 2 ( t ) ) K p l 2 ( ω 1 2 ( t ) + ω 2 2 ( t ) ω 3 2 ( t ) ω 4 2 ( t ) ) K p l 2 ( ω 1 2 ( t ) ω 2 2 ( t ) ω 3 2 ( t ) + ω 4 2 ( t ) ) K d ( ω 1 2 ( t ) ω 2 2 ( t ) + ω 3 2 ( t ) ω 4 2 ( t ) )
where K p is the lift coefficient, l / 2 is the distance from the center of gravity to the propeller axis, and K d is the drag coefficient.
As the motors are aligned horizontally, they generate vertical force F z ( t ) but do not directly produce forces in the x or y directions. However, movements along these axes can be controlled indirectly through the combination of the forces and torques generated by the motors. During the maneuvering of the quadcopter, both the kinetic energy ( T K . E ( q ( t ) ) ) and potential energy ( T P . E ( q ( t ) ) ) depend on the state of its coordinates, q i ( t ) = { x ( t ) , y ( t ) , z ( t ) , ϕ ( t ) , θ ( t ) , ψ ( t ) } , which describe its position and orientation over time. These energies are defined by the following equations:
T K . E ( q ( t ) ) = 1 2 m ( v x 2 ( t ) + v y 2 ( t ) + v z 2 ( t ) ) + 1 2 ( I x ω x 2 ( t ) + I y ω y 2 ( t ) + I z ω z 2 ( t ) )
T P . E ( q ( t ) ) = m g z ( t )
Here, g is the gravitational acceleration and z ( t ) is the altitude. The Lagrangian function L ( q ( t ) ) , defined as L ( q ( t ) ) = T K . E ( q ( t ) ) T P . E ( q ( t ) ) combines the kinetic and potential energies. The equations of motion are derived using the Euler–Lagrange equation, which can be expressed as:
d d t ( L ( q ( t ) ) q ˙ i ( t ) ) L ( q ( t ) ) q i ( t ) = Γ i ( t ) i = 1 , 2 , 6
where Γ i ( t ) is the generalized force vector, with coordinates q i ( t ) = { x ( t ) , y ( t ) , z ( t ) , ϕ ( t ) , θ ( t ) , ψ ( t ) } . The generalized force vector can be defined as:
Γ i ( t ) = F e x t ( t ) τ e x t ( t )
The external force ( F e x t ( t ) ) is the net force acting on the quadcopter, calculated as the difference between the thrust force and the drag force. It is represented as:
F e x t ( t ) = ( R o t a t i o n a l M a t r i x T h r u s t ) D r a g F o r c e = R 0 0 F z ( t ) K f t x v x ( t ) K f t y v y ( t ) K f t z v z ( t ) = R 0 0 u 1 ( t ) K f t x v x ( t ) K f t y v y ( t ) K f t z v z ( t )
Here, K f t x , K f t y , and K f t z are the translation drag coefficients in x, y, and z directions, respectively. Additionally, the external torque ( τ e x t ( t ) ) is defined as the difference between the quadcopter-generated torque, aerodynamic friction, and gyroscopic effects:
τ e x t ( t ) = ( Q u a d c o p t e r T o r q u e ) ( A e r o d y n a m i c F r i c t i o n ) ( G y r o s c o p i c E f f e c t ) = τ ϕ ( t ) τ θ ( t ) τ ψ ( t ) K f a x ω x ( t ) K f a y ω y ( t ) K f a z ω z ( t ) i = 1 4 ω B ( t ) J r 0 0 ( 1 ) i + 1 ω i ( t ) = u 2 ( t ) u 3 ( t ) u 4 ( t ) K f a x ω x ( t ) K f a y ω y ( t ) K f a z ω z ( t ) i = 1 4 ω B ( t ) J r 0 0 ( 1 ) i + 1 ω i ( t )
where K f a x , K f a y and K f a z are the aerodynamic friction coefficients and J r is the rotor inertia. By utilizing the expressions from Equations (14) and (15), the generalized force vector Γ i ( t ) is derived. The Lagrangian equation is then solved numerically in MATLAB 2022a to develop the dynamic model of the quadcopter, as explained in [20], and is represented as follows:
ϕ ¨ ( t ) = 1 I x { θ ˙ ( t ) ψ ˙ ( t ) ( I y I z ) K f a x ϕ ˙ 2 ( t ) J r Ω ( t ) θ ˙ ( t ) + d u 2 ( t ) } θ ¨ ( t ) = 1 I y { ϕ ˙ ( t ) ψ ˙ ( t ) ( I z I x ) K f a y θ ˙ 2 ( t ) + J r Ω ( t ) ϕ ˙ ( t ) + d u 3 ( t ) } ψ ¨ ( t ) = 1 I z { θ ˙ ( t ) ϕ ˙ ( t ) ( I x I y ) K f a z ψ ˙ 2 ( t ) + K d u 4 ( t ) } x ¨ ( t ) = 1 m { ( C ϕ S θ C ψ + S ϕ S ψ ) u 1 ( t ) K f t x x ˙ ( t ) } y ¨ ( t ) = 1 m { ( C ϕ S θ S ψ S ϕ C ψ ) u 1 ( t ) K f t y y ˙ ( t ) } z ¨ ( t ) = 1 m { ( C ϕ C θ ) u 1 ( t ) K f t z z ˙ ( t ) } g
where u 1 ( t ) , u 2 ( t ) , u 3 ( t ) and u 4 ( t ) represent the control inputs, while g denotes the gravitational acceleration acting on the quadcopter. To simplify the equations, we assume d = l / 2 and Ω ( t ) is the net differential angular velocity between the rotors, given by Ω ( t ) = ( ω 1 ( t ) ω 2 ( t ) + ω 3 ( t ) ω 4 ( t ) ) .

2.3. Rotor Dynamics

The rotor of the motor drives the propeller, as described in [15], by the following equations:
V ( t ) = r i ( t ) + L d i ( t ) d t + k e ω ( t ) k m i ( t ) = J r d ω ( t ) d t + C s + k r ω 2 ( t )
where V ( t ) is the motor input, k e and k m are the electrical and mechanical torque constants, k r is the load torque constant, r is internal resistance, i ( t ) is the current passing through the motor winding with inductance L, and C s is solid friction. The selected rotor model is given by:
ω i ˙ ( t ) = b V i ( t ) β 0 β 1 ω i ( t ) β 2 ω i 2 ( t ) , i = 1 , 2 , 3 , 4
Here, β 0 = C s J r , β 1 = k e k m r J r , β 2 = k r J r a n d b = k m r J r .

2.4. Quadcopter State-Space Representation

The dynamics of the quadcopter, as represented in Equation (16), are expressed in state-space form using the state vector, defined as:
X ( t ) = [ ϕ ( t ) ϕ ˙ ( t ) θ ( t ) θ ˙ ( t ) ψ ( t ) ψ ˙ ( t ) x ( t ) x ˙ ( t ) y ( t ) y ˙ ( t ) z ( t ) z ˙ ( t ) ] T
The state-space representation of the system is then formulated as follows:
x ˙ 1 ( t ) = x 2 ( t ) x ˙ 2 ( t ) = a 1 x 4 ( t ) x 6 ( t ) + a 2 x 2 2 ( t ) + a 3 Ω ( t ) x 4 ( t ) + b 1 u 2 ( t ) x ˙ 3 ( t ) = x 4 ( t ) x ˙ 4 ( t ) = a 4 x 2 ( t ) x 6 ( t ) + a 5 x 4 2 ( t ) + a 6 Ω ( t ) x 2 ( t ) + b 2 u 3 ( t ) x ˙ 5 ( t ) = x 6 ( t ) x ˙ 6 ( t ) = a 7 x 2 ( t ) x 4 ( t ) + a 8 x 6 2 ( t ) + b 3 u 4 ( t ) x ˙ 7 ( t ) = x 8 ( t ) x ˙ 8 ( t ) = a 9 x 8 ( t ) + u x ( t ) u 1 ( t ) m x ˙ 9 ( t ) = x 10 ( t ) x ˙ 10 ( t ) = a 10 x 10 ( t ) + u y ( t ) u 1 ( t ) m x ˙ 11 ( t ) = x 12 ( t ) x ˙ 12 ( t ) = a 11 x 12 ( t ) + c o s ( x 1 ( t ) ) c o s ( x 3 ( t ) ) m u 1 ( t ) g
Here, the coefficients are defined as:
a 1 = I y I z I x , a 2 = K f a x I x , a 3 = J r I x , a 4 = I z I x I y a 5 = K f a y I y , a 6 = J r I y , a 7 = I x I y I z , a 8 = K f a z I z a 9 = K f t x m , a 10 = K f t y m , a 11 = K f t z m b 1 = d I x , b 2 = d I y , b 3 = 1 I z
u x ( t ) = c o s ( x 1 ( t ) ) s i n ( x 3 ( t ) ) c o s ( x 5 ( t ) ) + s i n ( x 1 ( t ) ) s i n ( x 5 ( t ) ) u y ( t ) = c o s ( x 1 ( t ) ) s i n ( x 3 ( t ) ) s i n ( x 5 ( t ) ) s i n ( x 1 ( t ) ) c i n ( x 5 ( t ) )
In Equation (20), the state variables x 1 ( t ) , x 3 ( t ) , and x 5 ( t ) correspond to the roll, pitch, and yaw angles, while x 7 ( t ) , x 9 ( t ) , and x 11 ( t ) correspond to the positions along the x, y, and z directions, respectively.

3. Controller Design

In this section, a Third-order Conditioned Adaptive Barrier-based Integral Terminal Super-Twisting Sliding-Mode Control (3-CABIT-STSMC) is designed, which serves as a highly resilient controller for achieving accurate tracking in complex systems. Also, to enhance the performance of this advanced sliding-mode control approach, the Particle Swarm Optimization (PSO) technique is utilized for fine-tuning the gain parameters.

3.1. 3-CABIT-STSMC

The primary goal is to develop a robust controller for quadcopter trajectory tracking, capable of precisely controlling attitude (roll and pitch), heading (yaw), position (x and y), and altitude (z) while ensuring rapid response and adaptive dynamics. To achieve this, the 3-CABIT-STSMC is introduced, which leverages higher-order derivatives to reduce chattering and enhance system resilience. This controller ensures rapid adjustments to the trajectories near the origin, achieving chatter-free convergence and making it particularly well-suited for applications requiring high precision and robustness. The tracking error is defined as the difference between the actual and reference states. Since there are six states, the error associated with each state is expressed by the generalized error function as follows:
e j ( t ) = x 2 j 1 ( t ) x ( 2 j 1 ) r e f ( t ) j = 1 , 2 6
Here, e j ( t ) denotes the error for each state, which includes roll, pitch, yaw, and the positional coordinates along the x, y, and z-axis, indexed by j from 1 to 6. As the system is dependent on time, the following mathematical expression is derived by taking the second derivative of the error function, which is expressed as:
e ¨ j ( t ) = x ˙ 2 j ( t ) x ¨ ( 2 j 1 ) r e f ( t ) j = 1 , 2 6
The sliding surface for the state variables is now defined to facilitate the control design. A first-stage sliding surface based on the proportional-integral-derivative (PID) approach is selected and can be represented as:
S j ( t ) = k p j e j ( t ) + k i j e j ( t ) d t + k d j e ˙ j ( t ) j = 1 , 2 6
The term S j ( t ) represents the sliding surface, while e j ( t ) denotes the associated error function. The parameters k p j , k i j , and k d j correspond to the sliding surface gains, which are adjusted through optimization techniques to achieve the optimal performance. Given that the system comprises six states, six distinct sliding surfaces are defined, with the index j varying from 1 to 6. As the error function evolves over time, the derivatives of the sliding surfaces yield the following equations.
S j ˙ ( t ) = k p j e j ˙ ( t ) + k i j e j ( t ) + k d j e ¨ j ( t ) j = 1 , 2 6
Next, an integral terminal sliding surface is defined, which serves as the function for the second-stage sliding surface and is given by:
σ j ( t ) = λ j 1 S j ( t ) + λ j 2 S j ( t ) d t f j / g j j = 1 , 2 6
where σ j ( t ) is the second-stage sliding surface, and the parameters λ j 1 and λ j 2 represent the gains of the second-stage sliding surface, which can be fine-tuned using optimization techniques. The terms f j and g j are positive constants satisfying the condition 1 / 2 < f j / g j 3 . By computing the derivative, as demonstrated in [44], the resulting equation is derived as follows:
σ j ˙ ( t ) = λ j 1 S j ˙ ( t ) + λ j 2 f j g j S j ( t ) S j ( t ) d t f j / g j 1 j = 1 , 2 6
To simplify the expression, the term f j / g j is defined as the auxiliary variable α j . As a result, the equation is reformulated as follows:
σ j ˙ ( t ) = λ j 1 S j ˙ ( t ) + λ j 2 α j S j ( t ) S j ( t ) d t α j 1 j = 1 , 2 6
Lyapunov stability analysis is used to evaluate the stability of the system. This involves selecting an appropriate Lyapunov candidate function to effectively represent the system energy and validate its stability. The chosen Lyapunov function is defined as follows:
V ( t ) = 1 2 j = 1 6 σ j 2 ( t ) V ˙ ( t ) = j = 1 6 σ j ( t ) σ j ˙ ( t )
When the derivative of V ( t ) is negative, it reflects a decrease in system energy, driving the states closer to the reference point. To improve readability and simplify the equations, we will drop the time-dependent notation ( t ) from the variables from this point onward. By incorporating the values of σ 1 ˙ , σ 2 ˙ , σ 3 ˙ , σ 4 ˙ , σ 5 ˙ , and σ 6 ˙ into Equation (28), the expression takes the following form.
V ˙ = σ 1 { λ 11 k p 1 x 2 λ 11 k p 1 x ˙ 1 r e f + λ 11 k i 1 x 1 λ 11 k i 1 x 1 r e f + λ 11 k d 1 a 1 x 4 x 6 + λ 11 k d 1 a 2 x 2 2 + λ 11 k d 1 a 3 Ω x 4 + λ 11 k d 1 b 1 u 2 λ 11 k d 1 x ¨ 1 r e f + λ 12 α 1 S 1 S 1 α 1 1 d t } + σ 2 { λ 21 k p 2 x 4 λ 21 k p 2 x ˙ 3 r e f + λ 21 k i 2 x 3 λ 21 k i 2 x 3 r e f + λ 21 k d 2 a 4 x 2 x 6 + λ 21 k d 2 a 5 x 4 2 + λ 21 k d 2 a 6 Ω x 2 + λ 21 k d 2 b 2 u 3 λ 21 k d 2 x ¨ 3 r e f + λ 22 α 2 S 2 S 2 α 2 1 d t } + σ 3 { λ 31 k p 3 x 6 λ 31 k p 3 x ˙ 5 r e f + λ 31 k i 3 x 5 λ 31 k i 3 x 5 r e f + λ 31 k d 3 a 7 x 2 x 4 + λ 31 k d 3 a 8 x 6 2 + λ 31 k d 3 b 3 u 4 λ 31 k d 3 x ¨ 5 r e f + λ 32 α 3 S 3 S 3 α 3 1 d t } + σ 4 { λ 41 k p 4 x 8 λ 41 k p 4 x ˙ 7 r e f + λ 41 k i 4 x 7 λ 41 k i 4 x 7 r e f + λ 41 k d 4 a 9 x 8 + λ 41 k d 4 ( u x ) u 1 m λ 41 k d 4 x ¨ 7 r e f + λ 42 α 4 S 4 S 4 α 4 1 d t } + σ 5 { λ 51 k p 5 x 10 λ 51 k p 5 x ˙ 9 r e f + λ 51 k i 5 x 9 λ 51 k i 5 x 9 r e f + λ 51 k d 5 a 10 x 10 + λ 51 k d 5 ( u y ) u 1 m λ 51 k d 5 x ¨ 9 r e f + λ 52 α 5 S 5 S 5 α 5 1 d t } + σ 6 { λ 61 k p 6 x 12 λ 61 k p 6 x ˙ 11 r e f + λ 61 k i 6 x 11 λ 61 k i 6 x 11 r e f + λ 61 k d 6 a 11 x 12 + λ 61 k d 6 c o s ( x 1 ) c o s ( x 3 ) u 1 m λ 61 k d 6 g λ 61 k d 6 x ¨ 11 r e f + λ 62 α 6 S 6 S 6 α 6 1 d t }
The implementation of a reaching law is essential to satisfy the Lyapunov stability criterion, ensuring that V ˙ 0 and improving the convergence rate of the state toward the sliding surface. To achieve this, the super-twisting reaching law is employed and is expressed as follows:
k j 1 | σ j | β j s a t ( σ j γ j ) k j 2 s a t ( σ j γ j ) d t = σ j ˙ j = 1 , 2 6
where β j and γ j are the gains of the super-twisting sliding-mode control (STSMC) and can have any constant positive value. | σ j | guarantees the convergence of the system states towards the sliding surface, and γ j is utilized to minimize the chattering effect when the states approach the sliding surface. k j 1 and k j 2 are the adaptive gains, which can be defined using the barrier function, are given as follows:
k j i = ρ j i | σ j | if | σ j | > δ j i | σ j | δ j i | σ j | if | σ j | < δ j i j = 1 , 2 6 , i = 1 , 2
The parameter ρ j i serves as a gain that modulates the magnitude of the response, while δ j i acts as a threshold parameter, defining the boundary at which the behavior of the adaptive gain transitions. Optimization techniques can be employed to refine the values of these parameters, ensuring optimal performance. To further reduce chattering, the saturation function is applied. For a given variable x, the saturation function, represented as s a t , is mathematically defined as:
s a t ( x ) = x | x | + ϵ if x 0 0 if x = 0
where ϵ is a small positive constant introduced to prevent division by zero and ensure a smooth approximation. This formulation helps to achieve a gradual transition near zero, thereby enhancing the stability and performance of the controller. The value of ϵ can be fine-tuned to achieve efficient performance. Since the selected reaching law exhibits a decaying behavior, as explained in [50], V ˙ will ultimately approach zero. Consequently, the derivative of the Lyapunov function, as presented in Equation (28), is defined as follows:
V ˙ = j = 1 6 [ σ j k j 1 | σ j | β j s a t ( σ j γ j ) σ j k j 2 s a t ( σ j γ j ) d t ] 0
Stability analysis is performed using the Lyapunov method, ensuring both system stability and finite-time convergence. This analysis demonstrates that the third-order sliding-mode controller effectively satisfies the stability criteria for controlling the quadcopter attitude, heading, position, and altitude. The control laws, denoted as u 2 , u 3 , u 4 , u x , u y , and u 1 , are derived by solving Equation (30) and are expressed as:
u 2 = 1 λ 11 k d 1 b 1 { k 11 | σ 1 | β 1 s a t ( σ 1 γ 1 ) k 12 s a t ( σ 1 γ 1 ) d t λ 11 k p 1 x 2 + λ 11 k p 1 x ˙ 1 r e f λ 11 k i 1 x 1 + λ 11 k i 1 x 1 r e f λ 11 k d 1 a 1 x 4 x 6 λ 11 k d 1 a 2 x 2 2 λ 11 k d 1 a 3 Ω x 4 + λ 11 k d 1 x ¨ 1 r e f λ 12 α 1 S 1 S 1 α 1 1 d t }
u 3 = 1 λ 21 k d 2 b 2 { k 21 | σ 2 | β 2 s a t ( σ 2 γ 2 ) k 22 s a t ( σ 2 γ 2 ) d t λ 21 k p 2 x 4 + λ 21 k p 2 x ˙ 3 r e f λ 21 k i 2 x 3 + λ 21 k i 2 x 3 r e f λ 21 k d 2 a 4 x 2 x 6 λ 21 k d 2 a 5 x 4 2 λ 21 k d 2 a 6 Ω x 2 + λ 21 k d 2 x ¨ 3 r e f λ 22 α 2 S 2 S 2 α 2 1 d t }
u 4 = 1 λ 31 k d 3 b 3 { k 31 | σ 3 | β 3 s a t ( σ 3 γ 3 ) k 32 s a t ( σ 3 γ 3 ) d t λ 31 k p 3 x 6 + λ 31 k p 3 x ˙ 5 r e f λ 31 k i 3 x 5 + λ 31 k i 3 x 5 r e f λ 31 k d 3 a 7 x 2 x 4 λ 31 k d 3 a 8 x 6 2 + λ 31 k d 3 x ¨ 5 r e f λ 32 α 3 S 3 S 3 α 3 1 d t }
u x = m λ 41 k d 4 u 1 { k 41 | σ 4 | β 4 s a t ( σ 4 γ 4 ) k 42 s a t ( σ 4 γ 4 ) d t λ 41 k p 4 x 8 + λ 41 k p 4 x ˙ 7 r e f λ 41 k i 4 x 7 + λ 41 k i 4 x 7 r e f λ 41 k d 4 a 9 x 8 + λ 41 k d 4 x ¨ 7 r e f λ 42 α 4 S 4 S 4 α 4 1 d t }
u y = m λ 51 k d 5 u 1 { k 51 | σ 5 | β 5 s a t ( σ 5 γ 5 ) k 52 s a t ( σ 5 γ 5 ) d t λ 51 k p 5 x 10 + λ 51 k p 5 x ˙ 9 r e f λ 51 k i 5 x 9 + λ 51 k i 5 x 9 r e f λ 51 k d 5 a 10 x 10 + λ 51 k d 5 x ¨ 9 r e f λ 52 α 5 S 5 S 5 α 5 1 d t }
u 1 = m λ 61 k d 6 c o s ( x 1 ) c o s ( x 3 ) { k 61 | σ 6 | β 6 s a t ( σ 6 γ 6 ) k 62 s a t ( σ 6 γ 6 ) d t λ 61 k p 6 x 12 + λ 61 k p 6 x ˙ 11 r e f λ 61 k i 6 x 11 + λ 61 k i 6 x 11 r e f λ 61 k d 6 a 11 x 12 + λ 61 k d 6 g + λ 61 k d 6 x ¨ 11 r e f λ 62 α 6 S 6 S 6 α 6 1 d t }

3.2. Particle Swarm Optimization

Particle Swarm Optimization (PSO) is a widely recognized and effective technique for addressing complex optimization problems due to its simplicity, computational efficiency, and ability to handle nonlinear and multidimensional challenges. In this study, PSO is utilized to fine-tune the gain parameters of the proposed controller, ensuring optimal performance. Particle Swarm Optimization is inspired by the social behaviors observed in natural swarms, such as flocks of birds or schools of fish, and has been successfully applied to diverse optimization tasks, as demonstrated in [42,43].
The Particle Swarm Optimization algorithm begins by initializing a swarm of candidate solutions, referred to as particles, with random positions and velocities within a defined search space. Each particle evaluates its position using a fitness function, which measures the quality of the solution. During the optimization process, particles update their personal best positions whenever a better solution is found. Concurrently, the global best position, representing the best solution identified by the entire swarm, is continuously updated. The movement of each particle is determined by an update equation that considers its current velocity, the attraction toward its personal best, and the influence of the global best. This mechanism maintains a dynamic balance between the exploration of new regions within the search space and the exploitation of high-quality solutions discovered during the process, ensuring efficient convergence. The iterative process continues until a predefined termination criterion is satisfied, such as reaching a maximum number of iterations or achieving a target fitness value. This structured approach allows PSO to effectively navigate the solution space, making it a powerful method for optimizing the parameters of the proposed controller.
In this study, Particle Swarm Optimization (PSO) is implemented within the MATLAB environment to optimize gain parameters and minimize the associated cost function. The algorithm is configured with a swarm size of 100 particles and a maximum of 50 iterations to ensure effective exploration of the solution space. Other parameters, including an inertia weight of 1, an inertia weight damping ratio of 0.9, a personal learning coefficient of 1.5, and a global learning coefficient of 2.0, are chosen to balance the exploration of new solutions with the exploitation of high-quality candidates. To enhance the performance of the proposed controller, a total of 13 parameters for each state, as defined in Equations (34)–(39), are fine-tuned using PSO. Additionally, the search space is constrained by defining the lower ( l b ) and upper ( u b ) bounds for each parameter, enabling a more focused and accurate optimization, with the bounds outlined as follows:
l b ( k p j k i j k d j λ j 1 λ j 2 α j ρ j 1 δ j 1 ρ j 2 δ j 2 β j γ j ϵ j ) = [ 0.1 0.1 0.001 1 0.1 0.5 1 0.1 1 0.1 0.5 0.5 0.5 ] j = 1 , 2 6 u b ( k p j k i j k d j λ j 1 λ j 2 α j ρ j 1 δ j 1 ρ j 2 δ j 2 β j γ j ϵ j ) = [ 500 500 50 990 500 3 900 50 500 500 3 3 5 ] j = 1 , 2 6
The objective function is fundamental in optimization, as it defines the desired outcome and directs the search toward optimal solutions. This study uses the Integral Time Absolute Error (ITAE) as the objective function, with its minimization enabling the optimization of controller gain parameters. The ITAE is mathematically expressed as:
I T A E = 0 T t | e ( t ) | d t
where T > 0 denotes the time interval, while e ( t ) represent the error signal as a function of time. The ITAE criterion is selected for its ability to minimize transient errors, enhance steady-state performance, and ensure smoother control actions. Table 2 shows the optimized gain values for the proposed controller.

4. Simulation Results

In this section, the performance of the proposed controller is evaluated through numerical simulations. The control strategy is implemented in MATLAB Simulink, utilizing the ODE 45 solver with a tolerance of 1 × 10 3 and a maximum step size of 0.1 . A comparative analysis is conducted by contrasting the performance of the proposed 3-CABIT-STSMC technique with other control laws from the literature, such as the conditioned adaptive barrier-based double-integral super-twisting SMC (CABDIST-SMC) [20], and proportional-derivative SMC (PD-SMC) [36]. The evaluation is based on performance metrics related to the trajectory-tracking capabilities of the quadcopter. Various parameter values, as listed in Table 3, are used in the simulation, allowing for a comprehensive assessment of the quadcopter attitude (roll and pitch), heading, position (x–y), and altitude control.

4.1. Attitude Controller

The roll and pitch angles of the quadcopter define its attitude relative to an external reference frame, and this orientation is effectively managed by a specifically designed attitude controller. Gyroscopes and accelerometers are employed as sensors to measure the orientation of the quadcopter, while the attitude controller ensures that the system achieves the desired roll and pitch angles. The implementation of the roll and pitch angle control is carried out in MATLAB Simulink, with the results presented in Figure 2 and Figure 3, demonstrating that both the roll and pitch angles accurately follow their respective reference trajectories. The performance of the control law is evaluated using five key indices, including Integral Square Error (ISE), Integral Absolute Error (IAE), Integral Time Absolute Error (ITAE), Integral Time Square Error (ITSE), and Root Mean Square Error (RMSE). These indices, calculated from the error signal, reflect the tracking accuracy, with lower values indicating improved performance.
In the simulation setup, the initial conditions of all states are set to zero. However, it is important to note that the reference signal does not necessarily begin from zero. As shown in Figure 2, the roll angle reference signal ( x 1 r e f ) begins at zero, while the pitch angle reference signal ( x 3 r e f ) starts from one, as depicted in Figure 3. Notably, the roll state ( x 1 ) exhibits a minimal steady-state error of 9.059 × 10 8 for the 3-CABIT-STSMC controller, indicating that the system effectively follows the reference signal, thereby demonstrating superior performance, as summarized in Table 4. For the pitch angle, the actual pitch state ( x 3 ) quickly aligns with the reference signal, maintaining the desired trajectory with a reaching time of 0.93 milliseconds and a steady-state error of 9.194 × 10 7 . The 3-CABIT-STSMC controller demonstrates superior performance in pitch angle tracking, as supported by the performance indices presented in Table 5.

4.2. Heading Controller

The yaw angle of the quadcopter is important for determining its orientation and direction, which is essential for navigating predefined flight paths, following waypoints, and maintaining a specific course. To achieve this, the heading controller facilitates the adjustment of the quadcopter direction during flight. The controller utilizes input data from a compass or GPS to assess the current heading and subsequently adjusts motor speeds to modify the heading, thereby ensuring the quadcopter adheres to its intended trajectory. The results of the optimized control laws for yaw angle, represented by state ( x 5 ), are presented in Figure 4.
The 3-CABIT-STSMC controller demonstrates exceptionally low errors in yaw tracking, achieving a steady-state error of 6.71 × 10 8 . Other performance indices are outlined in Table 6. The proposed controller exhibits outstanding accuracy, with an ITAE of 1.3985 × 10 5 . While all controllers show comparable performance, the optimized 3-CABIT-STSMC outperforms existing controllers presented in the literature.

4.3. Position Controller

The precise determination of position using x and y coordinates allows the quadcopter to navigate accurately and follow designated flight paths. Accurate positioning is essential for effectively carrying out mission objectives, such as conducting aerial surveys or delivering payloads, ensuring that the UAV reaches its intended destination with precision. To ensure safe operation in airspace shared with other UAVs, it is essential to implement a position controller to regulate the x and y positions. The controller utilizes sensor data, such as GPS or visual odometry, to determine the current position of the quadcopter and adjusts motor speeds to correct the aerial position. Figure 5 and Figure 6 illustrate the results of implementing the proposed optimized controller for the x and y positions, showing that both accurately follow their respective reference trajectories.
The performance of the position controller is evaluated using a complex reference signal to ensure a comprehensive analysis. Notably, the reference signals are not constrained to start from zero, allowing for a more robust examination of the controller capabilities. As depicted in Figure 5, the x-position reference signal ( x 7 r e f ) starts at zero, whereas the y-position reference signal ( x 9 r e f ) begins at one, as illustrated in Figure 6. The 3-CABIT-STSMC controller demonstrates minimal error in tracking the x-position state ( x 7 ), achieving a steady-state error of 3.895 × 10 7 . For the y-position state ( x 9 ), the controller effectively tracks the reference signal, maintaining the trajectory with a reaching time of 1.1 ms and a steady-state error of 4.058 × 10 5 . Overall, as outlined in Table 7 and Table 8, the proposed controller consistently outperforms other controllers in tracking both x and y positions.

4.4. Altitude Controller

Maintaining specific altitude is essential for achieving optimal performance in various missions, which is why an altitude controller is implemented to regulate the quadcopter height. This controller utilizes data from sensors, such as barometers, GPS units, or ultrasonic sensors, to generate a reference signal, allowing it to compare the actual altitude of the quadcopter. By adjusting motor speeds, the altitude controller modifies the height, ensuring the quadcopter remains on course. The altitude control results, obtained using the proposed optimized controller, are shown in Figure 7.
As the quadcopter tracks the altitude trajectory, the 3-CABIT-STSMC controller demonstrates minimal error, achieving a steady-state error of 1.029 × 10 7 . A summary of the performance indices for altitude control using various methods is provided in Table 9. The 3-CABIT-STSMC demonstrates an impressive Integral Time Absolute Error (ITAE) of 2.0466 × 10 6 . While all control laws show comparable performance in altitude tracking, the proposed optimized controller proves to be more effective than those reported in the literature.

5. Comparative Assessment of Control Laws

In this section, the performance of the optimized 3-CABIT-STSMC controller is compared with controllers explained in the literature through the implementation of a helical trajectory. The trajectory requires the UAV to move along a three-dimensional spiral, which is achieved by managing three key angles, which include roll ( ϕ d ), pitch ( θ d ), and yaw ( ψ d ). These angles define the desired orientation of the quadcopter as it navigates along the helical path. The specific values for each parameter are provided by the following equations:
ϕ d = 3 s i n ( t ) θ d = 4 c o s ( t ) ψ d = 0.1 ( t )
Figure 8 illustrates the complex 3D helical trajectory generated by the proposed optimized controller. The controller closely follows the desired path throughout the mission, outperforming previously developed controllers. This demonstrates the capability of the controller to navigate complex flight patterns while maintaining high precision in its movements.
Furthermore, the tracking performance of a helix defined by random coordinates is assessed by considering three variables representing the x, y, and z positions. These values define the desired spatial coordinates for the quadcopter as it follows the helical path. Figure 9 depicts the complex 3D helical trajectory produced by various implemented controllers. The results demonstrate that the 3-CABIT-STSMC controller effectively tracks the desired randomized helical path throughout the entire mission. The ability to track the trajectory with such precision not only showcases the effectiveness of the proposed controller but also underscores their proficiency in executing complex flight maneuvers with a high degree of stability and accuracy, which is essential for tasks requiring consistent and reliable spatial coverage.

Controller Performance Under Disturbance

In this section, we evaluate the robustness of the proposed controller and assess its performance under disturbance conditions. To simulate real-world, harsh environments, the quadcopter is modeled to replicate disturbances such as wind, which are commonly encountered in outdoor applications like agricultural pesticide spraying, where these disturbances pose significant challenges. To simulate such disturbances, we introduce random Gaussian noise with a zero mean and a variance of 0.02 at a frequency of 100 Hz, as described in [36]. This noise is applied to the roll state x 1 , and the proposed controller is evaluated under these conditions. As shown in Figure 10, the controller performs effectively, with the upper section of the figure demonstrating that the roll controller accurately tracks the reference signal, achieving an ITAE value of 3.455 × 10 3 . Meanwhile, the lower section of the figure illustrates the disturbance applied to the system, providing a clear visual representation of the noise.

6. CIL Implementation

The implementation of a controller-in-the-loop (CIL) system is an essential component for evaluating the performance of quadcopter control algorithms under realistic operational conditions. By offering a testing platform that closely mirrors real-world scenarios, the CIL system effectively bridges the gap between simulation and practical application. It further enables a detailed evaluation of controller performance in actual conditions, providing valuable insights into its practical effectiveness. The CIL framework, shown in Figure 11, serves as a platform for the experimental analysis and performance evaluation of the 3-CABIT-STSMC controller.
The DELFINO C2000 Launchpad F28379D microcontroller is utilized as a testbed for the CIL implementation. This high-performance microcontroller ensures the seamless integration of MATLAB Simulink with hardware, providing a robust platform for real-time control execution and performance assessment. The experimental setup closely mimics real-world conditions, providing an opportunity for a detailed evaluation of controller effectiveness in practical applications. As described in [20], a similar technique has been applied to establish communication between the TMS320F28379D microcontroller and a PC. To implement the CIL, the subsequent steps are performed:
  • Continuous operators and blocks within the MATLAB Simulink model are converted to their discrete counterparts.
  • The code is compiled in MATLAB and subsequently deployed to the microcontroller.
  • System parameters are adjusted for the implementation of the CIL.
  • Through the USB port, feedback is obtained, enabling the TMS320F28379D microcontroller to generate control signals.
  • Feedback signals from the discretized model are processed by the controller, which then generates control signals to adjust the quadcopter motor inputs.
The quadcopter model is connected to the Delfino microcontroller via MATLAB Simulink, with the proposed controller implemented on the microcontroller. The system runs in discrete mode within Simulink, where the solver is configured with a fixed-step size of 10 4 . A sampling time of 10 4 is used throughout the conversion from continuous to discrete blocks. The results from the CIL setup for angular control are presented in Figure 12, and those for position control are shown in Figure 13.
The numerical simulation results show higher accuracy than the CIL implementation; however, the CIL setup is still able to track the trajectory effectively. As seen in Figure 12 and Figure 13, the CIL results are marginally less precise than the simulation results due to factors such as the discretization of continuous systems, hardware limitations, electrical noise from nearby equipment, and signal interference. Despite these small discrepancies, the CIL implementation is an important tool for evaluating the effectiveness of quadcopter control strategies in practical scenarios.

7. Conclusions

This study proposes a control strategy, the Third-order Conditioned Adaptive Barrier-based Integral Terminal Super-Twisting Sliding-Mode Control (3-CABIT-STSMC), aimed at managing quadcopter trajectories by precisely regulating attitude, heading, position, and altitude to ensure adherence to desired flight paths. The quadcopter system was simulated using Lagrangian principles within MATLAB Simulink, followed by a Lyapunov stability analysis to verify the system stability. A comparative analysis was conducted to evaluate the performance of the proposed controller against existing control strategies. For gain parameter tuning, Particle Swarm Optimization techniques were employed, and the effectiveness of the control law was assessed using five performance indices: ISE, IAE, ITAE, ITSE, and RMSE. To evaluate the performance of the proposed controller in practical scenarios, a Controller-in-the-Loop (CIL) implementation was carried out using the DELFINO C2000 Launchpad F28379D microcontroller as the testbed. The system was configured with a sampling time of 10 4 for implementing the proposed controller in MATLAB Simulink, ensuring accurate real-time performance evaluation. The results demonstrated that the proposed 3-CABIT-STSMC controller effectively tracked the quadcopter trajectory, showcasing its capability to perform well under practical conditions.

Author Contributions

Conceptualization, M.R.C.; methodology, M.R.C., I.A., A.M. and M.A.; software, M.R.C.; validation, M.R.C., A.M. and M.A.; formal analysis, M.R.C. and M.A.; resources, I.A., M.I. and D.A.; writing—original draft preparation, M.R.C.; writing—review and editing, M.A.; visualization, A.M., M.I. and D.A.; supervision, I.A., M.I. and D.A.; funding acquisition, M.I. and D.A. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the research project: Vision-Guided Precise Landing of Quadcopters Using Open-Source Flight Controllers and IoT Integration; Prince Sultan University; Saudi Arabia (grant number: SEED-2024-CE–185), and by the Prince Sultan Defense Studies and Research Center (PSDSARC) (grant number: PID-000085-01-04).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

The authors would like to acknowledge the support and resources provided by Prince Sultan University, Saudi Arabia.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Stevek, J.; Fikar, M. Teaching Aids for Laboratory Experiments with AR.Drone2 Quadrotor. IFAC-PapersOnLine 2016, 49, 236–241. [Google Scholar] [CrossRef]
  2. Fraundorfer, F.; Heng, L.; Honegger, D.; Lee, G.H.; Meier, L.; Tanskanen, P.; Pollefeys, M. Vision-based autonomous mapping and exploration using a quadrotor MAV. In Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, Vilamoura-Algarve, Portugal, 7–12 October 2012; pp. 4557–4564. [Google Scholar] [CrossRef]
  3. Almasoud, A.S.; Hassine, S.B.H.; Nemri, N.; Al-Wesabi, F.N.; Hamza, M.A.; Hilal, A.M.; Motwakel, A.; Duhayyim, M.A. Metaheuristic Based Data Gathering Scheme for Clustered UAVs in 6G Communication Network. Comput. Mater. Contin. 2022, 71, 5311–5325. [Google Scholar] [CrossRef]
  4. Khalil, H.; Rahman, S.U.; Ullah, I.; Khan, I.; Alghadhban, A.J.; Al-adhaileh, M.H.; Ali, G.; Elaffendi, M. A UAV-Swarm-Communication Model Using a Machine-Learning Approach for Search-and-Rescue Applications. Drones 2022, 6, 372. [Google Scholar] [CrossRef]
  5. Alotaibi, E.T.; Alqefari, S.S.; Koubaa, A. LSAR: Multi-UAV Collaboration for Search and Rescue Missions. IEEE Access 2019, 7, 55817–55832. [Google Scholar] [CrossRef]
  6. Luo, Y.; Jiang, Y.; Zhao, Z.; Yang, S.; Quan, Q. A pesticide spraying mission assignment performed by multi-quadcopters and its simulation platform establishment. In Proceedings of the 2016 IEEE Chinese Guidance, Navigation and Control Conference (CGNCC), Nanjing, China, 12–14 August 2016; pp. 1980–1985. [Google Scholar] [CrossRef]
  7. Subba Rao, V.P.; Rao, G.S. Design and Modelling of anAffordable UAV Based Pesticide Sprayer in Agriculture Applications. In Proceedings of the 2019 Fifth International Conference on Electrical Energy Systems (ICEES), Chennai, India, 21–22 February 2019; pp. 1–4. [Google Scholar] [CrossRef]
  8. Udeanu, G.; Dobrescu, A.; Oltean, M. Unmanned Aerial Vehicle in Military Operations. Sci. Res. Educ. Air Force 2016, 18, 199–206. [Google Scholar] [CrossRef]
  9. Bashir, M.H.; Ahmad, M.; Rizvi, D.R.; El-Latif, A.A.A. Efficient CNN-based disaster events classification using UAV-aided images for emergency response application. Neural Comput. Appl. 2024, 36, 10599–10612. [Google Scholar] [CrossRef]
  10. Ali, A.; Nisar, S.; Khan, M.A.; Mohsan, S.A.H.; Noor, F.; Mostafa, H.; Marey, M. A Privacy-Preserved Internet-of-Medical-Things Scheme for Eradication and Control of Dengue Using UAV. Micromachines 2022, 13, 1702. [Google Scholar] [CrossRef] [PubMed]
  11. Menon, U.K.; Ponmalar, M.; Sreeja, S. Altitude and Attitude Control of X-Configuration Quadrotor Design. In Proceedings of the 2023 International Conference on Control, Communication and Computing (ICCC), Thiruvananthapuram, India, 19–21 May 2023; pp. 1–6. [Google Scholar] [CrossRef]
  12. Esmail, M.S.; Merzban, M.H.; Khalaf, A.A.M.; Hamed, H.F.A.; Hussein, A.I. Attitude and Altitude Tracking Controller for Quadcopter Dynamical Systems. IEEE Access 2022, 10, 53344–53358. [Google Scholar] [CrossRef]
  13. Bianchi, D.; Epicoco, N.; Di Ferdinando, M.; Di Gennaro, S.; Pepe, P. Physics-Informed Neural Networks for Unmanned Aerial Vehicle System Estimation. Drones 2024, 8, 716. [Google Scholar] [CrossRef]
  14. Carvajal, C.P.; Andaluz, V.H.; Varela-Aldás, J.; Roberti, F.; Del-Valle-Soto, C.; Carelli, R. Visual Servoing Using Sliding-Mode Control with Dynamic Compensation for UAVs’ Tracking of Moving Targets. Drones 2024, 8, 730. [Google Scholar] [CrossRef]
  15. Bouadi, H.; Bouchoucha, M.; Tadjine, M. Sliding Mode Control Based on Backstepping Approach for an UAV Type-Quadrotor. World Acad. Sci. Eng. Technol. Int. J. Mech. Aerosp. Ind. Mechatron. Manuf. Eng. 2007, 1, 39–44. [Google Scholar]
  16. Almakhles, D.J. Robust Backstepping Sliding Mode Control for a Quadrotor Trajectory Tracking Application. IEEE Access 2020, 8, 5515–5525. [Google Scholar] [CrossRef]
  17. Chaoraingern, J.; Tipsuwanporn, V.; Numsomran, A. Modified Adaptive Sliding Mode Control for Trajectory Tracking of Mini-drone Quadcopter Unmanned Aerial Vehicle. Int. J. Intell. Eng. Syst. 2020, 13, 145–158. [Google Scholar] [CrossRef]
  18. Eltayeb, A.; Rahmat, M.F.; Basri, M.A.M.; Eltoum, M.A.M.; Mahmoud, M.S. Integral Adaptive Sliding Mode Control for Quadcopter UAV Under Variable Payload and Disturbance. IEEE Access 2022, 10, 94754–94764. [Google Scholar] [CrossRef]
  19. Chen, X. Barrier Function-Based Adaptive Super-Twisting Integral Terminal Sliding Mode Control for a Quad-Rotor UAV. IEEE Access 2024, 12, 3992–3999. [Google Scholar] [CrossRef]
  20. Mughees, A.; Ahmad, I.; Mughees, N.; Mughees, A. Conditioned adaptive barrier-based double integral super twisting SMC for trajectory tracking of a quadcopter and hardware in loop using IGWO algorithm. Expert Syst. Appl. 2024, 235, 121141. [Google Scholar] [CrossRef]
  21. Ahmad, I.; Liaquat, M.; Malik, F.M. A Non-Linear Improved Double-Integral Sliding Mode Controller (IDI-SMC) for Modeling and Simulation of 6 (DOF) Quadrotor system. Iop Conf. Ser. Mater. Sci. Eng. 2020, 853, 12035. [Google Scholar] [CrossRef]
  22. Eltayeb, A.; Rahmat, M.F.; Basri, M.A.M.; Eltoum, M.A.M.; El-Ferik, S. An Improved Design of an Adaptive Sliding Mode Controller for Chattering Attenuation and Trajectory Tracking of the Quadcopter UAV. IEEE Access 2020, 8, 205968–205979. [Google Scholar] [CrossRef]
  23. Kuang, J.; Chen, M. Adaptive Sliding Mode Control for Trajectory Tracking of Quadrotor Unmanned Aerial Vehicles Under Input Saturation and Disturbances. Drones 2024, 8, 614. [Google Scholar] [CrossRef]
  24. Eltayeb Taha, A. Robust Adaptive Sliding Mode Control Design for Quadrotor Unmanned Aerial Vehicle Trajectory Tracking. Int. J. Comput. Digit. Syst. 2020, 9, 249–257. [Google Scholar] [CrossRef]
  25. Zhao, X.; Tian, B.; You, M.; Ma, L. Adaptive Distributed Sliding Mode Control for Multiple Unmanned Aerial Vehicles with Prescribed Performance. IEEE Trans. Veh. Technol. 2022, 71, 11480–11490. [Google Scholar] [CrossRef]
  26. Elhennawy, A.M.; Habib, M.K. Trajectory tracking of a quadcopter flying vehicle using sliding mode control. In Proceedings of the IECON 2017—43rd Annual Conference of the IEEE Industrial Electronics Society, Beijing, China, 29 October–1 November 2017; pp. 6264–6269. [Google Scholar] [CrossRef]
  27. Matouk, D.; Abdessemed, F.; Gherouat, O.; Terchi, Y. Second-Order Sliding Mode for Position and Attitude Tracking Control of Quadcopter UAV: Super-Twisting Algorithm. Int. J. Innov. Comput. Inf. Control IJICIC 2020, 16, 29–43. [Google Scholar] [CrossRef]
  28. Noordin, A.; Basri, A.; Mohamed, Z.; Mat Lazim, I. Adaptive PID Controller Using Sliding Mode Control Approaches for Quadrotor UAV Attitude and Position Stabilization. Arab. J. Sci. Eng. 2020, 46, 963–981. [Google Scholar] [CrossRef]
  29. Le Nhu Ngoc Thanh, H.; Hong, S.K. Quadcopter Robust Adaptive Second Order Sliding Mode Control Based on PID Sliding Surface. IEEE Access 2018, 6, 66850–66860. [Google Scholar] [CrossRef]
  30. Mamo, M.B. Trajectory Control of Quadcopter by Designing Second Order SMC Controller. J. Electr. Eng. Electron. Control Comput. Sci. 2021, 7, 11–20. [Google Scholar]
  31. Zheng, E.H.; Xiong, J.J.; Luo, J.L. Second order sliding mode control for a quadrotor UAV. ISA Trans. 2014, 53, 1350–1356. [Google Scholar] [CrossRef] [PubMed]
  32. Xu, Q. Adaptive Integral Terminal Third-Order Finite-Time Sliding-Mode Strategy for Robust Nanopositioning Control. IEEE Trans. Ind. Electron. 2021, 68, 6161–6170. [Google Scholar] [CrossRef]
  33. Mamo, M.B. Trajectory tracking control of quadcopter by designing third order SMC controller. GSJ 2020, 8, 2100–2108. [Google Scholar]
  34. Saif, A.W.A.; Gaufan, K.B.; El-Ferik, S.; Al-Dhaifallah, M. Fractional Order Sliding Mode Control of Quadrotor Based on Fractional Order Model. IEEE Access 2023, 11, 79823–79837. [Google Scholar] [CrossRef]
  35. Shi, X.; Cheng, Y.; Yin, C.; Zhong, S.; Huang, X.; Chen, K.; Qiu, G. Adaptive Fractional-Order SMC Controller Design for Unmanned Quadrotor Helicopter Under Actuator Fault and Disturbances. IEEE Access 2020, 8, 103792–103802. [Google Scholar] [CrossRef]
  36. Alkamachi, A.; Erçelebi, E. A proportional derivative sliding mode control for an overactuated quadcopter. Proc. Inst. Mech. Eng. Part G J. Aerosp. Eng. 2019, 233, 1354–1363. [Google Scholar] [CrossRef]
  37. Al-Dhaifallah, M.; Al-Qahtani, F.M.; Elferik, S.; Saif, A.W.A. Quadrotor Robust Fractional-Order Sliding Mode Control in Unmanned Aerial Vehicles for Eliminating External Disturbances. Aerospace 2023, 10, 665. [Google Scholar] [CrossRef]
  38. Rubí, B.; Pérez, R.; Morcego, B. A Survey of Path Following Control Strategies for UAVs Focused on Quadrotors. J. Intell. Robot. Syst. 2020, 98, 241–265. [Google Scholar] [CrossRef]
  39. Nascimento, T.P.; Saska, M. Position and attitude control of multi-rotor aerial vehicles: A survey. Annu. Rev. Control 2019, 48, 129–146. [Google Scholar] [CrossRef]
  40. Ahn, H.; Mingyuan, H.; Chung, Y.; You, K. Sliding-Mode Control for Flight Stability of Quadrotor Drone Using Adaptive Super-Twisting Reaching Law. Drones 2023, 7, 522. [Google Scholar] [CrossRef]
  41. Mughees, A.; Ahmad, I.; Nawaz Jadoon, A. Enhanced Nonlinear Control for Trajectory Tracking Control of a Quad-Copter System Using Redfox Algorithm. IEEE Access 2024, 12, 86618–86630. [Google Scholar] [CrossRef]
  42. Marini, F.; Walczak, B. Particle swarm optimization (PSO). A tutorial. Chemom. Intell. Lab. Syst. 2015, 149, 153–165. [Google Scholar] [CrossRef]
  43. del Valle, Y.; Venayagamoorthy, G.K.; Mohagheghi, S.; Hernandez, J.C.; Harley, R.G. Particle Swarm Optimization: Basic Concepts, Variants and Applications in Power Systems. IEEE Trans. Evol. Comput. 2008, 12, 171–195. [Google Scholar] [CrossRef]
  44. Islam, M.M.; Siffat, S.A.; Ahmad, I.; Liaquat, M. Supertwisting and terminal sliding mode control of course keeping for ships by using particle swarm optimization. Ocean Eng. 2022, 266, 112942. [Google Scholar] [CrossRef]
  45. Navabi, M.; Davoodi, A.; Mirzaei, H. Trajectory tracking of under-actuated quadcopter using Lyapunov-based optimum adaptive controller. Proc. Inst. Mech. Eng. Part G J. Aerosp. Eng. 2022, 236, 202–215. [Google Scholar] [CrossRef]
  46. Zhang, Y.; Wang, L.; Zhang, H.; Iwasaki, M. Optimal Intelligent Chassis Layout Design Framework Based on Particle Swarm Optimization and Robust Finite-Frequency H Control. IEEE Trans. Veh. Technol. 2023, 72, 12814–12829. [Google Scholar] [CrossRef]
  47. Zhang, W.; Zhang, W. An Efficient UAV Localization Technique Based on Particle Swarm Optimization. IEEE Trans. Veh. Technol. 2022, 71, 9544–9557. [Google Scholar] [CrossRef]
  48. Parihar, P.; Bhawsar, P.; Hargod, P. Design & development analysis of quadcopter. COMPUSOFT Int. J. Adv. Comput. Technol. 2016, 5, 2128–2133. [Google Scholar]
  49. Derafa, L.; Madani, T.; Benallegue, A. Dynamic Modelling and Experimental Identification of Four Rotors Helicopter Parameters. In Proceedings of the 2006 IEEE International Conference on Industrial Technology, Mumbai, India, 15–17 December 2006; pp. 1834–1839. [Google Scholar]
  50. Rahman, A.U.; Ahmad, I.; Malik, A.S. Variable structure-based control of fuel cell-supercapacitor-battery based hybrid electric vehicle. J. Energy Storage 2020, 29, 101365. [Google Scholar] [CrossRef]
Figure 1. Frame of Reference.
Figure 1. Frame of Reference.
Drones 09 00172 g001
Figure 2. Roll angle controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Figure 2. Roll angle controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Drones 09 00172 g002
Figure 3. Pitch angle controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Figure 3. Pitch angle controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Drones 09 00172 g003
Figure 4. Yaw angle controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Figure 4. Yaw angle controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Drones 09 00172 g004
Figure 5. x-axis position controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Figure 5. x-axis position controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Drones 09 00172 g005
Figure 6. y-axis position controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Figure 6. y-axis position controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Drones 09 00172 g006
Figure 7. z-axis position controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Figure 7. z-axis position controller performance comparison with CABDIST-SMC of [20] (blue line) and with PD-SMC of [36] (green line).
Drones 09 00172 g007
Figure 8. Complex helical trajectories for pitch, roll, and yaw: comparison with CABDIST-SMC from [20] (blue line) and PD-SMC from [36] (green line).
Figure 8. Complex helical trajectories for pitch, roll, and yaw: comparison with CABDIST-SMC from [20] (blue line) and PD-SMC from [36] (green line).
Drones 09 00172 g008
Figure 9. Complex helical trajectories for x, y and z-coordinates: comparison with CABDIST-SMC from [20] (blue line) and PD-SMC from [36] (green line).
Figure 9. Complex helical trajectories for x, y and z-coordinates: comparison with CABDIST-SMC from [20] (blue line) and PD-SMC from [36] (green line).
Drones 09 00172 g009
Figure 10. Performance Evaluation Under Disturbance.
Figure 10. Performance Evaluation Under Disturbance.
Drones 09 00172 g010
Figure 11. Controller-in-the-loop setup.
Figure 11. Controller-in-the-loop setup.
Drones 09 00172 g011
Figure 12. CIL Performance for Angle Control.
Figure 12. CIL Performance for Angle Control.
Drones 09 00172 g012
Figure 13. CIL Performance for Position Control.
Figure 13. CIL Performance for Position Control.
Drones 09 00172 g013
Table 1. Comparative Analysis of SMC Strategies and Parameter Selection for Quadcopter Systems.
Table 1. Comparative Analysis of SMC Strategies and Parameter Selection for Quadcopter Systems.
Control TechniqueSliding Surface CriteriaControl Signal SaturationOptimization TechniqueMethod for Chattering ReductionControl Problem
Adaptive Super-Twisting SMC [40]PDXAdaptiveSuper-TwistingPosition and Attitude
Adaptive PID using SMC [28]PIDXGradient and Chain RuleFuzzy CompensatorAttitude and Position
Adaptive Sliding-Mode Controller [22]PDXAdaptiveApproximation of sign FunctionExternal and Internal Loops
CABDIST-SMC [20]PDImproved Grey Wolf OptimizationBarrier Function and Double IntegralTrajectory Tracking
Double-Integral SMC [21]PIIXXDouble IntegralAttitude and Altitude
Second-order SMC [31]PDXXSecond-order SMCExternal and Internal Loops
SMC based on Backstepping [15]PD with BacksteppingXXXTrajectory Tracking
Backstepping Sliding-Mode Control [16]P with Backstepping and PIDXXXAttitude and Position
Barrier-Based Adaptive Super-Twisting Integral Terminal SMC [19]PIDAdaptiveSuper-TwistingAttitude and Altitude
Adaptive SMC [23]PDAdaptiveXTrajectory Tracking
Adaptive Second-Order SMC [29]PIDXAdaptiveSat FunctionAttitude and Altitude
Second-Order SMC [30]PDXXSuper-TwistingTrajectory Tracking
Proportional-Derivative SMC [36]PDXGenetic AlgorithmSigmoidal functionTrajectory Tracking
Fractional Order SMC [34]PD with Fractional OrderXXFractional OrderTrajectory Tracking
Robust Fractional Order SMC [37]PD with Fractional OrderXXFractional OrderAltitude and Attitude
Proposed SMCPID with Integral TerminalParticle Swarm OptimizationSat Function and Super-TwistingTrajectory Tracking
Table 2. Optimized gain values using PSO.
Table 2. Optimized gain values using PSO.
Controller k pj k ij k dj λ j 1 λ j 2 α j ρ j 1 δ j 1 ρ j 2 δ j 2 β j γ j ϵ j
u 2 ( ϕ ) , j = 1 85.07394.21.607402.297.053.000448.81.292190.495.010.9451.0502.021
u 3 ( θ ) , j = 2 13.09298.40.002821.2173.23.000239.02.26360.7462.941.1541.2512.360
u 4 ( ψ ) , j = 3 93.52384.90.897414.5114.23.000451.20.878201.389.150.9230.8851.918
u x ( x ) , j = 4 119.4363.60.776387.273.373.000417.90.552207.182.270.7240.9752.182
u y ( y ) , j = 5 150.8426.60.022515.585.793.000465.93.250166.7106.61.1401.0892.620
u 1 ( z ) , j = 6 85.54360.18.281312.176.981.000415.90.110231.160.390.9621.0112.049
Table 3. System Parameter Values [15].
Table 3. System Parameter Values [15].
ParameterValue (Unit)
K p 2.9842 × 10 5 N·m/rad/s
K d 3.2320 × 10 7 N·m/rad/s
m486 g
d25 cm
J d i a g ( 3.8278 ; 3.8288 ; 7.6566 ) × 10 3 N · m / rad / s 2
K f a d i a g ( 5.5670 ; 5.5670 ; 6.3540 ) × 10 4 N·m/rad/s
K f t d i a g ( 5.5670 ; 5.5670 ; 6.3540 ) × 10 4 N·m/rad/s
J r 2.8385 × 10 5 N · m / rad / s 2
β 0 189.63
β 1 6.0612
β 2 0.0122
b 280.19
Table 4. Control laws performance for roll angle control.
Table 4. Control laws performance for roll angle control.
ControllerISEIAEITAEITSERMSE
3-CABIT-STSMC 9.9974 × 10 11 8.8862 × 10 6 2.0378 × 10 5 1.1562 × 10 11 1.1531 × 10 6
CABDIST-SMC [20] 1.2079 × 10 5 6.9000 × 10 3 0.0435 1.3796 × 10 5 3.4821 × 10 4
PD-SMC [36] 3.1124 × 10 4 0.02290.0285 1.1128 × 10 4 1.4000 × 10 3
Table 5. Control laws performance for pitch angle control.
Table 5. Control laws performance for pitch angle control.
ControllerISEIAEITAEITSERMSE
3-CABIT-STSMC 7.7266 × 10 5 3.0246 × 10 4 2.9593 × 10 5 1.1389 × 10 8 0.0257
CABDIST-SMC [20] 1.4449 × 10 4 0.02230.2009 2.9531 × 10 4 0.0285
PD-SMC [36]0.12160.19490.03370.01020.0570
Table 6. Control laws performance for yaw angle control.
Table 6. Control laws performance for yaw angle control.
ControllerISEIAEITAEITSERMSE
3-CABIT-STSMC 4.1383 × 10 11 5.8451 × 10 6 1.3985 × 10 5 4.8090 × 10 12 7.7931 × 10 7
CABDIST-SMC [20] 1.3197 × 10 5 4.3000 × 10 3 6.2000 × 10 3 4.9050 × 10 6 2.9439 × 10 4
PD-SMC [36] 4.2896 × 10 6 1.7000 × 10 3 5.8222 × 10 4 9.4580 × 10 7 1.5024 × 10 4
Table 7. Control laws performance for x-axis control.
Table 7. Control laws performance for x-axis control.
ControllerISEIAEITAEITSERMSE
3-CABIT-STSMC 6.0782 × 10 11 3.8828 × 10 6 5.4359 × 10 6 1.8503 × 10 12 3.1523 × 10 6
CABDIST-SMC [20] 1.3780 × 10 4 6.0000 × 10 3 2.8000 × 10 3 1.4221 × 10 5 8.2199 × 10 4
PD-SMC [36] 3.0947 × 10 4 0.02100.0179 1.0539 × 10 4 1.4000 × 10 3
Table 8. Control laws performance for y-axis control.
Table 8. Control laws performance for y-axis control.
ControllerISEIAEITAEITSERMSE
3-CABIT-STSMC 7.3365 × 10 5 2.9415 × 10 4 6.8490 × 10 5 1.0634 × 10 8 0.0253
CABDIST-SMC [20] 1.8607 × 10 4 0.01550.0709 1.4254 × 10 4 0.0313
PD-SMC [36]0.12160.19490.03370.01020.0570
Table 9. Control laws performance for z-axis control.
Table 9. Control laws performance for z-axis control.
ControllerISEIAEITAEITSERMSE
3-CABIT-STSMC 1.1628 × 10 11 2.8256 × 10 6 2.0466 × 10 6 1.5474 × 10 12 3.1110 × 10 7
CABDIST-SMC [20] 9.7658 × 10 6 7.9000 × 10 3 0.0419 4.0160 × 10 5 1.7000 × 10 3
PD-SMC [36] 3.6705 × 10 4 0.02690.0319 2.5076 × 10 4 1.8000 × 10 3
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chughtai, M.R.; Ahmad, I.; Mughees, A.; Iqbal, M.; Almakhles, D.; Abdelrahim, M. Third-Order Sliding Mode Control for Trajectory Tracking of Quadcopters Using Particle Swarm Optimization. Drones 2025, 9, 172. https://doi.org/10.3390/drones9030172

AMA Style

Chughtai MR, Ahmad I, Mughees A, Iqbal M, Almakhles D, Abdelrahim M. Third-Order Sliding Mode Control for Trajectory Tracking of Quadcopters Using Particle Swarm Optimization. Drones. 2025; 9(3):172. https://doi.org/10.3390/drones9030172

Chicago/Turabian Style

Chughtai, Muhammad Rizwan, Iftikhar Ahmad, Abdullah Mughees, Muddesar Iqbal, Dhafer Almakhles, and Mahmoud Abdelrahim. 2025. "Third-Order Sliding Mode Control for Trajectory Tracking of Quadcopters Using Particle Swarm Optimization" Drones 9, no. 3: 172. https://doi.org/10.3390/drones9030172

APA Style

Chughtai, M. R., Ahmad, I., Mughees, A., Iqbal, M., Almakhles, D., & Abdelrahim, M. (2025). Third-Order Sliding Mode Control for Trajectory Tracking of Quadcopters Using Particle Swarm Optimization. Drones, 9(3), 172. https://doi.org/10.3390/drones9030172

Article Metrics

Back to TopTop