Sampling
Understanding Aliasing and Imaging...
In all digital data acquisition systems, samples of an analog signal are taken at discrete time intervals. The accuracy of a sampled signal is directly related to both the rate at which samples are taken (the sampling rate or sampling frequency) and the signal's frequency content.
In theory, if a signal's frequency spectrum is band limited to some maximum frequency, fmax, an exact representation of the signal can be acquired if the sampling frequency, fs, is at least twice the maximum frequency: fs > 2fmax. This is known as the Shannon-Nyquist sampling theory, which also states that the original analog signal can be faithfully reconstructed from these samples.
Analog signals can be band limited by the frequency response of the system or by filtering. If the analog signal is not adequately band limited for the chosen sampling frequency, a phenomenon known as aliasing or imaging will occur, resulting in highly undesirable effects. As the terms suggests, different analog signals sometimes yield exactly the same samples; this is illustrated by the figure below.

The aliasing effect can occur with broad-band signals where components beyond fs/2 will result in additive distortions in the spectrum between 0 and fs/2. The figure below shows a typical broad-band signal spectrum, for example, from an audio microphone.
The frequency response of the microphone begins to roll off gradually at 15 kHz, and although most audible information is below about 10 kHz, high-frequency room noise can extend the signal spectrum appreciably (the microphone's frequency response is down only 40dB at 60 kHz!). With fs = 100 kHz, the shaded area of the spectrum is "folded over" about 50 kHz and added to the spectrum of the sampled signal as indicated by the pass-band reflection area in the figure below.
A 100 kHz sampling frequency is high enough to prevent aliasing from corrupting most of the sampled signal's frequency spectrum, at least in the audio-frequency range. However, it is not always possible to sample at a high enough rate to avoid aliasing.

To minimize the effects of aliasing, while greatly reducing the required sampling frequency, an anti-aliasing filter can be used to limit the spectral content of the analog signal. This filter might be a separate analog filter or built in to the device (as with sigma-delta A/D and D/A converters). The spectrum below shows the result of filtering the broad-band microphone spectrum with an analog filter.

The frequency at which the filter begins to limit the spectrum is the corner frequency, fc. The filter used here has a stop-band frequency of 10 kHz, beyond which a signal attenuation of 60dB is guaranteed. The sampling frequency should be at least twice the stop-band frequency.
Comparing the filtered and non-filtered spectral plots, it is evident that filtering greatly reduces the total amount of signal content immediately beyond the 0 to 10 kHz frequency range of interest; this in turn greatly reduces the sampling frequency required to avoid aliasing.
During signal reconstruction digital numbers are converted to analog levels by a D/A converter at discrete time intervals. The analog level of each sample is held constant for the sampling period until the next sample resulting in a staircase analog output as shown below:

Here an anti-imaging filter is used to "smooth" out the staircase into a continuous waveform, shown super-imposed (note the slight delay which results from filtering). This filter is functionally the same as an anti-aliasing filter, but in this case it eliminates high-frequency "images" of the signal spectrum caused by the staircase jumps in reconstruction.