ControlMatrixEquations.jl
Solvers for Sylvester, Lyapunov, and Riccati Equations
Install / Use
/learn @olof3/ControlMatrixEquations.jlREADME
ControlMatrixEquations.jl
Solvers for Sylvester, Lyapunov and Riccati Equations
Numerous forms of the matrix equations below (in terms of symbols, signs, and transposes) occur in the literature and other software packages. The ones used for this package were chosen to be sensible in a control setting, but is WIP.
Linear matrix equations
The packages provides direct solvers based a vanilla implementation of Bartels–Stewart's algorithm.
If there is no method schur for the A or the B matrix, there is a fallback to the "naive" (Kronecker product) method, this is useful for, e.g., symbolic equations.
Sylvester Equations
sylvc(A, B, C)solvesAX + BX = Csylvd(A, B, C)solvesAXB - X = Csylvg(A, B, C, E, F)solvesAXB + EXF = C
Lyapunov Equations
lyapc(A, Q)solvesAX + XA' = -Qlyapd(A, Q)solvesAXA' - X = -Qlyapc(A, Q, E)solvesAXE' + EXA' = -Q(will possibly be changed to tolyapcg(E, A, Q))lyapd(A, Q, E)solvesAXA' - EXE' = -Q
Riccati Equations
Schur-factorization based Riccati solvers, including extended pencil versions that handle singular and near singular R matrices.
arec(A, B, Q, R, S)solves the equationA'X + XA - (XB + S)/R(XB + S)' + Q = 0ared(A, B, Q, R, S)solves the equationA'XA - X - (A'XB + S)/(B'XB + R)(A'XB + S)' + Q = 0arecg(E, A, B, Q, R, S)solves the equationA'XE + E'XA - (E'XB + S)/R(E'XB + S)' + Q = 0aredg(E, A, B, Q, R, S)solves the equationA'XA - E'XE - (A'XB + S)/(B'XB + R)(A'XB + S)' + Q = 0
See Arnold & Laub (1984) "Generalized eigenproblem algorithms and software for algebraic Riccati equations."
