You are on page 1of 7

Experiment No.

7
Aim:
To determine frequency domain representation of CT and DT periodic signals.
Sources/Softwares required:
MATLAB
Theory:Fourier analysis is a family of mathematical techniques, all based on decomposing signals into
sinusoids. The discrete Fourier transform (DFT) is the family member used with digitized signals
(discrete-time signal). A signal can be either continuous or discrete, and it can be either periodic
or aperiodic. The combination of these two features generates the four categories, described
below.
Periodic-Continuous: Here the examples include: sine waves, square waves, and any waveform
that repeats itself in a regular pattern from negative to positive infinity. This version of the
Fourier transform is called the Fourier series.
Aperiodic-Continuous: This includes, for example, decaying exponentials and the Gaussian
curve. These signals extend to both positive and negative infinity without repeating in a periodic
pattern. The Fourier Transform for this type of signal is simply called the Fourier Transform.
Aperiodic-Discrete: These signals are only defined at discrete points between positive and
negative infinity, and do not repeat themselves in a periodic fashion. This type of Fourier
transform is called the Discrete Time Fourier Transform.
Periodic-Discrete: These are discrete signals that repeat themselves in a periodic fashion from
negative to positive infinity. This class of Fourier Transform is sometimes called the Discrete
Time Fourier Series.
----------------------------------------------------------------------------------------------------------------IN LAB EXERCISE
Question 1
syms k t
wo=1;
ak=(-1/2)^abs(k);
yk=ak.*exp(j.*k.*wo.*t);
z=symsum(yk,k,-10,10);
ezplot(z);

Question 2
syms k n;
wo=pi/3;
ak=(1/6).*(int((1)*exp(-j*k*wo*t),t,2,3)+int((-1)*exp(-j*k*wo*t),t,5,6));
%To convert symbolic form into array/matrix form
z=subs(ak,-20:20);
subplot(2,1,1);
stem(-20:20,abs(z));
xlabel('k');
ylabel('abs(k)');
title('Amplitude Spectrum');
subplot(2,1,2);
stem(-20:20,angle(z));
xlabel('k');
ylabel('angle(k)');
title('Phase Spectrum');

Question 3
syms k n;
wo=pi./27;
ak=1 + cos(5.*pi.*k/9) + sin(7.*pi.*k/27);
yk=ak.*exp(j.*k.*wo.*n);
z=symsum(yk,k,0,20);
%To convert symbolic form into array/matrix form
z1=subs(z,-20:20);
subplot(2,1,1);
stem(-20:20,abs(z1));
xlabel('k');
ylabel('abs(k)');
title('Amplitude Spectrum');
subplot(2,1,2);
stem(-20:20,angle(z1));
xlabel('k');
ylabel('angle(k)');
title('Phase Spectrum');

POST LAB EXERCISE


Question 1
syms k n;
wo=pi./36;
xn=1 + cos(3.*pi.*n/12) + sin(2.*pi.*n/36);
ak=xn.*exp(-j.*k.*wo.*n);
z=(1/72).*symsum(ak,n,0,20);
%To convert symbolic form into array/matrix form
ak=subs(z,-20:20);
subplot(2,1,1);
stem(-20:20,abs(ak));
xlabel('k');
ylabel('abs(k)');
title('Amplitude Spectrum');
subplot(2,1,2);
stem(-20:20,angle(ak));
xlabel('k');
ylabel('angle(k)');
title('Phase Spectrum');

Question 2
a) syms k n;

wo=pi./2;
ak=(1/4)*int((1)*exp(-j*k*wo*t),t,-1,1);

%To convert symbolic form into array/matrix form


z=subs(ak,-20:20);
subplot(2,1,1);
stem(-20:20,abs(z));
xlabel('k');
ylabel('abs(k)');
title('Amplitude Spectrum');
subplot(2,1,2);
stem(-20:20,angle(z));
xlabel('k');
ylabel('angle(k)');
title('Phase Spectrum');

b) syms k n;
wo=pi;
ak=(1/2)*int((sin(pi*t))*exp(-j*k*wo*t),t,0,2);
%To convert symbolic form into array/matrix form
z=subs(ak,-20:20);
subplot(2,1,1);
stem(-20:20,abs(z));
xlabel('k');
ylabel('abs(k)');
title('Amplitude Spectrum');
subplot(2,1,2);
stem(-20:20,angle(z));

xlabel('k');
ylabel('angle(k)');
title('Phase Spectrum');

c) syms k n;

wo=pi./2;
ak=(1/4)*int(sin(pi*t)*exp(-j*k*wo*t),t,-1,1);
%To convert symbolic form into array/matrix form
z=subs(ak,-20:20);
subplot(2,1,1);
stem(-20:20,abs(z));
xlabel('k');
ylabel('abs(k)');
title('Amplitude Spectrum');
subplot(2,1,2);
stem(-20:20,angle(z));
xlabel('k');
ylabel('angle(k)');
title('Phase Spectrum');

LEARNING OUTCOMES:
This experiment gave us programming techniques to solve problems based on determination of
frequency domain representation in CT & DT periodic signals.. We also learnt how to estimate
errors using basic calculus concepts and results, as well as writing programs to implement the
numerical methods with a software package, Matlab.

You might also like