An error occurred while running the simulation and the simulation was terminated

761 views (last 30 days)
Trouble solving algebraic equations in differential-algebraic system. Singular iteration matrix encountered with step size 3.3730961873744423E-9 at time 0.0. Consider providing more accurate initial conditions. If the problem persists, check the model structure and values of parameters.
what should I do ?
  1 Comment
awatef chouat
awatef chouat on 25 Sep 2020
Algebraic state in algebraic loop containing 'Systeme_PV_connecte/Champ PV 2/Diode/Product2' computed at time 0.015000000000000001 is Inf or NaN. There may be a singularity in the solution. If the model is correct, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances).
Please what should i do?

Sign in to comment.

Answers (5)

Steve Miller
Steve Miller on 1 Feb 2018
There are many modeling mistakes or poor parameter settings that can lead to this error diagnostic. It would be necessary to see the model to find the exact answer.
Things you can try:
1. MOST IMPORTANT: Carefully check the rest of the diagnostics to see if any other warnings highlight other problems with the model. For example, does it indicate there are algebraic loops?
2. Make sure your solver is set to "Variable Step", "Auto", and check the tolerance settings.
3. Open the Simscape Variable Viewer and see if any initial conditions aren't being satisfied. For more information, read the documentation for the Simscape Variable Viewer
There are many other possible causes for this error, but this should give you a place to begin.
--Steve
  4 Comments
Steve Miller
Steve Miller on 8 Nov 2021
The diagnostic states there is an algebraic loop. You need to break this algebraic loop. Use the algebraic loop highlight tool to figure out which loop you need to break with a transfer function or a unit delay.
--Steve
Alamdar
Alamdar on 3 Mar 2024 at 10:21
I have everything possible that you mentioned here, the simulation was running nice and earlier but now all of a sudden it shows this and after trying everything I know, it still persists. What should I do?
An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state '1' in block 'PV_and_batery_MPPT_ANFIS_PSC1/PV Array1/Diode Rsh/Transfer Fcn' at time 0.060841702204041406 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)

Sign in to comment.


John
John on 8 Nov 2021
metoo

nado adjr
nado adjr on 23 Jan 2022
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • The expression: (1/(9*10^(-6)+0.1*u(4)))*(u(2)*u(4)*u(3)*0.1+0.98*u(3)*cos(u(1))) in 'HANANEE/Fcn2' has a subscript t
  • hat is out of range
can someone help me to find the error

Stiven
Stiven on 30 Jun 2023
Error:An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state 'circuito1.Capacitor4.vc' in block 'circuito1/Capacitor4' at time 0.083466307514932031 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)

Mathewos
Mathewos on 19 Oct 2023
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • Algebraic state in algebraic loop containing 'newLMS/Subsystem/Product' computed at time 0.0 is Inf or NaN. There may be a singularity in the solution. If the model is correct, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)

Community Treasure Hunt

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

Start Hunting!