Você está na página 1de 5

International Conference on Computing and Control Engineering (ICCCE 2012), 12 & 13 April, 2012

Patient Adaptive ECG Beat Classifier using Repetition Detection Approach Enhanced by Neural Networks Jenisha.J.Hannah and Suja Priyadharsini
Abstract---Automated electrocardiogram (ECG) signal processing and accurate beat classification is of high need in clinical applications. A repetition detection approach is employed to create an adaptive profile for each person according to his cardiac behaviour. Heart arrhythmia are characterised by variations in the heart rate and irregularity. The key novelty of this approach is twofold. A technique using wavelet analysis with adaptive thresholding is employed to accurately extract the QRS complexes of an ECG signal. Next the patient adaptive profiling scheme is implemented to derive the cardiac profile specific to an individual. As ECG morphologies vary from person to person and from conditions to conditions an adaptive ECG profile is very much needed. This technique clearly identifies a normal region for a person and can thus identify abnormal beats that fall outside this region. The multilayer perceptron back propagation neural network is then combined which acts as a global classifier for enhanced classification performance. Keywords---Electrocardiogram (ECG), repetition detection, wavelet, adaptive ECG profile, neural network. I. INTRODUCTION

Fig 1.ECG waveform

ARDIAC arrhythmia is a heart disease which is characterised by the irregularity in the heart beat. Electrocardiography (ECG) is a non-invasive procedure which gives an interpretation of the electrical activity of the heart over a period of time.ECG is used to measure the rate and regularity of heartbeats as well as the size and position of the chambers, the presence of any damage to the heart, and the effects of drugs or devices used to regulate the heart. To acquire the signal, ECG devices with varying number of electrodes (312) can be used. Generally the recorded ECG signal is often contaminated by different types of noises and artifacts that can be within the frequency band of ECG signal, which may change the characteristics of ECG signal. In some cases, the desired signal is so drastically masked by noise that its presence can only be revealed once appropriate signal processing and noise suppression has been performed. Different kinds of noise include baseline wandering, electromyogram (EMG) noise, motion artifacts, power line interference, and electrode pop or contact noise. ECG pre-processing generally takes care of denoising the ECG signal. Power line interferences contains 60 Hz pickup (in U.S.) or 50 Hz pickup (in India) because of improper grounding. Its frequency content is 60 Hz/50 Hz. Base-line drift may be caused in chest-lead ECG signals by coughing or breathing, or when an arm or leg is moved in the case of limb-lead ECG acquisition with frequency below 0.5 Hz.
Jenisha.J.Hannah, PG student, Anna University of Technology Tirunelveli. E-Mail: address-jens.2510@gmail.com Suja Priyadharsini, Assistant professor, Anna University of Technology Tirunelveli

Other than these two noise elements, the remaining is wideband noises which also distort the ECG signal and affect the analysis. Usually, the ECG signal acquisition hardware can remove the power-line interference, but the baseline wandering and other wideband noises can only be removed by some software schemes. Accurate detection of ECG beat is the key requirement of detecting all types of heart diseases. Many commercial tools are available for automatic beat detection, but their performance is not satisfactory when high accuracy is required. The software application tool LabVIEW graphical programming language is used to denoise the ECG signal and aid in the beat detection. Wavelet transforms is used to increase the SNR of the signal for efficient beat detection. Many commercial tools are available for automatic beat detection, but their performance is not satisfactory since ECG morphologies pretty much vary from person to person, as well as condition to condition for the same person. Several techniques such as maximum likelihood, (artificial) neural networks, and support vector machines, have been introduced for the ECG beat classification. These machine learning techniques map new data instances based on the information extracted from the annotated training data in the learning phase. Most techniques provide a global classifier that may not be always accurate for patient-specific cardiac variations. The main idea behind the adaptive profiling scheme is to consider ECG waveforms as data-packet streams and apply packet-processing techniques, namely, repetition-detection approaches to derive certain ECG patterns specific to a patient. The QRS complexes of an ECG signal are accurately extracted by a technique that uses wavelet analysis with adaptive thresholding. This technique clearly identifies a normal region for a person and can, thus, identify abnormal beats that fall outside this normal region. II. RELATED WORKS J. Pan and W.J.Tompkins (1985),[2] proposed a real time algorithm for detection for QRS complexes of ECG signal based on digital analysis of slope, amplitude and width. Pan and Tompkins detected the fiducial points by finding the

ISBN 978-1-4675-2248-9 2012 Published by Coimbatore Institute of Information Technology

International Conference on Computing and Control Engineering (ICCCE 2012), 12 & 13 April, 2012 highest squared slope. A special band pass filter is used which reduces false detections caused by various types of interference present in ECG signal. The algorithm automatically adjusts thresholds and parameters periodically to adapt to ECG changes like QRS morphology and heart beat interval features. The main drawback of these algorithms using nonlinear filtering is the frequency variation in QRS complexes which greatly affects their performance. To overcome this wavelet transforms can be used which uses a linear operation, which makes it suitable to preserve the important phase information of the signal. Donghui Zhang performed band width correction and denoising based on discrete wavelet transformation (DWT)[4]. The high-frequency noise was reduced by Empirical Bayes posterior median wavelet shrinkage method with level dependent and position dependent thresholding values. The level-dependent and position dependent thresholding rules were used since the noise pattern of raw ECG signal can be correlated and non-stationary. Y.H.Hu, S. Palreddy, and W. J. Tompkins proposed a system that includes a customized classifier based on brief, patient-specific ECG data[6]. It is then combined with a global classifier, which is tuned to a large ECG database of many patients, to form a Mixture of experts (MOE) classifier. MOE combines two experts: a GE and a LE. The GE represents the ECG beat classifier developed in factory. Thus, it is trained to classify all types of ECG beats present in the in-house ECG database. The LE represents a specialized ECG beat classifier, trained on a small segment of annotated ECG beats taken from the specific patient. III. METHODOLOGY The heart rate variability can be diagnosed by classifying heart beats got from ECG. During the recording process, noise affects the signal and software schemes are used for ECG signal processing and suppression of the noise sources. The ECG beats are then classified based on their features which mainly lie in their morphology. A. Preprocessing: The graphical programming language LabVIEW is used for the preprocessing of the ECG signal. LabVIEW has wavelet analysis tools that are used for ECG denoising and feature extraction. The wavelet transform is used to remove baseline wandering by eliminating the trend of the ECG signal. For ECG-signal processing LabVIEW and related toolkits are used. LabVIEW has wavelet analysis tools that are highly efficient for ECG denoising and feature extraction. The wavelet type used for discrete wavelet analysis is Symmlet 5 (sym5), because it resembles ECG signal morphologies more than any other wavelet type. Moreover, Symmlet types highly support near-symmetry properties and provide high accuracy results on ECG signals[1] . To suppress the wideband noise, the Wavelet Denoise VI module from the LabVIEW advanced signal processing toolkit is used. This LabVIEW based higher-level Express VI first decomposes the ECG signal into several sub bands by applying the wavelet transform, and then modifies each wavelet coefficient by applying a threshold or shrinkage function, and finally reconstructs the denoised signal. Undecimated wavelet transform (UWT) sym5 with single level and soft thresholding for the wavelet denoising VI block setup is used. B. Feature extraction: Precise feature extraction is required for effective beat classification. Wavelet analysis combined with adaptive thresholding is employed for feature extraction. Effective QRS detection is done by a hybrid approach of Pan and Tompkins combined with wavelet peak and valley detection using LabVIEW. Pan and Tompkins considered two adaptive thresholds and chose the highest among the two thresholds extracted from the ECG signal and then the integration of the ECG signal, whereas in this technique no integration is required as only one threshold is used there by reducing the computations. After removing the base line drift in the ECG signal and applying the wavelet denoising VI the resulting signal is with zero DC offset. WA Multiscale Peak/Valley Detection VI in LabVIEW is used to extract the peaks and valleys of the signal by multiresolution wavelet analysis. These peaks detected by this peak/valley detection VI is used for further computations. Pan and Tompkins[2] adaptive thresholding is then applied for the detection of R points. The array of peaks detected using the peak/valley detection VI are used as the signal peaks in the Pan and Tompkins algorithm. The R points are found by using adaptive thresholding using, PEAK = Maximum (Peak) NPK = Minimum (Peak) SPK = 0.125 PEAK + 0.875 SPK THR = NPK + 0.25 (SPK NPK). where `Peak is the array of peaks detected by the peak/valley detection VI. The peaks that are greater than the threshold THR are the R points by which the QRS complexes are extracted.

Fig.2 Block diagram for signal processing

C. Slope detection: In some ECG signal the T waves will be as high as R beats and can be misdetected as R points. To differentiate R peaks from T waves the slopes are found since the slope of R peaks are usually higher than that of the T waves[1]. The slope of every peak is found and compared with the average slope. Those peaks whose slope is less than that of the

ISBN 978-1-4675-2248-9 2012 Published by Coimbatore Institute of Information Technology

International Conference on Computing and Control Engineering (ICCCE 2012), 12 & 13 April, 2012 average slope are excluded from the array of peaks which are considered for further computations. Slopeavg= [ i=1no of peaks y(Peak i)-y(Peaki-1) ] / No of slopes If ((y(Peak i) - y(Peaki-1)) <Slopeavg),then F=F{Peak i}. wherey(Peak i) and y(Peak i 1) are the amplitudes of the ith peak and one sample before the ith peak. F is the set of peaks got from the LabVIEW peak and valley detection. IV. BEAT CLASSIFICATION A. Adaptive profiling: The main idea in ECG profiling is to consider the waveform as data packet streams and apply packet processing technique namely the repetition detection approach. In the case of ECG packets, there is no global pattern (with fixed waveform dimensions) for a normal ECG waveform, making the problem more complicated. The reason is that ECG is a physiological phenomenon particular to each individual, which also depends on physical condition and environment of the person. Therefore, a patient-adaptive profiling scheme is needed, similar to repetition-based pattern detection schemes, to derive a normal ECG pattern for an individual[10]. In this ECG profiling system, the data chunks chosen for frequent occurrence analysis is the time and amplitude information that lie in each QRS complex timeframe plus the time difference of the current and previous R points. The length of the data chunks, chosen is a fixed timeframe of 150 mscentered at the R point, which empirically corresponds to the largest QRS complex. Since multiple metrics are used here to quantify certain features of a heartbeat, a hash function, summation of these quantities is used to compact each instance in a single string of data. Proper normalization is also required to result in an integer hash value. Essentially, when an s point is detected in the signal, the time and amplitude of all samples corresponding to 150 ms of the ECG signal centered at the R point, and the current RR distance are all summed up to form one string (hash value)[1].. This hash result would be the signature of phase 1. In phase 2 another hash functions, the mathematical function, mod is applied to the phase 1 signature and multiple counters are used to identify frequent occurrence of these hash results in parallel. Each hash value is an index to a presumable memory/counter location. That is, the counter that the hash value points to is incremented. However, since ECG is a physiological signal, each heart beat pattern would not exactly repeat with the same pattern as it had appeared in the previous beat 25 locations are chosen to be incremented since the difference of the empirical range 92116% specified by Pan Tompkin is 25. Based on the contents of the counters a bell shaped curve would be obtained if its a normal beat. B. Multilayer perception back propagation (MLP-BP) neural network: The classification using the repetition detection approach is specific to a patient since the abnormality of the ECG is decided only by features lying in itself and not by any information extracted from the annotated training data in the learning phase. In order to increase the classification accuracythis multilayer perceptron back propagation[11] is employed. By this the new data instances are mapped with information already available during the learning phase.The Multilayer Perceptron (MLP) is one of the most widely implemented neural network topologies. The basic connectionist structure has shown in fig.3, a feed forward

Fig.3 Structure of a multilayer neural network

having single input layer, one hidden layer, and one output layer. The input layer connects the network structure to the environment and output layer give the output to the environment through output nodes. Hence the number of nodes in input layer and output layer is fixed by the problem. MLPs are normally trained with the back propagation algorithm. The back propagation rule propagates the errors through the network and allows adaptation of the hidden nodes. Two important characteristics of the multilayer perceptron are: its nonlinear processing elements (PEs) whichhave a nonlinearity (the logistic function, linear Tanh function and the hyperbolic tangent are the most widely used); and their massive interconnectivity (i.e. any element of a given layer feeds all the elements of the next layer). The multilayer perceptron is a supervised neural network that means the network is trained with the desired target response. The MLPs mainly operate with error correction learning, which means that the network output is always compared with the desired response of the system. In pattern recognition this is normally the case, since we have our input and desired data labelled. Error correction learning works in the following way: From the system response at PE i at iteration n, y i(n) , and the desired response di(n) for a given input pattern an instantaneous error e i(n) is defined by ej (n) =d j (n) y j (n) Using the theory of gradient descent learning, each weight in the network can be modified by correcting the present value of the weight with a term that is proportional to the present input and error at the weight, i.e. wij (n+1 ) = w ij(n) + i (n) x j (n) The local error i (n) can be directly computed from e i (n) at the output PE or can be computed as a weighted sum of errors at the internal PEs. The constant is called the learning rate. Lower the value of more accurately the system is trained. This procedure is called the back propagation algorithm. Back propagation computes the sensitivity of a cost functional with respect to each weight in the network, and updates each weight according to the sensitivity. The beauty of the network structure is that it can be implemented with local information and requires just a few multiplications per weight, which is very efficient. As this is a gradient descent procedure, it only uses the local information so that it can caught local minima easily. Momentum learning is an improvement to the straight gradient descent in the sense that a memory term (the past

ISBN 978-1-4675-2248-9 2012 Published by Coimbatore Institute of Information Technology

International Conference on Computing and Control Engineering (ICCCE 2012), 12 & 13 April, 2012 increment to the weight) is used to speed up and stabilize convergence. The momentum factor () normally lies between 0.1 and 0.9. The classification by using the repetition detection approach tells whether its an abnormal beat or a normal one. Multilayer perceptron back propagation gives the type of the abnormality present in the signal. V. RESULTS AND DISCUSSION A. Denoising: The noise removal of the ECG signal is carried out by the LabVIEW graphical programming language. Fig.4 shows the input ECG and after applying it to the detrending and the denoising VI the signal is as in fig.5. patterns for performance evaluation. The neural network targetoutput is set according to table 1.Table 1. ECG classes and desired neuraloutput classes ECG beat description Neural network output 1 Normal beat (N) 0 0 0 0 1 2 Supraventricular beat(S) 0 0 0 1 0 3 Ventricular beat (V) 0 0 1 0 0 4 Fusion beat(F) 0 1 0 0 0 5 Unknown beat (U) 1 0 0 0 0 The most important factor in determining whether an automatic ECG diagnosis system is successful or not is the accuracy of event detection. The accuracy of the tools depends on several factors, such as the size and quality of the training set, the efficient extracted feature set and also the parameters chosen to represent the input. The proposed method of beat detection has a sensitivity of 99.80. The MLP BP NN achieves sensitivity of 98.2% and 98.4% for SVEBs and VEBs respectively. VI. CONCLUSION The ECG beats are pre-processed by removing the baseline wandering and the wide band noises. The feature that is needed for further computation is the position of R points and therefore found by a modified Pan and Tompkins algorithm. Then with the feature extracted the patient adaptive profile is obtained by the repetition detection approach. The combination of the multilayer perceptron back propagation network with this patient adaptive profile acted as the global classifier and to classify the beats depending on its abnormality. REFERENCES
M. Faezipour, A.Saeed, S.Chandrika, Nourani, H.Minn, L.Tamil. A Patient adaptive profiling scheme for ECG beat classification,IEEETrans.Info.Tech, vo.l14, no.5, Sep.2010. [2] J. Pan and W. J. Tompkins, A real-time QRS detection algorithm,IEEE Trans. Biomed.Eng,vol. BME-32, no. 3, pp. 230 236, Mar. 1985. [3] P. de Chazal, M. ODwyer, and R. B. Reilly, Automatic classification of heart beats using ECG morphology and heartbeat interval features, IEEE Trans. Biomed. Eng., vol. 51, no. 7, pp. 11961206, Jul. 2004. [4] M. Faezipour, T. M. Tiwari, A. Saeed, M. Nourani, and L. S. Tamil,Wavelet- based denoising and beat detection of ECG signal, in Proc.IEEE-NIH Life Sci.Syst. Appl. Workshop,, Apr. 2009, pp. 100103. [5] Y. H. Hu, S. Palreddy, and W. J. Tompkins, A patient adaptive ECG beat classifier using a mixture of experts approach, IEEE Trans. Biomed.Eng., vol. 44, no. 9, pp. 891900, Sep. 1997. [6] M. H. Song, J. Lee, S. P. Cho, K. J. Lee, and S. K. Yoo, Support vector machine based arrhythmia classification using reduced features, Int. J.Control, Autom., Syst., vol. 3, no. 4, pp. 571579, Dec. 2005. [7] R. Besrour, Z. Lachiri, and N. Ellouze, ECG beat classifier using support vector machine,in Proc.3rd IEEE Int. Conf. Inf.Commun.Technol.:From Theory Appl., Apr. 2008, pp.15. [8] B. Madhusudan and J. Lockwood, Design of a system for realtime worm detection, in Proc. 12th Annu. IEEE Symp. High Perform. Interconnects, Aug. 2004, pp. 7783. [9] M. Faezipour, M. Nourani, and R. Panigrahy, A realtime worm outbreak detection system using shared counters, in Proc. 15th Annu. IEEE Symp.High Perform. Interconnects, Aug. 2007, pp. 6572. [10] T. H. Yeap, F. Johnson, and M. Rachniowski, ECG beat classification by a neural network, in Proc. Annu. Int. Conf. IEEE Engineering Medicine and Biology Society, 1990, pp. 14571458. [1]

Fig.4 Raw ECG signal

Fig.5 Denoised signal

B. Classification: The patient-adaptive profiling scheme is applied on the entire 30-min timeframe of each record in the open-source MITBIH arrhythmia database[11]. In this experiment, we have used one hash function (summation with normalized values) in the first and second phases. In general, abnormal ECG beats are reflected as distortions and humps on the tail of the bell-shaped curve. Highly distorted bell curve indicates the presence of too many irregular beats. A bellshaped curve represents the normal distribution of the content of the counters. The curve clearly depicts a normal region of the ECG beats. Any nonzero counter content that falls outside the normal region would indicate the existence of abnormal beats.

Fig.6 profiling curve of normal beat, Fig.7 profiling curve of an abnormal beat

For the classification experiments, the common part of the training dataset contains a total of 244 representative beats, including 75 from each type-N, -S, and -V beats, and all (13) type-F and (6) type-Q beats, randomly sampled from each class from the first 20 records (picked from the range 100124) of the MIT/BIH database. The patient-specific training data include the beats from the first 5 min of the corresponding patients ECG record.. The remaining beats (25 min) of 24 records, which contains pathological cases are completely new to the classifier, and are used as test

ISBN 978-1-4675-2248-9 2012 Published by Coimbatore Institute of Information Technology

International Conference on Computing and Control Engineering (ICCCE 2012), 12 & 13 April, 2012
[11] ]MIT-BIH Database distribution, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA02139,1998.http://www.physionet.org/physiobank/database/mitdb /

ISBN 978-1-4675-2248-9 2012 Published by Coimbatore Institute of Information Technology