从公式详解相位滞后指数(Phase-Lag Index, PLI)的两种计算方式

本文主要是介绍从公式详解相位滞后指数(Phase-Lag Index, PLI)的两种计算方式,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

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

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-Lag Index, PLI)的两种计算方式的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/428572

相关文章

Spring Security基于数据库验证流程详解

Spring Security 校验流程图 相关解释说明(认真看哦) AbstractAuthenticationProcessingFilter 抽象类 /*** 调用 #requiresAuthentication(HttpServletRequest, HttpServletResponse) 决定是否需要进行验证操作。* 如果需要验证,则会调用 #attemptAuthentica

OpenHarmony鸿蒙开发( Beta5.0)无感配网详解

1、简介 无感配网是指在设备联网过程中无需输入热点相关账号信息,即可快速实现设备配网,是一种兼顾高效性、可靠性和安全性的配网方式。 2、配网原理 2.1 通信原理 手机和智能设备之间的信息传递,利用特有的NAN协议实现。利用手机和智能设备之间的WiFi 感知订阅、发布能力,实现了数字管家应用和设备之间的发现。在完成设备间的认证和响应后,即可发送相关配网数据。同时还支持与常规Sof

内核启动时减少log的方式

内核引导选项 内核引导选项大体上可以分为两类:一类与设备无关、另一类与设备有关。与设备有关的引导选项多如牛毛,需要你自己阅读内核中的相应驱动程序源码以获取其能够接受的引导选项。比如,如果你想知道可以向 AHA1542 SCSI 驱动程序传递哪些引导选项,那么就查看 drivers/scsi/aha1542.c 文件,一般在前面 100 行注释里就可以找到所接受的引导选项说明。大多数选项是通过"_

poj 1113 凸包+简单几何计算

题意: 给N个平面上的点,现在要在离点外L米处建城墙,使得城墙把所有点都包含进去且城墙的长度最短。 解析: 韬哥出的某次训练赛上A出的第一道计算几何,算是大水题吧。 用convexhull算法把凸包求出来,然后加加减减就A了。 计算见下图: 好久没玩画图了啊好开心。 代码: #include <iostream>#include <cstdio>#inclu

uva 1342 欧拉定理(计算几何模板)

题意: 给几个点,把这几个点用直线连起来,求这些直线把平面分成了几个。 解析: 欧拉定理: 顶点数 + 面数 - 边数= 2。 代码: #include <iostream>#include <cstdio>#include <cstdlib>#include <algorithm>#include <cstring>#include <cmath>#inc

uva 11178 计算集合模板题

题意: 求三角形行三个角三等分点射线交出的内三角形坐标。 代码: #include <iostream>#include <cstdio>#include <cstdlib>#include <algorithm>#include <cstring>#include <cmath>#include <stack>#include <vector>#include <

6.1.数据结构-c/c++堆详解下篇(堆排序,TopK问题)

上篇:6.1.数据结构-c/c++模拟实现堆上篇(向下,上调整算法,建堆,增删数据)-CSDN博客 本章重点 1.使用堆来完成堆排序 2.使用堆解决TopK问题 目录 一.堆排序 1.1 思路 1.2 代码 1.3 简单测试 二.TopK问题 2.1 思路(求最小): 2.2 C语言代码(手写堆) 2.3 C++代码(使用优先级队列 priority_queue)

用命令行的方式启动.netcore webapi

用命令行的方式启动.netcore web项目 进入指定的项目文件夹,比如我发布后的代码放在下面文件夹中 在此地址栏中输入“cmd”,打开命令提示符,进入到发布代码目录 命令行启动.netcore项目的命令为:  dotnet 项目启动文件.dll --urls="http://*:对外端口" --ip="本机ip" --port=项目内部端口 例: dotnet Imagine.M

XTU 1237 计算几何

题面: Magic Triangle Problem Description: Huangriq is a respectful acmer in ACM team of XTU because he brought the best place in regional contest in history of XTU. Huangriq works in a big compa

hdu 4565 推倒公式+矩阵快速幂

题意 求下式的值: Sn=⌈ (a+b√)n⌉%m S_n = \lceil\ (a + \sqrt{b}) ^ n \rceil\% m 其中: 0<a,m<215 0< a, m < 2^{15} 0<b,n<231 0 < b, n < 2^{31} (a−1)2<b<a2 (a-1)^2< b < a^2 解析 令: An=(a+b√)n A_n = (a +