Você está na página 1de 8

Matlab

c
E XERCISE II FOR SC 3011 TN : A CADEMIC Y EAR 16/17

Matlab c
Exercise II: Adaptive Noise Can-
celing Applied to Fetal Electrocardiogra-
phy
Michel Verhaegen, Laurens Bliek and Tijmen van Oldenrijk

February 23, 2017

Delft University of Technology


Delft Center for Systems and Control
Mekelweg 2, NL-2628 CD Delft, The Netherlands
M.Verhaegen@tudelft.nl
ii

Copyrighted material.
c 2015 by Michel Verhaegen
Contents

1 The problem of Active Noise Cancellation 1


1.1 Theoretical Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Active Noise Control: the Matlab c


exercise 3
2.1 The data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

iii
iv Contents

Copyrighted material.
c 2015 by Michel Verhaegen
Chapter 1

The problem of Active Noise


Cancellation

1.1 Theoretical Reference


This exercise is an adaptation of the example in
.
nl.mathworks.com/help/dsp/examples/adaptive-noise-canceling-anc-applied-to-fetal-electrocardiography.html

You can open that example app in Matlab and play around with it by typing
adaptiveNoiseCancellationExampleApp in the command window1 . The
example app is not required for this exercise. We will use the theory from Chap-
ter 7 of the reader in this application.
In adaptive noise canceling, a measured signal consists of two signals: an
unknown signal of interest and an interference signal. The goal is to remove the
interference signal from the measured signal by using a reference signal that is
highly correlated with the interference signal. The example considered here is an
application of adaptive filters to fetal electrocardiography, in which a maternal
heartbeat signal is adaptively removed from a fetal heartbeat sensor signal.
The measured maternal electrocardiogram signal (MECG) is obtained from
the chest of the mother. The goal of the adaptive noise canceller in this task is
to adaptively remove the maternal heartbeat signal from the fetal electrocardio-
gram signal.
The measured fetal electrocardiogram signal (FECG) from the abdomen of the
mother is usually dominated by the maternal heartbeat signal that propagates
from the chest cavity to the abdomen. This propagation path can be described
by a linear FIR filter. The maternal heartbeat signal is much stronger and also
has a different frequency than the fetal heartbeat. We wish to use the theory of
Wiener filters to recover the underlying fetal heartbeat signal.

1
May require Matlab version 2016 or higher, and the DSP system toolbox.

1
2 Chapter 1 The problem of Active Noise Cancellation

Copyrighted material.
c 2015 by Michel Verhaegen
Chapter 2

Active Noise Control: the


Matlab c exercise

2.1 The data


The measured fetal and maternal ECG signals are contained in the Matlab c

Workspace opdracht2data.mat resp. as variables FECG and MECG. The re-


covered fetal signal using an LMS filter (which is a different filter than a Wiener
filter, not covered in this course) has also been included as variable FECG LMS.
The Workspace can be downloaded from the Blackboard site.

2.2 Exercise
For recovering the fetal ECG from the two measured ECG signals, the following
Parts need to be solved.
1. Formulate the problem as a Minimum Variance FIR Wiener Problem, using
the symbols x, w, d, d and e as in Figure 7.1 in the reader. No numerical
values are required, but please specify the meanings of all the symbols and
their relation to the two measured signals FECG and MECG. Also explain
how to finally recover the fetal heartbeat signal when the Wiener problem
has been solved. Make sure that both x and d do not require the unknown
underlying fetal heartbeat signal that is to be recovered. 2 points
2. Determine the Wiener-Hopf equation for this problem, and explain how
the different terms in the equation relate to the two measured ECG signals.
1 point
3. If only the measured signals are given, the auto- and cross-correlations
used in the Wiener-Hopf equation need to be approximated. This can be
done using the following formulae:
N N
1 X 1 X
rx ( ) = x(n)x(n ), rdx ( ) = d(n)x(n ). (2.1)
N N
n= +1 n= +1

3
c
4 Chapter 2 Active Noise Control: the Matlab exercise

Calculate the approximations of the auto- and cross-correlations using the


measured ECG signals. Your answer should consist of the used code and
1 point the first 10 values of the auto- and cross-correlations ( = 0, 1, . . . , 9).
4. Using a 10-th order FIR Wiener filter, calculate the optimal filter coeffi-
cients. Your answer should consist of the used code and the 10 filter coeffi-
cients. Hint: the toeplitz command may be useful when defining your
1 point covariance matrix.
5. Calculate the recovered fetal heartbeat signal using the optimal Wiener fil-
ter. Your answer should consist of the used code and a plot with both the
measured maternal ECG and the recovered fetal heartbeat (not the mea-
sured fetal ECG). Hint: the filter command can be useful when using
1 point the Wiener filter.
6. We wish to compare this method to recover the fetal heartbeat with another
method that uses an LMS filter. The results of this other method have been
included in the data as the variable FECG LMS, as the LMS filter is not dis-
cussed in this course and is based on a different principle that adapts itself
on-line. It is hard to make a comparison, however, since the recovered fetal
heartbeat signal still contains a lot of noise. We will filter the noise using a
simple moving average filter. Use a moving average filter of the following
form:
q1
X
y(n) = bk u(n k), (2.2)
k=0
with bk = 1/q for k = 0, . . . q 1. You are free to choose q. Your answer
should consist of:
(1) A plot of the recovered fetal heartbeat using the two different methods,
1 point after filtering the recovered signal with a moving average filter.

1 point (2) The used code and your choice of q (plus motivation).
7. Which of the two methods gives the results that you think are closest to the
1 point underlying fetal heartbeat? Please motivate your answer.
3 points 8. Solve exercise 5.2 from the reader.
3 points 9. Solve exercise 6.8 from the reader.

2.3 Reporting
The report of this Matlab c
exercise should consist of the requested answers
to the above 4 Parts also nicely ordered in 8 corresponding parts, together with
your answers to exercises 5.2 and 6.8 from the reader. The Matlab c
scripts
c
should be included as text in your reports as well as your Matlab plots.
This report containing the names of the members of your group and their
student number should be dated and handed in following the Course Schedule
(see Blackboard).

Copyrighted material.
c 2015 by Michel Verhaegen

Você também pode gostar