Cross coherence estimates


Multivariate power spectral density is performed by the Welch's averaged, modified periodogram method. ao/cohere estimates the magnitude-squadred coherence of time-series signals, included in the input aos. Data are windowed prior to the estimation of the spectra, by multiplying it with aspectral window object, and can be detrended by polinomial of time in order to reduce the impact of the border discontinuities. The window length is adjustable to shorter lenghts to reduce the spectral density uncertainties, and the percentage of subsequent window overlap can be adjusted as well.

Syntaxis

    b = cohere(a1,a2,pl)
  

a1 and a2 are the 2 aos containing the input time series to be evaluated; b is the output object. The parameter list pl includes the following parameters:

The length of the window is set by the value of the parameter 'Nfft', so that the window is actually rebuilt using only the key features of the window, i.e. the name and, for Keiser windows, the PSLL.

As an alternative, the user can input, as a value for the 'Win' key, a string corresponding to the name of the window. In the case of Kaiser window, it's necessary to specify the additional parameter 'psll'.

As an alternative to setting the number of points 'Nfft' in each window, it's possible to ask for a given number of coherence estimates by setting the 'Navs' parameter, and the algorithm takes care of calculating the correct window length, according to the amount of overlap between subsequent segments.

If the user doesn't specify the value of a given parameter, the default value is used.

The function makes magnitude-squadred coherence estimates between the 2 input aos. If passing two identical objects ai or linearly combined signals, the output will be 1 at all frequencies. The same will happen if analyzing only a single window.

Example

Evaluation of the magnitude-squadred coherence of two time-series represented by: a low frequency sinewave signal superimposed to white noise and a linear drift, and a low frequency sinewave signal at the same frequency, phase shifted and with different amplitude, superimposed to white noise.

    nsecs = 5000;
    fs = 10;
    x = ao(plist('waveform','sine wave','f',0.1,'A',1,'nsecs',nsecs,'fs',fs,'yunits','m')) + ...
        ao(plist('waveform','noise','type','normal','nsecs',nsecs,'fs',fs,'yunits','m')) + ...
        ao(plist('tsfcn', 't','nsecs',nsecs,'fs',fs,'yunits','m'));
    y = ao(plist('waveform','sine wave','f',0.1,'A',2,'nsecs',nsecs,'fs',fs,'phi',90)) + ...
        4*ao(plist('waveform','noise','type','normal','nsecs',nsecs,'fs',fs));
    y.setYunits('V');
    nfft = 1000;
    pl = plist('win',specwin('BH92'),'nfft',nfft, 'order',1);
    Cxx  = cohere(x,x,pl);
    Cxy  = cohere(x,y,pl);
    iplot(Cxx);
    iplot(Cxy);
  




©LTP Team