Algebric loop error in simulink model of PV string having 3 modules
1 view (last 30 days)
Show older comments
Error:An error occurred while running the simulation and the simulation was terminated
Caused by:
Simulink cannot solve the algebraic loop containing 'SSJ_3PV_PI/PV Module 3/Diode Rsh/Product5' at time 0.07233 due to one of the following reasons: the model is ill-defined i.e., the system equations do not have a solution; or the nonlinear equation solver failed to converge due to numerical issues.
To rule out solver convergence as the cause of this error, follow either of the suggested actions. If the error persists in spite of the following changes, then the model is likely ill-defined and requires modification.
Suggested Actions:
Reduce the Fixed-step size of the solver.
How to go around this error. I am running the simulation in discrete domain with 1e-5 sample time, fixed step size 5e-6 solver. All other sample time 0.0001s and MPPT output sample time is kept 0.00001 because it is fed back to the function input. SO it is kept 10 times smaller so that it can update in each step. otherwise if the sample times are same, the algorithm gets stuck.
0 Comments
Answers (2)
Yoshi Minagawa
on 22 Apr 2025
Hi Abhishek,
It’s likely that the error is being caused by the presence of an algebraic loop in your model. When an algebraic loop exists, Simulink tries to solve it through iterative calculations. This not only slows down processing, but if the solution does not converge, the simulation will stop with an error.
Since your model is discrete, I recommend identifying the algebraic loop and inserting a one-sample delay in the feedback loop using a Unit Delay or Delay block.
0 Comments
Harsh
on 7 May 2025
I understand that you are encountering an algebraic loop error when executing your Simulink model.
I agree with the points Yoshi has raised and recommend reviewing the following MATLAB Answers post to better understand how to resolve algebraic loops:
If your model includes co-simulation components such as C MEX S-functions or Co-Simulation FMU blocks, you can use Numerical Compensation as a workaround. You can learn more about this approach here:
Please note that to use Numerical Compensation, your model must meet the prerequisites outlined in the first section of the linked documentation.
I hope this helps, thanks!
0 Comments
See Also
Categories
Find more on Discontinuities 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!