This paper aims at bringing a scientific contribution to the cardiac arrhythmia biomedical diagnosis systems; more precisely to the study of the amelioration of cardiac arrhythmia classification performance using artificial neural network, adaptive neuro-fuzzy and fuzzy inference systems classifiers. The purpose of this amelioration is to enable cardiologists to make reliable diagnosis through automatic cardiac arrhythmia analyzes and classifications based on high confidence classifiers. In this study, six classes of the most commonly encountered arrhythmias are considered: the Right Bundle Branch Block, the Left Bundle Branch Block, the Ventricular Extrasystole, the Auricular Extrasystole, the Atrial Fibrillation and the Normal Cardiac rate beat. From the electrocardiogram (ECG) extracted parameters, we constructed a matrix (360 × 360) serving as an input data sample for the classifiers based on neural networks and a matrix (1 × 6) for the classifier based on fuzzy logic. By varying three parameters (the quality of the neural network learning, the data size and the quality of the input parameters) the automatic classification permitted us to obtain the following performances: in terms of correct classification rate, 83.6% was obtained using the fuzzy logic based classifier, 99.7% using the neural network based classifier and 99.8% for the adaptive neuro-fuzzy based classifier. These results are based on signals containing at least 360 cardiac cycles. Based on the comparative analysis of the aforementioned three arrhythmia classifiers, the classifiers based on neural networks exhibit a better performance.

Adaptive neuro-fuzzy, Artificial neural network, Cardiac arrhythmias, Fuzzy inference systems

The rapid evolution of heart diseases is increasingly becoming a major health challenge in the world today. This is demonstrated by the high and increasing mortality rate resulting from heart related diseases [1]. In efforts to diagnose these diseases, cardiologists face diverse difficulties in showing a reliable diagnosis of patients suffering from cardiac arrhythmias. They are hindered by the presence of noises that disturb the phase and amplitude characteristics of the signal. These noises come from processes other than heart muscles. They are of physiological and environmental origin [2]. In the last decade, different groups of researchers in an attempt to solve the problem have worked on automatic classification methods in order to obtain a reliable diagnosis. Some groups have worked on fuzzy logic and genetic algorithm [3-5]. This consists of defining input data for the classifier: A single-sided matrix 1 × n, a sample of data extracted from the arrhythmia characteristic parameters. The output of the classifier is made of different classes of arrhythmias. Others have worked on the neural network method and fuzzy logic [6-9]. This consists of defining the input data for the classifier: A matrix nxn, a sample of data extracted from the arrhythmia characteristic parameters. The output of the classifier is made of different classes of arrhythmias. More so others have worked on the Markov model [10]. Here, the input data samples of the classifier are converted to character sequences. Recently, some researchers like Ersoy and Hekim, Rajdeepa, and Bokde have respectively worked on the methods of neural networks, adaptive neuro-fuzzy and fuzzy logic for the classification of ECG signals [11-13]. Just like their predecessors, they obtained results that are not yet satisfactory to allow the integration of algorithms in embedded systems that can be used by clinics and hospitals. They obtained respectively a general classification accuracy of the order of 96% for [11], 88.33% for [12] and 98% for [13]. From the analysis of these authors an average sensitivity order of 95.3% and specificity order of 96% was obtained. This manuscript presents a comparison of different automatic methods suitable for cardiac arrhythmias detection and classification (neural network, fuzzy logic and adaptive neuro-fuzzy). Good performance was obtained using ANN and ANFIS methods.

Materials The materials used to obtain raw ECG signals from different patients suffering from cardiac arrhythmia include: Personal Computer (LENOVO, Processor AMD E1-2100 APU with Randeon TM HD Graphics 1.00 GHz, RAM 4.00 GHz, Operating System 64 bits, processor x64); MATLAB Software version R2013a; MIT-BIH Arrhythmia Database (Online Access at physionet.org); MATLAB Graphical User Interface respectively for the Artificial Neural Network, Adaptive Neuro-Fuzzy and the Fuzzy Inference Systems; MATLAB Commands needed to access the Graphical User Interface for each system, the command "nnstart" for the Artificial Neural Network, the command "fuzzy" for the fuzzy inference system and "anfisedit" for the adaptive neuro-fuzzy system. Taking into consideration the method, it has been defined successively into the followings steps as illustrated in 1. Acquisition of the raw digitized ECG Signal; 2. Denoising of the raw digitized ECG signal; 3. Detection of the P, T waves and Q, R, S ventricular waves (QRS Complex); 4. Extraction of morphological and temporal characteristic parameters; 5. Selection of the most important characteristic parameters; 6. Cardiac Arrhythmias Classification. Acquisition of the raw digitized ECG signal The database used in the classification was obtained from the Physio Bank ATM database (MIT-BIH Arrhythmia Database) of the cardiology department of Beth Boston Hospital in Israel (accessible online at physionet.org). This database contains 48 recordings of ECG signals obtained from 47 different patients. These recordings are collected following the Wilson's unipolar precordial leads (V1, V2, V3, V4, V5 and V6). Denoising of the raw digitized ECG signal The electrocardiogram signals contain some noises and artifacts from the recording. They must be treated. The noises and artifacts degrading the ECG signals during the recording are [14]: • Variations in the baseline resulting from very low frequency ripples from bad electrode contact or patient movement. This line must be isoelectric, • Interference of the 60/50 Hz electrical network which is a high frequency noise, • Signals from muscles other heart muscles, this noise comes from the variations of potential generated within the muscular tissues, • Signals produced in the epidermis (movement), • Respiratory noise (breathing of the patient results in ECG superposition of low frequency variations). Based on this backdrop, the approach we adopted to eliminate the noises involved the use of low-pass filters followed by high-pass filters. Band pass filter The band pass filter used reduces the influence of muscle noise, 50 Hz interference, baseline wander and P-wave interference. The desirable bandwidth to maximize QRS complex energy is around 5-30 Hz. The band pass filter used is a cascading of the low pass and high pass filters [15]. The differential equation of the low pass filter is: y(nT) = 2y(nT−T)−y(nT−2T)+x(nT)−2x(nT−6T)+x(nT−12T) (1) where x (T) and y (T) are respectively the input and output signals of the filter. The differential equation of the high pass filter is: y(nT) = 32x(nT−16T)−[y(nT−T)+x(nT)−x(nT−32T)] (2) where x(T) and y(T) are respectively the input and output signals of the filter. Derivative filter After filtering, the signal is differentiated to provide information on the slope of the QRS complex. The differential equation of the differentiating filter is: y(nT) = (1/8)[−x(nT−2T)−2x(nT−T)+2x(nT+T)+x(nT+2T)] (3) Quadratic summation After differentiation of the signal, we proceed to the quadratic summation point by point according to: y(nT) = [x(nT)]2 (4) This function allows us to have positive data point. Threshold After the quadratic summation process, an appropriate threshold is selected to successfully determine the QRS complex. The threshold is chosen so as not to lose any parameters of the QRS complex of the ECG signal. The application of thresholding is possible because the amplitude of the R wave is maximum among the characteristics of the ECG signal. Detection of the QRS complex As part of our research, we used the Pan & Tompkins method with a detection rate of 99.3%, which is the best performing one. This method is presented in 5 steps: Low pass filtering, High pass filtering, Derivation, Quadratic Summation, and Thresholding. The method of Pan & Tompkins has a detection rate equal to 99.3% which consists of 5 steps: Filtering pass band, Derivation, Nonlinear transformation, Integration. Detection errors appear for particular cases (records 108,222 of the MIT-BIH database). The fuzzy logic approach Basic principle Let C = {C1 ,C2 , ……CN}, a set of classes representing possible N cardiac arrhythmias. Let X be a description or an observation made on any class of arrhythmia in the form of a real vector of M elements: X = [X1 ;X2 ;… ;XM]. Each element of X represents characteristic parameter of the ECG signal. A classifier based on the fuzzy logic approach is an application: D: RM----------------- [0,1]N (5) The result of the classification is given by: D(x) = [μ1(X) ; ... ; μN(X)] (6) Where µN (X) represents the degree of membership of X in the class Ci. FIS algorithm (1) Extraction of the temporal and morphological parameters as the amplitudes and the time interval values of the different P-QRS-T waves; (2) Selection according to the opinion of an expert or a cardiologist among the extracted parameters, the most significant characteristic parameters in the classification of a cardiac arrhythmia; (3) Construction of a single-sided matrix X (1xM) of M elements (X = [X1; X2; ....; XM]) where X1 to XM represent the above temporal parameters extracted and selected according to the cardiologist's opinion; (4) Definition of the inputs data for each cardiac arrhythmia: Means definition of matrix X = [X1; X2; ....; XM] for each arrhythmia as input data for the FIS Classifier; (5) Definition of output data: C = {C1 ,C2 , ……CN}, a set of classes representing possible N cardiac arrhythmias for the FIS Classifier; (6) Definition of the membership functions μN (X) of the input and output parameters of the system in language understandable by the system; (7) Establishment of fuzzy rules of the system from which classifications will be made. The neural network approach Basic principle The network of artificial neurons in general is a large interconnected network of a large number of computing elements or computing functions called neurons arranged in an architecture inspired by the network of biological neurons of the human brain. ANN algorithm (1) Extraction of the temporal and morphological parameters as the amplitudes and the time interval values of the different P-QRS-T waves; (2) Selection of the most significant characteristic parameters in the classification of a cardiac arrhythmia among the extracted parameters. This is done according to the opinion of an expert or a cardiologist; (3) Construction of the input sample database X = [X1; X2;..; XM]. X represents nxn matrix where X1 to XM represent the above morphological and temporal parameters extracted and selected according to the cardiologist's opinion; (4) Choice of the output sample database, C = {C1, C2, ....., CN}, a set of classes representing possible N cardiac arrhythmias for the ANN Classifier; (5) Learning of the artificial neural network via a recognized learning by down-gradient descent of the neuron network to classify the input data X = [X1; X2; .. ; XM] corresponding to the output classes C = {C1, C2, ..., CN}.The activation function used is the sigmoid function; Back propagation is the process of propagating to the inner layers the error made at the output to change the weights. The error between the desired output d (n) and the actual output x (n) is computed in terms of the quadratic sum: E(n) = 12∑ni = 1e2(n) Errors at each output neuron. The backpropagation algorithm adjusts the connection weights of the neural network so as to minimize the sum of quadratic errors on all output neurons [16]. The hybrid approach neural network and fuzzy logic This approach is a learning mechanism that uses training and learning algorithms for the neural network to find input parameters of the system based on the fuzzy logic approach.

As can be seen in Figure 2, the raw original ECG signal from annotated patient 100 of the MIT-BIH arrhythmias database shows a baseline drift presumed to be isoelectric due to wrong electrodes contacts or patient movements. In Figure 3, the blue curve represents the raw original ECG signal of the same annotated patient 100 in the MIT-BIH arrhythmias database. This blue curve shows baseline drift as in Figure 3. A MATLAB subroutine has been written to suppress this drift from the baseline due to wrong electrodes contacts or patient movement. This permits us to have the ECG signal or the red curve that is now isoelectric. The ECG signal of annotated patient 100, deprived of baseline drift, is passed through a low-pass filter which in turn reduces the influence of muscle noise. We obtain the curve of Figure 4 filtered from noises due to non-cardiac muscles or patient movement. The high pass filter in turn, at its input, takes the signal from the low pass filter and gives at its output the signal of Figure 5. That signal is reduced from the influence of the interference of the electrical network 50 Hz/60 Hz and the interference of the P wave. After the low-pass filtering and high pass successively, the ECG signal is differentiated through a derivation filter to provide the information concerning the slope of the QRS complex as seen in Figure 6. At the output of the derivation filter the signal is squared. We proceed to the quadratic sum of the signal moving from point to another. This function makes it possible to obtain positive data points as shown in the curve of Figure 7, which obviously begins at the zero ordinate. After the quadratic summation process, an appropriate threshold is selected to successfully determine the QRS complex. The threshold is chosen so as not to lose any parameters of the QRS complex of the annotated patient's ECG signal 100 as shown in Figure 8. Arrhythmias classification using fuzzy inference system classifier The ECG signal Inputs data from annotated patient 100 of MIT-BIH Arrhythmia Database have been extracted and selected from P, QRS and T waves using Pan and Tompkins QRS Complex Detection algorithm and the results are: IFuzzy = [HRVbpm PQt QRSt QTt STt PRt] IFuzzy = [69.9029 210.0000 110.0000 310.0000 310.0000 160.0000] The IFuzzy input data of the fuzzy logic-based classifier is a one-sided matrix with 6 different time parameters (the heart rate variation, the PQ, QRS, QT, ST, PR segments and time intervals of the ECG signal). These 6 parameters vary in a very precise interval previously defined by a cardiologist. The different combinations of the variations of these parameters define the different cardiac arrhythmias as shown in Figure 9, with the input data IFuzzy = [69.9029 210.0000 110.0000 310.0000 310.0000 160.0000]. That input data defines a normal heart rhythm without arrhythmia. Table 1 shows us that, six cardiac arrhythmias (Normal, Right and Left bundle branch block, Auricular and Ventricular Extrasystole, Atrial fibrillation) have been tested and classified with the FIS Classifier using 360 datasets of cardiac cycles in each case of arrhythmia. For each arrhythmia we have the accuracy rate of the FIS classifier in terms of the correct classification percentage. Se = 1−FNTP+FN−TPTP+FN (7) Sp = 1−FPTP+FP−TPTP+FP (8) Arrhythmias classification using artificial neural network classifier The same process used to extract and select parameters for the FIS classifier is also used for the ANN Classifier with the difference that now 10 morphological and temporal parameters (P, QRS, T amplitudes and time intervals) are extracted as following: I = [P_t; P_A; Q_t; Q_A; R_t; R_A;S_t;S_A;T_t; T_A] as seen in Figure 10. P_t and P_A: P Wave parameters values in terms of time and amplitude. Q_t and Q_A: Q Wave parameters values in terms of time and amplitude. R_t and R_A: R Wave parameters values in terms of time and amplitude. S_t and S_A: S Wave parameters values in terms of time and amplitude. T_t and T_A: T Wave parameters values in terms of time and amplitude. Figure 10 shows us the ANN classifier's interface to load inputs and outputs data to train and test the ANN classifier. The Inputs « I » is a 10 × 360 matrix, representing static data: 360 samples of 10 ECG parameters. The Targets « O » is a 6 × 360 matrix, representing static data: 360 samples of 10 ECG parameters. Targets « O ». These inputs and ouputs are for the six cardiac arrhythmias. Table 2 shows us the percentage of correct classification for each cardiac arrhythmia. Classification using artificial neuro-fuzzy inference system classifier Figure 11 presents ECG signal Inputs data from patient 100 of MIT-BIH Database after extraction and selection of P, QRS and T parameters based on Pan et Tompkins QRS Complex Detection algorithm.

We obtained respectively the performance results for each classifier based on fuzzy logic, neural networks and adaptive neuro-fuzzy. The following classification rates: On the basis of our research and results obtained, we can affirm according to other authors that the performance of a classifier depends on three parameters: the quality of learning, the size of the data and the parameters chosen at the input of the classifier as seen in Table 3. Where the classifiers using the artificial neural network are performing better when they have large data size while the classifier using fuzzy inference system is performing better when it uses small data size. Table 4 presents a comparative study of correct classification percentage's results of some authors. The table indicates that a majority of authors worked with a single type of arrhythmias classifier. This research on the other hand combines the above mentioned three types of cardiac arrhythmias classifiers. A comparison with previous researches was performed and promising results were found except for the fuzzy classifier. Learning quality and data size During our work and tests when we varied the parameters below it improved the quality of each classifier: FIS performs better when: o There is variation in the use of membership functions other than triangle functions, o The higher the number of fuzzy rules, the more efficient the system is; ANN performs better when: o Large Data Size is used (at least 360 cardiac cycles) o Number of hidden layers and numbers of neurons is at least 25 ANFIS performs better when: o There is variation in the use of membership functions other than triangle functions, o The higher the number of fuzzy rules, the more efficient the system is; o Large data size is used (at least 360 cardiac cycles) o Number of hidden layers and numbers of neurons is at least 25 Parameters representing the input data FIS performs better when: o There is more temporal parameters extracted with a range of values determined by a cardiologist; o Extracted parameters are used in the time domain than frequency. ANN performs better when: o There is more extracted temporal parameters; o Extracted parameters are used in the time domain than frequency. ANFIS performs better when: o There is more temporal and morphological parameters extracted; o Extracted parameters are used in the time domain than frequency.

^{th}Conférence Internationale Sciences of electronic, Technologies of Information and Télécommunications, 1-5.