Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Discrete Time Integrator: Algebraic Loop Problem

570 views
Skip to first unread message

LarsG

unread,
Oct 14, 2004, 9:16:15 AM10/14/04
to
Hi,

I tried to use a discrete integrator block in a simple feedback loop
with a step as input in MATLAB Simulink R14.
I'd like to choose trapezoidal method but if I do so and start the
simulation, the following warning messages appear:

<<
Warning: Block diagram 'AlgebraicLoop' contains 1 algebraic loop(s).
To see more details about the loops use the command line Simulink
debugger by typing "sldebug AlgebraicLoop" in the MATLAB command
window. To eliminate this message, set the Algebraic loop option in
the Diagnostics page of the Simulation Parameters Dialog to "None".
Found algebraic loop containing:
'AlgebraicLoop/Discrete-Time Integrator' (discontinuity)
'AlgebraicLoop/Sum' (algebraic variable)
Warning: Discontinuities detected within algebraic loop(s), may have
trouble solving.
Warning: Detected algebraic loop path(s) through integrator reset or
IC ports. Results may not be intuitive (see documentation). Use
integrator state port to avoid algebraic loops.
>>

The initial state is set to zero and I can't understand how direct
feed through could appear, causing this algebraic loop.
I don't use the reset or IC port.

If you need further information please let me know...

Thanks in advance,

Lars

LarsG

unread,
Oct 20, 2004, 9:19:46 AM10/20/04
to
If there is a problem with initial conditions due to the fact that
the trapezoidal method needs signal values of past simulation steps:
why can't I specify them in order to inhibit direct feed through at
the beginning of the simulation.

I have no clue...

Lars

Titus Edelhofer

unread,
Oct 20, 2004, 10:23:58 AM10/20/04
to
Hi,
the problem are not the points in the past but the presence: the
trapzoidal rule has direct feedthrough (to compute y_n you need
u_n, not only u_{n-1}).
You can either
- live with the algebraic loop
- use an explicit integrator (Forward Euler)
- break up your feedback loop e.g. with a memory block

Titus

"LarsG" <ple...@askforit.spam> wrote in message
news:eeec...@webx.raydaftYaTP...

LarsG

unread,
Oct 20, 2004, 10:35:39 AM10/20/04
to
Thanks, Titus,

but why does the help file say:

>>Direct Feedthrough:
Yes, of the reset and external initial condition source ports<<


while above the code is listed

>>y(n) = x(n) + K*T/2 * u(n)
x(n+1) = y(n) + K*T/2 * u(n)<<

which means that direct feedthrough is always present with the
trapezoidal method.

LarsG

Titus Edelhofer wrote:
>
>
> Hi,
> the problem are not the points in the past but the presence: the

> trapezoidal rule has direct feedthrough (to compute y_n you need

Titus Edelhofer

unread,
Oct 20, 2004, 10:46:26 AM10/20/04
to
Hi Lars,

o.k., you are right, the characteristics tabular at the bottom does not tell
the complete truth...

Compare the output function (from the help):

Forward Euler: y(n) = y(n-1) + K*T*u(n-1)

Trapezoidal: y(n) = x(n) + K*T/2 * u(n)

So: Euler needs only input values from the past (i.e., no direct
feedthrough),
while trapezoidal needs u(n) (i.e., with direct feedthrough).

Titus


"LarsG" <no...@nospaam.de> wrote in message

0 new messages