# Confusion regarding Nyquist Sampling Theorem

The first time Nyquist Theorem was mentioned in class. It stated that we should sample at twice the highest frequency content of the signal. Example: If we wanted to sample $\cos(2 \pi f_0 t)$, the sampling frequency should be at least $2f_0$.

However, in another course. The Nyquist Theorem was stated as such: the sampling frequency should be at least twice the bandwidth of the signal. Isn't the bandwidth of a single tone cosine 0? which makes the two definition contradictory.

• Both are correct in a way. The second reference that you give refers to a technique known as bandpass sampling or undersampling. By doing so, you can successfully sample the signal that you're looking for, but there is some information loss due to aliasing. The information that is lost is where in the band the signal occurred; it could be at baseband or in some higher Nyquist zone. When you employ this technique, you usually don't really care about this, though. – Jason R Sep 22 '16 at 13:26
• Note that strictly speaking, you need to sample at a frequency higher than twice the signal's highest frequency. Sampling $\cos(2\pi f_0t)$ at $2f_0$ doesn't really work. – MBaz Sep 22 '16 at 13:47
• This is the problem with editing a question after it has already received answers, it makes the answers seem like the were irrelevant. Now I had to delete my post as I was getting negative posts. The OP had specifically asked about the case where we have a tone of form $cos(2 \pi ft)$ and we knew it's bandwidth was 0. Now if we are given $x(t)=cos(2\pi ft)$, the only thing we need to resolve is $f$ and all we have to do to accomplish that is to get one sample at any time $t_a$. $f$ will then be $arccos(x(t_a))/2\pi t_a$ , no? – KillaKem Sep 22 '16 at 20:16
• @KillaKem: You're right; I was referring to a general sinusoid (which is what I understood from the OP, maybe wrongly), where you need at least $3$ samples to identify frequency, phase, and amplitude. By the way, I didn't downvote your answer. Instead of deleting it, you could also have edited your answer. – Matt L. Sep 22 '16 at 20:23
• For more details on sampling of band pass signals, please take a look at this answer. – Matt L. Sep 23 '16 at 7:59

It could be interesting to start from an history of this theorem in Interpolation and Sampling: E. T. Whittaker, K. Ogura and Their Followers, by Butzer et al.

Putting history aside, the main thing with the basic theorem is that one should refrain to say that the rate "should" or "has to" be above something. This is could a sufficient, but not a necessary condition. One version is, with an "if": if $X(f)=0$ for $|f| > B$, sampling at a rate above $2B$ theoretically allows you to recover the signal from the regularly sampled sequence:

There are milder versions, but this one shows that you ought to be especially careful if you choose, dangerously, $B$ such that $X(B)\ne 0$. For instance with your sine, whose spectrum is not $0$ at $B=f_0$. But is is only an if.

Some non bandlimited signals can still be sampled perfectly, under additional conditions. Some signals can be sampled at $B$ even if they spectrum does not vanish at $B$. And some signals can be sampled at a lower rate. Especially when the signal is bandlimited. @JasonR already pointed to Undersampling, and is dealt with in The theory of bandpass sampling, Vaughan et al., and already discussed in Minimum Sampling Rate of Bandpass signal.

I am not so confident with my understanding of this literature. However, in favorable circumstances with a real bandpass signal, twice the effective bandwidth can suffice, which can be much lower than twice the maximum frequency. And there are other theorems for signals whose spectrum is made of unions of segments of non null frequency.

While mentioning such results, I believe the real issue is different. In some texts, authors assimilate (wrongfully) what they call "the bandwidth" with the distance from the $0$ frequency to the maximum frequency. Especially in texts that do not go into fine details such as the ones stated above and in other answers.

So in your case, I assume that the difference between the two courses can be explained by laziness or mundane talking.

In practice though, you cannot rely solely on this theorem: it requires you to know in advance the spectrum of a continuous signal, which in many cases you have not idea about. Physical modeling and analog filtering can help you, but in real life, finite precision quantization, signal jitter, noise and especially finite length signals (which cannot have bounded spectra) forster more precaution and a choice of a sampling frequency sufficiently higher than twice the maximum frequency (or bandwidth if that applies).

A potential additional lecture: Sampling: What Nyquist Didn’t Say, and What to Do About It.

• @robertbristowjohnson Thank you for your edit. I wonder about your change of $\ge$ into $>$. I believe that conditions on $x$ (which I did not state) may change the point of view. From my memory, for the uniform convergence of the reconstruction, if $x$ is integrable, then you can use $|f|>B$ (but the cosine is not in that class). However, if you only require $x$ to be of exponential type (which apply to the sine then), then you need null spectrum for $|f|\ge B$, see (2.2) in link.springer.com/chapter/10.1007%2F978-3-0348-5432-0_33 – Laurent Duval Sep 23 '16 at 6:55

The question is clearly about Nyquist rate of sampling. So this answer is strictly about the definition of Nyquist sampling and avoids talking about approaches such as bandpass sampling, etc. that actually are irrelevant (and given that the OP is already confused with its definition will cause more confusion).

The Nyquist rate is twice the highest frequency content of the signal.

This is the general definition of the Nyquist rate. For $x(t)=\cos(2\pi f_0t)$, the Nyquist rate is $2f_0$. It applies to all signal models (low-pass, band-pass, tone, ...)

The sampling frequency should be at least twice the bandwidth of the signal.

This is the Nyquist rate for a bandlimited signal $x(t)$ with a low-pass model. That is, assuming $X(f)$ is the spectrum of the signal, $|X(f)|=0$ for $|f|>B$. Obviously, since the highest nonzero frequency component of the signal is at $f=B$, your former definition of the Nyquist rate is also valid.

But since $x(t)=\sin(2\pi f_0t)$ is not a low-pass signal (it is just a tone) the latter definition does not make sense (as you pointed out). Thus, a more accurate interpretation of "bandwidth" in the second definition is the low-pass bandwidth, which is the spectrum from zero frequency to the highest frequency in the signal. Although this is mostly zero in case of $\cos(2\pi f_0t)$ and is only nonzero at $f=f_0$, but only for $|f|>f_0$ we have $|X(f)|=0$ (in accordance with the second definition "bandwidth" would be $f_0$ in here).

I would post this as a comment but not enough rep, so:

You can think of the sampling requirement arising due to the highest frequency of a particular signal. When you use the term "bandwidth", you're looking at the width of a signal's spectrum, which is the twice the signal's bandwidth, i.e. the highest frequency minus the lowest frequency.

In the example of the sinusoid, the "width" of the spectrum is still the difference of the maximum frequency minus the lower frequency which is twice the signal's bandwidth, just like the previous example. It just so happens that the highest and lowest frequencies are the delta functions at $\delta(f + f_0)$ and $\delta(f - f_0)$ and the sinusoid is centered at 0 frequency. So the bandwidth is simply the highest frequency delta in the spectrum, located at $f_0$. So in this case, "bandwidth" and "highest frequency" are referring to the same thing. However using the term "bandwidth" is more general.

If you wanted to sample baseband and bandlimited spectrum from DC up to $\cos(2 \pi f_0 t)$ for a finite period of time, the sampling frequency should be above $2 f_0$ to not lose information about any frequency within that range. The shorter the sampling time, the higher the sampling frequency needs to be above $2 f_0$ for a given S/N and accuracy requirement.

If the bandwidth is known to be very narrow (e.g. much much less than $f_0$, down to zero), and in a known range, then a very low sample rate may be required, even less than $2 f_0$, down to a bit above twice the bandwidth of the signal (as long as the range of the bandwidth doesn't cross an integer multiple of the folding frequency or half the sample rate). This is known as undersampling.

And very few points (3 or 4 non-aliased) may be required to estimate all the parameters of a known pure sinewave equation in zero noise. See: http://claysturner.com/dsp/3pointfrequency.pdf and http://claysturner.com/dsp/4pointfrequency.pdf

If you have a pure sine wave (with frequency $$f_0$$) and you sample it slightly above the Nyquist rate ($$f_s > 2f_0$$) for a very long time you can recover the original signal with an ideal low pass filter. The low pass filter will become a $$\operatorname{sinc}$$ in time domain, the $$\operatorname{sinc}$$'s of infinity samples will sum up until you have the original signal back. It's impractical, but mathematically accurate. Regarding the Nyquist frequency ($$f_0$$), it is the signal maximum frequency and not the signal bandwidth.