DSP Algorithms for RF Systems

Trending

Buy the Book!

DSP for Beginners: Simple Explanations for Complex Numbers! The second edition includes a new chapter on complex sinusoids.

DFT Frequency Resolution Explained
March 16, 2022

Table of Contents

Introduction

Frequency resolution is defined as the ability to perfectly distinguish one frequency from another. The DFT frequency resolution is improved by increasing the signal length, not increasing the DFT size. The frequency resolution \omega_{res} in radians of the DFT is

(1)   \begin{equation*}\omega_{res} = \frac{2\pi}{N}\end{equation*}

where N is the length of the input signal.

In this blog I demonstrate graphically and mathematically why and how increasing the signal length improves the frequency resolution, and why simply increasing the DFT size does not.

More blogs on DSP:

Discrete Fourier Transform (DFT)

The discrete-Fourier transform (DFT) translates the time-domain x[n] into the frequency domain X[k]. The number k refers to the k^{th} frequency bin of the frequency domain. The frequency domain X[k] contains information about the amplitude |X[k]| and \sphericalangle{X[k]} phase of the complex sinusoids in the time-domain signal x[n]. The DFT is given by

(2)   \begin{equation*}X[k] = \sum_{n=0}^{N-1} x[n]e^{-j2\pi k n/N}\end{equation*}

where N is the length of the signal x[n]. The k^{th} frequency bin represents the 2\pi k/N.

4-point DFT Frequency Resolution Math

What is the frequency resolution of the DFT? Let’s start with a simpler case and ask the question, what is the frequency resolution of a 4-point DFT X[k] taken over x[n] which is 4 samples long?

Let’s answer a series of questions to get us to the answer. What does frequency resolution mean? Consider this as: what frequencies can be perfectly distinguished by the 4-point DFT? The DFT can perfectly distinguish frequencies when the energy from a signal resides only in a single frequency bin and does not smear into adjacent bins.

Continuing down this path we can also ask: what signals contain content at a single frequency? Recall that the Fourier transform of a complex sinusoid with frequency \omega_{c} is [oppenheim1999, p.62]

(3)   \begin{equation*}X_{c}\left( e^{j\omega} \right) = 2 \pi \delta \left( \omega - \omega_{c} \right),\end{equation*}

therefore a complex sinusoid is a signal which has information content at a single frequency.

The next question: what frequency (or frequencies) of the complex sinusoid \omega_{c} correspond to the frequencies that can be perfectly resolved by the 4-point DFT? The DFT is able to perfectly estimate frequencies 2\pi k/N which are the frequencies of the complex sinusoid in (2). The frequency of the complex sinusoid \omega_{c} is set equivalent to the DFT frequencies,

(4)   \begin{equation*}\omega_c = \frac{2\pi k}{N}.\end{equation*}

Substituting N=4 into (4),

(5)   \begin{equation*}\omega_c = \frac{2 \pi k}{4} = \frac{\pi}{2} k.\end{equation*}

The bin index is defined as k = 0, 1, 2, 3 therefore the frequencies \omega_c of the complex exponential which can be perfectly resolved by the 4-point DFT are 0, \pi/2, \pi, 3\pi/2.

The frequency resolution of the 4-point DFT is the difference between two adjacent frequencies, for example

(6)   \begin{equation*}3\pi/2 - \pi = \pi/2.\end{equation*}

The frequency resolution can be written as a normalized frequency by dividing (6) by the sampling frequency in radians (which is 2\pi),

(7)   \begin{equation*}\frac{\pi}{2} \cdot \frac{1}{2\pi} = \frac{1}{4},\end{equation*}

which is equivalent to one-quarter the sampling frequency f_s/4 in Hz.

DFT Frequency Resolution Graphical Example

Let’s consider the same question about frequency resolution of the 4-point DFT from a graphical perspective. Figures 1-4 show the time domain for the complex exponentials and the magnitude of their corresponding frequency responses. All of the time-domain plots give the underlying “CT” or continuous-time complex sinusoid for illustrative purposes. The “DT” is the 4-sample discrete time complex sinusoid.

Figure 1: The complex sinusoid e(j2 pi (0/4) n) only contains energy at X[0].
Figure 1: The complex sinusoid e(j2 pi (0/4) n) only contains energy at X[0].
Figure 2: The complex sinusoid e(j2 pi (1/4) n) only contains energy at X[1].
Figure 2: The complex sinusoid e(j2 pi (1/4) n) only contains energy at X[1].
Figure 3: The complex sinusoid e(j2 pi (2/4) n) only contains energy at X[2].
Figure 3: The complex sinusoid e(j2 pi (2/4) n) only contains energy at X[2].
Figure 4: The complex sinusoid e(j2 pi (3/4) n) only contains energy at X[3].
Figure 4: The complex sinusoid e(j2 pi (3/4) n) only contains energy at X[3].

Figures 1-4 show that the 4-point DFT can perfectly resolve or distinguish the four different complex sinusoids. The frequency resolution is \pi/2, which is normalized to f_s/4 or 1/4 ^{th} the available bandwidth.

Problem with DFT Frequency Resolution

Figure 5 shows the time domain and magnitude of the frequency domain for the complex sinusoid

(8)   \begin{equation*}e^{j2\pi (1.5/4) n}\end{equation*}

for n=0, 1, 2, 3. Notice that the frequency 2\pi 1.5/4 does not fall cleanly into one of the bins of the DFT, instead it resides in between X[1] and X[2]. The magnitude of the frequency response shows that the energy is smeared across all of the bins, X[0], X[1], X[2], X[3] because it is below the frequency resolution and it cannot be resolved to a single bin.

Figure 5: The complex sinusoid e(j2 pi (1.5/4) n) is smeared across all bins of X[k] because it is smaller than the DFT frequency resolution.
Figure 5: The complex sinusoid e(j2 pi (1.5/4) n) is smeared across all bins of X[k] because it is smaller than the DFT frequency resolution.

Increasing DFT Size

Note that the frequency resolution is not dependent on the DFT size, the frequency resolution is dependent on the signal length!

Let’s confirm this by increasing the DFT size from 4 to 8. The complex sinusoid (8) with frequency 2\pi 1.5/4 resides between the two bins X[1] and X[2] for the 4-point DFT. So if the DFT size is increased from 4 to 8, there will be twice the amount of bins and one land at frequency 2\pi 1.5/4, or for an 8-point DFT, frequency 2\pi 3/8.

The input signal has not changed (4 samples), however there are now twice as many bins in the frequency response (8 bins) because the DFT size has been increased. Figure 6 shows time domain and frequency domain when increasing the DFT size to 8.

Figure 6: Increasing the DFT size has not improved the DFT frequency resolution. The energy from the complex sinusoid is still smeared across multiple bins.
Figure 6: Increasing the DFT size has not improved the DFT frequency resolution. The energy from the complex sinusoid is still smeared across multiple bins.

Why is it that increasing the DFT size did not improve the frequency resolution? Figure 6 shows there is now a peak at bin 3 which corresponds to frequency 2\pi 3/8 = 2\pi 1.5/4, however there is still the smearing effect across many of the frequencies.

Interpolation versus Resolution

The complex sinusoid (8) with frequency 2\pi 1.5/4 cannot be resolved by increasing the DFT size. Why? Zero padding in the time domain is applied to take a larger DFT. Since the input signal x[n] is 4 samples long an additional 4 samples of zeros have to be added to the end of the time domain. No new information about the signal has been added, increasing the DFT size simply allows better interpolation between bins but does not improve the frequency resolution.

Think of it this way: you can zoom into an image on a computer screen, but if the image is low-resolution, zooming in (interpolating) will simply give you a bigger pixelated image but will not give you better resolution.

Zooming in on an image increases the dimensions through interpolation. However, it does not add any new information and therefore does not increase the resolution. Image: Under the Wave off Kanagawa.
Zooming in on an image increases the dimensions through interpolation. However, it does not add any new information and therefore does not increase the resolution.

Better DFT Frequency Resolution by Increasing Signal Length

The DFT frequency resolution is dependent on the length of the signal. The complex sinusoid (8) is increased in length from 4 samples to 8 samples and plotted in Figure 7 along with the magnitude of the frequency response from the 8-point DFT.

Figure 7: Increasing the length of the signal by 2 improved the DFT frequency resolution by a factor of 2! Compare the frequency response of Figure 6, both of which have 8-point DFTs.
Figure 7: Increasing the length of the signal by 2 improved the DFT frequency resolution by a factor of 2! Compare the frequency response of Figure 6, both of which have 8-point DFTs.

Notice that the complex sinusoid (8) in Figure 7 can now be perfectly resolved to bin k=3, as compared to Figure 6. Increasing the signal length increases the DFT frequency resolution.

Conclusion

The DFT frequency resolution is dependent on the length of the data signal, not the DFT size! Increasing the signal length by a factor of L results in an increase in the frequency resolution by a factor of L. A larger DFT size alone provides more interpolation between bins but does not increase the frequency resolution. Frequency resolution is defined as the ability to perfectly distinguish one frequency from another.

More blogs on DSP:

Leave a Reply

For everything there is a season, and a time for every matter under heaven. A time to cast away stones, and a time to gather stones together. A time to embrace, and a time to refrain from embracing. Ecclesiastes 3:1,5
The earth was without form and void, and darkness was over the face of the deep. And the Spirit of God was hovering over the face of the waters. Genesis 1:2
Behold, I am toward God as you are; I too was pinched off from a piece of clay. Job 33:6
Enter His gates with thanksgiving, and His courts with praise! Give thanks to Him; bless His name! Psalm 100:4
Lift up your hands to the holy place and bless the Lord! Psalm 134:2
Blessed is the man who trusts in the Lord, whose trust is the Lord. He is like a tree planted by water, that sends out its roots by the stream, and does not fear when heat comes, for its leaves remain green, and is not anxious in the year of drought, for it does not cease to bear fruit. Jeremiah 17:7-8
He said to him, “You shall love the Lord your God with all your heart and with all your soul and with all your mind. This is the great and first commandment. And a second is like it: You shall love your neighbor as yourself. On these two commandments depend all the Law and the Prophets.” Matthew 22:37-39
Then He said to me, “Prophesy over these bones, and say to them, O dry bones, hear the word of the Lord. Thus says the Lord God to these bones: Behold, I will cause breath to enter you, and you shall live." Ezekiel 37:4-5
Riches do not profit in the day of wrath, but righteousness delivers from death. Proverbs 11:4
The angel of the Lord appeared to him in a flame of fire out of the midst of a bush. He looked, and behold, the bush was burning, yet it was not consumed. And Moses said, “I will turn aside to see this great sight, why the bush is not burned.” When the Lord saw that he turned aside to see, God called to him out of the bush, “Moses, Moses!” And he said, “Here I am.” Exodus 3:2-3
Daniel answered and said: “Blessed be the name of God forever and ever, to whom belong wisdom and might. He changes times and seasons; He removes kings and sets up kings; He gives wisdom to the wise and knowledge to those who have understanding." Daniel 2:20-21
Now the Lord is the Spirit, and where the Spirit of the Lord is, there is freedom. 2 Corinthians 3:17
Previous slide
Next slide

This website participates in the Amazon Associates program. As an Amazon Associate I earn from qualifying purchases.

© 2021-2024 Wave Walker DSP