Sunteți pe pagina 1din 21

Fall 2008 MECH523 : Intelligent Control 1

MECH523: Intelligent Control


MECH523: Intelligent Control
Dr. Ryozo Nagamune
Dr. Ryozo Nagamune
Department of Mechanical Engineering
Department of Mechanical Engineering
University of British Columbia
University of British Columbia
Lecture 19
Lecture 19
Case study of FMRLC
Case study of FMRLC
Fall 2008 MECH523 : Intelligent Control 2
FMRLC (review)
FMRLC (review)
Plant Plant
Fuzzy controller Fuzzy controller
Reference Reference
model model
Learning mechanism Learning mechanism
Fuzzy inverse model Fuzzy inverse model
Knowledge Knowledge- -base base
modifier modifier
Fall 2008 MECH523 : Intelligent Control 3
Learning mechanism (review)
Learning mechanism (review)

Tuning of rule
Tuning of rule
-
-
base of fuzzy controller
base of fuzzy controller
s.t
s.t
. the
. the
C.L. system behaves like reference model.
C.L. system behaves like reference model.

The learning mechanism consists of:


The learning mechanism consists of:

Fuzzy inverse model


Fuzzy inverse model
: Function to map
: Function to map
y
ye e
(kT
(kT
) to
) to
changes in the plant input
changes in the plant input
p(kT
p(kT
) that are necessary to
) that are necessary to
force
force
y
ye e
(kT
(kT
) to be zero, or small. (today
) to be zero, or small. (today

s
s
lecture)
lecture)


Similar to fuzzy controller design
Similar to fuzzy controller design

Knowledge
Knowledge
-
-
base modifier
base modifier
: Function to modify fuzzy
: Function to modify fuzzy
controller
controller

s rule
s rule
-
-
base to affect the needed changes in
base to affect the needed changes in
the plant inputs. (last lecture)
the plant inputs. (last lecture)
Fall 2008 MECH523 : Intelligent Control 4
Knowledge
Knowledge
-
-
base modifier (review)
base modifier (review)

If fuzzy controller
If fuzzy controller
had
had
generated control input
generated control input
then
then
y
ye e
(kT
(kT
)
)
would have been
would have been
zero.
zero.

Next time when we have similar value of e and


Next time when we have similar value of e and
c, plant input will be
c, plant input will be
u(kT
u(kT
-
-
T)+p(kT
T)+p(kT
).
).
Fuzzy Fuzzy
controller controller
Plant Plant
Fall 2008 MECH523 : Intelligent Control 5
Modification of output
Modification of output
MFs
MFs
(review)
(review)

Example: Assume fuzzy inverse model produced


Example: Assume fuzzy inverse model produced
p(kT
p(kT
)=0.5, for
)=0.5, for
e(kT
e(kT
-
-
T)=0.75,
T)=0.75,
c(kT
c(kT
-
-
T)=
T)=
-
-
0.2.
0.2.
Fuzzy Fuzzy
controller controller
Two rules Two rules ( (R R1 1 & & R R2 2) )
are active in this case. are active in this case.
Move the corresponding Move the corresponding
output output MFs MFs by by p(kT p(kT). ).
Output MF Output MF
for R for R1 1
Output MF Output MF
for R for R2 2
Fall 2008 MECH523 : Intelligent Control 6
Case study: Ship head direction control
Case study: Ship head direction control

Control ship head direction by actuating rudder angle.


Control ship head direction by actuating rudder angle.

u=5 (
u=5 (
m/s
m/s
): velocity in x
): velocity in x
-
-
direction (constant)
direction (constant)

An increase in the rudder angle will generally result in a


An increase in the rudder angle will generally result in a
decrease in the ship heading angle.
decrease in the ship heading angle.
Input Input
Rudder angle Rudder angle
Output Output
Ship heading Ship heading
Fall 2008 MECH523 : Intelligent Control 7
FMRLC for direction control
FMRLC for direction control
Ship Ship
Fuzzy controller Fuzzy controller
Reference Reference
model model
Learning mechanism Learning mechanism
Fuzzy inverse model Fuzzy inverse model
Knowledge Knowledge- -base base
modifier modifier
Fall 2008 MECH523 : Intelligent Control 8
Scaling effect on
Scaling effect on
MFs
MFs
(review)
(review)

Scaling gains are same as expanding or


Scaling gains are same as expanding or
contracting input/output membership functions.
contracting input/output membership functions.
Scaled FS
Scaled FS
1/3
1/3
5
5
FS
FS
Fall 2008 MECH523 : Intelligent Control 9
Input and output
Input and output
MFs
MFs
of FC
of FC
(121
(121
MFs
MFs
are
are
Overlapping.)
Overlapping.)
Fall 2008 MECH523 : Intelligent Control 10
Design of scaling gains of FC
Design of scaling gains of FC

g
ge e
= 1/
= 1/


(since the error
(since the error
e(kT
e(kT
) can never be over
) can never be over
180 deg.)
180 deg.)

g
gc c
= 100
= 100
(since ship does not move much faster
(since ship does not move much faster
than 0.01
than 0.01
rad
rad
/sec (by simulations).)
/sec (by simulations).)

g
ge e
= 8
= 8

/18 (since we want to limit


/18 (since we want to limit

(kT
(kT
) between
) between
80 deg.)
80 deg.)
Design of reference model
Design of reference model
Fall 2008 MECH523 : Intelligent Control 11
Fuzzy inverse model
Fuzzy inverse model

MFs
MFs
: Same as in the fuzzy controller
: Same as in the fuzzy controller

Scaling gains: By using Design procedure 1 in


Scaling gains: By using Design procedure 1 in
Appendix,
Appendix,
Fall 2008 MECH523 : Intelligent Control 12
Rule
Rule
-
-
base of inverse fuzzy model
base of inverse fuzzy model
Centers of output membership functions
Centers of output membership functions
Fall 2008 MECH523 : Intelligent Control 13
Rule interpretations
Rule interpretations

i=0, j=0
i=0, j=0

If
If

e e
=0 and
=0 and

c c
=0, then y is tracking
=0, then y is tracking
y
ym m
perfectly, so
perfectly, so
you should not update the fuzzy controller. Therefore,
you should not update the fuzzy controller. Therefore,
the output of the fuzzy inverse model will be zero.
the output of the fuzzy inverse model will be zero.

i=1, j=2
i=1, j=2

If
If

e e
is positive and
is positive and

c c
is positive, then change the
is positive, then change the
input to the fuzzy controller that is generated to
input to the fuzzy controller that is generated to
produce these values of
produce these values of

e e
and
and

c c
by decreasing it.
by decreasing it.

We want to increase
We want to increase

, and thus we want to decrease


, and thus we want to decrease

to achieve this.
to achieve this.
Fall 2008 MECH523 : Intelligent Control 14
Simulation result: FMRLC
Simulation result: FMRLC
H
e
a
d

d
i
r
e
c
t
i
o
n

(
d
e
g
)
H
e
a
d

d
i
r
e
c
t
i
o
n

(
d
e
g
)
Time (sec) Time (sec)
Almost perfect tracking by fast learning!
Almost perfect tracking by fast learning!
Fall 2008 MECH523 : Intelligent Control 15
Simulation result: Gradient
Simulation result: Gradient
-
-
based
based
Model Reference Adaptive Control
Model Reference Adaptive Control
H
e
a
d

d
i
r
e
c
t
i
o
n

(
d
e
g
)
H
e
a
d

d
i
r
e
c
t
i
o
n

(
d
e
g
)
Time (sec) Time (sec)
Slow convergence!
Slow convergence!
Fall 2008 MECH523 : Intelligent Control 16
Simulation result:
Simulation result:
Lyapunov
Lyapunov
-
-
based
based
Model Reference Adaptive Control
Model Reference Adaptive Control
H
e
a
d

d
i
r
e
c
t
i
o
n

(
d
e
g
)
H
e
a
d

d
i
r
e
c
t
i
o
n

(
d
e
g
)
Time (sec) Time (sec)
Slow convergence! Slow convergence!
Fall 2008 MECH523 : Intelligent Control 17
Disturbance rejection
Disturbance rejection
Disturbance at rudder (deg) Disturbance at rudder (deg)
Head direction (deg) Head direction (deg)
(FMRLC) (FMRLC)
Head direction (deg) Head direction (deg)
(Gradient (Gradient- -based MRAC) based MRAC)
Head direction (deg) Head direction (deg)
( (Lyapunov Lyapunov- -based MRAC) based MRAC)
Fall 2008 MECH523 : Intelligent Control 18
Discussion
Discussion

In this example, FMRLC gives:


In this example, FMRLC gives:

Fast convergence compared to


Fast convergence compared to
MRACs
MRACs

Good disturbance rejection compared to


Good disturbance rejection compared to
MRACs
MRACs

However, in general:
However, in general:

No guarantee that FMRLC is always better than


No guarantee that FMRLC is always better than
MRACs
MRACs

No guarantee of closed
No guarantee of closed
-
-
loop stability
loop stability
Fall 2008 MECH523 : Intelligent Control 19
Summary
Summary

Fuzzy Model Reference Learning Control


Fuzzy Model Reference Learning Control

How to select fuzzy inverse model


How to select fuzzy inverse model

Scaling gains (Two design procedures in Appendix)


Scaling gains (Two design procedures in Appendix)

Fuzzy system (Application dependent)


Fuzzy system (Application dependent)

Ship direction control by FMRLC


Ship direction control by FMRLC

Ex: Read until p.346.


Ex: Read until p.346.
Fall 2008 MECH523 : Intelligent Control 20
Fuzzy inverse model design
Fuzzy inverse model design
Design procedure 1
Design procedure 1
for scaling gains
for scaling gains
(Assume normalized I/O universe of discourse.)
(Assume normalized I/O universe of discourse.)
1.
1.
Select as follows.
Select as follows.
2.
2.
Apply step
Apply step
r(kT
r(kT
) with typical magnitude. See
) with typical magnitude. See
a)
a)
If there is unacceptable oscillations in
If there is unacceptable oscillations in
y(kT
y(kT
)
)
around
around
y
ym m
(kT
(kT
), increase derivative gain
), increase derivative gain
b)
b)
If
If
y(kT
y(kT
) is unable to
) is unable to

keep up
keep up


with
with
y
ym m
(kT
(kT
),
),
decrease derivative gain
decrease derivative gain
c)
c)
If
If
y(kT
y(kT
) is acceptable
) is acceptable
w.r.t
w.r.t
.
.
y
ym m
(kT
(kT
), done!
), done!
Fall 2008 MECH523 : Intelligent Control 21
Fuzzy inverse model design
Fuzzy inverse model design
Design procedure 2
Design procedure 2
for scaling gains
for scaling gains
(Assume normalized I/O universe of discourse.)
(Assume normalized I/O universe of discourse.)

Set
Set
g
gp p
=0. (Begin without learning mechanism.)
=0. (Begin without learning mechanism.)
If it works fine, FC is already well
If it works fine, FC is already well
-
-
designed.
designed.
2.
2.
Choose gains by maximal magnitudes.
Choose gains by maximal magnitudes.
3.
3.
Turn on learning mechanism by increasing
Turn on learning mechanism by increasing
g
gp p
slightly.
slightly.
(Slow update of output
(Slow update of output
MFs
MFs
in fuzzy controller.) Tune
in fuzzy controller.) Tune
the inverse model if necessary.
the inverse model if necessary.
4.
4.
Continue to increase
Continue to increase
g
gp p
, and tune the inverse model if
, and tune the inverse model if
necessary. (Increased adaptation speed, possibility of
necessary. (Increased adaptation speed, possibility of
oscillations and instability.)
oscillations and instability.)

S-ar putea să vă placă și