Feedback and echoes
Our system: y[n] = a·y[n−1] + x[n]. The delay box remembers the last output, the gain block multiplies it by a, and the adder adds the new input. We kick it once: x[n] = 1, then zeros.
Set a = 0.8. The kick goes round the loop and is multiplied by 0.8 on every pass: 1, 0.8, 0.64, 0.51, 0.41 ... Each output is 0.8 times the last, so h[n] = 0.8ⁿ shrinks toward zero.
Poles and BIBO stability
In the z-domain, H(z) = 1/(1 − 0.8z⁻¹) = z/(z − 0.8). It blows up at z = 0.8: the pole. The pole is exactly the loop gain a, and h[n] = (pole)ⁿ. Its distance from 0 sets how fast echoes fade.
A system is BIBO stable if every bounded input gives a bounded output. That holds exactly when Σ|h[n]| is finite. Here Σ0.8ⁿ = 1/(1 − 0.8) = 5: inputs never above 1 give outputs never above 5.
Inside, on, outside
Set a = 1. Now 1, 1, 1, 1 ... forever: the pole sits on the unit circle, |z| = 1. Σ|h[n]| grows without limit, and a steady input of 1 makes the output climb 1, 2, 3 ... with no ceiling. Not stable.
Set a = 1.2. Each pass multiplies by 1.2: 1, 1.2, 1.44, 1.73, 2.07 ... and h[11] ≈ 7.43. The pole at z = 1.2 is outside the unit circle, so the response grows without bound: unstable.
Set a = −0.8. The sign flips on every pass: 1, −0.8, 0.64, −0.51 ... but the size still shrinks, because |−0.8| = 0.8 < 1. A pole on the left is just as stable. Only its distance from 0 matters.
A causal system is stable if and only if every pole has |z| < 1: strictly inside the unit circle. Then the region of convergence, |z| > |pole|, contains the circle. On the circle is not stable; outside is unstable.
Complex poles in code
Two delays give two poles. Put them at 0.9·e^(±jπ/4). The response rings and fades: 1, 1.27, 0.81, 0, −0.66 ... The angle π/4 sets an 8-sample swing; the radius 0.9 < 1 sets the fade. Stable.
In Python 3 with numpy, np.roots finds the poles from the feedback coefficients. abs(p) gives each pole's distance from 0: both 0.9. abs(p) < 1 is True for both: every pole is inside, so the filter is stable.
The working
# step 1/10 · loop y[n] = a·y[n−1] + x[n] delay z⁻¹ holds y[n−1], the last output gain a multiplies it by a adder adds the new input x[n] input: the unit impulse δ[n] x[n] = 1, 0, 0, 0 ... start at rest: y[−1] = 0 the output is the impulse response h[n]
The loop gains 0.8, 1, 1.2 and −0.8 and the pole pair 0.9·e^(±jπ/4) are chosen examples. Every value, stem and pole position in the figure is computed from this model by running the difference equation. With a pole on the unit circle some books say "marginally stable": the impulse response does not die out but does not grow either. It is still not BIBO stable, because a bounded input (here a constant) can drive the output without limit.