scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
solve_continuous_lyapunov(a, q)

Uses the Bartels-Stewart algorithm to find $X$ .

Notes

The continuous Lyapunov equation is a special form of the Sylvester equation, hence this solver relies on LAPACK routine ?TRSYL.

versionadded

Parameters

a : array_like

A square matrix

q : array_like

Right-hand side square matrix

Returns

x : ndarray

Solution to the continuous Lyapunov equation

Solves the continuous Lyapunov equation $AX + XA^H = Q$ .

See Also

solve_discrete_lyapunov

computes the solution to the discrete-time Lyapunov equation

solve_sylvester

computes the solution to the Sylvester equation

Examples

Given a and q solve for x:

>>> from scipy import linalg
... a = np.array([[-3, -2, 0], [-1, -1, 0], [0, -5, -1]])
... b = np.array([2, 4, -1])
... q = np.eye(3)
... x = linalg.solve_continuous_lyapunov(a, q)
... x array([[ -0.75 , 0.875 , -3.75 ], [ 0.875 , -1.375 , 5.3125], [ -3.75 , 5.3125, -27.0625]])
>>> np.allclose(a.dot(x) + x.dot(a.T), 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 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#108
type: <class 'function'>
Commit: