Control Systems Time response L. Lanari
outline zero-state solution matrix exponential total response (sum of zero-state and zero-input responses) Dirac impulse impulse response change of coordinates (state) Lanari: CS - Time response 2
system x() = x u(t) ẋ(t) =Ax(t)+Bu(t) y(t) =Cx(t)+Du(t) y(t) input x(t) state output Linear Time Invariant (LTI) dynamical system (Continuous Time) x IR n u IR m y IR p Lanari: CS - Time response 3
system representation ẋ(t) =Ax(t)+Bu(t) x() = x implicit representation v = F m v() = v example x(t) =... explicit representation (solution) v(t) =v + 1 m F ( )d we want to study the solution of the set of differential equations in order to have a qualitative knowledge of the system motion we need the general expression of the solution - first we look at the solution when no input is applied (zero-input response) - then we look at the contribution due to the input (zero-state response) Lanari: CS - Time response 4
solution: zero-input response zero-input response (i.e. with u(t) = ) ẋ(t) =Ax(t)+Bu(t) scalar case ẋ = ax x() = x x(t) =e at x matrix case ẋ = Ax x() = x x(t) =e At x dimensions n 1 n 1 n n definition e At = I + At + A 2 t2 2! + = 1 X k= A k tk k! check ẋ = d dt e At x = = Ax Lanari: CS - Time response 5
matrix exponential definition e At = I + At + A 2 t2 2! + = 1 X k= A k tk k! properties e At = I t= e At1 e At 2 = e A(t 1+t 2 ) e A 1t e A2t = e (A 1+A 2 )t e At 1 = e At consistency composition = () A1A2 = A2A1 equality holds iff d dt eat = Ae At Lanari: CS - Time response 6
solution: zero-input response the exponential matrix propagates the initial condition into state at time t x e At propagation x(t) the exponential matrix propagates the state t seconds forward in time x( ) since x( + t) =e At x( ) x( + t) =e A( +t) x() = e At e A x() = e At x( ) curiosity: Euler approximation exact solution x( + t) x( )+tẋ( )=(I + At)x( ) x( + t) =e At x( )=(I + At + A 2 t 2 /2! +...)x( ) Lanari: CS - Time response 7
solution: zero-input response phase plane x = x1 x 2 it is possible to represent the vector field ẋ = Ax ẋ(t) =Ax(t) x(t) vector field ẋ(t) = apple 1 2 1 x(t) and build a phase portrait (geometric representation of the trajectories) Lanari: CS - Time response 8
solution on phase plane: pendulum phase portrait Pendulum with no damping (nonlinear differential equation) #(t) solution #(t)+ g` sin #(t) = (#(), #()) = (, ) unstable equilibrium state stable equilibrium state vector field # (#(), #()) = (, ) #(t) #() (#(), #()) = (.45,.8) Lanari: CS - Time response 9
solution: total response scalar case ẋ = ax + bu solution is x(t) =e at x + e a(t ) bu( )d (check) Leibniz integral rule d dt ẋ = ae at x + f(t, )d = d dt f(t, )d + f(t, ) =t ae a(t ) bu( )d + bu(t) =ax + bu example: see the point mass v(t) =v + 1 m F ( )d Lanari: CS - Time response 1
solution: total response matrix case state x(t) =e At x + e A(t ) Bu( )d zero-input response (ZIR) zero-state response (ZSR) output y(t) =Ce At x + Ce A(t ) Bu( )d + Du(t) e At Ce At state-transition matrix output-transition matrix N.B. product is not commutative for matrices Lanari: CS - Time response 11
solution: total response total response = zero-input response + zero-state response x() 6= x() = u(t) = u(t) 6= two distinct contributions to the motion of a linear system a non-zero initial condition causes motion as well as a non-zero input alternative names zero-input response = free response/evolution zero-state response = forced response/evolution Lanari: CS - Time response 12
superposition principle (linearity) from general solution x(t) =e At x + y(t) =Ce At x + e A(t ) Bu( )d Ce A(t ) Bu( )d + Du(t) if (x a,u a (t)) generates x a (t) and y a (t) if (x b,u b (t)) generates x b (t) and y b (t) then ( x a + x b, u a (t)+ u b (t)) generates x a (t)+ x b (t) only for same linear combination and y a (t)+ y b (t) special case ZSR (forced response) x() = u a (t) ZSRa if then u a (t) + u a (t) ZSRa + ZSRb u b (t) ZSRb Lanari: CS - Time response 13
superposition principle: special case - example x() = disturbance d(t) control input u(t) ẋ(t) =Ax(t)+B 1 u(t)+b 2 d(t) y(t) =Cx(t)+D 1 u(t)+d 2 d(t) output y(t) total output ZSR (forced response) is made up of two contributions a first due only to the control input (setting the disturbance to zero) a second due only to the disturbance (setting the control input to zero) y(t) =y ci (t)+y d (t) u(t) 6= d(t) = u(t) = d(t) 6= property frequently used in control design Lanari: CS - Time response 14
Dirac s delta (impulse) generalized function (t) = if t 6= Z +1 1 properties ( )d =1 f(t) (t ) =f( ) (t ) impulse centered in t = (or centered in = t) 1 " approximation (as a function of t) f( ) (t ) =f(t) (t ) (as a function of ) (t ) if " t "! t Z +1 1 f( ) (t )d = f(t) sifting (sampling) property (as a function of ) Lanari: CS - Time response 15 t f( )Z
Dirac s delta: application zero-state output response Ce A(t ) Bu( )d + Du(t) = rewritten as sifting property h i Ce A(t ) B + D (t ) u( )d W (t )u( )d with W (t) =Ce At B + D (t) for now just a more compact way to rewrite the ZSR, but it can be also given an interesting physical interpretation W (t )u( )d if u(t) = ±(t) W(t) defined as the (output) impulse response i.e. the response to a specific input, the Dirac impulse W (t ) ( )d = W (t) Lanari: CS - Time response 16
impulse response for any input u(t), the zero-state output response is a convolution integral of the impulse response W(t) with the input u(t) output ZSR = W (t )u( )d to the input u(t) the knowledge of the sole (output) impulse response W(t) allows us to predict the zero-state (output) response to any input u(t) a unique experiment aimed at the determination of the impulse response W(t) is, theoretically, sufficient to characterize any zerostate response Lanari: CS - Time response 17
impulse response - example mass + friction (with coefficient µ), measuring velocity v = µ m v + 1 m F x = v u = F ẋ = Ax + Bu A = µ m B = 1 m C = 1 D = impulse response W (t) =Ce At B = 1 m e µ m t F(t) t F a m F W(t) 1 m output impulse response physical interpretation 5 1 15 time larger friction coefficient gives faster impulse response decay larger mass gives slower impulse response decay Lanari: CS - Time response 18
impulse response - example mass + friction (with coefficient µ), measuring velocity v = µ m v + 1 m F impulse response W (t) =CeAt B = 1 m e µ m t for a different input, for example u(t) = sin!t, we can compute explicitly the zero-state response from the knowledge of the impulse response y(t) = = 1 m W (t )u( )d = µ m 1 2 +! 2 output 1 h µ m sin!t! cos!t +!e µ m ti zero-state response to sin(5t) -1 5 1 15 time Lanari: CS - Time response 19 y(t) u(t)
Dirac s delta: application similarly for the state zero-state response define H(t) as H(t) =e At B the zero-state response (of the state) can be written as the following convolution integral interpretation H( ) (t e A(t ) Bu( )d = H(t )u( )d )d = H(t) sifting property Lanari: CS - Time response 2 if u(t) = ±(t) H(t )u( )d H(t H(t) state impulse response e At B t ) ( )d = =! = t = t! =
state impulse response H(t) state impulse response e At B other interpretation (= ZIR from x ) H(t) =e At B formally looks like e At x with x = B ẋ =.1.5.5.1 x + 1 2 u 2 state impulse response 1.5 the impulse is transferring the state instantaneously from to B, and then evolves with no input as a free evolution from x = B x 2 1.5 -.5-1 -1.5-2 -1.5-1 -.5.5 1 x 1 Lanari: CS - Time response 21
impulse response impact hammer Impulse Response 5 4 3 Amplitude 2 1 1 2 3 4 1 2 3 4 5 6 7 Time (sec) impulse response (here not experimental) this beam is on the space telescope here Hubble Space Telescope Lanari: CS - Time response 22
impulse response - experimental determination Modal testing for vibration analysis: the impulse, which has an infinitely small duration, is the ideal testing impact to a structure: all vibration modes will be excited with the same amount of energy (more on this in the frequency analysis section) the impact hammer should be able to replicate this ideal impulse but in reality the strike cannot have an infinitesimal small duration the finite duration of the real impact influences the frequency content of the applied force: the longer is the duration the smaller bandwidth more in the Mechanical Vibrations course Lanari: CS - Time response 23
solution: total response more compact notation x(t) = (t)x + y(t) = (t)x + H(t )u( )d W (t )u( )d state (t) =e At H(t) =e At B output (t) =Ce At W (t) =Ce At B + D (t) transition matrix impulse response Dirac impulse Lanari: CS - Time response 24
change of coordinates (A, B, C, D) ( A, e B, e C, e D) e state x z = Tx det(t ) 6= state z ẋ = Ax + Bu y = Cx + Du state space representation change of coordinates same system input u & output y do not change, only state is chosen differently ż = e Az + e Bu y = e Cz + e Du the matrices of the two equivalent system representations are related as ea = TAT 1 e B = TB e C = CT 1 e D = D equivalent system representation (proof) Lanari: CS - Time response 25
impulse response 1 experiment 1 response ẋ = Ax + Bu y = Cx + Du same system (different representation) ż = e Az + e Bu y = e Cz + e Du W (t) =Ce At B + D (t) f W (t) = e Ce e At e B + e D (t) (proof) W (t) = f W (t) same impulse response i.e. independent from the chosen set of coordinates (state) Lanari: CS - Time response 26
general solution (recap) x(t) = (t)x + y(t) = (t)x + H(t )u( )d W (t )u( )d (t) =e At H(t) =e At B (t) =Ce At W (t) =Ce At B + D (t) the matrix exponential appears everywhere do we need to compute the exponential using its definition? e At = I + At + A 2 t2 2! + = 1 X k= A k tk k! Lanari: CS - Time response 27
matrix exponential SIAM REVIEW c 23 Society for Industrial and Applied Mathematics Vol. 45, No. 1, pp. 3 Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later Cleve Moler Charles Van Loan there are many different ways to compute the matrix exponential... Abstract. In principle, the exponential of a matrix could be computed in many ways. Methods involving approximation theory, differential equations, the matrix eigenvalues, and the matrix characteristic polynomial have been proposed. In practice, consideration of computational stability and efficiency indicates that some of the methods are preferable to others, but that none are completely satisfactory. Most of this paper was originally published in 1978. An update, with a separate bibliography, describes a few recent developments. Key words. matrix, exponential, roundoff error, truncation error, condition AMS subject classifications. 15A15, 65F15, 65F3, 65L99 PII. S36144524181 1. Introduction. Mathematical models of many physical, biological, and economic processes involve systems of linear, constant coefficient ordinary differential equations ẋ(t) =Ax(t). Here A is a given, fixed, real or complex n-by-n matrix. A solution vector x(t) is sought which satisfies an initial condition x() = x. In control theory, A is known as the state companion matrix and x(t) isthesystem response. In principle, the solution is given by x(t) =e ta x where e ta can be formally defined by the convergent power series e ta = I + ta + t2 A 2 +. 2! Published electronically February 3, 23. A portion of this paper originally appeared in SIAM Review, Volume2,Number4,1978,pages81 836. http://www.siam.org/journals/sirev/45-1/4181.html The MathWorks, Inc., 3 Apple Hill Drive, Natick, MA 176-298 (moler@mathworks.com). Department of Computer Science, Cornell University, 413 Upson Hall, Ithaca, NY 14853-751 (cv@cs.cornell.edu). 1 Lanari: CS - Time response 28
matrix exponential we will use changes of coordinates (state) z = T x ẋ = Ax + Bu y = Cx + Du e At = T 1 e At e T easier to compute if 9 T : z = Tx det(t ) 6= then ż = Az e + Bu e y = Cz e + Du e with e e At easier to compute e At e = e TAT 1t = Te At T 1 (proof) Lanari: CS - Time response 29
since it will be used frequently, we prove that if A = T 1 AT e then e At = T 1 e At e T from ea = TAT 1 we obtain A = T 1 AT e e At = e T 1 e AT t = = 1X k= = T 1 " 1 X Lanari: CS - Time response 3 1X k= t k k! T 1 ( e A) k T k= = T 1 e e At T t k k! ( e A) k t k k! (T 1 e AT ) k # T
vocabulary English phase plane ZIR/ZSR vector field (state) impulse response convolution integral transition matrix sampling property superposition principle Italiano piano delle fasi evoluzione libera/forzata campo vettoriale risposta impulsiva (nello stato) integrale di convoluzione matrice di transizione proprietà di campionamento principio di sovrapposizione Lanari: CS - Time response 31