Documentation

View and Modify Operating Points

View Model Initial Condition in Linear Analysis Tool

This example shows how to view the model initial condition in the Linear Analysis Tool.

  1. Open the Simulink® model.

    sys = 'magball';
    open_system(sys)
  2. In the Simulink Editor, select Analysis > Control Design > Linear Analysis.

  3. In the Linear Analysis Tool, in the Operating Point drop-down list, click View Model Initial Condition.

    This action opens the Model Initial Condition Viewer, which shows the model initial condition (default operating point).

You cannot edit the Model Initial Condition operating point using the Linear Analysis Tool. To edit the initial conditions of the model, change the appropriate parameter of the relevant block in your Simulink model. For example, double-click the magball/Magnetic Ball Plant/Current block to open the Block Parameters dialog box and edit the value in the Initial condition box. Click OK.

Modify Operating Point in Linear Analysis Tool

This example shows how to modify an existing operating point in the Linear Analysis Tool.

  1. Open the Simulink model.

    sys = 'magball';
    open_system(sys)

    Opening magball loads the operating points magball_op1 and magball_op2 into the MATLAB® Workspace.

  2. In the Simulink Editor, select Analysis > Control Design > Linear Analysis.

  3. In the Linear Analysis Tool, in the Operating Point drop-down list, select magball_op1.

  4. In the Operating Point drop-down list, select Edit magball_op1.

    The Edit dialog box opens for magball_op1. Use this dialog box to view and edit the operating point.

    Select the state or input Value to edit its value.

  5. Alternatively, in the Linear Analysis Tool, in the MATLAB Workspace, double-click the name of an operating point to open the Edit dialog box.

    Note:   You cannot edit an operating point that you created by trimming a model in the Linear Analysis Tool.

View and Modify Operating Point Object (MATLAB Code)

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';
load_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
      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 operating point state values.

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

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

See Also

|

Related Examples

Was this topic helpful?