Note: Due to Internet Explorer's brain-dead handling of CSS, the equations below may not look right in Internet Explorer (or IE-based browsers). Sorry, nothing I can do about it on my end. You can try another browser, or complain to Microsoft.

Frequency Weighting Equations:

This was the response to a question about A-, B- and C-weighted filters on alt.sci.physics.acoustics (you can see the original posting here). These equations are also described in ANSI Standards S1.4-1983 and S1.42-2001.

Thanks to Neil Glenister:

The s-domain transfer function for C-weighting is:

Hc(s)=
2*122002*s2
(s+2π*20.6)2(s+2π*12200)2



Adding an extra real-axis pole to the C-weighting transfer function gives us B-weighting:

Hb(s)=
2*122002*s3
(s+2π*20.6)2(s+2π*12200)2(s+2π*158.5)



Adding two real-axis poles to the C-weighting transfer function gives us A-weighting:

Ha(s)=
2*122002*s4
(s+2π*20.6)2(s+2π*12200)2(s+2π*107.7)(s+2π*737.9)



where π=3.14159...etc and s is the complex variable.

If you are only interested in the steady-state response then the weightings may be expressed in terms of frequency alone:

Rc(f)=
122002*f2
(f2+20.62)(f2+122002)



Rb(f)=
122002*f3
(f2+20.62)(f2+122002)((f2+158.52)0.5)



Ra(f)=
122002*f4
(f2+20.62)(f2+122002)((f2+107.72)0.5)((f2+737.92)0.5)



These filters show a loss at 1kHz of 2.0dB ,0.17dB , 0.06dB for A , B and C weightings respectively and , since it is usual to normalise the response of each filter to 1kHz , this loss must be added to the to the modulus . In other words the responses may be expressed (in dB's) as follows:

		
       C = 0.06 + 20*log(Rc(f))

       B = 0.17 + 20*log(Rb(f))

       A = 2.0  + 20*log(Ra(f))
		

I don't have the transfer function for D-weighting easily to hand , but I can tell you the position of the poles and zeroes (from IEC 537)

        Poles             Zeroes
    -282.7 + j0       -519.8 + j876.2
     -1160 + j0       -519.8 - j876.2
     -1712 + j2628         0 + j0
     -1712 - j2628
		

A graph of the relative response of the functions is shown below:

Updated April 20, 1998


Update:

A set of Matlab scripts (“Octave”) filter scripts are available at Matlab Central. The script defines A-weighting and C-weighting scripts in terms of their poles and zeroes as defined in IEC/CD 1672 (and ANSI S1.42-2001). The normalization constants are integrated into the zeroes.

The implementation appears to meet the ANSI standard; the (time domain) impulse response is spot-on with the calculated IR given in ANSI S1.42-2001. The phase response appears to wrap differently than the response given in the ANSI standard, but I suspect that is related to the model inputs rather than any weakness in the model. As long as you use these filters to calculate magnitudes, the phase anomalies should not pose any problems.

Note that if you're running these scripts under GNU Octave, you'll need to make the following changes to adsgn.m and cdsgn.m:

[B,A] = bilinear(NUMs,DENs,Fs);

should be changed to:

[B,A] = bilinear(NUMs,DENs,1/Fs);

in both files to account for Octave's syntax.

September 6, 2004