State-Space Realization Equivalent state equations For the system below: 3 -4 2 u(t) x2’ x2 x1’ x1 -4 -3 x’(t) = A x(t) + B u(t) y(t) = C x(t) + D u(t) x1’ = -4x1 + x2 – 4u(t) x2’ = -3x1 + 2u(t) y = x1 + 3u(t) 4 1 B 4 3 0 2 A D ( 3) If we switch the state variables we have: x1’ = x2’ = x1 y = C ( 1 0 ) -3x2 + 2u(t) – 4x2 – 4u(t) x2 + 3u(t) Since the two sets of equations describe the same system, they must be both mathematically equivalent (algebraic equivalence). The following transformation is equivalent if P is a nonsingular matrix and x(t) = P x(t): x' (t ) A x(t ) B u (t ) x ' (t ) A x (t ) B u (t ) y (t ) C x(t ) D u (t ) y (t ) C x (t ) D u (t ) where : A P A P 1 BPB C C P 1 DD y(t) Example: x1’ = - x1 + 6u(t) x2’ = - 3 x2 – 14 u(t) y = 0.5 x1 + 0.5 x2 + 3 u(t) ##: This is a simpler system, but how can we find P 6 – u(t) x1’ 1/2 x1 3 y(t) 3 – 14 – x2’ x2 1/2 Matrix diagonalization (Chapter 3, p. 55): o If the columns of a matrix Q (= P-1) are the eigenvectors of A, the following transformation will result a diagonal matrix. Namely, 1 0 0 2 0 0 1 Q q1 q 2 q 3 ... q n Aˆ Q AQ . . . . 0 0 0 . . 0 . . 3 . . . . . . . . 0 . . 0 0 0 . . n o Q-1A Q is called similarity transformation if Q is formed by a set of basis (text p. 53). o Find the eigenvalues: 4 1 I A 2 4 3 0 3 ( 3)( 1) 0 1 1, 2 3 o Find the eigenvector matrix and perform the transformation: 3 1 q11 3q11 q12 0 q11 1 3 1 q12 3q11 q12 0 q12 3 1 1 q21 q21 q22 0 q21 1 2 I A q2 3 3 q22 3q21 3q22 0 q22 1 1 1 1 0 Q Q 1 AQ 3 1 0 3 1 I A q1 o As a result, a much simpler equivalent can be obtained using the eigenvector matrix. o If the system has repeated eigenvalues, the resulting transformation will have the Jordan form—upper triangular and block diagonal (text p. 59-61). o If the system has complex eigenvalues, the resulting transformation will have imaginary numbers on the diagonal. To avoid imaginary entries another transformation can be performed: 1 0 0 0 0 0 1 1 0 0 2 0 0 0 0 0 j 0 0 j j 0 0 0 j 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 2 0 0 0 j j 0 0 0 0 1 0 0 1 0 0 1 o This is called the modal form of the matrix. o The two transforms can be combined to: P-1 = [q1 Re(q2) Im(q2)] 0 0 All properties of a state equation are preserved under any equivalence transformation. Two state equations are zero-state equivalent if they have the same transfer matrix: D C ( s I A) 1 B D C ( s I A) 1 B Or: DD m m C A BC A B Algebraic equivalence implies zero-state equivalence but the reverse is not necessarily true. Algebraic equivalence requires the state equations to be the same dimension but zerostate equivalence does not. Magnitude scaling: For real circuits we need to consider the maximum signal levels, which are in general limited by the DC supplies. To avoid overdriving the circuits we need an equivalence transformation so that: o |xi(t)| |yi(t)| M where M is the signal limit. o Use the original equation to find the range of the input to achieve |yi(t)| M o The same transformation can also be used to amplify some state variables that are too small to observe. Example 4.5 (p. 99) Realization: To find a state-space equation from a transfer matrix Proper rational functions: g(s) = N(s) / D(s) where N(s) and D(s) are polynomials of s. g(s) is proper if the degree of D(s) is greater than or equal to the degree of N(s). g(s) is strictly proper if the degree of D(s) is greater than the degree of N(s). G(s) is a proper matrix if every entry of G(s) is proper or if G() is a zero or constant matrix. It is a strictly proper matrix if every entry of G(s) is strictly proper or if G() is a zero matrix. A transfer matrix G(s) is realizable if it is a proper rational matrix. Controllable canonical form realization: o For a transfer matrix G(s) with order (q p), decompose it into a constant matrix G() = D and a strictly proper matrix Gsp(s): G(s) = G() + Gsp(s) Example: q = p = 2 2s 3 2s 3 2 2 s 1 ( s 1)( s 2) 0 0 s 1 ( s 1)( s 2) G ( s) s 2 s 2 1 1 3 s 1 s 1 s2 s2 o Find the d(s) = LCD of Gsp(s) and make sure that d(s) is a monic polynomial (leading coefficient = 1): d(s) = sr + 1sr-1 + … + r-1s + r Example: d(s) = (s + 1) (s + 2) = s2 + 3s + 2 1= 3, 2= 2, and r = 2. o Factor the LCD: Gsp(s) = [1/ d(s)] [N1sr-1 + N2sr-2 + … + Nr-1s + Nr] Example: 2 2s 3 2 4 3 2s 4 1 1 Gsp ( s ) 2 s s 3s 2 3s 6 2 s 2 s 2 3s 2 3 2 6 2 2 2 4 3 N1 and N 2 3 2 6 2 o The state matrices are: 1 I P 2 I P . . r 1 I P I 0 . . 0 P 0 IP . . 0 A . . . . . . . . . . 0 . . IP 0 C N1 Example: 3 0 A 1 0 N2 Nr , . . N r 1 0 2 0 3 0 2 , 0 0 0 1 0 0 r I P 0 0 , . . 0 D G ( ) 1 0 B 0 0 0 1 0 0 2 4 3 2 0 0 C , D 3 2 6 2 1 1 o Special case: p = 1 For r = 4 and q = 2. d1 1 G(s) 4 3 2 d 2 s 1 s 2 s 3 s 4 1 1 A 0 0 C 11 21 2 3 0 1 0 0 0 1 12 22 13 23 4 0 , 0 0 14 , 24 I P 0 0 B . . 0 11s 3 12 s 2 13 s 14 3 2 21s 22 s 23 s 24 1 0 B 0 0 d1 D d 2 Example: q = 2, p = 1, and r = 1 o Realization by columns: Realize each column using the above steps and combine the columns to form a complete realization. Example: From previous example: 2s 3 2 s 1 ( s 1)( s 2) G (s) s s 2 s2 s 1 First column: 2 s 1 0 1 2 s 2 3 1 1, 11 2, 21 3 1 s 1 s 1 11 2 d1 0 A1 [1] [1], B1 [1], C1 , D1 21 3 d 2 1 Second column: 2s 3 ( s 1)( s 2) 0 2s 3 1 2 s 1 s 3s 2 2 s 2 s2 1 3, 2 2, 11 2, 12 3, 21 2, 22 2 1 2 3 2 1 A2 , B 2 , 0 1 0 1 0 11 12 2 3 d 1 0 C2 , D2 21 22 2 2 d 2 1 Combine the columns: (Simpler realization) 0 1 0 1 0 2 3 2 0 0 A 0 3 2, B 0 1, C , D 3 2 2 1 1 0 0 0 1 0 Observable canonical form realization: o For a transfer matrix G(s) with order (q p), decompose it into a constant matrix G() = D and a strictly proper matrix Gsp(s): G(s) = G() + Gsp(s) Example: q = p = 2 2s 3 2s 3 2 2 s 1 ( s 1)( s 2) 0 0 s 1 ( s 1)( s 2) G ( s) s 2 s 2 1 1 3 s2 s2 s 1 s 1 o Find the d(s) = LCD of Gsp(s)and make sure that d(s) is a monic polynomial (leading coefficient = 1): d(s) = sr + 1sr-1 + … + r-1s + r Example: d(s) = (s + 1) (s + 2) = s2 + 3s + 2 1= 3, 2= 2, and r = 2. o Gsp(s) = [1/ d(s)] [N1sr-1 + N2sr-2 + … + Nr-1s + Nr] Example: 2 2s 3 2 4 3 2s 4 1 1 Gsp ( s ) 2 2 s s 3s 2 3s 6 2 s 2 s 3s 2 3 2 6 2 2 2 4 3 N1 and N 2 3 2 6 2 The state matrices are: Iq 0 . . 0 1 I q N1 I N 0 I q. . . 0 2 q 2 . . . . . . . A B , . . . . . . . r 1 I q 0 N r 1 0 . . Iq 0 0 . . 0 N r r I q C Iq 0 . . 0 0 , D G ( ) Example: 3 0 A 2 0 0 3 0 2 1 0 0 0 0 1 , 0 0 2 2 3 2 B 4 3 6 2 1 0 0 0 0 0 C , D 0 1 0 0 1 1 o Special case: q = 1 For r = 4 and p = 2. G ( s ) d1 d 2 1 11s 3 21s 2 31s 41 4 3 2 s 1 s 2 s 3 s 4 1 A 2 3 4 1 0 0 0 0 1 0 0 0 0 , 1 0 11 B 21 31 41 12 s 3 22 s 2 32 s 42 12 22 32 42 C 1 0 0 0 , D d1 d 2 Example: q = 1, p = 2, and r = 1 o Realization by rows: Realize each row using the above steps and combine the columns to form a complete realization. Example: From previous example: 2s 3 2 s 1 ( s 1)( s 2) G (s) s s 2 s2 s 1 First row: 2 2s 3 1 s 1 ( s 1)( s 2) s 2 3s 2 2s 4 2s 3 1 3, 2 2, 11 2, 21 4 12 2, 22 3 1 1 3 1 11 12 2 2 A1 , B1 , 2 0 2 0 21 22 4 3 C1 1 0, D1 0 0 Second row: s 1 s 2 s 1 s 2 1 1 s 2 3s 2 3s 6 2 s 2 1 3, 2 2, 11 3, 21 6, 12 2, 22 2 1 1 3 1 11 12 3 2 A2 , B2 2 0 2 0 21 22 6 2 C 2 1 0, D 2 d1 d 2 1 1 o Combine the rows: (Simpler realization) 2 3 1 0 0 2 2 0 0 0 4 3 , B , C 1 0 0 0, D 0 0 A 0 0 1 0 1 1 0 0 3 1 3 2 0 0 2 0 6 2 MatLab Tutorials: http://www.engin.umich.edu/group/ctm/ Please print out the following two parts: 1) Matlab basic tutorial 2) State space tutorial