# Determination of periodicity in data and finding mean

I have to find whether there is any pattern (I mean periodicity or close to periodicity) and if there is, for one cycle i have to perform numerical integration to determine mean. In the first picture I have done moving average(every 254 data points) using excel. Then in the next picture i have done again moving average(with 250 points) using the data got after performing first moving average. I have also thought about doing Fourier transform. These datas are values of cl (lift co-efficient) vs time in a unsteady solution of CFD simulation.Variation of values at initial time steps are not significant as some time is needed for simulation to give exact value. DATA file is here (drive.google.com/open?id=0B1KEir1gFkaMQW5GbmFoZlpRUVk)

## 1 Answer

To determine periodicity, do an autocorrelation. The autocorrelation will have peaks at time offsets consistent with the periodicity.

You mentioned using the Fourier Transform, if convenient you can do a circular autocorrelation using the FT as follows:

$$Corr = ifft(fft(x) fft(x)^*)$$

Where $fft(x)^*$ is the complex conjugate (if you signal is complex).

• i am an mechanical engineering student-senior year.this is needed for my thesis.i have done auto correlation with excel(i don't know much,have learned it today,so don't know whether i have done it correctly)here is the excel file [link]( drive.google.com/open?id=0By4UphfVdojqbGNOZ2xmbGhONE0) @Dan Boschen here is autocorelation plot pic drive.google.com/open?id=0By4UphfVdojqa0NkN1EtUlI4bmc – Fringe Emanuel Mar 14 '17 at 15:12
• Hmmm didn't look at the Excel but would imagine that would be a difficult path. Take the plunge and install Octave, it's free! gnu.org/software/octave/download.html – Dan Boschen Mar 14 '17 at 15:34
• there are examples available how to load data from a csv file, fairly straight forward, but once you have your data in two variable a and b, the command is xcorr(a,b); or using the fft's as I described it would be out= ifft( fft(a) .* conj(fft(b) ). And then you can plot your result using plot(out). That might get you started if you wanted to try going down that path. – Dan Boschen Mar 14 '17 at 15:36