基于DTW距离的房颤信号提取方法
2020-12-31罗捷杨文潇
罗捷 杨文潇
开发设计
基于DTW距离的房颤信号提取方法
罗捷 杨文潇
(广东工业大学,广东 广州 510006)
在单导联的房颤信号(f波)提取中,常用模板对消类方法易受QRST波群的形态变化以及点检测偏差的影响。为克服上述问题,提出一种基于DTW距离的房颤信号提取方法。首先,通过高斯增强来提高R峰周围心电在近邻心拍计算中的权重,并基于DTW距离找到每个心拍对应的近邻心拍;然后,以各近邻心拍为模板对目标心拍进行DTW重构,并求出各近邻心拍与对应重构目标心拍的残差;最后,通过平均残差得到干净的f波。对单导联f波提取的仿真与实验结果表明:本文方法能够更为准确地提取f波,且对QRST波的形态变化以及点检测偏差有较强的鲁棒性。
房颤信号提取;DTW距离;高斯增强;心拍重构
0 引言
房颤是一种常见的心律失常疾病[1]。随着年龄的增长,房颤的发生率会不断增加,且房颤患者中风的概率比正常人高约五倍[2]。当房颤发生时,心房激动的频率达每分钟300~600次,正常心电的P波消失,取而代之的是连续、不规则颤动的f波。f波的物理参数(如幅度和频谱)常被用于房颤的临床诊断,对房颤电生理活动机理的研究有重要意义[3-6]。
心室QRST波与心房f波在时域和频域都有部分混叠[7],制约f波的检测精度。为解决该问题,研究人员提出很多方法,可分为多导联和单导联2大类。多导联方法[8-14]采用独立分量分析、稀疏成分分析等技术,利用多通道心电信号之间的相关性分离QRST波和f波,虽然检测精度较高,但需要布置多个电极,不便于移动心电监护设备使用。单导联方法[15-19]采用平均模板消除、贝叶斯滤波等技术剔除QRST波或依据先验模型对f波进行参数估计,从而实现f波的提取。单导联方法虽然便于移动心电监护,但对异常心拍(如室性早搏导致的心拍形态变化)敏感,检测精度较低。
为提高单导联f波提取的精度,本文提出一种基于动态时间规整[20](dynamic time warping, DTW)距离的QRST波消除方法。首先,进行R峰检测,根据R峰的位置将心电信号切割成一个个单独的心拍,并通过高斯增强来提高R峰周围心电在近邻心拍计算中的权重;然后,采用基于DTW距离的近邻算法,找出与每个心拍最相似的个近邻心拍,并计算各心拍与其近邻心拍的DTW残差;最后,平均这个DTW残差求得各心拍的f波信号。
1 房颤心电模型
2 基于DTW距离的房颤信号提取
由于畸变心拍与f波信号的影响,R峰检测算法并不能准确地找到每个心拍真实的R峰。当以R峰为基准来分割心拍时,R峰采样点的偏差将导致整个心拍时间采样的偏差。为克服时间采样偏差带来的影响,需利用DTW算法对每个目标心拍与其近邻心拍进行重构。与其他模板法不同的是,本文没有求出各心拍对应的模板,而是先求出各心拍与其个近邻心拍之间的DTW重构残差,再对这个重构残差进行平均得到f波,算法流程如图1所示。具体步骤如下:
1)采集患者心电信号1 min,采用4 Hz高通滤波器去除基线漂移及T波;
3)因为在单个心拍内心房f波能量的分布相对稳定,而心室心电的波幅在R峰达到最大值,所以在R峰周围,心室心电的信噪比较高;因此,本文通过高斯增强来提高R峰周围心电在近邻心拍计算中的权重:
6)为使各心拍f波在拼接边缘不出现明显的信号失真,本文采用crossfading方法[19]来处理信号边缘的拼接问题,具体公式为
式中,fs为信号采样率;L信号长度;c为拼接边缘的信号重叠长度。
3 实验和结果分析
3.1 实验设置
为验证本文提出的基于DTW距离的房颤信号提取方法的有效性,将文中提出的基于DTW距离的模板法(GDTW-BS)及其不加高斯增强的方法(DTW-BS)分别在仿真房颤数据集和真实房颤数据集上进行测试,并与平均模板法(ABS)、最优模板对消法(WABS)和近邻模板法(KNN-BS)进行比较。
仿真房颤信号通过正常心电信号叠加仿真房颤信号生成,其中仿真f波采用STRIDH M等人提出的方法[12]来生成。采用归一化均方误差(normalized mean square error, NMSE)表示仿真所提取房颤信号的准确度:
真实房颤信号取自PTB数据库中房颤患者的心电数据。采用所提取f波信号的频谱集中度(spectral concentration, SC)作为评价指标:
房颤信号的中心频率一般在3 Hz~10 Hz之间,提取房颤信号中的心室信号残留成分一般在房颤信号的中心频率之外。因此,越高,表明算法的提取效果越好。
3.2 实验结果和分析
表1和表2分别比较了ABS,WABS,KNN-BS,DTW-BS和GDTW-BS等方法在10条仿真房颤信号和真实房颤信号上的提取性能。图2、图3和图4分别显示了仿真f波提取效果、真实房颤信号、真实f波提取效果。
表1 仿真房颤信号提取结果
表2 真实房颤信号提取结果
图2 仿真f波提取效果
图3 真实房颤ECG
图4 真实房颤ECG的f波提取效果
与ABS,WABS和KNN-BS相比,GDTW-BS在仿真f波提取性能指标上分别提高了36.5%,28.6%和14.2%;在真实f波提取性能指标上分别提高了19.8%,23.6%和18.8%。仿真与真实房颤信号提取实验的结果表明:本文提出的基于DTW距离的房颤信号提取方法能够从心电信号中提取出更为干净的f波,且鲁棒性更高。
由于R峰在心电信号中能量最高,周围的心电信号信噪比也较高。对R峰周围的心电进行高斯增强,一方面有利于找到更为准确的近邻心拍,另一方面可以提高DTW算法对R峰检测偏差的纠正能力。相比于DTW-BS,GDTW-BS在仿真f波提取性能指标上提高了7.5%;在真实f波提取性能指标SC上提高了1.1%。实验结果表明:R峰增强能够有效地提高算法的f波提取准确度。
4 结语
针对f波提取算法的提取精度易受QRST波群变异性以及R峰定位误差的影响,本文提出一种基于DTW距离的房颤信号提取方法。在仿真与真实f波的提取实验中,本文所提出的方法相较于ABS,WABS和KNN-BS等单导联方法取得了更好的f波提取准确度。
[1] CHUGH Sumeet S, ROTH Gregory A, GILLUM Richard F, et al. Global burden of atrial fibrillation in developed and developing nations[J]. Global Heart, 2014, 9(1):113-119.
[2] CHUGH Sumeet S, BLACKSHEAR Joseph L, SHEN Winkuang, et al. Epidemiology and natural history of atrial fibrillation: clinical implications[J]. Journal of the American College of Cardiology, 2001, 37(2):371-378.
[3] HUSSER D, STRIDH M, SORNMO L, et al. Time–frequency analysis of the surface electrocardiogram for monitoring antiarrhythmic drug effects in atrial fibrillation[J]. The American Journal of Cardiology, 2004, 95(4):526-528.
[4] RAYGOR VP, NG J, GOLDBERGER JJ. Surface ECG f wave analysis of dofetilide drug effect in the atrium[J]. J Cardiovasc Electrophysiol, 2015, 26(6):644-648.
[5] LANKVELD T, ZEEMERING S, SCHERR D, et al. Atrial fibrillation complexity parameters derived from surface ECGs predict procedural outcome and long-term follow-up of stepwise catheter ablation for atrial fibrillation[J]. Circulation: Arrhythmia and Electrophysiology, 2016, 9(2):e003354.
[6] ALCARAZ R, HORNERO F, RIETA J J. Electrocardiographic spectral features for long-term outcome prognosis of atrial fibrillation catheter ablation[J]. Annals of Biomedical Engineering, 2016, 44(11):3307-3318.
[7] ROONIZI E K, SASSI R. An extended bayesian framework for atrial and ventricular activity separation in atrial fibrillation[J]. IEEE Journal of Biomedical and Health Informatics, 2017, 21(6):1573-1580.
[8] RIETA J J, CASTELLS F, S´ANCHEZ C, et al. Atrial activity extraction for atrial fibrillation analysis using blind source separation[J]. IEEE Transactions on Biomedical Engineering, 2004, 51(7):1176-1186.
[9] CASTELLS F, RIETA J J, MILLET J, et al. Spatiotemporal blind source separation approach to atrial activity estimation in atrial tachyarrhythmias[J]. IEEE Transactions on Biomedical Engineering, 2005, 52(2):258-267.
[10] VAY´A C, RIETA J J, S´ANCHEZ C, et al. Convolutive blind source separation algorithms applied to the electrocardiogram of atrial fibrillation: Study of performance[J]. IEEE Transactions on Biomedical Engineering, 2007, 54(8):1530-1533.
[11] LLINARES R, IGUAL J. Application of constrained independent component analysis algorithms in electrocardiogram arrhythmias[J]. Artificial Intelligence in Medicine, 2009, 47(2):121-133.
[12] STRIDH M, SORNMO L. Spatiotemporal QRST cancellation techniques for analysis of atrial fibrillation[J]. IEEE Transactions on Biomedical Engineering, 2001, 48(1):105-111.
[13] LEMAY M, JACQUEMET V, FORCLAZ A, et al. Spatiotemporal qrst cancellation method using separate QRS and t-waves templates[C]. //Computers in Cardiology, IEEE, 2005:611-614.
[14] LEMAY M, VESIN J-M, VAN OOSTEROM A, et al. Cancellation of ventricular activity in the ECG: evaluation of novel and existing methods[J]. IEEE Transactions on Biomedical Engineering, 2007, 54(3):542-546.
[15] SLOCUM J, SAHAKIAN A, SWIRYN S. Diagnosis of atrial fibrillation from surface electrocardiograms based on computer-detected atrial activity[J]. Journal of Electrocardiology, 1992, 25(1):1-8.
[16] SHKUROVICH A, SAHAKIAN V, SWIRYN S. Detection of atrial activity from high-voltage leads of implantable ventricular defibrillators using a cancellation technique[J]. IEEE Transactions on Biomedical Engineering, 1998, 45(2):229-234.
[17] ALCARAZ R, RIETA J J. Adaptive singular value cancelation of ventricular activity in single-lead atrial fibrillation electrocardiograms[J]. Physiological Measurement, 2008, 29(12):1352.
[18] DAI H, JIANG S, LI Y. Atrial activity extraction from single lead ECG recordings: Evaluation of two novel methods[J]. Computers in Biology and Medicine, 2013, 43(3):176-183.
[19] MALIK J, REED N, WANG C-L, et al. Singlelead f-wave extraction using diffusion geometry[J]. Physiological Measurement, 2017, 38(7):1310.
[20] BERNDT D J, CLIFFORD J. Using dynamic time warping to find patterns in time series[J]. KDD Workshop, 1994, 10(16):359-370.
Extraction Method of Atrial Fibrillation Signal Based on DTW Distance
Luo Jie Yang Wenxiao
(Guangdong University of Technology, Guangzhou 510006, China)
In single lead atrial fibrillation (f-wave) extraction, the common template cancellation methods are easily affected by the morphological changes of QRST complex and R-point detection bias. In order to overcome the above problems, a method of extracting atrial fibrillation signal based on DTW distance is proposed. Firstly, Gaussian enhancement is used to improve the weight of ECG around R peak in the calculation of neighbor beats, and the nearest neighbor beats corresponding to each beat are found based on the DTW distance. Then, the DTW reconstruction of the target beat is performed with each neighbor beat as the template, and the residuals of each neighbor beat and the corresponding reconstructed target beat are calculated. Finally, clean f-wave is obtained by average residual. The simulation and experimental results of single lead f-wave extraction show that the proposed method can extract f-wave more accurately, and has strong robustness to the morphological changes of QRST waves and R-point detection bias.
atrial fibrillation signal extraction; DTW distance; beat reconstruction
TN911.7
A
1674-2605(2020)06-0006-05
10.3969/j.issn.1674-2605.2020.06.006
罗捷,男,1995年生,硕士研究生,主要研究方向:模式识别,机器学习,生物信号处理。E-mail:joyluo@mail2.gdut.edu.com