SlideShare a Scribd company logo
1 of 138
Fuzzy Logic
 Introduction
 Basic Concepts of Fuzzy Logic
 Fuzzy Sets
 Fuzzy Relations
 Fuzzy Graphs
 Fuzzy Arithmetic
 Fuzzy If-Then Rules
 Fuzzy Implications and Approximate
Reasoning
1
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.
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
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
5
The following general symbols are normally
employed:
Crisp sets
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
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
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
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 nAAAA
}|{ IiAi 
9
BA
BA ABBA  and
BA
BA
BABABA  and
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
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



Crisp sets: an overview
12
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
Partially ordered set
14
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
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
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
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
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
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
Fuzzy sets: basic types
21
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
Membership Functions
(MFs)
Characteristics of MFs:
 Subjective measures
 Not probability functions
MFs
Heights5’10’’
.5
.8
.1
“tall” in Asia
“tall” in the US
“tall” in NBA
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).
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
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
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.
Fuzzy Partition
Fuzzy partitions formed by the linguistic
values “young”, “middle aged”, and “old”:
More Definitions
Support (set of all points)
Core (where A (x)=1)
Normality (core is
nonempty)
Crossover points (where
A (x)=0.5)
Fuzzy singleton (support
contains one element)
a-cut, strong a-cut (where
A (x) >=a)
Convexity
Fuzzy numbers
Bandwidth
Symmetricity
Open left or right, closed
MF Terminology
MF
X
.5
1
0
Core
Crossover points
Support
a - cut
a
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
Set-Theoretic Operations
Subset:
Complement:
Union:
Intersection:
A B A B   
C A B x x x x xc A B A B         ( ) max( ( ), ( )) ( ) ( )
C A B x x x x xc A B A B         ( ) min( ( ), ( )) ( ) ( )
A X A x xA A     ( ) ( )1
Set-Theoretic Operations
Fuzzy sets: basic types
 An example:
 Define the seven levels of education:
34
Highly
educated (0.8)
Very highly
educated (0.5)
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
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
1.3 Fuzzy sets: basic types
37
Fuzzy sets: basic types
 Discussions:
 The primary disadvantage of interval-
value fuzzy sets, compared with
ordinary fuzzy sets, is computationally
more demanding.
38
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


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.
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
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
Ages and their memberships
43
Age Infant Child Adole
scent
Young Adult Old
2 1 0 0 1 0 0
4 0.1 0.5 0 1 0 0
10 0 1 0.3 1 0 0
15 0 0.8 1 1 0 0
21 0 0 0.1 1 0.8 0.1
30 0 0 0 0.6 1 0.3
35 0 0 0 0.5 1 0.35
40 0 0 0 0. 4 1 0.4
45 0 0 0 0.2 1 0.6
60 0 0 0 0 1 0.8
70 0 0 0 0 1 1
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
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
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
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
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
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
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
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
CLASSICAL RELATIONS
AND FUZZY RELATIONS
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.
CRISP CARTESIAN PRODUCT
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)}.
CRISP RELATIONS
Y={1,2,3,4}
A relation R can be defined as
R={(x,y)/ y=x+1, x, y  Y
A relation matrix R is given by 0 0 0 0
0 0 0 1
0 0 1 0
0 1 0 0
CRISP BINARY RELATIONS
Examples of binary relations
OPERATIONS ON CRISP RELATIONS
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.
COMPOSITION ON CRISP RELATIONS
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!)
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
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
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
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)  
yY
( ˜R
(x,y)  ˜S
(y,z))
max product
˜T
(x,z)  
yY
( ˜R
(x,y)  ˜S
(y, z))
Fuzzy Composition: Example (max-min)
X  {x1,x2},
˜T
(x1,z1)  
yY
( ˜R
(x1,y)  ˜S
(y,z1))
 max[min(0.7,0.9),min(0.5, 0.1)]
 0.7
Y {y1,y2},and Z  {z1,z2,z3}
Consider the following fuzzy relations:
˜R 
x1
x2
0.7 0.5
0.8 0.4




y1 y2
and ˜S 
y1
y2
0.9 0.6 0.5
0.1 0.7 0.5




z1 z2 z3
Using max-min composition,
} ˜T 
x1
x2
0.7 0.6 0.5
0.8 0.6 0.4




z1 z2 z3
Fuzzy Composition: Example (max-
Prod)
X  {x1,x2},
˜T
(x2, z2 )  
yY
( ˜R
(x2 , y)  ˜S
(y, z2))
 max[(0.8,0.6),(0.4, 0.7)]
 0.48
Y {y1,y2},and Z  {z1,z2,z3}
Consider the following fuzzy relations:
˜R 
x1
x2
0.7 0.5
0.8 0.4




y1 y2
and ˜S 
y1
y2
0.9 0.6 0.5
0.1 0.7 0.5




z1 z2 z3
Using max-product composition,
} ˜T 
x1
x2
.63 .42 .25
.72 .48 .20




z1 z2 z3
FUZZY RELATION
OPERATIONS ON FUZZY RELATION
The basic operation on fuzzy sets also apply on fuzzy relations.
PROPERTIES OF FUZZY RELATIONS
The properties of fuzzy sets (given below) hold good for fuzzy relations as well.
 Commutativity,
 Associativity,
 Distributivity,
 Involution,
 Idempotency,
 DeMorgan’s Law,
 Excluded Middle Laws.
72
FUZZY GRAPH
Vertices, edges, Directed, undirected, cycle,
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)
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
Extension Principle: Example
Let A(x) = bell(x;1.5,2,0.5)
and
f(x) = { (x-1)2-1, if x >=0
x, if x <=0
Extension Principle: Example
Around-4 = 0.3/2 + 0.6/3 + 1/4 + 0.6/5 + 0.3/6
and
Y = f(x) = x2 -6x +11
Arithmetic Operations on Fuzzy Numbers
Applying the extension principle to arithmetic operations, we
have
Fuzzy Addition:
Fuzzy Subtraction:
Fuzzy Multiplication:
Fuzzy Division:
AB(z)  
x,y
xyz
A(x) B (y)
AB(z)  
x,y
xyz
A(x) B (y)
AB(z)  
x,y
xyz
A(x) B (y)
A / B(z) 
x,y
x / yz
A(x) B (y)
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
FUZZY RULE BASE AND
APPROXIMATE
REASONING
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.
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
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
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.
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.
 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).
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]
FORMATION OF FUZZY RULES
Three general forms are adopted for forming fuzzy rules. They are:
 Assignment statements,
 Conditional statements,
 Unconditional statements.
Assignment Statements
Conditional Statements
Unconditional Statements
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).
DECOMPOSITION OF FUZZY RULES
Multiple Conjunctive
Antecedants
Conditional Statements ( With Else and Unless)
Multiple disjunctive
antecedent
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.
AGGREGATION OF FUZZY RULES
Conjunctive system of rules
Disjunctive system of rules
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.
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.
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.
“Principles of Soft Computing, 2nd Edition”
by S.N. Sivanandam & SN Deepa
Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
 The cumulative fuzzy output is obtained by OR-ing the output from each
rule.
 Cumulative fuzzy output (weight at 6’1”).
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.
FUZZY REASONING
There exist four modes of fuzzy approximate reasoning, which include:
1. Categorical reasoning,
2. Qualitative reasoning,
3. Syllogistic reasoning,
4. Dispositional reasoning.
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).
SINGLE RULE WITH SINGLE ANTECEDANT
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.
MULTIPLE RULE WITH MULTIPLE ANTECEDANTS
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.
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.
BLOCK DIAGRAM OF FIS
TYPES OF FIS
There are two types of Fuzzy Inference Systems:
 Mamdani FIS(1975)
 Sugeno FIS(1985)
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).
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.
SUGENO FIS
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.
BLOCK DIAGRAM OF FUZZY EXPERT SYSTEMS
Examples of Fuzzy Expert System include Z-II, MILORD.
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Defuzzification contd..
• ttttt
133
1 4 7… 37 40 43 46 48
DegreeofmembershipDegreeofmembership
Degreeof
membership
1 4 … 13…. 31 34 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Hot
Medium
Temperature 42 D Centigrade Motor speed (RPM) 31
0.25
1.2
1
0.8
0.6
0.4
0.2
0
Rule R3
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
P
0.2
Flow rate (ml/Sec)
Min(0.2,0.25) = 0.2
C
Figure 4.1
Figure 4.2
Figure 4.3
Defuzzification contd..
• ttttt
134
1 4 7… 37 40 43 46 48
DegreeofmembershipDegreeofmembership
Degreeof
membership
1 4 … 28 ..31.. 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Hot
Brisk
Temperature 42 D Centigrade Motor speed (RPM) 31
0.286
1.2
1
0.8
0.6
0.4
0.2
0
Rule R4
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
HP
0.2
Flow rate (ml/Sec)
Min(0.2,0.286) = 0.2
D
Figure 5.1
Figure 5.2
Figure 5.3
Defuzzification contd..
• ttttt
135
1 4 7..28.. 40 43 46 48
DegreeofmembershipDegreeofmembership
Degreeof
membership
1 4 … 13…. 31 34 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Warm
Medium
Temperature 42 D Centigrade Motor speed (RPM) 31
0.25
1.2
1
0.8
0.6
0.4
0.2
0
Rule R5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
LP
0.142
Flow rate (ml/Sec)
Min(0.142,0.25) = 0.25
A
Figure 6.1
Figure 6.2
Figure 6.3
Defuzzification contd..
• ttttt
136
1 4 7..28.. 40 43 46 48
DegreeofmembershipDegreeofmembership
Degreeof
membership
1 4 …13.. 28..31 34 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Warm
Brisk
Temperature 42 D Centigrade Motor speed (RPM) 31
0.286
1.2
1
0.8
0.6
0.4
0.2
0
Rule R6
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
P
0.142
Flow rate (ml/Sec)
Min(0.142,0.286) =0.142
B
Figure 7.1
Figure 7.2
Figure 7.3
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
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

More Related Content

What's hot

Extension principle
Extension principleExtension principle
Extension principleSavo Delić
 
Intro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMIntro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMNYC Predictive Analytics
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learningParas Kohli
 
Fuzzy Set Theory
Fuzzy Set TheoryFuzzy Set Theory
Fuzzy Set TheoryAMIT KUMAR
 
PRML Chapter 9
PRML Chapter 9PRML Chapter 9
PRML Chapter 9Sunwoo Kim
 
Independent Component Analysis
Independent Component Analysis Independent Component Analysis
Independent Component Analysis Ibrahim Amer
 
Nonnegative Matrix Factorization
Nonnegative Matrix FactorizationNonnegative Matrix Factorization
Nonnegative Matrix FactorizationTatsuya Yokota
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningSujith Jayaprakash
 
Evaluating classification algorithms
Evaluating classification algorithmsEvaluating classification algorithms
Evaluating classification algorithmsUtkarsh Sharma
 
Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning Usama Fayyaz
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.pptbutest
 

What's hot (20)

Extension principle
Extension principleExtension principle
Extension principle
 
Hasse diagram
Hasse diagramHasse diagram
Hasse diagram
 
Intro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMIntro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVM
 
Crisp set
Crisp setCrisp set
Crisp set
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
 
FUZZY COMPLEMENT
FUZZY COMPLEMENTFUZZY COMPLEMENT
FUZZY COMPLEMENT
 
Fuzzy Set Theory
Fuzzy Set TheoryFuzzy Set Theory
Fuzzy Set Theory
 
PRML Chapter 9
PRML Chapter 9PRML Chapter 9
PRML Chapter 9
 
Crisp sets
Crisp setsCrisp sets
Crisp sets
 
AI Algorithms
AI AlgorithmsAI Algorithms
AI Algorithms
 
Independent Component Analysis
Independent Component Analysis Independent Component Analysis
Independent Component Analysis
 
Nonnegative Matrix Factorization
Nonnegative Matrix FactorizationNonnegative Matrix Factorization
Nonnegative Matrix Factorization
 
FUZZY LOGIC
FUZZY LOGIC FUZZY LOGIC
FUZZY LOGIC
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
L1 fuzzy sets & basic operations
L1 fuzzy sets & basic operationsL1 fuzzy sets & basic operations
L1 fuzzy sets & basic operations
 
Evaluating classification algorithms
Evaluating classification algorithmsEvaluating classification algorithms
Evaluating classification algorithms
 
Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning
 
L3 some other properties
L3 some other propertiesL3 some other properties
L3 some other properties
 
Traveling Salesman Problem
Traveling Salesman Problem Traveling Salesman Problem
Traveling Salesman Problem
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.ppt
 

Similar to Fuzzylogic

Optimization using soft computing
Optimization using soft computingOptimization using soft computing
Optimization using soft computingPurnima Pandit
 
Unit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdfUnit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdfRamya Nellutla
 
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptxsaadurrehman35
 
Fuzzy Logic.pptx
Fuzzy Logic.pptxFuzzy Logic.pptx
Fuzzy Logic.pptxImXaib
 
Lecture 1 computational intelligence
Lecture 1  computational intelligenceLecture 1  computational intelligence
Lecture 1 computational intelligenceParveenMalik18
 
Grade 11- Concept of functions rev.1.pptx
Grade 11- Concept of functions rev.1.pptxGrade 11- Concept of functions rev.1.pptx
Grade 11- Concept of functions rev.1.pptxAlwinCAsuncion
 
Fuzzy sets
Fuzzy setsFuzzy sets
Fuzzy setsVeni7
 
Lecture 005-15_fuzzy logic _part1_ membership_function.pdf
Lecture 005-15_fuzzy logic _part1_ membership_function.pdfLecture 005-15_fuzzy logic _part1_ membership_function.pdf
Lecture 005-15_fuzzy logic _part1_ membership_function.pdftusharjangra5
 
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).pptDediTriLaksono1
 
Fuzzy Set Theory and Classical Set Theory (Soft Computing)
Fuzzy Set Theory and Classical Set Theory (Soft Computing)Fuzzy Set Theory and Classical Set Theory (Soft Computing)
Fuzzy Set Theory and Classical Set Theory (Soft Computing)Amit Kumar Rathi
 
2 data structure in R
2 data structure in R2 data structure in R
2 data structure in Rnaroranisha
 
AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...
AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...
AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...ijfls
 
Fuzzy logic and fuzzy time series edited
Fuzzy logic and fuzzy time series   editedFuzzy logic and fuzzy time series   edited
Fuzzy logic and fuzzy time series editedProf Dr S.M.Aqil Burney
 

Similar to Fuzzylogic (20)

Optimization using soft computing
Optimization using soft computingOptimization using soft computing
Optimization using soft computing
 
Unit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdfUnit-II -Soft Computing.pdf
Unit-II -Soft Computing.pdf
 
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
53158699-d7c5-4e6e-af19-1f642992cc58-161011142651.pptx
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Fuzzy Logic.pptx
Fuzzy Logic.pptxFuzzy Logic.pptx
Fuzzy Logic.pptx
 
Lecture 1 computational intelligence
Lecture 1  computational intelligenceLecture 1  computational intelligence
Lecture 1 computational intelligence
 
Grade 11- Concept of functions rev.1.pptx
Grade 11- Concept of functions rev.1.pptxGrade 11- Concept of functions rev.1.pptx
Grade 11- Concept of functions rev.1.pptx
 
WEEK-1.pdf
WEEK-1.pdfWEEK-1.pdf
WEEK-1.pdf
 
2.2.ppt.SC
2.2.ppt.SC2.2.ppt.SC
2.2.ppt.SC
 
Fuzzy sets
Fuzzy setsFuzzy sets
Fuzzy sets
 
ANFIS
ANFISANFIS
ANFIS
 
Lecture 005-15_fuzzy logic _part1_ membership_function.pdf
Lecture 005-15_fuzzy logic _part1_ membership_function.pdfLecture 005-15_fuzzy logic _part1_ membership_function.pdf
Lecture 005-15_fuzzy logic _part1_ membership_function.pdf
 
sets.pptx
sets.pptxsets.pptx
sets.pptx
 
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt
00_1 - Slide Pelengkap (dari Buku Neuro Fuzzy and Soft Computing).ppt
 
Fuzzy Set Theory and Classical Set Theory (Soft Computing)
Fuzzy Set Theory and Classical Set Theory (Soft Computing)Fuzzy Set Theory and Classical Set Theory (Soft Computing)
Fuzzy Set Theory and Classical Set Theory (Soft Computing)
 
A
AA
A
 
FUZZY LOGIC
FUZZY LOGICFUZZY LOGIC
FUZZY LOGIC
 
2 data structure in R
2 data structure in R2 data structure in R
2 data structure in R
 
AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...
AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...
AN ALPHA -CUT OPERATION IN A TRANSPORTATION PROBLEM USING SYMMETRIC HEXAGONAL...
 
Fuzzy logic and fuzzy time series edited
Fuzzy logic and fuzzy time series   editedFuzzy logic and fuzzy time series   edited
Fuzzy logic and fuzzy time series edited
 

More from Manju Rajput

Lec12 semantic processing
Lec12 semantic processingLec12 semantic processing
Lec12 semantic processingManju Rajput
 
Tools for data warehousing
Tools  for data warehousingTools  for data warehousing
Tools for data warehousingManju Rajput
 
Snake project report
Snake project reportSnake project report
Snake project reportManju Rajput
 
Crucial decisions in designing a data warehouse
Crucial decisions in designing a data warehouseCrucial decisions in designing a data warehouse
Crucial decisions in designing a data warehouseManju Rajput
 
Crt display devices
Crt display devicesCrt display devices
Crt display devicesManju Rajput
 
blue brain technology
blue brain technologyblue brain technology
blue brain technologyManju Rajput
 

More from Manju Rajput (12)

Lec12 semantic processing
Lec12 semantic processingLec12 semantic processing
Lec12 semantic processing
 
1111111112
11111111121111111112
1111111112
 
Tools for data warehousing
Tools  for data warehousingTools  for data warehousing
Tools for data warehousing
 
Snake project report
Snake project reportSnake project report
Snake project report
 
Crucial decisions in designing a data warehouse
Crucial decisions in designing a data warehouseCrucial decisions in designing a data warehouse
Crucial decisions in designing a data warehouse
 
Metadata
MetadataMetadata
Metadata
 
Fuzzylogic
Fuzzylogic Fuzzylogic
Fuzzylogic
 
Crt display devices
Crt display devicesCrt display devices
Crt display devices
 
blue brain technology
blue brain technologyblue brain technology
blue brain technology
 
Introduction cg
Introduction cgIntroduction cg
Introduction cg
 
Autocad
AutocadAutocad
Autocad
 
Onlinejob
OnlinejobOnlinejob
Onlinejob
 

Recently uploaded

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Fuzzylogic

  • 1. Fuzzy Logic  Introduction  Basic Concepts of Fuzzy Logic  Fuzzy Sets  Fuzzy Relations  Fuzzy Graphs  Fuzzy Arithmetic  Fuzzy If-Then Rules  Fuzzy Implications and Approximate Reasoning 1
  • 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
  • 5. 5 The following general symbols are normally employed: Crisp sets
  • 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 nAAAA }|{ 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   
  • 12. Crisp sets: an overview 12
  • 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
  • 21. Fuzzy sets: basic types 21
  • 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
  • 23. Membership Functions (MFs) Characteristics of MFs:  Subjective measures  Not probability functions MFs Heights5’10’’ .5 .8 .1 “tall” in Asia “tall” in the US “tall” in NBA
  • 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.
  • 28. Fuzzy Partition Fuzzy partitions formed by the linguistic values “young”, “middle aged”, and “old”:
  • 29. More Definitions Support (set of all points) Core (where A (x)=1) Normality (core is nonempty) Crossover points (where A (x)=0.5) Fuzzy singleton (support contains one element) a-cut, strong a-cut (where A (x) >=a) Convexity Fuzzy numbers Bandwidth Symmetricity Open left or right, closed
  • 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
  • 32. Set-Theoretic Operations Subset: Complement: Union: Intersection: A B A B    C A B x x x x xc A B A B         ( ) max( ( ), ( )) ( ) ( ) C A B x x x x xc A B A B         ( ) min( ( ), ( )) ( ) ( ) A X A x xA A     ( ) ( )1
  • 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
  • 37. 1.3 Fuzzy sets: basic types 37
  • 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
  • 43. Ages and their memberships 43 Age Infant Child Adole scent Young Adult Old 2 1 0 0 1 0 0 4 0.1 0.5 0 1 0 0 10 0 1 0.3 1 0 0 15 0 0.8 1 1 0 0 21 0 0 0.1 1 0.8 0.1 30 0 0 0 0.6 1 0.3 35 0 0 0 0.5 1 0.35 40 0 0 0 0. 4 1 0.4 45 0 0 0 0.2 1 0.6 60 0 0 0 0 1 0.8 70 0 0 0 0 1 1
  • 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)}.
  • 56. CRISP RELATIONS Y={1,2,3,4} A relation R can be defined as R={(x,y)/ y=x+1, x, y  Y A relation matrix R is given by 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0
  • 57. CRISP BINARY RELATIONS Examples of binary relations
  • 58. OPERATIONS ON CRISP RELATIONS
  • 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.
  • 60. COMPOSITION ON CRISP RELATIONS
  • 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)   yY ( ˜R (x,y)  ˜S (y,z)) max product ˜T (x,z)   yY ( ˜R (x,y)  ˜S (y, z))
  • 66. Fuzzy Composition: Example (max-min) X  {x1,x2}, ˜T (x1,z1)   yY ( ˜R (x1,y)  ˜S (y,z1))  max[min(0.7,0.9),min(0.5, 0.1)]  0.7 Y {y1,y2},and Z  {z1,z2,z3} Consider the following fuzzy relations: ˜R  x1 x2 0.7 0.5 0.8 0.4     y1 y2 and ˜S  y1 y2 0.9 0.6 0.5 0.1 0.7 0.5     z1 z2 z3 Using max-min composition, } ˜T  x1 x2 0.7 0.6 0.5 0.8 0.6 0.4     z1 z2 z3
  • 67. Fuzzy Composition: Example (max- Prod) X  {x1,x2}, ˜T (x2, z2 )   yY ( ˜R (x2 , y)  ˜S (y, z2))  max[(0.8,0.6),(0.4, 0.7)]  0.48 Y {y1,y2},and Z  {z1,z2,z3} Consider the following fuzzy relations: ˜R  x1 x2 0.7 0.5 0.8 0.4     y1 y2 and ˜S  y1 y2 0.9 0.6 0.5 0.1 0.7 0.5     z1 z2 z3 Using max-product composition, } ˜T  x1 x2 .63 .42 .25 .72 .48 .20     z1 z2 z3
  • 69.
  • 70. OPERATIONS ON FUZZY RELATION The basic operation on fuzzy sets also apply on fuzzy relations.
  • 71. PROPERTIES OF FUZZY RELATIONS The properties of fuzzy sets (given below) hold good for fuzzy relations as well.  Commutativity,  Associativity,  Distributivity,  Involution,  Idempotency,  DeMorgan’s Law,  Excluded Middle Laws.
  • 72. 72 FUZZY GRAPH Vertices, edges, Directed, undirected, cycle,
  • 73.
  • 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
  • 76. Extension Principle: Example Let A(x) = bell(x;1.5,2,0.5) and f(x) = { (x-1)2-1, if x >=0 x, if x <=0
  • 77. Extension Principle: Example Around-4 = 0.3/2 + 0.6/3 + 1/4 + 0.6/5 + 0.3/6 and Y = f(x) = x2 -6x +11
  • 78. Arithmetic Operations on Fuzzy Numbers Applying the extension principle to arithmetic operations, we have Fuzzy Addition: Fuzzy Subtraction: Fuzzy Multiplication: Fuzzy Division: AB(z)   x,y xyz A(x) B (y) AB(z)   x,y xyz A(x) B (y) AB(z)   x,y xyz A(x) B (y) A / B(z)  x,y x / yz 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
  • 80. FUZZY RULE BASE AND APPROXIMATE REASONING
  • 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.
  • 93. AGGREGATION OF FUZZY RULES Conjunctive 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).
  • 105. SINGLE RULE WITH SINGLE ANTECEDANT
  • 106.
  • 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.
  • 108. MULTIPLE RULE WITH MULTIPLE ANTECEDANTS
  • 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
  • 133. Defuzzification contd.. • ttttt 133 1 4 7… 37 40 43 46 48 DegreeofmembershipDegreeofmembership Degreeof membership 1 4 … 13…. 31 34 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Hot Medium Temperature 42 D Centigrade Motor speed (RPM) 31 0.25 1.2 1 0.8 0.6 0.4 0.2 0 Rule R3 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 P 0.2 Flow rate (ml/Sec) Min(0.2,0.25) = 0.2 C Figure 4.1 Figure 4.2 Figure 4.3
  • 134. Defuzzification contd.. • ttttt 134 1 4 7… 37 40 43 46 48 DegreeofmembershipDegreeofmembership Degreeof membership 1 4 … 28 ..31.. 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Hot Brisk Temperature 42 D Centigrade Motor speed (RPM) 31 0.286 1.2 1 0.8 0.6 0.4 0.2 0 Rule R4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 HP 0.2 Flow rate (ml/Sec) Min(0.2,0.286) = 0.2 D Figure 5.1 Figure 5.2 Figure 5.3
  • 135. Defuzzification contd.. • ttttt 135 1 4 7..28.. 40 43 46 48 DegreeofmembershipDegreeofmembership Degreeof membership 1 4 … 13…. 31 34 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Warm Medium Temperature 42 D Centigrade Motor speed (RPM) 31 0.25 1.2 1 0.8 0.6 0.4 0.2 0 Rule R5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 LP 0.142 Flow rate (ml/Sec) Min(0.142,0.25) = 0.25 A Figure 6.1 Figure 6.2 Figure 6.3
  • 136. Defuzzification contd.. • ttttt 136 1 4 7..28.. 40 43 46 48 DegreeofmembershipDegreeofmembership Degreeof membership 1 4 …13.. 28..31 34 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Warm Brisk Temperature 42 D Centigrade Motor speed (RPM) 31 0.286 1.2 1 0.8 0.6 0.4 0.2 0 Rule R6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 P 0.142 Flow rate (ml/Sec) Min(0.142,0.286) =0.142 B Figure 7.1 Figure 7.2 Figure 7.3
  • 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