Page 165 - Applied Numerical Methods Using MATLAB
P. 165
154 INTERPOLATION AND CURVE FITTING
large at k = 4,5 and 9,10, and they can be alleged to represent two tones of kω 0 =
2πk/NT = 2πk/6.4 ≈ 1.25π ∼ 1.5625π and 2.8125π ∼ 3.125π. The magni-
tude of X d (k) (Fig. 3.13d) is also large at k = 5 and 10, each corresponding to
kω 0 = 1.5625 π ≈ 1.5 π and 3.125 π ≈ 3π.
It is strange and interesting that we have many different DFT spectra for the same
analog signal, depending on the DFT size, the sampling period, the whole interval,
and zero-padding. Compared with spectrum (a), spectrum (b) obtained by decreas-
ing the sampling period T from 0.1s to 0.05s has wider analog frequency range
[0,2π/T b ], but the same analog resolution frequency is ω 0 = 0 /T b = 2π/N b T b =
π/1.6 ≡ 2π/N a T a ; consequently, it does not present us with any new information
over (a) for all increased number of data points. The shorter sampling period may be
helpful in case the analog signal has some spectral contents of frequency higher than
π/T a . The spectrum (c) obtained by zero-padding has a better-looking, smoother
shape, but the vividness is not much improved compared with (a) or (b), since the
zeros essentially have no valuable information in the time domain. In contrast with
(b) and (c), spectrum (d) obtained by extending the whole time interval shows us
the spectral information more distinctly.
Note the following things:
ž Zero-padding in the time domain yields the interpolation (smoothing) effect
in the frequency domain and vice versa, which will be made use of for data
smoothing in the next section (see Problem 3.19).
ž If a signal is of finite duration and has the value of zeros outside its domain
on the time axis, its spectrum is not discrete, but continuous along the
frequency axis, while the spectrum of a periodic signal is discrete as can be
seen in Fig. 3.12 or 3.13.
ž The DFT values X(0) and X(N/2) represent the spectra of the dc component
( 0 = 0) and the virtually highest digital frequency components ( N/2 =
N/2 × 2π/N = π [rad]), respectively.
Here, we have something questionable. The DFT spectrum depicted in Fig. 3.12
shows clearly the digital frequency components 200 = 2π × 200/N and 300 =
2π × 300/N[rad](N = 2 10 = 1024) contained in the discrete-time signal
10
x[n] = cos(2π × 200n/N) + 0.5sin(2π × 300n/N), N = 2 = 1024
(3.9.3)
and so we can find the analog frequency components ω k = k /T as long as
the sampling period T is known, while the DFT spectra depicted in Fig. 3.13
are so unclear that we cannot discern even the prominent frequency contents.
What’s wrong with these spectra? It is never a ‘right-or-wrong’ problem. The
only difference is that the digital frequencies contained in the discrete-time signal
described by Eq. (3.9.3) are multiples of the fundamental frequency 0 = 2π/N,
but the analog frequencies contained in the continuous-time signal described by
Eq. (3.9.2) are not multiples of the fundamental frequency ω 0 = 2π/NT ;in
other words, the whole time interval [0,NT ) is not a multiple of the period of
each frequency to be detected. The phenomenon whereby the spectrum becomes