This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Use Auto Solver to Select a Solver

When you want Simulink® to select a solver for simulating the model, use auto solver. Auto solver chooses a suitable solver and sets the maximum step size of the simulation.

For new models, Simulink selects auto solver and sets the type to variable-step by default. For an existing model, you can use auto solver to select a solver.

Use Auto Solver with vdp Model

  1. Open vdp and click the solver link in the lower-right corner. The Solver information pane opens.

  2. In the pane, click the View solver settings button to open the Solver pane of the model configuration parameters.

  3. Under Solver selection, set Type to fixed or variable-step according to your preference and set Solver to auto.

  4. When you simulate the model, auto solver selects a fixed-step or variable-step solver according to your preference and calculates the maximum step size it recommends. To see the results, open the Solver information pane.

  5. Click the Accept suggested settings button to apply the recommendations of auto solver. To select different settings, click the View solver settings button and make changes in the configuration parameters Solver pane.

Auto Solver Heuristics

This chart describes the heuristics of auto solver.

  • For Simscape™ Electrical™ models, auto solver selects ode23tb. These systems can have circuits with nonlinear models, especially circuit breakers and power electronics. Such nonlinear models require a stiff solver.

  • If the number of continuous states in the model exceeds the NumStatesForStiffnessChecking value, auto solver uses ode15s. It does not calculate the stiffness of the model. The default value for this parameter is 1000. You can change this value using set_param.

  • If the number of continuous states in the model is less than the NumStatesForStiffnessChecking value, auto solver calculates the stiffness of the model. A model is stiff if the stiffness exceeds the StiffnessThreshold value. The default value for this parameter is 1000. You can change this value using set_param.

Related Topics