SciPy

scipy.linalg.solve_discrete_lyapunov

scipy.linalg.solve_discrete_lyapunov(a, q)[source]

Solves the Discrete Lyapunov Equation (A’XA-X=-Q) directly.

New in version 0.11.0.

Parameters:

a : (M, M) array_like

A square matrix

q : (M, M) array_like

Right-hand side square matrix

Returns:

x : ndarray

Solution to the continuous Lyapunov equation

Notes

Algorithm is based on a direct analytical solution from: Hamilton, James D. Time Series Analysis, Princeton: Princeton University Press, 1994. 265. Print. http://www.scribd.com/doc/20577138/Hamilton-1994-Time-Series-Analysis