# Shelving filter (2nd order)

I'm trying to find the equation of a shelving filter of the second order. I easily found the equation for a first order filter on wikipedia with a transition region which have a 6db per octave slope. The equations are :

• coef^2 * (1 + (f / (coef * f0))^2) / (1 + (f/f0)^2) for the lowshelf

• (1 + (f / (coef * f0))^2) / (1 + (f/f0)^2) for the highshelf

With :

coef = multiplicator coef (gain = 10 log10 (coef))

f = frequency

f0 = cutoff frequency

But now, how can I use a kind of Q factor to modify the slope of the transition region ?

Of course, as I'm using already a frequency signal and not a temporal signal, I can't use the equations made for the z transform...

• You're using a frequency signal? What do you mean? – Ben Jul 11 '18 at 17:46
• I mean I'm using a spectral signal and not a temporal signal – Dr_Click Jul 11 '18 at 17:49
• I fail to see why you would use an IIR or an analog filter in this case... – Ben Jul 11 '18 at 18:09
• I'd like to increase the "slope coefficient" in the transition region. WIth that 1st order filter, I have a 6 db per octave slope, but I'd like to increase it to 12 or more. – Dr_Click Jul 11 '18 at 18:51
• check out the Audio EQ Cookbook. – robert bristow-johnson Jul 11 '18 at 20:02

Ok, I finally found a solution after few search about sigmoïd charts and few try. What I wanted is to modify the slope factor in the transition area without modifying the high and low border values. So, the equations are becoming :

coef^2 * (1 + (f / f0)^(SFactor+2) * (1/coef)^2) / (1 + (f/f0)^(SFactor+2)) for the lowshelf

(1 + (f / f0)^(SFactor+2)) * coef^2 / (1 + (f/f0)^(SFactor+2)) for the highshelf


With :

coef = multiplicator coef (gain = 10 log10 (coef))

f = frequency

f0 = cutoff frequency

SFactor = slope factor. If SFactor = 0, it acts like a classical first order shelving filter, if SFactor increases, the slope in the transition area is steeper.

Thank you for all the previous comments and the Audio EQ CookBook is also a very interesting source I'm going to study...