You are on page 1of 53

Approaches and Systems

Lecture 4
Chapter 4 Fuzzy Systems

Prof. Hongguang Li
Beijing University of Chemical Technology
Chapter 4 Fuzzy Systems

4.1 Introduction
4.2 Fuzzy Sets
4.3 Fuzzy Relations
4.4 Fuzzy Inference
4.5 Fuzzy Rule-bases

1
C
Chapter 4 Fuzzy S
Systems
4 1 Introduction
4.1 i
Id
Ideas
Fuzzy logic is not logic that is fuzzy,
fuzzy but logic that is
used to describe fuzziness.
Fuzzy logic is the theory of fuzzy sets, sets that
calibrate vagueness.
g
Fuzzy logic is based on the idea that all things admit
of degrees.
degrees
2
For instance

The motor is running really hot.


hot
Tom is a very tall guy.
Electric cars are not very fast.

Such a sliding scale often makes it impossible to


distinguish members of a class from non-members.

3
Crisp:
p ggender,, age,
g ,
education
Characteristics
of objects
Fuzzy: health, body type,
impression
impression

Fuzzy logic reflects how people think. It attempts to


model our sense of words,
words our decision making and
our common sense.

4
Fuzziness vs. Randomness

Fuzziness
F i
indicates subjective uncertainty.

Randomness
corresponds to objective uncertainty.

5
Fuzzy
F S t
Sets

A fuzzy set consists of a universe of discourse and a


membership function that maps every element in the
universe of discourse to a membership value
bet een 0 and 1.
between 1

People have different views on the same (vague)


concept. Fuzzy sets can be used to easily
accommodate this reality.

6
7
A History
Hi off Fuzzy
F S
Systems

-- Proposed by Lotfi A. Zadeh of the University of


C lif i att Berkeley
California B k l in i 1965.
1965
-- Initially, fuzzy systems were largely ignored in the
US because they were associated with artificial
g
intelligence.
-- The Japanese had an intense interest in fuzzy
systems Hitachi,
systems. Hitachi demonstrated the superiority of
fuzzy control systems for the Sendai railway 1985.

8
A History
Hi off Fuzzy
F S
Systems

-- Japanese companies developed a wide range of


products using fuzzy logic,
logic ranging from washing
machines to autofocus cameras and industrial air
conditioners.
-- Some work was also performed on fuzzy logic
systems in the US and Europe, and a number of
products
d t were developed
d l d using i f
fuzzy l i
logic
controllers.
9
A History
Hi off Fuzzy
F S
Systems

-- Little has been said about the technology in recent


years which implies that it has either become an
years,
ordinary tool or it turned out to be an industrial
craze that
th t has
h now generallyll died
di d out.
t
-- IEEE Trans. On Fuzzy Systems

Applications of Fuzzy Systems


Consult the textbook, P17-18
10
Seminar 4.1

1. Please present an exemplary problem with


uncertainties.
t i ti

22. Please present examples


e amples of f
fuzzy
uncertainties and random uncertainties.

11
Chapter 4 Fuzzy Systems

4.1 Introduction
4.2 Fuzzy Sets
4.3 Fuzzy Relations
4.4 Fuzzy Inference
4.5 Fuzzy Rule-bases

12
4 2 Fuzzy
4.2 F Sets

Definition 1 (Fuzzy Sets)

A fuzzy set consists of a universe of discourse and a


membership function that maps every element in the
universe
i off discourse
di t a membership
to b hi value l
between 0 and 1.

13
Ais a membership function.

( , A ((x)) | xX}}
A = { (x,

(x)

A

X
x
A=
A Two notations
n
A ( xi )
i =1 xi

14
Examples
Textbook 2.1,
Textbook, 2 1 2.2
22

Definition 2 (Support of a fuzzy set)


AS = { X | A(x)
( ) >0 }

For a fuzzy set whose universe of discourse is X, all


the elements in X that have nonzero membershipp
values form the support of the fuzzy set.

15
Definition 3 (Singleton fuzzy sets)
u y se
A fuzzy set that
a has
as nonzero
o e o membership
e be s p va
value
ue for
o
only one element of the universe of discourse is
called a singleton fuzzy set.
set

Definition 4 (Continuous fuzzy sets)


A fuzzy set is said to be continuous if its
membership function is continuous.
Most fuzzy controllers and models nowadays use
continuous fuzzy sets.
16
M b hi Functions
Membership F ti

(1) Triangular


x b
x
, b xa
a b
cx
= , a x c
c a
0 , x < b, x >c
x
b a c

17
(2) Gaussian
G i

xa 2
( )
=e b
, b>0

a x

18
Fuzzy
F Arithmetic
A ith ti
(1) Equality A = B
A (x) = B (x) x X
(2) Inclusion A B
A (x) B (x) x X
U i AB
(3) Union
AB (x) = A (x) B (x) = max [A (x), B (x)]
(4) Intersection A B
AB (x) = A (x) B (x) = min [A (x), B (x)]

(5) Complement A
A (x) 1 A (x)
( ) = 1- ( )
19
Example 2.3
Textbook, P22

Properties
P ti off Arithmetic
A ith ti
Distributive law
Associative law Textbook, P23
Commutative law

Other Types
Oth T off Arithmetic
A ith ti
Textbook, P24
20
T-norm and T-conorm

A T-norm denoted byis a function [0,1] [0,1]


[0,1]. Some popular definitions are given below.
A ((x)) B ((x)=min
) ), B ((x))
(A ((x), ))
A (x) B (x)=A (x) B (x)
A (x) B (x)=max{0, A (x) + B (x)-1}

21
A T-conorm, also called S-norm, denoted by is a
function [[0,1]
, ] + [[0,1]
, ] [0,1].
[ , ] Some ppopular
p
definitions of S-norm are given below.
A (x)
( ) B (x)=max
( ) ( ) B (x))
( A (x),
( ( ))
A ((x)) B ((x)=
) A ((x)) +
B ((x)-
) A ((x)) B ((x))
A (x) B (x)=min{1, A (x) + B (x)}

22
Seminar 4.2

1. Please
1 Pl t lk about
talk b t the
th physical
h i l meaning
i off
the membership p function.

2. Please compare the triangular and


Gaussian membership functions in terms of
th i application
their li ti merits.
it
23
Chapter 4 Fuzzy Systems

4.1 Introduction
4.2 Fuzzy Sets
4.3 Fuzzy Relations
4.4 Fuzzy Inference
4.5 Fuzzy Rule-bases

24
4 3 Fuzzy Relations
4.3

Definition 1 (Cartesian Product)

AB = { ( a, b ) | aA, bB }
AB BA

A B = min [ A ( x), B ( x)]


or
A B = A ( x) B ( x)

25
Definition
fi i i 2 (Fuzzy
( Relations)
i )

Let A and B be two universes of discourse. A fuzzy


relation R is a fuzzy set in the product space AB
having the membership function R (x, y), where
xA and yB.

A detailed coverage is shown in the textbook, P24

26
D fi iti 3 (Fuzzy
Definition (F Relation
R l ti Matrix)
M t i )

R (x1, y1) R (x1, y2 )... R (x1, ym)


(x , y ) R (x2, y2 ) R (x2, ym)
R= R 2 1

...

R (xn , y1) R (xn , y1) R (xn , ym)

27
An Example
The membership function of xx is significantly greater
than y is:

0 , x y
R (x, y) =
1
, x > y
100
1+
(x y)2

X={10,20,40,80}, Y={10,20,30,40}
28
We have

0 0 0 0
0 .5 0 0 0
R =
0 .9 0 .8 0 .5 0

0 . 98 0 . 97 0 . 96 0 . 94

Thus,, the degree


g of x is significantly
g y ggreater than yy
is 0.8 with x=40 and y=20.

29
Fuzzy
F C
Compositions
iti
Let R1 and R2 be two fuzzy relations of XY and
YZ, respectively. For xX, y Y, z Z, a
popular
p p fuzzyy composition
p is ggiven below.
R1 : XY, R2 : YZ
R1 R2 : XZ
R1 R2 (x,z) = [ R1 (x,y) R2 (y,z)]
(x,z) X Z
union,, maximum;; intersection,, minimum.
--- Max-min composition

30
An Example

1 0.2 0.5 0.4 0.9


R1 = 0.1 0.4 0.1 R2 = 0.7 1
0.3 0.9 0 0.1 0.3

( 0 . 4 , 0 . 2 , 0 . 1) ( 0 .9 ,0 .2 ,0 .3 )
R1 o R 2 = ( 0 . 1, 0 . 4 , 0 . 1 ) ( 0 . 1, 0 . 4 , 0 . 1 )
( 0 . 3 , 0 . 7 , 0 ) ( 0 . 3 , 0 . 9 , 0 )
0 .4 0 .9
= 0 . 4 0 . 4
0 . 7 0 . 9
31
Properties of Composition
Textbook, P27

Exponentiation
R2=R R
Rn=R R R

Inverse
R-1 (y,x) = R (x,y)

32
Seminar 4.3

1 Please
1. Pl d
draw a membership
b hi function
f ti that
th t
quantifies the statement the number x is
q
near 10 and the number y is near 2.

33
Chapter 4 Fuzzy Systems

4.1 Introduction
4.2 Fuzzy Sets
4.3 Fuzzy Relations
4.4 Fuzzy Inference
4.5 Fuzzy Rule-bases

34
4 4 Fuzzy Inference
4.4

Fuzzy Inference Models


Fuzzy inference can be defined as a process of
mapping from a given input to an output, using the
theory of fuzzy sets.
Typical fuzzy inference models include:
-- Mamdani fuzzy models
-- Sugeno fuzzy models
--Tsukamoto fuzzy models
35
The most commonly used fuzzy inference technique
is the so-called Mamdani method.

In 1975, Professor Ebrahim Mamdani of London


University built one of the first fuzzy systems to
control
co t o a stea
steam eengine
g e aandd bo
boiler
e co
combination.
b at o .

36
Mamdani Reasoning Maps

37
Generalized Modus Ponens, GMP

Premise 1If x is A, then y is B


Premise 2x is A
A

Consequenty is B

38
Generalized Modus Tollens, GMT

Premise 1If x is A, then y is B


P
Premise
i 2y
2 i B
is

Consequent x is A

39
F
Fuzzy I li ti
Implications

Let A and B be fuzzy sets over X and Y , respectively.


A fuzzy implication is thus denoted by AB in XY.XY
The most classical form involving premise x is A and
conclusion
l i y is i B ( IF x is
i A THEN y is B) xX,
i B), X y
Y is as follows:
AB (x, y) = [ A (x) B (x)] [1- A (x)]
R AB
A B = A B ( Y)

40
An
A Example
E l
The fuzzy sets over universes X={a1 , a2 , a3 , a4 , a5 }
and Y={b1 , b2 , b3 , b4 } are:

small = A = 1 + 0.8 + 0.4


a1 a2 a3

large = B = 0.3 + 0.9


b3 b4

Try to calculate the fuzzy relation matrix R AB


of if x is small then y is large.

41

RAB = A B ( A Y) Max Min
1 0
0.8 0.2
=
0.4 [0 0 0.3 0.9] 0.6 [1 1 1 1]

0 1
0 1
0 0 0.3 0.9 0 0 0 0 0 0 0.3 0.9
0 0 0.3 0.8 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.8
M
= 0 0 0.3 0.4 0.6 0.6 0.6 0.6 = 0.6 0.6 0.6 0.6
i
0 0 0 0 1 1 1 1 1 1 1 1
n 0 0 0 0 1 1 1 1 1 1 1 1

42
Fuzzy Inference (Approximate Inference)
GMP: B=A R AB
GMT: A= R AB B

Linguistic Variables
Textbook, P27-28
A = A4, A = A2, A = A1.25 ,,,,,,
A = A0.75, A = A0.5, A = A0.25 ,,,,,,

Textbook, P30~35

43
Comparison of Operations
Textbook, P35~P41

Other Types of Fuzzy Implications


If x is A, then y is B, otherwise y is C

R = (A B) ( A C)

If x is A and y is B, then z is C
R = A B C=(A C) ( B C)

44
Chapter 4 Fuzzy Systems

4.1 Introduction
4.2 Fuzzy Sets
4.3 Fuzzy Relations
4.4 Fuzzy Inference
4.5 Fuzzy Rule-bases

45
4 5 Fuzzy
4.5 F R l b
Rule-bases

Typically,
T picall numerous
n mero s IF THEN rulesr les are involved
in ol ed
in a rule-base, such as
Ri : IF ( x is
i Ai andd andd y is
i Bi )
THEN ( z1 is Ci and and zq is Di )

Fuzzy implications:
( Ai Bi ) ( Ci + Di )
W consider
We id that
h separate Ri is
i connectedd with
i h the
h
also term.
46
x is A and y is B
X Y

also
UNION operation

Fuzzy Implications
Rc( min ) or Rp (product)

47
n n
R = {Ri } = {[(Ai ...Bi ) (Ci +...+ Di )]}
i=1 i=1
n n
= {[(Ai ...Bi ) Ci ],...,
] [(Ai ...Bi ) Di ]}
i=1 i=1

= {RB ,...RB }
1 q

48
MISO:
R1 : IF x is A1 and y is B1 THEN z is C1

Rn : IF x is An and y is Bn THEN z is Cn
Input: x is A, y is B; Output: z is C
Ri = ( Ai and Bi ) Ci = Ai Bi Ci
C= ( Ai and Bi ) R
C
n
R = R i
i=1

Example
a p e 2.8.
.8. Textbook,
e tboo , P433 ~ P455
49
Properties
P ti off Fuzzy
F I f
Inferences
(Textbook, P45 ~ P49)
Coping complicated inferences with many and
connectives.
Property 1 n n
( A' and B ' ) o U Ri =U ( A' and B ' ) o Ri
i =1 i =1
Property 2

( A' and B' ) o ( Ai and Bi Ci )


= [ A'o( Ai Ci )]I [ B'o( Bi Ci )]
50
Property 3

There is a simplified way to compute the expression

Ci= ( A and B ) ( Ai and Bi Ci )

Refer to the textbook,


textbook P48 for details.
details

51
Homework 4
Given universes X={a1 , a2 , a3 },Y={b1 , b2 }and
Z={c1 , c2 , c3 }, along with the fuzzy sets,
0.5 1 0.1
A= + + A X,
a1 a2 a3
0 .2 0 .6 B Y,
B = +
b1 b2
0 .3 0 .4 0 .7 C Z,
C= + +
c1 c2 c3
calculate the fuzzy relation matrix of rule IF X is A
and Y is B,
B THEN Z is C. C
52

You might also like