Digital Signal Processing Reference
In-Depth Information
From Tables 5.1 and 5.2, we determine that
F(v) = 2 sinc (v)e -jv .
F(v)
is sketched in Figure 12.15(b). From Figure 12.15(b), we see that the frequency spectrum
has its first null at We also see that, although the frequency spectrum does not
have an absolute bandwidth, the magnitude of the sidelobes decreases with frequency. We
choose a sampling frequency of This requires a sampling period of
We choose to use 16 samples for the computation. Therefore, the discrete-frequency resolu-
tion of our calculated frequency spectrum will be The discrete-time sequence of samples
is shown in Figure 12.16(a). The 16-point, radix-2 FFT is used to calculate the DFT. The
magnitude of the discrete-frequency sequence is shown in Figure 12.16(b).
Because the DFT is calculated from discrete-time samples, we must multiply by
the sampling period T to cancel out the factor of 1/ T inherent to the Fourier transform of
sampled signals (5.42).
We now want to see how good an approximation of
v = p rad/s.
v s = 10p rad/s.
T = 0.2 s.
2p
16 .
f[n]
ƒF[k] ƒ
F(v)
we have in the T
F[k]
that we
compute from the 16 samples of
f(t).
This will be determined by calculating the value of
y[m]
at a few frequencies
(v 6 v s /2)
that correspond to a value of k in
F[k].
Table 12.5 gives a
comparison of the values.
From Table 12.5 and Figure 12.17, we see that the Fourier-transform approximation found
by computing the DFT is not perfect. Although the approximation is reasonably accurate for
samples where there are some errors in both magnitude and phase.
The results shown in Table 12.5 and Figure 12.17 can be reproduced by the following
MATLAB program:
v 6 v s /2 = 15.708 rad/s,
% This MATLAB program reproduces the results of
% Example 12.14.
Ts=0.2
fn=[1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0];
n=[0:length(fn)-1];
figure(1),stem(n,fn,'fill'),grid
Fk=fft(fn,length(fn));
w=2*pi/length(fn)/Ts*n;
Ft=2*sin(w).*exp(j*w)./w;
Ft(1)=2;
' k omega (w) |F(w)| Ts*|F[k]| phase(F(w)) phase(F[k])'
[n', w', abs(Ft)', Ts*abs(Fk)', angle(Ft)', angle(Fk)']
figure(2),stem(w,Ts*abs(Fk),'filled'),hold,plot(w,abs(Ft),'r+'),
title('Fast Fourier Transform')
grid, xlabel('omega'), ylabel('magnitude'),hold
One source of error such as that seen in Example 12.14 is the “windowing,” or
truncation, of the periodic extension of the discrete-time sequence implied in the
DFT development. This windowing has the effect of multiplying the periodic exten-
sion of the sequence by a sequence that represents samples of a rectangular pulse
with duration NT . The effect we have just described is illustrated in Figure 12.18. In
Figure 12.18(a), we see a nonperiodic, ideally sampled signal Figure 12.18(b)
shows the periodic extension of the signal that is implicit in the DFT implementation.
The rectangular windowing function is shown in Figure 12.18(c). The product of the
windowing function and the periodic extension results in the discrete-time sequence
The sequence
x[n]
x(nT).
x[n].
x[n]
contains the values of
x p (nT)
for
0
F
n
F N - 1.
x[n]
 
Search WWH ::




Custom Search