kul-optec / nmpc-codegen

C Code generation for NMPC
https://kul-forbes.github.io/nmpc-codegen/
MIT License
29 stars 4 forks source link

Add delta u terms to the discrete time cost function #11

Open korken89 opened 5 years ago

korken89 commented 5 years ago

Hi,

We have been trying PANOC to position control a real quadrotor, which was working quite well, however we often saw the need to adding weights on the change of control signal due to some erratic behavior. The main issue why we simply do not increase the control signal weights is that we still want to tell the solver that large control signal are OK, just that in cannot change instantly.

As the current setup only allows for state weights, I would like to request the additions of a matrix Rd, which is the weight on the rate of change of the control signal. I did a quick try to implement this, but Pantelis (@alphaville) pointed out that I was changing the continuous time cost function.

I am not familiar with the code generation to add this, but I heard that there was already plans on adding something similar?

BR Emil