You are on page 1of 46

Chapter 9

FUZZY INFERENCE

Chi-Yuan Yeh
GMP and GMT

2
Fuzzy rule as a relation
If x is A, then y is B
x is A, y is B fuzzy predicates A( x), B( y )
If A( x), then B( y )
can be represented by relation
R( x, y ) : A( x) B( y )
R( x, y ) can be considered a fuzzy set with 2 - dim membership function
R ( x, y ) f ( A ( x), B ( y ))
where f is " fuzzy implication function" , performs the task
of transforming the membership degrees of x in A and y in B
into those of ( x, y ) in A B

3
Fuzzy implications

4
Example of Fuzzy implications

Let T and H be universe of temperature and humidity,


and define variables t T and h H.
A " high" , A T
B " fairly high" , B H
then the rule can be rewritten as
R(t, h) : If t is A, then h is B
R(t) : t is A, R(h) : h is B
R(t, h) : R(t) R(h)
R(t, h) A B A (t ) B (h) /(t , h)
5
Example of Fuzzy implications

R(t, h) A B A (t ) B (h) /(t , h)

6
Example of Fuzzy implications
When " temperature is fairly high" or t is A ' , A ' T

We can use composition of fuzzy relations to find R(h)


R( h) R(t ' ) R C (t , h)

7
Compositional rule of inference
The inference procedure is called as the compositional rule of inference. The
inference is determined by two factors : implication operator and
composition operator.

For the implication, the two operators are often used:

For the composition, the two operators are often used:

8
Representation of Fuzzy Rule
Single input and single output
Fact: u is A ' : R (u )
Rule: If u is A then w is C : R(u, w)
Result: w is C ' : R( w) R(u ) oR(u, w)

Multiple inputs and single output


Fact: u1 is A1' ' and u2 is A2' ' and ... and un is An' '
Rule: If u1 is A1 and u2 is A2 and ... and un is An then w is C
Result: w is C '
Multiple inputs and Multiple outputs
Fact: u1 is A1' and u2 is A2' and ... and un is An'
Rule: If u1 is A1 and u2 is A2 and ... and un is An then w1 is C1 , w2 is C2 ,..., wm is Cm
Result: w1 is C1' , w2 is C2' ,..., wm is Cm'
9
Representation of Fuzzy Rule
Multiple rules
Fact : u1 is A' 1 and u 2 is A ' 2 and ... and un is A' n
Rule j : If u1 is A' 1 j and u 2 is A ' 2 j and ... and u n is A' nj , then w 1j is C '1j , w 2j is C ' 2j , ..., w mj is C ' mj
Result : w 1 is C '1 , w 2 is C ' 2 , ..., w m is C ' m

10
Representation of Fuzzy Rule
Singleton
Fact: u is A '
Rule: If u is A then w is C Fuzzy input
Result: w is C '

Singleton fuzzy set


11
Representation of Fuzzy Rule

Fact: u is A '
Rule: If u is A then w is C
Result: w is C ' fuzzy set

Consequence fuzzy set with a monotonic function
crisp function
:

fuzzy set fuzzy set with a crisp function


12
monotonic function
Representation of Fuzzy Rule

Fact: u is A ' : R (u )
Rule: If u is A then w is C : R(u, w)
Result: w is C ' : R( w) R(u ) oR(u, w)

Max-min composition operator

R (u , w) : A C

Mamdani: min operator for the implication


Larsen: product operator for the implication 13
One singleton input and one fuzzy
output
Mamdani
Fact: u is A ' : R (u )
Rule: If u is A then w is C : R(u, w)
Result: w is C ' : R( w) R(u ) oR(u, w)

14
One singleton input and one fuzzy
output
Mamdani

15
One singleton input and one fuzzy
output
Larsen
Fact: u is A ' : R (u )
Rule: If u is A then w is C : R(u, w)
Result: w is C ' : R( w) R(u ) oR(u, w)

16
One singleton input and one fuzzy
output
Larsen

17
One fuzzy input and one fuzzy
output
Mamdani
Fact: u is A ' : R (u )
Rule: If u is A then w is C : R(u, w)
Result: w is C ' : R( w) R(u ) oR(u, w)

18
One fuzzy input and one fuzzy
output
Mamdani

19
MIMO to MISO
R {R 1MIMO , R 2 MIMO , R 3 MIMO , , R n MIMO }
where R i MIMO represents the rule :
If x is A i and y is Bi , then z1 is Ci , , z q is D i
R i MIMO :
n
R {R i MIMO }
i 1
n
{( Ai Bi ) ( z1 z q )}
i 1
n n n
{[( Ai Bi ) z1 ], [( Ai Bi ) z 2 ], , [( Ai Bi ) z q ]}
i 1 i 1 i 1
q n
{[( Ai Bi ) z k ]}
k 1 i 1
q n
{RB k
MISO } where RB k
MISO [( Ai Bi ) z k ]
k 1 i 1

{RB 1
MISO , RB 2
MISO , , RB k
MISO , , RB q MISO }
20
Ri consists of R and R 1 2

Rule i : If u is A i and v is Bi , then w is Ci


C 'i (A ' , B' ) (A i and Bi Ci )
C'i ( A ' , B' ) ( Ai Bi C )
( A ' , B' ) (min( A i , Bi ) C )
( A ' , B' ) min[( Ai C ), ( Bi C )]
max min{( A ' , B' ), min[( A i C ), ( Bi C )]}
u ,v

max min{min[ A ' , ( Ai C )], min[ B' , ( Bi C )]}


u ,v

min{[ A ' ( A i C )], [ B' ( Bi C )]}

C 'i [A ' (A i Ci )] [B' (Bi Ci )]


[A ' R 1i ] [A ' R i2 ]
C1i Ci2
21
Example
R : if x is A and y is B, then z is C
where A (0,1,2), B (1,2,3), C (5,6,7) are triangular fuzzy sets.
If input x 0 1 and y 0 1.5 (Singleton) , then output?

22
Two singleton inputs and one fuzzy
output
Mamdani
Fact: u is A ' and v is B ' : R (u , v)
Rule: If u is A and v is B then w is C : R(u, v, w)
Result: w is C ' : R( w) R(u, v) oR(u , v, w)

23
Two singleton inputs and one fuzzy
output
Mamdani

24
Example
R : if x is A and y is B, then z is C
where A (0,1,2), B (1,2,3), C (5,6,7) are triangular fuzzy sets.
If input x 0 1 and y 0 1.5 (Singleton) , then output?

25
Two fuzzy inputs and one fuzzy
output
Mamdani
Fact: u is A ' and v is B ' : R (u , v)
Rule: If u is A and v is B then w is C : R(u, v, w)
Result: w is C ' : R( w) R(u, v) oR(u , v, w)

26
Two fuzzy inputs and one fuzzy
output
Mamdani

27
Two fuzzy inputs and one fuzzy
output
Mamdani

28
Example
R : if x is A and y is B, then z is C
where A (0,1,2), B (1,2,3), C (5,6,7) are triangular fuzzy sets.
If input A' (1,2,3) and B' (1.5, 2.5, 3.5) (Fuzzy set) , then output?

29
Multiple rules

30
Multiple rules

31
Multiple rules

32
Example
R 1 : if x is A1 , then z is C1
R 2 : if x is A 2 , then z is C 2
where A1 (0,1,2), C1 (1,2,3), A 2 (0.5,1.5,2.5), C 2 (2,3,4)
are triangular fuzzy sets.
If input x 0 1 (Singleton) , then output?

33
Mamdani method

34
Mamdani method

35
Mamdani method

36
Mamdani method

37
Larsen method

38
Larsen method

39
Larsen method

40
Larsen method

41
Tsukamoto method

42
Tsukamoto method

43
TSK method

44
TSK method

45
Thanks for your attention!

46

You might also like