AMPD算法QRS峰值检测略有偏差

时间:2016-02-25 16:27:50

标签: algorithm rust

我在Rust中实现了AMPD peak detection algorithm。可以找到源代码here。从图中可以看出峰值检测接近但不准确:

Black = peak detected, Orange/Red = ECG

Black = peak detected, Orange/Red = ECG

当我从physionet.org找到心电图数据的HRV时,这似乎会引起问题。使用HRV toolkit,rMSSD和SDNN为:

$ get_hrv -M chfdb/chf03 ecg 0:00:00 0:01:00
chfdb/chf03 :
...
SDNN     = 31.727
...
rMSSD    = 53.1993
...

使用相同的1分钟数据范围,我使用我的AMPD实现,这些峰的RR间隔,然后是rMSSD和SDNN找到峰值:

SDNN = 122.23032809963584 msec 
rMSSD = 173.6491690112714 msec

通过使用HRV Toolkit的RR间隔数据并将其替换为我的rMSSD和SDNN实现,我已经确认我的SDNN和rMSSD计算是正确的:

$ rrlist ecg chfdb/chf03 -s -f 00:00:00 -t 00:01:00
Seconds RR
1.356 0.952 N
2.312 0.956 N
3.252 0.940 N
4.212 0.960 N
5.156 0.944 N
6.112 0.956 N
7.048 0.936 N
7.996 0.948 N
8.960 0.964 N
9.900 0.940 N
10.872 0.972 N
11.820 0.948 N
12.772 0.952 N
13.716 0.944 N
14.656 0.940 N
15.604 0.948 N
16.544 0.940 N
17.492 0.948 N
18.436 0.944 N
19.388 0.952 N
20.332 0.944 N
21.276 0.944 N
22.056 0.780 N
23.164 1.108 N
24.096 0.932 N
25.028 0.932 N
25.960 0.932 N
26.900 0.940 N
27.836 0.936 N
28.768 0.932 N
29.696 0.928 N
30.616 0.920 N
31.544 0.928 N
32.484 0.940 N
33.408 0.924 N
34.348 0.940 N
35.276 0.928 N
36.208 0.932 N
37.136 0.928 N
38.060 0.924 N
38.988 0.928 N
39.924 0.936 N
40.852 0.928 N
41.784 0.932 N
42.712 0.928 N
43.648 0.936 N
44.572 0.924 N
45.500 0.928 N
46.420 0.920 N
47.352 0.932 N
48.296 0.944 N
49.220 0.924 N
50.156 0.936 N
51.088 0.932 N
52.012 0.924 N
52.940 0.928 N
53.864 0.924 N
54.796 0.932 N
55.728 0.932 N
56.652 0.924 N
57.580 0.928 N
58.504 0.924 N
59.436 0.932 N

我与HRV Toolkit的相同值足够接近:

rMSSD = 52.77095975580117 msec
SDNN = 31.528528844213298 msec 

我还排除了我的RR-Interval计算错误。输出与上述rrlist

的输出相当
Seconds RR
1.36    0.952
2.312   0.944
3.256   0.96
4.216   0.944
5.16    0.952
6.112   0.94
7.052   0.948
8   0.96
8.96    0.944
9.904   0.964
10.868  0.952
11.82   0.952
12.772  0.944
13.716  0.94
14.656  0.948
15.604  0.944
16.548  0.944
17.492  0.948
18.44   0.948
19.388  0.952
20.34   0.94
21.28   1.88
23.16   0.936
24.096  0.936
25.032  0.932
25.964  0.936
26.9    0.936
27.836  0.932
28.768  0.928
29.696  0.916
30.612  0.932
31.544  0.94
32.484  0.928
33.412  0.936
34.348  0.928
35.276  0.932
36.208  0.924
37.132  0.924
38.056  0.936
38.992  0.928
39.92   0.932
40.852  0.936
41.788  0.928
42.716  0.932
43.648  0.928
44.576  0.924
45.5    0.924
46.424  0.932
47.356  0.94
48.296  0.924
49.22   0.932
50.152  0.936
51.088  0.924
52.012  0.932
52.944  0.924
53.868  0.928
54.796  0.936
55.732  0.924
56.656  0.928
57.584  0.924

因此我认为峰值检测是HRV数量错误的来源。如何改进当前实施以获得更可靠的峰值检测?

0 个答案:

没有答案