Repository navigation
Replies: 2 comments
|
In the current way the code is written, the cost is computing by simulating the system and summing up the integrated cost at the each time step. Updating to allow the past state or input to be included in the cost could be done, but would require rewriting some of the code to allow the integrated cost to depend on u_{k-1}. This is basically what you have done by adding the integrator, of course. I don't see any easy way to modify the code and maintain compatibility with the current (simple) form. One possibility might be to provide an option to optimize the derivative of the input so that you get automatic addition of the integrator to the system dynamics (without having to do it manually). It might help to see the code that you used, to see if that triggers any ideas for a simple implementation that doesn't break the current format. |
|
Dear @murrayrm, thanks for your reply! This is the smallest example I have.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello all,
I am trying to use the new optimal module to set up a MPC controller for research purposes.
The interface is neat and the code seems to work well (at least on small academic examples).
I was wondering whether there exists a simple way to add a quadratic cost function term on the input variation
rather than on u. I generally include such a term in a MPC controller.
My current approach to include input variation penalty is to explicitly augment the model dynamics with an integrator on the input, so the model is fed by \delta u and u becomes an additional model state. This approach works, but requires some extra coding effort!
Thanks in advance,
Marco
All reactions