2nd International Conference on Electrical and Information Technologies ICEIT’2016
ECG Signals Classification Using MFCC Coefficients and ANN Classifier Mohamed Boussaa, Issam Atouf, Mohamed Atibi, Abdellatif Bennis LTI Lab. Faculty of Science Ben M’sik University HASSAN II Casablanca, Morocco
[email protected],
[email protected],
[email protected],
[email protected] Abstract—recently, the detection of cardiac pathologies from the electrocardiogram, i.e. recording the electrical activity of the heart muscle, requires the use of more accurate tools for signal processing and decision making. In this context, this paper presents the design of a cardiac pathologies detection system with high precision of calculation and decision, which consists of the Mel Frequency Coefficient Cepstrum algorithms like fingerprint extractor (or features) of the cardiac signal and the algorithms of artificial neural network multilayer perceptron type multilayer perceptron classifier as fingerprints extracted into two classes: normal or abnormal. The design and testing of the proposed system are performed on two types of data extracted from the MIT-BIH database: a learning base containing labeled data (electrocardiogram normal and diseased) and another test base containing non- labeled data. The experimental results have shown that the proposed system combines between the respective advantages of the descriptor Mel Frequency Cepstrum Coefficient and the Multilayer Perceptron classifier. Keywords— Classification, electrocardiogram signals, Mel Frequency Cepstrum Coefficient, artificial neuron networks, MIT BIH database.
I. INTRODUCTION The heart is a muscular organ that allows the flow of blood to the blood vessels and body cavities. It is the largest imperative organ in the human body. This organ is susceptible to pathologies called heart diseases that can cause heart attacks and death. To determine these heart diseases and abnormalities, doctors use electrocardiograms ECG signals. The electrocardiogram ECG is the recording of the variation of bioelectric potentials versus time of human heartbeats. The ECG is a powerful diagnostic tool for heart disease, which can provide accurate information on the functional aspects of the heart and cardiovascular system [1]. The ECG signal is formed by a set of wave such as the Pwave representing the atrial depolarization, the QRS wave which represents the depolarization of the ventricles, and the Twave which represents the depolarization of the ventricles [2]. The QT interval is the most important region for the detection of the abnormality, each change that affects these characteristics represents a cardiac abnormality [3]. The analysis and identification of cardiac abnormalities from the ECG paper by the traditional techniques of visual analysis, presents a difficult and complex task for physicians.
[4], which leads to the appearance of intelligent computer systems called medical assistance systems. In doing so, the study of medical assistance systems is an area that requires the use of very advanced techniques and algorithms for image and signal processing. The main problem in the treatment of ECG signals is the recognition of abnormal rhythms and improving the accuracy of the recognition signal [5]. This paper discusses in detail the combination of two algorithms; an extraction algorithm ECG signal characteristics that is the mel-frequency cepstrum coefficient, and other classification or detection algorithm capable of detecting cardiac abnormalities such as tachycardia, bradycardia, etc ..., which is the network of [6] artificial neuron. This document presents a set of contributions, namely, firstly, the use of the descriptor based on a powerful signal processing algorithm which is mel-frequency cepstrumcoefficient; then the use of artificial neural network perceptron multilayer classifier such as cardiac signals according to their characteristics from the MFCC descriptor. And finally, the chosen performance criteria that have yielded more than satisfactory results in terms of robustness (detection rate) and speed. The paper is structured as follows; after an introduction, Section 2 presents the earlier work done in this area. Section 3 describes the various components of the algorithm of the proposed system. Section 4 presents the details of the test and its results, and finally the last section is devoted to the conclusion. II.
RELATED WORK
Several approaches for implementing signal processing algorithms and learning have been presented in the literature for making decisions on electrocardiogram signals or detecting cardiac abnormalities. [7] In his article, presented an ECG identification system; this system is based on the combination of the performance of three algorithms for the characterization of ECG signals, features AC / DCT, the MFCC and display information on the QRS interval. The proposed system was able to achieve a high recognition rate.
978-1-4673-8469-8/16/$31.00 ©2016 IEEE
2nd International Conference on Electrical and Information Technologies ICEIT’2016
[5] found interesting results in terms of accuracy, combining between the performance of mel-frequency-ceptrum algorithms coefficient as the PCG signal and descriptor-vector machine classifier support. Classifying PCG by this system has achieved a 100% accuracy. [2] has presented an ECG classification system; this system is based on the combination of 3 signal processing algorithms and a classification algorithm. Signal processing algorithms are used to extract the ECG signal characteristics based on the linear prediction coefficients of the algorithm (LPC), linear prediction cepstrum coefficient (LPCC) and Mel-frequencyCepstral Coefficient (MFCC). And the classification algorithm based on the vector machines SVM support. The proposed system was able to classify the ECG signals (normal and abnormal) with an accuracy of 94%.
Fig. 2. Abnormal ECG
In the classification phase, the artificial neural network receives at its input a feature vector extracted by the MFCC algorithm representing the ECG signal to be processed, to determine whether the ECG is normal or abnormal. The following diagram illustrates the overall system of classification of ECG “Fig. 3”.
[1] has presented in his article an analysis of phonocardiograms PCG signal system. This system is based on the application of powerful and advanced signal processing algorithms like FFT and MFCC. This has led to interesting results. [8] obtained interesting results in terms of accuracy and execution time, combining between performance algorithms analyzing quartermaster and wavelets and artificial neural networks by acting on the number of multilayer perceptron node . The classification of ECG by this system has achieved an accuracy of 96%. And [9] the author has proposed an algorithm description of the ECG signal in order to make a classification of cardiac signals. The algorithm named tunable Q-wavelet transform (TQWT) and combined with a SVM classifier to give a decision on the status of cardiac signals. III.
CLASSIFICATION OF ECG SYSTEM
This section describes the classification system of heart defects, which consists of two essential parts: • Feature extraction for learning. • The feature extraction for classification (decision making). The learning phase consists primarily of extracting the ECG signals of the feature vectors of the MIT database BIH [10] using Mel-Frequency Cepstrum Coefficient-algorithm. The artificial neural network takes the base formed by these vectors to train to adjust its synaptic weights.
Fig. 3. The overall system of classification of ECG
A. Mel Frequency-Cepstrum Coefficient The mel-frequency cepstral coefficient-is a linear representation of the cosine transforms of a short duration of logarithmic power spectrum of the speech signal on a nonlinear scale Mel frequency [11]. It is a powerful algorithm signal processing which is widely used in the field of the vocal recognition. The advantage of the extraction of MFCC parameters is that all the features of the speech signal is concentrated in the first coefficients, which facilitates the extraction task for operations in clustering algorithms or voice recognition [12] . The MFCC characteristics are similar to the cepstrum analysis using the Mel scale that approximates the response of the frequency bands of the human auditory system [13].
Fig. 1. Normal ECG
Fig. 4. The overall figure of MFCC calculation
2nd International Conference on Electrical and Information Technologies ICEIT’2016
The steps of calculating the MFCC features are illustrated in “Fig. 4”. First the signal is divided into equal sections called frames of a short duration (20 to 30ms). Then a hamming windowing is applied to the signal to maintain its continuity (1). The fast Fourier transform (FFT) is applied to the sampled signal to convert each frame of N samples from the time domain to the frequency domain (2) and the amplitude spectrum [13] is calculated according to (3). The following treatment allows filtering the power coefficients by a bank of filters pass type band triangular named Mel filter (4) [14]. Then, the N characteristics are calculated with the discrete cosine transform to find Mel Cepstrum coefficients [15], which is represented by the (5). Y(n) = X(n)*W(n)
(1)
With: 2 ( ) = 0.54 − 0.46 ∗ cos ( )
( ) ( )
(2)
With: =
−2 /
m = 0,………,N−1 ( ) = ln (∑
| ( )|
( ))
(3)
Where Q is the number of filter and Hi (m) is the triangular filter bank. ( ) = 2595 ∗ ln (1 +
)
(
. )
( )=∑
( )cos (
(4) )
The first step is the choice of architecture; this step consists of choosing the number of neurons in different layers to form the network [18]. The most used in the literature is the multilayer perceptron architecture MLP, which will be used in this application. It uses, besides the input and output layer, hidden layers [19]. The second step is the selection of the learning algorithm; this step allows a process of adjusting the synaptic weights between neurons that interconnect them. The most commonly used algorithm is the multilayer perceptron retro propagation algorithm (Back pro). This is an appropriate algorithm that simulates the phenomenon of learning by error. The algorithm aims to minimize the overall error in using the gradient descent method using the following equation (6) [20]. ( )= ∑
0≤n≤N−1 ( )= ∑
The use of artificial neural networks in a real world application requires three main steps:
(5)
With k is the number of MFCC coefficient. Our approach is to vary the number of MFCC to test the various filters of MFCC. This change will be the entrance of learning and classification process for the classifier Multilayer type Perceptron. B. Artificiel neuron network The field of artificial intelligence has seen a great evolution with the advent of artificial neural networks, which has offered solutions to many real-world problems in various areas. The artificial neural network is an approach that simulates the functioning of biological neurons. It has a device with many inputs and outputs [16]. It is a mathematical model that simulates two essential properties of the human brain in the treatment of information: the first property is learning from an examples base, and the second is the generalization of knowledge to examples not viewed during the learning phase [17].
( ( )−
( ))
(6)
With Dj(n) is the desired output and yj(n) is the observed output. The third step is the selection of a basis of examples. It consists of choosing the basis of examples for learning of the artificial neural network. It must be a rich database to reduce the overall error when learning by artificial neural network and increases the detection rate. The network learns the various types of cardiac ECG signals from the data set during training and applies it to (3) signals to detect cardiac abnormality. classify new ECG IV.
RESULTAT AND DISCUSSION
The data used in the learning phase and classification are acquired from the database MIT BIH. [10] MIT BIH has created a database to validate the testing of devices in the field of medical assistance. MIT BIH arrhythmia database contains records of 30 minutes for each patient. The database contains the signals of the normal “Fig. 5”and abnormal ECG “Fig. 6”. These signals are converted into signals of the same 1s interval to extract feature vectors of the same size. This also allows to differ between normal and abnormal ECG. Before testing the proposed system, it must go through a learning phase. During this phase, the system receives at its input 40 ECG signals of normal patients and ill patients. From these 40 signals, the MFCC algorithm extracts vector features that vary among MFCC (table) to build a learning base of the artificial multilayer perceptron-type neural network. The iterative process of the neural network stops by minimizing the overall error or by reaching the maximum number of iteration.
2nd International Conference on Electrical and Information Technologies ICEIT’2016
the number of neurons in the hidden layer; and the size of the MFCC feature vectors. And for each number of selected neuron and vector, a result set is extracted which gives the execution time and the correct detection rate. The following figures “Fig. 8”and “Fig. 9” illustrate the results obtained during this test performed in C ++ on PC-type platform characteristics (Intel® Core ™ i3 CPU (2,40GHZ), 4.00 GB RAM, Linux Mint):
Fig. 5. Normal ECG
Fig. 8. DC rate
Fig. 6. Abnormal ECG TABLE I.
VECTOR SIZE OF EACH MFCC NUMBER
MFCC number 8 10 12
Size of features vector 784 980 1176
After the learning phase, the weight connection between neurons (synaptic weights) is adjusted and the artificial neural network is ready to be tested. During this phase, the system receives 10 signals from the test set “Fig. 7” to evaluate their performance. These signals have the same interval 1s than learning, pass through the extraction phase of feature vectors by the MFCC algorithm. Then the artificial neural network receives a test database which consists of extracting feature vectors to classify them into two classes: normal and sick.
Fig. 9. Execution time
The experimental results shown in “Fig. 8”and “Fig. 9” show two essential points: The first point is that the ECG classification system is a robust system. This robustness is manifested through the good high detection rate that reaches 99% of good classification in cases 8 MFCC 64neurons, 10 MFCC 32 neurons and10 MFCC 96 neurons. The second point is the speed of the system. This speed permits the classification of ECG signals in an extremely short time, which gives the system the possibility of real-time use. Both figures show more satisfactory results, but the architecture that has managed to make a compromise between robustness, speed and reduce the number of entry, is one that has 8 MFCC and 64 neurons in the hidden layer. V.
Fig. 7. Test database
Performance analysis of the ECG signal classification system is done by varying a very influential parameter in the network multilayer type perceptron artificial neuron, which is
CONCLUSION
This document has presented a combination of efficient signal processing algorithms to build a decision support system for cardiologists to facilitate ECG signal classification task. This combination has exploited the robustness of the MFCC feature extraction algorithm and the power of the artificial neuron networks type perceptron multilayer. The results obtained in the tests have given a robust and quick decision support system. However, future work will examine what improvements can be made to the proposed system of classification of normal and abnormal ECG signals, to make it evolve into a system capable of classifying ECG signals
2nd International Conference on Electrical and Information Technologies ICEIT’2016
depending on the nature of the anomalies (tachycardia, bradycardia, etc ...). REFERENCES [1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10] [11]
[12]
[13]
[14]
[15]
[16] [17]
[18] [19] [20]
Jeyarani and Jaya Singh Thomas,” Feature Extraction from Heart sound signal for AnomalyDetection”, International Journal of Computer Science and Network Security, VOL.11 No.9, IEEE, September 2011. V.Rathikarani, P.Dhanalakshmi, Automatic Classification of ECG signal for Identifying Arrhythmia, International Journal of Advanced Research in Computer Science and Software Engineering, Volume 3, Issue 9, September 2013. Abhinav-Vishwa MK, Lal SD, Vardwaj P. Clasification of arrhythmic ECG data using machine learning techniques. International Journal of Interactive Multimedia and Artificial Intelligence; 2011; 1(4). SerkanKiranyaz, TurkerInce, JenniPulkkinen, MoncefGabbouj, Personalized long-term ECG classification: A systematic approach in Expert Systems with Applications, 38 (2011) 3220–3226. BehnamFarzam,JalilShirazi, The Diagnosis of Heart Diseases Based on PCG Signals using MFCC Coefficients and SVM Classifier, International Journal of Innovative Science, Engineering & Technology, Vol. 1 Issue 10, December 2014. Sibanda, W., & Pretorius, P. (2011). Novel Application of Multi-Layer Perceptrons (MLP) Neural Networks to Model HIV in SouthAfrica using Seroprevalence Data from Antenatal Clinics. International Journal of Computer Applications, 35. Gurkan, H., Guz, U., &Yarman, B. S. (2013, July). A novel biometric authentication approach using electrocardiogram signals. In Engineering in Medicine and Biology Society (EMBC), 2013 35th Annual International Conference of the IEEE (pp. 4259-4262). IEEE. Dokur Z, Ölmez T. ECG beat classification by a novel hybrid neural network. Computer methods and programs in biomedicine; 2001; 66(2), 167-181. Patidar, S., &Pachori, R. B. (2014). Classification of cardiac sound signals using constrained tunable-Q wavelet transform. Expert Systems with Applications, 41(16), 7161-7170. Moody GB, Mark RG. The impact of the MIT-BIH Arrhythmia Database. IEEE Eng in Med and Biol 20(3):45-50 (May-June 2001). Lalitha, S., Geyasruti, D., Narayanan, R., &Shravani, M. (2015). Emotion Detection Using MFCC and Cepstrum Features. Procedia Computer Science, 70, 29-35. K.V.Krishna Kishore, P. Krishna Satish “Emotion Recognition in Speech using MFCC and Wavelet Features”,3rd IEEE InternationalAdvance Computing Conference. Ai, O. C., Hariharan, M., Yaacob, S., &Chee, L. S. (2012). Classification of speech dysfluencies with MFCC and LPCC features. Expert Systems with Applications, 39(2), 2157-2165. Dhanalakshmi, P., Palanivel, S., &Ramalingam, V. (2009). Classification of audio signals using SVM and RBFNN. Expert systems with applications, 36(3), 6069-6075. Xie, C., Cao, X., & He, L. (2012). Algorithm of Abnormal Audio Recognition Based on Improved MFCC. Procedia Engineering, 29, 731737. Yadav, J. S., Yadav, M., & Jain, A. (2014). Artificial neural network. International Journal Of Scientific Research And Education, 1(06). MOHAMED, B., ISSAM, A., MOHAMED, A., & ABDELLATIF, B. (2015).COMPARISON OF HARDWARE AND NIOS II BASEDSOFTWARE IMPLEMENTATION OF MLP ON THE FPGA PLATEFORM.Journal of Theoretical & Applied Information Technology, 72(3). Safi, Y., &Bouroumi, A. (2013). Prediction of forest fires using artificial neural networks. Applied Mathematical Sciences, 7(6), 271-286. Shende S, Patel R. Review of Face Detection using PCA and ANN Techniques. ATIBI, M., ATOUF, I., BOUSSAA, M., & BENNIS, A. Parallel and Mixed Hardware Implementation of Artificial Neuron Network on the FPGA Platform.