Derivative of state '1' in block 'model_name' at time 0.0 is not finite

17 views (last 30 days)
I am facing this issue and I tried many ways that I found in Mathworks but nothing happened.
Could anyone help me out please.
thanks
An error occurred while running the simulation and the simulation was terminated
Caused by: Derivative of state '1' in block 'my_model' 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)

Answers (1)

Swaraj
Swaraj on 7 Mar 2023
It is difficult to tell the exact solution without knowing the context and the settings of the model.
You can go through below suggestions.
  1. Try reducing the step size of the simulation. This can be done either by reducing the fixed step size or by tightening the error tolerances.
  2. A smaller step size can help to avoid singularities by reducing the amount of change between steps. A singularity in the solution refers to a point where the solution to the system of equations being simulated becomes infinite or undefined. This can happen for a variety of reasons, such as a divide-by-zero error or an overflow in the calculations.
Check for other sources of the error. The error message indicates that there may be a singularity in the solution, but it's possible that the error is being caused by some other issue. Checking for other sources of the error, such as incorrect parameter values or incorrect boundary conditions, may help to identify and resolve the problem.

Community Treasure Hunt

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

Start Hunting!