scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
solve_discrete_lyapunov(a, q, method=None)

Notes

This section describes the available solvers that can be selected by the 'method' parameter. The default method is direct if M is less than 10 and bilinear otherwise.

Method direct uses a direct analytical solution to the discrete Lyapunov equation. The algorithm is given in, for example, . However, it requires the linear solution of a system with dimension $M^2$ so that performance degrades rapidly for even moderately sized matrices.

Method bilinear uses a bilinear transformation to convert the discrete Lyapunov equation to a continuous Lyapunov equation $(BX+XB'=-C)$ where $B=(A-I)(A+I)^{-1}$ and $C=2(A' + I)^{-1} Q (A + I)^{-1}$ . The continuous equation can be efficiently solved since it is a special case of a Sylvester equation. The transformation algorithm is from Popov (1964) as described in .

versionadded

Parameters

a, q : (M, M) array_like

Square matrices corresponding to A and Q in the equation above respectively. Must have the same shape.

method : {'direct', 'bilinear'}, optional

Type of solver.

If not given, chosen to be direct if M is less than 10 and bilinear otherwise.

Returns

x : ndarray

Solution to the discrete Lyapunov equation

Solves the discrete Lyapunov equation $AXA^H - X + Q = 0$ .

See Also

solve_continuous_lyapunov

computes the solution to the continuous-time Lyapunov equation

Examples

Given a and q solve for x:

>>> from scipy import linalg
... a = np.array([[0.2, 0.5],[0.7, -0.9]])
... q = np.eye(2)
... x = linalg.solve_discrete_lyapunov(a, q)
... x array([[ 0.70872893, 1.43518822], [ 1.43518822, -2.4266315 ]])
>>> np.allclose(a.dot(x).dot(a.T)-x, -q)
True
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.linalg._solvers._solve_discrete_lyapunov_bilinear scipy.linalg._solvers.solve_discrete_lyapunov scipy.linalg._solvers._solve_discrete_lyapunov_direct scipy.linalg._solvers.solve_continuous_lyapunov

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/linalg/_solvers.py#234
type: <class 'function'>
Commit: