Professional Documents
Culture Documents
n
(1)
1
(IDTFT): x(n) j
X (e )e
jn (2)
2
The discrete Fourier transform (DFT) is a sampled version of the DTFT, hence it is better
suited to numerical evaluation on computers
N 1
Analysis Equation (DFT): X (k ) x(n)e j 2kn / N (3)
n0
1 N 1 j 2kn / N
Synthesis Equation (lDFT): x(n) X (k )e (4)
N k 0
Digital Signal Processing Lab Manual
Using the matrix vector multiplication technique used to compute the DTFT and DTFS in
previous laboratory experiments, we can calculate the DFT using:
x(n)WN
n0
1 N 1
Analysis Equation (DFT): x(n) X (k )W nk (7)
N
N k 0
Or equivalently,
X(k) = WNx(n)
k = [0:1:N-1];
WN = exp (-j * 2 * pi / N);
Page
nk = n' * k;
Digital Signal Processing Lab Manual
WNnk = WN .^ (-nk) ;
xn = (Xk * WNnk)/N;
Zero-Padding:-
It is an operation in which more zeros are appended to the original sequence. The
resulting longer DFT provides closely spaced samples of the discrete time Fourier
transform of the original sequence. In MATLAB zero padding is implemented using the
zeros function. The zero padding gives high-density spectrum and provides a better
displayed version for plotting. But it does not give a high resolution spectrum because no
new information is added to the signal: only additional zeros are added in the data.
Procedure:-
Execute following examples in MATLAB
EXAMPLE
subplot( 1,1,1)
n=[0:1:99];
x=cos(0.48 *pi *n)+cos(0.52 *pi *n);
subplot(2,1, 1);stem(n,x);
title('signal x(n), 0 <= n <= 99');xlabel('n')
axis([0, 100,-2.5,2.5])
X=fft(x);magX=abs(X(1: 1:51));
k=0:1:50;w=2*pi/100*k;
subplot(2,1 ,2);plot(w/pi,magX);title('DTFT
Magnitude');xlabel('frequency in pi units')
axis([0,1,0,60])
62
Page
Digital Signal Processing Lab Manual
MATLAB:
MATLAB:
C) High density Spectrum (50 samples) based on the first 10 samples of x(n)
64
Page
Digital Signal Processing Lab Manual
D)High density spectrum (100 samples) based on the first 10 samples of x(n)
65
Page
Digital Signal Processing Lab Manual
PROBLEMS .
1) Determine the DFT of the following periodic sequences using the
DFT definition, and verify by using MATLAB.
a. x1(n)={2,0,2,0},N=4
2)Determine the x(n), First use the IDFS definition and then verify' using MATLAB.
a. X1(k) = {5, -2j, 3, 2j}, N = 4
Digital Signal Processing Lab Manual
b. X2(k)={4,-5,3,-5},N=4
c. X3(k)={I,2,3,4,5},N=5
Digital Signal Processing Lab Manual
d. X4(k)={0,0,2,0},N=4
CONCLUSION:
I have learned about Zero-Padding. It is an operation in which more zeros are appended to the
original sequence. The resulting longer DFT provides closely spaced samples of the discrete
time Fourier transform of the original sequence. In MATLAB zero padding is implemented
using the zeros function. The zero padding gives high-density spectrum and provides a better
displayed version for plotting. But it does not give a high-resolution spectrum because no new
information is added to the signal: only additional zeros are added in the data.