seegongsik
Saved words
SC · Sampling and discrete time

Discrete LTI Systems

A discrete LTI system is completely fixed by a single impulse response h[n]. Slide that h[n], the output to an impulse δ[n], across the input, multiply and add, and you get the output for any input — discrete convolution. Move the smoothing strength and watch how h[n] shaves the noise off the input.

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.

impulse response h[n] = (1−α)αⁿ
input x[n] (faint) and output y[n] (gold)
smoothing strength α0.20
Filter and output
α = 0.20 · h[n] = 0.80·0.20^n
memory ≈ 1.3 samples (IIR)
Smoothing is weak, so the tail of the impulse response h[n] is short. The output barely averages neighbors, and the noise passes straight through. The output stems are as jagged as the input.
Noise remains

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.

Observeinput δ[n] ⟶ output h[n]
The output of δ[n] is the impulse response h[n].
Choosey[n] = Σₖ h[k] ?
The output is the discrete convolution of h and x.
Fill inIIR y[n] = α y[n−1] + (1−α) ?
A recursion feeds past output back in.
On your ownfinite h[n] = FIR, recursive = ?
With recursion the response is infinite, IIR.

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].

A discrete LTI system, being linear and time-invariant, is completely fixed by one impulse response h[n] (the output of δ[n]). The output of any input is the discrete convolution y[n] = Σₖ h[k]x[n−k], a weighted sum of the flipped, slid h with the input (the ∫→Σ discrete version of chapter B’s convolution). A finite impulse response is an FIR (always stable); a recursion feeding past outputs back gives an endless IIR. z-transforming the recursion (difference equation) yields the poles of H(z), and the filter is stable only if the poles are inside the unit circle (E3). An averaging h is low-pass; a differencing h is high-pass.
On to the next unit

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 = e 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.