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
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 statespace 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.318-1 TFs 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=G(s)= s3+a152+a28+a 2. Numerator order less than denominator order y=G(s) b1s2+b2+b3 3+a152+02S+a3 3. Numerator equal to denominator order bos+618+b28+b s3+a1s2+a28+a3 These 3 cover all cases of interest
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 s3 + a1s2 + a2s + a3 2. Numerator order less than denominator order y u = G(s) = b1s2 + b2s + b3 s3 + a1s2 + a2s + a3 = N(s) D(s) 3. Numerator equal to denominator order y u = G(s) = b0s3 + b1s2 + b2s + b3 s3 + a1s2 + a2s + a3 • These 3 cover all cases of interest
Fall 2001 16.318-2 Consider case 1 (specific example of third order, but the extension to nth follows easily) + a1s+ a2s+ a can be rewritten as the differential equation 98)+a1i+023+a33=u choose the output y and its derivatives as the state vector 0.9y then the state equations are 1 100 +0 010 =[0011y+ 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–2 • Consider case 1 (specific example of third order, but the extension to nth follows easily) y u = G(s) = 1 s3 + a1s2 + a2s + a3 can be rewritten as the differential equation y(3) + a1y¨ + a2y˙ + a3y = 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˙ = −a1 −a2 −a3 100 010 y¨ y˙ y + 1 0 0 u y = 001 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, controller, controllability, and observability. They are all useful in their own way
Fall 2001 16.318-3 ● Consider case2 y=Gs=+a182+028+0a3D(s 618+b2s+b3 yy u 0 u where y/v=Ns) and v/u=1/D(s) Then the representation of o/=1/D(s) is the same as case 1 a10+a20+a use the state vector U to get A C+ Bu where a1-a2-a3 100andB2=0 010 Then consider y/v=N(s), which implies that b1i+620+b30 [b1 b2 b3 U C2x+[0
Fall 2001 16.31 8–3 • Consider case 2 y u = G(s) = b1s2 + b2s + b3 s3 + a1s2 + a2s + a3 = N(s) D(s) • Let y u = y v · v u where y/v = N(s) and v/u = 1/D(s) • Then the representation of v/u = 1/D(s) is the same as case 1 v(3) + a1v¨ + a2v˙ + a3v = u use the state vector x = v¨ v˙ v to get x˙ = A2x + B2u where A2 = −a1 −a2 −a3 100 010 and B2 = 1 0 0 • Then consider y/v = N(s), which implies that y = b1v¨ + b2v˙ + b3v = b1 b2 b3 v¨ v˙ v = C2x + [0]u
Fall 2001 16.318-4 ● Consider case3with y bos+0182+628+b3 a152+a28+a3 1s2+2s+/3 +D C15 Gi()+D where (s3+a1s2+a2s+a3) +(+/1s2+B2s+3) bos+0182+b2S +63 so that, given the bi, we can easily find the Bi D 61=01-Dar Given the Bi, can find G1(s) Can make a state-space model for G1(s)as described in case 2 Then we just add the"feed-through"term Du to the output equa tion from the model for Gi(s) e 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–4 • Consider case 3 with y u = G(s) = b0s3 + b1s2 + b2s + b3 s3 + a1s2 + a2s + a3 = β1s2 + β2s + β3 s3 + a1s2 + a2s + a3 + D = G1(s) + D where D( s3 +a1s2 +a2s +a3 ) +( +β1s2 +β2s +β3 ) = b0s3 +b1s2 +b2s +b3 so that, given the bi, we can easily find the βi D = b0 β1 = b1 − Da1 . . . • Given the βi, can find G1(s) – Can make a state-space model for G1(s) as described in case 2 • Then we just add the “feed-through” term Du to the output equation from the model for G1(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.318-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 pi (but this easily extends to the case with complex poles (s)(s-p1)(s-p2)…(s-p P2 Now define a collection of first order systems, each with state i →1=P11+71 S- P1 X 2 p2℃2+T2 U(s P2 X n Cntrl . Which can be written as )=A(t)+Bu( (t)= car(t)+ du( th 4 B Good representation to use for numerical robustness reasons
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 pi (but this easily extends to the case with complex poles) G(s) = N(s) D(s) = N(s) (s − p1)(s − p2)···(s − pn) = r1 s − p1 + r2 s − p2 + ··· + rn s − pn • Now define a collection of first order systems, each with state xi X1 U(s) = r1 s − p1 ⇒ x˙ 1 = p1x1 + r1u X2 U(s) = r2 s − p2 ⇒ x˙ 2 = p2x2 + r2u . . . Xn U(s) = rn s − pn ⇒ x˙ n = pnxn + rnu • Which can be written as x˙(t) = Ax(t) + Bu(t) y(t) = Cx(t) + Du(t) with A = p1 ... pn B = r1 . . . rn C = 1 . . . 1 T • Good representation to use for numerical robustness reasons
Fall 2001 16.318-6 State-Space Models to TFs Given the Linear Time-Invariant(LTI)state dynamics A r(t)+ Bu(t y t)= Ca(t)+ Du(t what is the corresponding transfer function? Start by taking the Laplace Transform of these equations Ci(t)=Ac(t)+Bu()h sX(s-T(0)=AX(s+BU(s) Cly(t)= C(t)+ Du(t) (s)=CX(s+DU( (sI-A)X(S)=BU(s)+c(0) (s)=(s-A)-BU(s)+(sI-A)-x(0-) and Y(s)=C(sI-A)-B+DU(s)+C(sI-A)-x(O By definition G(s)=C(sI- A)B+D is called the Transfer Function of the system And C(sI -A)-c0-)is the initial condition response. It is part of the response, but not part of the transfer function
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) = C(sI − A) −1 B + D U(s) + C(sI − A) −1 x(0−) • By definition G(s) = C(sI − A) −1B + D is called the Transfer Function of the system. • And C(sI − A) −1x(0−) is the initial condition response. It is part of the response, but not part of the transfer function
Fall 2001 16.318-7 State-Space Transformations e 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 i(t)=A.c(t)+ Bu(t y t)= Ca(t)+ Du(t) . Now introduce the new state vector 2 related to the first state a through the transformation m=Tz Tis an invertible(similarity)transform matrix T-(AT+ Bu T-(ATz+ Bu (T-AT)z+T-Bu= Az+ Bu an y=Ca+Du=CTz+ Du=Cz+ Du ● So the new model is Az+B +D Are these going to give the same transfer function? They must if these really are equivalent models
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 = T z – T is an invertible (similarity) transform matrix z˙ = T −1 x˙ = T −1 (Ax + Bu) = T −1 (AT z + 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.318-8 . Consider the two transfer functions GI s)=C(sI-A)B+D G2(s)=C(sI-A)B+D Does g1(s)≡G2(s)? GI(s=C(sI-A)B+D C(TT(SI-A)(TT-B+D (C(s-A)-7(T-B)+D A)T(B)+ C(sI-A)B+D=G2(s) So the transfer function is not changed by putting the state-space model through a similarity transformation . Note that in the transfer function 618+628+63 G + a2s+ we have 6 parameters to choose · But in the related state- space model, we have A-3×3,B-3×1, C-1x3 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 effectively choosing a t. which is also 3 x3 and thus has the remaining 9 degrees of freedom in the state-spa
Fall 2001 16.31 8–8 • Consider the two transfer functions: G1(s) = C(sI − A) −1 B + D G2(s) = C¯(sI − A¯) −1 B¯ + D¯ Does G1(s) ≡ G2(s) ? G1(s) = C(sI − A) −1 B + D = C(T T −1 )(sI − A) −1 (T T −1 )B + D = (CT) T −1 (sI − A) −1 T (T −1 B) + D¯ = (C¯) T −1 (sI − A)T −1 (B¯) + D¯ = C¯(sI − A¯) −1 B¯ + D¯ = G2(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) = b1s2 + b2s + b3 s3 + a1s2 + a2s + a3 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 freedom in the state-space model? – No. In choosing a representation of the model, we are effectively choosing a T, which is also 3 × 3, and thus has the remaining 9 degrees of freedom in the state-space model