WOLFRAM SYSTEM MODELER

discreteLyapunov

Return solution X of the discrete-time Lyapunov equation A'*X*A + sgn*X = C

Wolfram Language

In[1]:=
SystemModel["Modelica.Math.Matrices.discreteLyapunov"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

X = Matrices.discreteLyapunov(A, C);
X = Matrices.discreteLyapunov(A, C, ATisSchur, sgn, eps);

Description

This function computes the solution X of the discrete-time Lyapunov equation

A'*X*A + sgn*X = C

where sgn=1 or sgn =-1. For sgn = -1, the discrete Lyapunov equation is a special case of the Stein equation:

A*X*B - X + Q = 0.

The algorithm uses the Schur method for Lyapunov equations proposed by Bartels and Stewart [1].

In a nutshell, the problem is reduced to the corresponding problem

R*Y*R' + sgn*Y = D.

with R=U'*A'*U is the real Schur form of A' and D=U'*C*U and Y=U'*X*U are the corresponding transformations of C and X. This problem is solved sequentially by exploiting the block triangular form of R. Finally the solution of the original problem is recovered as X=U*Y*U'.
The Boolean input "ATisSchur" indicates to omit the transformation to Schur in the case that A' has already Schur form.

References

[1] Bartels, R.H. and Stewart G.W.
    Algorithm 432: Solution of the matrix equation AX + XB = C.
    Comm. ACM., Vol. 15, pp. 820-826, 1972.

Example

A = [1, 2,  3,  4;
     3, 4,  5, -2;
    -1, 2, -3, -5;
     0, 2,  0,  6];

C =  [-2,  3, 1, 0;
      -6,  8, 0, 1;
       2,  3, 4, 5;
       0, -2, 0, 0];

X = discreteLyapunov(A, C, sgn=-1);

results in:

X  = [7.5735,   -3.1426,  2.7205, -2.5958;
     -2.6105,    1.2384, -0.9232,  0.9632;
      6.6090,   -2.6775,  2.6415, -2.6928;
     -0.3572,    0.2298,  0.0533, -0.27410];

See also

Matrices.discreteSylvester, Matrices.continuousLyapunov

Syntax

X = discreteLyapunov(A, C, ATisSchur, sgn, eps)

Inputs (5)

A

Type: Real[:,size(A, 1)]

Description: Square matrix A in A'*X*A + sgn*X = C

C

Type: Real[size(A, 1),size(A, 2)]

Description: Square matrix C in A'*X*A + sgn*X = C

ATisSchur

Default Value: false

Type: Boolean

Description: = true, if transpose(A) has already real Schur form

sgn

Default Value: 1

Type: Integer

Description: Specifies the sign in A'*X*A + sgn*X = C

eps

Default Value: Matrices.norm(A, 1) * 10 * Modelica.Constants.eps

Type: Real

Description: Tolerance eps

Outputs (1)

X

Type: Real[size(A, 1),size(A, 2)]

Description: Solution X of the Lyapunov equation A'*X*A + sgn*X = C

Revisions

  • 2010/05/31 by Marcus Baur, DLR-RM