AN IMPROVED METHOD OF MEASUREMENT
OF ECG PARAMETERS FOR ONLINE
H.R SINGH, RAHUL SHARMA,
NITIN SAHGAL, POONAM SETHI,
AHUL KUSHWAH & PRANAV KACHHAWA
The accuracy in the online measurement of ECG Parameters has
a decisive role in the better diagnosis and effective treatment of the
The present paper describes a Lab-VIEW based programming
using Pan Tompkins method to extract out QRS complex whereas QT
interval measurements were carried out using Mat-lab based Math-
Hilbert Transform has been applied on the ECG signal to convert it
into an analytical signal for better peak detection.
Peak detection and other parameters like RR interval, HR and
several time domain measures of Heart Rate Variability such as RR
mean and standard deviations, HR mean and standard deviations,
RMSSSD, NN50 count, pNN50 etc were calculated for several other
clinical applications apart from online disease diagnosis.
ECG PARAMETERS AND THEIR IMPORTANCE
P wave is produced by muscle contraction of atria.
The shape and duration of P wave indicate atrial
R wave marks the ending of the atrial contraction
and the beginning of ventricular contraction.
Magnitude normally varies from 0.1mV-1.5mV
Narrow and high R wave indicates a physically
T wave marks the ending of ventricular
A normal T wave is slight round and symmetrical.
Pointed T wave is a cause of concern.
Tall T wave indicates a certain disease.
Placement of electrodes
Time it takes the impulse to travel from
atria to AV node (Atrio-ventricular conduction
The PR interval
Measured from the onset of the P wave to
onset of the QRS complex
No more than 5 small squares in duration
Prolonged PR interval >0.20 secs. in 1st
degree heart block.
The QRS complex
Represents ventricular contraction.
Measured from the onset of Q wave to the
end of S wave.
Between 0.08 and 0.12 secs in duration (3
Since the ventricles contain greater
muscle mass than the atria, the QRS complex
is larger than the P wave.
First negative component of the QRS
Should be less than 25% of the associated
QRS and QT detection were performed using Pan Tompkins
while most of the other parameters such as RR interval, BPM,
peaks, RR measurements and several other statistical and
geometric measures were detected using Hilbert Transform.
In order to isolate the QRS energy predominant portion, the
raw signal after acquisition is pre- processed by proper signal
conditioning and removing base line wandering.
These parameters after extracting out from the enhanced
ECG signal have been significantly used in diagnostic
applications with accuracy acceptable to provide higher order
of care to the patient.
Identifies QRS complex based on the analysis of the slope,
amplitude and width of the QRS.
Bandpass filter formed using low pass and high pass filters
reduce noise in the ECG signal.
It also removes baseline drift.
The differentiator distinguishes QRS complexes from low
frequency P and T waves.
Squaring emphasizes the higher values expected due to QRS
complex and suppresses smaller values related to P and T
Moving window integrator is required due to the presence of
multiple peaks within the duration of a single QRS, this takes an
average of N samples.
Its output can be used to detect QRS complexes, RR interval
and determine the duration of the QRS complex.
A block diagram implementing the above stated stages in Lab-VIEW
program is shown in figure for QRS detection.
BLOCK DIAGRAM OF QRS DETECTION
INPUT/OUTPUT WAVEFORMS OF
A NORMAL SINUS RHYTHM
The gap interval between Q onset
and T offset
values is calculated on
a signal as acquired and processed in the previous section of QRS
The block diagram developed for the detection of QT interval and
Q point and T point time measurements is shown in figure.
BLOCK DIAGRAM FOR DETECTION OF QT INTERVAL
The corresponding QT interval measurement displaying
the QT off
and QT on
values separately along with the signal
acquired is shown below :-
FRONT PANEL OF QT DETECTION
The derivative of the signal acquired after filtering and base line wandering
elimination using median filter is taken on which Hilbert Transform is
The reason Hilbert Transform is used for these measurements is to turn the
ECG signal to an analytic signal, which gives a better peak to detect.
This process will give an enhanced ECG signal as compared to raw ECG
signal first obtained.
Peak detection.vi algorithm is developed to find all the peaks and their
locations by setting appropriate threshold parameters.
The RR intervals are extracted by measuring the time interval between two
The heart rate is calculated as follows :
Sampling rate *60/ RR interval (ms)
HRV ANALYSIS METHODS
There are different methods of HRV analysis. one of this method
is Time Domain Analysis. This method extracts a few special
measures using only the temporal RR interval signals.
For Time Series Analysis, Time Domain measures are commonly
used. Many measures can be extracted from the original RR interval
signals to show the changes in the ans.
Variables Units Description Statistical Measures
RR Mean & Std S Mean and standard deviation of all RR intervals
HR Mean & Std 1/min Mean and standard deviation of all heart rates.
RMSSD MS Square root of the mean of the sum of squares of
differences between adjacent RR intervals.
Number of pairs of adjacent RR intervals differing
by more than 50 ms in all measurements
pNN50 % NN50 count divided by the total number of all RR
Total number of all RR intervals divided by the
height of the histogram of all RR intervals.
HEART RATE VARIABILITY ANALYSIS
The Heart Rate Variability analysis can be performed in many ways but the
commonly used method is Time Domain Analysis where only the temporal RR
interval signals are used to extract out a few special measures such as mean
and standard deviation (RR mean) of all RR intervals and heart rate (HR),
RMSSD (square root of mean of sum of square of differences between
adjacent RR intervals), NN50 count (Number of pairs of adjacent RR intervals
differing by more than 50 ms) and HRV triangular index (Total no. of all RR
intervals divided by height of the histogram of all RR intervals) etc.
The process of acquiring various signal parameters as stated above.
Acquire raw ECG
Extract R peaks &
PROCESS OF ACQUIRING SIGNALPARA METERS
BLOCK DIAGRAM OF TIME DOMAIN HRV ANALYSIS
Display raw ECG waveform, enhanced ECG waveform,
Heart Rate, time domain parameters of HRV
Transmission of data parameters and waveforms
Is Heart Rate out
Warning indicator at remote PC
Do you want to
save the data?
Press the save button
Do you want to
Figure : ECG data of patient with normal heart rate on Local PC(top) and Remote PC(bottom).
Figure : ECG data of patient with abnormal heart rate on Local PC(top)and Remote PC(below).
VIs for the determination of QRS duration using Pan Tompkins
algorithm is developed and stepwise execution of every stage is
displayed in the front panel diagram.
For QT interval measurement, Math-Script tool in Mat-lab is used
and the corresponding QT intervals along with their Q point and T
point time measurements are displayed in the respective front panel
A single window VI for the measurement of all time
domain statistical and geometric measures such as RR
interval, HR, HRV time variant analysis, RR and HR mean and
standard deviations, RMSSSD, NN50 count is also developed
and results are displayed.
These results and their interdependencies on each other
are highly desirable for several clinical applications apart from
the online medical diagnosis.