# Aliasing and Sampling at Frequencies Above the Nyquist Frequency

Publish Date: Nov 29, 2016 | 54 Ratings | 3.54 out of 5 | Print

## Overview

This tutorial recommends tips and techniques for using National Instruments high-speed digitizers to build the most effective data sampling system possible. In this tutorial, you will learn fundamental information about the underlying theory of sampling with a high speed digitizer and various methods to optimize the performance of your data sampling. This section of the tutorial covers the topics below.

### 1. Aliasing

One of the limitations of discrete-time sampling is an effect called aliasing.

Figure 1. Wagon wheel

An example of aliasing can be seen in old movies, especially when watching wagon wheels on old Western films. Recall that occasionally the wheels appeared as if they going in reverse, even as the wagon would speed up. This phenomenon occurs as the rate of the wagon wheel's spokes spinning approaches the rate of the sampler (the camera operating at about 30 frames per second).

The same thing happens in data acquisition between the sampler and the signal we are sampling.

The Nyquist Theorem states that you need 2 samples per “cycle” of your input signal to define it. Thus, you can accurately measure the frequency of a signal with frequency f as long as you are sampling it at greater than 2f. If you try to measure the frequency of signals having a frequency above f with a sampler operating at 2f, you will alias the signal, or create false images of this signal at frequencies below f. These false frequencies will appear as mirror images of the original frequency around the Nyquist frequency. This situation is called "aliasing back" or "folding back" and can be seen in Figure 2 below.

Figure 2. Frequency versus amplitude plot showing an aliased signal, fa, which occurs due to "aliasing back" from the original signal of 70MHz

where

R (sampling rate) = 100MS/s
fs (signal being sampled = 70MHz
fN (the Nyquist frequency) = 50MHz
fa (aliased frequency) = 30MHz

The frequency of the aliased signal can be found from the following simple equation:

fa = |R*n - fs|

where n is the closest integer multiple of the sampling rate (R) to the signal being aliased (fs).

Although sampling at twice the Nyquist frequency will ensure that you measure the correct frequency of your signal, it will not be sufficient to capture the shape of the waveform. If the shape of the waveform is desired, you should sample at a rate approximately 10 times the Nyquist theory.

You can interactively view the effects of aliasing on a signal by running this LabVIEW Player enabled Example .

The problem of aliasing can often be eliminated by using an anti-alias filter.

### 2. Undersampling and Oversampling

Undersampling is essentially sampling too slowly, or sampling at a rate below the Nyquist frequency for a particular signal of interest. Undersampling leads to aliasing and the original signal cannot be properly reconstructed. However, undersampling also requires less memory, so it may be useful in certain applications, see "Undersampling to Obtain Frequencies Above the Nyquist Frequency" below.

Oversampling is sampling at a rate beyond twice the highest frequency component of interest in the signal and is usually desired. Because real-world signals are not perfectly filtered and often contain frequency components greater than the Nyquist frequency, oversampling can be used to increase the foldover frequency (one half the sampling rate) so that these unwanted components of the signal do not alias into the passband. Oversampling is also necessary when trying to capture fast edges, transients, and one-time events.

### 3. Undersampling to Obtain Frequencies Above the Nyquist Frequency

Suppose that you would like to sample a signal with a primary, strong signal at 70MHz for an extended period of time. If you were to set this frequency as the Nyquist frequency then you would want to sample at 140MHz in order to accurately measure the frequency of your signal. However, the maximum limit of your PCI bus is 133MHz and sampling at 140MHz will fill your input buffer too quickly, how then can you accurately measure your signal?

You can overcome the effects of aliasing on your signal if you understand how your sampled signal will appear. However, this technique must be used with caution. The signal you are measuring should be strong with no other strong frequency components close to it on the frequency spectrum. Additionally, it is highly advisable to sample as nearly as possible to twice the Nyquist frequency in order to not bring in frequency components of integer multiples of your original signal. Following these cautions will ensure that the signal you are attempting to sample is not polluted by an aliased signal from another frequency.

Suppose you are sampling your 70MHz signal with a digitizer that has a maximum sampling rate of 100 megasamples per second (MS/s) and a bandwidth of 100MHz, this situation has been set up in Figure 2. If you are sampling at 100MS/s then your Nyquist frequency is 50MHz. Thus, the 70MHz signal that you are sampling will be aliased back and appear as an image at 30MHz (70 is 20 greater than the Nyquist frequency of 50 and so the aliased signal will occur as a mirror image at 20 less than 50, or 30). Now, by placing a high-pass, external filter of 60MHz upon the incoming signal, all real frequency components below 60MHz will be attenuated and all that will be left is the aliased image at 30MHz of the real signal at 70MHz. Because the bandwidth of the digitizer is 100MHz, the 70MHz signal and its aliased image will both have the same, slightly attenuated magnitude which should be easy to recognize.
Fundamentals of High-Speed Digitizers
The Fundamentals of FFT-Based Signal Analysis and Measurement in LabVIEW and LabWindows/CVI

### Ratings

Rate this document