Skip to content
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

Help Request: Time Varying LQR Solution #463

Open
acxz opened this issue Mar 31, 2021 · 3 comments
Open

Help Request: Time Varying LQR Solution #463

acxz opened this issue Mar 31, 2021 · 3 comments

Comments

@acxz
Copy link

acxz commented Mar 31, 2021

It would be great to have a an example which solves systems with time-varying matrices A, B for LQR.

I know I can just call the lqr method at every timestep with different A and B matrices, but is that the same?
We use the following, but doesn't that assume that A and B are the same during the backward pass when solving the differential equation concerning the cost to go matrix X?

Compute 'X', the solution to the continuous-time algebraic Riccati equation,
defined as A'X + XA - (XB)R^-1(B'X) + Q = 0, where R is non-singular.

i.e. Solving the cost to go matrix X backwards in time with varying A_t and B_t matrices, instead of constant A and B matrices.

Maybe I am just not understanding properly LQR in the time-varying case. Any help or guidance would be appreciated. Ideally having an example in the docs would close this issue. Thank you!

@olof3
Copy link
Contributor

olof3 commented Mar 31, 2021

The toolbox only supports the case of infinite horizon and constant system dynamics, which can be solved as an algebraic Riccati equation.

Time-varying LQR is more involved. In continuous time it is necessary to solve a differential Riccati equation. One reference for further reading on this would be Liberzon's book on optimal control, chapter 6.

I think it would be nice to have this functionality in the toolbox at some point.

@acxz
Copy link
Author

acxz commented Mar 31, 2021

Thanks for your comments, something related and interesting that I just came across is "State-dependent Ricacati Equations" (https://ieeexplore.ieee.org/document/609663).

But yeah the big change would be having an implementation that solves the differential Riccati Equation.

@baggepinnen
Copy link
Member

There is a generalization of this implemented in
https://github.com/baggepinnen/DifferentialDynamicProgramming.jl
I believe The iLQG algorithm will be what you are looking for in case the system is linear and time varying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants