2
$\begingroup$

I understand that when we introduce a linear time shift using DFT on a finite sequence, the algorithm assumes that the signal repeats itself outside of the given range. Here is an example explaining this circular shift property of DFT (Oppenheim, 1998):enter image description here

Now say if I sampled a finite length (X samples) of a pure sinusoid, but the sinusoid itself is not perfectly repeating when joining the beginning and end together. Hence, when I want to introduce a time shift in the frequency domain, the DFT algorithm will assume that my signal repeats itself every X number of samples. So I get this: enter image description here

The output signal (red) is not a smooth sinusoid because my original signal does not repeat itself perfectly.

My question is, is there a way for me to apply the time shift to the pure sinusoid without having this discontinuity in the output? That is, can I have another algorithm that continues my signal smoothly for me after the time shift has been applied?

Thank you all for your time!

$\endgroup$
  • $\begingroup$ Read a bit about DFT leakage and you will understand the fundamental mechanism behind the effects of this discontinuity and why we can't avoid it. $\endgroup$ – Qasim Chaudhari Aug 21 '18 at 21:10
  • $\begingroup$ Thanks @QasimChaudhari for the suggested reading, I will check it out! $\endgroup$ – entropology Aug 21 '18 at 21:26
  • $\begingroup$ Also I just started reading about linear convolution vs circular convolution, just want to make sure that linear convolution is NOT the solution I'm looking for here right? $\endgroup$ – entropology Aug 22 '18 at 1:36
  • $\begingroup$ The go-to solution to minimize the effect of this discontinuity is "windowing" in the time domain prior to taking the FFT. The window gradually reduces the amplitude so that at the beginning and end of the time sequence the discontinuity effect is minimized. $\endgroup$ – Dan Boschen Aug 22 '18 at 3:58
  • $\begingroup$ Here are some further details on Windowing that may help: dsp.stackexchange.com/questions/18974/where-do-we-use-windowing $\endgroup$ – Dan Boschen Aug 22 '18 at 4:04
1
$\begingroup$

Sorry No.

Circular shift property of the DFT (or actually the DFS, @robertbristow-johnson will love this!) is established by law; you cannot get away from it using other clever techniques...

May be you can introduce some redundancies (such as long set of samples but short windows on them, i.e., zero padded signals) you can do some tricks. But at a fundamental level, DFT will always perform a circular shift.

$\endgroup$
  • $\begingroup$ Thanks a lot for your response! Would you mind elaborate a little more on what are some of the tricks that I can potentially do given redundancies in the signal? $\endgroup$ – entropology Aug 21 '18 at 21:27
  • $\begingroup$ Sorry but that is an informal approach and I can only elaborate on formal approaches. And I just said may be; i.e., I'm not sure if there is, but I cannot say there is not either. So just try inventing your own tricks or lets hope some guys who previously did such a thing could help. But note: circularity cannot be avoided. $\endgroup$ – Fat32 Aug 21 '18 at 21:35
  • 1
    $\begingroup$ never saw this before, Fat32. i do love it. $\endgroup$ – robert bristow-johnson Nov 20 '18 at 10:59
  • $\begingroup$ @robertbristow-johnson yes I know how much you crave for DFS over DFT ;-) $\endgroup$ – Fat32 Nov 20 '18 at 12:09
  • 1
    $\begingroup$ no @Fat32, i just say that they are exactly the same thing (except one has a tilde ~ overhead and the other doesn't). same definitions, same theorems. $\endgroup$ – robert bristow-johnson Nov 20 '18 at 19:17
0
$\begingroup$

Yes, but not using the FFT shift property, and only if you know, a priori, that the original signal was a pure sinusoid.

You would first use Sinc interpolation (or other frequency estimation algorithms) to determine the parameters, including the exact, between bin, frequency of the sinusoid. Then shift the phase of that sinusoid, and re-synthesize it (perhaps using a longer IFFT in which the measured frequency is integer periodic).

To do this sort of thing, you have to know that the original signal was periodic (it might not be outside the FFT window), but not integer periodic in the FFT width, and that more than one period was rectangularly windowed by the finite length of your FFT.

$\endgroup$
  • $\begingroup$ Thanks @hotpaw2! I believe my original signal is periodic enough, however it is quite complex and consists of a large number of different frequencies. After looking this up, it seems like Sinc interpolation would only work if I have my filtered pure sinusoid data to begin with... (is that right?) And given how complex my original data is, it is quite impossible to separate out each individual sinusoid. I was hoping that there may be something I could do on the frequency domain directly. $\endgroup$ – entropology Aug 22 '18 at 17:09
  • $\begingroup$ Actually I might have read it wrong, sinc interpolation may work on non-sinusoids. I'll double check that. $\endgroup$ – entropology Aug 22 '18 at 18:09

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.