C4 · Lesson 16 · Shelving and peaking equalizers
Filters that boost or cut part of the spectrum and leave the rest alone
Most filters in this course pass one band and reject another. An equalizer does something gentler: it lifts or lowers part of the spectrum by a set number of decibels and leaves everything else at unity gain. A stereo's bass and treble knobs are shelving filters; each slider of a graphic equalizer, and each band of a mixing desk's parametric equalizer, is a peaking filter. Equalizers also correct sensors, loudspeakers and rooms, and they compensate for cable loss in high-speed links. Lesson 15 built a notch and an all-pass from a second-order section; a peaking equalizer is the same section with a gain knob, and it can be written as the signal plus a scaled bandpass.
- The solid curve is a peaking equalizer centered on 1 kHz. Slide its gain between −12 and +12 dB and its Q.
- The dashed curve is a low shelf whose gain changes by half its decibels at 100 Hz.
- Notice how the peak at +6 dB and the dip at −6 dB are mirror images, and how a higher Q narrows the bell without changing its height.
Predict
A graphic equalizer has one slider per octave. What Q should each peaking section have, measured between the points where its decibel gain is half the peak's?
1.41. An octave band runs from to with its center at the geometric mean, , so = 1.41. A third-octave equalizer, with 31 bands across the audio range, needs = 4.32.
Name it
The low shelf
A first-order low shelf with gain at low frequencies and 1 at high frequencies is
a pole at and a zero at . Its decibel gain passes through half its full value at , the geometric mean of the pole and zero, which is the frequency a designer usually quotes. A high shelf swaps the roles: . With they cut instead of boost.
The peaking (bell) equalizer
- At the gain is , so the peak in decibels is .
- Far from the gain is 1.
- Replacing by swaps numerator and denominator, so a cut of the same Q is the exact mirror image of a boost in decibels: one undoes the other.
- The frequencies where the decibel gain is half the peak satisfy , so the bandwidth between them is , for any gain. That's the definition of Q this form uses; datasheets and audio software don't all agree on it, so check which one a product means.
Signal plus bandpass
The bell is the input plus a scaled bandpass:
That's how many circuits build it: a bandpass section whose output is added to or subtracted from the dry signal with a gain knob. A graphic equalizer is a bank of such sections at octave or third-octave spacing; a parametric equalizer lets the user set , and gain for each one.
Worked example
Design a low shelf with +10 dB of bass boost whose gain is +5 dB at 100 Hz. Where are its pole and zero, and what is its gain at 200 Hz?
Show the solution
- Gain ratio.
- Pole. The half-gain point is = 100 Hz, so
- Zero.
- Gain at 200 Hz. which gives 2.2 dB.
- Why a shelf sounds gentle. The boost fades over about two octaves above the midpoint, which is why a shelf sounds gentle.
Answer the pole is at 56.2 Hz and the zero at 177.8 Hz, and the gain at 200 Hz is 2.2 dB.
Worked example
A peaking equalizer at 1 kHz has +6 dB of gain and Q = 1.414. What is , where are its half-gain (+3 dB) points, and what does the cut setting at −6 dB do to a signal that was boosted?
Show the solution
- Find A.
- Half-gain condition. With , the half-gain points satisfy
- Solve for x. giving 707 Hz and 1414 Hz: exactly an octave, as the predict question said.
- The cut setting. The −6 dB setting replaces by , which swaps the numerator and denominator.
- Boost, then cut. So passing a signal through the boost and then the cut leaves it exactly as it was, at every frequency, in phase as well as magnitude.
Answer = 1.413, the half-gain points are at 707 Hz and 1414 Hz, and the −6 dB cut exactly undoes the boost.
Worked example
Write a +9 dB, Q = 2 bell at as the signal plus a bandpass. What's the bandpass's peak gain and Q, and the bell's gain at ?
Show the solution
- Find A.
- The bandpass. It's scaled by and has quality factor :
- Check at the center. At the center the bandpass section's gain is 1, so the total is which is 9 dB.
- Numerator at x = 1.2.
- Denominator at x = 1.2.
- Gain at x = 1.2. so the gain is 5.75 dB.
- Why the bandpass Q is higher. The bandpass's Q is higher than the bell's: the boost is narrower than its own bandpass's skirts would suggest, because adding the dry signal lifts the skirts toward 0 dB.
Answer the bandpass has a peak gain of 1.818 and a Q of 3.36, and the bell's gain at is 5.75 dB.
Check
A peaking equalizer in the form above has a peak gain of 9 dB. What is ?
Check
A first-order low shelf boosts by 10 dB at low frequency, with its half-gain point at 80 Hz.
(a)
Where is its pole?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
(b)
Where is its zero?
Check
A peaking equalizer at 1000 Hz has Q = 0.7. At what frequency above the center does its decibel gain fall to half the peak's?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
A graphic equalizer has bands spaced 1/2 octave apart. What Q gives each section a half-gain bandwidth of exactly one band?
Check
A peaking equalizer has a 9 dB peak and Q = 1. What is its gain in dB at 1.5 times its center frequency?
Check
A signal passes through a peaking equalizer set to +6 dB at 1 kHz with Q = 2, then through a second one set to −6 dB at 1 kHz with Q = 2. What comes out?
Check
Write the bell as .
Step 1
Combining over the common denominator, the numerator's coefficient (in units of ) is . What must it equal to match the bell?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is ?
Check
Write bell_db(f, f0, g, Q) for the peaking equalizer above (gain g in dB at f0). Then find its upper half-gain frequency for f0 = 1000 numerically: bisect between f0 and 100*f0 for the point where the gain is g/2 dB, to 1e-9 Hz, and set f_half. Also set cancel, the largest absolute value in dB of bell_db(f, 1000, g, Q) + bell_db(f, 1000, -g, Q) over f = numpy.logspace(1, 5, 2001).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
A loudspeaker has a 4 dB peak at 2.5 kHz about a third of an octave wide. Explain how you'd flatten it with a peaking equalizer, what Q and gain you'd choose, and why the correction also fixes the speaker's phase near that frequency, if the peak comes from a simple resonance.
Set a peaking section at 2.5 kHz to cut by 4 dB, with a Q matched to the peak's width; a third-octave-wide feature measured at its half-decibel points suggests Q of about 4.3. If the speaker's peak behaves like a second-order resonance, it's itself a bell-shaped response with numerator and denominator of the same form, and the equalizer's cut is approximately its inverse: multiplying them gives nearly 1, flat in magnitude, and since a pole pair is cancelled by a matching zero pair, the phase disturbance near the resonance cancels as well, as it does exactly when a boost meets its mirror cut. That's the advantage of correcting a minimum-phase feature with a minimum-phase filter. Peaks that come from room reflections, which aren't minimum-phase, can't be fixed this way.
Practice
Keep practicing
8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.