Você está na página 1de 30

By:

6th April 2011

GAJANAND KUMAWAT 07EUDEC022


1

Introduction
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Fuzzy Control

Lotfi A. Zadeh introduced the theory of Fuzzy Logic in 1965. Fuzzy logic: A way to represent variation or imprecision in logic A way to make use of natural language in logic Approximate reasoning Humans say things like "If it is sunny and warm today, I will drive fast"

Summary

6th April 2011

Fuzzy Logic

Fuzzy Sets
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Fuzzy Sets can represent the degree to which a quality is possessed. Fuzzy Sets (Simple Fuzzy Variables) have values in the range of [0,1]

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

Fuzzy Linguistic Variables


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Fuzzy Linguistic Variables are used to represent natural language in logic. Linguistic variables: Temp: {Freezing, Cool, Warm, Hot} Cloud Cover: {overcast, partly cloudy, sunny} Speed: {slow, fast}

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

Membership Functions
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Temp: {Freezing, Cool, Warm, Hot} Degree of Truth or "Membership"


1 Freezing Cool Warm Hot

Fuzzy Control

0 10 30 50 70 90 110 Temp. (F)

Summary

6th April 2011

Fuzzy Logic

Membership Functions
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

How cool is 36 F ?

Freezing

Cool

Warm

Hot

Fuzzy Control

0 10 30 50 70 90 110 Temp. (F)

Summary

6th April 2011

Fuzzy Logic

Membership Functions
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

How cool is 36 F ? It is 30% Cool and 70% Freezing


1 Freezing Cool Warm Hot

0..7

Fuzzy Control

0..3
0 10 30 50 70 90 110 Temp. (F)

Summary

6th April 2011

Fuzzy Logic

Fuzzy Logic
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Fuzzy Control

How do we use fuzzy membership functions in predicate logic? Fuzzy logic Connectives: Fuzzy Conjunction, Fuzzy Disjunction, Operate on degrees of membership in fuzzy sets

Summary

6th April 2011

Fuzzy Logic

Fuzzy Disjunction
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
0.375

AB max(A, B) AB = C "Quality C is the disjunction of Quality A and B"


A
1 1 0.75

Fuzzy Control
Variables Rules Fuzzification Defuzzification

Summary

(AB = C) (C = 0.75)
Fuzzy Logic 9

6th April 2011

Fuzzy Conjunction
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
0.375

AB min(A, B) AB = C "Quality C is the conjunction of Quality A and B"


A
1 1 0.75

Fuzzy Control
Variables Rules Fuzzification Defuzzification

Summary

(AB = C) (C = 0.375)
Fuzzy Logic 10

6th April 2011

Example: Fuzzy Conjunction


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Calculate AB given that A is .4 and B is 20


A
1 1

Fuzzy Control

.1 .2 .3 .4 .5 .6 .7 .8 .9

1 5 10 15 20 25 30 35 40

Summary

6th April 2011

Fuzzy Logic

11

Example: Fuzzy Conjunction


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Calculate AB given that A is .4 and B is 20


A
1 1

Fuzzy Control

.1 .2 .3 .4 .5 .6 .7 .8 .9

1 5 10 15 20 25 30 35 40

Determine degrees of membership:

Summary

6th April 2011

Fuzzy Logic

12

Example: Fuzzy Conjunction


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Calculate AB given that A is .4 and B is 20


A
1 1

0.7

.1 .2 .3 .4 .5 .6 .7 .8 .9

1 5 10 15 20 25 30 35 40

Fuzzy Control

Summary

Determine degrees of membership: A = 0.7

6th April 2011

Fuzzy Logic

13

Example: Fuzzy Conjunction


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Calculate AB given that A is .4 and B is 20


A
1

0.9

0.7

.1 .2 .3 .4 .5 .6 .7 .8 .9

1 5 10 15 20 25 30 35 40

Fuzzy Control

Summary

Determine degrees of membership: A = 0.7 B = 0.9

6th April 2011

Fuzzy Logic

14

Example: Fuzzy Conjunction


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Calculate AB given that A is .4 and B is 20


A
1

0.9

0.7

.1 .2 .3 .4 .5 .6 .7 .8 .9

1 5 10 15 20 25 30 35 40

Fuzzy Control

Summary

Determine degrees of membership: A = 0.7 B = 0.9 Apply Fuzzy AND AB = min(A, B) = 0.7
Fuzzy Logic 15

6th April 2011

Fuzzy Control
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Fuzzy Control combines the use of fuzzy linguistic variables with fuzzy logic Example: Speed Control How fast am I going to drive today? It depends on the weather. Disjunction of Conjunctions

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

16

Inputs: Temperature
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Temp: {Freezing, Cool, Warm, Hot}


1 Freezing Cool Warm Hot

0 10 30 50 70 90 110 Temp. (F)

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

17

Inputs: Temperature, Cloud Cover


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Temp: {Freezing, Cool, Warm, Hot}


1 Freezing Cool Warm Hot

0 10 30 50 70 90 110 Temp. (F)

Cover: {Sunny, Partly Cloudy, Overcast}


1 Sunny Partly Cloudy Overcast

Fuzzy Control

Summary

0 0 20 40 60 80 100 Cloud Cover (%)

6th April 2011

Fuzzy Logic

18

Output: Speed
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Speed: {Slow, Fast}


1 Slow Fast

Fuzzy Control

0 0 25 50 75 100 Speed (mph)

Summary

6th April 2011

Fuzzy Logic

19

Rules
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

If it's Sunny and Warm, drive Fast Sunny(Cover)Warm(Temp) Fast(Speed) If it's Cloudy and Cool, drive Slow Cloudy(Cover)Cool(Temp) Slow(Speed) Driving Speed is the combination of output of these rules...

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

20

Example Speed Calculation


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

How fast will I go if it is 65 F 25 % Cloud Cover ?

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

21

Fuzzification: Calculate Input Membership Levels


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

65 F Cool = 0.4, Warm= 0.7


1 Freezing Cool Warm Hot

0 10 30 50 70 90 110 Temp. (F)

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

22

Fuzzification: Calculate Input Membership Levels


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

65 F Cool = 0.4, Warm= 0.7


1 Freezing Cool Warm Hot

0 10 30 50 70 90 110 Temp. (F)

25% Cover Sunny = 0.8, Cloudy = 0.2


1 Sunny Partly Cloudy Overcast

Fuzzy Control

Summary

0 0 20 40 60 80 100 Cloud Cover (%)

6th April 2011

Fuzzy Logic

23

...Calculating...
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

If it's Sunny and Warm, drive Fast Sunny(Cover)Warm(Temp)Fast(Speed) 0.8 0.7 = 0.7 Fast = 0.7 If it's Cloudy and Cool, drive Slow Cloudy(Cover)Cool(Temp)Slow(Speed) 0.2 0.4 = 0.2 Slow = 0.2

Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

24

Defuzzification: Constructing the Output


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Speed is 20% Slow and 70% Fast


1 Slow Fast

0 0 25 50 75 100 Speed (mph)

Fuzzy Control

Find centroids: Location where membership is 100%

Summary

6th April 2011

Fuzzy Logic

25

Defuzzification: Constructing the Output


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Speed is 20% Slow and 70% Fast


1 Slow Fast

0 0 25 50 75 100 Speed (mph)

Fuzzy Control

Find centroids: Location where membership is 100%

Summary

6th April 2011

Fuzzy Logic

26

Defuzzification: Constructing the Output


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Speed is 20% Slow and 70% Fast


1 Slow Fast

0 0 25 50 75 100 Speed (mph)

Fuzzy Control

Speed

= weighted mean = (2*25+...

Summary

6th April 2011

Fuzzy Logic

27

Defuzzification: Constructing the Output


Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Speed is 20% Slow and 70% Fast


1 Slow Fast

0 0 25 50 75 100 Speed (mph)

Fuzzy Control

Speed

Summary

= weighted mean = (.2*25+.7*75)/(.9) = 63.8 mph


Fuzzy Logic 28

6th April 2011

Summary
Introduction Fuzzy Sets Linguistic Variables Membership Functions Fuzzy Logic
Fuzzy OR Fuzzy AND Example
Variables Rules Fuzzification Defuzzification

Fuzzy Control

Fuzzy Logic provides way to calculate with imprecision and vagueness Fuzzy Logic can be used to represent some kinds of human expertise Fuzzy Membership Sets Fuzzy Linguistic Variables Fuzzy AND & OR Fuzzy Control

Summary

6th April 2011

Fuzzy Logic

29

THANK You...
6th April 2011 Fuzzy Logic 30

Você também pode gostar