# Spectral analysis of a time series with missing data points

I use a PC to record time series of some physical property. The problem is that, for some reason, I did not record the time series as a whole, rather I record first segment, then second, third, etc. Each segment is 500,000 points, representing ~30 min. However, they are not strictly consecutive: between each segment and the other there will be a 'lag', or missing points, equal to a few seconds.

Since the number of missed points is too small compared to the total number of samples for each segment, can I simply concatenate the segments and treat them as a single time series? At the end I will be interested in doing FFTs, histograms, etc.

• A measurement length of 500000 might result in too small frequency resolution, so it might be better to combine the FFTs of all measurements instead of combining the measurements and then take the FFT. A single measurement might even be to long, so you could use Welch's method. – fibonatic Apr 23 '15 at 2:35

## 2 Answers

Spectral analysis, FFT, wavelets requires that sequences are of equal duration and that the series is consecutive thus that no missing data points are present. I would suggest to fill the voids with extrapolated values based on the last few instances from last sequence or another solution would be to mirror the last few instances missing values based on inverted pass values or another solution would be to use the last data points and repeat it to fill the void.

• What about simply concatenating one to another? I don't have absolute time axis, only relative one (i.e. a point of start and a point of end), and my data is random. – student1 Apr 23 '15 at 19:23
• In FFT and Spectral analysis you have two coordinates (X is time in Spectral analysis and Y is frequency in FFT X is time and Y is power) You require that each elements is of the same extent and that no emply spaces exist otherwise you will have a resulting FFT with limited value as per interpretation. Seeing examples of what you are trying to do will help. (spectrogram and FFT) – Barnaby Apr 24 '15 at 0:18

Depending on what you're tryinh to do, you may not have a problem at all. If you merely want to examine FFT spectral magnitude results, then just perform an FFT on each of your separate blocks of time samples. You might want to average the multiple FFT magnitude result sequences to obtain an "averaged FFT magnitude" display which will have a reduced noise variance. And that's often useful.

If you're implementing some sort of 2-dimensional, real-time, spectral analysis (a "waterfall" display) then I suggest you merely concatenate your multiple blocks of time samples and then perform your spectral analysis to see what happens.

By the way, when you say 500,000 samples, do you really mean 2^19 = 524,288 samples (an integer power of two)?

• No, it is exactly 500,000 (we zero-pad later on) – student1 Sep 23 '15 at 15:11