Skip to main content

9.4.3–9.4.4 Filters and windowed sinc

Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §9.4.3–9.4.4. Rewritten in original wording. Continues 9.4b. Next: 9.4c labs.

Convolution = filtering​

A linear filter maps input ff to output gg by convolution with an impulse response hh. In frequency space that becomes a product. An ideal brick-wall lowpass is a rect in ω\omega whose transform is a sinc. Pick g=f∗hg=f*h, the convolution theorem, and rect↔\leftrightarrowsinc among lookalikes.

Figure 9.4 — block diagram of a filter.

h(t)h(t) is the response to δ(t)\delta(t). Causality: h(τ)=0h(\tau)=0 for effects before causes (no peeking into the future). Filter in frequency by multiplying spectra, then inverse-transform — often cheaper than a long time-domain convolution.

Figure 9.5 — RC lowpass and highpass.

Analog RC sketches (τ=RC\tau=RC) and the ideal rect↔\leftrightarrowsinc pair are part of the guided pick above: ∣Hlp∣|H_{\mathrm{lp}}| falls as ω\omega grows; ∣Hhp∣→1|H_{\mathrm{hp}}|\to 1 at large ω\omega and vanishes at ω=0\omega=0. Phase comes from the imaginary pieces; magnitude carries the pass/stop story.

Digital taps​

A delay line with coefficients cnc_n implements

h(t)=∑n=0Ncn δ(t−nτ)⇒H(ω)=∑n=0Ncne−inωτ,h(t)=\sum_{n=0}^{N} c_n\,\delta(t-n\tau) \quad\Rightarrow\quad H(\omega)=\sum_{n=0}^{N} c_n e^{-in\omega\tau},

and on a continuous (or sampled) input

g(t)=∑n=0Ncnf(t−nτ).g(t)=\sum_{n=0}^{N} c_n f(t-n\tau).

Knowing the cnc_n is knowing the filter. A DFT itself is a bank of such frequency taps.

Windowed sinc (ideal lowpass, made practical)​

Figure 9.7 — rect in \omega ↔ sinc in t.

Discrete sinc kernel (centered, then shifted to t≥0t\ge 0)

h[i]=sin⁡[2πωc(i−M/2)]i−M/2,h[i]=\frac{\sin\bigl[2\pi\omega_c(i-M/2)\bigr]}{i-M/2},

truncated to M+1M+1 taps (MM even). Truncation ⇒\Rightarrow Gibbs ringing in H(ω)H(\omega). Soften the cut with a Hamming window

w[i]=0.54−0.46cos⁡ ⁣(2πiM),w[i]=0.54-0.46\cos\!\left(\frac{2\pi i}{M}\right),

and use h[i] w[i]h[i]\,w[i]. Choose ωc\omega_c as a fraction of the sampling rate; MM sets how sharp the transition band is. Same tool pretreats signals before a DFT to fight aliasing (§9.3).

Quiz

Filters and sinc

1 / 4

In the frequency domain, convolution f∗h becomes…

Pick an answer to see if you are right.

Next: 9.4c Filter & sinc labs.