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?
Answer
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.
No comments:
Post a Comment