# Fuzzy Logic - Northeastern University

advertisement
```Fuzzy Logic Outside resources &igrave; Fuzzy Sets &sect;
Professor Lo/i Zadeh, UC Berkeley, 1965 “People do not require precise, numerical informaBon input, and yet they are capable of highly adapBve control.” &sect;
Accepts noisy, imprecise input! 3
Fuzzy Logic Introduction
Fuzzy Inference System
Fuzzy Sets &igrave;  superset of convenBonal (Boolean) logic that has been extended to handle the concept of parBal truth &igrave;  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. &igrave;  deals with real world vagueness Linguistic variable, linguistic term &igrave;  Linguis'c variable: A linguis(c variable is a variable whose values are sentences in a natural or arBﬁcial language. &igrave;  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. &igrave;  Tall is a linguis(c value or primary term &igrave;  Hedges are very, more or less so on &igrave;  If age is a linguisBc variable then its term set is &igrave;  T(age) &igrave;  young, not young, very young, not very young &igrave;  middle aged, not middle aged &igrave;  old, not old, very old, more or less old, not very old young middle aged old 1.0 &micro; 0.0 Age Operations A B A ∧ B A ∨ B &not;A Fuzzy Rules &igrave;  Fuzzy rules are useful for modeling human thinking, percepBon and judgment. &igrave;  A fuzzy if-&shy;‐then rule is of the form “If x is A then y is B” where A and B are linguisBc values deﬁned by fuzzy sets on universes of discourse X and Y, respecBvely. &igrave;  “x is A” is called antecedent and “y is B” is called consequent. Examples, for such a rule are &igrave;  If pressure is high, then volume is small. &igrave;  If the road is slippery, then driving is dangerous. &igrave;  If the fruit is ripe, then it is soY. Example Air CondiBoning Controller Example: &igrave;  IF Cold then Stop &igrave;  If Cool then Slow &igrave;  If OK then Medium &igrave;  If Warm then Fast &igrave;  IF Hot then Blast Fuzzy Air Conditioner 0
100
90
80
Bla
Fa
If Hot
then
Blast
st
st
If Warm
then
Fast
70
60
Med
50
40
If Just Right
then
Medium
ium
Slo
IF Cool
then
Slow
w
30
if Cold
then Stop
20
o
St
10
p
0
Ho
t
W
ar
m
Jus
Rig t
ht
ld
Co
Co
ol
1
0
45
50
55
60
65
70
75
80
85
90
Mapping Inputs to Outputs 1
0
100
90
80
s
Bla
Fa
t
t
st
70
60
Med
50
40
iu m
Sl
ow
30
20
o
St
10
p
0
ld
Ho
t
W
ar
m
Ju s
Rig t
ht
Co
Co
ol
1
0
45
50
55
60
65
70
75
80
85
90
14
Fuzzy Logic Introduction
Fuzzy Inference System
15
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.
16
Fuzzy Logic Introduction
Fuzzy Inference System…
17
Fuzzy Logic Introduction
•
Fuzzy Inference System…
o
An example
&igrave;  Two inputs (x, y)
&igrave;  One output (z)
&igrave;  Rules:
Rule1:
C1
Rule2:
C2
Rule3:
C3
If
x is A3 or
y is B1 Then
z is
If
x is A2 and
y is B2 Then
z is
If
x is A1
Then
z is
18
Fuzzy Logic Introduction
•  Fuzzy Inference System… o  Input x: research_funding o  Input y: project_staﬃng o  Output z: risk &igrave;  Rules: Rule1: If research_funding is adequate or project_staﬃng is small Then risk is low Rule2: If research_funding is marginal and project_staﬃng is large Then risk is normal Rule3: If research_funding is inadequate Then risk is high 19
Step 1: Fuzzification
20
Step 2: Rule Evaluation
21
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 diﬀerent ways: 22
Step 3: Rule Evaluation
23
Step 4: Defuzzification
Using Center of Gravity method, but other methods can also be used Why Fuzzy Logic?
&sect;
Advantages
&sect;  Mimicks human control logic
&sect;  Uses imprecise language
&sect;  Inherently robust
&sect;  Fails safely
&sect;  Modified and tweaked easily
Why Fuzzy Logic?
&sect;
Disadvantages
&sect;  Operator's experience required
&sect;  System complexity
Game using Fuzzy Logic – Battle City What are advantages of this approach? ```