Академический Документы
Профессиональный Документы
Культура Документы
height too hot just right too cold too hot just right too cold
h&r r&c
width
Bräunl 2003 13 Bräunl 2003 14
1.0 1.0
Degree of Membership
Degree of Membership
too hot too cold (shoulder) getting hotter getting colder
(shoulder) (shoulder) (shoulder)
0.5 too hot just right too cold 0.5 getting no change getting
hotter colder
Degree of Membership
1.0 1.0
0.5 too hot just right too cold 0.5 too hot just right too cold
Example Example
• Error = –1 • Error = +5
⇒ Membership(too_hot) = 0.5 ⇒ Membership(too_hot) = 0.0
⇒ Membership(just_right) = 0.5 ⇒ Membership(just_right) = 0.0
⇒ Membership(too_cold) = 0.0 ⇒ Membership(too_cold) = 1.0
Bräunl 2003 17 Bräunl 2003 18
Inferences Inferences
use use
• too_hot = 0.5, just_right = 0.5, too_cold = 0.0 • too_hot = 0.5, just_right = 0.5, too_cold = 0.0
• getting_hotter = 0.5, no_change = 0.5, getting_colder = 0.0 minimum • getting_hotter = 0.0, no_change = 0.5, getting_colder = 0.5 minimum
1. IF too_hot AND getting_colder THEN cool 0.5 & 0.0 = 0.0 1. IF too_hot AND getting_colder THEN cool
2. IF just_right AND getting_ colder THEN heat 0.5 & 0.0 = 0.0 2. IF just_right AND getting_ colder THEN heat
3. IF too_cold AND getting_ colder THEN heat 0.0 & 0.0 = 0.0 3. IF too_cold AND getting_ colder THEN heat
4. IF too_hot AND no_change THEN cool 0.5 & 0.5 = 0.5 4. IF too_hot AND no_change THEN cool 0.5 & 0.5 = 0.5
5. IF just_right AND no_change THEN do_nothing 0.5 & 0.5 = 0.5 5. IF just_right AND no_change THEN do_nothing 0.5 & 0.5 = 0.5
6. IF too_cold AND no_change THEN heat 0.0 & 0.5 = 0.0 6. IF too_cold AND no_change THEN heat
7. IF too_hot AND getting_hotter THEN cool 0.5 & 0.5 = 0.5 7. IF too_hot AND getting_hotter THEN cool 0.5 & 0.5 = 0.5
8. IF just_right AND getting_hotter THEN cool 0.5 & 0.5 = 0.5 8. IF just_right AND getting_hotter THEN cool 0.5 & 0.5 = 0.5
9. IF too_ cold AND getting_hotter THEN heat 0.0 & 0.5 = 0.0 9. IF too_ cold AND getting_hotter THEN heat
Bräunl 2003 23 Bräunl 2003 24
5.5 Output Combination Output Combination
• Find out “firing strength” of each rule MAX-MIN
• Test magnitude of all rules – select highest one
• Combine logical outputs for each rule must be Use horizontal coordinate of “fuzzy centroid” as output
combined before defuzzification Note: This method does not combine individual results!
• Combining rule outputs MAX-DOT
– MAX-MIN • Scale each member function to fit under its peak value,
take the horizontal coordinate of the fuzzy centroid of the
– MAX-DOT (MAX-PRODUCT) composite area as output.
– AVERAGING This shrinks all member functions to their peaks equal the
– ROOT-SUM-SQUARE magnitude of the respective function.
Note: This method prodruces a smooth, continuous output
combining all active rules
Bräunl 2003 25 Bräunl 2003 26
Degree of Membership
• Calculation of “fuzzy centroid”:
Degree of Membership
0.87 0.87
Combined rule results Combined rule results
cool = 0.866 cool = 0.866
do_nothing = 0.5 do_nothing = 0.5
0.5 0.5
heat = 0.0 heat = 0.0
Defuzzification Defuzzification
• Input: • How to calculate centroid
– error = –1 – graphically: intuitively
– error_dot = –2.5 – numerically: see formula below
N
• Output: ∑ (center ⋅ strength )
i i “Moment”
– activate cooling at 63.4% Output = i =1
N N is number of output members
∑ strengthi
i =1
(here: 3)
Defuzzification 0.87
Defuzzification 0.5
0.5
0.0
1.0 -100 -50 0 +50 +100
0.87
0.0
-100 -50 0 +50 +100
centercool ⋅ strengthcool + centernothing ⋅ strengthnothing + centerheat ⋅ strengthheat
0.5
with shoulders: adjust formula Output =
strengthcool + strengthnothing + strengthheat
by moving centers
1.0
− 100 ⋅ 0.866 + 0 ⋅ 0.5 + 100 ⋅ 0
0.0 0.87
-100 -50 0 +50 +100 Output = = −63.4
without shoulders: simple formula 0.866 + 0.5 + 0.0
0.5
N
∑ (center ⋅ strength )
i i
Result: Activate cooling at 63.4%
Output = i =1
N
∑ strength
i =1
i
0.0
-100 -50 0 +50 +100
Bräunl 2003 37 Bräunl 2003 38