1. Introduction
Cardiovascular diseases (CVDs) continue to be the leading cause of death worldwide with a reported increase in the CVD mortality rate from 12.3 million in the year 1990 to approximately 17.9 million in the year 2016. This accounts for 31% of the global death count. The World Health Organization (WHO) attributes the major causes of CVDs to behavioral factors like smoking, excessive alcohol consumption, physical inactivity, and nutritional/dietary deficiencies, in addition to pre-existing medical conditions such as diabetes, hypertension, hyperlipidaemia, or having a family history of CVD. Identifying those at highest risk of CVDs is vital to ensure that the patients receive timely and appropriate treatment, as 80% of premature heart diseases and strokes are said to be preventable [
1,
2].
Electrocardiogram (ECG) is both noninvasive and the most common medical test among the procedures used by clinicians to detect and analyze cardiac arrhythmia. A cardiac arrhythmia is defined as any deviation (regular or irregular/sustained or nonsustained) from normal sinus rhythm. It is caused by abnormalities in impulse formation or in the conduction of electrical signals due to alterations in the heart tissue or activity [
3]. There has been great deal of interest shown by clinicians and researchers working in the field of cardiology in the diagnosis of automated arrhythmia [
4,
5,
6,
7,
8,
9,
10] in the past decade. However, the analysis and detection of arrhythmic cardiac beats using ECG is met by some technical challenges. First, the ECG acquired in the raw form is prone to different kinds of noise and interference, such as power-line interference, electrode motion artifacts, muscle artifacts, respiration, and others. Second, the classification of cardiac beats in long-term ECG recordings using visual analysis to identify critical and noncritical arrhythmia is laborious, time-consuming, and it is not a feasible solution considering the large amount of data acquired in long-term and continuous monitoring scenarios. Hence, novel and effective solutions are needed for both the classification and denoising of ECG with design requirements focused on retaining the morphological parameters that are good enough for clinical assessment and a sensitive arrhythmic beat detection with reduced time complexity to be beneficial in automated analysis of cardiac arrhythmia in such diverse and long-term datasets.
Numerous noise cancellation methods have been proposed for the denoising of ECG signals. Several efficient denoising techniques have been presented in the past few years to separate the useful ECG components from background noise contamination emanating from various sources. Linear and adaptive filtering techniques have been used for the removal of baseline wander, muscle activity, and motion artifact noise [
11,
12]. Variations in wavelet transform have proven to overcome other time-frequency methods since they allow the ECG noise factors to be analyzed at multiresolution [
13,
14]. Statistical methods such as principal component analysis [
15,
16], independent component analysis [
16], and deep neural networks [
17] have also been used to extract a noise-free signal from the original ECG recording. In addition, our research group presented a noise cancellation method, the segmented beat modulation method (SBMM) [
18,
19]. It was proposed as a template-based ECG filter with reproducibility of heart-rate and morphological variability. It has previously been tested in applications relative to abdominal fetal ECG [
20] and electromyography filtering from ECG corruption [
21], all in the case of short-term ECG recordings.
In the published articles, SBMM does not include a differentiating function for normal sinus beats and abnormal beats, hence it is a template-based denoising method with proven applicability to the normal sinus rhythm only [
18,
19,
22,
23,
24,
25]. The current work overcomes this limitation of SBMM and adds a classification function based on a convolutional neural network (CNN) to classify the beats into three beat classes selected among the five beat classes defined by the American National Standards Institute (ANSI) and the Association for the Advancement of Medical Instrumentation (AAMI) standard (ANSI/AAMI EC57:1998) [
26] and further apply SBMM for the denoising of arrhythmic beats. This also extends the SBMM applicability to ECG recordings with arrhythmic cardiac cycles (CC).
4. Discussion
The current work proposes the ESBMM as an extended and improved version of the existing SBMM, which is able to denoise ECG tracings characterized by sinus as well as nonsinus rhythm. This feature makes the ESBMM applicable in many more applications than the SBMM. The main differences between the ESBMM and SBMM consist in a different segmentation of the cardiac cycle and in the insertion of a procedure for beat classification. According to the ESBMM, each cardiac cycle is still segmented into two segments, but the first (i.e., the PQRS segment) includes the P wave and the QRS complex, while the second (i.e., TUP segment) includes the T and U waves, respectively. Differently, according to the SBMM, the first segment (i.e., the QRS segment) includes only the QRS complex, while the second (i.e., the TUP segment) includes the T wave, the U wave, and the P wave of the successive cardiac beat. The reason for including the P wave in the same segment in which the QRS complex is present relies on the fact that the P wave and QRS complex both represent the same electric phenomenon, which is depolarization, though of the atria and ventricles, respectively. Consequently, they can be hypothesized to show a similar dependency of instantaneous heart rate. Moreover, evaluation of P-wave presence and morphology is fundamental for a beat classification (all supraventricular arrhythmias show abnormalities at P-wave level). Taking into account that the electrical activity of a cardiac beat starts with the P wave, when classifying a cardiac beat, its P wave has to be present in the segments representing it and not in the segments representing the previous one.
Beat classification relies on features related to temporal intervals (RR interval and CC duration), features obtained applying discrete wavelet transform to the modulated CC (cD4 to cD7), and statistical features (kurtosis and skewness). Since in each ECG recordings, after modulation of all TUPs, each CC is equal in length, the number of wavelet decomposed coefficients is the same for all beats. Asl et al. [
29] reported that the representative and distinct components for each type of heartbeat can be found in the detail information at level 4 to 7. Hence, only the wavelet coefficients at detail levels 4 to 7 (i.e., cD4, cD5, cD6, and cD7, respectively) were used here as features for morphological classification. Zhang et al. [
34] proved that the RR interval is a highly distinguishing factor for the separation of
N and
S beats, hence each CC had an associated RR-interval feature. The skewness and kurtosis are effective in estimating shape distortion of any signal compared to Gaussian distribution. They were well able to distinguish between
V and other beats since the major difference of
V beats with other types of beats is the shape [
35]. Hence, the kurtosis of CC and skewness of CC were considered.
Beat classification was performed using a convolutional neural network which receives several temporal and morphological ECG features as input. Some of them were standard (such as the RR interval); others were obtained by analyzing the ECG signal using the discrete wavelet transform and by computation of higher order statistics. Several techniques have been previously proposed for classification of cardiac arrhythmic beats in the past years [
32,
34,
36,
37,
38,
39,
40,
41].
Table 6 proposes a comparison of the results obtained with the ESBMM against other methods that were tested on the same database. De Chazal et al. [
42] used a simple feature set based on heartbeat and RR intervals plus wave morphology. Zhang et al. [
34] presented a one-versus-one feature reduction strategy focusing on the disease-specific features supporting the traditional support vector machine binary classifier. Eventually, Chen et al. [
32] proposed a combination of projected and dynamic features for arrhythmia classification and a support vector machine classifier to cluster heartbeats. As can be seen from
Table 6, all methods were able to reliably classify
N and
V beats, but only the ESBMM was also able to reliably classify
S beats. The numbers of false positives in V beats seems to be quite high. This effect could be due to the presence of bundle branch block beats in the class N, that could be erroneously classified in class V. Future studies will evaluate the possibility of including the bundle branch block beats in an additional fourth class, in order to solve this limitation of our approach.
The ESBMM is a template-based method for ECG denoising. It operates in short-term ECG. In case of long-term ECG, it is applied to short ECG windows recursively extracted from the long recording. This design choice allows one to maintain physiological ECG variability (time and amplitude) by significantly reducing the level of noise. However, thanks to the beat classification procedure, three templates (instead of one, as for the SBMM) are computed, one for each beat class (N, S, and V). Each template is obtained by performing the median computation over all beats belonging to a class, an operation which is known to reduce noise and to provide the most likely morphology in a class of beats. In order to perform the median operator, all CC needs to be modulated to have the same length. Indeed, the hypothesis behind the procedure is that each beat of a class is a slight modification of a class specific morphology (best represented by the median, i.e., the template). Thus, the beat modulation is only an intermediate step to obtain a denoised template for each class. Template waveforms are then concatenated, demodulated, and adjusted in order to provide an output clean ECG tracing characterized by the same beat-to-beat heart-rate variability characterizing the input noisy ECG.
The ESBMM’s ability to denoise ECG tracings is confirmed by the statistically significant improvement of the signal-to-noise ratio that, on average, was 0.99 dB, with peaks of up to 6.08 dB. The median limited improvement in the MIT–BIH arrhythmia database is not due to the fact that the ESBMM’s denoising ability is limited, but, rather, to the low level of noise affecting the recordings. The MIT–BIH arrhythmia database was chosen because it allowed us to evaluate the performance of the ESBMM in beat classification, which is the main novelty of the ESBMM with respect to the SBMM. However, the ESBMM’s robustness to corrupting factors such as baseline wanders, muscle activity, and electrode motion artifacts was also evaluated. The results confirm the ability of the method to estimate good quality ECG recordings in the presence of typical noises affecting the ECG, especially for the
N class, analogous to what was previously observed for the SBMM [
18,
19]. Indeed, since in an ECG recording, the number of
N beats is generally much higher than the number of
S and
V beats, the template of class
N is typically much cleaner than the templates of class
S and
V. Consequently, PP(N) is much less affected by the presence of noise than PP(S) and PP(V).
This paper proposes the following:
A new ECG segmentation procedure that separates repolarization waveforms from depolarization waveforms;
A proposed feature vector composed of spectral, RR interval, and higher-order statistical features;
A convolutional neural network to classify cardiac beats into N, S, and V classes;
A denoising algorithm designed to separately construct median templates for N, S, and V beats and reconstruct the original ECG recording including arrhythmic beats to match the original beat duration and morphology.