Main Content

View and Modify Operating Points

You can view and modify operating point values programmatically at the command line, or interactively using theSteady State ManagerorModel Linearizer.

You can simulate the model at the modified operating point. For more information, seeSimulate Simulink Model at Specific Operating Point.

View and Modify Operating Point inSteady State Manager

查看一个操作点Steady State Manager, in theData Browser, in theOperating Pointssection do one of the following:

  • Double-click the operating point you want to view.

  • 右键单击操作你想角度来看,and selectOpen Selection.

In the operating point document that opens, you can view the input and state values of the operating point.

To modify a state or input value in an operating point, in theValuecolumn, click the value you want to change, and enter the new value. If your operating point was at a steady state, changing any values in theSteady State Managercan place the operating point into a non-steady-state condition.

View and Modify Operating Point inModel Linearizer

查看一个操作点Model Linearizer, on theLinear Analysistab, in theOperating Pointsdrop-down list, select one of the following:

  • Model Initial Condition— The current states and inputs in the model

  • An operating point listed underExisting Operating Points (Linear Analysis Workspace)— These operating points are listed in theData Browserin theLinear Analysis Workspacesection. When you find an operating point trimming or a simulation snapshot, the software adds it to this list of operating points.

  • An operating point listed underExisting Operating Points (MATLAB Workspace)— These operating points are listed in theData Browserin theMATLAB Workspacesection.

Then, in theOperating Pointsdrop-down list, underView/Edit, click the view or edit option listed for the operating point.

The dialog box that opens shows the values of the operating point. For the model initial conditions and operating points found using simulation snapshots, you can view the input and state values. For operating points found using trimming, you can also view the model outputs that correspond to the operating point.

Within theModel Linearizer, you cannot edit the values of the model initial condition operating point or the values of an operating point that you found using trimming.

To edit an operating point that you found using a simulation snapshot, in the Edit dialog box, in theValuecolumn, select the state or input you want to edit, and enter the new value. If your simulation snapshot was at a steady state, changing any values in theModel Linearizercan place the operating point into a non-steady-state condition.

View and Modify Operating Point at the Command Line

This example shows how to view and modify the states in a Simulink model using an operating point object.

Create an operating point object from the Simulink Model.

sys ='watertank'; open_system(sys) op = operpoint(sys)
Operating point for the Model watertank. (Time-Varying Components Evaluated at time t=0) States: ---------- (1.) watertank/PID Controller/Integrator/Continuous/Integrator x: 0 (2.) watertank/Water-Tank System/H x: 1 Inputs: None ----------

The operating point,op, contains the states and input levels of the model.

Set the value of the first state.

op.States(1).x = 1.26;

View the updated operating point state values.

op.States
(1.) watertank/PID Controller/Integrator/Continuous/Integrator x: 1.26 (2.) watertank/Water-Tank System/H x: 1

You can also modify other operating points in the MATLAB workspace, including operating points found using trimming or simulation snapshots. If your operating point was at a steady state, changing any values can place the operating point into a non-steady-state condition.

If you modify your Simulink model after creating an operating point object, use theupdatefunction to update your operating point.

See Also

|

Related Topics