0% found this document useful (0 votes)
17 views

Mehran University of Engineering and Technology, Jamshoro Department of Electronics Engineering Digital Signal Processing 09-ES Lab # 3

This document discusses sampling, the Nyquist theorem, and aliasing in time domain signals. It introduces sampling as the reduction of a continuous signal to a discrete signal. The Nyquist theorem states that the highest frequency that can be accurately represented in a sampled signal is less than half the sampling rate. Aliasing occurs when the Nyquist theorem is violated, resulting in a loss of information when reconstructing a continuous signal from its samples. To avoid aliasing, the sampling frequency must be high enough to satisfy the Nyquist theorem, or an anti-aliasing filter can be used to limit the signal bandwidth below half the sampling rate.

Uploaded by

usmanayaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Mehran University of Engineering and Technology, Jamshoro Department of Electronics Engineering Digital Signal Processing 09-ES Lab # 3

This document discusses sampling, the Nyquist theorem, and aliasing in time domain signals. It introduces sampling as the reduction of a continuous signal to a discrete signal. The Nyquist theorem states that the highest frequency that can be accurately represented in a sampled signal is less than half the sampling rate. Aliasing occurs when the Nyquist theorem is violated, resulting in a loss of information when reconstructing a continuous signal from its samples. To avoid aliasing, the sampling frequency must be high enough to satisfy the Nyquist theorem, or an anti-aliasing filter can be used to limit the signal bandwidth below half the sampling rate.

Uploaded by

usmanayaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Mehran University of Engineering and Technology, Jamshoro

Department of Electronics Engineering


Digital Signal Processing
09-ES
Lab # 3
Name: _____________________________________________ Roll No: _____________
Score: ____________Signature of the Lab Tutor: _______________ Date: ___________
Sampling, Nyquist Theorem & Effects of Aliasing in Time Domain
Introduction:
Sampling:
In signal processing, sampling is the reduction of a continuous signal to a discrete signal,
as shown in the following figure.

Nyquist Theorem:
It is one of the most important rules of sampling, which states that the highest frequency
in a signal which can be accurately represented is less than one-half of the sampling rate.
Mathematically,
f s 2 f max
Where,
f s is the sampling frequency and
f max is the maximum frequency component present in the signal.
For example, if we want a full 20 kHz audio bandwidth, we must sample at least twice
that fast, i.e. over 40 kHz.
Aliasing:
Aliasing is the phenomenon that results in loss of information when a continuous time
signal is reconstructed from its samples (and the Nyquist sampling theorem is violated).
The figure on the next page shows an alias.

There are two approaches to avoid aliasing. One is to raise the sampling frequency to
satisfy the sampling theorem. The other is to filter off the unnecessary high-frequency
components from the continuous-time signal. We limit the signal frequency by an
effective low-pass filter, called anti-aliasing prefilter, so that the highest frequency left
in the signal is less than half of the intended sampling rate.
Lab Tasks:
Sampling obeying the Nyquist Theorem:
Consider the following code:
%cont time
t=0:.0005:1;
f=10;
ansc=cos(2*pi*f*t);
figure;
subplot(211);
plot(t,ansc);
grid on;
xlabel('time');
ylabel('Amplitude');
title('cont time');
axis([0 1 -2 2]);
%discrete time
n=0:0.01:1;
ansd=cos(2*pi*f*n);
%k=0:length(n)-1;
subplot(212);
stem(n,ansd);
grid on;
xlabel('samples');
ylabel('Amplitude');
title('disct time');
axis([0 1 -2 2]);

The output of the above code is as under:

1. With the help of the code given above, write a code in which the sampling
violates the Nyquist Theorem. Also sketch an approximate signal.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
3

Sketch:

2. What are alias frequencies?


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
3. If the maximum frequency component in a signal is 40 hz, what should be the
minimum sampling frequency to avoid aliasing?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

You might also like