If you have already designed a model predictive controller to use with a Simulink® plant, to test it in Simulink:
Open Simulink model.
Add an MPC Controller block to the model and connect it.
Specify the controller.
Open the MPC Controller and enter the name of your controller in the MPC Controller box. The string you enter here must be the name of an mpc object in the workspace.
(Optional) Modify the controller.
To use mpctool, click Design with the MPC Controller open. Change the controller parameters and then export the modified controller to the workspace.
Alternatively, use commands to modify the controller object in the workspace.
Run the Simulink model.