Rangayan
Rangayan
Rangayan
Rangaraj M. Rangayyan
University Professor
Professor
Department of Electrical and Computer Engineering
Schulich School of Engineering
Adjunct Professor, Departments of Surgery and Radiology
University of Calgary
Calgary, Alberta, Canada T2N 1N4
Phone: +1 (403) 220-6745
e-mail: ranga@ucalgary.ca
Web: http://www.enel.ucalgary.ca/People/Ranga/enel563
c R.M. Rangayyan
PCG
0
2
0 0.5 1 1.5 2 2.5 3
2
ECG
0
2
0 0.5 1 1.5 2 2.5 3
1
y(n)
0.5
0
0 0.5 1 1.5 2 2.5 3
2
Carotid
2
0 0.5 1 1.5 2 2.5 3
1
s(n)
0.5
0
0 0.5 1 1.5 2 2.5 3
Time in seconds
For example:
Physiological process
Input: Output:
biological material biological material
neurotransmitters neurotransmitters
hormones hormones
signals signals
Physiological system
Pathological process
33.5 C
(a)
Time 08:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 24:00
C 33.5 33.3 34.5 36.2 37.3 37.5 38.0 37.8 38.0
(b)
39
38
37
Temperature in degrees Celsius
36
35
34
33
32
8 10 12 14 16 18 20 22 24
Time in hours
(c)
Figure 1.1: Measurements of the temperature of a patient presented as (a) a scalar with one temperature measure-
ment x at a time instant t; (b) an array x(n) made up of several measurements at different instants of time; and
(c) a signal x(t) or x(n). The horizontal axis of the plot represents time in hours; the vertical axis gives temperature
in degrees Celsius. Data courtesy of Foothills Hospital, Calgary.
in clinical practice,
is the Pascal.
A single BP measurement:
122
66
(a)
Time 08:00 10:00 12:00 14:00 16:00 18:00 20:00 22:00 24:00
Systolic 122 102 108 94 104 118 86 95 88
Diastolic 66 59 60 50 55 62 41 52 48
(b)
180
160
Systolic pressure in mm of Hg
140
120
100
and
80
Diastolic pressure
60
40
20
8 10 12 14 16 18 20 22 24
Time in hours
(c)
22 c R.M. Rangayyan, IEEE/Wiley
1. INTRODUCTION TO BIOMEDICAL SIGNALS 1.1. THE NATURE OF BIOMEDICAL SIGNALS
Figure 1.2: Measurements of the blood pressure of a patient presented as (a) a single pair or vector of systolic
and diastolic measurements x in mm of Hg at a time instant t; (b) an array x(n) made up of several measurements at
different instants of time; and (c) a signal x(t) or x(n). Note the use of boldface x to indicate that each measurement is a
vector with two components. The horizontal axis of the plot represents time in hours; the vertical axis gives the systolic
pressure (upper trace) and the diastolic pressure (lower trace) in mm of Hg. Data courtesy of Foothills Hospital, Calgary.
Action potential:
Resting potential:
semi-permeable membrane:
semi-permeable
membrane
K+
Na+ Na+
more K+ K+
-90 mV K+
Na+
Na+ K+
60 to 100 mV
Depolarization:
is said to be depolarized;
Repolarization:
Voltage-dependent K + channels:
40
20
40
60
80
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (s)
20
40
60
80
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (s)
Figure 1.3: Action potentials of rabbit ventricular and atrial myocytes. Data courtesy of R. Clark, Department
of Physiology and Biophysics, University of Calgary.
(a)
(b)
Figure 1.4: A single ventricular myocyte (of a rabbit) in its (a) relaxed and (b) fully contracted states. The length
of the myocyte is approximately 25 m. The tip of the glass pipette, faintly visible at the upper-right end of
the myocyte, is approximately 2 m wide. A square pulse of current, 3 ms in duration and 1 nA in amplitude,
was passed through the recording electrode and across the cell membrane causing the cell to depolarize rapidly.
Images courtesy of R. Clark, Department of Physiology and Biophysics, University of Calgary.
nodes of Ranvier,
ENG amplitude: 10 V ;
Figure 1.5: Nerve conduction velocity measurement via electrical stimulation of the ulnar nerve. The grid boxes
represent 3 ms in width and 2 V in height. AElbow: above the elbow. BElbow: below the elbow. O: onset. P:
Peak. T: trough. R: recovery of base-line. Courtesy of M. Wilson and C. Adams, Alberta Childrens Hospital,
Calgary.
spinal cord
motor neuron 1
motor neuron 2
axon 2 axon 1
muscle fibers
of two motor units
Figure 1.6: Schematic representation of a motor unit and model for the generation of EMG signals. Top panel:
A motor unit includes an anterior horn cell or motor neuron (illustrated in a cross-section of the spinal cord), an
axon, and several connected muscle fibers. The hatched fibers belong to one motor unit; the non-hatched fibers
belong to other motor units. A needle electrode is also illustrated. Middle panel: The firing pattern of each motor
neuron is represented by an impulse train. Each system hi (t) shown represents a motor unit that is activated
and generates a train of SMUAPs. The net EMG is the sum of several SMUAP trains. Bottom panel: Effects
of instrumentation on the EMG signal acquired. The observed EMG is a function of time t and muscular force
produced F . Reproduced with permission from C.J. de Luca, Physiology and mathematics of myoelectric signals,
c
IEEE Transactions on Biomedical Engineering, 26:313325, 1979.
IEEE.
innervation ratio.
Figure 1.7: SMUAP trains recorded simultaneously from three channels of needle electrodes. Observe the different
shapes of the same SMUAPs projected onto the axes of the three channels. Three different motor units are active
over the duration of the signals illustrated. Reproduced with permission from B. Mambrito and C.J. de Luca,
Acquisition and decomposition of the EMG signal, in Progress in Clinical Neurophysiology, Volume 10: Computer-
c Karger AG, Basel, Switzerland.
aided Electromyography, Editor: J.E. Desmedt, pp 5272, 1983.
S.
asynchrony in activation
(muscular dystrophy),
(a)
(b)
(c)
Figure 1.8: Examples of SMUAP trains. (a) From the right deltoid of a normal subject, male, 11 years; the
SMUAPs are mostly biphasic, with duration in the range 3 5 ms. (b) From the deltoid of a six-month-old male
patient with brachial plexus injury (neuropathy); the SMUAPs are polyphasic and large in amplitude (800 V ),
and the same motor unit is firing at a relatively high rate at low-to-medium levels of effort. (c) From the right
biceps of a 17-year-old male patient with myopathy; the SMUAPs are polyphasic and indicate early recruitment
of more motor units at a low level of effort. The signals were recorded with gauge 20 needle electrodes. The width
of each grid box represents a duration of 20 ms; its height represents an amplitude of 200 V . Courtesy of M.
Wilson and C. Adams, Alberta Childrens Hospital, Calgary.
asynchronous contraction.
600
400
200
EMG in microvolts
200
400
0.5 1 1.5 2
Time in seconds
Figure 1.9: EMG signal recorded from the crural diaphragm muscle of a dog using implanted fine-wire electrodes.
Data courtesy of R.S. Platt and P.A. Easton, Department of Clinical Neurosciences, University of Calgary.
1000
EMG in microvolts
500
500
0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9
Time in seconds
800
600
EMG in microvolts
400
200
200
400
600
0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4
Time in seconds
Figure 1.10: The initial part of the EMG signal in Figure 1.9 shown on an expanded time scale. Observe the
SMUAPs at the initial stages of contraction, followed by increasingly complex interference patterns of several
MUAPs. Data courtesy of R.S. Platt and P.A. Easton, Department of Clinical Neurosciences, University of
Calgary.
The heart:
Figure 1.11: Schematic representation of the chambers, valves, vessels, and conduction system of the heart.
ventricles by default.
bradycardia.
tachycardia.
Figure 1.12: Propagation of the excitation pulse through the heart. Reproduced with permission from R.F.
c
Rushmer, Cardiovascular Dynamics, 4th edition,
W.B. Saunders, Philadelphia, PA, 1976.
0.9
R
0.8
0.7
0.6
ECG (normalized)
0.5
0.4
0.3
0.2
P
0.1
T
Q S
0.1
0 0.5 1 1.5 2 2.5 3 3.5
Time in seconds
Figure 1.13: A typical ECG signal (male subject of age 24 years). (Note: Signal values are not calibrated, that is,
specified in physical units, in many applications. As is the case in this plot, signal values in plots in this book are in
arbitrary or normalized units unless specified.)
arrhythmia.
0.8
0.7
0.6
ECG
0.5
0.4
0.3
0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Time in seconds
Figure 1.14: ECG signal with PVCs. The third and sixth beats are PVCs. The first PVC has blocked the
normal beat that would have appeared at about the same time instant, but the second PVC has not blocked any
normal beat triggered by the SA node. Data courtesy of G. Groves and J. Tyberg, Department of Physiology and
Biophysics, University of Calgary.
o o o o x o o o o o x o o o o o
o o o o x o o o o o o o o o o o
o o x o x o o o o o o o o o x o
x o x o x o x o o o o o x o o x
o o x o o x o o o x o o x o o x o
o o x o o o o o o o o o x o o
o o o o o x o x o x o x o x o x o
x o x o x o x o x o x o o o x o x
o x o x o x o o o o o o o o o o
o o o o o x o o x o o o x o o
The ECG signal of a patient (male, 65 years) with PVCs. Each strip is of duration 10 s; the signal continues from
top to bottom. The second half of the seventh strip and the first half of the eighth strip illustrate an episode of
bigeminy.
2.5
1.5
0.5
ECG
0.5
1.5
2.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Time in seconds
Figure 1.15: ECG signal of a patient with right bundle-branch block and hypertrophy (male patient of age 3
months). The QRS complex is wider than normal, and displays an abnormal, jagged waveform due to desyn-
chronized contraction of the ventricles. (The signal also has a base-line drift, which has not been corrected
for.)
ST elevation: Ischemic Heart Disease: Acute transmural injury, acute anterior MI.
http://library.med.utah.edu/kw/ecg/ecg outline/Lesson10/index.html
Left arm, right arm, left leg: leads I, II, and III.
RA LA
ECG
- lead II
RL LL
formed by combining left arm, right arm, and left leg leads:
+ +
aVR aVL
- -
Wilsons
central
- - terminal
-
aVF
+
Lead II Lead III
+ +
Right Leg:
Reference Left Leg
Figure 1.16: Einthovens triangle and the axes of the six ECG leads formed by using four limb leads.
Figure 1.17: Positions for placement of the precordial (chest) leads V1 V6 for ECG, auscultation areas for heart
sounds, and pulse transducer positions for the carotid and jugular pulse signals. ICS: intercostal space.
II = I + III
aVL = ( I - III ) / 2.
III III
II
- III
aVL
III
Figure 1.18: Standard 12-lead ECG of a normal male adult. Courtesy of E. Gedamu and L.B. Mitchell, Foothills
Hospital, Calgary.
Figure 1.19: Standard 12-lead ECG of a patient with right bundle-branch block. Courtesy of L.B. Mitchell,
Foothills Hospital, Calgary.
Nasion
pg1 pg2
fpz
fp1 fp2
f7 f8
f3 fz f4
a1 t3 c3 cz c4 t4 a2
pz
p3 p4
t5 t6
cb1 cb2
o1 oz o2
Inion
Figure 1.20: The 10 20 system of electrode placement for EEG recording. Notes regarding channel labels:
pg naso-pharyngeal, a auricular (ear lobes), fp pre-frontal, f frontal, p pareital, c central, o occipital, t
temporal, cb cerebellar, z midline, odd numbers on the left, even numbers on the right of the subject.
lowpass filtering at 75 Hz ,
needle electrodes,
naso-pharyngeal electrodes,
intracerebral electrodes.
EEG rhythms:
Figure 1.21: From top to bottom: (a) delta rhythm; (b) theta rhythm; (c) alpha rhythm; (d) beta rhythm;
(e) blocking of the alpha rhythm by eye opening; (f) 1 s time markers and 50 V marker. Reproduced with
c
permission from R. Cooper, J.W. Osselton, and J.C. Shaw, EEG Technology, 3rd Edition, 1980.
Butterworth
Heinemann Publishers, a division of Reed Educational & Professional Publishing Ltd., Oxford, UK.
f3
f4
c3
c4
p3
p4
o1
o2
1s
Figure 1.22: Eight channels of the EEG of a subject displaying alpha rhythm. See Figure 1.20 for details regarding
channel labels. Data courtesy of Y. Mizuno-Matsumoto, Osaka University Medical School, Osaka, Japan.
f3
f4
c3
c4
p3
p4
o1
o2
t3
t4
1s
Figure 1.23: Ten channels of the EEG of a subject displaying spike-and-wave complexes. See Figure 1.20 for
details regarding channel labels. Data courtesy of Y. Mizuno-Matsumoto, Osaka University Medical School,
Osaka, Japan. Note that the time scale is expanded compared to that of Figure 1.22.
S1 S2
1
PCG
1
R
2
ECG
0 P Q S T
P
2
Carotid Pulse
1 T
0 D DW
1
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time in seconds
Figure 1.24: Three-channel simultaneous record of the PCG, ECG, and carotid pulse signals of a normal male
adult.
Figure 1.25: Schematic representation of the genesis of heart sounds. Only the left portion of the heart is
illustrated as it is the major source of the heart sounds. The corresponding events in the right portion also
contribute to the sounds. The atria do not contribute much to the heart sounds. Reproduced with permission
c
from R.F. Rushmer, Cardiovascular Dynamics, 4th edition,
W.B. Saunders, Philadelphia, PA, 1976.
deceleration of blood;
during inspiration.
Other sounds:
distended ventricles.
Murmurs.
Heart murmurs:
a narrow opening.
ventricular contraction.
midsystolic murmur.
2
1
PCG
0
1
2
2
ECG
2
Carotid Pulse
1
0.5 1 1.5 2 2.5 3
Time in seconds
Figure 1.26: Three-channel simultaneous record of the PCG, ECG, and carotid pulse signals of a patient (female,
11 years) with aortic stenosis. Note the presence of the typical diamond-shaped systolic murmur and the split
nature of S2 in the PCG.
Carotid pulse:
cardiac chambers:
120
AO (mm Hg)
100
80
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
100
LV (mm Hg)
80
60
40
20
20
10
0
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
1
0.8
ECG
0.6
Figure 1.27: Normal ECG and intracardiac pressure signals from a dog. AO represents aortic pressure near the
aortic valve. Data courtesy of R. Sas and J. Tyberg, Department of Physiology and Biophysics, University of
Calgary.
100
AO (mm Hg)
80
60
40
1 2 3 4 5 6 7
120
LV (mm Hg)
100
80
60
40
20
1 2 3 4 5 6 7
40
RV (mm Hg)
30
20
1 2 3 4 5 6 7
1
0.8
ECG
0.6
0.4
1 2 3 4 5 6 7
Time in seconds
Figure 1.28: ECG and intracardiac pressure signals from a dog with PVCs. Data courtesy of R. Sas and J.
Tyberg, Department of Physiology and Biophysics, University of Calgary.
The system is dynamic: the filter and the speech signal have
0.15
0.1
Amplitude 0.05
0.05
0.1
0.15
0.2
0.25
Figure 1.29: Speech signal of the word safety uttered by a male speaker. Approximate time intervals of the
various phonemes in the word are /S/: 0.2 0.35 s; /E/: 0.4 0.7 s; /F/: 0.75 0.95 s; /T/: transient at 1.1 s;
/I/: 1.1 1.2 s. Background noise is also seen in the signal before the beginning and after the termination of the
speech, as well as during the stop interval before the plosive /T/.
0.15
0.1
0.05
0
/E/
0.05
0.1
0.15
0.2
0.04
0.02
/S/
0.02
0.04
0.25 0.255 0.26 0.265 0.27 0.275 0.28 0.285 0.29 0.295
Time in seconds
Figure 1.30: Segments of the signal in Figure 1.29 on an expanded scale to illustrate the quasi-periodic nature of
the voiced sound /E/ in the upper trace, and the almost-random nature of the fricative /S/ in the lower trace.
skeletal muscle;
contraction level.
Figure 1.31: Front and side views of the knee joint (the two views are not mutually orthogonal). The inset shows
the top view of the tibia with the menisci.
Knee-joint sounds:
(a) (b)
(c) (d)
Arthroscopic views of the patello-femoral joint. (a) Normal cartilage surfaces. (b) Chondromalacia Grade II at
the patella. (c) Chondromalacia Grade III at the patella. (d) Chondromalacia Grade IV at the patella and the
femur; the bones are exposed. The under-surface of patella is at the top and the femoral condyle is at the bottom.
Figure courtesy: G.D. Bell, Sport Medicine Centre, University of Calgary.
Computer-aided
diagnosis
and therapy
Physician
or medical Signal analysis Signal processing
specialist
Figure 1.32: Computer-aided diagnosis and therapy based upon biomedical signal analysis.
physiological systems.
Energy limitations.
Patient safety.
communication phenomena.
reference or trigger.
Figure 2.1: Pill-electrode recording of the atrial electrogram (lower tracing) and the external ECG (upper tracing)
of a normal subject. The pulse train between the two signals indicates intervals of 1 s. Reproduced with permission
from J.M. Jenkins, D. Wu, and R. Arzbaecher, Computer diagnosis of abnormal cardiac rhythms employing a
c
new P-wave detector for interval measurement, Computers and Biomedical Research, 11:1733, 1978.
Academic
Press.
0: abnormal waveshape, or
1: normal waveshape,
0: short,
1: normal, or
2: long.
Figure 2.2: Atrial electrogram (lower tracing) and the external ECG (upper tracing) of a subject with ectopic
beats. The pulse train between the two signals indicates intervals of 1 s. Reproduced with permission from J.M.
Jenkins, D. Wu, and R. Arzbaecher, Computer diagnosis of abnormal cardiac rhythms employing a new P-wave
c
detector for interval measurement, Computers and Biomedical Research, 11:1733, 1978.
Academic Press.
HR increases.
Figure 2.3: Simultaneous EMG VMG records at two levels of contraction of the rectus femoris muscle. (a)
VMG at 40% of the maximal voluntary contraction (MVC) level. (b) EMG at 40% MVC. (c) VMG at 60%
MVC. (d) EMG at 60% MVC. Reproduced with permission from Y.T. Zhang, C.B. Frank, R.M. Rangayyan, and
G.D. Bell, Relationships of the vibromyogram to the surface electromyogram of the human rectus femoris muscle
during voluntary isometric contraction, Journal of Rehabilitation Research and Development, 33(4): 395403, 1996.
c
Department of Veterans Affairs.
Solution:
SYS. DIAS.
2
1
PCG
0
1
2
R
ECG 2
0
Q S
0.5 1 1.5 2 2.5 3
2
Carotid Pulse
1 D
0.5 1 1.5 2 2.5 3
Time in seconds
Figure 2.4: Demarcation of the systolic (SYS.) and diastolic (DIAS.) parts of the PCG signal in Figure 1.26 by
using the ECG and carotid pulse as reference signals. The QRS complex and the dicrotic notch D are marked on
the ECG and carotid pulse signals, respectively.
Noise is omnipresent!
Deterministic signal:
Nonstationary signal:
0.1
Amplitude
0.1
0.2
300
Turning points
250
200
150
0.2 0.4 0.6 0.8 1 1.2 1.4
Time in seconds
Figure 3.1: Top: Speech signal of the word safety uttered by a male speaker. Bottom: Count of turning points
in a moving window of 50 ms (400 samples with fs = 8 kHz). The threshold for randomness for N = 400 is 265.
Random noise:
= E[] = p () d, (3.1)
Z
2 2
E[ ] = p () d. (3.2)
Z
2 = E[( ) ] =2
( )2 p () d. (3.3)
Z
2 = E[ 2] 2 .
If = 0, then 2 = E[ 2]:
variance = MS.
mean = DC component;
MS = average power;
Signal-to-noise ratio:
or
E[y] = y = x + . (3.5)
If = 0, then y = x.
Ensemble averages:
by averages of a collection or
1 M
x(t1) = lim xk (t1). (3.7)
X
M M k=1
t=t t=t
1 2
x
1
x
2
t=t t=t
x 3 4
3
x
4
x
5
x
6
x
7
x
8
x
9
x
10
microV
140
x 120
50 100 150 200 250
Time in milliseconds
Figure 3.2: Ten sample acquisitions (x1 to x10 ) of individual flash visual ERPs from the occipital midline (oz)
position of a normal adult male (the author of this book!). The ear lobes were used to form the reference
lead (a1a2), and the left forehead was used as the reference (see Figure 1.20). The signals may be treated as
ten realizations of a random process in the form of time series or signals. The vertical lines at t = t1 and
t = t2 = t1 + represent the ensemble averaging process at two different instants of time. The last plot (framed)
gives the ensemble average or prototype x(t) of the ten individual signals. The horizontal box superimposed on
the third trace represents the process of computing temporal statistics over the duration t = t3 to t = t4 of the
sample ERP x3 (t). See also Figure 3.12. Data courtesy of L. Alfaro and H. Darwish, Alberta Childrens Hospital,
Calgary.
xx(t1, t1 + ) = E[x(t1)x(t1 + )]
Z
= x(t1) x(t1 + ) px1,x2 (x1, x2) dx1 dx2, (3.8)
Z
1 M
xx(t1, t1 + ) = lim xk (t1) xk (t1 + ), (3.9)
X
M M k=1
(stochastic processes):
M k=1
for all time t.
Time averages:
1 T /2
x(k) = lim xk (t) dt. (3.11)
Z
T T T /2
1 T /2
xx(, k) = lim xk (t) xk (t + ) dt. (3.12)
Z
T T T /2
Cxy
xy = , (3.14)
x y
with 1 xy +1.
Z
= x(t1) y(t1 + ) px,y (x, y) dx dy.
Z
Structured noise:
Power-line interference at 50 Hz or 60 Hz :
Physiological interference:
Then, we have
x(t1) = x and
xx(t1, t1 + ) = xx( ).
Ergodic processes:
0.2
0.1
Amplitude
0
0.1
0.2
0.01
0.008
Variance
0.006
0.004
0.002
0
0.2 0.4 0.6 0.8 1 1.2 1.4
Time in seconds
Figure 3.3: Top: Speech signal of the word safety uttered by a male speaker. Bottom: Variance computed in a
moving window of 50 ms (400 samples with fs = 8 kHz).
12
10
Magnitude spectrum
500
1000 1.4
1500 1.2
2000 1
2500 0.8
3000 0.6
0.4
3500 0.2
4000
frequency in Hz
time in seconds
Figure 3.4: Spectrogram of the speech signal of the word safety uttered by a male speaker. (The signal is also
illustrated in Figures 1.29, 3.1, and 3.3.) Each curve represents the magnitude spectrum of the signal in a moving
window of duration 64 ms (512 samples with fs = 8 kHz), with the window advance interval being 32 ms. The
spectrogram is plotted on a linear scale to display better the major differences between the voiced and unvoiced
sounds.
cyclo-stationary signals.
2.5
1.5
0.5
ECG
0.5
1.5
1 2 3 4 5 6 7 8
Time in seconds
limb-lead ECG.
low-frequency artifacts.
2.5
1.5
0.5
ECG
0.5
1.5
1 2 3 4 5 6 7 8 9
Time in seconds
power-line interference:
2.5
1.5
1
ECG
0.5
0.5
10
20
30
Power Spectrum (dB)
40
50
60
70
80
50 100 150 200 250 300 350 400 450 500
Frequency in Hz
Figure 3.8: Power spectrum of the ECG signal in Figure 3.7 with power-line interference. The spectrum illustrates
peaks at the fundamental frequency of 60 Hz as well as the third and fifth harmonics at 180 Hz and 300 Hz,
respectively.
Figure 3.9: ECG signals of a pregnant woman from abdominal and chest leads: (a) chest-lead ECG, and (b)
abdominal-lead ECG; the former presents the maternal ECG whereas the latter is a combination of the maternal
and fetal ECG signals. (See also Figure 3.9.) Reproduced with permission from B. Widrow, J.R. Glover, Jr.,
J.M. McCool, J. Kaunitz, C.S. Williams, R.H. Hearn, J.R. Zeidler, E. Dong, Jr., R.C. Goodlin, Adaptive noise
c
cancelling: Principles and applications, Proceedings of the IEEE, 63(12):16921716, 1975.
IEEE.
Channel 1
Pre-Amplifier Bandpass Filter Amplifier VMG (MCI)
Channel 2
Pre-Amplifier Bandpass Filter Amplifier VAG
Accelerometer
Channel 3
Pre-Amplifier Bandpass Filter Amplifier VAG
0o
o
90
Channel 4
Pre-Amplifier Bandpass Filter Amplifier VAG
Angle
Goniometer
Figure 3.10: Experimental setup to measure VMG and VAG signals at different positions along the leg.
Figure 3.11: Left-hand column: VMG signals recorded simultaneously at (top-to-bottom) (a) the distal rectus
femoris, (b) mid-patella, (c) tibial tuberosity, and (d) mid-tibial shaft positions during isometric contraction (no
leg or knee movement). Right-hand column: Vibration signals recorded simultaneously at the same positions as
above during isotonic contraction (swinging movement of the leg). Observe the muscle-contraction interference
appearing in the extension parts (second halves) of each of the VAG signals (plots (b) (d)) in the right-hand
column. The recording setup is shown in Figure 3.10. Reproduced with permission from Y.T. Zhang, R.M.
Rangayyan, C.B. Frank, and G.D. Bell, Adaptive cancellation of muscle-contraction interference from knee joint
c
vibration signals, IEEE Transactions on Biomedical Engineering, 41(2):181191, 1994.
IEEE.
Linear filters fail when the signal and noise spectra overlap.
M M M
yk (n) = xk (n)+ k (n); n = 1, 2, . . . , N. (3.17)
X X X
M
k=1 xk (n) = M x(n).
P
M
k=1 k (n) 0 as M increases,
P
with a variance of M 2.
RMS value of noise in the averaged signal = M .
Thus SNR of signal increases by M or M.
M
Figure 3.12: Traces 1 and 2: Two sample acquisitions of individual flash visual ERPs from the occipital midline
(oz) position of a normal adult male. The ear lobes were used to form the reference lead (a1a2), and the left
forehead was used as the reference (see Figure 1.20). Trace 3: Average of 10 ERPs. Trace 4: Average of 20 ERPs.
The latencies of interest have been labeled on Trace 4 by an EEG technologist. See also Figure 3.2. Data courtesy
of L. Alfaro and H. Darwish, Alberta Childrens Hospital, Calgary.
Illustration of application:
N 1
n=0 [x(n) x ][y(k N + 1 + n) yk ]
P
xy (k) = s
PN 1 2 PN 1[y(k N + 1 + n) y ]2
,
n=0 [x(n) x
] n=0 k
(3.18)
1 NX
1
yk = y(k N + 1 + n),
N n=0
ECG
0
2
1 2 3 4 5 6 7 8
Time in seconds
1
Crosscorrelation with template
0.5
0.5
1 2 3 4 5 6 7 8
Time in seconds
Figure 3.13: An ECG signal with noise (upper trace) and the result of cross-correlation (lower trace) with the
QRS template selected from the first cycle. The cross-correlation coefficient is normalized to the range (1, 1).
Figure 3.14: Upper two traces: two cycles of the ECG extracted from the signal in Figure 3.13. Bottom trace:
the result of synchronized averaging of 11 cycles from the same ECG signal.
Problem:
Solution:
N
y(n) = bk x(n k), (3.19)
X
k=0
N : order of filter.
-1 -1 -1 -1
x(n) z z z z
b0 b1 b2 b3 bk bN
y(n)
Figure 3.15: Signal-flow diagram of a moving-average filter of order N. Each block with the symbol z 1 represents
a delay of one sample, and serves as a memory unit for the corresponding signal sample value.
Y (z) N
H(z) = = bk z k = b0+b1z 1+b2z 2+ +bN z N ,
X
X(z) k=0
(3.20)
1
y(n) = [x(n) + 2x(n 1) + x(n 2)]. (3.21)
4
1 1
H(z) = [1 + 2z + z ] = [1 + z 1]2.
1 2
(3.22)
4 4
Double-zero at z = 1.
x(n) 1/4 z
-1
z
-1
y(n)
Figure 3.16: Signal-flow diagram of the Hanning filter.
: radian frequency, = 2f .
0 2 or 0 f 1;
1
H() = [1 + 2ej + ej2 ]. (3.23)
4
1
H() = [{2 + 2 cos()}ej ]. (3.24)
4
and
6 H() = . (3.26)
40
60
80
100
120
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
50
Phase (degrees)
100
150
200
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
Figure 3.17: Magnitude and phase responses of the Hanning (smoothing) filter.
1 X7
y(n) = x(n k). (3.27)
8 k=0
Impulse response:
h(n) = 18 [(n) + (n 1) + (n 2) + (n 3)
+(n 4) + (n 5) + (n 6) + (n 7)].
Transfer function:
1 X7 k
H(z) = z . (3.28)
8 k=0
Frequency response:
1 X7
H() = exp(jk)
8 k=0
1
= [1 + exp(j4) (3.29)
8
fs
and 2
= 500 Hz .
20
30
40
50
60
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
100
50
Phase (degrees)
50
100
150
200
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
Figure 3.18: Magnitude and phase responses of the 8-point moving-average (smoothing) filter.
250 Hz
375 Hz 125 Hz
500 Hz 0 Hz
t2
y(t) = x(t) dt. (3.30)
Z
t1
|H()| = , (3.35)
6 H() = . (3.36)
2
Gain of the filter reduces nonlinearly as frequency
increases: filter has lowpass characteristics.
1
results in the transfer function H(z) = 1z 1 .
Equation 3.27.
1 1
y(n) = y(n 1) + x(n) x(n 8). (3.37)
8 8
Transfer function:
8
1 1 z
H(z) = 1
. (3.38)
8 1z
Frequency response:
j8
1 1 e 1 j 7 sin(4)
H() = j
=
e 2 , (3.39)
8 1e
8 sin( 2 )
Figure 3.18.
Illustration of application:
3
2.5
1.5
1
ECG
0.5
0.5
1.5
2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Time in seconds
2.5
1.5
1
ECG
0.5
0.5
1.5
2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Time in seconds
Figure 3.21: The ECG signal with high-frequency noise in Figure 3.20 after filtering by the 8-point MA filter
shown in Figure 3.18.
d
Ideal dt
operator in the time domain
If X(f ) = FT [x(t)],
FT [ dx
dt ] = j 2f X(f ) = j X().
H(0) = 0:
highpass filter.
d2
Second-order derivative operator dt2 :
1
y(n) = [x(n) x(n 1)]. (3.40)
T
Transfer function:
1
H(z) = (1 z 1). (3.41)
T
Frequency response:
1 1
2
|H()| = sin , (3.43)
T 2
6 H() = . (3.44)
2 2
Magnitude response
1.5
0.5
0
0 50 100 150 200 250 300 350 400 450 500
Frequency in Hz
1.5
Phase in radians
0.5
0
0 50 100 150 200 250 300 350 400 450 500
Frequency in Hz
Figure 3.22: Magnitude and phase responses of the first-order difference operator. The magnitude response is
shown on a linear scale in order to illustrate better its proportionality to frequency.
1
y3(n) = [y(n) + y(n 1)]
2
1
= [{x(n) x(n 1)} + {x(n 1) x(n 2)}]
2T
1
= [x(n) x(n 2)]. (3.45)
2T
1 1 1 1
2 1
H(z) = (1 z ) = (1 z ) (1 + z ) .
2T T 2
(3.46)
Magnitude response
1.5
0.5
0
0 50 100 150 200 250 300 350 400 450 500
Frequency in Hz
1
Phase in radians
2
0 50 100 150 200 250 300 350 400 450 500
Frequency in Hz
Figure 3.23: Magnitude and phase responses of the three-point central-difference operator. The magnitude
response is shown on a linear scale.
but filters have also removed the slow P and T waves, and
0.3
0.2
0.1
Filtered ECG 0
0.1
0.2
0.3
0.4
0.5
1 2 3 4 5 6 7 8 9
Time in seconds
Figure 3.24: Result of filtering the ECG signal with low-frequency noise shown in Figure 3.6, using the first-order
difference operator.
0.5
0
Filtered ECG
0.5
1
1 2 3 4 5 6 7 8 9
Time in seconds
Figure 3.25: Result of filtering the ECG signal with low-frequency noise shown in Figure 3.6, using the three-point
central-difference operator.
1
1 1 z
H(z) = 1
,
(3.47)
T 1 0.995 z
1 z 1
H(z) = . (3.48)
T z 0.995
1
y(n) = [x(n) x(n 1)] + 0.995 y(n 1). (3.49)
T
+ +
x(n) 1/T y(n)
+
-1 -1
z z
0.995
(a)
+ +
x(n) 1/T y(n)
+
-1
z
0.995
(b)
Figure 3.26: Two equivalent signal-flow diagrams of the filter to remove low-frequency noise or base-line wander.
The form in (a) uses two delays, whereas that in (b) uses only one delay.
Phase response =
Magnitude response
0.8
0.6
0.4
0.2
0
0 50 100 150 200 250 300 350 400 450 500
Frequency in Hz
1
Phase in radians
0.8
0.6
0.4
0.2
0
0 50 100 150 200 250 300 350 400 450 500
Frequency in Hz
Figure 3.27: Normalized magnitude and phase responses of the filter to remove base-line wander as in Equa-
tion 3.47. The magnitude response is shown on a linear scale.
3.5
2.5
2
Filtered ECG
1.5
0.5
0.5
1 2 3 4 5 6 7 8 9
Time in seconds
Figure 3.28: Result of processing the ECG signal with low-frequency noise shown in Figure 3.6, using the filter
to remove base-line wander as in Equation 3.47. (Compare with the results in Figures 3.24 and 3.25.)
are zero at = 0,
2 1
|Ha(j)| =
2N , (3.50)
j
1+ jc
1
Ha(s)Ha(s) =
2N . (3.51)
s
1+
jc
imaginary axis s = j.
1 (2k 1)
sk = c exp j + , (3.52)
2 2N
k = 1, 2, . . . , 2N .
G
Ha(s) = , (3.53)
(s p1)(s p2)(s p3) (s pN )
1
2 1 z
s = 1
. (3.54)
T 1+z
2cT 2+cT
with real-axis intercepts at z = 2+cT and z = 2cT .
z = zp and z = 1/zp.
j
2 1 e 2j
s = + j = j
= tan
.
(3.55)
T 1+e
T 2
= tan (3.56)
T 2
and
T
1
= 2 tan
. (3.57)
2
cutoff frequencies.
2 1z 1
Ha(s) mapped to the z -domain by the BLT: s = T 1+z 1 .
H(z) simplified to
G (1 + z 1)N
H(z) = PN k
, (3.58)
k=0 ak z
a0 = 1;
+ +
x(n) b0 y(n)
-1
+ -1
z z
b1 a1
-1
z z -1
b2 a2
bk ak
-1
z z -1
bN aN
Figure 3.29: Signal-flow diagram of a direct realization of a generic infinite impulse response (IIR) filter. This
form uses 2N delays and 2N + 1 multipliers for a filter of order N.
+ +
x(n) b0 y(n)
+
-1
z
a1 b1
z -1
a2 b2
ak bk
z -1
aN bN
Figure 3.30: Signal-flow diagram of a realization of an IIR filter that uses only N delays and (2N + 1) multipliers
for a filter of order N.
N N
y(n) = bk x(n k) ak y(n k). (3.59)
X X
k=0 k=1
of G(1 + z 1)N .
2 1
|H()| =
2N , (3.60)
1+ c
2 1
|H(k)| =
2N , (3.61)
k
1+ kc
K
H(k) = H(K k), k = 2
+ 1, . . . , K 1.
folding-frequency component in H( K2 ).
(folding frequency);
array index = 0:
fc = 40 Hz , fs = 200 Hz , and N = 4.
40
c = 200 2 = 0.4 radians/s.
2 c
!
c = T
tan 2
= 1.453085 radians/s.
radius 1.453085
Ha(s) = (3.62)
4.458247
2 2
.
(s + 1.112143s + 2.111456)(s + 2.684951s + 2.111456)
Imaginary
pi/4
Real
Butterworth circle
radius = 1.453085 radians
Figure 3.31: Pole positions in the s-plane of the squared magnitude response of the Butterworth lowpass filter
with fc = 40 Hz, fs = 200 Hz, and N = 4.
H(z) = (3.63)
0.046583(1 + z 1 )4
.
(1 0.447765z 1 + 0.460815z 2)(1 0.328976z 1 + 0.064588z 2)
ak coefficients:
Imaginary
Unit circle
Four zeros
Figure 3.32: Positions of the poles and zeros in the z-plane of the Butterworth lowpass filter with fc = 40 Hz,
fs = 200 Hz, and N = 4.
0.9
0.8
0.7
0.6
Gain
0.5
0.4
0.3
0.2
0.1
10 20 30 40 50 60 70 80 90 100
Frequency in Hz
Figure 3.33: Magnitude response of the Butterworth lowpass filter with fc = 40 Hz, fs = 200 Hz, and N = 4.
0.9
0.8
0.7
0.6
Gain
0.5
0.4
0.3
0.2
0.1
10 20 30 40 50 60 70 80 90 100
Frequency in Hz
Figure 3.34: Magnitude responses of three Butterworth lowpass filters with fc = 40 Hz, fs = 200 Hz, and variable
order: N = 4 (dotted), N = 8 (dashed), and N = 12 (solid).
Cartoid pulse
1
3
12 12.5 13 13.5 14 14.5
2
Lowpass filtered signal
3
12 12.5 13 13.5 14 14.5
Time in seconds
Figure 3.35: Upper trace: a carotid pulse signal with high-frequency noise and effects of clipping. Lower trace:
result of filtering with a Butterworth lowpass filter with fc = 40 Hz, fs = 200 Hz, and N = 4. The filtering
operation was performed in the time domain using the MATLAB filter command.
2.5
1.5
1
ECG
0.5
0.5
1.5
2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Time in seconds
Figure 3.36: Result of frequency-domain filtering of the noisy ECG signal in Figure 3.20 with an eighth-order
Butterworth lowpass filter with cutoff frequency = 70 Hz.
20
40
Magnitude Response (dB)
60
80
100
120
Figure 3.37: Frequency response of the eighth-order Butterworth lowpass filter with cutoff frequency = fc = 70 Hz
and fs = 1, 000 Hz.
Solution:
2 1
|H(k)| = kc 2N
! . (3.64)
1+ k
Illustration of application:
2.5
1.5
ECG
0.5
0.5
1 2 3 4 5 6 7 8 9
Time in seconds
Figure 3.38: Result of frequency-domain filtering of the ECG signal with low-frequency noise in Figure 3.6 with an
eighth-order Butterworth highpass filter with cutoff frequency = 2 Hz. (Compare with the results in Figures 3.24,
3.25, and 3.28.)
20
40
60
Magnitude Response (dB)
80
100
120
140
160
180
200
1 2 3 4 5 6 7 8 9 10
Frequency in Hz
Figure 3.39: Frequency response of an eighth-order Butterworth highpass filter with cutoff frequency = 2 Hz.
fs = 1, 000 Hz. The frequency response is shown on an expanded scale for the range 0 10 Hz only.
= 1 1.85955z 1 + z 2. (3.65)
250 Hz
60 Hz
60 Hz
750 Hz or 250 Hz
Figure 3.40: Zeros of the notch filter to remove 60 Hz interference, the sampling frequency being 1, 000 Hz.
30
10
10
20
30
40
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
200
150
Phase (degrees)
100
50
50
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
Figure 3.41: Magnitude and phase responses of the 60 Hz notch filter with zeros as shown in Figure 3.40.
fs = 1, 000 Hz.
250 Hz
300 Hz
180 Hz
420 Hz
60 Hz
60 Hz
420 Hz
180 Hz
300 Hz
750 Hz or 250 Hz
Figure 3.42: Zeros of the comb filter to remove 60 Hz interference with odd harmonics; the sampling frequency
is 1, 000 Hz.
10
10
20
30
40
50
60
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
150
100
Phase (degrees)
50
50
100
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hertz)
Figure 3.43: Magnitude and phase responses of the comb filter with zeros as shown in Figure 3.42.
2.5
1.5
1
ECG
0.5
0.5
1.5
1
ECG
0.5
0.5
Figure 3.45: The ECG signal in Figure 3.44 after filtering with the 60 Hz notch filter shown in Figures 3.40
and 3.41.
.
performance criterion.
.
input x(n), and output d(n)
e(n) = d(n) d(n). (3.68)
-1 -1 -1 -1
x(n) z z z z
w0 w1 w2 w3 wk wM-1
~
d(n)
+
d(n) e(n)
Figure 3.46: Block diagram of the Wiener filter.
MX
1
d(n) = wk x(n k). (3.69)
k=0
tap-weight vector:
the vector contains the current input sample x(n) and the
Estimation error:
J(w) = E[e2(n)]
= E[x(n)d(n)]. (3.75)
(0) (1) (M 1)
(1) (0) (M 2)
. (3.79)
.. .. ... ..
(M + 1) (M + 2) (0)
J(w) = d2 wT T w + wT w. (3.81)
d
(T w) = ,
dw
d
(wT ) = ,
dw
d
(wT w) = 2w.
dw
dJ(w)
= 2 + 2w 0. (3.82)
dw
wo = . (3.83)
.. .. ... .
.
.
.
(M + 1) (M + 2) (0) wo(M 1)
(3.85)
(0)
(1)
..
(1 M )
MX
1
woi (ik) = (k), k = 0, 1, 2, . . . , M 1. (3.86)
i=0
Minimum MSE:
Jmin = d2 T 1. (3.87)
MX
1
woi (k i) = (k), k = 0, 1, 2, . . . , M 1. (3.88)
i=0
Sxd()
W () = . (3.91)
Sxx()
Vector notation:
d, : M M autocorrelation matrices of
wo = (d + )1 1d. (3.98)
Sd() 1
W () = = S () . (3.101)
Sd() + S () 1 + S ()
d
Illustration of application:
Figure 3.48.
0.5
Original
0
0.5
1
Model
0.5
0.5
Restored
0.5
Figure 3.47: From top to bottom: one cycle of the noisy ECG signal in Figure 3.5 (labeled as Original); a
piece-wise linear model of the desired noise-free signal (Model); and the output of the Wiener filter (Restored).
Original
50
100
0 50 100 150 200 250 300 350 400 450 500
0
Model
50
100
0 50 100 150 200 250 300 350 400 450 500
0
Noise
50
0 50 100 150 200 250 300 350 400 450 500
0
Wiener
50
0 50 100 150 200 250 300 350 400 450 500
0
Restored
50
100
0 50 100 150 200 250 300 350 400 450 500
Frequency in Hz
Figure 3.48: From top to bottom: log PSD (in dB) of the given noisy signal (labeled as Original); log PSD of the
noise-free model (Model); estimated log PSD of the noise process (Noise); log frequency response of the Wiener
filter (Wiener); and log PSD of the filter output (Restored).
They are also not suitable when the spectral contents of the
Solution:
Figure 3.49: Block diagram of a generic adaptive noise canceler (ANC) or adaptive filter.
y(n) = m(n)
: estimate of the primary noise
of Equation 3.104:
+ 2E[v(n){m(n) y(n)}].
= 0. (3.106)
therefore
MX
1
y(n) = wk r(n k). (3.110)
k=0
Aim of optimization:
Illustration of application:
(n) = 2 2
, (3.120)
(M + 1) x (n) (, r(n), x (n 1))
0 < < 1.
Figure 3.50: LMS-filtered versions of the VAG signals recorded from the mid-patella and the tibial tuberosity
positions, as shown in Figure 3.11 (traces (b) and (c), right-hand column). The muscle-contraction signal recorded
at the distal rectus femoris position was used as the reference input (Figure 3.11, right-hand column, trace (a)).
The recording setup is shown in Figure 3.10. Reproduced with permission from Y.T Zhang, R.M. Rangayyan,
C.B. Frank, and G.D. Bell, Adaptive cancellation of muscle-contraction interference from knee joint vibration
c
signals, IEEE Transactions on Biomedical Engineering, 41(2):181191, 1994.
IEEE.
Skip.
Original ECG
Figure 3.56 ECG signal with a combination of artifacts and its filtered versions. The duration of the signal is
10.7 s.
20
Original(dB)
40
60
80
50 100 150 200 250 300 350 400 450 500
50
All filters(dB)
100
150
200
50 100 150 200 250 300 350 400 450 500
0
Final(dB)
50
100
Figure 3.57 Top and bottom plots: Power spectra of the ECG signals in the top and bottom traces of Figure 3.8.
Middle plot: Frequency response of the combination of lowpass, highpass, and comb filters. The cutoff frequency
of the highpass filter is 2 Hz; the highpass portion of the frequency response is not clearly seen in the plot.
Figure 3.58 Result of adaptive cancellation of the maternal chest ECG from the abdominal ECG in Figure 3.9. The
QRS complexes extracted correspond to the fetal ECG. Reproduced with permission from B. Widrow, J.R. Glover,
Jr., J.M. McCool, J. Kaunitz, C.S. Williams, R.H. Hearn, J.R. Zeidler, E. Dong, Jr., R.C. Goodlin, Adaptive
c
noise cancelling: Principles and applications, Proceedings of the IEEE, 63(12):16921716, 1975.
IEEE.
Skip.