Introduction To Fuzzy Set Theory

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 53

Introduction to

Fuzzy Set Theory


Content

Fuzzy Sets

Set-Theoretic Operations

MF Formulation

Extension Principle

Fuzzy Relations
Introduction to
Fuzzy Set Theory
Fuzzy Sets
Types of Uncertainty

Stochastic uncertainty

E.g., rolling a dice

Linguistic uncertainty

E.g., low price, tall people, young age

Informational uncertainty

E.g., credit worthiness, honesty


Crisp or Fuzzy Logic

Crisp Logic

A proposition can be true or false only.

Bob is a student (true)

Smoking is healthy (false)

The degree of truth is 0 or 1.

Fuzzy Logic

The degree of truth is between 0 and 1.

William is young (0.3 truth)

Ariel is smart (0.9 truth)


Crisp Sets

Classical sets are called crisp sets

either an element belongs to a set or not, i.e.,

Member Function of crisp set


x A or x A
0
( )
1
A
x A
x
x A

'

{ }
( ) 0,1
A
x
P
Crisp Sets
P : the set of all people.
Y : the set of all young people.
Y
{ }
( ) 25, age Young y y x x P
1
y
( )
Young
y
25
Fuzzy Sets
Crisp sets { }
( ) 0,1
A
x
( ) [0,1]
A
x
1
y
( )
Young
y
Example
Definition:
Fuzzy Sets and Membership Functions
If U is a collection of objects denoted generically
by x, then a fuzzy set A in U is defined as a set of
ordered pairs:
{ }
( , ( ))
A
A x x x U
membership
function
: [0,1]
A
U
U : universe of discourse.
Example (Discrete Universe)
{1, 2, 3, 4, 5, 6, 7, 8} U
# courses a student
may take in a semester.
(1, 0.1) (2, 0.3) (3, 0.8) (4,1)
(5, 0.9) (6, 0.5) (7, 0.2) (8, 0.1)
A

' )

appropriate
# courses taken
0.5
1
0
2 4 6 8
x : # courses
( )
A
x
Example (Discrete Universe)
{1, 2, 3, 4, 5, 6, 7, 8} U
# courses a student
may take in a semester.
(1, 0.1) (2, 0.3) (3, 0.8) (4,1)
(5, 0.9) (6, 0.5) (7, 0.2) (8, 0.1)
A

' )

appropriate
# courses taken
Alternative Representation:
1 2 3 4 0.1/ 0.3/ 0.8/ 1.0/ 0.9/ 0.5/ 0.2/ 0.1/ 5 6 7 8 A + + + + + + +
Example (Continuous
Universe)
possible ages U : the set of positive real numbers
{ }
( , ( ))
B
B x x x U
4
1
( )
50
1
5
B
x
x

_
+

,
about 50 years old
0
0.2
0.4
0.6
0.8
1
1.2
0 20 40 60 80 100
x : age
( )
B
x
( )
4
50
5
1
1
x
R
B x

+ +

Alternative
Representation:
Alternative Notation
{ }
( , ( ))
A
A x x x U
U : discrete universe
U : continuous universe
( ) /
i
A i i
x U
A x x


( ) /
A
U
A x x

Note that and integral signs stand for the union of


membership grades; / stands for a marker and does not imply
division.
M
e
m
b
e
r
s
h
i
p
v
a
l
u
e
height
1
0
Membership Functions (MFs)

A fuzzy set is completely characterized by


a membership function.

a subjective measure.

not a probability measure.


tall in Asia
tall in USA
tall in NBA
510
x
1
0
0.5
MF
MF Terminology
cross points
core
width

-cut
support
Introduction to
Fuzzy Set Theory
Set-Theoretic
Operations
Set-Theoretic Operations

Subset

Complement

Union

Intersection
( ) ( ),
A B
A B x x x U
( ) max( ( ), ( )) ( ) ( )
C A B A B
C A B x x x x x
( ) min( ( ), ( )) ( ) ( )
C A B A B
C A B x x x x x
( ) 1 ( )
A
A
A U A x x
Set-Theoretic Operations
A B
A B
A
A B
Properties
A A
Involution
A B B A
Commutativity
A B B A
( ) ( )
A B C A B C
Associativity
( ) ( )
A B C A B C
( ) ( ) ( )
A B C A B A C
Distributivity
( ) ( ) ( )
A B C A B A C
A A A
Idempotence
A A A
( )
A A B A
Absorption
( )
A A B A
A B A B
De Morgans laws
A B A B
Properties

The following properties are invalid for


fuzzy sets:

The laws of contradiction

The laws of exclude middle


A A
A A U
Other Definitions for Set Operations

Union

Intersection
( )
( ) min 1, ( ) ( )
A B A B
x x x

+
( ) ( ) ( )
A B A B
x x x


Other Definitions for Set Operations

Union

Intersection
( ) ( ) ( ) ( ) ( )
A B A B A B
x x x x x

+
( ) ( ) ( )
A B A B
x x x


Introduction to
Fuzzy Set Theory
MF Formulation
MF Formulation

Triangular MF

Trapezoidal MF

Gaussian MF

Generalized bell MF
( ; , , ) max min , ,0
x a c x
x a b c
b a c b
trimf
_
_



,
,
( ; , , , ) max min ,1, ,0
x a d x
x a b c d
b a d c
trapmf
_
_



,
,
2
1
( ; , , )
1
b
x a b c gbellmf
x c
b

+
2
1
2
( ; , , )
x c
gau x a b c e ssmf

_

MF Formulation
Manipulating Parameter of the
Generalized Bell Function
2
1
( ; , , )
1
b
x a b c gbellmf
x c
b

+
Sigmoid MF
( )
1
( ; , )
1
a x c
sig x a
e
mf c

+
Extensions:
Abs. difference
of two sig. MF
Product
of two sig. MF
L-R MF
,
( ; , , )
,
L
R
c x
F x c
x c
x c
L
F x c
R


_
<

,

'
_

Example:
2
( ) max(0,1 )
L
F x x
( )
3
( ) exp
R
F x x
c=65
=60
=10
c=25
=10
=40
2/9/2004 Fuzzy Logic
29
Fuzzy Linguistic Variables

Fuzzy Linguistic Variables are used to


represent qualities spanning a
particular spectrum

Temp: {Freezing, Cool, Warm, Hot}

Membership Function

Question: What is the temperature?

Answer: It is warm.

Question: How warm is it?


2/9/2004 Fuzzy Logic
30
Membership Functions

Temp: {Freezing, Cool, Warm, Hot}

Degree of Truth or "Membership"


50 70 90 110 30 10
Temp. (F)
Freezing Cool Warm Hot
0
1
2/9/2004 Fuzzy Logic
31
Membership Functions

How cool is 36 F ?
50 70 90 110 30 10
Temp. (F)
Freezing Cool Warm Hot
0
1
2/9/2004 Fuzzy Logic
32
Membership Functions

How cool is 36 F ?

It is 30% Cool and 70% Freezing


50 70 90 110 30 10
Temp. (F)
Freezing Cool Warm Hot
0
1
0.7
0.3
2/9/2004 Fuzzy Logic
33
Fuzzy Logic

How do we use fuzzy membership functions


in predicate logic?

Fuzzy logic Connectives:

Fuzzy Conjunction,

Fuzzy Disjunction,

Operate on degrees of membership in fuzzy


sets
2/9/2004 Fuzzy Logic
34
Fuzzy Disjunction

AB max(A, B)

AB = C "Quality C is the disjunction


of Quality A and B"
0
1
0.375
A
0
1
0.75
B
(AB = C) (C = 0.75)
2/9/2004 Fuzzy Logic
35
Fuzzy Conjunction

AB min(A, B)

AB = C "Quality C is the
conjunction of Quality A and B"
0
1
0.375
A
0
1
0.75
B
(AB = C) (C = 0.375)
2/9/2004 Fuzzy Logic
36
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
0
1
A
0
1
B
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
2/9/2004 Fuzzy Logic
37
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is
20
0
1
A
0
1
B
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
Determine degrees of membership:
2/9/2004 Fuzzy Logic
38
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is
20
Determine degrees of membership:
A = 0.7
0
1
A
0
1
B
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
0.7
2/9/2004 Fuzzy Logic
39
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is
20
Determine degrees of membership:
A = 0.7 B = 0.9
0
1
A
0
1
B
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
0.7
0.9
2/9/2004 Fuzzy Logic
40
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is
20
Determine degrees of membership:
A = 0.7 B = 0.9
Apply Fuzzy AND
AB = min(A, B) = 0.7
0
1
A
0
1
B
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
0.7
0.9
2/9/2004 Fuzzy Logic
41
Fuzzy Control

Fuzzy Control combines the use of fuzzy


linguistic variables with fuzzy logic

Example: Speed Control

How fast am I going to drive today?

It depends on the weather.

Disjunction of Conjunctions
2/9/2004 Fuzzy Logic
42
Inputs: Temperature

Temp: {Freezing, Cool, Warm, Hot}


50 70 90 110 30 10
Temp. (F)
Freezing Cool Warm Hot
0
1
2/9/2004 Fuzzy Logic
43
Inputs: Temperature, Cloud
Cover

Temp: {Freezing, Cool, Warm, Hot}

Cover: {Sunny, Partly, Overcast}


50 70 90 110 30 10
Temp. (F)
Freezing Cool Warm Hot
0
1
40 60 80 100 20 0
Cloud Cover (%)
Overcast Partly Cloudy Sunny
0
1
2/9/2004 Fuzzy Logic
44
Output: Speed

Speed: {Slow, Fast}


50 75 100 25 0
Speed (mph)
Slow Fast
0
1
2/9/2004 Fuzzy Logic
45
Rules

If it's Sunny and Warm, drive Fast


Sunny(Cover)Warm(Temp) Fast(Speed)

If it's Cloudy and Cool, drive Slow


Cloudy(Cover)Cool(Temp) Slow(Speed)

Driving Speed is the combination of output of


these rules...
2/9/2004 Fuzzy Logic
46
Example Speed Calculation

How fast will I go if it is

65 F

25 % Cloud Cover ?
2/9/2004 Fuzzy Logic
47
Fuzzification:
Calculate Input Membership
Levels

65 F Cool = 0.4, Warm= 0.7


50 70 90 110 30 10
Temp. (F)
Freezing Cool Warm Hot
0
1
2/9/2004 Fuzzy Logic
48
Fuzzification:
Calculate Input Membership
Levels

65 F Cool = 0.4, Warm= 0.7

25% Cover Sunny = 0.8, Cloudy =


0.2
50 70 90 110 30 10
Temp. (F)
Freezing Cool Warm Hot
0
1
40 60 80 100 20 0
Cloud Cover (%)
Overcast Partly Cloudy Sunny
0
1
2/9/2004
49
...Calculating...

If it's Sunny and Warm, drive Fast


Sunny(Cover)Warm(Temp)Fast(Speed)
0.8 0.7 = 0.7
Fast = 0.7

If it's Cloudy and Cool, drive Slow


Cloudy(Cover)Cool(Temp)Slow(Speed)
0.2 0.4 = 0.2
Slow = 0.2
2/9/2004 Fuzzy Logic
50
Defuzzification:
Constructing the Output

Speed is 20% Slow and 70% Fast

Find centroids: Location where membership


is 100%
50 75 100 25 0
Speed (mph)
Slow Fast
0
1
2/9/2004 Fuzzy Logic
51
Defuzzification:
Constructing the Output

Speed is 20% Slow and 70% Fast

Find centroids: Location where membership


is 100%
50 75 100 25 0
Speed (mph)
Slow Fast
0
1
2/9/2004 Fuzzy Logic
52
Defuzzification:
Constructing the Output

Speed is 20% Slow and 70% Fast

Speed = weighted mean


= (2*25+...
50 75 100 25 0
Speed (mph)
Slow Fast
0
1
2/9/2004 Fuzzy Logic
53
Defuzzification:
Constructing the Output

Speed is 20% Slow and 70% Fast

Speed = weighted mean


= (2*25+7*75)/(9)
= 63.8 mph
50 75 100 25 0
Speed (mph)
Slow Fast
0
1

You might also like