How to solve this error? Error:"Nonlinear iteration is not converging with step size reduced to hmin (9.59393e-15) at time 2.70045. Try reducing the minimum step size and/or relax the relative error tolerance."

조회 수: 188 (최근 30일)
How to solve this error?
Error:"Nonlinear iteration is not converging with step size reduced to hmin (9.59393e-15) at time 2.70045. Try reducing the minimum step size and/or relax the relative error tolerance."
i have already tried and reduced the minimum step size and incresedRelaxed the tolerance and still the error persists for ode15s solver.

답변 (1개)

Swetha Polemoni
Swetha Polemoni 2021년 3월 1일
Hi,
This may occur when one of your signals is either diverging to +infinity or -infinity or changing too rapidly based on solver settings
  댓글 수: 2
Manish Varma Raathimiddi
Manish Varma Raathimiddi 2021년 11월 21일
Is there any other way that we can rectify this error as I still couldn't able to figure it out. Can you please help me out.
Walter Roberson
Walter Roberson 2021년 11월 21일
NO, there is no other way to rectify that error. There are only a small number of possibilities:
  1. The system and its first 2 derivatives are continuous over the entire domain of integration, and there are no numeric problems -- in which case the problem just doesn't happen
  2. The system and its first 2 derivatives are theoretically continuous over the entire domain of integration, but there are numeric issues, such as if you had (x-1)^2/(x-1) and x needs to pass through 1, then in theory this is continuous but if you are not careful in how you write the code then you get a division by 0 -- in which case the code needs to be written more carefully to avoid the numeric problems
  3. If the system is piecewise continuous, and there is well-defined behaviour at the discontinuities, and the discontinuities are at predictable times -- in which case you need to carefully control the tspan of each call so that each call is within a continuous section, and then when the call returns, adjust the system from outside the ode* funciton and restart from the time boundary. For example a system that has an injection of drug or energy at periodic intervals
  4. If the system is piecewise continuous, and there is well-defined behaviour at the discontinuities -- in which case you need to write event functions to terminate the ode*() call, adjust the system from outside of the ode* function, and restart from the event boundary; for example a bouncing ball
  5. In all other cases, the system is not suitable for use with the variable-step ode* functions.
In particular, the ode functions are not suitable if the code uses randomness. They are also not suitable in most cases where the code has if statements or interp*() calls with default interpolation methods. (There are some cases in which it is safe to use if or interp1(), if you know what you are doing.)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by