mpc.pytorch icon indicating copy to clipboard operation
mpc.pytorch copied to clipboard

Non-quadratic slew rate line search

Open bamos opened this issue 7 years ago • 2 comments

If I understand correctly, https://github.com/locuslab/mpc.pytorch/commit/206bd939ec1479424221a62ed45ad26830849fcc does the LQR step with the slew rate penalty in the quadratic cost approximation, but does the line search on the unmodified cost function without the slew rate penalty.

This is non-trivial to fix because we currently have a time-invariant non-quadratic cost function and no easy way to access the nominal control trajectory within it. If we did, the clean solution would be to write a new cost function with the slew rate penalty. Instead, perhaps the easiest way of fixing this would be to add the slew rate to the get_cost function.

bamos avatar Oct 24 '18 16:10 bamos

That is correct I forgot we were using the true cost for the line search.

ivandariojr avatar Oct 24 '18 16:10 ivandariojr

I just added an error message for this case so nobody accidentally starts getting silent errors from this.

bamos avatar Nov 01 '18 12:11 bamos