Change model parameters in MPC without re-generating s-fun

Hi there,

I am currently developing MPC using Matlab interface. The MPC runs in Simulink. I would like to run the MPC in Simulink with different model parameters, the model parameters are fixed during the simulation. Also I would like to avoid re-generating the S function every time I change the model parameters. One way I could do is treating the model parameters as run time parameters. Assuming I have N parameters, and the prediction horizon is P, the size of the run time parameter vector is [N*(P+1), 1], due to the fact that N is very large, MPC elapsed time is increased significantly. Is there a way providing model parameters without re-generating the S function also does NOT slow down MPC? Many thanks in advance!


Hi Wen,

Unfortunately, there is currently no way to do this.

Many thanks for replying Frey!