dlyap: Discrete Lyapunov Equation Solver

Description Usage Arguments Value References Examples

View source: R/dlyap.R

Description

Computes the solution of AXA^T - X + W = 0 using the Barraud 1977 approach, adapted from Datta 2004. This implementation is equivalent to the Matlab implementation of dylap.

Usage

1
dlyap(A, W)

Arguments

A

n x n numeric or complex matrix.

W

n x n numeric or complex matrix.

Value

The solution to the above Lyapunov equation.

References

\insertRef

barraud_numerical_1977netcontrol

\insertRef

datta_numerical_2004netcontrol

Examples

1
2
3
4
5
A = matrix(c(0,-3,-2,2,-2,1,-1,2,-1), 3,3)
C = matrix(c(-2,-8,11,2,-6,13,-3,-5,-2), 3,3)
X = dlyap(t(A), C)

print(sum(abs(A %*% X %*% t(A) - X + C)))

Example output

[1] 2.309264e-13

netcontrol documentation built on March 26, 2020, 7:25 p.m.