Signal Filtering

Low-pass, high-pass, and convolution - shaping signals

Shaping Signals in Frequency Space

Filtering is the process of selectively removing or enhancing certain frequencies in a signal. Thanks to the convolution theorem, filtering becomes simple multiplication in the frequency domain.

This is the technology behind bass boost, treble adjustment, noise reduction, and countless other audio and image processing techniques.

Types of Filters

Low-Pass Filter

Passes low frequencies, blocks high frequencies. Like bass boost or a muffled sound through a wall.

Blurs images, smooths signals

High-Pass Filter

Passes high frequencies, blocks low frequencies. Like removing bass rumble or background noise.

Sharpens images, enhances edges

Band-Pass Filter

Passes only a specific range of frequencies. Used in radio tuning and isolating specific sounds.

Radio tuning, voice isolation

Notch Filter

Removes a specific frequency while passing all others. Used to eliminate 60Hz hum or other interference.

Removes power line hum, feedback

The Convolution Theorem

The key insight that makes filtering efficient:

FFT(f * g) = FFT(f) × FFT(g)

Convolution in time/space domain (*) equals pointwise multiplication (×) in frequency domain.

Instead of sliding a filter kernel across every point (O(n²)), we can:

  1. FFT the signal
  2. FFT the filter kernel
  3. Multiply them together
  4. Inverse FFT the result

This runs in O(n log n) - a massive speedup for large signals!

Filter Frequency Response

Each filter has a frequency response that shows how it affects each frequency. Key terms:

  • Passband: Frequencies that pass through unchanged
  • Stopband: Frequencies that are blocked
  • Cutoff frequency: Where the transition happens
  • Roll-off: How steep the transition is

Real-World Applications

Audio Equalizers

Boost or cut specific frequency bands to shape the sound.

Image Sharpening

High-pass filters enhance edges by emphasizing high-frequency details.

Noise Reduction

Identify and remove noise frequencies while preserving signal.