Early detection of sudden cardiac death by using classical linear techniques and time-frequency methods on electrocardiogram signals

Early detection of sudden cardiac death may be used for surviving the life of cardiac patients. In this paper we have investigated an algorithm to detect and predict sudden cardiac death, by processing of heart rate variability signal through the classical and time-frequency methods. At first, one minute of ECG signals, just before the cardiac death event are extracted and used to compute heart rate variability (HRV) signal. Five features in time domain and four features in frequency domain are extracted from the HRV signal and used as classical linear features. Then the Wigner Ville transform is applied to the HRV signal, and 11 extra features in the time-frequency (TF) domain are obtained. In order to improve the performance of classification, the principal component analysis (PCA) is applied to the obtained features vector. Finally a neural network classifier is applied to the reduced features. The obtained results show that the TF method can classify normal and SCD subjects, more efficiently than the classical methods. A MIT-BIH ECG database was used to evaluate the proposed method. The proposed method was implemented using MLP classifier and had 74.36% and 99.16% correct detection rate (accuracy) for classical features and TF method, respectively. Also, the accuracy of the KNN classifier were 73.87% and 96.04%.


INTRODUCTION
Sudden Cardiac Death (SCD), which is a result of a precipitous loss of heart function, is leading cause of cardiovascular mortality in modern socialites.This is a very serious cardiac event that it will deprive patient's life within several minutes [1,2].When this occurs, no blood can be pumped to the rest of the body within minutes in a person with known or unknown cardiac disease.It is responsible for an estimation of 400,000 deaths per year in the United States and millions of deaths worldwide.Only 1% -2% of patients can survive when SCD occurs outside of a hospital [3].Astonishingly, the victim may not even have been diagnosed with heart disease.Also, the time and mode of death happen unexpectedly [4].These life threatening arrhythmias that indicate SCD are most often initiated with a sustained ventricular tachyarrhythmia, including ventricular tachycardia (VT), ventricular flutter (VFL), or ventricular fibrillation (VFib).A smaller percentage of SCD events are related to a primary brady arrhythmia [5].SCD may abruptly strike any person if he or she possesses of high risk heart disease, even young person, and athlete.Besides utilizing public access defibrillation (PAD) procedure to recue impending death patient while fell down, the better way is to prevent onset SCD by adopting medical aid prior to fell down.Thus, is it possible to make an early warning, even before crisis presenting half an hour [6].
Ichimaru et al. found that the respiratory peak of the heart rate variability (HRV) in SCD patient was disappeared during the night time one-week before death [7].Van Hoogenhuyze, D., Martin, et al. observed two HRV measurements, standard deviation of mean of sinus R-R intervals (SDANN) and mean of SD (SD), from 24 hrs HRV.They have evidences to show that HRV is low in patients who experience SCD, and is high in young healthy subjects [8].However, the relationship between short-term HRV and SCD is unknown.In addition, repolarization alternans phenomena provides a safe, noninvasive maker for the risk of SCD, and has proven equally effective to an invasive and more expensive procedure-invasive electrophysiological study (EPS), which is commonly used by cardiac electrophysiologies [9,10].
Analysis of heart rate variability (HRV) has provided a non invasive method for assessing cardiac autonomic control [11].In this article an algorithm was presented to predicting SCD by using heart rate variability signal.In this algorithm, after preprocessing of ECG signal and HRV extraction, some common features on time domain and frequency domain are extracted.After that, timefrequency transformation is done on the HRV signal and some other features are produced and then PCA is done on features to reduce the features dimension.Multilayer perceptron (MLP) neural network and K-Nearest Neighbor (KNN) neural network are used to classify healthy person and the person who susceptible to heart death.In Figure 1 Summary of the algorithm is shown.

MATERIAL AND METHODS
The proposed method is evaluated on a database containing 35 patients with sudden cardiac death (including 16 female and 19 male, and with a sampling rate of 256 Hz) and 35 normal people (including 17 female and 18 male, and with a sampling rate of 128 Hz).This open access database is prepared by MIT-BIH database with the title of Sudden Cardiac Death Holter database & Normal Sinus Rhythm database.
In cases that for each observation (patient), two channels were in access, each channel is used as a observation (patient).

Preprocessing
The dataset consists of 24-hour ECG recordings (Holter) before event of hearth death and several seconds after that.Patients who show signs of a previous heart attack or having the hard tachyarrhythmia are susceptible for SCD, and finally they catch SCD.One-minute and twominute of ECG recordings just before SCD are used and named First minute and Second minute, respectively.
Figure 2 shows an Electrocardiogram signal of a 34 years old patient that can lead to sudden cardiac death.
Before occurring of SCD, there is no difference between the ECG signal for person who is susceptible of heart death and the ECG signal of normal persons.In Figure 3, a sample of ECG signal of a person with SCD, several seconds before occurrence of SCD and a few seconds after it, is shown.
One minute before the occurrence of the sudden cardiac death was selected as ECG recordings for patients.For normal subjects one minute of the ECG signal was selected at random.Then, the Pan-Tompkins [12] algorithm was used to detect the QRS-complexes in the ECG-signal from which we could determine the RRintervals and HRV signal.So the preprocessed HRV signal is ready to extract features from it.In the Figures 4 and 5 HRV and ECG signal of a healthy subject and a SCD one are shown.

CLASSICAL FEATURE ANALYSIS
In this step some usual linear features in time domain and frequency domain are extracted.These features, include 5 features in the time domain and 4 features in the frequency domain.

Time-Domain Feature
Statistical time-domain measures were divided into two classes:  Direct measurements of NN intervals;  Measurements from the differences between NN intervals.

Direct Measurements of NN Intervals
These features include two simple time domain variables that can be calculated by: 1) Mean of all NN intervals (MNN).
2) The standard deviation of differences between adjacent NN intervals (SDSD).which reflects all the cyclic components responsible for variability in the period.
    

Measurements from the Differences between NN Intervals
   The most commonly used measures derived from interval differences include: The square root of the mean of the sum of the squares of differences between adjacent NN Intervals (RMSSD).
3) The proportion derived by dividing the number of interval differences of NN intervals greater than 50 ms  by the total number of NN intervals (PNN50) [13].

Frequency Domain Features
Although the time domain parameters are computationally effective but they lack the ability to discriminate between the sympathetic and parasympathetic contents of the RR intervals.It is generally accepted that the spectral power in the high frequency (HF) band (0.15 -0.4 Hz) of the RR intervals reflects the respiratory sinus arrhythmia (RSA) and thus cardiac vagal activity.On the other hand, the low frequency (LF) band (0.04 -0.15 Hz), is related to the baroreceptor control and is mediated by both vagal and sympathetic systems [14].In this work, the LF, HF, VLF and ratio of the LF and HF bands power (LF/HF) is used as the frequency domain features of the RR interval signal [15].The power spectral density (PSD) which is shown in Figure 6, was computed with Burg parametric method.Spatial scattering of two of these features is shown in Figure 7.As seen in this figure, theses features are suitable for discriminating between the two groups; healthy and SCD.

TIME-FREQUENCY DOMAIN ANALYSIS
An approach to analyze non stationary HRV signal, is time-frequency (TF) methods.This can be divided into three main categories: nonparametric linear TF methods based on linear filtering, including the short-time Fourier transform [16,17] and the wavelet transform [18,19], nonparametric quadratic TF representations, including the Wigner-Ville distribution and its filtered versions [20][21][22][23], and parametric time-varying methods based on autoregressive models with time-varying coefficients [24][25][26].In this paper the Smoothed Pseudo Wigner-Ville distribution (SPWVD) is preferred since it provides better time frequency resolution than nonparametric  linear methods, an independent control of time and frequency filtering, and power estimates with lower variance than parametric methods when rapid changes occur [21].The main drawback of the SPWVD is the presence of cross-terms, which should be suppressed by the time and frequency filtering.The SPWVD of the discrete signal x(n) is defined by [22].
where n and m are the discrete time and frequency indexes, respectively, h(k) is the frequency smoothing symmetric normed window of length 2N − 1, g(p) is the time smoothing symmetric normed window of length 2M − 1 and r x (n, k) is the instantaneous autocorrelation function, defined as Figure 8 shows the result of applying Wigner Ville transform to the HRV signal.

TF Features Extraction
Each HRV signal is divided into 5 segments of equal length, each segment is approximately 15 seconds in time domain.The average energy of each segment was computed.The features are: MAX w: maximum amount of energy in each window.
MIN w: minimum amount of energy in each window.DIF w: difference between maximum and minimum amount of energy between windows.
STD w: standard deviation between energy of time windows.
The obtained signal in TF domain is also divided into three frequency segments.E vlf : the complex of energy signal in very low frequency band (0.003 -0.04) Hz, divided by length of band (0.037) E lf : the complex of energy signal in low frequency band (0.04 -0.15) Hz, divided by length of band (0.11) E hf : the complex of energy signal on high frequency band (0.15 -0.4) Hz, divided by length of band (0.25).
F vlf : the average of energy signal in very low frequency band (0.04 -0.003) Hz.
F lf : the average of energy signal in low frequency band (0.04 -0.15) Hz.
F hf : the average of energy signal in high frequency band (0.15 -0.4) Hz.
Also, we have defined the first order derivative as a feature to show the difference between adjacent windows.This derivative is the difference between the average energy in subsequent windows.This derivative for the first window (first 15 S) was computed by the difference between this window and the last 15 seconds in the second minute.So the first order derivative feature is computed as below The result of features survey in time span of 15 seconds illustrate that in SCD person the features changes from one window to next window is much more prominent so we define the first order derivative.

FEATURE DIMENSION REDUCTION
In order to reduce the dimensionality of input features, and to select the discriminating features, and to have better classification performance, and reduce the learning time, the principal components analysis (PCA) is used.The goal of the use of PCA, is finding a transform matrix to maximize the between class distribution and minimize the interclass distribution [23].
The obtained features from classical method (9 features) and TF domain (11 features) were reduced to 7 and 8 features, respectively, by using PCA technique.

NEURAL NETWORK CLASSIFIER
Multilayer perceptron (MLP) and K-Nearest Neighbor (KNN) are employed to classify the one minute ECG signals of Normal and sudden cardiac death patients.The mentioned features of one minute ECG signals, just before SCD, are extracted and compared to the normal ones through the MLP and KNN methods.
The classifier is constructed using a three-layer MLP consisting of an input layer, a hidden layer and an output layer.The input layer has a number of nodes equal to the input vector length.The output layer consists of one node, accounting for a possibility of only 2 classes to be classified.Also, the number of nodes in the hidden layer is 2. Both input and output nodes use linear transfer functions, and the hidden layer uses a sigmoid function.The epochs in the data set were randomly divided into two sets: a Training Set and a Testing Set.70% of the epochs are used to train the MLP while 30% were used to test the performance of the classifier.This process was done for 100 times to reach the average accuracy.The same process was done for KNN classifier.The MLP was trained using the Backpropagation strategy, and the termination criteria are the completion of 2000 training epochs or reaching a mean square error level of 0.01 for the training data set.

RESULT
The performance of the proposed method is evaluated with one minute ECG recordings just before SCD.The obtained results are shown in Table 1.As it is seen in Table 1, by using MLP classifier, the predictive accuracy is 99.16%.However, the predictive accuracy of classical method is 74.36%.Also, the predictive accuracy of time-frequency method and classical method using KNN classifier are reached 96.04% and 73.87% respectively.The results of classification by means of MLP and KNN, via classical and TF methods for Twominute analysis in Table 2 are shown.Wang et al. [5] used 2-minute (just before SCD) of the same dataset to predict SCD.Table 3 shows the results of our method and Wang's method.As it is seen, the predictive accuracy has been improved from 67.44% to 91.23%.
The results of this research illustrates that in the electrocardiogram signal of a SCD patient, there are features  Table 3. Predictive accuracy for the proposed method and Wang's method [5] (2-minute analysis).
Comparison Methods (using MLP) Ref [5] Our Methods 67.44% 91.23% that have explicit difference with healthy person's features.Although these differences could not be detected by means of simple methods, but the time-frequency (TF) method has far more ability to detect these differences.These results show that by TF method one can predict the sudden cardiac death, even 2 minutes before SCD occurrence.

F igure 1 .Figure 2 .
Figure 2. The ECG signal of SCD patient, from 2 minute before SCD event and several seconds after that.

Figure 3 .
Figure 3. ECG signal of person on the moment of hearth death.

Figure 4 .
Figure 4. (a) One minute of the ECG signal of a healthy person; (b) The HRV signal which was extracted from (a).

Figure 5 .
Figure 5. (a) One minute the ECG signal of a patient just before occurrence of SCD; (b) The HRV signal which was extracted from part (a).

Figure 6 .
Figure 6.(a) Extracted HRV signal; (b) PSD of HRV signal, power in each frequency band was indicated.

Figure 7 .
Figure 7. Spatial distribution of mean (in horizontal axis) and LF/HF (in vertical axis).

Figure 8 .
Figure 8. Wigner Ville transform of the HRV signal of a SCD person.

Table 1 .
The results of classification by means of MLP and KNN, via classical and TF methods (one-minute analysis).

Table 2 .
The results of classification by means of MLP and KNN, via classical and TF methods (Two-minute analysis).