Main Content

Change Operating Point Search Optimization Settings

This example shows how to control the accuracy of your operating point search by configuring the optimization algorithm. Typically, you adjust the optimization settings based on the operating point search report, which is automatically created after each search.

You can change your optimization settings when computing operating points interactively using the Steady State Manager or Model Linearizer, or programmatically using the findop function.

Interactively Change Optimization Settings

You can configure the optimization settings for interactively computing operating points using the Steady State Manager or Model Linearizer using the same trimming options dialog box interface.

  • In Steady State Manager, on the Specification tab, click Trim Options. Then, in the Trim Options dialog box, specify your optimization settings.

  • In Model Linearizer, on the Linear Analysis tab, in the Operating Point drop-down list, click Trim Model. Then, in the Trim the model dialog box, on the Options tab, specify your optimization settings.

You can specify the Optimization Method and corresponding optimization options such as the options shown in the following table.

Optimization StatusOption to ChangeComment
Optimization ends before completing (too few iterations)Maximum iterationsIncrease the number of iterations.
State derivative or error in output constraint is too largeFunction tolerance or Constraint tolerance (depending on selected algorithm)Decrease the tolerance value.

You can also specify custom cost and constraint functions for optimization using the Custom Optimization Functions parameters. For more information, see Compute Operating Points Using Custom Constraints and Objective Functions.

Programmatically Change Optimization Settings

To configure the optimization settings for computing operating points using the findop function, create a findopOptions option set. For example, create an option set and specify a nonlinear least-squares optimization method.

options = findopOptions('OptimizerType','lsqnonlin');

To specify options for each optimization method, set the OptimizationOptions parameter of the options set to a corresponding structure created using the optimset (Optimization Toolbox) function.

To specify custom cost and constraint functions for optimization, create an operspec object and specify the CustomObjFcn, CustomConstrFcn, and CustomMappingFcn properties. For more information, see Compute Operating Points Using Custom Constraints and Objective Functions.

See Also

Functions

Apps

Related Topics