Main Content

Generate金宝appModel from MPC Designer

This topic shows how to generate a Simulink®model that uses the current model predictive controller to control its internal plant model.

To create a Simulink model:

  1. In theMPC设计erapp, interactively design and tune your model predictive controller.

  2. On theTuningtab, in theAnalysissection, click theExport Controllerarrow.

    Alternatively, on theMPC设计ertab, in theResultsection, clickExport Controller.

  3. UnderExport Controller, clickGenerate Simulink Model.

    The app exports the current MPC controller and its internal plant model to the MATLAB®workspace and creates a Simulink model that contains anMPC Controllerblock and aPlantblock

    Also, default step changes in the output setpoints are added to theReferencesblock.

Use the generated model to validate your controller design. The generated model serves as a template for moving easily from the MATLAB design environment to the Simulink environment.

You can also use the Simulink model to generate code and deploy it for real-time control applications. For more information, seeGenerate Code and Deploy Controller to Real-Time Targets.

See Also

|

Related Topics