- Block 'BlockName' outputs 'NaN' for element x of output port x at major time step 0
Derivative of state '1' in block 'untitled/Integrator1' at time 6.6752215755216051E-309 is not finite.
4 次查看(过去 30 天)
显示 更早的评论
Hello there, hope you are all doing well. I was doing a pretty basic simulation with 2 different integrators, consisting of initial values and after I started the simulation I received the following errors for both integrators:
An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state '1' in block 'untitled/Integrator1' at time 6.6752215755216051E-309 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)
Here is the image of my model:
0 个评论
采纳的回答
Shadaab Siddiqie
2021-4-15
From my understanding you are getting an "Derivative of state '1' in block untitled/Integrator1" error while running your model. This problem occurs when an integrator is present in the model. Open Configuration Parameter, set the diagnostic "Inf or NaN block output" to error, you will get the error as follows:
An error occurred while running the simulation and the simulation was terminated
Caused by:
where BlockName is the block in which error is thrown.
This blocks has a divide by zero, which creates a Inf that when fed to an Integrator, generates this error. So, avoid division by zero in the logic.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!