Known disturbances in JuliaSimControl MPC

Hello :wave:

There are currently no observers that have support for the w argument. You could still make use of known external disturbances by performing the steps inside MPC.step! manually, those are

  • Run the correct! step of the observer (measurement update) with u_tot as input (if w is relevant to the measurement update)
  • Create the ControllerInput and pass it to MPC.optimize! using something like this
controllerinput = ControllerInput(MPC.state(prob.observer), prob.xr, w, u)
controlleroutput = optimize!(prob, controllerinput, p, t; kwargs...)
  • Run the prediction step (predict!) of the observer with u_tot as input.

The dynamics that is used in the observer needs to be adapted to accept this larger u as input for this to work.

Does this make sense? It’s on the roadmap to add support for the w argument, but since we use observers from the library LowLevelParticleFilters.jl which do not have this argument, there is some interface work to be done that hasn’t taken place yet.