1. Introduction
Unmanned Aerial Vehicles (UAVs) are generally classified into fixed-wing and rotary-wing types, with multirotors, a subset of rotary-wing UAVs, being actively researched in recent years. Multi-rotors are capable of vertical take-off and landing (VTOL) and hovering in place by controlling the thrust of each rotor, making them suitable for military missions such as surveillance, reconnaissance, target recovery, and damage assessment [
1,
2,
3]. Additionally, their use has expanded into civilian sectors, including aerial photography, environmental monitoring, building inspection, and disaster management [
4,
5]. However, as the use of multirotors increases, the number of accidents is also rising, with in-flight crashes being the most common [
6,
7].
One of the main causes of drone accidents is environmental factors such as gusts, which account for approximately 30% of all accidents [
8]. Particularly in critical flight stages like landing, these factors significantly affect the stability of drones. This study aims to develop technology that improves the attitude stability of drones in turbulent conditions, such as gusts, to address this vulnerability and enhance operational safety.
Although commercial multirotors are designed to ensure flight stability in wind speeds up to 10 m/s, slight changes in wind speed during flight can still destabilize the aircraft. As a lightweight vehicle, the multirotor has limitations in maintaining flight stability solely through speed control when faced with disturbances like wind gusts. Additionally, the mathematical modeling of multirotor systems can be inaccurate, leading to control performance degradation due to model uncertainty. Therefore, robust control techniques are essential to ensure safe and stable operation in disturbed environments [
9,
10,
11].
Nonlinear control methods used to ensure flight stability include sliding mode control (SMC), backstepping control, neural network control, and adaptive control. While backstepping control offers a systematic approach for nonlinear systems, it requires accurate knowledge of system nonlinearity and can cause rapid output changes [
12]. Neural network control optimizes performance by adjusting model variables and weights, but the complexity of the neural network increases the computational burden and slows down control [
13]. Adaptive control, whether model-based or non-model-based, also faces challenges in handling complex nonlinear models due to high computational demands.
These existing control techniques have limitations in addressing nonlinear dynamics and managing various environmental factors. Accurate and fast responses are often difficult to achieve in the presence of disturbances and model uncertainty. Sliding Mode Control (SMC) is robust against disturbances and uncertainties, allowing it to handle nonlinear dynamics without linearization by defining a sliding surface using system state variables [
14]. However, SMC has two significant drawbacks: first, chattering, which causes high-frequency oscillations, and second, slow convergence of state errors to zero [
15,
16]. To mitigate these issues, an improved reaching law has been proposed to reduce chattering, and this study applies Fast Terminal Sliding Mode Control (FTSMC) to ensure finite-time convergence [
17,
18,
19,
20].
Nevertheless, maintaining attitude stability solely through rotor speed control is challenging under disturbances. To address this, Control Moment Gyros (CMGs), which generate large torques using gyroscopic effects, have been introduced. CMGs are widely used for attitude control in high-agility spacecraft, and recently, they have been applied to multirotor systems to improve flight stability [
21,
22,
23,
24,
25]. Structurally, CMGs consist of a flywheel and a gimbal and are classified into Variable Speed CMGs (VSCMGs), which control both wheel speed and gimbal angle, and Constant Speed CMGs (CSCMGs), which only adjust the gimbal angle [
26,
27]. Despite their high performance, CMGs face a geometric singularity problem where they cannot generate control torque in certain directions. This issue arises due to the alignment of the CMG’s gimbal and mounting structure, with pyramid array configurations making it particularly difficult to avoid singularities [
28,
29,
30,
31].
In this study, two CSCMGs are mounted side by side along the X-axis of the multirotor to control roll and pitch movements. Yaw control was excluded since the multirotor’s moment of inertia along the Z-axis is relatively large, making it less sensitive to disturbances. However, achieving uniform angular momentum distribution across all axes is difficult, and the maximum angular momentum allowed on each axis is closely related to the initial gimbal angle. If the multirotor fails to restore the initial gimbal angle during hovering, singularities may arise. To address this, we propose an optimal angular momentum vector recovery law to prevent singularities and introduce a Disturbance Robust Drive Law (DRDL) to manage torque adjustments under disturbances [
21,
32,
33,
34,
35,
36].
This study proposes a novel approach to UAV attitude control based on a hexarotor. The research employs Fast Terminal Sliding Mode Control (FTSMC) to ensure robust performance and finite-time convergence under conditions of disturbance and model uncertainty, with stability verified through Lyapunov theory. Additionally, the Disturbance Robust Drive Law (DRDL) is utilized to address the singularity issues of Control Moment Gyros (CMGs), and numerical simulations compare the attitude control performance of the hexarotor with and without CMGs.
The primary contribution of this study goes beyond simply comparing the proposed method with existing control approaches. Instead, it introduces an innovative and practical solution for maintaining stability in disturbed environments by integrating a new actuator, the CMG, into a traditional UAV model. Specifically, the proposed Steering Logic restores the gimbal angles of the CMG to their initial configuration, effectively avoiding singularity issues and ensuring high operability during extended CMG operation. This novel framework addresses critical gaps in previous research, offering a reliable and practical system for UAV attitude control.
2. Modeling of UAVs
Multirotors have the advantage of not being constrained by space, as they can perform vertical take-offs and landings (VTOLs) and hover in place through the thrust control of each rotor. Generally, quadrotors are the most commonly used type due to their relatively simple and intuitive operation, but they have the disadvantage of lower flight stability. In this study, a hexarotor, which provides higher output and greater flight stability, and offers a system resistant to disturbances, was used.
To describe the dynamic motion of a hexarotor, it is essential to establish reference frames for both the inertial coordinate system and the body coordinate system. The body coordinate system of the hexarotor is fixed to the observer or the aircraft, while the inertial coordinate system is based on Newton’s first law, which describes a body at rest or in uniform motion unless acted upon by an external force. The inertial coordinate system is typically defined with respect to the center of the Earth. The hexarotor’s structure generates thrust, angular velocity, and torque through its six rotors, as illustrated in
Figure 1 [
37,
38,
39]. The dynamic motion of the hexarotor can be characterized by six degrees of freedom and represented by twelve state variables. The components in the inertial frame are defined as position
, Euler angles
, and quaternions
. While Euler angles offer intuitive interpretation, there is a risk of gimbal lock, leading to a loss of degrees of freedom [
40]. To address this issue and simplify computations, quaternions are employed to handle singularities. In this study, quaternions were used for mathematical modeling, and to facilitate intuitive interpretation of hexarotor operations, they were converted into Euler angles for analysis. In the body frame, velocity is defined as
, and angular velocity as
[
41].
2.1. Rotation Matrix
To derive the equation of motion for the hexarotor, it is essential to define the motion in a unified coordinate system. Quaternions are applied based on Euler’s rotation theorem, which allows the representation of rotational motion similarly to the translational motion of any rigid body with a fixed point. Quaternions, also known as Euler parameters, serve as the primary rotational factors and are expressed as four-dimensional vectors, providing an effective and singularity-free method for representing rotational dynamics. Quaternions simplify mathematical modeling and are particularly useful in avoiding singularity issues.
where
represents the angle of rotation with respect to the unit vector
.
Quaternions consist of four elements, and they are subject to the constraint that only one condition must be satisfied.
The direction cosine matrix from the body frame to the inertial frame is as follows.
where
is an orthogonal matrix, so
, and
is the matrix representation of the general vector product, which can be defined as a skew-symmetric matrix as follows.
2.2. Force and Torque
The thrust generated by a rotor is determined by the lift coefficient and the rotor’s angular velocity, while the total thrust of the hexarotor is the sum of the thrusts from all six rotors.
where
k is the lift coefficient of the rotor and
is the angular speed of each rotor.
The hexarotor rotates 60 degrees about the
axis, as shown in
Figure 1. Roll, pitch, and yaw moments can be calculated from the
and
components of the body frame and geometric structure. In this case, the effect of rotor angular acceleration
is negligible in the torque equation and is therefore ignored.
where
l represents the distance from the center of the hexarotor to each propeller,
b is the drag coefficient, and
denotes the moment of inertia of the rotor.
By combining the thrust and torque equations, the control input equation for the hexarotor can be derived.
where
represents the motor driving matrix of the hexarotor.
To enhance the operational performance of the hexarotor, the attitude is controlled through the thrust regulation of six motors, which requires considering the mathematical model of the motors. Hence, the simplified mathematical model of the BLDC motor used in the hexarotor is as follows.
where
represents the motor angular velocity,
denotes the moment of inertia of the motor,
is the torque constant,
represents the motor resistance,
is the back electromotive force constant, and
V refers to the applied voltage.
2.3. Mathematical Model of the UAV
The equation of motion for the attitude and position of the hexarotor can be described by the Newton–Euler equations. In the body frame, the centrifugal force
and the force due to mass acceleration
are equal to the gravitational force
and the thrust
of the UAV. The acceleration in the body frame can be expressed as follows.
where
m represents the total mass of the hexarotor, and
g denotes gravitational acceleration.
The expression for acceleration is as follows
To improve the actual flight behavior of the UAV, the aerodynamic effect caused by air resistance must be considered. Therefore, this effect can be mathematically expressed as follows:
In the body frame, the sum of the centripetal force
and the inertial angular acceleration
is equal to the torque
. The application of the Newton–Euler equation to rotational motion is as follows.
Adding disturbances here is as follows.
where
, and represent the moments of inertia of the hexarotor along the X-, Y-, and Z-axes, respectively, where denotes the torque disturbance, and refers to the torque of the hexarotor.
3. Modeling of UAV Using CMGs
The structure of the CMG consists of a gimbal rotor, spin rotor, and flywheel, and it can be categorized into two main types based on the control of the flywheel’s speed. The first is the Variable Speed CMG (VSCMG), which controls both the wheel’s rotational speed and the gimbal angle, and the second is the Constant Speed CMG (CSCMG), which maintains a constant rotational speed while only adjusting the gimbal angle. Additionally, CMGs can be classified according to the number of gimbal axes: single-axis gimbal CMGs and double-axis gimbal CMGs. In this study, two CSCMGs were used for attitude control.
The system is defined by a gimbal frame with unit vectors and the body frame. Here, a epresents the unit vector along the gimbal axis, b the unit vector along the spinning axis of the wheel, and c the unit vector along the torque axis. The components of the gimbal frame unit vectors are assumed to align with the hexarotor’s body reference frame.
In this study, as illustrated in
Figure 2, the CSCMG method was applied to simplify the resolution of singularity problems. Specifically, as shown in
Figure 3, two CMGs were mounted side by side along the X-axis of the body frame. This configuration contributes to roll and pitch motion control but does not affect yaw motion. The rationale for this choice is that the moment of inertia along the Z-axis of the hexarotor is larger than that of the other axes, making it less sensitive to disturbances. Therefore, a configuration that only influences roll and pitch motions was selected.
The CMG attached to the hexarotor can be represented in both the body frame of the hexarotor and the gimbal frame of the CMG. The rotation matrix that converts the gimbal frame to the body frame is defined as
.
The derivatives of the unit vectors derived from the CSCMG are given by the following expression.
In a hexarotor equipped with two CSCMGs, the system rotates with the angular velocity
of the hexarotor body, the spin rate
of the wheel disk relative to the gimbal frame, and the gimbal rate
of the gimbal frame relative to the body frame.
The angular velocity of the hexarotor relative to the body frame can be converted to the gimbal frame using the following equation.
where
is the angular vector with respect to the gimbal frame. The projection of the angular vector onto the gimbal frame follows the relationship shown below.
The gimbal direction unit vector
represents an axis fixed to the body frame, and when the gimbal angle
rotates around this axis, the gimbal angular velocity emerges. The gimbal angular velocity vector is defined as follows.
The total angular momentum of the CSCMG can be represented as the sum of the spin angular momentum and the gimbal angular momentum.
where
represents the angular momentum vector of the CSCMG,
denotes the internal momentum generated by the
i-th CSCMG, and
represents the moment of inertia of the
i-th CSCMG wheel.
The time derivative of
is equivalent to the torque generated by the CSCMG, as expressed below.
where
represents the torque output vector generated by the CSCMG. Since CSCMG was selected in this study, the angular velocity
is set to 0. Therefore, it can be expressed as follows.
where A represents the Jacobian matrix. The detailed derivation of the equations of motion without simplifications is thoroughly described in refs. [
27,
34,
42].
To derive the equation of motion for a hexarotor equipped with two CSCMGs, the total angular momentum vector
of the hexarotor, including the CMGs, is expressed as follows.
where
represents the angular momentum vector of the hexarotor, and
refers to the angular momentum vector generated by the two CSCMGs.
The equations of motion for the system are derived using Euler’s equation.
To derive the time variation of the total angular momentum vector
of the hexarotor, the components of Equation (
30) are differentiated with respect to time and summarized as follows.
where
is the total moment of inertia of the hexarotor including the two CSCMGs,
is the angular velocity vector of the hexarotor,
is the skew-symmetric matrix for the angular velocity vector, and
represents the disturbance.
4. Sliding Mode Control
Most control techniques face limitations in modeling nonlinear dynamics and handling various environmental variables, making it challenging to respond accurately and promptly in the presence of disturbances and model uncertainties. Sliding Mode Control (SMC) is a robust control method that accurately and quickly tracks the target state, and is resilient to disturbances and model uncertainties. SMC can handle nonlinear dynamics without linearization, defining a sliding surface using system state variables and adjusting control variables to drive the system as desired [
43]. SMC operates in two phases: the first is the reaching phase, where the control variable moves toward the sliding surface; the second is the sliding phase, where the variable on the surface converges toward the target value. Typically, the control variable is defined as the error between the current and target states, with the controller designed to minimize this error to zero.
A common drawback of conventional sliding mode control is that it takes an infinite amount of time for the state error to converge to zero. To address this, Terminal Sliding Mode Control (TSMC) was introduced, and to further accelerate error convergence, Fast Terminal Sliding Mode Control (FTSMC) was proposed. In this study, FTSMC was used for attitude control, and TSMC was applied for altitude control.
4.1. Altitude Control
The Terminal Sliding Mode Control (TSMC) technique is a control method that addresses the issue where variables take infinite time to converge to zero. By applying this technique, convergence to the target value can be guaranteed within a finite time. TSMC was applied for altitude control, and the sliding surface and error equation for this are defined as follows.
where
is a positive gain value greater than zero, and
is a gain value between 0 and 1.
must satisfy the condition
to ensure finite-time convergence. When
, the state variable
e accelerates its convergence through the nonlinear term
. Moreover,
prevents
e from diverging, enabling stable convergence to
. Thus, the range of
is crucial for achieving the desired convergence properties while maintaining continuity and stability in nonlinear systems.
To obtain the convergence time of TSMC, we assume the sliding surface is as follows.
thus,
The above equation can be interpreted as a first-order differential equation with respect to time, and integration is performed to obtain the convergence time.
where
represents the initial error,
represents the final error,
denotes the start time, and
denotes the final time.
By applying integration by parts and assuming that the final error
and the initial time
are zero,
By rearranging the final time, the convergence time of TSMC can be obtained, ensuring that each variable converges within a finite time.
To obtain the control input for the altitude control of the hexarotor, the sliding surface equation in Equation (
34) can be differentiated with respect to time and rearranged for
.
In this study, the power rate reaching law, consisting of the sum of proportional terms for the sliding surface, was selected. This reaching law is widely used in many studies as it not only reduces chattering but also provides excellent control performance.
where
and
are positive gain values greater than zero, and
is a gain value between 0 and 1. The gain values were selected within the range that optimizes system performance based on the simulation results.
The sliding surface in Equation (
34) has an issue where an imaginary value appears when the state variable e is negative. To address this problem, we use the following modified sliding surface.
where sign (·) are signum functions.
Using the modified sliding surface, the control input for the altitude control of the hexarotor can be derived as follows.
where
corresponds to the values in the third row and third column of Equation (
3).
The Lyapunov function is used to verify the stability of the system with the designed controller. The objective of the controller is to drive the sliding variable to zero, and the Lyapunov candidate function is defined as follows.
Differentiating the Lyapunov candidate function is not feasible due to the discontinuity at
. To address this issue, a sigmoid-based approximation is used, ensuring continuity. The differentiation of the Lyapunov candidate function with the proposed modification is as follows:
Therefore, as it can be verified that the value is less than 0, the controller is Lyapunov stable, and the sliding surface converges to zero after a sufficient amount of time.
4.2. Attitude Control
Fast Terminal Sliding Mode Control (FTSMC) is a control technique that accelerates the convergence speed compared to conventional TSMC. The sliding surface of FTSMC is defined as follows.
where
and
are positive gain values greater than zero, and
r represents gain values between 0 and 1.
FTSMC ensures a faster convergence rate compared to TSMC. The method of calculating the convergence speed is the same as that of TSMC, guaranteeing that each variable converges to 0 within the time
. Similar to the sliding surface in TSMC, the issue of imaginary numbers can arise when the variable is negative. This problem is solved in the same way as TSMC, and for attitude control, the error equation is defined using the desired quaternion
, with the sliding surface where the sliding variable is 0 being as follows.
To obtain the control input for attitude control of the hexarotor, the equation for the sliding variable is differentiated with respect to time as follows.
where sign(·) represents signum functions,
and
are positive gain values greater than zero, and
p is a gain value between 0 and 1.
Using the above equations, the control input for the attitude of the hexarotor can be derived as follows.
where
Lyapunov theory is applied to verify the stability of the system using the designed controller. Additionally, the robustness of FTSMC is confirmed through the modeling Equation (
16), which considers disturbances. The goal of the controller is to reduce the sliding variable to zero, and the Lyapunov candidate function is defined as follows.
Differentiating the Lyapunov candidate function yields the following expression.
Therefore, since it can be observed that the value is less than 0, the controller is Lyapunov stable, and the sliding surface converges to 0 after sufficient time.
5. CMG Drive Law
In this study, instead of the pyramidal arrangement commonly used in spacecraft, a CMG with a relatively simple singularity space, as shown in
Figure 2, was selected as the actuator for attitude control. To implement the three-axis control torque commands generated for hexarotor attitude control, an actuator command distribution law is required.
5.1. Pseudo−Inverse Drive Law
The pseudo-inverse drive law is commonly used for torque distribution. The equation for calculating the gimbal angular velocity vector using the pseudo-inverse drive law with respect to a given control torque command
is as follows:
However, since the Jacobian matrix used in the pseudo-inverse drive law is a function of the gimbal angles, there remains the possibility of encountering singularities at specific gimbal angle configurations. Singularities are classified as internal or external, depending on how the CMG angular momentum vectors are aligned. When two CMGs are aligned in opposite directions, the total angular momentum vector becomes zero, causing an internal singularity. Conversely, when two CMGs are aligned in the same direction, the total angular momentum vector doubles, resulting in an external singularity. Under such alignment conditions, the CMGs cannot generate the desired control torque in the specified direction.
5.2. Angular Momentum Vector Recovery Drive Law
The initial gimbal angle position is closely associated with the rotational maneuverability of the hexarotor. The angular momentum vector for each axis is a function of the gimbal angle , and its value continuously changes with variations in the CMG gimbal vector. To maintain consistent maneuverability throughout the maneuvering period, the allowable angular momentum and gimbal operating range for each axis must remain unchanged before the start of attitude maneuvers. In other words, upon completion of the maneuver, the gimbal angle should always return to its initially defined direction, which implies that the angular momentum vector must also return to its initial value. Failure to do so may gradually lead to a singularity.
In this study, a gimbal vector recovery drive law was derived using an optimization technique. The performance index to be minimized is defined as follows:
where
M and
N are symmetric positive definite weighting matrices. At this point, the constraint equation
is introduced. The first term of the equation contributes to minimizing the sum of the control torque input squares, similar to the conventional pseudo-inverse method, while the second term aims to minimize the difference between the current gimbal angular velocity of the CSCMG and the desired or pre-set angular velocity by the user.
The desired gimbal angular velocity
is defined as:
By applying the optimality condition, the following solution is derived for the performance index
[
44]:
where , and is a non-zero gradient vector defined as . Accordingly, the second term on the right-hand side corresponds to the null vector for angular momentum recovery, while the first term corresponds to the pseudo-inverse drive law.
When the weighting matrices
M and
N are set as
and
, the Angular Momentum Vector Recovery Drive Law (AMVRSL) for obtaining the CSCMG angular acceleration vector is simplified as follows:
where
is null vector, and
and
are positive constants. AMVRSL is activated during the final maneuver section. The factor
is defined using the S-shaped sigmoid function as follows:
where
K and
L are constants,
is the norm of the attitude error, and
is the angular velocity vector of the hexarotor. The variable
is defined as:
This means that both the attitude and angular velocity converge to small values during the final maneuvering phase. Thus, is designed to ensure that AMVRSL is only activated in the last phase of the maneuver.
In this study, the angular momentum recovery strategy is activated or deactivated based on the condition
. When activated,
is set to
. Additionally, the maximum value of the null vector is constrained by the following standard:
where
represents the infinity norm of the vector
n.
5.3. Disturbance Robust Drive Law
During the actual flight of the hexarotor, various factors, such as wind disturbances, can affect the attitude of the hexarotor. These disturbances also interfere with the operation of the CMG, leading to singularity issues within the system. Specifically, external disturbances prevent the gimbal from returning to its original position. As observed in previous case studies, the unwanted external disturbance torques cannot be effectively managed using only the CMG-generated torque. To address this disturbance-induced singularity problem, the hexarotor’s motor torque will now be utilized in conjunction with the CMG.
The dynamic equation of the hexarotor with a CMG can be expressed as follows:
where
represents the control input, and
.
Through the motion equation of the hexarotor using a CMG, it is corrected with a drive law robust against disturbances. The optimization problem to minimize the performance index is defined as follows:
subject to the constraint:
where
and
are symmetric positive definite weighting matrices, and
represents the desired control vector.
By applying the optimality condition [
44], the minimum solution is derived as:
where
and
are the gradient vector forcing the gimbal to return to its preferred initial position,
and
are the weighting matrices.
Since there are multiple solutions satisfying the equation, the pseudo-inverse solution for the first term on the right-hand side is preferred. The solution can be rewritten as:
where
is the null vector, and
where
represents an
zero matrix, and
,
,
, and
are the respective weighting constants.
7. Conclusions
This study proposed an attitude stabilization framework for multirotors using Control Moment Gyros (CMGs) and an enhanced control strategy called the Disturbance Robust Drive Law (DRDL). The focus was on addressing the challenges posed by external disturbances such as wind gusts, which can degrade the flight stability of lightweight UAVs. Through the use of Fast Terminal Sliding Mode Control (FTSMC) for attitude stabilization, we ensured finite-time convergence, guaranteeing improved system response even under the presence of disturbances. This approach, along with the application of the DRDL, aimed at mitigating issues like singularity and ensuring robust control performance.
CMGs demonstrated their ability to generate large torques with minimal input, which allowed for improved stability and control, especially during multi-attitude commands. When combined with the DRDL, the system exhibited superior singularity avoidance and robust behavior in disturbed environments. Unlike the pseudo-inverse drive law, which showed limitations in handling disturbances and singularities, the DRDL method allowed the UAV to maintain its gimbal angles more effectively, avoiding the drift that typically results from external interference. Additionally, the DRDL successfully minimized chattering, ensuring that the motors operated efficiently without excessive oscillations.
In conclusion, this study confirmed that integrating CMGs with the DRDL significantly enhances the robustness and stability of multirotor systems under challenging environmental conditions. The combined approach of using CMGs for torque amplification, FTSMC for rapid response, and the DRDL for singularity avoidance provides a reliable and high-performance solution for UAV attitude control. Future work may further optimize the integration of these methods to improve UAV flight capabilities in more complex and varied disturbance scenarios.