This example shows how to design a model predictive controller starting from linearizing a nonlinear plant in Simulink .
if ~mpcchecktoolboxinstalled('simulink') disp('Simulink(R) is required to run this example.') return end open_system('mpc_linearization');
No MPC controller is defined in the MPC block yet.
Click the "Design..." button in the MPC block dialog to launch the MPC design tool. In the "MPC Question" dialog, specify 1 as the number of manipulated variable and 1 as the number of measured output. Sample time of the controller must be a positive real number.
During the launching process, the MPC design tool linearizes the Simulink plant at the default equilibrium operating point and uses the linearized model as the internal predictive model in the MPC controller.
At the end of launching process, a "Control and Estimation Tools Manager" window shows up with an MPC Design Task, where you can continue your MPC design.