an error for feedback loop

1 view (last 30 days)
Fei Wu
Fei Wu on 29 Mar 2016
Answered: ag on 24 Apr 2025
Hello, I have a block diagram of single input/output. The source is a constant and sink is just a display. Without a feedback loop everything works find. But after adding a feedback loop, even with a gain of zero, i get the following error: Algebraic state in algebraic loop containing 'function/Sum' 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). With the feedback gain being 0, essentially the feedback is 0. Why am i still getting an error?

Answers (1)

ag
ag on 24 Apr 2025
Hi Fei,
Algebraic loops occur when an input port with direct feedthrough is driven by the output of the same block, either directly, or by a feedback path through other blocks which have direct feedthrough. In your case, the cause seems to be the addition of the feedback loop.
In most of the cases the solution is to model the system so that the loop is no longer present. In some cases, adding a small delay (Either discrete delay block or continuous memory block) to the system at its highest level might remove the loop.
For a better understanding of Algebraic loops and how can they be solved, I kindly suggest you to go through the following MATLAB answers post: https://www.mathworks.com/matlabcentral/answers/95310-what-are-algebraic-loops-in-simulink-and-how-do-i-solve-them
Hope this helps!

Categories

Find more on Dynamic System Models 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!