Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.245: MULTIVARIABLE CONTROL SYSTEMS by A. Megretski Problem Set 5 Solutions The problem set deals with Hankel norm approximations and Q-parameterization, and their applications in feedback design. Problem 5.T Let G(s) = s + + s + a, where a > 0 is a real parameter. (a) Find an analytical expression for the Hankel norm of G. Answer: Reasoning: a state space model ( 4 + 4a + 4 + ) 2 ( ) 4a 4a. (a + ) 2 ẋ = Ax + Bw, y = Cx + Dw for G is given by A = [ 0 0 a Version of December, 20. ] [, B = ], C = [ ], D = 0.
2 The corresponding controllability and observability Gramians are equal: ] W c = W o =. [ 2 a+ Hence Hankel norm of G, as the square root of the largest eigenvalue of W o W c, is the larger root of the characteristic polynomial ( δ(t) = t 2 2 4 + ) ( ) t + 4a 4a. (a + ) 2 This can be checked by MATLAB code like this: a+ 2a function ps5(a) s=tf( s ); sig=hsvd(/(s+)+/(s+a)); p=/4+/(4*a);q=/(4*a)-/(a+)^2;d=sqrt(p^2-q); siga=[p+d;p-d]; fprintf( ps5 error for a=%f: %e [%f %f]\n,... a,norm(sig-siga),siga(),siga(2)) (b) Find an analytical expression for minimal Hankel norm of the difference G Ĝ where Ĝ(s) = b/(s + c) for some b R and c > 0. What happens when a? Answer: the minimal equals ( 4 + 4a 4 + ) 2 4a ( ) 4a. (a + ) 2 Reasoning: since Ĝ(s) ranges over all stable transfer functions of order, the minimum of the Hankel norm of G Ĝ equals the second largest Hankel singular value of G, which is computed in (a). Since G has order when a = the minimum converges to zero as a. Problem 5.2T Consider the setup shown on Figure, where P is a given DT LTI state space model defined by equations x(t + ) = Ax(t) + Bu(t), q(t) = Cx(t),
3 and K is stabilizing DT LTI feedback, to be designed as a state space model x f (t + ) = A f x f (t) + B f y(t), u(t) = C f x f (t) + D f y(t). The signals u, w, q are assumed to be scalar. Let F, L be the real vectors (F is a row vector, L is a column vector) such that A+BF and A+LC are Schur matrices (i.e. all eigenvalues λ satisfy λ < ). Let G 0, G, G 2 be the corresponding transfer functions from the standard Q parameterization G = G 0 +G QG 2 of all achievable stabilized closed loop transfer functions from w to u. w + q K P u Figure : Feedback Setup for Problem 5.2T (a) Give state space models for G 0, G, G 2 in terms of A, B, C, F, L. Answer: G 0 : x + = (A + BF )x BF, + = (A + LC) + Lw, e = F x F, G : η + = (A + BF )η + Bv, ξ = F η + ξ, G 2 : + = (A + LC) + Lw, δ = C + w. Reasoning: apply the general Q-parametrization formulae with A = A, B = 0, B 2 = B, C = 0, D = 0, D 2 = I, C 2 = C, D 2 = I. (b) Let P (z) = P 0 (z z )(z z 2 )... (z z k ) (z p )(z p 2 )... (z p n ).
4 Assume for simplicity that z i z l and p i p l for i l. Express zeros of G and G 2 in terms of P 0, z i, p l. Answer: a number z C such that z is a zero of G (or G 2 ) if and only if z = p i for some i. Locations of stable zeros of G (and G 2 ) cannot be determined based on the assumptions. Reasoning: for z C such that the matrix zi A BF is invertible (in particular, for z ) we have G (z) = + F (zi A BF ) B = det( + F (zi A BF ) B) = det(i + (zi A BF ) BF ) = det((zi A BF ) ) det(zi A BF + BF ) = det(zi A) det(zi A BF ), G 2 (z) = + C(zI A LC) L =... det(zi A) = det(zi A LC). Since all uncontrollable or unobservable modes of the state space model for P must be stable, this establishes locations of the unstable zeros of G and G 2. Since uncontrollable or unobservable modes of a state space model do not show up in its transfer function, locations of stable zeros of G and G 2 cannot be determined based on the information provided. (c) Find lim z pi G 0 (z)/(z p i ) in terms of lim z pi (z p i )P (z). Answer: for p i we have lim G 0 (z)/(z p i ) = z p i lim z pi (z p i )P (z). For p i <, the limit cannot be determined based on the information provided. Reasoning: let K = K(s) be the transfer function of the stabilizing controller which yields closed loop transfer function G = G 0. Then z p K(z) K(z)P (z) = K(z)P (z) K(z)P (z) (z p)p (z).
5 When p = p i and p i, we have K(z)P (z) as z p, and therefore KP/( KP ), which yields the expressing in the answer. When p = p i and p i <, it is admissible for K to have a zero at z = p i, and the limit value of KP/( KP ) at p can be arbitrary. What does this all tell about the set of all possible closed loop transfer functions G from w to u? A transfer function G is achievable in a stabilized closed loop if and only if it is stable and, for every p i with p i, satisfies the interpolation constraints G(p i ) = 0, Ġ(p i ) = d dz P (z). z=pi Problem 5.3P In general, it is impossible to compute singular numbers of the Hankel operator associated with a given transfer function G H by just looking at the values of G(jω). However, the situation is different when G is all-pass, i.e. G(jω) = for all ω R. Let G be an all-pass CT stable transfer function of order n, or, equivalently, G(s) = s a s + a s a 2 s + a 2... s a n s + a n, where a i > 0 are some positive constants. Assume for simplicity (though the assumption is not really necessary) that a i a k for i k. Let H G denote the Hankel operator associated with G. Since G has order n, the rank of H G equals n as well. (a) Run some numerical experiments with randomly generated a k to formulate a hypothesis on what are the singular numbers of H G. Hypotheses: σ = σ 2 = = σ n =. Sample code (in MATLAB): function ps53(n) if nargin<, n=5; end q=poly(-rand(n,)); p=((-).^(0:n)).*q; h=hsvd(tf(p,q)); close(gcf);bar(h);grid
6 (b) Is it possible for a singular number of H G to be greater than? Explain. Answer: no. Reasoning: the linear transformation L G : L 2 (R) L 2 (R) is defined by L G w = w+g w, where denotes convolution, and g = g(t) be the inverse Fourier transform of G. Naturally, if y = L G w and Y, W are Fourier transforms of w, y respectively then Y = GW. Since G(jω) for all ω, we have Y = W, hence, by the Parceval identity, w(t) 2 dt = 2π W (jω) 2 dω = Y (jω) 2 dω = w(t) 2 dt. 2π Since y h = H G w is defined by zeroing the values of y = L G w at all t < 0, L2 norm of H G w is not larger than that of w. Hence the largest singular number of H G is not larger than. (c) Find some non-zero square integrable functions w(t) which are anticausal (i.e. w(t) = 0 for t 0), and Y (jω) = G(jω)W (jω), where y = H G w, and Y and W are the Fourier transforms of y and w respectively. (Hint: use numbers a i as a guidance.) Answer: w(t) = where c i are arbitrary real coefficients. { n i= c ie a it, t < 0, 0, t 0, Reasoning: Fourier transform W = W (s) of w = w(t) is given by W (s) = n i= c i a i s. Since GW is a strictly proper rational function with no unstable poles, it is an element of H 2, hence L G w = H G w. (d) Use the observation made in (c) to prove the hypothesis formulated in (a). Proof: since H G w w for every w, and H G w = w over a linear subspace U = {w} of dimension n, the first n singular numbers of H G must be equal to.
7 So, does it make much sense to apply model reduction to all-pass transfer functions? Answer: no, or, at least, not with the objective to minimize L2 gain of the error. Reasoning: the best approximation of G by a transfer function Ĝ of order less than n will have L2 gain error G Ĝ of at least σ n (G) =, which is readily achieved by zero approximation Ĝ 0. K(s) e τs P 0 (s) Figure 2: Feedback Setup for Problem 5.4P Problem 5.4P This task calls for the use of approximation and model reduction in designing linear feebdack. To keep things simple, the attention is limited to the objective of feedback stabilization. Consider the feedback setup shown on Figure 2, where P 0 (s) = s s 2 (s 2) is a given plant, τ [0, T ] models the unknown feedback loop delay, T > 0 is a known upper bound for τ, and K is the finite order controller to be designed, to guarantee robust stabilization, understood as finite L2 gain feedback loop stability for all τ [0, T ]. (a) Compute analytically (as a function of τ 0) L2 gain of the LTI system defined by transfer function M τ (s) = e τs. s It is advisable to calculate M τ numerically first (e.g. by sampling the values of M τ on the imaginary axis), to get an idea of what the answer should be.
8 Answer: M τ = τ. Reasoning: the inverse Fourier transform h τ of M τ is given by {, 0θ < τ, h τ (t) = 0, otherwise. Hence M τ (jω) = τ which proves that M τ = τ. (b) Use the decomposition 0 τ e jωt h τ (t)dt h τ (t) dt = τ = M τ (0), e τs P 0 (s) = 0 ( ) s s + M τ(s) s(s 2), together with the result from (a) and the small gain theorem, to claim that a feedback K which is stabilizing for T = 0 achieves robust stabilization for some T > 0. Use H-Infinity optimization with hinfsyn.m to design a third order K which achieves robust stabilization with T as large as possible 2. Conclusion: stabilization guaranteed for T 0.. Figure 3: Design setup for Problem 5.4 Approach: we use design setup from Figure 3, and test setup from Figure 3, both controlled by ps54.m, a slightly modified version of which is shown below: 2 This does not mean finding the absolutely largest T, which is quite difficiult. Just try to do the best possible job using the approach.
9 function K=ps54(T) d=e-3; s=tf( s ); P=(s-)/(s*(s-2)); L=/s; r=t; assignin( base, d,d) % export variables assignin( base, P,P) assignin( base, L,L) p=linmod( ps54des ); % extract open loop p=ss(p.a,p.b,p.c,p.d); K=hinfsyn(p,,); % optimize controller assignin( base, K,K) % export controller p=linmod( ps54test ); % extract closed loop S=ss(p.a,p.b,p.c,p.d); fprintf( [T=%f] stability: %f<0, small gain: %f<%f\n,... T,max(real(eig(p.a))),norm(S,Inf),/r) Figure 4: Test setup for Problem 5.4 (c) The result in (b) was achieved by using the approximation M τ (s) 0, which has L2 gain error M τ. When τ > 0 is known, better designs can be made by finding a higher quality approximation M τ ˆM τ (s), where ˆM τ is a stable rational transfer function, and the error is quantified by M τ ˆM τ. A rather straightforward way of doing this is to start with the rough (inaccurate at high frequencies) approximation ( ) n τs/2n e τs Êτ(s) =, + τs/2n
0 where n is large enough, and to have ˆM τ defined as the reduced model ˆM τ (s) Êτ(s), s of order significantly smaller than n. Apply this approach (with hankelmr.m used for model reduction) to find a good third order approximation ˆM τ of M τ for a given τ > 0. Implementation: the following code (a part of ps54.m) shows the use of hankelmr.m: s=tf( s ); [A,B,C,D]=ssdata(ss((-s*(0.5*T/n))/(+s*(0.5*T/n)))^n); L0=hankelmr(ss(A,B,C/A,0),m); Here L0 is a Hankel optimal reduced model of (Êτ )/s. To avoid using minreal.m on a high order model, a state space of Êτ is formed first, and then we use the fact that if A is an invertible matrix such that ẋ = Ax + Bw, is a state space model for G(s) then ẋ = Ax + Bw, y = Cx + Dw v = CA (Ax + Bw) is a state space model for (G(s) G(0))/s. Since, apparently, hankelmr.m does not have an option for optimizing the D matrix of the reduced model, an alternative code using the old hankmr.m can do better: sys=pck(a,b,c/a,0); [sys,sig]=sysbal(sys); [A,B,C,D]=unpck(hankmr(sys,sig,m, d )); L0=ss(A,B,C,D); Though in general optimization of D can lower model reduction error significantly, in this particular application it only yields a minor improvement. (d) Use the results from (c) to design K of order 6 to achieve feebdack stabilization with a fixed τ which is as large as possible. Conclusion: stabilization is guaranteed for τ 0.36 (with D optimization using hankmr.m) or τ 0.32 (using hankelmr.m). The corresponding code is contained in the full version of ps54.m.