A novel signal-adaptive multi-feature extraction algorithm for arrhythmia detection
Bulletin of the National Research Centre volume 45, Article number: 164 (2021)
The significant features like an amplitude and intervals of electrocardiograph or P-QRS-T wave represent the functionality of the heart. Accurate extraction of these features helps in capturing characteristics of the signal helpful for the detection of cardiac abnormalities. In this paper, a novel signal folding-based algorithm is proposed to obtain detailed information about the complex morphology of signal. It explores the denoising and feature extraction of the specific ECG signals.
The experimental study conducted using MIT-BIH Arrhythmia database ECG records with known conditions of left bundle branch block, right bundle branch block, Wolff-Parkinson-White syndrome beats has been considered. Heart rate values for selected ECG records from MIT-BIH dataset and synthetic signals from ECG simulator yielded the same values and thus validate our approach.
The proposed algorithm determines the heart rate, percentage leakage around the peak and is capable of folding a signal very efficiently based on detected R peaks and period-dependent gate(window).
The flow of electrical impulses throughout the heart forms the heartbeat expressed in beats per minute (bpm). If these impulses do not flow in a right path, it leads to various cardiac abnormalities called as arrhythmia. Normal heart beat range is 60–100 bpm. If the heart beats too fast (HR > 100 bpm), it is known as a tachycardia (Jones 2021), and if the heart beats too slow (HR < 60 bpm), it is known as bradycardia (Jones 2021). Since heart rate is one of the deciding factors for detecting arrhythmias, it is considered as one of the vital parameters.
The electrocardiogram (ECG) is one of the most important and non-invasive tool to monitor the heart functionalities. P wave of ECG signal reflects the atrial depolarization, QRS complex represents the ventricular depolarization and T wave represents the ventricular repolarization. The variations in the morphology of P-QRS-T waves may specify underlying abnormalities. Hence, the detection of morphology variations of these waves is vital for clinical diagnosis. In our work, a novel signal folding (SF)-based approach is used to obtain subtle morphology variations of three arrhythmias namely left bundle branch block (LBBB), right bundle branch block (RBBB) and Wolff-Parkinson-White syndrome (WPW). The heart beats are averaged, and features are extracted from the averaged signal instead of extracting features from the single beat. Baseline wander with the frequency range of 0–0.5 Hz and power line interference of 50/60 Hz are the significant noise which corrupt and change the characteristics of ECG signal. Hence, it is necessary to remove these noises sufficiently before further processing. In this paper, ECG is de-noised in frequency domain to improve the SNR by square root of N which is not possible in time domain. After noise removal, signal is smoothened by FIR filter with Kaiser window because of its greater stability by using FDA tool.
LBBB is caused due to the pause in the passage way. In LBBB, the impulse first travels down the right bundle branch. Then, the impulse activates the interventricular septum from right to left. Finally, the impulses activate the left ventricle (Coviello 2020). RBBB is due to the blockage in the path where impulses move throughout the heart to make a heartbeat. The block in the route, where electrical impulses move through right bundle branch, is known as RBBB (Coviello 2020) (Figs. 1, 2, 3, 4).
In Wolff-Parkinson-White syndrome (WPW), there is an adjunct transmission passage way between atria and ventricles. Electrical impulses are passed so quickly through ventricles that AV node cannot control it (Coviello 2020).
Several methods have been proposed to extract features from the ECG signal. In Tribhuvanam et al. (2019), authors have extracted features from the single ECG beat only and can be extended for frequency domain features also. In Ramakrishnan and Yogeswaran (2017), heart rate and time domain features have been extracted from the ECG signal. Features are extracted in time domain. In Deriche et al. (2019), 13 features have been extracted from the signal based on Pan–Tompkins technique and classified with accuracy of more than 92%. In Peshave and Shastri (2014), authors have used DWT and thresholding technique with fixed window size to extract features where the window is not adaptive. In Sujan (2015), authors have extracted features well but it is necessary to extract morphological variations to increase sensitivity. In Riasi and Mohebbi (2015), authors have extracted QRS complex and R peaks based on DWT.
In the proposed method, Raw ECG data from standard database have been taken and denoised to remove baseline wander and power line interference in frequency domain by applying FFT algorithm. After preprocessing, heart rates are calculated in frequency domain instead of complex time domain technique and compared with standard MIT-BIH arrhythmia records. R peaks are extracted by using Pan–Tompkins method. Based on R peak location and heart rate, adaptive window has set to segment the beats and segmented beats are averaged to extract features instead of extracting features from the single beat.
MIT-BIH arrhythmia database from PhysioNet website has been taken to validate the performance of the proposed method which consists of 48 records each of 30 min, 1 min and 10 s duration, having two leads (modified limb lead II and V1, V2, V4 or V5), and each record has been sampled at a rate of 360 samples per second (https://physionet.org/content/mitdb/1.0.0/). In this database, every beat is annotated in terms of timing information and rhythm. Twenty-eight ECG records and also one record from ECG simulator have been considered to calculate heart rates, and specifically LBBB, RBBB and WPW beats have been taken to segment and average the signal.
The rest of the paper is organized as follows: Segment II explains proposed method, Segment III explains the results. Segment IV is concerned with discussion and conclusion.
The proposed methodology includes several stages: Preprocessing stage to improve the signal quality, feature extraction stage includes extracting heart rate, percentage leakage around the peak in frequency domain and P width and interval detection from the segmented and averaged beats. The main concern of the paper is to extract features such as heart rate and a new parameter percentage leakage around the peak in simple frequency domain and to extract the features from the segmented and overlapped beats so that the noise will be averaged out and subtle features can be detected instead of considering single beat. The proposed algorithm was implemented through MATLAB software. The complete flowchart of the proposed method is shown in Fig. 5.
To test the proposed method, 28 records of MIT-BIH arrhythmia database from PhysioNet website (https://physionet.org/content/mitdb/1.0.0/) have been used to find heart rate and percentage leakage around the peak. ECG record number 230 containing more WPW rhythm, 111 containing more LBBB beats and 212 for RBBB beats have been considered to fold the signal.
Frequency domain representation
Raw ECG signal taken from the MIT-BIH arrhythmia record is converted from time to frequency domain by applying FFT algorithm
In the proposed method, noise removal is achieved in frequency domain by converting time domain signal into frequency domain. Noise such as baseline wander and power line interference have been removed efficiently. Firstly, baseline wander is removed by assigning zeros to frequencies from 0 to 0.5 Hz in frequency domain. Power line interference(PLI) is removed by applying simple notch filter with stop band of 45–75 Hz by using threshold (mean + 3*standard deviation) so that signal frequencies within that stop band would not be affected. Then, the signal is smoothened by using FIR filter with Kaiser window from 0.5 to 5 Hz since person will not alive or will be mortal below lower limit (30 bpm) and beyond upper limit (300 bpm) considering only heart rate. FIR filter with the cutoff frequency of 5 Hz is designed by using standard FDA tool.
The FIR filter is designed as follows:
Normalized frequency = 0.277 Hz
Total number of samples taken from MIT-BIT arrhythmia record (N): 650,000
Because of symmetry property of FFT algorithm, it is sufficient to take only 325,000 samples (N/2 = 650,000/2). Lower limit (30 bpm) and upper limit (300 bpm) for heart rate behind which man will be mortal.
Including 10 harmonics leads to fL10 = 10* Nlower frequency = 9025 samples)
Including 10 harmonics leads to fH10 = 10* Nupper frequency = 90250 samples)
De-noised signal is then fed to the designed low-pass filter (LPF) with the normalized frequency
to obtain smoothened signal.
Feature extraction is one of the major stages to classify normal and abnormal ECG beats. In the proposed method, frequency domain features such as HR and PLAP are extracted and three specific records are used to segment the beats based on adaptive window, and then these segmented beats are averaged to get p width and intervals.
Heart rate (HR)
Heart rate is calculated by taking fundamental frequency or maximum frequency of the ECG signal which represents the averaged R-R interval in time domain and can be calculated as (Vinutha et al. 2016)
where F1max is the maximum frequency (Hz). Where, ledge and uedge are the points at 3db on either side of the fundamental frequency peak shown in Fig. 6
A simple and accurate frequency domain approach has been used to extract HR. Further, R peak detection has been performed using Pan–Tompkins algorithm in time domain. R peaks and heart rates are used for novel SF algorithm. In this approach, signal is folded based on the period-dependent window which is adaptive based on the signal to get averaged information and subtle variations of the signal. This approach averages out all the noise and also capable of showing detailed morphology of the signal.
In order to set a window, period is calculated based on the heart rate which in turn depends on maximum frequency. Period is calculated as follows
Window is adaptive and adjustable to all types of arrhythmias.
Signal folding (SF) algorithm
The proposed method uses novel signal folding method. In this method, instead of extracting features from the single beat, the averaged features could be extracted such as p width and PR interval, by dividing and folding(averaging) the signal based on the R peak location and adaptive period to get the subtle variations in the signal so that accurate results will be obtained. The window for particular signal is set as follows:
Adaptive period value is halved as calculated in formula 6. By taking R peak location as a reference, the window is set prior and after the R peak location by considering halved period value on either side of the location. After setting adaptive window, 30 min baseline removed ECG signal is divided based on the period-dependent gate(adaptive) and overlapped on one another to get the subtle morphological variations in signal instead of considering single beat. The noise removed ECG signal is divided and averaged to get accurate results. In this paper WPW, LBBB, RBBB beats are folded in order to obtain subtle information, small variations, and clear signature of these arrhythmias.
Percentage leakage at each point around peak (PLAP)
The novel feature provides information about duration of the heart beat resides at each point around the peak. It gives the amount of time heart beat spends at each point around peak.
To test the proposed algorithm, 30 min ECG signals from MIT-BIH Arrhythmia database were used. Heart rate is calculated for 28 records in frequency domain and compared with annotated values of heart rates of standard MIT-BIH database. Specific records containing more LBBB beats, RBBB beats and WPW beats are folded based on detected R peaks and period-dependent gate. The raw estimates of HR and PLAP results are summarized. LBBB, RBBB, and WPW beats have been folded showing the signatures of these arrhythmias efficiently. Table 1 illustrates the calculated heart rates from the proposed algorithm compared with heart rates of MIT-BIH database and heart rate variability calculations. Table 2 shows the heart rates of only normal beats and compared with heart rates of MIT-BIH database. It is evident that proposed algorithm is capable of calculating heart rates accurately for 26 records out of tested 28 records. In MIT-BIH arrhythmia database directory, every beat is annotated and folded to get the averaged information. Significant features such as heart rate, percentage leakage around the peak and R amplitudes have been taken. Raw ECG signal is shown in Fig. 7 representing number of samples on X axis and amplitude on Y axis. Raw ECG signal having 2000 samples is shown in Fig. 8. Frequency domain representation of raw ECG signal is shown in Fig. 9 with PLI peak at 60 Hz. Figure 10 shows PLI removed signal by notch filter. Figure 11 shows smoothened signal by applying FIR filter with Kaiser window. Figure 12 shows the fundamental frequency representing mean heart rate. Figure 13 shows the percentage leakage at each point around the peak. The percentage of time spent at the mean rate should be more than time percentage spent at the heart rate that lies around the peak. Figures 14, 15 and 16 are the folded signals of WPW, LBBB, RBBB beats.
The proposed algorithm determines the heart rate, percentage leakage around the peak and is capable of folding a signal very efficiently based on detected R peaks and period-dependent gate(window). As case study, three ECG arrhythmia records have been folded efficiently to get averaged widths and intervals. The features of WPW are delta wave at Q point and wide QRS complex. The proposed algorithm folded the signal very efficiently and showed the signature of WPW correctly. The features of LBBB and RBBB beats are loss of Q point, wide QRS complex and slurred S wave, M shaped R peak, respectively, where signal folding showed signature of those beats very effectively. Features and intervals calculated from the folded signal give the averaged information than extracting features from each beat directly.
In this paper, only features have been extracted from the ECG signals such as HR and PLAP in frequency domain, and specific signals are segmented based on adaptive window and averaged to extract features. The proposed method is used for only ambulatory ECG. Further, the work can be extended to use these features to detect remaining arrhythmias.
Availability of data and materials
The datasets used and/or analyzed during the current study are available from the MIT-BIH arrhythmia database containing ECG records.
Left bundle branch block
Right bundle branch block
Percentage leakage around the peak
Coviello JS (2020) ECG interpretation made incredibly easy, 5th edn. Lippincott Williams & Wilkins, Philadelphia
Deriche M, Aljabri S, Al-Akhras M, Siddiqui M, Deriche N (2019) An optimal set of features for multi-class heart beat abnormality classification. In: 16th International multi-conference on systems, signals & devices (SSD'19), IEEE
Jones SA (2021) “ECG Notes” interpretation and management guide. FA Davis, Philadelphia
Peshave JD, Shastri R (2014) Feature extraction of ECG signal. In: International conference on communication and signal processing, April 3–5, 2014, India
Ramakrishnan S, Yogeswaran R (2017) Design and analysis of feature extraction algorithm for ECG signals using adaptive threshold method. In: IEEE
Riasi A, Mohebbi M (2015) Prediction of ventricular tachycardia using morphological features of ECG signal. In: International symposium on artificial intelligence and signal processing
Sujan KSS (2015) Performance analysis for the feature extraction algorithm of an ECG signal. In: IEEE sponsored 2nd international conference on innovations in information, embedded and communication systems (ICIIECS)
Tribhuvanam S, Nagaraj HC, Naidu VPS (2019) ECG abnormality classification with single beat analysis. In: International conference on vision towards emerging trends in communication and networking
Vinutha LB, Ramkumar PS, Sushmitha BS (2016) Heart rate and heart rate variability estimation using spectral analysis. Int J Innov Res Sci Eng Technol 5(10):1–7
Ethics approval and consent to participate
Dataset is taken from https://physionet.org/content/mitdb/1.0.0/.
Consent for publication
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Vinutha, L.B., Ramkumar, P.S. & Kunabeva, R. A novel signal-adaptive multi-feature extraction algorithm for arrhythmia detection. Bull Natl Res Cent 45, 164 (2021). https://doi.org/10.1186/s42269-021-00609-8