DSPRelated.com
Forums

Coefficients for A-weighting filter

Started by Robert Adams December 15, 2006
On 15 Dec 2006 22:23:53 -0800, "robert bristow-johnson"
<rbj@audioimagination.com> wrote:

>it oughta be okay to just apply the BLT* to the poles/zeros to get a >digital filter.
Depends upon the sampling rate. That 12200 Hz pole pair makes life very difficult for the Bilinear Transform method if the sampling is 44100. Greg
On 15 Dec 2006 14:01:42 -0800, "Robert Adams" <robert.adams@analog.com>
wrote:

>Does anyone have a set of IIR coefficients that mimick the A-weighting >filter used for audio SNR measurements?
Try the following for 44100 Hz. They give a pretty good fit across 20 Hz - 20 kHz, assuming that I built the A-Weighting prototype filter correctly. Scaled for 0 dB maximum value; you'll have to provide an external scale factor to achieve 0 dB at 1000 Hz: -1 -N b + b z + ... + b z Y(z) 1 2 N+1 ---- = ------------------------- U(z) -1 -D 1 + a z + ... + a z 2 D+1 B (numerator) = 0.0876123724780696 2.36570092608062 12.4787701793635 15.69685906973 -23.2706491667066 -58.0942308188492 -6.0146204834604 56.3786213650555 31.423387338151 -13.1004688741572 -14.6282073715532 -3.24823045080139 -0.0745445212666291 A (denominator) = 1 11.5076015981588 27.2035602500282 -12.3933688489819 -82.7532268206639 -26.1432798480498 81.6487181729756 45.2048387161928 -28.9439719728098 -19.5962624959289 2.02257498383719 1.43533032615038 -0.189864248643441 -- Greg
Greg Berchin wrote:
> On 15 Dec 2006 22:23:53 -0800, "robert bristow-johnson" > <rbj@audioimagination.com> wrote: > >> it oughta be okay to just apply the BLT* to the poles/zeros to get a >> digital filter. > > Depends upon the sampling rate. That 12200 Hz pole pair makes life very > difficult for the Bilinear Transform method if the sampling is 44100.
What about upsampling before the filter and downsampling after it? Anyhow, is there a phase spec too? I see no reason for one in a weighting scheme. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Sat, 16 Dec 2006 10:58:03 -0500, Jerry Avins <jya@ieee.org> wrote:

>What about upsampling before the filter and downsampling after it?
Sure, that should work. I'm not sure how high an oversampling ratio would be necessary in order to get adequate performance.
>Anyhow, is there a phase spec too? I see no reason for one in a >weighting scheme.
The spec is given in terms of an s-domain transfer function, and there is phase associated with that. But you're right; in a weighting scheme it's generally ignored. Greg

Greg Berchin wrote:


>>What about upsampling before the filter and downsampling after it? > > Sure, that should work. I'm not sure how high an oversampling ratio > would be necessary in order to get adequate performance.
There is one more problem with the A-weighting: if the signal should be brickwall lowpassed before A-filter and to what frequency it should be lowpassed. Is it 20, 22 or 24kHz ? There can be a lot of the residuals of the noise shaping, PWM sidebands, etc. in the near ultrasound area. The A-weight without LPF is very incorrect if this is a case. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Jerry Avins <jya@ieee.org> wrote in 
news:RoWdnS_wtccSihnYnZ2dnUVZ_qDinZ2d@rcn.net:

> Greg Berchin wrote: >> On 15 Dec 2006 22:23:53 -0800, "robert bristow-johnson" >> <rbj@audioimagination.com> wrote: >> >>> it oughta be okay to just apply the BLT* to the poles/zeros to get a >>> digital filter. >> >> Depends upon the sampling rate. That 12200 Hz pole pair makes life very >> difficult for the Bilinear Transform method if the sampling is 44100. > > What about upsampling before the filter and downsampling after it? > Anyhow, is there a phase spec too? I see no reason for one in a > weighting scheme. > > Jerry
This has always been one of my solution approaches. It costs a bit more in computation. You still need to over sample by quite a bit if you want the curve to be very accurate since warping is still significant at 20-30KHz. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Al Clark wrote:
> Jerry Avins <jya@ieee.org> wrote in > news:RoWdnS_wtccSihnYnZ2dnUVZ_qDinZ2d@rcn.net: > >> Greg Berchin wrote: >>> On 15 Dec 2006 22:23:53 -0800, "robert bristow-johnson" >>> <rbj@audioimagination.com> wrote: >>> >>>> it oughta be okay to just apply the BLT* to the poles/zeros to get a >>>> digital filter. >>> Depends upon the sampling rate. That 12200 Hz pole pair makes life very >>> difficult for the Bilinear Transform method if the sampling is 44100. >> What about upsampling before the filter and downsampling after it? >> Anyhow, is there a phase spec too? I see no reason for one in a >> weighting scheme. >> >> Jerry > > This has always been one of my solution approaches. It costs a bit more in > computation. You still need to over sample by quite a bit if you want the > curve to be very accurate since warping is still significant at 20-30KHz.
Prewarping will put the corner frequencies in the right place. The problem lies in the curve between them. It probably won't depart too severely even with a 3:1 oversampling rate, and 2:1 might be good enough. Has anyone tried? Experience beats speculation every time. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Hello Robert,

I've got some coefficients for different sample rates. What sample rate do 
you use?

Regards,

Gerold

"Robert Adams" <robert.adams@analog.com> schrieb im Newsbeitrag 
news:1166230009.216393.53810@t46g2000cwa.googlegroups.com...
> Yes, the reason I'm interested is that I want to predict what the > datasheet spec will be on a product I'm designing, so even though > A-weighting is outdated, it does the job for me. > > I'll work on this and post the results; I was just hoping I could be > lazy! > > Does anyone have the S-plane poles/zeros? > > > Regards > > > Bob > > > > Al Clark wrote: >> "robert bristow-johnson" <rbj@audioimagination.com> wrote in >> news:1166222409.129012.96080@16g2000cwy.googlegroups.com: >> >> > Robert Adams wrote: >> >> Does anyone have a set of IIR coefficients that mimick the A-weighting >> >> filter used for audio SNR measurements? I'm sure it's been done many >> >> times but I'm not able to find it on the WEB. >> > >> > hey Bob, this ain't the A-weighting another approximation that's >> > supposed to be better. the Wannamaker/Lipshitz "F-wieghting" curve >> > from their "Psychoacoutically Optimal Noise-Shaping" paper in some old >> > AES journal. >> > >> > it is defined below (as an s-plane filter representing the inverse of >> > the 0 dB Fletcher-Munson curve, if you want the equal loudness curve, >> > swap the poles and zeros, reciprocate the constant gain g, and plot the >> > magnitude): >> > >> > 12 zeros, 55 poles: >> > >> > z1 = 0.0 four z1 zeros >> > z2 = -0.58 +/- j*1.03 one z2 pair of zeros >> > z3 = -3.18 +/- j*8.75 three z3 pairs of zeros >> > >> > p1 = -0.18 three p1 poles >> > p2 = -1.63 two p2 poles >> > p3 = -2.51 +/- j*3.85 four p3 pairs of poles >> > p4 = -6.62 +/- j*14.29 twenty p4 pairs of poles >> > >> > g = 6.727242106827342e+47; >> > g = constant gain to normalize 1 kHz to 0 dB >> > >> > all poles and zeros are represented in kHz (not krad/sec so they really >> > have to multiplied be 2*pi and perhaps 1000 to be normal s-plane poles >> > and zeros with the second as the unit time). >> > >> > r b-j >> > >> > >> >> The A weight curve is not wonderful but it is the world's defacto >> measurement standard. It is defined exactly (at least in acoustics) as an >> s-plane filter. This is why it is can't be expressed perfectly as a >> digital filter. >> >> >> -- >> Al Clark >> Danville Signal Processing, Inc. >> -------------------------------------------------------------------- >> Purveyors of Fine DSP Hardware and other Cool Stuff >> Available at http://www.danvillesignal.com >
Gerold


Thanks ... 48KHz shoud do it.

Regards

Bob Adams



Gerold Schrutz wrote:
> Hello Robert, > > I've got some coefficients for different sample rates. What sample rate do > you use? > > Regards, > > Gerold > > "Robert Adams" <robert.adams@analog.com> schrieb im Newsbeitrag > news:1166230009.216393.53810@t46g2000cwa.googlegroups.com... > > Yes, the reason I'm interested is that I want to predict what the > > datasheet spec will be on a product I'm designing, so even though > > A-weighting is outdated, it does the job for me. > > > > I'll work on this and post the results; I was just hoping I could be > > lazy! > > > > Does anyone have the S-plane poles/zeros? > > > > > > Regards > > > > > > Bob > > > > > > > > Al Clark wrote: > >> "robert bristow-johnson" <rbj@audioimagination.com> wrote in > >> news:1166222409.129012.96080@16g2000cwy.googlegroups.com: > >> > >> > Robert Adams wrote: > >> >> Does anyone have a set of IIR coefficients that mimick the A-weighting > >> >> filter used for audio SNR measurements? I'm sure it's been done many > >> >> times but I'm not able to find it on the WEB. > >> > > >> > hey Bob, this ain't the A-weighting another approximation that's > >> > supposed to be better. the Wannamaker/Lipshitz "F-wieghting" curve > >> > from their "Psychoacoutically Optimal Noise-Shaping" paper in some old > >> > AES journal. > >> > > >> > it is defined below (as an s-plane filter representing the inverse of > >> > the 0 dB Fletcher-Munson curve, if you want the equal loudness curve, > >> > swap the poles and zeros, reciprocate the constant gain g, and plot the > >> > magnitude): > >> > > >> > 12 zeros, 55 poles: > >> > > >> > z1 = 0.0 four z1 zeros > >> > z2 = -0.58 +/- j*1.03 one z2 pair of zeros > >> > z3 = -3.18 +/- j*8.75 three z3 pairs of zeros > >> > > >> > p1 = -0.18 three p1 poles > >> > p2 = -1.63 two p2 poles > >> > p3 = -2.51 +/- j*3.85 four p3 pairs of poles > >> > p4 = -6.62 +/- j*14.29 twenty p4 pairs of poles > >> > > >> > g = 6.727242106827342e+47; > >> > g = constant gain to normalize 1 kHz to 0 dB > >> > > >> > all poles and zeros are represented in kHz (not krad/sec so they really > >> > have to multiplied be 2*pi and perhaps 1000 to be normal s-plane poles > >> > and zeros with the second as the unit time). > >> > > >> > r b-j > >> > > >> > > >> > >> The A weight curve is not wonderful but it is the world's defacto > >> measurement standard. It is defined exactly (at least in acoustics) as an > >> s-plane filter. This is why it is can't be expressed perfectly as a > >> digital filter. > >> > >> > >> -- > >> Al Clark > >> Danville Signal Processing, Inc. > >> -------------------------------------------------------------------- > >> Purveyors of Fine DSP Hardware and other Cool Stuff > >> Available at http://www.danvillesignal.com > >

Al Clark wrote:


> > > The A weight curve is not wonderful but it is the world's defacto > measurement standard. It is defined exactly (at least in acoustics) as an > s-plane filter. This is why it is can't be expressed perfectly as a > digital filter. >
Al, If the input is a white noise, and the sample rate of the digital filter (designed by BLT) is 48kHz, how much will be the measurement error due to the warping compared to the analog filter? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com