I'm trying to implement an online MPC controller and I'm a bit confused about what exactly the m.time does.
With m.options.IMODE = 6 #MPC
and m.options.REQCTRLMODE=3
, I try to define the prediction and control horizons:
m.options.CTRL_HOR=10
m.options.CTRL_TIME=0.05
m.options.PRED_HOR=10
m.options.PRED_TIME=0.05
If I understand it right the ctrl_hor
and pred_hor
sets how many future timesteps we calculate and the pred_time
and ctrl_time
defines how long is one timestep.
But the problem is that the controller throws an error if I don't define m.time
, but what exactly does it do and why isn't it enough to set ctrl and pred horizons with respective timesteps?