Borrar filtros
Borrar filtros

Absolute and Relative Tolerances

8 visualizaciones (últimos 30 días)
Martin Matin
Martin Matin el 13 de Mzo. de 2015
Comentada: jin wang el 11 de En. de 2018
Hi,
I'd like to know what are the maximum and minimum significative values of RelTol and AbsTol ? I couldn't find the solution on Google or in the previous subjects in MathWork.
Thanks.

Respuesta aceptada

Sebastian Castro
Sebastian Castro el 13 de Mzo. de 2015
Editada: Sebastian Castro el 13 de Mzo. de 2015
These are tolerance metrics used by variable-step solvers in Simulink. They are used to answer the question: "should the solver take a smaller time-step because the errors are too high?"
For example, let's take the variable-step solver ode45. According to the documentation, "This Runge-Kutta (4,5) solver is a fifth-order method that performs a fourth-order estimate of the error."
If this error estimate is above your specified tolerances, your solver will take a step back and reduce the time-step with hopes of reducing that error to an acceptable level.
Now, here's where AbsTol and RelTol come in. Simulink combines both of these tolerances so your solver doesn't get "stuck" in situations that have very small or very large integrator state values.
tolerance = max( AbsTol, RelTol*|state| )
If the state is very small, the relative tolerance multiplied by the state value will also be very small... so in this situation, the absolute tolerance dictates a hard lower bound on the error tolerance.
If the state is very large, on the other hand, the absolute tolerance would be too small and restrictive... so the relative tolerance dominates here.
For more information, check out this documentation page . Go to "Choosing a Variable-Step Solver" and look for the "Specifying Error Tolerances for Variable-Step Solvers" sub-heading.
- Sebastian
  1 comentario
jin wang
jin wang el 11 de En. de 2018
Your explanation has been very helpful. The tolerance sometimes are used in the optimization problem.
Lets say I am using fminsearch function to search for a minimum returned value from a optimization function. I have stated my tolerance in option arguments that pass to fminsearch.
But I have no idea the tolerance I set is absolute or relative. Is it being affected by the 2017a updates like the solver is?
Thank you.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Configure Simulation Conditions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by