Page 874 - The Mechatronics Handbook
P. 874
0066-frame-C29 Page 4 Wednesday, January 9, 2002 7:23 PM
If a signal has periodic content, but is not periodic, such as x[n] = cos(0.5πn) + cos(0.2n), then leakage
cannot be avoided by a selection of N. An alternate means of reducing leakage is to first taper the signal
to zero at the initial and end points of the sequence prior to computing the DFT. This process, known
as windowing the data, is accomplished by multiplying x[n] by a window function w[n] and then
performing the DFT on the product x[n]w[n]. Three common windows are the rectangular window,
which is a sharp truncation, the Hanning window, and the Hamming window [1].
Rectangular Window:
w[n] = 1, 0 ≤ n ≤ N − 1
Hanning Window:
2pn
wn[] = 1 cos ------------- ,0 ≤ n ≤ N 1
-- 1 –
–
2 N 1
–
Hamming Window:
2pn
wn[] = 0.54 0.46cos ------------- , 0 ≤ n ≤ N 1
–
–
N 1
–
If the value of N in a DFT is a power of 2, there is a fast method to compute the DFT called the fast
Fourier transform (FFT). If the value of N is not a power of 2, zeros can be padded to the end of the
signal in order to use the FFT. This does not affect the accuracy of the result, but it does improve the
resolution of the resulting plot when the DFT (or FFT) is used to compute the DTFT. In many cases,
the expression used in Eq. (29.4) suffices to compute the DFT since the added computational power of
today’s processors lessens the need for the numerical efficiency of the FFT. The details of the algorithm
for the FFT are beyond the scope of this handbook. See [1] or [2] for details.
29.3 Continuous-Time to Discrete-Time Mappings
While most physical systems operate in continuous-time, computers operate in discrete-time. Therefore,
in order to use computers to process measurements taken from continuous-time systems, there must be
ways of mapping between the continuous-time world to the discrete-time world.
Discretization
Before an analog signal can be analyzed using digital techniques, it must be discretized (that is, converted
into a discrete-time signal). The ideal method for discretization is sampling, where the values of the signal
are determined at discrete points in time. Generally, the signal is sampled at a fixed rate known as the sampling
period. The sampling rate (in hertz) is the inverse of the sampling period. Figure 29.2 depicts a 1 Hz signal
that has been sampled at two rates. The dark points are sampled at 15 ms intervals, while the lighter points
are sampled at 250 ms intervals. From Fig. 29.2, the waveform approximation clearly degrades as the sampling
frequency is reduced and approaches the signal frequency. In fact, it can be shown that a signal must be
sampled at a frequency that is higher than twice its maximum frequency content. This is known as the Nyquist
Sampling Theorem. For example, if the signal in Fig. 29.2 is sampled at 0.5 Hz, it is possible for every sample
to have a value of 0 as at 0, 500, 1000 ms, etc… the value of the signal is 0. The erroneous interpretation of
the signal due to a sample frequency that is too low is known as aliasing. There are two means by which the
Nyquist Sampling Theorem can be satisfied. The first is by employing a sample frequency that is more than
twice the highest frequency content of the signal being sampled. This value frequency is known as the Nyquist
frequency. As one never is sure of the actual frequency content of a real signal, a low pass filter may be used
to ensure that a signal does not possess frequencies above a certain cut-off level. Such a filter is commonly
©2002 CRC Press LLC

