Professional Documents
Culture Documents
CHAPTER- 5
Fuzzy Logic
Learn the concept of fuzzy logic and its day-to-day utility
Explain the functions of fuzzy arithmetic and operations
Draw the structure of a fuzzy system
List the applications of fuzzy logic systems
Understand MatLab Implementation of Fuzzy Logic
Recent trends in fuzzy technology
Fuzzy Logic
Having a fundamental trade-off between precision and cost which can be called
“principle of incompatibility”.
Helps us to tackle the uncertainty and vagueness associated with the event.
5.3 Undecidability
Ambiguity that originates from the inability to distinguish between various states of
an event is termed as Undecidability
Also, fuzzy logic measures the degree to which an outcome belongs to an event while
probability measures the likely hood of event to occur.
Fuzzy Logic
Classical set as already mentioned is a collection of objects of any kind. They can be
represented as list method, rule method and characteristic function method.
Fuzzy Logic
Method Examples
Then the set A may be given by the collection or union of all singletons
A = {(1, 1.0), (2, 1.0), (3, 0.75), (4, 0.5), (5, 0.3), (6, 0.3), (7, 0.1), (8, 0.1)}
Alternative notation, the set of small integers mentioned above can be written as:
A = A(1)/1 + A(2)/2 + A(3)/3 + A(4)/4 + A(5)/5 + A(6)/6 + A(7)/7 + A(8)/8
Universe of discourse is associated with the system variable (score) and not with a
particular fuzzy set (Good score, Average score or Bad score).
The range of values covered by a particular fuzzy set is termed as domain of fuzzy
set.
The domain of fuzzy set is set of elements whose degree of membership in the fuzzy
set is greater than zero.
Fuzzy Logic
Non-convex fuzzy sets are fuzzy sets, in which membership grade alternately
increases and decreases on the domain.
Fuzzy sets in which membership grades do not alternately increases and decreases
1.0
μ (x)
0
xa
xa
x, a, b axb
0.5
b a
1 xb
0
a b
x
Fig. 5.7a Function fuzzy set (Linearly expressed gamma membership function)
1.0
0 x a
μ (x) 2 2
0.5 cx aa a xb
S x,a,b,c
xc 2
1 2 c a b x c
0
a b c
x
1 x c
Fig. 5.7b Function fuzzy set (Sigmoidal membership function)
Fuzzy Logic
1.0
μ (x)
0.5
G( x,a ,b ) e b ax
2
0
a x
1.0
μ (x) 1 xa
b x
Lx, a, b axb
0.5
ba
0 xb
0
a x
1.0
μ (x)
0 x a
0.5
x a a x b
x,a,b,c ba
c x b x
0
c b
a b c x
0
c x
Fig. 5.7e Function fuzzy set (Triangle membership function)
c
1.0
μ (x)
0 x a
0.5 x a a x b
b a
b x
x , a , b , c , d 1
c
0
a b c d
d x c x
x
Some of the important set operations that can be carried out using fuzzy sets are :
1. Intersection of fuzzy sets
2. Union of fuzzy sets
3. Complement of fuzzy sets
Intersection of two fuzzy sets contains the elements that are common to both the
sets and is also equivalent to logical AND operation.
In fuzzy logic, this operation is performed by taking the minimum of the truth
membership functions.
Union of two fuzzy sets contains all the elements belonging to both the sets and is
equivalent to logical OR operation.
In fuzzy logic, this operation is performed by taking the maximum of the truth
membership functions.
A x B x max A x , B x
The complement of a fuzzy set consists of the elements from universe which are not
present in the set. This is equivalent to logical NOT operation.
In fuzzy logic, this operation is performed by subtracting the membership value from 1.
~
A x 1 A
x
Fuzzy Logic
A fuzzy set A is said to be an empty set if it has no members and its membership
function is zero everywhere in its universe of discourse U.
if A(x) = 0, x U
If the membership functions of any two fuzzy sets A and B are equal everywhere in
the universe of discourse, then the two fuzzy sets are said to be equal thereby
A fuzzy set A is supported only if the crisp set of all x U such that the membership
The product of the fuzzy set A and B produces a new fuzzy set, with its membership
function value equal to the algebraic product of the membership function of A and B.
A.B (x) A (x). B (x)
Fuzzy Logic
The membership function of a fuzzy set A is multiplied by the crisp number „b‟ to
obtain a new fuzzy set whose membership function bA (x).
(x) b . A (x)
b A
If is set as the power of a fuzzy set A, then a new fuzzy set A has a membership
function value
x x
A
A
Fuzzy Logic
Part A:
( A) A
Double negation law
AAA A A
Idempotency
A
ABB A B B A
Commutativity
A
Associative Property ( A B) C A (B ( A B) C A (B
C) C)
Distributive Property A (B C) ( A B) ( A A (B C) ( A B) ( A
C) C)
Adsorption
A ( A B) A ( A B)
A A
De Morgan‟s laws
ABA
ABAB B
Fuzzy Logic
Part B :
Law of Contradiction A B
Some of the properties that are not valid for fuzzy sets but valid for crisp sets are
Fuzzy Logic
The alpha cut method for discrete fuzzy set is carried out by performing arithmetic
operations within the boundary elements present between fuzzy sets and the solutions
that depend on the boundary values of the discrete fuzzy function
(b) Subtraction : A - B = [a1(), a2()] - [b1(), b2()], A - B = [a1() - b2(), a2() - b1()]
(c) Multiplication: A.B [a1(),a2()] . [b1(),b1()], A.B = [a1() .b1(), a () .b ()]
2 2
(d) Division:
A B 1a(( )) , a2 b( ) ,b a ( ) a ( )
A B ()
, 2()
1( ) 2 1
b 2 b1
Fuzzy Logic
The alpha cut method for discrete fuzzy set is carried out by performing arithmetic
operations within the boundary elements present between fuzzy sets and the solutions
that depend on the boundary values of the discrete fuzzy function
If the membership functions are non-linear or for higher order arithmetic operations,
it is not easy to carry out arithmetic operations.
In the first step, it has been assumed that the membership functions of the variables
are at least linear and if not, then it has to be expressed in terms of approximate linear
functions.
In case of multiplication and division mathematical complexity i.e., the order of in
a1() is proportional to the order of multiplication and division. Hence, generation of
suitable membership function became difficult.
Fuzzy Logic
A fuzzy relation generalizes the aim of binary classical relation into one that allows
partial membership. It is developed by allowing relationship between elements of two
or more sets to take an infinite number of degrees of relation between extreme of
"Completely Related" and "Non-Related ". It converts relation into matter of degree.
Fuzzy compositions can combine fuzzy relations defined on different Cartesian products
with each other in a number of different ways. A more complex form of relation is called
the „composition of fuzzy relation‟, where the associations among fuzzy sets are of
concern in addition to associations among the elements of each fuzzy set.
Max-Min Composition:
R1 o R 2
V R (x, y) 2 (y, z) / (x,
R R o R
(x, z) V R (x, y) R (y,
1 y
xx z z) z)
Max-Star Composition:
y i 2 1 2
R1 * R 2 V R1
(x, y) * R (y, z) / (x, z) R1*R2 (x, z) V R (x, y) * 1 R2 ( y,
y
y
xx 2
z
Max-Product Composition: z)
R1 . R 2
V R (x, y). R (y, z) / (x,
y 1
R 1 .R 2
y
(x, z) V R (x, y) . R (y, z)
1 2
X Z y,) 2
Max-Average Composition:
R1 R 2
V 21
y R (x, y) R (y, z) / (x, z) R
(x, z) V
1
(x, y) R (y, z)
1
R 2 R1
XZ 2
1
y 2 2
Fuzzy Logic
A collection of these primary terms will form phrases, of our natural language. Examples
of some atomic terms are slow, medium, young, beautiful, angry, cold, temperature etc.
The collection of atomic terms can form compound terms. Examples of compound terms
are very cold, medium speed, young lady, fairly beautiful picture, etc .
M e m b e r s h i p F u n c t i o n M o d e l f o r A t o m i c Va l u e s
1
0 . 9
0 . 8
0 . 7
0 . 6
0 . 5
MembershipValue of
0 . 4
Temperature
0 . 3
0 . 2
0 . 1
0
0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 1 0 0 1 1 0 1 2 0
Te m p e r a t u r e ( T ) i n D e g r e e s
Fuzzy Logic
Very 2
x
2
I
[ ( x )] 4
Very very 4 x
I 1
[ ( x )]
More or less 1
2
Slightly 2
[
I x
(x)]1 . 2 5
1.25
Plus x
I
[ (x)]0 . 7 5
Minus 0 .7 5
I
x
(x)
1
, x x
1 , x x x
min
Over I
max 0, x x 0, x x min
max ( x )
1
, x x
1 , x x min x
max
Under I
0, xx 0, x x m a x
min 2
(x) ( x )
2 , 0 0.5
22 , 0 I
x I
x
Indeed 0.5
1 2 1
( x ) 2 (x)
, 0.5 1.0
1 2[1 ]2 , 0.5 I x I x
1.0
Fuzzy Logic
1. Fuzzy Concentration
1
A(Low, T)
1
1 0.0005(T 30)2.4
0 .8
L ow B efo r e
2 Concentration
A(Very Low, T)
0 .6
Membership
11 0.0005(T
2.4
Value
30) 0 .4
A ft e r
0 .2
Concentration
V er y
Low
0
- 0 .2
0 20 40 60 80 1 00 1 20
Te m p e r a t u r e ( T ) in D e g r e e s
Fuzzy Logic
2. Fuzzy Dilation
Dilation tend to dilate or increase the fuzziness of the elements in a fuzzy set by
increasing the degree of membership of all elements that are only „„partly‟‟ in the set.
D ila tion
1
0 .9
1
A (Low, T) 0 .8 Afte r
1 0.0005(T 30)
D ila tion
2.4 0 .7
L ow
0 .6
0.5
Slightly
1
Membership
L ow
A (Slightly Low, T)
0 .5
2.4
1 0.0005(T 30)
Value
0 .4 B efo r e
D ila t ion
0 .3
0 .2
0 .1
0
0 20 40 60 80 1 00 1 20
Te mpe ra tur e(T) in D e g r e e s
Fuzzy Logic
3. Fuzzy Intensification
0.9
B efo re
A (Low, T) 1 0.8
I n ten si fi cation
L ow
1 0.0005(T 30) 2.4 0.7 A fte r
I nte ns ifi cati on
Membership Value
0.6
I nd e e d
2
L ow
0.5
2 1 , 0 1 0.5
2.0
1 0.005(T 30) 2.0
1 0.005(T 30)
A (Indeed Low, T) 2
1 0.4
1
1 2 , 0.5 1.0
2.0
1 0.005(T
0.3
1 0.005(T 30)
2.0
30) 0.2
0.1
0
0 20 40 60 80 100 120
Temperature(T) in Degrees
Fuzzy Logic
The precedence of operation should be “NOT” in the First, “AND” in the second and
“OR” in the third.
For example, if we have a compound terms “plus very minus very low”, then
following the rule “association to the right” while using the parentheses we get “Plus
(very (minus (very (low))))”.
Fuzzy Logic
5.10.1 Fuzzification
The process of converting the crisp values to fuzzy variable is called „fuzzification‟.
Fuzzy Logic
A sentence having only “true (1)” and “false (0)” as its truth value is called propositions
which belongs to classical proportional logic.
Fuzzy connectives
- Negation P 1 T (P)
Mamdani Min
OR()
A if B ( y) 1
Drastic Product if A (y) 1
OR()
if ( y) 1, ( y) 1
1, if A (x) B (y)
Standard Sequence
0, if A (x) B (y) AND()
1, if A (x) B (y)
Gougen B (y) , if (x) (y) AND()
A B
A (x)
A'
(Analytical ly Known)
x
(Analytical ly Unknown )
is B'
y
2. Generalized Modus Tollens (GMT)
is
GMT means “the way that denies by denying”.
y is '
(Analytical ly
B'
Known) (Analytical ly
x is
Unknown )
A''
Fuzzy Logic
Fuzzy inference algorithms are procedures that perform evaluation of fuzzy if/then rules
If x is A1 then y is B1 ELSE
If x is A2 then y is B2 ELSE
……
if x is An then y is Bn
If x1 is A1p AND x2 is A2p AND…..AND x1n is Anp then y is Bq ELSE, can be analytically
described by an algorithmic relation of the form
R(x1i, x2i,……..xni,yi) =
( x1i ,x 2i ,.....,x ni ,y j ) /( x1i ,x 2i ,.....,xni ,y j
( x 1 ,x 2,......,xni, y j )
Fuzzy Logic
5.10.6 Defuzzification
Defuzzification is the process of converting the fuzzy set into a crisp value.
5.10.6 Defuzzification
OUT (ui ) N
max( (ui )) u i OUT (u i )
1Peak 1. i1
u
*
0
1. N
0.
point
0
0.
9
0.
OUT (u i )
9
(ui ) 0.
8
0.
i1
8 7
0. 0.
7 6
0. 0.
6 5
0. 0.
5 4
0. 0.
4 3
0. 0.
3 2
0. 0.
2 1
0.
1
0
0 1 2 3 4 5 6 7 8 9 10 1 12 13 14 15 16
1
u* ui u 6.65
*
ui
Fuzzy Logic
5.10.6 Defuzzification
u *
z j O U T (z j) (d) Mean of Maxima (MOM)
j 1Z
OUT (u i )
z2 OUT (z j)
M
z1 j1 1
u
*
u
1.0 m
0.9 M
0.8 m1
0.7
0.4 N n
0.3
ui
Ck
' (u i )
0.2
0.1
u* i1
N n
k1
0
C ' (u i )
k
i1 k1
1 2 3 13 14 15
4 5 6 7 8 9 10 11 12 16 ui
u * 5.86
Fuzzy Logic
5.10.6 Defuzzification
OUT (ui )
C2
N
max( C m (u)) max( C i (u)), i C
1.
0
0.
C1 u i C m i 1....N
u * min( u )i
9
0.
u * (uN )
i1
8
0.
7
i1
C m
(u i )
(h) Last of Maxima
0.
6
Cm = C1
0.
5
0.
4
0. u * max( u i)
3
0.
2
0.
1
0 ui
1 2 3 4 5 6 7 8 9 10 16
11 12 13 14 15
(a) Continuity
(b) Disambiguity
(c) Plausibility
(e)Weighting Methods
However, the right choice of the defuzzification techniques for a particular application
can be selected only by understanding the trade-off between these criteria.