A/D converter sample rate conversion side-effects?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

gentlevoice1

Well-known member
Joined
Jan 14, 2008
Messages
141
Location
Aarhus, Denmark
Hello,

I've been pondering this topic about A/D conversion but not being an expert in the field I am not quite sure about how it actually is, so maybe one of you knows ... ?

Just for an example: There's an A/D converter that samples at 32*Fs (1.4 MHz) at a 24 bit resolution and here has these data:

- a dynamic range of say 120 dBs
- a SNR of say 110 dB
- and a THD level of - 100 dBs

My question is what happens if a signal recorded at this sample frequency/resolution is then downsampled to 44.1 kHz /yet still 24 bits?

Hope one of you knows ;-)

Jesper
 
gentlevoice1 said:
Hello,

I've been pondering this topic about A/D conversion but not being an expert in the field I am not quite sure about how it actually is, so maybe one of you knows ... ?

Just for an example: There's an A/D converter that samples at 32*Fs (1.4 MHz) at a 24 bit resolution and here has these data:

- a dynamic range of say 120 dBs
- a SNR of say 110 dB
- and a THD level of - 100 dBs

My question is what happens if a signal recorded at this sample frequency/resolution is then downsampled to 44.1 kHz /yet still 24 bits?

Hope one of you knows ;-)

Jesper

32*F sample (1.4MHz) = 1.4MHz/32 =  43.75kHz F sample

You want to sample rate convert between 43.7kHz and 44.1 kHz?

It seems a lot easier to just push the A/D clock up to 1.411 MHz.

I do not recognize dBs do you mean dBfs (full scale?)

Don't confuse sample rate conversion with decimation, while I suspect there are some similarities.

JR
 
Hi John,

Thanks for replying - my apology if I've been imprecise in my wording of my question. What I meant was 32*44.1 kHz sample frequency - I took the liberty of shortening the 1.411 MHz a bit as I hoped it would come through that this was what I meant. But better be precise ;-)

About the dB levels I state they are meant as a point of reference for what will happen - in principle/practice - when converting/decimating the original 1.411 MHz Fs to 44.1 kHz. In this context I do not necessarily think of absolute figures - it can be dBfs - but just as well in relative terms. To get an idea of what happens to a set of data e.g. like the ones I mention ....

Also, I'm not clear about what the difference is between decimation & conversion, although in this case I would imagine that decimation would be taking out every 32th sample, and possibly the most obvious choice here ...?

Hope this makes my question clearer.

Best regards,

Jesper
 
Jesper,

Here's the simplified flow...

Typically, in an AD converter, you oversample with a multi-bit modulator (a 5 bit or so) at at least 64fs rate. This data does not have a 120dB dynamic range.

That data is brought into the digital filter, that will noise shape and low pass filter the data. It also adds more bits to the initial data depth. (i.e. 5bits to 24bits).

From there you still have data at a multi fs rate.

You then digitally decimate the data, that'll essentially do your "pick one in 64" rate, and put the data in an output register, that the I2S serial port will then drive out the pins.

There are a lot of subtle, highly detailed things that will influence the "sound" in this flow. Many of them hidden from pcb designers.
However, the major one, that you find data on in the datasheet will be the digital filter architecture used. (FIR vs. IIR) along with the number of taps each of them has.

The other to keep an eye on is the input impedance, and the input anti aliasing filter -3dB frequency - as many consumer customers don't like putting opamp buffer circuits in front of ADC's.

In Pro Audio systems, designers normally add an external buffer which has enough current capability to drive a low impedance ADC input, as well as the appropriate low pass filter to reduce any aliasing. For instance, on the PCM4222 EVM, we used OPA1632 differential opamps to drive the 2.8kOhm impedance.

Cheers

Rochey
 
gentlevoice1 said:
Hi John,

Thanks for replying - my apology if I've been imprecise in my wording of my question. What I meant was 32*44.1 kHz sample frequency - I took the liberty of shortening the 1.411 MHz a bit as I hoped it would come through that this was what I meant. But better be precise ;-)
accurate...  thank you
About the dB levels I state they are meant as a point of reference for what will happen - in principle/practice - when converting/decimating the original 1.411 MHz Fs to 44.1 kHz. In this context I do not necessarily think of absolute figures - it can be dBfs - but just as well in relative terms. To get an idea of what happens to a set of data e.g. like the ones I mention ....
dBfs is a relative term since FS is arbitrary.
Also, I'm not clear about what the difference is between decimation & conversion, although in this case I would imagine that decimation would be taking out every 32th sample, and possibly the most obvious choice here ...?

Hope this makes my question clearer.

Best regards,

Jesper
Sample rate conversion can go in either direction up or down. If up sampling you need to interpolate between samples to create new intermediate data Decimation or down conversion uses digital low pass filtering and resampling to manage the excess data.

Hopefully others here can explain it better... I am still unclear about your question... it is not 24 bit at the 1.411 Mhz initial conversion, only after all the digital filtering and decimation. Where you trade the extra high speed samples for more resolution at the slower sample rate.

JR
 
Hi John & Rochey  ;D

@John: Hmmm ... thanks for replying again. And, well, we appear to have a slip of communication here ;) Could it be that I'm asking about something that is either not relevant or that is normally understood in a different way so that we just don't connect on this?

I'll try to phrase it differently. I'll use the PCM4202 AD converter from TI (datasheet attached) as an example:

For a sampling frequency of 192 kHz the PCM4202 has these data (page 4 in the datasheet):

THD+N: -103 dB (VIN = –0.5 dBFS, fIN = 1 kHz)
Dynamic range: 108 dB  (VIN = 0 VRMS, no weighting)

I now record sound at 192 kHz and - just as a thought - do it so that I take advantage of the full THD+N and dynamic range of the ADC (as is practically possible). Then if I subsequently decimate the recorded signal with a factor of 8 (i.e. to 24 kHz) what then happens with the -103 dB THD+N and 108 dB Dynamic range?

And would it have been different if I had made a sample rate conversion instead of a decimation? Hope this makes it clearer what I seek to find out about...

@Rochey: Thank you for the short introduction to ADC design. Indeed very interesting what you write - although I am less into the theoretical and practical aspects of how this is done .. Hmmm... maybe I can ask you this now that I see that you also work with TI:

- Both the PCM4202 and the PCM4222 have a quite clear rise (PCM4202 more so) in their FFT plots at low frequencies (page 11 in the 4202 datasheet). Just out of curiosity: Do you know what causes this rise?

- And then a question on the ADS1675 (I'll attach the datasheet in the post just below) which I hope you can help with ... I'm considering using this IC among other things for audio signals (a mixed signal) and although its data are not topnotch compared with other audio dedicated ICs, is there then something that in your experience excludes it from use in audio? Or is it mainly that the data are less than pristine?

Best regards from Denmark,

Jesper





 

Attachments

  • pcm4202-ep.pdf
    788.1 KB · Views: 4
If I understand your question you are asking about the noise difference between 192k SPS and 24k SPS, while I can't answer for some later software sample rate conversion, but in theory reducing the bandpass by a factor of 8 should reduce the noise proportionately.

It is important to keep in mind that data sheet unweighted noise specs do not always correlate 1:1 with what we hear.

Lets first consider this example... the difference between 192k and 96k sample rate is 2:1 for a measurable drop in noise. but audibly the noise that has been removed is in the octave between 96k and 192k and I know I couldn't hear that present or absent. 

However dropping all the way to a 24k SPS rate, only support 1/2 that passband (Nyquist criteria) or 12khz. The simple way to visualize this, any higher frequency signals that zig and zag up and down completely within one combined longer sample period will cancel itself out. Only lower frequency content that persists across multiple (longer) sample periods can survive. 

Sorry if this is not what you are asking. I am not the digital expert.

JR
 
Jesper,

Interesting - I hadn't noted that increase in low frequency noise at 192kHz before. It appears that it's only at 192kHz too!

I've forwarded some messages to the apps and design team. I suspect it's either a 1/f noise issue, or something in the digital filter.

108dB is due to the higher frequency noise from the noise shaper. you still get good performance up to 20kHz, but the noise will start increasing 40kHZ+.
When you integrate this noise over a wider bandwidth, then your average noise will be higher.

When you decimate, you usually LPF.
When you SRC down, you still LPF :)

Thanks again
Rochey

 
I noticed something in the manual of my Symphony I/O.  even though the unit goes up to 192Khz for the sampling rate, it said that the highest frequency replication rate is around 65Khz.  Clearly not 192/2.    192khz seems like a waste of disk space, since you aren't even getting the full nyquist frequency for that sample rate. 
 
There are different decimation filters that influence the LPF effect of down sampling. While I haven't looked into this closely in the data sheet (4222)  they describe the number of Fsample clocks consumed by the digital filter. Users can select a faster filter for less group  delay. It seems logical the less samples the higher frequency passed.

FWIW the HPF delays the signal 48,000 samples, vs 39 or 21 Fs (in the 4222). But the HPF rejects slow changing data, not fast changing... like average the data over 48k samples and subtract, so anything changing slower than that gets rejected.

JR

 
@Rochey:

Interesting - I hadn't noted that increase in low frequency noise at 192kHz before. It appears that it's only at 192kHz too!

I've forwarded some messages to the apps and design team. I suspect it's either a 1/f noise issue, or something in the digital filter.

Thanks! Yup, it was quite surprising for me to see this low frequency rise & also that it's only at 192 kHz ...?? So I'd be interested in hearing what your colleagues reply to your messages ...

Can I just ask you again maybe to give feedback on the ADS1675 for audio use? Or, if this is not your field, then maybe suggest someone to contact within TI? It would be very useful for me to know about this ;-)

@JR: Thanks again for replying, John :) When reading your reply I do, however, still get the impression that we may have some kind of "slip" in the understanding of what the one another says  ;). I'm still after a different information but I reckon that I may be asking something that's either not relevant - or maybe I ask from a different perspective ... ? Anyway, I think it's time to let it be by now & again: Thanks for taking the time & effort to assist in this ;-)

Greetings,

Jesper



Greetings from a quite cold Denmark (for the season),

Jesper
 
the ADS device may be suitable. It is an $18 part.
111dB at 125ksamples isn't great though.

I'd still take an audio converter, that's designed for purpose, rather than try and bodge an industrial dac in place.

Don't forget that you'll need some kind of FPGA to interface the SPI data from the ADS device into I2S for any kind of processing.
 
@Rochey:

the ADS device may be suitable. It is an $18 part.
111dB at 125ksamples isn't great though.

Thanks Rochey for replying again, although I note some ambivalence in your reply ... And, yes, I do realize that I need an FPGA or something similar to pass the data on. Thanks again for considering ;-)

Jesper
 
I'm not the guru on those ADS Parts.

It'd be like driving a truck that has 500 horsepower 'round a racetrack... when you can buy a sportscar that was designed for purpose. :)

/R
 
Don't confuse sample rate conversion with decimation, while I suspect there are some similarities.

As often, (English) terminology is sloppy and ambiguous. I'd say that current use of these words are, in this context, for one and the same thing, low-pass filtering and then "loosing" samples.

Typically, in an AD converter, you oversample with a multi-bit modulator (a 5 bit or so) at at least 64fs rate. This data does not have a 120 dB dynamic range.

That data is brought into the digital filter, that will noise shape and low pass filter the data. It also adds more bits to the initial data depth. (i.e. 5 bits to 24 bits).

Downsampling cannot magically add dynamic range. Within a given bandwidth (say 20 kHz), the low-bit sigma-delta modulator output has the same dynamic range as the PCM output (assuming that the downsampling process is reasonably artefact free, which it usually is). The modulator output has tons of high-frequency noise which is removed at the downsampling/decimation process, but the information within the audio frequency band is not affected by this.

I now record sound at 192 kHz and - just as a thought - do it so that I take advantage of the full THD+N and dynamic range of the ADC (as is practically possible). Then if I subsequently decimate the recorded signal with a factor of 8 (i.e. to 24 kHz) what then happens with the -103 dB THD+N and 108 dB Dynamic range?

Nothing if the downsampler is of good quality, and if the THD+N figure you quote is for a given low measurement bandwidth (say 22 kHz). Note: A THD+N figure must be quoted with a measurement bandwidth to be meaningful.

And would it have been different if I had made a sample rate conversion instead of a decimation?

What should be the difference between SRC and decimation? As noted above, there is actually none unless you specifically define these terms.

Both the PCM4202 and the PCM4222 have a quite clear rise (PCM4202 more so) in their FFT plots at low frequencies (page 11 in the 4202 datasheet). Just out of curiosity: Do you know what causes this rise?

You mean page 10? On page 11 there are no FFT plots.

The effects seen on page 10 are likely simply caused by a small DC offset. This offset makes a side-lobe of the FFT window appear. Simply a measurement artefact, no 1/f noise, no anything.

If I understand your question you are asking about the noise difference between 192k SPS and 24k SPS, while I can't answer for some later software sample rate conversion, but in theory reducing the bandpass by a factor of 8 should reduce the noise proportionately.

It all depends in what measurement bandwidth we're measuring noise. All the ADC/DAC performance figures we see in datasheets are for a specific bandwidth. In this case downsampling does not reduce noise at all (unless the new sampling rate is lower than twice the measurement bandwidth).

Samuel
 
Hi Samuel & Rochey,

Thank you both for replying!

@Rochey: Without considering data etc. I get your image of the two "vehicles" racing the track  8)

And reading this:

I'm not the guru on those ADS Parts.

... I will ask you no more on this ;)

@Samuel: Thank you also for replying, Samuel - I appreciate your being specific and detailed - as your reply is to me ;-))! I would say that it has clarified what I was looking for an answer to - and it's very interesting that the low frequency rise in the FFT plot is likely to be caused by a DC offset .... As it is, I actually decided to not use this AD converter due to this rise - I will be using the ADC I make e.g. for subsonic frequencies so it needs have similar specs in this range, as well. But if it's merely due to a DC offset  :eek: 

You also mention THD+N related to the measured bandwidth. When I look at the data for the Ardatech AT-1201 (datasheet attached, 384 kHz Fs, should be page 5) it appears that the dynamic range drops 3 dBs per additional octave of added bandwidth (from 40 kHz to 80 kHz bandwidth; 118-115 dB) and the THD+N drops 2 dBs per added octave bandwidth (110 - 108 dBs). Considering this in relation to the ADS1675 (page 3 in datasheet above) the dynamic range is 103,5 dB for a 2 MSPS Fs & 97 dBs SNR (THD is 103 dBs so THD+N would be about 97 dBs, right?).

Which, if the above relations for dynamic range & THD are comparable would give ~ 109,5 dBs dynamic range & ~ 101 dBs SNR (500 kHz sampling frequency vs. 2 MSPS) ... This compares very well with the PCM 4202 (datasheet page 4) which has a dynamic range of 108 dBs and 103 dBs THD+N, yet at 192 kHz Fs...

Hmmm... intriguing ... I do not expect either of you to amend my thoughts if they are not correct but I'd appreciate if you would just say if they are way off ...

Best regards ;-)

Jesper
 

Attachments

  • at1201.jpg
    at1201.jpg
    511.2 KB · Views: 12
mulletchuck said:
I noticed something in the manual of my Symphony I/O.  even though the unit goes up to 192Khz for the sampling rate, it said that the highest frequency replication rate is around 65Khz.  Clearly not 192/2.    192khz seems like a waste of disk space, since you aren't even getting the full nyquist frequency for that sample rate.
That's interesting. For audio, there's no point going as close as possible to 96kHz BW at 192kHz SR (much less going up to 192 at 384).
Going up to 65k only (supposing it's the -3dB point) leaves 1/3 of the BW for the antialiasing filter's slope; that means a real gentle slope, with real gentle propagation time and real gentle transient response. IMO, that's what elevated SR is for, not for HF extension.
 
The relationship between unweighted noise level and bandwidth is when the bandwidth doubles, the noise increases by the square root of two (1.4x or +3dB).

When using "weighted" noise measurements that only consider a smaller audible bandpass, the increased unweighted bandpass will not make much numerical impact, except for very reduced bandpasses that drop below the easily audible bandpass.

THD+N is not a simple sum of THD added to noise, but the square root of the sum of the distortion products squared and the noise squared. In practice if the distortion is small wrt the noise, the noise is dominant and the impact of 3 dB more noise will be almost 3 dB more THD+N. If the THD is large wrt the noise the distortion is dominant and a 3 dB increase in noise will not register the full amount.

This THD+N  is a carry over of old analog bench measurements that did not have the capability to measure either alone.

Considering this in relation to the ADS1675 (page 3 in datasheet above) the dynamic range is 103,5 dB for a 2 MSPS Fs & 97 dBs SNR (THD is 103 dBs so THD+N would be about 97 dBs, right?).

Yes close, If N = -97 dB and THD = -103, the sqrt of sum of terms squared is around -96 dB. The distortion is 6 db lower than noise so sum is roughly 1.1dB higher.

OTOH if N=-103 and THD=-103 the sqrt of sum of terms squared is -100 dB. For equal value terms, increase is 3dB, the same as for doubling bandpass bandwidth.

JR
 
To put all this into perspective, only a literal handful (ie probably less than 5) members of this august forum are capable of designing and making a real AD/DA that approaches even good 16b performance, let alone the performance shown in the datasheets.

The most important factor isn't what Golden Pinnae components you use or even the AD/DA chips.  It's the PCB layout, construction & wiring.  Even the true gurus will need several prototype PCB iterations if done from scratch.

This isn't limited to DIYers.  Just look at the '24b' recorders on sale with less dynamic range than a good Dolby B cassette.  Some manufacturers have stopped quoting dynamic range & noise.  They just tell you its zillion bits and zillion MHz sampling.  Zillion everything gotta be better than 16b 44kHz.  8)

For someone who doesn't design AD/DA for a living, the best route to something which works & sounds good is to take a Development Kit and put the whole shebang in your own box.  Don't even try to copy the PCB.  You already have a big task getting construction and wiring good.
 
Back
Top