lyap: Algebraic Lyapunov equation A*X+X*t(A)+Q=0

View source: R/sdetools.R

lyapR Documentation

Algebraic Lyapunov equation A*X+X*t(A)+Q=0

Description

Algebraic Lyapunov equation A*X+X*t(A)+Q=0

Usage

lyap(A, Q)

Arguments

A

A quadratic matrix without eigenvalues on the imaginary axis

Q

A symmetric matix of same dimension as A

Details

If A is asymptotically stable, Q is positive semidefinite and the pair (A,Q) is controllable, then X will be positive definite. Several similar results exist. The implementation uses vectorization and kronecker products and does not employ sparsity, so is only suitable for small systems.

Value

X A symmetric matrix of same dimension as A

Examples

# A scalar example
(lyap(-1,1))
# A harmonic oscillator
(lyap(array(c(0,-1,1,-0.1),c(2,2)),diag(c(0,1))))


Uffe-H-Thygesen/SDEtools documentation built on Jan. 15, 2025, 6:41 p.m.