PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

DTFT, DFT, ZT, and FFT 491


then by increasing the length N no distortion is introduced. The new augmented
sequence f_ aug(n) is then given by

faugn

fn n N

NnM

_()


()








for

for




01 








The operation of expanding f(n) by adding zeros is called zero-padding. Note
that for computational effi ciency, the relation M = 2 k must be satisfi ed, for the
smallest integer k. Observe also that zero-padding is employed when a high-
resolution spectrum is required given by a short time sequence.
Recall that in its simplest version, the MATLAB command fft(fn) returns the DFT
of the sequence fn evaluated point by point. The k-length sequence of the DFT corre-
sponding to the time sequence fn can be evaluated by using the command fft(f, k).
R.5.98 Let us evaluate the eight DFT points of the discrete sequence f(t) = cos(2πt) over
one period.

MATLAB Solution
>> t = [0:1:7]; % N = 8
>> fn = cos(2*pi*t/8);
>> fft _ of _ fn = (fft(fn))’

fft _ of _ fn =
-0.0000
4.0000 + 0.0000i
0.0000
-0.0000 + 0.0000i
0.0000
-0.0000 - 0.0000i
0.0000
4.0000 - 0.0000i

Observe that eight time points return eight transform points, in which the fre-
quencies are ordered [0 1 2 3 4 − 3 − 2 − 1 ], called reverse-wrap-around. Note that
the fi rst-half of the frequencies is positive and the second-half negative.
R.5.99 Observe also that the real and imaginary parts of the transforms correspond to
the cosine (even) components and sine (odd) components, respectively. Note also
that the set of frequencies obtained are given as complex conjugate pairs.
R.5.100 Recall that the energy of the discrete-time sequence f(n) is given by

Energy
 



 


[()fn fn. ()*] fn()
nn

∑∑


2

R.5.101 Recall also that the average power Pave of the sequence f(n) with length N is given by

P


N


fn
n

ave
0

1


1 2


()




N

R.5.102 Note that the power content of a signal is the square of the absolute value of its DFT.
Free download pdf