HydrogenAudio

Hydrogenaudio Forum => Scientific Discussion => Topic started by: SAI Peregrinus on 2013-03-02 02:25:03

Title: DAC interpolation
Post by: SAI Peregrinus on 2013-03-02 02:25:03
The Nyquist-Shannon theorem (the sampling theorem) states that if a function x(t) contains no frequencies greater than B hertz, it is completely characterized by measuring its amplitudes at a series of points spaced 1/(2B) seconds apart. It further states that to reconstruct the original signal one must use the Whittaker-Shannon interpolation theorem, computing the sum of the infinite series of normalized sinc functions for each sample. (Well,
Code: [Select]
$x(t)=\sum_{-\infty}^{\infty}x[n]\cdot{\rm sinc}(\frac{t-nT}{T})$
where n is the sample number, t is the sample time, T is 1/(sampling rate), and sinc(x) is the normalized sinc function.)

I've never (in my somewhat limited experience) seen an audio DAC that does that, yet they seem to have pretty reasonable output. How accurate are the standard approximations, really? What is the interpolation error? How does one characterize it?
Title: DAC interpolation
Post by: Alexey Lukin on 2013-03-02 03:45:59
The formula of Whittaker-Shannon contains infinite sums. Practical DACs typically evaluate this sum over 20–100 samples which is a good approximation: it allows for nearly perfect reconstruction of signals up to 0.45•Fs.
Title: DAC interpolation
Post by: Nessuno on 2013-03-02 10:11:09
Consider that in strict theory the Shannon theorem conditions never apply in reality simply because mathematically a band limited signal cannot be also time limited, thus "having an infinite number of samples, etc etc...".
In real world, with a sufficiently large number of samples, as Alexey Lukin said, the truncation error rounds toward zero and other components (quantization, sampling time uncertainty etc...) prevail.
Title: DAC interpolation
Post by: lvqcl on 2013-03-02 10:27:38
(http://www.n-audio.com/articles/upsampling-4.gif)

E.g.: actual characteristics of PCM1794 can be found in http://www.ti.com/lit/ds/symlink/pcm1794.pdf (http://www.ti.com/lit/ds/symlink/pcm1794.pdf) (page 8)
Title: DAC interpolation
Post by: Jplus on 2013-03-03 11:52:31
Noteworthy is that finite "sinc interpolation" is usually windowed to reduce ripple and improve stopband attenuation. A common window is the Kaiser window (http://en.wikipedia.org/wiki/Kaiser_window).
Title: DAC interpolation
Post by: Woodinville on 2013-03-03 20:26:55
What the OP fails to note is that if we allow a transition band between the highest frequency captured and fs/2, then we don't have to use a sinc function any longer, and we can also use a finite length filter.

Perhaps the person who wrote about the Shannon Theorem could read the proof of the Nyquest conjecture and by doing so, see how the statement above is incontrovertably proven.

Likewise the people who argue that all time-limited signals have infinite bandwidth, again, strictly speaking, this is true, however, we can trivially estimate the actual error and know its magnitude exactly, in terms of filtering, and easily move it well below the noise floor of any possible system.

Again, people need to understand the whole of the theorem and the paper, not just part of it.

Likewise people who argue from a statistical point of view, but who don't calculate error bounds.
Title: DAC interpolation
Post by: SAI Peregrinus on 2013-03-04 03:10:50
Thanks, I think I understand a bit better now. Especially how the use of a low-pass filter approximates the use of the sinc function in the sampling theorem.