pymor.algorithms.riccati
¶
Module Contents¶
Functions¶
Compute an approximate low-rank solution of a Riccati equation. |
|
Compute the solution of a Riccati equation. |
|
Compute an approximate low-rank solution of a positive Riccati equation. |
|
Attributes¶
- pymor.algorithms.riccati.solve_ricc_lrcf(A, E, B, C, R=None, trans=False, options=None, default_sparse_solver_backend=_DEFAULT_RICC_LRCF_SPARSE_SOLVER_BACKEND, default_dense_solver_backend=_DEFAULT_RICC_LRCF_DENSE_SOLVER_BACKEND)[source]¶
Compute an approximate low-rank solution of a Riccati equation.
Returns a low-rank Cholesky factor \(Z\) such that \(Z Z^T\) approximates the solution \(X\) of a (generalized) continuous-time algebraic Riccati equation:
if trans is
False
\[A X E^T + E X A^T - E X C^T R^{-1} C X E^T + B B^T = 0.\]if trans is
True
\[A^T X E + E^T X A - E^T X B R^{-1} B^T X E + C^T C = 0.\]
If E is None, it is taken to be identity, and similarly for R.
We assume:
A and E are real
Operators
,B and C are real
VectorArrays
fromA.source
,R is a real
NumPy array
,(E, A, B, C) is stabilizable and detectable, and
R is symmetric positive definite.
For large-scale problems, we additionally assume that
len(B)
andlen(C)
are small.If the solver is not specified using the options argument, a solver backend is chosen based on availability in the following order:
for sparse problems (minimum size specified by
mat_eqn_sparse_min_size
)pymess
(seepymor.bindings.pymess.solve_ricc_lrcf
),lrradi
(seepymor.algorithms.lrradi.solve_ricc_lrcf
),
for dense problems (smaller than
mat_eqn_sparse_min_size
)pymess
(seepymor.bindings.pymess.solve_ricc_lrcf
),slycot
(seepymor.bindings.slycot.solve_ricc_lrcf
),scipy
(seepymor.bindings.scipy.solve_ricc_lrcf
).
Parameters
- A
The non-parametric
Operator
A.- E
The non-parametric
Operator
E orNone
.- B
The operator B as a
VectorArray
fromA.source
.- C
The operator C as a
VectorArray
fromA.source
.- R
The matrix R as a 2D
NumPy array
orNone
.- trans
Whether the first
Operator
in the Riccati equation is transposed.- options
The solver options to use. See:
pymor.bindings.slycot.ricc_lrcf_solver_options
,pymor.bindings.pymess.ricc_lrcf_solver_options
.
- default_sparse_solver_backend
Default sparse solver backend to use (pymess, lrradi).
- default_dense_solver_backend
Default dense solver backend to use (pymess, slycot, scipy).
Returns
- Z
Low-rank Cholesky factor of the Riccati equation solution,
VectorArray
fromA.source
.
- pymor.algorithms.riccati.solve_ricc_dense(A, E, B, C, R=None, trans=False, options=None, default_solver_backend=_DEFAULT_RICC_DENSE_SOLVER_BACKEND)[source]¶
Compute the solution of a Riccati equation.
Returns the solution \(X\) of a (generalized) continuous-time algebraic Riccati equation:
if trans is
False
\[A X E^T + E X A^T - E X C^T R^{-1} C X E^T + B B^T = 0.\]if trans is
True
\[A^T X E + E^T X A - E^T X B R^{-1} B^T X E + C^T C = 0.\]
We assume:
A, E, B, C, R are real
NumPy arrays
,(E, A, B, C) is stabilizable and detectable, and
R is symmetric positive definite.
If the solver is not specified using the options argument, a solver backend is chosen based on availability in the following order:
slycot
(seepymor.bindings.slycot.solve_ricc_dense
)scipy
(seepymor.bindings.scipy.solve_ricc_dense
)
Parameters
- A
The matrix A as a 2D
NumPy array
.- E
The matrix E as a 2D
NumPy array
orNone
.- B
The matrix B as a 2D
NumPy array
.- C
The matrix C as a 2D
NumPy array
.- R
The matrix B as a 2D
NumPy array
orNone
.- trans
Whether the first matrix in the Riccati equation is transposed.
- options
The solver options to use. See:
pymor.bindings.slycot.ricc_dense_solver_options
,
- default_solver_backend
Default solver backend to use (slycot, scipy).
Returns
- X
Riccati equation solution as a
NumPy array
.
- pymor.algorithms.riccati.solve_pos_ricc_lrcf(A, E, B, C, R=None, trans=False, options=None, default_dense_solver_backend=_DEFAULT_RICC_LRCF_DENSE_SOLVER_BACKEND)[source]¶
Compute an approximate low-rank solution of a positive Riccati equation.
Returns a low-rank Cholesky factor \(Z\) such that \(Z Z^T\) approximates the solution \(X\) of a (generalized) positive continuous-time algebraic Riccati equation:
if trans is
False
\[A X E^T + E X A^T + E X C^T R^{-1} C X E^T + B B^T = 0.\]if trans is
True
\[A^T X E + E^T X A + E^T X B R^{-1} B^T X E + C^T C = 0.\]
If E is None, it is taken to be identity, and similarly for R.
If the solver is not specified using the options argument, a solver backend is chosen based on availability in the following order:
pymess
(seepymor.bindings.pymess.solve_pos_ricc_lrcf
),slycot
(seepymor.bindings.slycot.solve_pos_ricc_lrcf
),scipy
(seepymor.bindings.scipy.solve_pos_ricc_lrcf
).
Parameters
- A
The non-parametric
Operator
A.- E
The non-parametric
Operator
E orNone
.- B
The operator B as a
VectorArray
fromA.source
.- C
The operator C as a
VectorArray
fromA.source
.- R
The matrix R as a 2D
NumPy array
orNone
.- trans
Whether the first
Operator
in the positive Riccati equation is transposed.- options
The solver options to use. See:
pymor.bindings.slycot.pos_ricc_lrcf_solver_options
,pymor.bindings.pymess.pos_ricc_lrcf_solver_options
.
- default_dense_solver_backend
Default dense solver backend to use (pymess, slycot, scipy).
Returns
- Z
Low-rank Cholesky factor of the positive Riccati equation solution,
VectorArray
fromA.source
.