When attempting to take the Short Time Fourier Transform of a pulse, at the end of the pulse I'm running into problems.

The signal looks like this at the end (it is a simple $sin^2$ pulse envelope, with a carrier frequency $\omega$. The only frequency that I care about in the STFT is $\omega$):


And when I perform a STFT on it using a flattop window of $6 * 2\pi/\omega$ width (and only look at the carrier frequency):

stft signal

The error here for the STFT seems abnormally large towards the end. When I look at the difference between the envelope ($A * sin^2(\frac{ t * \pi }{ T} )$ where A is fitted by hand to minimize the error in the center of the pulse) and the absolute value of the STFT produced signal, I get something that looks like this:


The two lobes at the end are what the problem is. Does anyone have any sources that discuss this source of error? Properties, how to mitigate them, etc?

  • $\begingroup$ Can you try using another window and see if you still get the lobes? $\endgroup$ – Daniel Shapero Dec 5 '14 at 0:08
  • $\begingroup$ Are you doing a deconvolution with the window function before you compare it to the original function? $\endgroup$ – user7257 Dec 5 '14 at 15:06
  • $\begingroup$ @DanielShapero: Other flattop windows give similar results. $\endgroup$ – Andrew Spott Dec 5 '14 at 15:07
  • $\begingroup$ @user7257: I'm not sure exactly what you are talking about. Can you be more specific? $\endgroup$ – Andrew Spott Dec 5 '14 at 15:09
  • $\begingroup$ What I'm assuming you are doing is overlapping FFTs with windowing. The last plot in your post is your error, comparing the reconstructed signal with the original signal, yes? If so you need to compensate for the influence of the window function first. $\endgroup$ – user7257 Dec 5 '14 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.