5 - Fuzzy Control
5 - Fuzzy Control
part one
Artificial Intelligence for
Control and Identification
Dr. Wilbert G. Aguilar
Mster AR
Outline
1. General Framework
2. Fuzzy Logic
3. Fuzzy Control
Fuzzy Control
1. General Framework
Daily Applications
Fuzzy Control
1. General Framework
Daily Applications
Home Appliances (washing machines, washer dryers, cooking, )
Fuzzy Control
1. General Framework
Daily Applications
Home Appliances (washing machines, washer dryers, cooking, )
Fuzzy Control
Rice cooker
Blood pressure
1. General Framework
Daily Applications
Fuzzy Control
Air conditioning
1. General Framework
Daily Applications
Fuzzy Control
1. General Framework
Daily Applications
Fuzzy Control
1. General Framework
Evolution of development
Fuzzy Control
of
1. General Framework
Evolution of development
1975 Fuzzy control was first introduced by E. Mamdani in
Advances in the linguistic synthesis of fuzzy controllers
Introduction of Fuzzy Logic in Japan
1980 Empirical Verification of Fuzzy Logic in Europe
1985 Broad Application of Fuzzy Logic in Japan
1990 Broad Application of Fuzzy Logic in Europe
Fuzzy Control
1. General Framework
Why Fuzzy?
fuzzy adj. 1 unclear or confused and lacking details. 2 not
clearly thought out or expressed. 3 indistinct, unclear,
distorted or imprecise.
Based on intuition and judgment
No need for a mathematical model
Fuzzy Control
10
1. General Framework
Types of uncertainty
Stochastic uncertainty
the probability of hitting the target is 0.8
Lexical uncertainty
Tall man, cold days, stable currencies
Fuzzy Control
Outline
1. General Framework
2. Fuzzy Logic
3. Fuzzy Control
Fuzzy Control
12
2. Fuzzy Logic
Classical sets vs. Fuzzy sets
Classical or crisp sets are binary. An element
either belongs to the set or does not.
Fuzzy sets have grades of membership.
Boolean set theory
38C
37.2C
37.2C
39.7C
Fuzzy Control
40.3C
39.7C
40.3C
Strong
Fever
Strong
41.2C
Fever
41.2C
41.5C
41.5C
38.5C
38.5C
36.7C
36.7C
13
2. Fuzzy Logic
Fuzzy set definitions
Discrete definition:
SF(35C) = 0
SF(38C) = 0.1
SF(41C) = 0.9
SF(36C) = 0
SF(39C) = 0.35
SF(42C) = 1
SF(37C) = 0
SF(40C) = 0.65
SF(43C) = 1
Fuzzy Control
Continuous definition:
SF(x)
1
either-or
more or less
0
35C
36C
37C
38C
39C
40C
41C
42C
14
2. Fuzzy Logic
Fuzzy linguistic variable
The term strong used to define the set is a fuzzy linguistic
variable. Other examples are far, close, heavy, light, big, small,
smart, fast, slow, hot, cold, tall, short, ...
Example: on a scale of 1 to 10, how good was the dive?
9.5
10.0
6.5
8.0
Fuzzy Control
9.0
15
2. Fuzzy Logic
Fuzzy linguistic variable
temp(x)
1
low
normal
raised temp
strong fever
Fuzzy Control
0
35C
36C
37C
38C
39C
40C
41C
42C
16
2. Fuzzy Logic
Fuzzy logic system
Fuzzy logic defines the control strategy on a linguistic level.
Fuzzy Control
Numerical
level
Measured variables
(Numerical values)
Command variables
(Linguistic values)
3.Defuzzification
Linguistic
level
2.Fuzzy-inference
1.Fuzzification
Measured variables
(Linguistic values)
Plant
Command variables
(Numerical values)
17
2. Fuzzy Logic
Fuzzy logic system: example
Fuzzy logic defines the control strategy on a linguistic level.
Crane Head
Container
Trailer
Two measured
variables: angle
and distance
Fuzzy Control
Ship
One command
variable: power
18
2. Fuzzy Logic
Fuzzy logic system: example
Control loop of the fuzzy logic controlled container crane:
Fuzzy Control
Numerical
level
2.Fuzzy-inference
op
o
l
the !!!
g
sin ords
o
l
C
w
with
Container
crane
power
(Linguistic values)
3.Defuzzification
Linguistic
level
1.Fuzzification
power
(Numerical values)
19
2. Fuzzy Logic
Fuzzy logic system: example
1. Fuzzification: term definitions
Measured variables:
Angle = { neg_big, neg_small, zero, pos_small, pos_big }
Distance = { far, medium, close, zero, neg_close }
Command variable:
Fuzzy Control
20
2. Fuzzy Logic
Fuzzy logic system: example
1. Fuzzification: membership function definition
neg_big
neg_small
zero
pos_small
pos_big
Fuzzy Control
0.8
0.2
0
-90
-45
0 4
Angle
45
90
21
2. Fuzzy Logic
Fuzzy logic system: example
1. Fuzzification: membership function definition
Fuzzy Control
1
0.9
0.1
0
-10
10 12m 20
Distance (m)
far
30
22
2. Fuzzy Logic
Fuzzy logic system: example
2. Fuzzy-inference: the IF-THEN rules
Computation of the IF-THEN rules:
# 1: IF Distance = medium AND Angle = pos_small THEN Power = pos_medium
#2: IF Distance = medium AND Angle = zero THEN Power = zero
#3: IF Distance = far AND Angle = zero THEN Power = pos_medium
#4: IF Distance = far AND Angle = pos_small THEN Power = pos_high
NC
Fuzzy Control
PB
PS
Z
PM PH
Z
PM
Rules
Matrix
NS
NB
23
2. Fuzzy Logic
Fuzzy logic system: example
2. Fuzzy-inference: the IF-THEN rules
Aggregation (IF-part): computes how appropriate each rule is
for the current situation.
Fuzzy Control
A+B = max{A; B}
NOT:
-A
= 1-A
NC
0.9 0.1
PB
0.8
0.8 0.1
0.2
0.2 0.1
#1:
#2:
#3:
NS
#4:
NB
24
2. Fuzzy Logic
Fuzzy logic system: example
2. Fuzzy-inference: the IF-THEN rules
Composition (THEN-part): computes how each rule influences
the output variables .
Fuzzy Control
(R#4)
pos_medium
zero
(R#2)
neg_medium
neg_high
25
2. Fuzzy Logic
Fuzzy logic system: example
3. Defuzzification: the center-of-gravity
NH
NM
PM
PH
Fuzzy Control
0.8
0.2
0.1
0
-30
-15
0
Power (kW)
15
30
13.1 kW
26
Outline
1. General Framework
2. Fuzzy Logic
3. Fuzzy Control
Fuzzy Control
27
3. Fuzzy Control
Fuzzy logic control
Fuzzy logic control (FLC) may be viewed as a
branch of intelligent control which serves as an
emulator of human decision-making behavior that
is approximate rather than exact
(C.C.Lee in Singh: Systems and Control Encyclopedia, 1992).
Limitations:
Fuzzy Control
28
3. Fuzzy Control
Fuzzy logic controller: direct control
The outputs of the fuzzy logic system are the command variables of
the plant:
Command
Variables
IF temp=low
AND P=high
THEN A=med
Plant
IF ...
Fuzzification
Inference
Defuzzification
Fuzzy Control
Measured Variables
29
3. Fuzzy Control
Fuzzy logic controller: supervisory control
Fuzzy logic controller outputs set values for underlying PID controllers:
IF temp=low
AND P=high
THEN A=med
Set Values
PID
PID
IF ...
Fuzzification
Inference
Defuzzification
Plant
PID
Fuzzy Control
Measured Variables
30
3. Fuzzy Control
Fuzzy logic controller: PID adaptation
Fuzzy logic controller adapts the P, I, and D parameter of a
conventional PID controller:
Set Point Variable
IF temp=low
AND P=high
THEN A=med
P
I
D
IF ...
Fuzzy Control
Fuzzification
Inference
Command Variable
PID
Plant
Defuzzification
Measured Variable
31
3. Fuzzy Control
Fuzzy logic controller: PID + fuzzy control
Fuzzy logic controller and PID controller in parallel:
IF temp=low
AND P=high
THEN A=med
Command Variable
IF ...
Fuzzy Control
Fuzzification
Inference
Defuzzification
PID
Plant
Measured Variable
32