Next Article in Journal
A Comprehensive Evaluation Algorithm of Multi-Point Relay Based on Link-State Awareness for UANETs
Previous Article in Journal
Sensor-Based Measurement Method to Support the Assessment of Robot-Assisted Radiofrequency Ablation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

QRS Detector Performance Evaluation Aware of Temporal Accuracy and Presence of Noise

by
Wojciech Reklewski
,
Marek Miśkowicz
and
Piotr Augustyniak
*
Department of Metrology and Electronics, Biocybernetics ad Biomedical Engineering, AGH University of Krakow, 30-059 Krakow, Poland
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(5), 1698; https://doi.org/10.3390/s24051698
Submission received: 29 December 2023 / Revised: 13 February 2024 / Accepted: 2 March 2024 / Published: 6 March 2024
(This article belongs to the Section Biomedical Sensors)

Abstract

:
Algorithms for QRS detection are fundamental in the ECG interpretive processing chain. They must meet several challenges, such as high reliability, high temporal accuracy, high immunity to noise, and low computational complexity. Unfortunately, the accuracy expressed by missed or redundant events statistics is often the only parameter used to evaluate the detector’s performance. In this paper, we first notice that statistics of true positive detections rely on researchers’ arbitrary selection of time tolerance between QRS detector output and the database reference. Next, we propose a multidimensional algorithm evaluation method and present its use on four example QRS detectors. The dimensions are (a) influence of detection temporal tolerance, tested for values between 8.33 and 164 ms; (b) noise immunity, tested with an ECG signal with an added muscular noise pattern and signal-to-noise ratio to the effect of “no added noise”, 15, 7, 3 dB; and (c) influence of QRS morphology, tested on the six most frequently represented morphology types in the MIT-BIH Arrhythmia Database. The multidimensional evaluation, as proposed in this paper, allows an in-depth comparison of QRS detection algorithms removing the limitations of existing one-dimensional methods. The method enables the assessment of the QRS detection algorithms according to the medical device application area and corresponding requirements of temporal accuracy, immunity to noise, and QRS morphology types. The analysis shows also that, for some algorithms, adding muscular noise to the ECG signal improves algorithm accuracy results.

1. Introduction

QRS detectors are widely used as a front end of various ECG processing chains; consequently, their usage is concerned virtually in any ECG-dedicated software. Moreover, from the signal processing viewpoint, they serve as an interface between a continuous series of samples captured by recording devices and a feature-based algorithm used for classification and detection purposes. Consequently, in several ECG software packages, the QRS detector and preceding filters are the unique procedures involving every sample of the record. Therefore, high accuracy of detection and low computational complexity are of key importance and are usually regarded as primary quality factors. Detection accuracy, however, becomes a less distinctive factor as many modern detectors approach 99.9%.
Mobile and wearable ECG data acquisition systems face an inherent conflict between autonomy time and usability. The time between battery recharge, power consumption, detection accuracy, size, and weight of the device have to be balanced by a compromise. To this end, two important quality aspects appear to produce a reliable estimate of the suitability of a particular QRS detection algorithm to an area of application. The first aspect is the temporal stability of the detection point sequence (that is, its independence from the QRS morphology type). With the QRS detector producing highly accurate detection points, one could avoid recalculations of more precise QRS peak positions and directly input the detection points to procedures such as HRV analysis or shape classifying. The second point is the noise immunity of the detection point sequence, which specifies how much noise (e.g., of muscular origin), present for example in wearable-based in-field ECG measurements, affect the precision of QRS detection and alter the medical findings produced by subsequent diagnostic procedures.
In this paper, we address the problem of the comprehensive evaluation of QRS detection performance using multidimensional criteria, including the temporal tolerance of QRS complex detection, robustness amid noise, and sensitivity to QRS morphology. The proposed methodology enables the selection of the QRS detectors for specific applications, such as clinical data analysis, long-term monitoring with mobile devices and wearables, fast results, or arrhythmia diagnosis. The analysis is demonstrated in the example of four selected QRS detection algorithms implemented in Python according to their specification in the relevant references [1,2,3,4]. The algorithms are tested on the MIT-BIH Arrhythmia Database (MIT-BIH AD) [5] with added muscular noise from the MIT-BIH Noise Stress Test Database (MIT-BIH NSTD) [6]. The tests were conducted on Dell Latitude E6400, Intel Core2Duo P8400, 2.26 GHz, and 4 GB RAM running with Debian 10.13. Implementation of the algorithms, test tools, and data processing were performed in Python 3.7.3. Plots were created in Jupyter Notebook (server v5.7.8 with Python 3.7.3 [GCC 8.3.0]).
The performance analysis shows that the QRS detectors demonstrate different sensitivities to the detection of temporal tolerance. Some algorithms maintain high detection accuracy, even for low values of temporal tolerance of QRS detection. The others exhibit good results only for high values of temporal tolerance (i.e., comparable to the QRS standard duration of 100 ms).
The QRS detection performance under extra noise is in general deteriorated. However, as shown in this paper, for some QRS morphologies, extra noise in the ECG signal can paradoxically improve QRS detection accuracy. This effect resembles the improvement of audio and video data by randomizing the quantization error known as dither [7,8].
The performance of the algorithms depends on QRS morphology, as each algorithm uses different ECG signal filtering methods and signal analysis in subsequent processing blocks. Some QRS morphologies are more problematic than others for each algorithm under analysis. In our tests, V-type QRS morphologies were the most problematic for algorithms under analysis.
The paper is organized as follows: Section 2 addresses related work; Section 3 describes the four algorithms under analysis, the database, and the preparation of test datasets; Section 4 presents results; Section 5 is the discussion; and Section 6 contains conclusions.

2. Related Work

Medical testing procedures are conventionally evaluated based on binary classification by calculating parameters such as TP, FN, FP, and TB. These parameters are also commonly used in the literature for performance evaluation and comparison of QRS detection algorithms [9]. True positive (TP) is the number of correctly detected R peaks, false negative (FN) is the number of omitted R-peaks, false positive (FP) is the number of places wrongly classified as R-peaks, and total beats (TB) is the number of annotated R-peaks in a database record. However, much less attention is paid to temporal detection accuracy. The numerical values of TP, FN, and FP depend on detector temporal tolerance (DTT), defined as the maximum allowed time difference between the algorithm detection points (R-peaks) and the corresponding annotations from the reference database [10]. A variety of temporal tolerance values are used in the literature, ranging from 60 ms to 160 ms, which sometimes results in the comparison of algorithms with different temporal resolutions. The problem of the sensitivity of the accuracy of QRS detection algorithms in the temporal resolution of the detection defined by DTT is examined in [10]. When the algorithm is tested with a certain high value of DTT, relatively distant locations of R-peak detection points and database annotation are successfully paired and counted as TP. Further testing with certain lower DTT values will result in the distance between detection points and database annotation exceeding the DTT value and, consequently, their pairing will be unsuccessful. Database annotation without paired detection points will be counted as FN, and algorithm detection without paired database annotation will be counted as FP. This way, the algorithm’s TP detection for higher values of DTT will be replaced by a pair of FN and FP detections for lower DTT values. As expected, the higher the DTT, the better the numerical results of the TP, FN, and FP. However, the deterioration rate of an algorithm’s accuracy depends on the given QRS detection algorithm. Some algorithms demonstrate slow degradation, while others suffer a quick performance drop with decreasing DTT values [10].
A substantial research effort has been dedicated to examining the robustness of QRS detectors’ performance against noise in ECG signal recordings; [11] reviews 38 major state-of-the-art techniques of QRS detection with comprehensive comparative analysis of techniques for ECG signal denoising and QRS detection. In their conclusion, the authors emphasize a need to invent computational techniques “to analyze the ECG signal with higher accuracy in all conditions”, which justifies the development of multidimensional methods to test algorithms’ performance, among other criteria, in various noise conditions and temporal accuracy requirements.
The performance results of the Pan–Tompkins QRS detection algorithm in noisy ambulatory ECG data with varying signal-to-noise ratios are presented in [12]. Two ECG databases are used for testing: the MIT-BIH NSTD [6] and the MIT-BIH AD [5]. The algorithm results for sensitivity (Se = TP/(TP + FN)) and positive predictivity (PPV or +P) (+P = TP/(TP + FP)) deteriorate from close to 100% for noise level with SNR = 24 dB to around 60% and 70% respectively for SNR = −6 dB. The analysis shows that the Pan–Tompkins algorithm needs improvements to achieve good detection performance for noisy signals.
In [13], the performance analysis of selected three well-known QRS detection algorithms is addressed: by Pan–Tompkins [4], WQRS [14], and by Hamilton [15] against the MIT-BIH AD and the noise-contaminated ECG signal with different levels of baseline wander (BW), muscle artifact (MA), and electrode motion (EM) artifact from the MIT-BIH NSTD. As shown in [13], noise and artifacts decreased the quality indices of algorithms from close to 100% for SNR = 12 dB to:
  • BW noise: Se = 95% for WQRS and +P = 62% for WQRS for SNR = −12 dB,
  • MA noise: Se = 83% for Hamilton and +P = 38% for WQRS for SNR = −12 dB,
  • and EM noise: Se = 65% for Hamilton and +P = 30% for WQRS for SNR = −12 dB.
The poorest performance was noted for ECG signals affected by EM artifacts.
In [16], a new QRS detection method is proposed and validated, with different levels of baseline wander, muscle artifact, and electrode motion artifact as noise sources against MIT-BIH NSTD with the following processing blocks: first derivative, Hilbert transform envelope, wavelet transform, wavelet component reduction, signal reconstruction, and thresholding. The proposed QRS detection method achieves Se = 78.89% and +P = 75.25% for MIT-BIH NSTD and SNR = 0 dB.
The performance of three selected state-of-the-art QRS detection algorithms and the evaluation of the accuracy of their R-peak localization are included in [17]. The algorithms under analysis were the following: integrate and fire pulse train automaton [18], zero-crossing counts [19], and the knowledge-based method [20]. The authors propose a method to estimate the temporal accuracy of R-peak detection for normal and abnormal beats as well as a simple scheme to compensate for slackness introduced by the filtering part of the algorithms.
In opposition to the ubiquitous, conventional, TP, FN, and FP parameters mentioned at the beginning of this section, a novel QRS detection performance indicator, jitter with accuracy (JA), aimed at evaluating QRS detection algorithms under realistic noise scenarios, is proposed in [21]. The authors state that Se and +P metrics used to assess the quality of R-peak detection lose information value, where a high temporal tolerance of 100 ms or more [21] is used. Also, frequent use of the MIT-BIH AD, which is, according to the authors, artifact-free, leads to an overestimation of algorithm performance and unjustified reported Se and +P performance indicators significantly above 99%.
The relationship between QRS detection performance and database sampling frequency is examined in [22]. The analysis, carried out for the Hamilton algorithm [23] against the MIT-BIH database, shows that adapting the algorithm threshold parameters to sampling frequency optimizes the algorithm’s accuracy results.
In [24], the five selected multisignal heartbeat detectors are tested against 100 records from the training dataset of the PhysioNet/CinC Challenge 2014, with various noise levels added. The performance results and best-worse ranking of the detectors are reported.
The performance of 10 QRS detection algorithms against six internationally recognized ECG databases with various normal and abnormal beat types and various levels of noise and artifacts is reported in [25]. The tested algorithms were by Pan–Tompkins, Hamilton mean, Hamilton median, RS slope, sixth power, finite state machine (FSM), U3 transform, difference operation (DOM), ‘jqrs’, and optimized knowledge based (OKB). The overall results are reported for each algorithm and each database. The analysis shows that QRS detection results decrease significantly for poor signal-quality ECG signals for all tested algorithms.
A new R-peak detector based on neural networks is proposed in [26]. The algorithm performance does not deteriorate with low-quality or noisy ECG signals acquired from mobile electrocardiogram sensors, such as Holter monitors. The proposed QRS detector uses a 1-D self-organized operational neural network with generative neurons and offers lower computational complexity than conventional 1-D convolutional neural networks. The QRS detection results reported are a 99.10% F1 score (F1 = 2 · PPV · Se/(Se + PPV)), 99.79% Se, and 98.42% +P achieved on the China Physiological Signal Challenge-2020 dataset (CPSC-DB). The CPSC-DB database contains 1 026 095 beats, collected from arrhythmia patients, and includes real-world noise as well as artifacts from a wearable real-world Holter ECG device.
In [27], 10 QRS detection techniques published between 2020 and 2022 are compared based on the performance parameters: Se, PPV, F1 score, and DER (DER = (FN + FP)/TB).
A new R-peak detection technique based on visibility graph transformation, which maps a discrete time series to a graph by expressing each sample as a node and assigning edges between intervisible samples, is proposed in [28]. The proposed method is compared against two existing QRS detection methods on a noisy and sample-accurate University of Glasgow ECG Database [29] with two performance metrics: F1 score and root mean square of successive differences (RMSSD). The result of the first comparison is presented as a boxplot of the proposed F1 score method versus the SWT-based method [30] and matched filter detector [21]. There is an annotation that “the tolerance for deviation from the true R-peaks was 0%”, which corresponds to DTT = 0. In order to evaluate the RMSSD, a Wilcoxon signed-rank test between the estimated RMSSD values and the ground truth was performed and presented.
In [31], the authors present two (FastNVG and FastWHVG) computationally accelerated versions of the visibility graph transformation QRS detection method proposed in [28], together with an extended comparison with additional 7 QRS detectors from the literature.
ECG noise removal techniques are reviewed in [32]. The types and sources of noise are identified, and six major domains of denoising are subsequently explored. The techniques for denoising are presented and their performance is evaluated according to the following parameters: root-mean-square error, percentage-root-mean-square difference, and signal-to-noise ratio improvement.

3. Materials and Methods

To demonstrate the concept of evaluation of QRS detector performance aware of temporal accuracy, the presence of noise, and various QRS morphologies, we implemented four QRS detection algorithms and tested their accuracy, expressed by a true-positive-to-total-beats ratio (TP/TB). The tests are carried out for a range of DTT values and controlled mixing of muscular noise, which is often present in wearables applications. Obviously, it is desirable for QRS detectors to show good TP/TB scores, even for low DTT. Such detectors are particularly welcome, as R-peak location corrections are not necessary, and resynchronization of the heartbeat time series is not needed before further ECG processing steps.
The four algorithms selected from the QRS detection literature consist of three algorithms developed for mobile and wearables applications [1,2,3] and the algorithm broadly used as the reference in QRS detection literature [4]. Algorithms 1 and 2 belong to a group of algorithms based on digital filtering [9]. In addition, they can be classified into a group of “low” computational complexity using the subjective comparison with respect to computational load [9]. In contrast, Algorithm 3 does not use any digital filters and works on a different principle of operation based on a level-crossing sampling of the ECG signal. Algorithm 3 can be assigned to the group of “medium” computational load. Algorithm 4 is based on digital filters [9] and can be assigned to the group of “medium” computational load. Compared with Algorithms 1 and 2, Algorithm 4 uses more mathematical operations performed in multiple stages of signal processing.
Section 3.1, Section 3.2, Section 3.3 and Section 3.4 present the specification of QRS detection algorithms included in the study, while Section 3.5 contains the definition of test signals used to examine their immunity to noise in ECG signals.

3.1. Algorithm 1

Algorithm 1 has been designed to address the requirements of low-power and real-time operations for use in mobile and wearable applications. The algorithm’s two main processing blocks, preprocessing and dynamic thresholding, have been designed to minimize necessary computational resources and power consumption (Figure 1). The preprocessing block consists of three consecutive operations performed on the input digital ECG signal: differentiation, the moving window average, and squaring. The resultant feature signal is fed to the thresholding block, which works in sequence in three states. In State 1, the algorithm searches for the maximum value of the feature signal within a window of fixed length (260 ms). The time instant when the feature signal reaches its maximum is marked as an R-peak temporal location. State 2, following State 1, is a 200 ms wait from the R-peak detection. During State 3, the dynamic threshold is decreased exponentially with time until it reaches the value of the feature signal. State 3 is then terminated and the algorithm moves to State 1, the search for the maximum value of the feature signal. The threshold initial value in State 3 is adaptive and dependent on the average amplitude of all previously found R-peaks.

3.2. Algorithm 2

Algorithm 2 has been designed to achieve the low computational complexity and high energy efficiency needed for mobile and portable applications. The preprocessing stage consists of two parallel signal processing paths (Figure 2). Both paths include the high-pass moving average filters but with different cutoff frequencies followed by a rectification operation. The moving average window lengths Nlong and Nshort define the cutoff frequencies of the filters. The outputs of the parallel processing paths are the inputs to the decision block. The preprocessed signal u[n], after high-pass filtering with a higher cutoff frequency (moving average window length Nshort), is used to decide when to start the QRS search window. During the search window of a fixed 200 ms length, the preprocessed signal of the other path y[n] after high-pass filtering with a lower cutoff frequency (moving average window length NLong) is analyzed in order to find its maximum value. The time instant of the maximum value of the y[n] signal is classified as an R-peak occurrence. The decision block of the algorithm works in three states: (1) identification of the search window, (2) detection of the R-peak by maximum y[n] value search, and (3) waiting state after R-peak occurrence. The threshold necessary to identify the search window is adaptive and its value is calculated based on the amplitude of the last R-peak and the previous threshold value.

3.3. Algorithm 3

Algorithm 3 [3] is based on modified level-crossing sampling, which belongs to event-triggered sampling schemes [33]. The input to the algorithm is the analog ECG signal (instead of the digital ECG used for the other algorithms analyzed in this paper). In the level-crossing sampling, the analog input range is divided into 2M − 1 levels (where M is the sampling resolution) and the sample is taken only when the input signal crosses one of the levels. The level-crossing analog-to-digital converter (LC-ADC) used in this algorithm is modified by asymmetrical hysteresis. The sample is taken only when (a) the input signal crosses the sampling level in the same direction as the last sample taken or (b) the input signal crosses kl levels in the opposite direction (where kl is the hysteresis parameter). The LC-ADC outputs the samples that are non-uniformly spaced in time. By selecting the appropriate value of kl, analysis of sample clusters (Figure 3 signal change direction DVi, Token), and their timing (Figure 3 Time Data Dti), it is possible identify the input ECG signal peaks first and, in the next processing step, identify R-peaks. There are three main processing blocks: level-crossing analog-to-digital converter (LC-ADC), peak detector, and beat detector (Figure 3). The algorithm does not use any filters (unlike other algorithms analyzed in this paper) due to the properties of the level-crossing sampling scheme adopted in the LC-ADC with hysteresis. For the purposes of algorithm analysis in this paper, the input to the algorithm is a uniformly sampled ECG signal.

3.4. Algorithm 4

Algorithm 4, developed by Pan and Tompkins and published in 1985, is the most widely referenced QRS detector. The adaptation of the original algorithm used in this study comes from [34]. In this adaptation, the decision block is simplified, whereas the preprocessing stage uses the Butterworth filter instead of the simple moving average filter. The original ECG signal preprocessing is retained and consists of a band pass filtering, differentiation, squaring, and moving window average [4] (Figure 4). The resulting preprocessed signal is fed to the decision block where, during State 1, its first local maximum that is higher than the detection threshold is marked as the R-peak (the condition for a local maximum is where the next and the previous sample values are smaller than the sample under analysis). Each local maximum smaller than the detection threshold modifies the value of the detection threshold in line with [4]. As soon as the R-peak is found, the algorithm enters the waiting state, State 2, which is 200 ms long, and thereafter resumes the local maximum search. The parallel analysis of filtered signals with a second threshold is not applied in this implementation of the original algorithm. The modification of the feature signal threshold based on a regular and irregular heart rate, as well as the searchback mechanism, is implemented.

3.5. ECG Database and Test Dataset

In the MIT-BIH AD, the QRS morphology types [35] appear with the following number of cases: N (Normal)—75052, L (Left Bundle Branch Block)—8075, R (Right Bundle Branch Block)—7259, V (Ventricular Premature Beat)—7130, P (Paced)—7028, and A (Atrial Premature Beat)—2546. These six QRS morphology patterns were selected as the most frequent in the database (107090/109494 beats, i.e., 97.8%) as well as in real recordings expected in mobile patients. Records in the MIT-BIH AD are sampled at 360 Hz, which corresponds to the sampling interval of 2.7778 ms. Throughout this paper, we use the number of samples to describe the timeline.

Noise Pattern and Noisy Test Signals

In order to evaluate the immunity to noise of the QRS detectors under analysis, we have used the first channel signal from the MIT-BIH AD and three derivate datasets. Each of the three datasets was created by adding a noise signal from the MIT-BIH NSTD multiplied by three different scaling factors to the original MIT-BIH AD. Considering the wearable application as the most expected and the omnipresence of muscle artifacts, we decided to use a “muscle artifact” (MA) record from the MIT-BIH NSTD. From a practical viewpoint, the records were made with the same sampling parameters and the same length as the ECG signal. Moreover, the noise added is point-by-point trackable, allowing for a detailed comparison of the detector’s performance at each particular heartbeat. As we used original records from the MIT-BIH AD, the intrinsic noise already present in the data is out of our control. Consequently, the investigation of QRS detectors’ behavior in the presence of noise refers to “original” and not “noise-free” ECGs, and the relative signal-to-noise ratio (SNR) has been calculated based on the average power factor of the original record Ps (MIT-BIH AD) and added noise pattern Pn (MIT-BIH NSD record MA):
S N R = 20 l o g P s P n
The power is calculated according to:
P = 1 N 1 i = 0 N 1 ( x i + 1 x i ) 2
The following procedure has been applied to achieve the target relative SNR of 15, 7, and 3 dB. The mixing procedure for one record of the MIT-BIH AD starts with the calculation of SNR based on Equation (1), where Ps is the power factor for this MIT-BIH AD record and Pn is the power factor for the MIT-BIH NSTD record MA. The result is existing SNR (eSNR). Next, to calculate k (scaling factor), the target noise level (tSNR; for example, 3 dB) is input to Equation (3). The square root in Equation (3) is due to the fact that the amplitude ECGtest and ECGorig ratio is the square root of the power ratio. Once the scaling factor k is calculated, the test dataset ECGtest is calculated according to Equation (4), where MA is the MIT-BIH NSTD record MA. This procedure is repeated for all MIT-BIH AD records for all three (15, 7, 3 dB) noise-test datasets.
k = t S N R e S N R
E C G t e s t = E C G o r i g + k · M A  
The process of adding noise to example record 121 of the MIT-BIH AD is illustrated in Figure 5 and Figure 6 below.

4. Results

The investigation of the QRS detection accuracy of four QRS detectors was performed separately for the six most frequent beat morphologies, five arbitrarily selected values of detection temporal tolerance, and four true-to-life levels of noise mixed with the database records. The amount of data to analyze and present is sizeable. Therefore, we present the following:

4.1. Statistics of the QRS Detectors’ Performance

With four independent variables (detector number, DTT, QRS morphology type, and added noise level), one can build a total of 16 statistical analyses. We selected the three most representative statistical analyses for independent studies of the detectors’ performance and vulnerability to DTT, QRS morphology type, and added noise level. Table 1 summarizes statistics on TP/TB for each algorithm (columns) and each tolerance window length (rows) for various DTT values, while the mean value and standard deviation are calculated for all QRS morphology types and added noise levels.
Table 2 presents statistics on TP/TB for each QRS morphology type (rows), while the mean value and standard deviation are calculated for all DTT values and noise levels. This table represents the detection quality and its independence from the QRS morphology, which is unknown at the time of detection.
Table 3 presents statistics on TP/TB for each algorithm (columns) and each noise level tested (rows), while the mean value and standard deviation are calculated for all QRS morphology types and DTT values. This table helps to explore which algorithm is the best and which gives the most stable detection results in the presence of noise.

4.2. Plots of the Detectors’ Performance

To provide deeper insight into detectors’ performance, we also use plots (displayed in Figure 7, Figure 8, Figure 9 and Figure 10) that examine the properties of each studied algorithm independently.

5. Discussion

5.1. Influence of Noise

While planning the experimental work, the expectation was that, with increasing levels of noise the TP/TB results would deteriorate. When we analyze the average TP/TB results in Table 3, we can conclude that the expectations are fulfilled for Algorithm 1, Algorithm 2, and Algorithm 3 but not for Algorithm 4.
The average TP/TB (Table 3) results for increased levels of noise are in the following range for no added noise to maximum added noise SNR = 3 dB, respectively:
  • Algorithm 1—83.72% and 82.12%,
  • Algorithm 2—90.68% and 89.18%,
  • Algorithm 3—77.12% and 71.74%,
  • and Algorithm 4—62.03% and 70.43%; there is no deterioration, but an improvement of 8.4% with added noise.
For Algorithm 1, the improvement in average TP/TB with increased level of added noise has not been observed (Table 3). Turning the analysis of Algorithm 1 to not-averaged TP/TB data (Figure 7), we can observe that, for DTT 8.33 ms (three samples) QRS morphology types N, L, R, and V, there is an improvement in TP/TB with increased added noise level for several records. Looking into details (Table 4) for QRS morphology of N type, DTT 8.33 ms (three samples), the TP/TB results for added noise 15 dB, 7 dB, and 3 dB are improved compared with records with no added noise for the following records: 103, 106, 112, 113, 115, 117, 119, 122, 123, 200, 201, 202, 203, 208, 210, 213, 219, 220, 221, 233, and 234 (Table 4). It constitutes results for over 50% of the records (21 from 40 records with N-type QRS morphology). The biggest improvement is registered for record 122. For greater values of DTT and N-type beats with this algorithm, there are no improvements in TP/TB (Figure 7); detailed results for DTT 47.22 ms (17 samples) are shown in Table 5.
For Algorithm 2, an improvement in average TP/TB with an increased level of added noise has not been observed (Table 3). As can be seen in the detailed data for N-type QRS morphology and DTT 8.33 ms (three samples) in Table 6, there is only one case of TP/TB improvement, for record 230. The improvement in TP results for no added noise versus added noise of 15, 7, and 3 dB are 86, 156, and 196, respectively.
For Algorithm 3, the improvement in average TP/TB with an increased level of added noise has not been observed (Table 3). When analyzing Algorithm 3 results for not-averaged TP/TB data (Figure 9), the improvement of TP/TB with an increased level of added noise is revealed for QRS morphology type V for all values of DTT. Analysis of the results for N-type QRS morphology (Table 8 and Table 9) reveals that, for DTT 8.33 ms (three samples), there is improvement in totals, whereas for DTT 47.22 ms (17 samples), there is no improvement in totals (only in a few selected records).
For Algorithm 4, the improvement in average TP/TB with an increased level of added noise has been observed (Table 3). Looking into details (Table 10) for QRS morphology of N-type, DTT 8.33 ms (three samples), the TP/TB results for added noise 15 dB, 7 dB, and 3 dB are improved for 35 out of 40 records. The improvement is not revealed for records 105, 119, 121, 122, and 212. For DTT 47.22 ms (17 samples), the improvement is revealed for 30 out of 40 records. The improvement is not revealed for the following records: 100, 105, 106, 119, 121, 122, 212, 222, 228, and 231.
Why do TP/TB results for Algorithm 4 not deteriorate with increased levels of noise? When we look into detailed data in Table 10, TP/TB results for N-type QRS morphology, and DTT 8.33 ms (three samples), the improvement in TP/TB with increasing levels of noise can be observed for 30 out of 40 records. Similar improvements of results are revealed for DTT 47.22 ms (17 samples) and can be observed in Table 11. Why do TP/TB results improve with added noise? Our hypothesis is that it is related to Algorithm 4 higher computational complexity being reflected in more calculations and processing blocks in computation. Thus, the hypothesis is that adding noise to the input ECG signal reduces friction between the blocks of computation. The phenomena of reduction of error from sticky moving parts in mechanical computers used to perform navigation and bomb trajectory calculations are cited as the first observation and purposeful use of dither [36]. In analog-to-digital conversion, dither—purposeful distortion to the input signal—causes digitization error to behave well statistically (dithered quantization) [7,8].
In summary, by adding muscular noise, we expected a deterioration of the detectors’ performance. Surprisingly, our results show that this is not always the case. For Algorithm 4, there is general improvement visible in averaged TP/TB data and confirmed in detailed data. For other algorithms, general improvement in averaged TP/TB has not been observed. Still, the phenomena of TP/TB improvement with added noise are present, although on a smaller scale for other algorithms (namely for specific QRS morphologies, DTT values, or individual records).

5.2. Influence of Detector Time Tolerance DTT

While planning the experimental work, the expectation was that increasing DTT would improve the TP/TB results. This assumption was additionally supported by results of one-dimensional analysis of DTT influence on TP in [10].
When we analyze the results in Table 1, we can see that results confirm the expectation for all algorithms and all DTT values under analysis. The average TP/TB results calculated over all added noise and QRS morphologies achieved for the lowest DTT 8.33 ms (three samples) and highest DTT 163.89 ms (59 samples), respectively, are:
  • Algorithm 1—27.54% and 99.25%,
  • Algorithm 2—65.75% and 99.71%,
  • Algorithm 3—8.26% and 94.80%,
  • and Algorithm 4—14.30% and 99.46%.
The following are additional observations from the analysis of plots (Figure 7, Figure 8, Figure 9 and Figure 10) for all algorithms:
  • Algorithm 1 for QRS morphologies N, L, R, P, and A, with the exception of DTT 8.33 ms (three samples), reveals TP/TB of more than 90%. For QRS morphology type V, the TP/TB results are below 90% for all DTT ≤ 125 ms (45 samples). For DTT 8.33 ms (three samples), for all QRS morphologies, the TP/TB results are below 30%.
  • Algorithm 2 results of TP/TB for all DTT and for QRS morphology N and A are above 80%. For L-, R-, V- and P-type QRS morphologies, the TP/TB results are above 90% for DTT > 86.11 ms (31 samples).
  • Algorithm 3 TP/TB results for DTT 8.33 ms and for all QRS morphologies are below 30%, and for other higher DTT values, there is a clear deterioration of TP/TB results with decreasing DTT. For all QRS morphologies TP/TB is above 90% only for DTT 125 ms and 163.89 ms (45 and 59 samples).
  • Algorithm 4 TP/TB results for all QRS morphologies are above 90% only for DTT 125 ms and 163.89 ms (45 and 59 samples). Results for other values of DTT clearly deteriorate well below 80% with decreasing DTT value.
In summary, decreasing DTT causes deterioration of TP/TB with varying ratios dependent on algorithm, QRS morphology, and added noise level.

5.3. Influence of QRS Morphology

While planning the experimental work, the expected result was that, depending on the algorithm, certain QRS morphologies are more difficult for precise R-peak detection than other QRS morphologies. During the analysis of average TP/TB results in Table 2, we observed that the aforementioned expectation is fulfilled for all algorithms.
On closer analysis of the range of TP/TB results from worst to best in Table 2, we can observe the following range of TP/TB results for algorithm and QRS morphology, respectively:
  • Algorithm 1 from 76.92% for V to 92.52% for P,
  • Algorithm 2 from 80.51% for V to 97.24% for A,
  • Algorithm 3 from 67.29% for V to 76.47% for L,
  • and Algorithm 4 from 65.38% for L to 72.28% for N.
We can conclude that, for the four algorithms under analysis, the most difficult in precise R-peak location was V-type QRS morphology for three algorithms and L-type for one algorithm. In terms of the easiest QRS morphology type for precise R-peak location, it is different for each algorithm under analysis and yields P-, A-, L-, and N-types of QRS morphology.
Visual analysis of the TP/TB results displayed in plots (Figure 7, Figure 8, Figure 9 and Figure 10) in a direction to reveal any visual similarities in locations of the data points for various QRS morphologies is presented below for algorithm and QRS morphology, respectively:
  • Algorithm 1 for N, R, and A—similar locations; for L, V, and P, each type—different locations,
  • Algorithm 2 for N, R, and A—similar locations; for L, V, and P—similar locations,
  • Algorithm 3 for N, L, and R—similar locations; for V, P, and A, each type—different locations,
  • and Algorithm 4 for N, R, and A—similar locations; for L, V, and P—similar locations.
In summary, the most difficult and easiest QRS morphology type for accurate R-peak detection by a given detection algorithm is specific for that algorithm. The worst and best TP/TB results for all levels of noise in ECG signal and all DTT values under analysis are also specific for each algorithm.

5.4. Comparison of the Algorithms Studied

It is evident that a high-performance QRS detector should demonstrate a high TP/TB ratio even with low DTT. Therefore, a series of QRS detection instants may reliably be used by following procedures such as heart rate variability. In this aspect, all atrial premature, blocked, paced, and ventricular beats are not considered as representative to cardiac cycle control from the autonomous nervous system. Consequently, the precision of N-type QRS detection is more important than other types of beat morphology. At the same time, the high stability of the detection point sequence (that is, its independence from QRS morphology) is a desired algorithm feature. Lastly, an algorithm’s detection robustness to noise is very important, especially for mobile and wearable applications, as the level of noise is high and fluctuates depending on the environment and human activity.
Algorithm 1 and Algorithm 2 demonstrate good robustness to noise in ECG signal (Table 3, Figure 7 and Figure 8), whereas the QRS detection accuracy for Algorithm 3 and Algorithm 4 for noisy ECG signal is significantly worse. Additionally, the detection accuracy strongly drops with noise level, which makes the Algorithm 3 and Algorithm 4 not suitable for implementation in wearable ECG devices.
Algorithm 2 has a good detection accuracy even for low temporal tolerances (DTT = 3), except for V-type beats it has a TP/TB score over 50%, and for DTT = 17, it grows over 93% except for types L and V. This is a clinically acceptable detection ratio for remote cardiac rhythm detection and, as our results show, can be achieved with a temporal accuracy of 47.22 ms (17 samples).
Algorithm 1 and Algorithm 3 work well for DTT ≥ 47.22 ms (17 samples); TP/TB exceeds 90%, except for QRS types V for Algorithm 1 and Algorithm 3, and P for Algorithm 3, but its performance drops for low temporal tolerance (DTT 8.33 ms, three samples). Compared with Algorithm 1, Algorithm 2, and Algorithm 3, which were developed in the last decade, Algorithm 4, developed in 1985 and broadly referenced in the literature on QRS detection, is more sensitive to noise (Figure 10) and QRS morphology. It achieves satisfactory detection accuracy only for large DTT values.
Algorithm 1 (Figure 7) shows perfect noise immunity for V-type QRS morphology and high noise immunity for other beat types. For low noise levels, it has similar scores to Algorithm 3 (Figure 9), except for P morphology, where it is, again, significantly better.
Adding noise improves the results of Algorithm 3 in V-type morphology, and for high DTT also in N-type QRS morphology. This is also observed in Algorithm 4 (Figure 10), where, in most cases, red dots (SNR = 3 dB) are not the lowest data points in the plot.

5.5. Limitations of the Study and Future Research

A lack of computational complexity analysis may be considered as the main limitation of our study. Although the number of elementary operations for each algorithm and the growth of resource demand related to input size can be easily determined, preferences in this aspect depend on the target platform. The hardware architecture (e.g., multicore processors, vector data processing) and machine representation of data determine principal usability factors, such as maximum time of autonomy or the necessary size of battery, particularly in wearable recorders.
Another limitation of our study is the use of the MIT-DIH Arrhythmia Database, which is relatively sparsely sampled (sampling frequency 360 Hz) and known for annotation errors. In fact, the position of the maximum of the signal depends on the ECG lead used (each lead “sees” the spatial electrical phenomenon of heartbeat from a different viewpoint) and the true QRS maximum (i.e., precise R-peak) position can only be estimated from vectorcardiography. Moreover, in all cases, the sampling process is in no way synchronized with heart action. Consequently, the maximum falls between samples, and calculation of its true position requires interpolation. Nevertheless, we assume that possible annotation errors are rare and equally distributed before and after the true positions of R-peaks. This may result in an overestimation of the standard deviation results, but with no effect on the mean results of the algorithms.
The above two limitations will be addressed in future research, as will be the analysis of the sources of improvement in TP/TB results under conditions of added noise, as discussed in Section 5.1.

6. Conclusions

This study focused on the performance evaluation of QRS detectors aware of temporal accuracy and the presence of noise. Contrarily to most authors, satisfied with detection correctness as the sole quality indicator, we propose multidimensional criteria, including
  • accuracy (i.e., TP/TB),
  • precision of detection point location, i.e., TP/TB dependence on the DTT,
  • sensitivity to noise,
  • and sensitivity to QRS morphology.
To show the multidimensional method for QRS detectors’ evaluation of temporal accuracy, we compared three modern QRS detection algorithms and a well-known, commonly referenced Pan–Tompkins algorithm originating from the pioneer age of computerized electrocardiography.
The main scientific contribution of this work lies in testing QRS detectors in multiple dimensions, including various time tolerance values (DTT), which determines the detection statistics expressed by true positive, false positive, and false negative detection cases. Algorithms that demonstrate good accuracy with low values of DTT are the most precise algorithms. Output from such algorithms is immediately usable for subsequent ECG processing procedures such as HRV analysis or QRS morphology classification. Moreover, we observed that the accuracy of QRS detection depends on QRS morphology. Tests performed for various levels of added muscular noise revealed that there are significant differences between algorithms with respect to their noise robustness. High robustness amid noise (stable detection accuracy in noisy ECG recordings) is important in mobile and wearable applications in unstable conditions (e.g., in motion).

Author Contributions

Conceptualization, W.R. and P.A.; methodology, W.R. and P.A.; software, W.R. and M.M.; validation, P.A.; formal analysis, M.M.; investigation, W.R. and P.A.; resources, W.R. and P.A.; data curation, W.R.; writing—original draft preparation, W.R. and P.A.; writing—review and editing, W.R., M.M. and P.A.; visualization, W.R.; supervision, P.A.; project administration, M.M.; funding acquisition, P.A. and M.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by AGH University of Krakow in 2023 and 2024 as research project no. 16.16.120.773, and by the National Science Centre of Poland under research project DEC-2018/31/B/ST7/03874.

Institutional Review Board Statement

Not applicable, no ethical issues, only public database used as study materials.

Informed Consent Statement

Not applicable, no human-acquired data, only public database used as study materials.

Data Availability Statement

Not applicable, data used are already available as public database.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study, in the collection, analyses, or interpretation of data, in the writing of the manuscript, or in the decision to publish the results.

References

  1. Gutiérrez-Rivas, R.; Garcia, J.J.; Marnane, W.P.; Hernández, A. Novel real-time low-complexity QRS complex detector based on adaptive thresholding. IEEE Sens. J. 2015, 15, 6036–6043. [Google Scholar] [CrossRef]
  2. Reklewski, W.; Heryan, K.; Miśkowicz, M.; Augustyniak, P. Real time ECG R-peak detection by extremum sampling. In Proceedings of the 2020 IEEE 6th International Conference on Event-Based Control, Communication, and Signal Processing (EBCCSP), Krakow, Poland, 23–25 September 2020; pp. 1–7. [Google Scholar]
  3. Ravanshad, N.; Rezaee-Dehsorkh, H.; Lotfi, R.; Lian, Y. A level-crossing based QRS-detection algorithm for wearable ECG sensors. IEEE J. Biomed. Health Inform. 2013, 18, 183–192. [Google Scholar] [CrossRef]
  4. Pan, J.; Tompkins, W.J. A real-time QRS detection algorithm. IEEE Trans. Biomed. Eng. 1985, 3, 230–236. [Google Scholar] [CrossRef]
  5. Moody, G.B.; Mark, R.G. The MIT-BIH arrhythmia database on CD-ROM and software for use with it. IEEE Comput. Cardiol. Proceed. 1990, 2, 185–188. [Google Scholar]
  6. Moody, G.; Muldrow, W.; Mark, R. The MIT-BIH noise stress test database. Comput. Cardiol. 1984, 11, 381–384. [Google Scholar]
  7. Carbone, P.; Narduzzi, C.; Petri, D. Dither signal effects on the resolution of nonlinear quantizers. IEEE Trans. Instrum. Meas. 1994, 43, 139–145. [Google Scholar] [CrossRef]
  8. Gray, R.M.; Stockham, T.G. Dithered quantizers. IEEE Trans. Inf. Theory 1993, 39, 805–812. [Google Scholar] [CrossRef]
  9. Kohler, B.U.; Hennig, C.; Orglmeister, R. The principles of software QRS detection. IEEE Eng. Med. Biol. Mag. 2002, 21, 42–57. [Google Scholar] [CrossRef] [PubMed]
  10. Heryan, K.; Reklewski, W.; Szaflarski, A.; Ordowski, M.; Augustyniak, P.; Miśkowicz, M. Sensitivity of QRS Detection Accuracy to Detector Temporal Resolution. In Proceedings of the 2021 IEEE Computing in Cardiology (CinC), Brno, Czech Republic, 13–15 September 2021; Volume 48, pp. 1–4. [Google Scholar]
  11. Tripathi, P.M.; Kumar, A.; Komaragiri, R.; Kumar, M. A review on computational methods for denoising and detecting ECG signals to detect cardiovascular diseases. Arch. Comput. Methods Eng. 2022, 29, 1875–1914. [Google Scholar] [CrossRef]
  12. Fariha MA, Z.; Ikeura, R.; Hayakawa, S.; Tsutsumi, S. Analysis of Pan-Tompkins algorithm performance with noisy ECG signals. In Journal of Physics: Conference Series; IOP Publishing: Bristol, UK, 2020; Volume 1532, p. 012022. [Google Scholar]
  13. Mohd Apandi, Z.F.; Ikeura, R.; Hayakawa, S.; Tsutsumi, S. An analysis of the effects of noisy electrocardiogram signal on heartbeat detection performance. Bioengineering 2020, 7, 53. [Google Scholar] [CrossRef]
  14. Zong, W.; Moody, G.B.; Jiang, D. A robust open-source algorithm to detect onset and duration of QRS complexes. Comput. Cardiol. 2003, 30, 737–740. [Google Scholar]
  15. Hamilton, P. Open Source ECG Analysis. Comput. Cardiol. 2002, 1, 101–104. [Google Scholar]
  16. D’Aloia, M.; Longo, A.; Rizzi, M. Noisy ECG signal analysis for automatic peak detection. Information 2019, 10, 35. [Google Scholar] [CrossRef]
  17. Gradl, S.; Leutheuser, H.; Elgendi, M.; Lang, N.; Eskofier, B.M. Temporal correction of detected R-peaks in ECG signals: A crucial step to improve QRS detection algorithms. In Proceedings of the 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Milan, Italy, 25–29 August 2015; pp. 522–525. [Google Scholar]
  18. Nallathambi, G.; Prıncipe, J.C. Integrate and fire pulse train automaton for QRS detection. IEEE Trans. Biomed. Eng. 2014, 61, 317–326. [Google Scholar] [CrossRef] [PubMed]
  19. Kohler, B.U.; Hennig, C.; Orglmeister, R. QRS Detection Using Zero Crossing Counts. Progress Biomed. Res. 2003, 8, 138–145. [Google Scholar]
  20. Elgendi, M. Fast QRS detection with an optimized knowledge-based method: Evaluation on 11 standard ECG databases. PLoS ONE 2013, 8, e73557. [Google Scholar] [CrossRef]
  21. Porr, B.; Macfarlane, P.W. A new QRS detector stress test combining temporal jitter and accuracy (JA) reveals significant performance differences amongst popular detectors. bioRxiv 2023, 722397. [Google Scholar] [CrossRef]
  22. Gusev, M.; Domazet, E. Optimizing the impact of resampling on QRS detection. In Communications in Computer and Information Science, Proceedings of the ICT Innovations 2018, Engineering and Life Sciences: 10th International Conference, ICT Innovations 2018, Ohrid, Macedonia, 17–19 September 2018; Springer International Publishing: Berlin/Heidelberg, Germany, 2018; pp. 107–119. [Google Scholar]
  23. Hamilton, P.S.; Tompkins, W.J. Quantitative investigation of QRS detection rules using the MIT/BIH arrhythmia database. IEEE Trans. Biomed. Eng. 1986, 12, 1157–1165. [Google Scholar] [CrossRef]
  24. Vollmer, M. Noise resistance of several top-scored heart beat detectors. In Proceedings of the 2017 Computing in Cardiology (CinC), Rennes, France, 24–27 September 2017; IEEE: Piscataway, NJ, USA; pp. 1–4. [Google Scholar]
  25. Liu, F.; Liu, C.; Jiang, X.; Zhang, Z.; Zhang, Y.; Li, J.; Wei, S. Performance analysis of ten common QRS detectors on different ECG application cases. J. Healthc. Eng. 2018, 2018, 9050812. [Google Scholar] [CrossRef]
  26. Gabbouj, M.; Kiranyaz, S.; Malik, J.; Zahid, M.U.; Ince, T.; Chowdhury, M.E.; Khandakar, A.; Tahir, A. Robust peak detection for holter ECGs by self-organized operational neural networks. In IEEE Transactions on Neural Networks and Learning Systems; IEEE: Piscataway, NJ, USA, 2022. [Google Scholar]
  27. Revanth, N.; Bennet, M.A. Detection of QRS Complexes in ECG Signal. In Proceedings of the 2023 IEEE International Conference on Integrated Circuits and Communication Systems (ICICACS), Raichur, India, 24–25 February 2023; IEEE: Piscataway, NJ, USA; pp. 1–5. [Google Scholar]
  28. Koka, T.; Muma, M. Fast and Sample Accurate R-Peak Detection for Noisy ECG Using Visibility Graphs. In Proceedings of the 2022 44th Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Glasgow, UK, 11–15 July 2022; IEEE: Piscataway, NJ, USA; pp. 121–126. [Google Scholar]
  29. Howell, L.; Porr, B. High precision ECG Database with Annotated R Peaks, Recorded and Filmed Under Realistic Conditions. 2018. [Google Scholar] [CrossRef]
  30. Kalidas, V.; Tamil, L. Real-time QRS detector using Stationary Wavelet Transform for Automated ECG Analysis. In Proceedings of the 2017 IEEE 17th International Conference on Bioinformatics and Bioengineering (BIBE), Washington, DC, USA, 23–25 October 2017; pp. 457–461. [Google Scholar]
  31. Emrich, J.; Koka, T.; Wirth, S.; Muma, M. Accelerated Sample-Accurate R-Peak Detectors Based on Visibility Graphs. In Proceedings of the 2023 31st European Signal Processing Conference (EUSIPCO), Helsinki, Finland, 4–8 September 2023; IEEE: Piscataway, NJ, USA; pp. 1090–1094. [Google Scholar]
  32. Chatterjee, S.; Thakur, R.S.; Yadav, R.N.; Gupta, L.; Raghuvanshi, D.K. Review of noise removal techniques in ECG signals. IET Signal Process. 2020, 14, 569–590. [Google Scholar] [CrossRef]
  33. Miskowicz, M. Reducing communication by event-triggered sampling. In Event-based Control and Signal Processing; CRC Press: Boca Raton, FL, USA, 2016; pp. 37–58. [Google Scholar]
  34. Porr, B.; Howell, L.; Stournaras, J.; Nir, Y. Popular ECG R peak detectors written in python, (1.3.3); Zenodo: Geneva, Switzerland, 2023. [Google Scholar] [CrossRef]
  35. Goldberger, A.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.-K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, e215–e220. [Google Scholar] [CrossRef] [PubMed]
  36. Pohlmann, K.C. Principles of Digital Audio; McGraw-Hill Professional: New York, NY, USA, 2000. [Google Scholar]
Figure 1. Algorithm 1 block diagram based on [1].
Figure 1. Algorithm 1 block diagram based on [1].
Sensors 24 01698 g001
Figure 2. Algorithm 2 block diagram based on [2].
Figure 2. Algorithm 2 block diagram based on [2].
Sensors 24 01698 g002
Figure 3. Algorithm 3 block diagram based on [3]. Peak detector output signal DVi is a two-bit signal where values 00 or 11 indicate the local peak in the ECG signal; that is, the sample that is taken when the input signal crosses kl sampling levels in the opposite direction to the sample taken previously. Token is a one-bit signal indicating with “1” the moment of sampling, and Dti is an 11-bit word readout of the counter to register information about sample time (required in non-uniform sampling).
Figure 3. Algorithm 3 block diagram based on [3]. Peak detector output signal DVi is a two-bit signal where values 00 or 11 indicate the local peak in the ECG signal; that is, the sample that is taken when the input signal crosses kl sampling levels in the opposite direction to the sample taken previously. Token is a one-bit signal indicating with “1” the moment of sampling, and Dti is an 11-bit word readout of the counter to register information about sample time (required in non-uniform sampling).
Sensors 24 01698 g003
Figure 4. Algorithm 4 block diagram based on [4].
Figure 4. Algorithm 4 block diagram based on [4].
Sensors 24 01698 g004
Figure 5. The ECG (excerpt of record 121 from the MIT-BIH AD) and noise (excerpt of record MA (muscle artifact) from the MIT-BIH NSTD) before the mixing procedure.
Figure 5. The ECG (excerpt of record 121 from the MIT-BIH AD) and noise (excerpt of record MA (muscle artifact) from the MIT-BIH NSTD) before the mixing procedure.
Sensors 24 01698 g005
Figure 6. The ECG (excerpt of record 121 from the MIT-BIH AD) with (a) no added noise, (b) added noise for SNR = 15 dB, (c) added noise for SNR = 7 dB, and (d) added noise for SNR = 3 dB.
Figure 6. The ECG (excerpt of record 121 from the MIT-BIH AD) with (a) no added noise, (b) added noise for SNR = 15 dB, (c) added noise for SNR = 7 dB, and (d) added noise for SNR = 3 dB.
Sensors 24 01698 g006aSensors 24 01698 g006b
Figure 7. Performance of Algorithm 1 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Figure 7. Performance of Algorithm 1 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Sensors 24 01698 g007
Figure 8. Performance of Algorithm 2 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Figure 8. Performance of Algorithm 2 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Sensors 24 01698 g008
Figure 9. Performance of Algorithm 3 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Figure 9. Performance of Algorithm 3 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Sensors 24 01698 g009
Figure 10. Performance of Algorithm 4 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Figure 10. Performance of Algorithm 4 in relation to QRS beat morphology (upper long horizontal axis), DTT values (in samples, bottom short horizontal axes), and added noise level (dot shape and color).
Sensors 24 01698 g010
Table 1. QRS detectors’ accuracy is expressed as the true-positive-to-total-beats ratio for various DTT values. The mean value and the standard deviation of the true-positive-to-total-beats ratio are computed for all six considered QRS morphology types and all four levels of added noise. The best results are highlighted in bold.
Table 1. QRS detectors’ accuracy is expressed as the true-positive-to-total-beats ratio for various DTT values. The mean value and the standard deviation of the true-positive-to-total-beats ratio are computed for all six considered QRS morphology types and all four levels of added noise. The best results are highlighted in bold.
Algorithm
Detector
Temporal
Tolerance
[ms]
(Samples)
Algorithm 1Algorithm 2Algorithm 3Algorithm 4
MeanStdMeanStdMeanStdMeanStd
8.33 (3)27.5421.9365.7519.748.269.5214.306.36
47.22 (17)92.539.2787.7711.1680.6611.6852.8514.17
86.11 (31)96.794.4498.661.6288.436.2574.938.83
125.00 (45)98.891.0299.550.4492.224.7298.521.33
163.89 (59)99.250.8999.710.3694.804.4599.460.55
Table 2. QRS detectors’ accuracy is expressed as the true-positive-to-total-beats ratio for various heartbeat morphology types. The mean value and the standard deviation of the true-positive-to-total-beats ratio are computed for all five considered DTT values and all four levels of added noise. The best results are highlighted in bold.
Table 2. QRS detectors’ accuracy is expressed as the true-positive-to-total-beats ratio for various heartbeat morphology types. The mean value and the standard deviation of the true-positive-to-total-beats ratio are computed for all five considered DTT values and all four levels of added noise. The best results are highlighted in bold.
Algorithm
Beat Type
Algorithm 1Algorithm 2Algorithm 3Algorithm 4
MeanStdMeanStdMeanStdMeanStd
N82.7132.3496.305.6674.1236.9172.2830.12
L82.4731.3486.8619.3076.4735.3165.3836.50
R80.9636.8593.2211.9475.5237.6071.2730.76
V76.9226.3480.5124.5467.2934.0866.3634.20
P92.5210.4185.9418.5572.6825.6466.4933.43
A82.4235.7497.245.2271.1734.7566.3035.91
Table 3. QRS detectors’ accuracy is expressed as the true-positive-to-total-beats ratio for various added noise levels. The mean value and the standard deviation of the true-positive-to-total-beats ratio are computed for all six considered QRS morphology types and all five considered DTT values. The best results are highlighted in bold.
Table 3. QRS detectors’ accuracy is expressed as the true-positive-to-total-beats ratio for various added noise levels. The mean value and the standard deviation of the true-positive-to-total-beats ratio are computed for all six considered QRS morphology types and all five considered DTT values. The best results are highlighted in bold.
Algorithm
Added Noise Level
Algorithm 1Algorithm 2Algorithm 3Algorithm 4
MeanStdMeanStdMeanStdMeanStd
No noise added83.7230.8890.6816.8077.1235.9062.0336.60
SNR 15 dB83.3830.4890.3416.7872.1633.6269.2732.71
SNR 7 dB82.7830.0889.8616.9370.4733.0070.4331.67
SNR 3 dB82.1229.7189.1817.2071.7433.5070.3231.60
Table 4. Results for Algorithm 1, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
Table 4. Results for Algorithm 1, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-Type Beats
No Noise AddedSNR = 15 dBSNR = 7 dBSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
10022391337117611431123−161−194−214
10118601860185318061766−7−54−94
1029999928680−7−13−19
1032082114261334374147220260
1041631146035
10525262383230522032128−78−180−255
10615074712215818275111135
1081739660552518512−108−142−148
112253709312613793126137
113178902911714829117148
1141820521456440421−65−81−100
115195309325593255
116230215113917850138177
1171534619565520489−54−99−130
119154312278330360266318348
12118611165894760679−271−405−486
1222476254664751777410497523
12315153775979745676
2001743110346193360
201162516661001375084121
202206139113615688133153
2032529280320360371408091
20525711394134612901263−48−104−131
2081586164288360386124196222
209262111410039
21024231610118623485170218
2129236285578224972
21326418331011492593141
21531952334112
217244028112811
21920828111210250103202242
220195427364453442
22120310123980123980
222206281484183282227188
223202909407794077
2281688120410941015972−110−189−232
23022550023023
231314265219226229−46−39−36
2332230191346431470155240279
234270011215344413204333402
TOTAL75,05213,46214,62115,33815,714115918762252
Table 5. Results for Algorithm 1, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
Table 5. Results for Algorithm 1, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-Type Beats
No Noise AddedSNR = 15 dBSNR = 7 dBSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
100223922382238223222240−6−14
10118601860185618201797−4−40−63
1029999989592−1−4−7
103208220822082208120770−1−5
10416316316316316100−2
105252625082510250224772−6−31
10615071504146714251398−37−79−106
10817391666152714591459−139−207−207
11225372536248723432220−49−193−316
11317891788177917701752−9−18−36
11418201778172116591606−57−119−172
115195319521952193019200−22−32
11623022284228022622232−4−22−52
11715341534143713601319−97−174−215
11915431543149014541428−53−89−115
12118611860169415321403−166−328−457
12224762476247124342376−5−42−100
12315151515146214471437−53−68−78
20017431740173817301725−2−10−15
20116251610159515881586−15−22−24
20220612061203720282021−24−33−40
20325292471245524092382−16−62−89
205257125702570256825630−2−7
20815861579157615721565−3−7−14
20926212621262126212621000
21024232421241724152405−4−6−16
212923922922922922000
213264126402640263726370−3−3
21531953194319431943194000
2172442442442432390−1−5
21920822082206920392032−13−43−50
220195419541954195119290−3−25
22120312031202820202011−3−11−20
22220622048202219831962−26−65−86
22320292029202720192005−2−10−24
22816881643155715081481−86−135−162
230225522552255225422530−1−2
231314289255260264−34−29−25
233223022282229222622171−2−11
23427002697269926992699222
TOTAL75,05274,71573,81872,85472,091−897−1861−2624
Table 6. Results for Algorithm 2, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type beats in those records.
Table 6. Results for Algorithm 2, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-Type Beats
No Noise AddedSNR = 15 dBSNR = 7 dSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
10022392236223522292198−1−7−38
10118601856185518561849−10−7
1029992847567−8−17−25
103208220802080207920770−1−3
1041631631631611580−2−5
10525262465244423622267−21−103−198
106150714891489147814710−11−18
1081739705652641644−53−64−61
11225371637145812661150−179−371−487
11317891787178817881788111
1141820521505475455−16−46−66
11519531948194719341916−1−14−32
11623022268222221282048−46−140−220
11715341002852753710−150−249−292
11915431542153014551398−12−87−144
1211861160911511002903−458−607−706
12224762475231621302014−159−345−461
12315151513149414311362−19−82−151
20017431623157515091446−48−114−177
201162516221622160315750−19−47
20220612061205820381991−3−23−70
20325291810161814971390−192−313−420
205257125672567254925180−18−49
20815861569156815571529−1−12−40
209262126162616260425860−12−30
21024232417240823552292−9−62−125
2129239229229219200−1−2
213264126372637261625750−21−62
21531951997196019151901−37−82−96
217244238231223216−7−15−22
21920822077206919921936−8−85−141
22019541939188418521799−55−87−140
221203120302031202020001−10−30
22220622049203720121964−12−37−85
22320291910187317851709−37−125−201
22816881675167216161560−3−59−115
230225521530137141186156196
231314314314314314000
23322302223221021352083−13−88−140
2342700269626972696268410−12
TOTAL75,05266,59565,13563,42361,874−1460−3172−4721
Table 7. Results for Algorithm 2, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type beats in those records.
Table 7. Results for Algorithm 2, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-Type Beats
No Noise AddedSNR = 15 dBSNR = 7 dBSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
10022392236223522322214−1−4−22
10118601856185518561852−10−4
1029995929082−3−5−13
1032082208020802080207900−1
10416316316316316200−1
10525262484247924272378−5−57−106
106150714901492148614852−4−5
10817391610157415561547−36−54−63
11225372536243222702177−104−266−359
11317891787178817881788111
11418201817181117691723−6−48−94
115195319501950194819380−2−12
11623022275226822282195−7−47−80
11715341534144613811328−88−153−206
11915431542153314801434−9−62−108
12118611860168215791485−178−281−375
12224762475242423392289−51−136−186
123151515131513149114620−22−51
20017431741173917291716−2−12−25
201162516231623161516040−8−19
202206120612061204920270−12−34
20325292449234422622188−105−187−261
205257125672567255225250−15−42
20815861569156815631548−1−6−21
20926212620261926182617−1−2−3
21024232418241523942365−3−24−53
2129239229229219210−1−1
213264126382639263426081−4−30
215319531943194319131870−3−7
217244244243242240−1−2−4
21920822079207720442007−2−35−72
22019541953195119481939−2−5−14
221203120302031202720151−3−15
22220622055204420211983−11−34−72
22320292028202419991967−4−29−61
228168816771677163516050−42−72
23022552252225222522252000
231314314314314314000
233223022242224219021620−34−62
2342700269626972698268912−7
TOTAL75,05274,65774,04273,06172,097−615−1596−2560
Table 8. Results for Algorithm 3, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
Table 8. Results for Algorithm 3, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-Type Beats
No Noise AddedSNR = 15 dBSNR = 7 dBSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
1002239202197168156−5−34−46
101186016323236161620
102990011011
1032082232110−1
10416389128140
10525263537455621021
10615070102102
108173926172841526
112253758165208239107150181
11317890000000
1141820244224228211−20−16−33
11519530001001
11623020238238
1171534679530490488−149−189−191
11915430011011
12118610326689326689
1222476017111711
12315150000000
2001743000100010
20116250245245
20220610132132
2032529396282101234362
20525712937424781318
2081586899079801−10−9
20926212157−135
210242307121571215
2129230011011
21326410021021
215319514121731116
2172440001001
21920822224002
22019540111111
22120310124124
222206263066260758732−23−43
22320290166166
22816886202732142126
23022550001001
2313140000000
23322300022022
23427000001001
TOTAL75,052204421302169226186125217
Table 9. Results for Algorithm 3, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
Table 9. Results for Algorithm 3, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-TYPE beats
No Noise AddedSNR = 15 dBSNR = 7 dBSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
10022392239210419061829−135−333−410
10118601853169715301452−156−323−401
1029999888277−11−17−22
10320822082195417591690−128−323−392
104163159156146138−3−13−21
10525262440216619991987−274−441−453
10615071500133112271202−169−273−298
10817391570125611491160−314−421−410
11225372534210120792014−433−455−520
11317891789168415561539−105−233−250
1141820139314321356127739−37−116
11519531953161815351545−335−418−408
11623022277185918841950−418−393−327
11715341532123612081242−296−324−290
11915431543116811941225−375−349−318
12118611857143613751345−421−482−512
12224762474194819912012−526−483−462
12315151515115811471164−357−368−351
20017431711001408−1711−1711−303
20116251621160914971406−12−124−215
20220612058197417991723−84−259−335
20325292453223620782042−217−375−411
20525712567245622392174−111−328−393
20815861559142913251307−130−234−252
20926212607256223892329−45−218−278
21024232393235021642004−43−229−389
212923916862799746−54−117−170
21326412632234622212208−286−411−424
21531953187315630032916−31−184−271
217244244217198199−27−46−45
21920822082172416711659−358−411−423
22019541953164215341537−311−419−416
22120312027195517541726−72−273−301
2222062166517121613153047−52−135
22320292028174016701619−288−358−409
22816881649154013811336−109−268−313
23022552245208919041831−156−341−414
231314314296254246−18−60−68
23322302228198018361839−248−392−389
23427002699254023462251−159−353−448
TOTAL75,05273,64764,80760,79860,884−8840−12,849−12,763
Table 10. Results for Algorithm 4, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
Table 10. Results for Algorithm 4, N-type morphology beats and DTT = 3 (8.33 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-Type Beats
No Noise AddedSNR = 15 dBSNR = 7 dBSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
1002239376522608616146232240
1011860303434500516131197213
10299163123211575
1032082197301411448104214251
1041631823292951111
10525262178202117781626−157−400−552
1061507396432476480368084
108173996209232223113136127
1122537715513110514812498
113178919928937041590171216
114182071138137132676661
115195348415719680153192
116230264337365385273301321
1171534142308313292166171150
119154375679666758840−89−168
121186166346715387−196−510−576
12224762123173413831141−389−740−982
123151577414715367140146
20017431205270195169
20116252711718522890158201
2022061114812720437116193
203252911421022122796107113
2052571561741788730180227169
208158631444044140812612794
209262171186304355115233284
210242354329400464275346410
212923514511499490−3−15−24
2132641772171416351392942863620
2153195324901292187126
2172440141922141922
219208275466563537391488462
220195477416119667154189
221203145200312355155267310
2222062543607600593645750
2232029107310797639787
2281688336543504504207168168
230225502112821128
23131410611111612651020
233223014209321337195307323
2342700706872953997166247291
TOTAL75,05211,90015,86616,28915,942396643894042
Table 11. Results for Algorithm 4, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
Table 11. Results for Algorithm 4, N-type morphology beats and DTT = 17 (47.22 ms), from the MIT-BIH AD. Improvements in results are marked in bold. Records 107, 109, 111, 118, 124, 207, 214, and 232 are not shown, as there are no N-type morphology beats in those records.
MIT-BIH Arrhythmia
Database, Normal—N-Type Beats
No Noise AddedSNR = 15 dBSNR = 7 dBSNR = 3 dBSNR = 15 dB vs. No Noise AddedSNR = 7 dB vs. No Noise AddedSNR = 3 dB vs. No Noise Added
RecordTBTPTPTPTP
10022391920188919091851−31−11−69
10118601332135913811361274929
1029920453736251716
10320821339148015541602141215263
10416358859693273835
10525262372228120932001−91−279−371
10615071500147314381399−27−62−101
1081739457891929933434472476
11225371117150315451462386428345
113178964595811071185313462540
1141820579873920923294341344
11519533937689561017375563624
11623021388174517441721357356333
1171534409857907905448498496
11915431508140812661211−100−242−297
12118611036112397987387−57−163
12224762459220520381958−254−421−501
1231515313736864859423551546
200174367895210401074274362396
2011625964113111841183167220219
2022061895121613331353321438458
20325291277164916681692372391415
2052571201821592137208714111969
2081586112712711267121614414089
2092621957135415821656397625699
21024231026151516221649489596623
212923856842848829−14−8−27
21326411558216121802083603622525
2153195922130015211651378599729
21724455135145149809094
2192082726144215361503716810777
22019541106127713511372171245266
2212031739123513791438496640699
22220621870184017951754−30−75−116
22320291220136813591350148139130
2281688137514061285124231−90−133
2302255722813928100991206287
231314291278278283−13−13−8
23322301190145815041483268314293
23427001943220922702254266327311
TOTAL75,05242,36050,69051,97551,700833096159340
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Reklewski, W.; Miśkowicz, M.; Augustyniak, P. QRS Detector Performance Evaluation Aware of Temporal Accuracy and Presence of Noise. Sensors 2024, 24, 1698. https://doi.org/10.3390/s24051698

AMA Style

Reklewski W, Miśkowicz M, Augustyniak P. QRS Detector Performance Evaluation Aware of Temporal Accuracy and Presence of Noise. Sensors. 2024; 24(5):1698. https://doi.org/10.3390/s24051698

Chicago/Turabian Style

Reklewski, Wojciech, Marek Miśkowicz, and Piotr Augustyniak. 2024. "QRS Detector Performance Evaluation Aware of Temporal Accuracy and Presence of Noise" Sensors 24, no. 5: 1698. https://doi.org/10.3390/s24051698

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop