![Page 1: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/1.jpg)
ì Fuzzy Logic Outside resources
![Page 2: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/2.jpg)
Fuzzy Sets
§ Professor Lo/i Zadeh, UC Berkeley, 1965 “People do not require precise, numerical
informaBon input, and yet they are capable of highly adapBve control.”
§ Accepts noisy, imprecise input!
![Page 3: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/3.jpg)
Fuzzy Logic Introduction
Fuzzy Inference System
3
![Page 4: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/4.jpg)
Fuzzy Sets
ì superset of convenBonal (Boolean) logic that has been extended to handle the concept of parBal truth
ì central noBon of fuzzy systems is that truth values (in fuzzy logic) or membership values (in fuzzy sets) are indicated by a value on the range [0.0, 1.0], with 0.0 represenBng absolute Falseness and 1.0 represenBng absolute Truth.
ì deals with real world vagueness
![Page 5: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/5.jpg)
Linguistic variable, linguistic term
ì Linguis'c variable: A linguis(c variable is a variable whose values are sentences in a natural or arBficial language.
ì For example, the values of the fuzzy variable height could be tall, very tall, very very tall, somewhat tall, not very tall, tall but not very tall, quite tall, more or less tall.
ì Tall is a linguis(c value or primary term
ì Hedges are very, more or less so on
![Page 6: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/6.jpg)
ì If age is a linguisBc variable then its term set is
ì T(age) ì young, not young, very young, not very young ì middle aged, not middle aged ì old, not old, very old, more or less old, not very
old
![Page 7: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/7.jpg)
Age
1.0 µ 0.0
young middle aged old
![Page 8: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/8.jpg)
Operations
A B
A ∧ B A ∨ B ¬A
![Page 9: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/9.jpg)
Fuzzy Rules
ì Fuzzy rules are useful for modeling human thinking, percepBon and judgment.
ì A fuzzy if-‐then rule is of the form “If x is A then y is B” where A and B are linguisBc values defined by fuzzy sets on universes of discourse X and Y, respecBvely.
ì “x is A” is called antecedent and “y is B” is called consequent.
![Page 10: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/10.jpg)
Examples, for such a rule are
ì If pressure is high, then volume is small.
ì If the road is slippery, then driving is dangerous.
ì If the fruit is ripe, then it is soY.
![Page 11: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/11.jpg)
Example
Air CondiBoning Controller Example:
ì IF Cold then Stop
ì If Cool then Slow
ì If OK then Medium
ì If Warm then Fast
ì IF Hot then Blast
![Page 12: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/12.jpg)
Fuzzy Air Conditioner
Stop
Slow
Medium
Fast
Blast
0
10
20
30
40
50
60
70
80
90
100
0
1
45 50 55 60 65 70 75 80
0
Cold
Cool
85 90
Just
Righ
t
W
arm
Hot
if Coldthen Stop
IF CoolthenSlow
If Just Rightthen
Medium
If WarmthenFast
If HotthenBlast
![Page 13: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/13.jpg)
Mapping Inputs to Outputs 1
Stop
Slow
Medium
Fast
Blast
0
10
20
30
40
50
60
70
80
90
100
0
1
45 50 55 60 65 70 75 80
0
Cold
Cool
85 90
Just
Righ
t
W
arm
Hot
t
![Page 14: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/14.jpg)
Fuzzy Logic Introduction
Fuzzy Inference System
14
![Page 15: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/15.jpg)
Fuzzy Logic Introduction
• Fuzzy Inference System... Mamdani Method
• In 1975, Professor Ebrahim Mamdani of London University built one of the first fuzzy systems to control a steam engine and boiler combination. He applied a set of fuzzy rules supplied by experienced human operators.
15
![Page 16: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/16.jpg)
Fuzzy Logic Introduction
Fuzzy Inference System…
16
![Page 17: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/17.jpg)
Fuzzy Logic Introduction
• Fuzzy Inference System… o An example
ì Two inputs (x, y) ì One output (z)
ì Rules:
Rule1: If x is A3 or y is B1 Then z is C1
Rule2: If x is A2 and y is B2 Then z is C2
Rule3: If x is A1 Then z is C3
17
![Page 18: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/18.jpg)
Fuzzy Logic Introduction • Fuzzy Inference System…
o Input x: research_funding
o Input y: project_staffing
o Output z: risk ì Rules:
Rule1: If research_funding is adequate or project_staffing is small Then risk is
low
Rule2: If research_funding is marginal and project_staffing is large Then risk is
normal
Rule3: If research_funding is inadequate Then risk is high
18
![Page 19: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/19.jpg)
Step 1: Fuzzification
19
![Page 20: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/20.jpg)
Step 2: Rule Evaluation
20
![Page 21: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/21.jpg)
Applying to the membership function
The result of the antecedent evalua(on can be applied to the membership func(on of the consequent in two different ways:
21
![Page 22: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/22.jpg)
Step 3: Rule Evaluation
22
![Page 23: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/23.jpg)
Step 4: Defuzzification
23
Using Center of Gravity method, but other methods can also be used
![Page 24: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/24.jpg)
Why Fuzzy Logic?
§ Advantages § Mimicks human control logic § Uses imprecise language § Inherently robust § Fails safely § Modified and tweaked easily
![Page 25: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/25.jpg)
Why Fuzzy Logic?
§ Disadvantages § Operator's experience required § System complexity
![Page 26: FuzzyLogic - Northeastern University · 2013-03-31 · Fuzzy Logic Introduction • Fuzzy Inference System... Mamdani Method • In 1975, Professor Ebrahim Mamdani of London University](https://reader034.vdocument.in/reader034/viewer/2022042920/5f64453a8e27e531cf7a07ac/html5/thumbnails/26.jpg)
Game using Fuzzy Logic – Battle City
What are advantages of this approach?