This example shows how to use the Linear Analysis Tool to compute an operating point at specified simulation times (or simulation snapshots).
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.
Open the Simulink model.
sys = 'magball'; open_system(sys);
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.
In the Linear Analysis tool, in the Operating
Point drop-down list, click
the Simulation snapshot times field.
This vector specifies operating points at
t = 1 and
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.
the two operating points.
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:
Initialize the model using the operating point (see Simulate Simulink Model at Specific Operating Point)
Add Scope blocks to show the output signals that should reach steady state during the simulation.
Run the simulation to check whether these key signals are at steady state.