DSPRelated.com
Forums

Coefficients for A-weighting filter

Started by Robert Adams December 15, 2006
Vladimir Vassilevsky <antispam_bogus@hotmail.com> wrote in
news:y70hh.9027$Ga1.5936@newssvr12.news.prodigy.net: 

> > > 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 > > >
The BLT is going to place zeros at 24kHz (PI) for 48kHz sampling. A weighting is certainly used to 20kHz and often higher. Clearly BLT is going to be less than ideal, since warping will still be significant. If you are assuming a white excitation, I agree that the warping might not be such an issue since most the energy will be in the lower octaves due to the two real poles at 12200 Hz and one or two at mid frequency. A weighting is often used to measure signals that are not white. If you are trying to create a filter that meets ISO or ANSI specs, I would suggest that you need to work harder at fitting the curve. I have not run the numbers for quite awhile so I don't have an instant answer on the deviation. As I recall, I wasn't happy with BLT when sampling at 96kHz. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Vladimir Vassilevsky wrote:
> > > 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?
I think that if the corners are prewarped, the rest should be within a dB or less. 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;
Greg Berchin wrote:
> 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.
so what did you do? sic Prony onto the magnitude of the A-weighting filter (assuming you built it 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
feedback coefficients like -82 or +81 make me pee in my pants. it's like staring into the abyss. turning 51 soon. need to buy Depends. r b-j
On 16 Dec 2006 20:42:15 -0800, "robert bristow-johnson"
<rbj@audioimagination.com> wrote:

>so what did you do? sic Prony onto the magnitude of the A-weighting >filter (assuming you built it correctly)?
No, I just used the frequency-domain least-squares method, that I mentioned in an earlier post, to approximate the response of the s-domain transfer function. If anyone bothers to check, they'll find that this coefficient set models the phase rather well, too.
>feedback coefficients like -82 or +81 make me pee in my pants. it's >like staring into the abyss.
C'mon, Robert, it's the modern age. Everybody uses floating point nowadays! Seriously; it's an approximation function, and it just does whatever it needs to do to get a good fit. Implementation is a separate issue, but it's a lot easier to implement something like this now than it was in the days of the DSP56K. Greg
And here's a nice 48 kHz set:

B =

        0.0788042432386599
          1.98740981801491
          8.73124941247807
          4.85523075703508
         -24.0633322613029
         -25.9677083336681
          18.4836542507029
          29.3655876043784
         -0.12131067674808
         -10.1662534649231
         -3.09813678180496
       -0.0851945103082358


A =

                         1
             9.83985722696
          14.2961663538284
         -27.8332539559425
         -47.4356190712194
          27.1537187137894
          49.4127654955485
         -9.81477544218375
         -19.1853035970187
         0.994392652452719
          1.82439680111452
        -0.251378021490288
-- Greg
Jerry Avins wrote:
> Vladimir Vassilevsky wrote:
>> 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? > > I think that if the corners are prewarped, the rest should be > within a dB or less.
Which points along the magnitude response do you call corners, and how do you fix them all at once? Martin -- Quidquid latine scriptum est, altum videtur.
Martin Eisenberg wrote:
> Jerry Avins wrote: >> Vladimir Vassilevsky wrote: > >>> 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? >> I think that if the corners are prewarped, the rest should be >> within a dB or less. > > Which points along the magnitude response do you call corners, and > how do you fix them all at once?
What would be the asymptotic corners on ab s-plane Bode magnitude plot, where the slope of the asymptote changes by 20 dB/decade. 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 Bob,

I'll send it to you via email.

Gerold

"Robert Adams" <robert.adams@analog.com> schrieb im Newsbeitrag 
news:1166304986.354963.220630@t46g2000cwa.googlegroups.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 >> > >
Gerold Schrutz wrote:
> Hello Bob, > > I'll send it to you via email. >
why not post it? c'mon! spread the joy. it's the christmas season. r b-j
On Sat, 16 Dec 2006 10:20:37 -0500, Greg Berchin <gberchin@comicast.net>
wrote:

>Try the following for 44100 Hz.
As with the 48 kHz case, this one's unstable, too. The A-weighting curve turns out to be a surprisingly difficult case. I'll post a stable solution if I find one. -- Greg