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 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.
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
'lsqnonlin-proj' — Nonlinear least squares
'graddescent-proj' — Gradient descent with
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
To specify the optimizer type in the:
Steady State Manager, first open the Trim the model dialog box. On the Specification tab, click Trim Options. Then, open the Options tab.
Model Linearizer, first open the Trim the model
dialog box. On the Linear Analysis tab, in
the Operating Point drop-down list, select
In the dialog box, in the Optimization Method drop-down list, select an optimizer.
When you use gradient descent with projection in the 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.