From the previous discussion, you should now have some intuition on how the DFT works.
In effect, an inner product is computed of a given discrete-time signal and complex exponential signals representing sine and cosine terms at discrete frequencies . Each of these inner product computations produces a single complex valued “weight” that indicates the relative strength of a specific sinusoidal frequency in the signal.
Figure 4 shows the first 5 cosine and sine terms of the complex exponential signals used in a length DFT.
Figure 4:
The first 5 cosine and sine terms used in a length DFT.
The frequencies evaluated by the DFT are directly related to the size of the signal . These frequencies are evenly distributed from 0 to
, so that the larger the value of , the more precise the estimate of frequency content in the signal. However, from the sampling theorem, only those frequency components less than or equal to are unique.
As mentioned earlier in this section, sinusoids are periodic functions. Thus, for a DFT component to perfectly match a given signal, the signal would have to be periodic and only contain frequency components that are integral multiples of .
Remembering that periodic signals must have harmonic spectra, we see that the DFT computes the amplitudes and phases of a harmonic set of sinusoidal components, each having an integer number of periods in samples.
If the signal is not periodic in , the DFT will only provide an approximation of its actual frequency content.