Guy and Seth on Simulink

April 29th, 2010

Causes of Algebraic Loops

A lot of people ask the question, "Why does my model have an algebraic loop?" Of course, every model is different, but here are some general truths about algebraic loops:

  1. Real physical systems don't have algebraic loops.
  2. If you model a physical system and get an algebraic loop, there is probably something missing in the model.
  3. Modeling short cuts simplify a simulation and make it more efficient, but can introduce algebraic loops.
  4. Sensors and actuators are commonly ignored, especially for low fidelity models. These are ideal places to introduce delay into your system and break the loop.

Simulink models with missing sensors might encounter an algebraic loop if there is direct feed-through in the plant model.

Sensor Contest

Speaking of sensors, the 2010 Spring MATLAB programming contest started yesterday and is titled Sensor!

The topic of this contest is compression sensing technology for digital images. You have until Wednesday, May 5th, to look at the rules and create your submission.

You would like to be informed in advance of future programming contests? Visit the MATAB Programming Contest Blog to get updates automatically.

Good luck!

Good luck fixing your algebraic loops, and entering the Sensor contest! Questions about algebraic loops? Leave a comment here and I'll try to answer.

One Response to “Causes of Algebraic Loops”

  1. riccardo replied on :

    Seth,
    apologies for being pedantic, but I really cannot stand a statement like “Real physical systems don’t have algebraic loops” …. of course they don’t, they aren’t mathematical models, are they ?!! Doesn’t it sound a bit silly, like putting a warning “please note you don’t need sun glasses to look at this” on a model of the solar activity :)) ?
    On a more serious note, point (2) is also a bit superficial, as it can be read “if you get an algebraic loop, you have a problem”. More accurately, if you end up with algebraic loops in a model REPRESENTED AS A BLOCK-DIAGRAM it means that you should check the causality of all feedback signals, i.e. make sure that everyone of them lands on a time-slicing block (delay/integrator/filter/SS, etc.).
    Cheers,
    Ricardo

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks
Guy Rouleau and Seth Popinchalk are Application Engineers for MathWorks. They write here about Simulink and other MathWorks tools used in Model-Based Design.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.