International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________
_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-4 Issue-4, 2015 1
Data Driven Approach for R-Peak Detection in Electrocardiogram (ECG) Signal
1Fatima Yasmeen, 2M. A. Mallick, 3Y. U. Khan, 4Ambreen Siddiqui, 5F. A. Khan
1,2,4,5Department of Electrical and Electronics Engineering, Integral University, Lucknow U.P. India
3Department of Electrical Engineering, Aligarh Muslim University, U.P. , India
Abstract-This work is related to R- Peak detection in ECG signal. Our algorithm is based on empirical mode decomposition (EMD) which is data driven approach in which there is no need to take any assumption about data.
After decomposition we apply nonlinear transformation and adaptive thresholding. We test our algorithm on MIT- BIH arrhythmia data set. We evaluate our algorithm using available ground truth data and we got 0.21%
average error. Our algorithm performs well under noisy ECG condition also.
Index terms-Empirical Mode Decomposition, ECG signal, QRS Complex, Heart Rate Variability.
I. INTRODUCTION
Heart rate variability (HRV) analysis is useful to obtain information about irregular consecutive heartbeat intervals, and is indicator of many physiological factors and diseases. Heart rate (HR) is a non stationary signal and provides information about current condition of heart and also provides early warning signs about impending cardiac diseases. Heart rate variability analysis gives indication about heart condition and also provides early signs of many heart related diseases such as myocardial infarction, diabetic neuropathy, congestive heart failure,, depression, post-cardiac transplant etc. Continuous monitoring of ECG signals is very difficult and time consuming task.
Detection and localization of QRS complex wave is the first and important step for automatic heart rate analysis. QRS complex wave is the wave which has large change in voltage 10–20 mV [1] and its size is based on age, and gender. The voltage amplitude of QRS complex is the measure of many cardiac diseases.
Duration of occurring two consecutive QRS complex is measure of ventricle depolarize and provides information about conduction problems in the ventricles suc h as bundle branch block.
Fig 1Normal ECG waveform
To detect the QRS complex R-wave [Fig 1] peak detection is the most important job. From the knowledge of R-peak location, other components of ECG signal such as Q,S waves can also be found by considering the relative position of R-wave peak and P wave is relative to the Q wave as well as T wave is relative to the S wave.
In several decades, it is observed that many R wave detection algorithms are proposed. These detection algorithms can be divided into two categories, (1) Time domain based algorithms, and (2) Frequency domain based algorithms. In the time domain based detection algorithms [2] [3] [4] Considering that the amplitude of R-wave is high and the ECG signal is varies rapidly, R-wave can be directly detected in time domain by using detecting threshold of ECG signal with first-order or second- order derivative by using these algorithms. For real-time application time domain algorithms are often good enough but they are sensitive to interference. Thus such existing algorithms are suitable for the ECG signal without changing quickly sometimes. Frequency domain detection algorithms [5] [6] [7] In this transformation of ECG signal is obtained by linear or nonlinear transform, in which SNR is higher than original ECG signal. After that appropriate threshold detection rules can be
International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________
_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-4 Issue-4, 2015 2
applied. These transformation domains such as wavelet transform, Hilbert transform, based algorithms gives high detection rate and good robustness to interference but sometimes need more detection time.
In this work we proposed an ECG QRS complex wave detection and localization using empirical mode decomposition (EMD) based approach. In EMD signal adaptively decompose into a collection of AM–FM components. Some predefined basis functions are required to represent a signal in traditional data analysis methods, like Fourier and wavelet-based methods . The EMD does not require any a priori known basis. It is a fully data-driven mechanism that is well suited for nonlinear and non- stationary signals.
II. LITERATURE SURVEY
pal et al[8]proposed an algorithm for QRS complex detection in wavelet domain. They proposed simple coefficient selection based method for QRS complex detection. In this approach decompose ECG signal using daubechies 6 mother wavelet upto 8 levels and after that apply selective coefficient approach. This approach fails when ECG signal is to noisy because that case difficult to distinguish between noisy coefficients and actual signal coefficients. P an tao et al [9] proposed a bi-orthogonal spline based wavelet approach to detect R peak in QRS complex. In this approach wavelet coefficients computation is less but This approach fails when ECG signals amplitude is less compare to noise amplitude.
Slimane et al [10] proposed EMD based QRS complex detection approach. EMD based approach usually performs well in noisy conditions because decomposition of signals depends on data (signal) itself. In this work first decompose ECG signal into imfs and then apply non linear transformation to these imfs and finally summ all imfs. Main drawback of this approach that individual non linear transformations affects QRS complex detection as after summation noise level changes. Pal et al [11] proposed an algorithm to detect R peaks in QRS complex using EMD. They first decompose ECG signals and then use imf1, imf2 and imf3 to detect R peak. They apply windowing approach to detect Q and S point after detection of R peak. This approach have drawback they uses only imf1 to detect R peaks so many times we detect false peak in noisy conditions. Main drawback of wavelet based approaches are that we have to prior decides about wavelet types and level of decomposition due to this when different types and magnitudes of noise presents then this type of approach not performs well while EMD based approach is depends on data itself. In this work we used EMD based approach to detect QRS complex.
In our algorithm first we pre-processed the ECG signal using low pass, high pass and band pass filter to remove noise and artifacts. After that we decompose signal using EMD based decomposition and then apply single non linear transformation to detect R peak. After detection R peak we use windowing based approach to
detect Q and S wave.
III. PROPOSED ALGORITHM
We proposed an algorithm for QRS complex detection using EMD. The EMD algorithm is summarize by the following steps:
1. Start with signal x(t)
2. find all local extrema of the signal x(t)
3. Divides these extrema into maxima and minima and compute envelop (EnvMx) and the lower envelopes (EnvMn) by cubic spline lines interpolation.
4. Calculate the mean envelopes of the lower and
upper envelopes.
mean(t)=1/M(EnvMn(t)+EnvMx(t))
5. Subtract mean envelope to signal. d(t)=x(t)- mean(t)
6. If x(t) is an IMF, go to step 7, else iterate step 2 to 5 upon the signal h(t), j=j+1.
7. Extract the modes
8. Calculate the residual r(t) = x(t) - d(t)
9. If r(t) has less than 2 minima or 2 extrema, the extraction is finished, Else iterate the algorithm from step 1 upon the residual.
Fig 2 : ECG signal and different IMFs
Once we decompose signal using EMD we get IMFs, in which first IMF1 contains high frequency components.
IMF1 contains high frequency noise content also due to this QRS complex detection affects.
We calculate energy of IMF1 and if this energy is less we discard IMF1 for QRS complex detection task.In such case, the second IMF (IMF2), the third IMF (IMF3), and the fourth IMF (IMF4) are used to detect QRS complex. The steps for this algorithm are following :
1. Apply pre-processing low pass, high pass, notch
International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________
_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-4 Issue-4, 2015 3
and bass filter to remove noise artifacts.
2. Segment the ECG signal and decompose into its IMFs and residual.
3. Based on energy values decides IMF1 will use for QRS complex detection or nor the energy.
if the ratio of energy ECG signal to IMF1 < 5%
then ECG signal is noisy and IMF2, IMF3, IMF4 are the selected
IMFs; otherwise IMF1, IMF2, IMF3 are the selected IMFs.
4. After selected IMFs we apply non linear transformation as follows a. Y(t) = {x(n)*x(n- 1)}/x(n-2) Where x(n) is the IMF of signal.
5. After that we apply adaptive soft threshold method to reconstructed EMD signal.
6. Apply adaptive thresholding to detection layer(reconstructed EMD layer) detect all the
local maxima points, th
=(0.875*RA+0.125*MA) where RA represents the average value of the R wave amplitudes in the previous segment and MA represents the maximum amplitude in the current segment. These points are candidates of the main waves of the QRS complex.
7. If current RR interval is shorter than refractory period it means it has false point and if it is longer than 1.66 times, than half the threshold and find the new R peak.
8. Finally collect all R peaks.
IV. RESULTS AND ANALYSIS
In this work we are going to use publically available ECG data set Physio net (http://physionet.org/) . In this we are going to use MIT-BIH arrhythmia database.
Physio net is a large and growing archive of well- characterized digital recordings of physiologic signals and related data for use by the biomedical research community. Physionet currently includes databases of multi-parameter cardiopulmonary, neural, and other biomedical signals from healthy subjects and patients with a variety of conditions with major public health implications, including sudden cardiac death, congestive heart failure, epilepsy, gait disorders, sleep apnea, and aging.
The MIT-BIH Arrhythmia Database contains 48 half- hour excerpts of two-channel ambulatory ECG recordings, obtained from 47 subjects studied by the BIH Arrhythmia Laboratory. The recordings were digitized at 360 samples per second per channel with 11-bit resolution over a 10 mV range. Two or more cardiologists independently annotated each record;
disagreements were resolved to obtain the computer- readable reference annotations for each beat (approximately 110,000 annotations in all) included with the database.
Our algorithm performs well compared to state of art EMD based QRS complex detection proposed by tyagi et al[Table 1]. In this work we proposed an non linear transformation function which enhances the R peak amplitude and suppress noise amplitude. In this work we use only 3 IMFs which represents the signal better ways. Our thresholds are also depends on ECG signal itself. In this work we did not take any prior assumptions about noise and signal distribution.
Table 1. Results
Method Error rate
Tyagi et al 0.23%
Our approach 0.21%
V. CONCLUSIONS
In this work we proposed an EMD based algorithm for R peak detection in ECG signals. EMD does not require any prior knowledge of signal for decomposition purpose. EMD based approach performs better than other transformation based approach such as Short term fourier transform etc.
REFERENCES
[1] N. Kamaruddin, ‟et al„ (2012) "Early prediction of Cardiovascular Diseases using ECG signal:
Review," in Research and Development (SCOReD), 2012 IEEE Student Conference.
[2] G. M. Friesen,(1990) "A Comparison of the Noise Sensitivity of the Nine QRS Detection Algorithms," IEEE Transaction Biomedical Engineering, vol. 37, no. 1, pp. 85-98.
[3] J.P.Pan., (1985) "A Real-Time QRS Dection Algorithm," IEEE Transaction Biomedical Engineering, pp. 230-236,
[4] C. Xiaomeng,(2011) "A NEW real-time ECG R- wave detection algorithm," Strategic Technology (IFOST), pp. 1252- 1255.
[5] Huabin Zheng „et al‟ (2008), “Real-time QRS detection method, e-health Networking”, Applications and Services, pp. 169-170.
[6] Tao Pan, „et al‟(2010) “Detection of ECG characteristic points using Biorthogonal Spline Wavelet”, Biomedical Engineering and Informatics (BMEI), 3rd International Conference, vol. 2, pp. 858-863.
[7] CHEN S-W „et al‟ (2006) ”A real-time QRS detection method based on moving-averaging incorporating with wavelet denoising”,Comput.
Meth. Prog. Biomed, pp. 187-195.
[8] Pal, Saurabh „et al‟ (2010). "Detection of ECG characteristic points using multiresolution wavelet analysis based selective coefficient method." Measurement 43.2 255-261.
[9] Pan „et al‟ (2010) “Detection of ECG characteristic points using biorthogonal spline
International Journal of Advance Electrical and Electronics Engineering (IJAEEE)
_______________________________________________________________________________________________
_______________________________________________________________________________________________
ISSN (Print): 2278-8948, Volume-4 Issue-4, 2015 4
wavelet." Biomedical Engineering and Informatics (BMEI), 2010 3rd International Conference on. Vol. 2. IEEE.
[10] Slimane, „et al‟ (2010) "QRS complex detection using Empirical Mode Decomposition." Digital Signal Processing 20.4 :1221-1228.
[11] Pal Shovon „et al‟ (2010) "QRS complex detection using empirical mode decomposition based windowing technique."Signal Processing and nd Communications (SPCOM), 2010 International Conference on. IEEE.