Specify the largest acceptable solver error, relative to the size of each state during each time step. If the relative error exceeds this tolerance, the solver reduces the time step size.
Setting the relative tolerance to
actually the default value of
The relative tolerance is a percentage of the state's value.
The default value (
1e-3) means that the
computed state is accurate to within 0.1%.
The acceptable error at each time step is a function of both the Relative tolerance and the Absolute tolerance. For more information about how these settings work together, see Error Tolerances for Variable-Step Solvers.
During each time step, the solver computes the state values at the end of the step and also determines the local error – the estimated error of these state values. If the error is greater than the acceptable error for any state, the solver reduces the step size and tries again.
The default relative tolerance value is sufficient for most applications. Decreasing the relative tolerance value can slow down the simulation.
To check the accuracy of a simulation after you run it, you can reduce the relative tolerance to 1e-4 and run it again. If the results of the two simulations are not significantly different, you can feel confident that the solution has converged.
This parameter is enabled only if you set:
Solver Type to
Solver to a continuous variable-step solver.
This parameter works along with Absolute tolerance to determine the acceptable error at each time step. For more information about how these settings work together, see Error Tolerances for Variable-Step Solvers.
|Type: character vector|
|Value: any valid value|
|Safety precaution||No impact|