scipy.linalg.solve_continuous_lyapunov¶
- scipy.linalg.solve_continuous_lyapunov(a, q)[源代码]¶
解连续李雅普诺夫方程 \(AX + XA^H = Q\) 。
使用Bartels-Stewart算法查找 \(X\) 。
- 参数
- aarray_like
方阵
- qarray_like
右侧方阵
- 退货
- xndarray
连续Lyapunov方程的解
参见
solve_discrete_lyapunov
计算离散时间Lyapunov方程的解
solve_sylvester
计算西尔维斯特方程的解
注意事项
连续Lyapunov方程是Sylvester方程的一种特殊形式,因此该求解器依赖于LAPACK例程TRSYL。
0.11.0 新版功能.
示例
给定的 a 和 q 解算 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