Hi Tim,
You are getting an algebraic loop error/warning because the enable input of the delay block is driven by the current output. Though the output of the block is at a delay with respect to the input (in values), but the mathematical model input of the block has a direct dependence on the current output which causes an algebraic loop error. Refer the Algebraic Loop Concepts for more information regarding algebraic loops. Basically, algebraic loops occur when an input port with direct feedthrough is driven by the output of the same block, either directly, or by a feedback path through other blocks which have direct feedthrough.
If an algebraic loop is detected you have two options: leave the algebraic loop intact (suppress the warning), or eliminate it. If the speed of execution of the model is acceptable, leaving the loop is probably the better choice. If the speed of execution is slow, you must eliminate the algebraic loop.
To resolve the loop, you can add a unit-delay to the feedback path and to all other forward paths in the same stage (balance the feedback loop delay with delays in other paths).
Best Answer