24
Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

  • View
    247

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Jang, Sun, and MizutaniNeuro-Fuzzy and Soft Computing

Chapter 4Fuzzy Inference Systems

Dan SimonCleveland State University

1

Page 2: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Fuzzy Inference Systems

Also called:• Fuzzy rule-based system• Fuzzy model• Fuzzy associate memory (FAM)• Fuzzy logic controller• Fuzzy systemThree components:• Rule base (fuzzy rules)• Database (dictionary; membership functions)• Reasoning/inference mechanism

2

Page 3: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

http://www.scielo.br/scielo.php?script=sci_arttext&pid=S0104-40362007000300009

3

Page 4: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Outline

1. Fuzzy Inference Systemsa) Ebrahim Mamdani (University of London)b) Sugeno, or TSK (Takagi/Sugeno/Kang)c) Tsukamoto

2. Input Space Partitioning3. Fuzzy modeling: Required tasks

a) Surface structure identificationb) Deep structure identification

4

Page 5: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Mamdani Fuzzy Models

Two-input, one-ouput example:If x is Ai and y is Bk then z is Cm(i,k)

5

B1 B2 B3 B4

A1 C1 C2 C3 C4

A2 C5 C6 C7 C8

A3 C9 C10 C11 C12

x

y

z

L M H VHL Z L M HM L M H VHH M H VH VH

Fiel

ding

per

cent

age

Batting average

Playing time

Page 6: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Mamdani composition of three SISO fuzzy outputshttp://en.wikipedia.org/wiki/Fuzzy_control_system

6

Page 7: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Mamdani composition of two-rule fuzzy systemmax-min inferencinghttp://aragorn.pb.bialystok.pl/~radev/logic/logrozm.htm

7

Page 8: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Defuzzification

Jang, page 77. See pages 75–76 for formulas.

8

Page 9: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Example 4.1 – mam1.m• if x is small then y is small• if x is medium then y is medium• if x is large then y is large

9

-10 -5 0 5 100

0.5

1

X

Me

mb

ers

hip

Gra

de

ssmall medium large

0 2 4 6 8 100

0.5

1

Y

Me

mb

ers

hip

Gra

de

s

small medium large

-10 -5 0 5 100

2

4

6

8

10

X

Y

Results depend on T-norm, S-norm, and defuzzification method

Review Mam1.m software

Page 10: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

10

-5 0 50

0.5

1

X

small large

-5 0 50

0.5

1

Y

Me

mb

ers

hip

Gra

de

s

small large

-5 0 50

0.5

1

Z

large negative

small negative

small positive

large positive

Example 4.2 – mam2.m• if x is small & y is small then z is large negative• if x is small & y is large then z is small negative• if x is large & y is small then z is small positive• if x is large & y is large then z is large positive

-5

0

5

-5

0

5

-2

0

2

XY

Z

Page 11: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Defuzzification can be computationally expensive. What is the center of area of this fuzzy set?

11

Theorem 4.1: If we use the product T-norm, and the summation S-norm (which is not really an S-norm), and centroid defuzzification, then the crisp output z is:

i i i

i i

wz

z

aw

a

wi = firing strength (input MF value)

ai = consequent MF area

zi = consequent MF centroid

ai and zi can be calculated ahead of time!

Page 12: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

12

Figure 4.8 in Jang – Theorem 4.1 applies if we use the product T-norm (shown above), and point-wise summation to aggregate the output MFs (not shown above), and centroid defuzzification.

What would point-wise summation look like?

Page 13: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Sugeno (TSK) Fuzzy Models

13

• Two-input, one-ouput example:If x is Ai and y is Bk then z = fm(i,k)(x, y)Antecedents are fuzzy, consequents are crisp

• Special case of singleton outputs:If x is Ai and y is Bk then z = cm(i,k) (constant)This is also called a zero-order TSK model, and it is also a special case of a Mamdani model

Page 14: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Sugeno (TSK) Fuzzy Models

The output is a weighted average:

14

, ( , )

,

( , ,) ( )

)

( )

( ,

,

i k

i k

A B m i k

A B

i i

i

x y yz

f x

w

y

w yf x

x

where wi is the firing strength of thei-th output

Double summation over all i (x MFs) and all k (y MFs)

Summation over all i (fuzzy rules)

Page 15: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Example 4.3 – sug1.m• If x is small then y = 0.1x + 6.4• If x is medium then y = –0.5x + 5• If x is large then y = x – 2

15

-10 0 100

0.5

1

X

Me

mb

ers

hip

Gra

de

s

small medium large

(a) Crisp Antecedent MFs

-10 0 100

2

4

6

8

X

Y

(b) Crisp I/O Curve

-10 0 100

0.5

1

X

Me

mb

ers

hip

Gra

de

s

small medium large

(c) Fuzzy Antecedent MFs

-10 0 100

2

4

6

8

XY

(d) Fuzzy I/O Curve

Review sug1.m software

Page 16: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Example 4.4 – sug2.m• If x is small and y is small then z = –x + y + 1• If x is small and y is large then z = –y + 5• If x is large and y is small then z = –x + 3• If x is large and y is large then z = x + y + 2

16

-5 0 50

0.5

1

X

Me

mb

ers

hip

Gra

de

sSmall Large

-5 0 50

0.5

1

Y

Me

mb

ers

hip

Gra

de

s

Small Large

-5

0

5

-5

0

5

0

5

10

XY

Z

Page 17: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Tsukamoto Fuzzy Models

• Section 4.4 in the text• Special type of Mamdani model

– Output MFs are open– Crisp output is weighted average of fuzzy outputs

17

Page 18: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

18

Tsukamoto fuzzy modelJang, Figure 4.11

Page 19: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Input Space Partitioning

Grid PartitionThe curse of dimensionality:If we have n inputs and m FMs per input, then we have mn if-then rules.For example, 6 inputs and 5 memberships per input 56 = 15,625 rules!

19

inpu

t 1

input 2

Page 20: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Input Space Partitioning

Tree Partition•Reduces the number of rules•Requires more MFs per input•MFs do not have clear linguistic meanings

20

inpu

t 1

input 2

Page 21: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Input Space Partitioning

Scatter Partition•In many systems, extremes occur rarely•Number of active rules depends on input values

21

inpu

t 1

input 2

Page 22: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Fuzzy Modeling

• Fuzzy modeling consists of constructing a fuzzy inference system. This can be done using:– Domain (expert) knowledge– Numerical training data

22

Page 23: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Fuzzy Modeling

Fuzzy modeling includes two stages:• Surface structure identification

– Specify input and output variables– Specify the type of fuzzy inference system– Specify the number of MFs for inputs and outputs– Specify the fuzzy if-then rules

• Deep structure identification– Specify the type of MFs– Specify the MF parameters using human expertise

and numerical optimization

23

Page 24: Jang, Sun, and Mizutani Neuro-Fuzzy and Soft Computing Chapter 4 Fuzzy Inference Systems Dan Simon Cleveland State University 1

Fuzzy Modeling

How could you construct a fuzzy control system?

24

http://en.wikipedia.org/wiki/File:Fuzzy_control_system-feedback_controller.png