DSPRelated.com
Forums

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

Started by fl October 18, 2012
rickman <gnuarm@gmail.com> wrote:

(snip, someone wrote)
>>> Analog volume controls are becoming a thing of the past.
(then I wrote)
>> I wondered about that. I used to use a MiniDisk recorder with a digital >> record level control. I now use the Tascam DR-1, which does do 24 bit, >> and has an analog record level. (I believe the playback level control >> is digital.)
>> Are digital level controls, that is amplifiers with digital gain >> selection, noisier than analog controls? Seems to me that they >> might be.
> I'm not sure what value a digital control is on record. To optimize > noise levels you want the analog signal to be as large as possible > without clipping. That should match full scale on the digital side. So > why would it be a good thing to reduce the signal level on the digital > side during record? The level on the analog side is what you care about.
I agree, and I am not so sure of the meaning of the statement above. But many have digital controls on the analog side. That is, an amplifier with a digital gain selection input. While there might have been some TV remote controls that ran a motor on an analog potentiometer, I don't believe that has been usual for some years now.
> After that the only adjustment should be on playback which might just as > well be on the analog side, but I guess it would be easier in digital > and shouldn't impact anything unless you have an overly large gain in > the amp.
You could do that, and it might be that they do, but could also do something similar to above, with a digital gain control on an analog amplifier. For one, put the audio into the reference input of an ADC and see what comes out the other side.
> Is there something going on in the recording industry so that > this makes no sense?
-- glen
"Al Clark" <aclark@danvillesignal.com> wrote in message 
news:XnsA0F0AADDB6E64aclarkdanvillesignal@69.16.185.247...
> "Vladimir Vassilevsky" <nospam@nowhere.com> wrote in > news:0YidnSblm_h87R3NnZ2dnUVZ5uydnZ2d@giganews.com:
[...talks about 144dB audio ADC...]
> Nevertheless, It would be a great project. Vlad, I will buy you a bottle > of > single malt after you demonstrate the completed project.
Among other things, I design boards for geoseismic exploration. One of the boards has 24 channels at 48kHz max. sample rate; SNR is 105dB per channel. Other board has 3 channels, with 136dB of SNR at 250 Hz sampling. I don't see major technical reasons why true 24 bit audio ADC device could not be built; other then size, price, power consumtion, etc. constraints. Would be a fun thing to build it for some univercity or government. Vladimir Vassilevsky DSP and Mixed Signal Consultant www.abvolt.com
robert bristow-johnson <rbj@audioimagination.com> wrote:
> 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 ;
No, it is with casting but the compiler is smart enough to figure out what you meant, not what you said. Theoretically with the cast (assuming 64 bit long long) it should do a 64 x 64 --> 64 product, but since the compiler knows what is in the high half it can do it right. (For IA32 that would be four multiplies and a bunch of adds to add up the partial products, usually done by subroutine call.) At least gcc for IA32 could do this right some years ago.
> 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 high-level languages define the operations to generate a result of the same size as the operands. In the case of floating point, most give enough uncertainty to the results that you could get away with generating a larger product than the operand size. (IBM S/360 single precision multipy generates a double product. For x87, everything is temporary real, though in some cases you can reduce the precision. Only some cases.)
>> 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.
I haven't done much audio FFT, and if doing it in software on a traditional (non-DSP) I might do that. But otherwise, 32 bit fixed point has enough bits for a 65536 element transform before you run out of bits. (If you can do the appropriate multiply.) I wondered some time ago about an FFT for a whole CD. -- glen
robert bristow-johnson <rbj@audioimagination.com> wrote:
> On 10/18/12 4:02 PM, Vladimir Vassilevsky wrote:
(snip, someone 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.
Floating point is hard to do (efficiently) in an FPGA. Well, multiply isn't so bad now that they have hardware multiplier blocks, but the pre and post normalization for addition are huge! Well, a little better now with 6 input LUTs so you can do the barrel shifter two bits at a time instead of one, but they are still huge. (and slow). For multiply of normalized operands there might be a one bit post normalization shift. For add, you have to be able to shift either operand up to the full width, and then shift the sum to renormalize. (Well, maybe one bit less than full width.) -- glen
Al Clark <aclark@danvillesignal.com> wrote:
> "Vladimir Vassilevsky" <nospam@nowhere.com> wrote in > news:0YidnSblm_h87R3NnZ2dnUVZ5uydnZ2d@giganews.com:
(snip on using 256 ADCs to reduce noise)
>>> 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.
One noise source that it should help reduce is the non-linearity of the ADCs themselves. For stereo, it is usual (or at least not unusual) to multiplex a single ADC or DAC to process both channels. Given the sample rate of modern ADCs, you could just run a single ADC 256 times. But the ADC non-linearities won't cancel. Now, say you (carefully!) dither the ADC input, and then either subtract it later or arrange it so that the sum averages out. Maybe you can get the effect of 256 ADCs using only one. Are 24 bit DACs easier to find than 24 bit ADCs?
> 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.
He didn't say it would be easy. Yes, you need all those terminating resistors, and carefully measure the length of PC traces so that they are the same length (or maybe the appropriately different length).
> 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.
-- glen
>> >>>> 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 10/18/2012 6:06 PM, robert bristow-johnson wrote:
> 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.
Yeah, but which is more uncorrelated? Rick
Vladimir Vassilevsky wrote:
> "Les Cargill" <lcargill99@comcast.com> wrote in message > news:k5osd0$abh$1@dont-email.me... > >> It's nice to have the option of 24 bits, but there are vanishingly >> few cases where you actually get even 96 full dB (16 bits ) of clean >> input into an ADC. > > Good quality audio ADC have dynamic range over 120dB. Instrumental ADCs > reach over 140dB. > Despite of those high parameters, ADCs are always a bottleneck and you have > to switch gears and do all kinds of analog signal conditioning before the > ADC. >
It's a heck of a system design to get true 140dB in SNR from anything, much less something feeding an ADC.
>> SFAIK, fab process and the general ... economics of electronics >> dictate a standardization to 24 bit ADCs but being in a place >> to exploit them fully is rare. 2^24 is one big ole >> number... 16,777,216, aka 144 dB. > > If you want to measure something to a resolution of 1%, then 24 bits is mere > 100dB of dynamic range at best. >
1% of what? Voltage?
> Vladimir Vassilevsky > DSP and Mixed Signal Consultant > www.abvolt.com > > >
-- Les Cargill
On 10/18/2012 6:35 PM, glen herrmannsfeldt wrote:
> rickman<gnuarm@gmail.com> wrote: > > (snip, someone wrote) >>>> Analog volume controls are becoming a thing of the past. > > (then I wrote) >>> I wondered about that. I used to use a MiniDisk recorder with a digital >>> record level control. I now use the Tascam DR-1, which does do 24 bit, >>> and has an analog record level. (I believe the playback level control >>> is digital.) > >>> Are digital level controls, that is amplifiers with digital gain >>> selection, noisier than analog controls? Seems to me that they >>> might be. > >> I'm not sure what value a digital control is on record. To optimize >> noise levels you want the analog signal to be as large as possible >> without clipping. That should match full scale on the digital side. So >> why would it be a good thing to reduce the signal level on the digital >> side during record? The level on the analog side is what you care about. > > I agree, and I am not so sure of the meaning of the statement above. > > But many have digital controls on the analog side. That is, an amplifier > with a digital gain selection input. > > While there might have been some TV remote controls that ran a motor > on an analog potentiometer, I don't believe that has been usual for > some years now.
A friend's hi-fi had a big volume knob which could be adjusted by a remote. It also had a habit of going from "sleep" mode to "no sleep at all" mode on a power glitch. I guess it never really turned off so the remote could turn it back on and if you had the volume up when a power glitch happened, well, let's just say it was a long, loud trip in the middle of the night to get it turned off again.
>> After that the only adjustment should be on playback which might just as >> well be on the analog side, but I guess it would be easier in digital >> and shouldn't impact anything unless you have an overly large gain in >> the amp. > > You could do that, and it might be that they do, but could also > do something similar to above, with a digital gain control on an > analog amplifier. For one, put the audio into the reference input > of an ADC and see what comes out the other side.
Not sure I understand about the reference input. Are you suggesting that you can use audio into the reference to control the gain? Rick
langwadt@fonz.dk wrote:
> 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? 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 >
I'd be skeptical of that claim. Every DAW in the world uses float32 for internal processing. Indeed, the last dominant 16 bit only DAW had trouble with truncation, which *is* highly audible. -- Les Cargill
Vladimir Vassilevsky <nospam@nowhere.com> wrote:

(snip)

> Among other things, I design boards for geoseismic exploration. One of the > boards has 24 channels at 48kHz max. sample rate; SNR is 105dB per channel. > Other board has 3 channels, with 136dB of SNR at 250 Hz sampling. > I don't see major technical reasons why true 24 bit audio ADC device could > not be built; other then size, price, power consumtion, etc. constraints. > Would be a fun thing to build it for some univercity or government.
Then all we need is an audio source good enough to use it on. I remember once touring (inside and out) a concert hall, with an explanation of the things they did to keep the air conditioning noise down. Also, some tricks to keep outside vbrations out, such as inner and outer walls with rubber isolation dampers. I am not sure technology is good enough to float the whole building on a vibration isolation system, though. That is, air filled rubber bags and a system to keep them at just the right level. Or maybe an active noise reduction system. Maybe, though, for a small recording studio. (Also eliminates audience noise, which is otherwise hard to reduce.) -- glen