Documente Academic
Documente Profesional
Documente Cultură
Abstract - This paper presents fuzzy self-tuning PID controllers give the efficient and simplest solution to control
controller for controlling the altitude of the quadrotor. Although the system of quadrotor [13].
the PID controllers have many advantages, it has a limitation Although the PID controller has many advantages, it has a
that the main term gains called proportional gain, integration limitation that the main-term gains called proportional gain,
gain, and derivative gain have to be tuned manually. One of a
integration gain and derivative gain have to be tuned
solution to manage its limitation is adding the special feature
called self-tuning. So, a fuzzy self-tuning PID controller is manually. One of solution to manage its limitation is adding
proposed to adjust the gain parameter of PID controller. As a the special feature called self-tuning [14]. Fuzzy logic is the
result, two control techniques were then developed and chosen method of self-tuning for the PID controller. M. Santos
synthesized for comparing; a linear PID controller only and et al. [15] proposed an intelligent system based on fuzzy logic
fuzzy self-tuning PID controller. A complete simulation was then to control a quadrotor. C. Coza et al. [16] used an adaptive
implemented on MATLAB/Simulink relying on the derived fuzzy control algorithm to control a quadrotor in the presence
mathematical model of the quadrotor. of sinusoidal wind disturbance. The author addressed a robust
Keywords—Altitude, Quadrotor, Fuzzy Logic, PID Control. method to prevent drift in the fuzzy membership centers.
The purpose of this paper is to present the basics of
I. INTRODUCTION quadrotor modeling and control as to form a basis for further
research and development in the area. This is pursued with
Controlling of unmanned aerial vehicles (UAVs) is a very two aims. The first aim is to study the mathematical model of
challenging field of research especially for vertical take-off the quadrotor dynamics. The second aim is to develop proper
and landing (VTOL) vehicles such as Quadrotor. Quadrotor is methods for altitude control of the quadrotor. This paper is
a typical design for small UAV because of its simple structure. aimed at using Fuzzy Self Tuning PID Controller for
Quadrotor is an unmanned aerial VTOL vehicle that is controlling the altitude of quadrotor. Two control techniques
classified among aerial vehicles with rotary wings. This aerial were then developed and synthesized; a linear PID controller
vehicle has four motors whose propulsion thrust is generated and fuzzy self-tuning PID controller. A complete simulation
by transmission of power to propellers. This vehicle can be was then implemented on MATLAB/Simulink relying on the
controlled and stabilized by altering engine rpm. Quadrotors derived mathematical model of the quadrotor. The challenge
are used in surveillance [1], search and rescue [2], in controlling a quadrotor is that the quadcopter has six
construction inspections [3], military [4] and several other degrees of freedom but there are only four control inputs.
applications. The remainder of this paper is organized as follows. In
State of the art in control quadrotor has changed drastically Section II, the dynamic model and state space model of a
in the last several years. The number of projects tackling this quadrotor are proposed. Section III elaborates the control
issue has enough and suddenly increased. The basic dynamical system architectures especially on fuzzy system for tuning
model of the quadrotor is the starting point for all of the PID gains. Section IV presents several simulation results
studies but more complex aerodynamic properties has been which show the effectiveness and merit of the proposed
introduced as well [5]-[6]. Different control methods has been methods. Section V concludes the paper with remarks and
researched, including PID controllers [7]-[8]-[9], LQR suggestions for future works.
controllers [10] and nonlinear controllers with nested
saturations [11]-[12]. II. MODELING OF QUADROTOR
PID controllers have been standard tools in industry due to
their practicality. The availability of well-established rules for A. Dynamics Model of Quadrotor
tuning the parameters of the controller is another reason The motion of the quadrotor can be divided into two
making them preferable in real-time applications. It has main- subsystems; rotational subsystem (roll, pitch and yaw) and
term gains that have primary function to take over to the translational subsystem (altitude and x and y position). The
responses of system, especially quadrotor system. PID rotational subsystem is fully actuated while the translational
the principle axes in the body frame. Since for the case of frame, m is quadrotor's mass, g is gravitational acceleration
quadrotors, the maximum altitude is usually limited, thus the ( g 9.81 m / s 2 ), R is rotational matrix as shown in (12) and
air density can be considered constant. So, Equations (4) and
FB is non-gravitational forces acting on the quadrotor in the
(5) show the aerodynamic force Fi and moment M i produced
body frame. When the quadrotor is in a horizontal orientation
by the i th rotor [18]. (i.e. it is not rolling or pitching), the only non-gravitational
Fi K f :i2 (4) forces acting on it is the thrust produced by the rotation of the
propellers which is proportional to the square of the angular
Mi K M :i2 (5) velocity of the propeller as per Equation (4). Thus, the non-
where K f and K M are the aerodynamic force and moment gravitational forces acting on the quadrotor, FB, can be
expressed as,
constants respectively and :i is the angular velocity of rotor
ª 0 º
i. The aerodynamic force and moment constants can be « »
determined experimentally for each propeller type. By FB « 0 » (11)
identifying the forces and moments generated by the « 2 2 2 2 »
propellers, we can study the moments M B acting on the «¬ K f (:1 : 2 :3 : 4 ) »¼
quadrotor. Fig. 1 shows the forces and moments acting on the
quadrotor. Each rotor causes an upwards thrust force Fi and
generates a moment M i with direction opposite to the
direction of rotation of the corresponding rotor i. Starting with
the moments about the body frame's x-axis, by using the right-
hand rule in association with the axes of the body frame, F2
multiplied by the moment arm L generates a negative moment
about the y-axis, while in the same manner, F4 generates a
positive moment. Thus the total moment about the x-axis can
be expressed as in (6). For the moments about the body
frame's y-axis, also using the right-hand-rule, the thrust of
rotor 1 generates a positive moment, while the thrust of rotor 3
generates a negative moment about the y-axis. The total
moment can be expressed as in (7). For the moments about the
body frame's z-axis, the thrust of the rotors does not cause a
moment. On the other hand, the moment caused by the rotors' Fig. 1. Forces and moments acting on quadrotor.
68
The first two rows of the force vector are zeros as there is
no forces in the X and Y directions, the last row is simply an
addition of the thrust forces produced by the four propellers.
The negative sign is due to the fact that the thrust is upwards
while the positive z-axis in the body framed is pointing
downwards.
ªcos\ cos T cos\ sin I sinT sin I sin\ cos I cos\ sin T º
« cos T sin\ cos I sin\ sin T cos\ sinT »»
R « cos T sin\ sin I sin\ sin T (12)
«¬ sin T cos T sin I cos I cos T ¼»
Define the state vector of the quadrotor is described in
(13).
T
x ª¬ x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 º¼ (13)
Where each state space equation (11) can be represented as
follows
Fig. 2. Altitude model for quadrotor.
x ª¬I IT
T \ \ x x y y z z º T
¼ (14)
The state space equation (14) shows the information about the input : u Fm
degree of freedom of quadrotor such as the position, > x y z @ , states :
angular angel >IT\ @ , linear velocity > x y z @ and angular x1 h(altitude) (21)
x2 v(velocity )
velocity ª¬IT\
º . The input is defined as follows,
¼ output : y x1
T
u ¬ªu1 u2 u3 u4 ¼º (15) will allow the transfer function to be expressed in a standard
Whereas, state space model. The definitions described above in (28)
leads to
u1 K f (:1 : 2 :3 : 4 )
u Fm
u2 K f (: 2 : 4 )
(16) u
u3 K f (:1 :3 ) x1
m (22)
u4 K M (:1 : 2 :3 : 4 ) x2 x2
From (16), we get the input as this following matrix, y x1
ª u1 º ª K f Kf Kf K f º ª: º This allows one to express the final state space model as:
«u » « 0 K »« 1»
0 K f » «: 2 »
§ x1 · § 0 1 · § x1 · § 0 ·
« 2» « f
(17) ¨ ¸ ¨ ¸¨ ¸ ¨ ¸u
« u3 » « K f 0 K f 0 » « :3 » © x2 ¹ © 0 0 ¹ © x2 ¹ © 1 ¹
« » « »« » (23)
¬u4 ¼ «¬ K M K M K M K M »¼ ¬: 4 ¼ § x1 ·
y 1 0 ¨ ¸
© x2 ¹
B. Altitude Model of Quadrotor
If we assume for stable hover position should
One of the main objectives with physical modeling is to have I 0 and T 0 , so the equation (24) is described the
simplify the physical properties of the system that is to be
modeled. The idea being that one obtains a much simpler motion speed of quadrotor at z-axis.
model which, serves to explain the main characteristics of the K f (:1 : 2 :3 : 4 )
z g
(24)
real system. Fig. 2 shows the details about how we described m
altitude model at quadrotor. In (20) is described transfer function of z can be defined by the
From Newton’s second law it is known that following equation (25).
F mg ma K f (:1 :2 :3 :4 ) mg
z (s) (25)
dv F mg (18) mS 2
dt m Motion of the quadrotor along z-axis is affected by all of the
A Laplace transformation leads to propellers. Thus, the dynamic model of the height could be
F mg written as in (26).
S 2h (19) mz 4 F cos I cos T mg
m (26)
and defining F mg Fm gives the final transfer function: Where F is thrust which is generated by each propeller, m is
total mass of the quadrotor, z is height, I and T are roll and
1
h( s )
Fm ( s) (20) pitch angles. By integrated two times in (26), we get height
mS 2 model of quadrotor as in (27) - (28).
Defining the following states, inputs and outputs as
69
u4 0
K u(t) y(t )
i
u2 ,u3 s
K s
d
M ,T ,\
pv(t )
Fig. 3. Block diagram for altitude controller.
4F
z
cos I cos T g (27)
m
4F
z ³³m
cos I cos T g (28)
A. Altitude Control
First, a PID controller is developed to control the altitude of Fig. 4. Block diagram for fuzzy self tuning PID controller (up) and block
diagram for fuzzy logic system (down).
the quadrotor. It generates the control input u1 as shown in
Fig. 3 which is responsible for the altitude for the quadrotor as
per Equation (17) and in (28). In this case, we assume the IV. SIMULATION RESULTS AND DISCUSSION
quadrotor is stable in rotational sub-system. So, the value
By using Simulik-Matlab, the equation in (28) can be
angles of roll and pitch are zero ( I 0 and T 0 The block modeled as described in Fig. 5.
diagram for a PID controller is shown in Fig. 4 and in (29) as
equation of PID controller with independent type structure
[19]. Thus, the derived control law for altitude control is
described in (30).
The altitude controller takes an error signal e as an input
which is the difference between the desired altitude zd and the
actual altitude z and produces a control signal u1.
t de t
0
³
u t K p e t K i e t dt K d
dt
(29)
ª Ki º
u s « K p K d s » e s
¬ s ¼
u1 ³
K p ( zd z) K d ( zd z) K i ( zd z)dt (30)
Where: K p is proportional gain, K d is derivative gain, Ki is
Fig. 5. Simulink diagram for altitude/height mode.
integral gain, zd is desired altitude and zd is desired altitude
rate of change.
B. Fuzzy Self Tuning PID Controller
Fuzzy logic has become a mean of collecting human
knowledge and experience and dealing with uncertainties in the
control system process [20]. A fuzzy self-tuning PID controller
is a controller that is based on fuzzy logic with a PID structure
[21]. In this sub-section, the proportional, derivative and
integral gains of the PID controller are tuned using fuzzy logic
as described in Fig. 4.
Fig. 6. Simulink diagram for fuzzy self tuning PID controller.
70
Fig. 7. Simulink diagram for fuzzy self-tuning PID controller and comparing
with PID controller only.
The open loop response of the system is shown in Fig. 8. The Fig. 8. Open loop respons of the system (up) & PID control respons (down).
graphics depicted that the system is unstable. To achieve
stable response, controller is needed. Firstly, we try the PID
controller only, we used Ziegler-Nichols Quarter Decay [22]
for tuning the parameter gain of PID controller.
71
Fig. 11. A complete simulation used MATLAB/Simulink relying on the derived mathematical model of the quadrotor with Fuzzy self- tuning PID controller.
72