Database. The efficiency and robustness of the proposed method has been tested on Fantasia Database (FTD), MIT-BIH Arrhythmia Database (MIT-AD), and MIT-BIH Normal Sinus Rhythm Database (MIT-NSD). Aim. Because of the importance of QRS complex in the diagnosis of cardiovascular diseases, improvement in accuracy of its measurement has been set as a target. The present study provides an algorithm for automatic detection of QRS complex on the ECG signal, with the benefit of energy and reduced impact of noise on the ECG signal. Method. The method is basically based on the Teager energy operator (TEO), which facilitates the detection of the baseline threshold and extracts QRS complex from the ECG signal. Results. The testing of the undertaken method on the Fanatasia Database showed the following results: sensitivity (Se) = 99.971%, positive prediction (P+) = 99.973%, detection error rate (DER) = 0.056%, and accuracy (Acc) = 99.944%. On MIT-AD involvement, Se = 99.74%, P+ = 99.97%, DER = 0.291%, and Acc = 99.71%. On MIT-NSD involvement, Se = 99.878%, P+ = 99.989%, DER = 0.134%, and Acc = 99.867%. Conclusion. Despite the closeness of the recorded peaks which inflicts a constraint in detection of the two consecutive QRS complexes, the proposed method, by applying 4 simple and quick steps, has effectively and reliably detected the QRS complexes which make it suitable for practical purposes and applications.

1. Introduction

Cardiovascular disease is the primary global cause of death. According to the World Health Organization, about 17.3 million people died of cardiovascular disease in 2008, which represented 30 percent of all global deaths. This number is predicted to grow to more than 23.6 million by 2030 [1, 2]. Heart diseases like cardiovascular disease, sudden death, ischemic heart disease, and cardiac arrhythmias are all diagnosed by analyzing the heart’s signal [35]. The electrocardiogram is a noninvasive method of recording signals of heart muscle contractions over a period of time. Therefore, the accurate analysis of these signals will result in a more accurate diagnosis of cardiovascular diseases [6, 7]. An ECG signal is a combination of QRS complex, P and T peaks, and sometimes includes U peak. The detection of the QRS complex also helps to detect and determine P and T peaks, QT interval, ST interval, and the respiratory rate, which are considered as the human’s vital signs. Therefore, the accurate recognition of QRS complex has a significant role in the accurate diagnosis of heart disease [8].

During the past decades, a variety of QRS complex detection methods have been developed [9] such as Pan–Tompkins method of R-wave detection [10], support vector machine [11], and the wavelet method, which is an analytical technique based on time-frequency chromatography. The wavelet transform is widely used in medical signal analysis such as EEG or ECG. However, this has a drawback because by applying a fixed scale, the signal characteristics are ignored [3, 12, 13]. Kalman filters use a dynamic model derived from a dynamic system to predict the hidden state in a nonlinear approach [14]. Artificial neural networks are an ideal self-correcting nonlinear process used in a wide range of tasks [15]. Shannon energy computes the average signal energy in a signal spectrum. In other words, it reduces the high intensity to balance out with the low intensity [1618]. The Adaptive Double Threshold Filter (ADTF) and Discrete Wavelet Transform (DWT) are used to reduce the noise in the ECG signal to improve the ECG signal filtering [19]. Hermit transformation, which is used as an alternative to the Fourier transformation, may by optimization, shows an improved performance [20]. Teager Energy Operator (TEO) mainly shows the frequency and instantaneous changes of the signal amplitude that is very sensitive to subtle changes. Although TEO was first proposed for modeling nonlinear speech signals, it was later widely applied in the audio signal processing. Using TEO can minimize the effects of P and T waves on QRS complex detection [21]. Remarkable research efforts have been developed to analyze the sensitive point of the ECG signal based on TEO [22, 23].

The aim of this study is to propose a new approach based on an innovative viewpoint using TEO to detect QRS complex in the ECG signal. The recorded ECG signal may be affected by noise interference, such as power line interference, which must be eradicated for more accuracy. The Section 2 of the study consists of a series of preprocessing measures to minimize the noises before QRS complex detection on the ECG signal. This includes low-pass filter which removes noises such as power line interference. Since P or T peaks may interfere with the TEO computation, the moving average technique is used to smoothen and envelope the spikes in the signal. Sensitivity, positive prediction, and accuracy of the proposed algorithm from Fantasia Database, MIT-AD, and MIT-NSD are evaluated in the Section 3 of this article. Finally, in Sections 4 and 5 of the study, a discussion and conclusions are presented.

2. Methodology

The details of the proposed method are illustrated in Figure 1. The QRS complex detection procedure involves four steps.(i)Most of the time, the recorded ECG signal is afflicted by noises [24]. The noise frequencies generated by the power lines’ interferences are in the range of 50 to 60 Hz. The noises generated by the muscle contractions and the electrodes placed on the body skin are in the range of 38 to 48 Hz. These greatly impede on the ECG signals. However, a notch filter is very effective in removing these noises. The maximum density of the QRS complex is between 5 to 20 Hz [17, 25]. Therefore, the IIR Butterworth digital filter is the best compromise for phase response and signal attenuation. It has no ripple in the band-pass and is more efficient than the FIR filter [26, 27]. To reduce the noises from the electrical (device) components in order to make a peak clearer for detection, a Butterworth low-pass digital filter, with order 4 and cut-off frequency of 15 Hz, was used.(ii)TEO has various applications, especially in AM and FM signal processing such as speech signals. TEO can be driven from a second-order differential equation [28]. The total energy of oscillation (i.e., the sum of kinetic and potential energies) can be obtained from the following equation:where is the mass of the oscillating body and is the spring constant.Using the formula in (1), a periodic harmonic formula can be obtained:where is the phase shift, is the oscillation frequency, is the oscillation amplitude, and denotes the position of the oscillating body with respect to time. Using (1) and (2), the essential harmonic energy to generate signals can be calculated:The following is a simplified form of TEO: Substituting for we will get the following equation:where is the energy operator for continuous time , is the signal component, and are the first and second derivatives of , respectively, is the sample period, and is the sample size [28, 29].The dynamicity of the heart beats creates an intermittent and nonlinear pattern for TEO. Since TEO itself is a nonlinear operator, it nonlinearly captivates the intermittent characteristics.(iii)After computing TEO, in some signals, spikes of energies are observable and are attributed to P and T peaks in QRS complex. Although not wide in range, they hamper the accurate detection of the QRS complex. To resolve the situation, these spikes should be converted into energy envelopes. There are several methods for this such as Hilbert transform [6] or averaging method [30]. In the present study, moving average the following equation is used:Here defines a rectangle with length, is a constant and is equal to 1, and defines Teager energy from previous steps. To increase the small amplitude, square root is used:Here is the moving average obtained from the previous step.To decrease the baseline signal’s value below zero, the following formula is used [16]:where is the standard deviation and is defined as signal average.(iv)The process of peak detection includes the following step:where baseline (0) is the threshold level for peak detection and R peaks are found in an ECG signal by searching the maximum peak within ±50 samples (length of window = min (RR interval)) of the recognized location of the candidate R peak in the previous step (Equation (9)).

3. Results

Under the supervision of the National Research Center, the PhysioBank database was developed by the National Institute of Health in order to do a clinical diagnosis and conduct research on complex cardiovascular physiologic signals [31]. The proposed method was tested on three different ECG databases [32] including Fantasia Database (FTD), MIT-BIH Arrhythmia Database (MIT-AD), and MIT-BIH Normal Sinus Rhythm Database (MIT-NSD).

The suggested peak detection method based on TEO has been implemented with MATLAB R2016a on a minimum laptop with a 4 GB of memory and Intel core i3-4000M 2.4 GHz CPU on Windows 10. This algorithm takes less than 0.026 second.

The following formulae were used to determine the performance, sensitivity, error rate detection, positive prediction, and the accuracy of the proposed method:

is the number of R peaks, is the number of missed R peaks, and is the false positive prediction of R peak due to the existing noise with dispositioned true R peak.

3.1. MIT-BIH Arrhythmia Database

MIT-AD contains slightly over 30 minutes of recordings in 48 records. The sampling frequency was set to 360 Hz with 11-bit ADC resolution. The subjects who were chosen for this study were 22 women aged 23 to 89 years and 25 men aged 32 to 89 years [31, 33]. Table 1 depicts the details of detected QRS complex in channel 1. The results showed that sensitivity was at 99.74% with a 0.391% (detection) error and 99.97% positive prediction with an accuracy of 99.71%. Table 2 compares the proposed algorithm in this study with those of other studies. All the stages and the process of QRS detections are illustrated in Figures 24. The MIT-AD is available on [36].

In Figures 2 and 3, (a) reveals wandering signals. (b) shows that after calculating Teager energy, the amplitudes of the signals are very low and close to zero. Therefore, small values with low energy are reduced to zero, and the wandering signals (drift) are canceled.

3.2. Fantasia Database

Fantasia Database (FTD) contains 40 cases in both groups: the young group aged 21 to 34 years (f1y01 … f2y10 and f2y01 … f2y10) and the elderly group aged 68 to 85 years (f2o01 … f2o10 and f2y01 … f2y10), with an average of 5 men and 5 women in each group. The members of each group underwent 120 minutes of continuous supine resting with complete care. The sampling frequency was set at 250 Hz, with a 16- and 12-bit resolutions for ADC. The records included 2 or 3 channels, such as respiration, ECG signal, and blood pressure [31, 37]. Fantasia Database is available on [38].

The QRS complex detection details for the channel 2 in Fantasia Database are presented in Table 3. Here too, the results showed 99.971% sensitivity with 0.056% detection error, and 99.973% positive prediction with an accuracy of 99.944%. Table 4 shows the comparison of the proposed method with the other studies. Figures 5 and 6 illustrate another example of detection: QRS Complex in the Fantasia Database with both elderly and young subjects. As shown in this figure, the proposed method can remove drift noise and detect correct location beat.

3.3. MIT-BIH Normal Sinus Rhythm Database

MIT-NSD contains 18 long-term two-channel ECG recordings. This database includes 5 men, aged 26 to 45 and 13 women, aged 20 to 50. Frequency sampling equals to 128 Hz with 12-bit ADC resolution [31]. The details of QRS complex detection of channel 1 of MIT-NSD is presented in Table 5. The obtained values showed that sensitivity was equal to 99.878%, with an error equal to 0.134, positive prediction was equal to 99.989%, and accuracy was equal to 99.867%. Table 6 includes a comparison of the proposed algorithm with the other studies. Figure 7 illustrates the QRS detection in record with Gaussian white noise. As shown in the figure, the proposed method removed Gaussian white noise, but T peak was detected as a beat. MIT-NSD Database is available on [39].

4. Discussion

The aim of the present research is to use a novel algorithm based on the Teager energy operator in ECG signal to detect QRS complex. The main findings of the study indicated the high reliability and accuracy of this method in QRS complex detection. In spite of applying zero-phase digital filter to maintain QRS complex location, the zero-phase filter is anticausal, and the results showed that the present method had faced a little lag which was less than 0.026 second. Only a detection shift of less than 0.05 second is acceptable [40].

In testing the present method on MIT-AD, some records such as 203 and 210 are main sources of error. The error rate is higher than 1%, which is equal to 0.291. Record 203 has a great number of QRS complexes with multiform ventricular arrhythmia. The TEO phase revealed that the amplitudes are very low and close to zero. Due to this fact, the present method indicated quite a weak performance about records: 203, 19090, and 19830. Records 230, 114, 113, 107, and 106 contain high and sharp T peaks. Record number 207 includes some ventricular flutter (VF) intervals. Those intervals are not interpreted and they go out of studies. One of the constraints of the proposed method is when the QRS complex locations are very close to each other. The length (L) of moving average of phase 2 is assumed to be about . The recorded signals of Fantasia Database included a variety of cardiac morphology, heart failures, and noises from sources like power lines, white Gaussian noise, and flicker noise. Lowering the baseline is the main factor contributing to R-peak losses in the MIT-BIH Normal Sinus Rhythm Database.

The advantages of the proposed method are a reduced number of steps to implement, no need for an excessive memory capacity or learning stage, a fast method of detection, a set baseline threshold, and no complex mathematical relationships.

5. Conclusion

The present study detects QRS complex based on Teager energy, which was tested on four databases. It is a novel algorithm with an acceptable accuracy for ECG baseline prediction. The obtained results from testing the presented method on the Fantasia Database involved: sensitivity (Se) = 99.971%, positive prediction (+P) = 99.973%, detection error rate (DER) = 0.056%, and accuracy (Acc) = 99.944%. On MIT-AD involvement, Se = 99.74%, +P = 99.97%, DER = 0.291%, and Acc = 99.71%. On MIT-NSD involvement, Se = 99.878%, +P = 99.989%, DER = 0.134%, and Acc = 99.867%. The provided results indicate that the presented method is reliable to detect QRS complex, and because the relationships are simple, the proposed method has a better performance than other sophisticated techniques such as neural networks. The results show that the proposed method is simple, effective, accurate, and suitable for practical application. To avoid the lag from zero-phase filter, a low-pass filter and a moving average were used, but still, the signal faced a shift that was about 0.026 s.

Data Availability

The data used to support the findings of this study are available in [36, 38, 39].

Conflicts of Interest

The authors declare that they have no conflicts of interest.