# Centered Fourier transform

What is the difference between the non-centered and centered Fourier transforms? In other words, when should you use one instead of the other?

• Non-Centered: $\quad \displaystyle X_1(f)=\sum\limits_{n=0}^{N-1} x[n] \, e^{-i 2 \pi f n}$

• Centered: $\quad\displaystyle X_2(f)=\sum\limits_{n=0}^{N-1} x[n] \, e^{-i 2 \pi f\left(n-\frac{N-1}{2}\right)}$

I am currently enrolled in a time series-analysis class, and our textbook uses both definitions without explaining the difference or the reason for the two different definitions.

Any help would be appreciated.

• you probably do not want the Non-Centered and Centered definitions to use the same symbol "$X(\cdot)$" because they are mathematically defined to be different. the two "$X(\cdot)$" are generally not equal to each other. the reason i edited and put in "$X(e^{i2 \pi f})$" is to keep the definition of "$X(\cdot)$" (or "$\bar{X}(\cdot)$") consistent with the Z-transform and the DTFT as is most often expressed in the lit. Commented Mar 29, 2017 at 4:09
• @robertbristow-johnson Ok, thank you! Commented Mar 29, 2017 at 20:18

the "Non-Centered" is the same as the Discrete Fourier Transform

$$X[k] \triangleq \sum\limits_{n=0}^{N-1} x[n] \, e^{-i 2 \pi \frac{nk}{N}}$$

when frequency $f = \frac{k}{N}$ is normalized to the sample rate ($f=\tfrac12$ means the Nyquist frequency). And it assumes all of $x[n]$ is for non-negative values of time. "$n \ge 0$" is "time" in units of the sampling period. $n=0$ means time at $t=0$.

the "Centered" is the same as the DFT with a linear phase-shift factor

$$e^{i \pi (N-1) f} X[k]$$

when $f = \frac{k}{N}$ and assumes $x[n]$ is for instances of time that are both positive and negative. $n=\frac{N-1}{2}$ means time at $t=0$. if $N$ is odd, then the "time origin" is exactly the time of the sample at $x[\tfrac{N-1}{2}]$. but if $N$ is even, the time origin (when $t=0$) is midway between adjacent samples $x[\tfrac{N}{2}-1]$ and $x[\tfrac{N}{2}]$. if you use the DFT to compute your "Centered" Fourier transform, you probably want to remove that linear phase-shift factor by multiplying the DFT result, $X[k]$, with $e^{-i \pi (N-1) f}$ or $e^{-i \pi (N-1) k/N}$. that will place the time origin (when $t=0$) where $n=\frac{N-1}{2}$.

A "centered" DFT is similar (but not identical) to using an fftshift with an FFT. Both move the phase 0 reference of the DFT result to the middle of the x[ ] vector, which makes a lot more sense if x isn't exactly integer periodic in aperture or is circularly discontinuous between the start and end. A "centered" DFT then more cleanly decomposes x into even (real or cosine) and odd (imaginary components or sine with a positive 1st derivative) functions, referenced to the center of the vector. A centered FFT also helps move the phase reference to a clearly non-zero portion of (non rectangular) windowed data.

• this was helpful! Commented Mar 29, 2017 at 3:31

Attached is a paper that details the "Centered DFT": https://pdfs.semanticscholar.org/136b/befcbe094951d4c41ccb32b706d1348ca2c4.pdf

What confused me at first was this paper is detailing a shift in the frequency domain while the OP's formula is clearly adding a linear phase in frequency which is a shift in time. Hotpaw2's and Robert's explanations have cleared up my confusion and the additional motivations for doing such a shift in the time domain. (and that it can be done in either domain but this is just the time domain version that is shown by the OP). I am leaving this response with the link to the paper in case anyone else comes across it and needs similar clarification.