Head-Fi.org › Forums › Equipment Forums › Sound Science › Frequency Response Question
New Posts  All Forums:Forum Nav:

Frequency Response Question - Page 3

post #31 of 38
Quote:
Originally Posted by xnor View Post

In matlab the default for α is 0.5 and is called "beta".

 

There is a small difference: β = π * α. My graphs above show β values (0.5 and 12.5).

post #32 of 38

You're right, pi is included in beta.

post #33 of 38
Quote:
Originally Posted by stv014 View Post

 

The Kaiser window has a parameter that trades dynamic range vs. frequency resolution. For sample rate conversion, 0.5 is too small. Here is what it looks like with the parameter set to 12.5 instead:

 

The cutoff frequency is 24 kHz here, and the IR length is 2 ms, at a sample rate of 384 kHz (= 48 kHz with 8x oversampling), so one bin is 500 Hz. As it can be seen on the graph, the roll-off from insignificant attenuation to 120 dB is within +/- 4 bins from the cutoff frequency.

 

Correct. Thanks!

 

I think the trade off here is stop band rejection vs transition bandwidth for a fixed number of taps. But yes, Kaiser allows for more flexibility.

post #34 of 38
Quote:
Originally Posted by stv014 View Post

The cutoff frequency is 24 kHz here, and the IR length is 2 ms, at a sample rate of 384 kHz (= 48 kHz with 8x oversampling), so one bin is 500 Hz. As it can be seen on the graph, the roll-off from insignificant attenuation to 120 dB is within +/- 4 bins from the cutoff frequency.

 

 

So, it seems 2 ms at 384 kHz comes out to be 768 taps. That is quite a bit if going the HW way, but dunno if it's such a big deal in audio applications (I come from higher sampling rate applications). One may go for the Lth-band filter trick, but 300 or so taps still seems a lot to me... Or maybe one could do the FFT overlap-and-add filter deal. Below my pretty plots using 769 taps (not as clear as stv014's, but they actually match quite well IMO) biggrin.gif

 

 

If we set the number of FIR taps to 49 then things don't look so hot given the transition bandwidth trade off issue.

 

 

If 700 or so taps is not such a big deal implementation-wise, well then I guess it's not... redface.gif

 

Again, my point is that I feel there are trade offs in all of this stuff which applies to audio DACs and ADCs, but I may be wrong.


Edited by ultrabike - 5/24/13 at 1:22am
post #35 of 38

If the number of taps needs to be kept low, it is also possible to do the upsampling in more than one stage: first upsample by a factor of 2 (192 tap FIR filter sticking with the previous example), then upsample again using a lower quality filter. I actually use that method in my resampler for large non-integer ratios (e.g. 44.1 -> 192 kHz), where the second stage interpolation uses only 48 taps (it could be lower with a Kaiser window, I used a less efficient but cheap to calculate Gaussian window), but the 2x oversampled input allows it to have 200 dB stopband rejection:

On this graph, the interpolation filters are equivalent to 48 taps at 48 kHz, and 1 bin is 1 kHz. For the Gaussian window, it takes 12 bins to roll off, while the 2x oversampled input has (almost) no content above 12 kHz (= 12 bins from the cutoff frequency). That is why I chose 48 taps for the highest quality mode. However, Kaiser would be almost twice as efficient with lookup tables, and 28 taps would be enough for a "perfect" output quality. Obviously, the 200 dB rejection shown in the example is also overkill in practice, so reducing that would allow for an even shorter interpolation filter.


Edited by stv014 - 5/24/13 at 2:19am
post #36 of 38

I think that might work well for a decimation filter after the ADC delta sigma as described in the PCM1804 data sheet, given things are oversampled, and may indeed do a decent job at removing delta sigma out of band quantization noise.... Assuming of course that next to nothing was recorded in the transition bands of the filter.

 

However, suppose some non insignificant amount of signal all the way to 31 kHz exists. Furthermore, consider storing things at 48 kHz. In the above example for the Kaiser windowing filter, the transition bandwidth seems to go from 24 kHz to 31 kHz, which means we have to worry about aliasing in the 17 kHz to 24 kHz range. Attenuation in the transition band is not constant off course. In the case of the Kaiser example above, attenuation from 29.5 kHz and above is more than -100 dB. So aliasing will be worse in the 18.5 kHz to 24 kHz bands.

 

In some cases one may consider perhaps relaxing the stop band attenuation requirement to get a smaller transition bandwidth... If storing things at 96 kHz, then perhaps we wouldn't have to worry too much about this transition bandwidth deal and even consider higher attenuation (without losing sight of the delta sigma quantization noise which may climb up significantly after some point.)

BTW I enjoy these discussions. I tend to learn (or re-learn) things from them. Thanks! beerchug.gif

post #37 of 38
Quote:

Originally Posted by ultrabike View Post

 

However, suppose some non insignificant amount of signal all the way to 31 kHz exists. Furthermore, consider storing things at 48 kHz. In the above example for the Kaiser windowing filter, the transition bandwidth seems to go from 24 kHz to 31 kHz, which means we have to worry about aliasing in the 17 kHz to 24 kHz range. Attenuation in the transition band is not constant off course. In the case of the Kaiser example above, attenuation from 29.5 kHz and above is more than -100 dB. So aliasing will be worse in the 18.5 kHz to 24 kHz bands.

 

As I already explained, there is not supposed to be signal above 12 kHz (in this particular example, the original sample rate is 24 kHz, which is first upsampled to 48 kHz, and then to whatever higher sample rate is needed), because the input is oversampled by a factor of 2. That is what allows for the wide transition band and small number of taps in the second stage.

post #38 of 38
Quote:
Originally Posted by stv014 View Post

 

As I already explained, there is not supposed to be signal above 12 kHz (in this particular example, the original sample rate is 24 kHz, which is first upsampled to 48 kHz, and then to whatever higher sample rate is needed), because the input is oversampled by a factor of 2. That is what allows for the wide transition band and small number of taps in the second stage.

 

I understood your example. I also bet you understand when I say "suppose some non insignificant amount of signal all the way to 31 kHz exists", I'm not talking about your particular example, but in general.


Edited by ultrabike - 5/24/13 at 1:00pm
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Sound Science
Head-Fi.org › Forums › Equipment Forums › Sound Science › Frequency Response Question