๐Ÿ“šSignal Processing

Essential Signal Processing Filters

Study smarter with Fiveable

Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.

Get Started

Why This Matters

Filters are the workhorses of signal processing. They're how you separate the signal you want from the noise you don't. Whether you're analyzing audio waveforms, designing communication systems, or preprocessing data for Fourier analysis, you need to understand not just what each filter does, but why its mathematical structure produces that behavior. These concepts connect directly to frequency domain analysis, transfer functions, and the convolution theorem you've studied throughout this course.

You're being tested on your ability to match filter types to applications, compare their frequency responses, and explain tradeoffs like phase linearity vs. computational efficiency or sharp rolloff vs. passband ripple. Don't just memorize filter names. Know what frequency characteristics each filter achieves, how it's implemented (FIR vs. IIR), and when you'd choose one over another.


Filters by Frequency Selection

These filters define which frequencies survive and which get attenuated. The key concept is the cutoff frequency fcf_c, where the filter's gain drops to 12\frac{1}{\sqrt{2}} of its maximum value (equivalently, โˆ’3-3 dB).

Low-Pass Filter

  • Passes frequencies below fcf_c and attenuates higher frequencies, effectively "smoothing" signals by removing rapid fluctuations
  • The transfer function has poles arranged to create gain decay at high frequencies. The rolloff rate depends on filter order: a first-order filter rolls off at 20 dB/decade, a second-order at 40 dB/decade, and so on.
  • Applications include anti-aliasing before sampling (required by the Nyquist theorem), removing high-frequency noise from audio, and smoothing sensor data

High-Pass Filter

  • Passes frequencies above fcf_c and blocks low-frequency components, including DC offset (the a0a_0 constant term in your Fourier series)
  • Complementary to low-pass in design: subtracting a low-pass filter's output from the original signal yields a high-pass response. This relationship is useful both conceptually and as an actual implementation strategy.
  • Applications include removing baseline drift in biomedical signals (like ECG wandering) and emphasizing edges in image processing

Band-Pass Filter

  • Passes frequencies between fLf_L and fHf_H while attenuating everything outside that band
  • You can construct one by cascading a high-pass filter (cutoff at fLf_L) with a low-pass filter (cutoff at fHf_H), or by designing it directly as a single filter. The bandwidth is fHโˆ’fLf_H - f_L, and the center frequency f0f_0 is typically the geometric mean fLโ‹…fH\sqrt{f_L \cdot f_H}.
  • Essential for communication systems where you need to extract one channel from a frequency-multiplexed signal

Band-Stop Filter (Notch Filter)

  • Attenuates frequencies between fLf_L and fHf_H, which is the inverse of a band-pass filter
  • A narrow band-stop filter is called a notch filter and targets a single frequency, like 60 Hz power line interference (50 Hz in many countries outside North America)
  • Can be constructed by summing the outputs of a low-pass (cutoff at fLf_L) and a high-pass (cutoff at fHf_H), or by placing zeros in the transfer function at the rejection frequency

Compare: Band-pass vs. Band-stop both define a frequency range, but band-pass keeps that range while band-stop removes it. If a problem asks about isolating a signal, think band-pass. If it asks about eliminating interference at a known frequency, think band-stop.


Filters by Implementation Structure

The distinction between FIR and IIR filters is fundamental to digital signal processing. It determines stability, phase response, and computational cost.

Finite Impulse Response (FIR) Filter

The output of an FIR filter depends only on current and past input samples, with no feedback from previous outputs. The general form is:

y[n]=โˆ‘k=0Mbkโ€‰x[nโˆ’k]y[n] = \sum_{k=0}^{M} b_k \, x[n-k]

where MM is the filter order and bkb_k are the filter coefficients.

  • Always stable because there are no poles outside the unit circle (in fact, all poles sit at the origin in the z-plane)
  • Can achieve exactly linear phase when the coefficients are symmetric or antisymmetric, meaning all frequencies experience the same time delay and waveform shape is preserved
  • Design methods include windowing (Hamming, Hanning, Blackman windows applied to an ideal impulse response) and the Parks-McClellan algorithm for optimal equiripple designs
  • The tradeoff: achieving a sharp frequency transition requires a high filter order, which means more coefficients and more computation per output sample

Infinite Impulse Response (IIR) Filter

IIR filters use a feedback (recursive) structure where the output depends on both inputs and previous outputs:

y[n]=โˆ‘k=0Mbkโ€‰x[nโˆ’k]โˆ’โˆ‘k=1Nakโ€‰y[nโˆ’k]y[n] = \sum_{k=0}^{M} b_k \, x[n-k] - \sum_{k=1}^{N} a_k \, y[n-k]

  • More computationally efficient than FIR for achieving sharp frequency transitions. A 4th-order IIR filter can often match the selectivity of a 50th-order or higher FIR filter.
  • Can be unstable if any poles lie outside the unit circle in the z-plane. You must check pole locations during design.
  • Introduces nonlinear phase in general, meaning different frequency components experience different time delays. This distorts the shape of composite waveforms.
  • Classical analog filter designs (Butterworth, Chebyshev) are converted to IIR digital filters using techniques like the bilinear transform or impulse invariance.

Moving Average Filter

The simplest FIR filter. The output is the arithmetic mean of the last NN input samples:

y[n]=1Nโˆ‘k=0Nโˆ’1x[nโˆ’k]y[n] = \frac{1}{N}\sum_{k=0}^{N-1} x[n-k]

  • Frequency response is a sinc-like function with nulls (zeros) at multiples of fsN\frac{f_s}{N}, where fsf_s is the sampling frequency. Increasing NN narrows the main lobe, attenuating more high-frequency content.
  • Excellent for smoothing noisy time-series data, but provides poor frequency selectivity compared to designed filters. It can't give you a sharp cutoff at a specific frequency.
  • Because it's an FIR filter with equal coefficients, it has linear phase.

Compare: FIR vs. IIR: FIR guarantees stability and linear phase but requires more computation for sharp transitions. IIR is efficient but risks instability and introduces phase distortion. For audio applications where phase matters (preserving waveform shape), choose FIR. For real-time systems with tight computational budgets where some phase distortion is acceptable, consider IIR.


Filters by Frequency Response Shape

These classical analog filter designs (implemented digitally via transformations like the bilinear transform) represent different tradeoffs between passband flatness, rolloff steepness, and ripple.

Butterworth Filter

  • Maximally flat passband: no ripple in the passband, providing the smoothest possible frequency response
  • Rolloff rate of 20n20n dB/decade, where nn is the filter order. Higher orders give sharper transitions but require more computation and can introduce numerical sensitivity.
  • Transfer function magnitude follows:

โˆฃH(jฯ‰)โˆฃ2=11+(ฯ‰ฯ‰c)2n|H(j\omega)|^2 = \frac{1}{1 + \left(\frac{\omega}{\omega_c}\right)^{2n}}

The poles of a Butterworth filter are equally spaced on the left half of a circle of radius ฯ‰c\omega_c in the s-plane, which is what produces the maximally flat behavior.

Chebyshev Filter

  • Steeper rolloff than Butterworth for the same filter order, at the cost of introducing ripple in the frequency response
  • Type I has equiripple behavior in the passband and a monotonically decreasing stopband. Type II (also called inverse Chebyshev) has a flat passband but ripple in the stopband. Choose based on which region can tolerate imperfection.
  • The ripple parameter ฯต\epsilon controls the tradeoff: allowing more ripple yields a steeper transition band for the same order

Elliptic (Cauer) Filter

Worth mentioning alongside Butterworth and Chebyshev: the elliptic filter achieves the sharpest possible rolloff for a given filter order, but it introduces ripple in both the passband and the stopband. It represents the extreme end of the flatness-vs-sharpness tradeoff.

Compare: Butterworth vs. Chebyshev: Butterworth is "smooth but gradual," Chebyshev is "sharp but wavy." If your application can't tolerate any passband variation (like precision measurement), use Butterworth. If you need aggressive frequency separation and can accept some ripple, Chebyshev wins. If you can tolerate ripple everywhere and need the absolute sharpest transition, look at elliptic filters.


Phase-Only Filtering

All-Pass Filter

  • Passes all frequencies with unity gain: the magnitude response โˆฃH(ejฯ‰)โˆฃ=1|H(e^{j\omega})| = 1 for all ฯ‰\omega, but the phase response varies with frequency
  • Used for phase equalization: corrects phase distortion introduced by other filters (especially IIR filters) without affecting the amplitude spectrum
  • Transfer function has poles and zeros that are conjugate reciprocal pairs. For a first-order digital all-pass filter:

H(z)=zโˆ’1โˆ’aโˆ—1โˆ’azโˆ’1H(z) = \frac{z^{-1} - a^*}{1 - a z^{-1}}

where aa is a complex coefficient with โˆฃaโˆฃ<1|a| < 1 for stability.

Compare: While most filters shape the magnitude spectrum, all-pass filters shape only the phase spectrum. This is crucial when you need to align time delays across frequency components without changing what frequencies are present. A common use case is cascading an all-pass filter with an IIR filter to approximate linear phase overall.


Quick Reference Table

ConceptBest Examples
Frequency selection (what passes)Low-pass, High-pass, Band-pass, Band-stop
Implementation structureFIR, IIR, Moving average
Passband flatnessButterworth (maximally flat)
Sharp rolloff with rippleChebyshev Type I / II, Elliptic
Linear phase guaranteedFIR filters (with symmetric coefficients)
Computational efficiencyIIR filters
Phase manipulation onlyAll-pass filter
Noise removal at specific frequencyBand-stop (notch) filter

Self-Check Questions

  1. Which two filters could you combine to create a band-pass filter, and what parameters would you need to specify?

  2. You're designing a filter for a real-time embedded system with limited processing power, but phase distortion is acceptable. Should you choose FIR or IIR, and why?

  3. Compare Butterworth and Chebyshev filters: what does each optimize for, and when would you choose one over the other?

  4. A biomedical signal has 60 Hz power line interference superimposed on it. Which filter type would you use to remove only that interference while preserving the rest of the signal? What would you set as the filter's key parameter(s)?

  5. Why does an FIR filter guarantee stability while an IIR filter might become unstable? Relate your answer to pole locations in the z-plane.

  6. An IIR filter introduces unacceptable phase distortion in your system. You can't switch to FIR due to computational constraints. What other approach could you use to correct the phase response?