0
$\begingroup$

I am trying to understand the logic behind making a frequency axis in DFT. I am using for time based light absorbance. When we have even number of data points (N= even integer), collected over a length of time A, the lowest frequency $\omega_1$ that can be resolved is 1/A, the next step is 2/A, the $k^{th}$ step is k/A, where k =1,2,3..., N/2. The highest frequency $\omega_{max}$ = N/2A based on Shannon's or Nyquist criterion. This the maximum value on the frequency axis.

How do we scale the frequency axis of FFT when we have odd number of data points (N+1) collected over a length of time A, where N is a even number? I cannot find similar reasoning for scaling when we have odd number of data points except in the book excerpt below.

EDITS

  1. The step size of frequency in case of odd number of data points: k/A whether the data points are even or odd.

Please see the excerpt from a book called DFT: An Ownwer's Manual by Briggs. What is the author trying to say when he says that the highest frequency $$\frac{N}{(2A)}$$ does not quite coincide with the endpoint of the frequency domain which have the values $\Omega$/2?Please note that the author is using N as an even number.

Is he indicating that there is a slight error when we have a DFT of an odd number of datapoints?

$\endgroup$

1 Answer 1

1
$\begingroup$

This can be answered simply by considering the definition of the $N$-point DFT:

$$X_N[n] = \sum_{k=0}^{N-1} x[k]e^{-j2\pi \frac {n}{N}k }$$

where it's easy to see that the DFT just compares your $N$-point input signal $x[k]$ to a sinusoid of frequency $\frac nN$.

Thus, the lowest frequency is always $0$, and the resolution is always $\frac{f_\text{sample}}{N}$, no matter whether $N$ is even or odd. That also means that the lowest non-DC frequency is also $\frac{f_\text{sample}}{N}$.

$\endgroup$
13
  • $\begingroup$ What is the maximum value of the frequency axis? Many authors say that the Nyquist frequency is omitted when we have odd number of data points? $\endgroup$
    – AChem
    May 31, 2019 at 17:16
  • $\begingroup$ Try to do a bit of your own math! What's the highest frequency with an odd $N$, e.g. $N=5$, knowing that the 0.th bin is $f=0$, and spacing is always $\frac{f_\text{sample}}N$? This is really no hard math. You should try to do it with a piece of paper. $\endgroup$ Jun 1, 2019 at 7:36
  • 1
    $\begingroup$ sometimes @MarcusMüller , the one-sided expression of the DFT and iDFT can be a little confusing. this is why i wish they had, in the very beginning, defined the DFT and iDFT as $$X[k] \triangleq \sum_{n_0}^{n_0+N-1} x[n] \, e^{-j2\pi\frac{nk}{N}} $$ $$x[n] = \tfrac1N \sum_{k_0}^{k_0+N-1} X[k] \, e^{j2\pi\frac{nk}{N}} $$ where $n_0$ and $k_0$ can be any integers. $\endgroup$ Jun 1, 2019 at 7:54
  • $\begingroup$ heh; usually I'm the one pestering people to first define what they're asking about :) yes, I agree, this is all a question of how you define the DFT. I just went ahead and used my definition, and was assuming that if OP doesn't agree with that definition, they'd tell me in the comments :) But yeah, you're right, one can define that base transform permuted by any means, and then the indices change; anyway, and that might be something I need to add if the differences between this and my "standard" definition are the hard part here: No matter what $n_0$ you choose, it's the same frequency set! $\endgroup$ Jun 1, 2019 at 8:03
  • 1
    $\begingroup$ works now! However, that's not adding anything new; the highest frequency component is at $f_\text{sample}/2$, and that's not a multiple of $f_\text{sample}/N$ for odd $N$. There's really nothing specific about the DFT here, it's just basic multiplication… $\endgroup$ Jun 2, 2019 at 7:38

Your Answer

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

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