# How to solve algebraic loop error??

587 views (last 30 days)
Vidya on 23 Nov 2012
Commented: Malaiyappan M on 17 Aug 2020
Hii....I came across this error while making a model..
Simulink cannot solve the algebraic loop containing 'trial_3/PV panel/PV module' at time 0.0 using the TrustRegion-based algorithm 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, either a) switch to LineSearch-based algorithm using set_param('trial_3','AlgebraicLoopSolver','LineSearch') b) reducing the VariableStepDiscrete solver RelTol parameter so that the solver takes smaller time steps. If the error persists in spite of the above changes, then the model is likely ill-defined and requires modification.
I am using coding to make photovoltaic panel and MPPT P&O algorithm.

Show 1 older comment
Rajesh Laguri on 2 Apr 2018
Have you done this, can you please suggest how you solved this issue.I am also coding for same.
Jim Riggs on 2 Dec 2019
It's true that you can break algebraic loops using a unit delay as Azzi Abdelmalek says, but judging by the comments, people are not reviewing the link provided by Walter Roberson, below. This article contains some important information and considerations on the effect of using a unit delay and provides an alternative solution.
Malaiyappan M on 17 Aug 2020
in MPPT Buck/Boost Converer try adjust the Inductor Value to resolve this error

Azzi Abdelmalek on 23 Nov 2012
Edited: Azzi Abdelmalek on 23 Nov 2012
Algebraic loop occurs often, when you have a feedback through a constant block or equivalent, which means your signal y(t0)=constant * y(t0) , you should have y(t0+1)=constant*y(t0) which you can get with a unit delay block

Lukas Kretzschmar Waeny on 12 Mar 2019
Same issue, thanks for helping ...
Sudhanshu Telrandhe on 8 Nov 2019
thanks for helping ...
NING XUE on 10 Mar 2020
Simulink cannot solve the algebraic loop containing 'partial_shading_conditions2/PV_SERIES2/Subsystem/Divide2' at time 0.039814999999999996 using the LineSearch-based algorithm 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, either a) switch to TrustRegion-based algorithm using set_param('partial_shading_conditions2','AlgebraicLoopSolver','TrustRegion') b) reducing the VariableStepDiscrete solver RelTol parameter so that the solver takes smaller time steps. If the error persists in spite of the above changes, then the model is likely ill-defined and requires modification.
The same issue,but I have place the unit delay before the feedback,can't solve this problem
can you help me?

Walter Roberson on 6 May 2017

#### 1 Comment

Jim Riggs on 6 Sep 2018
Good tip. Thanks.

Kalyani Dhawad on 6 Sep 2018
I have same problem in pv system

Ahmed on 19 Jun 2019
I've faced the same problem before, it can be solved by adding a unit delay block and type "set_param('trial_3','AlgebraicLoopSolver','LineSearch') " in the command prombit window of MATLAB.

matham kiran kumar on 3 Aug 2019
Thank you. Its working for me too.
Akash maheshwari on 3 Oct 2019
can you pleasse explain set_param('trial_3','AlgebraicLoopSolver','LineSearch'). i did that in my matlab command window but window show me that algebraic loop parameter did not found.

Gert Kruger on 27 Jun 2019

PIRC on 2 Dec 2019
same problem. you model not helpful.
Malaiyappan M on 17 Aug 2020
Inductor is not designed properly

### Community Treasure Hunt

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

Start Hunting!

Translated by