Skip to content

Bilinear Transform and Frequency Warping

Copy this iframe to your website:

1
<iframe src="https://dmccreary.github.io/signal-processing/sims/bilinear-transform/main.html" width="100%" height="742px" scrolling="no"></iframe>

Run MicroSim in Fullscreen

Description

This MicroSim turns an analog Butterworth low-pass filter into a digital one in two ways. The bilinear transform (blue) substitutes \(s = \frac{2}{T}\frac{z-1}{z+1}\), which maps the whole \(j\Omega\) axis exactly once onto the unit circle with the warping \(\omega = 2\arctan(\Omega T/2)\). Impulse invariance (purple) samples the impulse response, \(h[n] = T\,h_a(nT)\), so each pole moves to \(z_k = e^{s_k T}\) and \(\omega = \Omega T\) is linear, but the digital response is the aliased sum \(\sum_k H_a\big(j(\Omega - k\,2\pi f_s)\big)\).

  • Warping plot (top left): digital frequency \(\omega\) against analog frequency \(\Omega/2\pi\). Drag the gold marker; the read-out gives its image under both mappings, and turns red when impulse invariance aliases it.
  • s-plane and z-plane: drag the gold test pole \(p\) and watch its two images. The gold diamond is the marker on the \(j\Omega\) axis. The dashed purple lines are \(\Omega = \pm\pi/T\), the edges of the strip that impulse invariance wraps around the circle.
  • Magnitude plot and table: the analog target (gray dashed), both digital designs, the aliasing gap (red), and their DC gain, \(-3\) dB frequency and gain at \(f_s/2\). Hover over the plot to read all three gains.

The sliders set the sampling rate \(f_s\) (2 to 16 kHz), the desired cutoff \(f_c\) (up to \(0.45f_s\)) and the order \(N\) (1 to 4). Prewarp the cutoff designs the bilinear prototype at \(f_c' = \frac{f_s}{\pi}\tan(\pi f_c/f_s)\), that is \(\Omega_c = \frac{2}{T}\tan(\omega_c/2)\), so the digital \(-3\) dB point lands exactly on \(f_c\). For \(N = 1\) the analog impulse response jumps at \(t = 0\), so impulse invariance adds \(T\,h_a(0^+)/2\) to the aliased sum.

The bilinear map is a Möbius (linear fractional) transformation, the family explored in the Möbius Transform MicroSim: it sends lines to circles, which is why the \(j\Omega\) axis becomes the unit circle. This MicroSim is used in Chapter 10: Advanced Filter Design and Implementation.

Lesson Plan

Learning Objectives

After using this MicroSim, students will be able to:

  1. Calculate the digital frequency \(\omega = 2\arctan(\Omega T/2)\) that the bilinear transform assigns to an analog frequency, and the prewarped analog cutoff \(\Omega_c = \frac{2}{T}\tan(\omega_c/2)\) that places a digital cutoff exactly
  2. Compare how the two methods map the \(j\Omega\) axis: a one-to-one compression onto the unit circle versus a linear map that wraps around the circle once every \(f_s\)
  3. Analyze the aliasing error of impulse invariance in the passband and at \(f_s/2\), and explain why the bilinear Butterworth response is exactly zero at \(f_s/2\)
  4. Predict where an s-plane pole lands in the z-plane under \(z = e^{sT}\) and \(z = (1 + sT/2)/(1 - sT/2)\), and verify that the left half-plane maps inside the unit circle
  5. Evaluate when prewarping matters by measuring the bilinear \(-3\) dB point at different ratios \(f_c/f_s\)

Target Audience

Undergraduate students in a digital signal processing or digital filter design course (junior or senior engineering). Plan 25 minutes for the activities below.

Prerequisites

  • Poles of a transfer function in the s-plane and the z-plane, and the unit circle as the frequency axis
  • The magnitude response of a Butterworth low-pass filter
  • Sampling and aliasing (the Nyquist frequency \(f_s/2\))

Activities

Activity 1: Two maps of the frequency axis (6 min). Keep \(f_s = 8.0\) kHz and drag the gold marker. At 1 kHz the two mappings nearly agree: bilinear 0.95 kHz, impulse invariance 1.00 kHz. At 3 kHz they differ: bilinear \(\omega = 0.55\pi\) (2.21 kHz), impulse invariance \(0.75\pi\) (3.00 kHz). Move past \(f_s/2\) to 6 kHz: the bilinear transform still gives a frequency of its own, 2.98 kHz, but the impulse-invariance read-out turns red, "aliased to 2.00 kHz", the same place an analog 2 kHz tone lands. At 8 kHz (\(= f_s\)) impulse invariance returns to 0 Hz while bilinear gives 3.22 kHz. In the z-plane the blue diamond creeps toward \(z = -1\) but never reaches it; the purple diamond goes all the way around the circle.

Activity 2: Warping moves the cutoff, prewarping puts it back (7 min). Use the defaults: \(N = 2\), \(f_c = 2.00\) kHz, \(f_s = 8.0\) kHz, prewarp off. The table shows the bilinear \(-3\) dB point at 1.70 kHz instead of 2.00 kHz, and the blue dotted path on the warping plot shows why: \(f_c\) on the analog axis meets the curve at \(\frac{8}{\pi}\arctan(\pi/4) = 1.70\) kHz. Check Prewarp the cutoff: the prototype moves to \(f_c' = 2.55\) kHz and the bilinear \(-3\) dB point becomes exactly 2.00 kHz. Uncheck it and raise \(f_s\) to 16 kHz: the \(-3\) dB point is 1.91 kHz, so the error falls from 0.30 kHz to 0.09 kHz, and prewarping now needs only \(f_c' = 2.11\) kHz.

Activity 3: Aliasing in impulse invariance (7 min). Return to the defaults. The impulse-invariant design has a DC gain of \(-1.9\) dB and a gain of \(-6.6\) dB at \(f_s/2\), where the analog target is at \(-12.3\) dB: the red gap is the aliased copies of \(H_a\). The bilinear gain at \(f_s/2\) is \(-\infty\), because the \(N = 2\) zeros of \(H_a\) at \(s = \infty\) land at \(z = -1\) (the blue circle marked ×2). Now lower \(f_c\) to 0.50 kHz: the passband error shrinks to \(-0.1\) dB and the \(-3\) dB point is 0.50 kHz, yet the gain at \(f_s/2\) is still 7.7 dB above the analog value (\(-28.4\) versus \(-36.1\) dB), because at exactly \(f_s/2\) the mirror image at \(-f_s/2\) is as large as the response itself. Finally set \(f_c = 2.00\) kHz and \(N = 1\): the impulse-invariant DC gain is \(+5.9\) dB and the response never falls to \(-3\) dB (the table says "none").

Activity 4: Where does a pole go? (5 min). The default test pole is \(p/2\pi = -2 + j3\) kHz. Its bilinear image is \(z = 0.560\angle 113.1^\circ\) and its impulse-invariant image is \(0.208\angle 135.0^\circ\), where \(0.208 = e^{-\pi/2} = e^{\sigma T}\). Drag the pole onto the \(j\Omega\) axis at 3 kHz: both images move onto the unit circle (\(|z| = 1.000\), at \(99.3^\circ\) and \(135.0^\circ\)). Drag it to \(\sigma/2\pi = +1\) kHz: the images (\(|z| = 1.376\) and \(2.193\)) leave the circle, so an unstable analog pole stays unstable. Then drag it to \(-2 + j5\) kHz, above the dashed \(f_s/2\) line: the impulse-invariant image jumps to \(0.208\angle{-135.0^\circ}\), exactly where a pole at \(-2 - j3\) kHz would go, while the bilinear image, \(0.744\angle 131.5^\circ\), stays distinct.

Assessment

  1. With \(f_s = 8\) kHz and no prewarping, a bilinear design starts from an analog cutoff of 2 kHz. Where is the digital cutoff? Answer: \(\frac{f_s}{\pi}\arctan(\pi f_c/f_s) = \frac{8}{\pi}\arctan(\pi/4) = 1.70\) kHz, as the table shows.
  2. You need a digital \(-3\) dB point at 2 kHz with \(f_s = 8\) kHz. What cutoff must the analog prototype have? Answer: \(f_c' = \frac{8}{\pi}\tan(\pi/4) = 8/\pi = 2.55\) kHz.
  3. Why is the bilinear Butterworth response exactly zero at \(f_s/2\) while the impulse-invariant one is not? Answer: \(s = \infty\) maps to \(z = -1\), so the \(N\) zeros of \(H_a(s)\) at infinity become \(N\) zeros at \(\omega = \pi\). Impulse invariance creates no such zeros; its response at \(f_s/2\) is the analog response plus its aliased copies (\(-6.6\) dB instead of \(-12.3\) dB with the defaults).
  4. With \(f_s = 8\) kHz, which other analog frequencies does impulse invariance map to the same digital frequency as 3 kHz? Answer: 5, 11, 13, 19 kHz, ... (\(k \cdot 8 \pm 3\) kHz), because \(e^{j\Omega T}\) repeats every \(f_s\). The bilinear transform gives each analog frequency its own \(\omega\).
  5. An analog pole at \(p/2\pi = -2 + j3\) kHz is mapped by impulse invariance with \(f_s = 8\) kHz. Where does it land? Answer: \(z = e^{pT}\) has \(|z| = e^{2\pi(-2)/8} = e^{-\pi/2} = 0.208\) and \(\angle z = 360^\circ \cdot 3/8 = 135^\circ\).

Common Misconceptions

"Prewarping removes the warping." It matches one frequency only. With the defaults and prewarping on, the \(-3\) dB point is exactly 2.00 kHz, but hover at 3.00 kHz: the bilinear gain is \(-15.4\) dB against \(-7.8\) dB for the analog target, because the rest of the response is still squeezed toward \(f_s/2\).

"Impulse invariance is distortion-free because \(\omega = \Omega T\) is linear." The map is linear, but every digital frequency also collects the analog response from \(f_s - f\), \(f_s + f\), and so on. The red gap shows it: with the defaults the gain at \(f_s/2\) is \(-6.6\) dB instead of \(-12.3\) dB, and with \(N = 1\) even the DC gain is \(+5.9\) dB.

References

  1. Bilinear transform - Wikipedia - the substitution \(s = \frac{2}{T}\frac{z-1}{z+1}\), frequency warping and prewarping
  2. Impulse invariance - Wikipedia - sampling the analog impulse response, pole mapping \(z = e^{sT}\) and the aliasing it causes
  3. Butterworth filter - Wikipedia - the maximally flat prototype, its pole positions and its magnitude response
  4. Möbius transformation - Wikipedia - the family of conformal maps the bilinear transform belongs to
  5. Chapter 33: The z-Transform - Steven W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing - free chapter that designs Butterworth and Chebyshev filters with the bilinear transform