从公式详解相位滞后指数(Phase

编程入门 行业动态 更新时间:2024-10-10 06:13:11

从公式详解<a href=https://www.elefans.com/category/jswz/34/1731509.html style=相位滞后指数(Phase"/>

从公式详解相位滞后指数(Phase

一、什么是相位滞后指数?

PLI是基于相位滞后的连通性方法,该方法告诉我们(以下是我看到的两种不同解释):

  1. 某一时刻(timePoint)不同试验(trial)收集到的两个信号的相角差在复平面的投影是否始终指向同一侧(虚轴的正侧 或 虚轴的负侧)。(这个与PLV的计算有点类似)
  2. 某一段时间内(timePeriod)收集到的 两个信号的相角差 在复平面的投影是否始终指向同一侧(虚轴的正侧 或 虚轴的负侧)。
    PLI可以忽略由体积效应引起的0和pi的相角差。

二、为什么要忽略0和pi的相角差?

三、复平面上的相位差


四、PLI的计算


五、MATLAB实现PLI

function PLI = PhaseLagIndex(X, trialTimePoint, timePeriod)%% Given a multivariate data, returns phase lag index matrix% trialTimePoint and timePeriod decide which PLI to perform.% trialTimePoint and timePeriod are both 0 or 1,select timePeriod.% Modified the mfile of 'phase synchronization'% X: channel * timePoint * trialif trialTimePoint==1 && timePeriod==1trialTimePoint = 0;endif trialTimePoint==0 && timePeriod==0timePeriod = 1;endnumChannels = size(X, 1); numtimePoint = size(X, 2); numTrials = size(X, 3); %% Obtain the instantaneous phase of each channel by Hilbert transformdataP = zeros(size(X));for channelCount = 1:numChannelsdataP(channelCount, :, :) = angle(hilbert(squeeze(X(channelCount, :, :))));end% whether the projections of phase angle differences collected from different trials at a given moment always point to the same side in the complex planeif trialTimePoint == 1%% Calculation of PLIPLI = ones(numtimePoint, numChannels, numChannels);for ch1 = 1:numChannels-1for ch2 = ch1+1:numChannels%%%%%% phase lage indexPDiff = squeeze(dataP(ch1,:,:)) - squeeze(dataP(ch2,:,:));  % hase difference at each time pointPLI(:,ch1,ch2) = abs(sum(sign(sin(PDiff)), 2)/numTrials);   % only count the asymmetryPLI(:,ch2,ch1) = PLI(:,ch1,ch2);endendend% Whether the projections of the phase angle differences collected in a given time period % always point to the same side of the complex plane % (positive side of the imaginary axis or negative side of the imaginary axis).if timePeriod == 1% Phase averaging between trialsphi1 = mean(dataP, 3);ch = numChannels;%% Calculation of PLIPLI = ones(ch,ch);for ch1=1:ch-1for ch2=ch1+1:ch%%%%%% phase lage indexPDiff=phi1(ch1,:)-phi1(ch2,:); % phase differencePLI(ch1,ch2)=abs(mean(sign(sin(PDiff)))); % only count the asymmetryPLI(ch2,ch1)=PLI(ch1,ch2);endendend
end

六、计算结果差异

下面是我用这两种方法计算的某一时间区间的PLI,很明显这两个差别很大,我也不晓得哪个才是对的,但我更倾向于第一个,n表示trial的个数。

n表示trial时,要计算某区间的PLI:先计算每一个时刻的PLI,得到所有时刻的PLI后,再对所需的时间区间的PLI取平均。

更多推荐

从公式详解相位滞后指数(Phase

本文发布于:2024-02-05 13:19:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1745377.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:相位   公式   详解   指数   Phase

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!