A novel P-QRS-T wave localization method in ECG signals based on hybrid neural networks
Introduction
According to the World Health Organization, cardiovascular diseases (CVDs) are the leading cause of death in the world [1]. Nowadays, the stressful social life and irregular lifestyle result in a trend of younger patients with CVDs. Electrocardiogram (ECG) signals are widely used in clinical studies for the detection of heart diseases. During each cardiac cycle, the excitation generated by the sinus node is transmitted sequentially to the atrium and ventricle. A complete heartbeat is mainly composed of three waveforms: P-wave, QRS-wave, and T-wave.
The analysis of the P-QRS-T waves is essential because the shape and period of the P-QRS-T waves can be substantially altered by some pathologies in the automated ECG signal diagnosis systems. In addition, accurate localization of P-QRS-T waves is usually the initial step for cardiac disease classification through machine learning or deep learning [[2], [3], [4]]. Therefore, it is of great significance to investigate the algorithm that can precisely locate P-QRS-T waves of the ECG.
Various waveform detection algorithms have been proposed in previous work. In the last four decades, the localization and detection of QRS complexes have been extensively studied. Pan-Tompkins [5] proposed the well-known derivative-based method, which achieved 99.3% accuracy in detecting QRS waves. There are also some other ECG waveform detection approaches, such as wavelet transform [[6], [7], [8]], digital filters [9], and adaptive threshold [10]. Due to low amplitude, low SNR, and multiple variations in morphology, the detection of P-wave and T-wave is much more challenging compared to QRS-wave detection. Martinez et al. [11] developed a wavelet transform-based ECG signal delineation system and validated it on several manually annotated datasets. In Ref. [12], P-wave and T-wave delineation based on a Bayesian approach was investigated. Karimipour et al. [13] proposed a real-time detection algorithm based on the correlation analysis of the relationship between their template and signal. Marsanova et al. [14] adopted phasor transform combined with a classification algorithm to detect P-wave during ventricular extrasystoles.
Machine learning and deep learning approaches are widely applied in various signal processing and data analysis fields. Several methods for wave detection are established on the basis of the hidden Markov model (HMM) [15], K-Nearest Neighborhood (KNN) [16], and Convolutional Neural Network (CNN) [17]. Wang [18] employed an end-to-end one-dimensional residual neural network to detect QRS waves. In Ref. [19], Elgendi et al. proposed an approach for fast detection of T-wave using dynamic thresholds based on moving averages models. Their approach was validated on two famous databases, the QT database (QTDB) [20,21] and MIT-BIH Arrhythmia databases (MITDB) [22]. To predict the positions of ECG key waves, a P-QRS-T localization method using ECGNet was introduced in Ref. [23]. However, this algorithm was only validated by the automatically annotated waves in the QTDB.
In this study, we propose an ECG waveform localization method based on a hybrid network combining residual neural network (ResNet) and Long Short-Term Memory (LSTM), which can recognize the location of P-QRS-T wave peaks. Firstly, a new heartbeat division method is proposed, then the ECG signal is filtered by a denoising algorithm. After the heartbeat is processed by the hybrid neural network, the position of the P-QRS-T wave peak can be obtained. This method was validated in four ECG databases and achieved excellent performance.
Compared with other wave detection methods, the proposed algorithm has the following four advantages:
- (i)
The proposed method does not require complex feature extraction or feature selection. Benefitting from its low computational complexity, the model can be embedded in portable terminals.
- (ii)
In the field of ECG automatic diagnosis, deep learning frameworks generally take fixed-length heartbeat as input. Therefore, the proposed wave localization algorithm can be used as the initial step of ECG heartbeats classification and can be directly combined with other advanced classifiers.
- (iii)
The positions of the P-peak, QRS-peak, and T-peak are presented for each heartbeat. Based on the three peaks, the start and end points of the critical ECG wave components can be detected easily. It enriches the acquired waveform information, which further improves the accuracy and efficiency of the automatic ECG heartbeats classification system.
- (iv)
The proposed method has achieved excellent performance in four ECG databases with input noise of different magnitudes. The proposed hybrid neural network architecture based on ResNet and LSTM is robust against noise and promising for practical application.
Section snippets
Methodology
The workflow of the proposed P-QRS-T wave localization method is illustrated in Fig. 1. Initially, the ECG signal is preprocessed by a three-step procedure. Next, ECG heartbeats with annotations of P-peaks, QRS-peaks, and T-peaks are segmented for training and validation. Then, the proposed hybrid neural network model is adopted to obtain the detailed features of these three peaks. Finally, the relative positions of the P-QRS-T wave peaks are presented.
Experiment and results
The data used in this paper are shown in Table 1. All ECG heartbeats were obtained by the continuous division scheme mentioned before. For the data in QTDB, both the heartbeat annotated by the automatic algorithm and those annotated manually by experts are used to validate the accuracy of the algorithm. The proposed method is trained and validated on four databases with a ratio of 4:1 splitting training and validation data. For the data in QTDB and MITDB, the size of the heartbeat are 250*1 and
Discussion
In this study, a novel P-QRS-T wave localization method based on hybrid neural networks is proposed. The proposed algorithm has been verified by four databases and has achieved excellent performance. As presented in Table 8, we obtain an RMSE result of 4.28. The ECGNet mentioned in Ref. [23] reached an RMSE value of 5.57. In Ref. [13], RMSE is also calculated to represent the average error between the true and predicted positions of the waves. With the verification of the QTDB, as shown in
Conclusion
In order to accurately locate the ECG critical waveforms, a novel P-QRS-T wave localization method in ECG Signals based on hybrid neural networks is proposed. Firstly, ECG signals are preprocessed by a three-step procedure. For the preprocessing of ECG data, we propose a new heartbeat division scheme for the filtered ECG signal. The data and labels utilized for training and validation are standardized and normalized. Then, we collect the database that can be employed for the localization of
Funding
This work was supported by the National Key R&D Program of China (No. 2018YFB1307005) and the Shanghai Municipal Science and Technology Major Project (Grant No. 2021SHZDZX0102).
Declaration of competing interest
The authors declared that they have no conflicts of interest to this work.
Acknowledgements
None.
References (50)
- et al.
A hierarchical method based on weighted extreme gradient boosting in ECG heartbeat classification
Comput. Methods Progr. Biomed.
(2019) - et al.
Automated analysis of ECG waveforms with atypical QRS complex morphologies
Biomed. Signal Process Control
(2014) - et al.
Automatic detection of P, QRS and T patterns in 12 leads ECG signal based on CWT
Biomed. Signal Process Control
(2016) - et al.
Real-time electrocardiogram P-QRS-T detection–delineation algorithm based on quality-supported analysis of characteristic templates
Comput. Biol. Med.
(2014) - et al.
An efficient new method for the detection of QRS in electrocardiogram
Comput. Electr. Eng.
(2014) - et al.
Inter-patient heartbeat classification based on region feature extraction and ensemble classifier
Biomed. Signal Process Control
(2019) - et al.
A novel attentional deep neural network-based assessment method for ECG quality
Biomed. Signal Process Control
(2023) - et al.
Automated diagnosis of arrhythmia using combination of CNN and LSTM techniques with variable length heart beats
Comput. Biol. Med.
(2018) - et al.
An adaptive hierarchical decomposition-based method for multi-step cutterhead torque forecast of shield machine
Mech. Syst. Signal Process.
(2022) - et al.
Precise and efficient heartbeat classification using a novel lightweight-modified method
Biomed. Signal Process Control
(2021)