Engineering · Simulator 098
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
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.
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?
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.
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.
The frequency where a filter's output has fallen to 70.7% of its passband level, which is −3 dB, or half the power.
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.
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.