Fuzzy Logic - Northeastern University

advertisement
Fuzzy Logic Outside resources ì 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! 3
Fuzzy Logic Introduction
Fuzzy Inference System
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 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 ì  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 young middle aged old 1.0 µ 0.0 Age Operations A B A ∧ B A ∨ B ¬A 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. 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. 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 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
ì  Two inputs (x, y)
ì  One output (z)
ì  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_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 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 different 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?
§ 
Advantages
§  Mimicks human control logic
§  Uses imprecise language
§  Inherently robust
§  Fails safely
§  Modified and tweaked easily
Why Fuzzy Logic?
§ 
Disadvantages
§  Operator's experience required
§  System complexity
Game using Fuzzy Logic – Battle City What are advantages of this approach? 
Download