Week1 Watermark
Week1 Watermark
EL
Faculty Name: Prof. Dilip Kumar Pratihar
PT
Department : Mechanical Engineering
N
Week 1
Course Name: Fuzzy Logic and Neural Networks
EL
Faculty Name: Prof. Dilip Kumar Pratihar
PT
Department : Mechanical Engineering
N
Topic
Lecture 01: Introduction to Fuzzy Sets
Concepts Covered:
EL
Fuzzy Set
PT
Representation of Fuzzy Set
N
Classical Set/Crisp Set (A)
EL
Ex: All technical universities in the world
• Classical or Crisp Set is a set with fixed and well-defined
PT
boundary
N
• Example: A set of technical universities having at least five
departments each
Representation of Crisp Sets
• A={a1,a2,……,an}
• A={x|P(x)}, P: property
• Using characteristic function
EL
PT
1, if x belongs to A,
μA(x)=
N
0, if x does not belong to A.
Notations Used in Set Theory
• Φ : Empty/Null set
• x ∈ A : Element x of the Universal set X belongs to set A
• x ∉ A : x does not belong to set A
EL
• A ⊆ B : set A is a subset of set B
A ⊇ B : set A is a superset of set B
PT
•
• A = B : A and B are equal
N
• A ≠ B : A and B are not equal
• A ⊂ B : A is a proper subset of B
• A ⊃ B : A is a proper superset of B
• A : Cardinality of set A is defined as the total number of
elements present in that set
• p(A) : Power set of A is the maximum number of subsets
EL
including the null that can be constructed from a set A
PT
Note: p( A ) = 2 A
N
Crisp Set Operations
EL
PT
N
N
PT
EL
N
PT
EL
Properties of Crisp Sets
EL
PT
N
Fuzzy Sets
EL
• Potential tool for handling imprecision and uncertainties
PT
• Fuzzy set is a more general concept of the classical set
N
Representation of a Fuzzy Set
A( x ) = {( x, µ A ( x )), x ∈ X }
Note:
EL
Probability: Frequency of likelihood that an element is in a class
PT
Membership: Similarity of an element to a class
N
Types of Fuzzy sets
EL
PT
2. Continuous Fuzzy set
N
A( x ) = ∫ µ (x ) / x
A
X
Convex vs. Non-Convex Membership Function Distribution
A fuzzy set A(x) will be convex, if
µ A {λx1 + (1 − λ )x2 } ≥ min{µ A ( x1 ), µ A ( x2 )}
Where 0.0 ≤ λ ≤ 1.0
EL
PT
N
Various Types of Membership Function Distributions
1. Triangular Membership
x −a c−x
µ triangle = max min ,0
EL
,
b−a c−b
PT
N
2. Trapezoidal Membership
x−a d −x
µtrapezoidal = max min ,1, ,0
b−a d −c
EL
PT
N
3. Gaussian Membership
1
µ Gaussian =
EL
2
1 x−m
2 σ
PT
e
N
4. Bell-shaped Membership Function
1
µ Bell − shaped =
EL
x−c
2b
1+
PT
a
N
5. Sigmoid Membership
1
µ Sigmoid =
EL
− a ( x −b )
1+ e
PT
N
Reference:
EL
PT
N
Conclusion:
EL
Fuzzy Set has been defined
PT
Deals with representation of Fuzzy Set
N
EL
Course Name: FUZZY LOGIC AND NUERAL NETWORKS
PT
Faculty Name: Prof. Dilip Kumar Pratihar
Department: Mechanical Engineering, IIT Kharagpur
N
Topic
Lecture 02: Introduction to Fuzzy Sets (contd.)
Concepts Covered:
EL
PT
Properties of Fuzzy Sets
N
Fuzziness and Inaccuracy of Fuzzy Sets
Numerical Example
Triangular Membership: Determine μ, corresponding
to x=8.0
EL
1.0
PT
μ
N
0.0
a=2 b=6 8 c=10
x
EL
PT
We put, x=8.0
N
Trapezoidal Membership
•Determine μ corresponding to x = 3.5
EL
PT
N
x−a d− x
= max min ,1, ,0
b−a d −c
x − 2 10 − x
= max min ,1, ,0
4−2 10 − 8
EL
PT
x − 2 10 − x
N
= max min ,1, ,0
2 2
•We put x = 3.5
1.5 6.5
= max min ,1, ,0
2 2
= max[0.75,0]
EL
PT
= 0.75
N
1.0
EL
PT
N
0.0
N
PT
EL
1.0
EL
PT
μ
N
0.0
c
x
Take c=10.0, a=2.0, b=3.0
EL
PT
We put x=8.0
N
Sigmoid Membership Function:
EL
Take b = 6.0; a = 2
PT
µ sigmoid
=1
1 + e −2( x − 6.0 )
N
we put x = 8.0
µ sigmoid
=1
= =
1
0.98
1 + e −2×2.0 1+ e −4
Difference Between Crisp and Fuzzy Sets
EL
PT
N
A Few Definitions in Fuzzy Sets
EL
PT
N
EL
PT
• Strong α-cut of a Fuzzy Set
N
Numerical Example
The membership function distribution of a fuzzy set is assumed to follow a
Gaussian distribution with mean m = 100 and standard deviation σ =20 .
Determine 0.6 – cut of this distribution.
Solution:
EL
Gaussian distribution :
µ= 1
PT
2
1 x −m
2 σ
e
N
where m : Mean ; σ : Standard deviation
By substituting the values of µ = 0.6, m = 100, σ =20 and
taking log (ln) on both sides, we get
0. 6 =
1
2
1 x −100
e 2 20
2
1 x −100
1
⇒e 2 20
=
0. 6
EL
By taking ln
PT
1 x −100 2
N
ln e 2 20 = ln ( 1.6667 )
Figure : 0.6-cut of a fuzzy set.
⇒x= ( 79.7846 , 120.2153)
• Support of a Fuzzy Set A(x)
EL
PT
• Scalar Cardinality of a Fuzzy Set A(x)
N
Numerical Example
EL
A(x) = {( x , 0.1) , ( x , 0.2) , ( x , 0.3) , ( x , 0.4)}
PT
1 2 3 4
N
Scalar Cardinality A ( x ) = 0.1 + 0.2 + 0.3 + 0.4 = 1.0
• Core of a Fuzzy Set A(x)
It is nothing but its 1-cut
EL
• Height of a Fuzzy Set A(x)
PT
It is defined as the largest of membership values of the elements
N
contained in that set.
• Normal Fuzzy Set
For a normal fuzzy set, h(A) = 1.0
EL
PT
• Sub-normal Fuzzy Set
N
For a sub-normal fuzzy set, h(A) < 1.0
Some Standard Operations in Fuzzy Sets
EL
PT
N
Numerical Example
EL
1 2 3 4
PT
As for all x ∈ X, µ A ( x ) < µB ( x ) ,
N
A ( x ) ⊂ B ( x ) , that is , A ( x ) is the proper subset of B ( x )
Some Standard Operations in Fuzzy Sets
(contd.)
EL
PT
N
Numerical Example
EL
1 2 3 4
PT
1 2 3 4
µ A ( x ) ≠ µB ( x ) , A ( x ) ≠ B ( x )
N
As for all x ∈ X,
• Complement of a Fuzzy Set
EL
PT
N
Numerical Example
EL
A(x) = {( x , 0.1) , ( x , 0.2) , ( x , 0.3) , ( x , 0.4)}
PT
1 2 3 4
N
Complement A ( x ) = {( x , 0.9) , ( x , 0.8) , ( x , 0.7 ) , ( x , 0.6)}
1 2 3 4
• Intersection of Fuzzy Sets
EL
PT
N
EL
PT
N
x
EL
Now,= {
µ( A B ) ( x 1 ) min µ A ( x=
1)
, µB ( x 1 ) =
min }
{0.1, 0.5} 0.1
PT
N
=
Similarly, µ( A B ) ( x 2 ) min
= {0.2, 0.7} 0.2
µ( A B ) ( x 3 ) min
= = {0.3, 0.8} 0.3
µ( A B ) ( x 4 ) min
= = {0.4, 0.9} 0.4
• Union of Fuzzy Sets
EL
PT
N
EL
PT
N
Note: Union is analogous to logical OR operation
Numerical Example
Let us consider the following two fuzzy sets:
A(x) = {( x , 0.1) , ( x , 0.2) , ( x , 0.3) , ( x , 0.4)}
1 2 3 4
EL
µ( A B ) ( x 1 ) max µ A (=
Now,= {
x 1 ) , µB ( x 1 ) =
max }
{0.1, 0.5} 0.5
PT
N
Similarly, µ( A B ) ( x 2 ) = max {0.2 , 0.7} = 0.7
µ( A B ) ( x 3 ) max
= = {0.3, 0.8} 0.8
µ( A B ) ( x 4 ) max
= = {0.4, 0.9} 0.9
• Algebraic product of Fuzzy Sets
EL
PT
N
Numerical Example
EL
1 2 3 4
PT
A ( x ) .B( x ) = {( x , 0.05) , ( x , 0.14) , ( x , 0.24) , ( x , 0.36)}
N
1 2 3 4
• Multiplication of a Fuzzy Set by a Crisp Number
EL
PT
N
Numerical Example
{=
( x , 0.1) , ( x , 0.2 ) , ( x , 0.3 ) , ( x , 0.4 )} and a crisp number d
EL
A(x) 1 2 3 4
0. 2
PT
d. A ( x ) = {( x , 0.02) , ( x , 0.04) , ( x , 0.06) , ( x , 0.08)}
N
1 2 3 4
• Power of a Fuzzy Set
EL
PT
Concentration: p=2
N
Dilation: p=1/2
Numerical Example
{=
( x , 0.1) , ( x , 0.2 ) , ( x , 0.3 ) , ( x , 0.4 )} and power p
EL
A(x) 1 2 3 4
2
PT
A2 ( x ) = {( x , 0.01) , ( x , 0.04) , ( x , 0.09) , ( x , 0.16)}
N
1 2 3 4
• Algebraic Sum of two Fuzzy Sets A(x) and B(x)
EL
PT
where
N
Numerical Example
EL
1 2 3 4
PT
∴ A ( x ) + B( x ) = { }
( x1 , 0.55 ) , ( x 2 , 0.76 ) , ( x 3 , 0.86 ) , ( x 4 , 0.94 )
N
• Bounded Sum of two Fuzzy Sets
EL
PT
where
N
Numerical Example
EL
1 2 3 4
PT
∴ A ( x ) ⊕ B( x ) = { }
( x1 , 0.6 ) , ( x 2 , 0.9 ) , ( x 3 , 1.0 ) , ( x 4 , 1.0 )
N
• Algebraic Difference of two Fuzzy Sets
EL
PT
where
N
Numerical Example
EL
B ( x) = {( x1 , 0.5), ( x2 , 0.7), ( x3 , 0.8), ( x4 , 0.9)}
PT
Now, B ( x) = {( x1 , 0.5), ( x2 , 0.3), ( x3 , 0.2), ( x4 , 0.1)}
N
∴ A( x) − B ( x) =
{( x1 , 0.1), ( x2 , 0.2), ( x3 , 0.2), ( x4 , 0.1)}
• Bounded Difference of two Fuzzy Sets
EL
where
PT
N
Numerical Example
EL
A( x) = {( x1 , 0.1), ( x2 , 0.2), ( x3 , 0.3), ( x4 , 0.4)}
PT
B ( x) = {( x1 , 0.5), ( x2 , 0.7), ( x3 , 0.8), ( x4 , 0.9)}
N
A( x)ΘB ( x) =
{( x1 , 0.0), ( x2 , 0.0), ( x3 , 0.1), ( x4 , 0.3)}
• Cartesian product of two Fuzzy Sets
EL
PT
N
Numerical Example
•Let us consider the following two fuzzy sets:
EL
B ( y ) = {( y1 , 0.8), ( y2 , 0.6), ( y3 , 0.3)}
PT
N
min( µ A (=
x1 ), µ B ( y1 )) min(0.2,
= 0.8) 0.2
min( µ A (=
x1 ), µ B ( y2 )) min(0.2,
= 0.6) 0.2
min( µ A (=
x1 ), µ B ( y3 )) min(0.2,
= 0.3) 0.2
min( µ A (=
x2 ), µ B ( y1 )) min(0.3,
= 0.8) 0.3
EL
min( µ A (=
x2 ), µ B ( y2 )) min(0.3,
= 0.6) 0.3
PT
min( µ A (=
x2 ), µ B ( y3 )) min(0.3,
= 0.3) 0.3
N
min( µ A (=
x3 ), µ B ( y1 )) min(0.5,
= 0.8) 0.5
min( µ A (=
x3 ), µ B ( y2 )) min(0.5,
= 0.6) 0.5
EL
min( µ A (=
x3 ), µ B ( y3 )) min(0.5,
= 0.3) 0.3
PT
min( µ A (=
x4 ), µ B ( y1 )) min(0.6,
= 0.8) 0.6
N
min( µ A (=
x4 ), µ B ( y2 )) min(0.6,
= 0.6) 0.6
min( µ A (=
x4 ), µ B ( y3 )) min(0.6,
= 0.3) 0.3
EL
0.2 0.2 0.2
PT
0.3 0.3 0.3
∴ A× B =
N
0.5 0.5 0.3
0.6 0.6 0.3
Composition of fuzzy relations
Let A = [aij] and B = [bjk] be two fuzzy relations expressed in the matrix form.
EL
PT
In matrix form
[cik] = [aij] о [bjk]
N
Where
cik =max[min(aij, bjk)]
Numerical Example
•Let us consider the following two Fuzzy relations:
[ ]
A = a ij
0.2
=
0.3
0.5 0.7
EL
PT
[ ]
B = b jk
0.3
=
0.6 0.7
0.6
N
0.1 0.8
EL
= max[0.2,0.1]
PT
N
= 0.2
c12 = max[min( a11 , b12 ), min( a12 , b22 )]
EL
= max[0.2,0.3]
PT
N
= 0.3
c13 = max[min( a11 , b13 ), min( a12 , b23 )]
EL
= max[0.2,0.3]
PT
N
= 0.3
c21 = max[min( a 21 , b11 ), min( a 22 , b21 )]
EL
= max[0.3,0.1]
PT
N
= 0.3
c22 = max[min( a 21 , b12 ), min( a 22 , b22 )]
EL
= max[0.5,0.7 ]
PT
N
= 0.7
c23 = max[min( a 21 , b13 ), min( a 22 , b23 )]
EL
= max[0.5,0.6]
PT
N
= 0.6
0.2 0.3 0.3
∴C =
0.6
EL
0.3 0.7
PT
N
Properties of Fuzzy Set
Fuzzy sets follow the properties of crisp sets except the following two:
EL
PT
N
• Law of contradiction
EL
PT
N
Measure of Fuzziness of Fuzzy Set
EL
PT
N
Numerical Example
EL
PT
N
Measure of Inaccuracy of Fuzzy Set
EL
PT
N
Numerical Example
EL
PT
N
References:
Soft Computing: Fundamentals and Applications by D.K. Pratihar,
Narosa Publishing House, New-Delhi, 2014
Fuzzy Sets and Fuzzy Logic: Theory and Applications by G.J. Klir,
EL
B. Yuan, Prentice Hall, 1995
PT
N
Conclusion:
EL
explained
PT
• Properties of Fuzzy Sets have been explained
N
• Fuzziness and Inaccuracy of Fuzzy Sets are
determined
N
PT
EL