Main Content

发现稳态操作点SimscapeModels

You can find operating points for models with Simscape™ components using金宝app®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 aPS-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, seeFind 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 theModel Linearizer.

To specify the optimizer type at the command line, create afindopOptionsoption set, and specify theOptimizeroption 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 theConstraintTypeoption infindopOptions.

To specify the optimizer type in the:

  • Steady State Manager, open the Trim Options dialog box. On theSpecificationtab, clickTrim Options.

  • Model Linearizer, first open the Trim the model dialog box. On theLinear Analysistab, in theOperating Pointdrop-down list, selectTrim Model. Then, select theOptionstab.

In theOptimization Methoddrop-down list, select an optimizer.

When you use gradient descent with projection inSteady State ManagerModel Linearizer, the algorithm enforces the model initial conditions using hard constraints.

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

See Also

Apps

Functions

Blocks