31.10.2014 Views

What Is Fuzzy Logic?

What Is Fuzzy Logic?

What Is Fuzzy Logic?

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 Tutorial<br />

if temperature is cold then hot water valve is open and cold water valve is<br />

shut<br />

in which case all consequents are affected equally by the result of the<br />

antecedent. How is the consequent affected by the antecedent? The<br />

consequent specifies a fuzzy set be assigned to the output. The implication<br />

function then modifies that fuzzy set to the degree specified by the antecedent.<br />

The most common ways to modify the output fuzzy set are truncation using<br />

the min function (where the fuzzy set is truncated as shown in the following<br />

figure) or scaling using the prod function (where the output fuzzy set is<br />

squashed). Both are supported by the toolbox, but you use truncation for<br />

theexamplesinthissection.<br />

Antecedent<br />

Consequent<br />

If service is excellent or food is delicious then<br />

tip = generous<br />

1. Fuzzify<br />

inputs<br />

excelent<br />

service (crisp)<br />

0.0<br />

delicious<br />

food (crisp)<br />

0.7<br />

µ (service==excellent) = 0 .0<br />

µ (food==delicious) = 0 .7<br />

2. Apply<br />

OR operator<br />

(max)<br />

If ( 0.0 or 0.7 ) then<br />

0.7 0.7<br />

0.0<br />

max(0.0, 0.7) = 0.7<br />

tip = generous<br />

3. Apply<br />

implication<br />

operator (min)<br />

If ( 0.7 ) then tip = generous<br />

0.7<br />

generous<br />

min(0.7, generous)<br />

tip (fuzzy)<br />

2-18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!