- The equations are forming a positive feedback loop that diverges over time. This could be due to a modeling error, or the system modeled is actually unstable.
- If using a fixed-step solver, the step size might be too large to properly capture the system dynamic.
- There is a division by zero causing a Inf/NaN to enter an Integrator block.
Why am I receiving error messages about singularities in my Simulink model?
218 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 14 de Abr. de 2011
Editada: MathWorks Support Team
el 25 de Jul. de 2024
I am receiving the following error messages about singularities in my Simulink model:
ERROR: Derivative of block at time is Inf of NaN. Stopping Simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances.)
I have tried reducing the step size and adjusting tolerances, but I still receive this error message. I have also tried changing solvers, some solvers will just get to one point of the simulation, and hang.
Respuesta aceptada
MathWorks Support Team
el 25 de Jul. de 2024
Editada: MathWorks Support Team
el 25 de Jul. de 2024
The most common reasons for this error are:
See this blog post for more details and tips to debug this error:
4 comentarios
Walter Roberson
el 1 de Dic. de 2015
nor intanliana mohd sadik, you already posted that.
"I need to solve this as soon as possible" means that it is so important that all 6 billion or so people in the world who are not actively saving someone's life at the moment, must stop what they are doing and help you solve it, no matter what the inconvenience to them, and doing nothing else that does not involve keeping someone alive, because that is what would get you the solution "as soon as possible".
If you need that kind of assistance from everyone in the world, because a solution must be arrived at "as soon as possible" then you are going to need massive coordination from international emergency services people. For example they are going to need to go around door-to-door and wake people up and get them to work on the problem. Therefore if you need an answer "as soon as possible" you should not be starting with us, you should be starting with your police or your diplomats or who-ever else can undertake this massive coordination of people world-wide to solve your problem as soon as possible.
Walter Roberson
el 19 de Dic. de 2015
Editada: MathWorks Support Team
el 27 de Abr. de 2023
Más respuestas (1)
Sorelys Sandoval
el 21 de Ag. de 2016
Hi, I had the same problem and the next thing worked for me:
Go to model configuration parameters/Solver/Solver Options: Type: Variable-step Solver: ode15s (stiff/NDF)
and that's all. Hope it works for you :D
1 comentario
Qu Cao
el 9 de En. de 2017
In the case of a stiff system, changing the solver type could help resolve the issue.
Ver también
Categorías
Más información sobre Diagnostics en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!