2
votes

I'm a newbie in FFT and I was asked to find a way to analyse/process a particular set of data collected by oil drilling rigs. There is a lot of noise in the collected data due to rig movements (up & down with tides and waves for example). I was asked to clean the collected data up with FFT=>filtering=>IFFT.

I use C++ and the FFTW 3.3.3 library.

An example is better than anything else so :

I have a DB with, for example, the mudflow (liters per minutes). The mudflow is collected every 5 seconds, there is a timestamp in the DB for every measure (ex. 1387411235).

So my IN_data for my FFT is a couple of timestamp/mudflow (ex. 1387456630/3955.94, 1387456635/3954.92, etc...)

Displaying theses data really looks like a noisy sound signal and relevant events may be masked by the noise.

Using examples found on the Internet I can manage to perform FFT but my lack of knowledge and understanding is a big problem as I've never worked on signal processing and Fourier Transforms.

I don't really know how to proceed to start with this job, which version of FFTW routine to use (c2c, r2c, etc...), if there is any pre-data-processing and/or post-processing to do. There are a lot of examples and tutorials that I've read on the internet but I'm french (sorry for my mistakes here) and it doesn't always make sense to me especially with OUT_data units, OUT_data type, In and Out data array size, windowing (what is that by the way), to put it in a nutshell I'm lost...

I suppose that my problem would be pretty straightforward for someone used to FFTW but for me it's very complicated right now.

So my questions :

  • What FFTW routine to use in both ways (FFT & IFFT) (what kind, type and size, of array for IN_data and OUT_data).
  • How to interpret the resulting array (what are the units that FFTW will return).

For now a short sample of what I've done is :

fftw_plan p;
p  = (fftw_plan)fftw_plan_dft_1d(size,in,out,FFTW_FORWARD,FFTW_ESTIMATE);
fftw_execute(p);
fftw_destroy_plan(p);

with "in" and "out" as fftw_complex (the complex element of my In_data array is set to 1 for every data, don't really know why but the tutorial said to do that).

This code is based on an example found on the Internet but my lack of knowledge/understanding is a big drag and I was wondering if there was someone here who could give me explanations/workflow/insights/links on how to pull this out.

I'm in a trial period for my new job and I really want to implement this feature for my boss even if it means asking around for help, I've seen a lot of FFTW skilled posts here...

1
Don't apologize for being french ;)Nobody moving away from SE
I apologize more on my lack of skills/knowledge my friend... but thank's anyway...Arnaud
FFTW is a rather complex package for a complete DSP noob - I suggest starting with something much simpler, e.g. KissFFT. Also you need to be certain that your data is uniformly sampled, otherwise an FFT-based approach is not going to work.Paul R
Thank's Paul for your answer, the measure is done every 5 seconds so I guess that the sampling is uniform (on rare cases the data is not collected but there is always the corresponding timestamp in the DB).Arnaud
OK - my point was that for uniformly sampled data it needs to be exactly 5 seconds between samples, with no missing data points, otherwise you will need a more complex method than FFT.Paul R

1 Answers

0
votes

This is quite an ambitious project for someone who is completely new to DSP, but you can start by reading about the overlap-add method, which is essentially the method you need for your FFT-filter-IFFT approach to cleaning up this data. You should also check out the DSP StackExchange site dsp.stackexchange.com, where the theoretical background and application of frequency domain filtering is covered in several similar questions/answers.