The Nyquist Sampling Theorem

        In this note we examine an important limitation you will encounter when sampling continuous signals.  Sampled signals happen in many environments, including those below.

If you measure lab data, and analyze it, you will probably plot the data so that you can see what it looks like.  If you talk on the phone, you want to be able to generate an accurate copy of the original signal on the far end of the connection.  In both cases there are two important things that happen.         The problem that can arise is that the sampling rate determines how well you can reconstitute the signal - to plot a graph, or to acccurately copy a voice signal.  We need to think about a few ideas first.         It is important to get a sense of what this means and what can happen.  We have a simulator you can use to demonstrate some of the pitfalls of undersampling and what can happen when that occurs.  Click here to get the simulator in a separate window.

        Once you have the simulator running, click the Start button and examine the output.  Then answer this question.


Q1    Does it look to be possible to reconstruct the original sine wave from the sampled values (large points)?

        We want you to do a few numerical experiments using the simulator.

Experiment 1

        Change the frequency to 2 Hz.  Observe what happens.  Would you be able to reconstruct the signal from the samples?

        Now, let us set some conditions. Before you continue, answer the following question.

Q2    When the sampling period is 0.5 seconds, what is the Nyquist Frequency - i.e. the frequency limit for the largest frequency in the signal?

        When you are done, you realize that the highest frequency that you can sample is 1.0 Hz.  OK, so let's set the frequency to be right at the limit.
Experiment 2

        When the signal frequency is 1.0 Hz and you sample right at the Nyquist rate, can you reconstruct the signal?

        OK, now, theoretically, if you sample below the Nyquist rate you should get samples from which you can reconstruct the signal.
Experiment 3

        Change the frequency to 0.9 Hz.  Observe what happens.  Would you be able to reconstruct the signal from the samples?

        Now, for the curious among you, let us see what would happen if you had a signal just over the Nyquist limit.

Experiment 4

        Change the frequency to 1.1 Hz.  Observe what happens.  Would you be able to reconstruct the signal from the samples?

        Maybe you need to be even more curious.  To help you along, try this.

Experiment 5

        Change the frequency to 2.1 Hz.  Observe what happens.  Would you be able to reconstruct the signal from the samples?

        Experiment 5 is a real puzzler.  It certainly seems like you can reconstruct a sine wave from the samples, but the obvious signal that you would reconstruct is not the signal you want - the original signal.  It is at a frequency that is not correct.  Actually, you get samples that are consistent with a lower frequency sine wave, and if you had that data in a file (just the sampled points, the large dots) you would have no way of knowing that the signal had not been sampled correctly (i.e. that whoever generated the data had undersampled.) and you would be justified in thinking that the apparent low frequency sine wave (see the large dots) was the actual signal recorded.

        The consequences of undersampling are that a frequency higher than the Nyquist limit is aliased into another signal with a frequency within the Nyquist limit.  Aliasing causes errors in computation of the magnitude of frequency components at frequencies far from the signal that causes the problem.

        The conclusion you should get from this is that is is very possible to get spurious information into a data file if you have not sampled fast enough, and you should be aware of the possibility of that kind of error.