From: Edoardo on
Hi, I'm new to this forum and I hope to find some answers to my problems.
First of all I'm a begginer in MatLab/Simulink and all I've learned has been learned by myself, no teacher, so probably I lack in some easy fundamentals.

I'm developing a Simulink model for the simulation of an helicopter, this is by now a very simple model, the forces&moments are calculated using some constants that goes directly in different blocks (user-defined function) and from this blocks departs the forces&moments signals that enter the 6DoF block pre-implemented in the aerospace toolbox.

When I run the model I got tons of Warnings sayin:
"Warning: Unable to remove algebraic loops for 'Minimize algebraic loop
occurrences' TrimmerRicontrollato/fuselage forces & moments/Fuselage
forces and moment subsystem parameter. An algebraic loop will occur if
direct feedback exists involving subsystem input corresponding to
TrimmerRicontrollato/fuselage forces & moments/Fuselage forces and
moment/ro"

I don't know how I can generate this algebraic loops... For what I know the algebraic loops are generated when I connect in close loops some differents block without passing through and integrator...

But most of the signals for which the algebraic loops are simple constants, they goes to differents blocks, but there's no direct connection among this blocks.
I don't know how this loops may be generated and how can they affect the simulation.

A sincere thanks to everyone that could help me.
From: James Allison on
Simulink models are graphical representations of ordinary differential
equations. If you have a loop in your model that has only
direct-feedthrough blocks, you have defined an algebraic constraint. In
this case the model no longer represents a system of differential
equations, but a system of differential algebraic equations:

http://en.wikipedia.org/wiki/Differential_algebraic_equation

The solvers in Simulink do not solve DAEs directly. If there is an
algebraic loop in a model, Simulink uses a root-finding algorithm to
resolve the associated algebraic constraint at every time step. This can
be time consuming, slowing down your simulation. In addition, there is
no guarantee that the algebraic loop solver will be able to solve the
algebraic constraint; if the algebraic loop solver fails the simulation
will terminate and issue an error. The warnings appear by default to
alert you that there is an algebraic loop in your system.

It's good practice to avoid algebraic loops when possible. They are
required for some physical systems, but more often than not it is
possible to reformulate your system to eliminate algebraic loops. Also,
the presence of an algebraic loop is often an indication that you have
overlooked some dynamics in your system. In other words, your model with
an algebraic loop assumes something happens instantaneously, when in
really there is some type of dynamics or delay.

You might find the documentation useful:

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f7-8243.html#f7-19688

If you need additional help resolving issues with algebraic loops you
can contact technical support (support(a)mathworks.com).

-James

Edoardo wrote:
> Hi, I'm new to this forum and I hope to find some answers to my problems.
> First of all I'm a begginer in MatLab/Simulink and all I've learned has
> been learned by myself, no teacher, so probably I lack in some easy
> fundamentals.
>
> I'm developing a Simulink model for the simulation of an helicopter,
> this is by now a very simple model, the forces&moments are calculated
> using some constants that goes directly in different blocks
> (user-defined function) and from this blocks departs the forces&moments
> signals that enter the 6DoF block pre-implemented in the aerospace toolbox.
> When I run the model I got tons of Warnings sayin: "Warning: Unable to
> remove algebraic loops for 'Minimize algebraic loop
> occurrences' TrimmerRicontrollato/fuselage forces & moments/Fuselage
> forces and moment subsystem parameter. An algebraic loop will occur if
> direct feedback exists involving subsystem input corresponding to
> TrimmerRicontrollato/fuselage forces & moments/Fuselage forces and
> moment/ro"
>
> I don't know how I can generate this algebraic loops... For what I know
> the algebraic loops are generated when I connect in close loops some
> differents block without passing through and integrator...
> But most of the signals for which the algebraic loops are simple
> constants, they goes to differents blocks, but there's no direct
> connection among this blocks.
> I don't know how this loops may be generated and how can they affect the
> simulation.
>
> A sincere thanks to everyone that could help me.
From: Edoardo on
Thank James, I'm having a better view of the whole things now. But what I found strange is that there is no feed-through the blocks, the force generetor blocks are "feeded" only by constants and eventually from the "In" block (this only in the configuaration used for the trim process) all the forces and moments are generated from this constants and the values are the input for the 6DoF block, all the values exiting from this block go to the "Out" blocks or to the scope... In this last configuration the entire system is open loop. But still I have this warnings.

The unique way to "solve" the problem is to remove the mark on the option "Minimize algebraic loop occurences". This option was activated from a colleague of mine that is supposed to know better the use of MatLab/Simulink.... If I activate that option I get a tons of warnings while if I remove it the warnings disappear... It's logical that as soon as I quit trying to minimize the algebraic loops the warning should not appear, but what is equally strange is that the simulation seems to run in the same way... giving both in trim and simulation configuration the same values.

To be clear I could post an image of my model.