Documentation Center

  • Trial Software
  • Product Updates

Designing a Model Predictive Controller in Simulink®

This example shows how to design a model predictive controller starting from linearizing a nonlinear plant in Simulink® .

Open Plant

if ~mpcchecktoolboxinstalled('simulink')
    disp('Simulink(R) is required to run this example.')

No MPC controller is defined in the MPC block yet.

open_system('mpc_linearization/MPC Controller');

Linearize Plant and Launch MPC Design Tool

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.

Was this topic helpful?