Topic #14
16.31 Feedback Control
State-Space Systems
? Full-state Feedback Control
? How do we change the poles of the state-space system?
? Or, even if we can change the pole locations.
? Where do we change the pole locations to?
? How well does this approach work?
Copy right 2001 by Jon at h an H ow.
1
Fall 2001 16.31 14–1
Reference Inputs
? SofarwehavelookedathowtopickK to get the dynamics to have
some nice properties (i.e. stabilize A)
? The question remains as to how well this controller allows us to
track a reference command?
– Performance issue rather than just stability.
? Started with
˙x = Ax + Bu y = Cx
u = r ?Kx
? For good tracking performance we want
y(t) ≈ r(t)ast →∞
? Consider this performance issue in the frequency domain. Use the
final value theorem:
lim
t→∞
y(t) = lim
s→0
sY (s)
Thus, for good performance, we want
sY (s) ≈ sR(s)ass → 0 ?
Y (s)
R(s)
vextendsingle
vextendsingle
vextendsingle
vextendsingle
s=0
=1
? So, for good performance, the transfer function from R(s)toY (s)
should be approximately 1 at DC.
Fall 2001 16.31 14–2
? Example #1: Consider:
˙x =
bracketleftbigg
11
12
bracketrightbigg
x +
bracketleftbigg
1
0
bracketrightbigg
u
y =
bracketleftbig
10
bracketrightbig
x
– Already designed K =
bracketleftbig
14 57
bracketrightbig
– Then the closed-loop system is
˙x =(A?BK)x + Br y = Cx
– Which gives the transfer function
Y (s)
R(s)
= C (sI ?(A?BK))
?1
B
=
bracketleftbig
10
bracketrightbig
bracketleftbigg
s +13 56
?1 s?2
bracketrightbigg
?1
bracketleftbigg
1
0
bracketrightbigg
=
s?2
s
2
+11s +30
? Assume that r(t) is a step, then by the FVT
Y (s)
R(s)
vextendsingle
vextendsingle
vextendsingle
vextendsingle
s=0
=
?2
30
negationslash=1!!
– So our step response is quite poor.
Fall 2001 16.31 14–3
? One obvious solution is to scale the reference input r(t)sothat
u =
ˉ
Nr?Kx
–
ˉ
N is an extra gain used to scale the closed-loop transfer function
? Now we have
˙x =(A?BK)x + B
ˉ
Nr , y = Cx
so that
Y (s)
R(s)
= C (sI ?(A?BK))
?1
B
ˉ
N
If we had made
ˉ
N = ?15, then
Y (s)
R(s)
=
?15(s?2)
s
2
+11s +30
so with a step input, y(t) → 1ast →∞.
? So the steady state step error is now zero, but is this OK?
– See plots – big improvement in the response, but the transient
is a bit weird.
Fall 2001 16.31 14–4
0 0.5 1 1.5 2 2.5 3 3.5 4
?1
?0.8
?0.6
?0.4
?0.2
0
0.2
0.4
0.6
0.8
1
time (sec)
Y output
Step Response
u=r?Kx
u=Nbar r?Kx
Figure 1: Response to step input with and without the
ˉ
N correction.
? Formal way to compute
ˉ
N is to change the form of the control input.
– Consider the analysis for the response to a step input r = r
ss
1(t)
? At steady state ˙x =0,sowehave
˙x = Ax + Bu
y = Cx
bracerightbigg
0=Ax
ss
+ Bu
ss
y
ss
= Cx
ss
and if things are going well, then y
ss
= r
ss
.
bracketleftbigg
AB
C 0
bracketrightbiggbracketleftbigg
x
ss
u
ss
bracketrightbigg
=
bracketleftbigg
0
r
ss
bracketrightbigg
which can be easily solved for x
ss
and u
ss
.
Fall 2001 16.31 14–5
? For purposes of scaling, define:
x
ss
≡ N
x
r
ss
u
ss
≡ N
u
r
ss
? We would then implement the control in the new form
u =
ˉ
Nr?Kx =(N
u
+ KN
x
)r ?Kx
= N
u
r + K(N
x
r ?x)
= u
ss
+ K(x
ss
?x)
which can be visualized as:
– Use N
x
to modify the reference command r to generate a feed-
forward state command to the system x
ss
.
– Use N
u
to modify the reference command r to generate a feed-
forward control input u
ss
? Note that this development assumed that r was constant, but it
could also be used if r is a slowly time-varying command.
– But as we have seen, the architecture is designed to give good
steady-state behavior, and it might give weird transient responses.
Fall 2001 16.31 14–6
? For our example,
bracketleftbigg
x
ss
u
ss
bracketrightbigg
=
bracketleftbigg
AB
C 0
bracketrightbigg
?1
bracketleftbigg
0
1
bracketrightbigg
=
?
?
1
?0.5
?0.5
?
?
so
x
ss
=
bracketleftbigg
1
?0.5
bracketrightbigg
,u
ss
=
bracketleftbig
?0.5
bracketrightbig
and
ˉ
N = N
u
+ KN
x
= ?0.5+
bracketleftbig
14 57
bracketrightbig
bracketleftbigg
1
?0.5
bracketrightbigg
= ?15
as we had before.
Fall 2001 16.31 14–7
0 0.5 1 1.5 2 2.5 3 3.5 4
?0.08
?0.06
?0.04
?0.02
0
0.02
0.04
0.06
time (sec)
X state
Step Response
x
1
x
2
0 0.5 1 1.5 2 2.5 3 3.5 4
?0.4
?0.2
0
0.2
0.4
0.6
0.8
1
time (sec)
U control
Step Response: u=r?Kx
u=r?Kx
Figure 2: Response to step input without the
ˉ
N correction. The steady state x and u values are non-zero but
they are not the values that give the desired y
ss
.
0 0.5 1 1.5 2 2.5 3 3.5 4
?1
?0.5
0
0.5
1
time (sec)
X state
Step Response
x
1
x
2
0 0.5 1 1.5 2 2.5 3 3.5 4
?15
?10
?5
0
5
time (sec)
U control
Step Response: u=Nbar r?Kx
u=Nbar r?Kx
Figure 3: Response to step input with the
ˉ
N correction. Gives the desired steady-state behavior,but note the
higher u(0).
Fall 2001 16.31 14–8
Examples
? Example from Problem set
G(s)=
8·14·20
(s + 8)(s + 14)(s + 20)
– Target pole locations ?12±12j, ?20
% system
[a,b,c,d]=tf2ss(8*14*20,conv([1 8],conv([1 14],[1 20])))
% controller gains to place poles at specified locations
k=place(a,b,[-12+12*j;-12-12*j;-20])
TT=[a b;c d];
% find the feedforward gains
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:1];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.2
0.4
0.6
0.8
1
1.2
time (sec)
Y output
Step Response
2 216 3520
2.5714
u=r?Kx
u=Nbar r?Kx
Figure 4: Response to step input with and without the
ˉ
N correction. Gives the desired steady-state behavior,
with little di?culty!
Fall 2001 16.31 14–9
10
?1
10
0
10
1
10
2
10
?3
10
?2
10
?1
10
0
Freq (rad/sec)
G
cl
Closed?loop Freq Response
u=r?Kx
u=Nbar r?Kx
Figure 5: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–10
? Example from second problem set
G(s)=
0.94
s
2
?0.0297
– Target pole locations ?0.25±0.25j
[a,b,c,d]=tf2ss(.94,[1 0 -0.0297])
k=place(a,b,[-1+j;-1-j]/4)
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.1:30];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);
0 5 10 15 20 25 30
0
0.2
0.4
0.6
0.8
1
1.2
time (sec)
Y output
Step Response
0.5 0.1547
0.13298
u=r?Kx
u=Nbar r?Kx
Figure 6: Response to step input with and without the
ˉ
N correction. Gives the desired steady-state behavior,
with little di?culty!
Fall 2001 16.31 14–11
10
?1
10
0
10
1
10
2
10
?3
10
?2
10
?1
10
0
Freq (rad/sec)
G
cl
Closed?loop Freq Response
u=r?Kx
u=Nbar r?Kx
Figure 7: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–12
? Ok, so let’s try something very challenging...
G(s)=
8·14·20
(s?8)(s?14)(s?20)
– Target pole locations ?12±12j, ?20
[a,b,c,d]=tf2ss(8*14*20,conv([1 -8],conv([1 -14],[1 -20])))
k=place(a,b,[-12+12*j;-12-12*j;-20])
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;
Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:1];
[y,t,x]=step(sys1,t);
[y2,t2,x2]=step(sys2,t);
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.2
0.4
0.6
0.8
1
1.2
time (sec)
Y output
Step Response
86 216 8000
2.5714
u=r?Kx
u=Nbar r?Kx
Figure 8: Response to step input with and without the
ˉ
N correction. Gives the desired steady-state behavior,
with little di?culty!
Fall 2001 16.31 14–13
10
?3
10
?2
10
?1
10
0
10
1
10
?3
10
?2
10
?1
10
0
10
1
Freq (rad/sec)
G
cl
Closed?loop Freq Response
u=r?Kx
u=Nbar r?Kx
Figure 9: Closed-loop frequency response. Clearly shows that the DC gain is unity
Fall 2001 16.31 14–14
? The worst possible...
G(s)=
(s?1)
(s + 1)(s?3)
– Unstable, NMP!!
– Target pole locations ?1±j
[a,b,c,d]=tf2ss([1 -1],conv([1 1],[1 -3]))
k=place(a,b,[[-1+j;-1-j]])
TT=[a b;c d];
N=inv(TT)*[zeros(1,length(a)) 1]’;Nx=N(1:end-1);Nu=N(end);Nbar=Nu+k*Nx;
sys1=ss(a-b*k,b,c,d);
sys2=ss(a-b*k,b*Nbar,c,d);
t=[0:.01:10];[y,t,x]=step(sys1,t);[y2,t2,x2]=step(sys2,t);
0 1 2 3 4 5 6 7 8 9 10
?1
?0.8
?0.6
?0.4
?0.2
0
0.2
0.4
0.6
0.8
1
time (sec)
Y output
Unstable, NMP system Step Response
4 5
?2
u=r?Kx
u=Nbar r?Kx
Figure 10: Response to step input with and without the
ˉ
N correction. Gives the desired steady-state behavior,
with little di?culty!
Fall 2001 16.31 14–15
10
?2
10
?1
10
0
10
1
10
2
10
?2
10
?1
10
0
10
1
Freq (rad/sec)
G
cl
Closed?loop Freq Response
u=r?Kx
u=Nbar r?Kx
Figure 11: Closed-loop frequency response. Clearly shows that the DC gain is unity
? Full state feedback process is quite simple as it can be automated
in Matlab using acker and/or place
? With more than 1 actuator, we have more than n degrees of freedom
in the control → we can change the eigenvectors as desired, as well
as the poles.
? The real issue now is where to put the poles...
? And to correct the fact that we cannot usually measure the state
→ develop an estimator.