Discrete LTI Systems
Shave off noise with the impulse response
Above is this digital filter’s impulse response h[n] = (1−α)αⁿ. Put in a single impulse δ[n] and exactly this shape comes out. Below, the faint line is the noisy input x[n] (a step plus noise) and the gold stems are its output y[n]. The output is the discrete convolution: h[n] slid across the input, multiplied and summed. Raise the smoothing strength α to stretch the tail of h[n], averaging more neighbors so the noise is shaved away. But push it too far and the step’s edge smears.
The impulse response is the whole system
A discrete LTI system is linear (add the inputs and the outputs add) and time-invariant (delay the input and the output delays by the same amount). Such a system is completely determined by a single impulse response h[n]: the output when you feed in an impulse δ[n] (1 at n=0, zero elsewhere). Why is this one thing enough? Because any input x[n] can be broken into a sum of impulses, Σ x[k]·δ[n−k]. By linearity and time-invariance the output of each impulse x[k]δ[n−k] is x[k]·h[n−k], and adding them all up gives the whole output.
The output is a sliding weighted sum
That sum, y[n] = Σₖ h[k]·x[n−k], is the discrete convolution. At each output time n, flip the impulse response h back in time, lay it over the input at position n, multiply the overlapping samples, and add them all. Then step over by one for the next output. It is the continuous convolution of chapter B with the integral ∫ turned into a sum Σ and curves turned into samples — the principle is the same. A short h[n] mixes only a few nearby points; a long one reaches further into the past. A smooth, averaging h is a low-pass that shaves noise; a differencing h is a high-pass that magnifies change.
FIR and IIR, and the difference equation
If the impulse response ends after a finite length, it is an FIR (finite impulse response) filter. A length-M moving average h[n] = 1/M for n=0..M−1 is the classic example; it only weights input samples, so it is always stable. If instead the system feeds past outputs back in a recursion, the impulse response runs on forever, an IIR (infinite impulse response). The first screen’s filter y[n] = α·y[n−1] + (1−α)·x[n] is one: its impulse response is h[n] = (1−α)αⁿ, a tail that never quite ends. That recursion is a difference equation, and z-transforming it as in E3 gives H(z) = (1−α)/(1 − α z⁻¹), a pole at z = α. The pole must lie inside the unit circle (α<1) for the impulse response to decay and the filter to be stable. An IIR makes a long response from few coefficients — efficient, but it can diverge if a pole leaves the circle.
Back to the first screen
The single impulse response h[n] = (1−α)αⁿ seen above was the entire filter. Raising the smoothing strength α to lengthen the tail of h[n] made the discrete convolution average more neighbors and shaved the noise from the output; pushing it too far smeared the step’s edge. The output was always y[n] = Σₖ h[k]x[n−k], a weighted sum of h slid over the input. Know only the response to one impulse, and you can slide it to make the output for any input. Everything about a discrete LTI system was held inside that small h[n].
We saw the result of filtering by convolution in time, but we have not yet seen, in numbers, exactly which frequencies this filter keeps and which it kills. The next unit, the DTFT and DFT, spreads the impulse response out over frequency. Evaluating the impulse response on the unit circle at z = ejω is the DTFT, the frequency response of a discrete system. The DTFT of an averaging h comes out low-pass, shrinking at high ω. And sampling the infinite DTFT at finitely many frequencies so a computer can actually compute it is the DFT, with the fast algorithm for it being the FFT. Convolution becomes multiplication again, now in the frequency domain.