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

Fuzzy Control

Lecture 2 Fuzzy Set


Content

 Crisp Sets
 Fuzzy Sets
 Set-Theoretic Operations
 Extension Principle
 Fuzzy Relations

2
Introduction

Fuzzy set theory provides a means for representing


uncertainties.
Fuzzy set theory uses Linguistic variables, rather than
quantitative variables to represent imprecise concepts.

3
Fuzzy Logic

Fuzzy Logic is suitable to


Very complex models
Reasoning
Perception
Decision making

4
Crisp Set and Fuzzy Set

5
Information World

Crisp set has a unique membership function


A(x) = 1 xA
0 xA
A(x)  {0, 1}

Fuzzy Set can have an infinite number of membership


functions
A  [0,1]

6
Fuzziness

Examples:
A number is close to 5

7
Fuzziness

Examples:
He/she is tall

8
Classical Sets

9
CLASSICAL SETS
Define a universe of discourse, X, as a collection of objects all
having the same characteristics. The individual elements in the
universe X will be denoted as x. The features of the elements in
X can be discrete, or continuous valued quantities on the real
line. Examples of elements of various universes might be as
follows:
• the clock speeds of computer CPUs;
• the operating currents of an electronic motor;
• the operating temperature of a heat pump;
• the integers 1 to 10.

10
Operations on Classical Sets

Union:
A  B = {x | x  A or x  B}
Intersection:
A  B = {x | x  A and x  B}
Complement:
A’ = {x | x  A, x  X}
X – Universal Set
Set Difference:
A | B = {x | x  A and x  B}
Set difference is also denoted by A - B

11
Operations on Classical Sets

Union of sets A and B (logical or).

Intersection of sets A and B.

12
Operations on Classical Sets

Complement of set A.

Difference operation A|B.

13
Properties of Classical Sets

AB=BA
AB=BA
A  (B  C) = (A  B)  C
A  (B  C) = (A  B)  C
A  (B  C) = (A  B)  (A  C)
A  (B  C) = (A  B)  (A  C)
AA=A
AA=A
AX=X
AX=A
A=A
A=
14
Mapping of Classical Sets to Functions

Mapping is an important concept in relating set-theoretic forms to function-


theoretic representations of information. In its most general form it can be
used to map elements or subsets in one universe of discourse to elements or
sets in another universe.

15
Fuzzy Sets

16
Fuzzy Sets

 A fuzzy set, is a set containing elements that have varying


degrees of membership in the set.

 Elements in a fuzzy set, because their membership need not


be complete, can also be members of other fuzzy sets on the
same universe.

 Elements of a fuzzy set are mapped to a universe of


membership values using a function-theoretic form.

17
Fuzzy Set Theory

 An object has a numeric “degree of membership”


 Normally, between 0 and 1 (inclusive)
 0 membership means the object is not in the set
 1 membership means the object is fully inside the set
 In between means the object is partially in the set

18
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:

membership
function
U : universe of

discourse.

19
Fuzzy Sets

Characteristic function X, indicating the


belongingness of x to the set A
X(x) = 1 x  A
0 xA
or called membership
Hence,
A  B  XA  B(x)
= XA(x)  XB(x)
= max(XA(x),XB(x))

20
Fuzzy Sets

A  B  XA  B(x)
= XA(x)  XB(x)
= min(XA(x),XB(x))

A’  XA’(x)
= 1 – XA(x)

A’’ = A

21
Fuzzy Set Operations

A  B(x) = A(x)  B(x)


= max(A(x), B(x))
A  B(x) = A(x)  B(x)
= min(A(x), B(x))

A’(x) = 1 - A(x)

De Morgan’s Law also holds:


(A  B)’ = A’  B’
(A  B)’ = A’  B’
But, in general
A  A’  X
A  A’   22
Fuzzy Set Operations

Union of fuzzy sets A and B∼


.

Intersection of fuzzy sets A and B∼


.

23
Fuzzy Set Operations

Complement of fuzzy set A ∼

24
Operations

A B

AB AB A
25
A  A’ = X A  A’ = Ø

Excluded middle axioms for crisp sets. (a) Crisp set A and its complement; (b)
crisp A ∪ A = X (axiom of excluded middle); and (c) crisp A ∩ A = Ø (axiom of
contradiction).
26
A  A’ A  A’

Excluded middle axioms for fuzzy sets are not valid. (a) Fuzzy set A ∼ and its
complement; (b) fuzzy A ∪ A∼ = X (axiom of excluded middle); and (c) fuzzy A∩
A = Ø (axiom of contradiction).

27
Set-Theoretic Operations

A B A

A B

A B
28
Examples of Fuzzy Set Operations

• Fuzzy union (): the union of two fuzzy sets is the


maximum (MAX) of each element from two sets.
• E.g.
– A = {1.0, 0.20, 0.75}
– B = {0.2, 0.45, 0.50}
– A  B = {MAX(1.0, 0.2), MAX(0.20, 0.45), MAX(0.75, 0.50)}
= {1.0, 0.45, 0.75}

29
Examples of Fuzzy Set Operations

• Fuzzy intersection (): the intersection of two fuzzy


sets is just the MIN of each element from the two
sets.
• E.g.
– A  B = {MIN(1.0, 0.2), MIN(0.20, 0.45), MIN(0.75,
0.50)} = {0.2, 0.20, 0.50}

30
Examples of Fuzzy Set Operations

• The complement of a fuzzy variable with DOM x is (1-


x).

• Example.
– Ac = {1 – 1.0, 1 – 0.2, 1 – 0.75} = {0.0, 0.8, 0.25}

31
Properties of Fuzzy Sets
AB=BA
AB=BA
A  (B  C) = (A  B)  C
A  (B  C) = (A  B)  C
A  (B  C) = (A  B)  (A  C)
A  (B  C) = (A  B)  (A  C)
AA=A AA=A
AX=X AX=A
A=A A=

If A  B  C, then A  C

A’’ = A
32
Fuzzy Sets

Note (x)  [0,1]


not {0,1} like Crisp set
A = {A(x1) / x1 + A(x2) / x2 + …}
= { A(xi) / xi}
Note: ‘+’  add
‘/ ’  divide
Only for representing element and its
membership.
Also some books use (x) for Crisp Sets too.

33
Example (Discrete Universe)

U  {1, 2,3, 4,5, 6, 7,8} # courses a student


may take in a semester.

 (1, 0.1) (2, 0.3) (3, 0.8) (4,1)  appropriate


A  # courses taken
 (5, 0.9) (6, 0.5) (7, 0.2) (8, 0.1) 

 A ( x)
0.5

0
2 4 6 8
x : # courses 34
Example (Discrete Universe)

U  {1, 2,3, 4,5, 6, 7,8} # courses a student


may take in a semester.

 (1, 0.1) (2, 0.3) (3, 0.8) (4,1)  appropriate


A  # courses taken
 (5, 0.9) (6, 0.5) (7, 0.2) (8, 0.1) 

Alternative Representation:

A  0.1/ 1  0.3 / 2  0.8 / 3  1.0 / 4  0.9 / 5  0.5 / 6  0.2 / 7  0.1/ 8

35
Example (Continuous Universe)

U : the set of positive real numbers possible ages

B  ( x,  B ( x)) x  U 

 B ( x) 
1 about 50 years old
4
 x  50 
1   1.2

 5  1

0.8

Alternative  B ( x) 0.6

Representation: 0.4

0.2

B 1
x 0

R  1  x550 
4 0 20 40 60 80 100

x : age 36
Alternative Notation

A  ( x,  A ( x)) x  U 
U : discrete universe A 
xi U
A ( xi ) / xi

U : continuous universe A    A ( x) / x
U

Note that  and integral signs stand for the union of


membership grades; “ / ” stands for a marker and does not imply
division.
37
Fuzzy Disjunction
• AB max(A, B)
• AB = C "Quality C is the
disjunction of Quality A and B"
A B
1 1

0.75

0.375

0 0

• (AB = C)  (C = 0.75)
38
Fuzzy Conjunction
• AB min(A, B)
• AB = C "Quality C is the
conjunction of Quality A and B"
A B
1 1

0.75

0.375

0 0

• (AB = C)  (C = 0.375)

39
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
A B
1 1

0 0
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40

40
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
A B
1 1

0 0
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40

• Determine degrees of membership:

41
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
A B
1 1

0.7

0 0
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40

• Determine degrees of membership:


• A = 0.7

42
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
A B
1 1
0.9
0.7

0 0
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40

• Determine degrees of membership:


• A = 0.7 B = 0.9

43
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
A B
1 1
0.9
0.7

0 0
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40

• Determine degrees of membership:


• A = 0.7 B = 0.9
• Apply Fuzzy AND
• AB = min(A, B) = 0.7

44
Generalized Union/Intersection

• Generalized Union
Or called triangular norm.
t-norm
• Generalized Intersection

t-conorm Or called s-norm.

45
T-norms and S-norms

 And/OR definitions are called T-norms (S-norms)


 Duals of one another
 A definition of one defines the other implicitly
 Many different ones have been proposed
 Min/Max, Product/Bounded-Sum, etc.

46
Examples: T-Norm & T-Conorm
• Minimum/Maximum:

T (a, b)  min(a, b)  a  b
S (a, b)  max(a, b)  a  b
• Lukasiewicz:

T (a, b)  max(a  b  1, 0)  LAND(a, b)


S (a, b)  min(a  b,1)  LOR(a, b)

47
Fuzzy Relations


48
Crisp Relation (R)

b1
a1
b2
A a2
a3
b3 B
b4
a4 b5

R  A B
49
R  A B
Crisp Relation (R)

b1
a1
b2
A a2
a3
b3 B
b4
a4 b5

1 0 1 0 0 a1 Rb1 a1 Rb3 a2 Rb5


0 1 
0 0 0 ( a1 , b1 ), ( a1 , b3 ), ( a2 , b5 ) 
MR   R 
1 0 0 1 0 ( a
 3 1 , b ), ( a3 , b4 ), ( a 4 , b )
2 
 
0 1 0 0 0 a3 Rb1 a3 Rb4 a4 Rb2 50
Crisp Relations
Example:
If X = {1,2,3}
Y = {a,b,c}
R = { (1 a),(1 c),(2 a),(2 b),(3 b),(3 c) }

a b c
1 1 0 1
R= 2 1 1 0
3 0 1 1
Using a diagram to represent the relation

51
The Real-Life Relation
 x is close to y
 x and y are numbers
 x depends on y
 x and y are events
 x and y look alike
 x and y are persons or objects
 If x is large, then y is small
 x is an observed reading and y is a
corresponding action
52
Fuzzy Relations
• Triples showing connection between two sets:
(a,b,#): a is related to b with degree #

• Fuzzy relations are set themselves

• Fuzzy relations can be expressed as matrices


53
Fuzzy Relations Matrices
• Example: Color-Ripeness relation for tomatoes

R1(x, y) unripe semi ripe ripe

green 1 0.5 0

yellow 0.3 1 0.4

Red 0 0.2 1

54
Composition

Let R be a relation that relates, or maps, elements from universe


X to universe Y, and let S be a relation that relates, or maps,
elements from universe Y to universe Z.

A useful question we seek to answer is whether we can find a


relation, T, that relates the same elements in universe X that R
contains to the same elements in universe Z that S contains. It
turns out that we can find such a relation using an operation
known as composition.

55
Composition
There are two common forms of the composition
operation:
max–min composition

max–product composition.

56
Max-Min Composition

X Y Z
R: fuzzy relation defined on X and Y.

S: fuzzy relation defined on Y and Z.


R 。 S: the composition of R and S.
A fuzzy relation defined on X an Z.

 RS (x, z )  max y min   R ( x, y ),  S ( y, z ) 

  y   R ( x, y )   S ( y , z ) 
57
Example
 S R (x, y )  max v min   R ( x, v),  S (v, y ) 

R a b c d S   
1 0.1 0.2 0.0 1.0 a 0.9 0.0 0.3
2 0.3 0.3 0.0 0.2 b 0.2 1.0 0.8
3 0.8 0.9 1.0 0.4 c 0.8 0.0 0.7
0.1 0.2 0.0 1.0
d 0.4 0.2 0.3
min 0.9 0.2 0.8 0.4
max 0.1 0.2 0.0 0.4
RS   
1 0.4 0.2 0.3
2 0.3 0.3 0.3
3 0.8 0.9 0.8
58
.

Max-Product Composition

X Y Z
R: fuzzy relation defined on X and Y.

S: fuzzy relation defined on Y and Z.


R 。 S: the composition of R and S.
A fuzzy relation defined on X an Z.

 RS (x, y )  max v   R ( x, v) S (v, y ) 

59
Example

R a b c d S   
1 0.1 0.2 0.0 1.0 a 0.9 0.0 0.3
2 0.3 0.3 0.0 0.2 b 0.2 1.0 0.8
3 0.8 0.9 1.0 0.4 c 0.8 0.0 0.7
0.1 0.2 0.0 1.0
d 0.4 0.2 0.3
Product 0.9 0.2 0.8 0.4
max .09 .04 0.0 0.4

RS   
1 0.4 0.2 0.3
2 0.27 0.3 0.24
3 0.8 0.9 0.7
60
Example

Suppose we are interested in understanding the speed control


of the DC shunt motor under no-load condition, as shown.

61
Example

Initially, the series resistance Rse in should be kept in the cut-in


position for the following reasons:
1. The back electromagnetic force, given by Eb = kNφ, where k is a
constant of proportionality, N is the motor speed, and φ is the flux
(which is proportional to input voltage, V ), is equal to zero because
the motor speed is equal to zero initially.
2. We have V = Eb + Ia(Ra + Rse), therefore Ia = (V − Eb)/(Ra + Rse),
where Ia is the armature current and Ra is the armature resistance.
Since Eb is equal to zero initially, the armature current will be Ia =
V/(Ra + Rse), which is going to be quite large initially and may
destroy the armature.

62
Example
Let Rse be a fuzzy set representing a number of possible
values for series resistance, say sn values, given as

and let Ia be a fuzzy set having a number of possible values


of the armature current, say m values, given as

The fuzzy sets Rse and Ia can be related through a fuzzy


relation, say R, which would allow for the establishment of
various degrees of relationship between pairs of resistance
and current.

63
Example
Let N be another fuzzy set having numerous values for the
motor speed, say v values, given as

Now, we can determine another fuzzy relation, say S, to relate


current to motor speed, that is, Ia to N.
Using the operation of composition, we could then compute a
relation, say T, to be used to relate series resistance to motor
speed, that is, Rse to N.

64
Example
The operations needed to develop these relations are as follows –
two fuzzy Cartesian products and one composition:

65
Example
Suppose the membership functions for both series resistance
Rse and armature current Ia are given in terms of percentages
of their respective rated values, that is,

66
Example
The following relation then result from use of the Cartesian
product to determine R:

67
Example 3.8
Cartesian product to determine S:

68
Example
The following relation results from a max–min composition for
T:

69
HW

70

You might also like