Next Article in Journal
Self-Powered Triboelectric Vibration Sensor with Gap-and-Substrate-Tuned Design for Real-Time Monitoring of Automotive Engine Operating States
Previous Article in Journal
Low-Cost High-Gain Transmitarray with Beam-Scanning Enhancement Based on Hybrid Phase Distribution Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Attitude Controller for UAV First-Order Acceleration Coefficients Tracking

1
Key Laboratory of Autonomous Systems and Network Control, Ministry of Education, South China University of Technology, Guangzhou 510641, China
2
Guangdong Engineering Technology Research Center of Unmanned Aerial Vehicle Systems, South China University of Technology, Guangzhou 510641, China
3
School of Automation Science and Engineering, South China University of Technology, Guangzhou 510641, China
*
Author to whom correspondence should be addressed.
Sensors 2026, 26(9), 2727; https://doi.org/10.3390/s26092727
Submission received: 8 February 2026 / Revised: 14 April 2026 / Accepted: 21 April 2026 / Published: 28 April 2026
(This article belongs to the Topic Vehicle Dynamics and Control, 2nd Edition)

Abstract

This paper proposes a novel attitude control methodology for unmanned aerial vehicles (UAVs). The core of the approach is a decomposition of the vehicle’s orientation into a distinct horizontal tilt component and a yaw rotation. This reformulation provides a principled theoretical framework by redefining attitude error within an acceleration-coefficient space, which linearizes and decouples the horizontal acceleration dynamics—a significant simplification over conventional Euler-angle or quaternion-based models. From an engineering perspective, this framework enables the direct generation of angular velocity commands that guarantee first-order tracking of desired acceleration coefficients. This leads to a substantial reduction in the computational complexity of the outer-loop controller, enhances trajectory tracking accuracy, and ensures predictable performance under given attitude constraints and angular velocity limits. Simulation results demonstrate the method’s superior performance compared to standard techniques, validating its dual value as both a theoretically-grounded control design tool and an effective solution for high-precision UAV navigation in real-world applications.

1. Introduction

Common non-fixed-wing Vertical Take-Off and Landing (VTOL) aircraft, such as multi-rotor systems and helicopters, control their position and orientation in three-dimensional space by adjusting attitude and thrust magnitude. An attitude controller computes the inputs required to drive the vehicle from its current orientation toward a desired attitude. The method of attitude representation and the definition of attitude error jointly determine the trajectory from the present to the target orientation.
In many contemporary attitude control designs, the error for each channel is typically derived from the difference between a single attitude parameter and its desired value. When Euler angles are used for attitude representation, control strategies often account for rigid-body rotation dynamics to reduce coupling among parameters, thus treating attitude control as a set of single-channel problems [1,2,3]. A variety of control methods have been applied to Euler-angle-based attitude representations, such as ADRC, fuzzy control, and sliding mode control [4,5,6,7,8,9,10]. However, such Euler-angle-based approaches can encounter singularities and increased nonlinear coupling during large-angle maneuvers, as noted in surveys on attitude control strategies [11].
The kinematic model of a UAV is fundamentally built upon the overall relationships among angular velocity, attitude, acceleration, velocity, and position. Therefore, treating the attitude-dependent coefficients in the acceleration terms as control objectives and decoupling the interactions between different acceleration channels is a more advantageous approach [12,13]. This method not only simplifies and partially linearizes the outer-loop mathematical model but also generates attitude trajectories with clear physical meaning [14]. In recent years, control methods based on SO(3) or quaternions (such as geometric control) have achieved a certain degree of decoupling and theoretically guaranteed global stability [8,15,16,17,18,19]. Compared to SE(3), NMPC for outer-loop control can better handle the physical constraints of states and control inputs. However, the high computational cost of optimization limits its application in embedded deployment to only the outer loop, where the inner-loop dynamics are estimated to generate attitude sequences for inner-loop control [20,21].
To design a more suitable inner-loop controller for the outer-loop NMPC control, and through the design goal of a first-order approximation of the acceleration coefficient, the inner-loop model in the outer-loop NMPC is made more accurate while saving parameters and optimization computational effort. This study derives a novel attitude error calculation method and generates corresponding trajectories. Given that the yaw angle is typically treated as an independent control objective decoupled from position control, we propose a new computational framework using quaternions that separates the yaw parameters from the roll and pitch parameters. During attitude calculation, roll and pitch are considered together to decouple the interactions between multiple acceleration channels. The designed attitude trajectory is suitable for attitude ranges with tilt angles less than π / 2 , and can achieve first-order tracking of the horizontal dual-channel acceleration coefficients under given attitude constraints and angular velocity limits, thereby providing a more concise mathematical representation for the outer-loop model. This approach is based on and extends previous research work on nonlinear decoupling and quaternions.

2. Mathematical Model of UAV

Common underactuated mathematical models for non-fixed-wing vertical take-off and landing (VTOL) aircraft share some notable structural similarities, including quadrotors, helicopters, and ducted fan drones. The core characteristic of an underactuated system is that the number of control inputs is fewer than the system’s degrees of freedom, typically featuring 6 degrees of freedom (3 translational + 3 rotational) but only 4 control inputs. The control of these UAVs often adopts a hierarchical design, divided into attitude control (inner loop) and position control (outer loop) [22]. The desired attitude angles and total thrust serve as virtual inputs for the outer loop.
And these VTOL aircraft mathematical models all share similar kinematic and dynamic frameworks, with the main distinction lying in how torque and lift are generated. Here, we abstract the control inputs as torque and total thrust. Taking the equilibrium point as the origin of the body attitude, the total thrust is oriented vertically upward in the body-fixed coordinate system.

2.1. Dynamics and Kinematics

Let the world coordinate frame F w and the body coordinate frame F b be defined as right-handed systems. In the world coordinate system, the translational dynamics equations of the VTOL aircraft can be expressed as follows:
m V ˙ = m [ 0 , 0 , g ] T + R [ 0 , 0 , T ] T + F d r a g , d i s v
where m denotes the mass of the UAV, V represents the velocity in the North-East-Down (NED) coordinate frame, R is the rotation matrix of the vehicle attitude, T is the total thrust from the rotors, and F d r a g , d i s v is the aerodynamic drag and other disturbances.
In the body-fixed coordinate system, the rotational dynamics equation of the VTOL aircraft can be expressed as:
J ω ˙ = τ ω × ( J ω )
where J denotes the inertia matrix of the vehicle, τ represents the three-axis torque, and ω is the angular velocity.
In the world coordinate system, the position kinematics equation of the VTOL aircraft can be expressed as follows:
P ˙ = [ N ˙ , E ˙ , D ˙ ] T = V = [ u , v , w ] T
Construct the mathematical model of the UAV in the sequence of position-velocity-acceleration-attitude-angular velocity. Considering the conventional flight attitudes of this type of aircraft, this paper excludes inverted flight conditions.

2.2. Attitude Representation and Acceleration Coefficients

Two commonly used attitude representations for UAVs are Euler angles and quaternions. They primarily influence the horizontal acceleration coefficients through the rotation matrix R defined in Equation (1).
Using the commonly adopted ‘Z-Y-X’ rotation sequence of Euler angles [ ϕ , θ , ψ ] T to represent the vehicle attitude, R ( ϕ , θ , ψ ) represent the rotation matrix. The rotational kinematics of the VTOL aircraft can be expressed using Euler angles as follows:
V ˙ = u ˙ v ˙ w ˙ = T / m · ( cos φ sin θ cos ψ + sin φ sin ψ ) T / m · ( cos φ sin θ sin ψ sin φ cos ψ ) g T / m · ( cos φ cos θ )
The attitude kinematics equation of the VTOL aircraft can be expressed using Euler angles as follows:
ϕ ˙ θ ˙ ψ ˙ = 1 0 sin θ 0 cos ϕ sin ϕ cos θ 0 sin ϕ cos ϕ cos θ p q r
Using quaternions q = [ w 0 , x 0 , y 0 , z 0 ] T to represent attitude, R ( q ) represent the rotation matrix. The rotational kinematics of the VTOL aircraft can be expressed using quaternions as follows:
V ˙ = u ˙ v ˙ w ˙ = T / m · ( 2 w 0 y 0 + 2 x 0 z 0 ) T / m · ( 2 y 0 z 0 2 w 0 x 0 ) g T / m · ( 1 2 x 0 2 2 y 0 2 )
The attitude kinematics equation of the VTOL aircraft can be expressed using quaternions as follows:
q ˙ = 1 2 q ω
The Euler angle representation suffers not only from the gimbal lock problem but also from induced heading changes during purely oblique tilting maneuvers. The quaternion representation, on the other hand, is constrained by its four interdependent parameters (subject to the unity-norm condition), which are not fully independent. Furthermore, in both methods, the horizontal acceleration coefficients are mutually coupled and nonlinear. When combined with the rigid-body rotational dynamics, this makes it difficult to directly map the desired acceleration coefficients to angular velocity commands for achieving first-order tracking of the acceleration coefficients [12].

2.3. Attitude Decomposition

The subsequent analysis utilizes two specific decompositions of the vehicle’s attitude, each constituting a horizontal tilt [ a , x , y , 0 ] T and a rotation about the z-axis [ b , 0 , 0 , z ] T , with a > 0 and b > 0 . These decompositions differ in their order of operations: one is a tilt-yaw sequence, and the other is a yaw-tilt sequence. With inverted flight excluded, we have a > 1 / 2 .
The vehicle attitude representation is [ w 0 , x 0 , y 0 , z 0 ] T . The attitude representation under the tilt-yaw decomposition is given by:
a x y 0 T b 0 0 z T = w 0 x 0 y 0 z 0 T
Solving for the decomposed parameters yields:
a b x y z = w 0 2 + z 0 2 w 0 / a ( w 0 x 0 z 0 y 0 ) / a ( z 0 x 0 + w 0 y 0 ) / a z 0 / a
Substituting into Equation (6), we obtain:
V ˙ = a N a E a D = T / m · 2 a y T / m · ( 2 a x ) g T / m · ( 1 2 x 2 2 y 2 )
Analysis of Equation (10) shows a direct correlation between the a , x , y term in the tilt-yaw decomposition and the translational dynamics. This correlation has a clear physical basis: the UAV’s acceleration is governed exclusively by the tilt of the thrust vector, while rotation about the z-axis (yaw) is dynamically decoupled from translational acceleration.
As shown in Figure 1, the horizontal acceleration along the north and east directions is only related to the thrust and the tilt angle of the z-axis in body frame, and is independent of the heading. In the North-East-Down (NED) coordinate frame, the result of rotating the D-axis by the quaternion [ a , x , y , 0 ] T yields the body z-axis.
Consequently, by taking a x and a y as the control objectives for attitude, the downward acceleration is a D = g T / m · 1 4 ( a x ) 2 4 ( a y ) 2 . Moreover, the attitude controller utilizes the error signal derived from the difference between the desired value a x d and its measured value a x . An identical error computation method is applied to the lateral acceleration a y .
Proof. 
Substitution of the quaternion properties into a , x , y gives:
a 2 + x 2 + y 2 = 1
Multiply both sides by a 2 and transpose the terms to the left-hand side.
a 4 a 2 + [ ( a x ) 2 + ( a y ) 2 ] = 0
With a > 0 , Solving the equations yields:
a = 1 + 1 4 ( a x ) 2 4 ( a y ) 2 2
Substituting the quaternion properties into Equation (10), followed by insertion into the above equation, gives:
a D = g T / m · ( 2 a 2 1 ) = g T / m · 1 4 ( a x ) 2 4 ( a y ) 2
   □
The attitude representation under the yaw-tilt decomposition is given by:
b 0 0 z a x y 0 = a b b x y z b y + x z a z = w 0 x 0 y 0 z 0
With the quaternion properties b 2 + z 2 = 1 :
a 2 b 2 + a 2 z 2 = a 2 = w 0 2 + z 0 2
With a > 0 , a = w 0 2 + z 0 2 . Solving for the decomposed parameters yields:
a b x y z = w 0 2 + z 0 2 w 0 / a ( w 0 x 0 + z 0 y 0 ) / a ( z 0 x 0 + w 0 y 0 ) / a z 0 / a
The yaw-tilt decomposition is akin to the standard yaw-pitch-roll Euler angle formulation. This analogy is grounded in the underlying physics: owing to their strong dynamic coupling and identical mechanism for moment generation, roll and pitch are aggregated into a single horizontal tilt component, denoted [ a , x , y , 0 ] T . Whereas, the yaw moment, generated by a fundamentally different mechanism, is represented by a separate term  [ b , 0 , 0 , z ] T .
The mathematical representation of the yaw component is common to both decompositions.

3. Attitude Planning for Tracking First-Order Acceleration

In common inner-loop attitude controllers for UAVs, the attitude error between the current and desired orientation is computed based on the difference of a single parameter from the chosen attitude representation (typically Euler angles or quaternions). This derived error is then fed into the attitude dynamics equations to obtain the desired angular velocity.

3.1. Design Objective

A fundamental challenge arises when simplified attitude control couples with translational dynamics. If we model the attitude loop as an ideal first-order system (ignoring angular rate dynamics and delays), the resulting horizontal acceleration becomes a nonlinear function of the attitude command. A clear example is rolling from [roll, pitch, yaw] to [-roll, pitch, yaw]: this not only reverses the lateral acceleration but also introduces an undesired longitudinal component. This nonlinearity motivates the design of a new method for generating desired angular velocity that directly facilitates first-order tracking of the desired acceleration vector.
The outer-loop Nonlinear Model Predictive Control (NMPC) generates a desired attitude command sequence at a low frequency based on position, velocity, and attitude. The inner loop consists of an angular velocity closed-loop controller. This paper focuses on designing an attitude-to-angular-velocity controller that converts the desired attitude into a desired angular velocity, using quaternions as the attitude representation.
Due to the limited computational frequency of the NMPC algorithm on the onboard processor, we aim for the attitude trajectory to track changes in acceleration linearly. This approach is intended to reduce the computational burden on the NMPC and improve overall control performance.

3.2. Acceleration Decoupling Compensation

In the tilt-yaw decomposition, assuming the angular velocity corresponding to [ a , x , y , 0 ] T during the attitude change is [ 0 , R x , R y , R z ] T .
In Equation (10), the three-axis accelerations of the UAV are determined by [ a x , a y , T ] . From the perspective of control allocation, [ a x , a y , T ] are primarily used to control [ a N , a E , a D ] , respectively. Due to the moment of inertia being significantly smaller than the mass and the performance of gyroscopes being substantially higher than that of accelerometers, the UAV’s moment control loop is generally much faster than that of the total thrust control loop. And since the value of T typically fluctuates around the gravitational acceleration g, T can be approximated as a constant in a N and a E over short time intervals.
It is known that a N (North acceleration) depends only on a y , and a E (East acceleration) depends only on a x . However, it is evident that due to the nature of the quaternion derivative, a N ˙ and a E ˙ are not decoupled. In practice, a PD controller may also be employed; however, the following discussion uses a simple P controller for illustrative purposes. For example, if a N follows a first-order trajectory a N ˙ = p ( a N d a N ) , then the required R y N = K p [ ( a y ) d a y ] , where ( a y ) d represents the desired value of a y . And it is necessary to enforce a E ˙ = 0 .
With the quaternion properties
a ˙ x ˙ y ˙ z ˙ = ( x ω x y ω y z ω z ) / 2 ( a ω x z ω y + y ω z ) / 2 ( z ω x + a ω y x ω z ) / 2 ( y ω x + x ω y + a ω z ) / 2 , ω x ω y ω z = R x N R y N R z N
a E ˙ = ( 2 w x + 2 y z ) = 2 a y ˙ + 2 y a ˙ + 2 x z ˙ + 2 z x ˙ = R x N ( a 2 + x 2 y 2 + z 2 ) + 2 R y N ( a z + x y ) = 0
Solving the equations yields the decoupled compensation amount:
R x N = 2 ( a z + x y ) a 2 x 2 + y 2 z 2 R y N
Similarly, when a N follows the first-order trajectory a E ˙ = P ( a E d a E ) , we obtain:
R y E = 2 ( x y a z ) a 2 + x 2 y 2 z 2 R x E
Furthermore, rotations R x and R y alter the initial yaw component of [ a , x , y , 0 ] T . Imposing the constraint that the initial yaw within [ a , x , y , 0 ] T must remain invariant:
z ˙ a x y = 1 2 ( a R z + x R y y R x ) = 0
Thus, [ R x , R y , R z ] T becomes:
R x R y R z = R x E + 2 ( a z + x y ) a 2 x 2 + y 2 z 2 R y N R y N + 2 ( x y a z ) a 2 + x 2 y 2 z 2 R x E ( x R y + y R x ) / a

3.3. First-Order Acceleration Tracking

Since the [ a , x , y , 0 ] T component from the decomposition in Equation (10) directly determines the UAV’s acceleration, achieving a linear change in acceleration first requires the horizontal tilt to track a specific trajectory. This reference trajectory is constrained to have a yaw component that is zero.
The desired dynamics for a E are specified as a first-order response a E ˙ = p ( a E d a E ) = 2 p [ ( a x ) d a x ] . However, the actual implemented dynamics in practice is Equation (17). Substituting into Equation (21) yields:
a E ˙ = R x E [ a 2 + x 2 y 2 + z 2 + 4 ( x 2 y 2 a 2 z 2 ) a 2 + x 2 y 2 z 2 ] = R x E ( a 2 x 2 y 2 ) ( a 2 + x 2 + y 2 ) a 2 + x 2 y 2 = 2 a 2 1 2 a 2 + 2 x 2 1 R x E = 2 p [ ( a x ) d a x ]
Solving the equations yields the first-order control quantity:
R x E = 2 p ( 2 x 2 2 a 2 1 + 1 ) [ ( a x ) d a x ]
Similarly, when a D follows the first-order trajectory a N ˙ = p ( a N d a N ) = 2 p [ ( a y ) d a y ] , we obtain:
R y N = 2 p ( 2 y 2 2 a 2 1 + 1 ) [ ( a y ) d a y ]

3.4. Body-Frame Attitude Velocity

From the angular velocity [ 0 , R x , R y , R z ] T of the horizontal tilt trajectory, we need to obtain the body-frame angular velocity [ 0 , ω x , ω y , ω z ] T .
For the tilt-yaw decomposition attitude presented in Section 3.3, applying an angular velocity [ 0 , R x , R y , R z ] T to the horizontal tilt over an infinitesimal time interval Δ t yields a new vehicle attitude expressed as:
a x y 0 T c 1 Δ x Δ y Δ z T b 0 0 z T w i t h c 1 Δ x Δ y Δ z = 1 Δ x 2 Δ y 2 Δ z 2 R x · Δ t R y · Δ t R z · Δ t
When the vehicle rotates with an angular velocity [ 0 , ω x , ω y , ω z ] T , its attitude after an infinitesimal time step dt is represented as:
w 0 x 0 y 0 z 0 T c 2 δ x δ y δ z w i t h c 2 δ x δ y δ z = 1 δ x 2 δ y 2 δ z 2 ω x · Δ t ω y · Δ t ω z · Δ t
Because Equations (25) and (26) correspond to the same attitude, the two expressions are equivalent. Equating them and substituting the result into Equation (9), the solution is obtained as:
b R x + z R y = b ω x z ω y b R y z R x = b ω y + z ω x R z = ω z
Since b 2 + z 2 = 1 , it follows that:
ω x ω y ω z = ( b 2 z 2 ) R x + 2 b z R y ( b 2 z 2 ) R y 2 b z R x R z

3.5. Angular Rate Limit

In practical deployment, maximum angular rates and attitude angles are always constrained in the controller design due to limitations in the UAV’s structural strength and actuators. For VTOL platforms, the roll and pitch axes are typically controlled by coupled actuators (e.g., the swashplate servos of a helicopter or the control allocation of a quadrotor). Therefore, we consider the maximum angular rate limit to be ω x 2 + ω y 2 W M 2 , the maximum angular limit to be x 2 + y 2 A M 2 in Equation (13).
Considering Equations (28) and (21), z = 0 , a 2 + x 2 + y 2 = 1 :
ω x 2 + ω y 2 = ( ( b 2 z 2 ) R x + 2 b z R y ) 2 + ( ( b 2 z 2 ) R y 2 b z R x ) 2 = R x 2 + R y 2 = ( R x E + 2 ( a z + x y ) a 2 x 2 + y 2 z 2 R y N ) 2 + ( R y N + 2 ( x y a z ) a 2 + x 2 y 2 z 2 R x E ) 2
Let
e x = 2 p [ ( a x ) d a x ] , e y = 2 p [ ( a y ) d a y ]
Considering Equations (23) and (24). Therefore, the angular-rate scaling factor K can be computed as follows:
K = ω x 2 + ω y 2 e x 2 + e y 2 = ( 1 2 y 2 ) 2 e x 2 + ( 1 2 x 2 ) 2 e y 2 + ( 2 x y ) 2 ( e x 2 + e y 2 ) + 4 x y ( 2 2 x 2 2 y 2 ) e x e y ( 1 2 x 2 2 y 2 ) 2 ( e x 2 + e y 2 )
By computing and processing K, it can be concluded that the maximum of K is independent of W m and depends only on A m :
K max = 1 ( 1 2 A m 2 ) 2 .
Detailed derivation is provided in Appendix A. Therefore, for UAV maneuvers where the attitude angle is constrained within x 2 + y 2 A M 2 , it is sufficient to limit the rate of change of the acceleration coefficient:
( e x 2 + e y 2 ) m a x [ W M ( 1 2 A M 2 ) ] 2
This ensures that the angular velocity remains within its prescribed limits during attitude planning, while also achieving first-order tracking of the acceleration coefficient with bounded rate of change.
Certainly, under the same angular-rate limit, a tighter attitude constraint (closer to 90°) imposes a more restrictive bound on the actual angular velocity, thereby requiring a smaller allowed rate of change for the acceleration coefficients. However, as the allowed attitude range moves away from 90°, the corresponding scaling factor K max decreases rapidly. For instance, with a limit of 60°, K max = 4 ; for 45°, K max = 2 ; and for 30°, K max = 1.333 . These values demonstrate considerable practicality for real-world UAV flight environments. Alternatively, the constraint can be applied in a piecewise manner during actual flight operations.

4. Attitude Planning

4.1. Algorithm Construction

Thus, we have derived a technique to convert desired acceleration into attitude error and angular rate commands. A key advantage of this method is that it decouples the problem from horizontal acceleration disturbances due to attitude changes. Additionally, it calculates an attitude trajectory that achieves first-order tracking of the target acceleration from current attitude.
The desired yaw angle q z d = [ b d , 0 , 0 , z d ] T for the UAV is specified by either a navigation path or a remote command. Using the q z = [ b , 0 , 0 , z ] T to represent the current yaw attitude, the yaw error quaternion is computed as q z e = q z d q z 1 and combined with the output ω z d from Algorithm 1.
The desired total thrust T is determined by the outer-loop controller and is subsequently transmitted to the inner-loop controller to execute closed-loop tracking of the thrust command. For the purposes of outer-loop analysis and design, the closed-loop dynamics of the inner thrust control system are sufficiently characterized by a first or second-order approximation f T ( T d , T ) . And the inner angular rate loop’s dynamics can be simplified to a system with negligible transients (approximated as instantaneous).
Algorithm 1: Attitude Planning Algorithm
Input: 
Current attitude q = [ w 0 , x 0 , y 0 , z 0 ] T ; Desired value [ a x d , a y d ] ;
Output: 
Target attitude [ a d , x d , y d ] ; Desired angular rate [ ω x d , ω y d , ω z d ] ;
1:
Evaluate ( e x 2 + e y 2 ) m a x using [ W M , A M ] by Equation (33); Obtain the control limits under the current angular velocity and angle constraints;
2:
Evaluate [ a , b , x , y , z ] using q by Equation (9); Obtain the decomposition parameters of the current attitude;
3:
Evaluate R x E using [ a x d , a , x ] by Equation (23); Obtain the rotation amount generated by the desired eastward acceleration coefficient;
4:
Evaluate R y N using [ a y d , a , y ] by Equation (24); Obtain the rotation amount generated by the desired northward acceleration coefficient;
5:
Evaluate e x 2 + e y 2 using [ a x d , a y d ] by Equation (30), if the limit is exceeded, [ R x E , R y N ] is scaled down proportionally; Obtain the rotation amount after applying the limits;
6:
Evaluate [ R x , R y , R z ] using [ R x E , R x E , a , x , y ] by Equation (21); Obtain the rotation amount after first-order approximation compensation;
7:
Evaluate [ ω x d , ω y d , ω z d ] using [ R x , R y , R z , b , z ] by Equation (28); Convert to the rotation amount in the body coordinate system.
After these processing steps, substituting into Equation (12) and replacing [ a x , a y , a x d , a y d ] with [ q a x , q a y , q a x d , q a y d ] to express it as independent variables, the outer-loop model of the system is simplified as:
P ˙ u ˙ v ˙ w ˙ q a x ˙ q a y ˙ T ˙ = V T / m · 2 q a x T / m · 2 q a y g T / m · 1 4 q a x 2 q a y 2 p ( q a x d q a x ) p ( q a y d q a y ) f T ( T d , T )
With V = [ u , v , w ] T .

4.2. Commonly Used Method

In UAV attitude control, both Euler angles and quaternions are widely adopted for attitude representation. When using Euler angles, the standard approach to generate attitude error and angular rate commands from desired acceleration is:
ϕ e = ϕ d ϕ , θ e = θ d θ , ψ e = ψ d ψ
By employing a front-right-down right-handed coordinate system and a yaw-pitch-roll rotation sequence, and substituting the corresponding attitude kinematics, the desired angular velocity is obtained as:
Δ x Δ y Δ z = 1 0 sin θ 0 cos ϕ sin ϕ cos θ 0 sin ϕ cos ϕ cos θ ϕ d ϕ θ d θ ψ d ψ
Under Euler angles, the commonly used outer-loop NMPC model is:
P ˙ u ˙ v ˙ w ˙ ϕ ˙ θ ˙ ψ ˙ T ˙ = V T / m · cos ψ sin θ cos ϕ + sin ψ sin ϕ T / m · sin ψ sin θ cos ϕ cos ψ sin ϕ g T / m · cos θ cos ϕ ω x ω y cos ϕ + r sin ϕ ω y sin ϕ / cos θ r cos ϕ / sin θ f T ( T d , T ) , ω x ω y ω z = p 1 Δ x p 1 Δ y p 2 Δ z
When using quaternions, the standard approach to generate attitude error and angular rate commands from desired acceleration is:
q e = q d q 1 = [ w e , x e , y e , z e ] T
If the scalar part of the error quaternion w e < 0 , all components of q e are negated. This ensures that the error quaternion represents the shortest rotational path. The vector part of the attitude error quaternion is extracted to form the error vector that is used as the input to the controller [ Δ x , Δ y , Δ z ] T = [ x e , y e , z e ] T .
The difference between the desired angular velocity [ ω x , ω y , ω z ] T = [ p 1 Δ x , p 1 Δ y , p 2 Δ z ] T and the current angular velocity is computed and fed into a P or PD controller. This is a commonly used method for attitude trajectory tracking.
Under quaternion, the commonly used outer-loop NMPC model is:
P ˙ u ˙ v ˙ w ˙ q w ˙ q x ˙ q y ˙ q z ˙ T ˙ = V T / m · 2 ( q w q y + q x q z ) T / m · 2 ( q y q z q w q x ) g T / m · ( 1 2 q x 2 2 q y 2 ) q x ω x q y ω y q z ω z q w ω x q z ω y + q y ω z q z ω x + q w ω y q x ω z q y ω x + q x ω y + q w ω z f T ( T d , T ) , ω x ω y ω z = 0 p 1 0 0 0 0 p 1 0 0 0 0 p 2 ( q d q 1 )
Comparing the NMPC outer-loop models of the three methods, i.e., Equations (34), (37) and (39). Compared with the other two methods, the method proposed in this paper reduces both the number of parameters and the model complexity, which is beneficial for reducing the computational burden of NMPC optimization. Compared with the Euler-angle-based outer-loop model, it reduces one state variable and eliminates a large number of trigonometric function calculations. Compared with the quaternion-based outer-loop model, it reduces two state variables and significantly lowers the complexity of attitude estimation. Due to the unit norm constraint of quaternions, the complexity of attitude estimation is difficult to simplify.

5. Simulation and Results Analysis

Referring to the kinematic and dynamic models of the UAV, the dynamic response of the body angular velocity loop tracking is temporarily ignored for the validation of attitude trajectory planning. Taking the quaternion-based attitude representation as an example, this mathematical model defines [ V , q ] T as the system state variables and [ ω x , ω y , ω z , T ] T as the system input variables. The attitude controller computes the planned value [ ω x , ω y , ω z ] T as the system input, while the UAV thrust T is controlled in a closed-loop manner by the outer-loop controller, which does not affect the simulation verification results.
According to the design objectives, we will validate the proposed method in this paper, along with the quaternion method and Euler angle method in Section 4.2. The dynamic response of the horizontal plane acceleration coefficient [ a N , a E ] T = [ u / ( T / m ) , v / ( T / m ) ] T , from the current state to the target setting, will be derived from Equation (6). Under the assumptions of no inverted flight and a given heading angle (where the heading angle representation follows the decomposition defined in Equation (13)), the attitude corresponds uniquely to the north-east acceleration coefficient. Since we intend the attitude trajectory to act as a first-order follower to the acceleration, we will compute the step response under various attitude conditions. The following simulations will be conducted at a control frequency of 1000 Hz, obtaining trajectory plots and time-domain evolution diagrams of the horizontal acceleration coefficient under attitude control using multiple methods, followed by analysis.
With identical control gain P and without considering the maximum angular rate limit, the horizontal acceleration coefficient is calculated from the current state [ a N , a E ] T = [ 0.4 , 0.5 ] T to the target [ a N , a E ] T = [ 0.4 , 0.5 ] T . The results for the quaternion-based method, the Euler-angle method, and the method proposed in this paper are as Figure 2.
For any heading angle, both the quaternion method and the proposed method compute identical horizontal acceleration coefficient trajectories. Due to the use of the ‘Z-Y-X’ rotation sequence in the Euler-angle method, its dynamic response varies under different heading angles. In the results plotted in Figure 2, the worst-case scenarios are selected for illustration. The responses of the Euler-angle method, calculated at heading angle intervals of π / 36 , are shown below as Figure 3:
With identical control gain P and considering the maximum angular rate limit ω m a x = p i / 2 , we compute the transition from the current North-East acceleration coefficient [ a N , a E ] T = [ 0.5 , 0 ] T to the target [ a N , a E ] T = [ 0 , 0.5 ] T for the quaternion method, the Euler angle method, and the method proposed in this paper. Additionally include an SO(3)-based attitude controller using e = log q e as attitude error under the same gains for comparison. The results are shown below as Figure 4:
Due to the use of the ‘Z-Y-X’ rotation sequence in the Euler-angle method, its dynamic response varies under different heading angles. In the optimal case, its trajectory approximates that of the proposed method. The worst-case scenarios are selected for illustration in the Figure 4.
Based on the experimental results presented above, if we regard the acceleration coefficient as a spherical surface, the attitude control trajectory planned by the quaternion method and SO(3) method corresponds to the shortest path on the sphere. The results shown in Figure 4 indicate that when using the SO(3) method, the target attitude is achieved more quickly in the time domain. In contrast, the attitude control trajectory planned by the method proposed in this paper is a straight line projected onto the horizontal plane, which also satisfies first-order tracking of the target horizontal acceleration in the time domain. Minor errors arise from the nonlinear mapping introduced during discretization in the control process.
However, in practical applications, the inner loop is non-ideal, and the angular velocity cannot achieve the desired target value in real time. Considering the complete rigid-body rotation (including gyroscopic torque, aerodynamic damping, and control torque), the angular velocity controller adopts a common PI controller with feedforward. Under the condition of amplitude limiting, the attitude is controlled from [ a N , a E ] T = [ 0.4 , 0.5 ] T to the target [ a N , a E ] T = [ 0.4 , 0.5 ] T (same as in Simulation 1). The actual values of the acceleration coefficient are compared with the first-order reference and the second-order reference, respectively. The results are shown below as Figure 5:
In fact, the complete attitude mathematical model with the controller is third-order nonlinear. However, for outer-loop control estimation, the full third-order estimation is rarely used. Therefore, common first-order and second-order references are selected for comparison. From the acceleration coefficient a E in Figure 5, it can be seen that the control method proposed in this paper achieves the best decoupling performance for the horizontal acceleration coefficient. From the acceleration coefficient a N in Figure 5, it can be seen that the proposed control method consistently exhibits the smallest deviation when compared with either the first-order or second-order reference, and a significant improvement is achieved when using the second-order reference.

6. Conclusions

Comprehensive comparison shows that, under the limit of attitude and angle-rate constraint, the angular velocity profile generated by the attitude trajectory control method proposed in this paper achieves excellent first-order tracking of the target horizontal acceleration coefficient. This approach simplifies the outer-loop model and provides a high-quality estimation of the acceleration (attitude) dynamic response.
The next step will involve incorporating angular rate limits and first-order angular rate dynamics to construct a refined inner-loop dynamic response model, thereby improving the performance of outer-loop trajectory tracking control.

Author Contributions

The ideas and research work for this study, including the conducted simulations, were provided by D.X.; H.P. contributed with comments, improvements, and suggestions for the paper. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by Scientific Instruments Development Program of NSFC (61527810), the Fundamental Research Funds for the Central Universities, China Southern Power Grid Research Program (GDKJXM20231224), Aeronautical Science Foundation of China (20220056060001).

Informed Consent Statement

Not applicable.

Data Availability Statement

The simulation algorithm developed in this study is openly available on GitHub at https://github.com/ericxd1997/AttitudeTrajectory (accessed on 20 April 2026). No additional data were used in this research.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
UAVUnmanned Aerial Vehicle
VTOLVertical Take-Off and Landing

Appendix A. The Maximum of Angular-Rate Scaling Factor

Given
F = ( 1 2 y 2 ) 2 e x 2 + ( 1 2 x 2 ) 2 e y 2 + ( 2 x y ) 2 ( e x 2 + e y 2 ) + 4 x y ( 2 2 x 2 2 y 2 ) e x e y ( 1 2 x 2 2 y 2 ) 2 ( e x 2 + e y 2 ) .
x = A m sin t 1 , y = A m cos t 1 , e x = W m sin t 2 , e y = W m cos t 2
where
π < t 1 π , π < t 2 π , 0 < A m < π 2 , 0 < W m < π 2 .
We aim to show that the maximum of F is independent of W m and to find its relation with A m .
From
x 2 + y 2 = A m 2 ( sin 2 t 1 + cos 2 t 1 ) = A m 2 A ,
e x 2 + e y 2 = W m 2 ( sin 2 t 2 + cos 2 t 2 ) = W m 2 W .
Let u = sin t 2 , v = cos t 2 , u 2 + v 2 = 1 , so
e x = W u , e y = W v .
The denominator becomes
( 1 2 x 2 2 y 2 ) 2 ( e x 2 + e y 2 ) = ( 1 2 A ) 2 W .
Substituting into the numerator, thus the numerator is
W ( 1 2 y 2 ) 2 u 2 + ( 1 2 x 2 ) 2 v 2 + 4 x 2 y 2 + 4 x y ( 2 2 A ) u v .
Eliminating W
F = ( 1 2 y 2 ) 2 u 2 + ( 1 2 x 2 ) 2 v 2 + 4 x 2 y 2 + 4 x y ( 2 2 A ) u v ( 1 2 A ) 2 .
This expression is independent of W m . Hence, the maximum of F is independent of W m , establishing the first part of the claim.
Maximizing over t 1 , t 2 for fixed A m
Let C = cos 2 t 1 , S = sin 2 t 1 , with C 2 + S 2 = 1 . From x = A sin t 1 , y = A cos t 1 we have:
1 2 y 2 = 1 A ( 1 + C ) a , 1 2 x 2 = 1 A ( 1 C ) b ,
x y = A 2 S , x 2 y 2 = A 2 4 S 2 .
Thus
a + b = 2 2 A , b a = 2 A C , a 2 + b 2 = 2 ( 1 A ) 2 + 2 A 2 C 2 .
Let ϕ = t 2 , so u = sin ϕ , v = cos ϕ . Define Q as the numerator of F excluding the factor ( 1 2 A ) 2 :
Q = a 2 u 2 + b 2 v 2 + A 2 S 2 + 4 A ( 1 A ) S u v .
Using u 2 = 1 cos 2 ϕ 2 , v 2 = 1 + cos 2 ϕ 2 , u v = sin 2 ϕ 2 :
Q = a 2 + b 2 2 + b 2 a 2 2 cos 2 ϕ + A 2 S 2 + 2 A ( 1 A ) S sin 2 ϕ .
Substituting b 2 a 2 = 4 A C ( 1 A ) and a 2 + b 2 = 2 ( 1 A ) 2 + 2 A 2 ( 1 S 2 ) :
a 2 + b 2 2 + A 2 S 2 = ( 1 A ) 2 + A 2 ( 1 S 2 ) + A 2 S 2 = 1 2 A + 2 A 2 .
Thus
Q = 1 2 A + 2 A 2 + 2 A C ( 1 A ) cos 2 ϕ + 2 A ( 1 A ) S sin 2 ϕ .
Maximizing over ϕ . Let P ( ϕ ) = 2 A ( 1 A ) C cos 2 ϕ + S sin 2 ϕ . Its maximum is
max ϕ P ( ϕ ) = 2 A ( 1 A ) C 2 + S 2 = 2 A ( 1 A ) .
Hence
max ϕ Q = 1 2 A + 2 A 2 + 2 A ( 1 A ) = 1 .
This value is independent of t 1 (i.e., independent of C , S ). Therefore, for any t 1 , we can choose ϕ to achieve Q = 1 .
Maximum of F
F max = max Q ( 1 2 A ) 2 = 1 ( 1 2 A m 2 ) 2 .
The maximum is independent of W m and depends only on A m .

References

  1. Huang, L.; Pei, H.; Cheng, Z. System identification and improved internal model control for yaw of unmanned helicopter. Asian J. Control 2023, 25, 1619–1638. [Google Scholar] [CrossRef]
  2. de Oliveira Evald, P.J.D.; Aoki, V.M.; da Silva, C.B.; Cardoso, D.S.; Pinheiro, P.M.; da Costa Botelho, S.S.; Junior, P.L.J.D. A review on quadrotor attitude control strategies. Int. J. Intell. Robot. Appl. 2024, 8, 230–250. [Google Scholar] [CrossRef]
  3. 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]
  4. Li, S.; Duan, N.; Pei, H. Singularity-free predefined time tracking control for quadrotor UAV with input saturation and error constraints. Nonlinear Dyn. 2025, 113, 13225–13242. [Google Scholar] [CrossRef]
  5. Li, S.; Duan, N.; Pei, H. Predefined time trajectory tracking control and hardware in loop verification for quadrotor UAV under input delay and disturbances. Asian J. Control 2025, 27, 1950–1963. [Google Scholar] [CrossRef]
  6. Koksal, N.; Jalalmaab, M.; Fidan, B. Adaptive Linear Quadratic Attitude Tracking Control of a Quadrotor UAV Based on IMU Sensor Data Fusion. Sensors 2019, 19, 46. [Google Scholar] [CrossRef] [PubMed]
  7. Mofid, O.; Mobayen, S. Adaptive sliding mode control for finite-time stability of quad-rotor UAVs with parametric uncertainties. ISA Trans. 2018, 72, 1–14. [Google Scholar] [CrossRef] [PubMed]
  8. Tian, B.; Liu, L.; Lu, H.; Zuo, Z.; Zong, Q.; Zhang, Y. Multivariable Finite Time Attitude Control for Quadrotor UAV: Theory and Experimentation. IEEE Trans. Ind. Electron. 2018, 65, 2567–2577. [Google Scholar] [CrossRef]
  9. Yang, M.; Zhou, Z.; You, X. Research on Trajectory Tracking Control of Inspection UAV Based on Real-Time Sensor Data. Sensors 2022, 22, 3648. [Google Scholar] [CrossRef] [PubMed]
  10. Melo, A.G.; Andrade, F.A.A.; Guedes, I.P.; Carvalho, G.F.; Zachi, A.R.L.; Pinto, M.F. Fuzzy Gain-Scheduling PID for UAV Position and Altitude Controllers. Sensors 2022, 22, 2173. [Google Scholar] [CrossRef] [PubMed]
  11. Goodarzi, F.A.; Lee, D.; Lee, T. Geometric Adaptive Tracking Control of a Quadrotor Unmanned Aerial Vehicle on SE(3) for Agile Maneuvers. J. Dyn. Syst. Meas. Control 2015, 137, 091007. [Google Scholar] [CrossRef]
  12. Lee, T.; Leok, M.; McClamroch, N.H. Geometric tracking control of a quadrotor UAV on SE(3). In Proceedings of the 49th IEEE Conference on Decision and Control (CDC); IEEE: Piscataway, NJ, USA, 2010; pp. 5420–5425. [Google Scholar] [CrossRef]
  13. Faessler, M.; Franchi, A.; Scaramuzza, D. Differential Flatness of Quadrotor Dynamics Subject to Rotor Drag for Accurate Tracking of High-Speed Trajectories. IEEE Robot. Autom. Lett. 2018, 3, 620–626. [Google Scholar] [CrossRef]
  14. Mellinger, D.; Michael, N.; Kumar, V. Trajectory Generation and Control for Precise Aggressive Maneuvers with Quadrotors. In Experimental Robotics: The 12th International Symposium on Experimental Robotics; Springer: Berlin/Heidelberg, Germany, 2014; pp. 361–373. [Google Scholar] [CrossRef]
  15. Wang, L.; Chen, J.; Huang, Y.; Zhu, Y.; Pei, H. Geometric attitude tracking control of quadrotor UAVs with adaptive extended state observers. ISA Trans. 2025, 160, 289–297. [Google Scholar] [CrossRef] [PubMed]
  16. Madebo, M.M.; Abdissa, C.M.; Lemma, L.N.; Negash, D.S. Robust Tracking Control for Quadrotor UAV With External Disturbances and Uncertainties Using Neural Network Based MRAC. IEEE Access 2024, 12, 36183–36201. [Google Scholar] [CrossRef]
  17. Yang, Y.; Kim, S.; Lee, K.; Leeghim, H. Disturbance Robust Attitude Stabilization of Multirotors with Control Moment Gyros. Sensors 2024, 24, 8212. [Google Scholar] [CrossRef] [PubMed]
  18. Mahony, R.; Kumar, V.; Corke, P. Multirotor Aerial Vehicles: Modeling, Estimation, and Control of Quadrotor. IEEE Robot. Autom. Mag. 2012, 19, 20–32. [Google Scholar] [CrossRef]
  19. Invernizzi, D.; Panza, S.; Lovera, M. Robust Tuning of Geometric Attitude Controllers for Multirotor Unmanned Aerial Vehicles. J. Guid. Control Dyn. 2020, 43, 1332–1343. [Google Scholar] [CrossRef]
  20. Bui, D.N.; Van Nguyen, T.T.; Phung, M.D. Lyapunov-Based Nonlinear Model Predictive Control for Attitude Trajectory Tracking of Unmanned Aerial Vehicles. Int. J. Aeronaut. Space Sci. 2023, 24, 502–513. [Google Scholar] [CrossRef]
  21. Xu, D.; Pei, H. Nonlinear Model Predictive Control Deployed on Embedded Platform for a Small Unmanned Helicopter. In Proceedings of the Advances in Guidance, Navigation and Control; Yan, L., Duan, H., Deng, Y., Eds.; Springer: Singapore, 2025; pp. 531–542. [Google Scholar]
  22. Homann, G.M.; Huang, H.; Waslander, S.L.; Tomlin, C.J. Quadrotor Helicopter Flight Dynamics and Control: Theory and Experiment. In Proceedings of the AIAA Guidance, Navigation and Control Conference and Exhibit, Hilton Head, SC, USA, 20–23 August 2007. [Google Scholar]
Figure 1. The influence of VTOL attitude on horizontal acceleration in the North-East-Down (NED) coordinate frame.
Figure 1. The influence of VTOL attitude on horizontal acceleration in the North-East-Down (NED) coordinate frame.
Sensors 26 02727 g001
Figure 2. Step Response of the Horizontal Acceleration Coefficient. (a) Dynamic response of the horizontal acceleration coefficients subject to different attitude planning schemes. (b) Dynamic response of the deviation in horizontal acceleration coefficients from the first-order reference under different attitude planning schemes. (c) Trajectories of the horizontal acceleration coefficients under different attitude planning methods.
Figure 2. Step Response of the Horizontal Acceleration Coefficient. (a) Dynamic response of the horizontal acceleration coefficients subject to different attitude planning schemes. (b) Dynamic response of the deviation in horizontal acceleration coefficients from the first-order reference under different attitude planning schemes. (c) Trajectories of the horizontal acceleration coefficients under different attitude planning methods.
Sensors 26 02727 g002
Figure 3. Step response of the horizontal acceleration coefficient for the Euler-angle method under multiple heading angles. (a) Dynamic response of the horizontal acceleration coefficients. (b) Dynamic response of the deviation in horizontal acceleration coefficients from the first-order reference. (c) Trajectories of the horizontal acceleration coefficients.
Figure 3. Step response of the horizontal acceleration coefficient for the Euler-angle method under multiple heading angles. (a) Dynamic response of the horizontal acceleration coefficients. (b) Dynamic response of the deviation in horizontal acceleration coefficients from the first-order reference. (c) Trajectories of the horizontal acceleration coefficients.
Sensors 26 02727 g003
Figure 4. Step Response of the Horizontal Acceleration Coefficient with angular rate limit. (a) Dynamic response of the horizontal acceleration coefficients subject to different attitude planning schemes. (b) Dynamic response of the deviation in horizontal acceleration coefficients from the first-order reference under different attitude planning schemes. (c) The combined magnitude of the roll and pitch angular velocity components.
Figure 4. Step Response of the Horizontal Acceleration Coefficient with angular rate limit. (a) Dynamic response of the horizontal acceleration coefficients subject to different attitude planning schemes. (b) Dynamic response of the deviation in horizontal acceleration coefficients from the first-order reference under different attitude planning schemes. (c) The combined magnitude of the roll and pitch angular velocity components.
Sensors 26 02727 g004
Figure 5. Step response of the horizontal acceleration coefficient under different attitude planning schemes for the complete inner-loop model. (a) orizontal acceleration coefficient and the second-order reference. (b) Deviation between the horizontal acceleration coefficient and the second-order reference. (c) Trajectory of the horizontal acceleration coefficient. (d) Horizontal acceleration coefficient and the first-order reference. (e) Deviation between the horizontal acceleration coefficient and the first-order reference. (f) Sum of the roll angular velocity component and the pitch angular velocity component.
Figure 5. Step response of the horizontal acceleration coefficient under different attitude planning schemes for the complete inner-loop model. (a) orizontal acceleration coefficient and the second-order reference. (b) Deviation between the horizontal acceleration coefficient and the second-order reference. (c) Trajectory of the horizontal acceleration coefficient. (d) Horizontal acceleration coefficient and the first-order reference. (e) Deviation between the horizontal acceleration coefficient and the first-order reference. (f) Sum of the roll angular velocity component and the pitch angular velocity component.
Sensors 26 02727 g005
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

Xu, D.; Pei, H. Attitude Controller for UAV First-Order Acceleration Coefficients Tracking. Sensors 2026, 26, 2727. https://doi.org/10.3390/s26092727

AMA Style

Xu D, Pei H. Attitude Controller for UAV First-Order Acceleration Coefficients Tracking. Sensors. 2026; 26(9):2727. https://doi.org/10.3390/s26092727

Chicago/Turabian Style

Xu, Ding, and Hailong Pei. 2026. "Attitude Controller for UAV First-Order Acceleration Coefficients Tracking" Sensors 26, no. 9: 2727. https://doi.org/10.3390/s26092727

APA Style

Xu, D., & Pei, H. (2026). Attitude Controller for UAV First-Order Acceleration Coefficients Tracking. Sensors, 26(9), 2727. https://doi.org/10.3390/s26092727

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop