Hello! Welcome back to our module on Digital Filter Design Techniques.
In our last lesson, we explored the impulse invariance method for designing IIR filters. We derived the method and saw that while it preserves stability, it suffers from an inherent and unavoidable flaw: aliasing. This occurs because typical analog filter prototypes are not band-limited, and sampling their impulse response causes their frequency spectrum to fold over on itself. This limitation makes impulse invariance unsuitable for filters with significant high-frequency content, such as high-pass or band-stop filters.
Today, we will investigate a more robust and widely used technique that was developed to overcome this very problem. Our learning outcome is to design IIR digital filters using the bilinear transformation and analyze the resulting frequency warping effect.
We will cover:
- The mathematical derivation of the bilinear transform.
- Why it completely eliminates aliasing.
- Its side effect: a non-linear distortion of the frequency axis known as "frequency warping".
- The "pre-warping" technique required to compensate for this distortion and achieve an accurate filter design.
1. The Bilinear Transform: Solving the Aliasing Problem
The fundamental issue with impulse invariance was its underlying s-to-z mapping, . This mapping takes infinitely many horizontal strips of the s-plane and maps them to the same unit circle in the z-plane (a many-to-one mapping), causing aliasing.
The bilinear transform proposes a different mapping. It is a one-to-one transformation that maps the entire left half of the s-plane uniquely into the interior of the unit circle in the z-plane. This single property is what makes it so powerful: by avoiding the many-to-one mapping, it completely eliminates aliasing.
The bilinear transform is defined by the following substitution:
where is the sampling period.
To see how we arrive at this specific formula, we will explore its mathematical origins. You've expressed an interest in deeper mathematical derivations, and the origin of the bilinear transform is a clever piece of numerical approximation theory that connects continuous and discrete-time systems.
Bilinear Transform For IIR Filter Design Explained Intuitively [AudioFX #007]
The following video from WolfSound explains the motivation for the bilinear transform and then derives the formula by creating a discrete-time approximation of a continuous-time integrator.
Please watch from the beginning until 09:45. The first two minutes introduce the concept. The core derivation starts at 02:21. Pay close attention to how the trapezoidal rule for numerical integration is used to approximate the continuous integrator H_c(s) = 1/s, and how the Z-transform of the resulting difference equation leads directly to the bilinear transform formula.
As the video shows, the bilinear transform isn't just an arbitrary algebraic trick. It arises from approximating the fundamental calculus operation of integration using a simple numerical method (the trapezoidal rule) and then finding the transfer function of that discrete-time system. This connection between differential/integral equations and difference equations is a cornerstone of digital signal processing.
2. The Catch: Frequency Warping
The bilinear transform elegantly solves aliasing, but this comes at a price. The mapping of the continuous frequency axis () to the discrete frequency axis () is highly non-linear. This phenomenon is called frequency warping.
Let's derive this relationship formally. We start with the bilinear transform equation and substitute and :
We can simplify the right-hand side using Euler's identities:
Canceling from both sides gives the crucial frequency warping relationship:
This equation tells us that the analog frequency is not linearly proportional to the digital frequency . Instead, they are related by a tangent function. The entire infinite analog frequency axis () is compressed to fit into the finite digital frequency range ().
The following video provides an excellent visual and intuitive explanation of why this warping occurs, contrasting it with the mapping from the impulse invariance method.
Discrete control #6: z-plane warping and the bilinear transform
This video from Brian Douglas, whose content on control systems you may find relevant, gives a fantastic visual breakdown of the warping effect. It contrasts the 'rotating' nature of the z = e^{sT} map with the 'pinching' nature of the bilinear transform map.
Watch from 09:07 to 19:34. The first part (to 13:10) reviews the z = e^sT mapping you saw in the last lesson. The second part (from 13:10) shows how the bilinear transform maps the s-plane differently, 'pinching' it towards the point z=-1. The final part (from 16:11) derives the warping equation and shows with concrete examples how a desired analog frequency gets mapped to an incorrect digital frequency.
The key consequence of frequency warping is that if we take an analog filter and blindly apply the bilinear transform, the critical frequencies (like the cutoff frequency) of the resulting digital filter will be in the wrong place.
Bilinear Transform: Frequency Warping
This graph illustrates the non-linear relationship between the continuous-time frequency \Omega and the discrete-time frequency \omega caused by the bilinear transform. Note that for low frequencies (near the origin), the relationship is approximately linear, but it becomes highly compressed as \omega approaches \pi. Source: D. Richard Brown III, WPI.
3. The Solution: Pre-Warping in Filter Design
To design a digital filter that meets a specific set of frequency specifications (e.g., a low-pass filter with a cutoff at ), we must compensate for the frequency warping effect. The technique used is called pre-warping.
The logic is simple: if we know our target digital frequency will be warped by the transformation, we can pre-distort the analog filter's cutoff frequency so that after warping, it lands exactly at our desired .
We find the required analog frequency by inverting the warping formula:
This pre-warping step is an essential part of the design process.
Test your understanding!
You want to design a digital low-pass filter with a cutoff frequency of kHz. The system's sampling rate is kHz. What analog cutoff frequency, , must you use for your analog prototype filter before applying the bilinear transform?
Show answer
First, convert the digital frequency and sampling rate to radians per second.
- Sampling period: s.
- Desired digital cutoff frequency: rad/s. But be careful, we often work with normalized frequency. The normalized frequency is rad/sample.
Let's use the formula with the unnormalized frequency: rad/s.
So, you would need to design an analog filter with a cutoff of approximately 6498 rad/s. After applying the bilinear transform, this will be warped down to the desired digital cutoff frequency corresponding to 1 kHz.
4. Complete Design Procedure for IIR Filters
We can now outline the complete procedure for designing an IIR filter using the bilinear transform.
IIR Filter Design via Bilinear Transform
The following lecture notes from WPI provide a clear, step-by-step procedure and a complete design example for a Butterworth low-pass filter.
First, read the 'Basic Procedure' section (slide 2) which lists the five main steps. Then, read slides 7 through 10, which make up the 'Bilinear Transform Lowpass Butterworth Filter Design Ex.' Follow how they start with the digital specs, pre-warp the frequencies, determine the required analog filter order (N) and cutoff (\Omega_c), and finally arrive at the digital transfer function H(z).
Let's summarize the design flow based on the resource:
- Start with Digital Specifications: Define the desired properties of your digital filter, such as passband edge frequency (), stopband edge frequency (), passband ripple, and stopband attenuation.
- Pre-warp Frequencies: Use the pre-warping formula to convert your critical digital frequencies () into the corresponding analog frequencies () that the analog prototype must have.
- Design the Analog Prototype Filter: Using the pre-warped analog specifications (), design a suitable continuous-time filter (e.g., Butterworth, Chebyshev). This involves calculating the required filter order and the exact analog cutoff frequency .
- Find the Analog Transfer Function : Based on the order and cutoff frequency, determine the transfer function of the stable and causal analog filter.
- Apply the Bilinear Transform: Substitute into your analog transfer function and simplify the expression to obtain the final digital filter transfer function, .
To see how pre-warping visually corrects the filter, the animation in the Brian Douglas video is invaluable.
Discrete control #6: z-plane warping and the bilinear transform
This final clip from the Brian Douglas video provides a powerful visual summary. It shows the pole locations for a filter mapped with and without pre-warping, demonstrating exactly how pre-warping 'stretches' the z-plane grid to align the poles correctly.
Watch the animation from 22:33 to 24:12. Observe how the red grid (representing the bilinear mapping) moves as the pre-warp frequency is adjusted, and how the poles of the transformed filter align with their 'true' desired locations only when the pre-warp frequency is set correctly.
Conclusion
Today we have explored the bilinear transform, the workhorse method for designing IIR filters. You have seen that it is a powerful technique motivated by the need to solve the aliasing problem inherent in the simpler impulse invariance method.
Key Takeaways:
- Principle: The bilinear transform is an algebraic substitution that maps an analog transfer function to a digital one .
- No Aliasing: It provides a one-to-one mapping from the s-plane's imaginary axis to the z-plane's unit circle, which completely eliminates aliasing.
- Frequency Warping: This mapping is non-linear, described by . This "warps" the frequency axis, misaligning critical frequencies if uncorrected.
- Pre-Warping: To achieve an accurate design, one must pre-warp the digital frequency specifications into the analog domain before designing the analog prototype filter. This ensures the critical frequencies of the final digital filter land in the correct places.
Preview of the Next Lesson:
Now that you have learned the fundamental design process, including the crucial step of pre-warping, our next lesson will build upon this. We will focus more deeply on the application of pre-warping and explore how to use it in conjunction with frequency transformations. This will allow us to take a standard low-pass analog prototype, apply pre-warping, and then transform it into other filter types like high-pass, band-pass, and band-stop digital filters, giving us a complete toolkit for IIR filter design.