Main Content

Select Solver Using Auto 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.

  1. Openvdpand click the solver link in the lower-right corner.

  2. In theSolver Informationpane, click theView solver settingsbuttonto open theSolverpane of the model configuration parameters.

  3. UnderSolver selection, setTypeto fixed or variable-step according to your preference and setSolvertoauto

  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 theSolver informationpane.

  5. Click theAccept suggested settingsbuttonto apply the recommendations of auto solver. To select different settings, click theView solver settingsbutton and make changes in the configuration parametersSolverpane.

This chart describes the selection process of the auto solver.

  • ForSimscape™ Electrical™models, auto solver selectsode23tb。这些系统可以与非线性电路odels, especially circuit breakers and power electronics. Such nonlinear models require a stiff solver.

  • If the number of continuous states in the model exceeds theNumStatesForStiffnessCheckingvalue, auto solver usesode15s。It does not calculate the stiffness of the model. The default value for this parameter is 1000. You can change this value usingset_param

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

Related Topics