3
$\begingroup$

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.

$\endgroup$
5
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Thanks! That is what I needed to know! I couldn't care less for the phase... $\endgroup$ – lvella Nov 6 '13 at 20:14
  • $\begingroup$ @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... $\endgroup$ – nispio Nov 7 '13 at 3:47
  • 1
    $\begingroup$ @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. $\endgroup$ – Dilip Sarwate Nov 7 '13 at 3:54
  • $\begingroup$ @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. $\endgroup$ – nispio Nov 7 '13 at 3:58
  • $\begingroup$ There are sliding DFT algorithms, which may or may not provide any computational or latency benefits in a particular system. $\endgroup$ – hotpaw2 Nov 7 '13 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.