0% found this document useful (0 votes)
49 views

Dynamic Modeling and Control Techniques For A Quadrotor: January 2015

This document presents a dynamic model and two control techniques for a quadrotor unmanned aerial vehicle. The nonlinear dynamic model is formulated using Newton-Euler methods. Two control approaches are developed: a linear proportional-derivative controller and a nonlinear sliding mode controller. Both controllers' parameters are tuned using genetic algorithms to improve the system's dynamic response. Simulations are conducted to evaluate the performance of the controllers in terms of stability and response to disturbances.

Uploaded by

Naier Nabil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Dynamic Modeling and Control Techniques For A Quadrotor: January 2015

This document presents a dynamic model and two control techniques for a quadrotor unmanned aerial vehicle. The nonlinear dynamic model is formulated using Newton-Euler methods. Two control approaches are developed: a linear proportional-derivative controller and a nonlinear sliding mode controller. Both controllers' parameters are tuned using genetic algorithms to improve the system's dynamic response. Simulations are conducted to evaluate the performance of the controllers in terms of stability and response to disturbances.

Uploaded by

Naier Nabil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/275642782

Dynamic Modeling and Control Techniques for a Quadrotor

Chapter · January 2015


DOI: 10.4018/978-1-4666-7387-8.ch014

CITATIONS READS

2 1,056

2 authors:

Heba mohamed Elkholy Maki Habib


Mansoura University The American University in Cairo
2 PUBLICATIONS   2 CITATIONS    249 PUBLICATIONS   1,894 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

groundwater issue including exploration View project

Subsumption Architecture Supporting Swarm Behaviors View project

All content following this page was uploaded by Maki Habib on 04 October 2016.

The user has requested enhancement of the downloaded file.


Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis

Dynamic Modeling and Control of a Quadrotor


Unmanned Aerial Vehicle
Heba ElKholy∗ and Maki K. Habib
School of Sciences and Engineering
American University in Cairo (AUC)
11835 New Cairo, Egypt
Email: [email protected]
[email protected]

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

Fig. 1. Quadrotor Configuration

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,

where J is the Quadrotor’s diagonal inertia matrix, ω is the Mx = −F2 l + F4 l


angular body rates, Jr is the rotors’ inertia, Ωr is the rotors’ = lKf (−Ω22 + Ω24 ) (8)
relative speed Ωr = −Ω1 +Ω2 −Ω3 +Ω4 and MB represent the
moments acting on the Quadrotor in the body frame. The first The thrust of rotor 1 generates a positive moment about the
two terms of the previous equation J ω̇ and ω × Jω represent body frame’s Y-axis, while the thrust of rotor 3 generates a
the rate of change of angular momentum in the body frame. negative moment. The total moment can be expressed as,
The third term ω×[0 0 Jr Ωr ]T represents gyroscopic moments
due to rotors’ inertia Jr . The inertia matrix for the Quadrotor M y = F 1 l − F3 l
is a diagonal matrix, the off-diagonal elements, which are = lKf (Ω21 − Ω23 ) (9)
the product of inertia, are zero due to the symmetry of the
Quadrotor. The moments about the body frame’s Z-axis are only due to
⎡ ⎤ the rotors’ generated moments and can be expressed as,
Ixx 0 0
J = ⎣ 0 Iyy 0 ⎦ (5) M z = M1 − M 2 + M 3 − M 4
0 0 Izz
= Km (Ω21 − Ω22 + Ω23 − Ω24 )) (10)
where Ixx , Iyy and Izz are the area moments of inertia about
the body frame’s X, Y and Z axes respectively. Combining equations (8), (9) and (10) in vector form, it can
Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis

be shown that the total moments acting on the Quadrotor are,


⎡ ⎤
lKf (−Ω22 + Ω24 )
MB = ⎣ lKf (Ω21 − Ω22 ) ⎦ (11)
2 2 2 2
Km (Ω1 − Ω2 + Ω3 − Ω4 )
2) Translational Subsystem: The translation equation of
motion for the Quadrotor is based on Newton’s second law
is derived in the body frame,
 T
mr̈ = 0 0 mg + RFB (12)
where r = [x y z]T is the Quadrotor’s distance from the
inertial frame, m is the Quadrotor’s mass, g is the gravitational
acceleration and FB is the nongravitational forces. The only
nongravitational force acting on the Quadrotor when it is in a
horizontal orientation (zero roll and pitch) is the thrust Fi of
its propellers derived in Equation (7).
Fig. 3. Closed Loop Control System of a Quadrotor
 T
FB = 0 0 −Kf (Ω21 + Ω22 + Ω23 + Ω24 ) (13)
FB is multiplied by the rotation matrix R to transform the 2 and 4 and responsible for the roll rotation and its rate of
thrust forces of the rotors from the body frame to the inertial change (φ, φ̇). U3 represents the difference of thrust between
frame, so that the equation can be applied in any orientation rotors 1 and 3 thus generating the pitch rotation and its rate of
of the Quadrotor. From the previous equations (4) and (12), change (θ, θ̇). Finally U4 is the difference of torque between
the complete 6 DOF model of the Quadrotor can be given by, the two clockwise turning rotors and the two counterclockwise
⎧ turning rotors generating the yaw rotation and ultimately its

⎪ φ̈ = b1 U2 − a2 θ̇Ωr + a1 θ̇ψ̇

⎪ rate of change (ψ, ψ̇) [18]. With this choice of the control

⎪ θ̈ = b2 U3 + a4 φ̇Ωr + a3 φ̇ψ̇

⎪ inputs, it is clear that the rotational subsystem is fully-actuated



⎪ ψ̈ = b3 U4 + a5 φ̇θ̇ while the translational subsystem is underactuated.


−U1
ẍ = (sin φ sin ψ + cos φ cos ψ sin θ) (14)

⎪ m III. C ONTROL



⎪ −U1

⎪ ÿ = (cos φ sin ψ sin θ − cos ψ sin φ) The model of the Quadrotor derived in Equations (14)

⎪ m

⎪ implies a nested structure controller, where the outer controller
⎩ z̈ = g − U1 (cos φ cos θ)

will control the position of the Quadrotor in space by gener-
m
ating the required attitude that in turn will be fed to the inner
where controller to that will directly control the attitude by generating
Iyy − Izz
a1 = the required control inputs to be fed to the Quadrotor dynamics
Ixx
Jr l as shown in Fig. 3.
a2 = b1 =
Ixx Ixx
Izz − Ixx A. PD Controller
l
a3 = b2 =
Iyy Iyy A PD controller was used to track user defined trajectories
Jr l for the altitude, attitude and heading of the Quadrotor. The
a4 = b3 = PD controllers generated the control inputs U1 through U4 as
Iyy Izz
Ixx − Iyy shown in the block diagram in Fig. 3,
a5 = ⎧
Izz ⎪ U1 = kp (z − zd ) + kd (ż − żd )


U1 , U2 , U3 and U4 are the system’s control inputs and they ⎪
⎨ U2 = kp (φd − φ) + kd (φ̇d − φ̇)
are defined as follows, (16)
⎧ ⎪
⎪ U3 = kp (θd − θ) + kd (θ̇d − θ̇)
U1 = Kf (Ω21 + Ω22 + Ω23 + Ω24 ) ⎪


⎪ ⎩

⎨ U = K (−Ω2 + Ω2 ) U4 = kp (ψd − ψ) + kd (ψ̇d − ψ̇)
2 f 2 4
2 2
(15) where zd , φd , θd and ψd are the desired altitude, roll, pitch

⎪ U 3 = K (Ω − Ω )


f 1 3
and heading respectively and żd , φ̇d , θ̇d and ψ̇d are their
U4 = KM (Ω21 − Ω22 + Ω23 − Ω24 )
desired rate of change. kp and kd are the proportional and
U1 is the resulting upwards force of the four rotors which is derivative gains of the PD controller. After calculating the
responsible for the altitude of the Quadrotor and its rate of control inputs U1 through U4 , the rotor speeds Ω1 through
change (z, ż). U2 is the difference of thrust between rotors Ω4 can be calculated from the inverse of Equation (15). To
Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis

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

(a) Altitude Response (b) Attitude Response (c) Heading Response

Fig. 4. PD Controller Simulation Results

TABLE I
PD C ONTROLLER R ESULTS

Desired kp kd Settling Overshoot


Value Time
Altitude (z) 2m 5.2 1.3 1.3 sec 1.4 %
Attitude (φ and θ) 5◦ 4.5 0.5 0.3 sec 2%
Heading (ψ) 5◦ 3.9 0.7 0.42 sec 1.9%

Fig. 6. Quadrotor Trajectory Response “PD”

TABLE II
SMC R ESULTS

Desired c k1 k2 Settling Overshoot


Value Time
Altitude (z) 2m 6.98 2.66 6.64 0.57 sec 2%
Attitude (φ and θ) 5◦ 4.68 1.99 1.80 0.8 sec 1.9%
Fig. 5. Position Response Heading (ψ) 5◦ 5.24 1.72 4.33 0.74 sec 1.7%

reason altitude response in Fig. 11(a) is in the negative Z-


axis, is that the Z-axis points downwards in the previously and heading are shown in Fig. 7.
assigned axes of the Quadrotor. For the attitude controller, the Adding the previously implemented PD position controller
performance of the roll exactly matched that of the pitch due to the system with optimized gains of kp = 0.727, kd = 1.34
to the symmetry of the Quadrotor. Adding the derived position for x response and gains of c = 3.15, k1 = 1.04 and k2 =
PD controller to the simulation and optimizing its gains using 0.768 for the pitch’s SMC led to a settling time of 3.11 sec
GA led to optimal gains of kp = 7.5 and kd = 4.2 yielding and an overshoot of 2% as shown in Fig. 8. Testing the SMC
a settling time of 1.4 sec and an overshoot of 1.9% as shown with a vigorous desired roll angle of 80◦ led to the system
in Fig. 5. As with the roll and pitch, the performance of the stabilizing with a settling time of 1.4 sec and an overshoot
y position controller matched that of the x position due to of 0% and almost no chattering as shown in Fig. 9. Also,
the symmetry of the Quadrotor. Commanding the Quadrotor when the Quadrotor was given a desired altitude and position
to fly in a certain trajectory yielded the response graph shown trajectory, a steady state error was noticed in the position, an
in Fig. 6. integral term was added to the previously derived position PD
controller to become a PID controller and the SMC was able
C. Sliding Mode Controller to force the Quadrotor to that trajectory as shown in Fig. 10.
As with the PD controller, GA was used to find the gains 1) Chattering Reduction: As clear from the response
for the SMC that achieve the least possible settling time. The graphs, the SMC causes a chattering effect which is visible in
results of the SMC with the gains acquired from the GA are the attitude response more than the rest. This high frequency
shown in Table II. The response graphs for the altitude, attitude chattering effect may cause damage to the actuators if the
Proceedings of the 14th Mechatronics Forum International Conference, Mechatronics 2014 Eds. Leo J De Vin and Jorge Solis

(a) Altitude Response (b) Attitude Response (c) Heading Response

Fig. 7. SMC Controller Simulation Results Minimizing the Settling Time

function for the GA, a good measure to use is the value of


the derivative of the sliding surface, the least this value is,
the least the chattering effect. Using the value of chat shown
in Equation (25) as the objective function of the GA led to
reducing the chattering effect as shown in Fig. 11 but as a
counter effect, it led to an increase in the settling time of the
system.

chat = max ṡ (25)


Ts →Tend

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.

Thus, to implement this modification on the SMCs for our


system, the sgn(s) terms should be replaced by sat(s/) in the
developed control laws. Where  is a constant that determines
Fig. 9. Vigorous Roll Angle Response the slope of the line between 1 and -1, this region is called the
boundary region or boundary layer. Higher values  means a
thicker boundary layer and thus an increase in the error.
Using the obtained control parameters in Table II with the
modified control laws, chattering was eliminated as shown
in Figure 12, the response graphs for altitude, attitude and
heading respectively. Another desirable effect was reducing
the system’s overshoot.

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

(a) Altitude Response (b) Attitude Response (c) Heading Response

Fig. 11. SMC Controller Simulation Results Minimizing the Chattering

(a) Altitude Response (b) Attitude Response (c) Heading Response

Fig. 12. Modified SMC Controller Simulation Response

tion, using this model, two controllers were synthesised; a lin-


ear PD controller and a nonlinear SMC to control the altitude,
attitude, heading and position of the Quadrotor. A simulation
model was then implemented on MATLAB/Simulink to test
the proposed controllers. The optimal control gains of both
types of controllers were tuned using GA to achieve the least
settling time for the response of the system. The simulation
results showed that both types of controllers were able to
stabilize the system in tracking a certain trajectory. The
performance of the PD and the SMCs was comparable in
stabilizing the attitude and heading near hover but the SMC
Fig. 13. Altitude Response with Noise “PD”
proved more efficient in controlling the altitude as it reduced
the settling time by almost 60%. On the other hand, the SMC
was able to operate the Quadrotor away from its linear region
at an attitude (roll and pitch) angle of 80 degrees while the
PD controller couldn’t stabilize it due to its linear nature.
For the case of disturbance rejection, the SMC performed
better than the PD controller, this is due to the fact that the
SMC comes from a family of robust controllers. Future work
includes, applying the developed controllers on a real system
to test their performance under different operating conditions.
Moreover, in our work it was assumed that all the model
parameters are known accurately without any uncertainties,
Fig. 14. Altitude Response with Noise “SMC” which is not the case in reality, thus, developing adaptive
control algorithms to count for the system uncertainties would
V. C ONCLUSION enhance the performance of the Quadrotor when operating in
In this paper, a detailed mathematical model of a Quadrotor a real environment. In in addition to that, it is a good idea
using Newton Euler formalism has been developed. In addi-
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

View publication stats

You might also like