Page 122 - MATLAB Recipes for Earth Sciences
P. 122

5.6 Nonlinear Time-Series Analysis (by N. Marwan)               115

             t = 0.01 : 0.05 : 50;
             y = x(1:5:5000,1);
             m = 3; tau = 2;

             N = length(y);
             N2 = N - tau*(m - 1);
           The original data series has a length of 5000, after resampling 1000 data points
           or 50 sec, but because of the time delay method, the reconstructed phase space
           trajectory has the length 996. Now we create the phase space trajectory with
             for mi = 1:m
               xe(:,mi) = y([1:N2] + tau*(mi-1));
             end
           We can accelerate the pair-wise test between each points on the trajectory
           with a fully vectorized algorithm supported by MATLAB. For that we need
           to transfer the trajectory vector into two test vectors, whose component-wise
           test will provide the pair-wise test of the trajectory vector:

             x1 = repmat(xe,N2,1);
             x2 = reshape(repmat(xe(:),1,N2)',N2*N2,m);
           Using these vectors we calculate the recurrence plot using the Euclidean
           norm without any FOR loop.

             S = sqrt(sum((x1 - x2).^ 2,2 ));
             S = reshape(S,N2,N2);
             imagesc(t(1:N2),t(1:N2),S<10)
             colormap([1 1 1;0 0 0])
             xlabel('Time'), ylabel('Time')

           This recurrence plot reveals many short diagonal lines (Fig. 5.16). These
           lines represent epochs, where the phase space trajectory runs parallel to for-
           mer or later sequences of this trajectory, i.e., the states and the dynamics are
           similar at these times. The distances between these diagonal lines, represent-
           ing the periods of the cycles, differ and are not constant – just as they are in
           a harmonic oscillation.
             The structure of recurrence plots can also be described by a suite of quan-
           titative measures. Several measures are based on the distribution of the
           lengths of diagonal or vertical lines. These parameters can be used to trace
           hidden transitions in a process. Bivariate and multivariate extensions of re-
           currence plots furthermore offer nonlinear correlation tests and synchroni-
           zation analysis. A detailed introduction to recurrence plot based methods
           can be found at the web site
             http://www.recurrence-plot.tk
   117   118   119   120   121   122   123   124   125   126   127