Iiitmj FS NPP PDF
Iiitmj FS NPP PDF
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
x a
x, a , b a xb
0.5
b a
1 xb
0
a b
x
Fig. 5.7a Function fuzzy set (Linearly expressed gamma membership function)
xa
1.0
0
μ (x) x a 2
2 axb
ca
0.5
Sx , a , b , c
1 2 x c
2
bxc
0
a b c ca
x
1 xc
Fig. 5.7b Function fuzzy set (Sigmoidal membership function)
Fuzzy Logic
1.0
μ (x)
0.5
G( x ,a , b ) e ba x
2
0
a x
1.0
μ (x) 1 xa
b x
0.5
L x, a , b a xb
b a
0 xb
0
a b x
1.0
μ (x)
0 xa
x a
0.5
axb
b a
x , a , b , c c x
bxc
c b
0
a b c
x
0 xc
Fig. 5.7e Function fuzzy set (Triangle membership function)
1.0
0 xa
x a
μ (x)
0.5
b a axb
bxc
x , a , b , c , d 1
d x
0
a b c d cxd
d c
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.
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).
b A (x) b . A (x)
If is set as the power of a fuzzy set A, then a new fuzzy set A has a membership
function value
A x A x
Fuzzy Logic
Part A:
( A) A
Double negation law
A A A A A A
Idempotency
Commutativity
A B B A A B B A
Associative Property ( A B) C A ( B C ) ( A B) C A ( B C )
Distributive Property A ( B C ) ( A B) ( A C ) A ( B C ) ( A B) ( A C )
Adsorption
A ( A B) A A ( A B) A
De Morgan‟s laws
A B A B A B A 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()]
a1( ) a (2 )
(d) Division: A B a ( )
1 ,a ( )
2 b
( )
1
( )
,b
2 A B () , ()
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.
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.
(c) Complement R ( x, y) 1 R ( x, y)
(d) Containment R S R ( x, y) S ( x , y)
Fuzzy Logic
Max-Min Composition:
R1 o R 2
xxz
V R1 (x, y) R 2 ( y, z) / (x, z)
y
R i o R2
y
(x, z) V R1 (x, y) R 2 ( y, z)
Max-Star Composition:
R1 * R 2 V R1
( x , y ) * R 2 ( y, z ) / ( x , z ) R1*R 2 ( x, z) V R ( x, y) * R ( y, z)
1 2
y y
xxz
Max-Product Composition:
R1 . R 2 V y
R1
(x, y). R 2 ( y, z) / (x, y, )
y
R1 .R 2 (x, z) V R1 (x, y) . R 2 ( y, z)
X Z
Max-Average Composition:
1
R1 R 2 V
2
R 1 (x, y) R 2 ( y, z) / (x, z)
1
R 1 R 2 ( x, z) V R 1 ( x , y) R 2 ( y, z)
2
y
X Z y
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 .
Membership Functio n M odel fo r Atomic Values
1
0.9
0.8
Membership Value of Temperature
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 10 20 30 40 50 60 70 80 90 100 110 120
Temperature(T) in Degrees
Fuzzy Logic
[ ( x )]1.25
Plus 1.25 I x
[ ( x )] 0.75
Minus 0.75 I x
(x)
1 , x x max 1 , x x min
Over I
x
0, x x max 0, x x min
(x)
1 , x x min 1 , x x max
Under I
x
0, x x min 0, x x max
(x) (x)
2
2 , 0 0.5
2 , 0 0.5 x
2
I
x I
Indeed 1 2[1 ] , 2
0.5 1.0 ( x )
2
(x)
1 2 1 , 0.5 x 1.0
I x I
Fuzzy Logic
1. Fuzzy Concentration
1
A ( Low , T )
1
Low Before
2
Concentration
Membership Value
1
A ( Very Low , T )
0.6
2.4
1 0.0005(T 30) 0.4
0.2 After
Concentration
Very
Low
0
-0.2
0 20 40 60 80 100 120
Temperature(T) in Degrees
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.
Dilation
1
0.9
1
A ( Low , T ) 0.8 After
0.7
Low
Membership Value
0.6
0. 5
1 Slightly
A (Slightly Low , T ) 2. 4
0.5 Low
1 0.0005(T 30)
0.4 Before
Dilation
0.3
0.2
0.1
0
0 20 40 60 80 100 120
Temperature(T) in Degrees
Fuzzy Logic
3. Fuzzy Intensification
0.9
Befo re
Intensificatio n
1
A ( Low , T ) 0.8
0.7 After
Intensificatio n
Membership Value
0.6
Indeed
1
2
1 Low
2 2.0
, 0 2.0
0.5 0.5
A ( Indeed Low , T ) 1 0.005(T 30) 1 0.005(T 30)
1 2 1
2
1 0.4
, 0.5 2.0
1.0
1 0.005(T 30) 2.0 1 0.005(T 30)
0.3
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 1 T ( P)
P
A ( x ), if B ( y) 1
Drastic Product B ( x ), if A ( y) 1
OR( )
0, if A ( y) 1, B ( 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) AND( )
, if A ( x ) B ( y)
A (x)
Godelian 1, if A ( x ) B ( y)
AND( )
B ( y), if A ( x ) B ( y)
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
5.10.6 Defuzzification
Defuzzification is the process of converting the fuzzy set into a crisp value.
5.10.6 Defuzzification
OUT ( u i ) N
max( (u i )) 1
1.
u
i 1
i OUT (u i )
1.
Peak 0
0.
u* N
0 point
0. 9
0. OUT (u i )
(u i )
9 8 i 1
0. 0.
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
1 2 3 4 5 6 7 8 9 10 1 12 13 14 15 16
0 1
u * 6.65 ui
u* ui
Fuzzy Logic
5.10.6 Defuzzification
z
j1
j OUT ( z j )
(d) Mean of Maxima (MOM)
u
*
Z
OUT ( u i )
z2
OUT (z j )
j1
1 M
z1
1.0 u
*
um
0.9 M m 1
0.8
0.7
0.4
N n
0.3
0.2
u
i 1
i
k 1
C' ( u i )
k
0.1
u
*
N n
0
i 1 k 1
C' ( u i )
k
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ui
u * 5.86
Fuzzy Logic
5.10.6 Defuzzification
OUT ( u i )
N max( C m ( u )) max( C i ( u )), i 1....N C
1.
0 C1
C2
u i Cm (u i )
i 1
0.
9 u* N u * min( u i )
0.
8
0. Cm (u i )
i 1
7
0. (h) Last of Maxima
6
Cm = C1
0.
5
0.
4
0. u * max( u i )
3
0.
2
0.
1
0
1 2 3 4
ui
5 6 7 8 9 10 11 12 13 14 15 16
(a) Continuity
(b) Disambiguity
(c) Plausibility
(e)Weighting Methods
It should be noted that none of the defuzzification techniques satisfy all the 5 criteria.
However, the right choice of the defuzzification techniques for a particular application
can be selected only by understanding the trade-off between these criteria.