Getting the error message "Derivative of state X in block 'XXX' at time XX is not finite. The simulation will be stopped. There may be a singularity in the solution" when using fixed step solver
20 次查看(过去 30 天)
显示 更早的评论
I have a Simulink model with integrator blocks. The initial condition of the integrator is zero. The signal to be integrated is the result of dividing 2 scalar values. I have two questions:
1. I get 2 different results when running the simulink model using a solver with fixed vs. variable step size (set by using Simulation-> Model Configuration Parameters). If I use a 'variable step size', the model runs smoothly. If I use 'fixed step size' with a step size of 0.001 (i.e. my sampling time), I get the error message: "Derivative of state '1' in block 'XXX/Integrator' at time XXX is not finite. The simulation will be stopped. 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 referred to one of the answers to this question, but it didn't help. My states are initially close to zero, they just jump to high values towards the end. Can anyone suggest a solution or an explanation? P.S. scaling before the division doesn't help either.
2. To divide the 2 scalar values, I use the usual division sign (/). However, I tried to save the values to the workspace and divide them manually (without doing it in Simulink) to test the difference. Why does a simple division give different results depending on the solver's step size?
Thanks in advance! I hope my questions are clear though.
0 个评论
回答(1 个)
Megha Parthasarathy
2017-5-16
Hello,
This problem is caused due to setting of the 'Absolute tolerance' in the Solver plane in the Configuration Parameters. If the setting is tightened the model will run well and this error does not occur.
The Solver Profiler Interface will help to analyze similar models facing the same issues and reveal the DAE Newton Iteration Exceptions which cause the error.
Hope this helps.
Megha
6 个评论
Aitor Estarlich
2020-3-28
Hello @Walter Roberson,
I am getting the same issue. I actually have the output of the integrator into its input somewhere back in the line. How could I solve this?
Thank you.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Configure Simulation Conditions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!