Download Help (Windows Only) |
An aliased signal provides a poor representation of the analog signal. Aliasing causes a false lower frequency component to appear in the sampled data of a signal. The following illustration shows an adequately sampled signal and an inadequately sampled signal.
In the previous illustration, the inadequately sampled signal appears to have a lower frequency than the actual signal—two cycles instead of ten cycles.
Increasing the sampling frequency increases the number of data points acquired in a given time period. Often, a fast sampling frequency provides a better representation of the original signal than a slower sampling frequency.
For a given sampling frequency, the maximum frequency you can accurately represent without aliasing is the Nyquist frequency. The Nyquist frequency equals one-half the sampling frequency, as shown by the following equation.
(A) |
where f_{N} is the Nyquist frequency and f_{s} is the sampling frequency.
Signals with frequency components above the Nyquist frequency appear aliased between DC and the Nyquist frequency. In an aliased signal, frequency components actually above the Nyquist frequency appear as frequency components below the Nyquist frequency. For example, a component at frequency f_{N} < f_{0} < f_{s} appears as the frequency f_{s} – f_{0}.
The following two illustrations show the aliasing phenomenon. The first illustration shows the frequencies contained in an input signal acquired at a sampling frequency, f_{s}, of 100 Hz.
The following illustration shows the frequency components and the aliases for the input signal from the previous illustration.
In the previous illustration, frequencies below the Nyquist frequency of f_{s}/2 = 50 Hz are sampled correctly. For example, F1 appears at the correct frequency. Frequencies above the Nyquist frequency appear as aliases. For example, aliases for F2, F3, and F4 appear at 30 Hz, 40 Hz, and 10 Hz, respectively.
The alias frequency equals the absolute value of the difference between the closest integer multiple of the sampling frequency and the input frequency, as shown in the following equation:
AF = |CIMSF – IF| | (B) |
where AF is the alias frequency, CIMSF is the closest integer multiple of the sampling frequency, and IF is the input frequency. For example, you can compute the alias frequencies for F2, F3, and F4 from the previous illustration with the following equations:
Alias F2 = |100 – 70| = 30 Hz | (C) |
Alias F3 = |(2)100 – 160| = 40 Hz | (D) |
Alias F4 = |(5)100 – 510| = 10 Hz | (E) |
According to the Shannon Sampling Theorem, use a sampling frequency at least twice the maximum frequency component in the sampled signal to avoid aliasing. The following illustration shows the effects of various sampling frequencies.
In case A of the previous illustration, the sampling frequency f_{s} equals the frequency f of the sine wave. f_{s} is measured in samples/second. f is measured in cycles/second. Therefore, in case A, one sample per cycle is acquired. The reconstructed waveform appears as an alias at DC.
In case B of the previous illustration, f_{s} = 7/4f, or 7 samples/4 cycles. In case B, increasing the sampling rate increases the frequency of the waveform. However, the signal aliases to a frequency less than the original signal—three cycles instead of four.
In case C of the previous illustration, increasing the sampling rate to f_{s} = 2f results in the digitized waveform having the correct frequency or the same number of cycles as the original signal. In case C, the reconstructed waveform more accurately represents the original sinusoidal wave than case A or case B. By increasing the sampling rate to well above f, for example, f_{s} = 10f = 10 samples/cycle, you can accurately reproduce the waveform.
Case D of the previous illustration shows the result of increasing the sampling rate to f_{s} = 10f.
In the digital domain, you cannot distinguish alias frequencies from the frequencies that actually lie between 0 and the Nyquist frequency. Even with a sampling frequency equal to twice the Nyquist frequency, pickup from stray signals, such as signals from power lines or local radio stations, can contain frequencies higher than the Nyquist frequency. Frequency components of stray signals above the Nyquist frequency might alias into the desired frequency range of a test signal and cause erroneous results. Therefore, you need to remove alias frequencies from an analog signal before the signal reaches the A/D converter.
Use an anti-aliasing analog lowpass filter before the A/D converter to remove alias frequencies higher than the Nyquist frequency. A lowpass filter allows low frequencies to pass but attenuates high frequencies. By attenuating the frequencies higher than the Nyquist frequency, the anti-aliasing analog lowpass filter prevents the sampling of aliasing components. An anti-aliasing analog lowpass filter should exhibit a flat passband frequency response with a good high-frequency alias rejection and a fast roll-off in the transition band. Because you apply the anti-aliasing filter to the analog signal before it is converted to a digital signal, the anti-aliasing filter is an analog filter.
The following illustration shows both an ideal anti-alias filter and a practical anti-alias filter. The following information applies to the following illustration:
An ideal anti-alias filter, shown in part a of the previous illustration, passes all the desired input frequencies and cuts off all the undesired frequencies. However, an ideal anti-alias filter is not physically realizable.
Part b of the previous illustration shows actual anti-alias filter behavior. Practical anti-alias filters pass all frequencies less than f_{1} and cut off all frequencies greater than f_{2}. The region between f_{1} and f_{2} is the transition band, which contains a gradual attenuation of the input frequencies. Although you want to pass only signals with frequencies less than f_{1}, the signals in the transition band might cause aliasing. Therefore, in practice, use a sampling frequency greater than two times the highest frequency in the transition band. Using a sampling frequency greater than two times the highest frequency in the transition band means f_{s} might be more than 2f_{1}.