DSP 101
M7 · Lab
Hands-on lab
Design an FIR, read its linear phase

Design a low-pass FIR filter in the sandbox, and predict — before you read it off the screen — how many taps it has, its constant group delay in samples, and the magnitude at its cutoff.

The FIR difference equation
y[n] = \sum_{k=0}^{N-1} b_k\, x[n-k]

An FIR filter is a weighted sum of the last N input samples, so it is always stable and — when its coefficients are symmetric — it has exactly linear phase: every frequency is delayed by the same (N-1)/2 samples, so the waveform shape survives. Reading the tap count, that flat group delay and the -6 dB cutoff off a design is how you know what an FIR costs and what it buys.

1 / 7
DSP 101
M7 · Lab
Set it up
One low-pass FIR

Open the sandbox. It opens on exactly this state — a low-pass FIR — so a Reset gets you here too. Each step names the one knob to change; leave everything else alone.

Set these values
Response -> Low-pass Sample rate -> 48000 Hz Cutoff -> 0.15 f_s Window -> Hamming Taps N -> 63

Watch the impulse-response readout (the tap count), the group-delay panel (a flat line) and the magnitude curve — every number you predict is printed or drawn there.

2 / 7
DSP 101
M7 · Lab
Step 1 of 3
How many taps?

Keep the defaults: Taps N = 63, a Hamming window. The impulse response of an FIR is exactly its coefficient list, so it has as many taps as the design length. Predict the tap count, then read the impulse-response readout.

Expected

The design has N = 63 taps — its impulse response is exactly those 63 filter coefficients, and nothing after them (that is what finite impulse response means).

3 / 7
DSP 101
M7 · Lab
Step 2 of 3
The constant group delay

Still N = 63 taps. A symmetric (Type I) FIR delays every frequency by the same (N-1)/2 samples — that is what linear phase means. Predict the group delay, then read the group-delay panel.

Expected

The group-delay panel is a flat line at (N-1)/2 = (63-1)/2 = 31 samples — every frequency is delayed by the same 31 samples, so the waveform shape is preserved.

4 / 7
DSP 101
M7 · Lab
Step 3 of 3
Half amplitude at the cutoff

The cutoff is at f_c = 0.15 · f_s = 7200 Hz. A windowed-sinc low-pass crosses half amplitude right at its cutoff. Predict the magnitude there in dB, then read the magnitude curve at the cutoff.

Expected

The magnitude curve passes through about -6.02 dB at the cutoff f_c = 7200 Hz — half amplitude, since 20·log10(0.5) = -6.02 dB. The demo computes it to a hundredth of a decibel.

5 / 7
DSP 101
M7 · Lab
Your turn
Open the sandbox

Everything above is waiting in the sandbox. Change the window and watch the transition-versus-stopband trade-off, raise the taps and watch the transition narrow while the flat group-delay line stays flat, and sweep the cutoff.

6 / 7
DSP 101
M7 · Lab
Wrap-up
What you did
  • Read the FIR tap count, N = 63, off its impulse response
  • Found the constant group delay (N-1)/2 = 31 samples — the linear-phase payoff
  • Read the cutoff at half amplitude, about -6.02 dB at f_c = 7200 Hz
  • Every value you predicted is the demo's own windowed-sinc arithmetic, not a picture
7 / 7
1 / 8 muted