MEM 355 Performance Enhancement of Dynamical Systems MIMO Introduction Harry G. Kwatny Department of Mechanical Engineering & Mechanics Drexel University 11/2/214
Outline Solving State Equations Variation of parameters formula Matrix exponential Controllability/Observability/Kalman Decomposition System Zeros SISO/MIMO Closed Loops
Solving Linear State Equations n x = Ax + Bu t, x R, u R find : x t given : x t = x, u t for t t for t t x = Ax + b t, b t : = Bu t, forced or nonhomogeneous x = Ax homogeneous m
Approach Basic Properties Variation of Parameters Formula State Transition Matrix Matrix Exponential Laplace Transform
Basic properties p x t, x t sol'ns of homog., c, c constants 1 2 1 2 = + x t cx t cx t 1 1 2 2 1 2 = 1 2 any sol'n of forced, is a sol'n of homog. x t, x t sol'ns of forced x t x t x t x t x t is a sol'n of homog. any sol'n of homog. x t = x t + x t is a sol'n of forced h p h
Variation of Parameters Formula Recall, any sol'n of (forced) satisfies where = + x t x t x t h p h = p ( t) is any (particular) sol'n of (forced) xp( t) xp( t) = X ( t) c( t) = + and 1 = x c ( t) = X ( t) B( t) u( t) x t X t c for constant vector c, satisfies (homog.) x We seek. Assume the form. x Ax Bu X A p p = c( t ) c t + t t 1 X B u d τ τ τ τ
Variation of Parameters Formula, Cont d h = x t Ax t assume ( ) ( 1 2 2 1 k k = ) + + + + + h 2 = + 1 + 2 + a + 2at+ 3at + = A a + at+ at + 2 2 1 2 3 1 2 a = Aa, a = Aa, a = Aa,, a = Aa 1 1 1 1 2 2 1 3 3 2 k k k 1 a = Aa, a = A a, a = A a,, a = A a h x t a at at 1 2 1 3 1 k 1 2 2 3 32 k k! x t a Aat Aat Aat 2 k! = + + + + ( + ) 1 2 2 1 k k xh t I At 2 A t k! A t ( 2 2 + + 1 + + 1 + ) e I At A t A t At k k 2 k! initial condition = = At a c xh t e c a
Variation of Parameters Formula, Cont d We seek x t. Assume the form x t = e c t. p At d At x = Ax + Bu and e = Ae p p dt + = + At At At Ae c t e c t Ae c t B t u t c t = e B t u t c t At = c + t At Aτ e B u d t At ( τ ) x p t = e B u d p τ τ τ τ τ τ
Variations of Parameters Formula Cont d Thus, we have x t = x t + x t h t At At ( τ ) x t = e c + e Bu ( τ) d Now impose: x = x c= x p t At At ( τ ) x t = e x + e Bu τ d τ τ
Transition Matrix via Laplace Transform d e At At At = Ae, e = I dt t= L = L At At s e I A e ( ) At 1 1 e si A e si A L = = [ ] At 1, L [ ]
Caley-Hamilton Theorem Cayley-Hamilton Theorem: Every square matrix satisfies its own characteristic equation, i.e. φλ = λ = λ + λ + + n n 1 I A an 1 a n φ( A) = A + a A + + ai= n 1 n 1 From this we obtain: At e = α () ti+ α () ta+ + α ( t) A 1 n 1 n 1
System x = Ax + Bu y = Cx x R, u R, y R n m p t At A(t-s) x(t; x,u) = e x + e Bu(s)ds
Summary: Controllability/Observability Controllability rank = C CA Observability rank = n 1 CA Kalman Decomposition, x z such that d dt n 1 B AB A B n z1 A11 A12 A13 A14 z1 B1 z1 z 2 A22 A 24 z 2 B 2 z = 2 + u, y = [ C 2 C ] 4 z 3 A33 A 34 z 3 z 3 z4 A44 z4 z 4 z, z controllable z, z observable 1 2 2 4 Notice that the substate z 2 is both controllable and observable
Example 2 2 1 x =, [ 1 ] 4 x+ u y = x 1 1 4 C = [ B AB] = not controllable 1 4 s + 4 2 s + 2 1 G s = C si A B = + + 1 [ 1 ] [ 1 ] ( s 2 )( s 4 ) ( s + 2) 1 = = ( s+ 2)( s+ 4) s+ 4
Transfer Functions x = Ax + Bu y = Cx = [ ] = [ ] 2 2 2 x R, u R, y R n m p 1 1 G s C si A B C si A B 2 2 2 where A, B, C are those of the Kalman decomposition -, i.e., parameters of a minimal realization. So, only the controllable and observable part of the system is characterized by its transfer function. Definition: G s is called a complete characterization of the system if the system is completely observable and controllabl e.
Some MATLAB Functions Function canon ctrb ctrbf gram obsv obsvf ss2ss ssbal minreal canonical state-space realizations controllability matrix controllability staircase form controllability and observability gramians observability matrix observability staircase form state coordinate transformation diagonal balancing of state-space realizations returns a minimal realization
Example, Continued >> A=[-2-2;,-4]; >> B=[1;1]; >> C=[1 ]; >> sys=ss(a,b,c,); >> ctrb(sys) ans = 1-4 1-4 >> gram(sys,'c') ans =.125.125.125.125 >> tf(sys) Transfer function: s + 2 ------------- s^2 + 6 s + 8 >> tf(minreal(sys)) 1 state removed. Transfer function: 1 ----- s + 4
System Poles & Zeros Two descriptions of linear time-invariant systems state space and transfer function. x = Ax + Bu y = Cx + Du [ ] 1 G s = C si A B + D Assumption: Gis a complete characterization of ABCD,,, or, equivalently, ABCD,,, is a minimal realization of G. Defining poles via state space is very easy: the eigenvalues of A. the poles of Defining zeros is more complicated. We do it via state space in the followin g. G are
SISO System Zeros recall: x = Ax + Bu n x R, u Ry, R y = Cx + Du { } [ ] [ ] 1 1 Y () s = C si A x + C si A B + D U () s suppose: { [ ] } λt 1 ns () u t = e, G( s): = C si A B + D = k, d ( s) = si A ds () Y s [ ] Adj[ ] CAdj si A x ns () 1 C si A x ns () G( λ) = + k = + + ds () ds () s λ ds () ds () s λ (), Partial fraction expansion N( s) A( s) B = + ( λ) ( λ) ( s λ ) N( s) ( s λ ) A( s) lim λ s λ d( s) ( s λ ) d( s) N ( λ ) = d ( λ ) d s s d s s lim s B = + lim s λ ( s λ ) ( s λ ) B
SISO System Zeros, Cont d x can always be chosen so that [ ] CAdj si A x ns () + ds () ds () in which case ( λ ) G Y( s) =, if λ is a zero of G( λ ), then Y( s) =, y( t) = s λ In summary: if λ is a system zero, there exists x such that x t = x and u( t) = e λ t y t
MIMO System Zeros x = Ax + Bu y = Cx + Du x R, u R, y R n m p m n Does there exist g R and x R such that λt λt u() t = ge x() t = x e and y() t? The assumed solution must satisfy λt λt λt λxe = Axe + Bge λi A B x = C D g λt λt = Cxe + Dge The solution is nontrivial only if the system matrix is singular
MIMO System Zeros, Cont d This represents n+ p equations in n+ m unknowns. Suppose λi A B r = rank C D r = n+ min( mp, ) max r< n+ min( mp, ) nontrivial sol'ns p< m always nontrivial sol'ns r= r = n+ p m p max max independent sol'ns p> m and r= r = n+ m there are no nontrivial sol'ns
Square MIMO Systems (p=m) Nondegenerate case: If for typical λ, λi A B r = rank n m C D = + Those specific values of λ for which r < n+ m invariant zeros. Invariant zeros consist of are called input decoupling zeros (uncontrollable modes), λ satisfies rank [ λ ] I A B < n output decoupling zeros (unobservable modes), λ satisfies λi A rank n C < transmission zeros, all other invariant zeros.
Square MIMO Systems, Cont d degenerate case: ( λ ) For typical λ, λi A B r = rank < n+ m C D G insufficient independent controls,rank B< m insufficient independent outputs, rank C < p
Example - GTM θ = q x = V cosγ z = Vsinγ 1 1 2 V = ( T cos α ρv SC 2 D( αδ, e, q) mg sin γ) m 1 1 2 γ= ( T sin α+ ρv SC 2 L( αδ, e, q) mg cosγ) mv M q =, M = V ScC,, q + V ScC,, q x x mgx + lt I y α = θ γ 2 2 ( ) 1 ρ 1 2 m αδe ρ 2 Z αδe cgref cg cg t
Choose Equilibrium & Linearize Equilibrium Requires: = θ = q = x = V cosγ = z = Vsinγ 1 1 2 = V = ( T cos α ρv SC 2 D( αδ, e, q) mg sin γ), α= θ γ m 1 1 2 = γ= ( T sin α+ ρv SC 2 L( αδ, e, q) mg cosγ) mv M = q =, M = V ScC,, q + V ScC,, q x x mgx + lt I y 2 2 ( ) 1 ρ 1 2 m αδe ρ 2 Z αδe cgref cg cg t Also require: horizontal flight: γ = specify speed: V = V Solve 6 equations for remaining 4 states xz,, θ, q and 2 controls δ, T e
GTM Equilibrium Surface Straight and Level Flight Analysis 27
Controllability Around Bifurcation Point GTM Example: Straight Wings-Level Climb Note: Even though the system loses linear controllability at the bifurcation point, it is locally (nonlinearly) controllable in the sense that the controllability distribution has full generic rank around the bifurcation 28 point. Thus, any stabilizing feedback controller would have to be nonlinear and probably non-smooth (and possibly non-intuitive)
GTM Cont d Coordinated Turn Analysis Coordinated turn of GTM @ 85 fps Coordinated turn of GTM @ 9 fps Coordinated turn of GTM @ 87 fps 29
GTM Cont d Coordinated Turn Analysis Techno-Sciences, Inc. Proprietary 3
Example: GTM Phugoid Dynamics T V δ e γ d V.18644 33.2125 V.449195 62.333 T dt γ =.8844275.15152 + γ.416546.751226 δ e Normal trim d V.3111 33.2514 V.494357 31.5244 T dt γ =.638713.338864 + γ.127241 1.22673 δ e High AOA trim Stall trim d V.27235 33.855 V.4642 62.5119 T dt γ =.791414.28613 + γ.178.265262 δ e
Multivariable Interconnections & Feedback Loops 11/2/214
Well-Posed Loops: Example 1 G( s) - 1 s G( s) = 1 s 2 s+ 1 s+ 1 1 s+ 1 s 1 Gcl ( s) = G( s) I + G( s) = improper s 1 Theorem: Let GH, be proper rational transfer matrices. Then cl [ ] G = G I + HG 1 is proper and rational iff I + H G is nonsingular.
Poles of Closed Loops - G( s) H( s) cl [ ] G = G I + HG 1 It might be anticipated that the poles of the roots of det [ I + HG]. Not True!! G cl are s s s 1 s+ 1 G( s) =, H( s) = I2 2 1 s + 1 2s s s+ 1 s+ 1 Gcl ( s) =, det [ I + HG] 1 s 2 1 s 1 obviously, has poles at s = ± 1.
Poles, Cont d Theore m: If GH, are proper, reational matrices and det I + H G, then the poles of Gcl are the roots of the polynomial G s ( s) ( s) ( s) det I H( s) G( s) = G H + Example: 1 1 + = s +.5 1 ( s.5)( s 1.5) ( s. 5) ( s.5)( s+ 1.5 ) ( s.5), H = I 2
Poles: Example Cont d G cl ( s) ( s 1.5)( s.5 ), ( s) 1,det I G( s) G = + H = + = ( s) ( s) ( s) ( s) det I G( s) ( s 1.5)( s.5) = G H + = + + 1 ( s.5) = 1 1 ( s 1.5) ( s 1.5 + + ) s + 1.5 1 = ( s+ 1.5)( s+.5) s+.5 s+.5 1 1 s +.5 s.5
System Interconnections G 1 G 2 parallel G 1 series - G 1 G 2 feedback G 2 Systems G, G are complete characterizations, with 1 2 1 1 Gi = Dli Nli = NriDri, i = 1, 2 coprime fractions. parallel connection controllable D, D left coprime r1 r2 observable Dl1, Dl2 right coprime series connection controllable D, N, or DD, N or D, N N are left coprime r2 r1 l1 r2 l1 l2 l2 r1 observable D, N, or DD, N or D, N N right coprime det I + G2 G1. Then controllable GG 1 2 controllable observable G 2 G 1 observable l1 r2 l1 r2 r2 r1 l2 r1
Stability x = Ax + Bu y = Cx + Du [ ] 1 x R, u R, y R G s = C si A B + D n m p The basic idea is that stable system responds to a perturbation by remaining within a neighborhood of its equilibrium point. a state perturbation with zero input (Lyapunov/Asymptotic) an input perturbation with zero state (BIBO) simultaneous state and input perturbation (Total) Lyapunov: Reλ A, eigenvalues with Reλ = have full set of eigenvectors. Asymptotic: Reλ A < BIBO: poles of G s < Total: Lyapunov + poles of G s <
Poles & Zeros from Transfer Functions 11/2/214
Numbers: Prime & Coprime A prime number (or integer) is a positive integer p > 1 that has no positive integer divisors other than 1 and itself. Two integers are relatively prime or coprime if they share no positive integer factors (divisors) other than 1 - i.e., their greatest common divisor is 1. Bezout's identity: exist integers x and y such that (, ) GCD a b = ax + by If a and b are integers not both zero, then there If a and b are coprime then there exist integers x and y such that 1 = ax + by
Polynomials These ideas have been extended to polynomials, matrices with polynomial elements matrices with rational elements Two polynomials ns = as + a s + + a, a m m 1 m m 1 m d s = bs + b s + + b, b n 1 n n 1 n are coprime if their greatest common divisor is a nonzero constant, i.e., they have no common factors.
Example F 1 = s 4 + 2s 3 + s + 2 = (s + 1) (s + 2) (s 2 - s + 1) F 2 = s 5 + s 4 + 2s 3 + 3s 2 + 3s + 2 = (s + 1) (s 2 - s + 2) (s 2 + s + 1) gcd(f 1,F 2 ) = (s + 1) Bezout relation: (5/24s 3 + 1/12s 2 + 1/4s + 5/24) F 1 + (-5/24s 2-7/24s + 7/24) F 2 = s + 1
Polynomial Matrices Two matrix polynomials m m 1 = + + + n 1 i = n + n 1 + + right common divisor R( s) R =, = D( s) right coprime R( s) N s As A s A have a m m 1 pa, q pb, q A R, Bi R D s Bs B s B N s N s R s D s D s R s N s, are if the only right common qq, divisors are unimodular, i.e., det = c. Similary, left coprimeness can be defined for polynomial matrices with the same number of rows. if
Poles Suppose the q m transfer matrix G s is a complete characterization of x = Ax + Bu, y = Cx + Du can always be factored into 1 1 G( s) = D ( s) N ( s) = N ( s) D ( s) G s l l r r where D, N and D, N are coprime pairs of polynomial matrices. N l l r r and D, D are called numerator, denominator matrices, respectively. Theorem: [ si A] = D s = D ( s) det α det α det α, α are constants. Definition: Poles are the roots of: det r r 1 l 2 r 1 2 [ si A], or det D ( s), or det D ( s) = = = l r r, N l
Poles & Zeros from Transfer Functions Assume G(s) is a complete characterization. Theorem: The pole polynomial (s) is the least common denominator of all non-identically-zero minors of all orders of G(s). Theorem: The zero polynomial is the greatest common divisor of all numerators of all order-r minors of G(s), where r is the generic rank of G(s), provided that these minors have been adjusted to have (s) as there denominator.
Example Recall a minor of a matrix is the determinant of a matrix obtained by deleting rows and columns. Consider the transfer function: 1 s 1 4 G( s) = 2 4.5 2( s 1 s + ) To determine poles we need all minors of all orders. The 4 minors of order 1 are s 1 4 4.5 s 1,,,2 s+ 2 s+ 2 s+ 2 s+ 2 rank G s =2. The single minor of order 2 is det G s = 2 ( s) pole polynomial: φ = s+ 2 zero polynomial: z s = s 4 s 4 ( s + 2)