1
$\begingroup$

I was told in my electronics course that "to reproduce a wave, we need to sample it at least twice every period."

If I take this to be literally true, then a sine wave with only 2-3 samples per period looks very ugly even though it obeys this rule. It looks more like a triangle wave.

I'm currently working with an FPGA and I need to synthesize and then sample the same high frequency sine wave (rf domain).

Example:

  • If I use a 50Mhz clock to synthesize a 12Mhz sine wave I get something pretty ugly even though it obeys "Nyquist's theorem".
  • After running simulations, I've found my clock needs to be ~20X faster to reproduce a "nice" sine wave of frequency $f$.
  • This leads me to believe I can't simply use an ADC which is 50Mhz to sample a 12Mhz sine wave because it will be as ugly as the sine wave I would create using such a sampling rate (it's not even five samples per period).

This would mean I either need expensive hardware or must build something myself.

Why does Nyquist's theorem seem woefully inadequate? It seems that a sample rate of 2-3 times higher is merely sufficient to tell me what the period of the signal is, not reproduce the signal with any resemblance of the original signal. Am I misapplying or misunderstanding Nyquist's theorem?

$\endgroup$
2
  • $\begingroup$ @RanGreidi you should undelete your answer and delete the comment, in my opinion. $\endgroup$ Aug 15, 2021 at 12:19
  • $\begingroup$ done thanks haha $\endgroup$
    – Ran Greidi
    Aug 15, 2021 at 15:18

5 Answers 5

4
$\begingroup$

Perfect recovery is one thing, niceness is another. Sampling above x2 Nyquist is sufficient for perfect recovery, after which we can FFT-upsample to make it look nice - which is more efficient than directly sampling at a higher rate (though it has its advantages).

$\endgroup$
2
$\begingroup$

You don't get a nice signal because you don't complete the D/A recovery process. After going through the DAC, you need to pass the signal from a lowpass filter which eliminates the extra frequency components.

Ideally the lowpass filter should be flat in a bandwidth equal to sampling frequency and zero outside. Since there is no such filter we have to increase the sampling frequency a little bit to avoid aliasing using non-ideal filters. This increase is not 20x and maybe(depending on the filter) 2.5x would be enough.

$\endgroup$
1
  • 1
    $\begingroup$ In real-world signal processing it's a bit stronger than "since there's no such filter". As a filter's response gets sharper its delay gets longer and its response gets longer. If it's an IIR filter (or lumped-constant analog filter) it needs more stages, if it's an FIR filter it needs more taps. Even putting aside the impact on hardware costs, it gets harder and harder to realize the filters in a practical arrangement. So it's not like you hit a brick wall at Nyquist -- it's more like things just get ever harder the closer you get to Nyquist. $\endgroup$
    – TimWescott
    Aug 15, 2021 at 17:20
1
$\begingroup$

If I take this to be literally true, then a sine wave with only 2-3 samples per period looks very ugly even though it obeys this rule. It looks more like a triangle wave.

There must be a confusion, sampling at Nyquist rate gives you perfect reconstruction using Shannon's interpolation formula (sinc interpolation) without alliasing, the idea of it isnt just using those samples as the reconstructed signal, but to use the formula. Samling at nyquist rate means you wont suffer for loss of information when using it.

$\endgroup$
0
$\begingroup$

While the original Shannon/Nyquist sampling theorem did not deal with a sinusoid having frequency of exactly half of the sample rate (which would correspond to a pair of Dirac delta impulses directly on the folding frequency or "Nyquist"), the fact is that to get perfect reconstruction, you must sample at a rate strictly greater than twice the highest frequency component in the signal.

I'm on my smartphone at the moment but in some old post I go through, methodically, how one arrives at this result. It used to be part of the Wikipedia article on sampling, but now it isn't.

$\endgroup$
0
$\begingroup$

imagine if you had the exact number of sample points for the number of Hz, you hardly can recreate the waveforms of each cycle.

double the sample points for each cycle theoretically means getting the peak and trough of each cycle or 2 data points anywhere on a cycle.

a computer is only efficient at computing and not pattern recognition, thus nyquist theorem only gives adequate recovery not ideal reconstruction of signal

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.