You are on page 1of 13

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

net/publication/326186739

Decentralized PID Control by Using GA Optimization Applied to a Quadrotor

Article · June 2018


DOI: 10.14313/JAMRIS_2-2018/9

CITATIONS READS

0 96

2 authors:

Seif-El-Islam Hasseni Latifa Abdou


Université de Biskra Université de Biskra
3 PUBLICATIONS   1 CITATION    17 PUBLICATIONS   19 CITATIONS   

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Seif-El-Islam Hasseni on 04 July 2018.

The user has requested enhancement of the downloaded file.


Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Decentralized PID Control by Using GA Optimization Applied to a Quadrotor

Submitted: 26th February 2018; accepted: 14th May 2018

Seif-El-Islam Hasseni: Latifa Abdou

DOI: 10.14313/JAMRIS_2-2018/9 φ, θ, ψ: Roll, Pitch and Yaw Euler-angles, respectively.


V: Vector of linear velocity
Abstract: Ω: Vector of angular velocity
Quadrotors represent an effective class of aerial robots qi: Coordinate of degrees of freedom = [x, y, z, φ, θ, ψ]
because of their abilities to work in small areas. We sug- L: Lagrangian term
gested in this research paper to develop an algorithm E k: Kinetic Energy
to control a quadrotor, which is a nonlinear MIMO sys- Ekr: Kinetic-Rotation Energy
tem and strongly coupled, by a linear control technique Ekt: Kinetic-Translation Energy
(PID), while the parameters are tuned by the Genetic Ep: Potential Energy
Algorithm (GA). The suggested technique allows a decen- Г: Vector of non-conserved forces and torques
tralized control by decoupling the linked interactions to Fx, Fy, Fz: Force on x, y and z axis, respectively.
effect angles on both altitude and translation position. τ: Vector of torques
Moreover, the using a meta-heuristic technique enables τf : Vector of forces torque
a certain ability of the system controllers design without τg: Vector of gyroscopic torque
being limited by working on just the small angles and τφ,τθ,τψ: Torque on x, y and z axis, respectively.
stabilizing just the full actuated subsystem. The simu- f i: Force of ith rotor
lations were implemented in MATLAB/Simulink tool to Ti: Thrust force of ith rotor (countre-torque)
evaluate the control technique in terms of dynamic per- J: Inertia matrix
formance and stability. Although the controllers design Ix, Iy, Iz: Inertia on x, y and z axis, respectively.
(PID) is simple, it shows the effect of the proposed tech- ωi: Angular speed of ith rotor
nique in terms of tracking errors and stability, even with ωdi: Desired angular speed of ith rotor
large angles, subsequently, high velocity response and Ω r: ω1 – ω2 + ω3 – ω4
high dynamic performances with practically acceptable J r: Rotor inertia
rotors speed. b: Thrust factor
d: Drag factor
Keywords: quadrotor, non-linear systems, decentralized l: Arm length
control, PID, optimization, genetic algorithm. m: Quadrotor mass
g: Gravity constant
Abbreviations: Ui: The ith control input
BMW: Best-Mates-Worst technique Udi: The desired ith control input
DE: Differential Evolution ux,uy: Virtual inputs of x and y subsystems
ISE: Integral Squared Error k: Adaptive decoupler factor
GA: Genetic Algorithm kp, ki, kd: Proportional, Integral and Derived gains of
MIMO: Multi-Input Multi-Output system PID, respectively.
LQR: Linear Quadratic Regulator
OS4: Omni-directional Stationary Flying
OUtstretched Robot 1. Introduction
PID: Proportional Integral Derivative Controller The quadrotor is an Unmanned Aerial Vehicle
PSO: Particle Swarm Optimization (UAV) that is considered as an aircraft without a pi-
RD: Rotor Dynamic lot, and which can be driven by a human at a ground
UAV: Unmanned Aerial Vehicle control station or can fly autonomously by known
flight trajectory. Quadrotors were used at the begin-
Nomenclature: ning of their appearances in the military domain for
E: Earth frame monitoring or reconnaissance missions. Civil applica-
B: Body frame tions made their appearances later, as it is the case of
RBE : Transformation coordinates matrix from the monitoring of the road traffic. The quadrotor has
body frame (B) to earth frame (E) some advantages compared with other UAVs, as verti-
x: Translation coordinate in x axis cal take-off landing, stationary and low-speed flight,
y: Translation coordinate in y axis which make it highly maneuverable, with precise nav-
z: Altitude coordinate igation in difficult or dangerous areas. For these rea-

33
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

sons, the researchers were carried about this aerial lers’ design, like control structure design in fuzzy log-
robot to develop the control algorithms with success- ic controller or PID parameters tuning. In this case,
ful comportments. However, the quadrotor is a char- the synthesized structure is kept as classical one, but
acteristically nonlinear, underactuated mechanical the parameters are optimized by GA.
system; with six degrees of freedom (three for rota- The contribution of this paper can be presented as
tion and three for translation) and just four inputs, follows;
its dynamic is complex because of its strong coupling a) A decentralized control is applied; we designed
between the translational and rotational subsystems, each controller separately from others.
which don’t allow releasing its controllers with sim- b) To realize that, we need to decouple the interac-
ple ways. tions between the translation and rotation coordi-
This nonlinear system motivates to design a com- nates.
plex nonlinear control algorithm. A large number of c) For the decoupling between the altitude and the
control methods are used to solve the attitude stabili- attitude, we added an adaptive online factor in the
zation and trajectory tracking problems. In [1] a slid- altitude input. Thereafter we designed the four
ing mode control had been developed for the full sys- controllers separately, the parameters tuning is
tem, a robust terminal sliding mode is used for the full used by Genetic Algorithm, no need to linearize
actuated subsystem (rotational) and the simple slid- the model and limit the system to work on small
ing mode for the under-actuated subsystem (transla- angles, subsequently limit on low dynamic per-
tional). Both integral backstepping and sliding mode formances. The optimization process is done with
have been used in thesis [2], [3] and both of them both small and big angles.
conclude that the combination between backstepping d) After tuning the four controllers of the actuated
and integral action is the best for quadrotor stability subsystem, the inner loop was locked with a view
against disturbances and model uncertainties. A sig- to decouple the influence of the rotation on the
nificant number of researches were based on com- translation position and design the controllers of
bination between two techniques to design the full underactuated subsystem, which is presented by
controller; in [4], a combination of sliding mode and the x and y position, their controllers were also
integral backstepping is used on both of rotational tuned by the Genetic Algorithm. This virtual con-
and translational subsystems. In [5] an adaptive slid- trol laws are used to compute the desired roll and
ing mode control is developed against the actuators pitch angles and used them on the full actuated
failures. In [6] a sliding mode control was applied subsystem.
with switching gains adaptively by fuzzy logic system The paper’s structure is as follows: in the next sec-
based on information from the sliding surfaces, but tion, the mathematical model is obtained by using Eu-
just for stabilizing the attitude subsystem. An online ler-Lagrange approach, including the aerodynamic ef-
optimization was associated to improve the backstep- fects and the rotors dynamics. In section 3, we present
ping designed control [7]. The predictive control is the proposed controller structure and the strategy of
one of the effective techniques of the nonlinear sys- decoupling the interactions, to permit the application
tems, it is developed in [8], [9], where the authors of decentralized control. In section 4, we introduce the
have used the piecewise affine systems to derive the use of GA as a solution to optimize some parameters
predictive model. The optimal control is also a very in order to improve the quality of our controller. In
effective way of controller’s synthesize of unmanned section 5, we present and discuss the obtained results
aerial vehicles [10], [11], in [12] a linearized model by simulating 3D trajectory tracking and the rotors
of the quadrotor rotational subsystem was derived speeds states, and lastly our conclusion in section 6.
for applied the LQR control. The most classical linear
controller, which is the PID have been used in the un-
manned aerial vehicles [13] because of its simplicity. 2. System Modeling
In case of quadrotor, it is used in [12], [14], [15], [16], Before the control development, the mathematical
the linearized model was inquired, subsequently it model for this mobile robot is needed. In this work,
is used for just the stabilization of the attitude sub- we propose to use Euler-Lagrange technique because
system, so unfortunately only for the small range of of its advantages, related to the fact that it is based
angles and low dynamics. Some works are not based on potential and kinetic energies, and also dynamic
on classical sensors; GPS, accelerometer and gyro- equations in symbolic closed form. This technique is
scope, but, they applied vision-based control [17], the best for study of dynamic properties and analysis
[18] where the only sensor is the camera and which of control schemes [20], where the robot is supposed
use the image processing techniques to measure the as a rigid closed system:
velocity and make more precise movement. In the quadrotor, we can find two frames: the in-
In this paper the classical controller PID is pro- ertial frame (E: earth) and the mobile frame, who is
posed to control the full system. In contrast to other fixed in the quadrotor (B: body).
works in literatures, our dynamic system isn’t limited The distance between the earth frame and the
to small range of angles but can exceed to nonlinear body frame describes the absolute position of the
range of angles for getting a high dynamic. In addition mass center of the quadrotor r = [x y z]T. The rotation
we are motivated to use one of effective meta-heuris- R from the body frame to the inertial frame describes
tic optimization approach; Genetic Algorithms [19], the orientation of the quadrotor. The orientation of
which are applied in a large way of off-line control- the quadrotor, is described using roll, pitch and yaw

34 Articles
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Fig. 1. Reference frames of Quadrotor

angles (φ, θ and ψ) which represent the orientation Lagrange law is given as [20]:
about the x, y and z axis respectively. The matrix of ro-
tation is defined by [21]: d  ∂L  ∂L
 − = Γi (8)
dt  ∂qi  ∂qi
RBE R z, R y, R x, (1)
Where:
Where: qi – the measured variable, which represents each one
of the output variables: x, y, z, φ, θ and ψ.
1 0 0  Γi – the vector of non-conserved forces or torques
 
R ( x,ϕ ) =  0 cϕ −sϕ  (2) (Fx, Fy, Fz, τφ, τθ and τψ).
 0 sϕ cϕ 

 cθ 0 sθ  2.1. The Lagrangian
 
R ( y,θ ) =  0 1 0  (3) Defined with kinetic energy and potential energy
 −sθ 0 cθ  as follow:

 cψ −sψ 0 L = E k − E p = E kt + E kr − E p (9)
 
R ( z,ψ ) =  sψ cψ 0  (4)
 0 1  Ek – the kinetics energy, Ekt – for translation kinetic en-
 0
ergy and Ekr – for rotation kinetic energy, Ep – the
Then: potential energy, then we have:

 cθ cψ sϕ sθ cψ − cϕ sψ cϕ sθ cψ + sϕ sψ  m 2 1 22
E  L= V + J�
Ω –− mgz
mgz (10)
R =  cθ sψ cosϕcosψ + sϕ sθ sψ cϕ sθ sψ − sϕcψ  (5)
B 2 2
 − sθ sϕcθ cϕcθ 
 
J – the matrix symmetric of inertia, Ix, Iy, and Iz are in-
Where s and c denote sin and cos respectively. ertias on x, y and z axis, respectively.
The vector of angular velocities of quadrotor is V – the vector of translation velocities.
defined in body frame Ω = [ωxω yωz ]T . It is given de- m – the mass of quadrotor.
pending on the derived Euler angles [ϕ θ ψ ]T that are g – gravitional constant.
measured in the inertial frame. This transformation is
derived as follows [s]: Ix 0 0
Ω – angular velocities
J 0 Iy 0 (11)
 ϕ  0 0 0 0 Iz
Ω� ==  0  + ( R ( x ,ϕ ) )  θ  + ( R ( x ,ϕ ) ) ( R ( y ,θ ) )  0 
−1 −1 −1
(6)
0 0 ψ  By applying (7) and (11) in (10), we find:
     

m 2


ϕ −ψ sinθ 

L=
2
( ) 1
x + y 2 + z 2 + I x (ϕ −ψ sθ ) +
2
2

� ==  θ cosϕ +ψ sinϕcosθ  (7)


Ω
1
( ) 1
(
+ I y θcϕ +ψ sϕcθ + I z ψ cϕcθ − θsϕ )
2 2
ψ cosϕcosθ − θsinϕ  − mgz (12)
  2 2
Articles 35
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

2.2. Non-Conserved Forces and Torques Where:


Returning to Fig. 1, the motors (M1, M3) turning the
opposite direction of the motors (M2, M4) and each mo- Ωrr = ω1 − ω2 + ω3 − ω4
� (19)
tor generates a thrust force fi = b.ωi and a drag torque
Ti = d.ωi. Where b and d are thrust and drag coefficients And Jr is the inertia of the rotor.
respectively. ωi: Is the rotation speed of motor Mi. We apply (17) and (18) in (16) we get:

2.2.1. Non-conserved forces:


The thrust of quadrotor is the sum of forces fi.
 ( 
 τ ϕ   l b ω4 − ω2 − θ J r � r
2 2
) 

 
4 4

(
τ =  τ θ  =  l b ω32 − ω12 + ϕ J r � r)  (20)

F = ∑ fi = b.∑ωi2 τ  
i =1 i =1  (
 ψ  d ω12 − ω22 + ω32 − ω42 ) 

(
⇒ F = b ω12 + ω22 + ω32 + ω42 ) (13)
From (15) to (20) and by applying the Lagrangian
0 law presented in (8), we obtain after simplification
the following mathematical model.
FB 0 (14)
F  1
x = ( cϕ sθ cψ + sϕ sψ )U1
  m
FB – the vector of forces in the body frame. 
 y = 1 ( cϕ sθ sψ − sϕcψ )U
Because, we need the forces in earth frame, we get  m
1
it by transformation matrix: FE = R.FB, then: 
1
z = ( cϕcθ )U1 − g
 
 Fx   (
 cϕ sθ cψ + sϕ sψ ) b ω12 + ω22 + ω32 + ω42 ( )  

m
  f ( X ,U ) =  ( I y − Iz ) θψ
  + l U − J r � r θ
(21)
FE =  Fy  =  ( cϕ sθ sψ − sϕcψ ) b ω12 + ω22 + ω32 + ω42 ( )  ϕ =
 F   I Ix Ix
2
 x
 z
 (
( cϕcθ ) b ω12 + ω22 + ω32 + ω42 ) 
  ( I − I )   + l U + Jr �r ϕ
θ = z x ϕψ
Iy Iy Iy
3
(15) 

2.2.2. Non-conserved torques:  ( Ix − I y ) ϕθ 1
  + U4
ψ = Iz Iz
Represented by: 

τ = τf – τg (16) Where:
The quadrotor is controlled by the rotation speed
Where: of motors (ω1 ω2 ω3 and ω4), then the vector of control
τf: Is the vector of forces torques, which contains: inputs is expressed as a function of rotation speed as
– Torque according to x (roll), that depends on the follows:
difference between f4 and f2.
– Torque according to y (pitch), that depends on the (
U1 = b ω12 + ω22 + ω32 + ω42

)
difference between f3 and f1.
– Torque according to z (yaw), which is obtained by

 (
U2 = b ω42 − ω22 )
 (22)
the difference between the sums of torques T1 and  (
U3 = b ω32 − ω12 )
T3, and that of T2 and T1. 
And (
U 4 = d ω1 − ω2 + ω3 − ω4
2 2 2 2


)
τg – the gyroscopic torque.
The inputs of the system are altitude control (U1),

 l ( f 4 − f2 )  
 l b ω42 − ω22 ( ) 

roll control (U2), pitch control (U3) and yaw control
(U4).
 
τ f =  l ( f3 − f1 )  = 

l b ω32 − ω12 ( )  (17)

The states vector X:
T − T + T − T  
 1 2 3 4  d ω12 − ω22 + ω32 − ω42
 ( ) 
 X x, x,
 y, y,  , , , , , 
 z, z,
T
(23)

τg – Each rotor may be considered as a rigid disc in
rotation around his own vertical axis with a rotation The inputs vector U:
ωi. The vertical axis itself moves during the rotation
U = [U1 ,U2 ,U3 ,U 4 ]
T
of the quadrotor around of one of their three axes. (24)

This action product an extra torque called gyroscopic
given as follow [17]: The equilibrium points of (21) satisfy:
 00   θθ JJ ©© 
τg
44    r r r r  f ( X eq ,U eq ) = 0 (25)
==∑∑=1©Ω©∧∧JJr r 00 ==−−ϕϕJJr r©©r r (18)
((−−11))i +i +11ωω   00 
i =i 1

 i i

36 Articles
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Where:  1 1 1
ωd 1 = Ud1 − Ud3 + Ud 4
T  4b 2b 4d
X eq x eq , x eq , yeq , y eq, zeq , zeq , eq , eq , eq , eq , eq ,  eq 
1 1 1
ωd 2 = Ud 1 − Ud 2 − Ud 4
(26)  4b 2b 4d
 (32)
 1 1 1
U eq = U1eq ,U2eq ,U3eq ,U 4eq 
T
(27) ωd 3 = Ud1 + Ud3 + Ud 4
4b 2b 4d

 1 1 1
Solving (25) results in the stationary points ωd 4 = Ud1 + Ud 2 − Ud 4
 4b 2b 4d
X eq = [ x ss , 0, y ss , 0, z ss , 0, 0, 0, 0, 0,ψ ss , 0]
T
(28) Unlike the altitude and orientation of the quad-
rotor, its x and y position can’t be directly controlled
using one of the four controls laws Ud1 through Ud4. On
U eq = [ g m, 0, 0, 0]
T
(29) the other hand, the x and y position can be controlled

through the roll and pitch angles. Then we suppose
Where: xss, yss, zss, ψss ∈ R, we notice ss to mean a virtual controls ux and uy where:
steady state. 1
In addition, there is a limit in roll (φ) and pitch (θ) x ux
 U d1 c s c s s
angles: m
1 (33)
−π π y u y U d1 c s s s c
≤ ϕ ,θ ≤ (30) m
2 2
As a simulation, we use the parameters of the The desired roll and pitch angles (φd and θd) can be
OS4 project (Omni-directional Stationary Flying computed from the translational equations of motion
OUtstretched Robot) [2]: [3]. The expression (33) is given by:
 1
Table 1. OS4 parameters ux = m U d 1 ( cosϕd sinθd cosψ + sinϕd sinψ )
Parameter Name Value Unit  (34)
u = 1 U ( cosϕ sinθ sinψ − sinϕ cosψ )
m Mass 0.65 Kg  y m d 1 d d d

l Arm length 0.23 m
After simplification, because we have considered
b Thrust 3.13 10–5 N.s2 that the quadrotor is operating hover flight mode, we
coefficient
obtain the translation to rotation converter as:
d Drag coefficient 7.5 10–7 N.m.s2
 m
Ix Inertia on x axis 7.5 10–3 Kg.m2 ϕd = U ( ux sinψ − u y cosψ )
 d1
 (35)
Iy Inertia on y axis 7.5 10–3 Kg.m2 θ = m ( u cosψ + u sinψ )
Iz Inertia on z axis 1.3 10–2 Kg.m2
 d U d 1 x y

Jr Rotor inertia 6 10-5 Kg.m2 We have now two control loops. Inner loop which
contains the altitude (z) and the three angles (φ, θ
g Gravity constant 9.8 m.s -2
and ψ) and the outer loop which contains the transla-
tion position coordinates x and y (Fig. 2).
3. System Control

3.1. Modeling for Control 3.2. Control Using PID Technique


In fact, each rotor has a non-real time dynamic re- The control strategy proposed in this work is the
sponse, so we have to consider their dynamic. In OS4 PID technique. The factors that attracted industries to
project [2] the rotors have a dynamic transfer func- choose PID could be due to low cost, easy to maintain,
tion (RD) as: as well as simplicity in control structure and easy to
understand [22]. Once the set point has been changed,
ωi 0.936 the error will be computed between the set point and
RD ( s ) = = (31)
ωdi 0.178s + 1 the actual output. The error signal is used to generate
the proportional, integral and derivative actions, with
Where: the resulting signals weighted and summed to form
ωi – The actual angular velocity for each rotor. the control signal applied to the plant model [22].
ωdi – The desired angular velocity for each rotor. The six controls laws applied to quadrotor are:
Most researchers who work in control theory, ap-
plied on quadrotor and its simulation, didn’t consider U q = k p ( qd − q ) + kd ( qd − q ) + ki ∫ ( qd − q ) dt (36)

rotors dynamic in their works. We notice the desired
inputs Udi which will be converted to rotors inputs as Where: q = [x y z φ θ ψ]
follow: and Uq = [ux uy U1 U2 U3 U4].

Articles 37
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Fig. 2. Control structure of quadrotor

For each variable, we can design its controller in- [27], PSO [28] and GA [27], [29] which were used in
dependently of the others; for that, each loop of vari- to solve some specific problems. We propose in this
able is being a mono-variable system. In this case, we work, to use GA as an optimization technique to ob-
can tune the parameters of each variable alone but, tain the best PID's parameters. The use of such algo-
there are constraints related to the couples between rithm allows the control design of the system without
outputs variables, so we use decentralized control. the need of its linearization, which is not provided by
using classical methods. Likewise, there are some de-
3.3. Decentralized Control grees of freedom which are underactuated; as the po-
The steps followed to control a MIMO system by sition according x and y that have virtual controllers
decentralized control are: analyze the interactions, (ux and uy) and not direct inputs on the system. These
then decoupling them (for being weak) [23]. last, can’t be provided by classical methods also. The
We can characterize two types of interactions: application of the proposed technique will improve
(a). The interactions between the translation coordi- the quality of our control system.
nates (x and y) with the roll and pitch angles, as Genetic algorithms are group of operations
we notice in section (3.1). which are extracted from selection evolution nature,
(b). The interactions between the variables of inner proposed firstly by Holland [30]. They were used
loop (Fig. 2), the altitude (z) and (φ, θ) are strong- extensively in artificial intelligence with computer
ly coupled. The rest of interactions are negligible; science problems. The process of GAs starts by cre-
they don’t have direct influences. ating a random population of solutions, which are
For decoupling (a) we apply the sequential design encoded in chromosomes, then, they are evaluated
[24], we design the controllers of the inner loop (al- according to the performance of the problem, by us-
titude and three angles, as presented in Fig. 2), then ing particular criteria, called fitness function. In or-
the controllers of the outer loop (x and y) as a cascade der to improve the quality of solutions, to find the
design. best ones, there are some operations which must be
On the other hand, for (b), the influence of (φ, θ) applied on the population; selection, crossover and
in the altitude (z) is estimated (cosφcosθ). Then, to mutation.
weaken this influence the idea is to replace the input
Ud1 by U d1 such as:
4.1. Implementation of the GA
U d1 kUd1 (37)
In this work, we create randomly an initial popula-
Where: k is the adaptation coefficient: tion, which contains fifty real encoding chromosomes.
The fitness function is chosen as the Integral of the
1
k= (38) Squared Error (ISE).
cosϕ cosθ
τ
We can now, apply the genetic algorithm tech- fitness = ISE = ∫e2 ( t ) dt (39)
nique for each controller. 0
The selection of the parents to be crossed is ap-
4. Genetic Algorithm plied by using BMW determinist scheme [31], [32].
For the reasons that the quadrotor system is In this case, the best solution, in the current popu-
non-linear and some outputs (x and y) cannot be di- lation, mates the worst one and the less good mates
rectly controlled (they are underactuated), we can- the less worse. Because the encoding is real, a lin-
not tune the PID parameters with one of classical ear crossover presented by Wright in [33] is used.
approaches. Different methods can be used to obtain In a GA, after the crossover operation, a new popula-
optimal control of robots [25], [26] in particular, opti- tion of children is obtained. This population must to
mal parameters of the PID, among them; we can find be slowly disturbed by applying the Gaussian muta-
meta-heuristic techniques of optimization such as DE tion operator with a probability of 4%. The next gen-

38 Articles
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

eration, is then made by taking the fifty best solu- Table 2. Optimums PID's parameters obtained by GA
tions of both populations of parents and offspring. Variable Kp Ki Kd
This algorithm that includes all these operations is
applied for thirty iterations, which the number of z 9.6135 4.0704 4.8897
generations. φ, θ 0.4521 0 0.3622
In this work, there is no determined formula for
error function, so we use (ode45.m) function because ψ 0.15 0 0.15
the system is evolution. Then, the optimization pro- x, y 4.8095 0 0.8967
gram sends the chromosome parameters to this func-
tion and it receives its fitness function. However, we
have to discrete the evolution (sample time Ts = 0.05 s, 5. Results
simulation time = 10 s). After the design of the controllers, we have to test
Fig. 3 presents the diagram of control optimiza- their performance for the trajectory tracking. Table 3
tion with GA applied for each controlled variable. presents the suggested trajectories’ dynamics and
their conditions.

Table 3. Trajectories’ conditions and dynamics


Mode 1 Mode 2

Initial [x, y, z, φ, θ, ψ] = [x, y, z, φ, θ, ψ] =


condition [0,0,0,0,0,0] [0,–2,2,0,0,0]

Period [0, 7]s [7, 60]s

Actuators’ [0, 400] rad/s [0, 400] rad/s


saturation max = 370 rad/s max = 296 rad/s
1st trajectory

Description zd = 2 zd = t
Of xd = 0  2π 
x d = 2sin  t 
Trajectory yd = –2  30 
ψd = 0  2π π 
yd = 2sin  t − 
 30 2 
 2π 
ψ d = π sin  t 
 30 

Attitude’s
–20° < φ, θ < 20°
saturation

Initial [x, y, z, φ, θ, ψ] = [x, y, z, φ, θ, ψ] =


condition [0,0,0,0,0,0] [0,0,3,0,0,0,0]

Fig. 3. Diagram of applied GA Period [0, 7]s [7, 37]s

Actuators’ [0, 400] rad/s [0, 400] rad/s


2nd trajectory

saturation max = 400 rad/s max = 300 rad/s


4.2. Optimums Parameters obtained by GA
Description zd = 3 zd = –0.1t
The GA algorithm is applied as an optimization Of xd = 0  2π 
x d = 4 sin  t 
strategy, under MATLAB environment, to the quad- trajectory yd = 0  8 
rotor model OS4 [2] with parameters presented in ψd = 0  2π 
yd = 4 sin  t 
Table.1, for each variable except the yaw subsystem.  8 
This last, could be linear with hypothesis that the ψd = 0
quadrotor is symmetric (Ix = Iy).
The equation from the model (21) Attitude’s
–90° < φ, θ < 90°
saturation


ψ =
( Ix − I y ) ϕθ 1 
  + U 4  will be:
 Iz Iz  5.1. First trajectory
The suggested trajectory is a spiral, where the
1 quadrotor makes a circle in 30 seconds and up
ψ = U 4 (40)
Iz (1 m/s). Fig. 4 shows the tracking of the desired tra-
jectory for each position coordinate (z, x and y) and
The yaw has been controlled with classical PD. the rotation of the quadrotor with the yaw angle too.
As a result, we obtain a PID controller for the alti- Fig. 5 shows the tracking of desired trajectory in 3D
tude and PDs for the others controllers, the optimum plan. The rotors angular speeds are shown in Fig. 6.
parameters are presented in Table 2. These PID's pa- Firstly, from 0 to 7 seconds the quadrotor is sta-
rameters are applied to simulate the control of the bilized in starter position (x, y, z) = (0, –2, 2). Starting
quadrotor under MATLAB/Simulink. mode needs a big energy to up against the effect of

Articles 39
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Fig. 4. z, x, y and yaw (ψ) responses (1st Trajectory)

Fig. 5. Desired and actual trajectories in 3D (1st Trajectory)

gravity. Fig. 6 indicates that the angular speed of ro- tem to follow trajectories and to design x and y con-
tors in this mode can move up to 400 rad/s. trollers as an underactuated case.
After that, the trajectory begins; a linear move-
ment in altitude with a speed of about 1 m/s and for
translation motion, the quadrotor makes a complete 5.2. Second Trajectory
circle of 2 meters of radius in 30 seconds. In the same Unlike the first trajectory which is hovering as
time, the quadrotor turns on around itself, and Fig. 4 a circle with small roll ant pitch angles, we will show
shows the tracking of the desired trajectory with the effect of the proposed technique in the case of big
a precision at the end of the movement, of all varia- angles. The suggested trajectory is as follow; after the
bles (altitude z, translation motion of x and y, the yaw quadrotor rises in 3 meters of altitude, on the sec-
angle). In this mode, low energy is applied, as showed ond 7 it begins to down slowly with 10 cm/s; in the
in Fig. 6, where the rotors turn on around 220 rad/s. same time, it balances diagonally between –4 meters
These results show clearly the possibility of our sys- and 4 meters in x axis and y axis, the period of bal-

40 Articles
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Fig. 6. Rotors angular speeds (ω1, ω2, ω3 and ω4) in rad/s (1st Trajectory)

Fig. 7. z, x and y responses (2nd trajectory)

anced is just 8 seconds. Fig. 7 shows the tracking in z, tory clearer. Fig. 9 shows the rotors’ angular speed,
x and y axis, where we notice that the error in z is null which need a big energy in the starter mode (the
but in the x and y axis is not in the peaks. Fig. 8 shows speed reaches 400 rad/s) but when the quadrotor
the trajectory tracking in 3D plan to make the trajec- stabilizes in the balanced trajectory they are around

Articles 41
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Fig. 8. Desired and actual trajectory in 3D plan (2nd trajectory)

Fig. 9. Rotors’angular speeds ω1, ω2, ω3 and ω4 in rad/s (2nd trajectory)

220 rad/s. Fig. 10 shows the roll (φ) and pitch (θ) an- and under-actuated. A linear PID control technique
gles that the quadrotor makes this trajectory by them; was developed and synthesized, according to the
we notice that they are between –55° and 50° which decentralized control approach, for which, we have
makes the system absolutely nonlinear because the decoupled the interactions between the quadrotor
linear interval is between –10° and 10° variables. A complete simulation was implemented
on MATLAB/Simulink tool relying on the derived
mathematical model of the quadrotor system. The
6. Conclusion tuning of controllers parameters are done using
In this paper, we have proposed the control of GA, where the objective function is the dynamic re-
a non-linear, MIMO system, which is the quadro- sponse of the system in term of ISE. The response’s
tor. The mathematical model of this system has simulation of the system presents a path tracking
been developed in details, including its aerody- in 3D plan; where we notice that the tracking tra-
namic effects and rotors dynamics. The quadrotor jectory stabilizes, after a few seconds, this time is
is a non-linear complex system, strongly coupled what the quadrotor needs to stabilize the altitude

42 Articles
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

Fig. 10. The roll and pitch angles responses (2nd trajectory)

because a biggest energy is required in this period. REFERENCES


Although the simplicity of the controllers’ design [1] J.J. Xiong, E.H. Zheng, “Position and attitude
(PID), the effect of proposed technique and design- tracking control for quadrotor UAV”, ISA Trans.,
ing the controllers by GA is shown in terms of track- vol. 53, 2014, 725–731. DOI: 10.1016/j.isa-
ing errors and stability, even with the big angles, tra.2014.01.004.
subsequently, high velocities response and high [2] S. Bouabdallah, Design and control of quadrotors
dynamic performances, this is in contrast to works with application to autonomous flying, PhD the-
that used the PID with linearized model [12], [14], sis, EPFL, Switzerland, 2007.
[3] H. Elkholy, Dynamic modeling and control of
[15], [16], the variation of the angles is limited be-
a quad­rotor using linear and nonlinear approach-
tween –10° and 10° which is the linear range, so, es, Master thesis, American university in Cairo,
limit the dynamics by low performance. Moreover, Egypt, 2014.
compared of [34], which is a similar work, when [4] Z. Jia, J. Yu,Y. Mei et al., “Integral backstepping sli-
the GA was used to tune the PID’s parameters, but ding mode control for quadrotor helicopter un-
in the evaluation’s phase, they didn’t use a high dy- der external uncertain disturbances”, Aerosp. Sci.
namic trajectory and the angles never exceeded the Technol., vol. 68, 2017, 299–307. DOI: 10.1016/
linear range. Even some works, where a nonlinear j.ast.2017.05.022.
control is designed in, the used trajectory to eval- [5] F. Chen, K. Zhang, Z. Wang et al., “Trajectory trac-
uate the controller doesn’t contain high dynamics king of a quadrotor with unknown parameters
with big range of angles; [1], [6], [7], and [35]. and its fault-tolerant control via sliding mode
fault observer”, Proc. IMechE Part I: J Systems and
Finally, the shown rotors’ speeds are acceptable in
Control Engineering, 229, 2015, 279–292. DOI:
reality; so we have the possibility to apply these con- 10.1177/0959651814566040.
trollers in real system to get a trajectory tracking with [6] Y. Yang, Y. Yan, “Attitude regulation for unman-
a precision as presented in 3D trajectory and we don’t ned quadrotors using adaptive fuzzy gain-
need more powerful actuators. -scheduling sliding mode control”, Aerosp. Sci.
Technol., vol. 54, 2016, 208–217. DOI: 10.1016/
j.ast.2016.04.005
AUTHORS [7] H. Lu, C. Liu, M. Coombes et al., “Online optimi-
Seif-El-Islam Hasseni* – Energy Systems Modeling sation-based backstepping control design with
Laboratory (LMSE), Electrical Engineering Depart- application to quadrotor”, IET Control Theory
ment; University of Biskra, BP 145 RP, 07000, Biskra, Appl., vol. 10, 2016, 1601–1611. DOI: 10.1049/
Algeria.E-mail: seif.hasseni@univ-biskra.dz. iet-cta.2015.0976.
[8] D. Ma, Y. Xia, T. Li et al., “Active disturbance rejec-
Latifa Abdou – Identification, Command, Control and
tion and predictive control strategy for a quad­
Communication Laboratory (LI3CUB), Electrical En- rotor helicopter”, IET Control Theory Appl.,
gineering Department; University of Biskra, BP 145 vol. 10, 2016, 2213–2222. DOI: 10.1049/iet-
RP, 07000, Biskra, Algeria. -cta.2016.0125.
[9] K. Alexis, G. Nikolakopoulos, A. Tzes, “Model
*Corresponding author predictive quadrotor control: attitude, altitude
and position experimental studies”, IET Con-

Articles 43
Journal of Automation, Mobile Robotics & Intelligent Systems VOLUME 12, N° 2 2018

trol Theory Appl., vol. 6, 2012, 1812–1827. DOI: [26] E. Cuevas, A. Luque, D. Zaldívar et al., “Evolu-
10.1049/iet-cta.2011.0348. tionary calibration of fractional fuzzy control-
[10] P. Zarafshan, S.B. Moosavian, S.A.A. Moosavian lers”, Appl. Intell., vol. 47, 2017, 291–303. DOI:
et al., “Optimal Control of an Aerial Robot”. In: 10.1007/s10489-017-0899-y.
Proc. of the 2008 IEEE/ASME Int. Conf. on Advan- [27] M.S. Saad, H. Jamaluddin, I.Z.M. Darus, “Imple-
ced Intelligent Mechatronics, Xi’an, China, 2008, mentation of PID Controller Tuning Using Dif-
1284–1289. DOI: 10.1109/AIM.2008.4601847. ferential Evolution and Genetic Algorithms”, Int.
[11] P. Zarafshan, S.A.A. Moosavian, M. Bahrami, J. of Innovative Computing, Information and Con-
“Comparative controller design of an aerial ro- trol, vol. 8, 2012, 7761–7779.
bot”, Aerosp. Sci. Technol., vol. 14, 2010, 276–282. [28] J.S. Wang, C.X. Ning, Y. Yang, “Multivariable PID
DOI: 10.1016/j.ast.2010.01.001. Decoupling Control Method of Electroslag Re-
[12] S. Bouabdallah, A. Noth, R. Siegwart, “PID vs LQ melting Process Based on Improved Practical
Control Techniques Applied to an indoor micro Swarm Optimisation (PSO) Algorithm”, Infor-
quadrotor”. In: Proc. of IEEE/RSJ Int. Conf. on in- mation, vol. 5, 2014, 120–133. DOI: 10.3390/
telligent robots and systems, Sendal, Japan, 2004, info5010120.
2451–2456. DOI:10.1109/IROS.2004.1389776. [29] K. Rajarathinam, J.B. Gomm, D.L. Yu et al., “PID
[13] B. Kada, Y. Ghazzawi, “Robust PID Controller De- Controller Tuning for a Multivariable Glass Fur-
sign for an UAV Flight Control System”. In: Proc. nace Process by Genetic Algorithm”, Int. J of Au-
of the World Congress on Engineering and Com- tomation and Computing, vol. 13, 2016, 64–72.
puter Sci., vol. II, San Francisco, USA, 2011. DOI: 10.1007/s11633-015-0910-1.
[14] S.J. Haddadi, P. Zarafshan, “Attitude Control of [30] J.H. Holland, Adaptation in Natural and Artificial
an Autonomous Octorotor”, In: Proc. of the 2nd Systems, Massachusetts: MIT Press, 1992.
RSI/ISM Int. Conf. on Robotics and Mechatronics, [31] B.K. Yeo, Y. Lu, “Array Failure Correction with
Tehran, Iran, 2014, 540–545. DOI: 10.1109/ a Genetic Algorithm”, IEEE Trans. on Antennas
ICRoM.2014.6990958. and Propagation, vol. 47, 1999, 823–828. DOI:
[15] Q. Quan, G.X. Du, K.Y. Cai, “Proportional-In- 10.1109/8.774136.
tegral Stabilizing Control of a Class of MIMO [32] L. Abdou, F. Soltani, “OS-CFAR and CMLD Thre-
Systems Subject to Nonparametric Uncerta- shold Optimization with Genetic Algorithms”. In:
inties by Additive-State-Decomposition Dy- Proc. of 3rd Int. Conf. on Systems, Signals &Devices,
namic Inversion Design”, IEEE/ASME Trans. vol. III Communication and Signal Processing,
Mech., vol. 21, 2016, 1092–1101. DOI: 10.1109/ Sousse, Tunisia, 2005.
TMECH.2015.2497258. [33] A. Wright, Genetic Algorithms for Real Parame-
[16] N. Cao, A.F. Lynch, “Inner-Outer Loop Con- ter Optimization, San Mateo, California: Morgan
trol for Quadrotor UAVs With Input and Sta- Kaufmann, 1991.
te Constraints”, IEEE Trans. Contr. Syst. Tech- [34] A. Alkamachi, E. Erçelbi, “Modelling and Genetic
nol., vol. 24, 2016, 1797–1804. DOI: 10.1109/ Algorithm Based-PID Control of H-Shaped Ra-
TCST.2015.2505642. cing Quadcopter”, Arab J. Sci. Eng., vol. 42, 2017,
[17] L. Carrillo, A. Lopez, R. Lozano et al., Quad Rotor- 2777–2786. DOI: 10.1007/s13369-017-2433-2.
craft Control, London: Springer-Verlag, 2013. [35] Y. Zou, “Trajectory tracking controller for quad­
[18] J. Ghommam, N. Fethalla, M. Saad, “Quadrotor rotors without velocity and angular veloci-
circumnavigation of an unknown moving target ty measurements”, IET Control Theory Appl.,
using camera vision-based measurements”, IET vol. 11, 2017, 101–109. DOI: 10.1049/iet-
Control Theory Appl., vol. 10, 2016, 1874–1887. -cta.2016.0647.
DOI: 10.1049/iet-cta.2015.1246.
[19] P.J. Fleming, R.C. Purshouse, Genetic Algorithms
in Control Systems Engineering, Schiefled: Depar-
tement of Automatic Control and Systems Engi-
neering, University of Schiefled, 2001.
[20] M.W. Spong, S. Hutchinson, M. Vidyasagar, Robot
Modeling and Control, New York: JohnWiley-
&Sons, 2006.
[21] ROMANSY 21 – Robot Design, Dynamics and Con-
trol – Proceedings of the 21st CISM-IFToMM Sym-
posium, V. Parenti-Castelli, W. Schiehlen (eds.)
June 20–23, 2016. Udine, Italy, Springer.
[22] K.J. Astrom, T. Hagglund, Automatic Tuning of
PID Controllers, Pennsylvania: Instrument Socie-
ty of America, 1988.
[23] M.S. Mahmoud, Decentralized Systems with De-
sign Constraints, London: Springer-Verlag, 2011.
[24] M. Hovd, S. Skogestad, “Sequential Design
of Decentralized Controllers”, Automatica,
vol. 30, 1994, 1601–1607. DOI: 10.1016/0005-
1098(94)90099-X.
[25] X. Dai, L. Jiang, Y. Zhao, “Cooperative explora-
tion based on supervisory control of multi-robot
systems”, Appl. Intell., vol. 45, 2016, 18–29. DOI:
10.1007/s10489-015-0741-3.

44 Articles
View publication stats

You might also like