SimuVeda/ Engineering

Engineering · Simulator 098

Audio Filtering

Filters let some frequencies through and hold others back. Choose a filter type, its cutoff and sharpness, and see its frequency response from deep bass to high treble. A test signal of mains hum, a musical note and hiss shows what survives; press "Play sound" to hear the filtered mix.

CollegeCollege signals and systems

Experiments 0 of 0 Challenge not tried

How the model works

A filter's frequency response |resp(f)| says how much it scales a sine wave of frequency f. It is usually shown in decibels, 20 log₁₀|H|: −6 dB halves the amplitude, −20 dB is one tenth, −40 dB one hundredth.

Low-pass and high-pass filters here are Butterworth designs, as flat as possible in the passband. At the cutoff f_c the response is −3 dB, and beyond it falls by 20 dB per decade (6 dB per octave) for every order:

|H_LP(f)| = 1 / √(1 + (f / f_c)^(2n))

A band-pass filter keeps a band around f₀ whose width is f₀ / Q; a notch removes a narrow band, useful for mains hum at 50 or 60 Hz. Higher Q means a narrower band:

band-pass: |H| = (f/(Q f₀)) / √((1 − (f/f₀)²)² + (f/(Q f₀))²)

The simplest electronic low-pass, a resistor and capacitor, is first order with f_c = 1 / (2πRC).

Responses are for the ideal analog filters; the sound uses the browser's digital biquad filters, which match closely below about 10 kHz. Sound plays only when you press the button; keep the volume low.

Guided experiments

  1. Low-pass, second order. Cutoff 1 kHz. Prediction: −3 dB at 1 kHz and −40 dB at 10 kHz, so the 5 kHz hiss drops by about 28 dB while the 440 Hz note passes almost untouched.
  2. Steeper slope. The same cutoff with order 4. Prediction: still −3 dB at 1 kHz, but −80 dB at 10 kHz and about −56 dB at 5 kHz.
  3. Remove hum. A notch at 50 Hz with Q = 10. Prediction: the 50 Hz hum vanishes while the 440 Hz note and the hiss are barely touched (less than 0.1 dB).
  4. Band-pass. Centred on 440 Hz with Q = 5. Prediction: the bandwidth is 440 / 5 = 88 Hz; the note passes at 0 dB, the hum drops by about 33 dB and the hiss by about 35 dB.

Challenge

A guitar pedal uses a resistor of 1.6 kΩ and a capacitor of 100 nF as a first-order low-pass filter. What is its cutoff frequency, and how much does it reduce a 10 kHz component?

Reveal the explanation

f_c = 1 / (2π × 1600 × 100×10⁻⁹) ≈ 995 Hz. At 10 kHz, f/f_c ≈ 10, so |H| = 1/√(1 + 100) ≈ 0.0995, about −20 dB: a first-order filter falls by only 20 dB per decade. Compare the order-2 setting in the simulator, which gives −40 dB.

References

  • Butterworth, S. (1930), "On the theory of filter amplifiers", Wireless Engineer 7: 536–541.
  • Horowitz, P. and Hill, W., The Art of Electronics, 3rd ed. (2015), ch. 6.
  • Bristow-Johnson, R., "Cookbook formulae for audio EQ biquad filter coefficients" (W3C Audio EQ Cookbook, 2021).

Related simulators

Worked example

Butterworth low-pass, cutoff 1 kHz: |H| = 1 / √(1 + (f / fc)²ⁿ).

At 2 kHz, order 2: 1 / √(1 + 2⁴) = 1 / √17 ≈ 0.24, about −12 dB. Order 4: 1 / √(1 + 2⁸) ≈ 0.062, about −24 dB. Each order adds 6 dB per octave.

At the cutoff every order gives 1 / √2 ≈ 0.707, which is −3 dB.

Notch for mains hum: centred on 50 Hz with Q = 10, the bandwidth is 50 / 10 = 5 Hz, so it removes 47.5–52.5 Hz and leaves a 440 Hz note alone.

Set a low-pass at 1 kHz and compare orders 2 and 4 at 2 kHz on the response curve.

Common questions

What is a cutoff frequency?

The frequency where a filter's output has fallen to 70.7% of its passband level, which is −3 dB, or half the power.

What does filter order mean?

How steeply the filter rolls off beyond the cutoff: 6 dB per octave for each order. A 4th-order filter cuts twice as sharply as a 2nd-order one but costs more and shifts the phase more.

What is the difference between a band-pass and a notch filter?

A band-pass keeps a narrow band of frequencies and removes everything else. A notch removes a narrow band, such as 50 Hz hum, and keeps everything else.

Keyboard shortcuts

Space
Play or pause
S
Step
R
Reset
F
Full screen
?
Show this list