Learn R Programming

netcontrol (version 0.1)

dlyap: Discrete Lyapunov Equation Solver

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

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

barraud_numerical_1977netcontrol

datta_numerical_2004netcontrol

Examples

Run this code
# NOT RUN {
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)))
# }

Run the code above in your browser using DataLab