IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
About oversampling and lowpass theory
niktheblak
post Oct 30 2001, 12:45
Post #1





Group: Members (Donating)
Posts: 302
Joined: 3-October 01
From: Finland
Member No.: 188



Greetings,

I'm currently on a DSP course in my university and I would like to ask the technical experts here about some DSP-related (theoretical) issues.

It is widely known that in CD-audio the frequency band between 20-22 kHz is quite unusable, consisting mostly of aliased and highly attenuated remains of signals.

But isn't this the case only if the signal is originally recorded at 44.1 kHz, meaning that an analog lowpass filter (i.e. 8-point Chebychev) has to take place and filter out (or at least attenuate adequately) everything above 22.05 kHz leaving the 20-22 kHz band useless as I stated?

So what if the signal would have been recorded at say 96 kHz in the first place, with an analog lowpass stop-band of at say 92-96 kHz. In this case, the resulting 96 kHz signal could be digitally lowpassed (much narrower stop-band) at 22.05 kHz and decimated with a factor of 0.5 leaving us with full, usable 22.05 kHz frequency band.

What I'm trying to ask here is that with oversampling techniques couldn't we get CD-audio where the highest (20-22 kHz) frequency band wouldn't be unusable garbage?

Well, since so few people can hear high frequencies and CD players lowpass everything over 20 kHz anyway that it wouldn't make much difference. But as I stated, this is a theoretical question biggrin.gif

Edit:

I had to put this to "Off-topic" section since this is a DSP related but isn't codec-specific technical issue...
Go to the top of the page
+Quote Post
tangent
post Oct 30 2001, 17:42
Post #2





Group: Members
Posts: 674
Joined: 29-September 01
Member No.: 63



From what I understand, a low order low pass filter has to be used to prevent phase distortion. As we know, the low order lpf has a gentle cutoff slope, so attentuation has to begin at a frequency somewhat lower to get full attenuation at 22.1kHz, and I guess this frequency starts at 20kHz
Go to the top of the page
+Quote Post
tangent
post Nov 3 2001, 21:37
Post #3





Group: Members
Posts: 674
Joined: 29-September 01
Member No.: 63



QUOTE
Originally posted by niktheblak So what if the signal would have been recorded at say 96 kHz in the first place, with an analog lowpass stop-band of at say 92-96 kHz. In this case, the resulting 96 kHz signal could be digitally lowpassed (much narrower stop-band) at 22.05 kHz and decimated with a factor of 0.5 leaving us with full, usable 22.05 kHz frequency band.

I believe you mean 88.2kHz sampling rate and not 96kHz since you want a 0.5 decimation. Well, this wouldn't work because you will still suffer from aliasing images. All the signals in the 22.05kHz to 44.1kHz range will be reproduced as signals in the 22.05kHz to 0kHz range. That's a lot of audible noise.

When sampling or resampling, you absolutely need to lpf beforehand at half the new sampling rate to prevent these images.
Go to the top of the page
+Quote Post
2Bdecided
post Nov 26 2001, 13:44
Post #4


ReplayGain developer


Group: Developer
Posts: 5059
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



I don't agree with the opinions written here.

Almost all ADCs (and DACs) use oversampling, which means that the digital signal is sampled at many times the target sample rate, and the majority of the anti alias filtering is carried out in the digital domain, before decimating the signal (removing every n-th sample) to get to the sample rate you require (in this case, 44.1kHz).

The quality of the digital anti-alias filter isn't always optimal (because a more accurate frequency domain response requires more filter taps, which requires more processing power. Also, the better the frequency domain response, the longer the time domain ringing of the filter). However, some systems contain fantastic filters, which get you almost all the way up to 22kHz without any aliasing problems. It is possible to generate a filter which passes 22kHz perfectly, and attenuates 22.05kHz by 120dB - you can even do it in Cool Edit Pro!

So, the idea of an ADC or DAC running at natively 44.1kHz is nearly 20 years out of date - all current models oversample, and perform the anti-aliasing at the higher (oversampled) rate. Unfortunately, the anti-alias digital filters aren't always great because of cost constraints, but they can be very good, giving almost textbook response up to 22kHz. The phase response can be perfectly linear, though again, cost contraints can compromise this.


Even in a non-perfect world with poorly designed convertors, there is no reason to say that everything above 20kHz is noise but everything below it is pure signal. The poorer the filter design, the worse the aliasing - it won't necesarily stop at 20kHz. This idea of a magical 20-22kHz band filled with aliasing is false. Things could be much worse, or much better. Whilst the CD specs suggest that things should be EXACTLY like that (0-20kHz signal, 20-22kHz noise), this doesn't happen in practice.


Removing everything above 20kHz on playback isn't such a bad idea. If it's signal, then you probably can't hear it anyway (well, I can't - some of you are younger, or looked after your hearing better). If it's alias components, then removing it can prevent some intermodulation within the speakers which will give rise to audible noise. If there's nothing there at all (this is quite rare!) then there's still no harm in removing it.

But to assume that there's never anything useful up there would be false. If you record at 88.2kHz and resample optimally, you can be sure that what's up there is accurate.


You can play around with this stuff in Cool Edit. Generate a test signal at 88.2kHz, resample it down to 44.1kHz, and then resample it back up to 88.2kHz (to simulate the action of an oversampling DAC). See what frequencies remain, and which ones are swamped by Alising distortion. You might be surprised.

Cheers,
David.
http://www.David.Robinson.org/
Go to the top of the page
+Quote Post
JohnV
post Nov 28 2001, 01:45
Post #5





Group: Developer
Posts: 2797
Joined: 22-September 01
Member No.: 6



I moved this informative thread to the general forum. Too informative for the Off-Topic forum (this thread is general information about audio so it goes perfectly to the general forum), and OT- forum threads are anyway invisible at the front page latest discussions window.


--------------------
Juha Laaksonheimo
Go to the top of the page
+Quote Post
niktheblak
post Nov 28 2001, 12:59
Post #6





Group: Members (Donating)
Posts: 302
Joined: 3-October 01
From: Finland
Member No.: 188



First, thank you all for informative, well-written answers. As my studies go on and with your kind answers I now know a little more about CD-systems and DSP in general biggrin.gif


QUOTE
Originally posted by 2Bdecided
I don't agree with the opinions written here.

Almost all ADCs (and DACs) use oversampling, which means that the digital signal is sampled at many times the target sample 


Yes, I found out this after writing my initial post. Multirate DSP is very common in general.

QUOTE
domain ringing of the filter). However, some systems contain fantastic filters, which get you almost all the way up to 22kHz without any aliasing problems. It is possible to generate a filter which passes 22kHz perfectly, and attenuates 22.05kHz by 120dB - you can even do it in Cool Edit Pro!


And the best part is that mathematical models of these filters are very easy to construct. For example, windowed sinc and Remez-method spit out superior filter kernels just as fast as you can tweak them. And the best of all, they all have perfectly linear phase response in passband.

Basically zero ripple at passband, 5 Hz transition band and 120 dB attenuation at stop band are not impossible to attain. And if we aren't looking for this extreme filters, an adequate compromise between time-domain ringing and frequency response can be found. I have experimented a little with double Hamming sinc in matlab with exciting results.

However, this is "classic" DSP filtering in question and thus the way I would do it. I don't know if audio compressors convolve the signal with a filter kernel in order to lowpass or are more sophisticated methods used. If someone has time to elaborate or provide address to technical documentation, I would be very grateful. And don't afraid to be technical biggrin.gif


QUOTE
Unfortunately, the anti-alias digital filters aren't always great because of cost constraints, but they can be very good, giving almost textbook response up to 22kHz. The phase response can be perfectly linear, though again, cost contraints can compromise this.


Yes, unfortunately filtering by convolution (even FFT convolution) is mostly reserved for efficient processors.

QUOTE
But to assume that there's never anything useful up there would be false. If you record at 88.2kHz and resample optimally, you can be sure that what's up there is accurate.


And this answers my initial question. Theoretically it shouldn't be a problem.

Thank you!

Edit:

For my main source of information (plus lecture material of course) I use and sometimes directly quote Stephen W. Smiths The Scientists And Engineer's Guide To Digital Signal Processing. The 500-page book is downloadable in PDF format from

http://www.dspguide.com

For anyone interested in learning DSP I would recommend reading this book. It's very well written, informative and free to download.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th July 2014 - 21:46