Journal Pre-proof Implementation and validation of real-time algorithms for atrial fibrillation detection on a wearable ECG device Marsili Ia, Biasiolli L, Masè M, Adami A, Andrighetti Ao, Ravelli F, Nollo G PII:
S0010-4825(19)30398-1
DOI:
https://doi.org/10.1016/j.compbiomed.2019.103540
Reference:
CBM 103540
To appear in:
Computers in Biology and Medicine
Received Date: 31 July 2019 Revised Date:
11 November 2019
Accepted Date: 11 November 2019
Please cite this article as: M. Ia, B. L, Masè. M, A. A, A. Ao, R. F, N. G, Implementation and validation of real-time algorithms for atrial fibrillation detection on a wearable ECG device, Computers in Biology and Medicine (2019), doi: https://doi.org/10.1016/j.compbiomed.2019.103540. This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of record. This version will undergo additional copyediting, typesetting and review before it is published in its final form, but we are providing this version to give early visibility of the article. Please note that, during the production process, errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain. © 2019 Published by Elsevier Ltd.
Implementation and validation of real-time algorithms for atrial fibrillation detection on a wearable ECG device Marsili IA 1 , Biasiolli L 1 , Masè M 2,3 , Adami A 1 , Andrighetti AO 1 , Ravelli F 3 , and Nollo G 2,4
1
Medicaltech Srl, Rovereto, Italy
2
IRCS-HTA, Healthcare Research and Innovation Program, Fondazione Bruno Kessler, Trento,
Italy 3
Department of Physics, University of Trento, Trento, Italy
4
BIOtech labs - Department of Industrial Engineering, University of Trento, Trento, Italy
Corresponding author: Michela Masè, IRCS-HTA, Healthcare Research and Innovation Program, Fondazione Bruno Kessler, and Department of Physics, University of Trento 38123 Trento, Italy Phone: +39 461 341626 Email:
[email protected]
1
Abstract Background. Due to the growing epidemic of atrial fibrillation (AF), new strategies for AF screening, diagnosis, and monitoring are required. Wearable devices with on-board AF detection algorithms may improve early diagnosis and therapy outcomes. In this work, we implemented optimized algorithms for AF detection on a wearable ECG monitoring device and assessed their performance. Methods. The signal processing framework was composed of two main modules: 1) a QRS detector based on a finite state machine, and 2) an AF detector based on the Shannon entropy of the symbolic word series obtained from the instantaneous heart rate. The AF detector was optimized off-line by tuning its parameters to reduce the computational burden while preserving detection accuracy. On-board performance was assessed in terms of detection accuracy, memory usage, and computation time. Results. The on-board implementation of the QRS detector produced an overall accuracy of 99% on the MIT-BIH Arrhythmia Database, with memory usage = 672 bytes, and computation time ≤ 90 µs. The on-board implementation of the optimized AF algorithm gave an overall accuracy of 98.1% (versus 98.3% of the original version) on the MIT-BIH AF Database, with increased sensitivity (99.2% versus 98.5%) and decreased specificity (97.3% versus 98.2%), memory usage = 4686 bytes, and computation time ≤ 75 µs (consistent with real-time detection). Conclusions. This study demonstrated the feasibility of real-time AF detection on a wearable ECG device. It constitutes a promising step towards the development of novel ECG monitoring systems to tackle the growing AF epidemic.
Keywords: wearable devices; mobile health; smart health; entropy; embedded algorithms; cardiac arrhythmias; cardiac rhythm monitoring. 2
1.
Introduction
Atrial fibrillation (AF) is the most common arrhythmia in clinical practice, affecting 1-2% of the general population [1]. The prevalence of AF increases with age, reaching 18% in the population older than 85 years [2]. Due to population ageing, by 2030 AF is expected to affect 14-17 million people in Europe and 12.1 million people in the US [3,4]. AF is characterized by the absence of proper atrial activation and contraction and by an irregular ventricular response [5,6], which are associated with worsened hemodynamics and an increased risk of ischemic stroke [7]. AF diagnosis can be hindered by the episodic nature of AF events, which are often paroxysmal and asymptomatic. These features make AF one of the most important public health issues and a significant cause of healthcare expenditure in western countries. New strategies for AF screening may improve stroke prevention and patient stratification for different treatment options, ultimately leading to better patient outcomes [8].
Mobile health
technologies may enable earlier AF detection and assessment through an extended physiological monitoring by mobile and wearable devices [9–14]. The use of smartphones and smartwatches for AF detection has recently received attention as a mean for low-cost mass-screening [9–13]. While trials are ongoing to evaluate the accuracy of these devices [9,11], AF detection from standard electrocardiographic (ECG) signals remains the gold standard for diagnosis. Therefore, new technologies for continuous recording of ECG signals during daily activity and for extended periods of time are under development. In particular, tele-Holter or event recorder systems with on-board algorithms for AF detection may increase the likelihood of detecting events by allowing longer recording times in real-life scenarios. However, on-board AF detectors require not only high performance, but also minimization of energy consumption, which is mostly driven by data storage and computational complexity.
3
Previous studies have proposed to detect AF by analyzing ECG and P-wave morphology [15–17], the ventricular interval (RR) series, [10,18–27], or a combination of the two [28–30]. For mobile applications, RR-based algorithms are generally preferred to morphology-based algorithms, due to the lower amount of incoming data and the lower noise sensitivity of QRS-complex detection with respect to P-wave analysis. RR-based algorithms can detect AF by quantifying the complexity of RR series using different metrics, such as coefficient of variation and density histograms [18], heart rate variability parameters from Poincarè plots [31], pattern similarity [20], sample entropy [10,25] or coefficient of sample entropy [22,24,25], Shannon entropy [19,21], or normalized fuzzy entropy [27]. Despite the large number of studies on AF detection algorithms, the efforts to implement them on hardware devices are sparse [10,32]. In this study we addressed the implementation of an algorithmic framework for real-time AF detection on a prototype ECG monitoring device. The framework included a finite-state machine QRS detector [33] and a Shannon entropy-based AF detector [19], which had been previously selected for their low computational burden and high accuracy [34]. We aimed to: 1) optimize the off-line version of the AF detector to further reduce the computational burden; and 2) measure the real-time performance of the on-board implementation in terms of detection accuracy, memory usage, and computation time.
2.
Methods
2.1
Hardware
The algorithms were designed to work on a prototype monitoring system developed by Medicaltech srl (Rovereto, Italy), which allowed continuous acquisition and recording of ECG signals and other physiological parameters in mobility, for hospital, ambulatory, and domestic monitoring. The device was designed to work in different configurations, such as 12-lead ECG, Holter, and teleHolter/event recorder. In real-time monitoring configuration, the device recorded and analysed 3
4
ECG channels, at 250 Hz sampling rate, 16 bits, and 1 µV/bit resolution. A high-pass digital filter (0.5 Hz) removed baseline wandering from the raw ECG signal. Notch (50-60 Hz) and low-pass (35 Hz) filters removed line and muscular activity noise before displaying the signal. Acquired signals could be transmitted via Wi-Fi to a telemedicine server workstation for data storage and further analysis. The device included an integrated CPU with a 32-bit ARM Cortex M3 processor (NXP LPC1788), a 512 kB internal FLASH memory bank and a 64 kB internal RAM memory bank, a low-power 24-bit analog front-end, a RedPine BT/WiFi module, a Telit 2G/3G cellular module, two RAM memory external banks of 2MB each, and a µSD slot (Figure 1A). The firmware was loaded into the FLASH memory to execute low-level functions for peripheral management and higherlevel functions, such as signal processing and analysis. After subtracting the memory required by other operations, we estimated that the maximum amount of memory available to the QRS and AF detection algorithms was < 20 kB.
Figure 1. Hardware and software components of the AF detection system. (A). Prototype board of the wearable device with main processing units highlighted and labelled. (B). Block diagram of the algorithmic framework, composed of QRS detector (orange) and AF detector (cyan).
5
2.2
Framework for AF detection
The framework for AF detection consisted of two main modules (Figure 1B). The QRS detector (first module) was based on the algorithm proposed by Gutiérrez-Rivas et al. [33], which analysed a single-lead ECG signal and detected the sequence of R-waves, yielding the heart rate (hr) series as output. The AF detector (second module) was based on the algorithm by Zhou et al. [19], which converted the hr series into a symbolic word series, then calculated the Shannon entropy of the series, and finally classified heart beats as ‘AF’ and ‘non-AF’. The two algorithms were selected for their intuitive implementation, real-time capability, and low computational burden [34].
2.2.1 QRS detector Algorithm. The QRS detector included a pre-processing step, which reduced baseline wandering (discrete derivative with Nd sample interval) and high-frequency artifacts (moving average filtering of window length NQRS), and emphasized R-peaks (square operation). After that, QRS detection was performed by an adaptive threshold, based on a finite-state machine with three states: -
State 1 (Peak Detector): the algorithm searched for the maximum peak in a fixed search window of 260 ms (i.e., minimum RR + QRS complex duration); the detected maximum was classified as R-peak; the threshold th was updated as the mean amplitude of all the detected Rpeaks.
-
State 2 (Wait): the algorithm waited for a time period equal to the minimum RR (200 ms) minus the time between the last detected R-peak and the end of State 1.
-
State 3 (Threshold): the threshold th was set at the last updated value and was progressively reduced at each sample according to the function =
−1 ∙
(1)
6
where PTh was a parameter and
was the sampling frequency; this state ended when the signal
became higher than the threshold; the system returned to State 1 and a new R-peak was searched. As indicated in 33 , the parameters were adapted to the sampling frequency ( to:
= 6;
"
= 5; #$ = 6.07.
= 250 Hz), and set
The output of the QRS detector was the R-peak time series (in seconds), which was then converted into the hr series (in bpm). Given its low computational burden, in the present work the algorithm was implemented without modifications with respect to the original version.
Off-line testing. The QRS detection algorithm was implemented ‘off-line’ in MATLAB (version R2019a, MathWorks, Inc., Natick, Massachusetts, USA) to provide the reference baseline for detection performance, which was assessed in terms of accuracy, sensitivity, and positive predictive value (PPV). The algorithm was tested on the American Heart Association Database (AHADB), the MIT-BIH Noise Stress Test Database (NSTDB, [35]), and the MIT-BIH Arrhythmia Database (MITDB, [36]), as required by the International Electrotechnical Commission (IEC 60601-2-47 [37]). The analysis started 5 minutes after the beginning of each ECG recording, following the guidelines of the American National Standards (ANSI/AAMI EC38:1998 [38] and ANSI/AAMI EC57:1998 [39]). The AHADB is composed of 80 ECG recordings (½ hour each), sampled at 250 Hz with 12-bit resolution over a 10 mV range [40]. After removal of the first 5 minutes of each recording, the total number of QRS complexes annotated by the cardiologists (Ground Truth) was 181,564. The MITDB is a class 1 core database [41], which has been extensively used as a benchmark in the literature, including [33]. The MITDB contains 48 ECG recordings (½ hour each) obtained from 47 subjects, sampled at 360 Hz (here re-sampled at 250 Hz) with 11-bit resolution over a 10 mV range. The total number of QRS complexes annotated by the cardiologists was 91,285.
7
The NSTDB [35] is a class 1 core database, which includes 12 ECG recordings (½ hour each, same characteristics of the MITDB) from 2 subjects and 3 noise recordings (baseline wander, muscle artefacts, and electrode motion ‘em’ artefacts) [42]. The ECG recordings with different signal-tonoise ratios (SNR from 24 to -6 dB) were obtained by adding the ‘em’ noise to 2 ‘clean’ ECG recordings from the MITDB. The total number of QRS complexes annotated by the cardiologists was 21,462. The results of the QRS detector were validated against Ground Truth annotations using the ‘bxb’ function of the WaveForm DataBase (WFDB) Software Package ([43], version 10.6.0 for Linux downloaded from [44]). On-board testing. For the on-board implementation, the source code of the QRS detection algorithm was re-written in C using µVision (ARM, version 5.23), integrated in the firmware, compiled with Armcc (version 5.06), and loaded into the internal FLASH memory of the prototype ECG device. The algorithm parameters were set as in the ‘off-line’ implementation for comparison. MITDB recordings were re-sampled at 250 Hz, loaded into the µSD memory card of the device, and then loaded one by one into the external RAM to be used as input of the on-board algorithm. Raw signals were not pre-processed by the prototype filters, but only by the QRS module filters. The results of the QRS detector were validated using ‘bxb’. The amount of on-board resources used by the QRS detector was assessed in terms of memory usage, number of operations, and computation time for each of the three machine states. The memory usage indicated the size of the static structure used by the QRS detector and was measured from the change of heap size using RealTerm software (CRUN, version 2.0.0.70) via serial connection. The number of times each operation (shift, compare, sum or subtraction, division or multiplication) appeared in the source code was summarized as minimum and maximum sets, depending on conditional statements being satisfied or not.
8
The range of computation times was estimated by probing the voltage of a motherboard pin that was activated at the beginning and deactivated at the end of each state, and measuring the interval between activation and deactivation with a digital oscilloscope (Tektronix model MSO2024B).
2.2.2 AF detector Algorithm. The AF detector proposed by Zhou et al. [19] consisted of four main processing steps: 1. conversion of the hr series into a symbolic sequence (sy); 2. combination of the symbolic series into a word series (wv); 3. quantitative characterization of the word distribution by Shannon Entropy; 4. thresholding of Shannon Entropy values for binary classification of each beat.
The conversion stage encoded the hr series into few symbols, sy, according to a predefined base of dimension b, formed by the sequence of integers [0, …, b-1]. The conversion was performed by the mapping function: '(
* − 1 + ℎ≥ ℎ-/01 =) 34 2 5 6 ℎ - 78' '
(2)
"
where was the floor operator, hrmax was a cut-off value, and d was a quantization factor equal to hrmax/(b-1). Symbols were combined into words, wv, of m symbols, according to: 9:
+ <'(
= '(
− 1 ) × <*) … + <'(
− ? ) × <*)/ @
(3)
Word values were in the range [0, wvmax], with maximum given by: B 9:/01 = ∑/ BC@<* − 1) × <*)
@
(4)
The information stored in a sequence of N words, wv[n-N+1],… wv[n], was quantified by a coarse version of Shannon Entropy, H: D
E
= − FGHI
JF
∑EBC@ KB L6MN
(5)
where 1 ≤ k ≤ N was the number of characteristic elements in the sequence, and 0 ≤ pi≤ 1 was the probability associated to the ith characteristic element. This was estimated as pi = Ni/N, where Ni 9
was the number of repetitions of the element in the sequence. The calculation of H was repeated beat-to-beat, lowering the computational cost by a recursive implementation [19]. Finally, H values were compared with an Optimal Threshold (OT), and cardiac beats were classified as ‘AF’ if H ≥ OT, and as ‘non-AF’ otherwise.
Optimization. The AF detector was optimized to minimize resource consumption for on-board implementation by testing different configurations of the encoding base (b), word length (m), and window length for H computation (N). In the original implementation by Zhou et al. [19], indicated as ‘Zhou x64 3f’, the parameters were set to b=64, m=3, and N=127 (‘f’ = full window size), which required a memory buffer size of 256 kB, i.e. much larger than what was available on the device. In this study, we tested four modified versions of the AF detection algorithm: -
‘Zhou x64 2f’, with parameters b=64, m=2, and N=127, corresponding to a buffer size of 4 kB.
-
‘Zhou x64 2h’, with b=64, m=2, and N=63 (‘h’ stands for half window), corresponding to a buffer size of 4 kB.
-
‘Zhou x32 2f’, with b=32, m=2, and N=127, corresponding to a buffer size of 1 kB.
-
‘Zhou x32 2h’, with with b=32, m=2, and N=63, corresponding to a buffer size of 1 kB.
For ‘x64’ configurations hrmax was set to 315 bpm and d to 5, while for ‘x32’ ones hrmax was set to 310 bpm and d to 10. It is worth noting that the decrease of m from 3 to 2 led to a decrease in buffer size from 256 kB to 4 kB for ‘x64’ configurations and further to 1 kB for ‘x32’ ones.
Off-line training. The AF detection algorithm proposed by Zhou et al. [19] was implemented offline in MATLAB using the original set of parameters (‘Zhou x64 3f’) and the four modified versions. AF detection performance was evaluated by Receiver Operating Characteristic (ROC) analysis on training data to find the OTs for each version. RR series from the Long Term AF Database (LTAFDB) [45] were used as training dataset. LTAFDB is a class 3 core database, which includes 84 long-term (24-25 hours each) ECG recordings of subjects with paroxysmal or sustained 10
AF. Each record contains two simultaneously recorded ECG signals sampled at 128 Hz with 12-bit resolution over a 20 mV range. The LTAFDB contains 8,995,973 cardiac beats in total, of which 58.2 % are classified by experts as AF. The AF detection algorithm performed a binary classification (AF = true or false). Sensitivity and specificity were calculated from the number of true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN). To obtain the ROC curves, sensitivity and specificity of the binary classification were calculated while changing the detection threshold from 0 to 1. ROC analysis used empirical prior probabilities derived from the class frequencies, and the OT for each version was found at the intersection between the ROC curves and a straight line with slope S, calculated as: O=
PH Q
PH Q
∗
F S
(6)
where P = TP + FN was the total number of positives (‘AF’ beats) and N = TN + FP the total number of negatives (‘non-AF’ beats), while cost(FP) and cost(FN) were the misclassification costs of FP and FN, respectively. OTs were found assuming equal misclassification costs, i.e. cost(FP) = cost(FN) = 0.5. Additional thresholds TA and TB were calculated using misclassification costs that favoured either sensitivity or specificity (i.e. changing the slope of the line intersecting the ROC curves). Specifically, threshold TA, favouring sensitivity, was obtained by setting cost(FP) = 0.4 and cost(FN) = 0.6; while threshold TB, favouring specificity, by setting cost(FP) = 0.6 and cost(FN) = 0.4.
Off-line testing. All the different versions of the AF detector were validated against Ground Truth annotations, evaluating sensitivity, specificity, PPV, and overall accuracy at their respective OTs (obtained from the off-line training phase). RR series from the MIT-BIH Atrial Fibrillation Database (AFDB, [46]) were used as test dataset. The AFDB is a class 3 core database that is used as benchmark in the literature, including [18]. It is made of 25 ECG recordings (~10 hours each) of 11
subjects with AF (mostly paroxysmal), sampled at 250 Hz with 12-bit resolution over a range of 20 mV. Some records (00735, 03665, 04936 and 05091) were excluded due to missing data or incorrect annotations, as in Zhou et al. [19]. The resulting database included 1,039,748 cardiac beats in total, of which 45.2% were classified by experts as AF. Finally, the performance of the complete analysis framework, i.e. combined QRS and AF detectors, was assessed on ECG recordings from the AFDB. The resulting AF classification for each RR interval was validated against Ground Truth annotations that were re-indexed to the QRS complexes detected by the proposed method.
On-board testing. The source code of the AF detection algorithm was re-written in C using µVision, integrated in the firmware, compiled with Armcc, and loaded into the internal FLASH memory of the prototype ECG device. For the on-board implementation, we selected the set of parameters of the best performing algorithm among the modified versions. The test dataset included the same RR series from the AFDB that were used for off-line testing. All series were loaded into the device µSD memory card, and then one by one into the external RAM. Results were validated against Ground Truth annotations. On-board resource consumption for encoding and complexity assessment in the AF detector were measured, as described for the QRS detector.
3.
Results
3.1
QRS detection
3.1.1 Off-line testing The performance of the off-line implementation of the QRS detector on the AHADB, NSTDB, and MITDB are reported in Table 1. Excellent sensitivity and PPV (>99%) were obtained on the AHADB and MITDB, whereas PPV and detection error worsened significantly on the NSTDB,
12
mostly due the extreme cases with SNR = 0 and -6 dB (Table 2). However, at SNR = 24, 18, and 12 dB, optimal performance was achieved, indicating robustness to noise at realistic SNR levels.
Table 1. Performance of the QRS detection algorithm on the AHADB, NSTDB, and MITDB. Database
Implem
Total QRS
TP
FN
FP
Sensitivity
PPV
Error
AHADB
Off-line
181564
180426
1138
695
99.4 %
99.6 %
1.0 %
NSTDB
Off-line
21462
21186
276
3753
98.7 %
85.0 %
18.8 %
MITDB
Off-line
91285
90566
719
204
99.2 %
99.8 %
1.0 %
MITDB
On-board
91285
90567
718
211
99.2 %
99.8 %
1.0 %
FN, false negatives; FP, false positives; Implem, implementation; PPV, positive predictive value; TP, true positives.
Table 2. Performance of the QRS detector on the NSTDB, detailed at different noise levels. SNR [dB]
Total QRS
TP
FN
FP
Sensitivity
PPV
Error
24, 18, 12
3577
3577
0
1
100 %
100 %
0%
6
3577
3562
15
164
99.6 %
95.6 %
5.0 %
0
3577
3521
56
1121
98.4 %
75.9 %
32.9 %
-6
3577
3372
205
2465
94.3 %
57.8 %
74.6 %
FN, false negatives; FP, false positives; PPV, positive predictive value; TP, true positives.
3.1.2 On-board testing The performance of the on-board implementation of the QRS detector was assessed on MITDB signals loaded into the µSD card of the device. The results were practically identical to the off-line implementation (Table 1). The on-board memory usage of the QRS detector was 672 bytes, with an indicative range of computation times between 2-10 µs for State 1, 10-70 µs for State 2, and 1-10 µs for State 3 (Table 3 and Figure 2). The number of operations for each state depended on the ECG signal satisfying certain conditions. The minimum and maximum sets of operations are detailed in Table 3. 13
Figure 2. Computational burden of the AF detection framework. Typical computation times for each of the three machine states (1, 2, or 3) of the QRS detector, and for the encoding (A) and complexity assessment (B) steps of the AF detector. The output voltage was measured directly from the device using an oscilloscope.
Table 3. Resource consumption for the on-board implementation of the detection algorithms.
Algorithm
QRS detector
Memory Usage
Number of Operations
Computation Time
[Bytes]
Minimum
Maximum
Range [µs]
2 compare
3 compare
2 sum/sub
7 sum/sub
672
State 1
2 compare
State 2
1 div/mult
1 compare
State 3
AF detector
1 sum/sub
2 – 10
2 compare 4 sum/sub
10 – 70
4 div/mult 2 compare 2 sum/sub
1 – 10
1 div/mult
4648 1 int div
Encoding
2 compare
2 compare 1 shift
1–5
1 sum Complexity
4 compare
4 compare
60 – 70
14
Assessment
4 sum/sub
6 sum/sub
3 div/mult
3 div/mult
Div, division; mult, multiplication; sub, subtraction.
3.2 AF detection 3.2.1 Off-line training The off-line performance of different versions of the AF detector on the LTAFDB (training dataset) are shown as ROC curves in Figure 3A. The highest score for the Area Under the Curve (AUC) was achieved by the original ‘Zhou x64 3f’ algorithm (98.4 %), while the best performance among the modified versions was achieved by ‘Zhou x64 2h’ with AUC = 97.9 %. Due to different encoding lengths and window sizes, H values computed by the modified versions tended to be lower, which resulted in lower OTs with respect to the original algorithm. At OT = 0.416, ‘Zhou x64 2h’ yielded sensitivity = 95.7 % and specificity = 93.0 %, compared to sensitivity = 96.6 % and specificity = 93.7 % of ‘Zhou x64 3f’. Additional detection thresholds for ‘Zhou x64 2h’ were calculated: setting TA = 0.366 increased sensitivity to 97.0% (specificity = 90.7%), while setting the threshold to TB = 0.453 increased specificity to 94.3% (sensitivity = 94.6%).
3.2.2 Off-line testing The off-line performance of different versions of the AF detection algorithm was measured on the AFDB (test dataset) and the resulting ROC curves are shown in Figure 3B. The behaviour of the ROC curves for the test dataset was similar to that on the training data (Figure 3A), albeit with superior overall performance. The highest AUC was achieved by the original ‘Zhou x64 3f’ algorithm (99.7 %), followed by ‘Zhou x64 2h’ (99.5 %). The OTs found on the training dataset were used for off-line testing on the AFDB. The thresholds are marked on the ROC curves in Figure 3B to show that they were close to optimal also on the test 15
dataset, which indicated their generalizability to unseen data. The performance metrics for all the algorithms at their respective OTs are reported in Table 4. All the modified algorithms showed higher sensitivity than the original one. However, the ranking of algorithms in terms of accuracy remained unaltered with respect to the training phase, since the increase in sensitivity was balanced by a decrease in specificity. ‘Zhou x64 2h’ was confirmed the best performer among the modified algorithms, with accuracy of 98.1% compared to 98.3% in ‘Zhou x64 3f’, an increased sensitivity (+0.7%), but decreased specificity (-0.9%) and PPV (-1.0%). Overall, ‘Zhou x64 2h’ improved the number of cardiac beats correctly classified as AF with respect to ‘Zhou x64 3f’, i.e. increased TP and reduced FN. This behaviour can be appreciated in the representative example shown in Figure 4. However, in some cases the modified algorithm increased FP, as exemplified in Figure 5. These results can be explained by the faster response of ‘Zhou x64 2h’ to brief AF events and heart rate changes, mostly due to the shorter word length, half-size window, and lower OT.
Figure 3. Receiver Operating Characteristic (ROC) curve analysis on training (A) and test (B) datasets for different versions of the AF detection algorithm: original ‘Zhou x64 3f’ algorithm vs. modified ‘Zhou x64 2h’, ‘Zhou x64 2f’, ‘Zhou x32 2h’ and ‘Zhou x32 2f’ versions. Legends report 16
the Area Under the Curve (AUC) and the Optimal Threshold (OT) for each algorithm. The thresholds applied on the test dataset and reported in panel (B) were the OTs resulting from the offline training phase (A). Plots are magnified at different scales.
Figure 4. Performance of different AF detectors on a segment of recording ‘04048’ from the AFDB. (A) Heart rate signal with Ground Truth annotation of AF events (segments highlighted in green). (B) Shannon Entropy estimated by ‘Zhou x64 3f’ (original algorithm) with detected AF events in orange. (C) Shannon Entropy estimated by ‘Zhou x64 2h’ (modified algorithm) with detected AF events in orange. ‘Zhou x64 2h’improved the number of cardiac beats correctly classified as AF (i.e. true positives) compared to ‘Zhou x64 3f’. Optimal thresholds for both algorithms were calculated on the training dataset (LTAFDB).
The results obtained using thresholds TA and TB on the AFDB are reported in Table 4. Using TA = 0.366 increased sensitivity (99.6%), but reduced specificity to a larger extent (95.9%). Differently,
17
TB = 0.453 produced a more balanced performance with lower sensitivity (98.6%) and higher specificity (97.9%) than OT = 0.416. The performance of the whole ECG analysis framework (QRS + AF detectors) on the AFDB is shown in Table 4. All results were slightly lower than for the AF detector alone, which could be mostly attributed to the different number of QRS complexes detected (1,054,238 RR intervals found by our QRS detector versus 1,039,076 in the QRS annotations). It is worth noting that reference QRS annotations in the AFDB were detected automatically and not manually corrected.
3.2.2 On-board testing The detection performance of the on-board implementation of ‘Zhou x64 2h’ on the AFDB was identical to that of the off-line version (Table 4). The on-board memory usage of the AF detector was 4648 Bytes, with an indicative range of computation times between 1-5 µs for the encoding step and 60-70 µs for the complexity assessment step (Table 3 and Figure 2).
Figure 5. Performance of different AF detectors on a segment of recording ‘05261’ from the AFDB. (A) Heart rate signal without AF events. (B) Shannon Entropy estimated by ‘Zhou x64 3f’ (original algorithm) with detected AF events in orange. (C) Shannon Entropy estimated by ‘Zhou 18
x64 2h’ (modified algorithm) with detected AF events in orange. ‘Zhou x64 2h’ increased the number of cardiac beats misclassified as AF (i.e. false positives) compared to ‘Zhou x64 3f’. Optimal thresholds for both algorithms were calculated on the training dataset (LTAFDB).
19
Table 4. Performance of the original and modified versions of the AF detection algorithm on the AFDB (test dataset).
Algorithm
Threshold
Implementation
Total RR
TP
FN
FP
Sensitivity
Specificity
PPV
Accuracy
Zhou x64 3f
OT = 0.630
Off-line
1038383
462655
7039
10463
98.5 %
98.2 %
97.8%
98.3%
Zhou x64 2h
OT = 0.416
Off-line
1039076
466227
3731
15600
99.2 %
97.3 %
96.8%
98.1%
Zhou x64 2f
OT = 0.308
Off-line
1038383
466213
3481
17911
99.3 %
96.9 %
96.3%
97.9%
Zhou x32 2h
OT = 0.178
Off-line
1039076
464976
4982
31453
98.9 %
94.5 %
93.7%
96.5%
Zhou x32 2f
OT = 0.104
Off-line
1038383
467080
2614
41470
99.4 %
92.7 %
Zhou x64 2h
OT = 0.416
On-board
1039076
466227
3731
15600
99.2 %
97.3 %
96.8%
98.1%
Zhou x64 2h
OT = 0.416
1054238
469910
4123
19786
99.1 %
96.6 %
96.0 %
97.7 %
Zhou x64 2h
TA = 0.366
Off-line
1039076
467966
1992
23226
99.6 %
95.9 %
95.3%
97.6%
Zhou x64 2h
TB = 0.453
Off-line
1039076
463386
6572
11852
98.6 %
97.9 %
97.5 %
98.2 %
positive
predictive
FN,
false
negatives;
QRS + AF off-line
FP,
false
positives;
PPV,
value;
RR,
ventricular
91.9
95.8 %
%
intervals;
TP,
true
positives.
20
4.
Discussion
In this study, we optimized, implemented, and validated an algorithmic framework for real-time AF detection on a prototype ECG monitoring device. ECG recordings from gold-standard public databases were loaded directly into the device to assess detection accuracy, memory usage, and computation time of the on-board algorithms. We demonstrated the feasibility of real-time AF detection on a wearable device by achieving excellent performance with limited memory usage and computation time.
4.1
Algorithm optimization for hardware implementation
The ECG analysis framework was based on published algorithms for QRS and AF detection, which were required to work in real-time within the limitations imposed by the hardware. The QRS detector was specifically designed by the authors for real-time applications with low power consumption and performed like the Pan & Tompkins’ algorithm [47], but with only half the computational cost [33]. Since the resource consumption of the QRS detector was well-within the limits of our hardware, we implemented the original algorithm without further optimization, and tested it on ECG recordings from the AHADB and MITDB, and on recordings with increasing level of noise from the NSTDB. QRS detection performance on the MITDB was only slightly lower than that reported by the original study [33], likely due to the fact that we did not run QRS detection on the first 5 minutes of each ECG recording. Results on the NSTDB compared favorably with those obtained by top-ranking algorithms from the Physionet Challenge 2014 [48]. In particular, on data with SNR = 6 dB the performance was very close to the top scores, while on data with SNR = 0 dB both sensitivity and PPV were the highest. For the on-board implementation, we obtained sensitivity and PPV larger than 99% on the MITDB, memory usage < 1 kB and total computational
21
time < 0.1 ms per beat, which demonstrated the suitability of the QRS detection algorithm for robust and reliable real-time applications. The algorithm by Zhou et al. was selected for its low computational burden compared to similarly performing algorithms [19,20,34]. The encoding of the hr series into a symbolic sequence allowed a concise description of the series, whose complexity could be easily quantified in terms of Shannon entropy [19]. The encoding step required a small set of arithmetic operations without any convolution/filtering operation, and a recursive calculation algorithm reduced the burden of Shannon entropy beat-to-beat computation [19]. The present work aimed at further reducing the computational cost by optimizing the main parameters for symbolic sequence generation and Shannon Entropy computation. Decreasing the word length from 3 to 2 symbols provided major improvements (shrinking memory consumption by 64 times) while not significantly affecting detection accuracy (only 0.2-0.4% lower on the AFDB). On the other hand, changing the encoding base from 64 to 32 elements led to a further 4-fold memory reduction, but caused a larger deterioration of the detection accuracy (1.8-2.5% decrease). Finally, different window lengths for Shannon entropy computation yielded very similar performance. “Zhou x64 2h” offered the best compromise between detection accuracy and computational burden, with on-board accuracy of 98.1%, memory usage < 5 kB, and computation time ≤ 75 µs per beat. The performance was well within the limits imposed by the hardware configuration and consistent with real-time detection. It is worth noting that, compared to the original version, the modified algorithm demonstrated higher sensitivity (+0.7%) in detecting AF beats, due to a faster response to short AF episodes. On the other hand, lower specificity (-0.9%) was observed, most likely due to the lower detection threshold and the coarser description of hr dynamics in the two-dimensional (versus three-dimensional) word state space. The proposed algorithm compared favorably with the best-performing RR-based algorithms in the literature (Table 5), demonstrating the highest sensitivity for all the considered detection thresholds (OT, TA, TB). In terms of specificity, it displayed the third-best performance after Petrenas et al. [20] (-0.4%) and Huang et al. [49] (-0.2%), when adopting TB. However, we 22
should bear in mind that minor differences in performance among algorithms may be due to differences in the validation procedure on the AFDB (e.g. removal of recordings, exclusion of the initial 5 minutes of each recording, etc). Table 5. Performance of the optimized AF detector (‘Zhou x64 2h’) in comparison with previously proposed RR-based detectors. AF Detectors
Performed Analysis
Database
Sensitivity
Specificity
Proposed detector
Shannon entropy of
AFDB1
99.2 % (at OT)
97.3 % (at OT)
(Zhou x64 2h)
symbolic series
99.6 % (at TA)
95.9 % (at TA)
98.6 % (at TB)
97.9 % (at TB)
AFDB
98.46 %
89.85 %
AFDB
94.9 %
95.8 %
Ectopic beat filtering + AFDB
Normalized fuzzy entropy
Liu et al. 2018, [27] §
Andersson et al. 2015 , Turning point ratio +
2
Root mean square of ∆RR
[32]
+ Shannon entropy 97.1 %
98.3 %
3
97.1 %
98.1 %
4
AFDB
98.0 %
98.2 %
Root mean square of ∆RR
AFDB4 +
90.49 %
94.17 %
Shannon entropy
NSRDB
74.15 %
96.81 %
Sample entropy
97.26 %
95.91
Time varying coherence AFDB4
98.22 %
97.68 %
96.1 %
98.1 %
91 %
94 %
95.8 %
96.4 %
AFDB
94.4 %
95.1 %
Tateno and Glass 2001, Kolmogorov-Smirnov test AFDB
94.4 %
97.2 %
Petrenas et al. 2014, [20]
Bigeminal suppression + RR irregularity +
AFDB
Signal fusion Lee et al. 2013§, [10]
Lee et al. 2013, [23]
function + Shannon entropy Huang et al. 2011, [49]
∆RR
distribution AFDB
difference curve Lake
and
Moorman Coefficient
2011, [22]
entropy
Lian et al. 2011, [50]
RR-∆RR map
Dash et al. 2009, [21]
of
sample AFDB
Turning points ratio +
AFDB 4
Root mean square of ∆RR + Shannon entropy
[18]
on ∆RR
23
AFDB1, recordings no.00735, no.03665, no.04936, and no.05091 excluded; AFDB2, recordings no.05091 and no.0.7859 manually corrected; AFDB3, recordings no.00735 and no.03665 excluded; AFDB4, recordings no.04936 and no.05091 excluded; §, device implementation.
Our results demonstrated the feasibility of implementing real-time QRS and AF detection algorithms on a prototype device. Studies on hardware implementations are sparse [10,32], and direct comparison with other hardware systems may be difficult due to differences in the implementation, detection settings, and signals. Andersson et al. [32] designed and fabricated an ASIC (Application-Specific Integrated Circuit) real-time AF detector performing ultra-low voltage operations for implantable loop recorders. The detector, based on the combination of three RR metrics, had a sensitivity of 94.9% and specificity of 95.8% (90.6% and 97.6% for the memorysaving version) on the AFDB (Table 5). Lee et al. [10] optimized three RR-based detection algorithms for implementation on iPhone4S technology. The highest performance was obtained by the Sample Entropy detector, which achieved an accuracy of 96.1% on the combined AFDB + NSRDB datasets, and a computation time of ~25 ms for the analysis of a 64-beat segment.
4.2
Clinical use of the technology
The feasibility of performing on-board AF detection with high accuracy, as demonstrated in this study, may have implications for the development of mobile health systems for AF monitoring [9]. Algorithms were implemented on a prototype wearable ECG monitoring device, characterized by a small size, limited cost, and the ability to work in different modalities, e.g. tele-Holter and eventrecorder. Wearability and small economic cost of the device might encourage its adoption for longterm monitoring of cardiac rhythm in large population studies. In particular, since the device acquires standard ECG signals, it could be used for AF diagnosis and burden assessment following therapeutic interventions.
24
Since working in different modalities may require some performance trade-offs, we identified two detection thresholds that favored either sensitivity or specificity. As a first example, when working in event-recorder modality, the highest possible sensitivity should be pursued, so that AF events are not missed. In such a scenario, the use of TA would increase sensitivity to 99.6%, but at the cost of specificity being decreased to 95.9%. As a future development, in order to reduce the false alarms associated with lower specificity, one could devise a two-step detection process, in which “potential AF” episodes detected by the device are then automatically analysed on a telemedicine workstation. Remote AF detection could benefit from the use of computationally-expensive algorithms, e.g. artificial intelligence and machine learning approaches [30,51,52], since energy and memory consumption would no longer be a concern. As a second example, when working in Holter modality for diagnostic purposes, a better balance between sensitivity and specificity could be obtained by setting the detection threshold to TB. Finally, it is worth noting that our prototype device may not be suitable for mass-screening. However, the reduced computational cost and memory usage of the optimized algorithms, combined with the progress in smartphone technology, would potentially support the implementation of the AF detector on smartphones for screening applications. With this aim, further studies should assess detection accuracy as a function of type, quality, and length of the signals provided by the wearable technology. For instance, in a recent study on AF detection by smartphone technology, only 66% of the traces acquired by the “Kardia Band” were found to be analyzable [8].
4.3
Study limitations
The main limitation of this study was that the algorithms were not tested on ECG signals acquired directly from AF patients by the prototype device. Although validation on public databases allowed comparisons with other methods, future studies should use ECG signals acquired by the device under real-world conditions. This would allow us to investigate the actual level and type of noise 25
and artefacts corrupting the signals and their effect on AF detection, as well as to devise suitable filtering strategies to maximize performance.
5.
Conclusion
This study demonstrated the feasibility of real-time AF detection on wearable devices. A lowcomplexity algorithmic framework was optimized and implemented on a prototype ECG monitoring device. The on-board implementation achieved excellent real-time performance (98% accuracy) with limited memory usage (less than 6 kB) and computation time (less than 0.2 ms per beat). These results are a promising step towards the development of novel mobile health monitoring systems for the management of the growing AF epidemic.
Funding This study was partially supported by the Industrial Project Ri.Car.Do. LP N° 6, 1999 (2017-2019).
References [1] I. Savelieva, J. Camm, Update on atrial fibrillation: part I, Clin. Cardiol. 31 (2008) 55–62. doi:10.1002/clc.20138. [2] Y.C. Lau, G.Y.H. Lip, New advances in the treatment of atrial fibrillation: focus on stroke prevention, Expert Opin. Pharmacother. 15 (2014) 2193–2204. doi:10.1517/14656566.2014.948418. [3] S. Colilla, A. Crow, W. Petkun, D.E. Singer, T. Simon, X. Liu, Estimates of current and future incidence and prevalence of atrial fibrillation in the U.S. adult population, Am. J. Cardiol. 112 (2013) 1142–1147. doi:10.1016/j.amjcard.2013.05.063. [4] M. Zoni-Berisso, F. Lercati, T. Carazza, S. Domenicucci, Epidemiology of atrial fibrillation: European perspective, Clin. Epidemiol. 6 (2014) 213–220. [5] F. Ravelli, M. Masè, A. Cristoforetti, M. Marini, M. Disertori, The logical operator map identifies novel candidate markers for critical sites in patients with atrial fibrillation, Prog.Biophys.Mol.Biol. (2014). [6] M. Masè, M. Marini, M. Disertori, F. Ravelli, Dynamics of AV coupling during human atrial fibrillation: role of atrial rate, Am. J. Physiol. Heart Circ. Physiol. 309 (2015) H198-205. doi:10.1152/ajpheart.00726.2014. [7] A.J. Camm, P. Kirchhof, G.Y.H. Lip, U. Schotten, I. Savelieva, S. Ernst, I.C. Van Gelder, N. Al-Attar, G. Hindricks, B. Prendergast, H. Heidbuchel, O. Alfieri, A. Angelini, D. Atar, P. Colonna, R. De Caterina, J. De Sutter, A. Goette, B. Gorenek, M. Heldal, S.H. Hohloser, P. Kolh, J.-Y. Le Heuzey, P. Ponikowski, F.H. Rutten, ESC Committee for Practice Guidelines, Guidelines for the management of atrial fibrillation: the Task Force for the Management of 26
[8]
[9]
[10]
[11]
[12]
[13] [14]
[15]
[16]
[17]
[18]
[19]
Atrial Fibrillation of the European Society of Cardiology (ESC), Eur. Eur. Pacing Arrhythm. Card. Electrophysiol. J. Work. Groups Card. Pacing Arrhythm. Card. Cell. Electrophysiol. Eur. Soc. Cardiol. 12 (2010) 1360–1420. doi:10.1093/europace/euq350. D. Kotecha, G. Breithardt, A.J. Camm, G.Y.H. Lip, U. Schotten, A. Ahlsson, D. Arnar, D. Atar, A. Auricchio, J. Bax, S. Benussi, C. Blomstrom-Lundqvist, M. Borggrefe, G. Boriani, A. Brandes, H. Calkins, B. Casadei, M. Castellá, W. Chua, H. Crijns, D. Dobrev, L. Fabritz, M. Feuring, B. Freedman, A. Gerth, A. Goette, E. Guasch, D. Haase, S. Hatem, K.G. Haeusler, H. Heidbuchel, J. Hendriks, C. Hunter, S. Kääb, S. Kespohl, U. Landmesser, D.A. Lane, T. Lewalter, L. Mont, M. Nabauer, J.C. Nielsen, M. Oeff, J. Oldgren, A. Oto, L. Pison, T. Potpara, U. Ravens, I. Richard-Lordereau, M. Rienstra, I. Savelieva, R. Schnabel, M.F. Sinner, P. Sommer, S. Themistoclakis, I.C. Van Gelder, P.E. Vardas, A. Verma, R. Wakili, E. Weber, D. Werring, S. Willems, A. Ziegler, G. Hindricks, P. Kirchhof, Integrating new approaches to atrial fibrillation management: the 6th AFNET/EHRA Consensus Conference, Eur. Eur. Pacing Arrhythm. Card. Electrophysiol. J. Work. Groups Card. Pacing Arrhythm. Card. Cell. Electrophysiol. Eur. Soc. Cardiol. 20 (2018) 395–407. doi:10.1093/europace/eux318. M.V. McConnell, M.P. Turakhia, R.A. Harrington, A.C. King, E.A. Ashley, Mobile Health Advances in Physical Activity, Fitness, and Atrial Fibrillation: Moving Hearts, J. Am. Coll. Cardiol. 71 (2018) 2691–2701. doi:10.1016/j.jacc.2018.04.030. J. Lee, B.A. Reyes, D.D. McManus, O. Maitas, O. Mathias, K.H. Chon, Atrial fibrillation detection using an iPhone 4S, IEEE Trans. Biomed. Eng. 60 (2013) 203–206. doi:10.1109/TBME.2012.2208112. M.P. Turakhia, M. Desai, H. Hedlin, A. Rajmane, N. Talati, T. Ferris, S. Desai, D. Nag, M. Patel, P. Kowey, J.S. Rumsfeld, A.M. Russo, M.T. Hills, C.B. Granger, K.W. Mahaffey, M.V. Perez, Rationale and design of a large-scale, app-based study to identify cardiac arrhythmias using a smartwatch: The Apple Heart Study, Am. Heart J. 207 (2019) 66–75. doi:10.1016/j.ahj.2018.09.002. J.M. Bumgarner, C.T. Lambert, A.A. Hussein, D.J. Cantillon, B. Baranowski, K. Wolski, B.D. Lindsay, O.M. Wazni, K.G. Tarakji, Smartwatch Algorithm for Automated Detection of Atrial Fibrillation, J. Am. Coll. Cardiol. 71 (2018) 2381–2388. doi:10.1016/j.jacc.2018.03.003. K.H. Chon, D.D. McManus, Detection of atrial fibrillation using a smartwatch, Nat. Rev. Cardiol. 15 (2018) 657–658. doi:10.1038/s41569-018-0057-1. V.D.A. Corino, R. Laureanti, L. Ferranti, G. Scarpini, F. Lombardi, L.T. Mainardi, Detection of atrial fibrillation episodes using a wristband device, Physiol. Meas. 38 (2017) 787–799. doi:10.1088/1361-6579/aa5dd7. S. Ladavich, B. Ghoraani, Developing an atrial activity-based algorithm for detection of atrial fibrillation, Conf. Proc. Annu. Int. Conf. IEEE Eng. Med. Biol. Soc. IEEE Eng. Med. Biol. Soc. Annu. Conf. 2014 (2014) 54–57. doi:10.1109/EMBC.2014.6943527. M. García, J. Ródenas, R. Alcaraz, J.J. Rieta, Application of the relative wavelet energy to heart rate independent detection of atrial fibrillation, Comput. Methods Programs Biomed. 131 (2016) 157–168. doi:10.1016/j.cmpb.2016.04.009. H. Pürerfellner, E. Pokushalov, S. Sarkar, J. Koehler, R. Zhou, L. Urban, G. Hindricks, Pwave evidence as a method for improving algorithm to detect atrial fibrillation in insertable cardiac monitors, Heart Rhythm. 11 (2014) 1575–1583. doi:10.1016/j.hrthm.2014.06.006. K. Tateno, L. Glass, Automatic detection of atrial fibrillation using the coefficient of variation and density histograms of RR and deltaRR intervals, MedBiolEng Comput. 39 (2001) 664– 671. X. Zhou, H. Ding, W. Wu, Y. Zhang, A Real-Time Atrial Fibrillation Detection Algorithm Based on the Instantaneous State of Heart Rate, PloS One. 10 (2015) e0136544. doi:10.1371/journal.pone.0136544.
27
[20] A. Petrėnas, V. Marozas, L. Sörnmo, Low-complexity detection of atrial fibrillation in continuous long-term monitoring, Comput. Biol. Med. 65 (2015) 184–191. doi:10.1016/j.compbiomed.2015.01.019. [21] S. Dash, K.H. Chon, S. Lu, E.A. Raeder, Automatic real time detection of atrial fibrillation, Ann. Biomed. Eng. 37 (2009) 1701–1709. doi:10.1007/s10439-009-9740-z. [22] D.E. Lake, J.R. Moorman, Accurate estimation of entropy in very short physiological time series: the problem of atrial fibrillation detection in implanted ventricular devices, AmJPhysiol Heart CircPhysiol. 300 (2011) H319–H325. [23] J. Lee, Y. Nam, D.D. McManus, K.H. Chon, Time-varying coherence function for atrial fibrillation detection, IEEE Trans. Biomed. Eng. 60 (2013) 2783–2793. doi:10.1109/TBME.2013.2264721. [24] M. Carrara, L. Carozzi, T.J. Moss, M. de Pasquale, S. Cerutti, M. Ferrario, D.E. Lake, J.R. Moorman, Heart rate dynamics distinguish among atrial fibrillation, normal sinus rhythm and sinus rhythm with frequent ectopy, Physiol Meas. 36 (2015) 1873–1888. [25] M. Masè, M. Disertori, M. Marini, F. Ravelli, Characterization of rate and regularity of ventricular response during atrial tachyarrhythmias. Insight on atrial and nodal determinants, Physiol. Meas. 38 (2017) 800–818. doi:10.1088/1361-6579/aa6388. [26] J.H. Park, H.N. Pak, S.K. Kim, J.K. Jang, J.I. Choi, H.E. Lim, C. Hwang, Y.H. Kim, Electrophysiologic characteristics of complex fractionated atrial electrograms in patients with atrial fibrillation, J.Cardiovasc.Electrophysiol. 20 (2009) 266–272. [27] C. Liu, J. Oster, E. Reinertsen, Q. Li, L. Zhao, S. Nemati, G.D. Clifford, A comparison of entropy approaches for AF discrimination, Physiol. Meas. 39 (2018) 074002. doi:10.1088/1361-6579/aacc48. [28] S. Babaeizadeh, R.E. Gregg, E.D. Helfenbein, J.M. Lindauer, S.H. Zhou, Improvements in atrial fibrillation detection for real-time monitoring, J. Electrocardiol. 42 (2009) 522–526. doi:10.1016/j.jelectrocard.2009.06.006. [29] A. Petrėnas, L. Sörnmo, A. Lukoševičius, V. Marozas, Detection of occult paroxysmal atrial fibrillation, Med. Biol. Eng. Comput. 53 (2015) 287–297. doi:10.1007/s11517-014-1234-y. [30] R. Colloca, A.E. Johnson, L. Mainardi, G.D. Clifford, A Support Vector Machine approach for reliable detection of atrial fibrillation events, in: Comput. Cardiol. 2013, 2013: pp. 1047–1050. [31] J. Park, S. Lee, M. Jeon, Atrial fibrillation detection by heart rate variability in Poincare plot, Biomed. Eng. Online. 8 (2009) 38. doi:10.1186/1475-925X-8-38. [32] O. Andersson, K.H. Chon, L. Sornmo, J.N. Rodrigues, A 290 mV Sub-V(T) ASIC for RealTime Atrial Fibrillation Detection, IEEE Trans. Biomed. Circuits Syst. 9 (2015) 377–386. doi:10.1109/TBCAS.2014.2354054. [33] Raquel Gutiérrez-Rivas, Juan Jesús García, William P. Marnane, Álvaro Hernández, Novel Real-Time Low-Complexity QRS Complex Detector Based on Adaptive Thresholding, IEEE Sens. J. 15 (2015) 6036–6043. [34] I.A. Marsili, M. Masè, V. Pisetta, E. Ricciardi, A.O. Andrighetti, F. Ravelli, G. Nollo, Optimized algorithms for atrial fibrillation detection by wearable tele-holter devices, in: 2016 IEEE Int. Smart Cities Conf. ISC2, 2016: pp. 1–4. doi:10.1109/ISC2.2016.7580863. [35] G.B. Moody, W.E. Muldrow, R.G. Mark, A noise stress test for arrhythmia detectors. Computers in Cardiology 1984; 11:381-384., Comput. Cardiol. (1984) 381–384. [36] G.B. Moody, R.G. Mark, The impact of the MIT-BIH arrhythmia database, IEEE Eng. Med. Biol. Mag. Q. Mag. Eng. Med. Biol. Soc. 20 (2001) 45–50. [37] International Electrotechnical Commission Standards, IEC 60601-2-47:2012 - Medical electrical equipment - Part 2-47: Particular requirements for the basic safety and essential performance of ambulatory electrocardiographic systems. https://webstore.iec.ch/publication/2666 (accessed June 1, 2019). [38] American National Standards, ANSI/AAMI EC38:1998 - Ambulatory electrocardiographs, 2ed. https://webstore.ansi.org/standards/aami/ansiaamiec381998 (accessed June 1, 2019). 28
[39] American National Standards, ANSI/AAMI EC57:1998/(R)2003 - Testing and reporting performance results of cardiac rhythm and ST segment measurement algorithms. https://webstore.ansi.org/standards/aami/ansiaamiec5719982003 (accessed June 1, 2019). [40] American Heart Association Database. https://physionet.org/content/ahadb/1.0.0/ (accessed June 1, 2019). [41] MIT-BIH Arrhythmia Database. https://alpha.physionet.org/content/mitdb/1.0.0/ (accessed June 1, 2019). [42] MIT-BIH Noise Stress Test Database. https://alpha.physionet.org/content/nstdb/1.0.0/ (accessed June 1, 2019). [43] A.L. Goldberger, L.A. Amaral, L. Glass, J.M. Hausdorff, P.C. Ivanov, R.G. Mark, J.E. Mietus, G.B. Moody, C.K. Peng, H.E. Stanley, PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals, Circulation. 101 (2000) E215-220. doi:10.1161/01.cir.101.23.e215. [44] The WaveForm DataBase - WFDB - Software Package. https://archive.physionet.org/physiotools/wfdb.shtml (accessed July 1, 2018). [45] Long Term Atrial Fibrillation Database. https://alpha.physionet.org/content/ltafdb/1.0.0/ (accessed June 1, 2019). [46] MIT-BIH Atrial Fibrillation Database. https://alpha.physionet.org/content/afdb/1.0.0/ (accessed June 1, 2019). [47] J. Pan, W.J. Tompkins, A real-time QRS detection algorithm, IEEE Trans. Biomed. Eng. 32 (1985) 230–236. doi:10.1109/TBME.1985.325532. [48] M. Vollmer, Noise resistance of several top-scored heart beat detectors, in: 2017 Comput. Cardiol. CinC, 2017: pp. 1–4. doi:10.22489/CinC.2017.182-178. [49] C. Huang, S. Ye, H. Chen, D. Li, F. He, Y. Tu, A novel method for detection of the transition between atrial fibrillation and sinus rhythm, IEEE Trans. Biomed. Eng. 58 (2011) 1113–1119. doi:10.1109/TBME.2010.2096506. [50] J. Lian, L. Wang, D. Muessig, A Simple Method to Detect Atrial Fibrillation Using RR Intervals, Am. J. Cardiol. 107 (2011) 1494–1497. doi:10.1016/j.amjcard.2011.01.028. [51] R.J. Martis, M.M.R. Krishnan, C. Chakraborty, S. Pal, D. Sarkar, K.M. Mandana, A.K. Ray, Automated screening of arrhythmia using wavelet based machine learning techniques, J. Med. Syst. 36 (2012) 677–688. doi:10.1007/s10916-010-9535-7. [52] M. Athif, P.C. Yasawardene, C. Daluwatte, Detecting atrial fibrillation from short single lead ECGs using statistical and morphological features, Physiol. Meas. 39 (2018) 064002. doi:10.1088/1361-6579/aac552.
29
Highlights
•
There is a demand for pervasive devices with on-board algorithms for early AF detection in the general population.
•
Electrocardiographic (ECG) signals remain the gold standard reference for AF diagnosis.
•
An optimized framework for AF detection was implemented and validated on a wearable ECG device.
•
The framework displayed high accuracy and reduced memory usage and computation times.
•
These results are consistent with real-time AF detection based on ECG monitoring devices.
Conflict of Interest
Marsili IA, Biasiolli L, Adami A, and Andrighetti AO are with Medicaltech srl, which developed the prototype device on which the algorithms were implemented. Nollo G served as scientific advisor for Medicaltech srl.