# Nyquist Frequency Confusion

1- If I have a sine wave with period of $$T$$, I need to sample at least every $$T/2$$ to be able to reconstruct the sine wave. Let's look at this:

This way I'd get a series of $$0$$s and all information seems to be lost. Where am I wrong? $$x(t)=\sin(2\pi ft)$$

Let $$f_s=2f$$; then

$$x[n]=\sin(2n\pi f/2f) = \sin(n\pi)=0.$$

2- Assume I have sine wave of frequency say $$100\text{ Hz}$$ , and I sample it at $$101\text{ Hz}$$, this would cause aliasing as we know. My question is, what happens in the frequency domain?

• You've obviously got the drawing skills (as demonstrated in 1-) to answer 2- yourself! Hint: draw the first period of your sine, mark the two sample instants that happen to fall into that period. Then, draw another period and mark where the third sample instant falls. Notice a pattern? Nov 25 '18 at 10:27
• @MarcusMüller For question 2, I can see pattern in time-domain. My questions is what happens in Frequency domain. Nov 25 '18 at 18:48
• mathematically write down the pattern in time domain. Frequency domain will jump right at you, I promise. Nov 25 '18 at 19:02

If you look carefully at the statement of the sampling theorem, you'll notice that it states that the sampling frequency $$f_s$$ has to be larger than twice $$f_m$$, the maximum frequency in the signal: $$f_s > 2f_m.$$ Sampling at exactly $$2f_m$$ is not guaranteed to work, just as you demonstrated.

Regarding aliasing: See the section on folding in Wikipedia. The $$101\text{ Hz}$$ signal will alias to a $$1\text{ Hz}$$ signal.

For the number of samples given, your initial statement is false. Sampling at exactly T/2 is a mathematical limit.

For any finite number of samples, you need to sample a band-limited pure sinusoid of period T more frequently than T/2 to avoid aliasing or other pathologies, or at greater than 2X the highest spectrum frequency (for a baseband range). (and in real-life, to take into account the transition bandwidth and stop-band of any low-pass anti-aliasing filtering). The shorter the sampling interval, the higher the sample rate needs to be above 2*Fmax (for a given baseband band-limited range) to reduce numerical, quantization, and other signal-to-noise induced errors to below some given threshold.

As you approach an infinite number of samples (beyond the life of the universe), you approach being able to reconstruct a sinewave with sampling at T/2.

• I disagree (or I misunderstand). Even sampling an infinite number of times, all samples will be zero, so it's impossible to tell if you have a sine wave or just the zero signal.
– MBaz
Nov 25 '18 at 18:27
• I don't see how this answers the questions. Nov 25 '18 at 18:46
• @MBaz : epsilon delta limit Nov 25 '18 at 19:25

The nyquist criteria says that sampling rate should be at least 2 times the highest frequency present in the baseband signal. If you are lucky the samples of the given sine wave signal could be aligned at quarter of T i.e. T/4 and 3T/4 (with T/2 second interval between samples) and you get accurate representatIon of the given continuous time signal. For any other sampling instant alignment you lose amplitude of the signal. So you need more than Nyquist rate samples per second to ensure a good discrete time representation of continuous time signal. Sampling rate can be higher than twice the highest Hz cycles per second.

Don't confuse cycles per second to samples per second, even though they both tend to be called as Hertz. As an example, telephone voice signals are low-pass filtered to remove frequencies higher than 3400 Hz and then sampled at a rate of 8000 samples per second.(representing 8 bits per sample gives a bit rate of 64000 bits per second). Note that low-pass filtering, before sampling, ensures that no aliasing takes place.