one way to do this is divide the signal into Frames (of Windows) and then find some Frame properties or features. compare features of the current frame with previous frames iteratively. if you find similar frames, your signal is periodic and the distance between similar frame will be your period.
Thank you Arslan Ahmad. Actually, I need a number to say signal A is more period than signal B. Now suppose that I found fft of signal A and B. Then what should I measure ?
If you want to study any concept related with the periodicity of two signals, i would definitely employ a Fourier analysis. The reason is as simple as its definition. Compute the fft of both signals and examine its cross-correlation.
I mean you have 2 signal A and B. Now, you would like compare which one is more periodic than other. Could anyone give me a MATLAB code for better understanding ?
I have generated a code to study the periodicity of 2 signals (A: a random one, and B: a more periodic) based on the fft. For a better understanding of the results, I recommend you to have a look on the FFT theory.
Dear all thanks for your interest. However, in the attached figure you can see there are two LP error. I need to know which one has more periodic peaks.
Dear Martín Martínez Villar thanks for your respond. However, I need to know which signal is more periodic. Let's look at the attachments figures to understand my question.
the first one is more periodic; and the second one is less pure than first image, as seen in the FFT (the second signal has two frequency components with strong power, while the first signal has only one).
Sure. I recommend you to read the following document explaining a measurement of periodicity which is based on the extraction of important periodic features and combine it with the autocorrelation measure. As authors comment, the goal of these tools and techniques are to assist in detecting, monitoring and visualizing structural periodic changes. That is what you need.
Wellcome.
Vlachos, 2005. On Periodicity Detection and Structural Periodic Similarity.
Dear all! What the therm "more periodic" means? We can say how many periodical components are in the pair of time series. We can say which of the series has got the higher amplitude periodicity. But it can have rather different periods of oscillation. Amir what do you mean to say so?
Dear Vladimir Kaftan. Thanks for your wisdom. For better understanding let me take example. Suppose that, you have 2 LP error. Now you would like to know which one has deterministic peak-to-peak distant. For example A=[1 0 0 1 0 0 0 1 0 0 1] and B=[1 0 0 1 0 0 1 0 0 1] and C=[1 0 0 1 0 0 1 0 0 1 0 0 1]. C is best because it has 5 peaks with lag=2, then B is good because it has 4 peaks with lag=2. However A is not good because some times lag =2 some times lag=3.
Thank you Amir. I see that you seek a rigorous estimation of an oscillation period. If you know the rigorous period beforehand, you solve your task by simple comparison of spectra with the known value 2. But your task is more complicate if you have not such ideal estimation. But I never deal with 2 LP errors and my comments can not be valuable to you.
The most generalized way of measuring periodicity of a signal is to take it's Fourier transform, use it to get a power density distribution, then normalize this distribution to obtain something like a probability distribution function over the frequencies and then calculate this pdf's entropy. Entropy is a measure of uncertainty, the more uncertainty in the signal's frequency distribution, the more aperiodic it should be.
Edit: I am adding a link to our group's recent publication which used such a measure. https://www.eneuro.org/content/7/2/ENEURO.0293-19.2020. See this figure for a demonstration of the idea.