# Synchronicity of two signals

I am trying to determine the synchronicity between two oscillating signals. I was attempting to do this by making use of the cross correlation between the two signals and looking at the maximum value. Is this a correct approach?

If so, which would be the better approach, to normalize the signals between 0 and 1 or to normalize the cross correlation?

I don't really mind about the difference in amplitude but I would like to see levels of synchronicity. Originally I thought to do cross correlation and look at the max of the graph however, I am not sure that this is the correct approach. I have also been looking at coherence of the spectra

• Can we see a sample plot ? – Yves Daoust Sep 4 '15 at 7:54
• if you're working in floating-point, it doesn't matter much where you normalize. or if. unless you want to define the max correlation to be 1 for some reason of convenience. normalizing likely requires envelope tracking, and the same envelope value can be used in a non-normalized case to set thresholds that you might be applying to mark something as a "peak" or not. – robert bristow-johnson Oct 4 '15 at 3:01

Using cross-correlation and finding the peak is one way of finding the time delay between two signals.
This assumes that the two signals are periodic and have the same fundamental frequency.

When the two signals have close, but not equal fundamental frequency, the lag position of the maximum cross correlation value will change in time. If the lag of the maximum does not change (and some thresholds are satisfied so you're not just cross-correlating two very weak signals with the same 60 Hz hum in the background), the two signals are synchronous. If it changes slowly, that indicates the degree that the two signals have different frequencies. If the lag requires T seconds for the lag to slide one period (which would be the distance between lags of maximum correlation) in one second, the two signals differ in frequency by 1 Hz.

• Would the down voter care to comment? – JRE Jun 30 '15 at 15:03
• i didn't downvote you. in fact i am upvoting but adding a little to your answer. – robert bristow-johnson Oct 4 '15 at 2:49
• i guess i subtracted a little, too. (at least i capitalized, since it's your answer. :-) – robert bristow-johnson Oct 4 '15 at 2:57

there's a very interesting approach based on correntropy.

you may be interested on this material: http://www.cnel.ufl.edu/~weifeng/filesfordownload/paper/localized_similarity_measure.pdf

if you're using matlab, there's a suppor for that, take a look: http://www.sohanseth.com/Home/codes

i hope it can be of benefict for you

cheers

I guess another approach may be to use cross wavelet coherence analysis (phase analysis) to see how one signal and the other signal phases move in time in relation to each other. For example you may find that one signal moves for a given time spand in tandem or anticipates or lags the other signal. So you can visualize them across time.