clyap: Solve continuous-time Lyapunov equations

Description Usage Arguments Details Value Examples

View source: R/gclm.R

Description

clyap solve the continuous-time Lyapunov equations

BX + XB' + C=0

Using the Bartels-Stewart algorithm with Hessenberg–Schur decomposition. Optionally the Hessenberg-Schur decomposition can be returned.

Usage

1
clyap(B, C, Q = NULL, all = FALSE)

Arguments

B

Square matrix

C

Square matrix

Q

Square matrix, the orthogonal matrix used to transform the original equation

all

logical

Details

If the matrix Q is set then the matrix B is assumed to be in upper quasi-triangular form (Hessenberg-Schur canonical form), as required by LAPACK subroutine DTRSYL and Q is the orthogonal matrix associated with the Hessenberg-Schur form of B. Usually the matrix Q and the appropriate form of B are obtained by a first call to clyap(B, C, all = TRUE)

clyap uses lapack subroutines:

Value

The solution matrix X if all = FALSE. If all = TRUE a list with components X, B and Q. Where B and Q are the Hessenberg-Schur form of the original matrix B and the orthogonal matrix that performed the transformation.

Examples

1
2
3
4
5
6
7
B <- matrix(data = rnorm(9), nrow = 3)
## make B negative diagonally dominant, thus stable:
diag(B) <- - 3 * max(B) 
C <- diag(runif(3))
X <- clyap(B, C)
## check X is a solution:
max(abs(B %*% X + X %*% t(B) + C)) 

gclm documentation built on July 1, 2020, 10:35 p.m.

Related to clyap in gclm...