Issa Panahi EE-6360-501, Class Project page 1 of 4
EE DEPT, UTD FALL 2018 Sept 18, 2018
EESC 6360-501, CLASS PROJECT
“ESTIMATION OF HEARTBEAT RATE FROM THE ECG SIGNALS
USING MATCHED FILTER”
1. INTRODUCTION
A matched filter is a technique to detect the presence/parameters of a known signal in
additive noise. A template of the known signal is correlated with the noisy signal to
determine the presence of the known signal. Since correlation is a convolution operation,
this type of signal detection is basically convolution of the noisy signal with the timereversed
version of the template signal. The time-reversed template signal can be thought
of the impulse response of a LTI filter called “Matched Filter”. In digital
communications, the receiver has to detect the presence or absence of known waveforms
in noise. Matched filters exactly do that and hence are central to many receiver design. In
this project we will explore a biomedical application of matched filters to detect pulse
duration from a noisy ECG waveform.
2. PROBLEM BACKGROUND
ECG (Electrocardiography) signals record the electrical activity of the heart. They
contain lots of information about the working of the heart and are useful in diagnosis of
heart related conditions. Figure.1 shows a typical ECG waveform which we denote as
x(n) . x(n)
is a clean ECG signal. It can be observed that the waveform is a series of
well-defined pulses. The parameter we are interested to find is the time interval between
two pulses. We call it
i
. The subscript
'i'
denotes the fact that the pulse duration is not a
constant and changes with time.(Shown in Figure. 1). The inverse of
i
gives the ‘Beats per
minute’ (BPM) of the heart. Nominal value of BPM of person under rest is around 72. It can be
seen that it is relatively straight forward to determine
i
from
x(n)
. A simple peak-detection
will do the task.
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
xn)
i1
i
Figure.1 ECG waveform showing pulse duration
i
Issa Panahi EE-6360-501, Class Project page 2 of 4
EE DEPT, UTD FALL 2018 Sept 18, 2018
Sometimes
x(n)
can get corrupted by noise. This is equivalent to
x(n)
passing through a
noisy channel or medium. The (simplified) effect of the channel is the addition of a
‘white noise’
v(n)
which corrupts the signal. The noisy signal is
w(n) x(n) v(n)
and
this is the signal that is observed or is available. The goal of this project is to recover the
pulse duration information by doing some kind of signal processing on
w(n)
(Shown in
Figure. 2). The ‘signal processing’ element is an LTI filter
h(n)
to which
w(n)
is the
input and
y(n)
is the output. The impulse response coefficients
h(n)
for the case of
matched filter is the time-reversed version of a pre-recorded individual pulse
s(n) , i.e.
h(n) ? s(?n) .
The effect of passing
w(n)
through the appropriate matched filter is the
enhancement of the signal in general. It should be noted that
y(n)
is not exactly an
estimate of
x(n)
but can still retain certain information (like pulse-duration) which are
useful . The scenario is shown in Figure 2.
3. PROBLEM STATEMENT
You are given three data files. These are recorded at 1KHz sampling rate.
Check out the given data files, plot them and analyze them.
w1.txt - This data file contains a noisy ECG signal with a SNR (signal to noise
ratio) of 0 dB. This signal will be referred to as
( ) w1 n . The estimated pulse
duration intervals
s i
' are collected in a vector
T1
. Thus
[ . . . ]
1 1 2 N T
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
0 100 200 300 400 500 600 700 800 900 1000
-4
-3
-2
-1
0
1
2
3
4
1.6 1.62 1.64 1.66 1.68 1.7 1.72
x 104
-0.5
0
0.5
1
1.5 Matched Filter h(n) ? s(?n)
2.4 2.42 2.44 2.46 2.48 2.5 2.52 2.54 2.56 2.58 2.6
x 104
-4
-2
0
2
4
6
8
10
12
?
x(n)
? (n)
w(n)
y(n)
0 50 100 150 200 250 300
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
s(n)
Figure.2 Noisy Signal Generation and Processing
Issa Panahi EE-6360-501, Class Project page 3 of 4
EE DEPT, UTD FALL 2018 Sept 18, 2018
w2.txt - This data file contains a noisy ECG signal with a SNR of -5 dB. This
signal will be referred to as
( ) w2 n
As above the estimated pulse duration
intervals
s i
' are collected in a vector
T2
pulse.txt – This data file contains the template waveform
s(n) .
Your task is to find/estimate T1
and
T2
by passing
( ) w1 n
and
( ) w2 n
through the filter
h(n)
whose coefficients are determined from
s(n) . You should use MATLAB and its
features to generate your results.
Specifically, in your report you should
1) Write down the complete mathematical formulation of the block diagram in
Figure.2. Write
y(n)
in terms of
x(n) , v(n)
and
s(n)
2) Plot the time-domain, and Amplitude and Phase Spectra of
s(n)
and the
matched filter
h(n) .
3) Tabulate and plot
T1
and
T2
.
4) Give an intuitive explanation of why the matched filter works the way it does.
Some helpful Matlab routines:
MATLAB Functions
load.m
conv.m
xcorr.m
diff.m
find.m
fft.m
filter.m
Issa Panahi EE-6360-501, Class Project page 4 of 4
EE DEPT, UTD FALL 2018 Sept 18, 2018
4. COMPLETION DATE AND PROJECT REPORT DELIVERY
This assignment must be completed and the professionally written project report
must be submitted individually in class by December 4, 2018. No late delivery!
No report will be accepted after Dec. 4, 2018.
5. REPORT STRUCTURE
Your report must be prepared/typed professionally using MS-Word, Equations, or
MS-Power point. A soft copy of your work/report may be requested.
Your report must have your complete full name, your UTD email, course name
and number - all printed in upper case letters and numbers on the first page.
Your report must include this entire write-up as its first pages.
Pages of your report must be stapled together. Every page must be numbered.
The same notations, variable names used in this write-up must be used
throughout your report.
You must use upper case bold letters for the matrices, and lower case bold letters
for vectors. Functions and variables must be in Italic format (see notations used
in your textbook).
Organize and write your report well. BE BRIEF. Write down and explain only
your own work, equations, answers, and results clearly and efficiently. Avoid
redundancy and writing unnecessary or irrelevant materials.
Figures and plots, if any, must all be easily/clearly seen, numbered and labeled
very well.
Negative credit will be given if any of the report’s requirements is not fully met.
The End.
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。