Fuzzy Logic 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 83

Topic

Lecture 01: Introduction to Fuzzy Sets


Concepts Covered:

 Classical Set/Crisp Set

 Properties of Classical Set/Crisp Set

 Fuzzy Set

 Representation of Fuzzy Set


Classical Set/Crisp Set
(A)
• Universal Set/Universe of Discourse (X): A set consisting of all
possible elements
Ex: All technical universities in the world
• Classical or Crisp Set is a set with fixed and
well-defined boundary
• Example: A set of technical universities having at least five
departments each
Representation of Crisp

• A={a1,a2,……,an}
Sets

• A={x|P(x)}, P: property
• Using characteristic function

1, if x belongs to A,
μA(x)=
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
• A  B : set A is a subset of set B
• A  B : set A is a superset of set B
• A B : A and B are equal
• 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
including the null that can be constructed from a set A

Note: p A  2 A
Crisp Set Operations
• Difference:
It is known as relative complement of set B with respect to set A

Absolute complement: 𝑨= 𝑨 𝑪 = 𝑿 − 𝑨={𝒙∨𝒙 ∈ 𝑿 𝒂𝒏𝒅 𝒙 ∉ 𝑨 }


• Intersection:
• Union:
Properties of Crisp Sets

1. Law of involution:
2. Law of Commutativity:
3. Associativity: ;

5. Laws of Tautology: ;
4. Distributivity:

6. Laws of Absorption:
7. Laws of Identity:
8. De Morgan’s Laws:
9. Law of contradiction:
10. Law of excluded middle:
Fuzzy Sets

• Sets with imprecise/vague boundaries


• Introduced by Prof. L.A. Zadeh, University of California, USA, in 1965
• Potential tool for handling imprecision and uncertainties
• Fuzzy set is a more general concept of the classical set
Representation of a Fuzzy Set

Ax  x,  A x , x  X 

Note:
Probability: Frequency of likelihood that an element is in a class
Membership: Similarity of an element to a class
Types of Fuzzy sets

1. Discrete Fuzzy set


n
Ax    A xi / xi ,
i 1
n: Number of elements present in the set

2. Continuous Fuzzy set

Ax    A x / x
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
Various Types of Membership Function Distributions

1. Triangular Membership

  x a c x 
 triangle max  min  ,  ,0 
  b a c b 
2. Trapezoidal Membership

  x a d  x 
trapezoidal max  min  ,1, ,0
  b a d  c  
3. Gaussian Membership

1
 Gaussian  2
1  x m 
 
2  
e
4. Bell-shaped Membership Function

1
 Bell  shaped  2b
x c
1
a
5. Sigmoid Membership

1
 Sigmoid   a x  b 
1 e
Summary:

Classical Set/Crisp Set has been defined

Properties of Classical Set/Crisp Set has been explained

Fuzzy Set has been defined

Deals with representation of Fuzzy Set


Concepts Covered:

 A few terms of Fuzzy Sets

 Standard Operations in Fuzzy Sets

 Properties of Fuzzy Sets


Numerical Example
Triangular Membership: Determine μ,
corresponding to x=8.0

1.0

0.0
a=2 b=6 8 c=10
x
𝝁𝒕𝒓𝒊𝒂𝒏𝒈𝒍𝒆 =𝒎𝒂𝒙 [ 𝒎𝒊𝒏 ( 𝒙−𝒂 𝒄− 𝒙
,
𝒃−𝒂 𝒄−𝒃 )
,𝟎 ]

We put, x=8.0

[ ( ) ]
𝝁𝒕𝒓𝒊𝒂𝒏𝒈𝒍𝒆 =𝒎𝒂𝒙 𝒎𝒊𝒏
𝟑 𝟏
,
𝟐 𝟐
𝟏
, 𝟎 = =𝟎 . 𝟓
𝟐
Trapezoidal Membership
•Determine μ corresponding to x = 3.5
𝜇 𝒕𝒓𝒂𝒑𝒆𝒛𝒐𝒊𝒅𝒂𝒍max  min x a
,1,
d x 
 ,0 
  b a d c 

  x  2 10  x  
max  min  ,1,  ,0 
  4 2 10  8  

  x  2 10  x  
max  min  ,1,  ,0 
  2 2  
•We put x = 3.5

𝜇 𝒕𝒓𝒂𝒑𝒆𝒛𝒐𝒊𝒅𝒂𝒍max  min 1.5 ,1, 6.5  ,0


  2 2  

max0.75,0

0.75
Gaussian Membership:
Determine corresponding to

1.0

0.0
𝒎
𝒙
𝟏
𝝁 𝑮𝒂𝒖𝒔𝒔𝒊𝒂𝒏 = 𝟐

𝒆
𝟐 (
𝟏 𝒙 −𝒎
𝝈 )

𝑻𝒂𝒌𝒆𝒎=𝟏𝟎 . 𝟎 𝒂𝒏𝒅 𝝈 =𝟑 .𝟎
𝟏
𝝁 𝑮𝒂𝒖𝒔𝒔𝒊𝒂𝒏 = 𝟐

𝒆
𝟏
𝟐 ( 𝒙 −𝟏𝟎 .𝟎
𝟑 .𝟎 )
We put

𝟏
∴ 𝝁 𝑮𝒂𝒖𝒔𝒔𝒊𝒂𝒏= 𝟐 =𝟎 .𝟗𝟒𝟓𝟗
𝒆
𝟐(
𝟏 𝟗 .𝟎 −𝟏𝟎 .𝟎
𝟑.𝟎 )
Bell-shaped Membership function: Determine μ
corresponding to

1.0

0.0
c
x
𝟏
𝝁 𝑩𝒆𝒍𝒍 − 𝒔𝒉𝒂𝒑𝒆𝒅 =
| |
𝟐𝒃
𝒙−𝒄
𝟏+
𝒂

Take c=10.0, a=2.0, b=3.0


𝟏
𝝁 𝑩𝒆𝒍𝒍 − 𝒔𝒉𝒂𝒑𝒆𝒅 =
| |
𝟔
𝒙 − 𝟏𝟎
𝟏+
𝟐
We put x=8.0
𝟏
𝝁 𝑩𝒆𝒍𝒍 − 𝒔𝒉𝒂𝒑𝒆𝒅 = =𝟎 . 𝟓
| |
𝟔
𝟖 − 𝟏𝟎
𝟏+
𝟐
Sigmoid Membership Function:

Determine µ corresponding to x = 8.0

1  e a( x b)
1
 sigmoid

Take b = 6.0; a = 2

1e
sigmoid  12( x 6.0)

we put x = 8.0

0.98
1e 1e
1 1
 sigmoid
  22.0
 4
Difference Between Crisp and Fuzzy
Sets
A Few Definitions in Fuzzy Sets
• α-cut of a fuzzy set

A set consisting of elements x of the Universal set X, whose membership


values are either greater than or equal to the value of α.
• Strong α-cut of a Fuzzy Set

+ ¿ ( 𝒙 ) = { 𝒙 |𝝁 ( 𝒙 )> 𝜶 } ¿
𝜶 𝝁𝑨
𝑨
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:
Gaussian distribution : 1
 1  x m 

e
2

 
2  

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
1  x 100 

e
2

 
2  20 

1  x 100 

 e
2

0.6

2  20 
 1

By taking ln

 1  x 100  2 
ln e2  20   ln1.6667 
  Figure : 0.6-cut of a fuzzy set.

 x ( 79.7846 ,120.2153)
 
• Support of a Fuzzy Set A(x)

It is defined as the set of all x є X, such that μA(x) > 0

supp(A)

Note: Support of a fuzzy set is nothing but its Strong 0-cut

• Scalar Cardinality of a Fuzzy Set A(x)

| 𝑨 ( 𝒙 )|= ∑ 𝝁 𝑨 ( 𝒙 )
𝒙∈ 𝑿
Numerical Example

Let us consider a fuzzy set A  x  as follows:

A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 


 
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

• Height of a Fuzzy Set A(x)


It is defined as the largest of membership values of the elements
contained in that set.
• Normal Fuzzy Set
For a normal fuzzy set, h(A) = 1.0

• Sub-normal Fuzzy Set


For a sub-normal fuzzy set, h(A) < 1.0
Some Standard Operations in Fuzzy
Sets
• Proper Subset of a Fuzzy Set

𝑨 ( 𝒙 ) ⊂ 𝑩 ( 𝒙 ) , 𝒊𝒇 𝝁 𝑨 ( 𝒙 ) <𝝁 𝑩 ( 𝒙 )
Numerical Example

Let us consider the two fuzzy sets, as follows:


A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 
 
B x   x ,0.5  , x ,0.7  , x ,0.8  , x ,0.9 
1 2 3 4

As for all x  X,  A  x   B  x  ,
A x  B x , that is , A x is the proper subset of B x
Some Standard Operations in Fuzzy
Sets (contd.)

• Equal fuzzy sets

𝑨 ( 𝒙 )= 𝑩 ( 𝒙 ) ,𝒊𝒇 𝝁 𝑨 ( 𝒙 )=𝝁 𝑩 ( 𝒙 )
Numerical Example

Let us consider the two fuzzy sets, as follows:


A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 
 
B x   x ,0.5  , x ,0.7  , x ,0.8  , x ,0.9 
1 2 3 4

As for all x  X,  A  x  B  x , A x B x


• Complement of a Fuzzy Set

𝑨 ( 𝒙 ) =𝟏 − 𝑨 ( 𝒙 )
Numerical Example

Let us consider a fuzzy set A  x  as follows:

A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 


 
Complement A x   x1 ,0.9  , x2 ,0.8  , x3 ,0.7  , x4 ,0.6 
 
• Intersection of Fuzzy Sets

Intersection of two fuzzy sets A(x) and B(x) is denoted by

and its membership values are determined as follows :

𝝁( 𝑨∩ 𝑩 ) ( 𝒙 )=𝒎𝒊𝒏 {𝝁 𝑨 ( 𝒙 ) ,𝝁 𝑩 ( 𝒙 ) }
x

Note: Intersection is analogous to logical AND operation


Numerical Example
Let us consider the two fuzzy sets as follows:
A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 
 
B x   x ,0.5  , x ,0.7  , x ,0.8  , x ,0.9 
1 2 3 4

Now,  AB  x1  min  A  x1  ,B  x1  min 0.1,0.5 0.1


 
Similarly,  AB  x2  min 0.2 ,0.7 0.2
AB  x3  min 0.3 ,0.8 0.3
AB  x4  min 0.4,0.9 0.4
• Union of Fuzzy Sets

Union of two fuzzy sets A(x) and B(x) is represented by:

and its membership value is determined as follows:

𝝁( 𝑨∪ 𝑩 ) ( 𝒙 )= 𝒎𝒂𝒙 {𝝁 𝑨 ( 𝒙 ) , 𝝁 𝑩 ( 𝒙 ) }
Note: Union is analogous to logical OR operation
Numerical Example
Let us consider the following two fuzzy sets:
A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 
 
B x   x ,0.5  , x ,0.7  , x ,0.8  , x ,0.9 
1 2 3 4

Now,  AB  x1  max  A  x1  ,B  x1  max 0.1,0.5 0.5


 
Similarly,  AB  x2  max 0.2 ,0.7 0.7
AB  x3  max 0.3 ,0.8 0.8
AB  x4  max 0.4 ,0.9 0.9
• Algebraic product of Fuzzy Sets

𝑨 ( 𝒙 ) . 𝑩 ( 𝒙 )={ ( 𝒙 , 𝝁 𝑨 ( 𝒙 ) .𝝁 𝑩 ( 𝒙 ) ) , 𝒙 ∈ 𝑿 }
Numerical Example

Let us consider the following two fuzzy sets:


A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 
 
B x   x ,0.5  , x ,0.7  , x ,0.8  , x ,0.9 
1 2 3 4

A x.B x   x1 ,0.05  , x2 ,0.14  , x3 ,0.24  , x4 ,0.36 


 
• Multiplication of a Fuzzy Set by a Crisp
Number

𝒅 . 𝑨 ( 𝒙 )={ ( 𝒙 , 𝒅 × 𝝁 𝑨 ( 𝒙 ) ) , 𝒙 ∈ 𝑿 }
Numerical Example

Let us consider a fuzzy set

A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4  and a crisp number d  0.2


 
d.A x   x1 ,0.02  , x2 ,0.04  , x3 ,0.06  , x4 ,0.08 
 
• Power of a Fuzzy Set

AP(x): p-th power of a fuzzy set A(x) such that


𝒑
𝝁 𝑨 ( 𝒙 ) = {𝝁 𝑨 ( 𝒙 ) } , 𝒙 ∈ 𝑿
𝒑

Concentration: p=2
Dilation: p=1/2
Numerical Example

Let us consider a fuzzy set

A x   x1 ,0.1 , x2 ,0.2  ,x3 ,0.3  ,x4 ,0.4  and power p  2


 
A2  x   x1 ,0.01 , x2 ,0.04  ,x3 ,0.09  ,x4 ,0.16 
 
• Algebraic Sum of two Fuzzy Sets A(x) and B(x)

𝑨 ( 𝒙 ) + 𝑩 ( 𝒙 )={( 𝒙 , 𝝁 𝑨+ 𝑩 ( 𝒙 ) ) , 𝒙 ∈ 𝑿 }

where

𝝁 𝑨+𝑩 ( 𝒙 )=𝝁 𝑨 ( 𝒙 ) +𝝁 𝑩 ( 𝒙 ) − 𝝁 𝑨 ( 𝒙 ) . 𝝁 𝑩 ( 𝒙 )
Numerical Example

Let us consider the following two fuzzy sets:


A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 
 
B x   x ,0.5  , x ,0.7  , x ,0.8  , x ,0.9 
1 2 3 4

 A x  B x   x1 ,0.55  , x2 ,0.76  , x3 ,0.86  , x4 ,0.94 


 
• Bounded Sum of two Fuzzy Sets

𝑨 ( 𝒙 ) ⨁ 𝑩 ( 𝒙 )={( 𝒙 , 𝝁 𝑨 ⨁ 𝑩 ( 𝒙 ) ), 𝒙 ∈ 𝑿 }

where

𝝁 𝑨⨁ 𝑩 ( 𝒙 )=𝒎𝒊𝒏 {𝟏 , 𝝁 𝑨 ( 𝒙 ) +𝝁 𝑩 ( 𝒙 ) }
Numerical Example

Let us consider the following two fuzzy sets:


A x   x1 ,0.1 , x2 ,0.2  , x3 ,0.3  , x4 ,0.4 
 
B x   x ,0.5  , x ,0.7  , x ,0.8  , x ,0.9 
1 2 3 4

 A x  B x   x1 ,0.6  , x2 ,0.9  , x3 ,1.0  , x4 ,1.0 


 
• Algebraic Difference of two Fuzzy Sets

𝑨 ( 𝒙 ) − 𝑩 ( 𝒙 )={( 𝒙 ,𝝁 𝑨− 𝑩 ( 𝒙 )) , 𝒙 ∈ 𝑿 }

where

𝝁 𝑨− 𝑩 ( 𝒙 ) =𝝁 𝑨∩ 𝑩 (𝒙)
Numerical Example

•Let us consider the following two fuzzy sets:

A( x) {( x1 , 0.1), ( x2 , 0.2), ( x3 , 0.3), ( x4 , 0.4)}


B ( x) {( x1 , 0.5), ( x2 , 0.7), ( x3 , 0.8), ( x4 , 0.9)}
Now, B ( x ) {( x1 , 0.5), ( x2 , 0.3), ( x3 , 0.2), ( x4 , 0.1)}

 A( x)  B ( x) {( x1 , 0.1), ( x2 , 0.2), ( x3 , 0.2), ( x4 , 0.1)}


• Bounded Difference of two Fuzzy Sets

𝑨 ( 𝒙 ) 𝚯 𝑩( 𝒙 )={( 𝒙 , 𝝁 𝑨 𝚯 𝑩 ( 𝒙 )) , 𝒙 ∈ 𝑿 }

where

𝝁 𝑨 𝚯 𝑩 ( 𝒙 )=𝒎𝒂𝒙 {𝟎 , 𝝁 𝑨 ( 𝒙 ) +𝝁 𝑩 ( 𝒙 ) −𝟏 }
Numerical Example

•Let us consider the following two fuzzy sets:

A( x) {( x1 , 0.1), ( x2 , 0.2), ( x3 , 0.3), ( x4 , 0.4)}


B ( x) {( x1 , 0.5), ( x2 , 0.7), ( x3 , 0.8), ( x4 , 0.9)}

A( x)B ( x) {( x1 , 0.0), ( x2 , 0.0), ( x3 , 0.1), ( x4 , 0.3)}


• Cartesian product of two Fuzzy Sets

Two fuzzy sets A(x) defined in X


and B(y) defined in Y
Cartesian product of two fuzzy sets is denoted by A(x)×B(y),
𝑨× 𝑩 ( 𝒙 , 𝒚 ) =𝒎𝒊𝒏 {𝝁 𝑨 ( 𝒙 ) , 𝝁 𝑩 ( 𝒚 ) }
𝝁that
such
Numerical Example
•Let us consider the following two fuzzy sets:

A( x) {( x1 , 0.2), ( x2 , 0.3), ( x3 , 0.5), ( x4 , 0.6)}


B ( y ) {( y1 , 0.8), ( y2 , 0.6), ( y3 , 0.3)}

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
min(  A ( x2 ),  B ( y2 )) min(0.3, 0.6) 0.3
min(  A ( x2 ),  B ( y3 )) min(0.3, 0.3) 0.3
min(  A ( x3 ),  B ( y1 )) min(0.5, 0.8) 0.5
min(  A ( x3 ),  B ( y2 )) min(0.5, 0.6) 0.5
min(  A ( x3 ),  B ( y3 )) min(0.5, 0.3) 0.3
min(  A ( x4 ),  B ( y1 )) min(0.6, 0.8) 0.6
min(  A ( x4 ),  B ( y2 )) min(0.6, 0.6) 0.6
min(  A ( x4 ),  B ( y3 )) min(0.6, 0.3) 0.3

 0.2 0.2 0.2 


 0.3 0.3 0.3
 A B 
 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.

Composition of these two fuzzy relations, that is, C is represented as follows:


C=A о B

In matrix form
[cik] = [aij] о [bjk]
Where
cik =max[min(aij, bjk)]
Numerical Example
•Let us consider the following two Fuzzy relations:
 0.2 0.3
 
A  a ij  
 0.5 0.7 

 0.3 0.6 0.7 


 
B  b jk 
0.6 
 0.1 0.8

•Elements of c ik  matrix can be determined as follows:


c11 maxmin( a11 , b11 ), min( a12 , b21 )

maxmin( 0.2,0.3), min( 0.3,0.1)

max0.2,0.1

0.2
c12 maxmin( a11 , b12 ), min( a12 , b22 )

maxmin( 0.2,0.6), min( 0.3,0.8)

max0.2,0.3

0.3
c13 maxmin( a11 , b13 ), min( a12 , b23 )

maxmin( 0.2,0.7 ), min( 0.3,0.6)

max0.2,0.3

0.3
c21 maxmin( a 21 , b11 ), min( a 22 , b21 )

maxmin( 0.5,0.3), min( 0.7,0.1)

max0.3,0.1

 0 .3
c22 maxmin( a 21 , b12 ), min( a 22 , b22 )

maxmin( 0.5,0.6), min( 0.7,0.8)

max0.5,0.7

0.7
c23 maxmin( a 21 , b13 ), min( a 22 , b23 )

maxmin( 0.5,0.7 ), min( 0.7,0.6)

max0.5,0.6

 0 .6
 0.2 0.3 0.3
 C 
 0.3 0.7 0.6
Properties of Fuzzy Set
Fuzzy sets follow the properties of crisp sets except the following two:

• Law of excluded middle

In crisp set,

In fuzzy set,
• Law of contradiction

In crisp set, O

In fuzzy set, O
Summary:

• A few terms related to Fuzzy Sets have been defined

• Some standard Operations in Fuzzy Sets have been

explained

• Properties of Fuzzy Sets have been explained

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy