Topic #8 16.31 Feedback Control State-Space Systems ? What are state-space models? ? Why should we use them? ? How are they related to the transfer functions used in classical control design and how do we develop a state- space model? ? What are the basic properties of a state-space model, and how do we analyze these? Copyright 2001 by Jonathan How. Fall 2001 16.31 8–1 TF’s to State-Space Models ? The goal is to develop a state-space model given a transfer function for a system G(s). – There are many, many ways to do this. ? But there are three primary cases to consider: 1. Simple numerator y u = G(s)= 1 s 3 + a 1 s 2 + a 2 s + a 3 2. Numerator order less than denominator order y u = G(s)= b 1 s 2 + b 2 s + b 3 s 3 + a 1 s 2 + a 2 s + a 3 = N(s) D(s) 3. Numerator equal to denominator order y u = G(s)= b 0 s 3 + b 1 s 2 + b 2 s + b 3 s 3 + a 1 s 2 + a 2 s + a 3 ? These 3 cover all cases of interest Fall 2001 16.31 8–2 ? Consider case 1 (specific example of third order, but the extension to n th follows easily) y u = G(s)= 1 s 3 + a 1 s 2 + a 2 s + a 3 can be rewritten as the di?erential equation y (3) + a 1 ¨y + a 2 ˙y + a 3 y = u choose the output y and its derivatives as the state vector x = ? ? ¨y ˙y y ? ? then the state equations are ˙x = ? ? y (3) ¨y ˙y ? ? = ? ? ?a 1 ?a 2 ?a 3 100 010 ? ? ? ? ¨y ˙y y ? ? + ? ? 1 0 0 ? ? u y = bracketleftbig 001 bracketrightbig ? ? ¨y ˙y y ? ? +[0]u ? This is typically called the controller form for reasons that will become obvious later on. – There are four classic (called canonical) forms – oberver, con- troller, controllability, and observability. They are all useful in their own way. Fall 2001 16.31 8–3 ? Consider case 2 y u = G(s)= b 1 s 2 + b 2 s + b 3 s 3 + a 1 s 2 + a 2 s + a 3 = N(s) D(s) ? Let y u = y v · v u where y/v = N(s)andv/u =1/D(s) ? Then the representation of v/u =1/D(s)isthesameascase 1 v (3) + a 1 ¨v + a 2 ˙v + a 3 v = u use the state vector x = ? ? ¨v ˙v v ? ? to get ˙x = A 2 x + B 2 u where A 2 = ? ? ?a 1 ?a 2 ?a 3 100 010 ? ? and B 2 = ? ? 1 0 0 ? ? ? Then consider y/v = N(s), which implies that y = b 1 ¨v + b 2 ˙v + b 3 v = bracketleftbig b 1 b 2 b 3 bracketrightbig ? ? ¨v ˙v v ? ? = C 2 x +[0]u Fall 2001 16.31 8–4 ? Consider case 3 with y u = G(s)= b 0 s 3 + b 1 s 2 + b 2 s + b 3 s 3 + a 1 s 2 + a 2 s + a 3 = β 1 s 2 + β 2 s + β 3 s 3 + a 1 s 2 + a 2 s + a 3 + D = G 1 (s)+D where D( s 3 +a 1 s 2 +a 2 s +a 3 ) +( +β 1 s 2 +β 2 s +β 3 ) = b 0 s 3 +b 1 s 2 +b 2 s +b 3 so that, given the b i , we can easily find the β i D = b 0 β 1 = b 1 ? Da 1 . . . ? Given the β i ,canfindG 1 (s) – Can make a state-space model for G 1 (s) as described in case 2 ? Then we just add the “feed-through” term Du to the output equa- tion from the model for G 1 (s) ? Will see that there is a lot of freedom in making a state-space model because we are free to pick the x as we want Fall 2001 16.31 8–5 Modal Form ? One particular useful canonical form is called the Modal Form – It is a diagonal representation of the state-space model. ? Assume for now that the transfer function has distinct real poles p i (but this easily extends to the case with complex poles) G(s)= N(s) D(s) = N(s) (s ? p 1 )(s ? p 2 )···(s ? p n ) = r 1 s ? p 1 + r 2 s ? p 2 + ···+ r n s ? p n ? Now define a collection of first order systems, each with state x i X 1 U(s) = r 1 s ? p 1 ? ˙x 1 = p 1 x 1 + r 1 u X 2 U(s) = r 2 s ? p 2 ? ˙x 2 = p 2 x 2 + r 2 u . . . X n U(s) = r n s ? p n ? ˙x n = p n x n + r n u ? Which can be written as ˙x(t)=Ax(t)+Bu(t) y(t)=Cx(t)+Du(t) with A = ? ? p 1 . . . p n ? ? B = ? ? r 1 . . . r n ? ? C = ? ? 1 . . . 1 ? ? T ? Good representation to use for numerical robustness reasons. Fall 2001 16.31 8–6 State-Space Models to TF’s ? Given the Linear Time-Invariant (LTI) state dynamics ˙x(t)=Ax(t)+Bu(t) y(t)=Cx(t)+Du(t) what is the corresponding transfer function? ? Start by taking the Laplace Transform of these equations L{˙x(t)=Ax(t)+Bu(t)} sX(s) ? x(0 ? )=AX(s)+BU(s) L{y(t)=Cx(t)+Du(t)} Y (s)=CX(s)+DU(s) which gives (sI ? A)X(s)=BU(s)+x(0 ? ) ? X(s)=(sI ? A) ?1 BU(s)+(sI ? A) ?1 x(0 ? ) and Y (s)= bracketleftbig C(sI ? A) ?1 B + D bracketrightbig U(s)+C(sI ? A) ?1 x(0 ? ) ? By definition G(s)=C(sI ? A) ?1 B + D is called the Transfer Function of the system. ? And C(sI ? A) ?1 x(0 ? ) is the initial condition response. It is part of the response, but not part of the transfer function. Fall 2001 16.31 8–7 State-Space Transformations ? State space representations are not unique because we have a lot of freedom in choosing the state vector. – Selection of the state is quite arbitrary, and not that important. ? In fact, given one model, we can transform it to another model that is equivalent in terms of its input-output properties. ? To see this, define Model 1 of G(s)as ˙x(t)=Ax(t)+Bu(t) y(t)=Cx(t)+Du(t) ? Now introduce the new state vector z related to the first state x through the transformation x = Tz – T is an invertible (similarity) transform matrix ˙z = T ?1 ˙x = T ?1 (Ax + Bu) = T ?1 (ATz + Bu) =(T ?1 AT)z + T ?1 Bu = ˉ Az + ˉ Bu and y = Cx+ Du = CTz + Du = ˉ Cz + ˉ Du ? So the new model is ˙z = ˉ Az + ˉ Bu y = ˉ Cz + ˉ Du ? Are these going to give the same transfer function? They must if these really are equivalent models. Fall 2001 16.31 8–8 ? Consider the two transfer functions: G 1 (s)=C(sI ? A) ?1 B + D G 2 (s)= ˉ C(sI ? ˉ A) ?1 ˉ B + ˉ D Does G 1 (s) ≡ G 2 (s)? G 1 (s)=C(sI ? A) ?1 B + D = C(TT ?1 )(sI ? A) ?1 (TT ?1 )B + D =(CT) bracketleftbig T ?1 (sI ? A) ?1 T bracketrightbig (T ?1 B)+ ˉ D =( ˉ C) bracketleftbig T ?1 (sI ? A)T bracketrightbig ?1 ( ˉ B)+ ˉ D = ˉ C(sI ? ˉ A) ?1 ˉ B + ˉ D = G 2 (s) ? So the transfer function is not changed by putting the state-space model through a similarity transformation. ? Note that in the transfer function G(s)= b 1 s 2 + b 2 s + b 3 s 3 + a 1 s 2 + a 2 s + a 3 we have 6 parameters to choose ? But in the related state-space model, we have A?3×3, B?3×1, C ? 1 × 3 for a total of 15 parameters. ? Is there a contradiction here because we have more degrees of free- dom in the state-space model? – No. In choosing a representation of the model, we are e?ectively choosing a T,whichisalso3× 3, and thus has the remaining 9 degrees of freedom in the state-space model.