Skip to content Skip to navigation

Connexions

You are here: Home » Content » Illustrations

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

      What are tags? tag icon

      Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    • External bookmarks
  • E-mail the author
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Recently Viewed

This feature requires Javascript to be enabled.

Illustrations

Module by: Anders Gjendemsjø

Summary: Illustration of the sampling theorem

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

In this module we illustrate the processes involved in sampling and reconstruction. To see how all these processes work together as a whole, take a look at the system view. In Sampling and reconstruction with Matlab we provide a Matlab script for download. The matlab script shows the process of sampling and reconstruction live.

Basic examples

Example 1

To sample an analog signal with 3000 Hz as the highest frequency component requires sampling at 6000 Hz or above.

Example 2

The sampling theorem can also be applied in two dimensions, i.e. for image analysis. A 2D sampling theorem has a simple physical interpretation in image analysis: Choose the sampling interval such that it is less than or equal to half of the smallest interesting detail in the image.

The process of sampling

We start off with an analog signal. This can for example be the sound coming from your stereo at home or your friend talking.

The signal is then sampled uniformly. Uniform sampling implies that we sample every TsTs seconds. In Figure 1 we see an analog signal. The analog signal has been sampled at times t=nTs t n Ts .

Figure 1: Analog signal, samples are marked with dots.
Figure 1 (analog_sampling.jpg)
In signal processing it is often more convenient and easier to work in the frequency domain. So let's look at at the signal in frequency domain, Figure 2. For illustration purposes we take the frequency content of the signal as a triangle. (If you Fourier transform the signal in Figure 1 you will not get such a nice triangle.)
Figure 2: The spectrum XΩ X Ω .
Figure 2 (spektrum_1.jpg)
Notice that the signal in Figure 2 is bandlimited. We can see that the signal is bandlimited because XΩ X Ω is zero outside the interval -ΩgΩg Ωg Ωg . Equivalentely we can state that the signal has no angular frequencies above ΩgΩg, corresponding to no frequencies above Fg=Ωg2π Fg Ωg 2 .

Now let's take a look at the sampled signal in the frequency domain. While proving the sampling theorem we found the the spectrum of the sampled signal consists of a sum of shifted versions of the analog spectrum. Mathematically this is described by the following equation:

XsΩTs=1Tsk=-∞XΩ+2πkTs Xs Ω Ts 1 Ts k -∞ X Ω 2 k Ts (1)

Sampling fast enough

In Figure 3 we show the result of sampling xtxt according to the sampling theorem. This means that when sampling the signal in Figure 1/Figure 2 we use Fs2Fg Fs 2 Fg . Observe in Figure 3 that we have the same spectrum as in Figure 2 for ΩgΩg Ω g Ωg , except for the scaling factor 1Ts 1 Ts . This is a consequence of the sampling frequency. As mentioned in the proof the spectrum of the sampled signal is periodic with period 2πFs=2πTs 2 Fs 2 Ts .

Figure 3: The spectrum XsXs. Sampling frequency is OK.
Figure 3 (spektrum_3.jpg)

So now we are, according to the sample theorem, able to reconstruct the original signal exactly. How we can do this will be explored further down under reconstruction. But first we will take a look at what happens when we sample too slowly.

Sampling too slowly

If we sample xtxt too slowly, that is Fs<2Fg Fs 2 Fg , we will get overlap between the repeated spectra, see Figure 4. According to Equation 1 the resulting spectra is the sum of these. This overlap gives rise to the concept of aliasing.

aliasing:

If the sampling frequency is less than twice the highest frequency component, then frequencies in the original signal that are above half the sampling rate will be "aliased" and will appear in the resulting signal as lower frequencies.

The consequence of aliasing is that we cannot recover the original signal, so aliasing has to be avoided. Sampling too slowly will produce a sequence xsn xs n that could have orginated from a number of signals. So there is no chance of recovering the original signal. To learn more about aliasing, take a look at this module. (Includes an applet for demonstration!)

Figure 4: The spectrum XsXs. Sampling frequency is too low.
Figure 4 (spektrum_2.jpg)

To avoid aliasing we have to sample fast enough. But if we can't sample fast enough (possibly due to costs) we can include an Anti-Aliasing filter. This will not able us to get an exact reconstruction but can still be a good solution.

Anti-Aliasing filter:

Typically a low-pass filter that is applied before sampling to ensure that no components with frequencies greater than half the sample frequency remain.

Example 3

The stagecoach effect

In older western movies you can observe aliasing on a stagecoach when it starts to roll. At first the spokes appear to turn forward, but as the stagecoach increase its speed the spokes appear to turn backward. This comes from the fact that the sampling rate, here the number of frames per second, is too low. We can view each frame as a sample of an image that is changing continuously in time. (Applet illustrating the stagecoach effect)

Reconstruction

Given the signal in Figure 3 we want to recover the original signal, but the question is how?

When there is no overlapping in the spectrum, the spectral component given by k=0k0 (see Equation 1),is equal to the spectrum of the analog signal. This offers an oppurtunity to use a simple reconstruction process. Remember what you have learned about filtering. What we want is to change signal in Figure 3 into that of Figure 2. To achieve this we have to remove all the extra components generated in the sampling process. To remove the extra components we apply an ideal analog low-pass filter as shown in Figure 5 As we see the ideal filter is rectangular in the frequency domain. A rectangle in the frequency domain corresponds to a sinc function in time domain (and vice versa).

Figure 5: HΩ H Ω The ideal reconstruction filter.
Figure 5 (recon_filter.jpg)

Then we have reconstructed the original spectrum, and as we know if two signals are identical in the frequency domain, they are also identical in the time domain. End of reconstruction.

Conclusions

The Shannon sampling theorem requires that the input signal prior to sampling is band-limited to at most half the sampling frequency. Under this condition the samples give an exact signal representation. It is truly remarkable that such a broad and useful class signals can be represented that easily!

We also looked into the problem of reconstructing the signals form its samples. Again the simplicity of the principle is striking: linear filtering by an ideal low-pass filter will do the job. However, the ideal filter is impossible to create, but that is another story...

Comments, questions, feedback, criticisms?

Send feedback