In case of DFT where we have following $$ Y_{k}=\frac{1}{N}\sum_{n=0}^{N-1}y_ne^{-j{\frac{2\pi nk}{N}}} $$

  • What happens in case when we change summation, e.g., increase or decrease number of $n$ that we are summation over?
  • How does the rest of equation change? For example if we decide to sum over $NM$ (if $M<1$ we have windowing and if $M>1$ we have zero padding so I do not assume adding any new info data just scaling the duration of the signal) samples would we rewrite the latter equation like this \begin{equation} Y_{k}=\sum_{n=0}^{MN-1}y_ne^{-j{\frac{2\pi nk}{MN}}}\tag{1} \end{equation} or this \begin{equation} Y_{k}=\sum_{n=0}^{MN-1}y_ne^{-j{\frac{2\pi nk}{N}}}\quad \tag{2} \end{equation}
  • And what is the explanation behind. Also what is the appropriate scaling when summation limits change?

1 Answer 1


If the length of your data is $NM$ long (regardless of $N$), your DFT should be $NM$ long, so the correct equation is (1).

The explanation is simple: how long is your data? Use that length for the DFT.

You may want to define: $$ y'_n = \left \{ \begin{array}{cl} y_n, & 0 \le n \le N-1\\ 0, & n \ge N\\ \end{array} \right . $$ and operate on that because $y_n$ for $n\ge N$ is not defined.

  • $\begingroup$ And what is then approporiate scaling-$\frac{1}{MN}$ or $\frac{1}{N}$? For example if I zeropadd my signal would I scale then over all samples (where part of them are essentially zero),i.e.,$\frac{1}{MN}$ or just over ones which are actually representing data ,i.e., $\frac{1}{N}$? $\endgroup$
    – Cali
    Jul 14, 2016 at 7:49
  • 1
    $\begingroup$ The scalings are a matter of choice. I'd go with $\frac{1}{MN}$, but some forms of the DFT and its inverse prefer $\frac{1}{\sqrt{MN}}$ on both the forward and inverse transforms. $\endgroup$
    – Peter K.
    Jul 14, 2016 at 12:07
  • $\begingroup$ But if I scale with $\frac{1}{MN}$ that means that amplitude of zeropadded signal would be different compared to original signal? If I am adding zeros why would my amplitude change? $\endgroup$
    – Cali
    Jul 14, 2016 at 12:38
  • 1
    $\begingroup$ Actually, some forms of analysis wrap longer data (by summing) around a shorter FFT. This sharpens some forms of frequency estimation (at the cost of other artifacts). It's "sort-of" the opposite of zero-padding. $\endgroup$
    – hotpaw2
    Jul 14, 2016 at 20:27
  • $\begingroup$ @hotpaw2 Yes, you can certainly do that. As you suggest, it'll give you something akin to "time-aliasing" but can be useful if the problem supports it. $\endgroup$
    – Peter K.
    Jul 14, 2016 at 20:28

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.