This example shows how to formulate a linear MPC problem using YALMIP. The simulation can be carried out in either MATLAB or Simulink.
A linear MPC formulation usually has a quadratic objective, linear system dynamics and simple bounds on states or inputs:
Note: the simulation and MPC parameters are not necessarily realistic, they were chosen to be as simple as possible.