You are on page 1of 6

LAB # 10

SAMPLING AND ALIASING

OBJECTIVE:

To study the relationship between discrete-time and continuous time signals by examining
sampling and aliasing.

1. SAMPLING:
In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time
signal. A common example is the conversion of a sound wave (a continuous signal) to a
sequence of samples (a discrete-time signal).
A sample is a value or set of values at a point in time and/or space.
A sampler is a subsystem or operation that extracts samples from a continuous signal.
2. THE SAMPLING THEORM

“A continuous time signal x (t) with frequencies no higher than Fmax can be reconstructed
exactly from its samples x[n] = x (n Ts), if the samples are taken at a rate Fs = 1 / Ts that is
greater than 2Fmax”
Fs ≥ 2Fmax
The minimum sampling rate of 2Fmax is called the Nyquist Rate .From Sampling theorem it
follows that the reconstruction of a sinusoid is possible if we have at least 2 samples per period.
If we don’t sample at a rate that satisfies the sampling theorem then aliasing occurs

3. CONCEPT OF ALIASING

Consider the general formula for a discrete time sinusoid X = cos ( ŵ π n + Ф ). Now consider
x1 = cos ( 0.1 π n ) , x2 = cos ( 2.1 π n ) and x3 = cos ( 1.9 π n ) apparently with different values
of “ ŵ ”. If we display the graph of these 3 signals over the range n = 0:40 then we see that all
the above 3 signals are equivalent.

4. SAMPLING OF A SINUSOIDAL SIGNAL

In this project you will investigate the sampling of a continuous-time sinusoidal signal xa(t) at
various sampling rates. Since MATLAB cannot strictly generate a continuoustime signal, you
will generate a sequence {xa(nTH)} from xa(t) by sampling it at a very high rate, 1/TH, such that
the samples are very close to each other. A plot of xa(nTH) using the plot command will then
look like a continuous-time signal.
5. ALIASING EFFECT IN THE FREQUENCY DOMAIN

The relation between the continuous-time Fourier transform (CTFT) of an arbitrary band limited
continuous-time signal and the discrete-time Fourier transform (DTFT) of the discrete-time
signal is investigated next in this project. In order to convert a continuous-time signal xa(t) into
an equivalent discrete-time signal x[n], the former must be band-limited in the frequency domain
(see R5.2). To illustrate the effect of sampling in the frequency domain we choose an
exponentially decaying continuous-time signal with a CTFT that is approximately band limited.
6. UPSAMPLING AND DOWNSAMPLING:

UPSAMPLING:

“Up sampling” is the process of inserting zero-valued samples between original samples to
increase the sampling rate. (This is called “zero-stuffing”.) Up sampling adds to the original
signal undesired spectral images which are centered on multiples of the original sampling rate.
clc
clear all
close all
N=6;
U=2;
f=50;

n=0:N-1;
x=[1 2 3 4 5 6]
subplot(211)
stem(n,x)

y=zeros(1,U*length(x)-1);
y([1:U:length(y)])=x
n1=0:1/U:5
subplot(212)
stem(n1,y)

DOWNSAMPLING:

“decimation” is the process of reducing the sampling rate. In practice, this usually implies low
pass-filtering a signal, then throwing away some of its samples.
ACTIVITY:

Q1. Run the codes described in section 3, 4 and 5.


Q2. Write a Program for up sampling an exponential sequence by a factor M

You might also like