1
$\begingroup$

When trying to comprehend the concept of Nyquist frequency in FFT, I came across the following definition for half of the frequency range:

$$f = -f_{n}/2:df:f_{n}/2-1;$$

where $f$ represents the frequency vector and $f_n$ represents the Nyquist frequency.

Why only take half of the frequency range into consideration? And why specifically this half and not start at the 0 point?

I understand that the Nyquist frequency is used in signal processing to avoid aliasing, but how was the above range set as a relation between the frequency vector and the Nyquist frequency?

$\endgroup$
2
  • 1
    $\begingroup$ This is not half the frequency range. It is the whole frequency range. Any other band of frequencies would either overlap this range or be an alias of this range. $\endgroup$
    – The Photon
    Commented Aug 9, 2021 at 14:48
  • $\begingroup$ But why not start from 0 to $f_n$ instead? And why do we take 1 in the end, instead of leaving it solely as $f_n/2$? Thank you for your help. $\endgroup$ Commented Aug 9, 2021 at 16:54

1 Answer 1

1
$\begingroup$

Why only take half of the frequency range into consideration?

This is actually the full frequency range. Any other frequency you can think of outside this range is an alias of some frequency in this range.

And why specifically this half and not start at the 0 point?

It's an arbitrary choice.

One reason to do it this way is if you are using the discrete Fourier transform (The FFT being one method of calculating the DFT) as an approximation for a continuous-time Fourier transform, then using the range $[-f_n/2,f_n/2]$ gives an approximation of what would be measured over the same frequency range in the continuous-time system. while if you use the range $[0,f_n]$ the person examining the data will have to consider that in the continuous-time system being approximated the features seen in the range $[f_n/2, f_n]$ would actually occur (assuming the sampling rate is above the Nyquist rate) in the range $[-f_n/2,0]$.

And why do we take 1 in the end, instead of leaving it solely as fn/2?

That "1" should actually be $df$. Or else $f_n/2-1$ should have been $f_{n/2-1}$.

You need to subtract it off because frequency $f_n$ is an alias of $-f_n$, so the DFT does not provide separate results for both frequencies.

$\endgroup$

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