# What effect does a delay in the time domain have in the frequency domain?

If I have a signal that is time limited, say a sinusoid that only lasts for $T$ seconds, and I take the FFT of that signal, I see the frequency response. In the example this would be a spike at the sinusoid's main frequency.

Now, say I take that same time signal and delay it by some time constant and then take the FFT, how do things change? Is the FFT able to represent that time delay?

I recognize that a time delay represents a $\exp(-j\omega t)$ change in the frequency domain, but I'm having a hard time determining what that actually means.

Practically speaking, is the frequency domain an appropriate place to determine the time delay between various signals?

• It depends on what you mean by FFT. Say your original signal had $N$ time samples. Suppose the delay is $100$ samples. So now you have $N+100$ samples with the first $100$ being $0$. Are you computing the FFT of the first $N$ samples (same as before)? of the $N+100$ samples? of the last $N$ of the $N+100$ samples? The answer will depend on what you mean by FFT... – Dilip Sarwate Oct 26 '11 at 13:37
• @Dilip I'm looking for a more general answer. Perhaps an explanation of what would change in those scenarios would be helpful? – gallamine Oct 26 '11 at 17:12
• If you pass the last $N$ of the $N+100$ samples to your $N$-point FFT subroutine, you will get the same FFT as you got before. No difference whatsoever. If you pass the first $N$ of the $N+100$ samples (with the first $100$ samples being $0$) to your $N$-point FFT subroutine, you will get things that are difficult to interpret. Read the Answer by @JasonR carefully which tells you that if the first $100$ samples are filled from your data via a circular or cyclic shift, then you will see the delay reflected in the phase of the samples. – Dilip Sarwate Oct 26 '11 at 17:22

The discrete Fourier transform (DFT), commonly implemented by the fast Fourier transform (FFT), maps a finite-length sequence of discrete time-domain samples into an equal-length sequence of frequency-domain samples. The samples in the frequency domain are in general complex numbers; they represent coefficients that can be used in a weighted sum of complex exponential functions in the time domain to reconstruct the original time-domain signal.

These complex numbers represent an amplitude and phase that is associated with each exponential function. Thus, each number in the FFT output sequence can be interpreted as:

$$X[k] = \sum_{n=0}^{N-1} x[n] e^{\frac{-j 2 \pi n k}{N}} = A_k e^{j \phi_k}$$

You can interpret this as follows: if you want to reconstruct x[n], the signal that you started with, you can take a bunch of complex exponential functions $e^{\frac{j 2 \pi n k}{N}}, k = 0, 1, \ldots, N-1$, weight each one by $X[k] = A_k e^{j \phi_k}$, and sum them. The result is exactly equal (within numerical precision) to $x[n]$. This is just a word-based definition of the inverse DFT.

So, speaking to your question, the various flavors of the Fourier transform have the property that a delay in the time domain maps to a phase shift in the frequency domain. For the DFT, this property is:

$$x[n] \leftrightarrow X[k]$$ $$x[n-D] \leftrightarrow e^{\frac{-j2 \pi k D}{N}}X[k]$$

That is, if you delay your input signal by $D$ samples, then each complex value in the FFT of the signal is multiplied by the constant $e^{\frac{-j2 \pi k D}{N}}$. It's common for people to not realize that the outputs of the DFT/FFT are complex values, because they are often visualized as magnitudes only (or sometimes as magnitude and phase).

Edit: I want to point out that there are some subtleties to this rule for the DFT due to its finiteness in time coverage. Specifically, the shift in your signal must be circular for the relation to hold; that is, when you delay $x[n]$ by $D$ samples, you need to wrap the last $D$ samples that were at the end of $x[n]$ to the front of the delayed signal. This wouldn't really match what you would see in a real situation where the signal just doesn't start until after the beginning of the DFT aperture (and is preceded by zeros, for example). You can always get around this by zero-padding the original signal $x[n]$ so that when you delay by $D$ samples, you just wrap around zeros to the front anyway. This relationship only applies to the DFT since it is finite in time; it's does not apply to the classic Fourier transform or discrete-time Fourier transform.

Gallamine,

This simply means that there will be a phase offset in your FFT vector. When you FFT your (real) signal, your answer will be complex, so you will have real, and imaginary part. If you took their phase, (inverse_tangent(imag/real)), this will display all the phases of the frequencies. The way their phases differ from if you had no delay is related directly to the delay you have in time.

(In matlab you can also get the phase by simply "angle(fft_result)").

By the way if you do a correlation of your signal with delay and without delay and pick the peak, you can get the delay in that way. In the freq-domain it is subtracting all the phases of your signal with no delay, from all the signal with delay, and taking the average.

• There are too many things left unsaid and unspecified in this answer. Mohammad is essentially assuming a circular shift of the data without saying so. See @JasonR's (edited) answer for a careful description of this point, and my comment on the main question saying that there are many ways of using the FFT and they all give different results – Dilip Sarwate Oct 26 '11 at 17:27
• @DilipSarwate is right, this is assuming a circular shift of data. As he pointed out there are subtleties in the FFT based on the input vector. – Spacey Oct 26 '11 at 17:50
• @gallamine, may I ask what your data vectors looks like, exmaple: - Signal1: [someZeros, signal, someZeros] - Signal2: [someDifferentNumberOfZeros, signal, someDifferentNumberOfZeros] – Spacey Oct 26 '11 at 17:53

Consider the signal $\sin(\omega t)$, it has frequency content $\omega$. Delayed by 1 sec. the signal will be same so same frequency content but our time t=0 has already started 1 sec befour so waveform will only shift by 1 sec right i.e phase not frequency component. As one can see from equation G(w) e^-jwt will cause only phase change in circular fashion so that whatever delay is there wrt T of orignal signal hope it helps.general electrical engineer aman deep bihar india.

• Hi aman. Welcome to Signals.SE. Could you take a little time and format your answer a bit? We have MathJax enabled, which we generally prefer for equations. I did a quick partial edit that has a few examples if you haven't used it before. Thanks for your contribution, and again, welcome to the site! – datageist Aug 22 '18 at 22:26