# All About Audio Equalization: Solutions and Frontiers
## 5 Other Equalization Filter Designs
### Digital Equalizer Design Matching Analog Prototypes  
Digital filters are frequently derived from analog prototypes, either because analog filter design methods are easily used and understood, or because one is attempting to model analog systems. For example, digital versions of RIAA and NAB equalizers have been proposed [109; 110]. The bilinear transform is often used since it offers the desirable properties of preserving order and stability of the analog prototype while mapping the entire continuous-time response onto the unit circle in the z-plane. But it also introduces severe warping as the crossover frequency approaches the Nyquist limit. The optimization approaches described in Section 5.1 could be used to model an analog equalizer. But they require considerable additional processing and thus are generally performed off-line or at least with latency, or require coefficient tables of sufficient resolution and a suitable interpolation scheme. One could also model and approximate the analog equalizer using differential equations [42], but this is again computationally expensive. Thus these methods are inadequate for controllable and responsive digital equalizer design that matches the analog prototype. Another approach is to use oversampling such that the response over audible frequencies has reduced warping. But this may introduce latency and requires additional anti-aliasing filters. In this section, we describe a method, first given in [111], for digital equalizer design which anticipates the warping effects and compensates before applying the transform. This give a near optimal match to the analog magnitude response and closed-form expressions for the filter coefficients. Furthermore, the crossover frequency can be specified to be greater than the Nyquist limit. To illustrate the design process, we show how a lowpass filter matching the analog frequency response may be designed. The first order analog lowpass transfer function with crossover frequency \(f_{\text{c}}\) is defined as  
\[H_{\text{LP}}(s)=\frac{1}{s/\omega_{\text{c}}+1}, \tag{50}\]  
where \(\omega_{\text{c}}=2\pi f_{\text{c}}\) and \(s=j\omega\). The square magnitude response \(|H_{\text{LP}}(\omega)|^{2}=1/[1+(\omega/\omega_{\text{c}})^{2}]\) is zero at infinity. But with a standard bilinear transform and prewarping, the digital filter's zero gain occurs at Nyquist frequency [112] (pp. 535-537). Instead, we start with a first order analog prototype featuring a gain at infinity equal to the desired Nyquist gain. This is achieved using a standard first order analog shelving filter,\[H_{\text{LS}}(s)=\frac{g_{1}s+\Omega_{\text{s}}}{s+\Omega_{\text{s}}}. \tag{51}\]  
We want to set the asymptotic high frequency gain \(g_{1}\) to be the original magnitude response \(|H_{\text{LP}}|\) at the Nyquist frequency \(f_{\text{s}}/2\). The required high frequency gain is then given by  
\[g_{1}=|H_{\text{LP}}(s=2\pi f_{\text{s}}/2)|=2/\sqrt{4+{f_{\text{s}}}^{2}/{f_{ \text{c}}}^{2}}. \tag{52}\]  
Ordinarily, we would also want to match the gain at the crossover frequency. But when the crossover frequency is close to the Nyquist limit, we observe a steep slope in the digital magnitude response due to the response curve being forced through two close points. So instead, we match the point where the magnitude reaches half Nyquist gain on a Decibel scale. This leads to a matching gain of \(g_{m}=\sqrt{g_{1}}\) and the associated frequency at which \(|H_{\text{LP}}(\omega_{m})|=\sqrt{g_{1}}\) is \(\omega_{m}=\omega_{\text{c}}\sqrt{1/g_{1}-1}\). The matching frequency specification needs to be prewarped with  
\[\Omega_{m}=\tan[\omega_{m}/(2f_{\text{s}})] \tag{53}\]  
to ensure it will be placed correctly after the bilinear transform with \(z=e^{i\omega/f_{\text{s}}}\).