ECG Beat
Detection and Pulmonary Dynamics Simulation
By:
Brent Goldman
Supervisor: Dr. Ilker Tunay
Washington University
Spring 2006
Abstract:
Catheters
are commonly used by doctors to aid patients. The purpose of this study is to filter out
the movements caused by the body during catheterization. The authors developed an algorithm that
effectively locates the P wave and the R wave during a heart beat. We also built a model using
Matlab/Simulink that simulates the change in intrapleural pressure during a
normal breathing cycle. By combining the ECG beat detection algorithm and the
cardiovascular model, as well as, a circulation model, we can in effect
eliminate the movements caused by the body. When evaluated with the PhysioNet QT
database, the ECG beat detection algorithm performed well against normal heart
beats, and also against arrhythmias.
The results from the cardiovascular model are accurate with qualitative
clinical descriptions of normal, quiet breathing.
R
Wave and P Wave Detection:
The
features of an ECG are defined by the letters P, Q, R, S, and T. Each letter corresponds to a wave or
change in voltage. The P wave
signifies an atrial contraction. By
combining the Q, R, and S waves, we get a complex. The QRS complex signifies the
contraction of the left and right ventricles. Finally, the T wave signifies
repolarization of the ventricles.
In October of
2005, Quinghua Zhang published, “An Algorithm for Robust and Efficient
Location of T-wave Ends in Electrocardiogram” [1]. The article describes in detail a method
to detect the T wave. In addition,
it also shares the code used to detect both the T wave and the R wave. According to the authors, the algorithm
outperforms other algorithms in evaluating manually annotated ECG signals of
the QT database available on the PhysioNet web site [1]. The first upward wave of the QRS complex
is the R wave. The R wave is the
easiest to detect because it is the tallest wave. Therefore, the algorithm used to detect
the R wave is relatively simple compared to the other waves. Once it is detected, there is an
interval of time before the next QRS complex occurs. This interval includes the T and P waves. Once the T wave is detected, the only
remaining wave is the P wave. The
figure below shows an ECG with the locations of the R wave, T-wave end, and P
wave marked. The R wave is marked
with a solid blue line. The T-wave
end is marked with a red dashed line.
And the P wave is marked with a green dotted line. The T wave in the figure below deflects
downward, signifying an arrhythmia.
|
|
Locations of the R,
T-end, and P waves
|
|
Model
of the Respiratory System:
A journal
article published in 1995, “Anatomical and Physiological Simulation for
Respiratory Mechanics,” derives equations necessary to develop a
mathematical model of the respiratory system [2]. The model displays a lung as a single
compartment. Even though the system
could be more complicated, the equations were shown to fit patient data
well. The figure below shows the
main components of the respiratory system.
If we can
measure the lung volume, we can determine the change in intrapleural
pressure. We tried to represent a
normal, quiet breathing patient.
The average lung volume reaches 6 liters and follows a sinusoidal
pattern. We expressed the change in
lung volume (vl) through |6*sin(.75*x)|.
Parameters that affect the intrapleural pressure (ppl) are airway
resistance (Raw), lung compliance (Cl), and pressure in the airway opening
(pao). The values that we used,
given in [2], are:
Normal, Quiet Breathing
R aw = 1.7 cmH20
per L/sec
Cl = 200 mL per cm H20
pao = 0 cmH20
|
|
Plugging these values into the equation: ppl = -vl / Cl - R aw*v’l +
pao , we get figure(b) below. Figure(a) represents the change in lung
volume. The results produced
are accurate with qualitative clinical descriptions of normal, quiet breathing
[2].
Results
and Conclusion:
The P and R wave detection
algorithms and the respiratory model performed well. .
The algorithm had no erroneous detections of R waves. Our P wave
detection algorithm has the following advantages.
·
filters out measurement noise
·
detects wave form morphological variations
·
calculation is easy
The
respiratory model built from the equations derived in [3] was easy to
implement. The respiratory system
is modeled as a series of deformable or rigid compartments that gas flows
through [3]. Since we only modeled
a single compartment, the accuracy of the model was affected, but not
significantly enough to make a difference.
By combining the respiratory model and the ECG detection algorithms, we
can filter out the movements caused by the body and effectively localize a
catheter with respect to the heart.
We recommend implementing the programs developed in this paper based on
their performance and significance in the medical field.
Sources:
[1] Zhang, Qinghua, and Manriquez, Alfredo I. (Eds.). (2005). An Algorithm for Robust and Efficient Location of
T-Wave Ends in Electrocardiogram. France: Instiut De Recherche en
Informatique et Systemes Aleatoires.
[2] Kaye,
Jonathon, and Primiano, Frank P. (Eds.). (1995). Anatomical and Physiological Simulation for Respiratory
Mechanics. J Image
Guid Surg. 1995; 1(3):164-71.
<http://citeseer.ist.psu.edu/rd/25239409%2C169537%2C1%2C0.25%2CDownload/ftp%3AqSqqSqftp.cis.upenn.eduqSqpubqSqtraumaidqSqpapersqSqmrcas95.ps.gz>.