# How to maintain DFT symmetry for zero padding in frequency domain? [duplicate]

I am looking for a mathematically correct way of zero-padding in the frequency domain when we have an even number of points.

(i) If we zero pad in the center of the DFT, after the Nyquist value, the result after taking the inverse is a complex number because we have disturbed the symmetry of the DFT. Taking the real part of inverse DFT, gives the upsampled data.

(ii) Alternatively, some people "zero" the Nyquist value itself when N is even (N=1,2,3,...,N) while inserting zeros in the center of the DFT. For example here at the end Link, the author mentions that is required. Once we zero the Nyquist value, after inverse DFT the output is real. Sometimes in experimental data the Nyquist value is a non-zero small number due to noise etc.

(iii) There has been some discussion here to split the Nyquist value by dividing it by two and make two half Nyquist values. I cannot find any published reference for that. Apparently that will cause phase changes.

(iv) Alternatively, suppose we wanted to add 10 zeros in the center of the DFT. In order to maintain DFT symmetry, we insert 5 zeros prior to the Nyquist value and 5 zero after the Nyquist value. In this way we do not artificially zero the Nyquist value from the experimental data. This will also give a real upsampled time domain result. However, all the references suggest adding zeros after the Nyquist value but nobody gives the detail as to how to preserve the DFT symmetry.

Which is then the mathematically correct way of upsampling an even numbered time series data by zero padding in the frequency doamin?

• (i) "we have disturbed the symmetry" um, how so? That sounds incorrect, when you actually take the central (i.e. absolute-highest frequency) bins; in the even-length case you have even length over-nyquist bins, so that should work well (ii) "some people" is a bad argument for engineering ;-) I can't find your statement in the link you post, though! (iii) could you link to that discussion? It very much seems I'm missing some context! (iv) that's not "in the middle of the DFT", unless you strangely shuffle your DFT first? May 31 at 8:44
• maybe I'm misunderstanding. That can easily be avoided: Please simply introduce explicit mathematical notation for the values of your unpadded DFT, and the four different padded FFTs. Something like "My $N$-DFT is $$Y[n] = \sum_{k=0}^{N-1} y[k] e^{-j 2\pi n/N \cdot k},$$ my padded (to length of $m·N$) DFT is $$Z_{(i)}[n] = \begin{cases} Y[n]& \text{ if} n < N\\ 0 &\text{else}\end{cases}$$ or so! That avoids all misunderstanding, and also, makes it easy to answer by using your notation. May 31 at 8:47
• Ping me if you think the linked question is not a duplicate and I'll be happy to reopen.
– Peter K.
May 31 at 14:31