You are on page 1of 67

1

EE6701 Evolutionary Computation Chapter 2


Evolving Fuzzy Systems
2
EE6701 Evolutionary Computation Chapter 2
A 1500 kg mass is
approaching your
head at 45.3 m/sec
LOOK OUT !!
Significance Precision
Some preliminaries on Fuzziness
Take the chicken out of the oven when the temperature
inside the oven reaches 375F
Grill Chicken
Take the chicken out when the top of the chicken
turns light brown
3
EE6701 Evolutionary Computation Chapter 2
More examples:
Question: 44 + 33 = ? (5 marks)
Human logic is ambiguous
- Slow down when it is raining
- Planning a schedule
- Fuzziness of Man and Woman
4
EE6701 Evolutionary Computation Chapter 2
Prof. Lotfi Zadeh was a brilliant
researcher in control theory before he
proposed fuzzy logic theory in 1965
(a paper on fuzzy sets in the
journal Information and Control)
Strong objections to fuzzy theory
why?
Widely accepted after Japanese
applied fuzzy logic to many home
appliances starting in 1980
Fuzzy logic applications
5
EE6701 Evolutionary Computation Chapter 2
Albert: The car is going fast
Ben: What do you mean by fast
Albert: I mean fast when it is driving at 80 kmph
Ben: What about if it is at 79 kmph, does it mean it is slow?
Albert: OK, I shall say fast if it is at 75 kmph
Ben: Then, what about if it is at 74 kmph, does it mean it is slow?
How to appropriately define the word fast?
Membership
function
6
EE6701 Evolutionary Computation Chapter 2
0 10 20 30 40 50 60 70 80 90 100
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Fast
Speed (kmph)
One useful definition:
A membership function ranges from 0 1, with a larger value
indicating a higher degree of truth.
7
EE6701 Evolutionary Computation Chapter 2
x y
Present
Condition
Conclusion
Knowledge
Inference
If then ...
+ Fuzzy system is a convenient way to map an input space to an output space
Black
Box
Output Space (all
possible tips, 5-30%)
The right tips
$$$
Input Space (all possible
service quality ratings, 0-10)
Service quality
What could go into the black box?
Fuzzy Logic?
...
dy
dx
=
- Mathematic model, e.g.,
- Look-up table
- Neural network ...
8
EE6701 Evolutionary Computation Chapter 2
Fuzzy-ATO (Automatic Train Operation)
Stopping accuracy
Fuzzy
Inference
Speed
Riding comfort
Sendai Subway System (1987)
Energy conservation
Washing Machine (National, 1925)
Fuzzy Washing Machine
Fuzzy
Inference
Deg_of_ Dirt
Type_of_dirt
Wash_time
+ Fuzzy logic applications
9
EE6701 Evolutionary Computation Chapter 2
Optical Wash Sensor
- Transparency of the wash water
- Saturation time
Tuning
The rules, membership functions
Rules
If dirtiness is large and Type_of_dirt is
greasy, then wash_time is Very_long
.
10
EE6701 Evolutionary Computation Chapter 2
+ A Pole Balancing Control Problem:
Fuzzy
inference
Error e
U
(B) If err is zero and err-dot is pos_small then force is neg_small
U
(A)
U
(B)
U
(C)
Error-dot e
(A) If err is neg_large and err-dot is neg_large then force is pos_large
(C) If err is pos_large and err-dot is neg_small then force is neg_small
U
e and e
11
EE6701 Evolutionary Computation Chapter 2
X
A
x
1

x
2

x
3

x
n

.
.
A
X
+ A fuzzy set is a set containing elements that have varying degrees of
membership in the set.
0 1 0.5
x
1
x
3
x
2
+ Larger values of the membership denotes higher degrees of the
membership, and such a function is called a membership function.
+ The membership function
A
by which a fuzzy set A is usually defined
has the form
A
: X [0, 1]. ( Compared to _
A
: X {0, 1} )
2 2.6 2.8 3 3.6 4
1.0
0.7
) (x
A

Fuzzy set A = approximately equal to 3


2.8: How much close to 3?
7 . 0 ) 8 . 2 ( =
A

12
EE6701 Evolutionary Computation Chapter 2
+ Fuzzy set A for a discrete and finite universe of discourse X is
A =
A
(x
1
)/x
1
+
A
(x
2
)/x
2
+ +
A
(x
n
)/x
n

=

=
n
i
i i A
x x
1
/ ) (
A
}
=
x
A
x x / ) ( + For continuous and infinite is:
Representation of Fuzzy Sets
E.g. Integer close to 10
= 0.1/7 + 0.5/8 + 0.8/9 + 1/10 + 0.8/11 + 0.5/12 + 0.1/13

< <
|
|
.
|

\
|
|
.
|

\
|

+
< <
=

120 40 ,
5
40
1
40 0 , 0
) (
1
2
x
x
x
x
A

E.g. Fuzzy set Old


5 . 0
2
1
VS 2 / 1 =
13
EE6701 Evolutionary Computation Chapter 2

A
(x)
x
1
0 10 30 20 40 50
0.5
A = 0.5/20 + 1/30 + 0.5/40
Example: What is the fuzzy set A?
14
EE6701 Evolutionary Computation Chapter 2
Approximate Reasoning, Fuzzy Inference
the tomato is very red,
if the tomato is red then the tomato is ripe,
the tomato is very ripe
Extensions: (1) Allow statements that are characterized by Fuzzy sets;
(2) Relax (slightly) the identity of Premise A
Premise : x is true A
Implication : If x is A then y is B
Conclusion : y is ...
Approximate Reasoning Fuzzy Logic
+ In traditional logic, main tools of reasoning are tautologies: e.g.,
Premise : A is true
Implication : If A then B
Conclusion : B is true
+ What about
15
EE6701 Evolutionary Computation Chapter 2
Age values are linguistic rather than numerical, i.e., young...
+ Linguistic Variables
Variables
Linguistic Numerical
Values
words or sentences
of a natural language
numbers
Variable whose values are words or sentences in a natural language
Age: refers to [0, 120] as the Universe of Discourse
Value: young can be represented by some fuzzy set
1
0
120
young
16
EE6701 Evolutionary Computation Chapter 2
M
X
: TX
TX
a membership function to give each TX with a meaning
+ (Def) Notion of a linguistic variable:
X : name of the linguistic variable, e.g., age, error
T
X
: the set of linguistic values (Term set)
For age, T
X
= {old, very old, not so old, very young}
An arbitrary element of this set is denoted by TX, e.g., old
_ : the actual physical domain over which the X takes its crisp values
E.g., For age, it can be the interval [0, 120]
< X, T
X
, _, M
X
>

e
|
|
.
|

\
|
|
.
|

\
|

+
e
=

] 100 , 50 [
5
50
1
] 50 , 0 [ 0
) (
1
2
x
x
x
x
old

old
(x)
Example:
17
EE6701 Evolutionary Computation Chapter 2
Plant
+
y
E
U r
FKBC
Error = r - y Control output
Reference
Output
A Closed-loop Control System
r
y
18
EE6701 Evolutionary Computation Chapter 2
+ Example:
e.g., T
E
= {NB, NM, NS, ZO, PS, PM, PB} = T
U

e.g., TE = {NB}
e.g., c = [-6, 6] = U
M
E
: TE
TE
Error Control output
< E, T
E
, c , M
E
>
< U, T
U
, U , M
U
>
E: error U: control output
e.g., TU = {ZO}
M
U
: TU
TU
-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
NB NM NS ZO PS PM PB
The shape for each
membership function
here is only an example
19
EE6701 Evolutionary Computation Chapter 2
1. For all inputs, take the min (and) or max (or) operation
according to the rule statements;
{ } ) ( ), ( min
) ( ) (
) (
u e R
k k
TU TE
k
=
2. For each input and output:

n
k
k
R R
1
) (
=
=
3. Combine all individual output by union:
e

R
1
e
-
e

e
e
u
u
PB NS
NB
NB
NM
PM
R
2
e
e
*
*
e
PM PB
and
and
20
+ Center-of-Area/Gravity:
This method determines the center
of the area below the combined
membership function.

=
=


=
m
i
i U
m
i
i U i
u
u u
u
1
1
*
) (
) (
Discrete: U = {u
1
, , u
m
}
Example: Let the common normalized domain U = {1, 2, , 8} and

U
= 0/1 + 0.2/2 + 0.5/3 + 0.8/4 +1/5 + 0.5/6 + 0.2/7 +0/8
Then, u
*
(Center-of-Area) =
5 3 . 4
0 2 . 0 5 . 0 1 8 . 0 5 . 0 2 . 0 0
8 0 7 2 . 0 6 5 . 0 5 1 4 8 . 0 3 5 . 0 2 2 . 0 1 0
=
+ + + + + + +
+ + + + + + +
1

1
U
2

2
U
3
U
5
U
4
U
U
*
U
* 1 1 2 2 3 3 4 4 5 5
1 2 3 4 5
U U U U U
U


+ + + +
=
+ + + +
21
EE6701 Evolutionary Computation Chapter 2
+ Given a number between 0 and 10 that represents the quality of service
and quality of food respectively at a restaurant (where 10 is excellent),
what should the tip be?
Service Food Service/Food
1. if service is poor then
tip is cheap
If food is rancid then
tip is cheap
If service is poor or the food is
rancid then tip is cheap
2. if service is good then
tip is average
if service is good then tip is
average
3. if service is excellent
then tip is generous
If food is delicious
then tip is generous
If service is excellent or food is
delicious then tip is generous

Using fuzzy approach, a rule-based for this problem is defined:
input output
Black box
A Fuzzy Inference Example : The Basic Tipping Problem
service
food
tip
22
EE6701 Evolutionary Computation Chapter 2
Input 1
Service (0-10)
Input 2
Food (0-10)
Rule 1
If service is poor or food
is rancid then tip is cheap
Rule 2
If service is good
then tip is average
Rule 3
If service is excellent or
food is delicious then tip is
generous
E
Output
Tip (0-30%)
The inputs are crisp
numbers limited to a
specific range.
All rules are evaluated
in parallel using fuzzy
inference.
The results of the
rules are combined
and defuzzified.
The result is a
crisp number.
The point of all fuzzy logic systems is to map an input space to an output
space. The primary tool for doing this is a list of if-then statements. All rules
are fired in parallel.
23
EE6701 Evolutionary Computation Chapter 2
rule
rule
rule
+ There are a few distinct parts to the process:
Service = 3
Input 1
food = 8
Input 2
poor
rancid
cheap
good
rule 2 has no
dependency on
input 2
average
excellent delicious
generous
Fuzzification and I mplication
Aggregation
Defuzzification
Tip = 18.1%
Output
24
EE6701 Evolutionary Computation Chapter 2
The Tipper Problem: Rule Surface Viewer
25
EE6701 Evolutionary Computation Chapter 2
+ Step 1: Fuzzify the inputs
Fuzzification is the process of assigning a degree of truth to
statements about the input variables (all those statements in the if
part, or antecedent, of the rule). The membership functions
associated with the input variables determine this degree of truth.
Any statement in the antecedent evaluates to a number between
0 and 1.
0.7
result of fuzzification
(for each input fuzzy
membership function)
food = 8
input
delicious
food is delicious
26
EE6701 Evolutionary Computation Chapter 2
excellent delicious generous
if service is excellent
food is delicious
tip is generous
+ Step 2. Fuzzy inference
Apply fuzzy operator: If the antecedent is made up of multiple
statements joined by connectives (and = min) or (or = max),
then the fuzzy operator resolves the multiple statements
antecedent into a number between 0 and 1.
Apply implication operator: The implication method is defined
as the shaping of the consequent (a fuzzy set) based on the
antecedent (a single number). Implication occurs for each rule.
and
or
27
EE6701 Evolutionary Computation Chapter 2
3. Aggregate output across all rules
The above operations occur for all rules,
and each rule results in a clipped output
fuzzy set. Joining all these clipped output
fuzzy sets into a single combined output
membership function is known as
aggregation and it is performed by the
aggregation (max) operator.
result of aggregation
apply aggregation
operator (max)
output
28
EE6701 Evolutionary Computation Chapter 2
+ Step 4. Defuzzify the aggregated output fuzzy set
The aggregated membership function needs to be reduced to a crisp
value. The defuzzification method returns this value given from the
sometimes oddly shaped aggregate.
e.g., tip = 16.7%
Defuzzify the
aggregated output
29
EE6701 Evolutionary Computation Chapter 2
The Tipper Problem:
Rule Surface Viewer
30
EE6701 Evolutionary Computation Chapter 2
The Tipper Problem: Rule Surface Viewer
31
EE6701 Evolutionary Computation Chapter 2
e

R
1
e
-
e

e
e
u
u
PB NS
NB
NB
NM
PM
R
2
e
e
*
*
e
PM PB
u*
A Fuzzy Inference System (Revisit)
* 1 1 2 2 3 3 4 4 5 5
1 2 3 4 5
U U U U U
U


+ + + +
=
+ + + +
1. Graphical fuzzy inference
2. Mathematical or compositional rule of inference
Two approaches:
32
EE6701 Evolutionary Computation Chapter 2
A Fuzzy Control Problem Inverted Pendulum
+Design and analyse a fuzzy controller for a simplified version of the
inverted pendulum.
+The differential equation describing the system is given as
) ( ) sin( ) (
2
2
2
t u mgl
dt
d
ml = = + t u
u
m = mass of the pole located at the tip point of the pendulum
l = length of the pendulum
u = deviation angle from vertical in the clockwise direction
t = u(t) = torque applied to the pole
t = time; g = gravitational acceleration constant
u
t
33
EE6701 Evolutionary Computation Chapter 2
34
EE6701 Evolutionary Computation Chapter 2
+Let us consider a simple FKBC system:
) (t u

u (t), u(t)
FKBC
u (t+1), ( 1) t u +
1 1 1
2
1 1 2
1 1 2
( 1) ( )
( 1) ( ) ( )
( 1) ( ) ( )
dx x k x k
x
dt h
x k x k x k
x k x k x k
+
= =
+ =
+ = +
) ( ) sin( ) (
2
2
2
t u mgl
dt
d
ml = = + t u
u
u (t)
+For simplicity and easy calculation, assuming x
1
= u and x
2
= du/dt, and
sin(u) = u, l = g, m = 180/(t g
2
), h = 1
2
2
1 1
2 2 1
2 1 2
( / ) (1/ ) ( ) ( )
( 1) ( ) ( ) ( )
( 1) ( ) ( ) ( )
dx
g l x ml u t x u t
dt
x k x k x k u k
x k x k x k u k
= =
+ =
+ = +
35
EE6701 Evolutionary Computation Chapter 2

-2 0 -1 1 2
x
1
+Assume that the universe of discourse for the two variables are:
-2 s x
1
s 2 and 5dps s x
2
s 5dps
+Step 1: Construct three membership functions for x
1
and x
2
on its
universe, positive (P), zero(Z) and negative (N)
P
Z N
) ( ) ( ) ( ) 1 (
) ( ) ( ) 1 (
2 1 2
2 1 1
k u k x k x k x
k x k x k x
+ = +
+ = +
+Therefore,
36
EE6701 Evolutionary Computation Chapter 2
+Step 2: To partition the control space (output), we construct five
membership functions for u(k) on its universe.

-5 0 -2 1 2
x
2
-4 -3 -1 3 4 5
P
Z
N
-24 0 -8 4 8 -16 -12 -4 12 16 20 24
-20

u

Z P PB
N NB
37
EE6701 Evolutionary Computation Chapter 2
+Step 3: Construct 9 rules in a 3 3 Fuzzy rule-based table, which
involves u and in order to stabilize the inverted pendulum system.
The entries are control actions, u(k).
u

NB N Z N
N Z P Z
Z P PB P
N Z P
x
2
x
1

-2 0 -1 1 2
x
1
P
Z N
0.5
x
1
(0) = 1
Given that the initial conditions are x
1
(0) = 1 and x
2
(0) = -4 dps,
By default, Table form
rules mean the
connective is and
38
EE6701 Evolutionary Computation Chapter 2

-5 0 -2 1 2
x
2
-4 -3 -1 3 4 5
P
Z
N
0.8
0.2
x
2
(0) = -4 dps,
+Step 4: We simulate the system for 4 cycles, i.e., k = 0, 1, 2, 3
If (x
1
= P) and (x
2
= Z) then (u = P) min(0.5, 0.2) = 0.2 (P)
If (x
1
= P) and (x
2
= N) then (u = Z) min(0.5, 0.8) = 0.5 (Z)
If (x
1
= Z) and (x
2
= Z) then (u = Z) min(0.5, 0.2) = 0.2 (Z)
If (x
1
= Z) and (x
2
= N) then (u = N) min(0.5, 0.8) = 0.5 (N)
NB N Z N
N Z P Z
Z P PB P
N Z P
x
2
x
1

-2 0 -1 1 2
x
1
P
Z N
0.5
x
1
(0) = 1
39
EE6701 Evolutionary Computation Chapter 2
R
1
R
2
R
3
R
4
R
5
R
6
R
7
R
8
R
9
P

P

PB

P

Z

P

P

N

Z

Z

P

P

Z

Z

Z

Z

N

N

N

P

Z

N

Z

N

N

N

NB

x
1
x
2
u

40
EE6701 Evolutionary Computation Chapter 2
0 -8 4 8 -16 -12 -4 12 16

u

Z P N
0.2
0.5
The 1
st
simulation cycle is completed. Find the initial conditions for next iteration:
2
8 . 5
2 . 11
5.8
14) 12 10 0.2(8 0.25(6) 4) 0.5(2 0) 2 - 4 - 6 - 8 - 10 - 0.5(-12 0.25(-14)
*
~

=
+ + + + + + + + +
= u
x
1
(1) = x
1
(0) + x
2
(0) = 1 4 = -3
x
2
(1) = x
1
(0) + x
2
(0) u(0) = 1 4 (-2) = -1
For second cycle,
If (x
1
= N) and (x
2
= N) then (u = NB) min(1, 0.2) = 0.2 (NB)
If (x
1
= N) and (x
2
= Z) then (u = N) min(1, 0.8) = 0.8 (N)
NB N Z N
N Z P Z
Z P PB P
N Z P
x
2
x
1
) ( ) ( ) ( ) 1 (
) ( ) ( ) 1 (
2 1 2
2 1 1
k u k x k x k x
k x k x k x
+ = +
+ = +
(Center-of-area)
41
EE6701 Evolutionary Computation Chapter 2
x
1
(0) = 1
x
2
(0) = -4 dps
The defuzzified value is u = -9.6, and x
1
(2) = -4, x
2
(2) =5.6
Proceed with the calculation, we get
x
1
(3) = 1.6, x
2
(3) = 1.6
x
1
(4) = 3.2, x
2
(4) = -2.08
x
1
(1) = -3
x
2
(1) = -1 dps
x
1
(2) = -4
x
2
(2) = 5.6 dps
x
1
(3) = 1.6
x
2
(3) = 1.6 dps
x
1
(4) = 3.2
x
2
(4) = -2.08 dps
42
EE6701 Evolutionary Computation Chapter 2
1. Increase the number of fuzzy sets (instead of only 3 for inputs and 5 for output).
2. Increase the number of if-then rules.
3. Tune the shape of the membership functions.
4. Tune the entries of the fuzzy rule-base table.
43
EE6701 Evolutionary Computation Chapter 2
Application Fuzzy Nonlinear Simulation
Non-linear
System
Input X
Output Y
+ Fuzzy rule-based system (FRBS) is useful for representing both simple
and complex systems. A FRBS consists of
a set of rules representing the behavior of the system
a set of input data observed going into the system
a set of output data coming from the system
+ Example: Develop a fuzzy rule-based system using four simple fuzzy
rules to approximate the output y for a non-linear function y = 10sinx
1
.
The universe of discourse for x
1
is [-180, 180], y is [-10, 10].
x
i
NB NS Z PS PB
y

Z NB Z PB Z
Four simple rules for
y = 10sinx
1

Rule 1: If x
1
= Z or PB, THEN y is Z
Rule 2: If x
1
= PS, THEN y is PB
Rule 3: If x
1
= Z or NB, THEN y is Z
Rule 4: If x
1
= NS, THEN y is NB
44
EE6701 Evolutionary Computation Chapter 2
45
EE6701 Evolutionary Computation Chapter 2
0 -90 90 -180 180

x
1
Z PS PB
NS NB

-10 0
y

10
PB
Z
NB
+ Let us choose four crisp singletons as the input:

x
1
= {-135, -45, 45, 135}
Rule 1: If x
1
= Z or PB, THEN y is Z
Rule 2: If x
1
= PS, THEN y is PB
Rule 3: If x
1
= Z or NB, THEN y is Z
Rule 4: If x
1
= NS, THEN y is NB
3, 4 1, 3, 4
1, 2, 3 1, 2
46
EE6701 Evolutionary Computation Chapter 2
+ For input x
1
= -135, rules 3 and 4 are fired:
Z
(x
1
)
x
1
10
(y)
y

-10
Z PB
1
90
NB
-135
-180
NS
(x
1
)
x
1
0
(y)
y
-10
NB
-135
y Approx. = -2.2
10
(y)
y

-10
2 . 2
25 . 0 5 . 3
) 5 . 7 ( 25 . 0 ) 5 5 . 2 ( 5 . 0 ) 5 . 2 5 5 . 7 10 ( 5 . 0
~
+
+ + + + + +
~ y Center-of-area
rule 3:
rule 4:
If x
1
= Z or NB, THEN y is Z
If x
1
= NS, THEN y is NB
47
EE6701 Evolutionary Computation Chapter 2
+ For input x
1
= -45, rules 1, 3 and 4 are fired:
Z
(x
1
)
x
1
10
(y)
y

-10
Z
1
-45
y Approx. = -2.2
10
(y)
y

-10 -180
NS
(x
1
)
x
1
0
(y)
y
-10
NB
-45
rules 1, 3:
2 . 2
25 . 0 5 . 3
) 5 . 7 ( 25 . 0 ) 5 5 . 2 ( 5 . 0 ) 5 . 2 5 5 . 7 10 ( 5 . 0
~
+
+ + + + + +
~ y
Center-of-area
If x
1
= Z or PB, THEN y is Z
If x
1
= Z or NB, THEN y is Z
rule 4: If x
1
= NS, THEN y is NB
48
EE6701 Evolutionary Computation Chapter 2
+ For input x
1
= 45, rules 1, 2 and 3 are fired:
Z
(x
1
)
x
1
10
(y)
y

-10
Z
1
45
(x
1
)
x
1
10
(y)
y

PB PS
1
45
rule 2:
2 . 2
25 . 0 5 . 3
) 5 . 7 ( 25 . 0 ) 5 5 . 2 ( 5 . 0 ) 5 . 2 5 5 . 7 10 ( 5 . 0
~
+
+ + + +
~ y Center-of-area
y Approx. = 2.2
10
(y)
y

-10
rules 1, 3:
If x1 = Z or PB, THEN y is Z
If x1 = Z or NB, THEN y is Z
If x1 = PS, THEN y is PB
49
EE6701 Evolutionary Computation Chapter 2
+ For input x
1
= 135, rules 1 and 2 are fired:
PB
(x
1
)
x
1
10
(y)
y

-10
Z
1
135
rule 1:
(x
1
)
x
1 10
(y)
y

PB PS
1
135
2 . 2
25 . 0 5 . 3
) 5 . 7 ( 25 . 0 ) 5 5 . 2 ( 5 . 0 ) 5 . 2 5 5 . 7 10 ( 5 . 0
~
+
+ + + +
~ y
Center-of-area
y Approx. = 2.2
10
(y)
y

-10
If x1 = Z or PB, THEN y is Z
rule 2:
If x1 = PS, THEN y is PB
50
EE6701 Evolutionary Computation Chapter 2
x
1
-135 -45 45 135
y -2.2 -2.2 2.2 2.2
+ Results for approximation of y = 10sinx
1
using fuzzy system (with four
rules and four simulation points)
-150 -100 -50 0 50 100 150
-10
-8
-6
-4
-2
0
2
4
6
8
10
10sinx
1
Fuzzy system
51
EE6701 Evolutionary Computation Chapter 2
1. Increase the number of fuzzy sets (instead of only 5 for input and 3 for output).
2. Increase the number of if-then rules.
3. Increase the number of input data points (instead of 4 points).
4. Tune the shape of the membership functions.
5. Tune the entries of the fuzzy rule-base table.
52
EE6701 Evolutionary Computation Chapter 2
Fuzzy Tuning using Evolutionary Algorithm
+ FKBC contains a number of parameters that can be altered to modify the
controller performance, e.g., the fuzzy membership functions and the
fuzzy rule-based look-up table for control actions.
+ These parameters can be optimised using an optimisation technique so
that the performance index is minimised or the FKBC satisfies a number
of performance measures.
Plant +
y
e
u r
FKBC
model of
the plant
EA tuning
+ Fuzzy tuning:
53
EE6701 Evolutionary Computation Chapter 2
+ Some usual performance measures for the design of FKBC are:
Good transient performance in terms of, small overshoot, short rise-
time, short settling time;
+ Fine design of a fuzzy controller:
Types of membership functions, e.g. triangular etc.,
Steady-state
error
Overshoot
Settling
time
Rise time
Parameters of membership functions, e.g., based length etc.,
Rule-base, e.g. rule consequents.
Good steady-state performance, in terms of small steady-state error
54
EE6701 Evolutionary Computation Chapter 2
55
EE6701 Evolutionary Computation Chapter 2
56
EE6701 Evolutionary Computation Chapter 2
57
EE6701 Evolutionary Computation Chapter 2
A fuzzy rule-set look-up table for control actions
Change-of-error
0
1
0
6
3
5
6
0
2
1
1
4
3
6
2
0
2
3
6
1
6
0
1
3
2
4
5
6
0
5
4
2
4
6
4
0
4
5
4
2
5
4
0
5
6
6
4
2
6
NB
NM
ZO
NS
PS
PM
PB
NB NM NS ZO PS PM PB
Error
Code Equivalent:
Negative Big NB 0
Negative Medium NM 1
Negative Small NS 2
Zero ZO 3
Positive Small PS 4
Positive Medium PM 5
Positive Big PB 6
0160356021143620326160123456052446404452540566426 f
0 .. 49
For rule-set
For membership functions
For scaling factors
Possible structure of a FKBC chromosome
For others ...
58
EE6701 Evolutionary Computation Chapter 2
Fitness function
For each individual chromosome in the population, it is necessary
to establish a measure of its fitness, f, which is often used to
accurately evaluate the performance of the controller and will be
used to generate a probability according to which the individual in
question will be selected for reproduction.
A simple fitness function that reflects small steady-state errors, a short
rise time, low oscillations and low overshoots may be given by:
{ }

=
A +
=
N
i
i i
i e e
f
1
2 2
1
e
i
is the error between the command and response, and Ae
i
the amount of
change of e
i
between two adjacent time indices, which may be
distinctively weighted to further suppress oscillations. N is the total time
steps chosen to ensure that the simulation reaches steady-state.
59
EE6701 Evolutionary Computation Chapter 2
A Gyro-mirror LOS Control Problem
yaw angle
pitch angle
(u
1
,u
2
)
(0,0)
Gyro-mirror LOS (gyroscope) is a two-degree-of-freedom plant that
often used for tracking and targeting purposes.
Basic coordinate system of a gyro-mirror:
yaw axis
pitch axis
60
EE6701 Evolutionary Computation Chapter 2
1 1 1 1 1
) , ( G ) , ( F ) ( M t = u u + u u + u u

2 2 2 2 2
) , ( G ) , ( F ) ( M t = u u + u u + u u

+ Nonlinear model of the plant
2 2
2
1
sin ) E G (
2
1
) G E (
2
1
cos ) H D B ( ) D A ( M u + + + u + + + =
2 2 2 1 2 2 1 2 2 1 1
cos sin J cos ) E G (
2
1
2 sin ) H D B ( F u u u u + u u u + u u u + =

2 3 2 1
cos J G u u u =

where
H
4
F
C M
2
+ + =
2 2
2
1 2
2
1 2
2
1 2
cos sin J cos ) E G (
4
1
2 sin ) H D B (
2
1
F u u u u u u u + =

2 3 1 2
cos J G u u u =

+ This is a nonlinear multivariable plant with high coupling effect
among its two input channels
61
EE6701 Evolutionary Computation Chapter 2
+ To apply Evolutionary Algorithm based fuzzy control for the gyroscope

+ There are several challenges in the design:
highly nonlinear
high coupling effect between its channels
there are a large number of parameters to be determined, which is
difficult to be solved by trial-and-error method
the signals are very noisy
+ A full matrix fuzzy controller
62
EE6701 Evolutionary Computation Chapter 2
FLC
Error
Change of Error
U
N B N S Z E P S P B
N B N S Z E PS PB
1
1
o
1
o
1
o
2
o
2
|
2
|
1
|
1
|
2
( a )
( b )
+ The FLC configuration
63
EE6701 Evolutionary Computation Chapter 2
+ The coding in EA
Written in Visual C++ 5.0
Running on Pentium II PC
Number of population: 300
Number of generation: 300
+ Simulation results/off-line design
64
EE6701 Evolutionary Computation Chapter 2
+ The Closed-loop response
+ The control action
65
EE6701 Evolutionary Computation Chapter 2
+ Convergence trace of EA
Interfacing program was written using:
+ Implementation result:
LabVIEW 5.0 & Fuzzy Logic toolkit
66
EE6701 Evolutionary Computation Chapter 2
PC
Gyro-mirror
plant
Controller board
Low-pass filter Sensors
D
a
t
a

A
c
q
u
i
s
i
t
i
o
n

C
a
r
d

+ The block diagram of hardware implementation
+ The full matrix fuzzy controller sub-program in Labview
67
EE6701 Evolutionary Computation Chapter 2
+ Implemented closed-loop responses

You might also like