Configure Model for Simulation

During simulation, SimMechanics™ employs a Simulink® global solver to determine the configuration of a model as a function of time. You can select the best solver for your application from a list of solvers that Simulink provides. Simulation parameters include the numerical step used to progress through the simulation and the solver tolerance values. Adjust the parameters to optimize speed and accuracy of the simulation.

For solver selection and parameter specification, see:

Specify Solver Settings

To select a global solver for your model:

  1. On the Simulink menu bar, click Simulation > Model Configuration Parameters.

  2. On the Tree View pane, select Solver.

  3. In Solver Options, click Type and select Variable-step or Fixed-step.

      Note:   For best performance, select Variable-step. For model deployment, select Fixed-step.

  4. Click Solver and select the appropriate solver for your application. The default solver is ODE45 (Dormand-Prince).

To modify the global solver parameters for your model:

  1. In the Solver options pane of the Model Configuration Parameters window, enter the desired values for step size and tolerance parameters.

Reducing the values of the step size and tolerance parameters enhances simulation accuracy, but decreases simulation speed. Adjust the parameters to obtain an optimal trade-off between simulation speed and accuracy.

Related Examples

Was this topic helpful?