Research Article: Modeling and Nonlinear Control of A Quadcopter For Stabilization and Trajectory Tracking
Research Article: Modeling and Nonlinear Control of A Quadcopter For Stabilization and Trajectory Tracking
Journal of Engineering
Volume 2022, Article ID 2449901, 19 pages
https://doi.org/10.1155/2022/2449901
Research Article
Modeling and Nonlinear Control of a Quadcopter for Stabilization
and Trajectory Tracking
Received 3 May 2022; Revised 12 August 2022; Accepted 22 September 2022; Published 10 October 2022
Copyright © 2022 Ademola Abdulkareem et al. This is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is
properly cited.
This paper presents an adequate mathematical representation of a quadcopter’s system dynamics and effective control techniques.
A quadcopter is an unmanned aerial vehicle (UAV) that is able to do vertical take-off and landing. This study presents a nonlinear
quadcopter system’s mathematical modeling and control for stabilization and trajectory tracking. The mathematical model of the
system dynamics of the quadcopter is derived using Newton and Euler equations with proper references to the appropriate frame
or coordinate system. A PD control algorithm is developed for the nonlinear system for stabilization. Another nonlinear control
technique called full state feedback linearization (FBL) using nonlinear dynamic inversion (NDI) is developed and implemented
on the quadcopter system. However, there is a problem with the normal approach of the complete derivation of the full state FBL
system using NDI as gathered from the literature review. In such an approach, the PD controller that was used for attitude
stabilization was able to stabilize the angles to zero states, but the position variables cannot be stabilized because the state variables
are not observable. Thus, a new approach where the position variables are mapped to the angle variables which are controllable so
as to drive all states to zero stability was proposed in this study. The aim of the study was achieved but the downside is that it takes a
longer time to achieve this stability so it is not efficient and should only be considered when absolute zero stability is the aim
without considering time efficiency. The study further investigates the problem of nonlinear quadcopter system’s mathematical
modelling and control for stabilization and trajectory tracking using the feedback linearization (FBL) technique combined with
the PD controller. The proposed control algorithms are implemented on the quadcopter model using MATLAB and analyzed in
terms of system stabilization and trajectory tracking. The PD controller produces satisfactory results for system stabilization, but
the FBL system combined with the PD controller performs better for trajectory tracking of the quadcopter system.
T2 T3 the dynamics of the system at every point and are not usually
very effective in practical scenarios.
As the range and complexity of applications for quad-
T1 copters expand on a daily basis, the control techniques
T4
utilized on the system must also improve. This paper aims to
motor 2
develop a mathematical model of a quadcopter system and
motor 3
Pitch Y implement nonlinear control techniques on the derived
model for stabilization and trajectory tracking of a quad-
copter. The full state feedback linearization (FBL) system
control based on dynamic inversion for a nonlinear system
of a quadcopter is derived and computed in this paper
X
motor 1 Roll without the use of small-angle approximation.
Front
Yaw motor 4
2. Literature Survey
The mathematical modelling and control of a quadcopter are
Z
presented in [8]. A matrix approach and the use of bond
Figure 1: Quadcopter dynamics. graphs to describe the dynamic model of a quadrotor are
elaborated in [9]. A more detailed derivation of the system
dynamics is given in [10]. The work in [8] shows the basics of
forward or backward movement. Yaw is movement in a quadcopter modelling and control to serve as a stepping
clockwise or anticlockwise manner while staying level to the stone for future research advancement. A detailed study of
ground to change the quadcopter’s direction. These flight the mathematical model of the quadcopter dynamics is
motions can be achieved by controlling the rotational speeds given, and the differential state equations of the system
of the four motors. dynamics are derived from both the Newton–Euler and
Quadcopter designs have recently been popular in UAV Euler–Lagrange equations. A simple mathematical model is
research. To control and stabilize the aircraft, these UAVs presented in this paper, neglecting several aerodynamic
use an electrical control system and sensors [1]. The small effects and the modelling of the electric motor spinning the
unmanned aerial vehicles (SUAV) have become a reality, rotors. The developed model is simulated to analyze the
thanks to recent microcomputer technology, sensor tech- behavior of the system, and control algorithms are imple-
nology, control systems, and dynamics theory advance- mented for stability and trajectory control of the system.
ments. Due to their compact size, low cost, and agility, these The PD controller is used to achieve this, and a heuristic
systems are being used in various applications. method is developed for trajectory control of the quadcopter
Indoor quadcopters are usually relatively small in size flight. Integration of the PD controller and the heuristic
and cannot utilize GPS for absolute positioning. They thrive method is used to minimize the disturbance on the quad-
in the absence of strong winds and relatively stable light copter system caused by external forces. The PD control
conditions and their missions are usually shorter than those algorithm was integrated into the heuristic method because
of an outdoor quadcopter [2, 3]. Outdoor quadcopters are the heuristic method development did not account for
relatively bigger in size than the indoor quadcopter and can unmodelled disturbances (wind). A decline in the perfor-
utilize GPS for absolute positioning. They are more durable mance of the PD controller was observed if the parameter
and can fly for longer periods of time than indoor quad- values were extremely small or high. The necessity for an
copters [2]. A DJI Phantom 4 is an example of an outdoor actual experimental prototype was identified, so those re-
quadcopter [4]. alistic and accurate findings could be acquired and com-
In the 1920s and 1930s, a few manned designs existed. parison between the simulated results and real-life
These vehicles were among the first heavier-than-air vertical measurements would be possible.
take-off and landing (VTOL) vehicles to be successfully The PID controller may utilize the three controller terms
tested [1]. However, early prototypes performed poorly due of proportional, integral, and derivative gains to implement
to weak stability augmentation and restricted control au- precise and optimum control output [11]. The controller
thority, while latter versions required too much pilot effort. attempts to minimize the error over time by adjusting the
Historically, basic linear control techniques were used to control variable u(t). The proportional gain produces an
ensure easy computation and flight stability, but due to output that is proportional to the error value e(t). This
improved modeling techniques and faster computational output is obtained by multiplying the error value by a
capabilities, it is now possible to run comprehensive non- proportional constant. The integral gain considers the past
linear techniques in real-time [5]. The major components of error values and seeks to reduce the residual error by adding
a quadcopter are frame, propeller, motor, speed controller, a control effect obtained from the integration of the cu-
flight controller, battery, transmitter, and receiver [6, 7]. mulative previous errors. The derivative gain anticipates or
Linear control techniques can be implemented on the predicts the future behavior of the error and exerts a control
controller of a quadcopter by linearizing the system about an effect produced by the rate of change of the error with
equilibrium point, but such approximation may not preserve respect to time [12]. The linear quadratic regulator (LQR) is a
Journal of Engineering 3
popular linear control algorithm that provides optimally quadcopter motion without considering the forces acting on
controlled feedback gains to enable stability and high-per- it, whereas the dynamics explain the forces causing the
formance design of closed-loop systems. The LQR controller motion. This gives an overview of the response of quad-
is implemented on a linearized system and makes use of a copters when under the influence of extraneous forces.
mathematical algorithm to minimize a cost function with Nonlinear state equations for the system were derived, and
when the weighting factors are provided. The cost function is the manual method to obtain minimum steady-state error
often described as the sum of deviations of certain key for PID tuning is presented. This research resulted in a
measurements from their desired values [13]. quadcopter with a composite frame assembled and imple-
Several control algorithms have been researched for mented in real-time for pitch, roll, and stabilization with PID
quadcopters for attitude stabilization and trajectory track- control. The results yield adequate performance when the
ing. The objective is to implement a control algorithm that hardware configuration is at the hover point.
permits the quadcopter’s states to converge to an unpre- A thesis on quadcopter flight mechanics model and
dictable set of time-varying reference states. It is possible to control algorithms is shown in [2]. The focus of this thesis
control the quadcopter by linearizing the system dynamics was to develop a nonlinear model of quadcopter flight
around a stable point and applying linear control techniques, mechanics with suitable control algorithms for stabilization
as shown in [14, 15]. Nonlinear control algorithms such as and implement in MATLAB/Simulink. The quadcopter
backstepping, sliding mode [16, 17], and feedback lineari- dynamics were derived from the equation of motion and
zation [16, 18] are effective for quadcopter control as better forces, and a nonlinear model was obtained based on these
performances have been observed from their implementa- dynamics. Aerodynamic effects such as nonzero free steam
tion. Numerous control algorithms for attitude control have and blade-flapping are ignored in the derivation of the
been studied. These include the PID controllers [5, 8, 10], system equations, but other forces such as air friction and
inverse dynamic control, sliding-mode controller [19], linear drag forces are considered. For analysis of the system, the
quadratic regulator [5], and feedback linearization control model is linearized at a stable hover point, and both the
[18–20]. A hierarchical control approach is used in [10], linear and nonlinear models are analyzed. The gradient
where different levels (controlling rotor rotational speed, descent method is used for controller tuning to obtain
vehicle attitude, and trajectory position) form feedback optimum control parameters, and the system is simulated
loops. for a given period of time. A better performance was ob-
A review of control algorithms for autonomous quad- served from the automatically tuned PID controller (using
rotors is presented in [20]. Several control algorithms are the gradient descent method) than the manually tuned PID
analyzed to propose hybrid systems that would combine the controller.
advantages of more than one control algorithm. The focus of The design and control of quadrotors in relation to
this paper was to implement the optimal control algorithm autonomous flying [1] are a thesis that entails the modelling,
of the quadrotor manned aerial vehicle for game counting in design, and control of small flying drones with a focus on
the protected game reserves in Africa. The control algo- vertical take-off and landing (VTOL) systems. In this thesis,
rithms analyzed in this paper are PID, linear quadratic an autonomous quadrotor called OS4 is modelled and
regulator (LQR), sliding-mode control, backstepping con- simulated with various controllers. A more complex
trol, adaptive control, and artificial neural networks. From mathematical model is presented here as the system dy-
the review, no particular control algorithm gives the best namics account for more realistic aerodynamic coefficients,
performance in all required features in terms of fast re- sensor, and actuator models. The OS4 quadcopter model is
sponse, disturbance rejection, stability, robustness, adapt- simulated with five different control algorithms. The first one
ability, optimality, and tracking ability. A hybrid control was based on Lyapunov theory and was implemented for
system could have the best combination of some of these attitude stabilization, but after simulation on OS4, it was
features but does not guarantee overall optimum perfor- observed that it was not stable enough to allow hover flight.
mance. Certain features are more important depending on The second control algorithm implemented was the PID
the application of the quadrotors; hence, compromises controller, and it was suitable for attitude stabilization of the
would have to be made to implement control algorithms that quadcopter system when flying near hover, but this was only
excel in such areas of application. A quadrotor to be used for possible in the absence of huge disturbances. The third
game counting is designed to prioritize specific character- control algorithm was an LQR controller that presented
istics such as high endurance, high agility, high cruising, low adequate stabilization, but this control algorithm was less
noise, and vertical take-off and landing ability. This paper adaptive than the PID. The fourth control algorithm was the
concluded that the designed quadrotor would be suitable for backstepping controller, which achieved excellent stabili-
assisting nature conservationists in game counting and zation and control in relatively large disturbances. The fifth
obtaining accurate animal statistics. A PID controller with control algorithm implemented was the sliding-mode
provision for angular acceleration feedback is utilized in [21] technique, but this control algorithm did not give desirable
for attitude stabilization. This causes significant gain in- results because the switching characteristics of the controller
crease resulting in higher bandwidth. were not compatible with the dynamics of the quadcopter
A comprehensive mathematical modelling of the kine- system. After the implementation and analysis of these five
matics and dynamics of a quadcopter system is described in control algorithms, a suitable control algorithm was de-
[22]. The kinematic aspect of the modelling depicts the veloped by integrating the PID and the backstepping
4 Journal of Engineering
The system is complex and to control it, the quadcopter is Any orientation of a rigid body can be achieved by the
modelled on the following assumptions [1]: combination of the three basic Euler angles. The rotation
matrices are given by the following equation [5]:
(i) The structure is rigid
(ii) The structure is axis symmetrical 1 0 0
⎡⎢⎢⎢ ⎤⎥⎥⎥
(iii) The center of gravity and the body-fixed frame Rx (ϕ) � ⎢⎢⎢⎢⎣ 0 c(ϕ) −s(ϕ) ⎥⎥⎥⎥⎦,
origin coincide 0 s(ϕ) c(ϕ)
(iv) The propellers are rigid c(ϕ) 0 s(ϕ)
(v) Thrust and drag are proportional to the square of ⎡⎢⎢ ⎤⎥⎥⎥
Ry (ϕ) � ⎢⎢⎢⎢⎢⎣ 0 0 ⎥⎥⎥⎥⎦,
1 (1)
the propeller’s speed.
−s(ϕ) 0 c(ϕ)
c(ψ) −s(ψ) 0
3.1.1. Euler Angles. The Euler angles are three angles in- ⎡⎢⎢⎢ ⎤⎥⎥⎥
troduced by Leonhard Euler to describe the orientation of a Rz (ϕ) � ⎢⎢⎣ s(ψ) c(ψ) 0 ⎥⎥⎥⎥⎦,
⎢
⎢
rigid body in a coordinate system. They are also used to 0 0 1
describe the relationship between two reference frames and
convert the coordinates of a point in one reference frame to where c(ϕ) � cos(ϕ), s(ϕ) � sin(ϕ), c(θ) � cos(θ), s(θ) �
coordinates of the same point in another reference frame. sin(θ), c(ψ) � cos(ψ), s(ψ) � sin(ψ). The rotation matrix
Euler angles are denoted as ϕ, θ, and ψ for the roll, pitch, and depicting the relationship between the inertial frame and the
yaw angles, respectively, and represent the rotations of a body frame is given as follows:
body about the axes of a coordinate system.
R is a rotational matrix and is orthogonal such that From this statement, vI ≠ vB and ωI ≠ ωB , instead
R− 1 � RT .
vI � R · vB ,
Let
T 3.1.3. Rotational Motion. Assuming the quadcopter is a rigid
vB � u v ω ,
T
(5) body and using Euler’s equations for rigid bodies, the dy-
ωB � p q r . namics equation in the body frame is given as follows:
6 Journal of Engineering
Iω_ B + ωB × IωB + Γ � τ B . (8) where kt is the thrust coefficient, kb is the drag coefficient,
and l is the distance between the rotor and the center of mass
We also assume that the quadcopter has a symmetric of the quadcopter.
structure with the four arms aligned with the body x- and y-
axes. Therefore, the inertia matrix I is a diagonal matrix in
which Ixx � Iyy . 3.1.4. Translational Motion. Using Newtonian equation to
model the linear dynamics, the extraneous forces acting on
Ixx 0 0
⎢
⎡
⎢ ⎤⎥⎥⎥ the quadcopter are given as follows:
⎢
⎢ ⎥⎥
I �⎢
⎣ 0 Iyy 0 ⎥⎥⎦.
⎢
⎢ (9)
0
0 0 Izz ⎡⎢⎢⎢ ⎤⎥⎥
_ 1 � ⎢⎢⎣ 0 ⎥⎥⎥⎥⎥⎦ + RTB + FD .
mv ⎢
⎢ (17)
−mg
The gyroscopic forces Γ are caused by the combined
rotation of the four rotors and the quadcopter body such that Drag force FD is the force acting on the system as a result
the equation is as follows: of fluid friction (air resistance). A simplified equation form is
4
used where friction is modelled as being proportional to the
Γ � Jr ωB ∧e3 (−1)i+1 ωri . (10) linear velocity in all directions.
i�1 FD � −kd vI . (18)
In matrix form, The angular velocity of the ith rotor creates a force Fi in
the direction of the rotor axis (z-direction). The combined
Γ � Jr ωB ωr whereωr � −ω1 + ω2 − ω3 + ω4 . (11) forces create thrust T in the direction of the body z-axis such
that
The external torque 4 4
T T � Fi � kt ω2i . (19)
τ B � τ ϕ τ θ τ ψ . (12) i�1 i�1
The roll torque component τ ϕ and the pitch torque Since it acts in the z-axis,
component τ θ are obtained from standard mechanics where 0
0
i � 1 and i � 3 motors are arbitrarily chosen to be on the ⎡⎢⎢⎢ ⎤⎥⎥⎥ ⎢⎡⎢⎢ ⎤⎥⎥⎥
⎢
TB � ⎢⎢⎢⎣ 0 ⎥⎥⎥⎦ � kt ⎢⎢⎢⎢⎣ 0 ⎥⎥⎥ . (20)
roll-axis while i � 2 and i � 4 are arbitrarily chosen to be on ⎥⎦
the pitch-axis. T i � 1ω2i
τ ϕ � r × T � l−kt ω22 + kt ω24 � lkt −ω22 + ω24 ,
(13)
τ θ � r × T � l−kt ω21 + kt ω23 � lkt −ω21 + ω23 .
3.1.5. State-Space Model. From the rotational dynamics
For the yaw-axis, the rotor axis is pointing in the z- discussed, equation (8) can be rewritten as follows:
direction in the body frame, and the torque created around ω_ B � I− 1 −ωB × IωB − Γ + τ B ,
the rotor axis is given as follows:
p Ixx p p
τ ψ � (−1)i+1 kb ω2i + Im ωi , (14) ⎜
⎛
⎜
⎜
⎡⎢⎢⎢ ⎤⎥⎥⎥ ⎡⎢⎢⎢ ⎤⎥⎥⎥ ⎡⎢⎢⎢ ⎤⎥⎥⎥ ⎟
⎞
⎟
⎟
− 1⎜
⎜ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥ ⎟
⎟
ω_ B � I ⎜ ⎜
⎜ ⎢
⎢
⎢ q ⎥
⎥
⎥ × ⎢
⎢
⎢ I q ⎥
⎥
⎥ − J ⎢
⎢
⎢ q ⎥
⎥
⎥ ω + τ ⎟
⎟
⎟ ,
where (−1)i+1 is positive for the ith propeller if the propeller ⎜
⎜
⎝⎣ ⎦ ⎣ ⎢
⎢ ⎥
⎥ ⎢
⎢ yy ⎥
⎥ r ⎢
⎢ ⎥
⎥ r B ⎟
⎟
⎠
⎦ ⎣ ⎦
is spinning clockwise and negative if it is spinning counter- r Izz r r
clockwise. The term Im ω_ i can be ignored because it is in a
steady-state, ω_ i ≈ 0. I − Izz qr
⎡⎢⎢⎢ yy ⎤⎥⎥⎥ τϕ (21)
Therefore, the total torque about the z-axis is given by the q
sum of all the torques from each propeller as follows:
⎢⎢⎢
⎢⎢⎢ Ixx ⎥⎥⎥
⎥⎥⎥ ⎡⎢⎢⎢ I ⎤⎥⎥⎥
⎡⎢⎢⎢
⎢⎢⎢ Ixx ⎥⎥⎤⎥⎥⎥
⎢ ⎥ ⎢ xx ⎥ ⎢⎢⎢ ⎥⎥⎥
p_ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥
⎡⎢⎢⎢ ⎤⎥⎥⎥ ⎢⎢⎢ ⎢ ⎥⎥⎥ ⎢
⎢ ⎥
⎥ ⎥
τ ψ � kb −ω21 + ω22 − ω23 + ω24 . (15) ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ Izz − Ixx pr ⎥⎥⎥⎥ ⎢
⎢⎢⎢ ⎥
⎥⎥⎥ ⎢⎢⎢
⎢ τ θ ⎥⎥⎥⎥⎥
⎢⎢⎢ q_ ⎥⎥⎥ � ⎢⎢⎢ ⎥⎥⎥ − Jr ⎢⎢⎢⎢ −p ⎥⎥⎥⎥ωr + ⎢⎢⎢⎢⎢ ⎥⎥
⎢⎢⎢ ⎥⎥ ⎢⎢⎢
⎣ ⎦ ⎢⎢ I yy
⎥
⎥
⎥⎥⎥ ⎢
⎢
⎢⎢⎢ Iyy ⎥⎥⎥ ⎥
⎥ ⎢⎢⎢ Iyy ⎥⎥⎥⎥⎥.
⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥
Therefore, the torque matrix can be written as follows: r_ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥
⎢⎢⎢ ⎥
⎢⎢⎢
⎢⎢⎢ I − I pq ⎥⎥⎥
⎥⎥⎥ ⎣ ⎦ ⎢⎢⎣ τ ψ ⎥⎥⎥⎥⎦
lkt −ω2 + ω4 2 2 ⎣ xx yy ⎦ 0
τϕ ⎢
⎡ ⎤⎥⎥⎥ Izz
⎢
⎡
⎢ ⎥
⎤
⎥ ⎢
⎢
⎢ ⎥⎥⎥ Izz
⎢ ⎥⎥⎥ ⎢
τB � ⎢
⎢
⎢ τ
⎣ ⎥⎦ ⎢
⎢ θ ⎥ � ⎢
⎢
⎢ lk t −ω2
1 + ω2
3 ⎥⎥⎥. (16)
⎢
⎣ ⎥⎦ From the linear dynamics discussed, equation (16) can
τψ kb −ω21 + ω22 − ω23 + ω24 be written out as follows:
Journal of Engineering 7
POSITION CONTROL
ω1 TRANSLATIONAL
DYNAMICS
zd + Z-POSITION CONTROLLER
- ϕd ω2
SIGNAL +
Sx - ω3 ROTATIONAL
xd +- X-POSITION CONTROLLER CONVERSION DYNAMICS
ATTITUDE
TO DESIRED θd CONTROLLER ω4
Sy ATTITUDE +-
yd +- Y-POSITION CONTROLLER QUADCOPTER
DYNAMIC
MODEL
ψd +-
ϕ θ ψ
z x y
3.2.2. Feedback Linearization. Feedback linearization is a to design a controller such that it exactly cancels out the
nonlinear control technique that has sparked a lot of interest system dynamics.
recently. The main concept is to mathematically convert From equation (21), we can replace x€ � kax (x_ − x_ d ),
nonlinear system dynamics into (fully or partially) linear x_ � kdx kx (x − xd ), where kax , kdx , and kx are gain values and
ones, allowing linear control methods to be used. The goal is replace y,€ y, € and z_ accordingly.
_ z,
kdx kx T
_ x_ d +
kax x− x−xd � c(ψ)s(θ)c(ϕ),
m m
kdy ky T
_ y_ d +
kay y− y−yd � s(ψ)s(θ)c(ϕ) +c(ψ)s(ϕ), (29)
m m
kdz kz T
_ z_d +g+
kaz z− z−zd � s(ψ)s(θ)c(ϕ) +c(θ)c(ϕ).
m m
T2 2 2 k2dx k2x 2 2k k k
2 � k ax _
x − _
x d + x − xd + ax dx x x − xd x_ − x_ d
m m m
Table 1: Quadcopter parameter values for simulation. Table 2: Initial conditions for simulation.
Parameter Value Unit Position Value State Value
G 9.81 m/s2 x −1 Φ 10
M 0.468 kg y 2 Θ −10
L 0.225 m z 1 Ψ 5
Jr 3.357 × 10− 5 kg m2
kt 2.980 × 10− 6
kb 1.140 × 10− 7
Ixx 4.856 × 10− 3 kg m2 631.5
Iyy 4.856 × 10− 3 kg m2
Izz 8.801 × 10− 3 kg m2
kdx 0.25 631
kdy 0.25
Fz � c(θ)c(ϕ),
(34) 629.5
Fz
c(ϕ) � .
c(θ)
629
Substituting equations (32) and (33) into equation (30), 0 5 10 15
Time [s]
Fz c(ψ)s(θ) Fx t(ψ)s(ψ) − Fy s(ψ)
Fx � + ,
c(θ) c(ψ) + s(ψ)t(ψ) ω1 ω3
Fx t(ψ)s(ψ) − Fy s(ψ) ω2 ω4
Fz c(ψ)t(θ) � Fx − , (35)
c(ψ) + s(ψ)t(ψ) Figure 4: Control inputs for the angular velocities of the rotors.
Fx Fx t(ψ)s(ψ) − Fy s(ψ)
t(θ) � − .
Fz c(ψ) Fz c2 (ψ) + Fz s2 (ψ)
From equations (6) and (23) in terms of desired angles,
We recall we can replace ϕd � kϕ (ϕ − ϕd ), where kϕ is the gain values,
and replace θd and ψ d accordingly:
cos2 x+sin2 x � 1,
−1
1 s ϕd t θd c ϕd t θd
Fx Fx t(ψ)s(ψ)−Fy s(ψ) pd ⎡⎢⎢⎢ ⎤⎥⎥⎥ kϕ ϕ − ϕd
t(θ) � − , ⎢⎢ ⎥⎥⎥ ⎤⎥⎥⎥
Fz c(ψ) Fz ⎡⎢⎢⎢ ⎤⎥⎥⎥ ⎢⎢⎢⎢ ⎥⎥⎥ ⎡⎢⎢⎢
⎢⎢⎢ ⎥
⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ 0 c ϕ −s ϕ ⎥⎥⎥ ⎢⎢⎢ k θ − θ ⎥⎥⎥⎥⎥,
⎢⎢⎢ qd ⎥⎥⎥ � ⎢⎢⎢ d d ⎥⎥⎥ ⎢⎢⎢ θ d ⎥
Fx −Fx s2 (ψ)−Fy s(ψ)c(ψ) ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎣ ⎥⎥⎥
⎣ ⎦ ⎢⎢ ⎥⎥⎥ ⎥⎦
t(θ) � , ⎢⎢⎢⎢ s ϕd c ϕd ⎥⎥⎦
⎥ _
Fz c(ψ) (36) rd ⎣ kψ ψ − ψ d
0
c θd c θd
Fx c2 (ψ)−Fy s(ψ)c(ψ)
t(θ) � ,
Fz c(ψ) τϕ Ixx kPϕ p − pd Iyy − Izz qd rd + Jr qd ωr
⎢⎢⎢⎡ ⎥⎥⎥⎤ ⎡⎢⎢⎢ ⎤⎥⎥⎥ ⎡⎢⎢⎢⎢ ⎤⎥⎥⎥
⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢ ⎥⎥⎥ ⎢⎢ ⎥⎥
F cos2 (ψ)−Fy sin(ψ)cos(ψ) ⎢⎢⎢ τ θ ⎥⎥⎥ � ⎢⎢ Iyy kPθ q − qd ⎥⎥ − ⎢⎢⎢ I − I p r + J p ω ⎥⎥⎥⎥⎥.
⎢ ⎥ ⎢
θd � tan ⎝ x
−1 ⎛ ⎠
⎞ . ⎢⎢⎢ ⎥⎥⎥ ⎢⎢⎢⎢ ⎥⎥⎥ ⎢⎢ zz xx d d r d r⎥ ⎥⎥⎥
Fz cos(ψ) ⎣ ⎦ ⎢⎣ ⎥⎥⎦ ⎢⎢⎢⎣ ⎥⎦
τψ Izz kPψ r − rd Ixx − Iyy pd qd
For equations (32) and (34), Fx , Fy , and Fz are given as (38)
follows:
mkax x_ − x_ d + kdx kx x − xd The angular velocities ω1 , ω2 , ω3 , and ω4 can be obtained
Fx � , using equation (25).
T
mkay y_ − y_ d + kdy ky y − yd
Fy � , (37)
T 3.3. Trajectory Tracking. Trajectory control aims to take the
quadcopter system from its current position to the desired
mkaz z_ − z_d + mg + kdz kz z − zd position by regulating the quadcopter’s rotor angular ve-
Fz � .
T locities. Due to its complex dynamics, finding the best
quadcopter trajectory is a huge challenge.
10 Journal of Engineering
10 5
8 0
6 -5
4 -10
positions [m]
2 -15
angles [deg]
0 -20
-2 -25
-4 -30
-6 -35
-8 -40
-10 -45
0 5 10 15 0 5 10 15
Time [s] Time [s]
ϕ x
θ y
ψ z
(a) (b)
Figure 5: Control inputs for the positions x, y, and z and the angles ϕ, θ, and ψ.
10
8
6
4
2
angles [deg]
0
-2
-4
-6
-8
-10
0 5 10 15
Time [s]
ϕ
θ
ψ
Figure 6: Result of angles ϕ, θ , and ψ as a function of time for implemented PD controller to drive the system states to zero.
Journal of Engineering 11
700 10
8
650
6
600 4
control input [rad/s]
angles [deg]
550
0
500
-2
450 -4
-6
400
-8
350 -10
0 5 10 15 20 25 30 35 40 45 0 5 10 15 20 25 30 35 40 45
Time [s] Time [s]
ω1 ω3 ϕ
ω2 ω4 θ
ψ
(a) (b)
Figure 9: Control input and angles ϕ, θ , and ψ with an additional proportional controller gain kPxy , with a control gain of 0.04, implemented
to drive the system states to zero.
0
positions [m]
-1
-2
-3
-4
-5
0 5 10 15 20 25 30 35 40 45
Time [s]
x
y
z
Figure 10: Positions x, y, and z with an additional proportional controller gain kPxy , with a control gain of 0.04, implemented to drive the
system states to zero.
Using the concept of trajectory tracking, an attempt can 0.001-second intervals to a total time of 45 seconds. The
be made to drive the x and y positions to zero. This can be angular velocities of the four rotors and the angles
done by mapping the zero desired states of x and y to the ϕ, θ , and ψ are shown in Figure 9; the modified positions
desired ϕ and θ states, which are controllable as shown in x, y, and z are shown in Figure 10.
equations (28)–(30). An additional proportional controller The angles ϕ, θ, and ψ are stabilized to zero after 35
gain kPxy , with a control gain of 0.04 is implemented to drive seconds, and the positions x, y, and z are stabilized to zero
the system states to zero, and the simulation advances at after 45 seconds.
Journal of Engineering 13
4
Actual Trajectory
3 Desired Trajectory
Start of desired trajectory
Start of actual trajectory
2
y [m]
0
-1
-2
-3
-4
-5 -4 -3 -2 -1 0 1 2 3 4
x [m]
Figure 11: Desired and actual trajectories with PD Controller.
4 4
3 3
2
2
1
position - x [m]
position - y [m]
1
0
0
-1
-1
-2
-2
-3
-4 -3
-5 -4
0 5 10 15 20 25 30 35 40 45 0 5 10 15 20 25 30 35 40 45
Time [s] Time [s]
x actual y actual
x desired y desired
(a) (b)
Figure 12: Coordinate-wise comparison between desired and actual trajectories of Figure 11.
16
Actual Trajectory
Desired Trajectory
14
Start of desired trajectory
Start of actual trajectory
12
10
y [m]
0
-4 -3 -2 -1 0 1 2 3 4
x [m]
Figure 13: Desired and actual trajectories with PD controller.
14 Journal of Engineering
4 16
3 14
2 12
position - x [m]
position - y [m]
1 10
0 8
-1 6
-2 4
-3 2
-4 0
0 5 10 15 20 25 30 35 40 45 0 5 10 15 20 25 30 35 40 45
Time [s] Time [s]
x actual y actual
x desired y desired
(a) (b)
Figure 14: Coordinate-wise comparison between desired and actual trajectories of Figure 13.
4
Actual Trajectory
Desired Trajectory
3 Start of desired trajectory
Start of actual trajectory
1
y [m]
-1
-2
-3
-3 -2 -1 0 1 2 3
x [m]
Figure 15: Desired and actual trajectories with feedback linearization and PD controller.
4.2. Trajectory Tracking. Two controls for trajectory tracking A similar result as shown in Figure 12 is also obtained;
are considered and simulated for two different trajectories. the quadcopter cannot follow the desired trajectory with
The first control strategy is implemented with a PD con- precision.
troller, and the second strategy is a PD controller integrated
with the linearized feedback system. The total time assigned
for the simulation in both cases is 45 seconds. 4.2.2. Trajectory Tracking with Feedback Linearization and
PD Controller. The feedback linearization technique is
implemented on the quadcopter model and simulated with a
4.2.1. Trajectory Tracking with PD Controller. The com- PD controller. The desired trajectory and the actual tra-
parison between the desired and actual trajectories for the jectory for the first path are shown in Figure 15. Figure 16
first path is shown in Figure 11. Figure 12 shows the graph of shows the graph of the position variables against time.
the position variables against time. Another trajectory path is simulated, and the result is
Another trajectory path is simulated, and the result is shown in Figure 17. A similar result as shown in Figure 15 is
shown in Figure 13. The graph of the position variables also obtained; the quadcopter can lock on to the desired
against time for this path is shown in Figure 14. trajectory with more accuracy with this control.
Journal of Engineering 15
3 4
2 3
2
1
position - x [m]
position - y [m]
1
0
0
-1
-1
-2 -2
-3 -3
0 5 10 15 20 25 30 35 40 45 0 5 10 15 20 25 30 35 40 45
Time [s] Time [s]
x actual y actual
x desired y desired
(a) (b)
Figure 16: Coordinate-wise comparison between desired and actual trajectories of Figure 15.
15
Actual Trajectory
Desired Trajectory
Start of desired trajectory
Start of actual trajectory
10
y [m]
0
-3 -2 -1 0 1 2 3
x [m]
Figure 17: Desired and actual trajectories with feedback linearization and PD controller.
5. Result Analysis states of x and y to the desired ϕ and θ states which are
controllable, an additional proportional controller gain is
Detailed analysis on the performance of the PD controller used to drive all the system states to zero. However, this
for stabilization and its integration with the FBL system is approach is inefficient because it takes too long for the angles
required to determine the most suitable control strategy. The and position to stabilize. The angles ϕ, θ, and ψ stabilize to
results show that the feedback linearization technique with zero after 35 seconds, and the positions x, y, and z stabilize to
the PD control is more effective in trajectory tracking than zero after 45 seconds. The ϕ, θ, x, and y states experience
the regular PD control. overshoots before stabilizing to zero. Side-by-side com-
parisons of the angle and position variables of the two
approaches are shown in Figures 18 and 19.
5.1. Altitude Stabilization. As discussed earlier, the PD
controller with control gains shown in Table 3 was able to
stabilize the angles to the desired zero state after 10 seconds 5.2. Trajectory Tracking. The results of the two control
and drive the z position variable to zero in 5 seconds. The x strategies implemented for trajectory tracking were previ-
and y positions are eventually stabilized, but they do not ously discussed. Better performance is observed in the
stabilize to the desired zero state. By mapping the desired feedback linearized system with a PD control. The
16 Journal of Engineering
10 10
8 8
6 6
4 4
2
angles [deg]
angles [deg]
2
0 0
-2 -2
-4 -4
-6 -6
-8 -8
-10 -10
0 5 10 15 0 5 10 15 20 25 30 35 40 45
Time [s] Time [s]
ϕ ϕ
θ θ
ω ω
(a) (b)
Figure 18: The angles ϕ, θ , and ψ stabilize to zero after 35 s; the ϕ and θ states experience overshoots before stabilizing to zero.
2 2
1 1
0
0
-1
positions [m]
positions [m]
-1
-2
-2
-3
-3
-4
-5 -4
-6 -5
0 5 10 15 0 5 10 15 20 25 30 35 40 45
Time [s] Time [s]
x x
y y
z z
(a) (b)
Figure 19: The position variables x, y, and z stabilize to zero after 45 s; the x and y states experience overshoots before stabilizing to zero.
quadcopter is able to lock on to the desired trajectory and The quadcopter system simulated with the FBL and PD
follow the path with accuracy in a lesser time period. control is able to lock on to the desired trajectory after the
Figures 20–22 show the desired and actual trajectory plot first 15 seconds, while the system with only the PD control is
after 15, 30, and 45 seconds, respectively, for both the PD unable to do that properly even after 30 seconds. This shows
control and the FBL with a PD control. that the feedback linearization technique with the PD
Journal of Engineering 17
3 4
Actual Trajectory Actual Trajectory
Desired Trajectory Desired Trajectory
2 Start of desired trajectory 3 Start of desired trajectory
Start of actual trajectory Start of actual trajectory
1 2
0 1
y [m]
y [m]
-1 0
-2 -1
-3 -2
-4 -3
-5 -4 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3
x [m] x [m]
(a) (b)
Figure 20: The trajectory for PD (a) and FBL with PD control (b) after 15 seconds.
4 4
Actual Trajectory Actual Trajectory
Desired Trajectory Desired Trajectory
3 Start of desired trajectory
3 Start of desired trajectory
Start of actual trajectory Start of actual trajectory
2 2
1
1
y [m]
y [m]
0
0
-1
-1
-2
-2
-3
-4 -3
-5 -4 -3 -2 -1 0 1 2 3 4 -3 -2 -1 0 1 2 3
x [m] x [m]
(a) (b)
Figure 21: The trajectory for PD (a) and FBL with PD control (b) after 30 seconds.
4 4
Actual Trajectory Actual Trajectory
Desired Trajectory Desired Trajectory
3 Start of desired trajectory 3 Start of desired trajectory
Start of actual trajectory Start of actual trajectory
2
2
1
1
y [m]
y [m]
0
0
-1
-1
-2
-3 -2
-4 -3
-5 -4 -3 -2 -1 0 1 2 3 4 -3 -2 -1 0 1 2 3
x [m] x [m]
(a) (b)
Figure 22: The trajectory for PD (a) and FBL with PD control (b) after 45 seconds.
18 Journal of Engineering
[17] R. Xu and U. Ozguner, “Sliding mode control of a quadrotor [34] G. Perozzi, D. Efimov, J. M. Biannic, and L. Planckaert,
helicopter,” in Proceedings of the 45th IEEE Conference on “Trajectory tracking for a quadrotor under wind perturba-
Decision and Control, San Diego, CA, USA, 2006. tions: sliding mode control with state-dependent gains,”
[18] A. Das, F. Lewis, and K. Subbarao, “Dynamic inversion with Journal of the Franklin Institute, vol. 355, no. 12, pp. 4809–
zero-dynamics stabilisation for quadrotor control,” IET 4838, 2018.
Control Theory & Applications, vol. 3, pp. 303–314, April 2009. [35] A. A. El-Badawy and M. A. Bakr, “Quadcopter aggressive
[19] I. Dikmen, A. Arisoy, and H. Temeltas, “Attitude control of a maneuvers along singular configurations: an energy-quater-
quadrotor,” in Proceedings of the 2009 4th International nion based approach,” Journal of Control Science and Engi-
Conference on Recent Advances in Space Technologies, Istan- neering, vol. 2016, Article ID 7324540, 10 pages, 2016.
bul, Turkey, 2009.
[20] A. Zulu and S. John, A Review of Control Algorithms for
Autonomous Quadrotors, arXiv, Ithaca, NY, USA, 2016.
[21] G. Hoffmann, S. Waslander, and C. Tomlin, “Quadrotor
helicopter trajectory tracking control,” in Proceedings of the
AIAA Guidance, Navigation and Control Conference and
Exhibit, Monterey, California, 2008.
[22] M. Etemadi, “Mathematical dynamics, kinematics modeling
and PID equation controller of quadcopter,” International
Journal of Applied Operational Research, vol. 7, no. 1,
pp. 77–85, 2017.
[23] J. Moreno-Valenzuela, R. Pérez-Alcocer, M. Guerrero-Me-
dina, and A. Dzul, “Nonlinear PID-type controller for
quadrotor trajectory tracking,” IEEE, vol. 23, no. 5,
pp. 2436–2447, 2018.
[24] R. Miranda-Colorado and L. T. Aguilar, “Robust PID control
of quadrotors with power reduction analysis,” ISA Transac-
tions, vol. 98, pp. 47–62, 2020 March.
[25] B. Wang, P. Huang, and W. Zhang, “A robust fault-tolerant
control for quadrotor helicopters against sensor faults and
external disturbances,” Complexity, vol. 2021, Article ID
6672812, 13 pages, 2021.
[26] N. P. Nguyen and S. K. Hong, “Active fault-tolerant control of
a quadcopter against time-varying actuator faults and satu-
rations using sliding mode backstepping approach,” Applied
Sciences, vol. 9, no. 19, p. 4010, 2019.
[27] B. Erginer and E. Altug, “Modeling and PD control of a
quadrotor VTOL vehicle,” in Proceedings of the 2007 IEEE
Intelligent Vehicles Symposium, Istanbul, Turkey, 2007.
[28] S. Abdelhay and A. Zakriti, “Modeling of a quadcopter tra-
jectory tracking system using PID controller,” Procedia
Manufacturing, vol. 32, pp. 564–571, 2019.
[29] I. S. Leal, C. Abeykoon, and Y. S. Perera, “Design, simulation,
analysis and optimization of PID and fuzzy based control
systems for a quadcopter,” Electronics, vol. 10, no. 18, p. 2218,
2021.
[30] G. Shi, X. Shi, M. O’Connell et al., “Neural lander: stable drone
landing control using learned dynamics,” in Proceedings of the
2019 International Conference on Robotics and Automation
(ICRA), Montreal, QC, Canada, 2019.
[31] O. Doukhi, A. R. Fayjie, and D. J. Lee, “Intelligent controller
design for quad-rotor stabilization in presence of parameter
variations,” Journal of Advanced Transportation, vol. 2017,
Article ID 4683912, 10 pages, 2017.
[32] B. C. Min, J. H. Hong, and E. T. Matson, “Adaptive robust
control (ARC) for an altitude control of a quadrotor type
UAV carrying an unknown payload,” in Proceedings of the
2011 11th International Conference on Control, Automation
and Systems, Gyeonggi-do, Republic of Korea, 2011.
[33] E. Abbasi, M. Mahjoob, and R. Yazdanpanah, “Controlling of
quadrotor uav using a fuzzy system for tuning the pid gains in
hovering mode,” in Proceedings of the 10th International
Conference of Advanced Computer Entertainment and
Technology, Tehran, Iran, 2013.