4
$\begingroup$

I have a signal that looks like this.

enter image description here

I analyse it using fast Fourier transforms to identify the frequency with the largest peak, which is always close to zero. (There are no other clear peaks.) If I use windows of different sizes (by "window" I mean size of the snippet I use – I don't know if this is the correct use of the terminology, however), the result shows that the dominant peak gets closer and closer to zero as the size of the windows increase. That is to say, if I plot 1/frequency against window size, it is linear.

My initial thought is that if I had an infinitely long window, then the peak would be located at zero implying a DC offset, but the signal is centred on zero in an effort to avoid such an offset. Can someone explain why I see this phenomenon and how I can avoid it?

PS I even tried this using sliding windows so that I can get frequencies based on different parts of the data, but the issue persists.

$\endgroup$
6
  • $\begingroup$ have you looked a Proney techniques? $\endgroup$
    – user28715
    Oct 9, 2019 at 17:16
  • $\begingroup$ @StanleyPawlukiewicz No, I was unaware of Prony's method. What would your rationale be in applying that rather than regular FFT? $\endgroup$
    – Dan
    Oct 9, 2019 at 18:13
  • $\begingroup$ Could you please share the signal with us? If you're in MATLAB just save it as MAT file and share it here. $\endgroup$
    – Royi
    Oct 9, 2019 at 18:30
  • $\begingroup$ @Royi Here you go: pastebin.com/fYRJsLwf Note that it's irregularly spaced so I interpolate onto a regularly spaced time domain. $\endgroup$
    – Dan
    Oct 9, 2019 at 18:41
  • $\begingroup$ en.m.wikipedia.org/wiki/Prony%27s_method $\endgroup$
    – user28715
    Oct 9, 2019 at 19:28

2 Answers 2

2
$\begingroup$

Since your signal isn't sampled uniformly some strange things might happen when you apply FFT and look at the results.

What you should do is estimate the Uniform DFT of the Non Uniform Time Series.

One easy way to do it is use the reference code and analysis I posted on the question - Frequency Analysis of a Signal Without a Constant Sampling Frequency (Non Uniform Sampling in Time Domain).

Apply it on your data and things should behave more consistently.

One more thing, if you're after a peak, something which will make easier analyzing the data will be centering it. Namely make sure the samples have zero mean.

$\endgroup$
2
  • $\begingroup$ Thanks for that. It'll take me some time to work through the code, as I'm not familiar with MatLab. Quick follow-up: does interpolating a non-uniformly sampled signal onto a uniform grid and then treating it like a run-of-the-mill DFT produce problems? I realise this is a naive approach, but I'm curious what issues would arise. Thanks again for your insights. $\endgroup$
    – Dan
    Oct 10, 2019 at 18:59
  • $\begingroup$ It has the potential to add some artifacts since interpolation is done by filtering which will change the Frequency Domain data. I guess if the data was sampled with oversampling it will be minimal, if not, it might be something to take into account. $\endgroup$
    – Royi
    Oct 10, 2019 at 19:04
2
$\begingroup$

My guess would be that the DC peak is part of the transient response, thus it decreases to zero over time T as the oscillating parts of your signal continue.

But I don't know what your signal is so that's a guess

$\endgroup$
2
  • $\begingroup$ Okay, thanks. I can't state the origin of the data, unfortunately. $\endgroup$
    – Dan
    Oct 9, 2019 at 18:14
  • $\begingroup$ If that was the case, how would I account for that in my analysis? $\endgroup$
    – Dan
    Oct 9, 2019 at 18:32

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.