How to get around the circular shift property of Discrete Fourier Transform?

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): 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: 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!

• 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.
– QMC
Aug 21 '18 at 21:10
• Thanks @QasimChaudhari for the suggested reading, I will check it out! Aug 21 '18 at 21:26
• 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? Aug 22 '18 at 1:36
• 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. Aug 22 '18 at 3:58
• Here are some further details on Windowing that may help: dsp.stackexchange.com/questions/18974/where-do-we-use-windowing Aug 22 '18 at 4:04

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.

• 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? Aug 21 '18 at 21:27
• 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. Aug 21 '18 at 21:35
• never saw this before, Fat32. i do love it. Nov 20 '18 at 10:59
• @robertbristow-johnson yes I know how much you crave for DFS over DFT ;-) Nov 20 '18 at 12:09
• 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. Nov 20 '18 at 19:17

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.

• 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. Aug 22 '18 at 17:09
• Actually I might have read it wrong, sinc interpolation may work on non-sinusoids. I'll double check that. Aug 22 '18 at 18:09