Literature DB >> 15333132

Real time electrocardiogram QRS detection using combined adaptive threshold.

Ivaylo I Christov1.   

Abstract

BACKGROUND: QRS and ventricular beat detection is a basic procedure for electrocardiogram (ECG) processing and analysis. Large variety of methods have been proposed and used, featuring high percentages of correct detection. Nevertheless, the problem remains open especially with respect to higher detection accuracy in noisy ECGs
METHODS: A real-time detection method is proposed, based on comparison between absolute values of summed differentiated electrocardiograms of one of more ECG leads and adaptive threshold. The threshold combines three parameters: an adaptive slew-rate value, a second value which rises when high-frequency noise occurs, and a third one intended to avoid missing of low amplitude beats. Two algorithms were developed: Algorithm 1 detects at the current beat and Algorithm 2 has an RR interval analysis component in addition. The algorithms are self-adjusting to the thresholds and weighting constants, regardless of resolution and sampling frequency used. They operate with any number L of ECG leads, self-synchronize to QRS or beat slopes and adapt to beat-to-beat intervals.
RESULTS: The algorithms were tested by an independent expert, thus excluding possible author's influence, using all 48 full-length ECG records of the MIT-BIH arrhythmia database. The results were: sensitivity Se = 99.69 % and specificity Sp = 99.65 % for Algorithm 1 and Se = 99.74 % and Sp = 99.65 % for Algorithm 2.
CONCLUSION: The statistical indices are higher than, or comparable to those, cited in the scientific literature.

Entities:  

Mesh:

Year:  2004        PMID: 15333132      PMCID: PMC516783          DOI: 10.1186/1475-925X-3-28

Source DB:  PubMed          Journal:  Biomed Eng Online        ISSN: 1475-925X            Impact factor:   2.819


Background

The QRS complexes and ventricular beats in an electrocardiogram represent the depolarization phenomenon of the ventricles and yield useful information about their behavior. Beat detection is a procedure preceding any kind of ECG processing and analysis. For morphological analysis this is the reference for detection of other ECG waves and parameter measurements. Rhythm analysis requires classification of QRS and other ventricular beat complexes as normal and abnormal. Real-time ventricular beat detection is essential for monitoring of patients in critical heart condition. Correct beats recognition is impeded by power-line interference, electromyogram noise and baseline wander often present in the ECG signal. In long-term monitoring electrode impedance can increase considerably, resulting in very low signal-to-noise ratio, which can make detection practically impossible in a single lead. Therefore, usually two or three leads are used for monitoring [1]. Friesen et al. [2] have presented a comparison of nine QRS detection algorithms, based on: i) amplitude and first derivative, ii) first derivative only, iii) first and second derivative, and iv) digital filtering. Daskalov et al. [3] applied these algorithms to selected signals containing records with pronounced baseline drift. The results were unsatisfactory, which was probably due to the use of fixed detection thresholds, whereas adaptive ones would be more appropriate. Poli et al. [4] used a generic algorithm for QRS detection. The complexes were emphasized with respect to the rest of the signal by polynomial filters and compared to an adaptive threshold. The authors reported 99.60 % sensitivity (Se) and 99.51 % specificity (Sp) with the MIT-BIH Arrhythmia Database. The method is inapplicable in real-time. Afonso et al. [5] proposed hardware filter banks for ECG signal decomposition, where several parameters were independently computed and combined in a decision rule. The authors reported Se = 99.59 % and Sp = 99.56 % for their real-time, single-channel beat detection algorithm tested with the MIT-BIH Arrhythmia Database. Dotsinsky and Stoyanov [6] developed a heuristic, pseudo-real-time algorithm for ventricular beat detection for single-channel ECG, based on steep edges and sharp peaks evaluation criteria. They reported Se = 99.04% and Sp = 99.62%, obtained with two channel recordings from AHA and MIT-BIH Arrhythmia Database Moraes et al. [1] combined logically two different algorithms working in parallel – the first has been taken from the work of Englese and Zeelenberg [7] and the other was based on Pan and Tompkins [8], and Ligtenberg and Kunt [9]. Moraes et al. [1] reported Se = 99.22 % and Sp = 99.73 % after having excluded records of patients with pacemaker. After excluding a few more recordings 108, 200, 201 and 203, containing high amplitude noise (according to the authors), the statistical indices rises to Se = 99.56 % and Sp = 99.82 %. Li et al. [10] have used wavelet transforms for detection. They reported 0.15 % false detections out of 46 files from the MIT-BIH Arrhythmia Database, but with exclusion of files 214 and 215. In addition, we found some errors in their Table II. After correction, the reported accuracy slightly decreased. The large variety of QRS detection algorithms, and the continuous efforts for their enhancement, proves that universally acceptable solution has not been found yet. Difficulties arise mainly from the huge diversity of the QRS complex waveforms and the noise and artifacts accompanying the ECG signals.

ECG databases

All 48 ECG recordings of MIT-BIH Arrhythmia database were used, without exception. Each one has a duration of 30 min and includes two leads – the modified limb lead II and one of the modified leads V1, V2, V4 or V5 [11]. The sampling frequency is 360 Hz with resolution 5 μV/bit. Two cardiologists have annotated all beats. Approximately 70 % of the beats are annotated as Normal. Four of the records are from patients with pacemakers. The American Heart Association (AHA) database was also considered, during the evaluation of the method, mostly due to the fact that it contains patients with premature ventricular beats of contraction of R-over-T type, some of them very difficult to detect because of their closeness to the previous complex. Statistical indices for this database are not derived, because they can be compared with limited number of articles working with AHA. The database consists of 80 recordings: 2-leads, 250 Hz sampling rate and 5 μV/bit resolution.

Method

The differentiated and summed signals from L leads are compared to the absolute value of a threshold MFR = M + F + R – a combination of three independent adaptive thresholds, where: • M – Steep-slope threshold; • F – Integrating threshold for high-frequency signal components; • R – Beat expectation threshold. Two algorithms were developed: Algorithm 1 detects at the current beat. Algorithm 2 Pseudo-real-time detection with additional triggering of potentially missed heart beat in the last interval by RR interval analyses. The algorithms are self-adjusting to the thresholds and weighting constants, regardless of resolution and sampling frequency used. They operate with any number L of ECG leads, self-synchronize to QRS or beat slopes and adapt to beat-to-beat intervals.

Preprocessing

• Moving averaging filter for power-line interference suppression: averages samples in one period of the power-line interference frequency with a first zero at this frequency. • Moving averaging of samples in 28 ms interval for electromyogram noise suppression – a filter with first zero at about 35 Hz. • Moving averaging of a complex lead (the sintesis is explained in the next section) in 40 ms intervals – a filter with first zero at about 25 Hz. It is suppressing the noise magnified by the differentiation procedure used in the process of the complex lead sintesis.

Complex lead

The algorithm operates with a complex lead Y of several primary leads L. In cases of 12-standard leads, synthesis of the three quasi-orthogonal Frank leads is recommended first [3,12], thus determining the complex lead as a spatial vector. The complex lead is obtained as: where Xj(i) is the amplitude value of the sample i in lead j, and Y(i) is the current complex lead. The above formula (except the normalizing coefficient 1/L and the absolute value) was initially adopted from the work of Bakardjian [13]. Operating with unsigned (absolute) values proved convenient when dealing with QRSs and extrasystoles having different, for example positive (in one lead) and negative (in the other lead) deflections.

Adaptive steep-slope threshold – M

• Initially M = 0.6*max(Y) is set for the first 5 s of the signal, where at least 2 QRS complexes should occur. A buffer with 5 steep-slope threshold values is preset: MM = [M1M2M3M4M5], where M1 ÷ M5 are equal to M. • QRS or beat complex is detected if Yi ≥ MFR, • No detection is allowed 200 ms after the current one. In the interval QRS ÷ QRS+200a new value of M5 is calculated: newM5 = 0.6*max(Yi) The estimated newM5 value can become quite high, if steep slope premature ventricular contraction or artifact appeared, and for that reason it is limited to newM5 = 1.1* M5 if newM5 > 1.5* M5. The MM buffer is refreshed excluding the oldest component, and including M5 = newM5. M is calculated as an average value of MM. • M is decreased in an interval 200 to 1200 ms following the last QRS detection at a low slope, reaching 60 % of its refreshed value at 1200 ms. • After 1200 ms M remains unchanged. The thresholds definitions are presented in more detail with the help of several examples. Two ECG leads are shown in Fig. 1a. Detected QRSs are marked with 'red O' on Lead 1. The summary lead and the steep-slope threshold are represented in Fig. 1b.
Figure 1

Adaptive steep-slope threshold

Adaptive steep-slope threshold

Adaptive integrating threshold – F

The integrating threshold F is intended to raise the combined threshold if electromyogram noise is accompanying the ECG, thus protecting the algorithm against 'erroneous beat detection'. Initially F is the mean value of the pseudo-spatial velocity Y for 350 ms. With every signal sample, F is updated adding the maximum of Y in the latest 50 ms of the 350 ms interval and subtracting maxY in the earliest 50 ms of the interval. F = F + (max(Yin latest 50 ms in the 350 ms interval) - max(Yin earliest 50 ms in the 350 ms interval))/150 The way F is updated means that not every sample in the interval is integrated, but just the envelope of the pseudo-spatial velocity Y. The weight coefficient 1/150 is empirically derived. Two ECG leads are shown in Fig. 2a. The pseudo-spatial velocity Y and the integrated threshold are presented in Fig. 2b. The correct detection is due to the rise of F (hence of MFR) with about 0.2 mV. The beat complex is included in the integration process (note the high rise of F after any of the complexes), thus making almost impossible a close detection to the previous complex.
Figure 2

Adaptive integrating threshold

Adaptive integrating threshold

Adaptive beat expectation threshold – R

The beat expectation threshold R is intended to deal with heartbeats of normal amplitude followed by a beat with very small amplitude (and respectively with very small slew rate). This can be observed for example in cases of electrode artifacts. Conversely to the integrating threshold protecting against erroneous QRS detection, R is protecting against 'QRS misdetection'. A buffer with the 5 last RR intervals is updated at any new QRS detection. Rm is the mean value of the buffer. • R = 0 V in the interval from the last detected QRS to 2/3 of the expected Rm. • In the interval QRS + Rm * 2/3 to QRS + Rm, R decreases 1.4 times slower then the decrease of the previously discussed steep slope threshold (M in the 200–1200 ms interval). • After QRS + Rm the decrease of R is stopped. The time-course of the beat expectation threshold R is shown in Fig. 3. The decrease of R (respectively MFR) with about 0.2 mV at the fourth QRS allows its detection, despite the lack of complex in Lead 2, which leads to a two-fold decrease of the summary lead amplitude Y (Fig. 3b).
Figure 3

Adaptive beat expectation threshold

Adaptive beat expectation threshold

Combined adaptive threshold – MFR

The combined adaptive threshold is a sum of the adaptive steep-slope threshold, adaptive integrating threshold and adaptive beat expectation thresholds. (Fig. 4)
Figure 4

Combined adaptive threshold

Combined adaptive threshold MFR = M + F + R

Algorithm 2: pseudo-real-time detection with additional triggering of eventually missed heart beat in the last detected RR interval

All previous considerations relate to Algorithm 1, which detects a beat at its occurrence. Additional checking for an eventually missed heartbeat is performed by Algorithm 2. Its function is explained by the signal in Fig. 5. The fourth complex at the 15.2 s in Fig. 5b should be missed due to the fact that, MFR is greater then the summary lead Y.
Figure 5

Pseudo-real-time detection with additional triggering of eventually missed heart beat in the last RR interval.

Pseudo-real-time detection with additional triggering of eventually missed heart beat in the last RR interval. Let's mark the previous RR interval with t1 and the last – with t2 (Fig. 5a). If t1 is not shortened, which is tested by logic OR of the 2 conditions t1>Rm OR Rm-t1<0.12*Rm AND in the same time t2 is quite long to fulfill the condition abs(t2-2*Rm)<0.5*Rm, the interval is subjected to check for a missed complex. A test is performed on each of the primary leads where a sharp peak is searched (defined as a product > 4 μV of two signal differences having one central and two lateral points 8 ms apart). If the test is passed, a second one is carried out for the amplitude of the summary lead at that point, which should be bigger then 1/3 of the mean value of the buffer MM, in order to define this point as a missed QRS complex.

Results and discussion

Normally the statistical indices Se and Sp are derived from the following parameters: correctly detected beats TP (true positive), falsely detected beats FP (false positive) and undetected beats FN (false negative). In addition, we used two parameters, adopted from Dotsinsky and Stoyanov [6], as described below. SP – shifted positive error was introduced in order to explain cases like the one shown in Fig. 6. Here the algorithm made a false positive error before the 3rd QRS and missed the following QRS. Formally, this is a false positive error, immediately followed by a false negative. However, if the time interval between these two detections is reasonably short, for example ≤ 200 ms, we accepted this as one error only, labeled as Shifted False Positive Error (SP).
Figure 6

Shifted positive error at the P wave

Shifted positive error at the P wave Another example of SP error as a result of artifacts just before the normal complexes is shown in Fig. 7.
Figure 7

Shifted positive errors, false positive + false negative twins

Shifted positive errors, false positive + false negative twins SN – shifted negative error was assumed by the same principle as SP, but in the opposite sense. It also included twin FN+FP error occurring within 200 ms. The first incoming FP or FN error of the shifted is defining it as SP or SN. The logic of using shifted errors (instead of FP and FN or FN and FP in cases when they appear within 200 ms of each other) is that thus the total number of beats in a record retains its value. Otherwise it would change depending on the type and number of errors and thus impede correct computation of Se and Sp. The sensitivity Se is calculated by summing FN SN, while the specificity Sp – by summing FP+SP. The method was developed in Matlab. All 48 recordings from the MIT-BIH Arrhythmia database, without any exception, were used for testing the two algorithms. The processed files containing detection marks were automatically compared with the original MIT-BIH annotated beats by specially designed software. It shows all cases where the annotation and detection marks differ by more than 60 ms. These cases were examined by an independent expert, thus excluding possible author's influence. The results for the two algorithms are presented in Table 1.
Table 1

Statistical results for the two algorithms

FileAnnotated beatsAlgorithm 1Algorithm 2


TPFNFPSNSPTPFNFPSNSP
10022732273000022730000
10118631862140018621400
10221872187000021870000
103208420622541192065058127
10422122211100022111000
105256725432358142544236813
10620272017110920180109
10721372135200021370000
108176316642403941674142385
109253225211110025275000

11121242124000021240000
11225392539000025390000
11317971797000017970000
11418791879000018790000
11519531951041119520401
1162412238922201239219201
11715351535000015350000
11822752275000022750000
11919871987000019870000
12118631863000018630000

12224762476000024760000
12315181516200015162000
12416191617200016190000
20026012549939182525526412023
2011963190260001190260001
20221362130600021306000
203297829017113332911622732
20526562652400026524000
20718621860200018620100
2082954293714721293911722

20930043004010030040100
2102647259156100260344100
21227482748000027480000
21335513548300035501000
21422602258111022564100
21533623362000033620000
21722082204300122052001
21921542153100021531000
22020482048000020480000
22124272426100024261000

22224832480200124820001
223259525851000025905000
22820532053000020530100
23022562256000022560000
23118861886000018860000
2321767176601201176601201
23330763073300030742000
23427532753000027530000

Sum1100501095482942154716110961524023948147
Statistical results for the two algorithms Of all 110050 annotated beats ('unknown' or 'questionable' were excluded from the study), true detected are 109548 for Algorithm 1 and 109616 for Algorithm 2. The statistical indices are: Algorithm 1: Se = 99.69 %, Sp = 99.66 %; Algorithm 2: Se = 99.74 %, Sp = 99.65 %. The standard way of Se and Sp calculation, considering the joint SP and SN errors as two separate errors gives the following results: Algorithm 1: Se = 99.54 %, Sp = 99.61 %; Algorithm 2: Se = 99.60 %, Sp = 99.60 %. Algorithm 2 improved the sensitivity by 0.05 % (0.06 % for the standard evaluation) as a result of decreased number of undetected beats. This result can be observed for example in recordings 109,203, 210 and 223, where the additionally detected beats are respectively 6, 9, 12 and 5. The performance of both algorithms was especially tested with the file A5001 from the AHA containing R-over-T premature ventricular complexes, very close to the previous normal QRS complex (Fig. 5a). An improvement of 74 undetected by Algorithm 1 R-on-T complexes was observed. The detection of such premature ventricular complexes occurring at the time of ventricular repolarization was considered important, having in mind possible risk of ventricular fibrillation triggering by R-on-T events.

Conclusions

The proposed algorithms for real-time and pseudo-real-time implementation are adaptive, independent of thresholds and constants values. They are self-synchronized to the QRS steep slope and the heart rhythm, regardless of the resolution and sampling frequency used. Due to the integration threshold, the algorithms are practically insensitive to electromyogram and similar high-frequency noise. The algorithms can operate with one, two or more leads, using a combined lead signal derived from the sum of absolute values of the differentiated lead signals. The statistical indices are higher than, or comparable to those, cited in the scientific literature.
  10 in total

1.  Ventricular beat classifier using fractal number clustering.

Authors:  H Bakardjian
Journal:  Med Biol Eng Comput       Date:  1992-09       Impact factor: 2.602

2.  A comparison of the noise sensitivity of nine QRS detection algorithms.

Authors:  G M Friesen; T C Jannett; M A Jadallah; S L Yates; S R Quint; H T Nagle
Journal:  IEEE Trans Biomed Eng       Date:  1990-01       Impact factor: 4.538

3.  ECG beat detection using filter banks.

Authors:  V X Afonso; W J Tompkins; T Q Nguyen; S Luo
Journal:  IEEE Trans Biomed Eng       Date:  1999-02       Impact factor: 4.538

Review 4.  Developments in ECG acquisition, preprocessing, parameter measurement, and recording.

Authors:  I K Daskalov; I A Dotsinsky; I I Christov
Journal:  IEEE Eng Med Biol Mag       Date:  1998 Mar-Apr

5.  Orthogonal electrocardiogram derived from the limb and chest electrodes of the conventional 12-lead system.

Authors:  C L Levkov
Journal:  Med Biol Eng Comput       Date:  1987-03       Impact factor: 2.602

6.  Genetic design of optimum linear and nonlinear QRS detectors.

Authors:  R Poli; S Cagnoni; G Valli
Journal:  IEEE Trans Biomed Eng       Date:  1995-11       Impact factor: 4.538

7.  Detection of ECG characteristic points using wavelet transforms.

Authors:  C Li; C Zheng; C Tai
Journal:  IEEE Trans Biomed Eng       Date:  1995-01       Impact factor: 4.538

8.  A real-time QRS detection algorithm.

Authors:  J Pan; W J Tompkins
Journal:  IEEE Trans Biomed Eng       Date:  1985-03       Impact factor: 4.538

9.  A robust-digital QRS-detection algorithm for arrhythmia monitoring.

Authors:  A Ligtenberg; M Kunt
Journal:  Comput Biomed Res       Date:  1983-06

10.  Ventricular beat detection in single channel electrocardiograms.

Authors:  Ivan A Dotsinsky; Todor V Stoyanov
Journal:  Biomed Eng Online       Date:  2004-01-29       Impact factor: 2.819

  10 in total
  51 in total

1.  ECG signal analysis for the assessment of sleep-disordered breathing and sleep pattern.

Authors:  K Kesper; S Canisius; T Penzel; T Ploch; W Cassel
Journal:  Med Biol Eng Comput       Date:  2011-12-23       Impact factor: 2.602

2.  FPGA Implementation of Heart Rate Monitoring System.

Authors:  D Panigrahy; M Rakshit; P K Sahu
Journal:  J Med Syst       Date:  2015-12-07       Impact factor: 4.460

3.  Reliable real-time calculation of heart-rate complexity in critically ill patients using multiple noisy waveform sources.

Authors:  Nehemiah T Liu; Leopoldo C Cancio; Jose Salinas; Andriy I Batchinsky
Journal:  J Clin Monit Comput       Date:  2013-08-30       Impact factor: 2.502

4.  Reliability and accuracy of heart rate variability metrics versus ECG segment duration.

Authors:  James McNames; Mateo Aboy
Journal:  Med Biol Eng Comput       Date:  2006-08-22       Impact factor: 2.602

5.  Analysis of first-derivative based QRS detection algorithms.

Authors:  Natalia M Arzeno; Zhi-De Deng; Chi-Sang Poon
Journal:  IEEE Trans Biomed Eng       Date:  2008-02       Impact factor: 4.538

6.  Cardiovascular control and stabilization via inclination and mobilization during bed rest.

Authors:  Martin Wieser; Stefan Gisler; Amirehsan Sarabadani; Rafael M Ruest; Lilith Buetler; Heike Vallery; Verena Klamroth-Marganska; Margret Hund-Georgiadis; Morena Felder; Josef L Schoenberger; Clemens Gutknecht; Robert Riener
Journal:  Med Biol Eng Comput       Date:  2013-10-07       Impact factor: 2.602

7.  Predicting Volume Responsiveness Among Sepsis Patients Using Clinical Data and Continuous Physiological Waveforms.

Authors:  Rishikesan Kamaleswaran; Jiaoying Lian; Dong-Lien Lin; Himasagar Molakapuri; SriManikanth Nunna; Parth Shah; Shiv Dua; Rema Padman
Journal:  AMIA Annu Symp Proc       Date:  2021-01-25

8.  Event-related potential and functional MRI measures of face-selectivity are highly correlated: a simultaneous ERP-fMRI investigation.

Authors:  Boaz Sadeh; Ilana Podlipsky; Andrey Zhdanov; Galit Yovel
Journal:  Hum Brain Mapp       Date:  2010-10       Impact factor: 5.038

9.  Comparison between human awake, meditation and drowsiness EEG activities based on directed transfer function and MVDR coherence methods.

Authors:  Chamila Dissanayaka; Eti Ben-Simon; Michal Gruberger; Adi Maron-Katz; Haggai Sharon; Talma Hendler; Dean Cvetkovic
Journal:  Med Biol Eng Comput       Date:  2015-03-13       Impact factor: 2.602

10.  Statistical feature extraction for artifact removal from concurrent fMRI-EEG recordings.

Authors:  Zhongming Liu; Jacco A de Zwart; Peter van Gelderen; Li-Wei Kuo; Jeff H Duyn
Journal:  Neuroimage       Date:  2011-10-20       Impact factor: 6.556

View more

北京卡尤迪生物科技股份有限公司 © 2022-2023.