Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
H
fb
H
ff
y
Design procedure:
1. Design feedback controller H
fb
to get good regulation proper-
ties (attenuation of load disturbances and measurement noise)
2. Design feedforward compensator H
ff
to obtain the desired
servo performance
Separation of concerns
5
2-DOF Control Structures
A 2-DOF controller can be represented in many ways, e.g.:
(For linear systems, all these structures are equivalent)
6
Example: PID with Setpoint Weighting
u = K
_
y
sp
y +
1
T
I
_
(y
sp
y)d + T
D
d
dt
( y
sp
y)
_
= K
_
e +
1
T
I
_
e d + T
D
de
dt
_
+ K( 1)
. .
K1
y
sp
+ T
D
K( 1)
. .
K2
dy
sp
dt
GP
PID + +
y ysp
K1 + K2 d /dt ysp ysp
18
Reference Generation State Space Approach
The model should generate a reference trajectory x
m
for the
process state x (one reference signal per state variable)
The feedforward signal u
ff
should make x follow x
m
Goal: perfect following if there are no disturbances or
model errors
19
Linear reference model:
x
m
(k +1) =
m
x
m
(k) +
m
u
c
(k)
y
m
(k) = C
m
x
m
(k)
Control law:
u(k) = L
_
x
m
(k) x(k)
_
+u
ff
(k)
How to generate model states x
m
that are compatible with
the real states x?
How to generate the feedforward control u
ff
?
20
Design of the Reference Model
Start by choosing the reference model identical to the process
model, i.e.,
x
m
(k +1) = x
m
(k) + u
ff
(k)
y
m
(k) = Cx
m
(k)
Then modify the dynamics of the reference model as desired
using state feedback (within the model)
u
ff
(k) = L
cm
u
c
(k) L
m
x
m
(k)
Gives the reference model dynamics
x
m
(k +1) = ( L
m
)x
m
(k) + L
cm
u
c
(k)
y
m
(k) = Cx
m
(k)
21
u
c
u
ff
x
m
L
cm
Model
L
m
y
State vector:
x =
_
_
q
y
_
_
=
_
_
pitch angular velocity
pitch angle
depth
_
_
Input signal:
u = = rudder angle
25
Torpedo: Continuous-Time Model
Simple model:
dq
dt
= aq + b
d
dt
= q
dy
dt
= V (+ c )
where a = 2, b = 1.3, and V = 5 (speed of torpedo)
x =
_
_
a 0 0
1 0 0
0 V 0
_
_
x +
_
_
b
0
0
_
_
u
y =
_
_
0 0 1
_
_
x
26
Torpedo: Sampled Model
Sample with h = 0.2
x(kh + h) =
_
_
0.67 0 0
0.165 1 0
0.088 1 1
_
_
x(kh) +
_
_
0.214
0.023
0.008
_
_
u(kh)
27
Torpedo: State Feedback
u(k) = Lx(k)
load disturbance rejection
Desired continuous-time dynamic behaviour:
two complex-conjugated poles with relative damping 0.5
and natural frequency
c
one pole in
c
a single parameter decides the dynamics
Desired characteristic polynomial
(s
2
+2 0.5
c
s +
2
c
)(s +
c
) = s
3
+2
c
s
2
+2
2
c
s +
3
c
28
Corresponds in discrete time to
(z
2
+ a
1
z + a
2
) (z e
ch
)
where a
1
= 2e
ch
cos
_
_
1
2
c
h
_
, a
2
= e
2 ch
with
= 0.5
29
Torpedo: State Feedback in Matlab
Matlab code
>> h = 0.2;
>> wc = 1; % speed of state feedback
>> pc = wc*roots([1 2 2 1]); % control poles in cont time
>> pcd = exp(pc*h); % control poles in disc time
>> L = place(Phi, Gam, pcd)
L =
-0.1452 -1.6047 0.1528
30
Torpedo: Observer Design
x(k +1) = x(k) + u(k) + K(y(k) C x(k))
measurement noise rejection + state estimation
Observer Dynamics:
the same pole layout as in the control design
parametrized by
o
instead of
c
typically faster dynamics than the controller, e.g.,
o
= 2
c
Desired continuous-time characteristic polynomial:
(s +
o
)(s
2
+
o
s +
2
o
) = s
3
+2
o
s
2
+2
2
o
s +
3
o
Discrete time characteristic polynomial given from previous
slide
31
Torpedo: Observer Design in Matlab
>> wo = 2; % speed of observer
>> po = wo*roots([1 2 2 1]); % observer poles in cont time
>> pod = exp(po*h); % observer poles in disc time
>> K = place(Phi,C,pod)
K =
0
-0.130
0.460
32
Torpedo: Simplistic Setpoint Handling
Simulation assuming simplistic approach, u(k) = L x(k) + L
c
u
c
(k)
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
O
u
t
p
u
t
0 2 4 6 8 10 12 14 16 18 20
0.5
0
0.5
1
I
n
p
u
t
Time
Slow step response with overshoot
33
Torpedo: Model and Feedforward Design
Reference model:
x
m
(k +1) = x
m
(k) + u
ff
(k)
y
m
(k) = Cx
m
(k)
Feedforward:
u
ff
= L
m
x
m
+ l
r
r
Desired characteristic polynomial:
(s +
m
)
3
= s
3
+3
m
s
2
+3
2
m
s +
3
m
(critically damped important!)
Parametrized using
m
Chosen as
m
= 2
c
34
Torpedo: Model and Feedforward Design in
Matlab
Corresponding discrete time characteristic polynomial from
Matlab
>> h = 0.2;
>> wm = 2; % speed of model
>> pm = wm*roots([1 3 3 1]); % model poles in cont time
>> pmd = exp(pm*h); % model poles in disc time
>> Lm = place(Phi,Gam,pmd)
Lm =
1.518 -5.539 1.001
>> Hm = ss(Phi-Gam*Lm,Gam,C,0,h);
>> lcm = 1/dcgain(Hm)
lcm =
1.001
35
Torpedo: Final Controller
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
O
u
t
p
u
t
0 2 4 6 8 10 12 14 16 18 20
0.5
0
0.5
1
I
n
p
u
t
Time
Faster step response without overshoot
36
Model states and feedforward signal:
0 2 4 6 8 10 12 14 16 18 20
0.5
0
0.5
1
1.5
0 2 4 6 8 10 12 14 16 18 20
0.5
0
0.5
1
Time
x
m1
x
m2
x
m3
u
ff
The model states and the feedforward signal are not affected
by the load disturbance
Open loop
37
Simulation without the feedforward signal, u(k) = L(x
m
(k) x(k)):
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
O
u
t
p
u
t
0 2 4 6 8 10 12 14 16 18 20
0.5
0
0.5
1
I
n
p
u
t
Time
Does not work very well the feedforward term is needed to
get the desired reference step response
38
Simulation without the feedback term, u(k) = u
ff
(k):
0 2 4 6 8 10 12 14 16 18 20
0
0.5
1
1.5
O
u
t
p
u
t
0 2 4 6 8 10 12 14 16 18 20
0.5
0
0.5
1
I
n
p
u
t
Time
Does not work at all the feedback is needed to handle the
load disturbance
39
Nonlinear Reference Generation
Recall the state-space approach to reference generation:
Often, u
ff
and x
m
do not come from linear lters but are the result
of solving an optimization problem, e.g.:
Move a satellite to a given altitude with minimum fuel
Position a mechanical servo in as short time as possible under
a torque constraint
Move the ball on the beam as fast as possible without losing it
40
General Solution
Derive the feedforward (open-loop) control signal u
ff
that
solves the optimization problem
Course in Nonlinear Control (FRTN05, Lp Vt 2)
The model state trajectories are generated by solving
dx
m
dt
= Ax
m
+ Bu
ff
41
Example: Time-Optimal Control of Ball on Beam
State vector:
_
_
x
v
_
=
_
_
ball position
ball velocity
beam angle
_
_
Continuous-time state-space model:
dx
dt
= v
dv
dt
= k
v
(k
v
10)
d
dt
= k
u (k
4.5)
42
Optimization problem: Assume steady state. Move the ball
from start position x(0) = x
0
to nal position x(t
f
) = x
f
in
minimum time while respecting the control signal constraints
u
max
u(t) u
max
Optimal control theory gives the optimal open-loop control law
u
ff
(t) =
_
_
u
0
, 0 t < T
u
0
, T t < 3T
u
0
, 3T t < 4T
where
u
0
= sgn(x
f
x
0
)u
max
T =
3
x
f
x
0
2k
k
v
u
max
t
f
= 4T 43
Example: u
max
= 1, x
0
= 0, and x
f
= 5 t
f
= 1.538
Optimal control signal:
0 0.5 1 1.5
2
1
0
1
2
u
f
f
t
(bang-bang control)
44
Solving
dm
dt
= k
u
ff
gives the optimal beam angle trajectory
m
(t) =
_
_
k
u
0
t, 0 t < T
k
u
0
(t2T), T t < 3T
k
u
0
(t4T), 3T t 4T
0 0.5 1 1.5
2
1
0
1
2
m
t
45
Solving
dvm
dt
= k
v
m
gives the optimal ball velocity trajectory
v
m
(t) =
_
_
k
k
v
u
0
t
2
/2, 0 t < T
k
k
v
u
0
(t
2
/22Tt+T
2
), T t < 3T
k
k
v
u
0
(t
2
/24Tt+8T
2
), 3T t 4T
0 0.5 1 1.5
0
1
2
3
4
5
6
7
v
m
t
46
Finally, solving
dxm
dt
= v
m
gives the optimal ball position trajectory
x
m
(t) =
_
_
x
0
+ k
k
v
u
0
t
3
/6, 0 t < T
x
0
k
k
v
u
0
(t
3
/6Tt
2
+T
2
tT
3
/3), T t < 3T
x
0
+ k
k
v
u
0
(t
3
/62Tt
2
+8T
2
t26T
3
/3), 3T t 4T
0 0.5 1 1.5
0
1
2
3
4
5
x
m
t
47
Lectures 9 and 10: Summary
Regulator problem reduce impact of load disturbances
and measurement noise
Inputoutput approach: design of feedback controller
H
fb
(z), e.g. PID controller
State space approach: design of state feedback and
observer, including disturbance estimator
Servo problem - make the output follow the setpoint in the
desired way
Inputoutput approach: design of model reference
H
m
(z) and feedforward lter H
ff
(z)
State space approach: design of combined reference
and feedforward generator
Linear or nonlinear reference generation
48