## Synchronisation of two time series

General discussions and questions about recurrence plot related methods.

### Synchronisation of two time series

Good day
In the paper "Cross recurrence plot based synchronization of time series" (Marwen et al, 2002), examples are discussed of using cross recurrence plots and the line of synchronization to adjust one time series relative to another so as to achieve 'wiggle matching'. I am a geologist and would like to implement this in Matlab but am not sure what routines to use in the CRP toolbox. Is there a procedure available which directly implements the appendix algorithm from that paper?

Any help to get me up and going would be much appreciated.

Thanks
Bruce
BruceEglington
Junior

Posts: 3
Joined: Sat May 7, 2011 20:51

### Re: Synchronisation of two time series

I am not sure that you get your answer yet. The phase synchronization is the correlation of two recurrence plots. It is similar to Covariance method and Correlation for two random variables or two sets of data. If you still need any helps, please let us know.
Sivarit Sultornsanee (Tony)

Network/Nano Science and Engineering Laboratory (NSE Lab)
360 Huntington Ave., Room 320 SN, Boston, MA 02038, USA
E-mail: SULTORNSANEE.S@HUSKY.NEU.EDU

sultornsanee
Senior

Posts: 29
Joined: Tue Oct 12, 2010 21:05
Location: Network/Nano Science and Engineering Laboratory, Northeastern University, Boston, USA

### Re: Synchronisation of two time series

No, phase synchronisation is somethin different. Bruce was looking for an alignement of two different time axes. The function in the CRP toolbox is crp2.

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany

### Re: Synchronisation of two time series

Hi
thanks for the suggestions. As I understand it, crp2 will create a cross recurrence plot but how does one get back the modified input data time series after they have been adjusted to match each other optimally.

Bruce
BruceEglington
Junior

Posts: 3
Joined: Sat May 7, 2011 20:51

### Re: Synchronisation of two time series

Using the binary CRP for time scale alignement is perhaps not the best method.Just using the distance matrix would be better. (But the implemented method for getting the LOS from the distance matrix is not perfecty implemented in the CRP toolbox – sorry)

Here an example how to align the two time series using CRPs and the toolbox:

Code: Select all
`%% Example of time series alignement%% Two time series of a harmonic signal% Time sampling of signal B is changed.t = 2 * pi * (1:1000);a = sin(t/200);b = sin(.01 * (t/90) .^1.9);plot(t,a,t,b)%% CRP and line tracking LOS% After creating the CRP click the button APPLY% in the LOS Search box.crp2(a,b,3,10,.06,'fan')%% LOS% After pressing the button STORE in the LOS search box,% a new variable t_out appears in the workspace, which% is our time transformation vector.whos t_outplot(t(1:length(t_out)), t_out)%% CRP and Trackplot% It is also possible to get the LOS using the trackplot% command from the commandline.X = crp2(a,b,3,10,.06,'fan','silent');t_out = trackplot(X,3,5,'silent');%% % Plot the LOS over the CRP.clfimagesc(t,t,X), colormap([1 1 1;0 0 0])axis xyhold onplot(t(1:length(t_out)), t(round(t_out)),'r','linew',3)%% Alignment of signal B% simply apply the time transformation vector to signal B.clfb_new = b(round(t_out));plot(t,a,t(1:length(t_out)), b_new)legend('Original signal A','Rescaled signal B')`

Norbert
Expert

Posts: 173
Joined: Wed Jan 4, 2006 11:03
Location: Potsdam Institute for Climate Impact Research, Germany