Professional Documents
Culture Documents
com/12555
DOI 10.1007/s12555-012-0107-0
Abstract: Helicopters have generated considerable interest in both the control community due to their
complex dynamics, and in military community because of their advantages over regular aerial vehicles.
In this paper, we present the modeling and control of a four rotor vertical take-off and landing (VTOL)
unmanned air vehicle known as quadrotor aircraft. This model has been generated using Newton-Euler
equations. In order to control the helicopter, classical PD (proportional derivative) and Hybrid Fuzzy
PD controllers have been designed. Although fuzzy control of various dynamical systems has been
presented in literature, application of this technology to quadrotor helicopter control is quite new. A
quadrotor helicopter has nonlinear characteristics where classical control methods are not adequate es-
pecially when there are time delays, disturbances and nonlinear vehicle dynamics. On the other hand,
Fuzzy control is nonlinear and it is thus suitable for nonlinear system control. Matlab Simulink has
been used to test, analyze and compare the performance of the controllers in simulations. For the eval-
uation of the autonomous flight controllers, some experiments were also performed. For this purpose,
an experimental test stand has been designed and manufactured. This study showed that although, both
of the classical PD and the Fuzzy PD controllers can control the system properly, the Fuzzy PD con-
trollers performed slightly better than the classical PD controllers, and have benefits such as better dis-
turbance rejection, ease of building the controllers.
where Sφ denotes Sin(φ ) and Cφ denotes Cos(φ ). where J is inertia of a single rotor around its axis.
The rotation speed of the rotors are described by Ωi, The lift forces of each rotor also produces torques
acting on the helicopter. The torques along x, y and z
where i corresponds to the rotor number (i :1, 2,3, 4).
axes can be given as:
The rotor spinning directions are determined to be
clockwise for the first and third rotors, and counter- lb(Ω 24 − Ω 22 )
clockwise for second and the fourth rotor. The forces 2 2
acting on the quadrotor are F1, F2, F3, F4 and mg. The lift TA = lb(Ω3 − Ω1 ) , (7)
2 2 2 2
forces generated by the rotation of the rotors will be d (−Ω1 + Ω 2 − Ω3 + Ω 4 )
Fi = bΩi2 . This parameter b has been found to be
constant by experiments. Then, the total lift force will be where l is difference between rotor center to quadrotor
summation of the lift forces of all four rotors as center, d is the drag coefficient. One can write the torque
4 balance as
FT = b∑ Ωi . The acceleration obtained from the total TG + TB = TA . (8)
i =1
lift is aF = FT/m. This acceleration can be represented in Substituting the torque equations given above in (8),
frame A as RaF. Using the force balance one can obtain and solving for φ, θ and ψ leads to
relation of linear acceleration with respect to the rotation
matrix and total lift force as I −I J
φ = ψθ
x z − θ(−Ω1 + Ω 2 − Ω3 + Ω 4 )
V = − ge + Re a ,
z z f (3) Ix Ix
(9)
l
where ez = [0 0 1] . T + b(Ω 24 − Ω 22 ),
Ix
Let V and ω ∈ A represent the linear and angular I −I J
velocities of the rigid body with respect to the inertial θ = ψφ
x z + φ(−Ω1 + Ω 2 − Ω3 + Ω 4 )
Iy Iy
frame. Similarly, let V b and ω b ∈ B represent the (10)
l
linear and angular velocities of the rigid body with
+ b(Ω32 − Ω12 ),
respect to the body-fixed frame. Let ζ be the vector of Iy
Ix − I y
Euler angles, ζ = [ψ , θ , φ ]. The body angular velocity
ψ = θφ −
d
(−Ω12 + Ω 22 − Ω32 + Ω 24 ). (11)
Iz Iy
(ω b = [ p, q, r ]T ) is related to Euler angular velocity by,
ω b = unskew( RT R ), where unskew() term, represents Expanding (3) leads to
obtaining vector ω b from skew symmetric matrix; b 4 2
skew(ω b ). The skew(ω ) ∈ so(3) is the skew symmetric
x = (Cψ Sθ Sφ + Sψ Cφ ) ∑ Ωi ,
m i =1
(12)
matrix of ω . b 4 2
The Euler angle velocities to body angular velocities
y = ( Sψ Sθ Cφ − Cψ Sφ ) ∑ Ωi ,
m i =1
(13)
are mapped by, ζ = J ω b , b 4 2
z = − g + (Cθ Cφ ) ∑ Ωi .
m i =1
(14)
ψ 1 Sψ Tθ Cψ Tθ p
ζ = θ = 0 Cψ − Sψ q , (4) Equations (9) to (14) represent the full mathematical
φ 0 S / C Cψ / Cθ r model of the quadrotor helicopter, with rotor speeds Ωi
ψ θ
as the inputs.
where Tφ denotes tan(φ ).
Due to the angular rotations ω, angular momentum of 3. CONTROLLER DESIGN
Lxyz=Iω will be formed. The I term in this equation is a
3x3 diagonal matrix whose elements are moment of In this section two controllers for the stabilization and
inertia Ix, Iy and Iz of x, y and z axes respectively. The guidance of the quadrotor helicopter will be represented;
time rate change of momentum corresponds to torque the Proportional Derivative (PD) controller, and the Hy-
(TB) formed by the angular velocities of the helicopter: brid Fuzzy PD Controller.
Consider the equations of motion of the quadrotor
TB = L = ω × I ω + I ω . (5) given with (9) to (14). Let us choose inputs as
The gyroscopic torque formed by rotation of the U1 = b(Ω12 + Ω 22 + Ω32 + Ω 42 ),
helicopter and its rotors around their axes can be written
as [19]: U 2 = b(Ω 24 − Ω 22 ),
(15)
4 U 3 = b(Ω32 − Ω12 ),
TG = ∑ J (ω × ez )Ωi (−1)i , (6)
i =1 U 4 = d (−Ω12 + Ω 22 − Ω32 + Ω 42 ),
64 Bora Erginer and Erdinç Altuğ
where U1 controls the motion along z-axis, U2 controls Taking the derivative of this equality and ignoring
motion along y-axis (roll angle), U3 controls the motion higher derivatives, one can obtain the relation for the
along the x-axis (pitch angle) and U4 controls rotation derivative of the desired roll angle as,
along the z-axis (yaw angle). The designed controllers
should set values to Ui parameters which determines the K py m( y − y d )
φd = , (21)
four rotor speed parameters Ωi by (15). A low level ∆φ
controller is still needed to keep this speed constant for
each motor. ∆φ = 1 − K 2py m2 ( y − yd )2 − 2 K p K dy m2
(22)
2
3.1. Proportional derivative (PD) controller +( y − yd )( y − y d ) − K dy m2 ( y − y d ) 2 .
The first approach is to use a PD controller. A PD
controller is useful since it can be obtained from the We can repeat the same procedure with (12) to obtain
dynamical model and also it stabilizes the system the desired values for the pitch angle and the desired
exponentially. Altitude control is performed by (14) as pitch angle derivative. The desired pitch angle will be
U1 =
mg
+
m( K p ( z − zd ) + K d z ( z − zd ))
, (16)
(
θ d = Arc sin K px ( x − xd ) + K dx ( x − xd ) . ) (23)
Cθ Cφ Cθ Cφ
The desired pitch angles derivative will be
where Kp is the proportional and Kd is the derivative
control coefficient, zd corresponds to the desired altitude. K px m( x − xd )
θd = , (24)
On the other hand, the Euler angles of the quadrotor ∆θ
are controlled with PD controllers as given in (17). These
controllers will be used for hover control, as well as to ∆θ = 1 − K 2px m2 ( x − xd ) 2 − 2 K p K dx m2
control the heading, x-motion and y-motion of the (25)
2
vehicle. +( x − xd )( x − xd ) − K dx m2 ( x − xd ) 2 .
U 2 = K pφ (φd − φ ) + K dφ (φd − φ), Desired pitch and roll angles, and the desired roll and
pitch angles’ derivatives are used in (17) to guide the
U 3 = K pθ (θ d − θ ) + K dθ (θd − θ), (17) vehicle along x and y-axes.
U 4 = K pψ (ψ d −ψ ) + K dψ (ψ d −ψ ),
3.2. Hybrid fuzzy PD controller
where φd , θ d , ψ d are the desired roll, pitch and yaw The idea of the Fuzzy PD controllers is that these kind
angles. For hover, the desired roll and pitch angles are of controllers can be used independent of the model.
Since the Fuzzy controllers depend on simple rules, they
taken as zero. The φd , θd , ψ d are the desired derivatives are much easier to understand and to implement. The
of the roll, pitch and yaw angles. designed autonomous navigation controller consists of
To control the motions along x-axis and y-axis, the θ six fuzzy logic modules for the control of altitude, yaw
and φ angles and their derivatives should be controlled. angle, roll angle, pitch angle, and motion along x and y
The desired values of the roll and pitch values and the axes using the error and the rate of change of these errors.
desired roll and pitch velocities will depend on the The error in altitude is (z – zd) and the rate of change of
desired values of the x and y locations. altitude error is ( z − zd ). The error in yaw is (ψ −ψ d )
Motion along the y-axis is related to the roll angle. In and the rate of change of this error is (ψ −ψ d ). The
order to define a relation for desired values of roll and its
error along x-axis and y-axis are given as (x – xd) and (y –
derivative, let us use (13). Rearrange terms as
yd). The rate of change of error along x and y axes are
y = − K py ( y − yd ) − K d ( y − y dy ) given as ( x − xd ) and ( y − y d ), respectively.
1 (18) For altitude and yaw control the desired values are
= ( Sψ Sθ Cφ − Cψ Sφ ) U1 given by the operator. The desired values for roll, pitch
m
and their derivatives are obtained from (20) to (25), and
assume that rotation around y-axis, θ, is zero, no motion they will not be obtained by the fuzzy controllers due to
present along x-axis, the yaw angle, ψ is also zero. Then the complex nature of the equations. These valued will
we can obtain, be obtained by classical PD controllers. Fig. 2 represents
the controllers, their inputs and outputs. Fig. 2 also
( K py ( y − yd ) + K dy ( y − y d ))m
Sinφd = . (19) shows that the desired values for φ and θ are
U1
obtained by the PD controllers.
The desired roll angle can be obtained by taking the The membership functions of the error and the rate of
arcsin of the above equation. Let us combine U1 and m change of error have been chosen identical. The width of
terms with the control constants to obtain, the fuzzy sets used for the controllers are same and they
are [-1, 1]. The width difference between the sets were
φd = Arc sin( K py ( y − yd ) + K dy ( y − y d )). (20) accomplished using a scale factor.
Design and Implementation of a Hybrid Fuzzy Logic Controller for a Quadrotor VTOL Vehicle 65
N NB NM NS Z PS
Z NM NS Z PS PM
P NS Z PS PM PB
Fig. 3. The controller output fuzzy set and the PB Z PS PM PB PB
membership functions for the fuzzy altitude
controller.
Table 1 presents the values of the membership
functions used for the input and output fuzzy sets. The
NB and PB functions are formed by two Gaussian type
membership functions.
The rules presented at Table 2 can be read as follows.
If the error is A and the rate of change of error is B, then
the output is C. For the case when the error is Negative
(N) and the rate of change of error is Positive Big (PB)
then the output will be Positive Small (PS). The output is
fuzzy in fuzzy logic controller.
Fig. 4. The error and error rate fuzzy set and the We can not provide these fuzzy outputs to a dynamical
membership functions. system as control inputs directly. Defuzzification process
is needed to convert these fuzzy outputs to numbers that
The inputs of error and the rate of change of error are can represent the fuzzy output. The control signal should
used by the rules to generate the output sets as shown in be continuous, any variation in input should not produce
Fig. 3. big changes in output signal. The defuzzification
There are five membership functions for each input set algorithm should be clear and the process to determine
as Negative Big (NB), Negative (N), Zero (Z), Positive the output signal should be identified clearly. Also, the
(P) and Positive Big (PB). There are seven membership defuzzification should be logical, should have high
sets for the controller outputs as Negative Big (NB), membership degree and it should correspond to the
Negative Mean (NM), Negative Small (NS), Zero (Z), approximately middle of the graph. It should be simple
Positive Small (PS) Positive Mean (PM) and Positive so that it can work in real-time to perform the
Big (PB). The fuzzy sets used for the output, and the calculations. For the reasons discussed above we have
errors are shown in Figs. 3 and 4, respectively. selected mean-area defuzzification method for the
The membership functions used for the input and controllers. In this method, the control output has been
output are Gaussian, selected as the value of the line that is cutting the graph
( ci − x )2
formed by the membership functions into half. If
2σ i2
required, a normalization can be performed before
µ Ai = e . (26) supplying this signal to the system.
66 Bora Erginer and Erdinç Altuğ
5
3 3
4
2 2
3
1 1
2
) ) )
(m (m (m
ns 0 n
so
1 ns 0
op p op
0
-1 -1
-1
-2 -2
Xf motion -2 Yf motion Zf motion
-3 Xp motion Yp motion -3 Zp motion
-3
Desired Desired Desired
-4 -4 -4
0 5 10 15 20 25 30 0 5 10 15 20 25 30 0 5 10 15 20 25 30
time (s) time (s) time (s)
Pitch vs time Roll vs time Yaw vs time
30 30 30
20 20 20
10 10 10
)g )g )g
ed e
d ed
( 0 ( 0 ( 0
el e
lg el
gn n gn
a a a
-10 -10 -10
Fig. 5. The control of the quadrotor using PD (dashed line) and Fuzzy PD (solid line) controllers.
Design and Implementation of a Hybrid Fuzzy Logic Controller for a Quadrotor VTOL Vehicle 67
5
3 3
4
2 2
3
1 1
2
) ) )
m
( m
( m
(
ns 0 n
so
1 ns 0
po p po
0
-1 -1
-1
-2 -2
Xf motion -2 Yf motion Zf motion
-3 Xp motion Yp motion -3 Zp motion
-3
Desired Desired Desired
-4 -4 -4
0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25
time (s) time (s) time (s)
Pitch vs time Roll vs time Yaw vs time
30 30 30
20 20 20
10 10 10
)g )g )g
de( e
d
( 0 de(
0 0
leg le
g leg
na n
a na
Fig. 6. Helicopter position and Euler angles during the second simulation, where PD (dashed line) and Hybrid Fuzzy
PD controllers (solid line) are used to control the helicopter.
To perform secure and reliable experiments, a custom Draganflyer-III quadrotor model helicopter has been
experimental test stand has been designed and installed to the test stand as well as an IMU to read the
manufactured to test the helicopter flight controllers and helicopter states (Fig. 8).
the UAV systems (Fig. 7). The test stand allows the In this study, an IMU has been used to obtain the
helicopter to perform yaw motions freely, allows up to 2 acceleration, velocity information of the helicopter. The
meters of altitude, as well as up to ±20° roll and pitch angles are obtained by integrating the velocity
motion. The test stand can be used for various sized information. This helicopter can be controlled with a
model helicopters and it has a security panel around it. A radio transmitter. The generated control signals on the
68 Bora Erginer and Erdinç Altuğ
Fuzzy PD Controller
Table 5. Comparing the results of the controllers.
Yaw Angle (deg)
Classical PD Controller
The real behavior of helicopter usually differs from
the expected ones that has developed through simulations.
One reason for that is, it is not possible to model the
system exactly as the real helicopter due to the
assumptions or unmeasured quantities as well as the
time (s)
effect of the disturbances. Therefore one can not
Fig. 13. Comparison of the performance of the two guarantee the control of the helicopter using PD
controllers. Yaw v.s. time (top), Yaw rate v.s. controllers by analyzing the simulation results only. On
time (below). the other hand, for Fuzzy controllers, the control
language is more verbal then numerical, which is parallel
to what a pilot thinks as he/she controls the vehicle. Also,
the dependence of the Fuzzy controller on the helicopter
model is much less then the the classical controllers used.
The Fuzzy control is nonlinear and it is thus more
suitable for nonlinear system control. Experiments
performed on the test stand as well as the simulations
show that both of the classical PD and the Fuzzy PD
controllers can be used to stabilize and guide a quadrotor.
The control performance of the Fuzzy PD controller was
slightly better then the classical PD controller in
simulations and experiments. The biggest advantage of
the hybrid fuzzy PD controller is the robustness against
Fig. 14. Yaw angle control with Fuzzy PD controller noise, and its ease for implementation. For the classical
while the helicopter subjecting to disturbance. PD control, successful control depends on careful system
Yaw v.s. time (top), Yaw rate v.s. time (below). modelling and coefficient selection. The comparison of
the controllers are summarized in Table 5.
The robustness of the Fuzzy PD controller has further Our future studies will involve developing an on-board
been tested in the following experiment, where random micro-controller to eliminate the need for a remote
disturbances are applied to the helicopter at 3, 6 and 10 processing computer that is limiting the mobility of the
seconds of the experiment. The Fuzzy PD controller UAV system.
stabilized the helicopter rapidly even with disturbance
applied (Fig. 14). REFERENCES
[1] A. Gessow and G. Myers, Aerodynamics of the hel-
6. CONCLUSION icopter, Frederick Ungar Publishing Co, New York,
1967.
In this paper, modelling and hybrid fuzzy PD control [2] J. G. Leishman, Principles of Helicopter Aerody-
of a four-rotor helicopter have been presented. Although namics, Cambridge University Press, 2000.
fuzzy control of dynamical systems has been presented [3] M. J. Hirschberg, The American Helicopter: An
extensively in literature, application of this technology to Overview of Helicopter Developments in America
quadrotor helicopter control is quite new. In modelling of 1908-1999, 2000.
the helicopter, we considered the gyroscopic effects and [4] P. Castillo, R. Lozano, and A. E. Dzul, Modelling
generated the equations with Newton-Euler equations. and Control of Mini-flying Machines, Advances in
For the control of the helicopter, classical and Fuzzy PD Industrial Control series, ISSN 1430-9491, Springer,
controllers have been developed and presented. Various 2005.
simulations were performed to test and compare the [5] H. Y. Chao, Y. C. Cao, and Y. Q. Chen, “Autopilots
controllers. When comparing these two controller we for small unmanned aerial vehicles: a survey,’’ In-
should note that the selection of the membership ternational Journal of Control, Automation, and
functions and the rules of the fuzzy controller are based Systems, vol. 8, no. 1, pp. 36-44, 2010.
on the experience of the designer, similarly for the [6] D. Lee, I. Kaminer, V. Dobrokhodov, and K. Jones,
classical PD controller the coefficients are based on a “Autonomous feature following for visual surveil-
trial and error approach. lance using a small unmanned aerial vehicle with
70 Bora Erginer and Erdinç Altuğ
gimbaled camera system,’’ International Journal of [20] D. Lee, H. J. Kim, and S. Sastry, “Feedback lineari-
Control, Automation, and Systems, vol. 8, no. 5, pp. zation vs. adaptive sliding mode control for a qua-
957-966, 2010. drotor helicopter,’’ International Journal of Control,
[7] D. Han, J. Kim, C. Min, S. Jo, J. Kim, and D. Lee, Automation, and Systems, vol. 7, no. 3, pp. 419-428,
“Development of unmanned aerial vehicle (UAV) 2009.
system with waypoint tracking and vision-based re- [21] L.-X. Wang, A Course in Fuzzy System and Control,
connaissance,’’ International Journal of Control, Prentice Hall, 1997.
Automation, and Systems, vol. 8, no. 5, pp. 1091- [22] C.-C. Lee, “Fuzzy logic in control systems: fuzzy
1099, 2010. logic controller-part I,’’ IEEE Trans. on System,
[8] T. Hamel, R. Mahony, R. Lozano, and J. Ostrowski, Man, and Cybernetics, vol. 20, no. 2, pp. 404-418,
“Dynamic modeling and configuration stabilization 1990.
for an X4-flyer,’’ Proc. of IFAC 15th Triennial [23] L. Reznik, Fuzzy Controllers Handbook, 1997.
World Congress, Barcelona, Spain, 2002. [24] E. H. Fung, Y. Wong, Y. Ma, C. M. Yuen, and W.
[9] E. Altuğ, J. P. Ostrowski, and C. J. Taylor, “Control Wong, “Smart hanger dynamic modeling and fuzzy
of a quadrotor helicopter using dual camera visual controller design,’’ International Journal of Control,
feedback,’’ The International Journal of Robotics Automation, and Systems, vol. 9, no. 4, pp. 691-700,
Research, vol. 24, no. 5, pp. 329-341, 2005. 2011.
[10] D. Suter, T. Hamel, and R. Mahony, “Visual servo [25] A. Hafaifa, F. Laaouad, and K. Laroussi, “A numer-
control using homography estimation for the stabi- ical structural approach to surge detection and iso-
lization of an X4-flyer,’’ Proc. of the 41st IEEE lation in compression systems using fuzzy logic
Conf. on Decision and Control, pp. 2872-2877, controller,’’ International Journal of Control, Au-
2002. tomation, and Systems, vol. 9, no. 1, pp. 69-79,
[11] A. Moktari and A. Benallegue, “Dynamic feedback 2011.
controller of Euler angles and wind parameters es- [26] M. Sugeno, Development of an Intelligent Un-
timation for a quadrotor unmanned aerial vehicle,’’ manned Helicopter, at the Fuzzy Modeling and
Proc. of the IEEE Conf. on Rob. and Auto., pp. Control, CRC Press, Boca Raton, 1999.
2359-2366, 2004. [27] B. Kadmiry and D. Driankov, “Fuzzy control of an
[12] J. Dunfied, M. Tarbouchi, and G. Labonte, “Neural autonomous helicopter,’’ IFSA World Congress, vol.
network based control of a four rotor helicopter,’’ 5, Canada, pp. 2797-2802, 2001.
Proc. of IEEE Int. Conf. on Industrial Technology, [28] C. Cavalcante, J. Cardoso, J. G. Ramos, and O. R.
pp. 1543-1548, 2004. Nerves, “Design and tuning of a helicopter fuzzy
[13] M. G. Earl and R. D’Andrea, “Real-time attitude controller,’’ Proc. of IEEE Int. Conference on Fuzzy
estimation techniques applied to a four rotor heli- Systems, vol. 3, pp. 1549-1554, 1995.
copter,’’ Proc. of IEEE Conf. on Decision and Con- [29] N. I. Vitzilaios and N. C. Tsourveloudis, “An expe-
trol, pp. 3956-3961, 2004. rimental test bed for small unmanned helicopters,’’
[14] S. Slazar-Cruz, A. Palomino, and R. Lozano, “Tra- Journal of Intelligent and Robotic Systems, vol. 54,
jectory tracking for a four rotor mini-aircraft,’’ Proc. pp. 769-794, May 2009.
of the 44th IEEE Conf. on Decision and Control [30] R. D. Garcia and K. P. Valavanis, “The implemen-
and the European Control Conference, pp. 2505- tation of an autonomous helicopter testbed,’’ Jour-
2510, 2005. nal of Intelligent and Robotic Systems, vol. 54, Is-
[15] J. Escareno, S. Salazar-Cruz, and R. Lozano, “Em- sue 1-3, pp. 423-454, March 2009.
bedded control of a four-rotor UAV,’’ Proc. of the
American Control Conference, pp. 189-204, 2006. Bora Erginer received his B.S. degree in
[16] S. Bouabdallah and R. Siegwart, “Backstepping Department of Mechanical Engineering
and sliding-mode techniques applied to an indoor from Yıldız Technical University in 2003,
micro quadrotor,’’ Proc. of the IEEE Conf. on Ro- and his M.S. degree in mechanical engi-
neering in Istanbul Technical University,
botics and Automation, pp. 2247-2252, 2005.
in 2007. His research interests include
[17] L. Beji, A. Abichou, and K. M. Zemalache, control, sensors, and modeling.
“Smooth control of an X4 bidirectional rotors fly-
ing robot,’’ 5th Int. Workshop on Robot Motion and
Control, pp. 181-186, 2005.
[18] P. Castillo, A. E. Dzul, and R. Lozano, “Real-time Erdinç Altuğ received his B.S. degree in
stabilization and tracking of a four-rotor mini rotor- Department of Mechanical Engineering
craft,’’ IEEE Trans. on control systems technology, from Middle East Technical University in
vol. 12, no. 4, pp. 510-516, 2004. 1996, an M.S. degree from Carnegie
[19] A. Tayebi and S. McGilvray, “Attitude stabilization Mellon University, and a Ph.D. degree
of a VTOL quadrotor aircraft,’’ IEEE Trans. on from the University of Pennsylvania in
2003. His research interests include ro-
Control Systems Technology, vol. 14, no. 3, pp.
botics, control, and unmanned systems.
562-571, 2006.