# All About Audio Equalization: Solutions and Frontiers
## 3 Parametric Equalizers
### Second Order Peaking and Notch Filters  
In a typical parametric equalizer all sections but the low and high shelving filters are comprised of second order peaking or notch filters, which are IIR filters having two poles and two zeros. The aim is to obtain a filter with the magnitude frequency response, which has a bump of gain \(G\) (\(G>1\) for a peaking filter and \(0<G<1\) for a notch filter) and width specified by \(Q\) at the center frequency \(\omega_{c}\), but which has a unity gain (_i.e._, 0 dB) at frequencies far away from the bump, especially at the zero frequency and at the Nyquist limit. (An alternative approach was taken by [PERSON] who presented a peak/notch filter design in which the specified gain at the Nyquist limit \(f_{\mathrm{s}}/2\) was not unity but the same as that of a corresponding analog equalizing filter [36]. The magnitude responses of his filters are also less asymmetric than the ones designed here, when the center frequency is high, close to the Nyquist limit. See Section 5.2.)  
These specifications lead to the following four constraints [37; 38] for the filter transfer function \(H(z)\):  
\[H(1)=1, \tag{21}\]  
\[H(-1)=1, \tag{22}\]  
\[|H(e^{j\omega_{\mathrm{c}}})|=G, \tag{23}\]  
\[\frac{\mathrm{d}|H(e^{j\omega})|}{\mathrm{d}\omega}|_{\omega=\omega_{\mathrm{ c}}}=0. \tag{24}\]  
The bandwidth of the resonance in a parametric equalizer can be defined in one of several ways [2; 37]. As with the gain at the crossover frequency of the shelving filter, we choose to define the gain at the upper and lower crossover frequencies \(\omega_{\mathrm{u}}\) and \(\omega_{\mathrm{l}}\) to be equal to \(\sqrt{G}\). This leads to the fifth constraint:  
\[|H(e^{j\omega_{\mathrm{u}}})|=|H(e^{j\omega_{\mathrm{l}}})|=\sqrt{G}. \tag{25}\]  
Figure 4: Magnitude responses of a single low shelf filter (red), cascaded two first order low shelf filters (black dotted line), and a second order shelf filter (blue) with the same gain (12 dB) and crossover frequency (1 kHz).  
To shift the crossover frequency to \(\omega_{\rm c}\), we set the crossover frequency of our low shelving filter to the bandwidth \(B\) of the peaking notch filter,  
\[H_{\rm LS}(z)=\frac{G\tan{(B/2)}+\sqrt{G}+[G\tan{(B/2)}-\sqrt{G}]z^{-1}}{\tan{(B/ 2)}+\sqrt{G}+[\tan{(B/2)}-\sqrt{G}]z^{-1}}, \tag{26}\]  
and then apply the well-known lowpass-to-bandpass transformation [4; 29]  
\[z^{-1}\rightarrow-z^{-1}\frac{z^{-1}-\alpha}{1-\alpha\,z^{-1}}, \tag{27}\]  
where  
\[\alpha=\cos{\omega_{\rm c}}, \tag{28}\]  
which yields the transfer function of the second order peaking or notch filter:  
\[H_{\rm PN}(z)=\frac{\sqrt{G}+G\tan{(B/2)}-[2\sqrt{G}\cos{(\omega_{\rm c})}]z^{- 1}+[\sqrt{(}G)-G\tan{(B/2)}]z^{-2}}{\sqrt{G}+\tan{(B/2)}-[2\sqrt{G}\cos{(\omega _{\rm c})}]z^{-1}+[\sqrt{G}-\tan{(B/2)}]z^{-2}}. \tag{29}\]  
The same solution was originally provided by [PERSON] [37] and also recently by [PERSON] [34].  
Instead of bandwidth \(B\), peak filters are often parameterized using quality factor \(Q\). These two terms are related by  
\[Q=\frac{\omega_{\rm c}}{B}. \tag{30}\]  
Figure 5: Magnitude responses of peak and notch filters at center frequencies 100 Hz (green), 1000 Hz (blue), and 10,000 Hz (red), when \(Q=1\). The gains of the peak and notch filters are complementary, _i.e._, \(G\) and \(1/G\), respectively.  
Figure 5 presents examples of peak and notch filters with fixed \(Q\) but varying the other parameters, showing that they are symmetric on the dB scale for \(G\) and \(1/G\). It is also seen in Figure 5 that when the center frequency is high, such as \(f_{\rm c}=10\) kHz, the magnitude response itself becomes asymmetric so that the upper _skirt_ (_i.e._, the magnitude response of a peaking filter on either side of the center frequency) is steeper than the lower one. This feature is caused by the requirement that the digital equalizing filters have a unity gain at the Nyquist limit.