Abstract
This work describes a novel method to detect a Bundle branch block and myocardial infarction from the multi-lead ECG signal. The clinical characteristics of BBB and MI extracted by using a derivative filter and continuous wavelet transform (CWT). The signal with the frequency below 50 Hz obtained and derivative-based filter applied to extract features. The continuous wavelet transforms also applied to the signals of BBB and MI. The CWT coefficients extracted, and the signals reconstructed from the wavelet to obtain the features. The feature vectors generated from each lead of both the methods computed using parameters such as spectral entropy, mean of peaks, total energy from power spectrum density, form factor, and root mean squared value. The results of both the derivative-based filter and CWT analyzed by applying these features to the classifiers. The accuracy of classification of diseases computed using SVM, KNN, Levenberg-Marquardt Neural Network (LMNN), and scaled conjugate gradient backpropagation network (SCG NN). The best accuracy obtained from the derivative filter and wavelet transform method is 96.4% using LMNN and SCGNN classifier and 96.4% using KNN and LMNN classifier respectively.
Keywords
Introduction
Early diagnosis of heart diseases is essential to give quick treatment to the patient to save their life [1]. The ECG is a rapid tool for the early diagnosis of heart diseases. The major concern of heart diseases is that Bundle Branch Block (BBB) and Myocardial Infarction (MI). The Left bundle branch block along with myocardial infarction diagnosis is very difficult. The diagnosis of delayed MI disease may lead to major complications [2]. It is a challenging issue to diagnose the Bundle Branch Block and Myocardial Infarction based ECG signal. The Bundle Branch Block disturbs the flow of electrical pulses through the bundle of His which leads to the delay in the activation of ventricles that broadens the QRS complex of ECG signal, raises the amplitude of the Q wave and changes in the T waves [1]. Sometimes there is a disappearance of the normal Q waves in Lead I, avL and
Bundle branch block based ECG signal.
Myocardial infarction based ECG signal [4].
Myocardial Infraction named as a heart attack occurs due to the disruption of the flow of blood to the heart. It caused by the deposition of fats in the blood vessels of the heart. It leads to changes in the morphology of the ST segment and the Q wave of the ECG signal [4]. An elevated ST segment is the major criterion for the diagnosis of myocardial infarction. But other conditions that lead to the elevation of the ST segment are bundle Branch Block and Left Ventricular Hypertrophy [7]. The LBBB pattern confuses with the ECG pattern of MI [8]. Thus, to overcome this issue an algorithm is proposed to diagnose Myocardial infarction and Bundle branch block disease.
A few of the papers which describe the detection of BBB and MI mentioned below. Kora et al. presented an ECG based BBB detection using the Adaptive Bacterial Foraging Optimization technique and Neural Network [8]. Sharma et al. proposed the detection of Myocardial Infarction using multiscale energy and the Eigenspace approach and obtained an accuracy of 96% [9]. Kora et al. applied an improved bat optimization technique and neural network classifier to diagnose Myocardial Infarction [10]. Li et al. described the detection of MI by using Multiple Instance Learning [11]. Hasan et al. reported a technique based on a convolution neural network to classify various cardiovascular diseases [12]. Shi et al. proposed multilayer input based on a deep neural network to classify heartbeats which includes the right bundle branch block and left bundle branch block [13]. Kayikcioglu et al. extracted time-frequency distribution-based features from a multi-lead ECG signal to predict the changes in the ST segment [14]. Han et al. explained a technique that combines the energy entropy and morphological features to diagnose Myocardial Infarction [15].
Liu et al. presented a technique to diagnose MI from the Lead II ECG signal. This technique involves the ECG segments and CNN based algorithm [16]. Mienyea et al. reported improved sparse encoder neural network models to diagnose heart disease [17]. Li et al. proposed a 31-layer residual Neural network to diagnose heartbeats which includes the Left Bundle Branch Block and Right Bundle Branch block [18].
The above papers explain either detection of BBB or MI. The identification of these two ECG signals is a challenging issue. This paper intends to show an algorithm to diagnose BBB and MI-based ECG signal using a derivative-based method and continuous wavelet transform method. The analysis of signal implemented by extracting features which include mean of detected peaks, mean of the continuous wavelet transform coefficients, spectral entropy, power spectral energy, form factor, and root mean square value. Then these features fed to the various classifiers. The reliability of the obtained results verified using 5-fold cross-validation.
The following section explains feature extraction techniques and classifiers to diagnose both Bundle Branch Block and Myocardial Infarction.
ECG signal with BBB and MI.
Block diagram of a derivative filter method to detect BBB and MI.
Block diagram of a continuous wavelet transform method to detect BBB and MI.
Preprocessing of ECG signal.
Dataset
The ECG signals involved in this study are from the PTB Diagnostic ECG Database. This database holds 448 ECG records which include BBB, MI, Myocarditis, cardiomyopathy and healthy subjects [10]. These records obtained from 209 males and 81 females. Each ECG record holds 12 conventional leads and 3 frank leads. The sampling frequency of the signal is 1000 Hz. The sample signal from the PTB database is shown in Fig. 3.
Methodology
The methodology of the proposed work comprises preprocessing using low pass filter, features extraction using the derivative-based method and continuous wavelet transform method and classification using SVM, KNN, LM NN, and SCG NN classifiers. The block diagram of the derivative-based filter and continuous wavelet transform method is shown in Figs 4 and 5 respectively. The feature extraction of derivative-based filter includes differentiation, squaring and normalization of ECG signal. This is explained in detail in Section 2.4. The feature extraction of continuous wavelet transform includes the decomposition of a signal into wavelet coefficients between 10 Hz and 50 Hz and is followed by the reconstruction of the signal. The performance is analyzed using various classifiers.
Preprocessing
In preprocessing, the ECG signal distorted by noise which includes power line interference, motion artifacts, baseline wandering, and high-frequency noises [10]. In this work, the ECG signal is added with random noise. The fourth-order Butterworth filter designed for the lowpass filter with the cutoff frequency 50 Hz applied to minimize the noise present in the signal. The preprocessing result is shown in Fig. 6.
Derivative-based filter
The structure of the derivative-based filter is shown in Fig. 4. The derivative filter method improves detection accuracy [19]. The features extracted by using a derivative-based filter technique include differentiation, squaring and normalization operation. The results are shown in Fig. 7. The filtered ECG signal
The differentiation of ECG signal implemented by Eq. (1) [19]
The ECG signal then squared using Eq. (2). The squaring operation attenuates other peaks and allows the QRS peaks as positive peaks irrespective of the polarity of the original ECG signal. It is used to measure the energy of the QRS complex. It amplifies the differentiated ECG signal nonlinearly [20] and then it’s normalized by using the Eqs (3) and (4)
where
ECG signal obtained from the derivative filter (1) ECG signal (2) Differentiated ECG signal (3) Squared ECG signal (4) Normalized ECG signal.
ECG signal obtained from continuous wavelet transform (1) ECG signal (2) Reconstructed ECG signal.
This technique applied to all the 12 leads of ECG signal and 60 features were obtained from a single 12 lead ECG signal. Then this fed to the classifier to show BBB and MI-based ECG signals.
Figure 5 shows the structure of the continuous wavelet transform method. The noise exists in the ECG signal removed by a lowpass filter shown in Fig. 6. The continuous wavelet transform method applied to obtain the wavelet coefficients. The signals with the frequency between 10 Hz and 50 Hz were reconstructed using an inverse continuous wavelet transform. This is followed by the estimation of feature extraction parameters. The total features extracted from each 12-lead ECG signal is 72. Then the BBB and MI signals detected using various classifiers.
The wavelet transform method can implement in many signal processing applications. This technique based on multiple scales [21]. The continuous wavelet transform disintegrates the signal
To examine the signal function, the continuous wavelet transform method transforms time-domain function to frequency domain function and by using inverse continuous wavelet transform (ICWT) the signal again transformed to time-domain function. It recovers the original signal [23].
In this paper, continuous wavelet transform applied to all the 12 leads and disintegrated into wavelet coefficients. The ECG signal plotted in Fig. 8. The inverse continuous wavelet transforms applied to this wavelet to reconstruct the signal between 10 Hz and 50 Hz. The peaks detected and the other features such as spectral entropy, form factor, root mean square value, the total energy in power spectral density are obtained. Then it is applied to the classifier to show BBB and MI-based ECG signals.
Feature extraction
Spectral entropy
The spectral power distribution of a signal measured using spectral entropy. It is based on the concept of Shannon entropy [24]. The spectral Entropy serves the power distribution of the normalized signal as a probability distribution. This widely used in signal analysis.
For a signal
where
The spectral entropy implemented using the formula [24]
The normalized spectral entropy calculated by the following equation
where
Form Factor is a parameter to analyze the signals. Three variables used to analyze the signal. The first variable is known as an activity. It refers to a variance of the signal. It is denoting by
where
The root mean squared value of ECG signal
But this not recommended for the analysis of nonstationary signals. An RMS value of the signal calculated for a causal window of
where
The estimation of the power spectrum says the distribution of power present in the signal over the frequency [26]. It is associated with the correlation function by Fourier transform. The signal which is more correlated consists of the more concentrated power spectrum. The signal which is less correlated leads to more spread in its power spectrum [26]. There are several methods to estimate the power spectrum which includes the non-parametric power estimation method, high-resolution estimation method, and model-based power estimation method. The non-parametric method used in this study.
This method estimates PSD directly from the signal itself. It is also known as a periodogram. It defined using Eq. (13) [26]
where
In this work, four classifiers such as Support Vector Machine (SVM), K-nearest neighbor (KNN), SCG NN and LM NN employed for diagnosis and classification of BBB and MI.
SVM classifier
This method discriminates the features by computing the perfect hyperplane. This hyperplane separates the feature vectors one from the other class [27]. It also employs a nonlinear mapping which transforms the input features to high dimension [27]. In this paper, the SVM classifier is employed using the Gaussian kernel function. The Gaussian kernel equation is represented by
nearest neighbour classifier
The
Neural network classifier
The LMNN and SCGNN neural network techniques were employed to classify the BBB and MI-based ECG signals. Artificial Neural Network (ANN) is an essential segment of artificial intelligence [30]. It is one of the excellent machine learning techniques. It uses backpropagation NN to find solutions for the approximate feature dataset [30]. The structure of back propagation model is shown in Fig. 9.
Backpropagation neural network [33].
Sample features extracted from derivative based filters
Sample features extracted from CWT
Boxplot of a derivative filter of Lead III ECG signal.
The Levenberg-Marquardt (LM) back-propagation technique is a combination of gauss-newton and gradient descent approach [31]. It is the quickest learning feedforward network. At every iteration, the gradient descent technique reduces the solution by selecting the parameters that bring the value of the function minimum [31]. The summation of squared errors minimized by the interpolation between the direction of steepest descent and the direction estimated by the newton method. The convergence speed raised in the LM NN technique [31]. The training algorithm of the LM NN as follows as [30]
Calculate the Start with a Find If If
The SCG NN technique is also a feed-forward network. It implements conjugates-based search direction instead of a linear search [8]. It determines the optimal distance for each iteration [32].
In this work, the feature datasets obtained from the derivative-based filter and continuous wavelet transform method applied to the ANN. The neurons presented in the hidden layer of ANN are 10. The 70% of the dataset is for training and 15% of the dataset is for validation and 15% employed for testing the dataset. The performance of the LM NN and SCG NN model evaluated on these datasets. The LMNN and scaled conjugate gradient (SCG NN) shows a better result than the other classifiers.
The derivative based filter and continuous wavelet transform techniques were employed to discriminate BBB and MI-based ECG signals. The features extracted are the means of peaks, spectral entropy, form factor, root mean square value, wavelet coefficients and the total energy in power spectral density. The features extracted from derivative filters are 60 (
The Figs 10 and 11 shows the box plot of the BBB and MI Lead III ECG signal features obtained from the derivative-based filter and continuous wavelet transform method. Box plot used to analyze the range and distribution of the given data set and also it used to compare the various data sets [33]. In this plot, the dataset divided into four or more equal parts called quartile. Box plot comprises minimum value, maximum value, first quartile, second quartile, and third quartile. The first quartile is the middle number lies between the minimum value and the median of the given dataset. The second quartile represented as the median of the given dataset. The third quartile is the middle number lies between the median and the maximum value of the dataset. The values of BBB based ECG signal various from MI-based ECG signal. It shows for both techniques in Tables 3 and 4.
Experimental results of I
, II
, III
quartile and maximum values of feature vectors of BBB and MI ECG signal from lead III using the derivative-based method
Experimental results of I
Experimental results of I
Boxplot of CWT of Lead III ECG signal.
Thus, the box plot differentiates the BBB and MI-based ECG signals by using a derivative-based filter and continuous wavelet transform method. The confusion matrix of both the methods shown in Figs 12 and 13. The performance of the experiments evaluated based on the term’s such as accuracy, sensitivity, and specificity. These terms calculated by using True Positive values, True Negative values, False Positive values, and False Negative values. True Positive (TN) values denote the number of identical events. False Negative values denote the number of non-identical events. True Negative value denotes the event that considered as not defectives. False Positive Values denotes that the non-identical event detected as an identical event. The accuracy is determined by the term
The receiver operating characteristic (ROC) curve for SVM and KNN technique compared to evaluate the classifier performance. The area under the ROC curve for SVM, KNN of both the techniques evaluated in this work. It shows that the area under the curve for SVM, KNN, SG NN and LM NN using derivative filters were 0.92, 0.95,0.96 and 0.96 respectively. For the CWT method, the area under the curve for SVM, KNN, SCG NN, LM NN were 0.93, 0.97, 0.93, 0.96 respectively. The 5-fold cross-validation technique performed for choosing the training and testing of classifiers.
Evaluation of the performance of classifiers to detect BBB and MI ECG signal
Confusion matrix obtained based on derivative based method.
Confusion matrix obtained based on the continuous wavelet transform method.
Table 5 indicates the comparative solutions of sensitivity, specificity, the accuracy of the derivative filter and the CWT method to characterize BBB and MI-based ECG signal using SVM, KNN, LMNN, and SCNN classifier. As referred to the table, both the methods achieved the highest classification accuracy of 96.4% using the LM NN classifier. The comparative results to Diagnose Myocardial Infarction disease with the ECG signal from the PTB database is shown in the following Table 6.
Comparative analysis of diagnosis of MI from the PTB database
This study performs an experimental work using derivative filter and CWT for extracting BBB and MI-based ECG signal features and SVM, KNN and LMNN and SCG NN classifiers for detection of BBB and MI-based signals. From the study, it reveals that in both the methods the LMNN classifier outperformed than other technique.
Bundle Branch Block and Myocardial Infarction are cardiovascular diseases. This disease causes heart failure which leads to a high mortality rate. In India, the death rate due to cardiovascular disease increased to 272 per 1 lakh population [35]. The diagnosis of these two diseases using various imaging modalities provides high cost and time-consuming [36, 37, 38]. This research work implies the automatic diagnosis of these diseases using a machine learning algorithm. This proposed work implemented in MATLAB 2018 software installed in a computer having an Intel Core i3 processor with 4 GB RAM. The proposed work provides an accuracy of 96.4%. This research work carried out with the real-time ECG signal acquired from a local hospital. This research also highlights the doctor’s view of the automatic diagnosis of these diseases. They suggested that this work may help general physicians to diagnose heart disease at an early stage at a low cost.
In this paper, the derivative filter and continuous wavelet transform method adopted to characterize the ECG signal with the BBB and MI. A group of feature vectors includes mean of peaks, coefficients of wavelet transforms, spectral entropy, the total energy of power spectrum density, form factor, Root mean squared value exploited to discriminate the ECGs with the BBB and MI. The generated feature vectors denote the BBB and MI ECG signals. This uses as an input to the classifiers. The accuracy achieved using derivative filters is 91.7%, 95.2%, 96.4% and 96.4% using SVM and KNN, SCGNN and LMNN classifiers. The accuracy achieved using CWT techniques is 91.7%, 96.4%, 92.9% and 96.4% using SVM, KNN, LMNN, and SCG NN classifiers. The derivative-based method and the CWT method shows the best classification accuracy of 96.4% using the LMNN classifier.
In future work, various other techniques can implement with different classifiers and its performance will be tested for comparison to diagnose cardiac diseases such as Bundle Branch Block and Left Ventricular Hypertrophy. The deep learning algorithm can also be implemented to diagnose Myocardial Infarction, Bundle Branch Block and Left Ventricular Hypertrophy.
