# 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)}$$

• You see to assume that H(z) and G(z) do not have delay. In the general case they will have delays
– Ben
May 22, 2019 at 20:28
• Set H(z) to 1 and G(z) to 0 Now set H(z) to 1 and G(z) to 1, what's the answer?
– Ben
May 22, 2019 at 20:40
• Just cut the loop; say after the first summer. Then compute the righthand side for y[n]. Use y[n] and the internal node value to compute the lefthand side. You basically have two (well three including the center as a separate variable) expressions that are equal. Write that and resolve to y[n]/x[n]. May 28, 2019 at 20:30

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] & = x[n] + G \cdot s_2[n] \quad \mbox{(first adder)} \\ s_2[n] & = H \cdot s_1[n] + G \cdot y[n] \quad \mbox{(second adder)} \\ y[n] & = 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.