0
$\begingroup$

I am looking for a noisy signal using STFT. My window length is 128 and I am using 75% overlap. I am using a Hanning window before running the FFT process. I am using Quinn's 2nd estimator for interpolation after the fact. What I observe is the detected signal jumping frequently between bins. In the picture below the red is the detected frequency (around 190Hz) the green is the detected bin (sampling rate is 1000Hz so bin size is 7.8Hz)

enter image description here

What I would like to know is - is this likely to be an artifact of the method I am using, or is it simply that the frequency is varying a lot. What would be a suitable way of coming up with a more reliable prediction without losing time resolution? I am using a low pass filter at 20Hz to smooth the output, but it still does not remove this oscillation.

Here is a full FFT of the signal over a much long time period:

enter image description here

I guess that indicates that its simply the signal causing this.

$\endgroup$
  • $\begingroup$ Do you get the same behaviour with an overlap of 50%? $\endgroup$ – Pier-Yves Lessard Aug 30 at 14:21
  • $\begingroup$ Yes, same effect with 50%. I am getting better results with my filtering however (had a bug) but the base data is still jumping around. $\endgroup$ – Andy Piper Aug 31 at 13:26
  • 1
    $\begingroup$ if I recall correctly, most bin interpolation techniques assume boxcar windows. If your data is colored, you could pre whiten. without knowing the kind of signal, no one can know if your tone is dynamic or this is a processing artifact. $\endgroup$ – Stanley Pawlukiewicz Aug 31 at 13:47
  • $\begingroup$ Are you sure you don't have an off-by-one error? The red and the green plots look pretty close in shape. If you moved one of them by 7.8Hz, I believe they might overlap pretty closely. Any of Quinn's estimators are pretty good. $\endgroup$ – Peter K. Sep 2 at 16:32
  • $\begingroup$ Sorry @PeterK.should have said the scale for the red is the left and for the green is the right so you can get roughly from green to red by multiplying by 7.8 $\endgroup$ – Andy Piper Sep 2 at 16:42
0
$\begingroup$

I switched to using the normalized power spectrum and changed my output filtering from two-pass to one-pass. This appears to have made a massive difference:

enter image description here

It's difficult to tell from the picture but the response is actually much smoother and you can see that the selected bin is not jumping around in the same way. The two pass filtering I was using in particular caused a lot of ringing after sudden impulses and a one-pass filter was generally much, much better.

$\endgroup$

Your Answer

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

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