Anda di halaman 1dari 5

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882

Volume 3 Issue 1, April 2014

Design & Implementation of Mamdani Fuzzy Inference System on an


Automatic Train Braking System
1, 2

Rosalin Sahu1, Dr.Laxman Sahoo2


School of Computer Engineering, KIIT University, Bhubaneswar, Odisha, India

ABSTRACT
The growth in number of fuzzy logic applications led to
the need of finding efficient ways to implement them. In
this paper, the implementation of a Mamdani Fuzzy
Inference System has been demonstrated with the
application of an automatic train braking system. Here
we are designing the fuzzy logic controller using fuzzy
logic tool box in mat lab software. The main function of
the fuzzy logic controller used here is to automatically
stop the train in each station without any manual
procedure of stopping the train. The Mamdani FIS is
designed with two inputs, one output and 16 rules. Two
inputs to the fuzzy logic controller are speed and
distance & output is the braking power. Each input
function is defined with four triangular & trapezoidal
membership functions and centroid defuzzification
method is used. The fuzzy controller takes the decision
with reference to the speed and distance of the train.
Keywords: Defuzzification, Fuzzification, Fuzzy logic
Controller, Mamdani Fuzzy Inference System

1. INTRODUCTION
The concept of fuzzy logic was introduced by Lotfi
Zadeh. A fuzzy logic model can be represented by a
black box diagram shown below in Figure 1.

Innovative approaches of fuzzy logic controllers(FLC)


helps technology to redefine its implementations in
different areas. Now adays Microprocessors and
Microcontrollers are widely used for different
applications of Fuzzy Inference Systems like induction
motors, washing machine etc. Its wide implementation
also includes digital signal processing & VLSI
designing. Technology advancement always wishes to
reduce the human effort and automate the system as far
as possible. In railways also to make it an effective
automatic system we can use advanced control
equipments. Although the automatic braking system is
very complex but it can be made easier and flexible by
using FLC. The destined output is connected to FLC in
order to get dynamic output. Here in our application, the
input in chosen as speed and distance, so that we can get
the braking power as output in order to stop the train at
its destined station. Here we have framed 4*4(16 rules)
for FLC. In our approach we have considered triangular
and trapezoidal member functions. Thus the result we get
that the train would stop smoothly at its station when
distance becomes zero.
The rest of the paper is organised as follows: Section II
describes the design of FLC, Section III focuses on
design of mamdani fuzzy inference system and its
implementation, Section IV presents the conclusion.

2. BACKGROUND
The design starts with the selection of number of
stations where the train should stop. The distance
between the stations is calculated. The fuzzy logic
controller for braking system in train gets activated about
500m from the station. The controller gets its input as
speed and distance instantaneously. The numerical
values are converted into fuzzy sets by fuzzification
technique.

Fig. 1 Black Box Model


The input and output variables are represented as fuzzy
sets. These fuzzy sets can have unsharp and overlapping
boundaries. The fuzzy Inference Engine consists of three
steps:
Fuzzification
Rule Evaluation
Defuzzification

2.1 Design of Fuzzy Logic Controller


Here we have considered a Mamdani fuzzy inference
system in which the a fuzzy logic controller needs
control elements and parameters such as scaling factor
for input/output signals, a set of rule base, fuzzification
and defuzzification methods and operations for the fuzzy
reasoning. It includes an implication operation, a
compositional operation of antecedents and consequents.

www.ijsret.org

96

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

The performance of the fuzzy logic controller mainly


relies on the configuration of these factors. The
functional block diagram is shown in the figure2.

the design and configuration of the fuzzy controller.


However, unsuitable SF's for the input/output signals can
worsen transient and steady state response, while the
scopes of input/output signals, as the scaling factors, are
safe but conservative.
2.5 Fuzzy Rule Base
The fuzzy rule base assemblies plant information and
apply the human control expertise to the given problem.
The rule evaluator module is the second stage of the
fuzzy logic model. Based on the inputs, the decision of
which output is to be chosen is decided here. For a twoinput-one-output fuzzy controller, the form of rules can
be showed as in Table I below where the inputs are
speed and distance to cover according to which the
output braking power will be applied to train in order to
stop it.

Fig.2 Functional Block Diagram of FLC


2.2 Fuzzification
Fuzzification is the process of making a crisp quantity to
fuzzy. We do this by simply resigning that many of the
quantities that we consider to be crisp and deterministic
are actually not deterministic at all. They carry
considerable uncertainty. If the form of uncertainty
happens to arise because of imprecision, ambiguity or
vagueness, then the variable is probably fuzzy and can be
represented by a membership function. A fuzzification
process the function that it converts crisp data into fuzzy
sets. The fuzzification converts the input data into
suitable linguistic values, which may be viewed as labels
of fuzzy sets.
2.3 Membership Function
Fuzzy variables are defined by membership function and
characterized by shapes, position and width or whole
overlap. The number of fuzzy variables that linguistic
variable can take is known as fuzzy partition and
determines the control obtainable from fuzzy logic
control. A trial and error based on operators experience
and engineering knowledge is extensively employed in
the choice of membership function. The fuzzification
should cover the entire universe of discourse and there
exists a fuzzy number to represent the fuzzy variable
"around zero". As for a certain shape of a membership
function, narrower membership functions, despite
superiority in faster response and lower steady state
error, may incur larger oscillation. Thus the triangular
membership functions are successfully applied in the
speed control.
2.4 Scaling Factor
The scaling factors are used to normalize the different
range of input/output signals into the universe of
discourse [ -1 , 1 ] and thus can generalize and facilitate

Table I Rule Base for Train


2.6 Inference Engine
The decision making logic or inference engine has the
capability of simulating human reasoning based fuzzy
concepts and of inferring with fuzzy actions by
employing the rules of inference. Fuzzy inference is the
process of formulating the mapping from a given input to
an output using fuzzy logic. The mapping then provides a
basis from which decisions can be made, or patterns
discerned. There are various types of fuzzy inference
systems that can be implemented. Based on the fuzzy
inference systems, fuzzy decision table has been formed
through which the output of the fuzzy logic controllers
determined.
2.7 Defuzzification
The process of converting the fuzzy results into crisp
results is called as defuzzification. The defuzzification
has the result of reducing a fuzzy set to a crisp single
valued quantity or to crisp set. The third step in building
a fuzzy logic calculation is tuning the fuzzy variables
generated by the fuzzy logic rules into a real output
again. This process is called defuzzification. It combines
the fuzzy variables to give a corresponding real [crispy]
output, which can then be used to make the final decision
by centroid method.

www.ijsret.org

97

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

3. DESIGN PROCEDURE
For the train braking system, consider this example
For Speed = 70 kmph, distance=200m, the fuzzy set is,
Speed
{very fast, 1}
Distance
{far, 0.8}
After the fuzzification the corresponding rules are fired.
Here, for the above example, the following rule is fired.
If distance is (FAR) and speed is (VERY FAST) then
braking power is (HEAVY). Then the fuzzy sets are
converted into numerical values by the defuzzification
technique. This numerical value which is the output of
the fuzzy logic controller is used to Control the braking
system of the train.
3.1 FIS Editor
The mamdani fuzzy inference system in fuzzy logic tool
box gives a FIS editor. Figure 3 shows the fuzzy
inference system editor. This is the graphical user
interface of the fuzzy logic tool box. In general it is
much easier to build a system graphically. The FIS editor
acts as a top level module for the system. The number of
input and output variables, their names can be entered
here. The implication and defuzzification methods can
also be adjusted here.

Fig.4 Member function of Input Distance

Fig.5 Member function of Input Speed

Fig.3 Mamdani Fuzzy Model


3.2 Membership functions:
Here both triangular and trapezoidal membership
functions have been used to describe the membership
functions of inputs and output. The membership
functions are shown below in fig.4, 5 & fig.6.
Here distance has member functions as { very_close,
close, far, very_far}. Likewise the input speed has
member fucntions as { very_slow, slow, fast, very_fast }.
Similarly the output Braking power has member
functions as {very_light, light, heavy, very_heavy }.

Fig.6 Member function of Output Braking power

www.ijsret.org

98

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

3.3 Rules Formation


The rules for this automatic train braking system can be
formed as shown in fig. 7.

3.4 Crisp Input & Crisp Output:


The crisp output is a three dimensional surface plot of
our design. In this plot X and Y axis are inputs and Z
axis is output. Once the design is completed this 3D plot
is automatically generated in fuzzy logic toolbox.
Generally the formula used for crisp action given by the
fuzzy logic controller is crisp output =

For this train braking system the crisp output =

Thus the output of such system can be viewed on a 3-D


surface viewer below in fig. 9.
As we have taken the example for speed= 70kmph and
distance= 200m, we can calculate the output braking
power(or % braking) by the following commands in
matlab.
Fig.7 Rule Base
Here there are 16 rules described as in table I in
section II . For example:
Rule 1: If distance is (VERY-CLOSE) and speed is
(VERY SLOW) then braking is (LIGHT).
Rule 2: If distance is (VERY_CLOSE) and speed
is (SLOW) then braking is (HEAVY).
Rule 3: If distance is (VERY_CLOSE) and speed
is (FAST) then braking is (VERY_HEAVY).
Similarly all 16 rules are defined in the above rule base.
The rules can also be modified or deleted easily here.
Also we can add more member functions if our
implementation needs. The relation between input and
output variables according to the defined rules is
checked using the rule viewer as shown in fig. 8.

fis=readfis('train');
out=evalfis([200 70],fis)
>> out= 43.5182

Fig.9 Output Surface Viewer

4. CONCLUSION

Fig.8 Rule Viewer

In this paper we have successfully demonstrated the


implementation of the fuzzy logic based automatic train
braking system. MATLAB was used to form the fuzzy
Train Braking Model with Speed and Distance as the two
inputs and the Braking Power as the output. The use of
fuzzy logic controller thus gives a smooth braking
system. Thus the rule base defined in the paper can be
utilized for proper controlling of the break. This braking
system has a very wide future scope because of its
flexibility in terms of technologies utilized.
The
accuracy of the system obtained for braking System in
www.ijsret.org

99

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

subway trains will be much higher by the use of fuzzy


logic controller.

ACKNOWLEDGMENT
I would like to express my heartiest obedience and
obligations to my guide Dr. Laxman Sahoo Professor
head of Department School of Computer Engineering for
his valuable guidance, motivation and support at the
commencement of the research work. I am deeply
grateful to my family, friends & especially my husband
for their continuous support during my documents
preparation.
References
[1] J. Yen, R. Langari, Fuzzy Logic: Intelligence,
Control, and Information , Pearson Education,
1999.
[2] S.Uppalapati, D.Kaur, "Design and Implementation
of a Mamdani Fuzzy Inference System on a FPGA",
28th North American Fuzzy Information Processing
Society Annual Conference, 2009.
[3] M.Venkatachalam, Dr. S.Thangvel, "Fuzzy Logic
Based Performance Improvement of Induction
motor", IEEE transaction on fuzzy logic, 2010.
[4] L.Ciabattoni,
M.Grisostomi, G.Ippoliti, and
S.Longhi, "A Fuzzy Logic tool for Household
Electrical consumption modeling", IEEE transaction
on fuzzy logic, pp-8022-8027.
[5] John Yen, Reza Langari "Fuzzy Logic Intelligence
Control and Information" Published by Pearson
Education Pt Limited.
[6] D. Driankov, H. Hellendoorn, M. Reinfrank, An
Introduction to fuzzy control , Springer, 1996.

Author Profile

Rosalin Sahu is a student of M.Tech


in Computer Science and Information Security, KIIT
University, Bhubaneswar, Odisha, INDIA. She was involved in
Java application based project Odisha Online Travel-Portal
System during her B.Tech. Her research area includes Database
systems, Fuzzy Object Databases. Contact deatails:
+91-9178034501.

Dr. Laxman Sahoo received


his Ph.D in 1987 from IIT, Kharagpur. Presently, he is a
professor and head of Database Engg. Group at KIIT
University,
Odisha.
He
has
served
as
Director/Coordinator/Head of Department in BITS Pilani,
BITS Ranchi and Lucknow Indian Engg. College. He has
guided over 400 Master Degree students. He is associated with
with many professional bodies as a member/chair person of
technical committee and conference. He has published and
presented many Research papers in national and international
Journals. He is also author of a good number of computer
related books. His research area includes VLSI design, DBMS,
AI and Fuzzy Expert Systems. Contact details:
+91-9692259550.

www.ijsret.org

100

Anda mungkin juga menyukai