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 |
pmli
left a comment
There was a problem hiding this comment.
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 |
pmli
left a comment
There was a problem hiding this comment.
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.eyeis 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 / ato reduce the number of operations and increase accuracy a bit - the expression
RF += V * acan be converted toRF.axpy(a, V), which should avoid forming a newVectorArrayforV * a np.blockcan be replaced withnp.vstackin a few places to reduce the number of brackets
pmli
left a comment
There was a problem hiding this comment.
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 matricesSandR. SinceLQGBTReductordoes not needSandRas well for solving Riccati equations, this should not be too big of an issue. But I'm not sure if my workaround inriccati.pyis appropriate.