DSPRelated.com
Forums

Why there are so many bits in sigma-delta audio codec?

Started by fl October 18, 2012
"Al Clark" <aclark@danvillesignal.com> wrote:
> "Vladimir Vassilevsky" <nospam@nowhere.com> wrote: >> "Al Clark" <aclark@danvillesignal.com> wrote: >> >>> Converters will never have 24 bit performance in an audio circuit, so >>> clearly there are more than a few marketing bits in most audio >>> converters. >> >> True 24 bit range is attainable with today's technology; it's just the >> matter of cost. >> To get 144dB range, you need to connect about 256 x 120dB ADCs in >> parallel. Big expensive PCB; however quite doable. > > Assuming that all the various noise sources are orthogonal. Good luck with > that.
Analog sources of noise are uncorelated. External sources of noise could be taken care off. Having true 24 bit performance is possible with careful design.
>> The clock jitter is important also. > Absolutely! > The right data at the wrong time is the wrong data.
I am surprised the clock jitter is not paid much attention in ADC datasheets and appnotes. Clock jitter results in (mainly) multiplicative error; so it affects SPDR rather then SNR. For 16 bit accuracy at 20 KHz sine wave, the sampling instant should be accurate to 0.1nsec. With typical oversampling ratio ~ 100 the allowed jitter would be ~1nsec. Then the sufficient clock SNR could be as low as 40-50dB. Am I right? Vladimir Vassilevsky DSP and Mixed Signal Consultant www.abvolt.com
Vladimir Vassilevsky <nospam@nowhere.com> wrote:

> "glen herrmannsfeldt" <gah@ugcs.caltech.edu> wrote:
>> Why convert to floating point? 32 bit fixed point should have enough >> dynamic range for anything you would want to do to it.
> Floating point makes perfect sense for audio; as relative noise level > matters rather the the absolute level. > As for 32 bit fixed, I routinely do practical projects where 32 bit range > is not enough for raw data representation.
Many C compilers for 32 bit systems (besides the fact that most now are actually 64 bits) allow for a 32x32 multiply with 64 bit product. Most of the time, for me, 32 bits is enough but I need to be able to multiply by a scaled fixed point value. The 32x32 --> 64 and a shift (possibly after dither) will do it.
> There is analog gear switching; of course; I have to switch gears > in digital processing, too.
I once wrote a program to compute the RMS value for 16 bit audio data (I might also have done 24 bit). That requires the sum of squares of the samples, which I accumulate as 64 bits. No floating point needed. -- glen
On 10/18/12 4:02 PM, Vladimir Vassilevsky wrote:
> "glen herrmannsfeldt"<gah@ugcs.caltech.edu> wrote: > >> Why convert to floating point? 32 bit fixed point should have enough >> dynamic range for anything you would want to do to it. > > Floating point makes perfect sense for audio;
Vlad. not always. from a POV of code that might live in an FPGA (and i never, ever, ever programmed one of them myself), there are problems with floating point and alignment of bits you might want to keep track of. regarding quantization and noise shaping. you can do noise shaping with floating point, but to get the error signal, you have to subtract the full-precision pre-quantized word from the quantized word. then you can do all this filtering with the error signal to shape quantization noise to frequencies where you don't care as much about it. at the very least, in some manners fixed-point processing of audio is *more* convenient than floating-point.
> as relative noise level > matters rather the the absolute level. > As for 32 bit fixed, I routinely do practical projects where 32 bit range > is not enough for raw data representation.
for audio it has 34 dB better S/N ratio for the same audio in 32-bit floating point when there is 6 dB of headroom . for 32-bit float to sound as good as 32-bit fixed, it would have to be with 40 dB of headroom. i think 40 dB of headroom is an awful lotta headroom. if you want, i can send you a .ppt from this: http://www.aes.org/events/125/tutorials/session.cfm?code=T19
> There is analog gear switching; of course; I have to switch gears in digital > processing, too. >
sorry, dunno exactly what this means. power-of-2 gain ranging? -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
"Vladimir Vassilevsky" <nospam@nowhere.com> wrote in
news:0YidnSblm_h87R3NnZ2dnUVZ5uydnZ2d@giganews.com: 

>> Assuming that all the various noise sources are orthogonal. Good luck >> with that. > > Analog sources of noise are uncorelated. External sources of noise could > be taken care off. Having true 24 bit performance is possible with > careful design.
Some of the noises are uncorrelated such as the johnson noise of the resistors. You are likely to have noise from correlated sources as well. For example noise from the processor or FPGA that is managing the data transfer. Noise currents on the ground return and power will also tend to be correlated. There will be a lot of clock related signals on the board. These will need to be buffered or jitter will occur just from reflections. I don't think that most of the clock noises will be a big problem because the noise will tend to alias to DC. Heat from all the converters will also add up. ADC's with 20-21 bits of S/N tend to consume power - maybe 500-600mW each. You would probably want stereo, so the number of converters would double. I suppose we would need two separate mono systems since crosstalk would be a form of noise. Nevertheless, It would be a great project. Vlad, I will buy you a bottle of single malt after you demonstrate the completed project. Regards Al Clark www.danvillesignal.com
> >>> The clock jitter is important also. >> Absolutely! >> The right data at the wrong time is the wrong data. > > I am surprised the clock jitter is not paid much attention in ADC > datasheets and appnotes. Clock jitter results in (mainly) multiplicative > error; so it affects SPDR rather then SNR. For 16 bit accuracy at 20 KHz > sine wave, the sampling instant should be accurate to 0.1nsec. With > typical oversampling ratio ~ 100 the allowed jitter would be ~1nsec. > Then the sufficient clock SNR could be as low as 40-50dB. Am I right?
Low frequency jitter of the MCLK is always an important consideration when designing high performance digital audio. You are probably right that the data sheets tend to ignore this, but good designers don't. Al
> > Vladimir Vassilevsky > DSP and Mixed Signal Consultant > www.abvolt.com > > > > > > >
On Friday, October 19, 2012 1:04:29 AM UTC+13, Randy Yates wrote:
> Robert Adams <robert.adams@analog.com> writes: > > > > > In a sigma delta ADC, > > > > and by the way, it's "delta sigma"! > > -- > > Randy Yates > > Digital Signal Labs > > http://www.digitalsignallabs.com
It can be either I believe.
On 10/18/12 5:22 PM, glen herrmannsfeldt wrote:

> > Many C compilers for 32 bit systems (besides the fact that most now > are actually 64 bits) allow for a 32x32 multiply with 64 bit product.
now that is without pre-casting? does this work: long multiplier, multiplicand; ... long long product = multiplier * multiplicand ; or does it have to be long long product = (long long)multiplier * multiplicand ; ? if it does that (the former), this is the first time i've known them to listen to us. that has always been a flaw in the C language. in addition, short times short should always be long until cast either explicitly or implicitly.
> Most of the time, for me, 32 bits is enough but I need to be able > to multiply by a scaled fixed point value. The 32x32 --> 64 and > a shift (possibly after dither) will do it. > >> There is analog gear switching; of course; I have to switch gears >> in digital processing, too. > > I once wrote a program to compute the RMS value for 16 bit audio data > (I might also have done 24 bit). That requires the sum of squares of the > samples, which I accumulate as 64 bits. No floating point needed.
i've personally only found floating point to be convenient with the FFT. and, if you had a good block-floating-point FFT, with one extra word per block (the common exponent), given the same word width, the block-floating-point FFT will do better, noisewise, than a regular floating-point FFT. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 10/18/12 5:47 PM, Al Clark wrote:

> > ... johnson noise >
hey, i resemble that remark! plenty of clark noise or vlad noise, too. :-) -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 18 Okt., 21:47, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Al Clark <acl...@danvillesignal.com> wrote: > > Very good audio converters have 20 to 21 bits of performance. I seem to > > remember that 24 bit performance in a 20kHz bandwidth is equivalent to the > > thermal (johnson) noise of a 3 ohm resistor at room temperature. > > Converters will never have 24 bit performance in an audio circuit, so > > clearly there are more than a few marketing bits in most audio converters. > > There is an additional advantage of more bits, in that it allows > more to keep the record level a little lower, reducing the probability > of hitting full scale on unexpected peaks, then adjusting the level > when converting to 16 bits. > > > Noise performance of actual converters is also a function of the buffer > > amplifier circuits, anti-imaging or anti-aliasing filters, power supply and > > pcb layout in addition to the converter itself. Sometimes the resistors in > > the supporting circuits contribute more noise than the converters. > > There have been 20 bit converters. The AC97 codec used for a long time in > > PCs used a 20 bit data word. Today, with the exception of low power or > > mixed signal devices, most audio converters have more than 16 bits of > > dynamic range. Many are better than 20 bits, especially DACs, so 24 bits is > > reasonable. These bits are usually expressed in twos complement and are > > often formatted into a 32 bit word (before any floating point conversion). > > Why convert to floating point? &#4294967295;32 bit fixed point should have enough > dynamic range for anything you would want to do to it. > > -- glen
I've read in many places that people claim that floating point for audio can cause audible modulation of the noise -Lasse
On 18 Okt., 23:47, Al Clark <acl...@danvillesignal.com> wrote:
> "Vladimir Vassilevsky" <nos...@nowhere.com> wrote innews:0YidnSblm_h87R3NnZ2dnUVZ5uydnZ2d@giganews.com: > > >> Assuming that all the various noise sources are orthogonal. Good luck > >> with that. > > > Analog sources of noise are uncorelated. External sources of noise could > > be taken care off. Having true 24 bit performance is possible with > > careful design. > > Some of the noises are uncorrelated such as the johnson noise of the > resistors. You are likely to have noise from correlated sources as well. > > For example noise from the processor or FPGA that is managing the data > transfer. Noise currents on the ground return and power will also tend to > be correlated. There will be a lot of clock related signals on the board. > These will need to be buffered or jitter will occur just from reflections. > I don't think that most of the clock noises will be a big problem because > the noise will tend to alias to DC. >
lots of bands and DJs use a laptop these days, can hear when they haven't spent a bit on a decent external soundcard, the "bzzz bzzz bzz" every time they move the cursor -Lasse
Vladimir Vassilevsky <nospam@nowhere.com> wrote:


(big snip regarding 24 bit, or so, ADCs, noise levels and sources)

> I am surprised the clock jitter is not paid much attention in > ADC datasheets and appnotes. Clock jitter results in (mainly) > multiplicative error; so it affects SPDR rather then SNR. > For 16 bit accuracy at 20 KHz sine wave, the sampling instant > should be accurate to 0.1nsec. With typical oversampling > ratio ~ 100 the allowed jitter would be ~1nsec. Then the > sufficient clock SNR could be as low as 40-50dB. Am I right?
Maybe that is important for non-audio applications. For audio, there really isn't that much up there, and so it doesn't cause as much of a problem as it otherwise would. The highest piano key is about 4kHz, and isn't played all that often. Most of us can't hear anywhere near 20kHz, and babies don't care so much about the finer points of music. (Not that they don't like it, but they might not notice a small error at 20kHz.) According to http://en.wikipedia.org/wiki/Piano_key_frequencies there are some adjustments done to the higher and lower notes on the piano to compensate for non-harmonic effects. The harmonics are important to the sound, but small errors in them, such as clock jitter, are likely not. Also, the real reason for high SNR for audio is to allow for large dynamic range. You want to hear the quiet notes over the noise floor. Noise due to jitter decreases with the amplitude of the signal being sampled. You won't notice it for loud notes, and it is too low for quiet notes. Sometimes we are lucky. -- glen