Main Content

Simulate金宝appModel at Specific Operating Point

This example shows how to initialize a model at a specific operating point for simulation. For more information on computing operating points, seeCompute Steady-State Operating PointsandFind Operating Points at Simulation Snapshots

To simulate your model at your computed operating point, you must set the model initial conditions to match the states and inputs in the operating point.

If you already have an operating point,op, in your MATLAB®or model workspace, you can set the initial conditions in the Configuration Parameters dialog box, in theData Import/Exportpane. To do so:

  • Set theInputparameter togetinputstruct(op).

  • Set theInitial stateparameter togetstatestruct(op).

You can also set the model initial conditions programmatically. For more information, seegetstatestructandgetinputstruct.

Alternatively, if you computed your operating point using theSteady State ManagerorModel Linearizer, you can interactively set the model initial conditions form within these tools.

Once you have set your model initial condition, simulate your model at the specified operating point.

Set Model Operating Point UsingSteady State Manager

In theSteady State Manager, in theData Browser, in theOperating Pointsection, right-click the operating point at which you want to simulate the model, and selectOpen Selection.

If you computed multiple operating points using a simulation snapshot, in the operating point document, select an operating point from theSelect Operating Pointdrop-down list.

On theOperating Pointtab, clickSet Initial Conditions.

The software sets the initial conditions of the model to match the inputs and states in the selected operating point.

Similarly, using theSteady State Manager, you can also set the model initial conditions based on an operating point specification or an operating point search report.

Set Model Operating Point UsingModel Linearizer

In theModel Linearizer, in theData Browser, in theLinear Analysis Workspace, double-click the computed operating point or simulation snapshot.

If you computed multiple operating points using a simulation snapshot, select an operating point from theSelect Operating Pointdrop-down list.

In the Edit dialog box, click初始化模型.

In the Initialize Model dialog box, specify aVariable Namefor the operating point object. Alternatively, you can use the default variable name.

To export the operating point to the MATLAB workspace and set the model initial condition to this operating point, clickOK.

Tip

If you want to store this operating point with the model, export the operating point to theModel Workspaceinstead.

Related Topics