Skip to Main Content Skip to Search
Product Documentation

Importing a Plant Model

To import a plant model, do one of the following:

The Plant Model Importer dialog box opens (see the dialog box in Import from for an example). Within the dialog box you can import an LTI model from the workspace or, when you have Simulink Control Design software, you can import a linearized plant model from the Simulink model.

The following sections describe model import options:

Import from

Use these options to set the location from which the model will be imported.

MATLAB workspace

This is the default option and is the case shown in the above example. The Items in your workspace area in the upper-right corner lists all candidate models in your MATLAB workspace. Select one by clicking it. The Properties area lists the selected model's properties (the DC model in the above example).

MAT-file

The upper part of the dialog box changes as shown below.

The MAT-file name edit box becomes active. Type the desired MAT-file name (if it's not on the MATLABpath, enter the complete file path). You can also use the Browse button which opens a file chooser window.

In the above example, file DCmodels.mat contains two models. Their names appear in the Items in your MAT-file area in the upper-right corner. As with the workspace option, the selected model's properties appear in the Properties area.

Import to

The combo box at the bottom of the dialog box allows you to specify the MPC project/task into which the plant model will be imported (see example below). It defaults to the active project.

Buttons

Import

Select the model you want to import from the Items list in the upper-right corner of the dialog box. Verify that the Import to option designates the correct project/task. Click the Import button to import the model.

To verify that the model has been loaded, select Plant models in the tree. (See Tree View, and Plant Models View.)

The import dialog box remains visible until you close it so you can import additional models.

Close

Click Close to close the dialog box. You can also click the Close icon on the title bar.

Importing a Linearized Plant Model

  1. Open the design tool from within a Simulink model as discussed in Opening the MPC Design Tool.

  2. Open the Plant Model Importer dialog box (see Importing a Plant Model).

  3. Click the Linearized Plant from Simulink tab (see the following example).

      Note   If you haven't activated the design tool within Simulink, the Linearized Plant from Simulink tab is unavailable.

Linearization Process

If you click OK, the design tool uses Simulink Control Design software to create a linearized plant model. It performs the following tasks automatically:

  1. Configures the Control and Estimation Tools Manager.

  2. Temporarily inserts linearization input and output points in the Simulink model at the inputs and outputs of the MPC block.

  3. When the Create a new operating condition from MPC I/O values option is selected, the Model Predictive Control Toolbox software temporarily inserts output constraints at the inputs/outputs of the MPC block.

  4. Finds a steady state operating condition based on the constraints or uses the specified operating condition.

  5. Linearizes the plant model about the operating point.

The linearized plant model appears as a new node under Plant Models. For details of the linearization process, refer to the Simulink Control Design documentation.

Linearization Options

You can customize the linearization process in several ways:

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS