SYSTEMTEORI - ÖVNING 1 GIANANTONIO BORTOLIN AND RYOZO NAGAMUNE In this exercise, we will learn how to solve the following linear differential equation: 01 ẋt Atxt, xt 0 x 0, xt R n, At R n n The equation describes an autonomous linear dynamical system We will consider the following two cases: 1 Time invariant case, ie, At A constant matrix 2 Time varying case, ie, At depends on the time t 1 Solution of linear time invariant autonomous systems Let us consider to solve 11 ẋt Axt, xt 0 x 0, xt R n, A R n n A constant The solution to this equation can be explicitly written as 12 xt e At t0 x 0 Now, the question is how to compute the matrix exponential e At Here, we will present four methods, using definition of the matrix exponential, diagonalization or Jordan form, Laplace transform, Cayley-Hamilton Theorem Remark 1 In Matlab, we can compute the matrix exponential e A numerically with the command expm 11 Using the definition of the matrix exponential Let A be a n n matrix Then, given any t R, the exponential of a matrix is defined in the following way: e At : I + t 1! A + t2 At k 2! A2 + k! For some simple matrices A, it is easy to compute the matrix exponential by using this definition Example 1 Nilpotent case Suppose that 0 1 It is easy to see that A k 0 for k 2 Therefore, e At 1 t I + At 0 1 1 k0
2 GIANANTONIO BORTOLIN AND RYOZO NAGAMUNE Example 2 Diagonal case Suppose that 2 0 0 3 It is easy to see that e At At k k0 k! 0 k0 2t k k! 0 k0 3t k k! e 2t 0 0 e 3t In general, if the matrix A is diagonal, that is diagλ 1,, λ n, then it is easy to prove that: 13 e At diage λ1t,, e λnt More generally, if the matrix A is block-diagonal, that is, A 1 0 0 0 A 2 0 diaga 1,, A m A m then, A k diaga k 1,, A k m and e At diage A1t,, e Amt 12 Using diagonalization or Jordan form It is well-known that any matrix A can always be transformed into a block diagonal form J by a similarity transformation with an appropriate nonsingular matrix T as 14 J T 1 AT, or T JT 1 121 Diagonalizable A Let us suppose that the matrix A has n independent eigenvectors, v i Then, there exists a matrix T [v 1 v n ] such that: 15 T 1 AT D diagλ 1,, λ n, where λ i are the eigenvalues of A In this case, it is easy to show that: 16 e At e T DT 1t T diage λ1t,, e λnt T 1 Example 3 Let 0 1 2 3 To compute e At, note that the characteristic polynomial of A is: χ A λ detλi A λ + 1λ + 2 λ 1 1, λ 2 2 So, the eigenvalues of A are 1 and 2, and the corresponding eigenvectors are [1, 1] T and [1, 2] T, respectively Thus, A can be diagonalized by a similarity transformation as 1 1 1 1 0 1 1 17 } 1 2 {{ } T } 0 2 {{ } D } 1 2 {{ } T 1
SYSTEMTEORI - ÖVNING 1 3 Using 16, 18 19 e At 1 1 e t 0 1 1 1 2 0 e 2t 1 2 2e t e 2t e t e 2t 2e t + 2e 2t e t + 2e 2t 122 Jordan form for A It is always possible to find a nonsingular matrix T such that J T 1 AT is in Jordan canonical form: λ 1 1 0 1 0 λ 1 0 J diagj 1,, J k 0 λ k 1 1 0 λ k and so the problem is reduced to calculate the exponential of each Jordan block J j The Jordan blocks J j have the following form: λ j 1 0 λ j 1 0 J j λ j I + S j λ j 1 0 λ j where S j is a shift matrix: 0 1 1 0 S j 0 1 0 0 with the property that Sj i 0 for i d j where d j is the dimension of S j Therefore, we have that: e Jjt e λjt e Sjt e λjt I + S j t + S jt 2 + + S jt dj 1 110 2 d j 1! 1 t t 2 t /2 d j 1 d j 1! 0 1 t e λjt t 2 /2 t 0 0 1 Remark 2 To learn how to obtain a Jordan form from a general matrix, see Jordandekomposition in Kopior på overheadbilder by C Trygger 1
4 GIANANTONIO BORTOLIN AND RYOZO NAGAMUNE Example 4 Let A be 111 1 1 0 0 1 1 1 which is already in a Jordan form From 110, we have 112 e At e t 1 t t2 /2 0 1 t 1 13 Using Laplace transform The matrix exponential e At can be obtained by 113 e At L 1 {si A 1 }, where L 1 means the inverse Laplace transform Remark 3 See the table for the Laplace transform in, for example, BETA: Mathematics Handbook for Science and Engineering Example 5 Let us again consider the matrix 0 1 114 2 3 Then, 115 si A 1 s 1 2 s + 3 1 1 s 2 + 3s + 2 Now, we decompose this with a partial fraction expansion: 1 s + 3 1 116 s 2 1 2 1 + 3s + 2 2 s s + 1 2 1 Therefore, 117 e At L 1 { si A 1} 1 L 1 2 1 118 s + 1 2 1 119 e t 2 1 2 1 1 + L 1 + e 2t 1 1 2 2 Example 6 Consider the matrix σ ω 120 ω σ s + 3 1 2 s + 1 s + 2 s + 2 1 1 2 2 1 1 2 2 Then, 1 121 si A 1 s σ ω 1 s σ ω ω s σ s σ 2 + ω 2 ω s σ Using the inverse Laplace transform formula, we have 122 e At L 1 { si A 1} e σt cosωt e σt sinωt e σt sinωt e σt cosωt
SYSTEMTEORI - ÖVNING 1 5 14 Using Cayley-Hamilton Theorem Theorem 1 Any square matrix A satisfies its characteristic polynomial then: In other words, given the characteristic polynomial of the matrix A R n n : χ A λ detλi A λ n + a 1 + λ n 1 + + a n χ A A A n + a 1 A n 1 + + a n I 0 Remark 4 The theorem has two important consequences: 1: A n a 1 A n 1 a 2 A n 2 a n I 2: Every matrix polynomial ψa of order n + i, i 0 can be expressed by an n 1-order polynomial Another implication is that e At is an infinity order polynomial which can also be expressed as an n 1-order polynomial Theorem 2 Let λ i, i 1,, m be the eigenvalues of an n n matrix of multiplicity n i, ie m m χ A λ λ λ i ni and n i n i1 Let also fλ and gλ be polynomials of λ such that: d k 123 dλ k fλ λλ i dk dλ k gλ λλ i, i 1,, m, k 0,, n i 1 Then fa ga Remark 5 The previous theorem can be used to find a n 1-order polynomial gλ corresponding to a possibly high order polynomial function fa To this end, note that Eq 123 constitutes n equations, from which n coefficients of gλ can be found Example 7 In this simple example we are going to see how the Cayley-Hamilton theorem is used to compute a matrix exponential Consider again the matrix 0 1, 2 3 where n 2 To compute e At, note that the characteristic polynomial of A is: χ A λ detλi A λ + 1λ + 2 λ 1 1, λ 2 2 Let fλ : e λ t We are looking for a first-order polynomial gλ g 1 λ + g 0 such that Eq 123 is satisfied That is: gλ i e λi, i 1, 2 The coefficients g 0 and g 1 can be found from: { { { g1 λ 1 + g 0 e λ1t g1 + g g 1 λ 2 + g 0 e λ2t 0 e t g0 2e 2g 1 + g 0 e 2t t e 2t g 1 e t e 2t Due to Theorem 2, we have fa ga, that is, e At 2e g 1 A + g 0 I t e 2t e t e 2t 2e t e 2t e t 2e 2t i1
6 GIANANTONIO BORTOLIN AND RYOZO NAGAMUNE Example 8 Let us consider the following matrix A: 0 1 0 1 1 0 2 0 1 0 1 0 3 We want to determine the transition matrix Φt, s First of all, we should note that A is a constant block diagonal matrix, that is diaga 1, A 2, A 3 where: A 1 0 1 0 1, A 2 1 0, A 3 2 0 1 0 1 0 3 and so we have that Φt, s e At s diage A1t s, e A2t s, e A3t s Hence, let us compute each block one by one: 1: A 1 is a shift matrix, that is A 2 1 0 Therefore: e A1t I + A 1 t 2: A 2 is a typical case of oscillatory solution In general, given a 2 2 matrix F which has a couple of complex conjugate eigenvalues, λ 1,2 σ ± jω, it is always possible to find a change of basis so that F can be written in the form: σ ω F ω σ From Example 6, e F t e σt cosωt e σt sinωt e σt sinωt e σt cosωt Therefore: e A2t cost sint sint cost 3: To compute e A3t we can use the Cayley-Hamilton theorem First, let us compute the eigenvalues of A 3 : detλi A λ 1 2 λ 2 and so we have the eigenvalue λ 1 1 with multiplicity 2, and the eigenvalue λ 2 2 with multiplicity 1 We are thus looking for a 2-nd order polynomial gλ g 2 λ 2 + g 1 λ + g 0 such that: gλ 1 e λ1t d, dλ gλ λλ 1 d dλ eλt λλ1, and gλ 2 e λ2t By substituting the numerical values we get: g 2 + g 1 + g 0 e t 2g 2 + g 1 te t 4g 2 + 2g 1 + g 0 e 2t g 0 2te t + e 2t g 1 2e t + 3te t 2e 2t g 2 e t te t + e 2t
SYSTEMTEORI - ÖVNING 1 7 Finally, we have that: e A3t 2te t + e 2t I + 3te t + 2e 2 2e 2t A + e 2t e t te t A 2 2 Solution of linear time varying autonomous systems In the time varying case, the solution to the linear system with input 21 ẋt Atxt + Btut is written as 22 xt Φt, t 0 x0 + t t 0 Φt, τbτuτdτ, where Φt, s is a transition matrix The question is how to compute this transition matrix If matrices At and t Aτdτ commute, then Φt, s can be computed by s 23 Φt, s e t s Aτdτ Remark 6 Note that, in the time invariant case constant A, this reduces to 24 Φt, s e At s Example 9 Exercise 113 Let us consider the following linear time varying system LTV: cost 4/t 1/t ẋt xt Atxt 4/t cost We want to determine the transition matrix Φt, s We can express At as: 1 0 At cost + 1 4 1 I cost + K 1 0 1 t 4 0 t First, let us compute the integral of At: Bt, s t s I cosτ + 1 τ Kdτ sint sinsi + ln t s K Note that Bt, s and A commute, that is AtBt, s Bt, sat In such a case, see remark 213 in the compendium, the transition matrix is: Φt, s expbt, s expsint sinsi + ln t s K Note that K and I commute To calculate expln t s K we can use the Laplace transform: { e xk L 1 s + 4 1 4 s So, by setting x lnt/s we get: Φt, s expsint sins s2 t 2 } 1 1 2x x 4x 1 + 2x e 2x 1 2 lnt/s lnt/s 4 lnt/s 1 + 2 lnt/s The following is an example where matrices At and t Aτdτ do not commute s
8 GIANANTONIO BORTOLIN AND RYOZO NAGAMUNE Example 10 Exercise 114 Let us consider the following LTV system: 0 ẋt xt + ut Atxt + But t 1/t 1 We want to determine the transition matrix Φt, s Like before, let us compute the following integral: t Bt, s Aτdτ t 2 s 2 /2 ln t s Do Bt, s and A commute? s [At, Bt, s] : AtBt, s Bt, sat t 2 s 2 1 2t t ln t s t ln t s 1 t ln t s 0 Unfortunately in this case they do not commute, and so we cannot use the formula 23 to compute the transition matrix However, in this example, we can compute the transition matrix in the following way ẋ 1 0 x 1 x 10 ẋ 2 tx 1 + 1 t x 2 The solution of x 2 t can be computed using standard solution formula 22, with the transition matrix for the system equation for x 2 : 25 Φ 2 t, s : e t s 1/τdτ t/s Therefore, 26 27 We have 28 t x 2 t Φ 2 t, t 0 x 20 + Φ 2 t, τ τx 10 dτ, t 0 x1 t x 2 t t t 0 x 20 + tt t 0 x 10 1 0 x10 tt t 0 t/t 0 x 20 Therefore, the transition matrix is given by: 1 0 Φt, s tt s t/s