DELINEATION OF ECG FEATURE EXTRACTION USING MULTIRESOLUTION ANALYSIS FRAMEWORK

ECG signals have very features time-varying morphology, distinguished as P wave, QRS complex, and T wave. Delineation in ECG signal processing is an important step used to identify critical points that mark the interval and amplitude locations in the features of each wave morphology. The results of ECG signal delineation can be used by clinicians to associate the pattern of delineation point results with morphological classes, besides delineation also produces temporal parameter values of ECG signals. The delineation process includes detecting the onset and offset of QRS complex, P and T waves that represented as pulse width, and also the detection of the peak from each wave feature. The previous study had applied bandpass filters to reduce amplitude of P and T waves, then the signal was passed through non-linear transformations such as derivatives or square to enhance QRS complex. However, the spectrum bandwidth of QRS complex from different patients or same patient may be different, so the previous method was less effective for the morphological variations in ECG signals. This study developed delineation from the ECG feature extraction based on multiresolution analysis with discrete wavelet transform. The mother wavelet used was a quadratic spline function with compact support. Finally, determination of R, T, and P wave peaks were shown by zero crossing of the wavelet transform signals, while the onset and offset were generated from modulus maxima and modulus minima. Results show the proposed method was able to detect QRS complex with sensitivity of 97.05% and precision of 95.92%, T wave detection with sensitivity of 99.79% and precision of 96.46%, P wave detection with sensitivity of 56.69% and precision of 57.78%. The implementation in real time analysis of time-varying ECG morphology will be addressed in the future research.


I. INTRODUCTION
LECTROCARDIOGRAM (ECG) is a recording of the bioelectric potential of the heart where the electrodes are placed on the surface of the body. ECG is an important component of the evaluation of patients who have vital signs and symptoms of an emergency state of the heart. Electrocardiography has become a standard in the clinical practice of clinicians to get more information about the electrical activity of the heart [1]. ECG signal contains clinical information which found in the interval and morphological parameters of each wave. The development of accurate signal processing methods of ECG signal is really important to provide fundamental features that will be used to an early detection of the heart.
The QRS complex is the dominant feature waveform of ECG signal. The QRS complex has a high amplitude morphology and power spectrum varies from 5 to 30 Hz with center frequency of 17 Hz [2]. This characteristic makes QRS complex more easily detected than P and T waves, which the detection results are usually used for heart rate calculations. Much research had been done to design appropriate signal processing to detect QRS complex. Furno and Tompkins designed a QRS detector based on concept of the automata theory, the algorithm used for pattern recognition. This method had an initial learning process where the program determined the estimated normal amplitude of QRS complex. An algorithm detected every deflection in the data sequence given to detect QRS complex [3]. The QRS detection technique was developed by Dobbs et al [4] using cross-correlation. The signal was said to be correlated if the waveforms of two signals correspond to one another. The algorithm most often used lately is Pan Tompkins method [5]. The design of Pan Tompkins algorithm consists of bandpass, differentiation, quadratic, and moving average filters. Furthermore, the study in [6] developed an advanced signal processing method for detecting parameters of ECG signals that are integrated with PCG and carotid pulse signals.
The method for detecting QRS complex generally started from detecting the QRS location at the beginning of the ECG signal to find the next QRS complex in subsequent data. Detection of R peak wave was based on the QRS pulse width that had been calculated. The technique had two problems. First, the spectrum width or bandwidth of QRS complex can be different in each patient, and sometimes in the same patient in certain cases has a different QRS bandwidth. Second, a frequency spectrum overlap occurs in the QRS complex and noise [6][7][8]. This method could not be performed effectively if the ECG signal has a nonstationary morphology, such as premature ventricular contractions signal.
The P waves represent atrial depolarization due to impulses from the SA node that propagate to right and left atriums. P waves are difficult to detect because they have low amplitude, low frequency spectrum and overlap with T waves, high variability in patients, and low signal-to-noise ratio (SNR) in ECG signal [6] [9]. P wave detection had been proposed by [9] based on local distance transformation with introduction of horizontal and vertical segment patterns. However, this research had not been applied to P waves with different morphologies. Therefore, another method approach is needed to detect different P, QRS, and T waves morphology. This implementation can be used for classification of heart disease by ECG signal parameters extraction [10].
Exploration of delineation methods for morphological extraction of ECG signals has been explored by researchers. Recently researchers have developed a wavelet transformation algorithm to identify delineation of ECG signals. The study in [11] used a bank filter to determine the P, QRS, and T pulse widths in the MIT / BIH arrhythmia database. Multiscale analysis with wavelet transforms was applied to distinguish the shape of ECG signal. The performance of this algorithm had been evaluated with good accuracy to detect QRS complex for the standard MIT/BIH arrythmia database. Martinez et al [12] had validated the wavelet-based ECG delineation system on several standard databases with diverse morphologies. Significant improvement was found in the detection of T wave end. However, the evaluation applied to the European ST-T Database (EDB) which T wave had morphology with narrow width and high amplitude, performances of sensitivity and precision were decreased. The study in [13] implemented automatic real time ECG feature extraction system based on daubechies (db4, db6) wavelet transform. The frame rate of display dropped slowly if the processor was overloaded, such as the addition of ECG signal leads. The algorithm had achieved good accuracy of QRS detection.
The new delineation methods of the ECG feature extraction algorithms were described in [14][15][16]. The study in [14] ECG delineation automatically used the unsupervised learning algorithm based on Expectation Maximization to calculate the QT interval estimation. Three-dimensional space features were used to detect ECG wave characteristics with inflection points. The combination of stationary and discrete wavelet transforms with thresholds was used for delineation which allowed avoidance of false detection, missing points, and onset-offset waves in [15]. The study in [16] delineation of P and T waves using the Gaussian function algorithm and dynamic programming was applied to the standard QTDB database. However, the delineation method in [14][15][16] had never been evaluated on a database with various variations of normal ECG signals and abnormal ECG signals. This paper describes a proposed signal processing based on the DWT framework to detect the peak and pulse width of the QRS complex, P and T waves for various forms of ECG signal morphology.
The paper is organized as follows: Section II describes the delineation algorithm and the experimental framework used to evaluate the performance of the detection. Section III combines the results from the individual scale of multiresolution analysis and the validation from several ECG signal data. Section IV explains the discussion from the results and the comparison to other related researches. Finally, the conclusions and future work are presented in Section V.

A. ECG Measurement
The dataset used in this research was derived from direct measurement using the designed ECG instrumentation. Cardiac signal recording was performed with a series of ECG instrumentation consists of a protection circuit, an instrumentation amplifier circuit, a high pass filter circuit, a low pass filter circuit, and a notch filter circuit. Protection circuit was designed to protect the circuit from high voltage. The instrumentation amplifier circuit used to amplify the ECG signal with a gain of 1000 times because the ECG signal has very small amplitude, about 1 to 3 mV. The filter circuit was designed using the Sallen-Key topology. The 2nd order high pass filter circuit of ECG aimed to reduce the signal below frequency of 0.05 Hz originating from the interference of the muscle movement signal and the DC drift signal. The 4th order low pass filter circuit used to reduce the noise signal from RF (Radio Frequency) interference with a cut-off frequency of 100 Hz. The 4th order notch circuit was designed to reduce the powerline interference with a cut-off frequency of 50 Hz. The analog ECG signal results had negative voltage range so an adder circuit was needed. ECG analog signals were converted to digital data using internal ADC from STM32F4 ARM microcontroller. The sampling frequency was set at 1000 Hz. Furthermore, the ECG signal was displayed to the computer via serial communication in real time.
ECG signals were recorded directly from various 20 normal subjects (16 male subjects and 5 female subjects) and 3 abnormal subjects (2 male subjects and a female subject) with age range of 22-62 years old. Each subject was taken ten times data record. ECG signals were recorded using electrodes placed at three body points, namely Right Arm (RA), Left Arm (LA), and Left Leg (LL) according to Einthoven triangle rules. Recording ECG signals was done with Lead I configuration, i.e. positive electrodes were placed on LA, negative electrodes were placed on RA, and ground on LL.

B. Discrete Wavelet Transform
DWT is based on multiresolution analysis resulting from decomposition of different scales. Decomposition is done by a combination of basis function, dilation (a) and translation (b) of the basic wavelet with a dyadic factor shown in Equation (1), where and was scale. The DWT of x(t) signal in the scale is the result of the transformed signal of convolution process and the filter transfer function originating from the scaling function shown in Equation (2) [17]. (2) Based on the Mallat algorithm [18], DWT implementation can be done by down sampling the input signal at each level of decomposition and passing the signal to the Low Pass Filter (LPF) and High Pass Filter (HPF). In DWT, LPF is denoted by h[n] where the output signal is called as detail. HPF is denoted by g[n] where the output signal is called approximation. The hp and gp coefficients are digital FIR filters that can be implemented in digital signal processing. The transfer functions of H(w) and G(w) are shown in Equations (3) and (4), where H(w) and G(w) are frequency responses for LPF and HPF, respectively. In this study the wavelet function a quadratic spline function with compact support was used. The quadratic spine of Fourier transform can be calculated using Equation (5), Based on wavelet function determined, the filter frequency response of H(w) dan G(w) to implement DWT can be calculated using Equation (6) and (7).
The FIR filter used to process the input signal filtering which is formed from the multiplication between H(w) and G(w). The interpretation of the signal decomposition process in the Mallat algorithm can be explained more easily with a filter bank. Mallat algorithm and filter bank are equivalent and can be connected using Equation (8), (8) where Qj(w) is a linear phase of FIR digital filter [11] [12].
The center frequency of frequency response Qj(w) depends on the sampling frequency in signal processing. In this study, a sampling frequency of 1000 Hz was used. Determination P wave, QRS complex, and T wave extraction from ECG signal was done up to 2 8 scale decomposition.

C. Signal Delineation
Signal delineation is a step used to extract signal characteristics then feature extraction in the form of onset and offset of each wave can be detected. Delineation in DWT utilizes the signal decomposition process to detect the presence of waves. In the development of the DWT method, a bank filter algorithm was developed, where the down sampling process at each scale could be demonstrated by the increasingly narrow bandwidth at low frequency. Figure 1 shows the triangular wave if wavelet transformation is implemented to 2 8 scale decomposition. Each wave corresponds to a positive-negative pair of on a different scale. If any waveform is symmetrical about the peak, then the peak corresponds to the zero-crossing point of the positive-negative wave pair with a delay of Tj=2 j-1 -1.

D. Detection Algorithm
Wavelet transforms were decomposed on a scale of 2 j (j=1...8) at sampling frequency of 1000 Hz, which included the ECG signal power spectrum. The results of wavelet transform decomposition signals at low scales reflected high frequency signal components, and wavelet transform decomposition signals at high scales reflected low frequency signal components. Tompkins found that the frequency spectrum of QRS complex was between 5-15 Hz, while the P-T wave had a frequency spectrum of less than 5 Hz [19]. This discovery underlies the design of algorithms in detecting complex energy of QRS complex, T and P waves at each bank filter scale decomposition.
In this research, DWT was designed up to 2 8 scale decomposition because it could include the frequency components of frequency spectrum of P wave, QRS complex, and T wave with a sampling frequency of 1 kHz. The design of the frequency responses Qj(w) for scale 2 1 to 2 8 are shown in Figure 2. Based on Figure 2, scale 2 1 has a frequency range of 0-1000 Hz with a center frequency of 500 Hz, scale 2 2 has a frequency range of 0-500 Hz with a center frequency of 170 Hz, scale 2 3 has a frequency range of 0-250 Hz with a center frequency of 80 Hz, scale 2 4 has a frequency range of 0-125 Hz with a center frequency of 40 Hz, scale 2 5 has a frequency range of 0-63 Hz with a center frequency of 20 Hz, scale 2 6 has a frequency range of 0-32 Hz with a center frequency of 10 Hz, scale 2 7 has a frequency range of 0-16 Hz with a center frequency of 5 Hz, and scale 2 8 has a frequency range of 0-8 Hz with a middle frequency of 2.5 Hz. Therefore, wavelet transform at small scale reflects the high frequency component of the signal and wavelet transform at large scale reflects the low frequency component of the signal. Each part of the detection algorithm will be explained in the following subsection.

1) Detection of QRS Complex
The location of the QRS complex was obtained by the presence of peak pairs from the wavelet transform at each scale of 2 j (j = 1 ... 7). This process could detect the presence of QRS complexes simultaneously at each scale by calculating the delay. The position of the R peak in the QRS complex could be marked through a zero crossing process at every scale of 2 1 to 2 7 . The stages of detection of the QRS complex consist of several steps: a) Wavelet transforms from ECG signals were calculated by filter bank at scale of 2 1 to 2 7 . b) Signals results from wavelet transforms at each filter bank scale would be compared with the threshold value at each scale. This process was zero crossing. If the output signal was greater than the threshold value, a high pulse would be generated with a delay of T7-Tj.
c) The pulses generated by filter bank at each scale were combined into the AND logic gate to detect the QRS location. d) If n iteration equals the amount of data, the process would be end. If n iteration had not reached the amount of data, then the process returned to step (a).

2) Detection of T Wave
The T wave of the ECG signal was present in wavelet transforms at scales 2 7 and 2 8 . However, the QRS complex also appeared at scale 2 7 and 2 8 in the presence of peak pairs from the wavelet transform filter results. The  problem was how to separate the peak pairs corresponding to the T wave from the QRS complex. The solution to this problem could be solved by the T wave detection algorithm which consists of several steps: a) Wavelet transform of the ECG signal was calculated by filter bank at scale of 2 7 and 2 8 . b) Signals results from wavelet transforms at each filter bank scale would be compared with the threshold value at each scale. If the output signal was greater than the threshold value, a high pulse would be generated with a delay of T8-T7. c) The pulses generated by filter bank at each scale were combined into the AND gate to produce QRS detection. The result of the QRS detection pulse was entered into the NOT gate to produce the QRS negation pulse. d) QRS negation pulses with pulses generated on the filter bank scale 2 7 and 2 8 were combined into the AND gate to produce T wave detection pulses. e) If n iteration equals the amount of data, the process would be end. If n iteration had not reached the amount of data, then the process returned to step (a).

3) Detection of P Wave
After design an algorithm to detect QRS complexes and T waves, the same method is applied for P wave detection by utilizing the presence of positive-negative peak pairs on scale 2 7 . These peak pairs were compared with threshold values on scale 2 7 . The pulse was not corresponding to the QRS complex or the T wave could be the P wave detection. The P detection algorithm consists of several steps: a) Wavelet transform of the ECG signal was calculated by filter bank at scale of 2 7 . b) Signals results from wavelet transforms at each filter bank scale would be compared with the threshold value at each scale. If the output signal was greater than the threshold value, a high pulse would be generated with a delay of T7. c) The QRS detection negation pulse along with the T generated negation detection pulse was combined together with the wavelet transform result on scale 2 7 into the AND gate to produce the detection pulse of P waves. d) If n iteration equals the amount of data, the process would be end. If n iteration had not reached the amount of data, then the process returned to step (a).
The design of three algorithms that had been designed for the extraction of ECG signal features could be connected in parallel algorithm as shown in Figure 3. The design framework for detecting three morphologies of ECG signal was a modification from Bahoura et al [11]. The multiresolution analysis framework design was adapted based on a sampling frequency of 1000 Hz so the wavelet transform was decomposed to scale 2 8 . In each wavelet transform result, each wave peak corresponds to the zero crossing of the positive-negative peak pair, where the peak pairs of the wavelet results called the modulus maxima-minima which showed the width of the QRS complex, or P-T waves. The zero crossing result determined the location of the QRS, T and P waves, while the wave width was represented by the modulus maxima-minima with filter bank at different scales. Modulus maxima could be detected by calculating the signal gradient at each scale as a threshold. Amplitudes higher than the threshold in each scale would generate high pulses.

E. Experimental Methods
The data recorded consists of 6-8 signal cycles with data length of 5000 and a sampling frequency of 1000 Hz. Each data was detected delineation of each wave morphology with zero crossing and modulus maxima-minima. The delineation of the onset, offset, and peak of each wave were processed to produce the parameters extraction of ECG signal. Data of parameters extraction were processed using the calculation of the mean and standard deviation for each data record. Mean and standard deviations include the extraction of ECG signal parameters consist of heart rate (bpm), QRS width (ms), and QT interval (ms). The mean and standard deviations were processed for each data record. Furthermore, final experiment of mean and standard deviation from 10 means and standard deviation of data records were obtained.
The results of the evaluation of the morphological separation of each waveform of the ECG signal are used sensitivity and precision tests. Calculation of sensitivity and precision was defined using True Positive (TP), False Negative (FN), and False Positive (FP). TP decisions occur when the number of waves detected matched the number of waves in the recorded signal. FN decisions occur when no waves were detected that should appear in the recording signal. Meanwhile, FP decisions occur when excess wave detection should not be detected.
Sensitivity indicated the percentage of defective number of wave detections, while precision indicated the percentage of excess number of wave detections. Sensitivity and precision can be calculated using Equations (6) and (7), respectively. Fig. 3. Multiresolution analysis framework using discrete wavelet transform for delineation ECG signal. The framework was modified from Bahoura et al [11]. III. RESULTS Figure 4 shows the results of the wavelet transforms of the ECG signal of the 5th subject with normal sinus rhythm conditions for a scale of 2 1 to 2 8 . In Figure 4 also shows that the QRS complex components have peak pairs of zero crossing at scale 2 1 to 2 7 , whereas wavelet transform at scale 2 8 have no visible modulus of maxima or zero crossing which represents the existence of the QRS complex. The modulus maxima of the T wave was clearly visible on the scale of 2 7 and 2 8 , especially at scale 2 8 . The modulus maxima of the P wave appeared at scale 2 7 . Therefore, the signal results of wavelet transform at scale 2 7 had modulus maxima of QRS complex, also T and P waves.

A. Results of QRS Complex Detection
Zero crossing detection of positive-negative pairs from the wavelet transform results was done by determining the gradient value at each scale. The optimal gradient limit value for detecting zero crossing at scale 2 1 to 2 3 were -0.7, the limit of the gradient value at scale 2 4 to 2 6 were -0.5, at scale 2 7 was -0.4, and at scale 2 8 was -0.1. Figure  5(a) shows the results of the detection of the QRS complex in subjects with normal sinus rhythm. Based on Figure  5(a) shows that the algorithm had been able to detect QRS peaks with zero crossing at scale 2 1 to 2 7 . Figure 5 (b) shows that the algorithm had been able to detect T wave peaks in ECG signals from subjects with normal sinus rhythm. Detection was performed by combining pulses results from zero crossing of wavelet transforms at scales 2 7 and 2 8 , and NOT QRS pulses. The optimal limit value of the gradient for zero crossing at scale 2 7 was -0.4 and gradient at scale 2 8 was -0.  Fig. 4. Wavelet transformation at scale 2 1 to 2 8 from the 5th subject with normal sinus rhythm. C. Results of P Wave Detection Figure 5 (c) shows that the algorithm had been able to detect the peak of the P wave on the ECG signal from subjects with normal sinus rhythm. Detection was performed by zero crossing at scale 2 7 with a threshold gradient of -0.4. The pulse from zero crossing was combined with QRS pulse and NOT T.

B. Results of T Wave Detection
The final results of the DWT algorithm framework could be validated using sensitivity and precision of each wave detection. In ECG signals, the sensitivity and precision of the P wave detection were 56.69% and 57.78%, respectively. The sensitivity and precision of the QRS complex detection were 97.05% and 95.92%, respectively. The sensitivity and precision of the T wave detection were 99.79% and 96.46%, respectively. The results of testing the sensitivity and precision of the P, QRS, and T waves in each subject are shown in Table 1. Meanwhile, the results of parameters extraction of ECG signal using multiresolution analysis framework are shown in Table II. IV. DISCUSSIONS Wavelet transform algorithm was applied to analyze wave extraction from ECG signals. ECG wave characterization based on P waves, QRS complexes, and T waves could be distinguished by multiscale analysis. In the frequency domain, the wavelet function corresponds to the bandpass filter. Selecting a wavelet function is the most important in wavelet transform applications. The quadratic spline wavelet function with compact support could be used to generate a linear phase between the characteristic point of the ECG waveform and the modulus maxima of wavelet transform [7][11][12] [18]. Daubechies wavelets do not generalized linear phase, so determining the relationship between ECG characteristic points and wavelet transform results was difficult to find in [13]. The relationship between ECG characteristics and wavelet transforms was only found in the QRS complex. (b) Figure 4 shows the wavelet transform results of the 5th subject ECG signal with normal sinus rhythm conditions at scale 2 1 to 2 8 . Wavelet transform decomposition was done at scale 2 5 with sampling frequency of 250 Hz [11]. Martinez et al [12] resampled signal from MIT-BIH Arrhythmia and CSE database (360 Hz and 500 Hz, respectively) to the equivalent filter impulse response at cut off frequency of 250 Hz. Different decomposition procedures were required for different sampling frequency of ECG signal. The higher sampling frequency, the more wavelet transform decomposition was needed to describe the critical point as a morphological delineation of ECG signals. Based on Figure 4 [12].
The QRS complex is an extraction of ECG features related to ventricular depolarization. The ventricles have a large muscle mass compared to the atria, so the QRS complex usually has a much larger amplitude than the P wave. The rapid depolarization of the right and left ventricles cause morphology of QRS complex was upright and pointed.  The normal QRS complex is 0.06-0.10 s, but any conduction abnormalities can be longer, and cause an expansion of the QRS complex [1]. The results of wavelet transform at normal sinus rhythm subjects are shown in Figure 4. The results in Figure 4 show that there is zero crossing of the QRS complex at scale 2 1 to 2 7 , indicated by the positive-negative pairs of wavelet transform signal on each scale. The positive-negative pairs of wavelet transform represented the R peak. The range of the maxima modulus and minima modulus shows the QRS pulse width. For sampling frequency of 250 Hz, the zero crossing of QRS complex was performed at scale 2 1 to 2 5 [11] [12]. Frequency responses of bandpass filter Qj(w) from this research and [11] [12] concordance with QRS complex energy in [6] [19]. Algorithms proposed in this research work well for detecting QRS complexes although ECG signals have different morphology of QRS complex, such as end QRS slurring (the 6th, 9th, 13rd subjects), RS complex (the 12nd subject), and sharp negative deflection S wave (the 22nd subject) from Table I. Some research also demonstrated that the error in detection of the QRS complex were small in standard database [7][8][9][10][11][12].
The T waves represent ventricular repolarization. The electrode configuration of the Einthoven triangle rule in Lead I, normal ECG signals are indicated by a positive deflection of T waveform. In the wavelet transform results based on Figure 4 shows zero crossing on the T wave is clearly visible at scale 2 7 and 2 8 , especially at scale 2 8 . This corresponds to the frequency response of the FIR filter in Figure 2 where scale 2 7 has a frequency range of 0-16 Hz with a center frequency of 5 Hz, and scale 2 8 has a frequency range of 0-8 Hz with a center frequency of 2.5 Hz. The results of this study were the same as the results of windowing frequency analysis in [6] which shows that the frequency response of the T wave was around 4.60 Hz. Modulus maxima and minima of T wave would produce a T pulse width.
Algorithms in this research could perform delineation in various morphology of T wave, such as low amplitude T wave (the 2nd subject), high amplitude T wave (the 12nd subject), ST segment elevation (the 19th subject), and inverted T wave (the 21st subject). Detection of T wave also had significant improvement in [12] but performances were decreased in detection of high amplitude T wave. The T waves that have positive deflection could be detected by selecting a negative gradient value that shows zero crossing of the positive-negative pair from wavelet transforms. However, T waves had negative deflections as in subjects with coronary heart abnormalities. The detection of T peaks was obtained by detecting a negative-positive pair from the wavelet transform signal results at each scale. Positive gradient values were used to detect changes in zero crossing at the T peak with positive deflection as in the 21st subject that had coronary heart abnormalities.
The P wave is result of the atrial depolarization process. Based on the wavelet transform in Figure 4, the zero crossing of the P wave is only clearly performed at scale 2 7 which also coincides with the presence of the zero crossing of QRS complex and T wave. At different sampling frequency of 250 Hz, P wave was located at scale 2 4 [11] [12]. Martinez et al [12] evaluated P wave in four different morphologies, which are positive, negative, and biphasic deflection. For standard database QTDB showed that algorithm could detect with high sensitivity of P wave. This research could perform well of P detection on several subject, although ECG signal contained the muscular noise. However, the morphology of P wave with very low amplitude as in the 9th, 11st, and 19th subjects of Table 1, the sensitivity and precision of this algorithm were decreased. In the 5th, 7th, and 8th subjects with normal sinus rhythm of ECG signals had P waves clearly visible by visual inspection, the algorithm was able to detect P waves properly.
Based on the results of this study, delineation of the P wave may not be detected with the performance required for morphological diagnosis when the P wave was seriously affected by noise or P wave was very low amplitude. Algorithms and the addition of other techniques can be considered for further development in P wave delineation. The algorithm is very suitable to be implemented in embedded system integrated with ECG instrumentation module which the results of ECG real time analysis are displayed to the clinician. The implementation in real time analysis of time-varying ECG morphology will be addressed in the future research.
V. CONCLUSIONS In this research, the framework of discrete wavelet transform algorithm with the mother wavelet quadratic spline function with compact support was used to delineate the ECG signal that resulting in peak and pulse width detection of the QRS complex, T wave, and P wave. The design of algorithm was validated at 20 subjects with various variations of normal ECG signals and 3 subjects with abnormal ECG signals. Peak detection was indicated by zero crossing of the wavelet transform results at each scale, while the width of the pulse wave was generated from the range between modulus maxima and modulus minima. ECG feature extractions with positive deflection morphology had positive-negative pairs from zero crossing results. Otherwise, signal with negative deflection morphology had negative-positive pairs from zero crossing results. Based on the results, the algorithm was able to work well for detecting QRS waves with sensitivity and precision of 97.05% and 95.92%, respectively. The sensitivity and precision of T wave detection were 99.79% and 96.46%, respectively. Meanwhile, the sensitivity and precision of P wave detection in various morphologies of normal and abnormal ECG signals were 56.69% and 57.78%, respectively. The implementation in real time analysis with ECG instrumentation will be addressed in the next research step.