Fuzzy Logic - PowerPoint PPT Presentation

1 / 60
About This Presentation
Title:

Fuzzy Logic

Description:

Solar Pool Heater Example ... wind speed and we want to adjust the valve that sends water to the solar panels ... Solar Pool Heater Example. now that we have ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 61
Provided by: Carl1163
Category:
Tags: fuzzy | heater | logic | solar | water

less

Transcript and Presenter's Notes

Title: Fuzzy Logic


1
Fuzzy Logic
Lotfi Zadeh created in 1965
2
  • reference
  • Matlab Fuzzy Logic Tutorial

3
Fuzzy Logic Process
Crisp Input
4
Fuzzification
  • The First Step...

5
How tall is Kevin?
  • Very Tall?
  • Tall?
  • Average?
  • Short?
  • Very Short?

6
How tall is Kevin?
  • Very Tall (7 feet)?
  • Tall (6 feet)?
  • Average (5 feet)?
  • Short (4 feet)?
  • Very Short (3 feet)?

7
Fuzzification Rules
8
Some Examples
  • If you are 5 feet
  • Very tall - 0
  • Tall - 0
  • Average - 100
  • Short - 0
  • Very Short - 0
  • Same as Boolean logic (so far)
  • Very Tall (7 feet)?
  • Tall (6 feet)?
  • Average (5 feet)?
  • Short (4 feet)?
  • Very Short (3 feet)?

9
Some Examples
  • If you are 5½ feet
  • Very tall - 0
  • Tall - 50
  • Average - 50
  • Short - 0
  • Very Short - 0
  • NOT Boolean logic (Whoa. Cool!)
  • Very Tall (7 feet)?
  • Tall (6 feet)?
  • Average (5 feet)?
  • Short (4 feet)?
  • Very Short (3 feet)?

10
How tall is Kevin?
Kevin is 6 2
  • Very Tall -
  • Tall -
  • Average -
  • Short -
  • Very Short -
  • Very Tall - 16
  • Tall - 84
  • Average - 0
  • Short - 0
  • Very Short - 0

11
The Second Step...
Fuzzy Logic the FAM
12
Fuzzy Logic Process
Crisp Input
fuzzy associative matrices
13
Solar Pool Heater Example
  • suppose we measure the pool water temp and the
    wind speed and we want to adjust the valve that
    sends water to the solar panels
  • we have two input parameters temp wind_speed
  • we have one output parameter change_in_valve

14
Solar Pool Heater Example
  • set up membership functions for the inputs
  • for each input, decide on how many categories
    there will be and decide on their membership
    functions

cold
nominal
warm
cool
calm
hot
strong
brisk
calm brisk strong
4 12 20 mph
60 70 80 90
100 F
wind_speed
temp
15
Solar Pool Heater Example
  • set up the rules
  • if (temp is hot) AND (wind_speed is calm)then
    (change_in_valve is big_negative)
  • if (temp is warm) AND (wind_speed is brisk)
  • then (change_in_valve is small_negative)
  • if (temp is nominal) OR (temp is warm)then
    (change_in_valve is no_change)

16
Solar Pool Heater Example
  • fuzzify the inputs

cold
nominal
warm
cool
calm
hot
0
0.6
0.35
strong
0
brisk
0
0.4
0
0.55
calm brisk strong
4 12 20 mph
60 70 80 90
100 F
wind_speed 9 mph
temp 87F
17
Solar Pool Heater Example
cold
nominal
warm
cool
hot
0
0.6
0.35
0
0
  • fire the rules
  • if (temp is hot) AND (wind_speed is calm)then
    (change_in_valve is big_negative)
  • if (temp is warm) AND (wind_speed is brisk)
  • then (change_in_valve is small_negative)
  • if (temp is nominal) OR (temp is warm)then
    (change_in_valve is no_change)

calm
strong
brisk
0.4
0
0.55
18
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
0.6
0
0
0
0.4
  • fire the rules
  • if (temp is hot) AND (wind_speed is calm)then
    (change_in_valve is big_negative)
  • if (temp is warm) AND (wind_speed is brisk)
  • then (change_in_valve is small_negative)
  • if (temp is nominal) OR (temp is warm)then
    (change_in_valve is no_change)

19
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • now that we have this info, howdo we get the
    output?
  • what is output value forchange_in_valve ?
  • NEXT - defuzzify the output(s)

0.6
0
0
0
0.4
20
Fuzzy Logic Process
Crisp Input
fuzzy associative matrices
21
Defuzzify the output
  • set up membership functions for the output(s)
  • for each output, decide on how many categories
    there will be and decide on their membership
    functions

bigneg.
nochange
smallpos.
bigpos.
smallneg.
big neg sm. neg. no ch. sm. pos.
big pos.
-10 -5 0 5
10 degrees
change_in_valve
22
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • NEXT - defuzzify the output(s)

0.6
0
0
0
0.4
0 0.4 0.6 0.0 0.0
big neg sm. neg. no ch. sm. pos.
big pos.
23
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • defuzzify the output(s)

0.6
0
0
0
0.4
0 0.4 0.6 0.0 0.0
big neg sm. neg. no ch. sm. pos.
big pos.
-10 -5 0 5
10 degrees
24
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • defuzzify the output(s)

0.6
0
0
0
0.4
0 0.4 0.6 0.0 0.0
big neg sm. neg. no ch. sm. pos.
big pos.
-10 -5 0 5
10 degrees
25
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • defuzzify the output(s)

0.6
0
0
0
0.4
0 0.4 0.6 0.0 0.0
big neg sm. neg. no ch. sm. pos.
big pos.
-10 -5 0 5
10 degrees
26
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • defuzzify the output(s)

0.6
0
0
0
0.4
0 0.4 0.6 0.0 0.0
big neg sm. neg. no ch. sm. pos.
big pos.
-10 -5 0 5
10 degrees
27
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • defuzzify the output(s)

0.6
0
0
0
0.4
0 0.4 0.6 0.0 0.0
big neg sm. neg. no ch. sm. pos.
big pos.
-10 -5 0 5
10 degrees
28
Solar Pool Heater Example
bigneg.
nochange
smallpos.
bigpos.
smallneg.
  • defuzzify the output(s)

0.6
0
0
0
0.4
0 0.4 0.6 0.0 0.0
big neg sm. neg. no ch. sm. pos.
big pos.
-10 -5 0 5
10 degrees
output is -1.28 degrees
29
  • fuzzy inference is a method that interprets the
    values in the input vector, and based on some set
    of rules, assigns values to the output vector

general case
specific example
30
(No Transcript)
31
  • topics
  • fuzzy membership functions
  • logical operations
  • if-then rules
  • fuzzy inference systems

32
  • classical sets black and white

33
  • fuzzy sets the truth of a statement becomes a
    matter of degree

34
  • fuzzy membership functions

35
  • fuzzy membership functions(another example)

36
  • a fuzzy membership function is a curve that
    defines how each point in the input space is
    mapped to a membership value (degree of
    membership) between 0 and 1

37
  • non fuzzy vs. fuzzy

38
  • the fuzzy logic toolbox includes 11 built-in
    membership function types

39
(No Transcript)
40
  • summary of membership functions
  • Fuzzy sets describe vague concepts (fast runner,
    hot weather, weekend days).
  • A fuzzy set admits the possibility of partial
    membership in it. (Friday is sort of a weekend
    day, the weather is rather hot).
  • The degree an object belongs to a fuzzy set is
    denoted by a membership value between 0 and 1.
    (Friday is a weekend day to the degree 0.8).
  • A membership function associated with a given
    fuzzy set maps an input value to its appropriate
    membership value.

41
  • topics
  • fuzzy membership functions
  • logical operations
  • if-then rules
  • fuzzy inference systems

42
(No Transcript)
43
(No Transcript)
44
  • We need logical operations in order to put
    together necessary if conditions
  • if x AND y then
  • if x OR y then
  • if NOT x then

45
  • boolean logic
  • fuzzy logic

0.2 0.6 0.2 0.2 0.6 0.6
0.2 0.8
46
  • topics
  • fuzzy membership functions
  • logical operations
  • if-then rules
  • fuzzy inference systems

47
  • a single fuzzy if-then rule assumes the formif
    x is A then y is B

antecedent or premise
consequent or conclusion
If service is good then tip is average.
if (service good) then (tip average)
48
(No Transcript)
49
(No Transcript)
50
(No Transcript)
51
  • summary of if-then rules
  • Interpreting if-then rules is a three-part
    process
  • Fuzzify inputs Resolve all fuzzy statement in
    the antecedent to a degree of membership between
    0 and 1
  • Apply fuzzy operator to multiple part
    antecedents If there are multiple parts to the
    antecedent, apply fuzzy logic operators and
    resolve the antecedent ot a single number between
    0 and 1. This is the degree of support for the
    rule.
  • Apply implication method Use the degree of
    support for the entire rule to shape the output
    fuzzy set. The consequent of a fuzzy rule
    assigns an entire fuzzy set to the output. If
    the antecedent is only partially true, then the
    output fuzzy set is truncated according to the
    implication method.

52
  • topics
  • fuzzy membership functions
  • logical operations
  • if-then rules
  • fuzzy inference systems

53
(No Transcript)
54
  • 5 steps to the fuzzy inference process
  • fuzzification of the inputs
  • application of the fuzzy AND/OR in the antecedent
  • implication from the antecedent to the consequent
  • aggregation of the consequents across the rules
  • deffuzification

55
  • fuzzification of inputs

56
  • apply fuzzy operator

57
  • apply implication method

58
  • aggregate all outputs

59
  • deffuzify

60
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com