Introduction to Fuzzy Logic
BIOGEOS
Feb. 27- March 03, 2015
12/27/15
Introduction [1]
Information
It is possible to have a great deal of data (facts collected
from observations or measurements) and at the same time
lack of information (meaningful interpretation and
correlation of data that allows one to make decisions.)
Data
Value addition
Information
Introduction [2]
Information Type
Uncertain information: Information for which it is not
possible to determine whether it is true or false. Ex: a person
is possibly 30 years old
Imprecise information: Information which is not available
as precise as it should be. Ex: A person is around 30 years old.
Vague information: Information which is inherently vague.
Ex: A person is young.
Inconsistent information: Information which contains two
or more assertions that cannot be true at the same time. Ex:
Two assertions are given: Ali is 16 and Ali is older than 20
Incomplete information: information for which data is
missing or data is partially available. Ex: A persons age is not
known or a person is
between 25 and 32 years old
Combination of the various types of such information may
also exist. Ex: possibly young, possibly around 30, etc.
Introduction [3]
Knowledge
Knowledge is information at a higher level of
abstraction.
Ex: Ali is 10 years old (fact)
Ali is not old (knowledge)
Database
Knowledge base & AI
Intelligent information systems
Introduction [4]
Complexity
Large amount of information with large amount of
uncertainty lead to complexity.
Awareness of knowledge (what we know and what
we do not know) and complexity goes together.
Ex: Driving a car is complex, driving in an iced road
is more complex, since more knowledge is needed
for driving in an iced road.
Introduction [5]
UNCERTAINTY
(Uncertainty-based information)
COMPLEXITY
CREDIBILITY
(Description-algorithmic infor.)
USEFULNESS
(knowledge)
Introduction [6]
Dealing with uncertainty
Example: When uncertainties like heavy traffic,
unfamiliar roads, unstable wheather conditions, etc.
increase, the complexity of driving a car increases.
How do we go with the complexity?
We try to simplify the complexity by making a
satisfactory trade-off between information available to
us and the amount of uncertainty we allow.
We increase the amount of uncertainty by replacing
some of the precise information with vague but more
useful information.
Introduction [7]
Ad Hoc Dealing with uncertainty
Examples:
Travel directions: try to do it in mm terms (or turn the wheel % 23
left, etc.), which is very precise and complex but not very useful. So
replace mm information with city blocks, which is not as precise but
more meaningful (and/or useful) information.
Parking a car: doing it in mm terms, which is very precise and
complex but difficult and very costly and not very useful. So replace
mm information with approximate terms (between two lines), which
is not as precise but more meaningful (or useful) information and
can be done in less cost.
Describing wheather of a day: try to do it in % cloud cover, which is
very precise and complex but not very useful. So replace % cloud
information with vague terms (very cloudy, sunny etc.), which is not
as precise but more meaningful (or useful) information.
Introduction [8]
Fuzzy Logic: Concept
Fuzzy logic provides a systematic basis for
representation
of
uncertainty,
imprecision,
vagueness, and/or incompleteness.
Fuzzy logic is based on the idea that all things
admit of degrees. Temperature, height, speed,
distance, beauty all come on a sliding scale.
The concrete material has very high strength
Expressway is very congested
Introduction [9]
Fuzzy Logic: Motivation
First, it aims to alleviate difficulties in developing and analyzing
complex systems encountered by conventional mathematical tools.
This motivation requires fuzzy logic to work in quantitative and
numeric domains.
Second, it is motivated by observing that human reasoning can
utilize concepts and knowledge that do not have well defined, sharp
boundaries (i.e., vague concepts). This motivation enables fuzzy
logic to have a descriptive and qualitative form. This is related to AI.
Introduction [10]
Fuzzy Logic: Definition
Fuzzy Logic (FL) is a multivalued logic, that allows
intermediate values to be defined between
conventional evaluations like true/false, yes/no,
high/low, etc.
0 1
(a) Boolean Logic.
0 0
0.2
0.4
0.6
0.8
1 1
(b) Multi-valued Logic.
Introduction [11]
Fuzzy Logic: Usage
Fuzzy logic has been used for two different senses:
In a narrow sense: refers to logical system generalizing
crisp logic for reasoning uncertainty.
In a broad sense: refers to all of the theories and
technologies that employ fuzzy sets, which are classes
with imprecise boundaries.
The broad sense of fuzzy logic includes the narrow
sense of fuzzy logic as a branch.
Other areas include fuzzy control, fuzzy pattern
recongnition, fuzzy arithmetic, fuzzy probability theory,
fuzzy decision analysis, fuzzy databases, fuzzy expert
systems, fuzzy computer SW and HW, etc.
Introduction [11]
Fuzzy Logic: Utility
Ease of describing human knowledge involving vague
concepts
Enhanced ability to develop a cost-effective solution to
real-world
In another word, fuzzy logic not only provides a cost
effective way to model complex systems involving
numeric variables but also offers a quantitative
description of the system that is easy to comprehend.
Introduction [12]
Fuzzy Logic Vs Probability
Fuzziness is deterministic uncertainty probability
is nondeterministic.
Probabilistic uncertainty dissipates with increasing
number of occurrences fuzziness does not.
Fuzziness describes event ambiguity probability
describes event occurrence. Whether an event
occurs is random. The degree to which it occurs is
fuzzy.
Introduction [13]
Fuzzy Sets
Fuzzy Operators
Fuzzy Rules
Fuzzy Controller
Fuzzy Applications [1]
Advertisement:
Extraklasse Washing Machine - 1200 rpm. The Extraklasse machine has
a number of features which will make life easier for you.
Fuzzy Logic detects the type and amount of laundry in the drum and
allows only as much water to enter the machine as is really needed for the
loaded amount. And less water will heat up quicker - which means less
energy consumption.
Foam detection
Too much foam is compensated by an additional rinse cycle: If Fuzzy
Logic detects the formation of too much foam in the rinsing spin cycle, it
simply activates an additional rinse cycle. Fantastic!
Imbalance compensation
In the event of imbalance, Fuzzy Logic immediately calculates the
maximum possible speed, sets this speed and starts spinning. This
provides optimum utilization of the spinning time at full speed []
Washing without wasting - with automatic water level adjustment
Fuzzy automatic water level adjustment adapts water and energy
consumption to the individual requirements of each wash programme,
depending on the amount of laundry and type of fabric []
Fuzzy Applications [2]
Other Application areas
Fuzzy Control
Metro trains
Intelligent Transportation System Applications
Cement kilns
Fridges
Crisp Set
A set X of all real numbers between 0 and 10
which we call the universe of discourse.
Define a subset A of X of all real-numbers in the
range between 5 and 8.
A = [5,8], A is a crisp set and 1A is the
characteristic function
Fuzzy Set [1]
B = {set of young people}
B = [0,20] crisp interval
Well, s/he belongs a little bit more to the set of young
people or NO, s/he belongs nearly not to the set of
young people.
Fuzzy Set [2]
B = {set of young people}
B = [0,20] crisp interval
= [0,1]
Fuzzy Set [3]
B = {set of young people}
B = [0,20] crisp interval
= [0,1]
Fuzzy Set [4]
B = {set of young people}
B = [0,20] crisp interval
= [0,1]
Name
Height, cm
Degree of Membership
Crisp
Fuzzy
Ram
Sam
Arun
Raja
Phani
Rajesh
208
205
198
181
179
172
1
1
1
1
0
0
1.00
1.00
0.98
0.82
0.78
0.24
Ajey
Suresh
167
158
0
0
0.15
0.06
Kanu
Rohit
155
152
0
0
0.01
0.00
Fuzzy Set [5]
Degree of
Membership
1.0
The x-axis represents the
universe of discourse the 0.8
range of all possible values
0.6
applicable to a chosen
0.4
variable. In our case, the
0.2
variable is the man height.
0.0
According to this
150
representation, the universe of
Degree of
mens heights consists of all Membership
1.0
tall men.
The y-axis represents the
membership value of the
fuzzy set. In our case, the
fuzzy set of tall men maps
height values into
corresponding membership
values.
Crisp Sets
Tall Men
160
170
180
190
200
210
Height, cm
Fuzzy Sets
0.8
0.6
0.4
0.2
0.0
150
160
170
180
190
200
210
Height, cm
Fuzzy Set [6]
First, we determine the membership functions. In our
tall men example, we can obtain fuzzy sets of tall,
short and average men.
The universe of discourse the mens heights
consists of three sets: short, average and tall men. As
you will see, a man who is 184 cm tall is a member of
the average men set with a degree of membership of
0.1, and at the same time, he is also a member of the
tall men set with a degree of 0.4.
Fuzzy Set [7]
Degree of
Membership
1.0
Crisp Sets
Short
0.8
Average
Short
Tall
Tall Men
0.6
0.4
0.2
0.0
150
160
170
Degree of
Membership
1.0
180
190
200
210
Height, cm
200
210
Fuzzy Sets
0.8
Short
0.6
Tall
Average
0.4
Tall
0.2
0.0
150
160
170
180
190
Fuzzy Set [8]
Typical functions that can be used to represent a fuzzy
set are sigmoid, gaussian and pi. However, these
functions increase the time of computation. Therefore,
in practice, most applications use linear fit functions.
(x)
X
Fuzzy Subset A
1
0
Crisp Subset A
Fuzziness
Fuzziness
Linguistic Variables and Hedges [1]
The range of possible values of a linguistic variable
represents the universe of discourse of that variable.
For example, the universe of discourse of the linguistic
variable speed might have the range between 0 and 220
km/h and may include such fuzzy subsets as very slow,
slow, medium, fast, and very fast.
A linguistic variable carries with it the concept of fuzzy
set qualifiers, called hedges.
Hedges are terms that modify the shape of fuzzy sets.
They include adverbs such as very, somewhat, quite,
more or less and slightly.
Linguistic Variables and Hedges [2]
Degree of
Membership
1.0
Short
0.8
Short
Tall
Average
0.6
0.4
0.2
Very Short
Very
Very
Tall
Tall
Tall
0.0
150
160
170
180
190
200
210
Height, cm
Linguistic Variables and Hedges [3]
Hedge
Mathematical
Expression
A little
[A ( x )]1.3
Slightly
[A ( x )]1.7
Very
[A ( x )]2
Extremely
[A ( x )]3
Graphical Representation
Linguistic Variables and Hedges [4]
Hedge
Very very
Mathematical
Expression
[A ( x )]4
More or less
A ( x )
Somewhat
A ( x )
2 [A ( x )]2
Indeed
if 0 A 0.5
1 2 [1 A ( x )]2
if 0.5 < A 1
Graphical Representation
Operations on Fuzzy Sets [1]
Interactions between fuzzy sets are called operations
Complement
Containment
Union
Intersection
Operations on Fuzzy Sets [2]
Not A
B
A
AA
Complement
Containment
Intersection
AA
Union
Operations on Fuzzy Sets [3]
Membership Functions
For the sake of convenience, usually a fuzzy
set is denoted as:
A = A(xi)/xi + . + A(xn)/xn
where A(xi)/xi (a singleton) is a pair grade of
membership element, that belongs to a finite
universe of discourse:
A = {x1, x2, .., xn}
Operations on Fuzzy Sets [4]
Fuzzy Sets: Complement
Crisp Sets: Who does not belong to the set?
Fuzzy Sets: How much do elements not belong to the set?
The complement of a set is an opposite of this set. For example,
if we have the set of tall men, its complement is the set of NOT
tall men. When we remove the tall men set from the universe of
discourse, we obtain the complement.
If A is the fuzzy set, its complement A can be found as follows:
A(x) = 1 A(x)
Operations on Fuzzy Sets [5]
Fuzzy Set: Containment
Crisp Sets: Which sets belong to which other sets?
Fuzzy Sets: Which sets belong to other sets?
For example, the set of tall men contains all tall men; very tall
men is a subset of tall men. However, the tall men set is just
a subset of the set of men.
In crisp sets, all elements of a subset entirely belong to a
larger set. In fuzzy sets, however, each element can belong
less to the subset than to the larger set. Elements of the
fuzzy subset have smaller memberships in it than in the
larger set.
Operations on Fuzzy Sets [6]
Fuzzy Sets: Intersection
Crisp Sets: Which element belongs to both sets?
Fuzzy Sets: How much of the element is in both sets?
In classical set theory, an intersection between two sets contains the
elements shared by these sets. For example, the intersection of the set
of tall men and the set of fat men is the area where these sets overlap.
In fuzzy sets, an element may partly belong to both sets with different
memberships.
A fuzzy intersection is the lower membership in both sets of each
element. The fuzzy intersection of two fuzzy sets A and B on universe of
discourse X:
A B(x) = min [ A(x), B(x)] = A(x) B(x),
where xX
Operations on Fuzzy Sets [7]
Fuzzy Sets: Union
Crisp Sets: Which element belongs to either set?
Fuzzy Sets: How much of the element is in either set?
The union of two crisp sets consists of every element that falls
into either set. For example, the union of tall men and fat men
contains all men who are tall OR fat.
In fuzzy sets, the union is the reverse of the intersection. That is,
the union is the largest membership value of the element in
either set. The fuzzy operation for forming the union of two fuzzy
sets A and B on universe X can be given as:
AB(x) = max [A(x), B(x)] = A(x) B(x),
where xX
Operations of Fuzzy Sets [8]
(x)
(x)
B
A
A
0
1
x
Not A
Complement
(x)
0
Containment
(x)
A
0
1
x
AB
0
Intersection
1
x
AB
Union
Properties of Fuzzy Sets [1]
Equality of two fuzzy sets
Inclusion of one set into another fuzzy set
Cardinality of a fuzzy set
An empty fuzzy set
-cuts (alpha-cuts)
Properties of Fuzzy Sets: Equality
Fuzzy set A is considered equal to a fuzzy set B, IF
AND ONLY IF (iff):
A(x) = B(x), xX
A = 0.3/1 + 0.5/2 + 1/3
B = 0.3/1 + 0.5/2 + 1/3
therefore A = B
Properties of Fuzzy Sets: Inclusion
Inclusion of one fuzzy set into another fuzzy set. Fuzzy set A
X is included in (is a subset of) another fuzzy set, B X:
A(x) B(x), xX
Consider X = {1, 2, 3} and sets A and B
A = 0.3/1 + 0.5/2 + 1/3;
B = 0.5/1 + 0.55/2 + 1/3
then A is a subset of B, or A B
Properties of Fuzzy Sets: Cardinality
Cardinality of a non-fuzzy set, Z, is the number of elements in Z.
BUT the cardinality of a fuzzy set A, the so-called SIGMA COUNT, is
expressed as a SUM of the values of the membership function of A,
A(x):
cardA = A(x1) + A(x2) + A(xn) = A(xi),
Consider X = {1, 2, 3} and sets A and B
A = 0.3/1 + 0.5/2 + 1/3;
B = 0.5/1 + 0.55/2 + 1/3
cardA = 1.8
cardB = 2.05
for i=1..n
Properties of Fuzzy Sets :Empty Fuzzy Set
A fuzzy set A is empty, IF AND ONLY IF:
A(x) = 0, xX
Consider X = {1, 2, 3} and set A
A = 0/1 + 0/2 + 0/3
then A is empty
Properties of Fuzzy Set: Alpha-cut
An -cut or -level set of a fuzzy set A X is an ORDINARY SET A
X, such that:
A={A(x), xX}.
Consider X = {1, 2, 3} and set A
A = 0.3/1 + 0.5/2 + 1/3
then A0.5 = {2, 3},
A0.1 = {1, 2, 3},
A1 = {3}
Properties of Fuzzy Sets: Fuzzy Set Normality
A fuzzy subset of X is called normal if there exists at
least one element xX such that A(x) = 1.
A fuzzy subset that is not normal is called subnormal.
All crisp subsets except for the null set are normal. In
fuzzy set theory, the concept of nullness essentially
generalises to subnormality.
The height of a fuzzy subset A is the large
membership grade of an element in A
height(A) = maxx(A(x))
Properties of Fuzzy Sets: Fuzzy Sets Core and Support
Assume A is a fuzzy subset of X:
the support of A is the crisp subset of X consisting of
all elements with membership grade:
supp(A) = {x A(x) 0 and x X}
the core of A is the crisp subset of X consisting of all
elements with membership grade:
core(A) = {x A(x) = 1 and x X}
Fuzzy Rules
A fuzzy rule can be defined as a conditional statement
in the form:
IF
THEN
x
y
is A
is B
where x and y are linguistic variables; and A and B are
linguistic values determined by fuzzy sets on the
universe of discourses X and Y, respectively.
Classical Vs Fuzzy Rules
Classical Rule
A classical IF-THEN rule uses binary logic, for example,
The variable speed can have any numerical value
between 0 and 220 km/h, but the linguistic variable
stopping distance can take either value long or short. In
other words, classical rules are expressed in the blackand-white language of Boolean logic
Classical Vs Fuzzy Rules
Fuzzy Rule
In fuzzy rules, the linguistic variable speed also has the
range (the universe of discourse) between 0 and 220 km/h,
but this range includes fuzzy sets, such as slow, medium
and fast. The universe of discourse of the linguistic
variable stopping distance can be between 0 and 300 m and
may include such fuzzy sets as short, medium and long.
Firing Fuzzy Rules [1]
These fuzzy sets provide the basis for a weight
estimation model. The model is based on a
relationship between a mans height and his weight:
IF
height is tall
THEN weight is heavy
Degree of
Membership
1.0
0.8
Degree of
Membership
1.0
Heavy men
0.8
Tall men
0.6
0.6
0.4
0.4
0.2
0.2
0.0
160
0.0
180
190
200
Height, cm
70
80
100
120
Weight, kg
Firing Fuzzy Rules [2]
The value of the output or a truth membership grade of
the rule consequent can be estimated directly from a
corresponding truth membership grade in the
antecedent. This form of fuzzy inference uses a
method called monotonic selection.
Degree of
Membership
1.0
Degree of
Membership
1.0
Tall men
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0.0
0.0
160
180
190
200
Height, cm
Heavy men
70
80
100
120
Weight, kg
Fuzzy Controller [1]
Fuzzy logic control or simply "fuzzy control" belongs to the
class of "intelligent control," "knowledge-based control," or
"expert control." Fuzzy control uses knowledge-based
decision-making employing techniques of fuzzy logic in
determining the control actions.
Fuzzy Controller [2]
Fuzzy Controller [3]
Fuzzy Controller Architecture