Main Content

Find Steady-State Operating Points for Simscape Models

You can find operating points for models with Simscape™ components using Simulink® Control Design™ software. In particular, you can find steady-state operating points using one of the following methods:

  • Optimization-based trimming — Specify constraints on model inputs, outputs, or states, and compute a steady-state operating point that satisfies these constraints. For more information, Compute Steady-State Operating Points.

    By default, you can define operating point specifications for any Simulink and Simscape states in your model, and any root-level input and output ports of your model. You can also define additional output specifications on Simulink signals. To apply output specifications to a Simscape physical signal, first convert the signal using a PS-Simulink Converter (Simscape) block.

  • Simulation snapshot — Specify model initial conditions near an expected equilibrium point, and simulate the model until it reaches steady state. You can then create an operating point based on the steady-state signals and states in the model. For more information, see Find Operating Points at Simulation Snapshots.

Projection-Based Trim Optimizers

To produce better trimming results for Simscape models, you can use projection-based trim optimizers. These optimizers enforce the consistency of the model initial condition at each evaluation of the objective function or nonlinear constraint function. Using projection-based trim optimizers requires Optimization Toolbox™ software.

You can use these projection-based optimizers when trimming models from the command line and in the Model Linearizer.

To specify the optimizer type at the command line, create a findopOptions option set, and specify the Optimizer option as one of the following:

  • 'lsqnonlin-proj' — Nonlinear least squares with projection

  • 'graddescent-proj' — Gradient descent with projection

When using gradient descent with projection at the command line, you can specify whether the algorithm enforces the model initial conditions using hard or soft constraints by specifying the ConstraintType option in findopOptions.

To specify the optimizer type in the:

  • Steady State Manager, open the Trim Options dialog box. On the Specification tab, click Trim Options.

  • Model Linearizer, first open the Trim the model dialog box. On the Linear Analysis tab, in the Operating Point drop-down list, select Trim Model. Then, select the Options tab.

In the Optimization Method drop-down list, select an optimizer.

When you use gradient descent with projection in Steady State Manager or Model Linearizer, the algorithm enforces the model initial conditions using hard constraints.

For an example that uses projection-based trim optimization, see Steady-State Simulation with Projection-Based Trim Optimizer.

See Also

Apps

Functions

Blocks