Signals to learning / 5. Build systems

Lesson 19 of 40 · Intermediate · About 30 minutes

Frequency response and filter trade-offs

Why does averaging suppress some frequencies more than others?

You will be able to

  • Read a filter magnitude response and its DC gain.
  • Explain attenuation, transition width and delay trade-offs.

Sinusoids reveal an LTI system

A complex exponential is an eigenfunction of a fixed LTI filter: the output has the same frequency scaled by complex response H(eⁱω). Its magnitude changes amplitude and its angle changes phase. Frequency ω is in radians/sample; convert to Hz using ω=2πf/fₛ.

An average is not an ideal low-pass

A causal M-tap moving average has equal weights 1/M. Its DC gain is one, but its response includes sidelobes and zeros rather than a perfectly flat passband and sharp stopband. The symmetric impulse response has linear phase with group delay (M−1)/2 samples away from response zeros, with the usual phase-wrap caveats.

H(exp(iω)) = (1/M)Σₙ₌₀ᴹ⁻¹ exp(−iωn); DC gain=1

Worked example

A two-tap average h=[0.5,0.5] gives H(0)=1 and H(π)=0. It preserves constants but eliminates an alternating +1,−1 input in steady state.

A common trap

A filter can have unit DC gain yet distort other desired frequencies. “Smoothing” is not a full specification.

Predict, then experiment

As you increase tap count, does the moving average become a perfect brick-wall filter? Before touching the controls, say or write your prediction.

Try it yourself

The moving-average response

Where are the passband, zeros and sidelobes?

Exact magnitude of the causal equal-weight FIR. Frequency is radians/sample, from DC to Nyquist π. This is an analytical response, not a benchmark or measured acquisition.

Your experiment

Compare 2, 5 and 9 taps. Locate zeros and sidelobes on the magnitude curve. Explain what happens to group delay and the high-frequency rejection pattern.

Change one parameter at a time. Compare what you observed with your prediction and record an explanation in your notes.

Check your understanding

Try from memory first. Hints and feedback are part of learning, not a penalty. These checks are for self-study, not a graded qualification.

1. A two-tap [0.5,0.5] average has DC gain…
Give me a hint

At ω=0 every complex exponential equals one.

2. What is the group delay of a symmetric causal 5-tap FIR in its nonzero response bands?

Accepted absolute tolerance: ±0.001 samples.

Give me a hint

Use (M−1)/2.

Reference answers (after your attempt)
  1. 1 — Correct: sum of coefficients is one.
  2. 2samples — (5−1)/2=2 samples.

Apply it: Specify a filter requirement

Use paper, your notes, or a local notebook/editor. Code examples are Python 3 starting points to run yourself; this page does not execute code or automatically assess the practical task.

  1. State passband, stopband and sample rate for an application.
  2. Set acceptable attenuation, ripple and delay.
  3. Explain why a moving average might fail the specification.
Reference solution & review criteria

For an audio prefilter, specify preserved frequencies and required attenuation before output Nyquist. Moving-average sidelobes and passband droop can fail the requirement; select/design a suitable FIR or IIR and validate response/delay.

Your notebook

Notes and progress stay in this browser. They are not sent to the server; ordinary web-server request logs still operate. Export a backup from the course page.

Review list

Completion requires both correct checks and your practical-task acknowledgement.

Go deeper

Sources support further study; the worked examples and questions here are original. Browser experiments are small, disclosed models—not evidence of production-model quality or hardware performance.