5
$\begingroup$

I wonder to know what is the best way to handle not equally spaced in time signal when performing FFT ?

I guess it depends on the signal itself. I work with signal with about 1000 - 5000 samples and they can contain between 0 to 20% missing samples. And I am interested in both main frequencies AND amplitudes.

Currently I do a basic linear interpolation to "fill" missing samples. I heard somewhere that we could actually "fill" missing samples with NaN (I didn't try yet).

What do you think about these two options ? Advantages and disadvantages ?

$\endgroup$
4
  • $\begingroup$ Do you know the original time-stamps? Or it is some unpredictable jitter? $\endgroup$
    – jojeck
    Commented May 22, 2014 at 20:56
  • $\begingroup$ Are you talking about duration of missing samples ? If so it can be random but most of the time they are continuous. For example in signal with a length of 1000, I can have three areas with 20 missing points and maybe some single missing points in other areas. I am not sure I answer to your question... $\endgroup$
    – hadim
    Commented May 22, 2014 at 21:05
  • 1
    $\begingroup$ Well - non equally spaced signal is usually caused by deviation of sampling period, i.e. sometimes you get your sample every 0.1 sec and sometimes every 0.12 second. I understand that in your case jitter is not a problem but missing samples? Therefore I might suggest some higher order interpolation techniques or splines. Eventually wavelet based methods can also provide satisfactory results. $\endgroup$
    – jojeck
    Commented May 22, 2014 at 21:13
  • $\begingroup$ Ok sorry. You're saying that when I get sample every 0.1s I can have a small shift and you're right but in that case we will admit that this shift is insignificant. So my question was about missing samples for example I get a sample for 0, 0.1, 0.2, 0.4 and 0.5. Here sample with timestamp 0.3 is missing. $\endgroup$
    – hadim
    Commented May 22, 2014 at 21:20

2 Answers 2

2
$\begingroup$

There are libraries for nonequispaced/nonuniform fast Fourier transform. NFFT interpolates irregular data onto a regular grid followed by a standard FFT algorithm.

$\endgroup$
4
$\begingroup$

It sounds like you are dealing with 'missing' data. Usually in cases like this, you can perform a simple polynomial regression on your data first, and then FFT.

In this way, you will fill in the gaps of the missing data based on the model polynomial you pick. Once you do that, you can perform an FFT. I would try this method first, before considering anything more involved. If you put an image of your data as well with the missing samples, that would go a long way.

$\endgroup$

Your Answer

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

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