# Arrhythmia Classification Based on Multi-Domain Feature Extraction for an ECG Recognition System

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

^{TM}2 vital sign simulator (Fluke Corp., Everett, WA, USA) to demonstrate the effectiveness of the proposed ECG recognition system. The experimental results based on ECG data collected from the experimental platform show that the proposed system can achieve satisfactory identification results.

## 2. Materials and Methods

#### 2.1. The Proposed System Based on the Multi-Domain Feature Extraction

- 1
- The ECG beats are pre-processed to eliminate disturbance and noise by denoising with an improved wavelet threshold method.
- 2
- The original ECG data are optimized through PCA. KICA is applied to reduce data dimensions and obtain the nonlinear features of ECG beats. The DWT method is employed to extract frequency domain features. The maximum, minimum, mean and standard deviation values of each sampling signal wavelet coefficient are calculated. Additionally, LDA is used to optimise the frequency domain features.
- 3
- The multi-domain features are composed of nonlinear and frequency domain features, which are used as input features to train and test the SVM classifier model. GA is employed to optimise the SVM parameters and improve the classifier’s performance. Finally, the five types of ECG beats derived from the MIT-BIH arrhythmia database are classified with the optimised SVM classifier.

#### 2.2. ECG Pre-Processing Based on the Improved Wavelet Threshold Method

_{j,k}is the wavelet coefficient, ${\widehat{w}}_{j,k}$ is the wavelet coefficient obtained by wavelet threshold processing, λ is the critical threshold, a and b are regulatory factors and a can be any positive integer, $0\le b\le 0.1$. By adjusting the values of a and b, the continuity of the threshold function is achieved at the critical point, and the attenuation of the reconstructed signal is reduced, thus overcoming the inadequacy of traditional threshold functions. The critical threshold is $\lambda =\sigma \sqrt{2\mathrm{log}N}$, and the noise intensity is $\sigma =(mediam\left|{w}_{j,k}\right|)/0.6745$ in the proposed ECG denoising method [35]. We choose sym6 as the mother wavelet and utilise WT based on the Mallat algorithm [36] to decompose ECG signals into five levels, and the decomposition results are shown in Figure 2. The wavelet coefficients are then quantized with the improved wavelet threshold method to remove noise wavelet coefficients. The resulting new wavelet coefficients are utilised to reconstruct ECG signals on the basis of the Mallat algorithm to obtain the denoised ECG signals.

#### 2.3. Multi-Domain Feature Extraction

#### 2.3.1. KICA for the Nonlinear Feature Extraction

_{i}(i = 1, 2, …, k) and eigenvectors p of the covariance matrix C of ECG samples. Here, k is the rank of the covariance. The contribution and cumulative contribution rates are calculated according to the size of eigenvalue λ

_{i}sequenced in decreasing order. This study selects 99.8% of the cumulative contribution rate. We filter the corresponding eigenvectors of the first 20 maximum eigenvalues (λ

_{1}, λ

_{2}, …, λ

_{20}) of covariance matrix C. A total of 20 dimensions from the original data are obtained as the input data of KICA.

- Enter ECG data and determine the number of sources p.
- Initialize the decomposition matrix W.
- Evaluate the source signals, s
_{i}= Wx_{i}, and compute the centralized Gram matrix, K_{1}, …, K_{p}. Here, K_{i}= k(x_{i},x) (I = 1, 2, …, p). - Compute the minimum eigenvalue, λ
_{M}(K_{1}, …, K_{p}), of the generalized eigenvector equation, Kα = λDα. - Compute the target function:$$C\left(W\right)=-0.5{\mathrm{log}}_{2}{\lambda}_{M}\left({K}_{1},\text{\hspace{0.17em}}\mathrm{\dots},\text{\hspace{0.17em}}{K}_{p}\right).$$
- Minimize the target function C(W) and output W.

_{i}= Wx

_{i}). The coefficient of each ECG beat mapped to the feature subspace is obtained as the nonlinear feature vector. The pseudo inverse method is applied to recognize the projection coefficient vector based on the following equation:

_{i}is the nonlinear feature vector of the recognized ECG beats and S

^{−1}is the pseudo inverse matrix of independent signal vector S. We set the regularization parameter kap = 0.02 and the nuclear width of RBF kernel function δ = 1 in the KICA decomposition. The feature subspace obtained by using KICA is shown in Figure 5.

#### 2.3.2. DWT for Frequency Domain Feature Extraction

#### 2.4. Classification Based on SVM Optimized by GA

- Generate an initial population with the binary code.
- Compute the fitness function and the training set for CV to determine the fitness function value.
- Filter a new population from the old population on the basis of individual fitness, which is determined by the evaluation function.
- Employ several genetic operators of mutation and crossover to generate new solutions.
- Calculate the fitness function of the newly generated individuals.
- Repeat steps 3–5 until the maximum iteration is reached and then find the optimal parameters.

## 3. Experimental Design

^{TM}2 vital sign simulator is used as the signal resource to provide different types of ECG signals, and standard I lead ECG is selected in this platform. An ECG acquisition module is a critical part of the experimental platform and is integrated with an ADuCM361 (Analog Devices, Inc., Norwood, MA, USA) micro controller and an A/D converter (Analog Devices, Inc., Norwood, MA, USA) to acquire analog ECG signals and convert them into digital ones. The collected ECG data are transmitted via Bluetooth HC-05 (DX-Smart Technology Co. Ltd., Shenzhen, China) to a PC, and the data are then input into the proposed ECG recognition system for classification. The power module is used to supply electricity to the ECG acquisition module and the Bluetooth module. Figure 7 provides diagrams of the ECG acquisition experimental platform.

## 4. Results and Discussion

#### 4.1. Results of the Proposed ECG Recognition System

#### 4.1.1. Multi-Domain Feature Extraction Using KICA Combined with DWT

_{i}(i = 1, …, 20), is obtained, and the feature subspace is constructed with the base signal vector. The coefficient of each projection to the feature subspace is for nonlinear features. Therefore, a feature matrix of 1800 × 20 is obtained as the nonlinear features after KICA.

#### 4.1.2. Classification Using SVM Optimized by GA

_{CC}), sensitivity (Se), specificity (Sp) and positive predictivity (Pp) are evaluated to investigate the recognition performance of the proposed system. The performance parameters for each class are defined as follows:

_{E}and N

_{T}represent the total number of classification errors and the total number of the testing sets, respectively. Table 2 and Table 3 present the multi-domain feature classification results obtained with the SVM classifier. Table 2 shows that the five types of ECG beats produce different classification results. N and RBBB samples are correctly classified. Two LBBB samples are incorrectly classified as PVC. Five PVC samples are classified as LBBB. Three APC samples are incorrectly classified as N, and one sample is classified as PVC. Table 3 clearly shows that the five types of ECG beats perform well in classification. RBBB has the best statistical performance indicators of sensitivity, specificity and positive predictive value amongst the five types of ECG beats. APC presents good performance with a specificity of 100% and a positive predictive value of 100%; its sensitivity of 96% is the lowest among the sensitivities of other types. N, LBBB and PVC present similar statistical performance indicators.

#### 4.2. Experimental Results from the ECG Acquisition Platform

#### 4.3. Discussion and Comparisons

^{TM}2 are limited in providing a large number of ECG samples. Another important reason is that several types of ECG signals might require other features to represent their characteristic information. Therefore, further study and evaluation of the algorithm based on feature extraction and classification in the ECG recognition system are necessary.

## 5. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Edla, S.; Kovvali, N.; Papandreou-Suppappola, A. Electrocardiogram signal modeling with adaptive parameter estimation using sequential bayesian methods. IEEE Trans. Signal Process.
**2014**, 62, 2667–2680. [Google Scholar] [CrossRef] - Wang, J.; She, M.; Nahavandi, S.; Kouzani, A. Human identification from ECG signals via sparse representation of local segments. IEEE Signal Process. Lett.
**2013**, 20, 937–940. [Google Scholar] [CrossRef] - Ubeyli, E.D. Combining recurrent neural networks with eigenvector methods for classification of ECG beats. Digit. Signal Process.
**2009**, 19, 320–329. [Google Scholar] [CrossRef] - Jain, S.; Bajaj, V.; Kumar, A. Efficient algorithm for classification of electrocardiogram beats based on artificial bee colony-based least-squares support vector machines classifier. Electron. Lett.
**2016**, 52, 1198–1200. [Google Scholar] [CrossRef] - Zadeh, A.E.; Khazaee, A. High efficient system for automatic classification of the electrocardiogram beats. Ann. Biomed. Eng.
**2011**, 39, 996–1011. [Google Scholar] [CrossRef] [PubMed] - Plonsey, R.; Barr, R.C. Bioelectricity: A Quantitative Approach; Springer: New York, NY, USA, 2000; pp. 522–526. [Google Scholar]
- Perlman, O.; Katz, A.; Weissman, N.; Amit, G. Atrial electrical activity detection using linear combination of 12-lead ECG signals. IEEE Trans. Biomed. Eng.
**2014**, 61, 1034–1043. [Google Scholar] [CrossRef] [PubMed] - Afonso, V.X.; Tompkins, W.J.; Nguyen, T.Q.; Luo, S. ECG beat detection using filter banks. IEEE Trans. Biomed. Eng.
**1999**, 46, 192–202. [Google Scholar] [CrossRef] [PubMed] - Mateo, J.; Torres, A.; Soria, C.; Santos, J.L. A method for removing noise from continuous brain signal recordings. Comput. Electr. Eng.
**2013**, 39, 1561–1570. [Google Scholar] [CrossRef] - Mateo, J.; Sanchez-Morla, E.M.; Santos, J.L. A new method for removal of powerline interference in ECG and EEG recordings. Comput. Electr. Eng.
**2015**, 45, 235–248. [Google Scholar] [CrossRef] - Liu, S.; Jilai, L.U.; Hao, L.; Guangshu, H.U. Detection of QRS complex using mathematical morphology and wavelet transform. J. Tsinghua Univ.
**2004**, 44, 852–855. [Google Scholar] - Vizireanu, D.N. Morphological shape decomposition interframe interpolation method. J. Electron. Imaging.
**2008**, 17, 1–5. [Google Scholar] [CrossRef] - Szilagyi, S.M.; Benyo, Z.; Szilagyi, L.; David, L. Adaptive wavelet-transform-based ECG waveforms detection. In Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Cancún, Mexico, 17–21 September 2003; pp. 2412–2415.
- Alfaouri, M.; Daqrouq, K. ECG signal denoising by wavelet transform thresholding. Am. J. Appl. Sci.
**2008**, 5, 276–281. [Google Scholar] [CrossRef] - Zhao, Z.; Yang, L.; Chen, D.; Luo, Y. A human ECG identification system based on ensemble empirical mode decomposition. Sensors
**2013**, 13, 6832–6864. [Google Scholar] [CrossRef] [PubMed] - Li, H.Q.; Wang, X.F. Detection of electrocardiogram characteristic points using lifting wavelet transform and Hilbert transform. Trans. Inst. Meas. Control.
**2013**, 35, 574–582. [Google Scholar] [CrossRef] - Gao, J.; Sultan, H.; Hu, J.; Tung, W.W. Denoising nonlinear time series by adaptive filtering and wavelet shrinkage: A comparison. IEEE Signal Process. Lett.
**2010**, 17, 237–240. [Google Scholar] - Li, H.Q.; Wang, X.F.; Chen, L.; Li, E.B. Denoising and R-Peak detection of electrocardiogram signal based on EMD and improved approximate envelope. Circ. Syst. Signal Process.
**2014**, 33, 1261–1276. [Google Scholar] [CrossRef] - Ganeshkumar, R.; Yskumaraswamy, D. Investigating cardiac arrhythmia in ECG using random forest classification. Int. J. Comput. Appl.
**2012**, 37, 31–34. [Google Scholar] [CrossRef] - Fei, S.W. Diagnostic study on arrhythmia cordis based on particle swarm optimization-based support vector machine. Expert Syst. Appl.
**2010**, 37, 6748–6752. [Google Scholar] [CrossRef] - Liu, S.H.; Cheng, D.C.; Lin, C.M. Arrhythmia identification with two-lead electrocardiograms using artificial neural networks and support vector machines for a portable ECG monitor system. Sensors
**2013**, 13, 813–828. [Google Scholar] [CrossRef] [PubMed] - Rai, H.M.; Trivedi, A.; Shukla, S. ECG signal processing for abnormalities detection using multi-resolution wavelet transform and artificial neural network classifier. Measurement
**2013**, 46, 3238–3246. [Google Scholar] [CrossRef] - Daamouche, A.; Hamami, L.; Alajlan, N.; Melgani, F. A wavelet optimization approach for ECG signal classification. Biomed. Signal Process. Control
**2012**, 7, 342–349. [Google Scholar] [CrossRef] - Lin, C.C.; Yang, C.M. Heartbeat classification using normalized RR intervals and morphological features. Math. Probl. Eng.
**2014**, 12, 1–11. [Google Scholar] [CrossRef] - Dutta, S.; Chatterjee, A.; Munshi, S. Correlation technique and least square support vector machine combine for frequency domain based ECG beat classification. Med. Eng. Phys.
**2010**, 32, 1161–1169. [Google Scholar] [CrossRef] [PubMed] - Kasturiwale, H.P.; Ingole, P.V. Component extraction of complex biomedical signals and performance analysis. Int. J. Comput. Sci. Inf. Technol.
**2012**, 3, 3544–3547. [Google Scholar] - Martis, R.J.; Acharya, U.R.; Mandana, K.M. Cardiac decision making using higher order spectra. Biomed. Signal Process.
**2013**, 8, 193–203. [Google Scholar] [CrossRef] - Valenza, G.; Citi, L.; Lanata, A.; Scilingo, E.P.; Barbieri, R. Revealing real-time emotional responses: A personalized assessment based on heartbeat dynamics. Sci. Rep.
**2014**, 4, 1–13. [Google Scholar] [CrossRef] [PubMed] - Saini, I.; Singh, D.; Khosla, A. Electrocardiogram beat classification using empirical mode decomposition and multi-class directed acyclic graph support vector machine. Comput. Electr. Eng.
**2014**, 40, 1774–1787. [Google Scholar] [CrossRef] - Kamath, C. ECG beat classification using features extracted from Teager energy functions in time and frequency domains. IET Signal Process.
**2011**, 5, 575–581. [Google Scholar] [CrossRef] - Bach, F.R.; Jordan, M.I. Kernel independent component analysis. J. Mach. Learn. Res.
**2003**, 3, 1–48. [Google Scholar] - Belhumeur, P.; Hespanha, J.; Kriegman, D. Eigenfaces vs. fisherfaces: Recognition using class specific linear projection. IEEE Trans. Pattern Anal. Mach. Intell.
**1993**, 19, 711–720. [Google Scholar] [CrossRef] - Goldberg, D.E. Genetic Algorithms in Search, Optimization, and Machine Learning; Addison Wesley: Boston, MA, USA, 1989; pp. 2104–2116. [Google Scholar]
- Goldberger, A.L. Clinical Electrocardiography: A Simplified Approach; Elsevier: Amsterdam, The Netherlands, 2006. [Google Scholar]
- Donoho, D.L. De-noising by soft-thresholding. IEEE Trans. Inform. Theory
**1995**, 41, 613–627. [Google Scholar] [CrossRef] - Mallat, S.G. A theory for multiresolution signal decomposition: The wavelet representation. IEEE Trans. Pattern Anal. Mach. Intell.
**2010**, 11, 674–693. [Google Scholar] [CrossRef] - Jovic, A.; Bogunovic, N. Electrocardiogram analysis using a combination of statistical, geometric, and nonlinear heart rate variability features. Artif. Intell. Med.
**2011**, 51, 175–186. [Google Scholar] [CrossRef] [PubMed] - Duda, R.O.; Hart, P.E.; Stork, D.G. Pattern Classification; Wiley: NewYork, NY, USA, 2001; pp. 119–131. [Google Scholar]
- Ubeyli, E.D. ECG beats classification using multiclass support vector machines with error correcting output codes. Digit. Signal Process.
**2007**, 17, 675–684. [Google Scholar] [CrossRef] - Vapnik, V. Statistical Learning Theory; Wiley: NewYork, NY, USA, 1998. [Google Scholar]
- Chang, C.C.; Lin, C.J. LIBSVM: A library for support vector machines. ACM Trans. Intell. Syst. Technol.
**2011**, 2, 27. [Google Scholar] [CrossRef] - Gamarra, A.; Quintero, M. Using genetic algorithm feature selection in neural classification systems for image pattern recognition. Ing. Investig.
**2013**, 33, 52–58. [Google Scholar] - Huang, C.J. Using genetic algorithm optimization SVM to construction of investment model. Int. J. Digit. Content Technol. Appl.
**2011**, 5, 123–132. [Google Scholar] - Zadeh, A.E.; Khazaee, A.; Ranaee, V. Classification of the electrocardiogram signals using supervised classifiers and efficient features. Comput. Meth. Program. Biomed.
**2010**, 99, 179–194. [Google Scholar] [CrossRef] [PubMed]

**Figure 1.**Block scheme of the proposed electrocardiogram (ECG) recognition system for ECG beats classification. The presented system is composed of ECG pre-processing, feature extraction and classification. ECG pre-processing removes noise and interference from original ECG beats. Feature extraction derives multi-domain features through kernel-independent component analysis (KICA) and discrete wavelet transform (DWT). The support vector machine (SVM) classifier, optimized with genetic algorithm (GA), divides ECG beats into five categories: normal beat (N), left bundle branch block beat (LBBB), right bundle branch block beat (RBBB), premature ventricular contraction (PVC) and atrial premature beat (APC).

**Figure 2.**Results of wavelet transform (WT) for ECG denoising. (

**a1**–

**a5**) present the approximation coefficients of WT, and (

**d1**–

**d5**) present the detail coefficients of WT.

**Figure 3.**Denoising results of different threshold functions. (

**a**) Original signal; (

**b**) Noisy signal; (

**c**) Signal denoised by the soft threshold function; (

**d**) Signal denoised by the hard threshold function; and (

**e**) Signal denoised by the improved threshold function.

**Figure 4.**Spectrum of different signals. (

**a**) Spectrum of the original signal; (

**b**) Spectrum of the noisy signal; (

**c**) Spectrum of the signal denoised by the soft threshold function; (

**d**) Spectrum of the signal denoised by the hard threshold function; (

**e**) Spectrum of the signal denoised by the improved threshold function.

**Figure 5.**Feature subspace obtained through kernel-independent component analysis (KICA). (

**s1**–

**s20**) are 20 independent base signals, x-axis represents sample points of the ECG signal and y-axis is the amplitude.

**Figure 6.**Frequency domain features of five types of ECG beats obtained through DWT.

**s0**is the original ECG beat,

**ca4**is the approximation of the 4th level and cd1 to

**cd4**are the details of each level. (

**a**) ECG of record 100 is used to represent N; (

**b**) ECG of record 109 represents LBBB; (

**c**) ECG of record 118 represents RBBB; (

**d**) ECG of record 106 represents PVC; and (

**e**) ECG of record 209 represents APC.

**Figure 7.**Diagrams of the ECG acquisition experimental platform. (

**a**) Schematic of the experimental platform; and (

**b**) Construction of the experimental platform.

**Figure 8.**Fitness curve of GA for finding the optimal parameters of SVM. Average fitness and best fitness are gradually increased via a series of iterations. When the evolution algebra is 200, average fitness and best fitness reach the maximum value, namely, the final optimization parameters of SVM are obtained.

**Figure 9.**Five types of ECG signals acquired by the experimental platform. The ECG signals in the red dashed boxes are the five types of the acquired beats. (

**a**) N; (

**b**) LBBB; (

**c**) RBBB; (

**d**) PVC; and (

**e**) APC.

Methods | Performance Indicators | ECG Signal Records | ||||
---|---|---|---|---|---|---|

103 | 102 | 118 | 232 | 231 | ||

Hard threshold | signal-noise ratio (SNR) | 21.2769 | 20.4320 | 21.8957 | 18.1098 | 22.6279 |

root mean square error (RMSE) | 0.0255 | 0.0252 | 0.0257 | 0.0319 | 0.0221 | |

Soft threshold | SNR | 21.7454 | 20.2268 | 22.1032 | 18.0057 | 22.5574 |

RMSE | 0.0241 | 0.0258 | 0.0251 | 0.0328 | 0.0223 | |

Improved threshold | SNR | 24.0626 | 23.4869 | 24.0128 | 20.8680 | 25.2851 |

RMSE | 0.0185 | 0.0178 | 0.0179 | 0.0236 | 0.0163 |

Type | N | LBBB | RBBB | PVC | APC |
---|---|---|---|---|---|

normal beat (N) | 200 | 0 | 0 | 0 | 0 |

left bundle branch block beat (LBBB) | 0 | 198 | 0 | 2 | 0 |

right bundle branch block beat (RBBB) | 0 | 0 | 200 | 0 | 0 |

premature ventricular contraction (PVC) | 0 | 5 | 0 | 195 | 0 |

atrial premature beat (APC) | 3 | 0 | 0 | 1 | 96 |

**Table 3.**Statistical performance indicators of the SVM classifier: sensitivity (Se), specificity (Sp), and positive predictability (Pp).

Type | Sensitivity (Se) | Specificity (Sp) | Positive Predictability (Pp) |
---|---|---|---|

normal beat (N) | 100% | 99.57% | 98.52% |

LBBB | 99% | 99.29% | 97.54% |

RBBB | 100% | 100% | 100% |

PVC | 97.50% | 99.57% | 98.48% |

APC | 96% | 100% | 100% |

Average | 98.50% | 99.69% | 98.91% |

Accuracy(Acc) | 98.80% |

**Table 4.**The classification results based on electrocardiogram (ECG) acquisition experiment platform.

Type | N | LBBB | RBBB | PVC | APC |
---|---|---|---|---|---|

N | 195 | 2 | 0 | 1 | 2 |

LBBB | 4 | 194 | 0 | 2 | 0 |

RBBB | 0 | 0 | 199 | 1 | 0 |

PVC | 1 | 8 | 2 | 189 | 0 |

APC | 1 | 0 | 0 | 0 | 99 |

**Table 5.**The performance statistical indicators of the experiment results: sensitivity (Se) and specificity (Sp), and positive predictability (Pp).

Type | Se | Sp | Pp |
---|---|---|---|

N | 97.5% | 99.14% | 97.01% |

LBBB | 97% | 98.57% | 95.10% |

RBBB | 99.50% | 99.71% | 99% |

PVC | 94.50% | 99.43% | 97.93% |

APC | 99% | 99.75% | 98.02% |

Average | 97.50% | 99.32% | 97.41% |

Acc | 97.30% |

Methods | Classifier | Classes | Accuracy | Reference |
---|---|---|---|---|

Principal components of bispectrum features | least squares support vector machine (LSSVM) | 5 | 93.48% | Martis et al. |

Teager energy function features | neural network (NN) | 5 | 95% | Kamath |

Morphological and time features | support vector machine (SVM) | 3 | 97.14% | Zadeh et al. |

Time intervals | SVM | 5 | 95.65% | Fei |

R-R intervals | self-constructing neural fuzzy interference network (SoNFIN) | 5 | 96.4% | Liu |

The multi-domain features | a library for SVM (LIBSVM) | 5 | 98.8% | Proposed method |

© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Li, H.; Yuan, D.; Wang, Y.; Cui, D.; Cao, L. Arrhythmia Classification Based on Multi-Domain Feature Extraction for an ECG Recognition System. *Sensors* **2016**, *16*, 1744.
https://doi.org/10.3390/s16101744

**AMA Style**

Li H, Yuan D, Wang Y, Cui D, Cao L. Arrhythmia Classification Based on Multi-Domain Feature Extraction for an ECG Recognition System. *Sensors*. 2016; 16(10):1744.
https://doi.org/10.3390/s16101744

**Chicago/Turabian Style**

Li, Hongqiang, Danyang Yuan, Youxi Wang, Dianyin Cui, and Lu Cao. 2016. "Arrhythmia Classification Based on Multi-Domain Feature Extraction for an ECG Recognition System" *Sensors* 16, no. 10: 1744.
https://doi.org/10.3390/s16101744