Download presentation
Presentation is loading. Please wait.
Published byFelix Rogers Modified over 6 years ago
1
Fuzzy Logic Control What is Fuzzy Logic ? Logic and Fuzzy Logic Fuzzy sets Fuzzy logic operators Fuzzy logic controller
2
What is Fuzzy Logic ? General Control problem Fuzzy Logic Control
e.g. Temperature Controller Set point = 25 Deg.C Controller rule If T>25.5 Deg.C then (turn heater off) If T<24.5 Deg.C then (turn heater on) Fuzzy Logic Control If (too hot) then (turn heater off) If (too cold) then (turn heater on)
3
Logic and Fuzzy Logic Logic - There are only two choices : 0 or 1,
yes or no, right or wrong, etc. - and, or, nand, nor, not, xor Fuzzy logic - More choices between 0 and 1, yes and no, young and old, etc. e.g. a bit young, very young, not young at all... - fuzzy and, fuzzy or, fuzzy not
4
Fuzzy Sets Set of young people, A
- A=[0,20] : age from 0 to 20 years old. - more than 20 years old = not young. Fuzzy set of young people years old = 100% young. - 21 years old = 90% young. - .... - 25 years old= 60% young. - 30 years old = 0% young
5
Fuzzy Sets (Example) Fuzzy set of young people - Young =1
- Not young=0 Young Not Young 10 20 30 40 50 1
6
Operations in Fuzzy Sets
Fuzzy AND - 1 AND 0 = 0 - 1 AND 0.6=0.6 AND 0.7=0.5 a AND b = min(a,b) Fuzzy OR - 1 OR 0 = 1 - 1 OR 0.6=1 OR 0.7=0.7 a OR b = max(a,b) Fuzzy NOT - NOT 1 = 0 - NOT 0.6=0.4 - NOT 0.1 =0.9 NOT a = 1 - a
7
Fuzzy Logic Controller
πΊ πΆ ξπ ξ πΊ π ξπ ξ π»ξπ ξ + _ Input Compensator Plant Output R(s) E(s) C(s) r(t) e(t) c(t) Sensor Input Compensator Plant Output R(s) + E(s) C(s) Fuzzy Logic Controller πΊ π ξπ ξ r(t) _ e(t) c(t) Sensor π»ξπ ξ
8
Fuzzy Logic Controller
Fuzzifier Fuzzy Operations based on Fuzzy rule sets Defuzzifier Fuzzifier Combinations of AND, OR, NOT Defuzzifier LP MP S MN LN
9
Fuzzification - Fuzzifier
Degree of membership : 0 ~ 1 Linguistic variables LN : Large Negative very cold MN : Medium Negative cold S : Small just fine MP : Medium Positive hot LP : Large Positive very hot Membership function Triangular, bell, trapezoidal, haversine, Gaussian, exponential Haversine : The function (1-cos(x))/2. It is written hav(x), and is equal to half the versine of x.
10
Membership Function - Triangular
Input (error) membership Degree of LN MN S MP LP Set point cold hot
11
Membership Function - Triangular
Member of Speed : {Slow, Moderate, Fast} Membership functions 0.5 1 Slow Moderate Fast 0.65 0.35 60 40 70 100 km/s Speed=60 km/s Degree of membership ξslow=0.35, ξmoderate=0.65, ξfast=0.00
12
Fuzzy Rule Sets If LN then (turn heater on)
If MN then (turn heater on) If S then (do nothing) If MP then (turn heater off) If LP then (turn heater off) If error LN then (turn heater on) If error MN then (turn heater on) If error S then (do nothing) If error MP then (turn heater off) If error LP then (turn heater off)
13
Combinations of AND, OR, NOT
Fuzzy Logic Controller (Example) Temperature control Fuzzy rule sets Combinations of AND, OR, NOT Fuzzifier LP MP S MN LN Defuzzifier error slope heater
14
Fuzzy Rule Sets If error LN then (heater LP)
If error MN AND slope LN then (heater LP) If error MN AND slope MN then (heater MP) If error MN AND slope S then (heater MP) If error MN AND slope MP then (heater MP) If error MN AND slope LP then (heater MP) If error S AND slope LN then (heater LP) If error S AND slope MN then (heater MP) If error S AND slope S then (heater S) If error S AND slope MP then (heater S) If error S AND slope LP then (heater S) If error MP then (heater S) If error LP then (heater S)
15
Fuzzy Rule Sets & Rule Matrix
If error LN then (heater LP) If error MN AND slope LN then (heater LP) If error MN AND slope MN then (heater MP) If error MN AND slope S then (heater MP) If error MN AND slope MP then (heater MP) If error MN AND slope LP then (heater MP) If error S AND slope LN then (heater LP) If error S AND slope MN then (heater MP) If error S AND slope S then (heater S) If error S AND slope MP then (heater S) If error S AND slope LP then (heater S) If error MP then (heater S) If error LP then (heater S)
16
Fuzzy Inference MAX-MIN (Mamdani Fuzzy Rules) MAX-DOT or MAX-PRODUCT AVERAGING ROOT SUM SQUARE (RSS) Takagi-Sugeno Fuzzy Rules
17
Defuzzification - Defuzzifier
Center of Area or Center of Mass or Centroid of Area Center of Gravity Method for Singletons Bisector of Area Mean of Maxima Leftmost Maxima and Rightmost Maxima
18
Fuzzy Logic Controller Design (Example)
Water heating system Boiler TempSensor LevelSensor 10 125 ΰΉC HeatKnob Water inlet Water outlet Steam exhaust
19
Combinations of AND, OR, NOT
Fuzzy Logic Controller Design (Example) 1. Define inputs and outputs for Fuzzy Logic Controller and Fuzzy Variables. Fuzzy rule sets Combinations of AND, OR, NOT Fuzzifier XL L M S XS Defuzzifier F Level [0,10] Temp [0, 125] Heatknob
20
Fuzzy Logic Controller Design (Example)
2. Assign Membership Values to Fuzzy Variables. 0.5 1 XS S M L XL 10 20 30 40 50 60 70 80 90 100 110 120 Temp
21
Fuzzy Logic Controller Design (Example)
2. Assign Membership Values to Fuzzy Variables. 0.5 1 XS S M L XL 1 2 3 4 5 6 7 8 9 10 Level
22
Fuzzy Logic Controller Design (Example)
2. Assign Membership Values to Fuzzy Variables. 0.5 1 XS S F M L 1 2 3 4 5 6 7 8 9 10 HeatKnob
23
Fuzzy Logic Controller Design (Example)
3. Create a Rule Base and Decision Table. IF Temp is Small and Level is Medium THEN set HeatKnob to Medium. IF Temp is VerySmall and Level is Large THEN set HeatKnob to Large.
24
Fuzzy Logic Controller Design (Example)
4. Fuzzify inputs to FLC and Determine which Rules Fire. Temp = 65 Λ C and Level =6.5 Temp {M} = 0.45 and Temp {L} = 0.28 Level {M} =0.25 and Level {L} = 0.38
25
Fuzzy Logic Controller Design (Example)
5. Infer the Output Recommended by Each Rule. Temp = 65 Λ C and Level =6.5 Temp {M} = 0.45 and Temp {L} = 0.28 Level {M} =0.25 and Level {L} = 0.38
26
Fuzzy Logic Controller Design (Example)
5. Infer the Output Recommended by Each Rule. 0.5 1 XS S F M L 1 2 3 4 5 6 7 8 9 10 HeatKnob
27
Fuzzy Logic Controller Design (Example)
6. Defuzzify the Aggregated Fuzzy Set to form a Crisp Output. 0.5 1 XS S F M L 1 2 3 4 5 6 7 8 9 10 HeatKnob 4.66
28
Fuzzy Logic Controller Design (Example)
7. Implement the Designed Controller. Implement as Hardware Implement as Software
29
Fuzzy Logic Controller Design (Example)
Desgin ABS Control Crane Control AC Room Temperature Control
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.