Fuzzy Logic ì Outside resources Fuzzy Sets
§ Professor Lo i Zadeh, UC Berkeley, 1965 “People do not require precise, numerical informa on input, and yet they are capable of highly adap ve control.”
§ Accepts noisy, imprecise input! 3 Fuzzy Logic Introduction
Fuzzy Inference System Fuzzy Sets
ì superset of conven onal (Boolean) logic that has been extended to handle the concept of par al truth ì central no on 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 represen ng absolute Falseness and 1.0 represen ng 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 ar ficial 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 linguis c 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, percep on and judgment.
ì A fuzzy if-then rule is of the form “If x is A then y is B” where A and B are linguis c values defined by fuzzy sets on universes of discourse X and Y, respec vely.
ì “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 so . Example
Air Condi oning 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 If Hot 90 then Fast Blast Blast 80 If Warm then 70 Fast
60 Medium If Just Right then 50 Slow Medium
40 IF Cool then 30 Slow Stop if Cold 20 then Stop
10
0
1
Cold
Just Right
Cool Hot 0 Warm
45 50 55 60 65 70 75 80 85 90 Mapping Inputs to Outputs
1 0
100
90 t Fast Blast 80
70
60 Medium
50 Slow
40
30 Stop
20
10
0
1
Cold
Just Right
Cool Hot 0 Warm
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: 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
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?