Open acxz opened 3 years ago
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.
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.
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.
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 matrixX
? https://github.com/JuliaControl/ControlSystems.jl/blob/311013eef4dd3384872abfca1c04dabb213c97ed/src/matrix_comps.jl#L3-L4i.e. Solving the cost to go matrix
X
backwards in time with varyingA_t
andB_t
matrices, instead of constantA
andB
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!