Upcoming SlideShare
Loading in...5




This paper presents a comparison of methods for denoising the Electrocardiogram signal. The methods are applied on

This paper presents a comparison of methods for denoising the Electrocardiogram signal. The methods are applied on
MIT-BIH arrhythmia database and implemented using MATLAB software.



Total Views
Views on SlideShare
Embed Views



1 Embed 6 6



Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment


  • ICRTEDC-2014 28 Vol. 1, Spl. Issue 2 (May, 2014) e-ISSN: 1694-2310 | p-ISSN: 1694-2426 GV/ICRTEDC/07 DENOISING OF ECG SIGNAL USING FILTERS AND WAVELET TRANSFORM 1 Inderbir Kaur, 2 Rajni 1,2 Electronics and Communication Engineering, SBSSTC, Ferozepur, Punjab 1, 2 Abstract—Electrocardiogram is a nonstationary signal and is used for heart diagnosis. It contains important information but often gets contaminated by different types of noises. Hence it is needed to denoise the signal. This paper presents a comparison of methods for denoising the Electrocardiogram signal. The methods are applied on MIT-BIH arrhythmia database and implemented using MATLAB software. Index Terms—Electrocardiogram (ECG), Wavelet transforms. I. INTRODUCTION The heart’s electrical activity is recorded by the popular tool Electrocardiogram [1]. Electrocardiography is an essential part of cardiovascular assessment. It is a fundamental tool for detecting any irregularities present in ECG. These abnormalities are termed as cardiac arrhythmias [2]. ECG is represented by the repeated process of depolarization and repolarization of cardiac cells. This repeated process forms the heart rhythm. The surface electrodes are placed on body of person to sense the signal [3]. The heart is the vital structure of the cardiovascular system and is positioned in the mediastinum. It is shielded by the bony structures of the sternum interiorly, the spinal column posteriorly, and the rib cage [4]. The human heart comprises of four chambers i.e., Right Atrium, Left Atrium, Right Ventricle and Left Ventricle. The upper chambers consist of the two Atria’s and the lower chambers are the two Ventricles. Under healthy condition the heart beats in a systematic manner i.e. it starts at the Right Atrium called Sino Atria (SA) node and a particular group of cells transport these electrical signals across the heart. This signal moves from the Atria to the Atrio Ventricular (AV) node. The AV node is attached to a group of fibers in Ventricles that mediate the electrical signal and transmits the impulse to all parts of the lower chamber, the Ventricles. It is made sure that the heart is functioning properly hence this path of propagation is traced accurately [5] [6]. The structure of heart is as shown in Fig 1: Figure1. Physiology of heart [7] ECG is characterized by the peaks P, Q, R, S, T and U. The QRS complex is the most important wave that is caused due to ventricular depolarization of the heart. It consists of three main points Q, R and S [8]. The functioning of upper chambers of heart i.e. the atria is represented by the P-wave and the T-wave indicates the ventricular repolarization of the heart. The normal heart rate value is 60-100 beats per minute. The rate slower than normal range is known as Bradycardia and the rate higher is known as Tachycardia [9]. The ECG waveform is shown as in Fig 2: Figure2. ECG Waveform [10] II. NOISES IN ECG SIGNAL ECG signal has a great role in diagnosis of human diseases related to heart. The main problem that occurs in ECG analysis is reduction of noise from the signals. Hence ECG signals need to be denoised for further processing of the signal [11]. ECG signal often gets contaminated by various types of noise as:  Baseline wandering  Electromyogram noise (EMG)  Motion artifact  Power line interference  Electric pop or contact noise The baseline wandering and power line interference is the most important noise and has an extreme effect on ECG signals. Baseline wandering is caused due to respiration and lies in range of 0.15 to 0.3 Hz. The other noises are wideband and complex in nature but do affect the signal. The power line interference is a narrowband noise centered at 50 or 60 Hz. It can be easily removed by the hardware used to collect ECG signals. But the other noises could not be removed by hardware but can be suppressed by software processing [12].
  • 29 ICRTEDC -2014 A. Power line Interference All electrical appliances have electromagnetic field generated inside the device that leads to generation of harmonics. These harmonics causes certain disturbances which exist inside all over the appliance. These effects can be reduced by taking proper care or by continuous viewing of the appliance. The base frequency depends on the place as 50 Hz in India. B. Electrode Contact Noise Electrodes should be placed proper contact with the patient. If the electrodes are left loose then it leads to electrode contact noise. The switching action of connection or disconnection at the input of measuring apparatus leads to generation of rapid, high amplitude artifact that declines to isoelectric line exponentially. C. Motion caused artifacts ECG signals records electrical activity of heart but does get effected by movements of patient. Motion artifacts are temporary changes which is the result of changes in the electrode-skin impedance caused due to electrode motion. The filtering of such signal is not easy and hence it leads to unrecognizable QRS complex. D. Muscle contractions In human body mill volt-level artifactual potentials is generated by muscle contraction. However the QRS beats can be recognized since these currents die out each other. But the detection rate of other waves as P, S, T and U is reduced. E. Muscle contractions It causes the drift in the iso-electric line due to respiratory movements. The respiration frequency gets added to the signal. Since the respiration frequency of a normal patient is about 0.15-0.30Hz hence the drift amplitude may be at least five times smaller than the size of a normal QRS beat [13]. III. DATABASE For ECG signal analysis is collected from Physionet MIT-BIH arrhythmia database through ATM data viewer. The signals are sampled at a frequency of 360 Hz. The signals are stored in a 212 format [14]. IV. METHODS Three different methods are used for denoising the ECG signal: A. Savitzky-Golay filter Savitzky-Golay filters smoothes the noisy data by using the method of least square fitting frame. In this method frame of noisy data is fitted onto a polynomial of given degree. The degree is the order of the polynomial and the frame size indicate the number of samples used to perform the smoothing for each data point. The Savitzky-Golay filters have an important property of peak preservation that is very useful in ECG processing [15]. B. Median filter The median filter is a nonlinear digital filtering technique, frequently used to remove noise. Denoising is the pre-processing step to enhance the results in further processing. The core concept of median filtering is that each signal entry is replaced by the median of neighboring entry. These neighboring entries are termed as window that slides over the entire signal. The median is simple to define for odd number of entries. The median is the middle value after all entries are made [16]. C. Wavelet Transform A wavelet is a small wave that has an average value zero. Wavelets play a significant role in signal denoising [17]. The wavelet transform is a time-scale representation that is widely used in various applications such as signal compression. Nowadays it has been used in areas of electro cardiology for detection of ECG characteristic points [18]. The signal is studied as a combination of sum of product of wavelet coefficients and the mother wavelet in wavelet transform. As visible from the Fig 3 the signal is passed through a chain of low and high pass filters in discrete wavelet transform (DWT). It leads to set of approximate (ca) and detail (cd) coefficients respectively. The down arrow and up arrow in figure represents the downsampling and up sampling. This sampling up and down leads to a change in scale [19]. Figure3. Wavelet hierarchy for 2-level decomposition. The WT of a signal x (t) is defined as [20]: (1) V. METHODOLOGY  Noise generation and addition The first step is to generate random noise and then add it to the original signal. It is shown as: m = y + n; (2) where y= original signal n= random noise  Then the baseline drift is removed by the smooth filter.  Then denoising is done first by Savitzky-Golay filter of polynomial order 2 and frame size 15.  Then secondly median filter is applied.  Then wavelet transform method is applied. o In case of wavelet transform first the signal is decomposed at level of 10. o Then the thresholding is applied.  Then the evaluation parameters SNR, MSE, PRD are calculated for the three methods. VI. EVALUATION MEASURES The denoising methods are evaluated using the parameters given below:  Signal to noise ratio (SNR) in db: x (n) =original signal y (n) =denoised signal (3)
  • ICRTEDC-2014 30  Mean square error (MSE) (4)  Percent Root Mean Square Difference (PRD) (5) VII. RESULTS The methods applied on MIT-BIH arrhythmia data taken from Physionet. The samples used are 100,103,113,114,115 in text form. The table below contains the performance measures used i.e. SNR, PRD and MSE. The results show the denoised waveforms of sample 103 with the used methods. All the processing is done on MATLAB software. The resulting waveform of all the methods is shown below: 0 500 1000 1500 2000 2500 3000 3500 4000 -0.5 0 0.5 1 1.5 2 denoised signal time amplitude Figure4. Denoised signal with Savitzky-Golay filter 0 500 1000 1500 2000 2500 3000 3500 4000 -0.5 0 0.5 1 1.5 2 denoised signal1 time amplitude Figure5. Denoised signal with Median filter 0 500 1000 1500 2000 2500 3000 3500 4000 -0.5 0 0.5 1 1.5 2 2.5 denoised signal time amplitude Figure6. Denoised signal with wavelet transform The performance measures in tabulated form are shown as: TABLE I. PERFORMANCE MEASURES SA MP LE Savitzky-Golay filter Median filter Wavelet transform SNR MSE PRD SNR MS E PR D SNR MS E PR D 100 8.84 96 0.105 3 40 8.64 79 0.10 42 39. 7 11.4 042 0.10 43 39. 7 103 12.7 074 0.062 0 20.4 4 12.2 722 0.06 17 20. 32 14.3 648 0.06 10 20. 10 113 3.47 19 0.113 5 23.5 1 3.43 18 0.11 23 23. 26 3.97 13 0.11 01 22. 81 114 10.8 366 0.009 1 5.32 10.5 075 0.00 94 5.5 3 11.4 457 0.00 83 4.8 8 115 7.82 31 0.244 2 38.0 4 7.45 56 0.24 41 38. 02 9.39 06 0.24 21 37. 71 0 2 4 6 8 10 12 14 16 100 103 113 114 115 Sgolay filter Median filter Wavelet transform Figure7. Signal to Noise Ratio (SNR)
  • 31 ICRTEDC -2014 0 0.05 0.1 0.15 0.2 0.25 0.3 100 103 113 114 115 Sgolay filter Median filter Wavelet transform Figure8. Mean Square Error (MSE) 0 5 10 15 20 25 30 35 40 45 100 103 113 114 115 Sgolay filter Medain filter Wavelet transform Figure9. Percentage Root Mean Square Difference (PRD) VIII. CONCLUSION This paper presents three techniques for denoising of ECG signal. Simulated results shown in table reveal higher SNR, lower PRD and lower MSE for Wavelet Transform. It shows that this technique is preferred over other techniques for denoising of signal. REFERENCES [1] Gaurav Jaswal, Rajan Parmar, & Amit Kaul, “QRS detection using Wavelet transform”, International Journal of Engineering and Advanced Technology (IJEAT), vol. 1, pp 1-5, 2012. [2] Francis Morris, June Edhouse, William J Brady & John Camm, ABC of Clinical Electrocardiography, BMJ Books, 2003. [3] B.Priyadarshini, R.K. Ranjan & Rajeev Arya, “Determining ECG characteristics using wavelet transforms”, International Journal of Engineering Research and Technology (IJERT), vol. 1,pp 1-7, 2012. [4] Shirley A. Jones, ECG notes: Interpretation and management guide, FA Davis Company, 2005. [5] Nagendra H, S. Mukherjee & Vinod Kumar, “Application of Wavelet Techniques in ECG Signal Processing: An Overview”, International Journal of Engineering Science and Technology (IJEST), vol. 3, pp 7432-7443, 2011. [6] Rajni & Inderbir Kaur, “Electrocardiogram Signal Analysis- An Overview”, International Journal of Computer applications (IJCA), vol. 84, pp 22-25, 2013. [7] Ashwini V. Kulkarni & H. T. Patil, “Determination of Bradycardia & Tachycardia from ECG signal using Wavelet Transform”, International Journal of Electronics Signals and Systems (IJESS), vol.1, pp 68-73, 2012. [8] P.Sasikala, Dr. R.S.D Wahidabanu, “Robust R Peak and QRS detection in Electrocardiogram using Wavelet Transform”, International Journal of Advanced Computer Science and Applications (IJACSA), vol. 1,pp 48-53, 2010. [9] Rajiv Ranjan & V.K Giri, “A Unified Approach of ECG Signal Analysis”, International Journal of Soft Computing and Engineering (IJSCE), vol. 2, pp5-10, 2012. [10] Rodrigo V. Andreão, Bernadette Dorizzi, & Jérôme Boudy, “ECG Signal Analysis Through Hidden Markov Models”, IEEE Transactions on Biomedical Engineering, vol. 53,pp 1541-1549, 2006. [11] Galya Georgieva-Tsaneva, Krassimir Tcheshmedjiev, “Denoising of Electrocardiogram Data with Methods of Wavelet Transform”, International Conference on Computer Systems and Technologies, pp 9 – 16, 2013. [12] Miad Faezipour, Adnan Saeed, Suma Chandrika Bulusu, Mehrdad Nourani, Hlaing Minn & Lakshman Tamil, “A Patient-Adaptive Profiling Scheme for ECG Beat Classification”, IEEE Transactions on Information Technology in Biomedicine, Vol. 14, 2010. [13] Arun Navaria & Dr. Neelu Jain, “Denoising and Feature Extraction of ECG using Discrete Wavelet transform”, International Journal of Emerging Technologies in Computational and Applied Sciences (IJETCAS), pp 222- 226 2013. [14] [15] Nidhi Rastogi & Rajesh Mehra, “Analysis of Savitzky- Golay Filter for baseline wander cancellation in ECG using Wavelets”, International Journal of Engineering Sciences & Emerging Technologies (IJESET), vol.6, pp 15-23, 2013. [16] Vidya M J, & Shruthi Sadasiv, “A Comparative Study On Removal Of Noise In ECG Signal Using Different Filters”, International journal of innovative research and development (IJIRD), vol.2, pp 915-927, 2013. [17] Md.Tarek Uz Zaman, Delower Hossain, Md.Taslim Arefin, Md.Azizur Rahman, Syed Nahidul Islam & Dr. A.K.M Fazlul Haque, “Comparative Analysis of Denoising on ECG signal”, International Journal of Emerging Technology and Advanced Engineering ,(IJETAE),vol. 2, pp 479-486, 2012. [18] P.Sasikala & Dr. R.S.D. Wahidabanu, “Extraction of P wave and T wave in Electrocardiogram using wavelet transform”, International Journal of Computer Science and Information Technologies (IJCSIT),vol. 2, pp 489-493, 2011. [19] Md. Ashfanoor Kabir & Celia Shahnaz, “Denoising of ECG signals based on noise reduction algorithms in EMD and wavelet domains”, Biomedical Signal Processing and Control, Elsevier, pp 481-489, 2012. [20] Domenico Labate, Fabio La Foresta, Gianluigi Occhiuto, Francesco Carlo Morabito, Aime Lay-Ekuakille & Patrizia Vergallo, “Empirical Mode Decomposition vs. Wavelet Decomposition for the Extraction of Respiratory signal from single-Channel ECG: A Comparison”, IEEE Sensors Journal , vol.13, pp 2666-2674, 2013.