# How to Flip Spectrum Around DC?

Is it possible to flip a signal's spectrum around DC? I have a simple spectrum that I made up (MATLAB code):

spectrum =   [-1+4i 0+3i 1+2i 2+1i 3+0i 4-1i 5-2i 6-3i 7-4i 8-5i]
timeDomain = ifft(spectrum);


I looked on this website (http://www.dsprelated.com/showarticle/51.php) and the given proof states this can be done in 3 ways:

1. Invert the Q channel (14)
2. Swap the I and Q channels (15)
3. Invert the I channel (16)

I tried those 3 ways on my signal:

1) Invert the Q channel

negQtd   = real(timeDomain) - 1j * imag(timeDomain);
negQSpec = fft(negQtd)


Output:

[-1-4i 8+5i 7+4i 6+3i 5+2i 4+1i 3+0i 2-1i 1-2i 0-3i]


2) Swap the I and Q channels

swapTD   = imag(timeDomain) + 1j * real(timeDomain);
swapSpec = fft(swapTD)


Output:

[4-1i -5+8i -4+7i -3+6i -2+5i -1+4i -0+3i 1+2i 2+1i 3+0i]


3) Invert the I channel

negItd   = -1 * real(timeDomain) + 1j * imag(timeDomain);
negISpec = fft(negItd)


Output:

[1+4i -8-5i -7-4i -6-3i -5-2i -4-1i -3-0i -2+1i -1+2i -0+3i]


Each of these does flip the spectrum of the signal, but it also modifies the spectrum:

1) Inverting Time Domain Q channel also negates/inverts the Frequency Domain Imaginary part.

2) Swapping the I and Q channels also swaps the Frequency Domain Real and Imaginary parts.

3) Inverting the Time Domain I channel also negates/inverts the Frequency domain Real part.

Is there some other way to simply flip the spectrum around DC or should I try a two step process?

• One way to do this is time reversal. Matlab (just scale ifft so you dont need to worry about writing code for circular time reversal): length(spectrum)*ifft(timeDomain) Aug 5 '15 at 5:53
• Perhaps the material at: dsprelated.com/showarticle/37.php might be of some help to you. Aug 5 '15 at 10:27

This process of inversion and conjugation in the frequency domain corresponds to complex conjugation of the complex baseband signal in the time domain, which is equivalent to simply inverting the $Q$ component. Since a phase shift of $180$ degrees is irrelevant, one can equivalently invert the $I$ component. A phase shift of $90$ degrees corresponds to a multiplication with $j$ in the time domain, and if this phase shift can be tolerated, you get the additional option of swapping the $I$ and $Q$ channels.