Part V ยท Chapter 14

Analog & Digital Filters

Transfer functions, filter families (Butterworth, Chebyshev, Bessel), and digital filter design โ€” FIR, IIR, windowed sinc, and the bilinear transform.

1. Filter Transfer Functions

A linear time-invariant (LTI) filter is characterized by its transfer function\(H(s)\) in the Laplace domain (analog) or \(H(z)\) in the Z-domain (digital). For a general N-th order system:

\[ H(s) = \frac{b_M s^M + \cdots + b_1 s + b_0}{a_N s^N + \cdots + a_1 s + a_0} \]

The frequency response is \(H(j\omega) = H(s)\big|_{s=j\omega}\). The four standard filter types are:

Low-Pass
Pass: f < fc
Stop: f > fc
High-Pass
Pass: f > fc
Stop: f < fc
Band-Pass
Pass: fโ‚ < f < fโ‚‚
Stop: outside
Notch
Pass: outside
Stop: f = fโ‚€

2. Butterworth Filter โ€” Maximally Flat

The Butterworth filter has the flattest possible passband โ€” no ripple. The magnitude response is:

\[ |H(j\omega)| = \frac{1}{\sqrt{1 + \left(\dfrac{\omega}{\omega_c}\right)^{2n}}} \]

At \(\omega = \omega_c\): \(|H| = 1/\sqrt{2} \approx -3\) dB for all orders \(n\)

Poles lie equally spaced on a circle of radius \(\omega_c\) in the left half s-plane. For order \(n\), the stopband rolls off at \(-20n\) dB/decade beyond \(\omega_c\). Higher order = steeper roll-off but slower transient response.

Determining the required order: given stopband attenuation \(A_s\) dB at frequency \(\omega_s\), \(n \geq \log(10^{A_s/10}-1) / (2\log(\omega_s/\omega_c))\).

3. Chebyshev & Bessel Filters

Chebyshev Type I โ€” Equiripple Passband

Allows controlled ripple \(\epsilon\) in the passband to achieve steeper roll-off than Butterworth of the same order:

\[ |H|^2 = \frac{1}{1 + \varepsilon^2 T_n^2(\omega/\omega_c)} \]

\(T_n\) is the Chebyshev polynomial of degree \(n\). Type II has equiripple stopband instead.

Bessel Filter โ€” Linear Phase

Maximally linear phase response (constant group delay) in the passband. Preserves waveshape โ€” critical for pulse and data signals where phase distortion causes intersymbol interference.

Trade-off: slowest magnitude roll-off of the three families. Ideal for pulse shaping in communications.

Comparison Summary

Property
Butterworth
Chebyshev
Bessel
Passband
Flat
Equiripple
Monotone
Roll-off
Moderate
Steep
Gradual
Phase
Nonlinear
Nonlinear
Linear

4. Digital Filters: FIR vs IIR

FIR โ€” Finite Impulse Response

Output depends only on current and past inputs:

\[ y[n] = \sum_{k=0}^{M} h[k]\,x[n-k] \]

  • โ€ข Always stable (no feedback)
  • โ€ข Linear phase achievable (symmetric coefficients)
  • โ€ข Higher order needed for sharp cutoff
  • โ€ข Windowed sinc design: multiply ideal sinc by Hamming/Blackman window

IIR โ€” Infinite Impulse Response

Output also depends on past outputs (recursive):

\[ y[n] = \sum_k b_k x[n-k] - \sum_k a_k y[n-k] \]

  • โ€ข Lower order for equivalent sharpness
  • โ€ข Can be unstable if poles outside unit circle
  • โ€ข Non-linear phase; may need all-pass correction
  • โ€ข Bilinear transform maps analog prototype to digital

Bilinear Transform

Maps an analog prototype \(H(s)\) to a digital filter \(H(z)\) with no aliasing using the substitution:

\[ s = \frac{2}{T_s}\cdot\frac{z-1}{z+1} \]

Frequency warping occurs: analog frequency \(\Omega\) maps to \(\omega = 2\arctan(\Omega T_s/2)\). Pre-warp the critical frequency before design.

Python Simulation

Butterworth LP orders 1โ€“5, Butterworth vs Chebyshev comparison, FIR windowed-sinc design, step responses, phase responses, and pole-zero plot.

Python
script.py135 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server