Main Content

Best Practices for Simulating with the daessc Solver

The daessc variable-step Simulink® solver provides algorithms specifically designed to simulate differential algebraic equations (DAEs) arising from modeling physical systems.

The daessc solver is available with a Simscape™ license only.

Using the daessc Solver

For new models, if your model contains Simscape blocks and DAEs, VariableStepAuto solver defaults to daessc. You can also select the daessc solver explicitly:

  1. In the model window, open the Modeling tab and click Model Settings. The Configuration Parameters dialog box opens and shows the Solver pane.

  2. Under Solver selection, set Type to Variable-step, and then, from the Solver drop-down list, select daessc (DAE solver for Simscape).

  3. Expand Solver details and set Daessc mode to one of these options, to fine-tune the solver performance:

    • auto — Automatically selects the optimal daessc solver mode. This is the default setting.

    • Fast — The most efficient mode in terms of computation cost, but less robust.

    • Balanced — Provides a balance between computational costs and robustness.

    • Robust — More robust, but also more costly.

    • Quick debug — Updates the solver Jacobian at every integration step, and is therefore even more costly than Robust. Recommended only for interactive model development, to quickly find issues with equations.

    • Full debug — Updates the solver Jacobian at every integration step and every Newton iteration. This mode is the most expensive in terms of computational cost. Recommended only for interactive model development, to thoroughly check equations and find possible issues.

The daessc solver uses the following tolerance settings for Simscape states in the model:

  • Sets AutoScaleAbsTol to off

  • If Absolute tolerance is specified as auto, sets AbsTol to the same value as RelTol

These changes are not reflected in the Configuration Parameters dialog box and do not affect other (nonphysical) states in the model. In other words, if your model contains a Simulink controller and a Simscape plant, when you simulate it with the daessc solver, the controller uses the tolerance settings specified in the Configuration Parameters dialog box, but the plant uses AutoScaleAbsTol = off and AbsTol = RelTol.

The daessc solver assumes that the model is well-scaled. For more information, see System Scaling by Nominal Values and Use Scaling by Nominal Values to Improve Performance.

The daessc solver does not support Rsim. You can use this solver with other real-time simulation targets.

For more information on recommended settings and best practices for using daessc, see Troubleshooting Your Models.

Troubleshooting Your Models

To take advantage of the daessc solver, ensure that the model is well-scaled and that the tolerances specified for the solvers make engineering sense. These settings are recommended:

  • Relative tolerance1e-3

  • Absolute tolerance1e-3

  • Auto scale absolute tolerance off

ssc_new and the Simscape templates use these settings. If you use another method to create your model, you can set all three with this command:


To improve model scaling:

  1. In the Configuration Parameters dialog box, on the Simscape pane, ensure that the Normalize using nominal values check box is selected.

  2. Simulate your model using Solver Profiler and check the States Below Absolute Tolerance tab.

    The States Below Absolute Tolerance pane, showing one state called massSpringDamperNominal.k.x.

  3. For each variable listed on this tab, determine if this variable is important for simulation. If it is, open the Property Inspector for the block that contains this variable and specify the nominal value for the variable.

  4. You can also add or edit the value-unit pairs for the model, if needed, by using the Specify nominal values button on the Simscape pane of the Configuration Parameters dialog box.

For more information, see Use Scaling by Nominal Values to Improve Performance.

Upgrading Your Models to Use the daessc Solver

For Simscape models with DAEs created prior to R2021a, the default VariableStepAuto solver is ode23t, and this solver selection does not change automatically when you open such an existing model in the current software version. Use the Check integration method used by 'auto' solver for Simscape DAEs check in the Upgrade Advisor to identify models that still use ode23t as the variable-step auto solver and update them to use daessc, which is designed specifically for physical modeling.

Before updating your models, ensure they are well-scaled and follow the other best practices described in Troubleshooting Your Models.

The daessc solver tends to be more robust for most Simscape models, but some models may experience adverse effects due to this change. After updating the model, simulate it and validate the results and performance. If you decide that you want to restore the previous simulation behavior, change the Solver model configuration parameter from auto (Automatic solver selection) to ode23t (mod.stiff/Trapezoidal).

See Also

Related Topics