Main Content

View and Modify Operating Points

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

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

View and Modify Operating Point in Steady State Manager

To view an operating point in the Steady State Manager, in the data browser, in the Operating Points section, do one of the following:

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

  • Right-click the operating point you want to view, and select Open 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 the Value column, 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 the Steady State Manager can place the operating point into a non-steady-state condition.

View and Modify Operating Point in Model Linearizer

To view an operating point in the Model Linearizer, on the Linear Analysis tab, in the Operating Points drop-down list, select one of the following:

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

  • An operating point listed under Existing Operating Points (Linear Analysis Workspace) — These operating points are listed in the data browser in the Linear Analysis Workspace section. When you find an operating point using trimming or a simulation snapshot, the software adds it to this list of operating points.

  • An operating point listed under Existing Operating Points (MATLAB Workspace) — These operating points are listed in the data browser in the MATLAB Workspace section.

Then, in the Operating Points drop-down list, under View/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 Model 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 the Value column, 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 Model Linearizer can 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)
op = 
 Operating point for the Model watertank.
 (Time-Varying Components Evaluated at time t=0)

States: 
----------
x
_
 
(1.) watertank/PID Controller/Integrator/Continuous/Integrator
0
(2.) watertank/Water-Tank System/H
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
ans = 
 x  
____
    
(1.) watertank/PID Controller/Integrator/Continuous/Integrator
1.26
(2.) watertank/Water-Tank System/H
 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 the update function to update your operating point.

See Also

|

Related Topics