Tải bản đầy đủ (.pdf) (400 trang)

goldberger, ng - practical signal and image processing in clinical cardiology

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (21.32 MB, 400 trang )

Practical Signal and Image Processing in Clinical Cardiology
Jeffrey J. Goldberger • Jason Ng (Eds.)
Practical Signal
and Image Processing
in Clinical Cardiology
Jeffrey J. Goldberger
Jason Ng
Northwestern University
Feinberg School of Medicine
Division of Cardiology
251 East Huron
Feinberg Pavilion
Suite 8-503
60611 Chicago Illinois
USA
ISBN: 978-1-84882-514-7 e-ISBN: 978-1-84882-515-4
DOI: 10.1007/978-1-84882-515-4
Springer Dordrecht Heidelberg London New York
British Library Cataloguing in Publication Data
A catalogue record for this book is available from the British Library
Library of Congress Control Number: 2010929047
© Springer-Verlag London Limited 2010
Apart from any fair dealing for the purposes of research or private study, or criticism or review, as per-
mitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced,
stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers,
or in the case of reprographic reproduction in accordance with the terms of licences issued by the
Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to
the publishers.
The use of registered names, trademarks, etc. in this publication does not imply, even in the absence of a
specic statement, that such names are exempt from the relevant laws and regulations and therefore free


for general use.
Product liability: The publisher can give no guarantee for information about drug dosage and application
thereof contained in this book. In every individual case the respective user must check its accuracy by
consulting other pharmaceutical literature.
Cover design: eStudioCalamar, Figueres/Berlin
Printed on acid-free paper
Springer is part of Springer Science+Business Media (www.springer.com)
v
Foreword
Wikipedia states that “Signal processing is an area of electrical engineering, systems engi-
neering and applied mathematics that deals with operations on or analysis of signals, in
either discrete or continuous time to perform useful operations on those signals.” How
boring is that? But then, it goes on to say, “Signals of interest can include sound, images,
time-varying measurement values and sensor data, for example, biological data such as
electrocardiograms, control system signals, telecommunication transmission signals such
as radio signals, and many others.” Now that is getting interesting because if you stop to
think about it, we live in an era surrounded by signals. In fact, we are assailed by them.
These ubiquitous devices are attached to the jacket you tried on in the department store or
the book you read while drinking the espresso to ensure that you don’t leave without pay-
ing for each; they are in the windshield of the taxi as it automatically registers the bridge
toll; they are a part of the identication system used to track your FedEx package and in
the handheld credit card payment device to pay for the rental car. We are bombarded with
signals from iPhones and BlackBerrys, from automobile dashboards warning that the trunk
is open or the tires need air, from the GPS to make a left turn, and from the kitchen oven
that the roast is cooked. The signals are processed, as the editors state in their preface, “for
the purposes of recording, analysis, transmission, and storage.” This is true whether you
are an astronaut in a space ship or a physician evaluating a patient in the CCU or device
clinic. So, all of a sudden signals take on a much more personal importance.
Imagine medicine without signals. Impossible! That hit home recently when I had an
MRI after I tripped down a short ight of stairs, landing on my hip. In the magnetic tunnel

with the whirring and growling rolling over me like undulating storm clouds, I reected on
the incredible advances of signal processing that would show I just had a bruised hip.
So, now we have a book to explain it all to us, thanks to Drs. Ng and Goldberger. In the
rst half, they provide an overview of general signal processing concepts and then turn to
additional experts in the second half to tell us about the clinical application of these signals
for cardiac electrical activity, hemodynamics, heart sounds, and imaging.
vi Foreword
While reading this book will not make you a biomedical engineer, it will provide you
with an insight into which signals to believe and which to ignore. A medical maxim is that
the only thing worse than no data is wrong data. This book will help you make that
distinction.
Douglas P. Zipes, MD
Distinguished Professor
Indiana University School of Medicine
Krannert Institute of Cardiology, suite E315
1800 North Capitol Avenue
Indianapolis, IN 46202, USA
vii
Preface
Signal processing is the means and methodology of handling, manipulating, and convert-
ing signals for the purposes of recording, analysis, transmission, and storage. Signals,
particularly in the context of the biomedical eld, are recorded for the presentation and
often the quantication of some physical phenomena for the purposes of directly or indi-
rectly obtaining information about the phenomena. There may not be a medical specialty
that relies on the acquisition, recording, and displaying of signals more than cardiology.
We have come a long way from the days when stethoscopes and blood pressure cuffs were
the only diagnostic equipment available to assess the cardiovascular system of a patient.
Imagine modern cardiology without electrocardiograms, continuous blood pressure moni-
toring, intracardiac electrograms, echocardiograms, and MRIs. In fact, these technologies
have become so ubiquitous that interpretation of these signals is often performed with little

understanding of how these signals are obtained and processed.
Why then would the understanding of signal and image processing be important for a
clinician, nurse, or technician in cardiology? Electrocardiograms, for example, can be
practically performed with a touch of a button providing a near instantaneous report. Why
does it matter how the machine was able to come to the conclusion that the patient had a
heart rate of 65 beats/min or a QT interval of 445 ms? The effects of signal processing can
appear mysterious and it is tempting to consider that this aspect is best left for engineers
and researchers who have technical and mathematical backgrounds. One reason why a
better understanding of signal processing would be benecial is that these technologies
used in cardiology all have their own strengths and limitations. For example, a surface
electrocardiogram signal may look “noisy” because of motion artifact or poor electrode
contact. Changing lter settings can make a signal look much cleaner. These settings,
however, may also result in distortion or loss of important information from the signal of
interest. Understanding of lters and the frequency content of signals may help determin-
ing the proper balance between acceptable noise and the acceptable amount of distortion
of the waveform. This is only one example of the importance of understanding the process
of obtaining the signal or image, as judging signal quality is often more important than
how “clean” a signal or image looks.
More advanced signal processing is also essential in cardiovascular imaging and a vari-
ety of advanced electrocardiographic techniques, such as heart rate variability, signal-aver-
aged ECGs, and T-wave alternans. The role of processing is to enhance, embellish, or
viii Preface
uncover the signal of interest among a variety of other signals, both physiologic and non-
physiologic. By denition, the more a signal is processed, the more deviation there will be
from the raw signal. The interpreter must therefore be able to assess whether this deviation
is desirable or undesirable. Understanding the signal processing used in these methods will
allow the interpreter to understand the issues that are created with signal processing.
The aim of this book is to provide those in the cardiology eld an opportunity to learn
the basics of signal and image processing without requiring extensive technical or mathe-
matical background. We feel that the saying “a picture is worth a thousand words” is par-

ticularly applicable for the purposes of this book. Therefore most of the concepts will be
conveyed through illustrative examples. Although this book is geared towards the clinical
cardiologist, a beginner in the biomedical engineering eld may also nd the review of
concepts useful before requiring a more in-depth signal processing text. Signal processing
is an extremely interesting and thought-provoking subject.
The rst half of the book is an overview of general signal processing concepts. In Chap. 1,
the architecture of a digital physiologic recording system will be described. The reader will
understand the commonality in how all the main cardiology diagnostic systems are put
together. In Chap. 2, the fundamentals of analog and digital signals, the reasons why we use
them, and the advantages and disadvantages of both will be discussed. In Chap. 3, we will go
through what it means to analyze signals in the time domain and frequency domain. In Chap.
4, we will discuss lters, why they are so important to recording systems, and the interpreta-
tion of signals. Chapters 5 and 6 discuss ways to detect events such as the heart beat and how
the rate of events can be estimated. Chapter 7 then describes the technique of signal averag-
ing, a common method used to improve signal quality. The topic of Chap. 8 is compression,
which describes the methods by which digital data can be reduced in size to facilitate storage
and transmission. And nally, Chap. 9 shows how the previously described concepts and
techniques can be applied to two-dimensional images.
The second half of the book is devoted to discussions on how signal and image process-
ing is used in the specic modalities of cardiac instrumentation. The modalities which
utilize one-dimensional signals include the electrocardiogram, invasive and noninvasive
blood pressure measurement, pulse oximetry, intracardiac electrograms, and stethoscope.
The two (or three)-dimensional modalities include coronary angiograms, ultrasound, mag-
netic resonance imaging, nuclear imaging, and computed tomography.
We hope that this text will not only enhance the reader’s knowledge for clinical and
research purposes, but also provide an enjoyable reading experience.
Chicago, IL, USA Jason Ng and Jeffrey J. Goldberger
ix
Acknowledgments
The editors would like to acknowledge the following individuals who offered their assis-

tance and support for this book: Grant Weston and Cate Rogers at Springer Publishing for
their guidance through this whole process, the Cardiology division and section of Cardiac
Electrophysiology at Northwestern, Valaree Walker Williams for her administrative sup-
port, Vinay Sehgal for his review, the Goldberger family including, Sharon, Adina, Sara,
Michale, Akiva, and Mom and Dad and the Ng family, including Pei-hsun, Mary Esther,
Mom, Dad, and Justin, for their wonderful support and patience during this project, and to
the many colleagues and friends who provided their encouragement for both of us.
Chicago, IL, USA Jason Ng and Jeffrey J. Goldberger
xi
Contents
Part I Fundamental Signal and Image Processing Concepts 1
1 Architecture of the Basic Physiologic Recorder 3
Jason Ng and Jeffrey J. Goldberger
2 Analog and Digital Signals 9
Jason Ng and Jeffrey J. Goldberger
3 Signals in the Frequency Domain 17
Jason Ng and Jeffrey J. Goldberger
4 Filters 27
Jason Ng and Jeffrey J. Goldberger
5 Techniques for Event and Feature Detection 43
Jason Ng and Jeffrey J. Goldberger
6 Alternative Techniques for Rate Estimation 57
Jason Ng and Jeffrey J. Goldberger
7 Signal Averaging for Noise Reduction 69
Jason Ng and Jeffrey J. Goldberger
8 Data Compression 79
Jason Ng and Jeffrey J. Goldberger
9 Image Processing 89
Jason Ng and Jeffrey J. Goldberger
Part II Cardiology Applications 111

10 Electrocardiography 113
James E. Rosenthal
11 Intravascular and Intracardiac Pressure Measurement 133
Clifford R. Greyson
12 Blood Pressure and Pulse Oximetry 145
Grace M.N. Mirsky and Alan V. Sahakian
13 Coronary Angiography 157
Shiuh-Yung James Chen and John D. Carroll
14 Echocardiography 187
John Edward Abellera Blair and Vera H. Rigolin
15 Nuclear Cardiology: SPECT and PET 219
Nils P. Johnson, Scott M. Leonard and K. Lance Gould
16 Magnetic Resonance Imaging 251
Daniel C. Lee and Timothy J. Carroll
17 Computed Tomography 275
John Joseph Sheehan, Jennifer Ilene Berliner, Karin Dill,
and James Christian Carr
18 ECG Telemetry and Long Term Electrocardiography 303
Eugene Greenstein and James E. Rosenthal
19 Intracardiac Electrograms 319
Alexandru B. Chicos and Alan H. Kadish
20 Advanced Signal Processing Applications of the ECG: T-Wave Alternans,
Heart Rate Variability, and the Signal Averaged ECG 347
Ashwani P. Sastry and Sanjiv M. Narayan
21 Digital Stethoscopes 379
Indranil Sen-Gupta and Jason Ng
Index 391
xii Contents
xiii
Contributors

Jennifer I. Berliner
Department of Medicine,
Division of Cardiology,
University of Pittsburgh Medical Center,
Pittsburgh, PA, USA
John E.A. Blair
Department of Medicine,
Division of Cardiology,
Wilford Hall Medical Center;
Lackland, AFB, TX and
Uniformed Services University of
the Health Sciences, Bethesda, MD
James C. Carr
Department of Cardiovascular Imaging,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
John D. Carroll
Department of Medicine,
Anschutz Medical Campus,
University of Colorado Denver,
Aurora, CO, USA
Timothy J. Carroll
Departments of Biomedical Engineering
and Radiology, Northwestern University,
Chicago, IL, USA
Shiuh-Yung James Chen
Department of Medicine,
Anschutz Medical Campus,
University of Colorado Denver,

Aurora, CO, USA
Alexandru B. Chicos
Department of Medicine,
Division of Cardiology,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Karin Dill
Department of Cardiovascular Imaging,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Jeffrey J. Goldberger
Northwestern University,
Feinberg School of Medicine,
Division of Cardiology,
Department of Medicine,
Chicago, IL, USA
K. Lance Gould
Department of Medicine,
Division of Cardiology, Weatherhead P.E.T.
Center For Preventing and Reversing
Atherosclerosis, University of Texas
Medical School and Memorial Hermann
Hospital, Houston, TX, USA
xiv Contributors
Eugene Greenstein
Division of Cardiology,
Feinberg School of Medicine,
Northwestern University,

Chicago, IL, USA
Clifford R. Greyson
Denver Department of Veterans
Affairs Medical Center,
University of Colorado at Denver,
Denver, CO 80220, USA
Nils P. Johnson
Department of Medicine,
Division of Cardiology,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Alan H. Kadish
Division of Cardiology,
Feinberg School of Medicine,
Northwestern University
Chicago, IL, USA
Daniel C. Lee
Division of Cardiology,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Scott M. Leonard
Manager Nuclear Cardiology Labs (FLSA),
Myocardial Imaging Research Laboratory,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Sanjiv M. Narayan
Division of Cardiology,

University of California San Diego and
VA Medical Center, La Jolla,
CA, USA
Jason Ng
Northwestern University,
Feinberg School of Medicine,
Division of Cardiology,
Department of Medicine,
Chicago, IL, USA
Grace M.N. Mirsky
McCormick School of Engineering,
Northwestern University, Evanston,
IL, USA
Vera H. Rigolin
Department of Medicine,
Division of Cardiology,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
James E. Rosenthal
Department of Medicine,
Division of Cardiology,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Alan V. Sahakian
Department of Electrical Engineering and
Computer Science, Department of
Biomedical Engineering, McCormick
School of Engineering, Northwestern

University,
Evanston, IL, USA
Ashwani P. Sastry
Division of Cardiology,
Duke University Medical Center,
Durham, NC
Indranil Sen-Gupta
Division of Neurology,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Contributors xv
John J. Sheehan
Department of Cardiovascular Imaging,
Feinberg School of Medicine,
Northwestern University,
Chicago, IL, USA
Part
Fundamental Signal and Image
Processing Concepts
I
3
J.J. Goldberger and J. Ng (eds.),
Practical Signal and Image Processing in Clinical Cardiology,
DOI: 10.1007/978-1-84882-515-4_1, © Springer-Verlag London Limited 2010
Architecture of the Basic
Physiologic Recorder
Jason Ng and Jeffrey J. Goldberger
1
1.1

Chapter Objectives
Signals are acquired from medical instrumentation of many different types. They can be as
small as a digital thermometer or as big as a magnetic resonance scanner. In spite of the
differences in size, cost, and the type of data these devices obtain, most biomedical devices
that acquire physiologic data have the same basic structure. The structure of what we will
call the basic digital physiologic recording system will be described in this section with the
details of each of the processes in the following sections. A block diagram of the basic
digital physiologic recording system is shown in Fig. 1.1.
By the end of the chapter, the reader should know and understand the functions of these
general components found in most medical instrumentation used to acquire physiologic
signals.
1.2
Transducers
The rst element shown in the block diagram is the transducer. The transducer is an ele-
ment that converts some physical measurement to a voltage and electrical current that can
be processed and recorded by an electronic device. Table 1.1 provides some examples of
physiologic recording systems, the type of transducers that are used, and the physical mea-
surement that is converted to an electrical signal.
The physiologic recording systems can have from one to thousands of transducers in a
single system. An important element in how transducers obtain signals is the reference.
A reference is either a known value or a recording where a specic value, such as zero,
J. Ng (*)
Department of Medicine, Division of Cardiology, Feinberg School of Medicine,
Northwestern University, Chicago, IL, USA
e-mail:
4
J. Ng and J.J. Goldberger
is assumed. The difference between the signal obtained by the transducer and the reference
is the signal of interest. For modalities that measure potential or voltage, such as the ECG,
recording from an electrode requires a reference potential from another electrode.

Conguration of the recording electrode with the reference electrode can be close together
or far apart depending on whether local or global measurements are desired. For modalities
such as continuous blood pressure monitors or thermometers, the reference is determined
by the same transducer that is used for recording. For blood pressure monitors, calibration
is performed by recording atmospheric pressure prior to recording the arterial pressure for
each use of the monitor. For digital thermometers, the calibration is usually performed
Fig. 1.1 Block diagram of
basic digital physiologic
recording system
Table 1.1 Examples of physiologic recording systems and the corresponding transducer and physi-
ologic measurement
Physiologic recording
system
Transducer Measurement
ECG Electrode Voltage
Continuous blood
pressure recorder
Piezoelectric pressure
transducer
Pressure
Digital thermometer Thermocouple Temperature
CT Photodiode X-ray
Pulse oximeter Photodiode Light from light-emitting diode
MRI Radiofrequency antennas Radiofrequency
electromagnetic waves
Echocardiogram Piezoelectric transducer Ultrasound
5
1 Architecture of the Basic Physiologic Recorder
where the device is made by applying the transducer to known temperatures (e.g., ice water
or boiling water). The reference is then programmed into the device. Because temperature

is an absolute measurement, no further calibration is needed. For imaging modalities, such
as X-ray or CT, an array of detectors are used. Two levels of references are required. First,
each detector element in the array must be identically calibrated, meaning the same level of
X-ray exposure must produce the same output for each detector element. This calibration
would be typically performed in the factory. Second, during the acquisition of the image,
the output of the detectors by themselves does not provide very meaningful information
when analyzed individually. However, when each detector output is referenced with that of
every other detector, an image is formed that will allow differentiation of tissue.
1.3
Amplifiers
The electric signals produced with the transducer are typically very small continuous
waveforms. These continuous signals are known as analog signals. Modern biomedical
instrumentation converts analog signals to a discrete or digital form, so that signal process-
ing and storage can be performed by microprocessors and digital memory. Because the
small amplitude of the signals from the transducer may make it difcult to convert
the analog signal into a digital signal without error or distortion, often the next step after
the transducer is amplication to increase the amplitude of the signal closer to the range
that is better handled by the analog-to-digital conversion circuitry. This amplication is
usually performed by a group of transistors and resistors. Sometimes the device has vari-
able resistors or switches that allow the user to manually adjust the amplication. At other
times, however, the circuit can sense the amplitude of the signal and adaptively adjust the
amplication. This is known as automatic gain control.
1.4
Filters
The analog-to-digital converter not only has a desired amplitude range, but also a desired fre-
quency range that is dependent on the sampling rate of the converter. As a result, ltering is
usually performed after amplication and before conversion to reject the frequencies that are
too fast for the analog-to-digital converter to sample. This “low pass” lter is often called an
“antialiasing” lter and will be discussed in further detail in the subsequent sections. A second
type of lter that is sometimes used is a “high pass” lter, which rejects low frequencies.

Rejecting low frequencies is done to prevent baseline wander by keeping the baseline signal
near zero, thus also keeping the signal within range of the converter. For applications where the
baseline value contains information in itself (temperature readings for example), a high pass
lter is not used. High pass and low pass lters in this third stage of the digital physiologic
recording system are implemented by a network of transistors, resistors, and capacitors.
6 J. Ng and J.J. Goldberger
1.5
Analog-to-Digital Convertors
The transducers, amplier, and lters comprise the analog portion of the system. In this
portion, the signal processing is performed through electronic components such as transis-
tors, resistors, and capacitors usually without the aid of a microprocessor. The fourth stage
of the system is the analog-to-digital converter. In this stage, the signal, whose information
is contained in the voltage amplitudes and patterns, is converted into binary numbers at
discrete instances of time.
1.6
Microprocessor
Once converted, the digital signal is now in a format which a microprocessor can under-
stand. With the data in the system’s memory, additional signal processing can be per-
formed to additionally lter, detect features, or perform measurements. These operations
are performed through “software” rather than “hardware” components. Performing opera-
tions through “software” means that instructions are provided to the microprocessor to
read, write, add, and multiply the binary numbers. It is at this level where the majority of
the digital signal processing operations that are covered in this book are performed. The
microprocessor also controls how the data are displayed and stored.
Summary of Key Terms
Physiologic recording system – Device that acquires physiologic measurements

for the purposes of display, analysis, and storage.
Transducer – A material or device that converts a physiologic parameter into


another type of signal (typically voltage) that will allow signal processing by
electronic circuits.
Reference – A signal of known value or assumed value. The difference between

the recording output and the reference is the signal of interest.
Calibration – The procedure of mapping the output of a recording transducer to

known values of the phenomena to be recorded.
Antialiasing lter – A circuit that rejects high frequency components so that a

signal may be digitized without distortion.
Analog-to-digital converter – A circuit that takes samples from a continuous

waveform and quantizes the values.
Microprocessor – A digital device made up of transistors that are capable of

performing mathematical operations (e.g., addition and multiplication) and
reading, moving, and storing digital data.
71 Architecture of the Basic Physiologic Recorder
Reference
1. Webster JG, ed. Medical Instrumentation: Application and Design. New York: Wiley; 1998.
9
J.J. Goldberger and J. Ng (eds.),
Practical Signal and Image Processing in Clinical Cardiology,
DOI: 10.1007/978-1-84882-515-4_2, © Springer-Verlag London Limited 2010
Analog and Digital Signals
Jason Ng and Jeffrey J. Goldberger
2
2.1
Chapter Objectives

“Digital” has been the buzz word for the last couple of decades. The latest and greatest
electronic devices have been marketed as digital and cardiology equipment has been no
exception. “Analog” has the connotation of being old and outdated, while “digital” has
been associated with new and advanced. What do these terms actually mean and is one
really better than the other? By the end of the chapter, the reader should know what analog
and digital signals are, their respective characteristics, and the advantages and disadvan-
tages of both signal types. The reader will also understand the fundamentals of sampling,
including the trade-offs of high sampling rates and high amplitude resolution, and the
distortion that is possible with low sampling rates and low amplitude resolution.
2.2
Analog Signals
To say a signal is analog simply means that the signal is continuous in time and amplitude.
Take, for example, your standard mercury glass thermometer. This device is analog because
the temperature reading is updated constantly and changes at any time interval. A new
value of temperature can be obtained whether you look at the thermometer 1 s later, half a
second later, or a millionth of a second later, assuming temperature can change that fast.
The readings from the thermometer are also continuous in amplitude. This means that
assuming your eyes are sensitive enough to read the mercury level, readings of 37, 37.4, or
37.440183432°C are possible. In actuality, most cardiac signals of interest are analog by
nature. For example, voltages recorded on the body surface and cardiac motion are con-
tinuous functions in time and amplitude.
J. Ng ()
Department of Medicine, Division of Cardiology, Feinberg School of Medicine,
Northwestern University, Chicago, IL, USA
e-mail:
10
J. Ng and J.J. Goldberger
If the description of analog instrumentation and signals stopped here, it would seem
like this would be the ideal method to record signals. Why then have analog tape players
and VCRs been replaced by digital CD players and DVD players, if tape players can

reproduce continuous time and amplitude signals with near innite resolution? The rea-
son is that analog recording and signals suffer one major drawback – their susceptibility
to noise and distortion. Consider an audio tape with your favorite classical music perfor-
mance that you bought in the 1980s. Chances are that the audio quality has degraded
since the tape was purchased. Also consider the situation where a duplicate of the tape
was made. The copy of the tape would not have the same quality as the original. If a
duplicate of the duplicate of the duplicate was made, the imperfections of the duplication
process would add up. In an analog system, noise cannot be easily removed once it has
entered the system.
2.3
Digital Signals
Digital systems attempt to overcome the analog system’s susceptibility to noise by sacri-
cing the innite time and amplitude resolution to obtain perfect reproduction of the sig-
nal, no matter how long it has been stored or how many times it has been duplicated. That
is why your audio CD purchased in the 1990s (assuming it is not too scratched up) will
sound the same as when you rst purchased it. The advantages can also be readily seen in
the cardiology eld. For example, making photocopies of an ECG tracing will result in loss
of quality. However, printing a new copy from the saved digital le will give you a perfect
reproduction every time. The discrete time and discrete amplitude nature of the digital
signal provide a buffer to noise that may enter the system through transmission or other-
wise. Digital signals are usually stored and transmitted in the form of ones and zeros. If a
digital receiver knows that only zeros or ones are being transmitted and when approxi-
mately to expect them, there is a certain acceptable level of noise that the receiver can
handle. Consider the example in the Fig. 2.1. The top plot shows a digital series of eight
ones and zeros. This series could represent some analog value. The transmission or repro-
duction of the digital series results in noise being added to the series, such that the values
now vary around one and zero as shown in the middle plot. If a digital receiver of the
transmitted series uses the 0.5 level as the detection threshold, any value above 0.5 would
be considered a one and any value below 0.5 would be considered a zero. With this crite-
rion, all the ones and zeros would be detected correctly (bottom plot), despite the presence

of noise. Thus the received digital signal provides a more accurate representation of the
true signal of interest than would be if the analog signal itself was transmitted through the
noisy channel.
Beyond the advantages of noise robustness during reproduction and transmission, digi-
tal signals have many other advantages. These include the ability to use computer algo-
rithms to lter the signal, data compression to save storage space, and signal processing to
extract information that may not be possible through manual human analysis. Thus there
can be a large benet in converting many of the signals that are used in cardiology to digi-
tal form.
11
2 Analog and Digital Signals
2.4
Analog-to-Digital Conversion
2.4.1
Sampling
The process of converting an analog signal to a digital signal has two parts: sampling and
quantization. The sampling process converts a continuous time signal to a discrete time
signal with a dened time resolution. The time resolution is determined by what is known
as the sampling rate, usually expressing in Hertz (Hz) or samples per second. Thus if the
sampling rate is 1,000 Hz, or 1,000 times/s, this means that the signal is being sampled
every 1 ms. The sampling rate needed for a faithful reproduction of the signal depends on
the sharpness of the uctuations of the signal being sampled. An illustration of a sine wave
with the frequency of 8 Hz or 8 cycles/s that is sampled 100 times a second (100 Hz) is
shown in the top example of Fig. 2.2. As shown in the second panel, the 100 Hz sampling
takes points from the sine wave every 10 ms. Connecting the points as shown in the third
panel produces a good reproduction of the original sine wave.
The middle example of Fig. 2.2 shows the same sine wave with 25 Hz sampling. With
25 Hz sampling, the reconstructed signal is clearly not as good as when the sine wave was
sampled at 100 Hz. However, the oscillations at 8 cycles/s can still be recognized. Decreasing
Fig. 2.1 Illustration of a digital signal

transmitted through a noisy channel.
The top panel shows a plot of the eight
binary digits (amplitude values 0 or 1).
The middle panel shows the same eight
digits after transmission through a noisy
channel causing deviation from 0 and 1.
The 0.5 level represents the threshold,
above or below which a 0 or 1 is decided
by the digital receiver. The bottom panel
shows the results of the decisions, which
are equivalent to the original digital signal.
Transmitting a digitized signal through a
noisy channel usually results in a more
accurate representation of the true signal
than transmitting the original analog signal
12 J. Ng and J.J. Goldberger
the sampling rate even further can result in a completely distorted reconstruction of the
signal. The bottom example of Fig. 2.2 shows the sine wave sampled at 10 Hz. The recon-
structed signal in this case resembles a 2-Hz sine wave, rather than an 8-Hz sine wave.
Distortion to the point where the original sine wave is unrecognizable because of under-
sampling is known as aliasing. Stated differently, if the signal is changing at a frequency that
is faster than the sampling rate, important information about the signal will be lost. Consider
the three signals in Fig. 2.3 – all three have the same sampled signal, but the original signals
are not identical. This is because the signal contains high frequency components that are not
detected by the relatively low sampling rate. To prevent aliasing, the Nyquist sampling rule
states that the sampling rate must be at least twice the frequency of the sine wave. For our
example of an 8-Hz sine wave, a sampling rate of at least 16 Hz is needed to prevent aliasing.
Nonsinusoidal signals must be sampled at least 2 times the highest frequency component of
the signal to avoid aliasing. Higher sampling rates are preferable in terms of the delity of the
sampling. However, higher sampling rates come at the cost of additional size of the data.

Thus, storage space is a consideration while determining an appropriate sampling rate.
Fig. 2.2 Plots showing a sine wave with a frequency of 8 Hz sampled at rates of 100, 25, and 10 Hz.
The reconstructed signal with 10 Hz sampling shows aliasing, the distortion resulting from
undersampling
13 2 Analog and Digital Signals
2.4.2
Quantization
The second aspect of analog-to-digital conversion is quantization. Quantization converts
continuous amplitude signals to a signal with a nite number of possible amplitude values.
Quantizing with a high amplitude resolution will allow representation of the original signal
with the least amount of error. However, higher resolution also comes with the trade-off of
requiring more storage space. Quantization occurs with a xed range of voltage. Therefore,
proper amplication is important to get the best resolution possible. Figure 2.4 shows a
sine wave that is sampled by a nine-level quantizer with a sample rate of 100 Hz and an
amplitude resolution of 0.25 units or one eighth of the peak-to-peak amplitude of the sig-
nal. The amplitude of the sine wave in this example is perfectly t over the quantization
range. Reconstruction of the sine wave after quantization shows a decent approximation of
the original sine wave.
Quantization can be poor if the amplication of the signal is less than ideal. In Fig. 2.5,
the same nine levels are used to quantize a signal with a peak-to-peak amplitude of 0.5 units.
The amplitude resolution of 0.25 is now only half of the peak-to-peak amplitude.
The poor relative amplitude resolution in this example results in a reconstructed signal
that resembles more like a trapezoidal wave than a sine wave since only three of the nine
levels are being utilized.
Figure 2.6 shows an example of a sine wave that is amplied beyond the range of the
quantizer (peak-to-peak amplitude of two). In this situation, the signal is clipped at −1 and 1.
Fig. 2.3 Illustration
of aliasing due to
undersampling.
A sine wave,

square wave, and
an alternating
positive and
negative pulse
function produce
the identical
triangle wave when
sampled at the
same rate.
Sampling occurs at
20 Hz and is
indicated by the
open red circles

×