<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: How did I get an algebraic loop error, when the diagnostic was set to warning?</title>
	<link>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/</link>
	<description>This blog is about Simulink.</description>
	<pubDate>Sun, 08 Nov 2009 02:56:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: samad</title>
		<link>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-859</link>
		<dc:creator>samad</dc:creator>
		<pubDate>Wed, 23 Sep 2009 08:53:44 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-859</guid>
		<description>hi javad
if you have any problem please write me with my Email.
I hope that i can help you with your mat/simu problem.</description>
		<content:encoded><![CDATA[<p>hi javad<br />
if you have any problem please write me with my Email.<br />
I hope that i can help you with your mat/simu problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: javadaein</title>
		<link>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-790</link>
		<dc:creator>javadaein</dc:creator>
		<pubDate>Tue, 30 Jun 2009 13:04:30 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-790</guid>
		<description>unfortunately mathworks can not be accessed in iran. I dont know why mathworks guys do that but I can't solve my simulink related problems.</description>
		<content:encoded><![CDATA[<p>unfortunately mathworks can not be accessed in iran. I dont know why mathworks guys do that but I can&#8217;t solve my simulink related problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amin</title>
		<link>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-490</link>
		<dc:creator>Amin</dc:creator>
		<pubDate>Thu, 14 Aug 2008 18:28:23 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-490</guid>
		<description>Hi Seth!
I'm very confused. in the Simulink document
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f7-8243.html#f7-19688
solving simple algebraic loops with The Algebraic Constraint block and find z1 = 0, z2 = 1.
i solve this example without this block and find z1 = -1, z2 = 1;
Which answer is correct?</description>
		<content:encoded><![CDATA[<p>Hi Seth!<br />
I&#8217;m very confused. in the Simulink document<br />
<a href="http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f7-8243.html#f7-19688" rel="nofollow">http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f7-8243.html#f7-19688</a><br />
solving simple algebraic loops with The Algebraic Constraint block and find z1 = 0, z2 = 1.<br />
i solve this example without this block and find z1 = -1, z2 = 1;<br />
Which answer is correct?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-428</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Fri, 18 Jul 2008 03:12:41 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-428</guid>
		<description>@Pedro - Simulink does uses Newton's method to perform a search for the solution.  If you have trouble getting it to converge, note the algebraic variable, and place an IC block (initial condition) at the output port of that block.  You can then provide an initial guess for the solver, and may improve your results.  The result from the last solution is used as the initial guess of the next step, and should allow the model to move forward in time.  Good luck!

@Paul J - Thanks for the rant.  You are right... the second type of algebraic loop are the ones that cause me the most frustration too.  In some cases I find conflicting specifications are to blame.  If a subsystem is marked as Atomic, Simulink must be able to compute all of the outputs at the same time.  If there are dependencies on inputs, and those have a direct feed-through path back to the outputs, there is a sorting problem to be handled.  Thanks for contributing to the discussion!</description>
		<content:encoded><![CDATA[<p>@Pedro - Simulink does uses Newton&#8217;s method to perform a search for the solution.  If you have trouble getting it to converge, note the algebraic variable, and place an IC block (initial condition) at the output port of that block.  You can then provide an initial guess for the solver, and may improve your results.  The result from the last solution is used as the initial guess of the next step, and should allow the model to move forward in time.  Good luck!</p>
<p>@Paul J - Thanks for the rant.  You are right&#8230; the second type of algebraic loop are the ones that cause me the most frustration too.  In some cases I find conflicting specifications are to blame.  If a subsystem is marked as Atomic, Simulink must be able to compute all of the outputs at the same time.  If there are dependencies on inputs, and those have a direct feed-through path back to the outputs, there is a sorting problem to be handled.  Thanks for contributing to the discussion!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul J.</title>
		<link>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-371</link>
		<dc:creator>Paul J.</dc:creator>
		<pubDate>Fri, 11 Jul 2008 03:56:42 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-371</guid>
		<description>Seth,

Dealing with algebraic loops is by far the most frustrating problem in simulink.  It seems to me that there are two types of algebraic loops. The first is the mathematical type, e.g. y = 2-y as in your example.  These are usually easy to understand and deal with if we don't want the solver to solve them.  The other type, however, are apparent algebraic loops found by the solver because of how it treats atomic subsystems, embedded matlab function blocks, model references, etc.  This type is not really discussed all that well in the documentation.  Most, but not all, of the problems I've had involve models with these types of blocks, and in these cases the "minimize algebraic loop occurences" hasn't worked for me.  I've had problems where the red highlighting of the algebraic loop stops in midstream and I can't determine where the problem is; 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, without any atomic subsystems or embedded function blocks.  In this particular case, I had an algebraic loop error when I passed a width-3 signal output from a virtual subsystem through a demux, but didn't have an error when I passed out the 3-signals individually.  In this same model, I also had an algebraic loop error when I put a gain block (with gain=1) onto a line, but didn't have any problems w/o the gain block.  This kind of stuff is very frustrating.  A similar problem is with enabled subsystems where the enabling signal is dependent of the states of the subsystem.  For example, consider two balls moving on a wire and we want to disable them when they collide.  I've yet to figure out how to do this w/o putting an extra memory block into the system, outside of the enabled subsystems that govern the motion of the balls, which allows the balls to continue to move for one time step after they've collided.  Thanks for the forum for this rant.  Keep up the blog; I've been finding it very interesting.</description>
		<content:encoded><![CDATA[<p>Seth,</p>
<p>Dealing with algebraic loops is by far the most frustrating problem in simulink.  It seems to me that there are two types of algebraic loops. The first is the mathematical type, e.g. y = 2-y as in your example.  These are usually easy to understand and deal with if we don&#8217;t want the solver to solve them.  The other type, however, are apparent algebraic loops found by the solver because of how it treats atomic subsystems, embedded matlab function blocks, model references, etc.  This type is not really discussed all that well in the documentation.  Most, but not all, of the problems I&#8217;ve had involve models with these types of blocks, and in these cases the &#8220;minimize algebraic loop occurences&#8221; hasn&#8217;t worked for me.  I&#8217;ve had problems where the red highlighting of the algebraic loop stops in midstream and I can&#8217;t determine where the problem is; 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, without any atomic subsystems or embedded function blocks.  In this particular case, I had an algebraic loop error when I passed a width-3 signal output from a virtual subsystem through a demux, but didn&#8217;t have an error when I passed out the 3-signals individually.  In this same model, I also had an algebraic loop error when I put a gain block (with gain=1) onto a line, but didn&#8217;t have any problems w/o the gain block.  This kind of stuff is very frustrating.  A similar problem is with enabled subsystems where the enabling signal is dependent of the states of the subsystem.  For example, consider two balls moving on a wire and we want to disable them when they collide.  I&#8217;ve yet to figure out how to do this w/o putting an extra memory block into the system, outside of the enabled subsystems that govern the motion of the balls, which allows the balls to continue to move for one time step after they&#8217;ve collided.  Thanks for the forum for this rant.  Keep up the blog; I&#8217;ve been finding it very interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro</title>
		<link>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-358</link>
		<dc:creator>Pedro</dc:creator>
		<pubDate>Sat, 05 Jul 2008 21:12:32 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/07/03/how-did-i-get-an-algebraic-loop-error-when-the-diagnostic-was-set-to-warning/#comment-358</guid>
		<description>I have that same problem and i have not find out out to solve it. I would hope that simulink would just do come kind of finite differences to work it out but no. I have even tried to make a discretization of the model without success.

Good luck.</description>
		<content:encoded><![CDATA[<p>I have that same problem and i have not find out out to solve it. I would hope that simulink would just do come kind of finite differences to work it out but no. I have even tried to make a discretization of the model without success.</p>
<p>Good luck.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
