필터 지우기
필터 지우기

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 CenterFile Exchange에서 Configure Simulation Conditions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by