I am confused about what rate I should sample at. I've heard 2 different ways:
1) Sample at twice the highest frequency
2) Sample at twice the bandwidth

If I have a signal composed of just cosine, such as:
$$x(t) = \cos(4 \pi t) + \cos(2 \pi t) + \cos(1 \pi t)$$
What is the correct minimum sampling rate?

  • $\begingroup$ Your $x(t)$ does not depend on $t$? $\endgroup$
    – AlexTP
    Commented Jul 8, 2019 at 20:57
  • $\begingroup$ @AlexTP Good call, I updated the problem. $\endgroup$
    – user44051
    Commented Jul 8, 2019 at 21:01

3 Answers 3


Well, according to Nyquist-Shannon theorem you should sample at a rate which is at least twice the highest frequency you want to capture. This is also referred to as the sampling theorem because it "forms the basis" for sampling.

Now regarding your specific question, I have to say that $\cos \left( 4 \pi \right)$ (along with the rest of the components) is just a number which is equivalent to a DC signal. In case you imply $\cos \left(2 \pi \cdot 4 \frac{n}{f_{s}} \right)$ (the same for the rest of the components), where $n$ is the sample index (constantly increasing) and $f_{s}$ is the sampling frequency, you should sample at twice the highest frequency (which in this case is $4$), which is $8$.

As you might be able to say, this would produce a result (just for the first component, but similar for the rest) $\cos \left( n \pi \right)$, which has a period of $2$..., which in turn means that you would get precisely two samples per period. Now in the case you happen to sample at the zero cross, all samples would end up being zero (just for this highest frequency).

I strongly suggest you have a look at some academic literature regarding sampling. I would suggest Proakis' & Manolakis' Digital Signal Processing - Principles, Algorithms and Applications and Orfanidis' Introduction to Signal Processing

  • $\begingroup$ "At least" or "greater than"? $\endgroup$ Commented Jul 8, 2019 at 21:40
  • 1
    $\begingroup$ @CedronDawg greater than or equal to. And I think this issue is unnecessarily overstated, as it's only relevant for special case of sinusoidal signals and in practice the difference between at least and greater than is an unobservable quantity existing only in the illusion of infinite precision continuous variable math realm ;-). Practically we already put relaxation band guards as brickwall lowpass filters (that has zero transition bands) cannot be practically realized. $\endgroup$
    – Fat32
    Commented Jul 8, 2019 at 21:49
  • 1
    $\begingroup$ @Fat32 No disagreement. If you're talking practical, your design should be such that this is a non-issue. If you're talking theoretical, the location of the exact boundary is the issue. I think the OP meant the latter. The sine wave at the Nyquist frequency is the counter example that proves this Shannon quote from the Wiki article: "If a function x(t) contains no frequencies higher than B hertz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart." false. Or am I misunderstanding something? $\endgroup$ Commented Jul 8, 2019 at 22:08
  • $\begingroup$ @CedronDawg just overstated... Neither theoretically nor practically that's important. If there is an impulse (or nonzero content) at the Nyquist frequency, then there should not be :-) $\endgroup$
    – Fat32
    Commented Jul 8, 2019 at 22:31
  • $\begingroup$ The limiting case (2f) depends on the sampling phase. $\endgroup$
    – hotpaw2
    Commented Apr 1, 2023 at 16:43

You've got your answer but let me summarize a bit about your confusion. We can classify signals as being baseband (aka lowpass) or bandpass.

The basic form of Nyquist-Shannon sampling theorem involves bandlimited baseband real signals and says that :

A real, bandlimited to $W$ (Hz), continuous-time signal $x_c(t)$ can be exactly and uniquely recovered from its samples $x[n] = x_c(nT_s)$ taken at a rate $F_s$ (Hz) greater or equal to twice its bandwidth; i.e., $$ F_s = \frac{1}{T_s} \geq 2 W .$$

Here, bandwidth of the signal and its highest frequency are the same and $W$.

A generalization of the baseband sampling theorem is the bandpass sampling theorem which is slightly more involved, nevertheless, the minimum sampling frequency $F_s$ is again larger or equal to the twice the bandwidth of the signal, where the bandwidth is described by the nonzero speactral interval (assuming a simple domain) in the positive frequencies alone, for a real signal. Here there's no such thing as highest frequency, but only the bandwidth.

In your question, your signal's bandwidth is $2$ Hz and therefore the minimum allowed sampling rate is greater than $4$ Hz. Note that for purely sinusoidal signals samlping at the exact twice bandwidth is problematic and shall be avoided. So eventhough it's said minimum $4$ Hz, it's never exactly equal to $4$ Hz.


Depends on how long you sample, and for the limiting case, the phase of the sampling.

If you sample for any duration shorter than infinite at an unknnown phase, then you must sample at a rate higher than twice the bandwidth or twice the highest frequency for a contiguous spectrum baseband signal. If you sample at the highest frequency, then you must sample at a phase of exactly 0 or pi related to a highest frequency cosine wave, or you will have an amplitude error (up to 100% error).


Also note that a non-zero amplitude infinitely long sinusoid at exactly half the sample rate would have infinite energy, e.g. more than exists in the entire universe.

  • $\begingroup$ "shorter than infinite" so SR = inf, yes? $\endgroup$ Commented Apr 2, 2023 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.