functionrealSchur

Return the real Schur form (rsf) S of a square matrix A, A=QZ*S*QZ'

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

                            S = Matrices.realSchur(A);
(S, QZ, alphaReal, alphaImag) = Matrices.realSchur(A);

Description

Function realSchur calculates the real Schur form of a real square matrix A, i.e.

A = QZ*S*transpose(QZ)

with the real nxn matrices S and QZ. S is a block upper triangular matrix with 1x1 and 2x2 blocks in the diagonal. QZ is an orthogonal matrix. The 1x1 blocks contains the real eigenvalues of A. The 2x2 blocks [s11, s12; s21, s11] represents the conjugated complex pairs of eigenvalues, whereas the real parts of the eigenvalues are the elements of the diagonal (s11). The imaginary parts are the positive and negative square roots of the product of the two elements s12 and s21 (imag = +-sqrt(s12*s21)).

The calculation in lapack.dgees is performed stepwise, i.e., using the internal methods of balancing and scaling of dgees.

Example

   Real A[3,3] = [1, 2, 3; 4, 5, 6; 7, 8, 9];
   Real T[3,3];
   Real Z[3,3];
   Real alphaReal[3];
   Real alphaImag[3];

algorithm
  (T, Z, alphaReal, alphaImag):=Modelica.Math.Matrices.realSchur(A);
//   T = [16.12, 4.9,   1.59E-015;
//        0,    -1.12, -1.12E-015;
//        0,     0,    -1.30E-015]
//   Z = [-0.23,  -0.88,   0.41;
//        -0.52,  -0.24,  -0.82;
//        -0.82,   0.4,    0.41]
//alphaReal = {16.12, -1.12, -1.32E-015}
//alphaImag = {0, 0, 0}

See also

Math.Matrices.Utilities.reorderRSF

Inputs

TypeNameDefaultDescription
Real[:,size(A, 1)]ASquare matrix

Outputs

TypeNameDefaultDescription
Real[size(A, 1),size(A, 2)]SReal Schur form of A
Real[size(A, 1),size(A, 2)]QZSchur vector Matrix
Real[size(A, 1)]alphaRealReal part of eigenvalue=alphaReal+i*alphaImag
Real[size(A, 1)]alphaImagImaginary part of eigenvalue=alphaReal+i*alphaImag

Revisions

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