Matrixeqs Lyapunov
Matrixeqs Lyapunov
Lyapunov equation
(5.1)
x5.1
A naive approach
The equation (5.1) is a linear system of equations, expressed in a
somewhat unusual form. We will now see that (5.1) can be reformulated as a linear system of equations in standard form, by using
techniques called vectorization and Kronecker products. If B Rnm
with columns (b1 , . . . , bm ) = B, the vectorization operation is defined
as the stacking of the columns into a vector,
b1
.
nm
vec( B) :=
.. R .
bm
Traditionally driven by certain problems in system and control, the Lyapunov equation now appears in very
large number of fields. The developments and improvements of numerical
methods have (and continues to be)
recognized as important in numerical
linear algebra.
a11 B a1m B
.
..
njmk
..
AB =
.
.
. R
..
an1 B anm B
Lecture notes - Elias Jarlebring - Autumn 2014
1
version:2014-10-22
(5.2)
= vec(W )
( I A + A I ) vec( X ) = vec(W )
(5.3)
(5.4)
Some gains in complexity are feasable by using more advanced versions of Gaussian elimination to solve (5.3), or exploiting sparsity in
I A + A I. These improved variants will not be computationally competitive for large n in comparison to the algorithms in the
following sections.
Although this approach is not competitive for large n, it can be
useful for small n, and (as we shall see below) as a component in a
numerical method for large n.
Lecture notes - Elias Jarlebring - Autumn 2014
2
version:2014-10-22
x5.2
Bartels-Stewart algorithm
From previous lectures we know that there are efficient algorithms
that can compute the Schur decomposition of a matrix. It turns out
that this can be used as a precomputation such that we obtain a triangular Lyapunov equation. The resulting equation can be efficiently
solved in direct way with a finite number of operations, by using a
type of substitution.
Recall that all real matrices have a real square Schur decomposition: There exists matrices Q and T such that
A = QTQ T ,
where Q is an orthogonal matrix and T Rnn a block-triangular
matrix, where
T11 T1,r
..
..
T=
(5.6)
.
.
Tr,r
and Tjj Rn j n j , n j {1, 2}, j = 1, . . . , r and rj=1 nr = n.
We multiply the Lyapunov equation (5.1) from the right and left
with Q and Q T respectively,
Q T WQ
= Q T AXQ + Q T XAQ =
(5.7a)
= Q T AQQ T XQ + Q T XQQ T AQ =
(5.7b)
= TY + YT
Use QQ T = I.
(5.7c)
T
T
R11 Z11 + R12 Z21 + Z11 R11
+ Z12 R12
C21
R22 Z21 +
C22
R22 Z22 +
T
Z21 R11
+
T
Z22 R22 .
C12
T
Z12 R22
T
Z22 R12
(5.9a)
(5.9b)
General idea: Solve (5.9b)-(5.9d) explicitly. Insert the solution into (5.9a)
and repeat the process for the smaller
equation which is a Lyapunov equation
with unknown Z11 R(nnr )(nnr ) .
(5.9c)
(5.9d)
version:2014-10-22
C22
.
2R22
(5.10)
If nr = 2 we can still solve (5.9d) cheaply since it is a 2 2 Lyapunov equation. For instance, we can use the naive approach (5.4),
i.e.,
vec( Z22 ) = ( I R22 + R22 I )1 vec(C22 ).
(5.11)
Insert the now known matrix Z22 into (5.9b) and transposed (5.9c),
yields
C 12 := C12 R12 Z22
T
T
C 21 := C21
R12 Z22
T
R11 Z12 + Z12 R22
(5.12a)
T
R11 Z21
(5.12b)
T T
Z21
R22 .
X1
D1
.
.
N nr
N n p
X=
, D=
.. R
.. R
X p 1
D p 1
p 1
(5.13)
U11
U1,p1
..
..
U=
.
.
U p1,p1
where Ui,j Rni n j .
then X j , p 1, p 2, . . . , 1 satisfy
T
Ujj X j + X j R22
= D j
(5.14)
j := D j p1 Uji Xi .
where D
i = j +1
Similar to the approach we used to compute Z22 , X j can expressed
and computed explicitly from a small linear system
j)
vec( X j ) = ( I Tjj + R22 I )1 vec(W
(5.15)
version:2014-10-22
2
3
4
5
6
R11 =
8
9
10
11
12
13
14
15
16
T11
T1,k1
..
,
.
Tk1,k1
..
.
R12
T1,k
.
=
..
Tk1,k
version:2014-10-22
x5.3
x5.4
Applications
The research and developments on numerical methods for Lyapunov
equations was initially driven by applications in the field of systems
and control. There are now applications appearing in many completely different fields. Some specific applications are listed below.
The so-called infinite-time gramian of contious time linear dynamical system is the solution to a Lyapunov equation. Gramians can be
used
to study stability, controllability and observability;
to compute the H2 -norm which is important in for instance controller design;
to compute bounds and characterisations of transient effects;
to design an optimal control; and
to compute a reduced order model with balanced truncation.
The Lyapunov equation also appears as a part in numerical methods for stability radius, and in the study of robust stability of large
sparse time-delay systems.
A discretization of Helmholtz equation u = f on a square
domain with homogeneous boundary conditions using finite difference with uniform grid, leads to a linear system of equations
( Dxx I + I Dxx )u = b. This is a vectorized Lyapunov equation.
It can consequently be solved efficiently with, e.g., Bartels-Stewart
method. A Lyapunov equation approach can be useful for more
advanced discretizations of more complicated PDEs, by using a Lyapunov equation solver in the preconditioning.
There are also applications in numerical methods for matrix functions, tensor approximation problems (used for instance in computational methods for the electronic Schrdinger equation), . . . .
* KTH Mechanics department use Lyapunov equations: ftp://www2.mech.kth.se/pub/shervin/review.pdf
* Kressner/Tobler approach
x5.5
version:2014-10-22
x5.6
version:2014-10-22
x5.7
Exercises
1. Implement the naive approach as well as the Bartels-Stewart
method based on the skeleton code on the course web page. Compare the methods by using simulations for random matrices. Illustrate (with figure) the dependence of the computation time on n.
What is the observed complexity?
2. Prove (5.2).
3. Show that
vec(uv T ) = v u.
for any u, v Rn .
4. Consider the problem
A=
0
1
!
a
, W=
0
1
2
!
2
.
1
( A B)(C D ) = ( AC ) ( BD ).
6. Prove Theorem 5.1.1.
Hint: Use previous exercise to first show that if v j , vi are two eigenvectors of A, then v j vi is an eigenvector of I A + A I.
y(t)
= c T x ( t ),
Ax (t) + bu(t)
version:2014-10-22
Z t
0
Z t
0
Po, Rnn as t
Pc (t)
Pc, Rnn as t
1
y(t)2 dt
2 0
c) Show that the H2 norm can be computed from either controllability or observability gramian by showing
kk2H2 =
kk2H2
= c T Po, c
(5.16a)
(5.16b)
= b Pc, b
f ( x, y) for ( x, y)
= 0 for ( x, y) ,
(5.17)
for Ui,j u( xi , y j ).
(b) Derive explicit expression for the eigenvalues of I Dxx +
Dxx I in the limit m , and show that I Dxx + Dxx I is
nonsingular in the limit.
(Optional: The eigenvalues have closed forms also for finite m.
Compute these and show that I Dxx + Dxx I is non-singular
for any m.)
Lecture notes - Elias Jarlebring - Autumn 2014
9
version:2014-10-22
Project suggestions
Graduate level projects related to Lyapunov equations:
Alternating Direction Implicit (ADI)
Bartels-Stewart algorithm for the Sylvester equation
Balancing and balanced trunctation: Use the Lyapunov equation
for model order reduction
Lecture notes - Elias Jarlebring - Autumn 2014
10
version:2014-10-22
x5.8
References
[1] R. Bartels and G. W. Stewart. Solution of the matrix equation
AX + XB = C. Comm A.C.M., 15(9):820826, 1972.
[2] V. Simoncini. A new iterative method for solving large-scale
Lyapunov matrix equations. SIAM J. Sci. Comput., 29(3):1268
1288, 2007.
version:2014-10-22