You are on page 1of 107

Fuzzy logic

UNIT VI:Classical & Fuzzy Sets: Introduction to classical sets - properties,


Operations and relations; Fuzzy sets, Membership, Uncertainty, Operations,
properties, fuzzy relations, cardinalities, membership functions.
UNIT VII:Fuzzy Logic System Components: Fuzzification, Membership value
assignment,

development

of

rule

base

and

decision

making

system,

Defuzzification to crisp sets, Defuzzification methods.


UNIT VIII:Applications: Neural network applications: Process identification,
control, fault diagnosis and load forecasting.Fuzzy logic applications: Fuzzy
logic control and Fuzzy classification.
UNIT-VI

UNIT-VII

Classical & Fuzzy Sets:

Fuzzy Logic System Components:

Introduction to classical sets:

Fuzzification :

Properties:

Membership value assignment:

Operations:

Rule base system:

Relations:

decision making system:

Introduction to Fuzzy sets:

Defuzzification methods:

Properties:

UNIT VIII

Operations:

Applications:

Relations:

Neural network applications:

Cardinalities:

Process identification:

Membership Functions:

Control:
fault diagnosis:
load forecasting:
Fuzzy logic applications:

Fuzzy logic control:


Fuzzy classification:

Introduction:
Description of Fuzzy Logic
In recent years, the number and variety of applications of fuzzy logic have
increased significantly. The applications range from consumer products such
as cameras, camcorders, washing machines, and microwave ovens to industrial
process control, medical instrumentation, decision-support systems, and
portfolio selection.

Why Use Fuzzy Logic?


Here is a list of general observations about fuzzy logic:
Fuzzy logic is conceptually easy to understand. The mathematical concepts
behind fuzzy reasoning are very simple. Fuzzy logic is a more intuitive
approach without the far-reaching complexity. Fuzzy logic is flexible. With any
given system, it is easy to layer on more functionality without starting again
from scratch. Fuzzy logic is tolerant of imprecise data. Everything is imprecise
if you look closely enough, but more than that, most things are imprecise even
on careful inspection. Fuzzy reasoning builds this understanding into the
process rather than tacking it onto the end. Fuzzy logic can model nonlinear
functions of arbitrary complexity. You can create a fuzzy system to match any
set of input-output data. This process is made particularly easy by adaptive
techniques like Adaptive Neuro-Fuzzy Inference Systems (ANFIS), which are
available in Fuzzy Logic Toolbox software. Fuzzy logic can be built on top of the
experience of experts. In direct contrast to neural networks, which take
training data and generate opaque, impenetrable models; fuzzy logic lets you
rely on the experience of people who already understand your system. Fuzzy
logic can be blended with conventional control techniques. Fuzzy systems don't
necessarily replace conventional control methods. In many cases fuzzy systems
augment them and simplify their implementation. Fuzzy logic is based on
natural language. The basis for fuzzy logic is the basis for human
communication. This observation underpins many of the other statements
about fuzzy logic. Because fuzzy logic is built on the structures of qualitative
description used in everyday language, fuzzy logic is easy to use. The last
statement is perhaps the most important one and deserves more discussion.
Natural language, which is used by ordinary people on a daily basis, has been
shaped by thousands of years of human history to be convenient and efficient.
Sentences written in ordinary language represent a triumph of efficient
communication.

When Not to Use Fuzzy Logic


Fuzzy logic is not a cure-all. When should you not use fuzzy logic? The safest
statement is the first one made in this introduction: fuzzy logic is a convenient
way to map an input space to an output space. If you find it's not convenient,
try something else. If a simpler solution already exists, use it. Fuzzy logic is the
codification of common sense use common sense when you implement it and
you will probably make the right decision. Many controllers, for example, do a
fine job without using fuzzy logic. However, if you take the time to become
familiar with fuzzy logic, you'll see it can be a very powerful tool for dealing
quickly and efficiently with imprecision and nonlinearity. To understand why
use of fuzzy logic has grown, you must first understand what is meant by fuzzy
logic. Fuzzy logic has two different meanings. In a narrow sense, fuzzy logic is a
logical system, which is an extension of multi valued logic. However, in a wider
sense fuzzy logic (FL) is almost synonymous with the theory of fuzzy sets, a
theory which relates to classes of objects with un sharp boundaries in which
membership is a matter of degree. In this perspective, fuzzy logic in its narrow
sense is a branch of FL. Even in its more narrow definition, fuzzy logic differs
both in concept and substance from traditional multi valued logical systems.In
Fuzzy Logic Toolbox software, fuzzy logic should be interpreted as FL, that is,
fuzzy logic in its wide sense. The basic ideas underlying FL are explained very
clearly and insightfully in the Introduction. What might be added is that the
basic concept underlying FL is that of a linguistic variable, that is, a variable
whose values are words rather than numbers. In effect, much of FL may be
viewed as a methodology for computing with words rather than numbers.
Although words are inherently less precise than numbers, their use is closer to

human intuition. Furthermore, computing with words exploits the tolerance for
imprecision and thereby lowers the cost of solution.Another basic concept in
FL, which plays a central role in most of its applications, is that of a fuzzy ifthen rule or, simply, fuzzy rule. Although rule-based systems have a long
history of use in AI, what is missing in such systems is a mechanism for
dealing with fuzzy consequents and fuzzy antecedents. In fuzzy logic, this
mechanisms provided by the calculus of fuzzy rules. The calculus of fuzzy rules
serves as a basis for what might be called the Fuzzy Dependency and
Command Language (FDCL). Although FDCL is not used explicitly in the
toolbox, it is effectively one of its principal constituents. In most of the
applications of fuzzy logic, a fuzzy logic solution is, in reality, a translation of a
human solution into FDCL.A trend that is growing in visibility relates to the
use of fuzzy logic in combination with neurocomputing and genetic algorithms.
More generally, fuzzy logic, neurocomputing, and genetic algorithms may be
viewed as the principal constituents of what might be called soft computing.
Unlike the traditional, hard computing, soft computing accommodates the
imprecision of the real world. The guiding principle of soft computing is: Exploit
the tolerance for imprecision, uncertainty, and partial truth to achieve
tractability, robustness, and low solution cost. In the future, soft computing
could play an increasingly important role in the conception and design of
systems whose MIQ (Machine IQ) is much higher than that of systems designed
by conventional methods.Among various combinations of methodologies in soft
computing, the one that has highest visibility at this juncture is that of fuzzy
logic and neurocomputing, leading to neuro-fuzzy systems. Within fuzzy logic,
such systems play a particularly important role in the induction of rules from
observations. An effective method developed by Dr. Roger Jang for this purpose
is called ANFIS (Adaptive Neuro-Fuzzy Inference System). This method is an
important component of the toolbox.Fuzzy logic is all about the relative
importance of precision: How important is it to be exactly right when a rough
answer will do?In this sense, fuzzy logic is both old and new because, although
the modern and methodical science of fuzzy logic is still young, the concepts of
fuzzy logic relies on age-old skills of human reasoning.

Classical & Fuzzy Sets:

Membership Functions:
A membership function (MF) is a curve that defines how each point in the input
space is mapped to a membership value (or degree of membership) between 0
and 1. The input space is sometimes referred to as the universe of discourse, a
fancy name for a simple concept.One of the most commonly used examples of a
fuzzy set is the set of tall people. In this case, the universe of discourse is all
potential heights, say from 3 feet to 9 feet, and the word tall would correspond
to a curve that defines the degree to which any person is tall. If the set of tall
people is given the well-defined (crisp) boundary of a classical set, you might
say all people taller than 6 feet are officially considered tall. However, such a
distinction is clearly absurd. It may make sense to consider the set of all real
numbers greater than 6 because numbers belong on an abstract plane, but
when we want to talk about real people, it is unreasonable to call one person
short and another one tall when they differ in height by the width of a hair.If
the kind of distinction shown previously is unworkable, then what is the right
way to define the set of tall people? Much as with the plot of weekend days, the
figure following shows a smoothly varying curve that passes from not-tall to

tall. The output-axis is a number known as the membership value between 0


and 1. The curve is known as a membership function and is often given the
designation of . This curve defines the transition from not tall to tall. Both
people are tall to some degree, but one is significantly less tall than the
other.Subjective interpretations and appropriate units are built right into fuzzy
sets. If you say "She's tall," the membership function tall should already take
into account whether you are referring to a six-year-old or a grown woman.
Similarly, the units are included in the curve. Certainly it makes no sense to
say "Is she tall in inches or in meters?"The only condition a membership
function must really satisfy is that it must vary between 0 and 1. The function
itself can be an arbitrary curve whose shape we can define as a function that
suits us from the point of view of simplicity, convenience, speed, and efficiency.
A classical set might be expressed as
A = {x | x > 6}
A fuzzy set is an extension of a classical set. If X is the universe of discourse
and its elements are denoted by x, then a fuzzy set A in X is defined as a set of
ordered pairs.
A = {x, A(x) | x ? X} A(x) is called the membership function (or MF) of x in A.
The membership function maps each element of X to a membership value
between 0 and 1.Polynomial based curves account for several of the
membership functions in the toolbox. Three related membership functions are
the Z, S, and Pi curves, all named because of their shape. The function zmf is
the asymmetrical polynomial curve open to the left, smf is the mirror-image
function that opens to the right, and pimf is zero on both extremes with a rise
in the middle.There is a very wide selection to choose from when you're
selecting a membership function. You can also create your own membership
functions with the toolbox. However, if a list based on expanded membership
functions seems too complicated, just remember that you could probably get
along very well with just one or two types of membership functions, for example
the triangle and trapezoid functions. The selection is wide for those who want
to explore the possibilities, but expansive membership functions are not
necessary for good fuzzy inference systems. Finally, remember that more details
are available on all these functions in the reference section. Summary of

Membership Functions Fuzzy sets describe vague concepts (e.g., fast runner,
hot weather, weekend days).A fuzzy set admits the possibility of partial
membership in it. (e.g., Friday is sort of a weekend day, the weather is rather
hot).The degree an object belongs to a fuzzy set is denoted by a membership
value between 0 and 1. (e.g., Friday is a weekend day to the degree 0.8).A
membership function associated with a given fuzzy set maps an input value to
its appropriate membership value.

MEMBERSHIP FUNCTIONS
Definition: a membership function for a fuzzy set A on the universe of discourse
X is defined as A:X [0,1], where each element of X is mapped to a value
between 0 and 1. This value, called membership value or degree of
membership, quantifies the grade of membership of the element in X to the
fuzzy set A. Membership functions allow us to graphically represent a fuzzy set.
The x axis represents the universe of discourse, whereas the y axis represents
the degrees of membership in the [0,1] interval. Simple functions are used to
build membership functions. Because we are defining fuzzy concepts, using
more complex functions does not add more precision. Below is a list of the
membership functions we will use in the practical section of this tutorial.
Triangular function: defined by a lower limit a, an upper limit b, and a value m,
where a < m < b.

Trapezoidal function: defined by a lower limit a, an upper limit d, a lower


support limit b, and an upper support limit c, where a < b < c < d.

There are two special cases of a trapezoidal function, which are called Rfunctions and L-functions:

R-functions: with parameters a = b = -

L-Functions: with parameters c = d = +

Gaussian function: defined by a central value m and a standard deviation k >


0. The smaller k is, the narrower the bell is.

UNIT-VII

Fuzzy Logic System Components:


Fuzzification :
Membership value assignment:
Rule base system:
decision making system:
Defuzzification methods:

`Fuzzification Methods
1. Discrete case (numerical)

(X )
I

( Ai )
xi

Quantization and Primary Fuzzy Sets Using a Numerical Definition

Level NO.
-6

Range

Xn-3.2

NB NM NS ZE PS PM PB
1.0 0.3 0.0 0.0 0.0 0.0 0.0

-5

-3.2Xn-1.6

0.7 0.7 0.0 0.0 0.0 0.0 0.0

-4

-1.6Xn-0.8

0.3 1.0 0.3 0.0 0.0 0.0 0.0

-3

-0.8Xn-0.4

0.0 0.7 0.7 0.0 0.0 0.0 0.0

-2

-0.4Xn-0.2

0.0 0.3 1.0 0.3 0.0 0.0 0.0

-1

-0.2Xn-0.1

0.0 0.0 0.7 0.7 0.0 0.0 0.0

-0.1Xn+0.1

0.0 0.0 0.3 1.0 0.3 0.0 0.0

+0.1Xn+0.2

0.0 0.0 0.0 0.7 0.7 0.0 0.0

+0.2Xn+0.4

0.0 0.0 0.0 0.3 1.0 0.3 0.0

+0.4Xn+0.8

0.0 0.0 0.0 0.0 0.7 0.7 0.0

+0.8Xn+1.6

0.0 0.0 0.0 0.0 0.3 1.0 0.3

+1.6Xn+3.2

0.0 0.0 0.0 0.0 0.0 0.7 0.7

3.2Xn

0.0 0.0 0.0 0.0 0.0 0.3 1.0

Fuzzification Methods
2. Continuous case (functional)

NB

NM

ZE
g(x)
NS

PM
PS

PB

Triangle membership function.


x

g(x)

Trapezoidal membership function.


x

(x)

Guassian membership function.

( x) e

x c 2
)

(x)

Generalized bell membership function.


1

( x)
1

xc
a

2b

Partition Style for Fuzzy Models


1. Gird partition
Need only small number of membership function for each input.
Can be used when involves only several state variables as inputs.

Curse of dimensionality.

2. Tree partition
Each region can be uniquely specified along a corresponding decision
tree.
Exponentially increase in the number of rules.
More membership function for each input are needed.

3. Scatter partition
By covering a subset of the whole input space that characterizes a region
of possible occurrence of the input vectors.
Limit the number of rules to a reasonable amounts.

Source of Fuzzy Control rules


1. Expert experience and control engineering knowledge.
Experience of skilled operators and knowledge of control engineers is
expressed qualitatively in words.
Fuzzy partitions of the input space must be determined through
interviews with operations and by using the instincts of control engineers.
2. Base on operations control action.
The operation of complicated process is not always easy to put their
know-how into logical form.
Experts may not be able to express their works in words. Even if they can,
there are instances when their words express things incompletely.
An effective design method in this type of case is a model of the functions
carried out by the operators.
Source of Fuzzy Control rules
3. Base on fuzzy model of a process.
When the object is a process without experts or human operators.
A better methods is based on a fuzzy model of the process for the design
of a controller aimed at the high quality control.
4. Base on learning
Has ability to create fuzzy control rules and modify them based on
experience.
Self organizing controller.

Fuzzy If-Then Rules


If x is A and y is B then z is C.

Antecedent

Consequent

(premise)

(conclusion)

R [ A B] C

R [ A ( x) B ( y )] c ( z )

Change of Error

Error
NB
PS
PM
PM
PB
PB
PB

PB
PM
PS
PO
NO
NS
NM
NB

NM
PS
PM
PM
PB
PB
PB

NS

PS

PM

PB

NM
NM
NO
PS
PS
PM
PB
PB

NB
NB
NB
NO
NO
PM
PB
PB

NB
NB
NB
NS
NS
NO
PM
PM

NB
NB
NB
MN
MN
NS
-

NB
NB
NB
MN
MN
NS
-

where all the entries of the matrix are fuzzy sets of error, change of error, and
control. The abbreviations used above mean:
PB : Positive Big
PM : Positive Medium
PS : Positive Small
PO : Positive Zero
NO : Positive Zero
NS : Negative Small
NM : Negative Medium
NB : Negative Big

Review of Fuzzy Reasoning


Reasoning:
A
B
Premise 1 x is and y is
A1
B1
Premise 2 x is and y is ,then z is
A2

B2

C1

Premise 3

x is and y is ,then z is

C2

Conclusion

z is

C ( A B) [( A1 B1 ) C1 ] [( A2 B2 ) C2 ]
( A B) [( A1 B1 ) C1 ] ( A B) [( A2 B2 ) C2 ]
C1 C2

Inference Mechanisms
1. Mamdani fuzzy inference model.
2. Larsen fuzzy inference model.
3. Tsukamoto fuzzy inference model.
4. Sugeno fuzzy inference model.

Mamdani Fuzzy Inference Model


Reasoning max-min operation.

ci ( z ) i ci ( z )

i Ai ( x) Bi ( y )

c ( z ) c1 c2
[1 c1 ( z )] [ 2 c2 ( z )]

C1

Larsen Fuzzy Inference Model


Reasoning max-product operation.

ci ( z ) i ci ( z )

i Ai ( x) Bi ( y )

c ( z ) c c
1

[1 c1 ( z )] [ 2 c2 ( z )]

min or
product

A1

B1

C1

Tsukamoto Fuzzy Inference Model


Monotonical membership function
Bi not required, but
( Aiand are
x

is) Ci y

i Ci ( z i )

A2
Z

B2

C2

1 z1 2 z 2
1 2

z1

z2

weighted average

z z
z

1

Sugeno Fuzzy Inference Model


Reasoning:
: If x is and y is , then z = (x, y) f1
: If x is and
A1 y is , then
B1 z = (x, y) f 2
A2
f i(x, y) is polynomial
function
B2
fi =
Zero-order polynomial function : (x, y)

ri
f
First-order polynomial function : (x, y)
i = p ix + qiy + ri

Z0

1 f1 ( x0 , y0 ) 2 f 2 ( x0 , y0 )
1 2

Note : zero-order polynomial function can be viewed either as a special case of


Mamdani model in which each rules consequent is specified by a fuzzy
singleton or a special case od Tsukamoto model, in which each rules
consequent is specified by an membership function of a step function crossing

at the constant.
Defuzzification Methods
1. Max criterion Method
Largest of Maximum.
Smallest of Maximum.
2.Mean of Maximum method (MOM).
n

Z MOM
i 1

Zi = support value at which


n = number of such zi.

zi
n

zi maximum value.
reaches

3. Center of Area method (COA).


Z COA

Z
Z

( z )zdz

( z )zd

or

Z COA

i 1

( zi ) zi

i 1

( zi
n = number of quantization levels of output c

Center of Height
C f
k k
fk

Ck : Core
f k : height

f1
C1

f2
C2

f3
C3

Center of the Largest Area

Middle of Max

middle
Examples of Fuzzy Control

Fuzzy car.
FLC hardware systems.
Fuzzy Automatic Train Operation (ATO) systems.
Fuzzy automatic container crane operations
Fuzzy logic chips and fuzzy computers.
Fuzzy washing machine.
Fuzzy vacuum cleaner.
Fuzzy air conditioner.
Fuzzy camcorder.

FUZZY LOGIC FOR "JUST PLAIN FOLKS "


Fuzzy Logic Control System
Building a System to Gain Understanding and Familiarity
The easiest and quickest way to understand fuzzy logic control is to build a
fuzzy logic control system; following is one example:
This is a fuzzy logic speed control example, using the same techniques as used
by Professor Mamdani, that you can build for yourself to get experience with
fuzzy logic control. I recommend you do build some kind of system. I found I
began more and more to understand what fuzzy logic was all about as I tried to
make the system work. The following example system has been reduced in
complexity to make it easier to understand, but the concepts are the same as
those used by Mamdani.
If your application is more demanding than the following example, you add
inputs and "rules"; you do not have to learn new things or change the
approach. In considering this reduced complexity example, it may be observed
that control could have been effected without going through the fuzzy control
exercise we are about to go through. This would be correct, but only because
we are working with a simple system, only one input and no discontinuities or
aberrations requiring patching.
Following is a system diagram, Figure 3, for a "getting acquainted with fuzzy"
project that provides speed control and regulation for a DC motor. The motor
maintains "set point" speed, controlled by a stand-alone converter-controller,
directed by a BASIC fuzzy logic control program in a personal computer.

Parts List
(1) IBM or compatible personal computer equipped to run Microsoft Quick
BASIC. IBM is a registered trademark of IBM Corporation. Microsoft and
Quick BASIC are registered trademarks of Microsoft, Inc.
(2) Controller (see below).
(3) Signal conditioner (transistor amplifier to adjust levels as needed).
(4) Transistor - 2N3053.
(5) DC motor, 1.5 V to 3.0 V, 100 ma., 1100 Rpm to 3300 Rpm, and compatible
generator.
The above speed control system is low cost and suitable for learning at home
where being rigorously, mathematically correct is not required. It is important
to be aware that this speed controller is only an experimental controller to get
familiar with the fuzzy logic concept. It is not what engineers call a rigorous,
technically correct application of fuzzy logic. The difference is in the fact that
this approach does not add triangles to compute center of mass as specified by
Dr. Bart Kosko (Fuzzy Thinking, Chapter 10). Adding triangles can be done,
but is difficult and time consuming, however that is the way a truly
professional application would be designed. There are ICs that do it all and
commercially available fuzzy logic controllers that do everything correctly.

This fuzzy logic controller project was done under pressure of very limited
money available, resulting in an inexpensive approach. What is needed is an
analog to digital converter, which connects to a PC, and a digital to analog
output device from the PC to the transistors and DC motor-generator being
controlled. Often this is all in one plug-in card that goes inside the PC. Plug
in the A to D and D to A converter in the PC and write a program to measure
the input and control the output according to fuzzy logic principles. This
approach can be somewhat expensive and was not used in this case.
For this experiment, the controller was a 40-8 controller manufactured by
Prairie Digital Company. Click on the following Web page to see this controller.
http://www.prairiedigital.com/PDI_Website/PDI_Model40.htm (The author
has no connection at all with Prairie Digital.) The 40-8 controller is external to
the computer, connecting to the PC via a standard RS-232 serial port. The
serial port connects to the 40-8 controller via a serial cable. A BASIC program
is used to communicate with the 40-8 controller.
The Prairie Digital
instruction book has sample programs showing how to do this. Through a
BASIC program, you can read the analog voltage level on one of the 40-8 analog
input lines, then tell the 40-8 to output a pulse-width-modulated signal. By
controlling the pulse width of the 40-8 output, the average value of the output
is the equivalent of varying the level of the output in an analog fashion.
If not constrained by cost, a 12 bit, A to D unit should be used, rather than the
8 bit unit. This would provide improved control. This approach, using the 408 controller, is low cost, in the range of $100 to buy the 40-8. Purchasing the
items Prairie Digital offers to accompany the controller, that is the connector,
cables, software, etc., is recommended. It costs very little extra, but is well
worth it.
With regard to the other hardware, only low cost transistors, resistors,
capacitors, etc., were used for the signal conditioner providing input to the
motor-generator. The DC motor and DC generator were small, low power units
purchased from a surplus catalog. The motor output shaft was connected to
the generator input shaft with a small section of shrink insulation tubing;
cheap, simple and effective. The power supply for everything, including the
40-8, was a 12 Volt DC power supply removed from an old Apple computer.
National Instruments, www.natinst.com, sells a fuzzy logic system where the
fuzzy control action is accomplished by the software. National Instruments
applications engineers recommend one of their several analog/digital in,

digital/analog out converters for your application and provide a mathematically


correct software program to produce fuzzy control action. Their system also
provides attractive screen display color graphics. Needless to say, cost of the
National Instruments system is considerably above the $100 range.
One
would use the National Instruments approach for a large, complex system
where flexibility and changes down the road are involved, such as automating a
processing plant.
Where using a personal computer is not practical because of space and weight
limitations, fuzzy logic control is also available utilizing microchips
manufactured by Motorola. These microchips are suitable for fuzzy control
applications, www.mcu.motsps.com.
One would use this approach if
developing, for example, a fuzzy logic anti-lock braking system (see "Fuzzy
Logic, Revolutionizing Automotive Engineering; Circuit Cellar INK magazine,
November 1997; www.circuitcellar.com).
(Please note, this note added January 1, 2008: A reader sent the following
information. The author has not personally pursued this, but this information
could be very useful. FUDGE is a fuzzy logic development tool for the Motorola
68hc11 microcontroller that enables the user to graphically design a fuzzy
system, run fuzzy logic simulations, and generate C and assembly source code.
FUDGE
can
be
downloaded
from
the
Internet:
http://users.sdsc.edu/~decastro/home/projects/fudge/ Fudge.exe is a visual
program that shows the crisp inputs and outputs as well as the fuzzified inputs
and the fuzzified outputs. You can change the input and observe the output .
KBG11C.EXE is the .asm file for the 68hc11 fuzzy engine. If you open this with
notepad you can actually see the code for the fuzzification process. In FUDGE
click on >Balance.fdg then click on >Evaluate, then click on > Fuzzy Logic
Evaluator. Input and output is displayed graphically and all the input and
output membership functions are shown as well as the rules, all on one screen.
End of note added January 1, 2008.)
The steps in building our system are:
1. Determine the control system input. Examples: The temperature is the
input for your home air conditioner control system. Speed of the car is the
input for your cruise control.
In our case, input is the speed in Rpm of the DC motor, for which we are going
to regulate the speed. See Figure 3 above. Speed error between the speed
measured and the target speed of 2,420 Rpm is determined in the program.

Speed error may be positive or negative. We measure the DC output voltage


from the generator.
This voltage is proportional to speed.
This speedproportional voltage is applied to an analog input channel of our fuzzy logic
controller, where it is measured by the analog to digital converter and the
pesonal computer, including appropriate software.
2. Determine the control system output. For a home air conditioner, the
output is the opening and closing of the switch that turns the fan and
compressor on and off.
For a car's cruise control, the output is the
adjustment of the throttle that causes the car to return to the target speed.
In our case, we have just one control output. This is the voltage connected to
the input of the transistor controlling the motor. See Figure 3.
3. Determine the target set point value, for example 70 degrees F for your
home temperature, or 60 Miles per hour for your car.
In our case, the target set point is 2,420 Rpm.
4. Choose word descriptions for the status of input and output.
For the steam engine project, Professor Mamdani used the following for input:
Positive Big
Positive Medium
Positive Small
Almost No Error
Negative Small
Negative Medium
Negative Big
Our system is much less complicated, so let us select only three conditions for
input:
Input Status Word Descriptions
Too slow
About right
Too fast
And, for output:

Output Action Word Descriptions


Speed up
Not much change needed
Slow down
RULES
Translate the above into plain English rules (called "linguistic" rules by Dr.
Zadeh). These Rules will appear in the BASIC computer program as "If-Then"
statements:
Rule
Rule
Rule

1: If the motor is running too slow, then speed it up.


2: If motor speed is about right, then not much change is needed.
3: If motor speed is to fast, then slow it down.

The next three steps use a charting technique which will lead to a computer
program. The purpose of the computer program is to determine the voltage to
send to the speed controlled motor. One function of the charting technique is
to determine the "degree of membership" (see Ch. 1) of the Too slow, About
right and Too fast triangles, for a given speed. Further, the charting technique
helps make the continuous control feedback loop easier to visualize, program
and fine tune.
5. Associate the above inputs and outputs as causes and effect with a Rules
Chart, as in Figure 4, below. The chart is made with triangles, the use of
which will be explained. Triangles are used, but other shapes, such as bell
curves, could also be used. Triangles work just fine and are easy to work with.
Width of the triangles can vary. Narrow triangles provide tight control when
operating conditions are in their area. Wide triangles provide looser control.
Narrow triangles are usually used in the center, at the set point (the target
speed). For our example, there are three triangles, as can be seen in Figure 4
(three rules, hence three triangles).

6. Figure 4 (above) is derived from the previously discussed Rules and results
in the following regarding voltage to the speed controller:
a. If speed is About right then Not much change needed in voltage to the
speed controller.
b. If speed is Too slow then increase voltage to the speed controller to Speed
up.
c. If speed is Too fast then decrease voltage to the speed controller to Slow
down.

7.
Determine the output, that is the voltage that will be sent from the
controller/signal conditioner/transistor to the speed controlled motor. This
calculation is time consuming when done by hand, as we will do below, but this
calculation takes only thousandths of a second when done by a computer.
Assume something changes in the system causing the speed to increase from
the target speed of 2,420 Rpm to 2,437.4 Rpm, 17.4 Rpm above the 'set point."
Action is needed to "pull" the speed back to 2,420 Rpm. Intuitively we know
we need to reduce the voltage to the motor a little. The "cause" chart and
vertical speed line appear as follows, see Figure 5 below:

The vertical line intersects the About right triangle at .4 and the Too fast
triangle at .3. This is determined by the ratio of sides of congruent triangles
from Plane Geometry:
Intersect point / 1 = 11.6/29 = .4
Intersect point / 1 = 17.4/58 = .3
8. The next step is to draw "effect" (output determining) triangles with their
height "h" determined by the values obtained in Step 7, above. The triangles
to be drawn are determined by the rules in Step 6. Since the vertical 2,437.4
Rpm speed line does not intersect the Too slow triangle, we do not draw the
Speed up triangle. We draw the Not much change and the Slow down triangles
because the vertical speed line intersects the About right and Too fast
triangles. These "effect" triangles will be used to determine controller output,
that is the voltage to send to the speed control transistor.
The result is
affected by the widths we have given the triangles and will be calculated. See

Figure 6, below. The Not much change triangle has a height of .4 and the Slow
down triangle has a height of .3, because these were the intersect points for
their matching "cause" triangles; see Figure 4, above.

The output, as seen in Figure 6 (above), is determined by calculating the point


at which a fulcrum would balance the two triangles, as follows:
The Area of the Not much change triangle is: 1/2 X Base X Height = .5 X .04
X .4 = .008. Area of the Slow down triangle is .5 X .08 X .3 = .012.
Compute the controller output voltage by finding the point on the output
voltage, Vdc, axis where the "weight" (area) of the triangles will balance.
Assume all the weight of the Not much change triangle is at 2.40 Vdc and all
the weight of the Slow down triangle is at 2.36 Vdc. We are looking for the
balance point.
Find the position of the controller output voltage (the balance point) with the
following calculation:
(Eq. 1) .008 X D1 = .012 X D2
(D1 is the fulcrum distance from 2.4 V. D2 is the fulcrum distance from 2.36
V.)
(Eq. 2) D1 + D2 = .04 (from Figure 6)
D1 = .04 - D2

Solving the above by substituting (.04-D2) for D1 in Equation 1 gives D2 = .016


and D1 = .024, therefore the balance point is a voltage of 2.376 Vdc, and this is
the voltage which we have determined should be applied to return speed to the
target value. See Figure 6, above.
Keep in mind that we are only discussing one sample at one instant in time,
with a resulting controller output voltage; the controller is sampling several
times each second with a resulting "correction" output following each sample.
The above system was tested with changing loads on the rotating shaft, and
returned the speed of the motor to within 2 % of the 2,420 Rpm set point in
less than 1.5 seconds. The accuracy with which the set point speed can be
maintained is determined by the resolution of the analog to digital and digital
to analog conversion circuits in the fuzzy logic controller. Typical "low cost"
resolution is "8 bit", 256 increments. Higher cost "12 bit" units provide 4,096
increments.
An Introduction To Fuzzy Control Systems
INTRODUCTION TO FUZZY LOGIC & FUZZY CONTROL
* "Fuzzy logic" has become a common buzzword in machine control. However,
the term itself inspires a certain skepticism, sounding equivalent to "half-baked
logic" or "bogus logic". Some other nomenclature might have been preferable,
but it's too late now, and fuzzy logic is actually very straightforward. Fuzzy logic
is a way of interfacing inherently analog processes, that move through a
continuous range of values, to a digital computer, that likes to see things as
well-defined discrete numeric values.
For example, consider an antilock braking system, directed by a microcontroller
chip. The microcontroller has to make decisions based on brake temperature,
speed, and other variables in the system.
The variable "temperature" in this system can be divided into a range of
"states", such as: "cold", "cool", "moderate", "warm", "hot", "very hot". Defining
the bounds of these states is a bit tricky. An arbitrary threshold might be set to
divide "warm" from "hot", but this would result in a discontinuous change
when the input value passed over that threshold.

The way around this is to make the states "fuzzy", that is, allow them to change
gradually from one state to the next. You could define the input temperature
states using "membership functions" such as the following:

With this scheme, the input variable's state no longer jumps abruptly from one
state to the next. Instead, as the temperature changes, it loses value in one
membership function while gaining value in the next. At any one time, the
"truth value" of the brake temperature will almost always be in some degree
part of two membership functions: 0.6 nominal and 0.4 warm, or 0.7 nominal
and 0.3 cool, and so on.
The input variables in a fuzzy control system are in general mapped into by
sets of membership functions similar to this, known as "fuzzy sets". The
process of converting a crisp input value to a fuzzy value is called
"fuzzification".
A control system may also have various types of switch, or "ON-OFF", inputs
along with its analog inputs, and such switch inputs of course will always have
a truth value equal to either 1 or 0, but the scheme can deal with them as
simplified fuzzy functions that are either one value or another.
Given "mappings" of input variables into membership functions and truth
values, the microcontroller then makes decisions for what action to take based
on a set of "rules", each of the form:
IF brake temperature IS warm AND speed IS not very fast
THEN brake pressure IS slightly decreased.
In this example, the two input variables are "brake temperature" and "speed"
that have values defined as fuzzy sets. The output variable, "brake pressure", is

also defined by a fuzzy set that can have values like "static", "slightly
increased", "slightly decreased", and so on.
This rule by itself is very puzzling since it looks like it could be used without
bothering with fuzzy logic, but remember the decision is based on a set of
rules:

All the rules that apply are invoked, using the membership functions and
truth values obtained from the inputs, to determine the result of the
rule.
This result in turn will be mapped into a membership function and truth
value controlling the output variable.
These results are combined to give a specific ("crisp") answer, the actual
brake pressure, a procedure known as "defuzzification".

This combination of fuzzy operations and rule-based "inference" describes a


"fuzzy expert system".
Traditional control systems are based on mathematical models in which the the
control system is described using one or more differential equations that define
the system response to its inputs. Such systems are often implemented as
"proportional-integral-derivative (PID)" controllers. They are the products of
decades of development and theoretical analysis, and are highly effective.
If PID and other traditional control systems are so well-developed, why bother
with fuzzy control? It has some advantages. In many cases, the mathematical
model of the control process may not exist, or may be too "expensive" in terms
of computer processing power and memory, and a system based on empirical
rules may be more effective.
Furthermore, fuzzy logic is well suited to low-cost implementations based on
cheap sensors, low-resolution analog-to-digital converters, and 4-bit or 8-bit
one-chip microcontroller chips. Such systems can be easily upgraded by adding
new rules to improve performance or add new features. In many cases, fuzzy
control can be used to improve existing traditional controller systems by adding
an extra layer of intelligence to the current control method.

FUZZY CONTROL IN DETAIL


* Fuzzy controllers are very simple conceptually. They consist of an input stage,
a processing stage, and an output stage. The input stage maps sensor or other
inputs, such as switches, thumbwheels, and so on, to the appropriate
membership functions and truth values. The processing stage invokes each
appropriate rule and generates a result for each, then combines the results of
the rules. Finally, the output stage converts the combined result back into a
specific control output value.
The most common shape of membership functions is triangular, although
trapezoids and bell curves are also used, but the shape is generally less
important than the number of curves and their placement. From three to seven
curves are generally appropriate to cover the required range of an input value,
or the "universe of discourse" in fuzzy jargon.
As discussed earlier, the processing stage is based on a collection of logic rules
in the form of IF-THEN statements, where the IF part is called the "antecedent"
and the THEN part is called the "consequent". Typical fuzzy control systems
have dozens of rules.
Consider a rule for a thermostat:
IF (temperature is "cold") THEN (heater is "high")
This rule uses the truth value of the "temperature" input, which is some truth
value of "cold", to generate a result in the fuzzy set for the "heater" output,
which is some value of "high". This result is used with the results of other rules
to finally generate the crisp composite output. Obviously, the greater the truth
value of "cold", the higher the truth value of "high", though this does not
necessarily mean that the output itself will be set to "high", since this is only
one rule among many.
In some cases, the membership functions can be modified by "hedges" that are
equivalent to adjectives. Common hedges include "about", "near", "close to",
"approximately", "very", "slightly", "too", "extremely", and "somewhat". These
operations may have precise definitions, though the definitions can vary
considerably between different implementations. "Very", for one example,
squares membership functions; since the membership values are always less
than 1, this narrows the membership function. "Extremely" cubes the values to

give greater narrowing, while "somewhat" broadens the function by taking the
square root.
In practice, the fuzzy rule sets usually have several antecedents that are
combined using fuzzy operators, such as AND, OR, and NOT, though again the
definitions tend to vary: AND, in one popular definition, simply uses the
minimum weight of all the antecedents, while OR uses the maximum value.
There is also a NOT operator that subtracts a membership function from 1 to
give the "complementary" function.
There are several different ways to define the result of a rule, but one of the
most common and simplest is the "max-min" inference method, in which the
output membership function is given the truth value generated by the premise.
Rules can be solved in parallel in hardware, or sequentially in software. The
results of all the rules that have fired are "defuzzified" to a crisp value by one of
of several methods. There are dozens in theory, each with various advantages
and drawbacks.
The "centroid" method is very popular, in which the "center of mass" of the
result provides the crisp value. Another approach is the "height" method, which
takes the value of the biggest contributor. The centroid method favors the rule
with the output of greatest area, while the height method obviously favors the
rule with the greatest output value.
The example below demonstrates max-min inferencing and centroid
defuzzification for a system with input variables "x", "y", and "z" and an output
variable "n". Note that "mu" is standard fuzzy-logic nomenclature for "truth
value":

Notice how each rule provides a result as a truth value of a particular


membership function for the output variable. In centroid defuzzification the
values are OR'd, that is, the maximum value is used and values are not added,
and the results are then combined using a centroid calculation.
* Fuzzy control system design is based on empirical methods, basically a
methodical approach to trial-and-error. The general process is as follows:

Document the system's operational specifications and inputs and


outputs.
Document the fuzzy sets for the inputs.

Document the rule set.

Determine the defuzzification method.

Run through test suite to validate system, adjust details as required.

Complete document and release to production.

As a general example, consider the design of a fuzzy controller for a steam


turbine. The block diagram of this control system appears as follows:

There are two input variables, temperature and pressure, and a single output
variable, the turbine throttle setting. The turbine's operation can be reversed,
so the throttle setting can be positive or negative. The fuzzy set mappings are
shown below:

The throttle settings are defined as follows:


N3:
N2:
N1:
Z:
P1:
P2:
P3:

Large negative.
Medium negative.
Small negative.
Zero.
Small positive.
Medium positive.
Large positive.

The rule set includes such rules as:

rule 1: IF temperature IS cool AND pressure IS weak,


THEN throttle is P3.
rule 2: IF temperature IS cool AND pressure IS low,
THEN throttle is P2.
rule 3: IF temperature IS cool AND pressure IS ok,
THEN throttle is Z.
rule 4: IF temperature IS cool AND pressure IS strong,
THEN throttle is N2.
In practice, the controller accepts the inputs and maps them into their
membership functions and truth values. These mappings are then fed into the
rules. If the rule specifies an AND relationship between the mappings of the
two input variables, as the examples above do, the minimum of the two is used
as the combined truth value; if an OR is specified, the maximum is used. The
appropriate output state is selected and assigned a membership value at the
truth level of the premise. The truth values are then defuzzified.
For an example, assume the temperature is in the "cool" state, and the
pressure is in the "low" and "ok" states. The pressure values ensure that only
rules 2 and 3 fire. Rule 2 is evaluated as follows:

Rule 3 is evaluated as follows:

The two outputs are then combined:

The output value will adjust the throttle and then the control cycle will begin
again to generate the next value.
BUILDING A FUZZY CONTROLLER
* Consider implementing with a microcontroller chip a simple feedback
controller:

A fuzzy set is defined for the input error variable "e", and the derived change in
error from the previous error input, "delta", as well as the "output", as follows:
LP:
SP:
ZE:
SN:
LN:

large positive
small positive
zero
small negative
large negative

If the error ranges from -1 to +1, with the analog-to-digital converter used
having a resolution of 0.25, then the input variable's fuzzy set (which, in this

case, also applies to the output variable) can be described very simply as a
table, with the error / delta / output values in the top row and the truth
values for each membership function arranged in rows beneath:
_______________________________________________________________________
-1 -0.75 -0.5 -0.25 0
0.25 0.5 0.75 1
_______________________________________________________________________
mu(LP)
0
0
0
0
0
0
0.3 0.7
1
mu(SP)
0
0
0
0
0.3 0.7
1
0.7 0.3
mu(ZE)
0
0
0.3 0.7
1
0.7 0.3
0
0
mu(SN)
0.3 0.7
1
0.7 0.3
0
0
0
0
mu(LN)
1
0.7 0.3
0
0
0
0
0
0
_______________________________________________________________________
This table is a little tricky to interpret. It simply defines each of the elements of
the fuzzy set ("LP" through "LN") in terms of the values ("mu") that they have
relative to the given values in the top row.
It is important to remember that for the error / delta variables, the top row
values are used to generate the mu values, while for the output variable, the
mu values are used to generate the top row values.
Suppose this fuzzy system has the following rule base:
rule
rule
rule
rule

1:
2:
3:
4:

IF
IF
IF
IF

e
e
e
e

=
=
=
=

ZE AND delta = ZE THEN output = ZE


ZE AND delta = SP THEN output = SN
SN AND delta = SN THEN output = LP
LP OR delta = LP THEN output = LN

These rules are typical for control applications in that the antecedents consist
of the logical combination of the error and delta signals, while the consequent
is a control command output.
These rules can also be a little tricky to interpret. For example, what rule 1
says is that if the error value is the ZE fuzzy set element and the delta, or
change from last error, value is the ZE fuzzy set element, then the output is
also the ZE fuzzy set element. What is very tricky is that plugging actual

numeric values into this rule does not give, at least directly, an actual value for
the output setting.
The value for the output setting is defined by rule 1 as "ZE". Looking at the
fuzzy value table shows that "ZE" has its maximum value corresponding to the
value of "0" on the top row of the table, and so this rule always gives an output
setting of 0. Similarly, rule 2 always gives an output setting of "SN" or -0.5, rule
3 always gives an output setting of "LP" or 1, and rule 4 always gives an output
setting of "LN" or -1.
The thing to remember is that the actual output is a combination of the outputs
of these four rules, weighted by the values by the appropriate mu values
provided by the rule calculation, using the centroid calculation:
SUM( I = 1 TO 4 OF ( mu(I) * output(I) ) ) / SUM( I = 1 TO 4 OF mu(I) )
The result of this calculation gives the actual output setting.
* Now, suppose that at a given time we have:
error = 0.25
delta = 0.5
Then the corresponding mu values can be obtained by simply taking them from
the appropriate columns of the fuzzy set table:
_________________________________
error = 0.25 delta = 0.5
_________________________________
mu(LP)
0
0.3
mu(SP)
0.7
1
mu(ZE)
0.7
0.3
mu(SN)
0
0
mu(LN)
0
0
_________________________________
These values can then be plugged into the rules to give output values. Taking
the first rule:

rule 1: IF e = ZE AND delta = ZE THEN output = ZE


The weighting for the output, "mu(1)", is produced with the simple calculation:
mu(1) = MIN( 0.7, 0.3 ) = 0.3
As mentioned above, the output value of this rule is always 1:
output(1) = 0
The other rules give:
rule 2: IF e = ZE AND delta = SP THEN output = SN
mu(2)
= MIN( 0.7, 1 ) = 0.7
output(2) = -0.5
rule 3: IF e = SN AND delta = SN THEN output = LP
mu(3)
= MIN( 0.0, 0.0 ) = 0
output(3) = 1
rule 4: IF e = LP OR delta = LP THEN output = LN
mu(4)
= MAX( 0.0, 0.3 ) = 0.3
output(4) = -1
The centroid computation yields:
mu(1)*output(1) + mu(2)*output(2) + mu(3)*output(3) + mu(3)*output(3)
_____________________________________________________________________
mu(1) + mu(2) + mu(3) + mu(4)

= ( 0.3 * 0 ) + ( 0.7 * -0.5 ) + ( 0 * 1 ) + ( 0.3 * -1 )


_______________________________________________________
0.3 + 0.7 + 0 + 0.3
0 - 0.35 + 0 - 0.3

= __________________
1.3
= -0.65 / 1.3
= -0.5
-- for the final control output. . Of course the hard part is figuring out what
rules actually work correctly in practice.
* If you have problems figuring out the centroid equation, remember that a
centroid is defined by summing all the moments (location times mass) around
the center of gravity and equating the sum to zero. So if X0 is the center of
gravity, Xi is the location of each mass, and Mi is each mass, this gives:
0 = ( X1 - X0 ) * M1 + ( X2 - X0 ) * M2 + ... + ( Xn - X0 ) * Mn
0 = ( X1 * M1 + X2 * M2 + ... + Xn * Mn ) - X0 * ( M1 + M2 + ... + Mn )
X0 * ( M1 + M2 + ... + Mn ) = ( X1 * M1 + X2 * M2 + ... + Xn * Mn )
( X1 * M1 + X2 * M2 + ... + Xn * Mn )
X0 = _____________________________________
( M1 + M2 + ... + Mn )
In our example, the values of mu correspond to the masses, and the values of
X to location of the masses.

"Designing With Fuzzy Logic" by Kevin Self, IEEE SPECTRUM, November


1990, 42:44,105.
"Fuzzy Fundamentals" by Earl Cox, IEEE SPECTRUM, October 1992,
58:61. Notes from this article constitute the core of this tutorial.

"Fuzzy Logic Flowers In Japan" by Daniel G. Schwartz & George J. Klir,


IEEE SPECTRUM, July 1992, 32:35.

"Clear Thinking On Fuzzy Logic" by Lawrence A. Berardinis, MACHINE


DESIGN, 23 April 1992, 46:52.

"Fuzzy Controller
November 1995.

Challenges

8-bit

MCUs",

COMPUTER

DESIGN,

"Dishwasher Cleans Up With Fuzzy Logic", MACHINE DESIGN, 23 March


1995.

"How To Design Fuzzy Logic Controllers", MACHINE DESIGN, 26


November 1992.

"A Case For Fuzzy Logic" by Byron Miller, EMBEDDED SYSTEMS


PROGRAMMING, December 1995, 42:70.

===========================================================
Overview of the artificial neural networks and fuzzy logic applications in
operational hydrological forecasting systems Damage due to flooding has
increase in many countries in the last years, and due to the global climate
change, which is now recognized as a real threat, an increase in the occurrence
of flooding events and especially of flash flooding events is likely to continue
into the future. In those conditions and because building new flood defenses
structures for defending vulnerable areas has serious financial implications,
the timely forecasting of floods is becoming more important for flood defense
and in general for water management purposes. The complexity of natural
systems and of hydrological processes that influence river levels evolutions
make the traditional modeling approaches, based on mirroring natural
processes with physically based equations very difficult. Despite the fact that
in the last decades the Operational Hydrological Forecasting Systems were
significantly developed, becoming more and more complex systems, ingesting
and processing in real time a great amount of data from automated
hydrometrical and meteorological stations networks and high resolution
gridded data from radars and satellites, together with the use of distributed
hydrological models, the warning and forecasts improvements are not very
significant, in many cases the performance of the new physically based
distributed models being comparable with the older conceptual lumped
models. The paper presents an overview of some alternative and
complementary modeling approaches, artificial neural networks and fuzzy logic
systems, possible applications for the improvements of the Operational
Hydrological Forecasting Systems, and presenting also some example of
rainfall-runoff modeling implementations. Artificial neural networks are widely
used as an effective approach for handling non-linear and noisy data,
especially in situations where the physical processes relationships are not fully

understood and they are also particularly well suited to modeling complex
systems on a real-time basis. Fuzzy logic is a generalization of Boolean logic
implementing the concept of partial truth or uncertainty, so within the fuzzy
set theory an element can have a gradual membership to different sets. To
describe system behavior with fuzzy logic, you need to define fuzzy sets, fuzzy
rules or so called IF-THEN rules and apply a fuzzy inference scheme. The
generation of a fuzzy forecast model can be based both on experts knowledge
and historical data. In conclusion, both artificial neural networks and fuzzy
logic modeling systems offer the potential for a more flexible, less assumption
approach to hydrological processes, and they have already been demonstrated
as successfully substitutes for the classical rainfall runoff models, and also
as tools for the real time updating of hydrological forecasting models and
especially for the multimodal approach. Keywords: hydrological forecasting
model, artificial neural network, fuzzy logic, operational hydrological forecasting
systems Operational hydrological forecasting systems On a global scale, floods
account for over 65% of people affected by natural disasters and they are the
most damaging of all natural disasters. Better forecasting floods and with a
larger lead time, is the main sustainable way of adapting to and managing such
disasters. Operational hydrological forecasting systems, which link state of the
river catchments, river discharges and water levels, recorded precipitations and
weather forecasts, can be used to respond to floods as they occur and to reduce
their costs in term of lives, property and other damages.
Current flood forecasting and warning systems have several limitations, such
as, insufficient lead-time to provide accurate flood warnings, inadequate spatial
and temporal resolution of the real-time rainfall observations and forecasts for
flood producing storm, little integration of different sources of forecast
information. Moreover their ability in considering the uncertainties in
estimating and forecasting precipitation and flood discharges is very limited.
The desirable characteristics of a good flood forecasting system are:
Timeliness: The lead-time is the time between making a forecast of an event
and its occurrence, if sufficient lead-time is available and the predictions are
accurate then evacuation, even of relatively large numbers of people may be
possible. The increase of the lead-time is mainly limited by the availability of
reliable quantitative precipitations forecasts, but also can be limited by the
hydrological models or forecasting methodologies that are implemented.
Accuracy: Is usually related to the correctness the forecasts of the magnitude
and time of the flood peak and of the resulting levels. In special situations, it
may relate to the forecasts of the complete hydrograph of the flood. The more
accurate the forecast the better flood control/modification and damage
mitigation measures can be implemented. Reliability: Can be associated with

accuracy, but is related to the overall long-term reliability of the flood


forecasting system, and not just to the accuracy of a forecast for a particular
flood. Usually the long-term reliability of the system can be assessed by its
performance in two respects. It should always forecast a flood when one occurs
and it should not forecast floods when one doesnt occur. The reliability, like
accuracy, affects the confidence in deciding on response measures, as the
public perception of warnings messages may be very important. Forecasts
require both data collection and modeling. The amounts of data and the
complexity of the modeling necessary to achieve specific targets of lead-time,
accuracy and reliability vary from catchment to catchment, and there is a
natural conflict between the desire for greater forecast lead time and greater
accuracy and reliability (usually the warning messages are based on model
simulations that take into account just the recorded precipitations and not the
forecasted precipitations). Generally the longer the lead times the less accurate
and reliable are the forecasts of flood magnitude, location and timing.
Operational hydrological forecasting systems have (or could have) the following
components:
Data acquisition systems: Is the basic component for an
operational system, and the data type and availability have major implications
on the modeling part of the system.
Rainfall forecasts models: Is the most
important part for the forecast lead-time increase. Unfortunately the present
results of the numerical meteorological models are not enough accurate for the
hydrological forecasts applications. On short term, the solution could be a
combination with the short future scan estimations based on radar
information. Rainfall-runoff forecasts models: The possible approach extend
from the extremely simple forecast relations, event type model, through
conceptual semi-distributed models, which are still the most used models in
operational, to complex physically based models. Flood routing and flood plain
models: The hydrological routing methods are still extensively used, but the
general direction is to use appropriate hydraulic models, which take into
account the river geometry, and allow reasonable estimations of flood maps.
Flood impact analysis component: If flood maps are available, flood impact
analysis could be finally obtained by superimposing flood maps with GIS
georeferenced spatial data on constructions, traffic, agriculture, etc. Artificial
Neural Networks Models The field of neural networks has a history of five
decades but has found solid application only in the past decade, and the field
is still developing rapidly. Neural networks are composed of many simple
elements operating in parallel. These elements are inspired by biological
nervous systems. The network function is determined largely by the
connections between elements. Neural networks have been trained to perform
complex functions in various fields of application including pattern recognition,

forecasting, identification, classification, speech, vision and control systems.


Artificial neural networks can be characterized most adequately as
computational models with particular properties such as the ability to adapt or
learn, to generalize, or to cluster or organize data, and which operation is based
on parallel processing. An artificial network consists of a pool of simple
processing units which communicate by sending signals to each other over a
large number of weighted connections. A set of major aspects can be
distinguished: a set of processing units (neurons); a state of activation for
every unit, which also determines the output of the unit; connections between
the units, generally each connection is defined by a weight which determines
the effect which the signal of one unit has on other unit; a propagation rule,
which determines the effective input of a unit from its external inputs;
an
activation function, which determines the new level of activation based on the
effective input and the current state; an external input or offset for each unit;
a neural network architecture; a training method. Within neural systems it is
useful to distinguish three types of units: input units which may receive data
from outside the system, output units which send data out of the system and
hidden units whose input and output signals remain within the system itself.
the end of training. Defuzzification layer: In the defuzzification layer each
neuron represents a consequent proposition and its membership function can
be implemented by combining one or two sigmoid functions and linear
functions. The weight of each output link here represents the centre of gravity
of each output membership function of the consequent and is trainable. After
getting the corresponding output the adjustment is made in the connection
weights and the membership functions in order to compensate the error and
produce a new control signal. Different successfully applications, of those
different computing techniques, have been reported by a large number of
researchers, especially in the last decade. Between the applications that are
related to the hydrological forecasting activity we can mention: Rainfall-runoff
modelling; Flood routing; Directly forecasts of water levels; Link different
individual forecasting models into a single forecasting system (multimodel
/consensus / combination river flow forecasting); Forecasting river ice jams
break-up;
Modelling of the flood forecasting uncertainty;
Quantitative
precipitations forecasts; River flow forecasts updating technique; Control and
optimization of reservoir operations;
Replicating complex hydraulics or
rainfall-runoff models;
Non-linear, non-unique stage-discharge relationship.
Neural Networks models experimentation For preliminary experimentations of
using neural networks models in the hydrological forecasts elaboration, where
implemented two types of event forecasting models using feed forward neural
networks with modular structure. The models implementation was done using

JOONE software framework (http://www.joone.org/),which is a Open Source


Java framework (LGPL licence) that can be used to build and run applications
based on neural networks. JOONE applications can be built on a local
machine, be trained on a
distributed environment and run on whatever device or from external Java
applications using the provided classes library, being so a good choice for realtime implementations of neural networks models. The first model can be used
to estimate the peak discharge and the associated moment of occurrence using
as input data the rainfall amount and duration, initial discharge and the daily
rainfall values for the last 10 days. The rainfall amount and duration can be
taken from the meteorological forecasts, providing so a maximum lead time
value. One module, within the network, is using the last 10 day rainfall
information and the initial discharge in order to estimate an internal index for
the soil moisture state, which is used in the main network module, for the flood
characteristics estimations. The second model implementation is a continuous
event model, than use as input data the hourly time series values of rainfall
and discharges, recorded in the last 3 hours, in order to simulate, one hour
ahead, the discharge value. The two different models were applied for Moneasa
River Basin, with an area of 76.2 km2 and a mean altitude of 586 m, which is
situated in the western part of Romania, in the Crisul Alb River basin. In the
figures 4 and 5 are presented some of the results obtained with the two
models.
applications we can summarizes the following conclusions:
Both neural
networks and fuzzy logic models are a convenient way to map an ndimensional
input space to an m-dimensional output space, being especially useful when
the relation between input and output space variables is not well-known,
except the fact that is a nonlinear relation.
Artificial neural networks are
widely used as an effective approach for handling non-linear and noisy data,
especially in situations where the physical processes relationships are not fully
understood and they are also particularly well suited to modelling complex
systems on a real-time basis. Fuzzy logic is a very powerful tool for dealing
quickly and efficiently with imprecision and nonlinearity. The generation of a
fuzzy forecast model can be based both on experts knowledge and historical
data. Both artificial neural networks and fuzzy logic modelling systems offer
the potential for a more flexible, less assumption approach to hydrological
processes, and they have already been demonstrated as successfully
substitutes for the classical rainfall runoff models, and also as tools for the
real time updating of hydrological forecasting models and especially for the
multimodel approach. In the next 3 years, the national DESWAT decisional and
informational integrated national system for management in case of disasters

project will be implemented. The hydrological modelling and forecasting system


of this project will implement the following modelling component:
National
Weather Service River Forecasting System (NWSRFS - USA);
NOAH LIS
distributed modelling component;
TOPLATS distributed model, for some
specific catchments;
FLASH FLOOD GUIDANCE component. After the first
year modelling system implementation, we intend to investigate the possibility
of adding into the system of modelling component using the neural network
and fuzzy logic approaches. Qobserved Qsimulated References

Carling A., 1992: Introducing Neural Network. SIGMA PRESS - Wilmslow, United
Kingdom. Michael A. Arbib, 1995: The Handbook of Brain Theory and Neural
Networks. THE MIT PRESS, Massachusetts Institute of Technology, United States
of America.
Toderean G., Costeiu M., Giurgiu M., 1995: Artificial neural networks, Blue Press,
Cluj-Napoca.
Romania
Dumitrescu D., Hariton C., 1996: Neural networks, theory and applications, Ed.
Teora, Bucharest,
Romania.
French, M.N., Krajewski, W.F. and Cuykendall, R.R., 1992: Rainfall forecasting in
space and time
using a neural network, Journal of Hydrology, 137, 1-31.
Govindaraju, R.S., Anmala, J., Nedunuri, K.V. and Koelliker, J.K., 1995: Use of
neural networks in
predicting the nonlinear rainfall-runoff relationships for small watersheds, paper
presented at the
European Geophysical Society General Assembly, Hamburg, 1995 and
abstracted in the conference
proceedings.
Liong, S.Y., Nguyen, V.T.V., Chan, W.T. and Chia, Y.S., 1994: Regional Estimation
of Floods for
Ungaged Catchments with Neural Networks. In Cheong, H-F., Shankar
Maier, H.R. and Dandy, G.C., 1996: The use of artificial neural networks for the
prediction of water
quality parameters, Water Resources Research, 32, 4, 1013-1022.
Wilby, R.L., Abrahart, R.J., Dawson, C.W., 2003: Detection of conceptual model
rainfall-runoff

processes inside an artificial neural network, Hydrological Sciences Journal,


48,2, 163-181.
Zekai, Sen, 2004: Fuzzy logic and system models in water sciences, Turkish
Water
Foundation,Istanbul.
M.Stuber, P. Gemmar, M. Greving, 2000: Machine supported Development of
Fuzzy Flood
Forecast Systems, European Conference on Advances in Flood Research,
Potsdam, PIK Report Nr.
65.
C. Mahabir, F.E. Hicks, A. Robinson Fayek, 2002: Forecasting Ice Jam Risk at
Fort McMurray, AB,
using Fuzzy Logic, Proceedings of the 16th IAHR Intrnational Symposium on Ice,
Dunedin, New
Zealand.
Linda See, Robert J. Abrahart, Stan Openshaw, 1998: An Integrated NeuroFuzzy-Statistical
Approach to Hydrological Modelling, School of Geography, University of Leeds,
UK.
S. Alvisi, G. Mascellani, M. Franchini, A. Bardossy, 2005: Water level forecasting
through fuzzy
logic and artificial neural network approaches, published in Hydrology and Earth
System Science
Discussions, EGU.
P.C. Nayak, K.P. Sudheer, D.M. Rangan, K.S. Ramasastri, 2005: Short-term
flood forecasting with
a neurofuzzy model, Water Resources Research, Vol. 41.