0
$\begingroup$

I have some misunderstanding in definition of frequency resolution of the signal. Here it is assumed that the resolution is: $$\hat{f_k}=f_{signal}\cdot T_{sampling}$$ (which is just relation of signal frequency to sampling frequency).

However, for example in the standard Python function for calculating frequency resolution of FFT, it is: $$\Delta f = \frac{f_{sampling}}{N}$$.

Why these definitions different?

$\endgroup$
11
  • 1
    $\begingroup$ the wording "frequencies in frequency domain" indicates you're misunderstanding something. Do you maybe mean "relative frequencies" (in discrete) domain? $\endgroup$ Commented Dec 1, 2021 at 17:40
  • $\begingroup$ @MarcusMüller, sorry for this incorrect definition, I mean the list of frequencies, which we get for example, when we do Fourier transform. $\endgroup$
    – Curious
    Commented Dec 1, 2021 at 17:55
  • 1
    $\begingroup$ this makes even less sense, because none of what you have in your question is a list, and the Fourier Transform (continuous-time) doesn't give you a list, either! The documentation of fftfreq is quite unambiguous, so I really don't understand how you can come to the conclusion that these are the same thing. Sorry, please edit your question to be 100% exactly what you mean. You say you have a misunderstanding problem, so being anything but pedantic with your own language will just lead to more misunderstandings. $\endgroup$ Commented Dec 1, 2021 at 18:05
  • 1
    $\begingroup$ Does this answer your question? Specific Frequency Resolution $\endgroup$ Commented Dec 1, 2021 at 23:35
  • 1
    $\begingroup$ and this: dsp.stackexchange.com/questions/24685/… $\endgroup$ Commented Dec 1, 2021 at 23:36

1 Answer 1

2
$\begingroup$

A lot about frequency resolution and FFT's is revealed by understanding the correlation property of a frequency offset between two otherwise identical signals as demonstrated in the plots below. Here we see the results of correlating a 3 Hz tone sampled at 1 KHz with another tone at various frequencies, where here correlation is given as $\sum_{n=0}^{N-1}y[n]x^*[n]$. From this we see the universal take-away that is applicable to both analog and digital signals (such as the FFT) that the correlation is a Sinc function with the first null at $1/T$. This can also be explained by convolving the Fourier Transform of a rectangular window (which is effectively selecting the time block of data), which then extends to what occurs when we select the data with other windows (decreases the resolution as the Fourier Transform of the window ends up being wider in the main lobe than a Sinc function). However this most immediate view I give here, starting with really understanding correlation, I find to be most intuitive and far reaching across multiple applications in signal processing.

Given the relationship between sampling rate and $N$ in the DFT, the result that $\Delta F = F_s/N$ is identical to the conclusion here that $\Delta F$ is $1/T$ when $F$ is in units of Hz and $T$ is in units of seconds.

The plots below show the sampled cosine wave buried in a significant amount of noise, and showing how we can "pull the signal out of the noise" by using correlation techniques. This is exactly what the DFT (and more generally the Fourier Transform) does, and as such it allows us to determined the presences of each frequency (as given by $e^{jn \omega_k} = e^{j2\pi nk/N}$) in an arbitrary waveform. Observe the formula for the DFT and we see this same correlation expression I introduced above:

$$X[k] = \sum_{n=0}^{N-1}x[n]e^{-j2\pi nk/N}$$

1 second block of data

2 second block of data

Why do we lose correlation versus frequency offset? Consider the correlation process sample by sample, and frequency as a rotating phasor on the complex plane. When the two signals are at the same frequency, the complex conjugate multiplication in the correlation formula causes the resulting phasor from each product to be aligned as in the graphic below, and the resulting summation grows to a very large number (such as the scaling by $N$ in the DFT!):

Corr same freq

However if there is a slight frequency offset, the resulting phasors from each product will have an increasing rotation from sample to sample. When we are off in frequency by $1/T$, the total summation over that time will sum to 0!.

frequency offset

(Note that specifically in these plots the "3 Hz Tone" is $e^{j2\pi 3t}$ and the real portion of that is plotted as $\cos(2\pi 3 t)$. A correlation with $\cos(2\pi 3 t)$ would be similar but the discerning eye may notice the difference given the effect of the positive and negative frequency components of $\cos(2\pi 3 t)$. This detail is of little importance for most readers).

$\endgroup$
7
  • $\begingroup$ thank you! but, am I right, two above plots are identical? and the first null is around 0? $\endgroup$
    – Curious
    Commented Dec 9, 2021 at 13:38
  • $\begingroup$ sorry i pasted wrong plot... $\endgroup$ Commented Dec 9, 2021 at 13:45
  • $\begingroup$ thank you for the edits! could you please explain, why do you connect the first null of the correlation function and $\Delta f$, I still can't figure out, how the very long signal can have better resolution... $\endgroup$
    – Curious
    Commented Dec 9, 2021 at 13:54
  • $\begingroup$ @Curious i hope what I added clears that up for you. $\endgroup$ Commented Dec 9, 2021 at 13:59
  • $\begingroup$ $y[n]$ for noisy signal? and frequency offset is $\Delta f$? $\endgroup$
    – Curious
    Commented Dec 9, 2021 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.