Professional Documents
Culture Documents
membership
Crisp Reading
1
0.5
Fuzzy singleton
voltage
0.4
Medium
voltage
membership
Fuzzy Reading
1
Fuzzy number
CCA yck(Jan 2003) 12
Topic 5 - Fuzzy Logic Control
Knowledge Base
Data Base Rule Base
+
Data Base
Defines the universe of discourse for each variable, determining the
number of fuzzy sets and designing the membership functions.
Sampling & Quantization resolution
Input variable
Discretization of
universe of discourse
CCA yck(Jan 2003) 13
Topic 5 - Fuzzy Logic Control
Discretization of universe of discourse is important such that the
performance of a FLC will be less sensitive to small deviations in
values of the system variables. Quantization during analog-to-
digital conversion must be selected at an appropriate quantization
level known as resolution.
EXAMPLE
A universe of discourse is discretized into 7 levels with 5 fuzzy sets.
Level no. Range NB NS ZE PS PB
-3 x < -12 1.0 0.3 0.0 0.0 0.0
-2 -12 < x < -8 0.3 1.0 0.3 0.0 0.0
-1 -8 < x < -4 0.0 0.7 0.7 0.0 0.0
0 -4 < x < +4 0.0 0.3 1.0 0.3 0.0
1 +4 < x < +8 0.0 0.0 0.7 0.7 0.0
2 +8 < x < +12 0.0 0.0 0.3 1.0 0.3
3 +12 < x 0.0 0.0 0.0 0.3 1.0
CCA yck(Jan 2003) 14
Topic 5 - Fuzzy Logic Control
Rule Base
A collection of fuzzy control based on the control goals and control
policy given by the experts. Each fuzzy rule is a set-level implication
representing expert knowledge. A typical MISO system will have the
following rule base:
.
Rule 1: IF x
1
is A
11
AND AND x
m
is A
1m
THEN y is B
1
.
Rule 2: IF x
1
is A
21
AND AND x
m
is A
2m
THEN y is B
2
.
Rule n: IF x
1
is A
n1
AND AND x
m
is A
nm
THEN y is B
n
.
.
( A
ij
and B
i
are fuzzy sets such as PB, PM, PS, ZE, NS, NB )
A fuzzy control algorithm should be able to infer a proper control
action for any input in the universe of discourse referred to as
completeness.
CCA yck(Jan 2003) 15
Topic 5 - Fuzzy Logic Control
Number of Control Rules
If the number of fuzzy sets or predicates for each input variable is mand
the number of system input variables is n, then there are m
n
different
rules required for a completeness in a conventional system. FLC rule
base typically uses a small number of rules to attain completeness.
EXAMPLE
A FLC has been designed to improve the autofocus function in video camcorders.
The fuzzy logic control system uses 7 input variables to be judged and produces
one output, the focus. How many rules might be used if 3 predicates were utilized?
Number of rules = 3
7
or 3 x 3 x 3 x 3 x 3 x 3 x 3 = 2187.
If the number of predicates increase to 7, we will have 7
7
or 823,543 rules.
In this case, only 20 rules have been used in the FLC system and the
system performance is greatly enhanced.
CCA yck(Jan 2003) 16
Topic 5 - Fuzzy Logic Control
Reasoning Techniques
The 2 main fuzzy inference methods commonly used in industrial
FLC are:
.
The point-valued MAX-MIN fuzzy inference.
The point-valued MAX-DOT fuzzy inference.
Due to the nature of industrial process control, the input data is
most often crisp in nature. Hence, fuzzification involves treating
these as fuzzy singletons that are used with either MAX-MIN or
MAX-DOT.
Taking a fuzzy control rule base with 2 rules:
Rule 1: IF x is A
1
AND y is B
1
THEN z is C
1
.
Rule 2: IF x is A
2
AND y is B
2
THEN z is C
2
.
The fire strength of the ith rule for inputs x
0
and y
0
of the rule base are:
1
=
A1
(x
0
)
B1
(y
0
) and
2
=
A2
(x
0
)
B2
(y
0
)
is the min operator.
CCA yck(Jan 2003) 17
Topic 5 - Fuzzy Logic Control
Mamdanis Inference: MAX-MIN
The membership of the inferred consequence C is given by:
C
(w) = (
1
C1
(w) ) (
2
C2
(w) )
Input values x
0
and y
0
are regarded as fuzzy singletons.
= min
= max
CCA yck(Jan 2003) 18
Topic 5 - Fuzzy Logic Control
Larsens Inference: MAX-DOT
The membership of the inferred consequence C is given by:
C
(w) = (
1
C1
(w) ) (
2
C2
(w) )
Input values x
0
and y
0
are regarded as fuzzy singletons.
= product
= max
CCA yck(Jan 2003) 19
Topic 5 - Fuzzy Logic Control
Defuzzification Strategies
The process of mapping from a space of inferred fuzzy control actions
to a space of crisp ( non-fuzzy ) control actions that best represents
the possibility distribution of the inferred control action.
.
In real-time implementation of fuzzy logic control, the common
defuzzification strategies used are the mean of maximum (MOM)
and the center of area (COA).
Mean of Maximum
Generates a control action that represents the mean value of all
local actions whose membership functions reach the maximum.
z
MOM
= z
j
/ m = z dz / dz
m
j=1
z = support value at which the
membership value reaches
maximum value.
m = number of support values.
CCA yck(Jan 2003) 20
Topic 5 - Fuzzy Logic Control
Center of Area
EXAMPLE
z
A
Smallest of Max.
Largest of Max.
Mean of Max. (MOM)
Center of Area (COA)
Generates the center of gravity of the possibility distribution of the
control action.
z
COA
=
A
(z) z dz /
A
(z) dz
z = amount of control output.
A
(z) = membership value in
the output fuzzy set A.
=
A
(z) . z /
A
(z)
CCA yck(Jan 2003) 21
Topic 5 - Fuzzy Logic Control
5.4 DESIGN OF FUZY CONTROL RULES
Four principal methods have been employed to derive fuzzy control
rules based on the following:
.
An Experts Experience or Control Engineering Knowledge.
It is a heuristic approach aimed at capturing the experts rules of
thumb. Its is an iterative process, with the fuzzy parameters of the
initial system being tuned and adjusted until satisfactory
performance is achieved. Fuzzy control rules provide a natural
framework for capturing expert knowledge.
.
Modeling The Operators Control Actions.
It is a deterministic approach where modeling the operators
control actions is carried out by observing the human controllers
actions over a period of time and expressing them in terms of the
operational input-output data. The structure and control parameters
can be determined that satisfied the control objective.
CCA yck(Jan 2003) 22
Topic 5 - Fuzzy Logic Control
Fuzzy Modeling.
It is a qualitative modeling scheme by which the behavior of the
system to be controlled is qualitatively described using fuzzy
quantities or languages. Based on the fuzzy model model, we
can generate a set of fuzzy control rules to obtain optimal
performance of the system.
Self Organizing or Learning.
Fuzzy control systems can be built which simulate human
leaning and have the ability to create fuzzy control rules and to
modify them based on system performance. Such schemes
include neural networks, self-tuning and self-organization.
CCA yck(Jan 2003) 23
Topic 5 - Fuzzy Logic Control
EXAMPLE 1
FLC Plant
E
CE
CI
Y
Y
d
-
Objectives
Design a set of
fuzzy control
rules to reduce
the overshoot
and the rise
time.
5.5 DETAIL EXAMPLES ON FUZZY LOGIC CONTROL
CCA yck(Jan 2003) 24
Topic 5 - Fuzzy Logic Control
Assume that the fuzzy subsets for each input and output are represented by
the terms Negative, Zero and Positive i.e. [ N, Z, P ]. Then 2 fuzzy control
rules can be formulated as:
.
Type 1 - Shorten the rise time of the system.
IF E is Positive AND CE is negative THEN CI is Positive.
.
Type 2 - Decrease the overshoot of the system.
IF E is Negative AND CE is negative THEN CI is Negative.
Rule No. E CE CI References Functions
1 P Z P points a, e, i shortens rise time
2 Z N N points b, f, j reduce overshoot
3 N Z N points c, g, k reduce overshoot
4 Z P P points d, h, l reduce oscillation
5 Z Z Z set point braking system
6 P N P ranges A, E shorten rise time
7 N N N ranges B, F, J reduce overshoot
8 N P N ranges C, G reduce overshoot
9 P P P ranges D, H reduce oscillation
10 P N Z range I braking system
11 N P Z range K braking system
CCA yck(Jan 2003) 25
Topic 5 - Fuzzy Logic Control
Finer fuzzy partitions for each input/output variable will result in
better control performance such as using the following set
[ NB, NM, NS, ZE, PS, PM, PB ] for the fuzzy variable [ E,CE, CI ].
The principles to construct the fuzzy control rules for a FLC in
process control can be generalized as follows:
.
If the output has the desired value and the change of error is zero,
keep the output of the FLC constant.
.
If the output diverges from the desired value, the control action
depends on the sign and value of the error and its change.
A matrix can be used to express this control process. It is used to
approximate a human operators thinking and actions. Projecting the
matrix on an axis perpendicular to the main diagonal, we will have
the control form and policy.
CCA yck(Jan 2003) 26
Topic 5 - Fuzzy Logic Control
CE
-B -M -S -Z +Z +S +M +B
+B +Z +S -M -B -B -B -B -B
+M +S -Z -S -M -M -M -B -B
+S +M +S -Z -S -S -S -M -B
+Z +M +M +S +Z -Z -S -M -M
E -Z +M +M +S +Z -Z -S -M -M
-S +B +M +S +S +S +Z -S -S
-M +B +B +M +M +M +S +Z +Z
-B +B +B +B +B +B +M +Z +Z
-B -M -S -Z+Z+S+M+B
+B
+M
+S
-Z
+Z
-S
-M
-B
B
M
S
Z
S
M
B
P
o
s
i
t
i
v
e
N
e
g
a
t
i
v
e
Fuzzy Control
Matrix
Fuzzy Control
Resolution
CCA yck(Jan 2003) 27
Topic 5 - Fuzzy Logic Control
EXAMPLE 2
FLC Plant
E
CE
U
Y
Y
d
-
N Z P
P Z P P
Z N Z P
N N N Z
CE
E
Control Rules
Note: P - positive, N - negative, Z = zero
Find the output U given that E = 0.5
and CE = 0.25 using COA method.
1
E
P Z N
0 1 -1
1
CE
P Z N
0 0.5 -0.5
Membership
Functions
1
U
0 5 -5
N Z P
CCA yck(Jan 2003) 28
Topic 5 - Fuzzy Logic Control
1
E
P Z N
0 1 -1
1
CE
P Z N
0 0.5 -0.5
1
U
0 5 -5
N Z P
E=0.5 CE=0.25
0.5 0.5
At E = 0.5,
the fire strength for Z is 0.5
the fire strength for P is 0.5.
At CE = 0.25,
the fire strength for Z is 0.5
the fire strength for P is 0.5.
Thus, there are 4 active rules:
.
Rule 1: IF E is Z AND CE is Z THEN U is Z.
Rule 2: IF E is Z AND CE is P THEN U is P.
Rule 3: IF E is P AND CE is Z THEN U is P.
Rule 4: IF E is P AND CE is P THEN U is P.
CCA yck(Jan 2003) 29
Topic 5 - Fuzzy Logic Control
Outcome of the rules:
.
Rule 1: .. U is Z. output = 0V.
Rule 2: .. U is P. output = 5V.
Rule 3: .. U is P. output = 5V.
Rule 4: .. U is P. output = 5V.
Defuzzification using COA method:
U
crisp
= [ (0 x 0.5) + (5 x 0.5 ) + (5 x 0.5) + (5 x 0.5) ]
0.5 + 0.5 + 0.5 + 0.5
= 3.75.
CCA yck(Jan 2003) 30
Topic 5 - Fuzzy Logic Control
EXAMPLE 3
A moving crane is often
required in a factory workshop
to carry loads of various sizes
and weights. The load will
swing when the motion of the
crane is accelerated or
decelerated. A fuzzy control
can be developed to enable
high speed crane travel with
minimal load swing.
Position sensors are used to detect the swing angle . The swing
angular velocity is computed by differentiating the swing angle
and the previous swing angle.
CCA yck(Jan 2003) 31
Topic 5 - Fuzzy Logic Control
The swing angle and swing angular velocity are taken as inputs
to the fuzzy logic controller (FLC). The inferred output control
signal from the FLC is the change of the crane travel speed, CV.
Fuzzy Set Fuzzy Set
Fuzzy Set CV
CCA yck(Jan 2003) 32
Topic 5 - Fuzzy Logic Control
Using the human operators knowledge and intuition about the crane
operation, a fuzzy knowledge base is constructed. Some of the fuzzy
control rules are listed below:
Rule 1: IF is NB AND is N THEN CV is PS.
Rule 2: IF is NB AND is P THEN CV is PB.
Rule 3: IF is NS AND is N THEN CV is ZE.
Rule 4: IF is NS AND is P THEN CV is PS.
Rule 5: IF is ZE AND is Z THEN CV is ZE.
Rule 6: IF is PB AND is N THEN CV is NS.
Rule 7: IF is PB AND is P THEN CV is NB.
Rule 8: IF is NS AND is N THEN CV is ZE.
Rule 9: IF is NS AND is P THEN CV is NS.
Rule 10: IF is ZE AND is P THEN CV is NS.
Rule 11: IF is ZE AND is N THEN CV is PS.
CCA yck(Jan 2003) 33
Topic 5 - Fuzzy Logic Control
The crane swing control is realized by the control of the crane
speed that is implemented using the procedure below:
Crane is traveling
Load swing detection
Measure
i
Fuzzy inference
Inferred CV
Modify crane speed
V = V + CV
Compute
=
i
i-1
CCA yck(Jan 2003) 34
Topic 5 - Fuzzy Logic Control
EXAMPLE 4
A process control of inflow
valve V1 and outflow valve
V2 is used to measure the
liquid level L inside the tank
that is kept constant at 50%
level. The fuzzy variables
are level and valve positions
as shown.
The fuzzy rules used are:
Rule 1: IF the level is normal AND valve 2 is open THEN open valve 1.
Rule 2: IF the level is high AND valve 2 is half-open THEN close valve 1.
Rule 3: IF the level is low THEN open valve 1.
Rule 4: IF the level is low OR valve 2 is open THEN half open valve 1.
CCA yck(Jan 2003) 35
Topic 5 - Fuzzy Logic Control
Evaluation of
Rules 1, 2 & 4
for level of 70%
and valve 2
position at 60%.
CCA yck(Jan 2003) 36
Topic 5 - Fuzzy Logic Control
Continue
All activated rules are aggregated by using the max operator to
form a max-min inference and defuzzified using the COG or
COA method yielding a 50% valve position for V1.
How would the result change if max-product inference is used ?
CCA yck(Jan 2003) 37
Topic 5 - Fuzzy Logic Control
SELF-TEST QUESTIONS
Question 1
Which one is not a main element in
a fuzzy logic controller structure ?
(a) Knowledge base.
(b) Fuzzification unit
(c) Defuzzification unit
(d) PID rules.
Question 2
How many fuzzy rules are there if
the number of fuzzy sets for each
input variable is 3 and the number
of system input variables 4 ?
(a) 81
(b) 64
(c) 48
(d) 12
CCA yck(Jan 2003) 38
Topic 5 - Fuzzy Logic Control
Question 3
Fill in the blanks with the most appropriate answers.
The key issues in the design of a fuzzy logic controller are
construction___________________ and ________rules.
The fuzzy knowledge base consist of 2 main types of information
which are ____________ and ___________.
The process of acquiring crisp values and mapping this crisp values
into corresponding universe of discourse is called ______________.
Linguistic terms are used to define each system variable in the fuzzy
sets. Name some of these terms. Answer: _____________________.
The 2 main fuzzy inference used in industrial FLC are ___________
and ___________ inferences.
CCA yck(Jan 2003) 39
Topic 5 - Fuzzy Logic Control
Question 4
What are the 2 most popular method of defuzzification ?
(a) _____________ (b) ____________
Question 5
List down 4 ways that fuzzy control rules can be design ?
(a) _____________________________
(b) _____________________________
(c) _____________________________
(d) _____________________________
CCA yck(Jan 2003) 40
Topic 5 - Fuzzy Logic Control
Question 6
Apply the 2 most popular defuzzification methods to the following:
z
(a)
(b)
(c)
(d)