3

If I have a time domain array of N samples, and swap the final half with initial half, then perform an FFT, what will be the effects on the frequency domain? Will the frequencies' magnitudes remain the same as the ones in the frequency domain of the original array?

What if instead of swapping halves, I just circle 1/10th, or 1/5th, of the full array?

I want to know this because I am trying to take the frequencies' magnitudes at real time, and as new sample data arrives, I thought of simply updating my frequency domain data (subtracting the old samples and adding the new ones) instead of redoing the whole FFT every time.

endolith
  • 15,759
  • 8
  • 67
  • 118
lvella
  • 163
  • 1
  • 5

1 Answers1

5

If you circularly shift the array in the time domain, the DFT of the shifted sequence will have the same magnitudes in each bin, but the phases will be different, with $X[k]$ being transformed to $X[k]e^{jk\theta}$, $k = 0, 1, \ldots, N-1$, for a fixed value of $\theta$ that I will leave for you to figure out.

Dilip Sarwate
  • 20,349
  • 4
  • 48
  • 94
  • Thanks! That is what I needed to know! I couldn't care less for the phase... – lvella Nov 06 '13 at 20:14
  • @Ivella While this answer is correct, I'm not sure that it exactly addresses your question. I don't see how circular shifting will save you from having to re-compute the FFT as new data arrives... – nispio Nov 07 '13 at 03:47
  • 1
    @nispio The question answered above is the one asked in the second paragraph of the OP's question. I did not "answer" (or in any way comment on) what the OP said he wanted to do in the third paragraph since there was no question being asked there, and no request for an opinion on whether the proposed update method was valid or correct etc. – Dilip Sarwate Nov 07 '13 at 03:54
  • @DilipSarwate I don't think there is anything wrong with your answer, I just want the OP to realize that the implications of your answer may not be what he/she assumes that they are. – nispio Nov 07 '13 at 03:58
  • There are sliding DFT algorithms, which may or may not provide any computational or latency benefits in a particular system. – hotpaw2 Nov 07 '13 at 16:20