The DFT
Last updated
Last updated
Whereas the CTFT takes a continuous signal and outputs a continuous frequency spectrum and the DTFT takes a discrete signal and outputs a continuous, periodic frequecy spectrum, the Discrete Fourier Transform takes a discrete finite signal and outputs a discrete frequency spectrum. This is useful for signal processing because we cannot store infinite signals in a computer’s memory.
One way to interpret the DFT is in terms of the Fourier series for a disrete periodic signal where the . Recall that the coefficient of the kth term of the Fourier Series is
Notice that the of the Fourier Series are the DFT values except scaled by a factor of . In other words, if we extend a finite signal periodically, then the DFT and the DTFS are the same up to a constant scale factor. This gives an intuitive inverse DFT.
Notice that the DFT and the IDFT are very similar in form. It turns out that the IDFT can be expressed as a DFT of . Namely
Further intuition for the DFT comes by relating it to the DTFT. Suppose we have a finite signal which is for and . The DTFT of this signal is
Suppose we sample the DTFT at intervals of , then the kth sample is given by
Thus we can think of the DFT as a evenly spaced samples of the DTFT. One important point to notice is that while the DTFT is often centered around 0 (meaning it is plotted over a range from to ), because we are summing from 0 to N-1 in the DFT, the DFT coefficients are centered around , and thus they are plotted on a range fo
When the DFT coefficients of two signals are multiplied, the resulting coefficients describe a circular convolution of the original two signals.
The mechanics of the circular convolution are the same as that of the regular convolution, except the signal is circularly shifted as shown in Figure 1.
A circular convolution is equivalent to a periodic convolution over a single period.
Take the Inverse DFT
If we compute the DTFT of each periodic extension, then
and the IDTFT of this will be
The first method of block convolution is the overlap-add method.
Since convolution is linear,
Compute the DFTs, multiply them, and take the inverse DFT.
The other method of block convolution is the overlap-save method.
Compute the DFTs, multiply the coefficients, and compute the inverse DFT.
It works by exploiting properties of the Nth roots of unity.
The roots of unity have the following properties.
These are just the DFTs of the even and odd elements of the signal!
The decimation in frequency approach is very similar to the decimation in time approach except instead we split the frequency components
Because multiplying DFT coefficients performs a specific case of convolution, we can compute a linear convolution using the circular convolution. Suppose we have two finite signals and The linear convolution of these two signals will be length , so in order to take an IDFT and get samples, we need to take at least points.
Pad each vector to length
Compute
If is smaller than , the result is akin to aliasing in the time domain. To see why, consider that the DFT coefficients are essentially the DTFS coefficients of the periodic extension of (denote ).
Notice that if is not large enough, then these copies will be overlapping (a.k.a aliasing). Since the DFT is just sampling the DTFT, the circular convolution will represent the true convolution so long as the copies don’t overlap.
In a discrete time system, the input signal might have a very long length, making it impractical to be stored in a computer’s memory or to compute the DFT of it all at once (especially if we have a real-time system). Thus to compute the output of a digital filter (with impulse response of length ), we need to compute the DFT in blocks shorter than the signal.
Decompose into nonoverlapping segments of length
Zero pad and to length to prevent time-domain aliasing
The neighboring outputs overlap in the last points, so add the overlapping sections together to get the final output
Divide into sections of length such that each section overlaps the previous by points
Zero pad and to length to prevent time domain aliasing.
The first samples of the output will be incorrect, so we can discard them.
The DFT gives us an easy way to do convolutions. Unfortunately naiively, computing it is an operation because we must sum together elements to compute different coefficients. Thankfully, there is a fast algorithm which can compute the DFT in time so we can compute convolutions quickly.
The fast fourier transform is an algorithm which computes the DFT efficiently in time.
The Nth roots of unity are the complex roots of .
When squared, the Nth roots of unity become the th roots of unity.
Using Theorem 1, Theorem 2, Theorem 3, we can take two approaches to the FFT: decimation in time, which splits into smaller subsequences, and decimation in frequency which splits into smaller subsequences.
The idea here is too break into smaller subsequences. We assume that is a power of 2 for simplicity.
We let and .
Both and are periodic, and notice that
This means once we compute and we can compute easily because
We can continue this relationship recursively downwards. Once we get too , we can represet this as a simple butterfly operation: