0% found this document useful (0 votes)
8 views6 pages

Sampling Pcs

The document outlines a study on the Sampling Theorem and the Aliasing Effect by generating analog and discrete-time (DT) signals. It demonstrates the effects of different sampling frequencies (fs) relative to twice the maximum frequency (2Fm) through various plots. The results illustrate how under-sampling, critical sampling, and oversampling affect the representation of the original analog signal.

Uploaded by

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

Sampling Pcs

The document outlines a study on the Sampling Theorem and the Aliasing Effect by generating analog and discrete-time (DT) signals. It demonstrates the effects of different sampling frequencies (fs) relative to twice the maximum frequency (2Fm) through various plots. The results illustrate how under-sampling, critical sampling, and oversampling affect the representation of the original analog signal.

Uploaded by

moviesmail25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

//%To Study Sampling Theorem & Aliasing Effect

clc; //%to clear screen

clear all; //%removes all variables from the workspace,functions

//close all; //%closes all the open figure windows.

//% To generate analog DT signal

A=1;

T=4;

Fm=1/T;

t=-10:.01:10;

x=A*cos(2*%pi*Fm*t);

subplot(2,2,1);

plot(t,x);

xlabel('time');

ylabel('amplitude');

title('Original Analog Signal');

//%sampling frequency fs<2Fm

fs=1.2*Fm;

n=-5:1:5; //%t=nT

xn=A*cos(2*%pi*Fm*n*1/fs);//%T=1/fs

subplot(2,2,2);

plot2d3(n,xn);

//holdon; //holds the current plot.

plot(n,xn);

xlabel('time');

ylabel('amplitude');

title('DT signal for fs<2Fm');

//%sampling frequency

fs=2*Fm;

n=-5:1:5; //%t=nT
xn=A*cos(2*%pi*Fm*n*1/fs);//%T=1/fs

subplot(2,2,3);

plot2d3(n,xn);

//holdon;

plot(n,xn);

xlabel('time');

ylabel('amplitude');

title('DT signal for fs=2Fm');

//%sampling frequency fs>2Fm

fs=8*Fm;

n=-20:1:20; //%t=nT

xn=A*cos(2*%pi*Fm*n*1/fs);//%T=1/fs

subplot(2,2,4);

plot2d3(n,xn);

//holdon;

plot(n,xn);

xlabel('time');

ylabel('amplitude');

title('DT signal for fs>2Fm');


//%To Study Sampling Theorem & Aliasing Effect

clc; //%to clear screen

clear all; //%removes all variables from the workspace,functions

//close all; //%closes all the open figure windows.

//% To generate analog DT signal

A=1;

Fm=0.02;

t=-100:.01:100;

x=A*cos(2*%pi*Fm*t);

subplot(2,2,1);

plot(t,x);

xlabel('time');

ylabel('amplitude');

title('Original Analog Signal');

//%sampling frequency fs1<2Fm

fs1=0.02;

n=-5:1:5; //%t=nT

xn=A*cos(2*%pi*Fm*n*1/fs1);//%T=1/fs1

subplot(2,2,2);

plot2d3(n,xn);

//holdon; //holds the current plot.

plot(n,xn);

xlabel('time');

ylabel('amplitude');

title('DT signal for fs1<2Fm');

//%sampling frequency

fs2=0.04;

n=-10:1:10; //%t=nT

xn=A*cos(2*%pi*Fm*n*1/fs2);//%T=1/fs2
subplot(2,2,3);

plot2d3(n,xn);

//holdon;

plot(n,xn);

xlabel('time');

ylabel('amplitude');

title('DT signal for fs2=2Fm');

//%sampling frequency fs3>2Fm

fs3=0.08;

n=-20:1:20; //%t=nT

xn=A*cos(2*%pi*Fm*n*1/fs3);//%T=1/fs3

subplot(2,2,4);

plot2d3(n,xn);

//holdon;

plot(n,xn);

xlabel('time');

ylabel('amplitude');

title('DT signal for fs>2Fm');

You might also like