Documentation

Compute Operating Points at Simulation Snapshots

This example shows how to use the Linear Analysis Tool to compute an operating point at specified simulation times (or simulation snapshots).

 Code Alternative

You can compute a steady-state operating point (or equilibrium operating point) using a model simulation. The resulting operating point consists of the state values and model input levels at the specified simulation time.

Simulation-based operating point computation requires that you configure your model by specifying:

  • Initial conditions that cause your model to converge to equilibrium

  • Simulation time at which the model reaches equilibrium

You can use the simulation snapshot operating point to initialize the trim point search.

    Note:   If your Simulink® model has internal states, do not linearize this model at the operating point you compute from a simulation snapshot. Instead, try linearizing the model using a simulation snapshot or at an operating point from optimization-based search.

  1. Open the Simulink model.

    sys = 'magball';
    open_system(sys);

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

    The Linear Analysis Tool for the model opens, with the default operating point being set to the model initial condition.

  3. In the Linear Analysis tool, in the Operating Point drop-down list, click Take Simulation Snapshot.

  4. Specify [1,10] in the Simulation snapshot times field.

    This vector specifies operating points at t = 1 and t = 10.

  5. Click Take Snapshots to take a snapshot of the system at the specified times.

    A new variable, op_snapshot1, appears in the Linear Analysis Workspace. op_snapshot1 contains the two operating points.

  6. Double-click op_snapshot1 to see the resulting operating points. Select an operating point of interest from the Select Operating Point list to see it.

You can evaluate your operating point as follows:

  1. Initialize the model using the operating point (see Simulate Simulink Model at Specific Operating Point)

  2. Add Scope blocks to show the output signals that should reach steady state during the simulation.

  3. Run the simulation to check whether these key signals are at steady state.

Related Examples

More About

Was this topic helpful?