Main Content

Find Operating Points at Simulation Snapshots

You can find a steady-state operating point using a model simulation. The resulting operating point consists of the state values and model input levels at a specified simulation snapshot time.

To use simulation-based operating point computation, first configure your model initial conditions such that the model converges to an equilibrium point. You can then simulate your model and create operating points interactively usingSteady State ManagerorModel Linearizer. You can also find snapshots programmatically at the MATLAB®command line using thefindopfunction.

To find operating points using snapshots, the software simulates the model and creates an operating point at each simulation snapshot time. Each operating point contains the input and states values of the model at the corresponding snapshot time.

To verify that the operating point is at steady state, initialize your model with the operating point values, simulate the model, and check if key signals and states are at equilibrium. For more information on initializing your model with an operating point, seeSimulate Simulink Model at Specific Operating Point.

Note

If your Simulink®model has internal states, do not linearize the model at an 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. For more information, seeHandle Blocks with Internal State Representation.

Compute Operating Points at Simulation Snapshots UsingSteady State Manager

你可以找到一个操作point at specified simulation snapshot times using theSteady State Manager.

Open the Simulink model.

sys ='magball'; open_system(sys)

To open theSteady State Manager, in the Simulink model window, in theAppsgallery, clickSteady State Manager.

To specify the simulation snapshot time, in theSteady State Manager, on theSteady Statetab, clickSnapshots.

Specify simulation times at which to take snapshots. For this example, take snapshots at1and10time units. In the Create Snapshot Operating Point dialog box, in theSimulation snapshot timesfield, enter[1 10].

To take the snapshots, clickPlay button.

An array of operating points,op1, appears in theData Browser, in theOperating Pointssection. This array contains two operating points, one for each specified snapshot time.

The software also opens a correspondingop1document where you can view the operating points.

To select which operating point to view, use theSelect Operating Pointdrop-down list.

Compute Operating Points at Simulation Snapshots UsingModel Linearizer

你可以找到一个操作point at specified simulation snapshot times using theModel Linearizer.

Open the Simulink model.

sys ='magball'; open_system(sys)

To open theModel Linearizer, in the Simulink model window, in theAppsgallery, clickModel Linearizer.

To specify the simulation snapshot time, in theModel Linearizer, on theLinear Analysis选项卡,Operating Pointdrop-down list, selectTake Simulation Snapshot.

Take simulation snapshots at1and10time units. In the Enter snapshot times to linearize dialog box, in theSimulation snapshot timesfield, enter[1 10].

To take the snapshots, clickTake Snapshots.

An array of operating points,op_snapshot1, appears in theData Browser, in theLinear Analysis Workspacesection. This array contains two operating points, one for each specified snapshot time.

To view the operating points, in theLinear Analysis Workspace, double-clickop_snapshot1. You can select which operating point to view using theSelect Operating Pointdrop-down list.

在C找到操作点模拟快照ommand Line

This example shows how to compute a steady-state operating point at specified simulation snapshot times.

Open the Simulink model.

sys ='magball'; open_system(sys)

Simulate the model, and create operating points at1and10time units. The software simulates the model and computes an operating point at each simulation snapshot time.

op = findop(sys,[1 10]);

opis a column vector of operating points, with one element for each specified snapshot time.

Display the first operating point.

op(1)
ans = Operating point for the Model magball. (Time-Varying Components Evaluated at time t=1) States: ---------- x ___________ (1.) magball/Controller/PID Controller/Filter/Cont. Filter/Filter 5.7581e-06 (2.) magball/Controller/PID Controller/Integrator/Continuous/Integrator 14.0071 (3.) magball/Magnetic Ball Plant/Current 7.0036 (4.) magball/Magnetic Ball Plant/dhdt -6.6961e-08 (5.) magball/Magnetic Ball Plant/height 0.05 Inputs: None ----------

See Also

Apps

Functions

Related Topics