计算脑电信号相位锁定值 Phase Locking Value

PLV:相位同步信息在时域的计算值

分别计算两个通道数据的希尔伯特变换,然后计算数据的瞬时相位差值,然后根据所有点的相位差计算自然常数为底的指数,将指数的绝对值求和平均,得到PLV的值

值的区间是0-1,0说明相位完全没同步

Matlab函数:文末有附
https://www.mathworks.com/matlabcentral/fileexchange/31600-phase-locking-value

用法:
脑电数据格式是16个通道x840个数据点x80个trial
采样率1200Hz
滤波区间8-12Hz
绘制3通道和4通道的PLV值

  eegData=samples(:,:,find(labels==0));
  srate = 1200; %Hz
  filtSpec.order = 50;
  filtSpec.range = [8 12]; %Hz
  [plv] = pn_eegPLV(eegData, srate, filtSpec);
  figure;
  plot(squeeze(plv(:,3,4)));
  xlabel('Time (s)'); 
  ylabel('Plase Locking Value');

结果:
在这里插入图片描述
函数:

function [plv] = pn_eegPLV(eegData, srate, filtSpec, dataSelectArr)
% Computes the Phase Locking Value (PLV) for an EEG dataset.
%
% Input parameters:
%   eegData is a 3D matrix numChannels x numTimePoints x numTrials
%   srate is the sampling rate of the EEG data
%   filtSpec is the filter specification to filter the EEG signal in the
%     desired frequency band of interest. It is a structure with two
%     fields, order and range. 
%       Range specifies the limits of the frequency
%     band, for example, put filtSpec.range = [35 45] for gamma band.
%       Specify the order of the FIR filter in filtSpec.order. A useful
%     rule of thumb can be to include about 4 to 5 cycles of the desired
%     signal. For example, filtSpec.order = 50 for eeg data sampled at
%     500 Hz corresponds to 100 ms and contains ~4 cycles of gamma band
%     (40 Hz).
%   dataSelectArr (OPTIONAL)
  • 8
    点赞
  • 48
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 9
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

油泼西红柿

Wish U Thrive

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值