^{1}

^{*}

^{1}

^{*}

^{1}

^{1}

QRS detection is very important in cardiovascular disease diagnosis and ECG (electrocardiogram) monitor, because it is the precondition of the calculation of correlative parameters and diagnosis. This paper presents a non-parametric derivative-based method for R wave detection in ECG signal. This method firstly uses a digital filter to cut out noises from ECG signals, utilizes local polynomial fitting that is a non-parametric derivative-based method to estimate the derivative values, and then selects appropriate thresholds by the difference, and the algorithm adaptively adjusts the size of thresholds periodically according to the different needs. Afterwards, the position of R wave is detected by the estimation of the first-order derivative values with nonparametric local polynomial statistical model. In addition, in order to improve the accuracy of detection, the method of redundant detection and missing detection are applied in this paper. The clinical experimental data are used to evaluate the effectiveness of the algorithm. Experimental results show that the method in the process of the detection of R wave is much smoother, compared with differential threshold algorithm and it can detect the R wave in the ECG signals accurately.

QRS wave is the most visible part of the changes in the ECG (electrocardiogram) and the synthetic performance of the multi-myocardial cells. So detecting QRS wave accurately not only provides important basis for the diagnosis of arrhythmia, but also makes it possible to count the heart rate and the variability of heart rate in this base. By doing so, it can lay the foundation for further detecting and analyzing other detailed information. So the key is to detect reliable QRS wave in the analysis of ECG signals accurately.

However QRS waves are difficult to be detected; not only are there the physiological variability of the QRS waves but also several various types of noises that would present in ECG signals. The main several noises sources include muscle noises, artifacts due to electrode motion, 50 Hz power frequency interference, and baseline wander. Therefore we use a digital filter to cut out noises from the original ECG signals before detecting R wave in this paper, and select appropriate thresholds by the difference to deal with the data smoothly. Thus we can obtain more stable signals to prepare for the further R wave detection.

The QRS waves detection of ECG signals have been researched for many years. There have been mainly several investigations dealing with the QRS wave detection for ECG signals [

The rest of the paper is organized following. R wave detection with local polynomial regression and its derivative’s estimation is depicted in Section 2. Experiments results and discussions are given in Section 3. Conclusions are obtained in Section 4.

After the original ECG signal data is preprocessed, we use the local polynomial nonparametric statistical regression to fit these data and compute its values of first-order derivative which can be applied in the algorithm of R- wave detector in ECG signal. In view of these values of first-order derivative, we find they have relatively large changes; there is a fixed position relationship with the steep waveform R wave. Firstly, we set three initial thresholds, comparing with derivative values based on the local polynomial nonparametric estimation. Then through the adaptive learning to adjust the size of thresholds, thus derivative values that can meet the threshold conditions are able to determine the location of R wave roughly. Last setting different RR intervals to discuss redundancies and lacks of R wave and fix.

Since it is difficult to detect QRS wave complexes. Not only because of the physiological variability of the QRS complexes, but also the various types of noises that can present in ECG signals. The main several noises sources include artifacts due to electrode motion, power-line interference, baseline wander. Therefore the first thing is to preprocess data and signals filtering before detecting ECG signals in this paper. The work is divided into the following three steps to complete:

1) Because the data most front excess zeros is meaningless, we process the data in front of extra zeroes method is using a threshold to judge. The method is that from the first point that its absolute value is greater than this threshold to start account, the following data as the signals data to be processed.

2) Data judgment: first, expand the amplitude of the signals up to 100 times of the original (For convenience of signal-detection, the amplitude does not have to be expanded.). Take the first two seconds signals data to identify the position of one of the largest difference, there must be a QRS wave before or after the largest difference value. Finding the maximum pre-max and minimum pre-min value within the interval [−fs/8 fs/8] before and after the origin (fs is sample rate). Meanwhile based on the interval value ranking, we choose its mean value pre-mid. According to distance between the maximum, minimum and mean value to judge whether the signals data is positive or negative and adjust signals.

3) In the process of ECG signals acquisition, amplification and transformation, it can cause all kinds of interference. The main interference is 50 Hz power frequency interference and baseline wander. We use a multi band-pass digital filter to smooth signals after A/D converted. The filter is a 280-order FIR digital filter design with rectangular window. Based on difference of sampling rate, the choice of band-pass has lightly changes. When sampling frequency fs = 5000, the band-pass W = [5.5 40 60 90 110 140 160 190]/fs*2, other smaller fs, W = [5.5 48 52 98 102 148 152 198]/fs*2. It is verified that this multi band-pass rectangular window can filter most of 50 Hz and some harmonic power frequency interference and baseline wander.

The original ECG signal is plotted in

After the original ECG signal data is preprocessed, the first 500 samples would be divided equally. Then we make T = round (1.1*RR) and calculate the difference maximum of the first five T. After removing a maximum and a minimum, the remaining values are taken arithmetic average to obtain threshold benchmark

three constants

tection, according to three cycles to adjust thresholds in the adaptive phase. We also need obtain benchmark R wave amplitude HR and benchmark R wave interval RR: first taking the first 12 seconds signals preprocess to find the maximum difference, next using the maximum difference of 0.65 times as the threshold, we could obtain a general RR interval that we set h. Then we compute the maximum difference and the maximum amplitude value and its corresponding position. We obtain RR interval and space HR.

1) Local polynomial fitting

For data set

where

not specified, a remote data point from

In terms of statistical modeling, locally around

The parameters

Fitting the local model (3) using the local data, one minimizes

where

Then the problem of weighted least squares estimation can be written as follows:

where

where

For the nonparametric local polynomial estimator, there are three important problems which have significant influence to the estimation accuracy and computational complexity.

First of all, there is the choice of the bandwidth, which plays a rather crucial role. The most important thing is to find the bandwidth. In theory, there exists a optimal bandwidth

However, the theoretical bandwidth

Suppose that

Firstly, we assume

approximate optimal bandwidth.

In this paper, we choose

where

In order to closer to the ideal optimal bandwidth, we search once again by narrowing the interval on the basis of the above searching process. Supposing

ching process. Now, divide the small interval

among these

Another issue in multivariate local polynomial fitting is the choice of the order of the polynomial. For a given bandwidth

The third issue is the selection of the kernel function. In this paper, we choose the spherical Epanechnikov kernel as kernel function

where

500 data are contained in a cycle in

2) Algorithm of R wave detection

We put

we can determine

give the detailed description for the R detection of ECG signal. Firstly, the local polynomial nonparametric regression is applied to fitting and estimate the ECG signal. Then, the initial thresholds are given. Finally, iterations steps are conducted for the R wave detection.

Firstly, we need to judge whether it is a real QRS wave when an R wave is detected. We determine the redundant detection occurs according to whether the current RR interval is larger than 0.8*RR or not. Then we decide the missing detection occurs according to whether the RR is more than 3.1*RR or not. If redundant detection or missing detection occurs, we need detect the sample paragraph again before the current sample paragraph be detected and increase range in order to detect the R wave conveniently.

It is possible that the judgment includes redundant detection or missing detection though we have done above. Therefore we also need further determine whether RR is in the interval between 1.66*RR and 2.5*RR. If it is in this interval, it shows that it is possible to be a missing R wave.

From

From

Step 1: Using the given threshold to removal the data most front excess zeros, and the finding difference of maximum and minimum values to judge the data.

Step 2: Choosing a multi band-pass digital filter to filter and smooth signals after A/D converted.

Step 3: Calculating thresholds and obtaining the RR intervals by the difference method.

Step 4: Using local polynomial fitting to process data and obtain the values of its first-order derivative.

Step 5: By fourth step calculated first-order derivative values, combined with thresholds, we can detect the a- pproximate location of R wave by satisfying the three conditions (Formula 7).

Step 6: Setting different RR intervals and discussing redundancies and missing R wave and correcting it.

The purpose of by using local polynomial nonparametric fitting modeling process in R wave detection of ECG signal is to obtain the values of its first-order derivative of the original ECG data in each point. For smaller calculation of the proposed approach, we determine the order

We choose ECG signals randomly to test the algorithm. We also choose 500 data in accordance with the above steps to detect the R wave in ECG signal. The

In experiments we select 500 samples in a cycle as the optimal number of samples. Then we fit the original data using local polynomial nonparametric method in a period. The fitted data are all the same as data of the original data. So we can locate R wave position with its first derivative accurately. We adjust the size of the thresholds by the use of adaptive learning in order to complete the redundant detection and missing detection of the R wave successfully.

Experiments show that the method of local polynomial fitting can also smooth the original data during the progress of real-time detecting R wave. The method can detect R wave more accurately and stably, comparing with the difference threshold method.

The

Because the QRS waves we detect are stable normal heart rate and we fit the original data by using local polynomial estimation, the instantaneous heart rate detection is almost in a straight line. The result shows that it is stable. We can also conclude that the algorithm detection is more accurate.

Compared with the difference threshold algorithm, for our investigated nonparametric local polynomial method, the main difference is data preprocessing. The differential threshold algorithm is that ECG waveform amplitude which is calculated directly by the differential relative to the variation rate of time compared with the set threshold to meet the threshold condition is considered to be an R wave. The

It can be seen from

When we obtain the position of the R wave, it is also necessary to discuss redundant detection and missing detection in ECG signal. The reason is that in the process of automatically updating thresholds, not all thresholds could satisfy rang of R wave peak. It is possible for some signals judged as R wave peak incorrectly in ECG signal so that we could not detect R wave accurately and efficiently. Therefore we could detect R wave and give corresponding correction accurately through researching redundant detection and missing detection.

From

define range of R wave without making discussion of redundant detection. While after dealing with situation, some camouflage signals are detected. Then we set different RR intervals so that getting rid of these unnecessary signals. By doing so, the accuracy is improved greatly.

When we obtain the position of the R wave, it is also necessary to discuss redundant detection and missing detection in ECG signal. The reason is that in the process of automatically updating thresholds, not all thresholds could satisfy rang of R wave peak. It is possible for some signals judged as R wave peak incorrectly in ECG signal so that we could not detect R wave accurately and efficiently. Therefore we could detect R wave and give corresponding correction accurately through researching redundant detection and missing detection.

In this paper we propose a non-parametric derivative-based method for R wave detection in ECG signal. After using a digital filter to cut out noises from noisy ECG signals, we utilize local polynomial nonparametric statistical regression to estimate the original signal and its derivative values, and then select appropriate thresholds by the difference. The algorithm automatically adjusts the size of thresholds periodically according to the different needs. Then the position of R wave is detected by the estimation of the values of the first-order derivatives which are obtained by using local polynomial nonparametric statistical fitting technique. In addition, the methods of redundant detection and missing detection are applied in this paper in order to improve the accuracy of detection. The clinical experimental data are used to evaluate the effectiveness of the algorithm based on derivatives of nonparametric statistical model. The results of the experiment show that using local polynomial fitting of original data in the algorithm can suppress some noises effectively and smooth the original data. At the same time, we can detect out the R wave timely and accurately. This is further improvement comparing with the former difference threshold method. However, heart rate variability can not be researched in this paper; it needs study further.

Project was supported by Natural Science Foundation Project of China (Grant No. 11471060), Fundamental and Advanced Research Project of CQ CSTC of China (Grant No. cstc2014jcyjA40003), and Natural Science Foun- dation Project of CQ CSTC of China (Grant No. CSTC2012jjA00037).