Digital Signal Processing Reference
In-Depth Information
and
DFT (x cO [
]
=
[
]
n
)
Im (X
k
)
(3.12)
Example 3.7.
Write a short script to verify Eqs. (3.11) and (3.12).
The following will suffice; different sequences can be substituted for x if desired.
x=[1:1:8]; subx = x(1,2:length(x)); xe = 0.5*(subx + fliplr(subx));
xo = 0.5*(subx - fliplr(subx)); xeven = [x(1), xe], xodd = [0, xo];
DF Tevenpt = fft(xeven), ReDF Tx = real(fft(x))
N=length(x); var = sum([(DF Tevenpt-ReDF Tx)/N].ˆ2)
3.9 GENERAL CONSIDERATIONS AND OBSERVATIONS
The computation of each bin value X
[
]
is performed by doing a CZL (correlation at the zeroth lag)
between the signal sequence of length N and the complex correlator
k
]
Computation of the DFT using (3.7) directly is possible for smaller values of N . For larger values
of N ,a Fast Fourier Transform (FF T ) algorithm is usually employed. A subsequent section in this
chapter discusses the FFT.
cos
[
2 πkn/N
]−
j sin
[
2 πnk/N
3.9.1 BIN VALUES
•If x
[
n
]
is real-valued only, then X
[
0
]
is real-valued only and represents the average or DC component
of the sequence x
[
n
]
.
•If x
is real-valued only, since the sine of the frequency N/ 2 is
identically zero. For odd-length DFTs, there is no Bin N/ 2.
[
n
]
is real-valued only, X
[
N/ 2
]
Example 3.8.
Compute the DFT of the sequence
[
1 , 1
]
.
Note that for a 2-point DFT, the only frequencies are DC and 1-cycle (which is the Nyquist rate,
N/ 2). Both Bins 0 and 1 are therefore real. Bin 0 = sum(([1,1]).*cos(2*pi*(0:1)*0/2)) = 2 (not scaling the
DFT by 1 /N ). For Bin 1, we get Bin 1 = sum(([1,1]).*cos(2*pi*(0:1)*1/2)) = 0 (intuitively, you can see
that [1,1] is DC only, and has no one-cycle content).
Example 3.9.
Demonstrate the conjugate-symmetry property of the DFT of the real input sequence
cos ( 2*pi*1.3*(0:1:3)/4) + sin(2*pi*(0.85)*(0:1:3)/4)
We make the call
fft([cos(2*pi*1.3*(0:1:3)/4) + sin(2*pi*(0.85)*(0:1:3)/4)])
which returns the DFT as
Search WWH ::




Custom Search