fuzzy logic

22
Fuzzy Logic E. Fuzzy Inference Engine

Upload: amity

Post on 12-Feb-2016

58 views

Category:

Documents


1 download

DESCRIPTION

Fuzzy Logic. E. Fuzzy Inference Engine. Crisp input. Fuzzification. Rules. Defuzzification. Crisp Output Result. Fuzzy Inference. “antecedent”. “consequent”. Fuzzy Inference Example. Assume that we need to evaluate student applicants based on their GPA and GRE scores. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Fuzzy Logic

Fuzzy Logic

E. Fuzzy Inference Engine

Page 2: Fuzzy Logic

“antecedent”

“consequent”

Page 3: Fuzzy Logic

Assume that we need to evaluate student applicants based on their GPA and GRE scores.For simplicity, let us have three categories for each score [High (H), Medium (M), and Low(L)]Let us assume that the decision should be Excellent (E), Very Good (VG), Good (G), Fair (F) or Poor (P)An expert will associate the decisions to the GPA and GRE score. They are then Tabulated.

Page 4: Fuzzy Logic

Fuzzy Linguistic Variables

Fuzzy Logic

Antecedent Consequent

Fuzzy if-then RulesIf the GRE is HIGH and the GPA is HIGH

then the student will be EXCELLENT.If the GRE is LOW and the GPA is HIGH

then the student will be FAIR.etc

Page 5: Fuzzy Logic

Antecedents

Consequents

Page 6: Fuzzy Logic

Fuzzifier converts a crisp input into a vector of fuzzy membership values. The membership functions reflects the designer's knowledge provides smooth transition between

fuzzy sets are simple to calculateTypical shapes of the membership function are Gaussian, trapezoidal and triangular.

Page 7: Fuzzy Logic

GRE = {L , M ,

H }

GRE

Page 8: Fuzzy Logic

GPA

GPA = {L , M ,

H }

Page 9: Fuzzy Logic

c

Page 10: Fuzzy Logic

Transform the crisp antecedents into a vector of fuzzy membership values.Assume a student with GRE=900 and GPA=3.6. Examining the membership function gives

GRE = {L = 0.8 , M = 0.2 , H = 0}GPA = {L = 0 , M = 0.6 , H = 0.4}

Page 11: Fuzzy Logic

GRE

900

0.20.8

Page 12: Fuzzy Logic

3.6

0.40.6

Page 13: Fuzzy Logic

0.8 0.2 0.0

0.0

0.6

0.4

Page 14: Fuzzy Logic

0.8 0.2 0.0

0.0

0.6

0.4

0.0 0.0 0.0

0.6 0.2 0.0

0.4 0.2 0.0

Page 15: Fuzzy Logic

0.8 0.2 0.0

0.0

0.6

0.4

0.0 0.0 0.0

0.6 0.2 0.0

0.4 0.2 0.0

The student is GOOD if (the GRE is HIGH and the GPA is MEDIUM)OR(the GRE is MEDIUM and the GPA is MEDIUM)The consequent GOOD has a membership of max(0.6,0.2)=0.6

Page 16: Fuzzy Logic

0.8 0.2 0.0

0.0

0.6

0.4

0.0 0.0 0.0

0.6 0.2 0.0

0.4 0.2 0.0

E = 0.0VG = 0.0

F = max( 0.0, 0.4)

= 0.4G = max( 0.6, 0.2)

= 0.6B = max( 0,0,0.2)

= 0.2

Page 17: Fuzzy Logic

0.6

0.4

0.2

c

Page 18: Fuzzy Logic

Converts the output fuzzy numbers into a unique (crisp) numberCenter of Mass Method: Add all weighted curves and find the center of mass

0.6

0.4

0.2

c

Page 19: Fuzzy Logic

c

0.60.40.2

Center of Mass Method: Add all clipped curves and find the center of mass

Page 20: Fuzzy Logic

An Alternate Approach: Fuzzy set with the largest membership value is selected.Fuzzy decision:

{B, F, G,VG, E} = {0.2, 0.4, 0.6, 0.0, 0.0}Final Decision (FD) = Good StudentIf two decisions have same membership max, use the average of the two.

Page 21: Fuzzy Logic

CELN MN SN ZE SP MP LP

LN LN LN LN LN MN SN SNMN LN LN LN MN SN ZE ZESN LN LN MN SN ZE ZE SP

E ZE LN MN SN ZE SP MP LPSP SN ZE ZE SP MP LP LPMP ZE ZE SP MP LP LP LPLP SP SP MP LP LP LP LP

Page 22: Fuzzy Logic

-3 -2 -1 0 1 2 3

LN MN SN ZE SP MP LP

0

1

m

CE

0 1 3 6-1-3-60

1

m

ECU

ZE SP MP LPSNMNLN