pymor.solvers.matrix_equations.equations¶
Module Contents¶
- class pymor.solvers.matrix_equations.equations.LyapunovEquation(A, E, B, trans=False, cont_time=True, name=None)[source]¶
Bases:
pymor.core.base.ImmutableObjectA (generalized) continuous- or discrete-time Lyapunov equation.
With \(E\) taken to be the identity if
None, forcont_timeTrue:if
transisFalse:\[A X E^T + E X A^T + B B^T = 0,\]if
transisTrue:\[A^T X E + E^T X A + B^T B = 0.\]
If
cont_timeisFalse, the discrete-time equation is described:if
transisFalse:\[A X A^T - E X E^T + B B^T = 0,\]if
transisTrue:\[A^T X A - E^T X E + B^T B = 0.\]
Use
solveto obtain the dense solution \(X\) andsolve_lrcfto obtain a low-rank Cholesky factor \(Z\) with \(X \approx Z Z^H\).- Parameters:
A – The non-parametric
OperatorA.E – The non-parametric
OperatorE orNone.B – The operator B as a
VectorArrayfromA.source.trans – Whether the first
Operatorin the equation is transposed.cont_time – If
True, the continuous-time equation is described, otherwise the discrete-time equation.name – Name of the equation.
Methods
Create a
LyapunovEquationfrom matrices.Compute the dense solution \(X\) as a
NumPy array.Compute a low-rank Cholesky factor \(Z\) as a
VectorArrayfromA.source.Return operators as matrices.
- classmethod from_matrices(A, E, B, trans=False, cont_time=True, name=None)[source]¶
Create a
LyapunovEquationfrom matrices.- Parameters:
A – The
NumPy arrayorSciPy spmatrixA.E – The
NumPy arrayorSciPy spmatrixE orNone.B – The
NumPy arrayB.trans – Whether the first matrix in the equation is transposed.
cont_time – If
True, the continuous-time equation, otherwise the discrete-time one.name – Name of the equation.
- solve(solver=None)[source]¶
Compute the dense solution \(X\) as a
NumPy array.
- solve_lrcf(solver=None)[source]¶
Compute a low-rank Cholesky factor \(Z\) as a
VectorArrayfromA.source.
- to_matrices()[source]¶
Return operators as matrices.
- Returns:
A – The
NumPy arrayorSciPy spmatrixA.E – The
NumPy arrayorSciPy spmatrixE orNone.B – The
NumPy arrayB.
- class pymor.solvers.matrix_equations.equations.PositiveRiccatiEquation(A, E, B, C, R=None, S=None, trans=False, name=None)[source]¶
Bases:
RiccatiDataA (generalized) positive continuous-time algebraic Riccati equation.
Differs from
RiccatiEquationonly in the sign of the quadratic term:if
transisFalse:\[A X E^T + E X A^T + (E X C^T + S^T) R^{-1} (C X E^T + S) + B B^T = 0,\]if
transisTrue:\[A^T X E + E^T X A + (E^T X B + S) R^{-1} (B^T X E + S^T) + C^T C = 0.\]
- Parameters:
A – The non-parametric
OperatorA.E – The non-parametric
OperatorE orNone.B – The operator B as a
VectorArrayfromA.source.C – The operator C as a
VectorArrayfromA.source.R – The matrix R as a 2D
NumPy arrayorNone.S – The operator S as a
VectorArrayfromA.sourceorNone.trans – Whether the first
Operatorin the equation is transposed.name – Name of the equation.
Methods
Compute the dense solution \(X\) as a
NumPy array.Compute a low-rank Cholesky factor \(Z\) as a
VectorArrayfromA.source.- solve(solver=None)[source]¶
Compute the dense solution \(X\) as a
NumPy array.
- solve_lrcf(solver=None)[source]¶
Compute a low-rank Cholesky factor \(Z\) as a
VectorArrayfromA.source.
- class pymor.solvers.matrix_equations.equations.RiccatiData(A, E, B, C, R=None, S=None, trans=False, name=None)[source]¶
Bases:
pymor.core.base.ImmutableObjectCoefficient storage and validation shared by the two Riccati equations.
Not intended to be used directly.
Methods
Create the
RiccatiEquationorPositiveRiccatiEquationfrom matrices.Return operators as matrices.
- classmethod from_matrices(A, E, B, C, R=None, S=None, trans=False, name=None)[source]¶
Create the
RiccatiEquationorPositiveRiccatiEquationfrom matrices.- Parameters:
A – The
NumPy arrayorSciPy spmatrixA.E – The
NumPy arrayorSciPy spmatrixE orNone.B – The
NumPy arrayB.C – The
NumPy arrayC.R – The
NumPy arrayR orNone.S – The
NumPy arrayS orNone.trans – Whether the first matrix in the equation is transposed.
name – Name of the equation.
- to_matrices()[source]¶
Return operators as matrices.
- Returns:
A – The
NumPy arrayA.E – The
NumPy arrayE orNone.B – The
NumPy arrayB.C – The
NumPy arrayC.R – The
NumPy arrayR orNone.S – The
NumPy arrayS orNone.
- class pymor.solvers.matrix_equations.equations.RiccatiEquation(A, E, B, C, R=None, S=None, trans=False, name=None)[source]¶
Bases:
RiccatiDataA (generalized) continuous-time algebraic Riccati equation.
With \(E\) taken to be the identity if
None, \(R\) the identity ifNone, and \(S\) zero ifNone:if
transisFalse:\[A X E^T + E X A^T - (E X C^T + S^T) R^{-1} (C X E^T + S) + B B^T = 0,\]if
transisTrue:\[A^T X E + E^T X A - (E^T X B + S) R^{-1} (B^T X E + S^T) + C^T C = 0.\]
Only the continuous-time equation is supported.
- Parameters:
A – The non-parametric
OperatorA.E – The non-parametric
OperatorE orNone.B – The operator B as a
VectorArrayfromA.source.C – The operator C as a
VectorArrayfromA.source.R – The matrix R as a 2D
NumPy arrayorNone.S – The operator S as a
VectorArrayfromA.sourceorNone.trans – Whether the first
Operatorin the equation is transposed.name – Name of the equation.
Methods
Compute the dense solution \(X\) as a
NumPy array.Compute a low-rank Cholesky factor \(Z\) as a
VectorArrayfromA.source.- solve(solver=None)[source]¶
Compute the dense solution \(X\) as a
NumPy array.
- solve_lrcf(solver=None)[source]¶
Compute a low-rank Cholesky factor \(Z\) as a
VectorArrayfromA.source.
- class pymor.solvers.matrix_equations.equations.SylvesterEquation(A, Ar, E=None, Er=None, B=None, Br=None, C=None, Cr=None, name=None)[source]¶
Bases:
pymor.core.base.ImmutableObjectDefines the
SylvesterEquation\[A V E_r^T + E V A_r^T + B B_r^T = 0\]or
\[A^T W E_r + E^T W A_r + C^T C_r = 0\]or both using (in case B, Br, C and Cr) are given.
- Parameters:
Methods
Create a
SylvesterEquationfrom matrices.Compute the solution \(V\) or \(W\) or both as
VectorArrays.Return operators as matrices.
- classmethod from_matrices(A, Ar, E=None, Er=None, B=None, Br=None, C=None, Cr=None, name=None)[source]¶
Create a
SylvesterEquationfrom matrices.Provide
BandBrfor the \(V\) equation,CandCrfor the \(W\) equation, or all four for both.- Parameters:
A – The
NumPy arrayorSciPy spmatrixA.Ar – The
NumPy arrayorSciPy spmatrixAr.E – The
NumPy arrayorSciPy spmatrixE orNone(then identity).Er – The
NumPy arrayorSciPy spmatrixEr orNone(then identity).B – The
NumPy arrayorSciPy spmatrixB orNone.Br – The
NumPy arrayorSciPy spmatrixBr orNone.C – The
NumPy arrayorSciPy spmatrixCNone.Cr – The
NumPy arrayorSciPy spmatrixCr orNone.name – Name of the equation.
- solve(solver=None)[source]¶
Compute the solution \(V\) or \(W\) or both as
VectorArrays.
- to_matrices()[source]¶
Return operators as matrices.
- Returns:
A – The The
NumPy arrayorSciPy spmatrixA orNone.Ar – The
NumPy arrayorSciPy spmatrixAr orNone.E – The
NumPy arrayorSciPy spmatrixE orNone.Er – The
NumPy arrayorSciPy spmatrixEr orNone.B – The
NumPy arrayorSciPy spmatrixB orNone.Br – The
NumPy arrayorSciPy spmatrixBr orNone.C – The
NumPy arrayorSciPy spmatrixC orNone.Cr – The
NumPy arrayorSciPy spmatrixCr orNone.