2.7 Advanced: Summary of equations for DFT / FFT Usage
The DFT resolution in radians is . Using , one can note that the continuous-time angular frequency rad/s corresponds to the angle rad. Hence, the DFT frequency spacing is
| (2.37) |
For example, assuming Hz, a DFT of points has a resolution of Hz. In radians, this resolution corresponds to rad.
Note that can also be written as , where is the total duration of the signal being analyzed, such that
| (2.38) |
Hence, a spectral analysis with resolution of at least Hz requires a data record of length
| (2.39) |
The following example illustrates the interpretation in Hz of a DFT result. The DFT performs a sampling operation on the frequency domain according Eq. (2.35). As illustrated in Figure 2.7, a DFT with points (or 3-DFT) uses three basis functions with the angles rad, i. e., a counter-clockwise rotation using a step of . These angles correspond to , respectively, as indicated by Eq. (2.11). Note that in Figure 2.7, incrementing corresponds to a clockwise rotation, given that Eq. (2.17) defines the twiddle factor with a negative exponent.
The three angles of a 3-DFT correspond to Hz, respectively, as indicated by or directly observing that the DFT uses a grid of . For , the four angles correspond to the frequencies Hz. The angle corresponding to is always 0 rad, which is called DC because corresponds to 0 Hz. Note that for the DFT values correspond to negative frequencies. The angular frequency corresponding to the -th angle is
| (2.40) |
which corresponds to the regular (linear) frequency
| (2.41) |
The values representing the largest frequency when is even is
| (2.42) |
which corresponds to rad and Hz. When is odd, the value at
| (2.43) |
is the one representing the largest frequency Hz. Table 2.6 summarizes some equations typically used with FFT algorithms.
Expression | Reference | Comment |
Eq. (2.37) | Frequency spacing (Hz) | |
Eq. (2.38) | Dependence on signal duration (Hz) | |
Eq. (2.64) | Frequency spacing (rad) | |
Eq. (2.41) | Frequency of -th tone (Hz) | |
Eq. (2.40) | Frequency of -th tone (rad) | |
Eq. (2.42) | Highest frequency (Hz) for even | |
Eq. (2.43) | Highest frequency (Hz) for odd | |
2.7.1 Advanced: Three normalization options for DFT / FFT pairs
As discussed, the following three transforms differ only on the normalization factor: DFT, unitary DFT and DTFS. Generalizing Eq. (2.20) and Eq. (2.21), the “core” DFT transform equations can be written as follows:
| (2.44) |
and
| (2.45) |
As indicated in Eq. (2.25), the only requirement to have a valid pair is that
| (2.46) |
In summary, the three popular options for choosing and :
-
DFT as samples of the DTFT (in frequency domain):
(2.47) Matlab/Octave implements this transform in its fft and ifft routines. It allows to estimate the DTFT at specific values of using Eq. (2.35). Also, it is the fastest in the direct transform because there is no scaling factor to be accounted for.
-
Unitary DFT:
(2.48) Because this transform is unitary, Theorem 2 applies and the energy sum(abs(X).^2) in frequency and time sum(abs(x).^2) domains coincide. To implement the unitary DFT when using Matlab/Octave one can call X=fft(x)/sqrt(N) and x=ifft(X)*sqrt(N) for the direct and inverse transforms, respectively.
-
DFT as DTFS in case the number of DFT points coincides with the signal period:
(2.49) In this case, the DFT coefficients can be interpreted in volts when the time-domain signal is given in volts. If the signal is periodic with fundamental period coinciding with the number of DFT points, choosing Eq. (2.49) allows to obtain the DTFS coefficients via the DFT. To implement this version when using Matlab/Octave, one can call X=fft(x)/N and x=ifft(X)*N for the direct and inverse transforms, respectively.
The next two sections present the Laplace and Z transforms.14 Both have two parameters that identifies each basis functions, in contrast to Fourier equations that have only the frequency. This extra degree of freedom, represented by sets of basis functions that are more powerful than the ones used in Fourier analysis, has the advantage of allowing the representation of a larger class of signals (and systems). A disadvantage is that the inverse transform is defined as a contour integration in the complex plane, which is an area of complex analysis that is out of the scope of this text. But it is rarely necessary to calculate the inverse transform using complex analysis. The Laplace and Z inverse transforms will be calculated here only by an alternative method called partial fraction expansion, which is discussed in the Appendix, Section A.10.
The Laplace and Z transforms are widely used to represent the action of linear and time-invariant systems, as will be detailed in Chapter 3. The Laplace transform has a number of properties that make it useful for analyzing linear systems. The most prominent advantage is that differentiation and integration become multiplication and division, respectively, by . For example, this converts differential equations into polynomial equations, which are much easier to solve and, once solved, the inverse Laplace transform can provide the time domain formula. Similarly, Z transforms are useful to analyze discrete-time systems.