Error using Algebraic Constraint block in Simulink
5 views (last 30 days)
Show older comments
I wanted to implement a complex equation using Algebraic Constraint block, but I am getting an error which is as follows
Trouble solving algebraic loop containing 'trial1/Algebraic Constraint1/Initial Guess' at time 0. Stopping simulation. 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)
The equation I'm trying to solve is
w1*r3*cosβ= w2r4(sinw2t + (r4*sin(2*w2*t)*cosβ)/(2*l2)).
Basically I have to put values of all parameters as some constant and get a graph of w2 vs time...
Your help would be of immense value to me. Also suggest if I can solve by any other method.
Shows the implementation of the above equation

0 Comments
Answers (1)
ag
on 2 May 2025
Hi Paavni,
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 feeback loop seems to be created by the output of the block "Algebraic Constant1" feeded to the "Gain" block.
In most of the cases the solution is to model the system so that the loop is no longer present.
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!
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!