Page 1 of 1

Synchronisation of two time series

Posted: Sat May 7, 2011 21:24
by BruceEglington
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

Re: Synchronisation of two time series

Posted: Fri Oct 28, 2011 17:20
by sultornsanee
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.

Re: Synchronisation of two time series

Posted: Fri Oct 28, 2011 21:19
by Norbert
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.

Re: Synchronisation of two time series

Posted: Fri Oct 28, 2011 21:54
by BruceEglington
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

Re: Synchronisation of two time series

Posted: Mon Nov 21, 2011 11:34
by Norbert
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_out
plot(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.
clf
imagesc(t,t,X), colormap([1 1 1;0 0 0])
axis xy
hold on
plot(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.
clf
b_new = b(round(t_out));
plot(t,a,t(1:length(t_out)), b_new)
legend('Original signal A','Rescaled signal B')