2. Introduction
Fuzzy systems, Neural networks and Genetic
Algorithms are a part of soft computing
technologies
2
Definition of fuzzy
Fuzzy – “not clear, distinct, or precise; blurred”
Definition of fuzzy logic
A form of knowledge representation suitable for notions that
cannot be defined precisely, but which depend upon their
contexts.
3. Introduction to fuzzy logic
Uncertainty is inherent in accessing
information from large amount of data;
for example words like near and slow in
sentences like
“My house is near to the office”
“He drives slowly”
If we set slow as speeds <=20 and fast
otherwise, then is 20.1 is fast?
3
4. Crisp sets
Crisp sets: In a crisp set, members belong to the group
identified by the set or not
slow = {s such that 0 <= s <= 40}
fast = {s such that 40 < s <70}
40.1 belongs to set fast, hence 40.1 is not slow
Drawback of crisp sets: Suppose a physical system has
to apply brakes if the speed of the vehicle is fast and
release the brake if the speed is slow. If the speed is
in the interval [39, 41], such a system would
continuously keep jerking which is not desired
4
6. The crisp set
The crisp set is defined in such a way as to
divide the individuals in some given universe
of discourse into two groups: members and
nonmembers.
• However, many classification concepts
do not exhibit this characteristic.
• For example, the set of tall people,
expensive cars, or sunny days.
6
7. Crisp sets: an overview
Three basic methods to define sets:
The list method: a set is defined by naming all its members.
A={2, 4, 6, 8, 10}
The rule method: a set is defined by a property satisfied by its
members.
where ‘|’ denotes the phrase “such that”
P(x): a proposition of the form “x has the property P ”
For example A= {x | x is an even number}
},...,,{ 21 naaaA
)}(|{ xPxA
7
8. Crisp sets: an overview
A set is defined by a characteristic function.
the characteristic function
For example let A={2, 4, 6, 8, 10}
{(2,1), (3,0), (4,1), (6,1), (11,0)}
8
Ax
Ax
xA
for0
for1
)(
}1,0{: XA
9. Crisp sets: an overview
A family of sets: a set whose elements are sets
It can be defined in the form:
where i and I are called the set index and the index set, respectively.
The family of sets is also called an indexed set.
For example: A
A is a subset of B:
A, B are equal sets:
A and B are not equal:
A is proper subset of B:
A is included in B:
},...,,{ 21 nAAAA
}|{ IiAi
9
BA
BA ABBA and
BA
BA
BABABA and
10. Crisp sets: an overview
The power set of A ( ): the family of all subsets of a given set A.
The second order power set of A:
The higher order power set of A:
The cardinality of A (|A|): the number of members of a finite set A.
For example:
B – A: the relative complement of a set A with respect to set B
If the set B is the universal set, then
,2|)(| ||A
A P
)(AP
10
))(()( AA PPP 2
),...(),( 43
AA PP
||
2
2|)(|
A
A 2
P
},|{ AxBxxAB
.AAB
AA
X
X
11. Crisp sets: an overview
The union of sets A and B:
The generalized union operation: for a family of sets,
The intersection of sets A and B:
The generalized intersection operation: for a family of sets,
}and|{ BxAxxBA
}somefor|{ IiAxxA ii
Ii
11
}or|{ BxAxxBA
}allfor|{ IiAxxA ii
Ii
13. Crisp sets: an overview
The partial ordering of a power set:
Elements of the power set of a universal set can be
ordered by the set inclusion.
Disjoint:
any two sets that have
no common members
iff (or ) for any , ( )A B A B B A B A A B X P
)(AP
13
BA
15. Crisp sets: an overview
A set whose members can be labeled by the
positive integers is called a countable set.
If such labeling is not possible, the set is called
uncountable.
For example, { a | a is a real number, 0 < a < 1} is
uncountable.
Every uncountable set is infinite.
15
16. Crisp sets: an overview
Let R denote a set of real number.
If there is a real number r such that for every , then
r is called an upper bound of R, and A is bounded above by r.
If there is a real number s such that for every , then
s is called an lower bound of R, and A is bounded below by s.
For any set of real numbers R that is bounded above, a real
number r is called the supremum of R (write r = sup R) iff:
(a) r is an upper bound of R;
(b) no number less than r is an upper bound of R.
For any set of real numbers R that is bounded below, a real
number s is called the infimum of R (write s = inf R) iff:
(a) s is an lower bound of R;
(b) no number greater than s is an lower bound of R.
Rx
16
rx
sx Rx
17. Fuzzy sets: an overview
– A fuzzy set can be defined mathematically by assigning to
each possible individual in the universe of discourse a value
representing its grade of membership in the fuzzy set.
• For example: a fuzzy set representing our concept of
sunny might assign a degree of membership of 1 to a
cloud cover of 0%, 0.8 to a cloud cover of 20%, 0.4 to a
cloud cover of 30%, and 0 to a cloud cover of 75%.
For example let us evaluate few dates 12, 13, 14, 15, 16 August
2014
Crisp set { (12,1), (13, 1), (14, 0), (15, 1), (16,0)}
Here 12, 13, 15 belongs to sunny set.
Fuzzy set {(12, 0.9), (13, 1), (14, 0.8), (15,1), (16,0.3)}
Here all belongs to sunny set but with definite grade of
membership.
17
18. Fuzzy sets: basic types
A membership function:
A characteristic function: the values assigned to the elements
of the universal set fall within a specified range and indicate
the membership grade of these elements in the set.
Larger values denote higher degrees of set membership.
A set defined by membership functions is a fuzzy set.
The most commonly used range of values of membership
functions is the unit interval [0,1].
Notation:
The membership function of a fuzzy set A is denoted by :
In the other one, the function is denoted by A and has the same form
In this text, we use the second notation.
]1,0[: XA
18
]1,0[: XA
19. Fuzzy sets: basic types
Tall person
Crisp set A={x | x>6}
Now somebody has height greater than 6 is a
tall person.
A person of height 6.001 ft is tall while a
person with height 5.999 ft is not tall.
Does humans think in this manner.
Crisp sets do not depict the nature of human
concepts and thoughts.
19
20. Fuzzy sets: basic types
• A fuzzy set is a set having degrees of membership
between 1 and 0. (in contrast to crisp set having
degree of membership either 0 or 1).
• E.g. what kind of weather is today?
• Crisp set will answer summer or winter
• Fuzzy set will answer 0.7 summer or 0.3 winter
• A fuzzy set is a set without crisp boundary.
• If X is a collection of objects denoted by x, then a
fuzzy set A in X is defined as a set of ordered pairs:
A= {(x, A (x)) | x X}
Where A (x) is called ,membership function (MF)
20
22. Fuzzy Sets
•Sets with fuzzy boundaries
A = Set of tall people
Membership
function
Heights5’10’’ 6’2’’
.5
.9
Fuzzy set A
1.0
Heights5’10’’
1.0
Crisp set A
24. Fuzzy Sets
•Formal definition:
A fuzzy set A in X is expressed as a set of ordered
pairs:
}|))(,{( XxxxA A
Universe or
universe of discourse
Fuzzy set
Membership
function
(MF)
A fuzzy set is totally characterized by a
membership function (MF).
25. Fuzzy Sets with Discrete Universes
•Fuzzy set C = “desirable city to live in”
X = {Shimla, Chandigarh, Delhi} (discrete and nonordered)
C = {(Shimla, 0.7), (Chandigarh, 0.8), (Delhi, 0.6)}
•Fuzzy set A = “sensible number of children”
X = {0, 1, 2, 3, 4, 5, 6} (discrete universe)
A = {(0, .1), (1, .3), (2, .7), (3, 1), (4, .6), (5, .2), (6, .1)}
Also denoted as 0.1/0, 0.3/1, 0.7/2, 0.6/4, 0.2/5, 0.1/6
26. Fuzzy Sets with Cont. Universes
•Fuzzy set B = “about 50 years old”
X = Set of positive real numbers (continuous)
B = {(x, B(x)) | x in X}
B x
x
( )
1
1
50
10
2
27. Alternative Notation
A fuzzy set A can be alternatively denoted as
follows:
•Also denoted as 0.1/0, 0.3/1, 0.7/2, 0.6/4, 0.2/5, 0.1/6
A x xA
x X
i i
i
( ) /
A x xA
X
( ) /
X is discrete
X is continuous
Note that S and integral signs stand for the union of
membership grades; “/” stands for a marker and does
not imply division.
31. Convexity of Fuzzy Sets
•A fuzzy set A is convex if for any l in [0, 1],
l l A A Ax x x x( ( ) ) min( ( ), ( ))1 2 1 21
Alternatively, A is convex is all its a-cuts are
convex.
convexmf.m
34. Fuzzy sets: basic types
An example:
Define the seven levels of education:
34
Highly
educated (0.8)
Very highly
educated (0.5)
35. Fuzzy sets: basic types
Several fuzzy sets representing linguistic concepts such as low, medium,
high, and so one are often employed to define states of a variable. Such
a variable is usually called a fuzzy variable.
For example:
35
36. Fuzzy sets: basic types
Now, we introduced only one type of fuzzy set. Given a
relevant universal set X, any arbitrary fuzzy set of this type is
defined by a function of the form
This kind of fuzzy sets is called ordinary fuzzy sets.
Interval-valued fuzzy sets:
The membership functions of ordinary fuzzy sets are often overly
precise.
We may be able to identify appropriate membership functions only
approximately.
Interval-valued fuzzy sets: a fuzzy set whose membership
functions does not assign to each element of the universal set one
real number, but a closed interval of real numbers between the
identified lower and upper bounds.
]1,0[: XA
36
]),1,0([: XA
Power set
38. Fuzzy sets: basic types
Discussions:
The primary disadvantage of interval-
value fuzzy sets, compared with
ordinary fuzzy sets, is computationally
more demanding.
38
39. Fuzzy sets: basic concepts
Given two fuzzy sets, A and B, their standard intersection and
union are defined for all by the equations
where min and max denote the minimum operator and the
maximum operator, respectively.
Xx
39
)],(),(max[))((
)],(),(min[))((
xBxAxBA
xBxAxBA
40. Fuzzy sets: basic concepts
Another example:
A1, A2, A3 are normal.
B and C are subnormal.
B and C are convex.
are not
convex.
40
21 AAB
32 AAC
CBCB and
Normality and convexity
may be lost when we
operate on fuzzy sets by
the standard operations
of intersection and
complement.
41. Fuzzy Sets
To reduce the complexity of
comprehension, vagueness is introduced
in crisp sets
Fuzzy set contains elements; each
element signifies the degree or grade of
membership to a fuzzy aspect
Membership values denote the sense of
belonging of a member of a crisp set to a
fuzzy set
41
42. Example of a fuzzy set
Consider a crisp set A with elements
representing ages of a set of people in years
A = { 2, 4, 10, 15, 20, 30, 35, 40, 45, 60, 70}
Classify the age in terms of six fuzzy variables
or names given to fuzzy sets as: infant, child,
adolescent, adult, young and old
Membership is different from probabilities
Memberships do not necessarily add up to one
42
44. Explanation of Example
• How to categorize a person with age 30?
• A person with age 40 is old?
• The table 1. shows the fuzzy sets namely ages,
infant, child, adolescent, adult, young and old
• The values in the table indicate the memberships to
the fuzzy sets
• For example, consider the fuzzy set child.
• A child with age 4 belongs to the fuzzy set child
with 0.5 membership value and a child with age 10
is 100% member
44
45. Explanation of Example contd..
As per the table 1. a person with age 30 is 60%
young and 100% adult
A person with age 40 is 40% young and 100%
adult
A person with age 60 is 100% adult and 80% old
45
46. Features of Fuzzy Sets
1. A complex nonlinear input-output relation is
represented as a combination of simple input-
output relations
2. The simple input-output relation is described
in each rule
3. The system output from one rule area to the
next rule area gradually changes
4. Fuzzy logic systems are augmented with
techniques that facilitate learning and
adaptation to the environment; thus logic and
fuzziness are separate in fuzzy systems
46
47. Features of Fuzzy Sets contd..
In Conventional two value logic based
systems logic and fuzziness are not different
fuzzy logic systems modify rules when logic
is to be changed and change membership
functions when fuzziness is to be changed
47
48. Some Fuzzy Terminology
Universe of Discourse (U): The range of all
possible values that comprise the input to the
fuzzy system
Fuzzy set: A set that has members with
membership (real) values in the interval [0,1]
Membership function: It is the basis of a fuzzy
set. The membership function of the fuzzy set A
is given by µA: U [0,1]
48
49. Fuzzy Terminology contd..
Support of a fuzzy set (Sf): The support S of a fuzzy
set f in a universal crisp set U is that set which
contains all elements of the set U that have a non-zero
membership value in f
the support of the fuzzy set adult S adult is given by
S adult = {21,30,35,40,45,60,70}
Depiction of a fuzzy set: A fuzzy set in a universal crisp
set U is written as
f =µ1/s1 + µ2/s2+…+ µn/sn wher µi is the membership,
si is the corresponding term in the support set ; + and / are only
user for representation purpose; fuzzy set OLD is depicted as
Old =0.1/21+0.3/30+0.35/35+0.4/40+0.6/45+0.8/60+1/70
49
50. Fuzzy Set Operations
• Union: The membership function of the union of
two fuzzy sets A and B is defined as the
maximum of the two individual membership
functions. It is equivalent to the Boolean OR
operation µ AUB = max( µA, µ B)
• Intersection: The membership function of the
Intersection of two fuzzy sets A and B is defined
as the minimum of the two individual
membership functions. It is equivalent to the
Boolean AND operation µ A^B = min(µA, µ B)
50
51. Fuzzy Set Operations contd..
Complement: The membership function of the
complement of a fuzzy set A is defined as the
negation of the specified membership function It
is equivalent to the Boolean NOT operation µ Ac
= (1- µA)
51
53. RELATIONS
Relations represent mappings between sets and connectives in logic.
A classical binary relation represents the presence or absence of a
connection or interaction or association between the elements of two sets.
Fuzzy binary relations are a generalization of crisp binary relations, and
they allow various degrees of relationship (association) between elements.
55. CRISP CARTESIAN PRODUCT
The elements in two sets A and B are given as
A = {0, 1} and
B = {e, f, g}
find the Cartesian product A × B, B × A, A × A, B × B.
The Cartesian product for the given sets is as follows:
B × A = {(e, 0), (e, 1), (e, 1), (f, 1), (g, 1)},
A × A = A2 = {(0, 0), (0, 1), (1, 0), (1, 1)},
B × B = B2 = {(e, e), (e, f), (e, g), (f, e), (f, f), (f, g), (g, e), (g, f), (g, g)}.
59. PROPERTIES OF CRISP RELATIONS
The properties of crisp sets (given below) hold good for crisp relations as well.
Commutativity,
Associativity,
Distributivity,
Involution,
Idempotency,
DeMorgan’s Law,
Excluded Middle Laws.
“Principles of Soft Computing, 2nd Edition”
by S.N. Sivanandam & SN Deepa
Copyright 2011 Wiley India Pvt. Ltd. All rights reserved.
61. Fuzzy Relations
Generalizes classical relation into one that
allows partial membership
Describes a relationship that holds
between two or more objects
○ Example: a fuzzy relation “Friend”
describe the degree of friendship
between two person (in contrast to
either being friend or not being friend
in classical relation!)
62. Fuzzy Relations
A fuzzy relation is a mapping from the
Cartesian space X x Y to the interval [0,1],
where the strength of the mapping is
expressed by the membership function of
the relation (x,y)
The “strength” of the relation between
ordered pairs of the two universes is
measured with a membership function
expressing various “degree” of strength
[0,1]
˜R
˜R
63. Fuzzy Cartesian Product
Let
be a fuzzy set on universe X, and
be a fuzzy set on universe Y, then
Where the fuzzy relation R has membership function
˜A ˜B ˜R X Y
˜R
(x, y) ˜Ax˜B
(x, y) min( ˜A
(x), ˜B
(y))
˜A
˜B
64. Fuzzy Cartesian Product:
Example
Let
defined on a universe of three discrete temperatures, X =
{x1,x2,x3}, and
defined on a universe of two discrete pressures, Y = {y1,y2}
Fuzzy set represents the “ambient” temperature and
Fuzzy set the “near optimum” pressure for a certain heat
exchanger, and the Cartesian product might represent the conditions
(temperature-pressure pairs) of the exchanger that are associated with
“efficient” operations. For example, let
˜A
˜B
˜A
˜B
˜A
0.2
x1
0.5
x2
1
x3
and
˜B
0.3
y1
0.9
y2
} ˜A ˜B ˜R
x1
x2
x3
0.2 0.2
0.3 0.5
0.3 0.9
y1 y2
65. Fuzzy Composition
Suppose
is a fuzzy relation on the Cartesian space X x Y,
is a fuzzy relation on the Cartesian space Y x Z, and
is a fuzzy relation on the Cartesian space X x Z; then
fuzzy max-min and fuzzy max-product composition are defined
as
˜R
˜S
˜T
˜T ˜Ro ˜S
max min
˜T
(x,z)
yY
( ˜R
(x,y) ˜S
(y,z))
max product
˜T
(x,z)
yY
( ˜R
(x,y) ˜S
(y, z))
74. Extension Principle
• Provides a general procedure for extending crisp
domains of mathematical expressions to fuzzy domains.
• Generalizes a common point-to-point mapping of a
function f(.) to a mapping between fuzzy sets.
Suppose that f is a function from X to Y and A is a fuzzy
set on X defined as
A A(x1)/(x1) A(x2 )/(x2 ) ..... A(xn )/(xn )
Then the extension principle states that the image of
fuzzy set A under the mapping f(.) can be expressed as a
fuzzy set B,
B f(A) A(x1)/(y1) A(x2 )/(y2 ) ..... A(xn )/(yn )
Where yi =f(xi), i=1,…,n. If f(.) is a many-to-one mapping then
B(y) max
x f 1
(y)
A (x)
75. Extension Principle: Example
Let A=0.1/-2+0.4/-1+0.8/0+0.9/1+0.3/2
and
f(x) = x2-3
Upon applying the extension principle, we have
B = 0.1/1+0.4/-2+0.8/-3+0.9/-2+0.3/1
= 0.8/-3+max(0.4, 0.9)/-2+max(0.1, 0.3)/1
= 0.8/-3+0.9/-2+0.3/1
78. Arithmetic Operations on Fuzzy Numbers
Applying the extension principle to arithmetic operations, we
have
Fuzzy Addition:
Fuzzy Subtraction:
Fuzzy Multiplication:
Fuzzy Division:
AB(z)
x,y
xyz
A(x) B (y)
AB(z)
x,y
xyz
A(x) B (y)
AB(z)
x,y
xyz
A(x) B (y)
A / B(z)
x,y
x / yz
A(x) B (y)
79. Arithmetic Operations on Fuzzy Numbers
Let A and B be two fuzzy integers defined as
A = 0.3/1 + 0.6/2 + 1/3 + 0.7/4 + 0.2/5
B = 0.5/10 + 1/11 + 0.5/12
Then
F(A+B) = 0.3/11+ 0.5/12 + 0.5/13 + 0.5/14 +0.2/15 +
0.3/12 + 0.6/13 + 1/14 + 0.7/15 + 0.2/16 +
0.3/13 + 0.5/14 + 0.5/15 + 0.5/16 +0.2/17
Get max of the duplicates,
F(A+B) =0.3/11 + 0.5/12 + 0.6/13 + 1/14 + 0.7/15
+0.5/16 + 0.2/17
• Addition, subtraction, multiplication, and division of fuzzy numbers are all
defined based on the extension principle
81. Fuzzy If-Then Rules
General format:
If x is A then y is B
Examples:
If pressure is high, then volume is small.
If the road is slippery, then driving is
dangerous.
If a tomato is red, then it is ripe.
If the speed is high, then apply the brake a
little.
82. The degree of an element in a fuzzy set corresponds to the truth value
of a proposition in fuzzy logic systems.
FUZZY RULES AND REASONING
83. LINGUISTIC VARIABLES
A linguistic variable is a fuzzy variable.
• The linguistic variable speed ranges between 0 and 300 km/h and
includes the fuzzy sets slow, very slow, fast, …
• Fuzzy sets define the linguistic values.
Hedges are qualifiers of a linguistic variable.
• All purpose: very, quite, extremely
• Probability: likely, unlikely
• Quantifiers: most, several, few
• Possibilities: almost impossible, quite possible
84. TRUTH TABLES
Truth tables define logic functions of two propositions. Let X and Y be two
propositions, either of which can be true or false.
The operations over the propositions are:
1. Conjunction (): X AND Y.
2. Disjunction (): X OR Y.
3. Implication or conditional (): IF X THEN Y.
4. Bidirectional or equivalence (): X IF AND ONLY IF Y.
85. FUZZY RULES
A fuzzy rule is defined as the conditional statement of the form
If x is A
THEN y is B
where x and y are linguistic variables and A and B are linguistic values
determined by fuzzy sets on the universes of discourse X and Y.
86. The decision-making process is based on rules with sentence
conjunctives AND, OR and ALSO.
Each rule corresponds to a fuzzy relation.
Rules belong to a rule base.
Example: If (Distance x to second car is SMALL) OR (Distance y to
obstacle is CLOSE) AND (speed v is HIGH) THEN (perform LARGE
correction to steering angle ) ALSO (make MEDIUM reduction in speed
v).
Three antecedents (or premises) in this example give rise to two outputs
(consequences).
87. FUZZY RULE FORMATION
IF height is tall
THEN weight is heavy.
Here the fuzzy classes height and weight have a given range (i.e., the universe
of discourse).
range (height) = [140, 220]
range (weight) = [50, 250]
88. FORMATION OF FUZZY RULES
Three general forms are adopted for forming fuzzy rules. They are:
Assignment statements,
Conditional statements,
Unconditional statements.
90. DECOMPOSITION OF FUZZY RULES
A compound rule is a collection of several simple rules combined together.
Multiple conjunctive antecedent,
Multiple disjunctive antecedent,
Conditional statements (with ELSE and UNLESS).
91. DECOMPOSITION OF FUZZY RULES
Multiple Conjunctive
Antecedants
Conditional Statements ( With Else and Unless)
Multiple disjunctive
antecedent
92. AGGREGATION OF FUZZY RULES
Aggregation of rules is the process of obtaining the overall consequents from
the individual consequents provided by each rule.
Conjunctive system of rules.
Disjunctive system of rules.
95. FUZZY RULE - EXAMPLE
Rule 1: If height is short then weight is light.
Rule 2: If height is medium then weight is medium.
Rule 3: If height is tall then weight is heavy.
96. Problem: Given
(a) membership functions for short, medium-height, tall, light, medium-weight
and heavy;
(b) The three fuzzy rules;
(c) the fact that John’s height is 6’1”
estimate John’s weight.
97. Solution:
(1) From John’s height we know that
John is short (degree 0.3)
John is of medium height (degree 0.6).
John is tall (degree 0.2).
(2) Each rule produces a fuzzy set as output by truncating the consequent
membership function at the value of the antecedent membership.
98. “Principles of Soft Computing, 2nd Edition”
by S.N. Sivanandam & SN Deepa
Copyright 2011 Wiley India Pvt. Ltd. All rights reserved.
99.
100.
101. The cumulative fuzzy output is obtained by OR-ing the output from each
rule.
Cumulative fuzzy output (weight at 6’1”).
102. 1. De-fuzzify to obtain a numerical estimate of the output.
2. Choose the middle of the range where the truth value is maximum.
3. John’s weight = 80 Kg.
103. FUZZY REASONING
There exist four modes of fuzzy approximate reasoning, which include:
1. Categorical reasoning,
2. Qualitative reasoning,
3. Syllogistic reasoning,
4. Dispositional reasoning.
104. REASONING WITH FUZZY RULES
In classical systems, rules with true antecedents fire.
In fuzzy systems, truth (i.e., membership in some class) is relative, so all
rules fire (to some extent).
107. MULTIPLE ANTECEDANTS
IF x is A AND y is B THEN z is C
IF x is A OR y is B THEN z is C
Use unification (OR) or intersection (AND) operations to calculate a
membership value for the whole antecedent.
109. MULTIPLE CONSEQUENTS
IF x is A THEN y is B AND z is C
Each consequent is affected equally by the membership in the antecedent
class(es).
E.g., IF x is tall THEN x is heavy AND x has large feet.
110. FUZZY INFERENCE SYSTEMS (FIS)
Fuzzy rule based systems, fuzzy models, and fuzzy expert systems are also
known as fuzzy inference systems.
The key unit of a fuzzy logic system is FIS.
The primary work of this system is decision-making.
FIS uses “IF...THEN” rules along with connectors “OR” or “AND” for making
necessary decision rules.
The input to FIS may be fuzzy or crisp, but the output from FIS is always a
fuzzy set.
When FIS is used as a controller, it is necessary to have crisp output.
Hence, there should be a defuzzification unit for converting fuzzy variables
into crisp variables along FIS.
112. TYPES OF FIS
There are two types of Fuzzy Inference Systems:
Mamdani FIS(1975)
Sugeno FIS(1985)
113. MAMDANI FUZZY INFERENCE SYSTEMS (FIS)
Fuzzify input variables:
• Determine membership values.
Evaluate rules:
• Based on membership values of (composite) antecedents.
Aggregate rule outputs:
• Unify all membership values for the output from all rules.
Defuzzify the output:
• COG: Center of gravity (approx. by summation).
114. SUGENO FUZZY INFERENCE SYSTEMS (FIS)
The main steps of the fuzzy inference process namely,
1. fuzzifying the inputs and
2. applying the fuzzy operator are exactly the same as in MAMDANI FIS.
The main difference between Mamdani’s and Sugeno’s methods is that Sugeno
output membership functions are either linear or constant.
116. FUZZY EXPERT SYSTEMS
An expert system contains three major blocks:
Knowledge base that contains the knowledge specific to the domain of
application.
Inference engine that uses the knowledge in the knowledge base for
performing suitable reasoning for user’s queries.
User interface that provides a smooth communication between the user
and the system.
117. BLOCK DIAGRAM OF FUZZY EXPERT SYSTEMS
Examples of Fuzzy Expert System include Z-II, MILORD.
118. SUMMARY
Advantages of fuzzy logic
• Allows the use of vague linguistic terms in the rules.
Disadvantages of fuzzy logic
• Difficult to estimate membership function
• There are many ways of interpreting fuzzy rules, combining the
outputs of several fuzzy rules and de-fuzzifying the output.
119. Fuzzy Inference Processing
• There are three models for Fuzzy processing
based on the expressions of consequent parts in
fuzzy rules
Suppose xi are inputs and y is the consequents in
fuzzy rules
1. Mamdani Model: y = A
where A is a fuzzy number to reflect fuzziness
• Though it can be used in all types of systems, the
model is more suitable for knowledge processing
systems than control systems
119
120. Fuzzy Inference Processing contd..
2. TSK (Takagi-Sugano-Kang) model:
y = a0 + Ʃ ai xi where ai are constants
The output is the weighted linear combination of input
variables (it can be expanded to nonlinear
combination of input variables)
Used in fuzzy control applications
3. Simplified fuzzy model: y = c
where c is a constant
Thus consequents are expressed by constant values
120
121. Applications of Fuzzy Logic
Fuzzy logic has been used in many applications
including
- Domestic appliances like washing machines and
cameras
-Sophisticated applications such as turbine
control, data classifiers etc.
- Intelligent systems that use fuzzy logic employ
techniques for learning and adaptation to the
environment
121
122. Case Study: Controlling the speed of a motor in a room cooler
• Through this case study we can understand fuzzy
logic, defining fuzzy rules and fuzzy inference and
control mechanisms
• Mamdani style of inference processing is used
• Problem: A room cooler has a fan encased in a box
with wool or hay. The wool is continuously
moistened by water that flows through a pump
connected to a motor. The rate of flow of water is to
be determined; it is a function of room temperature
and the speed of motor
• The speed of the motor is based on two parameters:
temperature and humidity; humidity is increased to reduce
temperature
122
123. Case Study: Operation of a room cooler contd..
• Two input variables –room temperature and cooler
fan speed control the output variable – flow rate of
the water. The fuzzy regions using fuzzy terms for
input-output are defined as follows
Variable name Fuzzy terms
Temperature Cold, Cool, Moderate, Warm and Hot
Fan speed Slack, Low, Medium, Brisk, fast
((rotations per minute)
Flow rate of water Strong Negative (SN), Negative (N),
Low-Negative (LN), Medium (M), Low-Positive
(LP), Positive (P), and High-Positive (HP)
123
124. Case Study: Operation of a room cooler contd..
Fuzzy profiles are defined for each of the three parameters by
assigning memberships to their respective values
The profiles have to be carefully designed after studying the
nature and desired behavior of the system
124
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49
Temperature
Degree of
membership
Cold Cool Moderate Warm
Fig.1. Fuzzy relationships for the inputs
Temperature
1.2
1
0.8
0.6
0.4
0.2
0
Hot
125. Case Study: Operation of a room cooler contd..
Figure 2. Fuzzy relationships for the inputs Fan Motor speed
125
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49
Motor speed RPM
Degree of
membership
Slack Low Medium Brisk Fast
1.2
1
0.8
0.6
0.4
0.2
0
Slack Low Medium Brisk Fast
126. Case Study: Operation of a room cooler contd..
Figure 3. Fuzzy relationships for the outputs Water Flow Rate
126
0 0.2 0.4 0.6 0.8 1 1.2 14 1.6
Flow rate (ml/Sec)
Degree of
membership
SN N LN M LP P HP
1.2
1
0.8
0.6
0.4
0.2
0
127. Fuzzy Rules for fuzzy room cooler
The fuzzy rules form the triggers of the fuzzy engine
After a study of the system, the rules could be written as
follows
R1: If temperature is HOT and fan motor speed is
SLACK then the flow-rate is HIGH-POSITIVE
R2: If temperature is HOT and fan motor speed is LOW
then the flow-rate is HIGH-POSITIVE
R3: If temperature is HOT and fan motor speed is
MEDIUM then the flow-rate is POSITIVE
R4: If temperature is HOT and fan motor speed is
BRISK then the flow-rate is HIGH-POSITIVE
127
128. Fuzzy Rules for fuzzy room cooler contd..
R5: If temperature is WARM and fan motor speed is
MEDIUM then the flow-rate is LOW-POSITIVE
R6: If temperature is WARM and fan motor speed is
BRISK then the flow-rate is POSITIVE
R7: If temperature is COOL and fan motor speed is
LOW then the flow-rate is NEGATIVE
R8: If temperature is MODERATE and fan motor
speed is LOW then the flow-rate is MEDIUM
128
129. Fuzzification
The fuzzifier that performs the mapping of the
membership values of the input parameters
temperature and fan speed to the respective fuzzy
regions is known as fuzzification. This is the
most important step in fuzzy systems
Suppose that at some time t, the temperature is 42
degrees and fan speed is 31 rpm. The
corresponding membership values and the fuzzy
regions are shown in Table 2
129
130. Example of fuzzification
From Figure 1., the temperature 42 degrees
correspond to two membership values 0.142 and 0.2
that belong to WARM and HOT fuzzy regions
respectively
Similarly From Figure 2., the fan speed 31 rpm
corresponds to two membership values 0.25 and
0.286 that belong to MEDIUM and BRISK fuzzy
regions respectively Table 2
130
Parameters Fuzzy Regions Memberships
Temperature Warm, hot 0.142, 0.2
Fan Speed medium, brisk 0.25, 0.286
131. Example of fuzzification contd..
From Table 2, there are four combinations possible
If temperature is WARM and fan speed is MEDIUM
If temperature is WARM and fan speed is BRISK
If temperature is HOT and fan speed is MEDIUM
If temperature is HOT and fan speed is BRISK
Comparing the above combinations with the left side
of fuzzy rules R5, R6, R3, and R4 respectively, the
flow-rate should be LOW-POSITIVE, POSITIVE,
POSITIVE and HIGH-POSITIVE
The conflict should be resolved and the fuzzy region is to be
given as a value for the parameter water flow-rate
131
132. Defuzzification
• The fuzzy outputs LOW-POSITIVE, POSITIVE, and HIGH-
POSITIVE are to be converted to a single crisp value that is
provided to the fuzzy cooler system; this process is called
defuzzification
• Several methods are used for defuzzification
• The most common methods are
1. The centre of gravity method and
2. The Composite Maxima method
The centroid, of a two-dimensional shape X is the intersection of all
straight lines that divide X into two parts of equal moment about the line
or the average of all points of X. (Moment is a quantitative measure of
the shape of a set of points.)
In both these methods the composite region formed by the
portions A, B, C, and D (corresponding to rules R3, R4, R5
and R6 respectively) on the output profile is to be computed
132
137. Defuzzification contd..
137
Degreeof
membership
Temperature 42 D Centigrade Motor speed (RPM) 31
1.2
1
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
P
Flow rate (ml/Sec)
LP
HP
Centroid
A B is within C as it
is a subset of the
region C
D
Figure 8When parameters are connected by AND the
minimum of their memberships is taken
The area C is the region formed by the
application of rule R3 as shown in Figure 4.3
The area D is the region formed by the
application of rule R4 as shown in Figure 5.3
The area A is the region formed by the
application of rule R5 as shown in Figure 6.3
The area B is the region formed by the
application of rule R6 as shown in Figure 7.3
The composite region formed by the portions
A, B, C and D on the output profile is shown
in Figure 8.
The centre of gravity of this composite
region is the crisp output or the desired flow
rate value
138. Steps in Fuzzy logic based system
Formulating fuzzy regions
Fuzzy rules
Embedding a Defuzzification procedure
In Defuzzification procedure, depending on the
application, either the centre of gravity or the
composite maxima is found to obtain the crisp output