Lecture – 9 Conversion Between State Space and Transfer Function Representations in Linear Systems – I Dr. Radhakant Padhi Asst. Professor Dept. of Aerospace Engineering Indian Institute of Science - Bangalore State Space Representation (noise free linear systems) z z State Space form X = AX + BU A B - System matrix- n x n Y = CX + DU C - Output matrix- p x n D - Feed forward matrix – p x m Transfer Function form - Input matrix- n x m Q: Is conversion between the two forms possible? A: Yes. ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 2 Deriving Transfer Function Model From Linear State Space Model z Known: X = AX + BU Y = CX + DU z Taking Laplace transform (with zero initial conditions) sX ( s ) = AX ( s ) + BU ( s ) Y ( s ) = CX ( s ) + DU ( s ) ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 3 Deriving Transfer functions from State Space Description z The state equation can be placed in the form ( sI − A) X ( s ) = BU ( s ) z Pre-multiplying both sides by ( sI − A) −1 −1 X ( s ) = ( sI − A) BU ( s ) z Substituting for X (s) in the output equation, Y ( s ) = ⎡⎣C ( sI − A) B + D ⎤⎦ U ( s ) −1 Transfer Function Matrix T ( s ) ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 4 Example z State space model ⎡ x1 ⎤ ⎡ 0 1 ⎤ ⎡ x1 ⎤ ⎡0 ⎤ ⎢ x ⎥ = ⎢ −2 −3⎥ ⎢ x ⎥ + ⎢1 ⎥ u ⎣ 2 ⎦ ⎣ ⎦ ⎣ 2 ⎦ ⎣N⎦ A B ⎡ x1 ⎤ y = [1 0] ⎢ ⎥ + [ 0] u N ⎣ x2 ⎦ N C D z Using the expression for derived transfer function Y (s) 1 1 = 2 = U ( s ) s + 3s + 2 ( s + 1)( s + 2) ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 5 Example: Detail Algebra T ( s ) = C ( sI − A ) B + D −1 −1 ⎛ ⎡ s 0 ⎤ ⎡ 0 1 ⎤ ⎞ ⎡0 ⎤ = [1 0] ⎜ ⎢ −⎢ ⎟ ⎢ ⎥ + [ 0] ⎥ ⎥ ⎝ ⎣0 s ⎦ ⎣ −2 −3⎦ ⎠ ⎣1 ⎦ −1 ⎡ s −1 ⎤ ⎡0 ⎤ = [1 0] ⎢ ⎥ ⎢1 ⎥ + 2 3 s ⎣ ⎦ ⎣ ⎦ ⎛ ⎞ ⎡ s + 3 1⎤ ⎡0 ⎤ 1 = [1 0] ⎜⎜ ⎟⎟ ⎢ ⎥ ⎢1 ⎥ − 2 s + + s s 3 2 ( ) ⎦⎣ ⎦ ⎝ ⎠⎣ ⎡1⎤ 1 1 = 2 = 1 0 [ ]⎢ ⎥ 2 s + 3s + 2 ⎣ s ⎦ s + 3s + 2 ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 6 Deriving State Space Model From Transfer Function Model z The process of converting transfer function to state space form is NOT unique. There are various “realizations” possible. z All realizations are “equivalent” (i.e. properties do not change). However, one representation may have some advantages over others for a particular task. z Possible representations: • • • • First companion form (controllable canonical form) Jordan canonical form Alternate first companion form (Toeplitz first companion form) Second companion form (observable canonical form) ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 7 First Companion Form: SISO Case (Controllable canonical form) ⎤ y(s) ⎡ 1 = ⎢ n H (s) = ⎥ n −1 + " + a n −1 s + a n ⎦ u ( s ) ⎣ s + a1 s y (n ) + a1 y ( n −1) + " + a n − 1 y + a n y = u dny d n −1 y + a1 + n n −1 dt dt " + an y = u ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 8 First Companion Form: SISO Case (Controllable canonical form) Choose output y(t ) and its (n − 1) derivatives as ⎡ x1 = y ⎤ ⎢ ⎥ dy ⎢ x2 = ⎥ dt ⎥ ⎢ ⎢ ⎥ # ⎢ ⎥ d n −1 y ⎥ ⎢ ⎢⎣ xn = dt n −1 ⎥⎦ dy ⎤ ⎡ ⎢ x1 = dt ⎥ ⎢ ⎥ 2 ⎢ x = d y ⎥ ⎯⎯→ differentiating ⎯⎯→ ⎢ 2 dt 2 ⎥ ⎢ ⎥ # ⎢ ⎥ ⎢ dn y⎥ ⎢ xn = n ⎥ dt ⎦ ⎣ ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 9 First Companion Form: SISO Case (Controllable canonical form) ⎡ x1 ⎤ ⎡ 0 ⎢ x ⎥ ⎢ 0 ⎢ 2 ⎥ ⎢ ⎢ x3 ⎥ ⎢ 0 ⎢ ⎥=⎢ ⎢ # ⎥ ⎢ # ⎢ xn −1 ⎥ ⎢ 0 ⎢ ⎥ ⎢ ⎢⎣ xn ⎥⎦ ⎢⎣ − an 1 0 0 # 0 − an −1 0 0 0 1 0 0 0 1 0 # # # 0 0 0 − an − 2 " " 0 ⎤ ⎡ x1 ⎤ ⎡ 0 ⎤ " 0 0 ⎥⎥ ⎢⎢ x2 ⎥⎥ ⎢⎢ 0 ⎥⎥ " 0 0 ⎥ ⎢ x3 ⎥ ⎢ 0 ⎥ " 0 ⎥⎢ ⎥ + ⎢ ⎥u # # # ⎥ ⎢ # ⎥ ⎢0 ⎥ 0 0 1 ⎥ ⎢ xn −1 ⎥ ⎢ 0 ⎥ ⎥⎢ ⎥ ⎢ ⎥ " " − a1 ⎥⎦ ⎢⎣ xn ⎥⎦ ⎢⎣ 1 ⎥⎦ ⎡ x1 ⎤ ⎢x ⎥ ⎢ 2 ⎥ ⎢ x3 ⎥ y = [1 0 0 " " 0 ] ⎢ ⎥ + [0]u # ⎢ ⎥ ⎢ xn −1 ⎥ ⎢ ⎥ ⎣⎢ xn ⎦⎥ ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 10 First Companion Form: SISO Case (Controllable canonical form): Block Diagram n integrators ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 11 Example: (Constant in the Numerator) 3 integrators C (s) s + 7s + 2 T (s) = = 3 2 R ( s ) s + 9 s + 26 s + 24 2 ( s 3 + 9 s 2 + 2 6 s + 2 4 )C ( s ) = 2 4 R ( s ) w ith z e ro in itia l c o n d itio n s c + 9 c + 2 6 c + 2 4 c = 2 4 r L e t x1 c , x 1 = x 2 x 2 = x 3 x 2 c , x 3 c x 3 = − 2 4 x 1 − 2 6 x 2 − 9 x 3 + 2 4 r y = c = x1 ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 12 Example: (Polynomial in the Numerator) For the block containing denominator ( s 3 + 9 s 2 + 26 s + 24) X 1 ( s ) = 24 R ( s ) x1 = x2 x2 = x3 x3 = −24 x1 − 26 x2 − 9 x3 + r For Numerator Block C ( s ) = ( s 2 + 7 s + 2) X 1 ( s ) Taking inverse Laplace transform y = x3 + 7 x2 + 2 x1 ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 13 Example With A Polynomial In The Numerator 3 integrators ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 14 Systems Having Single Input but Multiple Outputs Generalization of the concepts discussed to this case is straight forward: A and B matrices remain same C and D matrices get modified ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 15 Example y1 ( s ) 2s + 3 and = H1 ( s ) = 2 u ( s) 3s + 4 s + 5 y2 ( s ) 3s + 2 = H 2 (s) = 2 u (s) 3s + 4 s + 5 y1 ( s ) ⎛ z ( s ) ⎞⎛ y1 ( s ) ⎞ ⎛ 1 ⎞ =⎜ H1 ( s ) = ⎟⎜ ⎟= ⎜ 2 ⎟ ( 2 s + 3) u ( s ) ⎝ u ( s ) ⎠⎝ z ( s ) ⎠ ⎝ 3s + 4 s + 5 ⎠ ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 16 Example – contd. 4 5 1 z + z + z = u 3 3 3 Define x1 z , x2 z 1 ⎡ x ⎤ ⎡ 0 ⎢ x ⎥ = ⎢− 5 3 − 4 ⎣ ⎦ ⎣ 1 2 ⎤⎡ x ⎤ ⎡ 0 ⎤ +⎢ ⎥u ⎥ ⎢ ⎥ 3⎦ ⎣ x ⎦ ⎣1 3⎦ 1 2 y = 2 z + 3 z = 2 x + 3 x 1 2 1 ⎡x ⎤ y = [3 2] ⎢ ⎥ + [0] u ⎣x ⎦ 1 1 2 ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 17 Example – contd. ⎛ z ( s ) ⎞ ⎛ y2 ( s ) ⎞ ⎛ 1 ⎞ H 2 (s) = ⎜ ⎟⎜ ⎟= ⎜ 2 ⎟ ( 3s + 2 ) ⎝ u ( s ) ⎠ ⎝ z ( s ) ⎠ ⎝ 3s + 4 s + 5 ⎠ A and B are the same y2 = 3 z + 2 z = 3 x2 + 2 x1 ⎡ x1 ⎤ y2 = [ 2 3] ⎢ ⎥ + [ 0] u ⎣ x2 ⎦ Note: Block diagram representation is fairly straight forward. The realization requires n integrators. ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 18 Jordan Canonical Form (Non-repeated roots) H (s) = r r r y(s) = d0 + 1 + 2 + " + n u (s) s − λ1 s − λ2 s − λn All the poles of the transfer function are distinct, i.e. no repeated poles ri 's are called "residues" of the reduced transfer function [ H ( s ) − b0 ] y (s) = d 0u (s) + r u (s) r1u ( s ) r2 u ( s ) + + " + n s − λ1 s − λ2 s − λn Let r1u ( s ) ⎤ ⎡ x ( s ) = ⎢ 1 s − λ1 ⎥ ⎢ ⎥ ⎢ ⎥ # ⎢ ⎥ r u ( s ) ⎢ x (s) = n ⎥ n ⎢⎣ s − λn ⎥⎦ → ⎡ x1 − λ1 x1 = r1u ⎤ ⎢ ⎥ # ⎢ ⎥ ⎢ ⎥ # ⎢ ⎥ ⎣ xn − λn xn = rn u ⎦ ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 19 Jordan Canonical Form (Non-repeated roots) ⎡ x1 ⎤ ⎡λ1 ⎢ x ⎥ ⎢ 0 ⎢ 2⎥ = ⎢ ⎢ # ⎥ ⎢0 ⎢ ⎥ ⎢ ⎣ xn ⎦ ⎣ 0 0 λ2 0 0 y = [1 1 " " 0 ⎤ ⎡ x1 ⎤ ⎡ r1 ⎤ ⎥ ⎢ ⎥ ⎢ ⎥ " 0 ⎥ ⎢ x2 ⎥ ⎢ r2 ⎥ + u % # ⎥⎢ # ⎥ ⎢# ⎥ ⎥⎢ ⎥ ⎢ ⎥ " λn ⎦ ⎣ xn ⎦ ⎣ rn ⎦ ⎡ x1 ⎤ ⎢x ⎥ 1] ⎢ 2 ⎥ + [ d 0 ] u ⎢#⎥ ⎢ ⎥ ⎣ xn ⎦ ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 20 Jordan Canonical Form (Non-repeated roots): Block Diagram ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 21 Jordan Canonical Form: Example (Non-repeated roots) Given By partial fraction, y( s) 1 = u ( s ) ( s + 1)( s + 2) 1 ⎤ ⎡ 1 y(s) = ⎢ − u (s) ⎥ ⎣ s +1 s + 2 ⎦ Define two transfer functions 1 x1 ( s ) = u (s) , s +1 1 x2 ( s ) = u ( s) s+2 ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 22 Jordan Canonical Form: Example (Non-repeated roots) This leads to u ( s ) = x1 ( s )( s + 1), u ( s ) = x2 ( s )( s + 2) Differential equations corresponding to the x1 , x2 x1 = u − x1 x2 = u − 2 x2 Output Equation y = x1 − x2 ⎡ x1 ⎤ ⎡ −1 0 ⎤ ⎡ x1 ⎤ ⎡1⎤ ⎢ x ⎥ = ⎢ 0 −2 ⎥ ⎢ x ⎥ + ⎢1⎥ u ⎣ 2 ⎦ ⎣ ⎦ ⎣ 2 ⎦ ⎣N⎦ A ⎡ x1 ⎤ y = [1 −1] ⎢ ⎥ ⎣ x2 ⎦ ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore B 23 Jordan Canonical Form: Example Repeated Roots Following the same procedure H (s) = y(s) 2 = u ( s ) ( s − 3 )3 Let x2 ( s ) x1 ( s ) = s −3 x3 ( s ) x2 ( s ) = s −3 u (s) x3 ( s ) = s −3 ⇒ x1 − 3 x1 = x2 ⇒ x2 − 3 x2 = x3 ⇒ x3 − 3 x3 = u ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 24 Jordan Canonical Form: Example Repeated Roots z 1 1 ⎡ u (s) ⎤ y(s) = u (s) = 2 ⎢ ⎥ 3 − − − s 3 s 3 s 3 ( ) ( ) ⎢⎣( )⎥ ( s − 3) ⎦ 2 Output Equation x3 ( s ) =2 z Finally x3 ( s ) x (s) 1 =2 2 = 2 x1 ( s ) ( s − 3) ( s − 3) ( s − 3) ⎡ x1 ⎤ ⎡ 3 1 0 ⎤ ⎡ x1 ⎤ ⎡0 ⎤ ⎢ x ⎥ = ⎢0 3 1 ⎥ ⎢ x ⎥ + ⎢0 ⎥ u ⎢ 2⎥ ⎢ ⎥⎢ 2⎥ ⎢ ⎥ ⎢⎣ x3 ⎥⎦ ⎢⎣0 0 3⎥⎦ ⎢⎣ x3 ⎥⎦ ⎢⎣1 ⎥⎦ N N N X A X B y = [ 2 0 0] X + [ 0] u N C D ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 25 Jordan Canonical Form: What if complex conjugate roots? Roots always exist in complex conjugate pairs! H1,2 = = λ + jυ λ − jυ + s + (σ − jω ) s + (σ + jω ) 2 ⎡⎣λ s + ( λσ − ωυ ) ⎤⎦ The system can be realized partially in other forms (like First companion form) s 2 + 2σ s + (σ 2 + ω 2 ) First companion form: 0 1 ⎤ ⎡ x1 ⎤ ⎡0 ⎤ ⎡ x1 ⎤ ⎡ ⎥ ⎢ ⎥ + ⎢ ⎥u ⎢ ⎥ = ⎢ 2 2 ⎣ x2 ⎦ ⎢⎣ − (σ + ω ) −2σ ⎥⎦ ⎣ x2 ⎦ ⎣1 ⎦ y1,2 = ⎡⎣ 2 ( λσ − ωυ ) ⎡ x1 ⎤ 2λ ⎤⎦ ⎢ ⎥ ⎣ x2 ⎦ ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 26 ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 27 ADVANCED CONTROL SYSTEM DESIGN Dr. Radhakant Padhi, AE Dept., IISc-Bangalore 28