Contribution On Real Localisation Of QRS Complexes Biology Essay


Abstract. Within the last decade many approaches to detect the QRS complexes have been proposed because their form and amplitude are the most perceptible parameters in the electrocardiogram ECG. Most of the physiologic signal detection algorithms are based on pre-processing and deciding stages if an incoming peak is a true component based on a user specified threshold. Usually, the localisation of the QRS complex is performed by a well known optimized Pan-Tompkins algorithm. The main objective of this paper is to present a new method to identify and localise the position of the QRS complex. The proposed contribution consists in processing the filtered data by a characteristic function which attenuates the lower level and equalizes the maxima. So, the activated zone where the threshold occurs is enlarged and the amplitude of the other domains is attenuated. Therefore, the algorithm acts to suppress the P and T waves and to pass or enhance the QRS waves. The elimination of some weak points found in the earlier algorithms, and the decrease of their computing power requirements are other advantages of the proposed algorithm. Via simulation, the method was tested and evaluated on MIT-BIH Arrhythmia, manually annotated and developed for validation purposes. As a result, it has been observed that the performances of the QRS complex detector attained a Sensitivity of 99,82%, a Positive Predictivity of 99,86% and a False Discovery Rate of 0,32%.

Lady using a tablet
Lady using a tablet


Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

Keywords: Electrocardiogram, beat variability, QRS detection, wavelet transform, sensitivity.


Biomedical signals are studied frequently by the advanced techniques to indicate possible diseases in human body. In recent years, computer-assisted ECG interpretation has been playing an increasing role in assisting doctors in medicine in the diagnosis and treatment of heart anomalies. The electrocardiogram (ECG) is the electrical activity of the heart beats which describes the repolarization and the depolarisation of the atria or ventricle. The QRS complex is the most characteristic waveform of the ECG signals. Its high amplitude makes QRS detection easier than the other waves. Thus, it is generally used as a reference within the cardiac cycle (Martinez et all 2004). When processing long term ECGs, it is often not possible or even very time consuming to scroll through the whole signal in order to find interesting sequences within the ECG. Therefore, many automatic algorithms are developed.

For QRS detection, many algorithms have been proposed in the literature using different approaches. The overview of the principles is summarized in (Köhler et al. 2002) (Addison 2005). Older detectors are reviewed in (Friesen et al.1990). Recently, new approaches have been introduced, like Artificial neural networks (shyu et al. 2004), genetic algorithms, wavelet transforms (Yimman et al. 2004), and filter banc techniques (Afonso et al. 1999). A generalized scheme of most of the QRS detectors' structure presents two stages: a preprocessing stage, usually including linear filtering followed by a nonlinear transformation and the decision rules (Martínez et all 2004). The most popular one is the Tompkins algorithm which is based on QRS event and other physiologic characteristics of the ECG signal and implemented by Sastres Laboratory (Pan and Tompkins 1985, Hamilton and Tompkins 1985). Other methods have been investigated as well, RR variability characteristics using wavelet and fractal analysis. They have reported a high sensitivity and specificity for automatic Atria Fibrillation (Duvermey et al. 2002).

In this paper, we propose an advanced method for QRS detection which enables an accurate estimation of R-wave occurrence times from sampled ECG recordings. In the proposed algorithm, the original ECG signal is filtered and doing the base line using Discrete Wavelet Transform techniques. The first derivative is performed to accentuate the occurrence instant of the QRS. Before the application of the dynamic threshold, one must attenuate the low amplitude derivative and amplify the active domain; the high amplitude of the signal is amplified to obtain equalized peak values. The signal result is then compared to an adaptive threshold to estimate the accurate time instant of each R-wave. The accuracy of the proposed method is tested via simulation using a MIT-BIH standard arrhythmia database. The Sensitivity, the specificity and the fault detected rate performances are compared to other algorithms.

Features of the ECG components

Human ECG can be generally divided into three components: P wave, QRS complex and T wave, corresponding to waves of depolarization and repolarization of the cardiac muscle. The ECG of a single heartbeat sampled at 200Hz and its relevant portions are indicated in figure 1.

Lady using a tablet
Lady using a tablet


Writing Services

Lady Using Tablet

Always on Time

Marked to Standard

Order Now

Figure 1 Components of a normal ECG

These waves are related to the activity of the auricles and the ventricles in the form of activation or recovery. The muscles' contraction of the heart produces a visible wave of depolarization in the layout of the ECG and the return to the rest state constitutes a wave of repolarisation represented by an iso-electric tension which constitutes the base line. The frequencies relating to each wave present variations according to the rate of heartbeat. The change in the rhythm of beat is called Arrhythmia. The frequency band of the ECGs signals is approximately 60 Hz for a normal subject and can increase to 130 Hz for an abnormal patient. Table 1 gives the membranes actions of the heart in the normal case and their associated waves as well as their temporal and frequencies characteristics.

Table 1 Mechanical and Electrical features of normal arrhythmia.

Mechanical actions

Associated wave

Duration (ms)

Amplitude (mV)

Frequency of the wave (Hz)

Contraction of the auricles (or auricular depolarization)

P wave


≤ 0.3


contraction (or depolarization) of the ventricles

QRS Complex


Q<0-S>0-R (0.5-2)


Return to base line or rest state of the ventricles (or repolarization)

T wave




auricular repolarization

Hidden wave

Details of the proposed method

Most beat detection algorithms can be divided into two stages: a pre-processing stage which emphasizes the desired components in order to maximize the signal-to-noise ratio (SNR) and a decision one decides if an incoming peak is a true component based on a user-specified threshold. The pre-processing stage traditionally relies on signal derivatives, digital filters or wavelets and filter banks for recent algorithms.

The proposed contribution consists on processing the filtered data by an appropriate function which attenuates the lower level and equalizes the maxima.

The proposed method can be divided into three main steps: pre-processing, transformation and redundancy elimination. The block diagram of the peak detection is shown in figure 2.

Figure 2 Structure of the QRS detector.


At first, like all QRS detection algorithms, the analyzed signal is filtered in order to attenuate other signal components and artifacts such as P-wave, T-wave, baseline drift and uncoupling noise. Whereas the attenuation of the P and T waves as well as baseline drift requires high-pass filtering, the suppression of uncoupling noise is usually accomplished by a low-pass filtering. In many algorithms, high and low-pass filtering can be carried out commonly or separately.

In this framework, The ECG signal is pre-processed by band pass filters BPF based on DWT, retaining only three or four levels of details Dj of interest; that is


BPF=[2.875; 45Hz ].

A wavelet filter has many advantages; it is linear so that it will scale properly when presented with ECGs of varying strength and it is time-invariant, so it will perform the same kind of filtering on each QRS component it sees (Kestler et al.1998).

As figure 3(a) shows, the record 203 from the MIT-BIH standard database contains baseline wandering. Figure 3(b) shows the results after it passes through the wavelet filter.

Figure 3 Output of Wavelet filter bloc.

(a) Part of original signal MIT 203 (b) Filtered signal.

Transformation of the filtered signal

The filtered signal is used to estimate the derivative in order to accentuate the QRS variation. The estimated derive is then used to calculate its Hyperbolic Tangent. All peak values are saturated, approximately having similar values. So, the detection by the threshold becomes easier. Otherwise, the relative low amplitudes of P or T waves are attenuated. In other words, not only does the algorithm act to suppress the P and T waves, but also to pass or enhance the QRS wave.

This task can be accomplished by any characteristic function represented by figure 4.

Figure 5 shows an example of the output processing step performed by the detector during peak component detection.

Figure 4Principle of amplification and attenuation.

Figure 5 Output signal treated.

Peak detection and redundancy elimination

Lady using a tablet
Lady using a tablet

This Essay is

a Student's Work

Lady Using Tablet

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our work

The QRS complex occurs if the output stage is greater than the adaptive threshold thr which is calculated upon the mean of a given ECG period:

Where: xi is the amplitude of the filtered ECG, N the number of beats and a is any positive real 0.3< a <0.7.

We practically observe the insensitivity of the algorithm on this parameter.

The value of the constant a is practically maintained the same for all simulated processes.

The last step consists in correcting the fiducially point time instant. The elimination of redundancy cycles is performed by taking the maximum of the filtered signals if the separation time between two successive R peaks is the third of the estimated RR interval.

As illustrated in figures 6 and 7, the described steps of the proposed method are presented for MIT 105 and figure 8 shows the MIT 207. The last signal constitutes an irregular case.

Figure 6Stages of the algorithm applied to MIT 105 (a) Original signal (b) Output of wavelet filter (c) Transformed signal (d) Result of QRS detector: output pulse (e) MIT annotations.

Figure 7 Result of QRS detection of MIT 105 between 437.000 and 440.000 samples.

Figure 8 Stages of the algorithm applied to MIT 207.(a) Original signal (b) Output of wavelet filter (c) Transformed signal (d) Result of QRS detector: output pulse (e) MIT annotations.

Simulation results

Materials and database

In this study, the proposed algorithm is designed for QRS complex event. Its implementation is using Maltab mathematical software (version 6.5). Lead 1 is chosen for the whole analysis due to its representative characteristics in identifying the common heart beats. This method has the advantage of requiring at least one recording lead, thus being less memory intensive than two lead- recordings. The threshold was set for each 4096 point window.

The algorithm has been tested using ECG registrations from the MIT-BIH database. It contains 48 half-hour recordings of annotated ECG with a sampling rate of 360 Hz and 11-bit resolution over a 10-mV range. Altogether, there are 116137 QRS complexes in this database. While some records contain clear R-peaks and few artifacts (e.g., records 100-107), for some records the detection of QRS complex is very difficult due to abnormal shapes, noise, and artifacts (e.g., records 108 and 207). The dataset is publicly available at:

Evaluation and Comparison

The accuracy of our QRS detection algorithms was assessed by comparing their marked QRS annotations with those generated by the MIT algorithm. The threshold coefficient value, if chosen in a certain considerably wide interval, does not influence the detection ratio which provides stability for the algorithm. The verification process was performed, using a developed program that allows us to measure the QRS annotation differences and deliver the number and the position of the True Positive TP, False Positive FP and the False Negative FN peaks.

The evaluation of the detection performance uses the Sensitivity (Se), the positive predictivity (Spp) and False Discovery Rate (FDR) factors.

These statistics are defined as:

Where: Nref is the total number of beats.

Excluding record 207, a total of 47 records of the MIT-BIH arrhythmia database have been considered and the performance criteria have been taken into account regarding the different locations of QRS.

Firstly, we studied the 5 mn duration of each ECG. Table 2 summarizes the results of the proposed detection algorithm. In the appendix, the Table 4 shows the details of the results of the identification process for different ECGs.

Table 2 Detection results of 5 mn MITDB.



















Secondly, the case of 30 mn is considered i.e 47.5 hours the total duration.

The detailed results are given in appendix (table 5) and the recapitulation is shown in table 3.

Table 3 Detection results of 30 mn MITDB.



















Evaluation of results

The results confirm that the algorithm can identify the R wave position with reasonable accuracy. In fact, the Sensitivity and the Positive Predictivity of our automatic annotations were computed and gave 99,85% and 99,81% respectively for 3H55mn.

The false Discovery Rate varied between 2,81% and 0%.

In (Dinh et al. 2001), the Cubic Spline method is applied for 5mn duration MITDB (except for most irregular signals). While the results of the average error rate is 0,75%, this method reduced the average error to 0,34%.

In comparison to the results presented in (Sahambi 1997) using the first channel of the eight first recordings of the MITDB (100 to 107), the QRS detector achieved in those recordings 93 FP and 84 FN out of 14 481 analyzed beats (FDR=1,22%). The WT based algorithm (Martínez et all 2004) presented in this excerpts 43 FP and 23 FN (FDR=0,46%). Our proposed detector presented in those excerpts 39 FP and 10 FN of 13210 analyzed beats (FDR=0,37%).

In the current work, and in the case of 23,5 Hours, the sensitivity varies in the range of 99,03% and 100%. The mean sensitivity is evaluated at 99,82% and the positive predictivity is 99,86%.

The results cited In (Moraes et al. 2002) are (Se 99,22%, Spp=99,73%) and in (pan and tompkins 1985) are (Se 99,56%, Spp=99,76%).

Exhaustive comparisons with algorithms cited in the literature are made. The proposed algorithm presents some advantages, see for example the results presented in (Christov 2004), (Moraes et al. 2002), (Meyer et al. 2006) and (Arzeno et al. 2006).

This study demonstrates that the present detector reduces in most cases the Fault Detection Rate in comparison to other algorithms in the same topic.


In this framework, a new approach for detection of the QRS complexes in the ECG signals is developed. The basic idea suggests the saturation of all R-peaks values in order to equalize approximately the maxima as one. So, the detection by the threshold becomes easier. Otherwise, the relative low amplitudes of P or T waves are attenuated by an appropriate function.

The algorithm is run on the MITDB database; widely used to evaluate QRS detectors. Only the first of the two channels from recording ECGs is used. Out of the total of 47 ECG signal files used for verification, a total of 107634 R-waves (or QRS complexes) were annotated by the MIT algorithm. Considering the MIT annotations as the reference, the comparison was used to evaluate the performance of the proposed algorithm of detection. The proposed QRS detector achieved a good detection performance on this database. The FDR reaches 0.32% for the QRS detector. The Sensitivity is evaluated at 99,82% and the positive predictivity is 99,86%. However, the extensive use of the MITDB as a testing database showed that the over-tuning of the detector parameters is not required.

Exhaustive comparisons with the literature algorithms are made; they revealed the good performances and the additive value of the proposed algorithm.


Addison P.S, 2005, Wavelet transforms and the ECG: a review, Physiol. Meas. Vol 26, R155-R199.

Afonso V.X, Tompkins W.J, Nguyen T.Q, and Luo S, 1999, ECG beat detection using filter banks, IEEE Trans. Biomed. Eng., vol. 46, 192-201.

Arzeno N.M, Poon C.S, and Deng Z.D, 2006, Quantitative Analysis of QRS Detection Algorithms Based on the First Derivative of the ECG, Proc. of the 28th IEEE EMBS Ann. Int. Conf., New York City, USA.

Christov I.I, 2004, Real time electrocardiogram QRS detection using combined adaptive threshold, BioMedical Engineering OnLine, vol3, no28.

Dinh H.A.N, Kumar D.K; Pah N.D and Burton P, 2001, Wavelets for QRS detection., Proceedings of 23th IEEE Int. Conf. of the Eng. in Med. and Biology Society, Vol.2, 1883 - 1887.

Duverney D, Gaspoz J.M, Pichot V, Roche F, Brion R, Antoniadis R and Barthelemy J.C, 2002, High Accuracy of Automatic Detection of Atrial Fibrillation Using Wavelet Transform of Heart Rate Intervals, Pacing Clin Electrophysiol, 25(4 Pt 1), 457-462.

Friesen G.M et al., 1990, A comparison of the noise sensitivity of nine QRS detection algorithms, IEEE Trans. Biomed. Eng., vol. 37, 85-98.

Hamilton P.S and. Tompkins W.J, 1986, Quantitative investigation of QRS detection rules using the MIT/BIH arrhythmia database, IEEE Trans Biomed. Eng., vol. BME-33, 1157-1165.

Kestler H.A, Haschka M, Kratz W, Schwenker F, Palm G, Hombach V and Hoher M, 1998, Denoising of High-resolution ECG Signals by Combining the Discrete Wavelet Transform with the Wiener Filter. Computers in Cardiology, Vol25, 233-236.

Kohler B.U, Hennig C, Orglmeister R, 2002, The principles of software QRS detection, IEEE Engineering in Medicine and Biology Magazine, Vol. 21, Issue 1, 42 - 57.

Martínez J.P, Almeida R, Olmos S, Rocha A.P and Laguna P, 2004, A Wavelet-Based ECG Delineator: Evaluation on Standard Databases, IEEE Transactions on Biomedical Engineering, vol. 51, no. 4.

Meyer C, Gavela J.F, and Harris M, 2006, Combining Algorithms in Automatic Detection of QRS Complexes in ECG Signals, IEEE Transactions on Information Technology in Biomedicine, vol. 10, no. 3.

Moraes J.C, Freitas M.M.; Vilani F.N, Costa E.V, 2002, A QRS complex detection algorithm using electrocardiogram leads, Computers in Cardiology, 205 - 208.

Pan J and Tompkins W.J, 1985, A real-time QRS detection algorithm, IEEE Trans. Biomed. Eng., vol. 32, no.3, 230-236.

Sahambi J.S, Tandon S, and Bhatt R.K, 1997, Using wavelet transform for ECG characterization, IEEE Eng. Med. Biol., vol. 16, no. 1, 77-83.

Shyu L.Y, Wu Y.H and Hu W, 2004, Using Wavelet Transform and Fuzzy Neural Network for VPC Detection From the Holter ECG, IEEE Transactions On Biomedical Engineering, Vol.51,No.7.

Yimman S, Hinjit W, Desyoo P, Bholsithi W and Dejhan K, 2004, Wavelet packet transform applications on QRS detection, , Proc. of the Fourth IEEE Intern. Symp. on Signal Processing and Information Technology, 445 - 448.