0
$\begingroup$

I have a very large array (about 500.000 in size). I've plotted the array in chunks and founded at the tail of the array there is a periodic behavior, so I want to know if there is a way to know if it is periodic an if so what is its period?

I don't have any idea about signal processing so I need to know if there is a simple and straight forward method to check it. I'm using Python and Mathlab.

Thanks!

$\endgroup$
  • $\begingroup$ You can try pwelch in Matlab. You should try to bound the range of periods you think might be present in your array because you want a DFT size that contains enough cycles and a rule-of thumb should be around 10 periods. $\endgroup$ – Stanley Pawlukiewicz Nov 19 '17 at 15:50
1
$\begingroup$

Mathematically, what you probably want is the autocorrelation function. That function is a function on a function over time or a sequence, which gives you info about how similar your signal is to itself when shifted by shift $\tau$.

If your signal is periodic with period $\tau$, then it will be very similar to itself when shifted by $\tau$, $2\tau$, $3\tau$, and so on. So, you'll get $\tau$-periodic peaks in your autocorrelation function

A very common thing to do is to look at the Power Spectral Density (PSD), which is, in fact, the Fourier transform of the autocorrelation function. You can, however, in your sampled case, calculate the PSD directly by Fourier-transforming (Matlab function fft) your sequence and finding the abs² of it. The peaks correspond to periodicities.

$\endgroup$
  • $\begingroup$ Hi Marcus, thank you for your answer. Do you know any website in where I can find more info and examples about it? $\endgroup$ – Juan Camilo Acosta Arango Nov 19 '17 at 16:45
  • $\begingroup$ This one. You really don't need more examples. You need how to use Matlab, and you need how to use the fft function (which is really just fft(data)), and you need to be able to plot things. $\endgroup$ – Marcus Müller Nov 19 '17 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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