Topic #14 16.31 Feedback Control State-Space Systems e Ful-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? Copyright 2001 by Jonathan How
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? Copyright 2001 by Jonathan How. 1
Fall 2001 16.3114-1 Reference Inputs So far we have looked at how to pick K 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 A z+ Bu Ka 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 g(t)=lim sY(s) t→→∞o S→0 Thus, for good performance, we want sY(s)≈sR(s)ass→0→ RO So, for good performance, the transfer function from R(s)to Y(s should be approximately l at dc
Fall 2001 16.31 14–1 Reference Inputs • So far we have looked at how to pick K 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) as t → ∞ • 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) as s → 0 ⇒ Y (s) R(s) s=0 = 1 • So, for good performance, the transfer function from R(s) to Y (s) should be approximately 1 at DC
Fall 2001 6.31142 Example #1: Consider 10|x Already designed K=[14 57 Then the closed-loop system is =(A- BK)x+Br y=C. Which gives the transfer function Rls C(SI-(A-Bk)B =[101/+13561-1 1s-2 0s2+11s+30 Assume that r(t) is a step, then by the FVT R(S)|=030×1! So our step response is quite poor
Fall 2001 16.31 14–2 • Example #1: Consider: x˙ = 1 1 1 2 x + 1 0 u y = 1 0 x – Already designed K = 14 57 – 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 = 1 0 s + 13 56 −1 s − 2 −1 1 0 = s − 2 s2 + 11s + 30 • Assume that r(t) is a step, then by the FVT Y (s) R(s) s=0 = −2 30 = 1 !! – So our step response is quite poor.
Fall 2001 6.3114-3 One obvious solution is to scale the reference input r(t)so that u= nr-Kx N is an extra gain used to scale the closed-loop transfer function ● Now we have C =(A- BK)C+ BNr, y=Ca so that r(s C(SI-(A-BK)BN If we had made n=-15 then 15(s-2 R(s)s2+1l+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–3 • One obvious solution is to scale the reference input r(t) so that u = Nr ¯ − Kx – N¯ is an extra gain used to scale the closed-loop transfer function • Now we have x˙ = (A − BK)x + BNr , y ¯ = Cx so that Y (s) R(s) = C (sI − (A − BK))−1 BN¯ If we had made N¯ = −15, then Y (s) R(s) = −15(s − 2) s2 + 11s + 30 so with a step input, y(t) → 1 as t → ∞. • 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 6.3114-4 ep Response E世c -0.8 time(sec) 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=rss1(t) At steady state i=0. so we have 汇=Ax+Bu 0=ACss+ Bu C ys and if things are going well, then yss=rss a B 0 C 0 which can be easily solved for ss and u
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 = rss1(t) • At steady state ˙x = 0, so we have x˙ = Ax + Bu y = Cx 0 = Axss + Buss yss = Cxss and if things are going well, then yss = rss. A B C 0 xss uss = 0 rss which can be easily solved for xss and uss.
Fall 2001 6.3114-5 For purposes of scaling, define ass= T ≡Nars We would then implement the control in the new form u=Nr-K C=(Nu+KN)r-kx Nur+K(N-r-I +K( which can be visualized as XsS K A B C Use N to modify the reference command r to generate a feed- forward state command to the system Is Use N to modify the reference command r to generate a feed- forward control input uss Note that this development assumed that r was constant, but it could also be used if r is a slowly time-varving 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–5 • For purposes of scaling, define: xss ≡ Nxrss uss ≡ Nurss • We would then implement the control in the new form u = Nr ¯ − Kx = (Nu + KNx)r − Kx = Nur + K(Nxr − x) = uss + K(xss − x) which can be visualized as: – Use Nx to modify the reference command r to generate a feedforward state command to the system xss. – Use Nu to modify the reference command r to generate a feedforward control input uss • 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 6.3114-6 ● For our example, a B 0.5 LL C 0 0.5 SO 0.5 =[-0.5] and N=N+KN2=-05+[1457/7 0.5 as we had before
Fall 2001 16.31 14–6 • For our example, xss uss = A B C 0 −1 0 1 = 1 −0.5 −0.5 so xss = 1 −0.5 , uss = −0.5 and N¯ = Nu + KNx = −0.5 + 14 57 1 −0.5 = −15 as we had before.
Fall 2001 163114-7 ep Response 002 0.04 006 Step Response: u=r-Kx Figure 2: Response to step input without the N correction. The steady state a and u values are non-zero but they are not the values that give the desired yss Step Response: 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(o)
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 x2 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 yss. 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 x1 x2 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 Examples 6.3114-8 Example from Problem set 8·14·20 Ss+8)(s+14)(s+20 Target pole locations -12+ 120,-20 [a,b,c,d]=tf2ss(8*14*20,conw([18],conv([114],[120]) 4 controller gains to place poles at specified locat k= place(a,b,[-12+12*j;-12-12*j;-201) TT=[a b;c d]; i find the feedforward gains N=inv(TT)[zeros(1, length(a))11 Nx=N(1: end-1): Nu=N(end): Nbar=Nu+k*Nx ys1=ss (a-b*k, b, c, d) sys2=ss(a-b*k, b*Nbar, c, d); t=[0:01:1]; Ly, t, x p(sysl, t) Ly2, t2, x2]=step(sys2, t) ep Response 2.5714 2 216 3520 time(sec) Figure 4: Response to step input with and without the N correction. Gives the desired steady-state behavior, th little difficulty
Fall 2001 16.31 Examples 14–8 • 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 difficulty!
Fall 2001 16.3114-9 Closed-loop Freq Response -Kx Nbar r-Kx 10 Freq (rad/sec) Figure 5: Closed-loop frequency response. Clearly shows that the dC gain is unity
Fall 2001 16.31 14–9 10−1 100 101 102 10−3 10−2 10−1 100 Freq (rad/sec) Gcl 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