SEARCH WITHIN CONTENT
Citation Information : International Journal on Smart Sensing and Intelligent Systems. Volume 13, Issue 1, Pages 1-11, DOI: https://doi.org/10.21307/ijssis-2020-010
License : (BY-NC-ND-4.0)
Received Date : 15-April-2020 / Published Online: 03-July-2020
QRS represented the most important part of ECG signal, so different researches and studies are performed for QRS recognition. In this paper, a new technique by using wavelet transform is used for de-noising ECG signal by using adaptive threshold, then DWT used to separate the high frequency from the low component, then compute the statistical information from low frequencies to be used in threshold computation, Based on these statics features, lower and upper threshold are calculated, which are updated according to number of peaks that are detected until two thresholds give same number of peaks, also the detected peaks are updated according to average R–R time. Results of (EDB) database was (Acc = 99.366%), while (LTSTDB) database was (Acc = 98.89%). The results are compared with other work and it is show that the proposed method gave better performance and can be used for QRS detection.
ECG is the most significant physiological signals, which can be extracted from heart activity, it is represented the activity of the heart, this activity is represented as electrical graph, this graph can be provided most important information, which is used to diagnosis the heart (Saxena et al., 2002; Merino et al., 2015). The ECG signal can be summarized by consecutive waves and most significant of them are P-wave, QRS wave and T-wave, which represented the characteristics of the signal. P-wave represent a trial depolarization and the distance between beginning of P-wave and the beginning of QRS is called PR interval, which serves as baseline for curve of ECG, PR amplitude is a measure for deflection/wave. QRS complex reflect depolarization of ventricles and its duration time is start from P-wave to the end of QRS, while the T-wave represented rapid repolarization of cells of contractile, the normal T-wave is asymmetric, the time from starting of QRS to the end of T- wave is called QT interval, the detail description of the ECG is shown in (Fig. 1) (Haddadi et al., 2014).
The QRS represented significant part of the ECG signal, so it was named as the reference waveform for ECG signals, because it can be used to evaluate the characteristics of the whole signal, so accurate detection was affected the efficiency of ECG analyzing algorithm, also the interval between R–R time can be calculated and rated of heart is determined (Chan et al., 2005).
The basic part of QRS complex is R peak, so it is the basic part of the signal for detecting the QRS complex, so it is very necessary to detect the location of R-peak from the signal accurately. After determined the location of R peaks, The other components of the signal such as P and T waves can be computed depending on the R peak according to their location with respect to QRS complex (Laguna, 1994). Because ECG signals are exposed by different types of noises and artifacts (Gargasas et al., 2004; Wu et al., 2009), different algorithms and methods are used to de-noising and reprocessing it, this can increase the accuracy of ECG analysis.
Discrete wavelet transform (DWT) is consider very useful method in preprocessing of medical signal, it is always uses for low frequency signal analysis. DWT can separate the high frequency from the low component, and this facilitates are the handling with low and high frequencies separately, so each part can be treated separately. In this paper, we have proposed a new technique to detect QRS by using DWT (Haddad et al., 2017), in which the DWT can be used to de-noise the original ECG signal by using threshold method that is applied to details coefficients of the wavelet transform, also DWT is used to determine the statistics of the approximation coefficient (low frequency components) that can be used to calculate the threshold that is used in detection method. The main contributions of our work is that, We used statistical information of the signal to find the threshold, depending on wavelet transform in which, the great information is founded in approximation sub-band, while the details components have less influence on the curve of the ECG signal, so its statistical is less significant in threshold computation.
There are many researches and studies are performed for detection of QRS complex peaks, some of which can be listed as following.
In 2013, Xiaoran Ning and Ivan W. Selesnick proposed method for detection QRS complex based on sparse derivatives. The proposed system is used the filter (8-20 Hz) to pass band in order to discard high-frequency noise and baseline wander noise. Then this signal is converted into segment, Hilbert transform is used as first-order derivative, then variable threshold was calculated according to the mean square error value. Then QRS is detected as the maximum value in the specified samples (Ning and Selesnick, 2013).
In 2017, Jeong-Seon Park et al. proposed algorithm to detect QRS complex based on DWT, which is applied to eliminate the noise and generate Shannon energy envelope after applying first-order differentiation, which is accomplished by using first-order filter (high pass filter) then amplitude normalization was used. They extract peak energy envelope from the created Shannon energy envelope, the final peaks are extracted from these peak energy envelope, also their system is used to determine R features based on R–R time, also they used different types of filters to smooth the signal through different stage of the algorithm (Park et al., 2017).
In 2017, Runnan He1 et al. proposed QRS detection algorithm in a real-time. In this technique, baseline noise is removed from the signal by band-pass filter. Then, recognition method is constructed from combining (KNN) and (PSO) methods, which are used to select the parameters, this optimization can increase the accuracy for QRS complex detection. Also, in this work, first-order differentiation with five point filter was used to increase the features of the QRS complex and enhance the signal (Runnan et al., 2017).
In 2018, Suleyman and Zahide Elif proposed method for detection of QRS by using digital filtering and DWT, at first, they used SGF method (Savitzky–Golay filtering), which is applied on the signals obtained from the database, this method suppress the high frequency components. After that, BPF is used in order to isolate the P-wave and T waves and make QRS distinct, then DWT method was applied to increase the prominent of QRS. The recognition of zones of QRS is satisfied by modified threshold. Also they used (HPF) in their system to remove the signal baseline noise (Billgan and Akin, 2018).
In 2019, Alka Barhatte et al. proposed used curvelet transform with an adaptive threshold to detect the interest region and guess the R-peak boundaries. Then, they determine the exact location of R-peak depending on estimated boundaries. They used curvelet energy, which is applied to the ECG signal, then threshold is used to determine the region of interest, which contain R peaks for the ROI, then false peaks are removed to increase the accuracy, also there are two threshold in the work, which are lower and upper threshold, these threshold are updated according to the number of peaks (Barhattei et al., 2018).
In this paper, we have proposed a new system depending on wavelet transform and variable threshold for ECG peak detection, the wavelet transform is used for signal enhancement and to compute the statistical of the approximation, which represented the low frequency components, this statistical will be used in the adaptive proposed threshold for peak calculation. The proposed system is described in Figure 2.
In statistics calculation, de-noised signal along with modified de-noised signal (which is obtained after applying DWT, discarding detail coefficients of wavelet transform and applying IDWT) are used to compute thresholds, which are used to detect peaks of the ECG signal.
We used wavelet transform to separate the information of signal into low frequency components (approximation sub-band) and high frequency component (less information or details), then, the proposed threshold is applied to the detail coefficients to reduce the noise, while the approximation coefficients will remain unchanged. The proposed threshold method is summarized in Algorithm I.
Algorithm I. Determination of threshold value
Input: ECG signal and wavelet filter level (j)
Output: Threshold value
Chose initial threshold th=median(details), i=1, n=1, k=1, S=size(detail)
While (i £ S)
If (detail(i)>th) th1(n)=detail(i), n=n+1,
Else th2(k)=detail(i), k=k+1
where j wavelet level (always two or three for best De-noising), detail is wavelet transform coefficients (high frequency component), 0.6745 constant (Galya and Krassimir, 2013).
The DWT is applied to the original signal to separate the approximation coefficients, which is used to reconstruct the signal, while the details component of the signal will be replaced by zero values to eliminate the value that can not be used to determine threshold, as shown in (Fig. 3).
The proposed threshold is based on the statistical computation of original signal along with the signal that was retrieved using the approximation coefficients and delete the detail coefficients after applying wavelet transform, the proposed algorithm can be summarized as following:
Step 1. Determine the ECG signal statistics mean, maximum and standard deviation and named as, meanori, maxori and stdori, respectively.
Step 2. Apply DWT to the signal and get the approximation coefficients.
Step 3. Reconstruct the signal by using the approximation coefficient only and substitute the details coefficient with zero value (delete details coefficients), then determine the statistical values as, meanapp, maxapp and .
Step 4. Calculate the average of the above statistical parameters as following:maxori, meanori and stdori are maximum, mean and standard deviation of original signal respectively, while, maxapp, meanapp and stdapp are maximum, mean and standard deviation of reconstructed signal after wavelet transform, respectively.
Step 5. Compute the lower and upper threshold as in the following equations:
We used 0.05 constant to ensure low value for ThL, while 0.7 is used to ensure high value for ThU, also the weights for the statistics are given according to their significant, max represent the basic parameters to determine the peak, it is multiplied by 0.7, less important is mean, which is multiplied by 0.5, while the lowest significant is standard deviation, which is multiplied by 0.1. (0.05 and 0.07 are considered based on experiments).
Step 6. Determine the number of peaks with lower and upper threshold as N1 peak and N2 peak, respectively, while N1 peak and N2 peak are not equal, update thresholds by:∆ = ThU − ThL and α is constant, we use .
Step 7. Correct the detected peaks by, first determine the R–R intervals and calculate average R–R interval, if there is no peak after (1.5 average R–R) reduce lower threshold, if there is peak after less than (0.75 average R–R) increase threshold and repeat steps (5 and 6).
Step 8. Compute R–R time for successive peaks by determine the number of samples between them, then compute hear rate (HR) as following:
To determine the efficiency of our system, four metrics were used, which are applied to test the system, these metric can be explained as following.
This metric represent the ratio of true prediction to all prediction peaks:
This ratio represent the total number of detected peaks incorrectly to detected peaks correctly:
Represent the ratio of true detected peaks (TP) to the total numbers of positive true and total positive:
The proposed algorithm is performed peak detection and its performance is evaluated by using two types of databases, which are long-Term ST database (LTSTDB) and European ST-T database (EDB), these database are sampled with 250 sample per second. The algorithm is implemented by using mat lab with cori7 processor. Figure 4 shows the de-noising results of two ECG signals after applying de-noising method, which is used DWT with level three and db4 filter with the adaptive threshold method, that is applied to detail coefficients of wavelet transform.
The differences between reconstructed and original signal are by using approximation coefficients only is shown in Figure 5, it is clear that the approximation coefficient, which represented the most important part of the signal is represent the general shape of the signal without detail, which may give useful information to extract the peak of the signal.
The proposed method is evaluated based on (LTSTDB) and (EDB) database for ECG signal, in which, we calculate TP, which represent true peak detection, FN means there is Peak founded but is not detected while FP, which means that the system is detect false peak. Based on these parameters, four metrics were calculated, which are sensitivity (Sen%), positive prediction (+P%), error detection rate (DER%) and accuracy (Acc%). Figure 6 shows the different stages of the proposed system results.
As shown in Figure 6, all the peaks are detected correctly, in other word, all actual peaks are detected, no peak is detected incorrectly (FP = 0), also there is no actual peak not detected (FN = 0), according to these values, the proposed method achieved accuracy (100%), sensitivity (100%) and positive prediction (100%) with zero rate in (DER), which better than results of Park et al. (2017), which gives (93.97, 98.73 and 95.12%) for accuracy, sensitivity and positive prediction, also the DER is 6.4% in Park et al. (2017).
The performance of the system is first tested by using LTSTDB database for 10 records with 1 min, which is shown in Table 1, there is very good improvement in sensitivity (Sen = 99.87%), positive prediction (+P = 99.628%) and accuracy (Acc = 98.89%), with very low value of error rate, which is (1.19), from Table 1, it is clear that all records in Sen, +P and accuracy are detected perfectly (100%) with zero value at DER, except record S20111m, which give lowest value in all metrics (95.23%), (98.76%) and (94.12%) for Sen, +P and Acc respectively, with 6.25 in DER rate.
Figure 7 shows the results of (S20081m) record, it is clear that (Acc = 100%), as we note, (FP = 0 and FN = 0), while the accuracy is 93.97% in Park et al. (2017) method, because (FP = 4 and FP = 1). R–R time interval is calculated based on number of samples between successive peaks of detected peaks according to Equation (8), while the heart rate (HR) is computed based on R–R time interval according to Equation (9). Table 2 shows R–R time interval and heart rate (HR) for record (S20121m).
Table 3 represented the performance of the proposed system tested by using EDB database for ten records with one minute, there is high improvement compared with Park et al. (2017) in sensitivity (Sen = 99.682%), positive prediction (+P = 99.682%) and accuracy (Acc = 99.366%), with very low value of error rate, which is (0.318), from Table 3, it is clear that all records in Sen, +P and accuracy are detected perfectly (100%) with zero value at DER, except record e0108m m, which give lowest value in all metrics (96.29%), (96.29%) and (92.85%) for Sen, +P and Acc respectively, with 7.69 in DER rate. Table 4 shows the R–R and HR for record (e0108m) from (EDB) database.
As shown in Table 4, the values of R-R Peak time are change from beat to another, for example, R–R peak time is 1.1440 for first beat, while it is 0.8720 for second beat, and according to these values, the value of HR is changed, which is 52 and 69 for first and second beats, respectively. Figure 8 shows the results of proposed method for (e0106m) record, it is clear that (Acc = 100%), (FP = 0 and FN = 0), there is good improvement than (Park et al., 2017) method, which achieved accuracy (Acc = 94.82% ) for the same record because there are (FP = 1 and FP = 2).
QRS complex represented most significant features of the ECG signal, that can be used to diagnosis heart disease, so different researches and studies are performed to detect these features, in this paper, a new technique for peak detection is implemented based on wavelet transform, in which, the statistical features of the approximations coefficients of wavelet transform is added to the statistical features of the original signal to determine the effective dynamic threshold to be used to detect the peak of ECG signal.
At first, the signal is de-noised by using adaptive threshold that is applied to the detail component of wavelet transform, then DWT is used to separate the high frequency from the low component, then compute the statistical information from the low frequencies (approximation part of wavelet transform) which represent the basic information of the signal to be used in threshold computation, which is dynamic threshold and it is calculated based on mean, max and standard deviation of original ECG signal and retrieved signal by approximation coefficients only. Based on these statics, lower and upper thresholds are calculated, these thresholds are updated according to the number of peaks that are detected until the two thresholds give the same number of peaks, also the detected peaks are updated according to the average R–R time.
R–R time interval is determined based on the number of samples between successive peaks and sampling rate. Heart rate (HR) is calculated depending on R–R time. The proposed method is evaluated by using two types of databases, which are long-term ST database (LTSTDB) and European ST-T database (EDB), these database are sampled with 250 sample per second with 10 records for each one and the performance of the work is calculated by different performance metrics. In total, 10 record of (EDB) database was used to determine the performance of the proposed technique. The results are achieved sensitivity (Sen = 99.682%), Positive Prediction (+P = 99.366), Accuracy (Acc = 99.366%) and Error Rate Degree (ERD = 0.318%), while the results for (LTSTDB) database are achieved sensitivity (Sen = 99.87%), positive prediction (+P = 99.628%), accuracy (Acc = 98.89%) and (ERD = 1.19%). The results are compared with other Park et al. (2017) and it is show that, the proposed method give better performance and can be used for QRS detection.