DSP Lab Report 05 - ACS
DSP Lab Report 05 - ACS
Faculty of Engineering
Department of Electrical and Electronic Engineering
Submitted by
Name: Mamtaz, Sadia ID: 17-33259-1
So the special case is z = e jω . If x(n) is absolutely summable ,then its DTFT is given by
IDFT converts frequency domain signal to time domain. Some of the important properties of the DTFT
are as follows:
01)Periodicity: The Discrete Time Fourier Transform (DTFT) of a signal x(n) is periodic in ω with a
period of 2π.
02)Symmetry: For a real valued signal x(n) , its DTFT X ( e jω ) is a conjugate symmetric.
04)Time Sifting: A shift in the time domain corresponds to the phase shifting in frequency domain.
Apparatus:
1. Computer (Desktop/Laptop)
2. MATLAB (at least version 6)
00483 - DIGITAL SIGNAL PROCESSING [D] 2
Simulation and Results:
Code Results
clc;
n=0:10;
x=(0.9*exp(j*pi/3)).^n;
w=-pi:pi/100:pi;
P=freqz(x,1,w);
subplot(211)
plot(w,abs(P))
grid on
subplot (212)
plot(w,angle(P))
grid on
x1=rand(1,11); % generate
random number x1
x2=rand(1,11); % generate
random number x2
alpha=2;
beta=3;
x3=alpha*x1+beta*x2;
w = -pi:pi/200: pi;
X1=freqz(x1,1,w);
X2=freqz(x2,1,w)
X3=freqz(x3,1,w);
subplot(2,1,1);
plot(w/pi, X3)
xlabel('frequency in pi units');
ylabel('DTFT of x3');
title('DTFT of
"alpha*x1+beta*x2"');
X_check=alpha*X1+beta*X2;
% generate right side of
property ?X1(m)+ ? X2(m)
subplot(2,1,2);
plot(w/pi, X_check)
xlabel('frequency in pi units');
ylabel('DTFT of X _ check');
title('DTFT of alpha*x1+
beta*DTFT of x2');
clc;
n=0:99;
x=cos(n*pi/4);
w=-pi:pi/250:pi;
z=sigshift(x,n,10);
X_L=freqz(z,1,w);
subplot(211)
plot(w/pi,abs(X_L))
xlabel('frequency in pi units');
ylabel('DTFT ofx(n-k))');
X=freqz(x,l,w);
X_R=exp(-j*2*w).*X;
subplot(212)
plot(w/pi,abs(X_R))
w=-pi:pi/256:pi;
x=[1 3 5 7 9 11 13 15 17];
h=[1 -2 3 -2 1];
X=freqz(x,1,w);
H=freqz(h,1,w);
XP=X.*H;
subplot(221)
plot(w/pi,abs(XP))
title('Product of magnitude
spectrum')
subplot(222)
plot(w/pi, angle(XP))
title('Phase spectum')
y=conv(x,h);
Y=freqz(y,1,w);
subplot(223);
plot(w/pi,abs(Y))
title('Magnitude spectrum of
convolved sequence')
subplot(224);
plot(w/pi,angle(Y))
title(' Phase of convolved
sequence')
Discussion and Conclusion: In this lab the using of Discrete Time Fourier Transform in MATLAB
was described. The general concept Discrete Time Fourier Transform was successfully learned and
implemented the code carefully. A mathematical problem was done successfully and the output was
expected.
References:
[1] Lab Manual
[2] John G. Proakis & Dimitris G. Manolakis, “ Digital Signal Processing – Principles, Algorithms and
Applications”, Prentice – Hall India, 3rd Edition.
[3] Class Lecture