Dynamic Modeling and Control Techniques For A Quadrotor: January 2015
Dynamic Modeling and Control Techniques For A Quadrotor: January 2015
net/publication/275642782
CITATIONS READS
2 1,056
2 authors:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Maki Habib on 04 October 2016.
Abstract—This paper presents the mathematical model for a A. State of the Art
Vertical Takeoff and Landing (VTOL) type Unmanned Aerial
Vehicle (UAV) known as Quadrotor. The nonlinear dynamic There are several control techniques that can be used to
model of the Quadrotor is formulated using Newton-Euler
method. This is followed by the development of two control control a Quadrotor which can be categorized into four main
approaches to control the altitude, attitude, heading and position categories: linear flight control systems, nonlinear flight con-
of the Quadrotor in space. The first approach is based on trol systems, hybrid and learning-based flight control systems
the linear Proportional-Derivative (PD) controller. The second [5]. Bouabdallah et al. [6] proposed the usage of Proportional-
control approach is based on the nonlinear Sliding Mode Con- Integral-Derivative (PID) and Linear Quadratic (LQ) control
troller (SMC). The parameters of both controllers were tuned
using Genetic Algorithm (GA) technique to improve the system’s techniques to be applied on an indoor micro Quadrotor. It
dynamic response. Simulation based experiments were conducted was found out that these two types of controllers performed
to evaluate the performance of the developed control techniques comparably and were able to stabilize the Quadrotor’s attitude
in terms of dynamic performance, stability and the effect of around its hover position when it is under the effect of
possible disturbances. little disturbances. Li and Li [7] used a classical PID to
Index Terms: Quadrotor, PID, Nonlinear Control, Sliding
mode.
control the position and orientation of a Quadrotor, the adopted
approach was able to stabilize the Quadrotor in a low speed
wind environment. Raffo et al. [8] used an H∞ controller to
I. I NTRODUCTION
stabilize the rotational angles together with a Model Predictive
With the huge advancements in technologies and the ability Controller (MPC) to track the desired trajectory. The effect
to manufacture miniature sensors, actuators and controllers of wind and model uncertainties was added to the simulated
using Micro-Electo-Mechanical Systems (MEMS) and Nano- model and it performed robustly with a zero steady-state
Electo-Mechanical Systems (NEMS) technologies, many re- error. In a more recent paper, Bouabdallah and Siegwart [9]
searches are now focusing on developing miniature flying proposed the use of backstepping and sliding-mode nonlinear
vehicles for the purpose of research and commercial applica- control methods to control the Quadrotor which gave better
tions. The advantages of Quadrotors over the other Unmanned performance in the presence of disturbances. Waslander et al.
Aerial Vehicles (UAVs) are their Vertical Takeoff and Landing [10] proposed controllers that can stabilize a Quadrotor in an
(VTOL) capabilities which make them an ideal platform for outdoors environment. They compared the performance of an
the use in small spaces. Added to that is their ability to integral sliding-mode controller vs. a reinforcement learning
hover that makes them a good candidate for surveillance controller. They reached a conclusion that both controllers
and monitoring tasks. In addition, Quadrotors have a higher were able to stabilize the Quadrotor outdoors with an improved
payload over conventional helicopters due to the presence of performance over classical control techniques. Madani and
four rotors instead of only one and also they have better Benallegue [11] developed a backstepping controller based
maneauverability. Quadrotors are used in many applications on Lyapunov stability theory to track desired values for
ranging from military to civil and commercial applications, the Quadrotor’s position and orientation. They divided the
such as earth science, search and rescue after natural disasters Quadrotor model into 3 subsystems: underactuated, fully-
or shipwrecks and aircraft crashes, wild fire suppression, law actuated and propeller subsystems. Their proposed algorithm
enforcement, border surveillance, agriculture development and was able to stabilize the system under no disturbances. Fang
as research testbeds [1, 2, 3, 4]. The Quadrotor is a highly non- and Gao [12] proposed merging a backstepping controller
linear, multivariable and underactuated system which makes it with an adaptive controller to overcome the problems of
a research challenge to find an efficient control technique to model uncertainties and external disturbances. The proposed
control all of its Degrees of Freedom (DOF). adaptive integral backstepping algorithm was able to reduce
the system’s overshoot and response time while eliminating the
∗ Corresponding author steady state error. Kendoul et al. [5, 13] was able to control
Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis
a Quadrotor in several flight tests based on the concept of The proposed PD and SMCs are presented in section III.
feedback linearization. Alexis et al. [14] relied on a MPC Section IV shows the simulation results of the proposed
to control the attitude of a Quadrotor in the presence of controllers and finally section V presents the conclusion of
atmospheric disturbances. The proposed algorithm behaved this paper together with the recommended future work.
well in performing rough maneuvers in a wind induced
II. Q UADROTOR M ODEL
environment as was able to track the desired attitude. In
contrary to the mentioned control techniques, learning based A. Quadrotor Structure
flight control systems do not need a precise and accurate A Quadrotor consists of four rotors, each fitted in one
dynamic model of the system to be controlled. On the other end of a cross-like structure as shown in Fig. 1. Each rotor
hand, several trials are carried out and flight data are used consists of a propeller fitted to a separately powered DC motor.
to “train” the system. There are many types of learning- Rotors 1 and 3 rotate in the same direction while rotors 2
based flight control systems, the most widely used are: neural and 4 rotate in an opposite direction leading to balancing
networks, fuzzy logic and human-based learning. Efe [15] used the total system torque and cancelling the gyroscopic and
a Neural Network to simplify the design of a PID controller aerodynamics torques in stationary flights [6, 17]. To generate
and decrease the computational time and complexity. In recent vertical upwards or downwards motion, the speed of the
literature, it was found out that using only one type of flight four rotors is increased or decreased with the same rate. To
control algorithms was not sufficient to guarantee a good produce roll rotation coupled with motion along the Y-axis,
performance, specially when the Quadrotor is not flying near the second and fourth rotors speeds are changed while for
its nominal condition. Thus, researchers are now focusing the pitch rotation coupled with motion along the X-axis, it
on using more than one type of flight control algorithms; is the first and third rotors speeds that need to be changed.
Azzam and Wang [1] used a Proportional-Derivative (PD) To produce yaw rotation, there has to be a difference in the
controller for altitude and yaw rotation and a PID controller opposite torque produced by each propeller pair. For instance,
integrated with a backstepping controller for the pitch and roll for a positive yaw rotation, the speed of the two clockwise
control. An optimization algorithm was used instead of the turning rotors need to be increased while the speed of the two
pole placement technique to overcome the difficulty of pole counterclockwise turning rotors need to be decreased [6, 18].
placement in a nonlinear time variant system. The system was
divided into rotational and translation subsystems where the B. Kinematics Model
translation subsystem stabilizes the Quadrotor position in flight In order to define the Quadrotor’s motion, two coordinate
and generates the needed roll and pitch angles to be fed to the frames are defined; the Earth inertial frame which is fixed at
rotational subsystem. Nagaty et al. [16] proposed the usage ground level with N, E and D axes pointing North, East and
of a nested loop control algorithm; the outer loop consists of Downwards and the body frame at the center of the Quadrotor
a PID controller responsible for the generation of the desired body with X, Y and Z axes pointing in the direction of rotors
attitude angles that would achieve the desired position. These 1, 2 and to the ground respectively as shown in Fig. 1. The
attitude angles are then fed to the inner loop. The inner loop Quadrotor is a 6 DOF object; (x, y, z, φ, θ and ψ) are used
stabilization controller relies on the backstepping algorithm to to express its position and orientation in space. The distance
track the desired altitude, attitude and heading. between the Earth frame and the body frame describes the
absolute position of the center of mass of the Quadrotor r =
B. Objectives [x y z]T , usually z is referred to as the altitude. The orientation
In this paper, a nested structure PD controller is formulated of the Quadrotor is described using roll, pitch and yaw angles
to control the altitude, attitude, heading and position of a (φ, θ and ψ) representing rotations about the body frame’s X,
Quadrotor in space. Inner controllers will generate the required Y and Z-axes respectively as shown in Fig. 1. Roll and pitch
control inputs that will stabilize the altitude of the Quadrotor angles refer to the attitude of the Quadrotor and the yaw angle
together with it attitude and heading to a defined trajectory. An refer to its heading. Assuming the order of rotation to be roll
outer controller will generate the desired values of the Quadro- (φ), pitch (θ) then yaw (ψ), the rotation matrix R represents
tor’s attitude angles to command the Quadrotor to follow a the rotation of the body frame to the inertial frame which in
desired position in space. The inner PD controller will then turn describes the orientation of the Quadrotor.
be replaced with a Sliding Mode Controller (SMC) keeping
R = R(ψ)R(θ)R(φ)
the outer PD controller that generates the desired attitude. The ⎡ ⎤
system will be simulated using MATLAB/Simulink and the cψcθ cψsφsθ sφsψ + cφcψsθ
performance of the PD controller will then be compared to = ⎣cθsψ cθcψ + sφsψsθ cφsψsθ − cψsθ ⎦ (1)
that of the SMC in terms of dynamic performance, stability −sθ cθsφ cφcθ
and the effect of possible disturbances. Where c and s denote cos and sin respectively. To relate the
Euler rates η̇ = [φ̇ θ̇ ψ̇]T and angular body rates ω = [p q r]T ,
C. Paper Structure
a transformation is needed as follows [19];
This paper is structured as follows: section II explains the
Quadrotor’s structure and its kinematics and dynamics models. ω = R̂η̇ (2)
Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis
where
⎡ ⎤ Fig. 2. Forces and Moments acting on Quadrotor
1 0 − sin θ
R̂ = ⎣0 cos φ sin φ cos θ ⎦ (3)
0 − sin φ cos φ cos θ For the moments acting on the Quadrotor MB , each rotor
Around the hover position, small angle assumption is made i generates an aerodynamic moment Mi and an aerodynamic
where cos φ ≡ cos θ ≡ 1 and sin φ ≡ sin θ ≡ 0. Thus R̂ can force Fi
be simplified to the identity matrix I [16].
Mi = KM Ω2i (6)
C. Dynamics Model Fi = Kf Ω2i (7)
The motion of the Quadrotor can be divided into two
where KM and Kf are the aerodynamic moment and force
subsystems; a rotational subsystem (attitude and heading)
constants respectively which can be determined experimentally
and a translational subsystem (altitude and x and y motion).
for each propeller. Ωi is the angular velocity of rotor i. Fig. 2
Although the Quadrotor is a 6 DOF underactuated system,
shows that each rotor causes an upwards thrust force Fi and
the derived rotational subsystem is fully actuated, while the
generates a moment Mi with direction opposite to that of the
translational subsystem is underactuated [16].
direction of its rotation. F2 multiplied by the moment arm l
1) Rotational Subsystem: The rotational equations of mo- generates a negative moment about the body frame’s X-axis,
tion are derived in the body frame (to have the inertia matrix while in the same manner, F4 generates a positive moment.
invariant with time) using the Newton-Euler method [16] Thus the total moment about the body frame’s X-axis can be
J ω̇ + ω × Jω + ω × [0 0 Jr Ωr ]T = MB (4) expressed as,
add the position controller, the desired accelerations ẍd , ÿd Following the same steps for the attitude and heading of the
can be calculated from Quadrotor, the control inputs U2 , U3 and U4 are calculated to
be,
ẍd = kp (xd − x) + kd (ẋd − ẋ)
(17) 1
ÿd = kp (yd − y) + kd (ẏd − ẏ) U2 = [k1 sgn(s) + k2 s + c(φ̇d − φ̇) + φ̈d + a2 θ̇Ωr − a1 θ̇ψ̇]
b1
where xd and yd are the desired x and y position and ẋd and 1
ẏd are their desired rate of change. The next step is finding a U3 = [k1 sgn(s) + k2 s + c(θ̇d − θ̇) + θ̈d − a4 φ̇Ωr − a3 φ̇ψ̇]
b2
relationship between the desired accelerations and the control 1
inputs. By examining ẍ and ÿ in Equation (14) and using the U4 = [k1 sgn(s) + k2 s + c(ψ̇d − ψ̇) + ψ̈d − a5 φ̇θ̇] (24)
b3
assumption that the Quadrotor is operating near hover, thus
(sin φd ≡ φd , sin θd ≡ θd and cos φd ≡ cos θd ≡ 1) we reach IV. S IMULATION R ESULTS
To verify the mathematical model, an open loop simulation
ẍ = (−U1 /m)(φd sin ψ + θd cos ψ)
(18) was carried out using MATLAB/Simulink. The Quadrotor’s
ÿ = (−U1 /m)(θd sin ψ − φd cos ψ) parameters were taken from Bouabdallah’s PhD thesis which
by inverting the previous equations, is based on the [OS4] hardware [21]. Varying the angular
velocity of the 4 rotors, produced the respective roll, pitch or
φd = (m/U1 )(−ẍd sin ψ + ÿd cos ψ) yaw motion. These tests helped verify the correctness of our
(19) derived mathematical model and the integrity of the open loop
θd = (m/U1 )(−ẍd cos ψ − ÿd sinψ)
simulation. The open loop simulation was then expanded to
which will be fed to the position controller thus creating the include the altitude, attitude, heading and position controllers
nested controller shown in Fig. 3. Note that, based on control as shown in Fig. 3.
theory, in order for the position controller to work, the inner
loop should be at least 10 times faster than the outer control A. Parameters Tuning using GA
loop. Since the PD controller is a linear controller used for For the proceeding control algorithms, tuning the controller
the nonlinear Quadrotor system, it has to operate at the linear constants (gains and different parameters) was done using
region which is hover in this case. Thus, the generated control Genetic Algorithm (GA). The objective function of the GA
inputs U1 through U4 should be in fact “delta” control inputs was set to be the settling time of the response of the system.
throttled to keep the Quadrotor around the hover position. This The GA is an iterative optimization algorithm works in the
way, the Quadrotor system is indirectly linearized for the PD following way; first it generates a random “population” con-
controller to be able to stabilize it. sisting of many individuals, which in our case will be a vector
B. Sliding Mode Controller of values for the controller gains. The fitness of the individuals
of the population is evaluated using an objective function,
A SMC is developed to control the attitude of the Quadrotor which is the settling time of the response of the system with
by first defining the error to be, these values set as the control gains. Another population is
e = z − zd (20) then generated from the current one using genetic operations
like evolution, mutation and crossover and their fitness is also
and defining the sliding surface as, evaluated. The “elite” of the two populations are then selected
to form a third population. The term “elite” indicates those
s = ce + ė (21) individuals having the best fitness or the least value of the
where c is a positive constant. For the derivative of the surface, objective function (settling time in our case). The algorithm
the exponential reaching law format is assumed as follows keeps on iterating until it reaches a population where all (or
[20], most of) its individuals are elite individuals and returns the
individual (the value for the control gains) that has the least
ṡ = −k1 sgn(s) − k2 s (22) fitness (produces the least settling time for the system). In this
work, we have not gone through the process of implementing
where
a GA from scratch as this is out of our scope. Instead, the
−1 if s < 0;
sgn(s) = optimization toolbox in MATLAB was used and it includes a
1 if s > 0.
built-in command for GA optimization.
and k1 and k2 are design constants that have to be chosen
to satisfy the condition sṡ < 0. Equating the reaching law in B. PD Controller
Equation (22) to the derivative of the surface, the control input
Table I shows the PD gains acquired from the GA with the
U1 can be calculated to be,
settling time of the system as the objective function. It also
m shows the response of the system under the shown desired
U1 = [k1 sgn(s) + k2 s + c(ż − żd ) + g − z̈d ]
cos φ cos θ values of altitude, attitude and heading. The response graphs
(23) for the altitude, attitude and heading are shown in Fig. 7. The
Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis
TABLE I
PD C ONTROLLER R ESULTS
TABLE II
SMC R ESULTS
Fig. 8. Position Response Another approach was suggested; since the reason behind
chattering is the discontinuity of the control law due to the
presence of sgn function which is a discontinuous function.
Replacing sgn with the saturation function sat will change the
control law to be a continuous one instead of discontinuous.
The sat function is defined as,
s if |s| ≤ 1;
sat(s) =
sgn(s) if |s| > 1.
D. Disturbance Rejection
White Gaussian noise was added to the model to give the
Fig. 10. Quadrotor Trajectory Response “SMC” effect of disturbances which might come in the form of a
windy environment, the controllers were then commanded to
maintain the altitude of the Quadrotor to 2 m. Using the
controller was implemented on a real physical system. To previously optimized controllers gains for the PD and the SMC
reduce the chattering effect, a numerical representation of resulted in the response shown in Fig. 13 for the PD controller
chattering is needed so that it can be used as an objective and Fig. 14 for the SMC.
Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis
to develop and test other nonlinear control algorithms such helicopter subject to atmospheric disturbances,” Control
as Backstepping and compare their performance to SMC and Engineering Practice, vol. 19, no. 10, pp. 1195–1207,
PD. 2011.
[15] M. Efe, “Neural network assisted computationally simple
R EFERENCES pid control of a quadrotor uav,” Industrial Informatics,
[1] A. Azzam and X. Wang, “Quad rotor arial robot dynamic IEEE Transactions on, vol. 7, no. 2, pp. 354–361, 2011.
modeling and configuration stabilization,” in Informatics [16] A. Nagaty, S. Saeedi, C. Thibault, M. Seto, and H. Li,
in Control, Automation and Robotics (CAR), 2010 2nd “Control and navigation framework for quadrotor he-
International Asia Conference on, vol. 1, 2010, pp. 438– licopters,” Journal of Intelligent and Robotic Systems,
444. vol. 70, no. 1-4, pp. 1–12, 2013.
[2] L. R. G. Carrillo, A. E. D. López, R. Lozano, and [17] H. Hou, J. Zhuang, H. Xia, G. Wang, and D. Yu,
C. Pégard, “Quad rotorcraft control,” 2012. “A simple controller of minisize quad-rotor vehicle,” in
[3] T. H. Cox, C. J. Nagy, M. A. Skoog, I. A. Somers, and Mechatronics and Automation (ICMA), 2010 Interna-
R. Warner, “Civil UAV capability assessment,” NASA, tional Conference on, 2010, pp. 1701–1706.
Tech. Rep., draft Version, 2004. [18] V. Mistler, A. Benallegue, and N. M’Sirdi, “Exact lin-
[4] Z. Sarris and S. ATLAS, “Survey of UAV applica- earization and noninteracting control of a 4 rotors heli-
tions in civil markets (june 2001),” in The 9 th IEEE copter via dynamic feedback,” in Robot and Human In-
Mediterranean Conference on Control and Automation teractive Communication, 2001. Proceedings. 10th IEEE
(MED’01), 2001. International Workshop on, 2001, pp. 586–593.
[5] F. Kendoul, Z. Yu, and K. Nonami, “Guidance and [19] R. W. Beard, “Quadrotor dynamics and control,”
nonlinear control system for autonomous flight of miniro- Brigham Young University, 2008.
torcraft unmanned aerial vehicles,” Journal of Field [20] J. Liu and X. Wang, Advanced Sliding Mode Control
Robotics, vol. 27, no. 3, pp. 311–334, 2010. for Mechanical Systems: Design, Analysis and MATLAB
[6] S. Bouabdallah, A. Noth, and R. Siegwart, “PID vs LQ Simulation. Springer, 2012.
control techniques applied to an indoor micro quadrotor,” [21] S. Bouabdallah, “Design and control of quadrotors with
in Intelligent Robots and Systems, 2004. (IROS 2004). application to autonomous flying,” Ecole Polytechnique
Proceedings. 2004 IEEE/RSJ International Conference Federale de Lausanne, 2007.
on, vol. 3, 2004, pp. 2451–2456 vol.3.
[7] J. Li and Y. Li, “Dynamic analysis and PID control for
a quadrotor,” in Mechatronics and Automation (ICMA),
2011 International Conference on, 2011, pp. 573–578.
[8] G. V. Raffo, M. G. Ortega, and F. R. Rubio, “An integral
predictive/nonlinear h control structure for a quadrotor
helicopter,” Automatica, vol. 46, no. 1, pp. 29–39, 2010.
[9] S. Bouabdallah and R. Siegwart, “Backstepping and
sliding-mode techniques applied to an indoor micro
quadrotor,” in Robotics and Automation, 2005. ICRA
2005. Proceedings of the 2005 IEEE International Con-
ference on, 2005, pp. 2247–2252.
[10] S. Waslander, G. Hoffmann, J. S. Jang, and C. Tomlin,
“Multi-agent quadrotor testbed control design: integral
sliding mode vs. reinforcement learning,” in Intelligent
Robots and Systems, 2005. (IROS 2005). 2005 IEEE/RSJ
International Conference on, 2005, pp. 3712–3717.
[11] T. Madani and A. Benallegue, “Backstepping control
for a quadrotor helicopter,” in Intelligent Robots and
Systems, 2006 IEEE/RSJ International Conference on,
2006, pp. 3255–3260.
[12] Z. Fang and W. Gao, “Adaptive backstepping control of
an indoor micro-quadrotor,” Research Journal of Applied
Sciences, vol. 4, 2012.
[13] F. Kendoul, “Survey of advances in guidance, navigation,
and control of unmanned rotorcraft systems,” Journal of
Field Robotics, vol. 29, no. 2, pp. 315–378, 2012.
[14] K. Alexis, G. Nikolakopoulos, and A. Tzes, “Switch-
ing model predictive attitude control for a quadrotor