# A Novel Wavelet-Based Algorithm for Detection of QRS Complex
## 1 Introduction  
The signal processing and analysis of the electrocardiogram (ECG) is an important and noninvasive tool for identifying abnormal heart function. The QRS complex associated with the ventricular contractions is the most significant signal within an ECG cycle. The accurate detection of QRS is a crucial issue for an automatic ECG analysis system. Though a typical ECG waveform consists of P, Q, R, S, and T waves, the measured ECG may have different waveforms due to abnormal rhythms, and its waveform is also easily contaminated by several noise sources, such as 50 or 60 Hz power line noises, muscle contractions, baseline drift, and motion artifacts. A wide variety of ECG waveforms make it difficult to detect QRS accurately. Previous studies have proposed numerous QRS detection methods, which can be divided into two stages: The ECG signal preprocessing and QRS peak decision. The purpose of the ECG signal preprocessing is to remove the low-frequency baseline drift and high-frequency noise. Many previous studies have designed linear or non-linear filters to remove additive noise and interferences, such as moving averaging filters [1], low-pass filters [2], bandpass filters [3; 4; 5; 2], non-linear filters [6], quadratic filters [7], and Savitzky-Golay (SG) smoothing filters [8]. The methods for noise removal based on the wavelet transform have also appeared in the previous works by removing part of the approximation and detail wavelet coefficients to filter out high frequency noise and baseline drift effects, respectively [9; 10; 11; 12; 13; 14]. Other studies have proposed noise removal methods based on mathematical morphology [15] and artificial neural networks [16]. The QRS peak decision is to find the position of the most prominent peak within a QRS complex. The real time detection of QRS peaks proposed by [PERSON] [1] is based on a comparison of the absolute values of the summed differentiated ECG signals and the adaptive threshold. The threshold combines three parameters: An adaptive slew-rate value, a second value which rises when high-frequency noise occurs, and a third one intended to avoid missing low amplitude beats. [PERSON] and [PERSON] [3] developed an R-peak detector based on the Shannon energy envelope (SEE) estimator. Their method is better at detecting R-peaks in the case of wider and small QRS complexes, negative QRS polarities, and sudden changes in QRS amplitudes. The approach proposed by [PERSON] and [PERSON] [11] used the first-order derivative of the ECG signal and combined adaptive threshold. The detection and delineation of P- and T-waves were achieved by a correlation analysis conducted between signals and their templates. [PERSON] and [PERSON] [6] designed a simple real-time QRS detector using the MaMeMi (Maximum Mean Minimum) filter, which can detect the QRS signal in a simple way with minimal computational cost and resource needs using a non-linear filter. The MaMeMi filter is a high-pass non-linear filter which can effectively remove the baseline drift and also reduce the effect of the T wave. [PERSON] [7] developed a QRS detection algorithm based on the quadratic filter which can enhance the QRS-to-noise ratio and then allow us to use a single fixed threshold to detect the QRS. [PERSON] [13] proposed a method based on the analysis of multiresolution time-dependent entropy. It calculates the entropy of the ECG signal at different temporal resolutions and can improve the accuracy for the detection of various QRS morphologies. The decision rule proposed by [PERSON] and [PERSON] [8] is based on the root-mean-square of the signal. Their techniques include a novel approach for isoelectric line detection and a kurtosis-based false positive correction method. [PERSON] and [PERSON] [17] proposed an adaptive mathematical morphology scheme for extracting QRS complexes and fiducial points. An adaptive structuring element in mathematical morphology operators is updated after the detection of each heartbeat for a more robust and precise detection.