Adaptive Wavelet Based Identification and Extraction of PQRST Combination in Randomly Stretching Ecg Sequence
Adaptive Wavelet Based Identification and Extraction of PQRST Combination in Randomly Stretching Ecg Sequence
One of the non-invasive methods to register the electrical Automatic detection of ECG features depends mainly
activity of heart is ECG. The changes in electrical potential on the accurate detection of R- peak. R-peak detection using
during depolarization and repolarisation of the myocardial slope- amplitude analysis [2], digital filters [3-6], difference
fibres are recorded by electrodes positioned on the surface operation method [7] and transformed domains [8] were the
of the body. The normal ECG recordings have a number of first few developed methods. Artificial Neural Networks [9,
different morphologies depending of the patient, type of the 10], Genetic Algorithm [11], Hidden Markov Model [12]
lead used for recording etc. So it is hard to build a universal and Support Vector Machines [13], Shannon energy
tool for automatic ECG analysis. Computational intelligence envelope (SEE) estimator[14] were also used for the QRS
can bring forward a number of conceptually and detection. Wavelet transform has emerged over recent years
computationally appealing methods for ECG signal as a powerful tool for de-noising and detection of QRS
processing, classification and interpretation. The non- complex.
invasive method of recording and analyzing the ECG signal For the detection of characteristic points of ECG
has made it popular as a routine part of any complete waveforms, Li et al. had introduced an algorithm based on
medical evaluation. discrete wavelet transform (DWT) [15]. Identifying the
The normal clinical features of the electrocardiogram, singularity points using Lipschitz exponent at different
which include wave amplitudes and inter-wave timings, are scales was the adapted method. Kadambe et al. also used the
shown in Fig 1. The iso-electric line on ECG is a horizontal DWT analysis using Spline wavelet as they are insensitive to
non-stationarity in the QRS complex and robust to noise out an accurate method to identify ECG characteristic points
[16]. Mahmoodabadi et al. analysed ECG signals from using adaptive wavelet.
Modified Lead II using two filters D4 and D6 and compared
their performance. In order to delineate the ECG waveform 2. RESEARCH BACKGROUND
Martínez et al. used a quadratic spline wavelet with adaptive
threshold levels [17]. Sivanarayana and Reddy have used bi- Any clinical analysis of ECG waveform starts from
orthogonal wavelet transform for ECG parameters identifying the QRS complex, its amplitude and width as
estimation [18]. Virgilio et al. detected characteristic points well as its regularity. This will be followed by P-wave and
by comparing the coefficients of the discrete WT on selected T- wave analysis, and the analysis of various intervals, P- R,
scales against fixed thresholds [19]. Romero et al. had used R-R, S-T and Q-T segments. The primary objective of any
Continuous Wavelet Modulus Maxima for R-wave detection digital analysis of ECG wave is to locate the R-peak
[20]. A relative performance analysis about the different accurately. ECG waveforms are usually contaminated by
wavelet transform analysis method for the QRS detection noise and artifacts such as power line interference, contact
was presented by Senhadji et al. [21]. noise, patient– electrode motion artifacts, electromyographic
All the attempts hitherto undoubtedly were a step noise, baseline drift etc. [1]. Accurate identification of R-
forward in accurate detection of R peak. Many of the peak and other characteristic points still remain a
methods used 4 to 6 scales of resolution to find the challenging task because of the presence of noise and the
characteristic points. Algorithm was tested with one varying morphologies of ECG waves.
database and obtained accuracy varying from 95 % to 995. Time-frequency analysis techniques of WT have been
In our study we have used a QRS-pattern adaptive wavelet applied for ECG analysis, to take advantage of the
for continuous wavelet transform analysis of ECG signals to nonstationary nature of the cardiac cycle. But most of the
bring out high accuracy R-peak detection. Once the R-peaks analysis of ECG waves were mainly carried out using DWT.
are marked other characteristic points P-Q-S-T are identified Romero et al. used CWT using Mexican hat for ECG signal
accurately in time domain analysis. time-frequency analysis. In CWT as there is no
Continuous wavelet transform (CWT) is preferable over discretization of scales, it can provide a better resolution.
DWT for signal analysis, feature extraction and detection Using a high resolution in wavelet space allows individual
tasks, for it provide a description that is truly shift invariant. maxima to be followed accurately across scales.
CWT performs a correlation analysis, so that it gives In this paper, we have overcome the difficulties
maximum when the input signal resemble to the mother experienced in the earlier works like low detection
wavelet. The continuous wavelet transform (CWT) of a sensitivity in the presence of noise, computational
signal x (t) is defined as complexity associated with the requirement to calculate
wavelet transform over many scales etc. We used CWT
(1) analysis of the ECG signal using an adaptive wavelet
where is the complex conjugate of the analysing designed for QRS complex detection. An adaptive wavelet is
wavelet function ψ(t), parameters a and b is the dilation and the best basis function designed for a given signal
location parameter of the wavelet respectively. Here x (t) is representation. There are several methods to construct
decomposed into a set of basis functions Ψ(t) called the pattern-adaptive wavelets. Bi-orthogonal method [22],
wavelets, along the new dimensions, scale and translation. Projection based methods [23], statistical method [24],
The most important properties of wavelets are the Lifting scheme [25] etc. Misiti et al. have used the method
admissibility and the regularity conditions. The admissibility of least square optimization for generating pattern adaptive
condition can be used to first analyze and then reconstruct a wavelet [26]. The principle for designing a new wavelet for
signal without loss of information. Regularity conditions CWT is to approximate a given pattern, using least squares
state that the wavelet function should have some smoothness optimization under constraints, leading to an admissible
and concentration in both time and frequency domains. In wavelet compatible for the pattern detection. In our research
other words it should have finite energy. work, we have used this method with a polynomial
Wavelet transforms can comprise an infinite set of approximation of order 4 to generate the adaptive wavelet.
possible basis functions. Primary wavelets or the adaptive Using adaptive wavelet R-peaks were detected accurately.
wavelets are used as basis functions. Most of the ECG Many of the previous studies were mainly focused on
analysis were carried out using primary wavelets such as the QRS complex detection. Abed et al. has developed an
spline, Mexican hat, Haar, Daubechies etc. As CWT algorithm to detect P, QRS and T waves. Authors have used
performs a correlation study, using a pattern adaptive Haar wavelet for QRS detection and later DB2 wavelet was
wavelet can give a better analysis. Even in the presence of used for P and T detection [27]. Chouhan and Mehta
noise an adaptive wavelet can give a better correlation. For employed a modified definition of slope of ECG signal, as
our study we developed an adaptive wavelet matching to the the feature for detection of ECG wave components [28]. For
QRS complex of a typical ECG waveform. This paper brings myocardial ischemia analysis Ranjit et al. considered WT up
to four scales and the scale 2 to 4 was used to locate T- and 108m.mat, V1 Filtering QRS and P wave
1 1
P-waves using maxima minima method [29]. In our study
0 0.5
once the R- peaks were detected using adaptive wavelet, Q-
S-P-T points were identified with high accuracy in time -1 0
-3 -1
3. RESEARCH METHODOLOGY 0 1000 2000 3000 4000 0 1000 2000 3000 4000
Amplitude
0.2
threshold value greater than 30% results in more number of Fig.6 PQRST marked ECG signal
misses in peak detection.
4. Detect the zero - crossing point between a pair of
maximum and minimum points. 4. RESULT
5. Decrease the false detections by removing peaks which
are occurring within less than 120ms. The proposed algorithm was tested on two different sets of
6. Verify second level coefficients in a similar manner and data, MIT-BIH arrhythmia database and PTB diagnostic
compare the R-peak positions to avoid false detection. database. For MIT-BIH database the sampling frequency
7. Previously rejected events are re-evaluated using a was 360Hz with 2- channels and for PTB database the
reduced threshold when a significant time has passed sampling frequency was 1 KHz with 16 channels. In both
without finding a QRS complex. For ECG signals with R_R databases it was possible to detect all the characteristic
peak variability, reducing the time limit for less than120ms peaks PQRST. For few signals (like 101 and 106 waveform
may be required. from MIT-BIH), the noise level was very high, where only R
8. From R-peak point, moving to the left and right to the detection was possible and other peaks were not
extent of 15% (of RR interval) find the first trough/peak (if distinguishable. Inverted T –waves were also detected with
R-peak is positive, find the trough, if R- peak is negative high accuracy. Cases of atrial fibrillation were not
find the peak) to locate the Q and S respectively. Q and S considered for testing as only R –peaks are present in the
points should be a point after crossing the iso-electric line. signal. Special cases of missed or merged P-waves were
Positions of P and T waves come approximately within 40% analysed separately by taking the relative positions of P, T
of RR interval from Q and S points. From Q moving to the and R-waves to avoid false P-detection.
left find the first maximum point to fix P- point and from S
moving to the right the first peak gives T point. If there is a 5. CONCLUSION
negative occurrence of T wave it is detected by comparing
the negative and positive peak within the 40% RR interval. Adaptive wavelet approach has provided an R-peak
The Fig. 6 shows an ECG wave with all these points marked. detection accuracy of 99.9% by making use of just 2 levels
2
T-wave suppressed signal of resolution. Same accuracy of detection was obtained for
both databases having different sampling rates. With the
0
effective baseline correction and noise removal, other
-2
0 500 1000 1500 2000 2500 3000 3500 4000 characteristic points viz P-Q-S-T were also detected with
2
squared waveform high accuracy.
The algorithm has not incorporated the automatic
1
detection of atrial fibrillation (AF). The research can be
0
0 500 1000 1500 2000 2500 3000 3500 4000 extended to incorporate the automatic detection of AF. The
0.5
CWT coefficients at level 1 with 30% threshold research uses currently available databases, analysing real
time signals and providing real time results will be the next
0
challenge.
-0.5
0 500 1000 1500 2000 2500 3000 3500 4000
5. REFERENCES [16] Kadambe S, Murray R and Boudreaux-Bartels G F, “Wavelet
transform-based QRS complex detector,” IEEE Trans. Biomed.
[1] Gari D. Clifford, Francisco Azuaje, Patrick E. McSharry, Eng. 46 838–48, 1999
Advanced Methods and Tools for ECG Data Analysis [17] Martin´ez JP, Almeida R, Olmos S “A Wavelet-Based ECG
[2] Jiapu Pan and Willis J. Tompkins, “A Real-Time QRS Delineator Evaluation on Standard Databases,” IEEE Trans
Detection Algorithm, IEEE Transactions on Biomedical Biomed Eng 2004; 51(4):570–581.
Engineering,” Vol. BME-32, No. 3, March 1985 [18] N. Sivannarayana, D. C. Reddy, “Biorthogonal wavelet
[3] M.L. Ahlstrom and W.J. Tompkins, “Digital filters for real time transforms ELSEVIER 1999; 21:167-174.
ECG signal processing using microprocessors,” IEEE Trans. [19] V. Di-Virgilio, C. Francaiancia, S. Lino, and S. Cerutti, “ECG
Biomed. Eng., vol. BME-32, no. 9, pp. 708-713, Sept. 1985. fiducial points detection through wavelet transform,” in 1995 IEEE
[4] G. Tremblay and A.R. LeBlanc, “Near-optimal signal Eng. Med. Biol. 17th Ann. Conf. 21st Canadian Med. Biol. Eng.
preprocessor for positive cardiac arrhythmia identification,” IEEE Conf., Montreal, Quebec, Canada, 1997, pp. 1051-1052.
Trans. on Biomed. Engg., vol.32, no.2, pp.141-151, Feb. 1985. [20] Romero Legarreta, PS Addison, N Grubb,GR Clegg, CE
[5] Q. Xue, Y.H. Hu and W.J. Tompkins, “Neural-network based Robertson, KAA Fox , JN Watson, “R-wave Detection Using
adaptive matched filtering for QRS detection,” IEEE Trans. Continuous Wavelet Modulus Maxima,” IEEE Computers in
Biomed. Eng., vol. 39, no. 4, pp. 317-329, April 1992. Cardiology 2003;30:565−568.
[6] S. Suppappola and Sun Ying, “Nonlinear transforms of ECG [21] Senhadji L, Carrault G, Bellanger J J and Passariello G
signals for digital QRS detection: a quantitative analysis,” IEEE “Comparing wavelet transforms for recognizing cardiac patterns,”
Trans. Biomed. Eng., vol. 41, pp. 397-400, April 1994. IEEE Trans. Med. Biol. 13 167–73, 1995
[7] Yun-Chi Yeha,c, Wen-June Wang, “ QRS complexes detection [22] Joseph O. Chapa and Raghuveer M. Rao “Algorithms for
for ECG signal: The Difference Operation Method,” computer Designing Wavelets to Match a Specified Signal,” IEEE
methods and programs in biomedicine ( 2008 ) 245 transactions on signal processing, vol. 48, no. 12, December 2000
[8] I.S.N. Murthy and G.S.S.D. Prasad, “Analysis of ECG from [23] Akram Aldroubi, Patrice Abry, and Michael Unser
pole-zero models,” IEEE Trans. on Biomed. Engg., vol.39,no.7, “Construction of Biorthogonal Wavelets Starting from Any Two
pp.741-751, July 1992 Multiresolutions,” IEEE transactions on signal processing, vol. 46,
[9] Hu YH, Tompkins WJ, Urrusti JL, Afonso VX., “Applications no. 4, April 1998
of artificial neural networks for ECG signal detection and [24] Gupta, A. Joshi, S.D. Prasad, S. “A new approach for
classification.,” J Electrocardiology. 1993; Suppl:66-73. estimation of statistically matched wavelet,” IEEE Transactions on
[10] Y. Suzuki, “Self-organizing QRS-wave recognition in ECG Signal Processing,vol.53 no.5 May 2005
using neural networks,” IEEE Trans. Neural Networks, vol. 6, pp. [25] Wim Sweldens , Peter schroder “Building Your Own
1469-1477, 1995. Wavelets at Home,” Technical report Industrial Mathematics
[11] R. Poli, S. Cagnoni and G. Valli, “Genetic design of optimum initiative. Department of Mathematics, University of South
linear and nonlinear QRS detectors,” IEEE Trans. Biomed. Eng., Carolina 1995.
vol. 42, no. 11, pp. 1137-1141, Nov. 1995. [26] Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi, Hermes, "Les
[12] D.A. Coast, R.M. Stern, G.G. Cano and S.A. Briller, “An ondelettes et leurs applications,” M, 2003.
Approach to Cardiac Arrhythmia Analysis Using Hidden Markov [27] Abed Al Raoof Bsoul, Soo-Yeon Ji, Kevin Ward, and Kayvan
Models,” IEEE Transactions on Biomedical Engineering, vol. 37, Najarian, “Detection of P, QRS, and T Components of ECG Using
no. 9, pp. 826-836, Sept. 1990. Wavelet Transformation,” Complex Medical Engineering, 2009
[13] Mehta SS, Lingayat NS., “Detection of QRS complexes in CME, ICME, International
electrocardiogram using support vector machine,” J Med Eng [28] V.S. Chouhan† and S.S. Mehta, “Threshold-based Detection
Technol. 2008 May-June;32(3):206-15. of P and T-wave in ECG using New Feature Signal,” IJCSNS
[14] M.Sabarimalai, Manikandana, K.P.Soman, “A novel method International Journal of Computer Science and Network security,
for detecting R-peaks in electrocardiogram(ECG) signal,” Vol.8 No.2, February 2008
Biomedical Signal Processing and Control (2011) [29] P. Ranjith, P.C. Baby, P. Joseph, “ECG analysis using
[15] Cuiwei Li, Chongxun Zheng, and Changfeng Tai, “Detection wavelet transform: Application to Myocardial Ischemia Detection,”
of ECG Characteristic Points using Wavelet Transforms,” IEEE IRBM, Elsevier Volume 24, Issue 1, February 2003, Pages 44–47.
Transactions on Biomedical Engineering, Vol. 42, No. 1, pp. 21- [30] www.physionet.org/physiobank
28, 1995.