Hacker News new | ask | show | jobs
by adamcanady 4188 days ago
Wait a second.. can you explain the 10x the max frequency part to accurately reconstruct the shape of the signal?

It's my understanding that you just need 2x (two points in a sine wave) to construct a unique wave. If you're getting a sawtooth, it means that you're sampling a wave that is composed of very high frequencies, and you're accurately sampling it, so a DAC can reconstruct it uniquely.

1 comments

There's some discussion of it at the beginning of this article: http://www.ni.com/white-paper/10669/en/
What that whitepaper is saying is that "if you only sample 2xMaxFreq and then connect the dots with straight lines it doesn't really look like a sine wave so buy 5x as much instrument from us". That's a total cheat as that sawtooth graph they show is only possible if you allow higher frequencies. If the signal is bandwidth limited at the frequency of the sinewave the points you sample at 2xFreq only have one possible solution for the graph (the sinewave again). There are some great videos about this recently by xiph's monty:

https://www.xiph.org/video/

So if you sample 2xMaxFreq you have samples that describe the full signal and can reconstruct it exactly. So if our eyes really are 100Hz we can't see anything above 50Hz. That seems to align well with the ~50/60Hz threshold for flicker free viewing. Apparently higher framerates are only useful for when we have fast movement across the field of view which would be the case for FPS:

https://en.wikipedia.org/wiki/Flicker_fusion_threshold#Visua...

I just finished going through a Fourier Transform course. The technical answer is that you don't interpolate the samples with lines, but with the sinc function. The sinc function is sinusoidal and so it more naturally approximates waves. In this case 2xMaxFreq is enough to reproduce it exactly. Using linear interpolation in the whitepaper is a blatant lie.

>So if our eyes really are 100Hz we can't see anything above 50Hz.

I'm not sure this follows as we're not perceiving waveforms when light hits our eyes, but we're perceiving intensity of energy hitting our receptors.

This paper has a lot of false information in it. The sawtooth wave example is just not correct. There is exactly one band-limited (i.e. no frequencies greater than half the sampling frequency) waveform that corresponds to a set of samples. In the case of a sine wave sampled at twice the frequency, that solution is the exact sine wave that was produced. The video I linked to above has a demonstration of this signal reconstruction, using an analog oscilliscope to show that sine waves are reconstructed perfectly when sampled at only 2x the fundamental frequency.
Ah ok, so here I think is the slight confusion.

If you make the constraint/assumption that during reconstruction that you rebuilding a time domain signal composed of series of sinusoidals, then you're in the clear at just 2x sampling. For example, in Figure 2 in the article, it states that 2x sampling only provides frequency information, and not amplitude and shape. This is true if we assume that we're trying to directly reconstruct -any- periodic signal. Then if we sample at only 2x of the signals fundemental frequency, we are in fact stuck.

This can cause certainly cause confusion. So I think the usual way (I just dinker with DSP for funsies and a little bit at work, so I might have got it mangled) to deal with this confusion is to remember that sawtooth and square (and whatever) signals are chocked full of high harmonics that also must be sampled at or beyond the nyquist limit for you to be able to construct it.