Delta-current linear-interpolation DAC

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
ojg said:
The worst delta may happen at all signal levels! You may have two consecutive samples of 1 and 2 which gives a delta of 1, or you may have two consecutive samples of 32766 and 32767 which also gives a delta of 1. However alvaius is right that low-level sinewaves will have greater number of small deltas then loud sinewaves per period.
Thanks for your comments, ojg.
I'm abit confused though. Do I understand you right that you and alvaius consider small delta as being worse than large delta? Indeed low-level sines will have smaller delta, as also lower freqeuncy sines. But I see that its not the size of step or delta that matters, but its precision. With normal LPCM dac, distortion depends on LSB precision as much as with dPCM - LSB errors translate into error voltage.

It is not right to think that because dPCM uses on average smaller deltas it would increase significance of these errors. Its because dPCM deals with deltas only, absolute signal levels accumulated on the integration Cap, while LPCM deals with absolute levels comparable to full swing of the signal. Full swing of the signal with dPCM is recreated on the IV capacitor, and it is of same magnitude as with LPCM. Thus delta errors with dPCM are equivalent to LSB errors in LPCM, no more, no less. IIUC.

There is one bit that might make dPCM even benefit from small deltas. Its distortion depends on monotonicity of the dac, and by utilizing smaller dynamic range of the DAC the amplitude of monotonicity errors is reduced too. That of course only if single DAC is operated with dPCM input.

Another issue:

High deltas will be most likely for high frequencies so the DAC will have best performance at frequencies close to Nyquist. Since low deltas will be most likely at low frequency signals, SNR will decrease with falling frequency. By how much I don't know, I'll have to think about this one a bit.
I do not agree that best performance is near Nyquist, but much lower. First because at Nyquist delta dac approaches triangular wave having larger error than square wave, causing frequency rolloff. And second with large delta maximum slew rate is needed that elevates timing jitter importance considerably. Voltage error equals signal slew rate multiplied by jitter timing error.
Fortunately general spectral distribution of music is rolling off towards high frequencies, thus maximal deltas are rarely required.

Re SNR I don't know, I don't quite understand the mechanism of reduced SNR at lower frequencies. Although simulations suggest that, I'm suspecting its either simulation imprecision or some other reasons. Perhaps IV capacitor discharge induced errors. If so then it must be signal dependant noise addition, masked by the signal. I wonder how bad this might be to the sound.

Also the cut-off frequency of the servo would need to be higher the more non-linear the DAC is, right? So maybe you will find in practice that it has to be unreasonably high and will roll off the bass-response?
Interesting concern. And there is also quite interesting peculiarity with delta dac. In general, we don't care about DC offset, it makes little effect on linearity of the signal. We are concerned only with staying within operational limits of components. Thats maximum acceptable output DC for opamp and dac, considering not only clipping issues but also increasing distortion.

We can manage rate of DC error cumulation by increasing integration capacitor. It has no effect on audio signal composition, only reduces its amplitude. Thus we can regulate required cut-off frequency of the servo lower at a cost of reducing audio output. Right?

Though I can imagine how music content itself might induce DC offset by either asymmetric wrt 0 signal or clipping. Recovery timing of such stuff might become the main show stopper, introducing infrasonic noise.

wimms: I don't know if LTSpice supports it, but it would be interesting if you add some random noise to the DAC currents and see how it behaves then for various signals.
No prob. It doesn't seem to have other effect but increase the overall noise floor.
 

Attachments

  • dac-dual-interpol44sw.asc.txt
    18.7 KB · Views: 66
Ex-Moderator
Joined 2003
:cop:

Gentlemen, this is an interesting and lively discussion with novel ideas. I'm looking forward to seeing whether they can be proved to be useful, or not. Either way, please remember that it is the ideas that should be shot at, not the personalities behind them.

Thank you, the moderation team.

:cop:
 
I've been thinking of simple way to play with such dac idea.
Easiest seems to use existing current-output DAC and feed it with computer generated differential PCM (dPCM). Then output of the DAC chip connected to integrator would produce output signal equivalent to linear interpolation.

I asked DSP plugin writers of foobar2000 audio player to write a small plugin that generates dPCM on the fly, and one of the devs was kind enough to quickly write it. He created plugin that makes 2 DSP effects, one to make dPCM and other to integrate back to LPCM.
The player is http://www.foobar2000.com/ and the plugin is found at http://www.stud.uni-karlsruhe.de/~uybc/foo_dsp_delta.dll

With this plugin one can output normal wav file as dPCM into DAC under testing, including high quality musical content for auditioning. To avoid further postprocessing, the DSP effect should be last in chain, and sound card configured to not change anything with the signal after that (like master volume 100%, bitperfect spdif).

There is a drawback with this method. With 16 bits maximum delta representable is -32K to +32K which means that full peak to peak swings cannot be represented - it would require 65K delta. This is an issue if you have -6db or higher magnitude harmonics near Nyquist.
Dual DAC approach is free from this issue - one reason why 2 DACs may be ultimately necessary. You can avoid the issue by making sure high frequency content is below -6db before DSP plugin, thus still have meaningful results. Most probably you won't face the issue if you don't feed the DAC with 0db sinewave near nyquist.

A word of warning:
The plugin lets you apply either conversion (LPCM->dPCM and back) on any content, and dPCM played on ordinary DAC even sounds pretty much recognizable, though quiet. But if you apply dPCM->LPCM onto LPCM content, then DSP will push digital signal into very severe clipping with DC component that can damage your speakers or amps. So be very careful with volume while playing with the plugin.

To make the integration and dPCM->analog conversion with normal DAC, you'd need IV convertable to pure integrator, like for eg. Elso Kwak's schematic he posted here: http://www.diyaudio.com/forums/attachment.php?s=&postid=499341&stamp=1098788239
The feedback IV resistor R3 needs to be removed or increased alot, and integration capacitor increased to limit output swing. I'm afraid DC servo is unavoidable, unless your opamp and DAC has zero DC offset. Some DC drift is expected anyway, thus make sure to filter out DC before output.

If DC drift is slow enough, then it might be possible to test it out even without DC servo, though the sessions might be uselessly short before DC offset reaches unacceptable levels. Anyway, its the simplest possible way to proceed with practical evaluation I could come up with.

Hopefully someone who has a suitable DAC for such conversion cares to play with this, it would be interesting to hear comments on how it works, measures or sounds.
 

Attachments

  • dpcm-dac.gif
    dpcm-dac.gif
    7.9 KB · Views: 326
wimms said:
I'm abit confused though. Do I understand you right that you and alvaius consider small delta as being worse than large delta? ... With normal LPCM dac, distortion depends on LSB precision as much as with dPCM - LSB errors translate into error voltage.

Hmmm, yes. The more I think about it the more I agree with you. My initial thought was that nonlinearity of say 1/2LSB would constitute a very large error for a 1LSB delta, but the total result may turn out that this is no worse than regular LPCM. I don't have the time to do the math on this maybe alvaius already did.

I do not agree that best performance is near Nyquist, but much lower.

Agree, THD+N will be best somewhere in the midrange, but SNR will be best at higher frequencies, right?

No prob. It doesn't seem to have other effect but increase the overall noise floor.

Interesting, and that is the most complex LTSpice schematic I have ever seen :bigeyes:

Something else, and this is more of a general question, how linear are capacitors? Does the capacitance change with voltage and current? Which types are best, polyprop or C0G? A quick calculation tells me that this DAC needs a capacitor in the 10nF range. ( C=Ip*Ts/Vp = 2.5mA*22uS/5V )
 
I don't disagree with EC8010, but I'd note that S&H has some additional requirements to caps that dictate the selection.

It might be that leakage isn't so bad with integrator. It effectively creates RC with very big time constant. Some integrator circuits suggest that integrator is approaching perfect if RC time constant is much larger (10x, 100x) than integration time (Ts), and it is infact benefitial to include R in the feedback loop to limit opamp gain at DC, dealing with opa offset. Leakage R seems to just elevate noise floor somewhat.

Wrt linearity, check this
http://members.aol.com/sbench102/caps.html

And these are also interesting
http://www.analog.com/library/analogDialogue/Anniversary/21.html
http://www.national.com/rap/Application/0,1570,28,00.html
http://my.execpc.com/~endlr/index.html
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.