You are on page 1of 9

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

journal homepage: www.intl.elsevierhealth.com/journals/cmpb

A real-time QRS detection method based on moving-averaging incorporating with wavelet denoising
Szi-Wen Chen a, , Hsiao-Chen Chen a , Hsiao-Lung Chan b
a b

Department of Electronic Engineering, Chang Gung University, Kwei-Shan, Tao-Yuan 333, Taiwan Department of Electrical Engineering, Chang Gung University, Kwei-Shan, Tao-Yuan 333, Taiwan

a r t i c l e
Article history:

i n f o

a b s t r a c t
In this paper, a simple moving average-based computing method for real-time QRS detection is proposed. In addition, for signal preprocessing our detection algorithm also incorporates a wavelet-based denoising procedure to effectively reduce the noise level for electrocardiogram (ECG) data. The overall computational structure of the proposed algorithm allows the QRS detection to be performed and implemented in real-time with high time- and memoryefciency. Algorithm performance was evaluated against the MIT-BIH Arrhythmia Database. The numerical results indicated that the novel algorithm nally achieved about 99.5% of the detection rate for the standard database, and also, it could function reliably even under the condition of poor signal quality in the measured ECG data. 2006 Elsevier Ireland Ltd. All rights reserved.

Received 23 August 2005 Received in revised form 21 November 2005 Accepted 26 November 2005 Keywords: Electrocardiogram (ECG) Moving average QRS detection Wavelet denoising

1.

Introduction

Electrocardiogram (ECG) is formed by continuous tracings of the electrophysiological activity emitted from cardiac muscle, thus reecting the instantaneous status of patients heart. It has been widely used by physicians for a variety of diagnostic purposes. Among all ECG components, QRS complex is the most signicant feature. For example, QRS detection provides an important basis for instantaneous heart rate (HR) computation since the accuracy of instantaneous heart period estimation relies on the performance of QRS detection [1,2]. On the other hand, it is acknowledged that QRS complex is varying with the physical variations and also affected by noise as time evolves. Therefore, seeking for a reliable QRS detection algorithm is essential to the realization of automatic ECG diagnosis. The research of QRS detection has been conducted by many researchers for over three decades. Numerous approaches to

QRS detection have been proposed previously [39]. Among these, some algorithms were developed based on digital lters in order to extract the feature components due to the QRS complex [3,4]; some were based on non-linear transforms [5,6]. In addition, some existing QRS detection algorithms employ a specic QRS template [79], which might be considered the best way to prevent the QRS detection performance from being degraded by the undesired noise sources contributed from: (1) baseline drifts, (2) artifacts due to electrode motion or power-line interference, and (3) other ECG components with similar morphologies to the QRS complex, such as P and T waves [3]. However, since the template-match technique involves intensive cross correlation-based similarity measurement between the QRS template and a number of windowed ECG segments, such a heavy computational burden might somehow undesirably restrict its use to only a limited number of aspects [10]. Fortunately, there still exist a number of different possible techniques for noise reduction, and one of the most effective approaches is based on

Corresponding author. Tel.: +886 3 2118800x5792; fax: +886 3 2118507. E-mail addresses: chensw@mail.cgu.edu.tw (S.-W. Chen); m9328201@stmail.cgu.edu.tw (H.-C. Chen); chanhl@mail.cgu.edu.tw (H.-L. Chan). 0169-2607/$ see front matter 2006 Elsevier Ireland Ltd. All rights reserved. doi:10.1016/j.cmpb.2005.11.012

188

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

2.1.

Wavelet denoising stage

Fig. 1 A block diagram of the QRS detection system.

the discrete wavelet transform (DWT) [11]. In fact, representing a signal contaminated by additive unstructured noise using DWT, one may expect that some larger DWT coefcients should mostly result from the signal components while the noise part may, in general, contribute to almost all the small-valued DWT coefcients. The fact stated above therefore leads to the idea of denoising a signal in wavelet domain. In this paper, a novel computing method devised based on simple moving average combined with wavelet-based denoising for real-time QRS detection is introduced. In this method, the DWT is computed in an efciently real-time manner using the recursive pyramid algorithm (RPA). The real-time implementation of RPA requires signicantly smaller memory storage, as compared that required by the direct computation of DWT, and thus permits a memory-efcient computational architecture of DWT. Also, the proposed method employs a simple moving average lter for extracting the QRS feature from the denoised ECG data so the number of operations, i.e. multiplications and additions, required is less than that for most of the existing algorithms, thus allowing a simple and time-efcient realization of real-time QRS detection, either in software or in hardware manners.

2.

Methodology

A schematic block diagram of the proposed QRS detecting system is as depicted in Fig. 1. In general, the overall detection process can be divided into four stages: (1) wavelet-based denoising, (2) linear highpass ltering (HPF), (3) non-linear lowpass ltering (LPF), and (4) decision-making. The task of QRS detection is performed as follows. When a raw ECG signal enters the system, it is rst preprocessed by wavelet-based denoising in a real-time fashion to reduce the unstructured noise level. Following the wavelet denoising stage, the denoised signal is then passed into a moving-averaging-based linear HPF to accentuate the QRS complex and, meanwhile, to suppress the low-frequency noise such as P and T waves. After that, in order to guarantee that the high-frequency, lowamplitude artifacts can be further smoothed down to a certain adequately low level while the QRS feature can be well preserved, the output signal of the linear HPF is next processed by a full-wave rectication and non-linear amplication followed by a sliding-window summation, thus resulting in a pulse train-like feature waveform. Together, all the operations at this stage can be actually viewed as a non-linear LPF process. Finally, an adaptive thresholding is directly applied to the feature waveform to perform decision-making for completing the task of QRS complex detection. Details of the above four signal processing stages are presented in the following subsections.

As mentioned previously, the measured ECG is mainly composed of actual cardiac activity and various noise sources such as baseline drifts, power-line interference and motion artifacts. In order to effectively enhance the QRS detection rate, rst an appropriate signal preprocessing procedure for noise reduction is demanded. Regarding this, bandpass ltering is known as one of the most common approaches applied for that purpose. On the other hand, however, such a simple ltering operation sometimes could seriously destroy sharp features in ECG such as the QRS complexes. Since few decades ago, wavelet-based methods have been widely used in biomedical signal processing. In general, wavelet transforms represent the temporal characteristics of a signal by its special components in frequency domain. It has been known that such a transform-based technique can be also used for the purpose of signal denoising. In such aspect of application, Donoho and Johnstone have developed a method called wavelet shrinkage to denoise the signal with unknown noise characteristics while the sharp features of the signal can be well preserved [12]. Since the QRS complex is an impulse-like waveform, we may speculate that using wavelet denoising technique at the prepocessing stage should be very suitable and helpful to the subsequent task of QRS detection. The procedure of wavelet denoising scheme in our study is briey described below. We perform a discrete wavelet transform (DWT) with three-level decomposition in the measured ECG signal that has been corrupted by additive noise. Suppose the noise yields small-valued wavelet coefcients while the large coefcients are composed mostly of the actual ECG signal. Therefore, throwing away the wavelet coefcients whose magnitude is less than some preset threshold should improve the signal-to-noise ratio (SNR). Here, the threshold for denoising applied to our study is dened as four times the standard deviation of the wavelet or detail coefcients over a 128-point interval at the rst dyadic level: th = 4 std(detail1 ) (1)

where detail1 denotes the wavelet coefcients at the rst level. The thresholding strategy adopted for this stage is the socalled hard thresholding. That is, denoting the ith wavelet coefcient at the jth level as wji , we have wt = ji wji , if |wji | th 0, if |wji | < th (2)

where wt represents the new value of the ith wavelet coefji cient at the jth level obtained after thresholding. Note that the thresholding scheme indicated by (2) is applied only to the detail coefcients. In addition, it should be noted that a real-time implementation of DWT is desirable in this application. In fact, direct computation of an N-point DWT, referred to as the pyramid algorithm (PA) developed by Mallat [13,14], requires O(N) storage in memory. This is actually too expensive; also, to achieve realtime wavelet denoising it is not practical for directly computing the DWT of the quasi-innite ECG signal. Therefore, here in our study a so-called recursive pyramid algorithm (RPA) is adopted for the hardware/software implementation of real-

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

189

Fig. 3 The architecture of the linear HPF in the QRS detector.

Fig. 2 Dyadic sampling grid for the DWT output wji .

where x[n] represents the input data and M is the lter length. Meanwhile, it can be seen from Fig. 3 that the input signal x[n] is also simultaneously passed through an ideal delayed 1 system with a group delay of M2 samples, resulting in y2 [n] = x n M1 2 (4)

time DWT (i.e. running DWT) computation. The RPA, known as a reformulation of the direct computation for the DWT, allows computation of the DWT in a real-time fashion using only L(J 1) cells of storage in memory, where L and J represent the length of the wavelet lter and number of octaves (i.e. levels), respectively [15,16]. In general, the RPA generates each one of all the DWT outputs over different octaves at the earliest instance that it can be scheduled. This output schedule can be obtained simply by considering the dyadic sampling grid for the DWT output wji , as illustrated in Fig. 2. For example, for J = 3 the order of the outputs generated by RPA is as shown below: w11 , w21 , w12 , w31 , w13 , w22 , w14 , . . . That is, a jth level DWT output is scheduled exactly once every 2j cycles. Moreover, with simple modications the real-time inverse DWT can also be computed [17]. Therefore, we may see that the RPA is able to provide a practical and useful solution to the realization of real-time wavelet denoising so that the task of ECG signal preprocessing may work perfectly in accordance with the subsequent stages of the real-time QRS detection.

Therefore, the overall system output y[n] is determined simply by subtracting y1 [n] from y2 [n], that is, y[n] = y2 [n] y1 [n] = x n M1 1 2 M
M 1

x[n m]
m=0

(5)

(5) then algebraically results in y[n] = 1 M3 M1 M1 1 + x[n] x n x n M M 2 M 2 1 M+1 1 x n x[n M + 1] M 2 M (6)

2.2.

Linear highpass ltering stage

At this stage, the denoised signal is passes into a linear ltering system formed by a parallel connection of an M-point moving average lter (MAF) and an ideal delayed system with a group 1 delay of M2 samples, as indicated in Fig. 3. For convenience, we rst restrict M to odd values. The MAF output is then subtracted, point-by-point, from the delayed input sample so the entire system becomes a nite impulse response (FIR) HPF with linear phase. According to Fig. 3, rst the inputoutput relation of a causal MAF can be characterized as y1 [n] = 1 M
M 1

x[n m]
m=0

(3)

Note that (6) is valid only if the lter length M is restricted to odd values. As a result, the overall system depicted in Fig. 3 becomes a type I FIR HPF with linear phase. In fact, for the purpose of a linear phase HPF realization, M is not allowed to be even values. This is because even values of M will result in a type II linear phase FIR lter and it is highly unsatisfactory, due to the zero of H(z) that is forced by the linear phase constraint to be z = 1, i.e. = , indicating there always exists a zero at the highest frequency and thus not suitable for linear phase HPF design [18]. In general, the linear HPF employed at this stage is intended to emphasize the QRS complex while suppressing the lower frequency noise sources of an ECG signal such as P and T waves, as well as the baseline wander. Therefore, selection of M should be taken into careful consideration. Actually, different values of M will result in different frequency responses of the HPF, as manifested in Fig. 4, and consequently might lead to different QRS detection performances. Considering the relative power spectra of QRS complex and PT waves, the energy associated with the former mainly concentrates over approximately 515 Hz while a majority of energy associated with the latter or baseline wander typically distributes over the frequencies less than 5 Hz. From Fig. 4 it can be seen that a smaller M (say, M = 3) might not be able to adequately emphasize the QRS complex in the ECG signal, in comparison

190

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

vations gathered from the above allow us to devise a simple scheme of thresholding for the nal decision-making stage.

2.4.

Decision-making stage

Finally, to perform the decision-making for detecting QRS complexes an adaptive thresholding scheme is applied to the feature waveform generated from the non-linear LPF stage. The thresholding scheme can be formulated as [20] if z[n] Threshold QRS complex; if z[n] < Threshold None (8)

where z[n] denotes the feature waveform and Threshold denotes the adaptive threshold. Further, the adaptive threshold incorporated into the decision rule in (8) is updated by Threshold = PEAK + (1 )Threshold Fig. 4 Frequency responses of the MAFs with various lter lengths (solid: 3-point MA, dash: 5-point MA, dot: 7-point MA, dash-dot: 9-point MA). (9)

with other cases. On the other hand, the low frequency noise sources such as P or T waves will be undesirably enhanced if M is too large (say, M = 9). In this study, we therefore suggest an appropriate selection of M value to be M = 5 or 7.

2.3.

Non-linear lowpass ltering stage

The output of the HPF is further inputted into a non-linear LPF constructed by a cascade of a simple point-by-point squaring operation and a moving window integration or summation system, as expressed by
K 1

where PEAK is the local maximum newly detected in the feature waveform and is referred to as the forgetting factor, restricted to the positive fraction numbers, that is, 0 1. According to (9) it can be seen that each new value of the threshold is determined from the running estimate of the feature signal peak as well as the prior and current values of the threshold itself. is a weighting factor used for determining the contribution of peak values to threshold adjustment. Empirically, the values of range from 0.15 to 0.2. A QRS complex is said to be detected, only if the peak level of the feature signal exceeds the threshold. The value of the threshold is then updated each time when a new QRS complex is detected. Fig. 5 shows the appearance of the output in each stage of this QRS detection algorithm.

3.

Performance evaluation and discussion

z[n] =
k=0

y2 [n k]

(7)

where K represents the summation interval and z[n] is referred to as the feature signal. As mentioned earlier in Section 2, the non-linear LPF can be alternatively viewed as a non-linear envelope detector and it produces pulse train-like feature waveforms. Moreover, the width of the moving summation window is also considered an important factor. Generally speaking, the width should be appropriately selected so the summation waveform will neither result from merging of the QRS and T waves together nor be a number of peaks produced by a single QRS complex. In fact, this width should be determined in accordance with the sampling rate of the original ECG signal. A previous study regarding this issue suggested that, empirically, an appropriate choice of this summation interval K could be 30 samples wide as the ECG sampling rate is 200 Hz, corresponding to 150 ms in real-time [3,19]. Consequently, with appropriate choice of M the peak level of the moving window summation of the squared linear HPF output corresponding to a QRS complex is expected to be signicantly enhanced, while those corresponding to the undesired noise peaks, such as the P and T waves should be relatively attenuated, as illustrated in Fig. 5(d). In fact, obser-

The proposed algorithm was realized using MATLAB codes and then tested on the ECG signals provided by the MIT-BIH Arrhythmia Database. Each ECG recording in the database is 30 min in length with the sampling rate fs = 360 Hz. To reduce the number of computations, all the ECG signals employed in the simulation task were resampled by the rate of 200 Hz. The processor type we used in generating all the results here was the X86 Family 6 Model 9 Stepping 5 GenuineIntel 1395 MHz CPU. All the computation codes were programmed in MATLAB version 6.1. The average time required for performing wavelet denoising on each ECG sample was about 0.9 ms (or 0.0009 s); also the measured total time required to achieve a complete point-by-point computation of the feature signal z[n] from the denoised ECG data was about 0.06 ms (or 0.00006 s). Since the time interval between two consecutive ECG data points was 5 ms (recall the resampling rate was 200 Hz), the processing time was efciently short for point-by-point computation, permitting an on-line/real-time QRS detection. In order to evaluate the actual performance of the proposed algorithm, two parameters were adopted for this purpose [1]: Se = +P = TP (sensitivity) TP + FN TP (positive predictivity) TP + FP (10) (11)

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

191

Fig. 5 QRS detector signals. (a) A raw ECG extracted from record 202 in the MIT-BIH database. (b) The denoised ECG generated at the wavelet denoising stage. (c) Output after the wavelet denoising and linear HPF. (d) Final feature signal obtained after the wavelet denoising, linear HPF, and non-linear LPF processes. Note the dot line indicates the adaptive threshold values with ( , ) = (0.05, 0.15).

where TP denotes the number of true positives, FN is the number of false negatives and FP is the number of false positive. Moreover, for simplicity we also used min(Se,+P) to represent the overall detection rate achieved by the algorithm. That is, QRS detection rate = min (Se, +P) (12)

The optimal numerical experimental results obtained after applying the algorithm to this standard database are summarized in Table 1. Here, the parameters were set as (M, , ) = (5, 0.05, 0.15). The mother wavelet used for denoising in this study was Daubechies 4. It is indicated from the table that the proposed algorithm produced, in total, 529 false positives (FPs) and 459 false negatives (FNs), resulting in an overall correct detection rate about 99.5%. It should be noted that the forgetting factor does not have to be restricted to a certain xed value (say, 0.05). Instead, according to our numerical experiments, can be chosen over a certain range approximately from 0.01 to 0.1. Moreover, it was also found that the detection rates remained the same with M = 5, 7.

While the results of QRS detection were very promising, we may also see from Table 1 that for some records in the database only modest detection results were achieved by the algorithm. In general, this is mainly due to the fact that signicantly high noise levels were found in these records. In fact, records with poor signal quality, i.e. very low SNR or high noise level, could seriously result in degraded QRS detection performance. This is because when the noise level is high such that it is comparable with or even higher than the denoising threshold, a number of spurious peaks will be unavoidably generated after the denoising process, thus resulting in many FPs. Record 200 gives a typical example for demonstrating the phenomenon described above. In order to understand how the SNR affects the performance of the QRS detector, a numerical experiment was performed in our study. Here, we had taken a case where the simulated ECG measurement was a composite signal of a noisefree ECG and a zero-mean, white Gaussian noise with variance 2 . The simulated noise-free ECG signal was generated by applying wavelet denoising to the record 119 in the MIT-BIH

192

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

Table 1 Results of performance evaluation for the proposed real-time QRS detection algorithm with M = 5, = 0.05, and = 0.15 Tape (number)
100 101 102 103 104 105 107 109 111 112 113 114 115 116 117 118 119 121 122 123 124 200 201 202 203 205 207 208 209 210 212 213 214 215 217 219 220 221 222 223 230 231 232 233 234 45 patients

Total (beats)
2273 1865 2187 2084 2229 2572 2137 2532 2124 2539 1795 1879 1953 2412 1535 2278 1987 1863 1476 1518 1619 2601 1963 2136 2980 2656 1860 2955 3004 2650 2748 3251 2265 3363 2209 2154 2048 2427 2483 2605 2256 1571 1780 3079 2753 102654

FN (beats)
0 0 97 0 12 5 8 0 1 0 0 2 0 20 0 0 0 3 0 3 0 2 21 6 18 6 3 161 1 5 2 3 11 2 6 3 0 16 0 22 0 5 4 8 3 459

FP (beats)
0 10 0 0 24 78 0 4 9 16 0 3 0 2 2 9 0 68 0 0 2 105 0 2 87 0 24 10 9 16 5 1 6 2 1 0 0 1 1 4 3 0 18 7 0 529

Se (%)
100.00 100.00 95.56 100.00 99.46 99.81 99.63 100.00 99.95 100.00 100.00 99.89 100.00 99.17 100.00 100.00 100.00 99.84 100.00 99.80 100.00 99.92 98.93 99.72 99.40 99.77 99.84 94.55 99.97 99.81 99.93 99.91 99.51 99.94 99.73 99.86 100.00 99.34 100.00 99.16 100.00 99.68 99.78 99.74 99.89 99.55

+P (%)
100.00 99.47 100.00 100.00 98.93 97.05 100.00 99.84 99.58 99.37 100.00 99.84 100.00 99.92 99.87 99.61 100.00 96.47 100.00 100.00 99.88 96.12 100.00 99.91 97.15 100.00 98.72 99.64 99.70 99.40 99.82 99.97 99.73 99.94 99.95 100.00 100.00 99.96 99.96 99.85 99.87 100.00 99.00 99.77 100.00 99.49

min(Se,+P)
100.00 99.47 95.56 100.00 98.93 97.05 99.63 99.84 99.58 99.37 100.00 99.84 100.00 99.17 99.87 99.61 100.00 96.47 100.00 99.80 99.88 96.12 98.93 99.72 97.15 99.77 98.72 94.55 99.70 99.40 99.82 99.91 99.51 99.94 99.73 99.86 100.00 99.34 99.96 99.16 99.87 99.68 99.00 99.74 99.89 99.49

database. Also, different noise levels, i.e. the values of , were respectively determined by setting the SNR values to 030 dB. Consequently, each of the simulated ECG signals was nally composed by adding a noise signal to the noise-free ECG. Then, we ran tests on all these simulated ECG measurements. The detection rates at different SNR values are listed in Tables 2 and 3, where the former gives the results obtained by applying the wavelet denoised ECG data to the QRS detector and the latter provides those obtained with the wavelet denoising stage removed. Observing both sets of results in Tables 2 and 3 one may see that a QRS detection rate of 100% could be achieved at SNR 15 dB if the wavelet denoising process is included, compared to a rate of only 65.08% at the same SNR

value when the denoising stage is removed. In fact, this comparison implied that the wavelet denoising procedure could provide an effective noise reduction thus signicantly enhancing the detection rate, especially when the measured ECG data was seriously noise-corrupted. Meanwhile, it is revealed from Table 2 that with wavelet denoising good performance in QRS detection could be still achieved by the proposed algorithm, even at SNR below 10 dB. An illustrative example for presenting this result is provided in Fig. 6. Furthermore, the results in Table 3 also indicate that for an ECG of moderate to high signal quality, say, with the SNR value above 20 dB, an adequately high QRS detection rate might be achieved, even with no signal denoising or preprocessing steps included.

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

193

Fig. 6 The output in each stage of this QRS detection algorithm for a seriously noise-contaminated ECG data. (a) A raw ECG extracted from record 119 at SNR = 9 dB. (b) The denoised ECG generated at the wavelet denoising stage. (c) Output after the wavelet denoising and linear HPF. (d) Final feature signal obtained after the wavelet denoising, linear HPF, and non-linear LPF processes. Note that the dash line in (d) represent the adaptive threshold values; The QRS detection results are also labeled on the denoised ECG plot in (b).

In addition, presence of many slow-wave like PVCs in an ECG record sometimes might also affect the detection accuracy of the algorithm. Recall the proposed algorithm is devised to facilitate detecting the impulse-like QRS complexes rather the slow waves such as P or T waves. Therefore, if the thresholding parameters (, ) are xed throughout the entire process, it may not always be able to successfully detect lowamplitude, frequent PVCs and thus, the number of FNs might undesirably increase. For example, such a phenomenon was seen in record 208. It should be noted, however, that failing to detect a number of the PVCs for record 208 should not be considered as the major defect of our method. In fact, for other records with PVCs in the database, such as records 100, 109, 112, 119, 230, the proposed method did achieve 100% of sensitivity for all these records. Therefore, we would say that the modest results (94.55% of sensitivity) achieved for record 208 should be mostly attributed to either the limitation of the method or the limitation of this data record itself. On the other

hand, one may speculate that the detection rate would be effectively improved if manual adjustment of the thresholding parameters is permitted during the detection process, especially for the ECG records with frequent PVCs. Finally, we compared the performance of our algorithm with the those having been collected in [1] since the reference provides a quick overview of the achieved detection results of previous algorithms in literature. Compared with the reported results of the existing algorithms listed in [1], Table 2, our algorithm performance actually falls into the category of min(Se,+P) > 99% and tested against a standard database. Furthermore, for the comparison with respect to the computational load, our algorithm should be in the category Low, or at least Medium, according to [1], Table 3 because our evaluation results indicated that the feature generation can be carried out in less than 0.001 s (i.e. 0.0009 + 0.00006 s) for each sample of the ECG. However, it can be expected that with the steady improvement in microprocessor speed and computing

194

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

Table 2 SNR vs. QRS detection rate for the record 119 in the MIT-BIH database (with wavelet denoising) SNR (dB)
0 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 29.00 30.00

Table 3 (Continued ) SNR (dB)


25.00 26.00 27.00 28.00 29.00 30.00

Se (%)
100.00 100.00 100.00 100.00 100.00 100.00

+P (%)
100.00 100.00 100.00 100.00 100.00 100.00

min(Se,+P)
100.00 100.00 100.00 100.00 100.00 100.00

Se (%)
93.85 97.21 97.77 99.16 99.72 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00

+P (%)
92.82 95.87 99.15 99.16 99.17 98.90 99.44 99.44 99.72 99.72 99.72 99.72 99.72 99.72 99.72 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00

min(Se,+P)
92.82 95.87 97.77 99.16 99.17 98.90 99.44 99.44 99.72 99.72 99.72 99.72 99.72 99.72 99.72 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00

power, the computational load will become less important in near future.

4.

Conclusion

In this paper, a novel moving average-based computing method for real-time QRS detection is introduced. In conjunction with wavelet denoising for signal preprocessing the algorithm can successfully and reliably detect almost all QRS complexes for a set of noise-corrupted ECG data drawn from a standard database. Moreover, according to our study it appeared that the novel thresholding strategy proposed for waveletbased denoising in this study can effectively reduce the level of unstructured noise while the important features of the ECG signal, e.g. QRS complex, can be well preserved at the same time. In addition, the overall computational structure of the proposed algorithm allows the QRS detection to be performed in real-time with high time- and memory-efciency. Our results also indicated that there might exist a degree of exibility for parameter value selection as well as robustness over a wide range of noise contamination in the proposed QRS detection algorithm.

Table 3 SNR vs. QRS detection rate for the record 119 in the MIT-BIH database (without wavelet denoising) SNR (dB)
0 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00

Acknowledgement
This work was supported by the National Science Council, Taiwan, under Contract NSC 92-2220-E-182-003.

Se (%)
0.28 0.28 0.28 0.28 0.28 0.28 0.28 0.56 1.40 2.79 8.66 17.32 29.33 41.06 53.63 65.08 72.63 81.28 91.06 96.65 100.00 100.00 100.00 100.00 100.00

+P (%)
100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 93.94 92.54 89.74 83.52 78.05 71.91 65.16 59.51 56.50 56.81 91.33 98.62 100.00 100.00 100.00

min(Se,+P)
0.28 0.28 0.28 0.28 0.28 0.28 0.28 0.56 1.40 2.79 8.66 17.32 29.33 41.06 53.63 65.08 65.16 59.51 56.50 56.81 91.33 98.62 100.00 100.00 100.00

references

[1] B.-U. Kohler, C. Hennig, R. Orglmeister, The principles of software QRS detection, IEEE Eng. Med. Biol. Mag. (2002) 4257. [2] H.-L. Chan, W.-S. Chou, S.-W. Chen, S.-C. Fang, C.-S. Liou, Y.-S. Hwang, Continuous and online analysis of heart rate variability, J. Med. Eng. Technol. (2005) 227234. [3] J. Pan, W.J. Tompkins, A real-time QRS detection algorithm, IEEE Trans. Biomed. Eng. (1985) 230236. [4] Y. Sun, S. Suppappola, T.A. Wrublewski, Microcontroller-based real-time QRS detection, Biomed. Instrum. Technol. (1992) 477484. [5] S. Suppappola, Y. Sun, Nonlinear transform of ECG signals for digital QRS detection: a quantitative analysis, IEEE Trans. Biomed. Eng. (1994) 397400. [6] P.E. Trahanias, An approach to QRS complex detection using mathematical morphology, IEEE Trans. Biomed. Eng. (1993) 201205. [7] A. Cohen, D. Landsberg, Adaptive real-time wavelet detection, IEEE Trans. Biomed. Eng. (1983) 332340.

c o m p u t e r m e t h o d s a n d p r o g r a m s i n b i o m e d i c i n e 82 (2006) 187195

195

[8] S.E. Dobbs, N.M. Schmitt, H.S. Ozemek, QRS detection by template matching using real-time correlation on a microcomputer, J. Clin. Eng. (1984) 197212. [9] Q. Xue, Y.H. Hu, W.J. Tompkins, Neural-network-based adaptive matched ltering for QRS detection, IEEE Trans. Biomed. Eng. (1992) 317329. [10] A. Bartolo, B.D. Clymer, R.C. Burgess, J.P. Turnbull, J.A. Golish, M.C. Perry, An arrhythmia detecter and heart rate estimator for overnight polysomnography studies, IEEE Trans. Biomed. Eng. (2001) 513521. [11] C. May, N. Hubing, A.W. Hahn, Wavelet transforms for electrocardiogram processing, Biomed. Sci. Instrum. (1997) 16. [12] D.L. Donoho, I.M. Johnstone, Ideal spatial adaptation via wavelet shrinkage, Biometrika (1994) 425455. [13] S. Mallat, Multifrequency channel decompositions of images and wavelet models, IEEE Trans. Acoustics, Speech Signal Process. (1989) 20912110. [14] S. Mallat, A theory for multiresolution signal decomposition: the wavelet representation, IEEE Trans. Pattern Anal. Machine Intell. (1989) 674693.

[15] M. Vishwanath, The recursive pyramid algorithm for the discrete wavelet transform, IEEE Trans. Signal Process. (1994) 673676. [16] M. Vishwanath, R.M. Owens, M.J. Irwin, VLSI architectures for the discrete wavelet transform, IEEE Trans. Circuits Syst. II (1995) 305316. [17] M. Vishwanath, R.M. Owens, A common architecture for the DWT and IDWT, Proceedings of the International Conference on Application-Specic Systems, Architectures and Processors, IEEE, publisherlocationLos Alamitos, CA, 1996, pp. 193198. [18] A.V. Oppenheim, R.W. Schafer, Transform analysis of linear time-invariant systems, Discrete-time Signal Processing, Prentice Hall, Upper Saddle River, NJ, 1999, (Chapter 5). [19] W.J. Tompkins, ECG QRS detection, Biomedical Digital Signal Processing, Prentice Hall, Englewood Cliffs, NJ, 1993, (Chapter 12). [20] H.-C. Chen, S.-W. Chen, A moving average-based ltering system with its application to real-time QRS detection, Computers in Cardiology 2003, IEEE Computer Society Press, Los Alamitos, CA, 2003, pp. 585588.

You might also like