MATLAB Examples

Initialize Operating Point Search Using MATLAB® Code

This example shows how to initialize operating point values for optimization-based operating searches.

Open the Simulink model.

sys = 'watertank';

Simulate the model for ten time units and extract an operating point snapshot.

opsim = findop(sys,10);

Create an operating point specification object. By default, all model states are specified to be at steady state.

opspec = operspec(sys);

Configure initial values for operating point search.

opspec = initopspec(opspec,opsim);

Find the steady-state operating point that meets these specifications.

[op,opreport] = findop(sys,opspec);
 Operating point search report:

 Operating point search report for the Model watertank.
 (Time-Varying Components Evaluated at time t=10)

Operating point specifications were successfully met.
(1.) watertank/PID Controller/Integrator
      x:          1.26      dx:             0 (0)
(2.) watertank/Water-Tank System/H
      x:            10      dx:      -1.1e-14 (0)

Inputs: None 

Outputs: None 

The time derivative of each state, dx, is effectively zero. This value of the state derivative indicates that the operating point is at steady state.