Digital Signal Processing Reference
In-Depth Information
2
2
1.5
1.5
1
1
0.5
0.5
0
0
−30 p
−20 p
−10 p
0
10 p
20 p
30 p
−30 p
−20 p
−10 p
0
10 p
20 p
30 p
(a)
(b)
Fig. 12.7. Spectral estimation of
complex exponential signal
x ( t ) = 2 exp( j19π t ) using the
DFT in Example 12.8.
(a) Estimated magnitude
spectrum, with a 32-point DFT.
(b) Same as part (a) except that
a 64-point DFT is computed.
>> x = 2*exp(j*19*pi*k/32); % compute the DT sequence
>> X = fft(x); % determine the 64-point DFT
>> X = fftshift(X); % shift the DFT coefficients
>> X = 0.5*t1*X; % scale DFT so DFT = CTFT
>> w = 2*pi*f1/N; % CTFT frequency resolution
>> w = -pi*f1:dw:pi*f1-dw; % compute CTFT frequencies
>> stem(w,abs(X));
% plot CTFT magnitude spectrum
In the above code, we have highlighted the instructions that have been changed
from the original version. In addition to setting the length N to 64 in the above
code, we also note that the magnitude of the CTFT X is now being scaled by
a factor of 0 . 5 T 1 . The additional factor of 0.5 is introduced because we are
now computing the DFT over two consecutive periods of the periodic sequence
x [ k ]. Doubling the time duration doubles the values of the DFT coefficients,
and therefore a factor of 0.5 is introduced to compensate for the increase.
Figure 12.7(b), obtained using a 64-point DFT, is a better estimate for the
magnitude spectrum of x ( t ) than Fig. 12.7(a), obtained using a 32-point DFT.
The DFT can also be used to estimate the DTFT of DT sequences. Examples
12.9 and 12.10 compute the DTFT of two aperiodic sequences.
Example 12.9
Using the DFT, calculate the DTFT of the DT decaying exponential sequence
x [ k ] = 0 . 6 k
u [ k ].
Solution
Estimating the DTFT involves only Steps 2 and 3 outlined in Section 12.1.
Step 2: Time-limitation Applying a rectangular window of length N
= 10,
the truncated sequence is given by
0 . 6 k
0 k 9
x w [ k ] =
0
elsewhere.
Search WWH ::




Custom Search