Computation of the DFT via the FFT

10.4.3 Computation of the DFT via the FFT

Although we now have discrete frequencies and use only summations to compute the direct and the inverse DFT, there are still several issues that should be understood when computing these trans- forms. Assuming that the given signal is finite length, or it is made finite length by windowing, we have:

Efficient computation with the FFT algorithm: A very efficient computation of the DFT is done by means of the FFT algorithm, which takes advantage of some special characteristics of the DFT, as we will discuss in Chapter 12. It should be understood that the FFT is not another transformation but an algorithm to efficiently compute DFTs. For now, we will consider the FFT as a black box that for an input x[n] (or X[k]) gives as output the DFT X[k] (or IDFT x[n]).

Causal aperiodic signals: If the given signal x[n] is causal of length N—that is, the samples

{x[n], n = 0, 1, . . . , N − 1}

are given—we can proceed to obtain {X[k], k = 0, 1, . . . , N − 1} or the DFT of x[n] by means of an FFT of length L = N. To compute an L > N DFT we simply attach L − N zeros at the end of the

C H A P T E R 10: Fourier Analysis of Discrete-Time Signals and Systems

above sequence and obtain L values corresponding to the DFT of x[n] of length L (why this could

be seen as a better version of the DFT of x[n] is discussed below in frequency resolution).

Noncausal aperiodic signals: When the given signal x[n] is noncausal of length N—that is, the samples

{x[n], n = −n 0 , . . . , 0, 1, . . . , N −n 0 − 1}

are given—we need to recall that a periodic extension of x[n] or ˜x[n] was used to obtain its DFT. This means that we need to create a sequence of N values corresponding to the first period of ˜x[n]—that is,

x[0] x[1] · · · x[N − n 0 − 1] x[ −n 0 ] x[ −n 0 + 1] · · · x[−1]

{z

{z

causal samples

noncausal samples where as indicated the samples x[ −n 0 ] x[ −n 0 + 1] · · · x[−1] are the values that make x[n] non-

causal. If we wish to consider zeros after x[N −n 0 − 1] to be part of the signal, so as to obtain a better DFT transform as we discuss later in frequency resolution, we simply attach zeros between the causal and noncausal components—that is,

x[0] x[1] · · · x[N − n 0 − 1] 00 · · · 0 0 x[−n 0 ] x[ −n 0 + 1] · · · x[−1]

{z

{z

noncausal samples to compute an L > N DFT of the noncausal signal. The periodic extension ˜x[n] represented

causal samples

circularly instead of linearly would clearly show the above sequence.

Periodic signals: If the signal x[n] is periodic of period N we will then choose L = N (or a multiple of N) and calculate the DFT X[k] by means of the FFT algorithm. If we use a multiple of the period (e.g., L = MN for some integer M > 0), we need to divide the obtained DFT by the value M. For periodic signals we cannot choose L to be anything but a multiple of N as we are really computing the Fourier series of the signal. Likewise, no zeros can be attached to a period (or periods when M > 1) to improve the frequency resolution of its DFT—by attaching zeros to a period we distort the signal.

Frequency resolution: When the signal x[n] is periodic of period N, the DFT values are normalized Fourier series coefficients of x[n] that only exist for the harmonic frequencies {2πk/N}, as no fre- quency components exist for any other frequencies. On the other hand, when x[n] is aperiodic, the number of possible frequencies depend on the length L chosen to compute its DFT. In either case, the frequencies at which we compute the DFT can be seen as frequencies around the unit cir- cle in the z-plane. In both cases one would like to have a significant number of frequencies in the unit circle so as to visualize the frequency content of the signal well. The number of frequencies considered is related to the frequency resolution of the DFT of the signal.

If the signal is aperiodic we can improve the frequency resolution of its DFT by increasing the number of samples in the signal without distorting the signal. This can be done by padding the signal with zeros (i.e., attaching zeros to the end of the signal). These zeros do not change the frequency content of the signal (they can be considered part of the aperiodic signal) but permit us to increase the available frequency components of the signal.