What is aliasing?

Source: Internet
Author: User

In the world of digital signal processing we all know about the fact that for analyzing the signal in a digital processor we need the signal to be in digital form I. e. sequence of numbers. the digitization process comprises of 2 steps

1) Sampling

2) Quantization

          By sampling a signal we are attempting to represent the time dependence of the signal by a discrete set of samples or in other words are the measurement at discretely spaced time intervals.

And quantization is the transformation of the measurements into finite-precision numbers, such that they can be represented in processor memory.
This article shall be more focusing on sampling of a Time Domain Signal and Its artifact if not done correctly leading to a phenomenon called aliasing. examples will be taken to receive strate what happens when a time domain signal is not sampled correctly and how a typical DSP based system takes care of such phenomenon.

A typical Signal

A sinusoidal signal, in the continuous realm can be expressed in the following form:

Where the subscript 'A' denotes the analog nature, F is the frequency and T is continuous time. now let us create or synthesize digital Sinusoidal Signals. so the first thing we need to do is generate is a sequence of numbers not a continuous curve and between these numbers nothing exists. we shoshould not connect these points by lines or even consider that this value remains a constant from one point to the other. the next thing what we wocould do is measure the analog signal at constant intervals of time and this is nothing but uniform sampling and the Interval Length T, is called the sampling period. the sampling frequency is therefore FS = 1/T. let us denote the sample number by "N" starting from 0 at time t = 0. this means that the 100th sample will be numbered n = 99, and it will correspond to time t = 99 T. so we can now represent 'T' in the above equation as t = Nt = N/FS, and the digital sinusoid can now be expressed

Sampling and aliasing

Taking the time domain digital signal above let us chose a sampling frequency of say 8 kHz and for different value of F = 1 kHz, 2 kHz, 3.5 kHz, 6 kHz and 7 kHz lets plot the sinusoid.

Look at the plots above why are some of these plots similar? Do they reflect the true frequency content, I. e. the frequency of the analog sinusoids?

The signal 1 kHz and the signal 7 kHz looks exactly the same.
The signal 2 kHz and the signal 6 kHz looks exactly the same

Let us now try to analyze then in the frequency domain. analog sinusoids are pure frequency signals and their continuous Fourier transform contains an impulse at their precise frequency, and nothing elsewhere. having that in mind, and from the plots let us analyze what must have happened to the frequency domain of the sampled signals at frequencies higher than half the sampling frequency. for this let me take the Fourier transform of the signal and see what happens.

What do we observe?

For signals with frequency 1 kHz, 2 kHz and 3.5 khz we expected a peak to be present at this frequency and we can clearly see those. note that their frequencies are less than half of the sample frequency.
Now let's look at the plot for 6 kHz, we expected a peak at 6 kHz but we are seeing a peak at 2 kHz. likewise for 7 kHz we expected to see a frequency at 7 kHz but we are seeing a peak at 1 kHz.

Now let's try another trick, increase the sampling frequency to 10 times of the signal frequency. all the plots wowould look similar in time domain and in the frequency domain you can see the peaks as expected.

So what does all this suggest?

It suggests that when the sampling frequency is not abve twice the frequency of the signal then signal aliases itself in the bandwidth and we lose the original signal. this phenomenon is called aliasing and the sampling criterion is called nyqualified criterion. the aliased frequency can be expressed
"Sampling frequency-signal frequency"

so if you look at the plots of 2 kHz and 6 kHz, they look similar it is because the aliased signal has a frequency of (8-6) = 2 kHz. and that is exactly the same reason why we see a peak at 2 kHz in the frequency transform of 6 kHz signal. in order to avoid aliasing the 6 kHz signal needs to be sampled at least at 2*6 kHz = 12 kHz.
when all these signals were sampled at 10 times their frequency, it didn't violate the nyquest criterion and so everything looks as expected.

Now let us take a real world scenario where a signal y (t) has all of the frequencies (F = 1 kHz, 2 kHz, 3.5 kHz, 6 kHz and 7 kHz ). in this case the sampling frequency for this composite signal has to be greater than equal to twice the maximum frequency in the mixed signal. in this case it is 7 kHz and so in order to avoid aliasing and ensure perfect reconstruction of the signal the sampling frequency shocould be greater than equal to 14 kHz.

Given below is a extract of a sample MATLAB code which you can use and play around to validate these observations.

Close all;
Clear;
FS = 8000; % sampling frequency
T = 1/Fs; % Sample Time
L = 100; % length of Signal
T = (0: L-1) * t; % time Vector
% Sinusoid
F1 = 1000;
F2 = 2000;
F3 = 3500;
F4 = 6000;
F5 = 7000;
Y = cos (2 * pI * F1 * t) + cos (2 * pI * F2 * t) + cos (2 * pI * F3 * t) + cos (2 * pI * F4 * t) + cos (2 * pI * F5 * t );
X1 = cos (2 * pI * F1 * t );
X2 = cos (2 * pI * F2 * t );
X3 = cos (2 * pI * F3 * t );
X4 = cos (2 * pI * F4 * t );
X5 = cos (2 * pI * F5 * t );
Subplot (5, 1, 1 );
Plot (T, X1 );
Title ('1 kHz ')
Subplot (5, 1, 2 );
Plot (T, X2 );
Title ('2 kHz ')
Subplot (5, 1, 3 );
Plot (T, X3 );
Title ('3. 5 kHz ')
Subplot (5, 1, 4 );
Plot (T, X4 );
Title ('6 kHz ')
Subplot (5, 1, 5 );
Plot (T, X5 );
Title ('7 kHz ');
Xlabel ('time samples ');

 

So now we know that in a real data system the effects of signal aliasing can be quite important. if there are frequency components, including noise, present in the original signal with frequencies above the nyquest frequency f (one half the sampling rate) then these frequencies will alias into the observed frequency band from 0 to F. the net effect is to distort the inferred time dependence of the Signal Based on the observed data samples as well as the signal frequency components inferred from the sampled data.

Anti-aliasing Techniques

Unfortunately, most real-world signals extend in an infinite frequency range. therefore increasing the sampling frequency will not help and the only way to avoid aliasing is to throw away all the high frequency components of a signal that will not affect its correct perception using an analog filter and is therefore called an anti-aliasing filter. the anti-aliasing filter becomes an important part in the system input front end. it is designed to filter out unwanted high frequency content before the analog signal is converted to the digital domain. without an anti-aliasing filtering, high frequency noise is aliased into lower frequency spectrum during the digitization process which can lead to misinterpretation of the data. so looks like the requirements on this analog filter are very strict meaning it shocould essential have a very sharp transitional band. to reduce that, an alternative is

1) oversample the signal meaning use an N-fold sampling rate which makes the analog filter becomes simple to build, since it is allowed to have a wider transitional-band.

2) apply a digital anti-aliasing filter to the digitized signal.

3) downsample the signal to the required rate meaning keep 1 of every n sample. by downsampling we keep just what is needed to do the required processing. more samples means more processing effort, and that's to be minimized.

 

Linux: http://www.linkedin.com/news? Viewarticle = & ArticleID = 657911468 & gid = 144812 & type = Member & item = 63378589 & articleurl = http % 3A % 2f % 2 fwww % 2eexperts-linked % 2 ECOM % 2 fcontent % contents & urlhash = RA-H & Goback = % 2egde_144812_member_63378589

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.