Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


Peaking Equalizers

A peaking equalizer filter section provides a boost or cut in the vicinity of some center frequency. It may also be called a parametric equalizer section. The gain far away from the boost or cut is unity, so it is convenient to combine a number of such sections in series. Additionally, a high and/or low shelf (§B.4 above) are nice to include in series with one's peaking eq sections.

The analog transfer function for a peak filter is given by [103,5,6]

$\displaystyle H(s) = 1 + H_R(s)
$

where $ H_R(s)$ is a two-pole resonator:

$\displaystyle H_R(s) \isdef R\cdot \frac{Bs}{s^2+Bs + 1}
$

The transfer function can be written in the normalized form [103]

$\displaystyle H(s) = \frac{s^2 + gBs + 1}{s^2+Bs + 1},
$

where $ g=1+R$ is approximately the desired gain at the boost (or cut), and $ B=1/Q$ is the desired bandwidth $ 2\alpha$ at the normalized peak frequency $ \omega_0=1$ (cf. Eq.(E.7)). When $ g>1$ , a boost is obtained at frequency $ \omega=1$ . For $ g<1$ , a cut is obtained at that frequency. In particular, when $ g=0$ , there are infinitely deep notches at $ \omega=\pm 1$ , and when $ g=1$ , the transfer function reduces to $ H(s)=1$ (no boost or cut). The parameter $ B$ controls the width of the boost or cut.

It is easy to show that both zeros and both poles are on the unit circle in the left-half $ s$ plane, and when $ g<1$ (a ``cut''), the zeros are closer to the $ j\omega$ axis than the poles.

The bilinear transformI.3.1) can be used to convert the analog peaking equalizer section to digital form. As derived in §I.3.2, the mapping constant $ c$ is best chosen as $ c=\cot(\omega_d T/2)$ , where $ \omega_d$ is the desired peak frequency and $ T$ is the sampling interval.

Figure B.15 gives a matlab listing for a peaking equalizer section. Figure B.16 shows the resulting plot for the example ``boost(2,0.25,0.1).'' The frequency-response display utility myfreqz, listed in Fig.7.1, can be substituted for freqz (better for Octave).

Figure B.15: Matlab function for designing (and optionally testing) a peaking equalizer section.

 
function [B,A] = boost(g,fc,bw,fs);
%BOOST - Design a digital boost filter at given gain g, 
%        center frequency fc in Hz,
%        bandwidth bw in Hz (default = fs/10), and
%        sampling rate fs in Hz (default = 1).

if nargin<4, fs = 1; end
if nargin<3, bw = fs/10; end

c = cot(pi*fc/fs); % bilinear transform constant
cs = c^2;  csp1 = cs+1; Bc=(bw/fs)*c; gBc=g*Bc;
nrm = 1/(csp1 + Bc); % 1/(a0 before normalization)
b0 =  (csp1 + gBc)*nrm;
b1 =  2*(1 - cs)*nrm;
b2 =  (csp1 - gBc)*nrm;
a0 =  1;
a1 =  b1;
a2 =  (csp1 - Bc)*nrm;
A = [a0 a1 a2];
B = [b0 b1 b2];

if nargout==0
  figure(1);
  myfreqz(B,A); % /l/mll/myfreqz.m
  dstr=sprintf('boost(%0.2f,%0.2f,%0.2f,%0.2f)',g,fc,bw,fs);
  subplot(2,1,1); title(['Boost Frequency Response: ',...
                      dstr],'fontsize',24);
end

Figure B.16: Frequency response of a second-order peaking equalizer section tuned for a 6 dB peak of width $ \approx f_s/10$ at center frequency $ f_s/4$ .
\includegraphics[width=\twidth]{eps/tboost}

A Faust implementation of the second-order peaking equalizer is available as the function peak_eq in filter.lib distributed with Faust (Appendix K).


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Introduction to Digital Filters with Audio Applications'', by Julius O. Smith III, (September 2007 Edition)
Copyright © 2024-09-03 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA