Escolar Documentos
Profissional Documentos
Cultura Documentos
Enrico Bertolazzi
Integration lectures for the Course:
Numerical Methods for Dynamical System and Control
Accademic Year 2009/2010
Contents
1 Computing matrix exponential for diagonalizable matrices
2 Computing matrix exponential for general
2.1 Using Jordan normal form . . . . . . . . .
2.2 Using CayleyHamilton theorem . . . . . .
2.3 Using numerical integration . . . . . . . .
2.4 Using Pade approximation and squaring .
square matrices
4
. . . . . . . . . . . 4
. . . . . . . . . . . 7
. . . . . . . . . . . 10
. . . . . . . . . . . 12
X
xk
k=0
k!
=1+x+
x2 x3
xp
+
+ +
+
2
6
p!
X
1 k
1
1
1
e =
A = I + A + A2 + A3 + + Ap +
k!
2
6
p!
k=0
A
(1)
The first question is: when the series (1) is convergent? To respond to the
question we recall the following facts:
1
L = lim
then
then
If L < 1 the series converges absolutely.
If L > 1 the series diverges.
If the limit is equal to 1 the series can be convergent or divergent.
Theorem 1 The series (1) is convergent for all square matrix A Rnn .
Moreover
A
e
nekAkF
(2)
F
where
v
uX
u n
kAkF = t
A2i,j
i,j=1
ak
where
ak =
k=0
1
(Ak )ij
k!
1 k
A . It is easy to verify that
k!
k
A
kAkk
F
F
X
X
X
1
1
1
k
k
ak =
A F
(A )ij
kAkkF = ekAkF
k!
k!
k!
k=0
k=0
k=0
k=0
in conclusion the series (1) is convergent for each component and inequality
(2) is trivially verified.
Let be A Rnn symmetric, then the matrix has a complete set of linear
independent eigenvectors v1 , v2 , . . . , vn :
Avk = k vk ,
k = 1, 2, . . . , n.
Thus, defining the matrix T = [v1 , v2 , . . . , vn ] whose columns are the eigenvectors we have
AT = [Av1 , Av2 , . . . , Avn ] = [1 v1 , 2 v2 , . . . , n vn ] = T
and thus A = T T 1 where
1
2
..
.
n
X
1 k X 1
A
e =
A =
(T T 1 )k = T
k!
k!
k=0
k=0
X
1 k
k!
k=0
!
T 1 = T e T 1 ,
and hence
A
e =T
2
2.1
e1
e 2
...
en
1
T
k 1
J1
..
J
.
2
k
and
Jk =
J =
...
...
Jm
k
The column of T = [t1,1 , t1,2 , . . . , tm,nm , tm,nm 1 ] are generalized eigenvectors,
i.e.
(
k tk,j
if j = 1
Atk,j =
(3)
k tk,j + tk,j1 if j > 1
X
1 k X 1
A =
(T T 1 )k
e =
k!
k!
k=0
k=0
X
1 k
J1
k=0 k!
J2
k!
k=0
=T
...
=T
J =
eJ1
1
T
1
Jm
k!
k=0
eJ2
...
eJm
1
T
0 1
1
...
...
1
0
=
+
.
.
..
..
. . 1 (4)
. 1
1
0
= I + N
0 0
..
2
N =
...
and in general N k as ones on the k-th upper diagonal and is the null matrix
if k n the dimension of the matrix. Using (4) we have
J
k
X
X
1 k X 1
1 X k kj j
k
=
J =
(I + N ) =
N
k!
k!
k! j=0 j
k=0
k=0
k=0
k
X
X
k=0 j=0
X
k=0 j=0
1
kj N j
(k j)!j!
1
kj N j 1kj
(k j)!j!
1i =
1 if i 0
0 otherwise
X
1 jX
1
N
kj 1kj
j!
(k j)!
j=0
k=0
n1
X
X
1 jX 1 k
1 j
N
=e
N
=
j!
k!
j!
j=0
j=0
k=0
or explicit
e
1
1 2
1
n1
= e I + N + N + +
N
,
1!
2!
(n 1)!
1 1/1!
1/(n 1)!
...
=e
..
.
1/1!
2.2
X
1 k X
rk (A),
A =
e =
k!
k=0
k=0
A
n1
X
ak A k ,
k=0
X
X
1 k
1 k
e v=
A v=
v = e v
k!
k!
k=0
k=0
A
analogously
n1
X
n1
X
ak A k v =
k=0
!
ak k
k=0
ak kj = ej ,
j = 1, 2, . . . , n
(5)
k=0
Av2 = v2 + v1 ,
then we have
A2 v2 = Av2 + Av1 ,
= (v2 + v1 ) + v1 ,
= 2 v2 + 2v1 ,
and again
A3 v2 = A 2 v2 + 2v1 ,
= 2 Av2 + 2Av1 ,
= 2 (v2 + v1 ) + 2Av1 ,
= 3 v2 + 32 v1 ,
and in general
Ak v2 = k v2 + kk1 v1 ,
(6)
X
X
1 k
1 k
A v2 =
v2 + kk1 v1 ,
e v =
k!
k!
k=0
k=0
A 2
X
X
1 k1
1 k
v2 +
k v1 ,
=
k!
k!
k=0
k=0
(7)
X
X
1 k
1
v2 +
k1 v1 ,
k!
(k
1)!
k=0
k=0
= e v1 + e v2
using (6) in a polynomial matrix we have
p(A)v2 =
m
X
pk Ak v2 ,
k=0
m
X
pk k v2 + kk1 v1 ,
(8)
k=0
= p()v2 + p0 ()v1
from (7) and (8) we have that p() = p0 () = e for a multiple eigenvalue.
In general it can be proved that if is an eigenevalue of multiplicity m we
have
p() = p0 () = = p(m1) () = e .
thus using eigenvalues with their multiplicity we have an Hermite interpolation problem with enough conditions to determine uniquely the polynomial.
Example 1 Consider the matrix
4 4 4 1
A=
2 1 1 2
0
0
9
we have
() = |A I| = 24 44 + 302 93 + 4
which can be factorized as
() = ( 2)3 ( 3)
The matrix exponential is a polynomial p(A) where p(x) = p0 + p1 x + p2 x2 +
p4 x3 , to determine p(x) we use interpolation conditions:
p(2) = p0 + 2p1 + 4p2 + 8p4 = e2 ,
p0 (2) =
p1 + 4p2 + 12p4
= e2 ,
p00 (2) =
2p2 + 12p4
= e2 ,
5
p3 = e2 + e3 ,
2
31 2
e 6 e3 ,
2
4
A
2
e =e
2
0
2.3
p1 = 31 e2 + 12 e3 ,
have
2 3 1/2
3 0
1 2
0 0
0 0
+ e3
2 1 1 1
0 0
2 1 1 1
X(0) = I,
(9)
k = 0, 1, . . . , m 1
etA Xm .
for example using explicit Euler scheme we have
X0 = I
Xk+1 = Xk + tAXk = (I + tA)Xk ,
k = 0, 1, . . . , m 1 (10)
etA Xm = (I + tA)m .
or using implicit Euler scheme we have
X0 = I
Xk+1 = Xk + tAXk+1 ,
k = 0, 1, . . . , m 1
etA Xm = (I tA)m .
Remark 2 The computation can be reduced choosing the number of steps
m as a power of two m = 2p is this case the matrix multiplication can be
11
k = 0, 1, . . . , p 1
etA Rp .
Remark 3 Choosing t = t i.e m = 1 only one step and using Taylor
expansion as advancing numerical scheme we obtain again the taylor series
approximation of the matrix exponential
2.4
Xk+1 = Xk +
etA
(11)
k = 0, 1, . . . , p 1
etA Xp .
Procedure (12) can be generalized by observing
etA = e(tA/m)m = e(tA)/m
m
12
(12)
k = 0, 1, . . . , p 1
etA Xp .
when p = 0 the rational polynomial P (x)/Q(x) approximate ex . The key idea
of the squaring algorithm is to choose p large enough to have kt2p Ak C
where C is a small constant (e.g. 1 or 1/2) where the rational polynomial
P (z)/Q(z) is a good approximation of ez for z C and |z| C.
To approximate exponential with a rational polynomial we can use Pade
procedure with schematically determine the coefficients of P (x) and Q(x) by
matching the product
Q(x)ex P (x) = O(xr )
with r the maximum possibile.
Example 2 Let P (x) = 1 + p1 x and Q(x) = q0 + q1 x then
x2 x3
4
+
+ O(x ) (1 + p1 x) =
(q0 + q1 x) 1 + x +
2
6
q0 1 + x(q0 + q1 p1 ) +
x2
x3
(q0 + 2q1 ) + (q0 + 3q1 ) + O(x4 )
2
6
q0 = 1
q0 + q 1 p1 = 0
q0 + 2q1 = 0
q0 + 3q1 = 0
which has the solution q0 = 1, q1 = 1/2, p1 = 1/2 and the rational polynomial is P (x)/Q(x) = (1 + x/2)/(1 x/2).
Using (for example) procedure of example 2 we have the followiong table
13
1
1
1+z
1
2
1 + z + z2
1
2
1 + z + z2 +
1
z3
6
1
1z
1 + z2
1 z2
2
+ z6
1 + 2z
3
1 z3
2
+ z4 +
1 + 3z
2
1 z4
1
1z+
1 + z3
1
2
1 z + z2
1 + z4
z2
2
2
+ z6
1 2z
3
z2
1 + z2 + 12
+ z4
1 3z
2
z2
+ 20
1 + 2z
5
z3
24
z
1 z2 + 12
2
+ 3z
+
1 + 3z
5
20
14
2z
5
z2
20
z3
60
z3
24
2
z3
3z
+ 3z
60
5
20
z2
z3
2z
+ 10
+ 120
5
z2
z3
z2 + 10
120
1
1+
1
z3
6