Absolute and Relative Tolerances

8 ビュー (過去 30 日間)
Martin Matin
Martin Matin 2015 年 3 月 13 日
コメント済み: jin wang 2018 年 1 月 11 日
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.

採用された回答

Sebastian Castro
Sebastian Castro 2015 年 3 月 13 日
編集済み: Sebastian Castro 2015 年 3 月 13 日
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 件のコメント
jin wang
jin wang 2018 年 1 月 11 日
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.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConfigure Simulation Conditions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by