MATLAB Examples

Find Operating Points at Simulation Snapshots at Command 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 at 1 and 10 time units. The software simulates the model and computes an operating point at each simulation snapshot time.

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

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

Display the first operating point.

op(1)
 Operating point for the Model magball.
 (Time-Varying Components Evaluated at time t=1)

States: 
----------
(1.) magball/Controller/PID Controller/Filter
      x: 5.76e-06     
(2.) magball/Controller/PID Controller/Integrator
      x: 14           
(3.) magball/Magnetic Ball Plant/Current
      x: 7            
(4.) magball/Magnetic Ball Plant/dhdt
      x: -6.7e-08     
(5.) magball/Magnetic Ball Plant/height
      x: 0.05         

Inputs: None 
----------