Experiment No. 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

EXPERIMENT NO.

2
AIM :- To study and verify sampling theorem.

OBJECTIVE :- The objective of this experiment is to verify sampling theorem and observe the
effect of different sampling frequency on reconstructed signal.

THEORY :-
 Sampling Theorem:

Statement:

A continuous time signal can be represented in its samples and can be recovered back
when sampling frequency fs is greater than or equal to the twice the highest frequency
component of message signal.

Proof:
Consider a continuous time signal x(t). The spectrum of x(t) is a band
limited to fm Hz i.e. the spectrum of x(t) is zero for |f|>fm. Sampling of input signal x(t)
can be obtained by multiplying x(t) with an impulse train δ(t) of period Ts. The output
of multiplier is a discrete signal called sampled signal which is represented with y(t)
in the following diagrams:

M
a
t
h
e
m
a
t
ical expression:

Sampled signal y(t) = x(t). δ(t) . . . . . .(1)


The trigonometric Fourier series representation of is given by :
δ(t) = a0 + Σn=1∞( ancos nωs t + sin nωs t) . . . . . .(2)
Where,
a0=1/Ts δ(t)dt =1/Tsδ(0) =1/Ts

an=2/Ts δ(t)cos nωs tdt =2/Tsδ(0) cos nωs0 =2/T

bn=2/Ts δ(t)sin nωs tdt =2/Tsδ(0) sin nωs 0 =0

So,
δ(t) =1/Ts+ (2/Tscos nωs t+0)

y(t) = x(t). δ(t)


= x(t) [1/Ts+ (2/Tscos nωs t+0)

=1/Ts[x(t)+2 (cos nωst) x(t)]

=1/Ts[x(t)+2 cos nωst x(t) +2 cos n2ωst x(t)+2 cos n3ωst x(t) …]
Take Fourier transform both side:

Y(ω)=1/Ts [X(ω)+X(ω-ωs)+X(ω+ωs)+X(ω-2ωs)+X(ω+2ωs)+…]

To

reconstruct x(t),input signal spectrum X(ω) recovered from sampled signal


spectrumY(ω).For the successful recovery of X(ω) from Y(ω) is only possible if there
is no overlapping between cycles of Y(ω).
Separation between cycle of Y(ω) depends upon sampling frequency ωs. Following
figure shows Y(ω) for the three different relations between ωs and ωm.

CASE:1 ωs =ωm(Perfect Sampling)


CASE:2 ωs >ωm(Over sampling)

CASE:3 ωs <ωm (Under sampling)

Aliasing Effect:
The overlapped region in case of under sampling represents aliasing effect.

For the successful reconstruction of original signal ωs ≥ωmis required.


MATLAB code for sampling of sinusoidal wave .

f=input(‘enter frequency’);
fs=input(‘enter sample frequency’);
ts=1/fs;
t=0:ts:5;
x=sin(2*pi*f*t);
subplot(2,1,1);
plot(t,x);
y=sin(2*pi*f*t);
subplot(2,1,2);
stem(t,x);
axis([0 5 -1 1]);
title(‘sampled sinusoidal’);

OUTPUT:

For successful reconstruction


fs>=2f
Here,output for
f=1,fs=7

You might also like