Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6245: MULTIVARIABLE CONTROL SYSTEMS by A Megretski Problem Set 4 Solutions Problem 4T For the following transfer matrices G, find co-prime factorization G = D N, the natural state space for the associated transfer matrix model, and the corresponding natural state space model (a) discrete time transfer matrix G(z) = [ z z z z Answer: one possible co-prime factorization G = D N is given by [ z [ D(z) = z, N(z) = z z The corresponding canonical state space X H2(T) 2 consists of all constant functions [ a x(z), a R, with update/output equations [ x + = x + Version of December 9, 2 [ w, y = x( ),
2 which is equivalent to a(t + ) = a(t) + [ w(t), y(t) = [ a(t) Reasoning: the identity DG = N can be verified by a direct multiplication To see that the factorization G = D N is co-prime, ie that there exists ɛ > such that D(z) D(z) + N(z) N(z) ɛi z D + = {z C : z > }, note that D(z) is continuous on D + { }, and not singular for all z D + { } except z =, at which point D(z) D(z) + N(z) N(z) = D() D() + N() N() = 2I > Note that there is no co-prime factorization with D(z) = ( /z)i (the easy choice) because this would yield a double pole of D N at z = The canonical state space X for G is the subset of all functions V H 2 2(T) which can be approximated arbitrarily well by functions V H 2 2(T) of the form V = NW DY, where W, Y are Fourier transforms of square summable sequences w, y : Z R 2 such that w (t) = and y (t) = for t Using the fact that zn(z) and zd(z) are polynomials in z while comparing the coefficients at the z-expansions in the equality V = NW DY, one can see that V has to be a constant function of the form [ a V (z) = lim z{n(z)w (z) D(z)Y (z)} z To see that a can be an arbitrary real number, use [ [ az W (z) =, Y (z) = The update/output laws for the canonical state x(t) H 2 2(T) defined by x(t)(z) = z t [N(z) W t (z) D(z)Ỹt(z) + x()(z), where t t W t (z) = w(τ)z τ, Y t (z) = y(τ)z τ, τ= τ=
3 are given by where Substituting x + (t)(z) = z[x(t)(z) D(z)y(t) + N(z)w(t), x(t)(z) y(t) = D( ) [x(t)( ) + N( )w(t) [ a(t) [, D( ) =, N( ) = yields the answer (b) continuous time transfer matrix [ /s /s G(s) = /s /s Answer: one possible co-prime factorization G = D N is given by [ s [ D(s) = s+, N(s) = s+ s+ The corresponding canonical state space X H2(jR) 2 consists of all functions [ a x(s) s+, a R, with update/output equations dx(t)(s) dt = [ [ w(t), y(t) = 2x(t)(), which is equivalent to ȧ(t) = [ w(t), y(t) = [ a(t) Reasoning: the identity DG = N can be verified by a direct multiplication To see that the factorization G = D N is co-prime, ie that there exists ɛ > such that D(s) D(s) + N(s) N(s) ɛi s C + = {s C : Re{s} > },
4 note that D(s) is continuous on C + { }, and not singular for all s C + { } except s =, at which point D(s) D(s) + N(s) N(s) = D() D() + N() N() = 2I > Note that there is no co-prime factorization with D(s) = because this would yield a double pole of D N at s = s I (the easy choice) s+ The canonical state space X for G is the subset of all functions V H 2 2(jR) which can be approximated arbitrarily well by functions V H 2 2(jR) of the form V = NW DY, where W, Y are Fourier transforms of square integrable functions w, y : R R 2 such that w (t) = and y (t) = for t Using the fact that (s+)n(s) and (s+)d(s) are polynomials in s while comparing the inverse Fourier transforms of both sides of V = NW DY, one can see that V has to be a rational function of the form V (s) = [ a s+ To see that a can be an arbitrary real number, use [ 2a [ W (s) = s, Y (s) = The canonical state x(t) H 2 2(jR) is defined by where Substitution x(t)(s) = e ts [N(s)W t (s) D(s)Y t (s) + x()(s), W t (s) = t e τs w(τ)dτ, Y t (s) = x(t)(s) = [ a(t) s+, t e τs y(τ)dτ followed by differentiation with respect to t yields [ [ ȧ(t)/(s + ) a(t)/(s + ) = s + N(s)w(t) D(s)y(t), which is equivalent to the state space equations given above
5 r e K(s) u P (s) v Figure : Design objectives of Problem 2 Problem 42P Consider the feedback design setup from Figure Let us define closed loop bandwidth of the feedback system as the largest ω > such that S(jω) for all ω [, ω, where S = + P K is the closed loop sensitivity function (in this definition, the threshold is a bit arbitrary) It is frequently claimed that location of unstable zeros of P limits the maximal achievable closed loop bandwidth While mathematically this is not exactly true, the only way to achieve a substantially larger bandwidth is by making S(jω) extremely large at other frequencies You are asked to verify this for P (s) = s a s(s + 2a), where a > is a real parameter (determining location of the open loop zero), using hinfsynm to estimate the maximal bandwidth achievable by a stabilizing LTI controller K = K(s) of order not larger than 5, satisfying the closed loop sensitivity magnitude bound S(jω) < 2 at all frequencies ω, as a function of a Generate a plot of your estimate, as a function of a > Hint: write an algorithm which attempts to achieve a given closed loop bandwidth, using pre-designed low-pass filter, like the Butterworth filter, to incorporate the bandwidth constraint into H-Infinity optimization Once this is accomplished, use binary search to find (approximately) the maximal bandwidth
6 Conclusion: maximal achievable closed loop bandwidth grows linearly with a, at a rate of at least 43a The rate can be made slightly larger at the expense of using much higher controller gains See the plot on Figure 2 Approach: since Figure 2: Bandwidth vs a for Problem 42 ap (as) = P (s) = s s(s + 2) for every a >, controller K (s) stabilizes P and achieves bandwidth ab if and only if controller K (s) = K (as)/a stabilizes P and achieves bandwidth b Hence it is sufficient to find the best achievable bandwidth for a = Figure 3: Open loop model for Problem 42
7 We use SIMULINK models ps42desmdl (see Figure 3) and ps42testmdl (see Figure 4) to define, respectively, the open and closed loop systems It introduces two distur- Figure 4: Closed loop model for Problem 42 bance inputs w, w 2 and three cost outputs e, e 2, e 3 : w is the main input (reference/sensor noise); w 2 is artificial small disturbance, to prevent sensor singularity due to the imaginary axis pole of P ; e enforces the closed loop sensitivity bound S 2, frovided the overall closed loop L2 gain in not larger than ; e 2 is defined using a low-pass filter W such that W (jω) for ω b, where b is the desired closed loop bandwidth, and therefore enforces the bandwidth constraint frovided the overall closed loop L2 gain in not larger than ; e 3 is artificial small cost to prevent control singularity due to the fact that P is strictly proper MATLAB function ps42m controls design optimization and testing The essential part of its code is shown below: function [K,S=ps42(a,b,d) s=tf( s ); % useful constant P=(s-a)/(s*(s+2*a)); % the plant [A,B,C,D=butter(3,b, s ); % Butterworth filter W=ss(A,B,C,D); W=(/abs(squeeze(freqresp(W,i*b))))*W; assignin( base, d,d) % export variables assignin( base, P,P) assignin( base, W,W) p=linmod( ps42des ); % extract open loop
8 p=ss(pa,pb,pc,pd); [K,G=hinfsyn(p,,); % optimize controller fprintf( success flag for w=%f: %f<\n,b,norm(g,inf)) assignin( base, K,K) % export controller S=linmod( ps42test ); % extract closed loop fprintf( max(real(eig(a)))=%f\n,max(real(eig(sa)))) S=ss(Sa,Sb,Sc,Sd); fprintf( norm(s,inf)=%f\n,norm(s,inf)) ww=logspace(-2,5,); Sw=abs(squeeze(freqresp(S,i*ww))); k=find(sw>,); % find actual bandwidth w=ww(k-); fprintf( actual bandwidth: %f (vs %f)\n,w,b) At a =, b = 43, d = the code generates a stabilizing controller K of order 5 which yields closed loop bandwidth of slightly more than 43 Logarithmic plots of the closed loop sensitivity function and controller are provided on Figure 5 Problem 43P Continuous time scalar signal q = q(t) models the (one dimensional) position of an oscillator driven by random forces in the absence of friction, according to q(t) + ω 2 q(t) = f (t), where f is a noise signal, and ω > is a parameter The result g(t) of measuring q(t) in real time is modeled according to g(t) = q(t) + f 2 (t), where f 2 is another noise signal Assuming that f = [f ; f 2 is a normalized vector-valued white noise, use h2synm to find an LTI system (a filter ) which takes g = g(t) as an input and outputs an estimate ˆq = ˆq(t) of q = q(t), minimizing the steady state value J = lim t E[ e(t) 2 of the variance of the estimation error e = q ˆq Plot the minimal J as the function of ω > Hint: the system, as described, is not stabilizable (there is no provision for a feedback loop from g back to f ) Therefore, before applying h2synm, one has to massage the setup into a stabilizable format One
9 Figure 5: Closed loop Bode plots for Problem 42 way to do this is by starting with a particular filter F producing an estimate ˆq which achieves J <, and then using h2synm to design an LTI filter which takes g ˆq as measurement, and outputs the optimal estimate ˆδ of δ = q ˆq, so that ˆq = ˆq + ˆδ is the optimal estimate of q Conclusion: the minimal mean square estimation error decreases with as ω increases, as shown on Figure 6 The design uses H2 optimization according to the setup shown on Figure 7, where W (s) =, L(s) = s 2 + ω 2 s 2 + ω 2 s 2 + ω 2 + L s + L 2, F (s) = L s + L 2 s 2 + ω 2 + L s + L 2,
Figure 6: Minimal mean square estimation error in Problem 43 where L > and L 2 + ω > Here W represents the original oscillator, F is the classical output estimator for W, and L specifies the mandatory zeros of F Figure 7: Design setup for Problem 43 Indeed, for a state space model for W, eg ẋ = x 2, ẋ 2 = ωx 2 + f, y = x + f 2,
the classical observer for q = x is ˆx = ˆx 2 + L (y ˆx ), ˆx 2 = ωx 2 + L 2 (y ˆx ), ˆq = ˆx, which has transfer function F (from y to ˆq) Also, an estimator F achieves a finite mean square error if and only if both F and W F belong to class H 2, which is equivalent to F having representation of the form F = F + L for some H 2, which justifies the use of the setup from Figure 7 This SIMULINK diagram, as well as the testing model Figure 8: Test setup for Problem 43 shown on Figure 8, are controlled by MATLAB code ps43m, the essential parts of which are shown below: function [J,F=ps43(w,L) s=tf( s ); % useful constant F=(s*L()+L(2))/(s^2+w^2+s*L()+L(2)); W=/(s^2+w^2); L=(s^2+w^2)/(s+w+)^2; assignin( base, F,F) % export variables assignin( base, W,W) assignin( base, L,L) p=linmod( ps43des ); % extract open loop p=minreal(ss(pa,pb,pc,pd)); % remove uncontrollable modes K=h2syn(p,,); % optimize F=minreal(F+K*L); % complete filter assignin( base, F,F) % export variables p=linmod( ps43test ); % extract error system G=minreal(ss(pa,pb,pc,pd)); % remove uncontrollable modes J=norm(G)^2;