How to detect algebraic loop in a system I came across a system (screen below) that looks like it should result in a algebraic loop, but when writing the equations using the Z-transform, it obviously does not (calculation below too). But I still cannot figure out how such a system can function, especially if both H and G introduce no delay ? What am I missing here about the way these kind of systems function that would prevent the first + operation to add up with itself recursively ?

(The way I understand it is : the input values travel through the wires until the reach the output.)

Hope the question is not too vague.



To solve this system, we define the signal that is being added to $X(z)$ as $V(z)$, and the signal that is the result of $H(z)(X(z) + V(z))$ as $W(z)$. We get the following system of equality : 

$Y(z) = H(z)W(z)$ 

$W(z) = H(z)X(z) + H(z)V(z)$ 

$V(z) = G(z)W(z) + G^2(z)Y(z)$ 

From 3 and 2 we get 
$W(z) = H(z)X(z) + H(z)G(z)W(z) + H(z)G^2(z)Y(z)$  $\iff W(z)(1 - H(z)G(z)) = H(z)X(z) + H(z)G^2(z)Y(z)$ 
 $\iff W(z) = \frac{H(z)X(z) + H(z)G^2(z)Y(z)}{1 - H(z)G(z)}$

Then merging with 1, we have that $Y(z)(1 - \frac{H^2(z)G^2(z)}{1 - H(z)G(z)}) = \frac{H^2(z)X(z)}{1 - H(z)G(z)}$
$\iff Y(z)(\frac{1 - H(z)G(z) - H^2(z)G^2(z)}{1 - H(z)G(z)}) = \frac{H^2(z)X(z)}{1 - H(z)G(z)}$

$\iff Y(z) = X(z)\frac{H^2(z)}{1 - H(z)G(z) - H^2(z)G^2(z)}$

Then we can derive the overall transfer function as $\frac{Y(z)}{X(z)} = \frac{H^2(z)}{1 - H(z)G(z) - H^2(z)G^2(z)}$
It's not that loops end up adding things recursively. Think of them like wired connections. Loops in wired connections don't lead to recursive loops do they? Now, at each adder the sum of all that's incoming and outgoing must be equal, much like Kirchhoff's current law. This leads to a linear system of equations. The solution of which tells you in what state the system settles.

Let's consider the case that both $H$ and $G$ are completely memoryless so that the output of $G$ for an input $x[n]$ is $G \cdot x[n]$. Further, let's call the outputs of the two adders $s_1[n]$ and $s_2[n]$. Then, your network layout leads to the following equations

$$\begin{align}
s_1[n] &amp; = x[n] + G \cdot s_2[n] \quad \mbox{(first adder)} \\
s_2[n] &amp; = H \cdot s_1[n] + G \cdot y[n] \quad \mbox{(second adder)}  \\
y[n] &amp; = H^2 \cdot s_1[n] \quad \mbox{(output)}
\end{align}$$

That's a linear system of equations. For every $n$, you are given $x[n]$ (your input), your unknowns are the output $y[n]$ and the two intermediate variables $s_1[n]$ and $s_2[n]$. Solving the three equations with three unknowns gives you the value of $y[n]$ to expect. Since there is no memory here, you can do this for each $n$ independently. 

The $z$-transform helps you to do this easily even in the case where there is memory.