Next Article in Journal
A Simple Picaxe Microcontroller Pulse Source for Juxtacellular Neuronal Labelling
Previous Article in Journal
Microfluidics for Antibiotic Susceptibility and Toxicity Testing
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Communication

A Proof-of-Concept Study: Simple and Effective Detection of P and T Waves in Arrhythmic ECG Signals

1
Department of Obstetrics & Gynecology, University of British Columbia and BC Children’s & Women’s Hospital, Vancouver, BC V6H 3N1, Canada
2
Electrophysiology and Heart Modeling Institute, (IHU LIRYC), Bordeaux 33604, France
3
School of Electrical and Electronics Engineering, University of Adelaide, Adelaide SA 5005, Australia
*
Author to whom correspondence should be addressed.
Bioengineering 2016, 3(4), 26; https://doi.org/10.3390/bioengineering3040026
Submission received: 1 September 2016 / Revised: 12 October 2016 / Accepted: 14 October 2016 / Published: 17 October 2016

Abstract

:
A robust and numerically-efficient method based on two moving average filters, followed by a dynamic event-related threshold, has been developed to detect P and T waves in electrocardiogram (ECG) signals as a proof-of-concept. Detection of P and T waves is affected by the quality and abnormalities in ECG recordings; the proposed method can detect P and T waves simultaneously through a unique algorithm despite these challenges. The algorithm was tested on arrhythmic ECG signals extracted from the MIT-BIH arrhythmia database with 21,702 beats. These signals typically suffer from: (1) non-stationary effects; (2) low signal-to-noise ratio; (3) premature atrial complexes; (4) premature ventricular complexes; (5) left bundle branch blocks; and (6) right bundle branch blocks. Interestingly, our algorithm obtained a sensitivity of 98.05% and a positive predictivity of 97.11% for P waves, and a sensitivity of 99.86% and a positive predictivity of 99.65% for T waves. These results, combined with the simplicity of the method, demonstrate that an efficient and simple algorithm can suit portable, wearable, and battery-operated ECG devices.

1. Introduction

According to the World Health Organization (WHO), cardiovascular diseases (CVDs) are the leading cause of death globally [1]. In recent years, a variety of programs and policies have been implemented in increasingly diverse communities to provide tools, strategies, and other best practices to reduce the incidence of initial and recurrent cardiovascular events [2]. To achieve this goal, the electrocardiogram (ECG) has become the most commonly used biosignal for the prompt detection of CVDs. Additionally, ECGs are used in the initiation of therapy in patients with acute coronary syndromes and the diagnosis of intraventricular conduction disturbances and arrhythmias [3]. However, ECG recordings may be collected with different durations (e.g., over 10 min during one session, for up to 7 days), thus requiring a robust and numerically-efficient algorithm to analyze the long-recorded data and detect their dynamic and characteristic waves [4].
Analysis of the P and T waves of the ECG is essential, as their shape and duration can be severely altered by certain pathologies. Changes in P waves may indicate defective intra-atrial conduction, hypertrophic conditions of the atria and atrio-ventricular conduction, among other abnormalities [5]. In some pathological conditions, T wave morphology may also vary because of altered ventricular activation [5].
Researchers have attempted to employ a variety of methods to detect P and T waves, each with its own strengths and limitations. For example, in [6], the discrete cosine transform (DCT) was used for discrimination of P waves on a few ECG segments from the MIT-BIH database. However, detection generally failed when the amplitude was very small. In [7], a Bayesian sampling algorithm (Partially Collapsed Gibbs Sampler, PCGS) was used to detect P and T waves in the PhysioNet QT interval database. Even though both waves were accurately detected at the same time, their characterization strongly depended on an a priori model assumption that was not verified, especially in pathological conditions. Moreover, it is has a high computational overhead.
In [8], a template-based correlation method was tested on the Physionet QT database. Despite rather satisfactory detection rates, the authors stated that estimation uncertainty is higher when signal quality is poor, thus demonstrating the lack of robustness of the method for noisy signals. The study in [9] proposed a Field Programmable Gate Array (FPGA) based system combined with the identification of the slopes of the waves of interest. The method was validated on the Physikalisch-Technische Bundesanstalt (PTB) diagnostic ECG database from Physionet. Nevertheless, only a portion of the database was examined, and half of the recordings (out of 12 s) was employed for algorithm training.
Li et al. [10] proposed a method for detecting monophasic P and T waves based on quadratic spline wavelets with compact support, but without validation on an ECG database. De Azevedo et al. [11] used a neural network with asymmetric basis functions to extract the features of the P waves on the MIT-BIH database. However, they did not mention the detection rate.
Strumillo [12] demonstrated a nonlinear signal decomposition method based on nested median filters. It was tested on the QT database for detecting T wave offset, but the detection rate was not reported. Martinez et al. [13] presented a generalized method for the discrimination of P and T waves based on quadratic spline wavelets and the derivative of a Gaussian as a smoothing function and tested it on the QT database. The biorthogonal wavelet transform was performed in [14] for P wave detection, but database source is not detailed. Chouhan et al. [15] used the first derivative with adaptive thresholds for simultaneous P and T wave detection.
Most of the algorithms in the literature detect either P or T waves separately. Many attempts have been made to find a satisfying universal solution for P and T wave detection. Moreover, most of these algorithms reported high P and T wave detection performance with high rates after excluding some segments or beats from the used records. Difficulties arise mainly because of the diversity of the P and T waveforms, low signal-to-noise ratio (SNR) and the artifacts accompanying the ECG signals [16], especially in the presence of arrhythmia [17].
The performance of the existing P and T wave detection algorithms is still inefficient and needs to be tested on long recordings rather than short ECG segments, such as those signals found in the well-known MIT-BIH database [18,19]. The recordings included in this dataset present a wide variety of cardiac disturbances, such as such as premature atrial complexes (PAC), premature ventricular complexes (PVC), left bundle branch blocks (LBBB), and right bundle branch blocks (RBBB).
Through this proof-of-concept study, we demonstrate a numerically-efficient and robust algorithm. We show that the proposed algorithm can detect P and T waves, despite the effect of pathological conditions on their properties—in particular, morphology and duration.

2. Data

Several standard ECG databases are available for the evaluation of QRS detection algorithms for ECG signals. Most of these databases contain annotated files for R peaks but not for P and T waves. We annotated the P and T peaks in 10 ECG recordings from the MIT-BIH Arrhythmia Database [18,19] to be used in evaluation for the following reasons:
  • The MIT-BIH database contains 30-min recordings for each patient, which is considerably longer than the recordings in many other databases, such as the Common Standards for Electrocardiography (CSE) database that contains 10-s recordings [20].
  • Arrhythmic ECG signals provided by the MIT-BIH Arrhythmia Database are impacted by multiple factors that affect signal quality. For example, we noted premature atrial complexes, non-stationary effects, premature ventricular complexes, low signal-to-noise ratio, left bundle blocks, and right bundle blocks. These challenges provide an opportunity to test the robustness of the P and T wave detection algorithm. These issues are expected to present significant difficulties for any ECG signal analysis algorithm [21].
The selected ten ECG recordings from the MIT-BIH Arrhythmia Database contain a total of 21,702 beats and each was a 30-minute recording. The sampling frequency was 360 Hz with an 11-bit rate resolution over a 10 mV range. The quality of the Leads varied and therefore we selected the Lead with the higher quality signals (Lead I). Annotations of P and T waves in MIT-BIH is described in [22] and can be downloaded from http://www.elgendi.net/databases.htm.

3. Methodology

A new numerically-efficient and robust algorithm adapted from the two event-related moving-average filter, discussed in [22], is proposed to detect P and T waves in ECG signals. The structure of the algorithm consists of three main parts as shown in Figure 1. Prior information about the duration of the P and T waves plays a major role in the decision making of the proposed algorithm in both stages: generating blocks of interest and thresholding.

3.1. Prior Information Analysis

The P and T wave detector is expected to improve the overall the performance and detection accuracy based on the prior duration information. In a normal (sinus) heart rhythm, each heartbeat consists of five distinct waves (P, Q, R, S, T). These distinct waves have a very specific sequential order and duration. Any deviation from the normal range for sinus rhythm is considered arrhythmic. Clifford et al. [17] provided information about the normal limits for the main events within the EGG, for a healthy male adult at 60 beats per minute (bpm), shown in Table 1.
Our algorithm depends on the estimate of the event duration before processing the ECG signal. For example, the expected durations of the main events of the ECG signals serve to assist the feature extraction phase. Moreover, decision making of the algorithm is supported by these durations. To illustrate this in more detail, by knowing that the P wave duration in a normal healthy subject varies from 33 to 47 samples (sampling frequency of 360 Hz), the values of W1 will be set based on this prior information. Setting the value of W2 depends on the expected duration of one heartbeat. In healthy subjects, this translates into approximately 1 s, therefore resulting in 360 samples in length (sampling frequency of 360 Hz). It is known that heartbeats vary from person to person and this is a rough estimate.
The QT, PR and RT intervals are dependent on the heart rate in an obvious way, the faster the heart rate the shorter the QT, PR and RT intervals; the consideration of this knowledge improves the detection of P and T waves. According to Table 1, the average duration of P wave is 110 ms; however, the minimum PR interval is 120 ms for a healthy subject (60 bpm). Certainly, in arrhythmic ECG signals the PR wave will reduce. Therefore, the minimum PR interval (PminRi + 1) will be considered as (110 ms) × RiRi + 1. Additionally, the PmaxRi + 1 equals (560 ms) × RiRi + 1. The value of the 560 ms was obtained from Table 1, for a total duration of PQ and QTc intervals.

3.2. Bandpass Filter

Morphologies of normal and abnormal QRS complexes differ widely. The ECG signal is often corrupted with noise from many sources: 50/60 Hz from power-line interference, EMGs from muscles, and motion artifacts, which have been discussed in [23]. Therefore, band pass filtering is an essential first step for nearly all QRS detection algorithms. The purpose of band-pass filtering is to remove the baseline wander and high frequencies that do not contribute to P and T wave detection.
A bidirectional Butterworth (i.e., “Butterworth filters”) bandpass filter is used based on the recommendation in [24]. The filter offers the required transition-band characteristics at low coefficient orders, which facilitates efficient implementation [24]. The main frequencies of the P and the T wave lie in the range of 0.5 Hz to 10 Hz as shown in the power spectra shown in Figure 2 and confirmed in [25]. Therefore, in this study, the baseline wander and high frequencies, which does not contribute to P and T wave detection, is removed using a second-order Butterworth filter with passband 0.5–10 Hz.

3.3. QRS Removal

The first stage of QRS removal is to detect R peaks, and then the QRS complex can be removed from each beat to make the P and T wave dominant. The removal is carried out by setting the values before and after the R peak to zeros. Note that annotation of the R peaks has already been completed and provided in the MIT-BIH Arrhythmia Database, and thus there is no need to detect R peaks.
The signal is set to zero in a range equal to 0.083 ms before the R peak and for 0.166 ms after the R peak. Figure 3b shows the result of removing QRS complexes from the filtered signal of Figure 3a.

3.4. Select Potential Blocks

The moving averages will demarcate the onset and offset of the potential P and T waves based on a prior knowledge of P and T wave durations. Healthy adults have a normal duration for P waves that varies within the range of 110 ± 20 ms, at a heart rate of 60 beats per min [17], while the normal duration for the QT interval varies within the range of 400 ± 40 ms.
Suitable window sizes of the moving averages are set by the average duration of each event. For example, the window size of the P wave duration is approximately 110 ms, and the average window size corresponding to the QTc duration is approximately 400 ms. The window size of the two moving averages are set based on the P wave duration; it is expected that the P wave duration is smaller than the T wave duration. Therefore, when the two moving averages (Equations (1) and (2)) capture the P wave, it also captures the T wave. To explain further, the second moving average with a larger window size is used as a threshold for the first moving average, which captures the P and T waves simultaneously.
(i) First moving average: The first moving-average integration is used to demarcate the P and T waves with a sharp wave, shown as the dotted line in Figure 3b.
MA Peak [ n ] = 1 W 1 ( x [ n ( W 1 1 ) / 2 ] + . . . . + x [ n ] . . . . + x [ n + ( W 1 1 ) / 2 ] )
where W1 = 55 ms is half the window width of the P wave. In order to demarcate the small P and T duration for severe cases of arrhythmia, a smaller window size is chosen, rather than the expected window size set for healthy subjects.
(ii) Second moving average: The purpose of the second moving average (MApwave) is to be used as a threshold for the first moving average MApeak integration, shown as the solid line in Figure 3b:
MA Pwave [ n ] = 1 W 2 ( x [ n ( W 2 1 ) / 2 ] + . . . . + x [ n ] . . . . + x [ n + ( W 2 1 ) / 2 ] )
where W2 = 110 ms is the window width of the P interval.
As discussed above, the window size of the first moving average should be less than the average healthy duration for the P wave—which is half of the P wave duration—while the window size of the second moving average equals the average healthy P wave duration. The first moving average will demarcate the P and T waves—especially in cases of arrhythmia with smaller durations. The second moving average then works as a threshold for the first moving average.
When the amplitude of the first moving-average filter (MApeak) is greater than the amplitude of the second moving-average filter (MApwave), that part of the signal is selected as a block of interest, as follows: IF MApeak[n] > MApwave THEN Blocks[n] = 0.25 ELSE Blocks[n] = 0 Endif. Figure 3b shows the result of applying the two moving averages.
One RR interval shown in Figure 3b demonstrates the idea of using two moving averages to generate blocks of interest. Only blocks with relative positions from P and T waves to the R peaks are considered, an thus, as shown in Figure 4 not all generated blocks of interest are potential P and T waves. In Figure 5a the pseudocode for generating blocks of interest can be seen.
(iii) Reject noisy blocks: The blocks associated with small width are considered as blocks caused by noise. Blocks that are smaller than half of the expected size for P waves are rejected. Because the T waves are wider than the P waves, potential T waves are still present. The expected size of the P wave is based on the statistics for healthy adults, as described in [17] which varies from 90 ms to 130 ms. Blocks that are smaller than half of the width of W1 are rejected for the P wave.
Based on the duration of P and T waves provided in Table 1, the ratio of the P wave duration to T wave duration is 3:5, thus the 0.75 and 1.25 values were used as percentages of the W1. This corresponds to:
P B l o c k = 0.75 × W 1
Similarly, T waves in arrhythmia ECG signals are smaller than in healthy people. Therefore, the block size of T wave will be larger than the block size of P wave. This corresponds to:
T B l o c k = 1.25 × W 1
If PBlock and TBlock have been set equal to W1, the results will be close to the reported ones. The fact the P wave duration is smaller than T wave duration supports the idea of decreasing the expected P wave compared to the T wave. Note that the PBlock will also capture the small T wave durations, as demonstrated in Equations (3) and (4).

3.5. Thresholding

In this step, we have a number of blocks between RR interval that are ready to be considered as P and T waves. A threshold, based on the Euclidean distance between the R peaks and anticipated blocks of P and T waves, is applied to filter these blocks and pick only the blocks that contain P and T waves. Block detection occurs in three possible scenarios:
  • No blocks detected: No detection of P or T wave in the processed RR interval.
  • One block detected: Most likely the P and T waves are merged within one block.
  • More than one block detected: Most likely the signal is noisy and therefore multiple blocks are generated. This step has two sub steps:
    P wave detection. If the distance between the maximum value of the block, and the nearest R peak is within a predefined range (which is based on prior knowledge of the PR interval), then the maximum value of the block is the P wave as shown in Figure 4. (Figure 5b demonstrates the pseudocode).
    T wave detection. If the distance between the R peak and the maximum value of the next block is within a predefine range (which is based on prior knowledge of the RT interval), then the maximum value of the next block is the T wave as shown in Figure 4. (Figure 5c demonstrates the pseudocode).
In some cases, there is more than one block within the acceptable range for a P or a T wave. In these cases the block that contains the wave with the maximum amplitude is selected. The two down arrows between Figure 3b,c represent the projection of the maximum amplitudes within the considered blocks on the original ECG signal.

4. Results

P and T waves are successfully detected using the proposed algorithm, including merged P and T waves, LBBB, RBBB, PVC, and PAC, in arrhythmic ECG signals from the MIT-BIH Database. Moreover, the algorithm combated different types of noise such as high-frequency, noise baseline wander, and low SNR. It can be seen in Figure 6 that the ECG signals contained these challenges. Given these results, the algorithm is promising in detecting P and T waves in noisy ECG signals.
The algorithm is applied across three different types of normal rhythms as seen in Figure 6a–c: (1) without U waves (record 100); (2) with U waves (record 103); and (3) with negative polarization (record 108). The P and T wave in a normal sinus rhythm are relatively easier to detect as the P-wave, QRS, T wave do exist and are relatively salient to detect [5].
Note that LBBB is the result of conduction delays or blocks at any site in the intraventricular conduction system, including the main LBBB and the bundle of His. The consequence of an LBBB is an extensive reorganization of the activation pattern of the left ventricles [5]. The proposed algorithm successfully detected normal and merged P and T waves in two types of LBBBs: (1) LBBB beats with merged P and T waves (record 109), as shown in Figure 6d, and (2) LBBB beats with normal P and T waves (record 111), as shown in Figure 6e.
However, RBBB is the result of conduction delay in a portion of the right-sided intra-ventricular conduction system. The delay can occur in the main RBBB itself, in the bundle of His, or in the distal right ventricular conduction system. RBBBs may be caused by a minor trauma such as right ventricular catheterization [5]. As shown in Figure 6f, the proposed algorithm succeeded in detecting the P and T waves in ECG signals of RBBB (record 118).
The PVC is defined as the premature occurrence of a QRS complex which has an abnormal morphology and is followed by a longer RR duration when compared to a normal beat, exceeding 120 ms. A special case of PVC is shown in Figure 6g, which is known as bigeminy, and it takes place when the PVCs occur after every normal beat in an alternating pattern. Clearly shown in the figure, the P and T waves are accurately detected over record 200.
PACs are similar to PVCs; however, they are associated with an irritable focus in the atria, giving rise to a distorted P wave, followed by a superimposed T wave [5]. The proposed algorithm detected the merged P and T waves in PACs (record 209), as shown in Figure 6h.
Overall, the detection rate was satisfactory, specifically when dealing with various arrhythmias and different types of noise. Results are shown in more detail in Table 2 and Table 3 for the 10 annotated ECG signals.
Two statistical parameters were used to evaluate the P and T wave detection algorithm: Sensitivity (SE) and Positive Predictivity (+P), calculated as follows: SE P / T = TP P / T TP P / T   +  FN P / T and +   P P / T = TP P / T TP P / T   +  FP P / T where True positive (TPP/T): P/T wave has been classified as P/T wave, False negative (FNP/T): P/T wave has not been classified as P/T wave, and False positive (FPP/T): non-P/T wave has been classified as P/T wave.
Here, SEP/T is defined as the percentage of true P/T waves, which are correctly detected, while +PP/T is defined as the percentage of actual P/T waves. The detection algorithm for the P and T waves is impacted by the quality of the recording and any existing abnormalities (see Table 2 for P and T waves detection results). It can be seen in Table 2 that record 108 and 109 are poor quality signals, which caused a large number of FNs, impacting the algorithm detection rate. Note that FPs were result of the presence of arrhythmia and low signal-to-noise ratios, when compared against FNs in P wave detection. On occasion, PVCs and PACs caused false positives. The ECG recording 108 contained the largest number of false positives. In summary, the overall SE for P waves was 98.05%, and the +P was 97.11%.
The T wave detection results are shown in Table 3 for the same 10 records; the overall SE was 99.86% and +P was 99.65%. As with the P waves, the number of FNs was smaller than the number of FPs and were mostly caused by noise. Note that PVCs often caused the FPs for T waves (see record 108) and LBBBs (see record 109).

5. Discussion

The performance of the P and T wave detection algorithm on the MIT-BIH Database is shown recording by recording in Table 2. Comparisons to other published detectors are provided in Table 3. Two statistical parameters (SE and +P) were used to evaluate the performance of the proposed P and T wave algorithm. Even though the MIT-BIH Arrhythmia Database includes 48 ECG recordings, most of the P and T detection algorithms published by other researchers used few recordings or segments of these signals, as shown in Table 3. Literature citing P and T wave detection in the MIT-BIH Database have limitations, such as the ability only detect certain beats or segments. Perhaps the rationale behind this was that no annotation of P and T waves and there was thus no benchmark.
Table 3 shows that most of the algorithms published in the literature were not applied to full recordings. However, the proposed algorithm was able to successfully handle full recordings with high performance, when compared to recent and well-known publications in the field of study. Essentially, the proposed detection algorithm can combat non-stationary effects, low SNR, PACs, PVCs, LBBBs, and RBBBs, and is thus numerically efficient and has the ability to simultaneously detect P and T waves.
The preliminary results are promising, especially after testing the algorithm on 10 recordings drawn from the MIT-BIH Database; however, applying the algorithm on the entire dataset is the next logical step to further test the robustness of the detector. Other arrhythmias such as atrial fibrillation, junctional tachycardia, paroxysmal supraventricular tachycardia atrial flutter, and multifocal atrial tachycardia are the next step in investigating the application of our algorithm. At present, our method represents a simple yet efficient P and T wave detection algorithm that may at the very least improve current ECG-based fitness tracking applications.
Our method follows the Eventogram's building blocks [33] and the TERMA framework [34] for P and T wave detection and can be adjusted to analyze ECG for a particular arrhythmia type by changing the filter type, filter order, moving average type based on the application. Moreover, before performing our analysis, the Chauvenet criterion can be applied [35] to discard outliers or noisy ECG samples. The proposed algorithm is dependent on the correct detection of the R peaks. There is a domino effect between the detection of P and T waves and the detection of R peaks. This is a common challenge in literature published in this area and it is typically not properly addressed [36,37]. This study provides a positive proof-of-concept for detecting P and T waves in arrhythmic ECG beats and brings to light other interesting perspectives that can be investigated. There is a need to investigate P- and T-waves with different morphologies, e.g., biphasic and inverted to determine if the detector performs efficiently. Additionally, different implementations of the event-related moving average methodology will benefit the analysis of ECG signals on portable, wearable, and battery-operated ECG devices.
Even though Brugada’s syndrome investigation was not an explicit goal of our study, it is worth noting that most of the recordings of the MIT-BIH database were acquired in patients treated by drugs such as flecainide, procainamide and ajmaline. These therapies may lead to several ECG alterations, in particular PVCs and QRS prolongation, which also appear in patients affected by this pathology, and are correctly managed by our method, as confirmed by our results. In addition, our model is not affected by ST segment alterations due to Brugada’s syndrome, as this interval is not directly modeled by our algorithm. As a consequence, potential signal deformations due to filtering do not affect ECG wave detection performance.

6. Conclusions

There is a limitation when evaluating arrhythmic P and T wave detection algorithms, due to the lack of datasets with annotated P and T waves, thus making it even more difficult to compare standard detection algorithms. Using 10 arrhythmic ECG signals from the MIT-BIH Database, with a total of 21,702 the algorithm was tested and evaluated. Results show promise and are sufficient in demonstrating real-life scenarios of long-recorded arrhythmic ECG signals with different morphologies. Specifically, the algorithm achieved an SE of 98.05% and a +P of 97.11% for P waves, and an SE of 99.86% and a +P of 99.65% for T waves. Moreover, the proposed algorithm performed efficiently and is notably simple when compared to other well-known algorithms in the P and T wave detection field. The simplicity demonstrated in this approach is advantageous, numerically efficient, and allows for the simultaneous detection of the P and T waves. Combined, these advantages motivate future further investigation of this efficient approach.

Author Contributions

Mohamed Elgendi designed the experiment. Mohamed Elgendi, Marianna Meo, and Derek Abbott performed the statistical analysis. Mohamed Elgendi, Mohamed Elgendi, and Derek Abbott conceived of the study and drafted the manuscript. The authors approved the final manuscript.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. World Health Organization. Global Status Report on Noncommunicable Diseases 2014; Geneva, Switzerland, 2014. [Google Scholar]
  2. Pearson, T.A.; Palaniappan, L.P.; Artinian, N.T.; Carnethon, M.R.; Criqui, M.H.; Daniels, S.R.; Fonarow, G.C.; Fortmann, S.P.; Franklin, B.A.; Galloway, J.M.; et al. American Heart Association Guide for Improving Cardiovascular Health at the Community Level, 2013 Update: A Scientific Statement for Public Health Practitioners, Healthcare Providers, and Health Policy Makers. Circulation 2013, 127, 1730–1753. [Google Scholar] [CrossRef] [PubMed]
  3. Kligfield, P.; Gettes, L.S.; Bailey, J.J.; Childers, R.; Deal, B.J.; Hancock, E.W.; van Herpen, G.; Kors, J.A.; Macfarlane, P.; Mirvis, D.M.; et al. Recommendations for the Standardization and Interpretation of the Electrocardiogram: Part I: The Electrocardiogram and Its Technology: A Scientific Statement From the American Heart Association Electrocardiography and Arrhythmias Committee, Council on Clinical Cardiology; the American College of Cardiology Foundation; and the Heart Rhythm Society Endorsed by the International Society for Computerized Electrocardiology. Circulation 2007, 115, 1306–1324. [Google Scholar] [PubMed]
  4. Elgendi, M.; Eskofier, B.; Dokos, S.; Abbott, D. Revisiting QRS Detection Methodologies for Portable, Wearable, Battery-Operated, and Wireless ECG Systems. PLoS ONE 2014, 9, e84018. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Braunwald, E.; Zipes, D.; Libby, P.; Bonow, R. Braunwald’s Heart Disease: A Textbook of Cardiovascular Medicine, 10th ed.; Saunders: Philadelphia, PA, USA, 2004. [Google Scholar]
  6. Murthy, I.S.N.; Prasad, G.S.S.D. Analysis of ECG from pole-zero models. IEEE Trans. Biomed. Eng. 1992, 39, 741–751. [Google Scholar] [CrossRef] [PubMed]
  7. Lin, C.; Mailhesm, C.; Tourneret, J.-Y. P- and T-wave delineation in ECG signals using a Bayesian approach and a partially collapsed Gibbs sampler. IEEE Trans. Biomed. Eng. 2010, 57, 2840–2849. [Google Scholar] [PubMed]
  8. Karimipour, A.; Homaeinezhad, M.R. Real-time electrocardiogram P-QRS-T detection–delineation algorithm based on quality-supported analysis of characteristic templates. Comput. Bio. Med. 2014, 52, 153–165. [Google Scholar] [CrossRef] [PubMed]
  9. Chatterjee, H.; Gupta, R.; Mitra, M. Real time P and T wave detection from ECG using FPGA. Proced. Technol. 2012, 4, 840–844. [Google Scholar] [CrossRef]
  10. Li, C.; Zheng, C.; Tai, C. Detection of ECG characteristic points using wavelet transforms. IEEE Trans. Biomed. Eng. 1995, 42, 21–28. [Google Scholar] [PubMed]
  11. De Azevedo Botter, E.; Nascimento, C.L., Jr.; Yoneyama, T. A neural network with asymmetric basis functions for feature extraction of ECG P waves. IEEE Trans. Neural Netw. 2001, 12, 1252–1255. [Google Scholar] [CrossRef] [PubMed]
  12. Strumillo, P. Nested median filtering for detecting T-wave offset in ECGs. Electron. Lett. 2002, 38, 682–683. [Google Scholar] [CrossRef]
  13. Martinez, J.P.; Almeida, R.; Olmos, S.; Rocha, A.P.; Laguna, P. A wavelet-based ECG delineator: Evaluation on standard databases. IEEE Trans. Biomed. Eng. 2004, 51, 570–581. [Google Scholar] [CrossRef] [PubMed]
  14. Sovilj, S.; Jeras, M.; Magjarevic, R. Real time P-wave detector based on wavelet analysis. In Proceedings of the 12th IEEE Mediterranean Electrotechnical Conference, Dubrovnik, Hrvatska, 12–15 May 2004; pp. 403–407.
  15. Chouhan, V.; Mehta, S. Threshold-based Detection of P and T-wave in ECG using New Feature Signal. Int. J. Comput Sci. Netw. Secur. 2008, 8, 2. [Google Scholar]
  16. Lay-Ekuakille, A.; Vergallo, P.; Trabacca, A.; De Rinaldis, M.; Angelillo, F.; Conversano, F.; Casciaro, S. Low-frequency detection in ECG signals and joint EEG-Ergospirometric measurements for precautionary diagnosis. Measurement 2013, 46, 97–107. [Google Scholar] [CrossRef]
  17. Clifford, G.D.; Azuaje, F.; McSharry, P. Advanced Methods And Tools for ECG Data Analysis; Artech House Publishers: Norwood, MA, USA, 2006. [Google Scholar]
  18. Goldberger, A.L.; Amaral, L.A.N.; 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]
  19. Moody, G.B.; Mark, R.G. The impact of the MIT-BIH Arrhythmia Database. IEEE Eng. Med. Biol. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef] [PubMed]
  20. Willems, J.L.; Arnaud, P.; Van Bemmel, J.H.; Degani, R.; Macfarlane, P.W.; Zywietz, C. Common standards for quantitative electrocardiography: goals and main results. CSE Working Party. Methods Inf. Med. 1990, 29, 263–271. [Google Scholar] [PubMed]
  21. Moody, G.B.; Mark, R.G. The MIT-BIH arrhythmia database on CD-ROM and software for use with it. In Proceedings of the Computers in Cardiology, Chicago, IL, USA, 23–26 September 1990; pp. 185–188.
  22. Elgendi, M.; Eskofier, B.; Abbott, D. Fast T Wave Detection Calibrated by Clinical Knowledge with Annotation of P and T Waves. Sensors 2015, 15, 17693. [Google Scholar] [CrossRef] [PubMed]
  23. Elgendi, M. Fast QRS Detection with an Optimized Knowledge-Based Method: Evaluation on 11 Standard ECG Databases. PLoS ONE 2013, 8, 73557. [Google Scholar] [CrossRef] [PubMed]
  24. Oppenheim, A.; Shafer, R. Discrete-Time Signal Processing, 3nd ed.; Prentice Hall: Bergen County, NJ, USA, 1989; pp. 411–425. [Google Scholar]
  25. Sahambi, J.S.; Tandon, S.N.; Bhatt, R.K.P. Using wavelet transforms for ECG characterization. An on-line digital signal processing system. IEEE Eng. Med. Biol. Mag. 1997, 16, 77–83. [Google Scholar] [CrossRef] [PubMed]
  26. Arafat, A.; Hasan, K. Automatic detection of ECG wave boundaries using empirical mode decomposition. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing, Taipei, Taiwan, 19–24 April 2009; pp. 461–464.
  27. Diery, A. Novel Applications of the Wavelet Transform for Analysis of P Waves in Clinical ECG Recordings. Ph.D. Thesis, Griffith University, Brisbane, Australia, November 2008. [Google Scholar]
  28. Ktata, S.; Ouni, K.; Ellouze, N. ECG signal maxima detection using wavelet transform. In Proceedings of the IEEE International Symposium on Industrial Electronics, Montreal, QC, Canada, 9–13 July 2006; pp. 700–703.
  29. Mahmoodabadi, S.Z.; Alirezaie, J.; Babyn, P. Bio-signal characteristics detection utilizing frequency ordered wavelet packets. In Proceedings of the IEEE International Symposium on Signal Processing and Information Technology, Cairo, Egypt, 15–18 December 2007; pp. 748–753.
  30. Krimi, S.; Ouni, K.; Ellouze, N. An approach combining wavelet transform and hidden markov models for ECG segmentation. In Proceedings of the 3rd International Conference on Information and Communication Technologies: From Theory to Applications, Damascus, Syria, 7–11 April 2008; pp. 1–6.
  31. Sun, Y.; Chan, K.L.; Krishnan, S.M. Characteristic wave detection in ECG signal using morphological transform. BMC Cardiovasc. Disor. 2005, 5. [Google Scholar] [CrossRef] [PubMed]
  32. Goutas, A.; Ferdi, Y.; Herbeuval, J.; Boudraa, M.; Boucheham, B. Digital fractional order differentiation-based algorithm for P and T-waves detection and delineation. ITBM RBM 2005, 26, 127–132. [Google Scholar] [CrossRef]
  33. Elgendi, M. Eventogram: A Visual Representation of Main Events in Biomedical Signals. Bioengineering 2016, 3, 22. [Google Scholar] [CrossRef]
  34. Elgendi, M. TERMA Framework for Biomedical Signal Analysis: An Economic-Inspired Approach. Biosensors 2016. submitted for publication. [Google Scholar]
  35. Taylor, J. Introduction to Error Analysis, the Study of Uncertainties in Physical Measurements; University Science Books: Mill Valley, CA, USA, 1996; p. 327. [Google Scholar]
  36. Elgendi, M.; Jonkman, M.; De Boer, F. Recognition of T waves in ECG signals. In Proceedings of the IEEE 35th Annual Northeast Bioengineering Conference, Boston, MA, USA, 3–5 April 2009; pp. 1–2.
  37. Elgendi, M.; Jonkman, M.; De Boer, F. P wave demarcation in electrocardiogram. In Proceedings of the IEEE 35th Annual Northeast Bioengineering Conference, Boston, MA, USA, 3–5 April 2009; pp. 1–2.
Figure 1. Structure of the proposed P and T waves detection algorithm.
Figure 1. Structure of the proposed P and T waves detection algorithm.
Bioengineering 03 00026 g001
Figure 2. Power spectra of noisy ECG signal (100 beats). The optimal frequency band to detect T waves is 0.5–10 Hz.
Figure 2. Power spectra of noisy ECG signal (100 beats). The optimal frequency band to detect T waves is 0.5–10 Hz.
Bioengineering 03 00026 g002
Figure 3. Application of two moving averages to detect P and T waves. (a) Filtered RR ECG signal with Butterworth bandpass filter; (b) generating blocks of interest after using two moving averages: the dotted line is the first moving average and the solid line is the second moving average; (c) the detected P and T waves after applying the thresholds. The red “o” identifies the T wave, while the black “+” symbol identifies the P wave.
Figure 3. Application of two moving averages to detect P and T waves. (a) Filtered RR ECG signal with Butterworth bandpass filter; (b) generating blocks of interest after using two moving averages: the dotted line is the first moving average and the solid line is the second moving average; (c) the detected P and T waves after applying the thresholds. The red “o” identifies the T wave, while the black “+” symbol identifies the P wave.
Bioengineering 03 00026 g003
Figure 4. P and T wave time occurrence with respect to the current R peak and next the R peak. The Ri − 1Tmin represents the minimum interval between the T wave and current the R peak, while Ri − 1Tmax is the maximum interval between the T wave and the current the R peak. Here, PminRi represents the minimum interval between the P wave and next the R peak, and PmaxRi stands for the maximum interval between the P wave and next the R peak.
Figure 4. P and T wave time occurrence with respect to the current R peak and next the R peak. The Ri − 1Tmin represents the minimum interval between the T wave and current the R peak, while Ri − 1Tmax is the maximum interval between the T wave and the current the R peak. Here, PminRi represents the minimum interval between the P wave and next the R peak, and PmaxRi stands for the maximum interval between the P wave and next the R peak.
Bioengineering 03 00026 g004
Figure 5. Pseudocode of the proposed P and T waves detection algorithm. The Ri − 1Tmin represents the minimum interval between the T wave and current the R peak, while Ri − 1Tmax is the maximum interval between the T wave and the current the R peak. Here, PminRi represents the minimum interval between the P wave and next the R peak, and PmaxRi stands for the maximum interval between the P wave and next the R peak. (a) Generating blocks of interest (b) P wave search intervals (c) T wave search intervals.
Figure 5. Pseudocode of the proposed P and T waves detection algorithm. The Ri − 1Tmin represents the minimum interval between the T wave and current the R peak, while Ri − 1Tmax is the maximum interval between the T wave and the current the R peak. Here, PminRi represents the minimum interval between the P wave and next the R peak, and PmaxRi stands for the maximum interval between the P wave and next the R peak. (a) Generating blocks of interest (b) P wave search intervals (c) T wave search intervals.
Bioengineering 03 00026 g005
Figure 6. Performance of the proposed P and T detection algorithm. The algorithm succeeds in detecting P and T waves in ECG signals that contain (a) normal sinus rhythm without U waves; (b) normal sinus rhythm with U waves; (c) normal sinus rhythm with negative polarization; (d) LBBB beats with merged P and T waves; (e) LBBB beats; (f) RBBB beats from record 118; (g) PVC beats from record 200; (h) PAC beats from record 209. Here, “+” represents the P wave and “o” represents the T wave while the asterisk represents merged P and T waves.
Figure 6. Performance of the proposed P and T detection algorithm. The algorithm succeeds in detecting P and T waves in ECG signals that contain (a) normal sinus rhythm without U waves; (b) normal sinus rhythm with U waves; (c) normal sinus rhythm with negative polarization; (d) LBBB beats with merged P and T waves; (e) LBBB beats; (f) RBBB beats from record 118; (g) PVC beats from record 200; (h) PAC beats from record 209. Here, “+” represents the P wave and “o” represents the T wave while the asterisk represents merged P and T waves.
Bioengineering 03 00026 g006
Table 1. ECG Sinus Rhythm Event Durations. The proposed algorithm depends on the estimate of the event duration before processing the ECG signal. The window sizes are set with expected event durations. There are three events of the ECG wave: P, QRS and T waves, all measured from a healthy male adult at a heart rate of 60 beats per minute (bpm). Here, fs stands for sampling frequency.
Table 1. ECG Sinus Rhythm Event Durations. The proposed algorithm depends on the estimate of the event duration before processing the ECG signal. The window sizes are set with expected event durations. There are three events of the ECG wave: P, QRS and T waves, all measured from a healthy male adult at a heart rate of 60 beats per minute (bpm). Here, fs stands for sampling frequency.
FeatureNormal ValueNormal LimitNormal duration (fs = 360 Hz)
P width110 ms± 20 ms33–47 samples
PQ/PR interval160 ms± 40 ms43–72 samples
QRS width100 ms± 20 ms29–43 samples
QTc interval400 ms± 40 ms130–158 samples
Table 2. P and T waves detection performance over 10 records from the MIT-BIH Database.
Table 2. P and T waves detection performance over 10 records from the MIT-BIH Database.
P Wave Detection PerformanceT Wave Detection Performance
RecordNo. of BeatsTPFPFNSE (%)+P (%)TPFPFNSE (%)+P (%)
1002274227400100.00100.00227400100.00100.00
1011866186600100.00100.00186330100.0099.84
10221872021877996.3796.02218700100.00100.00
103208420764499.8199.81208400100.00100.00
10422292071827696.5896.32222810100.0099.96
10526022557331299.5398.72257915899.6999.42
1062026201312199.9599.412013130100.0099.36
1072136213600100.00100.00213600100.00100.00
1081765136324415890.5686.131710361998.9197.95
109253323421355697.7294.67253210100.0099.96
217022071959738698.0597.1121,606692799.8699.65
Here, TP stands for true positive, FP stands for false positive, FN stands for false negative, SE stands for sensitivity, +P stands for positive predictivity.
Table 3. Comparison of several P and T wave algorithms on the MIT-BIH Arrhythmia Database.
Table 3. Comparison of several P and T wave algorithms on the MIT-BIH Arrhythmia Database.
Comparison of P Wave Detection Algorithms Comparison of T Wave Detection Algorithms
AlgorithmMethodData UsedSe (%)+P (%)AlgorithmMethodData UsedSe (%)+P (%)
Proposed algorithmBlocks of Interest10 records98.0597.11Proposed algorithmBlocks of Interest10 records99.8699.65
Arafat et al. [26]EMD10,000 beats N/RN/RArafat et al. [26]EMD10,000 beats N/RN/R
Diery [27]Wavelet39 records (10 s each)N/RN/RKtata et al. [28]WaveletSelected segmentsN/RN/R
Mahmoodabadi et al. [29]WaveletSelected segments51.6953.64Krimi et al. [30]WaveletSelected beats94.65N/R
Ktata et al. [28]WaveletSelected segmentsN/RN/RSun et al. [31]Multiscale morphological derivativeSelected segmentsTON = 99.8
TOFF = 99.6
N/R
Sun et al. [31]Multiscale derivativesSelected segmentsPON = 97.2
POFF = 94.8
N/RGoutas et al. [32]Fractional differentiationSelected segmentsN/RN/R
Goutas et al. [32]Fractional differentiation differentiationSelectedsegmentsN/RN/RSun et al. [31]Multi-scale morphological derivativeSelected segmentsN/RN/R
Here, TP stands for true positive, FP stands for false positive, FN stands for false negative, SE stands for sensitivity, +P stands for positive predictivity, EMD stands for empirical mode decomposition, N/R stands for not reported.

Share and Cite

MDPI and ACS Style

Elgendi, M.; Meo, M.; Abbott, D. A Proof-of-Concept Study: Simple and Effective Detection of P and T Waves in Arrhythmic ECG Signals. Bioengineering 2016, 3, 26. https://doi.org/10.3390/bioengineering3040026

AMA Style

Elgendi M, Meo M, Abbott D. A Proof-of-Concept Study: Simple and Effective Detection of P and T Waves in Arrhythmic ECG Signals. Bioengineering. 2016; 3(4):26. https://doi.org/10.3390/bioengineering3040026

Chicago/Turabian Style

Elgendi, Mohamed, Marianna Meo, and Derek Abbott. 2016. "A Proof-of-Concept Study: Simple and Effective Detection of P and T Waves in Arrhythmic ECG Signals" Bioengineering 3, no. 4: 26. https://doi.org/10.3390/bioengineering3040026

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