New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Low-rank RADI solver for Riccati equations #736
Conversation
Please rebase on current master to remove the failing MPI jobs in CI |
@lbalicki Notice that the more general Riccati equation with S and R (where R is positive definite) can be rewritten as a simpler Riccati equation with new A, B BT, and CT C (A - S R-1 C, B BT - S R-1 ST, and CT R-1 C if I'm not mistaken). The difficulty with nonzero S is that the new A has a low-rank update. I'm working on a "low-rank updated operator" which would use the Sherman-Morrison-Woodbury formula in |
It seems lrradi.py
has Windows style new lines (I see ^M
at the end of almost every line in the editor I use). Could you replace them with Unix style?
Below are some other general comments. I'll take a look at the implementation in more detail later.
I adapted the implementation to the requested changes. For now RADI is dealing with matrices S and R exactly like |
The implementation looks very good. It seems you found and fixed a typo in how the paper used SMW. I will ask Jens next week for a review.
I just have very minor comments about the code below:
- in a few docstrings, there is an empty line missing before
Returns
np.eye
is used much more often in pyMOR compared tonp.identity
- there are a few places with expressions like
1 / a * b
, which could be replaced withb / a
to reduce the number of operations and increase accuracy a bit - the expression
RF += V * a
can be converted toRF.axpy(a, V)
, which should avoid forming a newVectorArray
forV * a
np.block
can be replaced withnp.vstack
in a few places to reduce the number of brackets
I talked with @drittelhacker a bit and he didn't point to anything that should be changed.
Codecov Report
|
@lbalicki Please rebase and squash the commits changing
and then |
@pmli I now put all my changes into one commit. Or would it be better to have an individual commit for each changed file? |
@lbalicki For this situation, I would say |
CI is blocked by jupyterhub/repo2docker#755 |
@lbalicki Another rebase on master should make the tests pass. |
Great, thanks! |
This is an implementation of the low-rank RADI algorithm mentioned in #692. One issue I encountered was that the other solvers can be applied to equations of the type
AXE^T+EXA^T-(EXC^T+S) R^{-1}(EXC^T+S)^T+BB^T=0
, whereas the RADI implementation can not deal with the matricesS
andR
. SinceLQGBTReductor
does not needS
andR
as well for solving Riccati equations, this should not be too big of an issue. But I'm not sure if my workaround inriccati.py
is appropriate.