.Modelica_LinearSystems2.Math.Matrices.dare

Information

Function dare computes the solution X of the discrete-time algebraic Riccati equation

X = A'*X*A - A'*X*B*(R + B'*X*B)-1*B'*X*A + Q

using the Schur vector approach proposed by Laub [1].

It is assumed that Q is symmetric and positve semidefinite and R is symmetric, nonsingular and positive definite, (A,B) is stabilizable and (A,Q) is detectable. The assumptions are not checked in this function

The assumptions guarantee that the Hamiltonian matrix

H = [A-1, -A-1*G; Q*A-1, A' + Q*A-1*G ]

with

G = B*R-1*B'

has no eigenvalue on the unit circle and can be put to an ordered real Schur form

U'*H*U = X = [S11, S12; 0, S22]

with orthogonal similarity transformation U. X is ordered in such a way, that S11 contains the n stable eigenvalues of the closed loop system with system matrix

A - B*(R + B'*X*B)-1  *B'*X*A

If U is partitioned to

U = [U11, U12; U21, U22]

according to X, the solution X can be calculated by

X*U11 = U21.

The algorithm uses LAPACK routines dgehrd (to compute the upper Hessenberg matrix of H), dorghr (to calculate the orthogonal matrix from the elementary reflectors as returned from dgehrd), dhseqr (to put transformed H to Schur form and to calculate the eigenvalues of the closed loop system) and dtrsen (to compute the ordered real Schur form and matrix U).

References

 [1] Laub A.J. (1979):
A Schur Method for Solving Algebraic Riccati equations. IEEE Trans. Auto. Contr., AC-24, pp. 913-921.
 

Interface

function dare
  import MatricesMSL = Modelica.Math.Matrices;
  import Modelica_LinearSystems2.Math.Matrices;
  import Modelica_LinearSystems2.Math.Complex;
  input Real A[:, size(A, 1)];
  input Real B[size(A, 1), :];
  input Real R[size(B, 2), size(B, 2)] = identity(size(B, 2));
  input Real Q[size(A, 1), size(A, 1)] = identity(size(A, 1));
  input Boolean refine = false;
  output Real X[size(A, 1), size(A, 2)] "Orthogonal matrix of the Schur vectors associated to ordered rsf";
  output Complex ev[size(A, 1)] "Eigenvalues of the closed loop system";
end dare;

Revisions

Date Author Comment
2010-05-31 Marcus Baur, DLR-RM Realization

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos