Main Content

Equalization

Equalization (EQ) is the process of weighting the frequency spectrum of an audio signal.

You can use equalization to:

  • Enhance audio recordings

  • Analyze spectral content

Types of equalization include:

  • Lowpass and highpass filters –– Attenuate high frequency and low frequency content, respectively.

  • Low-shelf and high-shelf equalizers –– Boost or cut frequencies equally above or below a desired cutoff point.

  • Parametric equalizers –– Selectively boost or cut frequency bands. Also known as peaking filters.

  • Graphic equalizers –– Selectively boost or cut octave or fractional octave frequency bands. The bands have standards-based center frequencies. Graphic equalizers are a special case of parametric equalizers.

This tutorial describes how Audio Toolbox™ implements the design functions: designParamEQ, designShelvingEQ, and designVarSlopeFilter. The multibandParametricEQ System object™ combines the filter design functions into a multiband parametric equalizer. The graphicEQ System object combines the filter design functions and the octaveFilter System object for standards-based graphic equalization. For a tutorial focused on using the design functions in MATLAB®, see Parametric Equalizer Design.

Equalization Design Using Audio Toolbox

Equalizer Type and Design ParametersMagnitude Response Examples

Use designVarSlopeFilter to create lowpass and highpass filters.

Design parameters of designVarSlopeFilter include:

  • Normalized cutoff frequency

  • Slope (dB/octave)

Lowpass

Highpass

Use designShelvingEQ to create low-shelf and high-shelf equalizers

Design parameters of designShelvingEQ include:

  • Gain (dB)

  • Normalized cutoff frequency

  • Slope (dB/octave)

Low-Shelf

High-Shelf

Use designParamEQ to create parametric equalizers. You can design single-band parametric equalizers or a cascade of parametric equalizers. Using a cascade of parametric equalizers enables you to tune your frequency response with precision.

Design parameters of designParamEQ include:

  • Number of equalizer bands

  • Gain (dB)

  • Normalized bandwidth

  • Normalized center frequency

  • Filter order

Parametric Equalizer

Cascade of Parametric Equalizers

EQ Filter Design

Audio Toolbox design functions use the bilinear transform method of digital filter design to determine your equalizer coefficients. In the bilinear transform method, you:

  1. Choose an analog prototype.

  2. Specify filter design parameters.

  3. Perform the bilinear transformation.

Analog Low-Shelf Prototype

Audio Toolbox uses the high-order parametric equalizer design presented in [1]. In this design method, the analog prototype is taken to be a low-shelf Butterworth filter:

Ha(s)=[gβ+sβ+s]ri=1L[g2β2+2gsiβs+s2β2+2siβs+s2]

L = Number of analog SOS sections

N = Analog filter order

r={0Neven1Nodd

g=G1/N

β=ΩB×(G2GB2GB21)1N=tan(πΔω2)×(G2GB2GB21)1N, where Δω is the desired digital bandwidth

si=sin((2i1)π2N),i=1,2,...,L

For parametric equalizers, the analog prototype is reduced by setting the bandwidth gain to the square root of the peak gain (GB = sqrt(G)).

After the design parameters are specified, the analog prototype is transformed directly to the desired digital equalizer by a bandpass bilinear transformation:

s=12cos(ω0)z1+z21z2

ω0 is the desired digital center frequency.

This transformation doubles the filter order. Every first-order analog section becomes a second-order digital section. Every second-order analog section becomes a fourth-order digital section. Audio Toolbox always calculates fourth-order digital sections, which means that returning second-order sections requires the computation of roots, and is less efficient.

Digital Coefficients

The digital transfer function is implemented as a cascade of second-order and fourth-order sections.

H(z)=[b00+b01z1+b02z21+a01z1+a02z2]ri=1L[bi0+bi1z1+bi2z2+bi3z3+bi4z41+ai1z1+ai2z2+ai3z3+ai4z4]

The coefficients are given by performing the bandpass bilinear transformation on the analog prototype design.

Second-Order Section CoefficientsFourth-Order Section Coefficients

D0=β+1b00=(1+gβ)/D0b01=2cos(ω0)/D0b02=(1gβ)/D0a01=2cos(ω0)/D0a02=(1β)/D0

Di=β2+2siβ+1bi0=(g2β2+2gsiβ+1)/Dibi1=4c0(1+gsiβ)/Dibi2=2(1+2cos2(ω0)g2β2)/Dibi3=4c0(1gsiβ)/Dibi4=(g2β22gsiβ+1)/Diai1=4c0(1+siβ)/Diai2=2(1+2cos2(ω0)β2)/Diai3=4cos(ω0)(1siβ)/Diai4=(β22siβ+1)/Di

Biquadratic Case.  In the biquadratic case, when N = 1, the coefficients reduce to:

D0=ΩBG+1b00=(1+ΩBG)/D0,b01=2cos(ω0)/D0,b02=(1ΩBG)/D0a01=2cos(ω0)/D0,a02=(1ΩBG)/D0

Denormalizing the a00 coefficient, and making substitutions of A =sqrt(G), ΩBα yields the familiar peaking EQ coefficients described in [2].

Orfanidis notes the approximate equivalence of ΩB and α in [1].

By using trigonometric identities,

ΩB=tan(Δω2)=sin(ω0)sinh(ln22B),

where B plays the role of an equivalent octave bandwidth.

Bristow-Johnson obtained an approximate solution for B in [4]:

B=ω0sinω0×BW

Substituting the approximation for B into the ΩB equation yields the definition of α in [2]:

α=sin(ω0)sinh(ln22×ω0sinω0×BW)

Lowpass and Highpass Filter Design

Analog Low-Shelf Prototype

To design lowpass and highpass filters, Audio Toolbox uses a special case of the filter design for parametric equalizers. In this design, the peak gain, G, is set to 0, and GB2 is set to 0.5 (–3 dB cutoff). The cutoff frequency of the lowpass filter corresponds to 1 – ΩB. The cutoff frequency of the highpass filter corresponds to ΩB.

Digital Coefficients

The table summarizes the results of the bandpass bilinear transformation. The digital center frequency, ω0, is set to π for lowpass filters and 0 for highpass filters.

Second Order Section CoefficientsFourth Order Section Coefficients

D0=1+tan(πΔω2)b00=1/D0b01=2cos(ω0)/D0b02=1/D0a01=2cos(ω0)/D0a02=(1tan(πΔω2))/D0

Di=tan2(πΔω2)+2sitan(πΔω2)+1bi0=1/Dibi1=4cos(ω0)/Dibi2=2(1+2cos2(ω0))/Dibi3=4cos(ω0)0/Dibi4=1/Diai1=4cos(ω0)(1+sitan(πΔω2))/Diai2=2(1+2cos2(ω0)tan2(πΔω2))/Diai3=4cos(ω0)(1sitan(πΔω2))/Diai4=(tan2(πΔω2)2sitan(πΔω2)+1)/Di

Shelving Filter Design

Analog Prototype

Audio Toolbox implements the shelving filter design presented in [2]. In this design, the high-shelf and low-shelf analog prototypes are presented separately:

HL(s)=A(As2+(AQ)s+1s2+(AQ)s+A)HH(s)=A(s2+(AQ)s+AAs2+(AQ)s+1)

For compactness, the analog filters are presented with variables A and Q. You can convert A and Q to available Audio Toolbox design parameters:

A=10G/401Q=(A+1A)(1slope1)+2

After you specify the design parameters, the analog prototype is transformed to the desired digital shelving filter by a bilinear transformation with prewarping:

s=(z1z+1)×(1tan(ω02))

Digital Coefficients

The table summarizes the results of the bilinear transformation with prewarping.

Low-ShelfHigh-ShelfIntermediate Variables

b0=A((A+1)(A1)cos(ω0)+2αA)b1=2A((A1)(A+1)cos(ω0))b2=A((A+1)(A1)cos(ω0)2αA)a0=(A+1)+(A1)cos(ω0)+2αAa1=2((A1)+(A+1)cos(ω0))a2=(A+1)+(A1)cos(ω0)2αA

b0=A((A+1)+(A1)cos(ω0)+2αA)b1=2A((A1)+(A+1)cos(ω0))b2=A((A+1)+(A1)cos(ω0)2αA)a0=(A+1)(A1)cos(ω0)+2αAa1=2((A1)+(A+1)cos(ω0))a2=(A+1)(A1)cos(ω0)2αA

α=sin(ω0)2(A+1A)(1slope1)+2Aω0=2πCutoffFrequencyFs

References

[1] Orfanidis, Sophocles J. "High-Order Digital Parametric Equalizer Design." Journal of the Audio Engineering Society. Vol. 53, November 2005, pp. 1026–1046.

[2] Bristow-Johnson, Robert. "Cookbook Formulae for Audio EQ Biquad Filter Coefficients." Accessed March 02, 2016. http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt.

[3] Orfanidis, Sophocles J. Introduction to Signal Processing. Englewood Cliffs, NJ: Prentice Hall, 2010.

[4] Bristow-Johnson, Robert. "The Equivalence of Various Methods of Computing Biquad Coefficients for Audio Parametric Equalizers." Presented at the 97th Convention of the AES, San Francisco, November 1994, AES Preprint 3906.

See Also

| | | |

Related Topics