Comments on: How did I get an algebraic loop error, when the diagnostic was set to warning? https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/?s_tid=feedtopost Guy Rouleau is an Application Engineer for MathWorks. He writes here about Simulink and other MathWorks tools used in Model-Based Design. Thu, 18 Jan 2018 21:15:05 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Guy Rouleau https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-135360 Tue, 04 Aug 2015 14:24:35 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-135360 Thanks Muhammed, the link has been updated.

]]>
By: Muhammed Fasil https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-135268 Tue, 04 Aug 2015 06:27:06 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-135268 Can anyone help me with these algebraic errors.

https://www.mathworks.com/matlabcentral/answers/232256-why-am-i-getting-these-many-errors-while-simulating-please-help-me-by-rectifying-these-errors-and-a#answer_188144

When im running attached mdl im getting numerous algebraic loop errors at every logic gates, summer, gains etc. As someone has suggested i used 1/z block(without knowing why) in front of some blocks. I use 1/z block in front of one NOT gate, 1 function block and 1 in front of a summer block. After that i got this error
“Algebraic state in algebraic loop containing ‘conventional28_07_math/SVPWM/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)”

Please help!!

Attachment is given in above link.

Thanks alot in advance!

]]>
By: Muhammed Fasil https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-135262 Tue, 04 Aug 2015 06:14:42 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-135262 Algebraic loop Diagnostic link given in first para does not exist

]]>
By: Rahul Bhatia https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-119020 Sun, 05 Apr 2015 06:11:27 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-119020 I am trying to create a fault(sag) in a power system. It is a dynamic condition.When I create it lets say 2sec I dont get a algebric loop error…But when I create it on 0.5sec I get this error.Can anyone help me on this?

]]>
By: Marcela https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-92978 Tue, 04 Nov 2014 14:22:18 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-92978 The abolhasan zare’s solution is corret!! I solve it using the memory block (simulink) to do the loops!! =D Thanks!!

]]>
By: Khemakhem https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-66803 Mon, 19 May 2014 07:56:25 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-66803 abolhasan it tells me that i have a problem with 4th derivative input in state space .
how can i solve it ?

]]>
By: Mike Tesfaye https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-34250 Mon, 20 May 2013 17:48:03 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-34250 Me too Like Paul J. I had a case where an algebraic loop was reported when a gain block was set to something other than 1; and I just had a problem where an algebraic loop error was reported in a very simple model where there is a transfer between two states (stateflow).

]]>
By: abolhasan zare https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-1855 Mon, 11 Jun 2012 09:25:10 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-1855 hii
i found a very simple way to resolve this problem:”Simulink cannot solve the algebraic loop…”

*************************************
It is only enough to add a “unit delay” block in the feedback branch !
*************************************1/z***********
regards
abolhasan

]]>
By: Steve K https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-1837 Thu, 24 May 2012 03:41:01 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-1837 A more complete explanation of breaking fake algebraic loops can be found at https://www.mathworks.com/support/solutions/en/data/1-8XGT73/index.html?solution=1-8XGT73

]]>
By: Seth https://blogs.mathworks.com/simulink/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-1778 Thu, 05 Apr 2012 01:45:01 +0000 https://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-1778 @Asier – most likely, changing the name of the block changed the starting point for the sorting algorithm, and it came up with a different sorted order. This suggests that your system is under-specified (your system is inheriting a lot of information from defaults), or has loops that can be unwound in many different ways by the sorting algorithm.

@Ubaldo – Th IC block doesn’t add state. It does specify an initial guess for the value of a signal, and in the case of some algebraic loops, this can help in solving them. If I am reading what you wrote correctly, the process of solving the loop as you describe it, is similar to what is done at each step in the model. The algebraic loops represents an equality constraint on the system, and the algebraic variable has to solve for the equation: f(x) = x. The algebraic variable is where Simulink chose to “break” the loop, and set up the constraint.

Breaking the loop with a delay is not always the right answer. A constraint like this implies a constraint in the dynamic system you have described. It can be a result of a real constraint in the physical system, or could result from the way it is expressed in the model.

For the type of algebraic loop “caused” by atomic units in the model (atomic subsystems, model reference, MATLAB Function, etc.) it is a case of conflicting requirements. The connections in the model specify a data dependency, and the types of units used to express the algorithm specify an input/output relationship with direct feed-through. When the execution order of these algorithmic units loops back on itself, the loop is defined. I don’t think of it as luck, so much as a conflict of specifications.

Regardless, it is very frustrating when you can see that the system has some kind of break point/state, but Simulink can’t.

]]>