Biomedical Signal Processing Study Material
Biomedical Signal Processing Study Material
Text Books:
1. Willis J. Tomkin, “Biomedical Digital Signal Processing”, PHI.
2. D. C. Reddy, “Biomedical Signal Processing”, McGraw Hill
3. Crommwell Weibel and Pfeifer, “Biomedical Instrumentation and Measurement”,
PHI
Reference Books:
1. Arnon Cohen, “Biomedical Signal Processing (volume-I)”, Licrc Press\
2. Rangaraj M. Rangayyan, “Biomedical Signal Analysis A Case Study Approach”,
John Wiley and Sons Inc.
3. John G. Webster, “Medical instrumentation Application and Design”, John Wiley &
Sons Inc
The field of computers in medicine is quite broad. We can only cover a small part
of it in this book. We choose to emphasize the importance of real-time signal pro-
cessing in medical instrumentation. This chapter discusses the nature of medical
data, the general characteristics of a medical instrument, and the field of medicine
itself. We then go on to review the history of the microprocessor-based system be-
cause of the importance of the microprocessor in the design of modern medical in-
struments. We then give some examples of medical instruments in which the mi-
croprocessor has played a key role and in some cases has even empowered us to
develop new instruments that were not possible before. The chapter ends with a
discussion of software design and the role of the personal computer in
development of medical instruments.
Figure 1.1 shows the three basic types of data that must be acquired, manipulated,
and archived in the hospital. Alphanumeric data include the patient’s name and
address, identification number, results of lab tests, and physicians’ notes. Images
include Xrays and scans from computer tomography, magnetic resonance imaging,
and ultrasound. Examples of physiological signals are the electrocardiogram
(ECG), the electroencephalogram (EEG), and blood pressure tracings.
Quite different systems are necessary to manipulate each of these three types of
data. Alphanumeric data are generally managed and organized into a database
using a general-purpose mainframe computer.
Image data are traditionally archived on film. However, we are evolving toward
picture archiving and communication systems (PACS) that will store images in
digitized form on optical disks and distribute them on demand over a high-speed
local area network (LAN) to very high resolution graphics display monitors located
throughout a hospital.
On the other hand, physiological signals like those that are monitored during
surgery in the operating room require real-time processing. The clinician must
1
2 Biomedical Digital Signal Processing
Medical
data
It is this final type of data on which we concentrate in this book. One of the most
monitored signals is the ECG, so we use it as the example signal to process in
many examples.
There are many different types of medical instruments. The ones on which we con-
centrate in this book are those that monitor and analyze physiological signals from
a patient. Figure 1.2 shows a block diagram that characterizes such instruments.
Sensors measure the patient’s physiological signals and produce electrical signals
(generally time-varying voltages) that are analogs of the actual signals.
A set of electrodes may be used to sense a potential difference on the body sur-
face such as an ECG or EEG. Sensors of different types are available to transduce
into voltages such variables as body core temperature and arterial blood pressure.
The electrical signals produced by the sensors interface to a processor which is re-
sponsible for processing and analysis of the signals. The processor block typically
includes a microprocessor for performing the necessary tasks. Many instruments
have the ability to display, record, or distribute through a network either the raw
signal captured by the processor or the results of its analysis. In some instruments,
the processor performs a control function. Based on the results of signal analysis,
the processor might instruct a controller to do direct therapeutic intervention on a
patient (closed loop control) or it may signal a person that there is a problem that
requires possible human intervention (open loop control).
Introduction to Computers in Medicine 3
Controller
Let us consider two types of medical instrumentation and see how they fit this
block diagram. The first is an intensive care unit (ICU) system, a large set of in-
strumentation that monitors a number of patients simultaneously. The second is a
cardiac pacemaker so small that it must fit inside the patient.
In the case of the ICU, there are normally several sensors connected to each pa-
tient receiving intensive care, and the processor (actually usually more than one
processor) monitors and analyzes all of them. If the processor discovers an abnor-
mality, it alerts the medical staff, usually with audible alarms. A display permits
the staff to see raw data such as the ECG signals for each patient and also data ob-
tained from the analysis such as numerical readouts of heart rate and blood pres-
sure. The network connects the bedside portion of the instrumentation to a central
console in the ICU. Another network might connect the ICU system to other
databases remotely located in the hospital. An example of a closed loop device that
is sometimes used is an infusion pump. Sensors monitor fluid loss as the amount of
urine collected from the patient, then the processor instructs the pump to infuse the
proper amount of fluid into the patient to maintain fluid balance, thereby acting as
a therapeutic device.
4 Biomedical Digital Signal Processing
Now consider Figure 1.2 for the case of the implanted cardiac pacemaker. The
sensors are electrodes mounted on a catheter that is placed inside the heart. The
processor is usually a specialized integrated circuit designed specifically for this
ultra-low-power application rather than a general-purpose microprocessor. The
processor monitors the from the heart and analyzes it to determine if the heart is
beating by itself. If it sees that the heart goes too long without its own stimulus
signal, it fires an electrical stimulator (the controller in this case) to inject a large
enough current through the same electrodes as those used for monitoring. This
stimulus causes the heart to beat. Thus this device operates as a closed loop therapy
delivery system. The early pacemakers operated in an open loop fashion, simply
driving the heart at some fixed rate regardless of whether or not it was able to beat
in a normal physiological pattern most of the time. These devices were far less
satisfactory than their modern intelligent cousins. Normally a microprocessor-
based device outside the body placed over a pacemaker can communicate with it
through telemetry and then display and record its operating parameters. Such a de-
vice can also set new operating parameters such as amplitude of current stimulus.
There are even versions of such devices that can communicate with a central clinic
over the telephone network.
Thus, we see that the block diagram of a medical instrumentation system serves
to characterize many medical care devices or systems.
Figure 1.3 is a block diagram that illustrates the operation of the medical care sys-
tem. Data collection is the starting point in health care. The clinician asks the pa-
tient questions about medical history, records the ECG, and does blood tests and
other tests in order to define the patient’s problem. Of course medical instruments
help in some aspects of this data collection process and even do some preprocess-
ing of the data. Ultimately, the clinician analyzes the data collected and decides
what is the basis of the patient’s problem. This decision or diagnosis leads the clin-
ician to prescribe a therapy. Once the therapy is administered to the patient, the
process continues around the closed loop in the figure with more data collection
and analysis until the patient’s problem is gone.
The function of the medical instrument of Figure 1.2 thus appears to be a model
of the medical care system itself.
Introduction to Computers in Medicine 5
Collection Analysis
Patient of data of data
Therapy
Decision
making
One of the main techniques for diagnosing heart disease is based on the electrocar-
diogram (ECG). The electrocardiograph or ECG machine permits deduction of
many electrical and mechanical defects of the heart by measuring ECGs, which are
potentials measured on the body surface. With an ECG machine, you can deter-
mine the heart rate and other cardiac parameters.
There are three basic techniques used in clinical electrocardiography. The most
familiar is the standard clinical electrocardiogram. This is the test done in a physi-
cian’s office in which 12 different potential differences called ECG leads are
recorded from the body surface of a resting patient. A second approach uses an-
other set of body surface potentials as inputs to a three-dimensional vector model
of cardiac excitation. This produces a graphical view of the excitation of the heart
called the vectorcardiogram (VCG). Finally, for long-term monitoring in the inten-
sive care unit or on ambulatory patients, one or two ECG leads are monitored or
recorded to look for life-threatening disturbances in the rhythm of the heartbeat.
This approach is called arrhythmia analysis. Thus, the three basic techniques used
in electrocardiography are:
Empirical
Figure 2.1 The object of electrocardiography is to deduce the electrical and mechanical
condition of the heart by making noninvasive body surface potential measurements.
Figure 2.2 shows how the earliest ECGs were recorded by Einthoven at around
the turn of the century. Vats of salt water provided the electrical connection to the
body. The string galvanometer served as the measurement instrument for recording
the ECG.
2.1.1 Electrodes
As time went on, metallic electrodes were developed to electrically connect to the
body. An electrolyte, usually composed of salt solution in a gel, forms the electri-
cal interface between the metal electrode and the skin. In the body, currents are
produced by movement of ions whereas in a wire, currents are due to the move-
ment of electrons. Electrode systems do the conversion of ionic currents to electron
currents.
Conductive metals such as nickel-plated brass are used as ECG electrodes but
they have a problem. The two electrodes necessary to acquire an ECG together
with the electrolyte and the salt-filled torso act like a battery. A dc offset potential
occurs across the electrodes that may be as large or larger than the peak ECG
signal. A charge double layer (positive and negative ions separated by a distance)
occurs in the electrolyte. Movement of the electrode such as that caused by motion
of the patient disturbs this double layer and changes the dc offset. Since this offset
potential is amplified about 1,000 times along with the ECG, small changes give
rise to large baseline shifts in the output signal. An electrode that behaves in this
way is called a polarizable electrode and is only useful for resting patients.
26 Biomedical Digital Signal Processing
Connecting wire
Silver (Ag)
Figure 2.3 A silver-silver chloride ECG electrode. Many modern electrodes have electrolyte
layers that are made of a firm gel which has adhesive properties. The firm gel minimizes the
disturbance of the charge double layer.
Electrocardiography 27
The most-used material for electrodes these days is silver-silver chloride (Ag-
AgCl) since it approximates a nonpolarizable electrode. Figure 2.3 shows such an
electrode. This type of electrode has a very small offset potential. It has an AgCl
layer deposited on an Ag plate. The chloride ions move in the body, in the elec-
trolyte, and in the AgCl layer, where they get converted to electron flow in the Ag
plate and in the connecting wire. This approach reduces the dc offset potential to a
very small value compared to the peak ECG signal. Thus, movement of the elec-
trode causes a much smaller baseline shift in the amplified ECG than that of a po-
larizable electrode.
Figure 2.4 shows how a physical model called a cardiac equivalent generator can
be used to represent the cardiac electrical activity. The most popular physical
model is a dipole current source that is represented mathematically as a time-vary-
ing vector which gives rise to the clinical vectorcardiogram (VCG). Einthoven
postulated that the cardiac excitation could be modeled as a vector. He also real-
ized that the limbs are like direct connections to points on the torso since the cur-
rent fluxes set up inside the body by the dipole source flow primarily inside the
thorax and do not flow significantly into the limbs. Thus he visualized a situation
where electrodes could just as well have been connected to each of the shoulders
and to a point near the navel had he not been restricted to using vats of saline.
Forward
Condition Cardiac Cardiac Body surface
of the electrical equivalent potentials
heart activity generator (electrocardiograms)
Inverse
Dipole
(vector)
Figure 2.4 Both the electrical and mechanical conditions of the heart are involved in determin-
ing the characteristics of the spread of electrical activity over the surface of the heart. A model of
this activity is called a cardiac equivalent generator.
Einthoven drew a triangle using as vertices the two shoulders and the navel and
observed that the sides of the triangle were about the same length. This triangle,
shown in Figure 2.5, has become known as the Einthoven equilateral triangle. If
the vector representing the spread of cardiac excitation is known, then the potential
difference measured between two limbs (i.e., two vertices of the triangle) is pro-
portional simply to the projection of the vector on the side of the triangle which
connects the limbs. The figure shows the relationship between the Einthoven vec-
tor and each of the three frontal limb leads (leads I, II, and III). The positive signs
28 Biomedical Digital Signal Processing
show which connection goes to the positive input of the instrumentation amplifier
for each lead.
I +
RA LA
II III
+ +
LL
Figure 2.5 Einthoven equilateral triangle. RA and LA are the right and left arms and LL is the
left leg.
where p(t) is the time-varying cardiac vector, pi(t) are the orthogonal components
of the vector also called scalar leads, and ^x , ^y , ^z are unit vectors in the x, y, z
directions.
A predominant VCG researcher in the 1950s named Frank shaped a plaster cast
of a subject’s body like the one shown in Figure 2.6, waterproofed it, and filled it
with salt water. He placed a dipole source composed of a set of two electrodes on a
stick in the torso model at the location of the heart. A current source supplied
current to the electrodes which then produced current fluxes in the volume
conductor. From electrodes embedded in the plaster, Frank measured the body
surface potential distribution at many thoracic points resulting from the current
source. From the measurements in such a study, he found the geometrical transfer
coefficients that relate the dipole source to each of the body surface potentials.
Electrocardiography 29
Torso model
Torso
surface
recording
electrode
Dipole
current
source
electrode
Saline
solution
Figure 2.6 Torso model used to develop the Frank lead system for vectorcardiography.
Once the transfer coefficients are known, the forward problem of electrocardiog-
raphy can be solved for any dipole source. The forward solution provides the po-
tential at any arbitrary point on the body surface for a given cardiac dipole.
Expressed mathematically,
This forward solution shows that the potential vn(t) (i.e., the ECG) at any point n
on the body surface is given by the linear sum of the products of a set of transfer
coefficients [tni] unique to that point and the corresponding orthogonal dipole vec-
tor components [pi(t)]. The ECGs are time varying as are the dipole components,
while the transfer coefficients are only dependent on the thoracic geometry and in-
homogeneities. Thus for a set of k body surface potentials (i.e., leads), there is a set
of k equations that can be expressed in matrix form
V=TP (2.3)
the solution of the forward problem and obtain the ECG for any body surface loca-
tion. The approach to solving this problem is based on a physical model of the hu-
man torso. The model provides transfer coefficients that relate the potentials at
many body surface points to the heart vector. With this information, we select three
ECG leads that summarize the intrinsic characteristics of the desired abnormal
ECG to simulate. Then we solve the inverse problem to find the cardiac dipole
vector
P=BV (2.4)
If we select k body surface ECG leads {v1(t), v2(t),…, vk(t)} for which the lead
coefficients are known from the physical model of the human torso, we can solve
the inverse problem and compute the time-varying heart vector. Once we have
these dipole components, we solve the forward problem using Eq. (2.3) to compute
the ECG for any point on the body surface.
Figure 2.7 shows how an ECG is measured using electrodes attached to the body
surface and connected to an instrumentation (ECG) amplifier. For the points in
time that the vector points toward the electrode connected to the positive terminal
of the amplifier, the output ECG signal will be positive-going. If it points to the
negative electrode, the ECG will be negative. The time-varying motion of the car-
diac vector produces the body surface ECG for one heartbeat with its characteristic
P and T waves and QRS complex. Figure 2.8 shows a lead II recording for one
heartbeat of a typical normal ECG.
Figure 2.9 illustrates how the cardiac spread of excitation represented by a vector
at different points in time relates to the genesis of the body surface ECG for an
amplifier configuration like the one in Figure 2.8. In Figure 2.9(a), the slow-mov-
ing depolarization of the atria which begins at the sinoatrial (SA) node produces
the P wave. As Figure 2.9(b) shows, the signal is delayed in the atrioventricular
(AV) node resulting in an isoelectric region after the P wave, then as the Purkinje
system starts delivering the stimulus to the ventricular muscle, the onset of the Q
wave occurs. In Figure 2.9(c), rapid depolarization of the ventricular muscle is de-
picted as a large, fast-moving vector which begins producing the R wave. Figure
2.9(d) illustrates that the maximal vector represents a point in time when most of
the cells are depolarized, giving rise to the peak of the R wave. In Figure 2.9(e),
the final phase of ventricular depolarization occurs as the excitation spreads toward
the base of the ventricles (to the top in the picture) giving rise to the S wave.
Electrocardiography 31
(a)
R
Torso
T
P
Q S
(b)
Figure 2.7 Basic configuration for recording an electrocardiogram. Using electrodes attached to
the body, the ECG is recorded with an instrumentation amplifier. (a) Transverse (top) view of a
slice of the body showing the heart and lungs. (b) Frontal view showing electrodes connected in
an approximate lead II configuration.
32 Biomedical Digital Signal Processing
0.6
R
0.5
0.4
Amplitude (mV)
T
0.3
0.2
0.1 P
-0.1 Q
S
-0.2
0 0.1 0.2 0.3 0.4 0.5
Time (s)
Figure 2.8 Electrocardiogram (ECG) for one normal heartbeat showing typical amplitudes and
time durations for the P, QRS, and T waves.
Figure 2.10 shows how we can view the potential differences between the limbs as
ideal voltage sources since we make each voltage measurement using an
instrumentation amplifier with a very high input impedance. It is clear that these
three voltages form a closed measurement loop. From Kirchhoff’s voltage law, the
sum of the voltages around a loop equals zero. Thus
II – I – III = 0 (2.6)
We can rewrite this equation to express any one of these leads in terms of the other
two leads.
Electrocardiography 33
II = I + III (2.7a)
I = II – III (2.7b)
III = II – I (2.7c)
I
+
RA LA
II III
+ +
LL
Figure 2.10 Leads I, II, and III are the potential differences between the limbs as indicated. RA
and LA are the right and left arms and LL is the left leg.
The early instrumentation had inadequate gain to produce large enough ECG traces
for all subjects, so the scheme in Figure 2.11 was devised to produce larger ampli-
tude signals. In this case, the left arm signal, called augmented limb lead aVL, is
measured using the average of the potentials on the other two limbs as a reference.
34 Biomedical Digital Signal Processing
We can analyze this configuration using standard circuit theory. From the bot-
tom left loop
i R + i R – II = 0 (2.8)
or
II
iR= 2 (2.9)
II II – 2 III
aVL = 2 – III = 2 (2.12)
I
+
RA LA
II III
+ + +
LL R
aVL
–
RA LA
LL R
R
(a)
(b)
R/2
(c)
Figure 2.12 Determination of the Thévenin resistance for the aVL equivalent circuit. (a) All
ideal voltage sources are shorted out. (b) This gives rise to the parallel combination of two equal
resistors. (c) The Thévenin equivalent resistance thus has a value of R/2.
36 Biomedical Digital Signal Processing
Substituting gives
III + I – 2 III I – III
aVL = 2 = 2 (2.14)
This is the Thévenin equivalent voltage for the augmented lead aVL as an aver-
age of two of the frontal limb leads. It is clear that aVL is a redundant lead since it
can be expressed in terms of two other leads. The other two augmented leads, aVR
and aVF, similarly can both be expressed as functions of leads I and III. Thus here
we find an additional three leads, all of which can be calculated from two of the
frontal leads and thus are all redundant with no new real information. However due
to the empirical nature of electrocardiology, the physician nonetheless still needs to
see the appearance of these leads to facilitate the diagnosis.
Figure 2.12 shows how the Thévenin equivalent resistance is found by shorting
out the ideal voltage sources and looking back from the output terminals.
Figure 2.13 illustrates that a recording system includes an additional resistor of a
value equal to the Thévenin equivalent resistance connected to the positive input of
the differential instrumentation amplifier. This balances the resistance at each input
of the amplifier in order to ensure an optimal common mode rejection ratio
(CMRR.
R/2
+
aVL = (I – III)/2
–
R/2
Figure 2.13 In a practical device for recording aVL, a resistance equal to the Thévenin
equivalent resistance value of R/2 is added at the positive terminal of the instrumentation
amplifier to balance the impedance on each input of the amplifier. This is done for optimal
common mode performance.
Figure 2.14 shows how to solve vectorially for an augmented limb lead in terms
of two of the standard limb leads. The limb leads are represented by vectors ori-
ented in the directions of their corresponding triangle sides but centered at a com-
mon origin. To find aVL as in this example, we use the vectors of the two limb
leads that connect to the limb being measured, in this case, the left arm. We use
lead I as one of the vectors to sum since its positive end connects to the left arm.
Electrocardiography 37
We negate the vector for limb lead III (i.e., rotate it 180˚) since its negative end
connects to the left arm. Lead aVL is half the vector sum of leads I and –III [see
Eq. (2.14)].
Figure 2.15 shows the complete set of vectors representing the frontal limb
leads. From this depiction, you can quickly find all three augmented leads as func-
tions of the frontal leads.
Head
–III
aVL
Right Left
I
III II
Feet
Figure 2.14 The vector graph solution for aVL in terms of leads I and III.
Head
aVR aVL
Right Left
I
III II
aVF
Feet
Figure 2.15 The vector relationships among all frontal plane leads.
38 Biomedical Digital Signal Processing
RA LA RA LA
R
+
I –
R
– aVR
RL LL RL LL +
R/2
(a) (d)
RA LA RA LA
R/2
–
II R
+ +
aVL
RL LL RL LL
–
(b) (e)
RA LA RA LA
R
–
–
III R
aVF
+
+
RL LL RL LL
R/2
(c) (f)
R/3
RA LA
R
+
V Leads
R
–
RL LL
(g)
Figure 2.16 Standard 12-lead clinical electrocardiogram. (a) Lead I. (b) Lead II. (c) Lead III.
Note the amplifier polarity for each of these limb leads. (d) aVR. (e) aVL. (f) aVF. These aug-
mented leads require resistor networks which average two limb potentials while recording the
third. (g) The six V leads are recorded referenced to Wilson’s central terminal which is the aver-
age of all three limb potentials. Each of the six leads labeled V1–V6 are recorded from a differ-
ent anatomical site on the chest.
Electrocardiography 39
There are three basic lead systems used in cardiology. The most popular is the 12-
lead approach, which defines the set of 12 potential differences that make up the
standard clinical ECG. A second lead system designates the locations of electrodes
for recording the VCG. Monitoring systems typically analyze one or two leads.
Figure 2.16 shows how the 12 leads of the standard clinical ECG are recorded, and
Figure 2.17 shows the standard 12-lead ECG for a normal patient. The instrumen-
tation amplifier is a special design for electrocardiography like the one shown in
Figure 2.23. In modern microprocessor-based ECG machines, there are eight simi-
lar ECG amplifiers which simultaneously record leads I, II, and V1–V6. They then
compute leads III, aVL, aVR, and aVF for the final report.
Figure 2.17 The 12-lead ECG of a normal male patient. Calibration pulses on the left side
designate 1 mV. The recording speed is 25 mm/s. Each minor division is 1 mm, so the major
divisions are 5 mm. Thus in lead I, the R-wave amplitude is about 1.1 mV and the time between
beats is almost 1 s (i.e., heart rate is about 60 bpm).
40 Biomedical Digital Signal Processing
Figure 2.18 illustrates the placement of electrodes for a Frank VCG lead system.
Worldwide this is the most popular VCG lead system. Figure 2.19 shows how
potentials are linearly combined with a resistor network to compute the three time-
varying orthogonal scalar leads of the Frank lead system. Figure 2.20 is an IBM
PC screen image of the VCG of a normal patient.
M
I
A x
E C
RL LL
Figure 2.18 The electrode placement for the Frank VCG lead system.
Electrocardiography 41
10 k
I
–Right
–
75 k x
13 k +
A +Left
47 k
33 k
C
36 k
24 k
E
–Front
–
130 k z
12 k +
M +Back
68 k
30 k
15 k
LL
–Foot
–
y
10 k +
H +Head
Ground
RL
(b)
Figure 2.19 The resistor network for combining body surface potentials to produce the three
time-varying scalar leads of the Frank VCG lead system.
42 Biomedical Digital Signal Processing
Figure 2.20 The vectorcardiogram of a normal male patient. The three time-varying scalar leads
for one heartbeat are shown on the left and are the x, y, and z leads from top to bottom. In the top
center is the frontal view of the tip of the vector as it moves throughout one complete heartbeat.
In bottom center is a transverse view of the vector loop looking down from above the patient. On
the far right is a left sagittal view looking toward the left side of the patient.
Monitoring applications do not use standard electrode positions but typically use
two leads. Since the principal goal of these systems is to reliably recognize each
heartbeat and perform rhythm analysis, electrodes are placed so that the primary
ECG signal has a large R-wave amplitude. This ensures a high signal-to-noise ratio
for beat detection. Since Lead II has a large peak amplitude for many patients, this
lead is frequently recommended as the first choice of a primary lead by many
manufacturers. A secondary lead with different electrode placements serves as a
backup in case the primary lead develops problems such as loss of electrode
contact.
Electrocardiography 43
Figure 2.21 shows three bandwidths used for different applications in electrocar-
diography (Tompkins and Webster, 1981). The clinical bandwidth used for
recording the standard 12-lead ECG is 0.05–100 Hz. For monitoring applications,
such as for intensive care patients and for ambulatory patients, the bandwidth is re-
stricted to 0.5–50 Hz. In these environments, rhythm disturbances (i.e., arrhyth-
mias) are principally of interest rather than subtle morphological changes in the
waveforms. Thus the restricted bandwidth attenuates the higher frequency noise
caused by muscle contractions (electromyographic or EMG noise) and the lower
frequency noise caused by motion of the electrodes (baseline changes). A third
bandwidth used for heart rate meters (cardiotachometers) maximizes the signal-to-
noise ratio for detecting the QRS complex. Such a filter passes the frequencies of
the QRS complex while rejecting noise including non-QRS waves in the signal
such as the P and T waves. This filter helps to detect the QRS complexes but dis-
torts the ECG so much that the appearance of the filtered signal is not clinically ac-
ceptable. One other application not shown extends the bandwidth up to 500 Hz in
order to measure late potentials. These are small higher-frequency events that oc-
cur in the ECG following the QRS complex.
The peak amplitude of an ECG signal is in the range of 1 mV, so an ECG ampli-
fier typically has a gain of about 1,000 in order to bring the peak signal into a
range of about 1 V.
0
–3
0 0.5 17 50 100
0.05
Frequency (Hz)
Figure 2.21 Bandwidths used in electrocardiography. The standard clinical bandwidth for the
12-lead clinical ECG is 0.05–100 Hz. Monitoring systems typically use a bandwidth of 0.5–50
Hz. Cardiotachometers for heart rate determination of subjects with predominantly normal beats
use a simple bandpass filter centered at 17 Hz and with a Q of about 3 or 4.
44 Biomedical Digital Signal Processing
In this laboratory you will study the characteristics of four types of analog filters:
low-pass, high-pass, bandpass and bandstop. You will use these filters to build an
ECG amplifier. Next you will study the application of a bandpass filter in a QRS
detector circuit, which produces a pulse for each occurrence of a QRS complex.
Note that you have to build all the circuits yourself.
2.4.1 Equipment
Low-pass filter/integrator
Figure 2.22(a) shows the circuit for a low-pass filter. The low-frequency gain, A L,
is given by
R2
AL = – R (2.15)
1
The negative sign results because the op amp is in an inverting amplifier configura-
tion. The high-corner frequency is given by
1
fh = 2R2C1 (2.16)
A low-pass filter acts like an integrator at high frequencies. The integrator output is
given by
1
V 0= – 1 + j R 1C1 V i
1
= – R 1C1 V i dt (2.17)
1.5 nF 47 pF
1 M 1 M
10 k 10 k 470 nF
Vi – Vi –
Vo
+ +
(a) (b)
10 nF 820 k
Vi –
68 k 10 nF Vo
+
120 k
(c)
–
2.2 M 2.2 M Vo
Vi +
1.3 nF 1.3 nF
1 M 2.5 nF
–
+
10 k
(d)
Figure 2.22 Analog filters. (a) Low-pass filter (integrator). (b) High-pass filter (differentiator).
(c) Bandpass filter. (d) Bandstop (notch) filter.
This can be verified by observing the phase shift of the output with respect to the
input. For a sinusoidal signal, the output is shifted by 90˚
46 Biomedical Digital Signal Processing
v v
v sin t =– cos t = sin( t + 2 ) (2.18)
Thus the gain of the integrator falls at high frequencies. Also note that if R 2 were
not included in the integrator, the gain would become infinite at dc. Thus at dc the
op amp dc bias current charges the integrating capacitor C1 and saturates the
amplifier.
High-pass filter/differentiator
In contrast to the low-pass filter which acts as an integrator at high frequencies, the
high-pass filter acts like a differentiator at low frequencies. Referring to Figure
2.22(b), we get the high-frequency gain Ah and the low-corner frequency fL as
R2
Ah = – R (2.19)
1
1
fL = 2R1C1 (2.20)
The differentiating behavior of the high-pass filter at low frequencies can be veri-
fied by deriving equations as was done for the integrator. Capacitor C2 is added to
improve the stability of the differentiator. The differentiator gain increases with
frequency, up to the low-corner frequency.
Bandpass filter
The circuit we will use is illustrated in Figure 2.22(c). The gain of a bandpass filter
is maximum at the center frequency and falls off on either side of the center
frequency. The bandwidth of a bandpass filter is defined as the difference between
the two corner frequencies. The Q of a bandpass filter is defined as
center frequency
Q= bandwidth (2.21)
Bandstop/notch filter
ECG amplifier
QRS detector
Figures 2.24 and 2.25 show the block diagram and complete schematic for the
QRS detector. The QRS detector consists of the following five units:
1. QRS filter. The power spectrum of a normal ECG signal has the greatest signal-
to-noise ratio at about 17 Hz. Therefore to detect the QRS complex, the ECG is
passed through a bandpass filter with a center frequency of 17 Hz and a band-
width of 6 Hz. This filter has a large amount of ringing in its output.
2. Half-wave rectifier. The filtered QRS is half-wave rectified, to be subsequently
compared with a threshold voltage generated by the detector circuit.
3. Threshold circuit. The peak voltage of the rectified and filtered ECG is stored
on a capacitor. A fraction of this voltage (threshold voltage) is compared with
the filtered and rectified ECG output.
4. Comparator. The QRS pulse is detected when the threshold voltage is exceeded.
The capacitor recharges to a new threshold voltage after every pulse. Hence a
new threshold determined from the past history of the signal is generated after
every pulse.
5. Monostable. A 200-ms pulse is generated for every QRS complex detected.
This pulse drives a LED.
Some patients have a cardiac pacemaker. Since sharp pulses of the pacemaker
can cause spurious QRS pulse detection, a circuit is often included to reject pace-
maker pulses. The rejection is achieved by limiting the slew rate of the amplifier.
48 Biomedical Digital Signal Processing
10 k
RA + 10 k
–
22 pF 47 k
22 k
–
10 k
+
22 k
– 10 k
10 k
LA +
10 k
22 pF
43 k
10 k
RL
0.01 F
4.7 k
150 k
3.3 M
–
1 F
Vo
+
3.3 M
Reset
ECG Half-wave
QRS filter rectifier
amplifier
TP4
TP5 TP6
Threshold
circuit Comparator Monostable
TP5 +5 V TP6
+ –
4,8 QRS OUT
2 3
– +
+5 V
1 k
555
820 k 5
100 k
TP4 6,7
1 F 1 10 nF
+
330 k 1.8 F
Build all the circuits described above using the LM324 quad operational amplifier
integrated circuit shown in Figure 2.26.
Gnd
14 13 12 11 10 9 8
– –
+ +
+ +
– –
1 2 3 4 5 6 7
+5 V
Figure 2.26 Pinout of the LM324 quad operational amplifier integrated circuit.
Low-pass filter
1. Turn on the power to the filter board. Feed a sinusoidal signal of the least pos-
sible amplitude generated by the signal generator at 10 Hz into the integrator
input and observe both the input and the output on the oscilloscope. Calculate
the gain.
2. Starting with a frequency of 10 Hz, increase the signal frequency in steps of 10
Hz up to 200 Hz and record the output at each frequency. You will use these
values to plot a graph of the output voltage versus frequency. Next, find the
generator frequency for which the output is 0.707-times that observed at 10 Hz.
This is the –3 dB point or the high-corner frequency. Record this value.
3. Verify the operation of a low-pass filter as an integrator at high frequencies by
observing the phase shift between the input and the output. Record the phase
shift at the high-corner frequency.
High-pass filter
1. Feed a sinusoidal signal of the least possible amplitude generated by the signal
generator at 200 Hz into the differentiator input and observe both the input and
the output on the oscilloscope. Calculate the gain.
2. Starting with a frequency of 200 Hz, decrease the signal frequency in steps of
20 Hz to near dc and record the output at each frequency. You will use these
values to plot a graph of the output voltage versus frequency. Next find the gen-
erator frequency for which the output is 0.707-times that observed at 200 Hz.
This is the 3 dB point or the low-corner frequency. Record this value.
Electrocardiography 51
For a 1-V p-p sinusoidal signal, vary the frequency from 10–150 Hz. Record the
high- and low-corner frequencies. Find the center frequency and the passband
gain of this filter.
Bandstop/notch filter
Feed a 1-V p-p 60-Hz sinusoidal signal into the filter, and measure the output
voltage. Repeat the same for a 100-Hz sinusoid. Record results.
ECG amplifier
1. Connect LA and RA inputs of the amplifier to ground and observe the output.
Adjust the 100-k pot to null the offset voltage.
2. Connect LA and RA inputs to the signal high and the RL input to signal high
(60 Hz) and RL to signal low. This is the common mode operation. Calculate
the common mode gain.
3. Connect the LA input to the signal high (30 Hz) and the RA input to the signal
low (through an attenuator to avoid saturation). This is the differential mode
operation. Calculate the differential mode gain.
4. Find the frequency response of the amplifier.
5. Connect three electrodes to your body. Connect these electrodes to the amplifier
inputs. Observe the amplifier output. If the signal is very noisy, try twisting the
leads together. When you get a good signal, get a recording on the chart
recorder.
QRS detector
1. Apply three ECG electrodes. Connect the electrodes to the input of the ECG
amplifier board. Turn on the power to the board and observe the output of the
ECG amplifier on the oscilloscope. Try pressing the electrodes if there is ex-
cessive noise.
2. Connect the output of the ECG amplifier to the input of the QRS detector board.
Observe the following signals on the oscilloscope and then record them on a
stripchart recorder with the ECG (TP1) on one channel and each of the other
test signals (TP2–TP6) on the other channel. Use a reasonably fast paper speed
(e.g., 25 mm/s).
52 Biomedical Digital Signal Processing
Signals to be observed:
Test point Signal
2
also. In nerve and muscle cells the impulse generated by depolarisation of the cells can be
passed from one cell to the next via axons and synapses, so that the stimulus passes along a
nerve or muscle fibre as a wave with a repolarisation wave following behind.
A cell in its resting state is said to be polarized. Most cells maintain a resting potential of the
order of −60 to −100 mV until some disturbance or stimulus upsets the equilibrium. When a
cell is excited by ionic currents or an external stimulus, the membrane changes its
characteristics. It begins to allow Na+ ions to enter the cell.This movement of Na+ ions
constitutes an ionic current, which further reduces the membrane barrier to Na+ ions.
K+ ions try to leave the cell as they were in higher concentration inside the cell in the
preceding resting state, but cannot move as fast as the Na+ ions. Net result is the inside of the
cell becomes positive
with respect to the outside due to an imbalance of K+. New state of equilibrium is reached
after the rush of Na+ ions stops. It represents the beginning of the action potential, with a
peak value of about +20 mV for most cells. An excited cell displaying an action potential is
said to be depolarized, this process is called depolarization.
After a certain period of being in the depolarized state the cell becomes polarized again and
returns to its resting potential via a process known as repolarization. Principal ions involved in
repolarization are K+. Voltage dependent K+ channels changes membrane permeability for
K+. K+ concentration is much higher inside the cell: net efflux of K+ from the cell,the inside
becomes more negative, effecting repolarization back to the resting potential. Nerve and
muscle cells repolarize rapidly: action potential duration of about 1 ms. Heart muscle cells
repolarize slowly: action potential duration of 150 − 300 ms
3
1.2 Electro-Neurogram
The ENG is an electrical signal observed as a stimulus and the associated nerve action
potential propagate over the length of nerve. ENGs may be recorded using contcentric needle
electrodes or Ag-AgCl electrodes at the surface of the body. In order to minimize muscle
contraction strong but short stimulus is applied (100 V amplitude, 100-300 μs). ENGs have
amplitudes of the order of 10 μV. Conduction velocity in a peripheral nerve measured by
stimulating a motor nerve and measuring the related activity at two points at known distances
along its course.
Stimulus: 100 V , 100 − 300μs. ENG amplitude: 10 μV ;
Amplifier gain: 2, 000; Bandwidth 10 − 10, 000 Hz.
1.3 Electro-oculogram
An electrooculogram is a signal that can be used for measuring the resting potential of the
retina in the eye. The human eye is polarized, with the front of the eye being positive and the
back of the eye being negative. This is caused by a concentration of negatively charged nerves
in the retina on the back of the eye. As the eye moves the negative pole moves relative to the
4
face and this change in the dipole potential can be measured on the skin in micro volts. To
translate this voltage into a position, two sets of electrodes are used to measure the differential
voltage in the vertical and horizontal direction.
There are four different types of conjugate eye movements. These eye movements fall into
two specific categories:
This potential difference sets up an electrical field in the tissues surrounding the eye. As the
eye rotates, the field vector rotates correspondingly. Therefore, eye movements can be
detected by placing electrodes on the skin in the area of the head around the eyes. Vertical
movements of the eyes are best measured by placing the electrodes on the lids, while
horizontal eye movements can be best measured by placing the electrodes on the external
canthi (the bone on the side of the eye).
5
The underlying assumption of this method of recording eye movements is that the movement of
the electric field in the conducting tissues surrounding the eye is related, in a simple (usually
assumed to be linear) way to the movements of the eye itself. Due to the non-uniformity of these
tissues and the shapes of the tissues surrounding them, this can only be an approximation to the
biological reality. However, for horizontal eye movements within the range of 30 degrees, the
potential measured is assumed to be linear to the actual movement of the eye in the orbit. The
resolution of EOG is considered to be about 1 degree. Because it is a relatively simple technique,
EOG is still commonly used clinically for testing eye movements in patients.
For a fixed eye position, the EOG is far from being constant in magnitude, but can be
1.5.1 The noise generated between the electrodes' contacts and the skin
1.5.2 The metabolic state of the tissues (pO2, pCO2, and temperature)
1.5.3 Visual stimulation
1.5.4 Contraction of facial muscles
In addition, recorded EOG, particularly for vertical eye movements, is quite sensitive
to movements of the eye lids. In summary there are a number of external factors which can
complicate the interpretation of the EOG, and for that reason EOG is considered highly
sensitive to artifacts. The considerable artifacts which can be introduced through the contact
between the electrode contacts and the skin can be minimized by reducing the resistance
between the electrodes and the skin.
1.4 Electro-encephalogram
EEG or brainwaves represent the electricalactivityofthebrain.
Main parts ofthe brain are : Zerebrum,
cerebellum,
brainstem(midbrain,ponsmedulla,
reticularformation),
thalamus
(betweenthe midbrainandthehemispheres).
6
Fig. 1.4 Structure of Human Brain
Cerebrum is divided into two hemispheres which is separated by a longitudinal fissure with a
large connective band of fibers:corpus callosum. Outer surface of the cerebral
hemispheres(cerebralcortex) compose of neurons(greymatter) in convoluted patterns,
separated into regions by fissures(sulci). Beneath the cortex lie nerve fibers that lead to other
parts of the brain and the body (whitematter). Cortical potentials generated due to excitatory
and inhibitory post-synaptic potentials are developed by cell bodies and dendrites of
pyramidal neurons. Physiological control processes, thought processes, and external stimuli
generate signals in the corresponding parts of the brain.
7
Evocative techniques for recording the EEG are given below:
Initial recording at rest (eyesopen,eyesclosed), hyperventilation (after breathing at 20
respirations per minute for 2–4 minutes), photic stimulation (with 1–50 flashes of light per
second), auditory stimulation with loud clicks, sleep (different stages),and pharmaceuticals or
drugs
EEG rhythms or frequency bands are classified as:
Delta(δ): 0.5 ≤ f< 4 Hz; Theta(θ): 4 ≤ f< 8 Hz; Alpha(α): 8 ≤ f ≤ 13 Hz;and Beta(β): f> 13 Hz.
EEG rhythms are associated with physiological and mental processes. Alpha wave represents
principal resting rhythm of the brain. It is common in wakeful, resting adults, especially in the
occipital area with bilateral synchrony. Auditory and mental arithmetic tasks with the eyes
closed lead to strong alpha waves. These are suppressed when the eyes are opened. Alpha
wave is replaced by slower rhythms at various stages of sleep. Theta waves represents the
beginning stages of sleep. Delta waves represents deep-sleep stages. High-frequency beta
waves shows the background activity in tense and anxious subjects.
Spikes and sharp waves represents epileptogenic regions.
8
upon the physical characteristics of the stimulus. Longer-latency ERPs are influenced by the
conditions of presentation of the stimuli. Somato sensory evoked potentials are useful forn on
invasive evaluation of the nervoussystem from a peripheral receptor to the cerebral cortex.
Median nerveshort-latency SEPs are obtained by placing stimulating electrodes 2−3 cm apart
over the median nerve at the wrist with electrical stimulation at 5−10 pps, each stimulus pulse
less than 0.5 ms,about 100 V (producingavisiblethumbtwitch). SEPs recorded from the
surface of the scalp. Latency, duration, and amplitude of the response measured.
1.5 Electro-cardiogram
The cardiovascular system of the human body is essentially one of the heart acting as a
pump to force blood around the body. The blood acts as a transport system to carry oxygen,
nutrients and chemical agents to all organs, limbs and tissue in the body as well as to transport
waste products and toxins to organs for disposal. In fact, the heart actually operates as a
double pump and the circulatory system consists of two separate circuits as shown in Fig.7.
The heart has four chambers, the left and right atria on top and the left and right ventricles on
the bottom.
Blood is gathered from all parts of the body into the right atrium, from whence it is then
transferred to the right ventricle. The right ventricle contracts to force blood out to the lungs
where carbon dioxide is removed from it and fresh oxygen is absorbed. From the lungs the re-
oxygenated blood travels back to the heart and into the left atrium. This loop is called the
pulmonary circulation. Blood is then transferred to the right ventricle, which contracts with
strength to force the blood out under pressure to all limbs and organs in the body. Once
oxygen and nutrients have been distributed via the blood to nourish all of the cells around the
body and waste products have been collected and delivered for excretion, the blood returns to
the right atrium again. The continuous rhythmic pumping of the heart is caused by
contractions of the muscles within the walls of each chamber which pumps blood from
chamber to chamber and throughout the circulatory system. These cardiac rhythms are
controlled by specific mechanisms operating within in the heart that transmit action
potentials or electrical impulses along nerve fibres to the cells within the muscles in order to
activate them at the appropriate points in the cardiac cycle.
9
Fig. 1.7 Human Heart
Electro-stimulation of the Heart
Figure shows the main elements of the heart’s electro-conduction system. The sino-atrial (SA)
node is a group of cells located in the upper right atrium. This node contains special
10
allow the atria transfer their contents to the ventricles before the latter contract due to the
approaching action potential, the AV node operates as a delay unit slowing down the
transmission of the action potential by a further 110 ms before the stimulus is passed on by
the AV node. The impulse is then transferred from the AV node towards the ventricles via a
branch of fibres known as the Bundle of His which splits into left and right bundle branches.
Once the impulse reaches the left and right bundle branches it travels very quickly via
the Purkinje Fibres which excite the muscles in the walls of the ventricles from the bottom
upwards. The impulse can reach the furthest fibres just 60 ms after leaving the AV node. The
action potential now causes ventricular contraction which forces the blood from the ventricles
out into the pulmonary and systemic circulations. The excitation of such a large number of
cells at the same time creates a significant electrical signal and a resulting electric field which
is emitted outward from the heart to the surface of the body. These emanating electric signals
can be detected using electrodes placed on the surface of the body i.e. on the subject's chest or
limbs. The recorded electrical signal detected in this manner is what is known today as the
Electrocardiogram or ECG signal.
An idealised human ECG is shown in Fig. 9. It can be seen that there are several
distinct components which make up the entire signal profile that is measured over a single
complete cardiac cycle. The main components are identified as the P-wave, The QRS
complex and the T-wave. Other segments and intervals which have a clinical importance from
a diagnostic are defined. The amplitude of the QRS complex of a signal measured on a
subject’s chest is typically between 1 – 5 mV.
The different components of the ECG correspond to different events occurring in the heart
over a cardiac cycle. The P wave is associated with the depolarisation of the cells in the
muscles of the atria which cause the atria to contract and transfer blood to the ventricles. The
QRS complex corresponds to the sharp depolarisation of the cells in the numerous and strong
11
muscles of the ventricles. This period is known as ventricular systole. The repolarisation of
the cells in the atrial muscles is masked by the QRS complex and cannot be observed
independently. The T-wave corresponds to the repolarisation of the cells in the ventricular
muscles during their resting phase known as ventricular diastole. The duration, shape and
rhythm of these components and of the segments between them can provide invaluable insight
into the state of the heart and the cardiovascular system. Einthoven developed the Leads
known as the Einthoven triangle comprising Lead I, II and III as indicated which represent
different pairings of the electrodes, each providing a different aspect of the electrical activity
in the heart.
1.6 Electro-gastrogram
EGG, similar to an electorcardiogram (EKG) of the heart, records the electrical signals that
travel through the muscles of the stomach controlling the muscles’ contractions. Additionally,
EGG measures stomach wall nerve activity before and after food ingestion. EGG has existed
in the past, but was cumbersome, recording only one electrical channel at a time. Therefore
there was little capability for muscle activity comparison and in order to record electrical
signals in various parts of the stomach needed to be repeated numerous times. The new EGG
12
system records on four channels simultaneously allowing for complete activity recording in a
short time frame.
EGG is a non-invasive test, relatively inexpensive, and easy to perform. Electrodes are placed
cutaniously on the abdominal skin over the stomach. While the patient is lying down relaxing,
the electrodes record the electrical activity of the stomach. Initially, the gastric electrical
activity is recorded after fasting, then again after a small meal is ingested. Sometimes EGG is
done in conjunction with or after gastric emptying studies to diagnose and manage functional
dyspepsia and idiopathic gastroparesis. The EGG test lasts approximately one hour.
EGG is an appropriate diagnostic tool when there is a suspicion that the nerves controlling
stomach muscles or the stomach muscles themselves are not working normally. EGG can be
used for a variety of gastrointestinal motility disorders or for patients with no known GI
disorder who are suffering from unexplained nausea. EGG frequently identifies dysrhythmias,
especially after meals, in patients with gastroparesis, chronic dyspepsia, anorexia nervosa and
bulimia, cyclic vomiting syndrome, and other conditions characterized by a delayed gastric
emptying.
Gastric myoelectric activity is composed of mainly two complementary rhythms; slow
wave activity, responsible for muscle contraction timing, and electrical response activity,
responsible for triggering peristaltic contractions. EGG measures too much activity,
tachygastria, too little activity, bradygastria, or mixed dysfunction of both too much and too
little activity.
Utilizing computer analysis, the power of the stomach muscle electrical current is
measured. In a normal stomach muscle, the regular electrical rhythm generates an increased
current after a meal. In persons with stomach muscle or nerve irregularities, the post-meal
electrical rhythm is irregular or voltage does not increase.
1.7 Bio-impedance signals
Bioimpedance is a physiological property related to a tissue’s resistance to electrical current
flow and its ability to store electrical charge. In human applications, it is typically measured
through metallic electrodes (transducers) placed on the skin and around an anatomic location
of interest (e.g., the wrist). These electrical properties are predominantly a function of the
underlying tissue being gauged, including the specific tissue types present (blood, adipose,
muscle, bone, etc.), the anatomic configuration (i.e., bone or muscle orientation and quantity),
and the state of the tissue (normal or osteoporotic bone, edematous vs. normally hydrated
tissue, etc). Significant impedance differences exist between the varying tissue types,
anatomic configurations, and tissue state, each of which may provide a unique mechanism for
13
1.8 Objectives of biomedical signal analysis
14
Fig.1.11 Computer-aided diagnosis and therapy based upon biomedical signal analysis
15