- Block 'SimulinkModel/EQ2 Matrix Division 1' outputs 'NaN' for element 1 of output port 1 at major time step 0
Simulink Error Message "Derivative of state '1' in block ____ at time 0.0 is not finite. The simulation will be stopped. There may be a singularity in the solution."
517 views (last 30 days)
Show older comments
Ryan Kinzie on 20 Jan 2020
Commented: SALAH alatai on 30 Dec 2022
I need help figuring out why I am getting the error message: "Derivative of state '1' in block 'SimulinkModel/EQ2 Intergrator' at time 0.0 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 have tried reducing the "Absolute Tolerance" in both the "Configuration Paramters" for the solver and each intergrator block's "Block Parameters". However, any combination of decreasing these values does not change the error message.
Please help me figure out why I am getting this error message and how to fix it.
Nishant Gupta on 24 Jan 2020
In the Configuration Parameters, set the diagnostic "Inf or NaN block output" to 'error', you will get the following error:
"An error occurred while running the simulation and the simulation was terminated"
This blocks has a divide by zero, which creates a Inf that is fed to an Integrator, generating this error.
So, avoid division by zero in the logic.
Find more on Configure Simulation Conditions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!