Brief algorithm that will identify QRS complexes by providing


The purpose of this project is to develop an algorithm that will allow
accurate detection/characterisation of ECG features. The aim is to develop an algorithm
that will identify QRS complexes by providing the sample numbers of the r-wave
peaks for an ECG being evaluated. The algorithm will also be required to label
QRS complexes as normal or abnormal. Performance should be reported using a
number of metrics. The metrics that are most widely used in such reporting are sensitivity and positive predictive value. All algorithms must be developed so that
all results are completely reproducible by the marker.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now


ECG Background

The electrocardiogram (ECG) reflects of the heart’s electrical activity
as measured at the body surface. Changes in the ECG are studied to detect cardiac
abnormality. Computerised interpretation of the ECG is challenging and has been
researched for many decades. One of the main challenges in this area is the
huge variability that can be seen within subjects and between subjects and between
cardiac abnormalities.

ECG Features (EE)

the hearts electrical activity passes through the heart and reaches the surface
of your skin this is then read and displayed as an electrocardiogram. The ECG
is recorded by attaching electrodes to the skin in the relevant positions. The
voltage that is measured between the electrodes varies and this is how the wave
is plotted. The wave is split up into three parts.

Firstly the P Wave, this is linked with the atrial depolarisation of the
heart, typically less than 120ms. The main part of the ECG is the QRS complex,
consisting of 3 deflections. First deflection being the Q wave, secondly R wave
and finally this S wave. These waves are linked with the ventricular
depolarisation. Lastly the T wave is a is the slow downslope of the ECG,
representing ventricular repolarisation.


The average resting heart beats 60-100 per
minute, roughly 100,000 times each day. It is common for your heart to go out
of rhythm and can sometimes be felt as a flutter in the chest, this irregular
or abnormal heartbeat is called an arrhythmia. An arrhythmia can produce an
uneven heartbeat, increase or decrease the speed of a beat thus altering the
nature of an ECG trace. However, anomalies within an ECG can often be the
result of an underlying heart condition or disease.


The length, amplitude and morphology of a
QRS complex is useful in diagnosing cardiac arrhythmias, myocardial infarction,
ventricular hypertrophy and other various heart conditions. A prolonged QRS
duration length indicates conditions such as bundle branch block or
hyperkalemia and an increased QRS amplitude can indicate cardiac hypertrophy.
Practitioners can derive heart conditions and syndromes through the individual
analysis of Q, R and S parts of the wave. An abnormality within the Q wave
typically indicates the presence of an infarction and a weak R wave progression
is commonly accredited to conditions such as anterior myocardial infarction and
Wolff-Parkinson-White syndrome. However, this can also be the result of a poor
ECG recording procedure.


Detection Algorithm Research (RB)

& Tompkins (RB)

Having known the desirable passband to
maximize the QRS spectral energy is approximately 5-15 Hz, in order to
attenuate out noise Pan and Tompkins passed the signal through a digital
bandpass filter composed of high-pass and lowpass filters in order to reduce
the influence of muscle noise, 60 Hz interference, baseline wander, and T-wave
interference. To implement this, they cascaded the low-pass and high-pass
filters to achieve a 3 dB passband from about 5-12 Hz. The next step in their
algorithm was to differentiate the signal to gather Information about the
slope. They then squared the signal. This makes all data points positive and
intensifies the slope of the frequency response curve of the derivative whilst
restricting false positives caused by T waves with higher than usual spectral
energies. The next stage was to implement moving window integration. The moving
window integrator produced a signal that included information about the slope
and the width of the QRS complex in addition to the slope of the R wave. Pan
and Tompkins then divided their algorithm into three stages, learning phase 1,
learning phase 2, and Peak detection. 
They determined that Learning phase 1 detection thresholds based upon
signal and noise peaks and that Learning phase 2 determines RR-interval average
and RR-interval limit values. The subsequent peak detection phase does the
recognition process and produces a pulse for each QRS complex. 1