You are on page 1of 7

See

discussions, stats, and author profiles for this publication at: http://www.researchgate.net/publication/260420694

Controlling the Pitch and Yaw Angles of Twin


Rotor MIMO System in Simulation-Based
Platform using Fuzzy Logic Controller and PID
Controller
ARTICLE in THE OPEN ARTIFICIAL INTELLIGENCE JOURNAL FEBRUARY 2014
DOI: 10.12966/ojai.02.01.2014,

DOWNLOADS

VIEWS

11

82

4 AUTHORS:
Ahmed Abdulelah

Azura che soh

University Of Kufa

Putra University, Malaysia

1 PUBLICATION 0 CITATIONS

29 PUBLICATIONS 31 CITATIONS

SEE PROFILE

SEE PROFILE

Mohd Khair Hassan

Samsul Noor

Putra University, Malaysia

Putra University, Malaysia

33 PUBLICATIONS 19 CITATIONS

73 PUBLICATIONS 117 CITATIONS

SEE PROFILE

SEE PROFILE

Available from: Azura che soh


Retrieved on: 27 June 2015

Sciknow Publications Ltd.

OJAI 2014, 2(1):1-6


DOI: 10.12966/ojai.02.01.2014

Open Journal of Artificial Intelligence


Attribution 3.0 Unported (CC BY 3.0)

Controlling the Pitch and Yaw Angles of Twin Rotor MIMO


System in Simulation-Based Platform using Fuzzy Logic
Controller and PID Controller
Ahmed Abdulelah1, 2, Azura Che Soh1,*, MohdKhair Hassan1 and SamsulBahariMohd Noor1
1

Department of Electrical & Electronic Engineering, University Putra Malaysia, Selangor, Malaysia
Faculty of Engineering, University of Kufa, Iraq

*Corresponding author (Email: azuracs@upm.edu.my)

Abstract - In this paper, the PID and fuzzy logic controllers are designed to control the pitch and yaw angles of a twin rotor
MIMO system (TRMS) in simulation-based platform. Two controllers were used in each case, one for pitch angle and one for
yaw angle. The twin rotor MIMO system designed as decoupling system in simplification. The tuned controllers gave a very
good response in the simulation. These results will provide a solid base for designing the final optimized real-time controller in
the next stages of the research.
Keywords - Fuzzy Logic Controller, PID Controller, Twin Rotor MIMO System

1. Introduction
Control of a helicopter is much more difficult to achieve than
controlling a fixed-wing aircraft. This is because the
fixed-wing aircraft will eventually reach some steady-state
flight condition if a pilot releases the controls, but a helicopter
will eventually diverge from the steady-state if the pilot
releases the control without constant corrective control input.
The difficulty in developing a controller for a helicopter is due
to the inherent instability and high degree of coupling in the
aircraft. Hence, a good controller has to be designed, so that
the helicopter could maintain at a specific position for an
extended period of time, and the movement of helicopter
could be controlled and always in steady-state. Helicopters
control systems have less spectacular performance than the
conventional fixed wing aircrafts due to the high non-linearity
of the system and strong coupling effects between the rotors
governing its movement, which hugely complicate the design
of a reliable and robust controller. All that added to the huge
difficulty of deriving a dynamic model for the helicopter form
a serious obstacle in the way towards designing a convenient
control system.
Although the coupled and nonlinear dynamics of the
helicopter make the altitude control a difficult task, numerous
control techniques are applied to control the flight system.
Flight control system of an aircraft requires a controller to
maintain flight path that is safe and smooth, which can be
controlled either by traditionally or by intelligent controller.

Many researches were done on controlling pitch and yaw


angle of an aircraft for flight control in order to stabilize the
system when the airplane is flying. This can be achieved by
reducing the error signal to the system to test the performance.
Traditional control techniques such as proportionalintegral-derivative (PID) control and linear quadratic
regulator (LQR) have shown to be insufficient to control such
a platform [1-4]. Hence, intelligent control was developed for
flight control system such as neural network, fuzzy logic and
genetic algorithms which have shown to be a very efficient
and relatively easy way to utilize with respect to other
conventional control methods that have been applied to
helicopters [5-9].
Intelligent control techniques are taking great strides
towards being the mainstream technology for control
engineering due to the development in computer systems.
These techniques provide simpler tools (simpler and accurate)
for control than conventional control as a result of depending
on computers for numerical calculations and getting rid of
complex analytical calculations. Helicopter system that
consists of twin rotor is one good example of highly complex
dynamics and non-linear system.
Twin rotor experimental devices are very useful in the
study for nonlinear control systems in laboratories due to
their nonlinear complex dynamic nature [10]. The system
dealt with is a coupled MIMO plant [11]. The voltages were
supplied as open loop inputs to each rotor of the machine
(pitch rotor and yaw rotor). Meanwhile the output observed
were the pitch and yaw angles. The aims of this research

Open Journal of Artificial Intelligence (2014) 1-6

paper is finding a suitable adaptation algorithm that can alter


the controller to achieve the best possible performance when
apply at real-time. However, it is essential to successfully
simulate it using system model available prior to applying
the design on the real device.

1
1
1
2
2
2
J eP 2 J eY 2 mheli ( x cm
y cm
z cm
) (2.5)
2
2
2

where mheli = total moving mass of the helicopter, g =


gravitational constant, l cm = center of mass length along
helicopter body from pitch axis, J eP = total moment of inertia

2. Overview Twin Rotor Model


In order to obtain the mathematical model of the system, the
angle in the pitch axis and the angle in the yaw axis
represent 2-DOF. The pitch axis is positive when the nose of
the helicopter moves up, while the yaw axis is positive for a
clockwise rotation.
The free-body diagram of the 2-DOF helicopter is
illustrated in Fig. 1. There are thrust force Fp and Fy for the
pitch and yaw axis respectively. The torque of pitch is being
applied at a distance rp from the pitch axis and a yaw torque is
being applied at a distance ry from the yaw axis. The
gravitational force Fg pulls down on the helicopter nose. The
center of mass is at a distance of lcm from the pitch axis along
the helicopter body length [1].

about pitch axis, J eY =total moment of inertia about yaw axis.


The Lagranges equations for a 2-DOF system are written
as
dL

L Q1

t dq1 q1

and

dL

t dq1 q 2

(2.6)

(2.7)

where L is the Lagrangian of the system which is defined as


the difference between the kinetic and potential energy of the
system, L T V , while q is the generalized coordinate.
Then, the generalized forces applied on the generalized
coordinates are

Q1 K ppVm _ p K pyVm _ y B p

(2.8)

Q2 K ypVm _ p K yyVm _ y B y

(2.9)

where Kpp and Kpy are torque constant of pitch and yaw motor
propeller actuators above pitch axis; Kyp and Kyy are torque
constant of pitch and yaw motor propeller actuators above
yaw axis; Vm_p is pitch motor voltage, while Vm_y is yaw motor
voltage; and Bp and By are viscous rotary friction acting
corresponding to the pitch and yaw axis.
Using the Euler-Lagrange formula, the nonlinear
equations of motion of the 2-DOF helicopter system are
derived from the coordinates and forces defined in (2.8) and
(2.9). The equations of motion obtained are
Fig. 1. Free-body diagram of 2-DOF helicopter [2]
The Lagranges method is used to obtain the dynamic
model of the system. The pitch angle, and yaw angle, are
called as generalized coordinates or also called as Lagrangian
coordinates. After the transformation of the coordinates using
the pitch and yaw rotation matrices [12], and the conventions
of 2-DOF helicopter modeling [13], the center of mass is
represented in Cartesian coordinates with respect to angle
and of the aircraft is given by

xcm lcm cos cos

(2.1)

ycm lcm cos sin

(2.2)

z cm lcm sin

(2.3)

The total potential energy and kinetic energies are needed


to calculate the Lagrangian of the system. Thus, the total
potential energy, V and total kinetic energy, T are

V mheli glcm sin

(2.4)

2
( J eP m heli l cm
)

K ppVm _ p K pyVm _ y - m heli l cm cos - B p 2


mheli l cm

sin cos

(2.10)

2
( J eY mheli lcm
cos 2 )
2
K yyVm _ y K ypVm _ p - B y 2mheli lcm
sin cos

(2.11)
These equations are linearized about zero and the linear
state-space model (A, B, C, D) describing the voltageto-angular joint position dynamics of the system is found. The
general states-space representation is written as in (2.12). The
state vector and output vector for the 2-DOF helicopter is
defined in (2.13) and (2.14) where and are the pitch and
yaw angles respectively.

d
x Ax Bu ;
dt

d
y Cy Du ;
dt

(2.12)

Open Journal of Artificial Intelligence (2014) 1-6

d
d

x T , ,
dt dt

(2.13)

y T ,

(2.14)

3. Controller Design
3.1. PID Controller
Two PID controllers were used to control each of pitch and
yaw angles. The use of separate controllers for each angle
helps in decoupling the effects of counter moments between
the pitch and yaw [14]. However, the PID design process
faces difficulties due to the fact that there is no clear transfer
function to connect each input with its respective output.
There are many reasons prevent using conventional
tuning methods such as Ziegler-Nichols method. One of the
reasons is that PID controllers deal with linear processes
effectively, but not effective if used for non-linear systems.
In order to use PID for nonlinear process, the process has to
be linearized around an equilibrium point [15]. The
linearized system incorporates a system of non-zero type
transfer function critically stable, making the conventional
tuning methods fail to deliver. Added to the point mentioned
above is that most tuning methods aim at regulatory control
performance and dont give good results for servo control.
The inherited instability of the system contributed to making
most tuning methods not suitable to be used.
The difficulties mentioned above lead us to three options.
Option 1 is using decoupling technique that linearizing the
system equations to make two separated transfer functions
responses to be tuned by two PID controllers. Option 2 is by
using a trial and error technique to get good responses.
Another option is using an intelligent optimization algorithm
such as genetic algorithm.
From the three options above, the first one is time
consuming and incorporate complex analytical calculations.
So it was disregarded as an option in the research. The trial
and error technique option is selected and used because it is
simple and does not require a lot of time, but the results are
not to be considered seriously as there is no optimality
analysis attached to them. These results will be used to give
a general idea about the difference between real time and
simulated systems. Intelligent optimization is to be
considered later to get the best optimization for the PID.
The PID used is of the standard parallel PID form. Using
the following standard PID equation (here we have to tune
K p , K i & K d while their respective time constants values
are included in the overall gain value)

u K p K i e(t )dt K d

de(t )
dt

(3.1)

Where u is the control action, K p is the proportional gain,

K i is the integral gain, K d is the derivative gain and e(t ) is


the error signal
The values of the derivative and integral gains were set to
(0) at the beginning, while the proportional gain value is tune
up. The proportional gain is known to cause increased
overshoot, so it was tune up as small as possible without
affecting the speed of system response but with a steady state
error (increasing the proportional gain would decrease the
steady state error but would not eliminate it). Next, the
integral action was added. The steady state error was brought
to zero but then derivative action was added to the controller
to deal with the overshoot. Finally, fine tuning the values of
the controller gains was done. It is important to note that
during the tuning process, the values of all three gains were
tuned as small as possible in order not to cross the physical
system limits and to avoid frequently saturating the motors
voltages.
The above procedure was done for both pitch controller
and for yaw controller. After extensive tuning using trial and
error method as mentioned above, Table 1 shows the values
for pitch PID controller reached.
Table 1. Gains Value of PID Controller
Parameter

Kp

Ki

Kd

Pitch
Yaw

0.9
1.4

0.2
0.5

0.1
0.3

3.2. Fuzzy Logic Controller (FLC)


Two fuzzy controllers are used. One is used to control the
pitch angle and another one is used to control the yaw angle.
The fuzzy controller has two inputs (error and error
derivative/change in error) and only one output for each of
pitch and yaw angles. This scheme is much easier to design
and maintain than trying to make a four input (pitch error,
pitch error derivative, yaw error and yaw error derivative)
and two output fuzzy system [16].
The input error e(t ) to the fuzzy controller is the
difference between current angleand the previous output
angle, while derivative error e(t ) is the difference between
current error and the previous output error.
(3.2)
e(t ) y(t ) y(t 1)

e(t ) e(t ) e(t 1)

(3.3)

The first input error e(1) to the controller is the angle


different between the current pitch/yaw angle and the desired
reference pitch/yaw angle.
(3.4)
e(1) r (t ) y(t )
The pitch/yaw control is controlled by the pitch/yaw
position which determines the stability of the aircraft. Hence,
controller output is the input control signal, which is the
voltage that enables change in pitch/yaw angle where the

Open Journal of Artificial Intelligence (2014) 1-6

change in angle will be added into current pitch/yaw position


to correct the position so that error is reduced.
The inputs chosen for each fuzzy controller is becoming a
typical choice in fuzzy control. The error and the rate of its
change are used in most practical and theoretical designs of
fuzzy controller [17]. However, the controller action would
depend on the error and its derivative. For that reason the
controller in most cases is considered similar to a
conventional PD controller. Especially that the human
reasoning used for the construction of controllers rule base
in this case is very similar to depicting a PD control action.
So, generally we would expect a very good tracking
performance from a fuzzy controller after tuning. But
whether steady-state performance is good or not remain to be
seen.
Generally, there is no known procedural methodology to
design fuzzy controllers that can be applied commonly [18].
In designing fuzzy controllers, for most cases we have to
tinker with different numbers of membership functions,
membership functions kinds, membership ranges, rule base
variations or even implication and defuzzification rules. That
is all based on trial and error approach. Even the use of
artificial intelligence algorithms such as genetic algorithms
to tune the fuzzy controller parameters is essentially an
arbitrary search in possible values to minimize a cost
function, which is - at its core - a trial and error search done
by a computer.
Consequently, trial and error was used to design our
fuzzy controller. So considering the fuzzy system output as
the process input voltage, first nine rules controllers were
used for both pitch and yaw (denoting a three membership
functions for each of error and change of error in each
controller). But the results were bad and the controllers
responses were changing sharply. So an increase in the
number of membership functions came next with five for
each fuzzy variable. In this fuzzy controller, five fuzzy sets
are used for both pitch and yaw controllers to represent the
values of the input variable and output variable. The fuzzy
sets are NL (Negative Large), NS (Negative Small), ZR
(Zero), PS (Positive Small) and PL (Positive Large). Both
negative and positive differences are necessary to be defined
because it is the difference between the current pitch/yaw
angle and the previous pitch/yaw angle. Showing resulted in
a 25 rule bases for each controller. The system gave a good
tracking to input changes but very large steady-state errors
were recorded, it is about 40 degrees for pitch and 15
degrees for yaw.
Many modifications to the fuzzy systems were applied. It
was possible to reduce the yaw angle error to a low values
but high overshoot was still present, while the pitch angle
response kept a high error values until seven membership
functions were used for error and output that the error was
reduced but with a high overshoot values.
It was clear that the system requires some sort of integral
action or a similar solution. So in the next step an integrator
was added in parallel with the fuzzy controller to add the

error integral to the controller output. The resulted steadystate errors were zero for both pitch and yaw angles but a
very strong oscillation appeared at the output responses. Also
a very large overshoot appeared for the pitch angle response.
Next, the fuzzy system output was considered as the change
in the output voltage, so that integrating it would yield the
process input voltage. That allowed us to insert the integral
action in series with the fuzzy system. For pitch angle, the
results were good. Oscillation was also present but to a less
degree than with the parallel solution. However, yaw
response was oscillating heavily with large amplitudes due to
the system weight components being perpendicular to the
rotational direction of the yaw, unlike the pitch where the
weight gives extra damping to the system.
In order to get rid of the oscillation the following method
was used. Based on the consideration that the fuzzy systems
outputs is the change of voltages required for the motors,
these values were added to a constant voltage values that is
assumed to keep the angles on zero degree outputs. These
constant voltage values were obtained by experimenting with
the simulation model in open loop connection. The target
was to get values that keep the system around a zero angle
outputs for both pitch and yaw at the same time. The
obtained value for pitch motor voltage is around (12.5 v) and
for the yaw motor voltage is (-3.9 v) as shown in Fig. 2.
So the controller outputs represent the required voltage to
keep the angle at zero degree added to the required voltage
change to transform the angle to the new desired input value.
That is similar to the integral action but without the over
reactive affects that drives the response to the set-point value
which results to oscillation. This design will not guarantee a
zero steady-state error, but if the constant voltage values were
chosen carefully the error is very low and can be considered
negligible while the oscillation is vastly reduced

Fig. 2. Block diagram of fuzzy controller subsystem

Open Journal of Artificial Intelligence (2014) 1-6

4. Results and Discussions


The simulated step response of positive and negative values
for the system under PID control is shown in Fig. 3. The
pitch and yaw response under variable pitch inputs is shown
below. The figure shows that the yaw angle is barely affected
by varying the pitch angle. That is a very good decoupling
by the controller. The pitch response in the other hand is
excellent.

the motors is protected from high voltages (which is


reflected in the model) and this high voltage is applied for a
fraction of a second, this sudden changes to the motors
voltages could have an undesired effect when the system will
be applied in real-time.

Fig. 4. Pitch and yaw shows response to step input for yaw
(PID controller)

Fig. 3. Pitch and yaw show response to step input for pitch
(PID controller)
Performance wise, the following values were obtained for
the system; Rising time is (0.5 sec), overshoot is (5.6%) and
settling time is (1.82 sec). Obviously, due to the integral
control the steady-state error is zero. However, even though
we tried to prevent the voltage from reaching saturation
values, it would still reach saturation if the pitch angle is to
be increased. But that would not happen if the pitch angle is
to be decreased. That is primarily due to the pitch motor
being operated at around (12.5 v) while in the marginal
equilibrium operation. That voltage is close to the upper
voltage saturation limit for pitch motor (24 v) but far from
the lower voltage saturation limit (-24 v). It remained to be
seen what are the effects of this operation in real-time. Even
though motors are protected from higher than limit voltages,
the motors could be slow in reacting to the sudden rise and
drop in the voltage values which would incorporate
undesired effects as the motors electro-magnetic reaction is
not considered in modeling the system.
The pitch and yaw response under variable yaw input
with PID control is shown in Fig. 4. The system has an
excellent response regarding both pitch and yaw responses.
The decoupling works so well that the pitch angle is barely
affected by yaw angle change. While the yaw angle
stabilized quickly with the rising time being (0.65 sec), the
overshoot not more than (7.4%) and the settling time merely
(2.58 sec). As with pitch response, the steady-state error is
zero for this case. But yaw voltages always reached voltage
saturation limits when the system reacts to applying a change
to yaw angle set-point. As mentioned earlier, even though

The fuzzy controller gave very good response for the


pitch angle as in Fig. 5.This is a very good performance. It
can be seen that the coupling effect is brought to minimal.
Steady-state error is as low as (0.1 degree) at highest values.
System input tracking is excellent. The response is fast with
settling time at (1.61 sec) and no effective overshoot when
increasing the angle over the zero value, while the response
is over-damped otherwise. In the other hand, despite the
output voltage reaching the saturation value when the angle
of the pitch is increased, the frequency of oscillation in the
output voltage is pretty low. That is very promising for realtime experimentation in the later stages. As that is not
expected to drive the motors coils to a state of hysteresis due
to the rapid voltage changes.

Fig. 5. Pitch and yaw shows response to step input for pitch
(Fuzzy controller)

Open Journal of Artificial Intelligence (2014) 1-6

The fuzzy controlled yaw angle response to varying


desired value is shown in Fig. 6. The coupling effect is
almost removed. That denotes a very good performance
again. As is the case with the pitch angle, the yaw angle
response also didnt yield a zero steady-state error but it is
kept at a very low level (0.28 degree) at most. Settling time
is also great with (3.7 sec) denoting a nice speed to the
response. Overshoot doesnt appear when increasing the
angle due to the system being over damped, and is very
minimal when the angle is decreased. The output voltage
values for yaw motor are similar to that of the pitch motor.
The oscillation frequency is very low and is limited in
amplitude. However, the voltage also reaches saturation limit
but only when the desired angle is reduced.

encourage that next stage of research used a suitable


optimization technique to be applied in the system controller
at real-time.

References
[1]

[2]

[3]

[4]

[5]
[6]

[7]

[8]

[9]

[10]

Fig. 6. Pitch and yaw shows response to step input for yaw
(Fuzzy Controller)

5. Conclusions
It can be concluded from the above simulation results that
the PID controllers worked very well to decouple the
dynamic effects between pitch and yaw angular velocities
while providing a very good performance. However, these
controller need to be tested on the actual system in real-time
to see whether it can be an adequate solution for the system.
Major difficulties are expected from the voltage saturation at
the motors inputs. This is due to the motors electro-magnetic
time response not considered in the system model.
The final modified fuzzy controllers show a very good
performance and it is an indicator that next stage of research
may be a success when the system is applied real-time. It is

[11]

[12]
[13]
[14]

[15]

[16]
[17]
[18]

Lee, S., Ha, C., and Kim, B. S. (2005). Adaptive Nonlinear Control
System Design for Helicopter Robust Command Augmentation,
Aerospace Science and Technology, 9, 241-251.
Franko, S. (2009). LQR-Based Trajectory Control Of Full Envelope,
Autonomous Helicopter, World Congress on Engineering, 1,
351-356, London, UK, July, 2009.
Wahid, N., Rahmat, M. F., and Kamaruzaman, J. (2010). Comparative
Assessment Using LQR and Fuzzy Logic Controller for a Pitch
Control System, European Journal of Scientific Research, Vol.
42(Issue 2), 184-194.
Vishnu, G. N., Dileep, M. V., and George, V. I. (2012). Aircraft Yaw
Control System using LQR and Fuzzy Logic Controller, International
Journal of Computer Applications, 45(9), 25-30.
Chen, T. T., and Li, T. H. S. (2001). Simplex-Type Fuzzy Sliding
-Mode Control, Fuzzy Sets and Systems, 124(2), 249-261.
Amaral and Crisostomo, T. G. B. (2001). Automatic Helicopter
Motion Control Using Fuzzy Logic, IEEE International Conference on
Fuzzy Systems, 2, 860-863, Melbourne, Australia.
Kadmiry, B., and Driankov, D. A. (2004). Fuzzy Flight Controller
Combining Linguistic Model-Based Fuzzy Control, Fuzzy Sets and
Systems, 146(3), 313-347.
Cavalcante, C. M. C., Cardoso, J. J., Guimares, J., and Neves, O.
(1994). Application of Fuzzy Control to Helicopter Navigation,
Brazil-Japan Joint Symposium on Fuzzy Systems, 1, 72-74, Campinas,
So Paulo.
Cavalcante, C. M. C., Cardoso, J. J., Guimares, J., and Neves, O.
(1995). Design and Tuning of a Helicopter Fuzzy Controller, IEEE
International Conference on Fuzzy Systems, 3, 1549-1554, Yokohama,
Japan, March.
Mullhaupt, Ph., Srinivasan, B., Levine, J., Bonvin, D. (1997). A toy
more difficult to control than the real thing, European Control
Conference, p. 6.
Rahideh, A., Bajodah, A.H., Shaheed, M. H. (2012). Real time adaptive
nonlinear model inversion control of a twin rotor MIMO system using
neural networks, Engineering Applications of Artificial Intelligence,
25(6), 2012.
Dynamic Equation for the 2 DOF Helicopter. Maple Modeling
Worksheet. Qunser Inc., February 2006.
Quanser 2-DOF Helicopter. User and Control Manual, Qunser Inc.,
February 2006.
Vu, T. N. L., Lee, M. Y. (2010). Independent design of multi-loop
PI/PID controllers for interacting multivariable processes, Journal of
Process Control, 20(8).
Prashant, M., El-Farra, N. H., Panagiotis, D., Christofides, A. (2005).
Method for PID Controller Tuning Using Nonlinear Control
Techniques, AIChE J., 51(12).
Jan, J. (2007). Foundations of Fuzzy Control, John Wiley & Sons, Inc.
Kevin, M. P., Stephen, Y. (1997). Fuzzy Control, Addison Wesley
Publishing Company.
Jlna, G. (1997). Neuro-fuzzy Controllers: Design and Application,
PPUR presses polytechniques.

You might also like