8
$\begingroup$

I'm struggling to figure out how the time points of an STFT are calculated, and I can't find a definitive answer. Let's say I have a 4Hz stationary signal and I'm going to use a 64 second window with 3 second overlap. So that's a 256 point window and a 12 point overlap.

Assuming I start at time=0, take the first 64 seconds, and perform the FFT/Power Spectrum Density/etc... Can I then say that is the value at t=32? Is the next window, after the 3 second slide localized at t=35, and so on?

If so, and I really wanted to start at t=0, would I then effectively start at t=-32, fill the first 128 points with zeros and take the first 128 points from my signal, thus centering on t=0?

$\endgroup$
1
  • $\begingroup$ If you have a 4 Hz signal then you need to sample it at a rate > 8 Hz (Nyquist/Shannon). Or do you really mean a 4 Hz sample rate (assumes signal bandwidth < 2 Hz) ? $\endgroup$
    – Paul R
    Mar 15, 2012 at 10:39

2 Answers 2

5
$\begingroup$

There is no single "time instant" associated with a short-time Fourier transform. As you noted, if you perform a DFT on data collected from $t = 0$ to $t = 64$, then there isn't a single point in time that you can associate with the output from that DFT; it is a function of every sample in its time interval.

For this reason, there is no standard convention for how you might denote the time axis associated with successive STFTs, if you were tiling them together into a spectrogram, for example. You'll just need to pick a convention that is meaningful for your application. You've already identified a couple reasonable ones (using the beginning or center of the DFT's window as its "time instant").

$\endgroup$
5
$\begingroup$

If you are using a non-rectangular window (Hamming, von Hann, etc.), then the centroid of your window would be offset to the middle of your FFT aperture, and the FFT results would thus more highly correlate with the content of your data near or at the center, and not at the edges where the windowing would reduce influence on the results from the time domain data.

If you want your "time instant" to be a point near probable higher correlation, then it might make sense to put your time instant in the center. But note that data (say some time-limited frequency bursts) completely before or after this centered "time instant" will still influence the FFT results.

And, as Jason R posts, other conventions are also possible.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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