# Two-Sided, DC-Centered FFT

The two-sided, DC-centered FFT provides a method for displaying a spectrum with both positive and negative frequencies. Most introductory textbooks that discuss the Fourier transform and its properties present a table of two-sided Fourier transform pairs. You can use the frequency shifting property of the Fourier transform to obtain a two-sided, DC-centered representation. In a two-sided, DC-centered FFT, the DC component is in the middle of the buffer.

## Mathematical Representation of a Two-Sided, DC-Centered FFT

If is a Fourier transform pair, then

| (A)

Let

Δ(t) = 1/fs | (B)

where fs is the sampling frequency in the discrete representation of the time signal.

Set f0 to the index corresponding to the Nyquist component fN, as shown in the following equation:

f0 = fN = fs/2 = 1/2Δt | (C)

f0 is set to the index corresponding to fN because causing the DC component to appear in the location of the Nyquist component requires a frequency shift equal to fN.

Setting f0 to the index corresponding to fN results in the discrete Fourier transform pair shown in the following relationship:

| (D)

where n is the number of elements in the discrete sequence, xi is the time-domain sequence, and Xk is the frequency-domain representation of xi.

Expanding the exponential term in the time-domain sequence produces the following equation:

| (E)

Equation E represents a sequence of alternating +1 and –1. Equation E means that negating the odd elements of the original time-domain sequence and performing an FFT on the new sequence produces a spectrum whose DC component appears in the center of the sequence.

Therefore, if the original input sequence is

X = {x0, x1, x2, x3, …, xn – 1} | (F)

then the sequence

Y = {x0, –x1, x2, –x3, …, xn – 1} | (G)

generates a DC-centered spectrum.