Chapter-1 1.1 Foetal Electrocardiogram

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

CHAPTER-1

INTRODUCTION

1.1 FOETAL ELECTROCARDIOGRAM:

The foetal heart rate (fHR) and the morphological analysis of the foetal
electrocardiogram (fECG) are two of the most important tools used nowadays in
clinical investigations to examine the health state of the fetus during pregnancy.
The fHR is the mostly used parameter in foetal monitoring, since 1818. While the
fHR track shows a predictive value of almost 99% for the foetal well being
investigation, an abnormal fHR has a predictive value of only 50%. Hence, it
provides relatively poor specificity in detecting the foetal distress. Additional
information about the foetal well being can be obtained by analyzing the
morphology of the fECG signal, which was recently introduced in clinical practice
for foetal monitoring. Its clinical relevance was demonstrated by a series of clinical
studies, randomized controlled trials and prospective observational studies, which
prove that clinical foetal monitoring based on both fHR and fECG morphology
analysis, especially the ST waveform analysis, leads to the reduction in the number
of operative vaginal deliveries, smaller rate of metabolic acidosis at birth, less
blood samples performed during labor, and foetal morbidity reduction.

1.2 CARDIO TOCOGRAPHY:

The standard procedure to record the fHR is the Cardio Tocography (CTG),
sometimes known as electronic foetal monitoring. When necessary to investigate
both the instantaneous fHR and the fECG morphology, an invasive foetal
monitoring method that uses a wire electrode attached to the foetal scalp, after the
membrane rupture, is preferred. However, both methods have important
drawbacks: (i) the fHR obtained via CTG has the potential problems of reliability

1
and accuracy; in addition, the beat-to-beat variability of fHR is not present in the
CTG traces; hence, rapid variations of the fHR cannot be detected; (ii) the second
recording technique is invasive; thus, it can put the life of both the mother and the
fetus in danger (e.g., possible infections can lead to different complications).

1.3 ABDOMINAL RECORDING:

An alternative method to obtain the instantaneous fHR and the fECG morphology
is the abdominal recording of the fECG which considers an array of electrodes
placed on the maternal abdomen. This recording procedure overcomes the main
drawbacks of the methods used in clinical routine for foetal monitoring. However,
the limitation of this technique is the very low signal-to-noise-ratio (SNR) of the
available recorded fECG. This is mainly due to the fact that the fECG signal is
generated by a small source (fetus heart). In addition, it has to propagate through
different attenuating media to reach the maternal belly surface. Hence, the fECG
signals contained in abdominal signals (ADSs) provide amplitude of about 10 μV
which becomes still smaller around 28th until 32nd weeks of gestational age due to
the appearance of the insulating layer called vernix caseosa.

Furthermore, the signal of interest, that is, the fECG, is only one (weak)
component of the ADS mixture; other (disturbing) signals with higher power that
also exist are the ElectroMyogram (EMG) of the abdominal muscles, the
ElectroHysterogram (EHG), the maternal ECG (mECG), the baseline wander
basically due to the maternal respiration, and the power line interference (PLI).
Among them, the PLI, with the fundamental PLI component of 50 Hz/60 Hz, and
its harmonics is one of the most disturbing noise sources, because it can reach
amplitudes much greater than the abdominal fECG signal, making its analysis
almost impossible. The PLI is determined by the power supply network, and its

2
appearance in the abdominal recordings is explained by (i) the electrostatic
induction and parasitic capacitance coupling between the body and the ground;
and (ii) the electromagnetic induction through loops of the recording cables,
where a time-varying magnetic field generates a voltage proportional to the loop
area (depending on its orientation) and to the strength of the magnetic field. If
the cables are twisted, the induced voltage is reduced, but still significant for the
fECG analysis.

The fundamental PLI is definitely a problem in fECG analysis, and its harmonics,
usually present, make the PLI cancelling problem even more complex. The
harmonics are usually generated by connected nonlinear loads: neon lamps, TVs,
microwaves ovens, fridges, air conditioning devices, computers, and basically
almost any power electronics device connected to a single-phase distribution
system. The disturbing sources are in fact the rectifiers and semiconductor
switches present in almost all of these nonlinear loads which introduce distortions
in the power supply waveforms. Surprisingly, the 3rd harmonic, that is,
150 Hz/180 Hz, is the most powerful PLI harmonic.

1.4 SOURCE SEPARATION METHOD:

To date, great deals of studies have proposed ways to extract the fECG for fHR
monitoring. The first approach was the source separation method that attempted to
separate mECG and fECG from aECG using spatial distribution, such as principal
component analysis, independent component analysis, and periodic component
analysis. The above approaches aim to separate the underlying statistically
independent sources into three components: mECG, fECG, and noise. The key
assumption of the approaches is that of a linear stationary mixing matrix between
these sources. Higher the number of available abdominal recordings, better the

3
fECG extraction. However, such large numbers of recordings would require the
placement of several electrodes on the pregnant woman which could make them
uncomfortable and as well make the procedure difficult to apply during activities
of daily life. Consequently, the clinical use of the above approaches is quite limited
due to the complex electrode configuration. The second set of approaches is the
temporal methods that generate an estimation of mECG and the estimated mECG
would be subtracted from aECG. Such methods are based on ANC, template
subtraction (TS), and Kalman filter techniques among which, and the TS has been
widely used in foetal heart rate (fHR) estimation. However, the TS method is not
good enough for removing abdominal MECG, which makes it difficult to locate
the fECG R-peak accurately in the foetal heart rate (fHR) estimation. The methods
based on Kalman filter are also popular in fECG extraction using one abdominal
recording. However, Kalman filters are limited by their computational complexity
in long-term monitoring system. In addition, the Kalman filters sometimes fail
when the mECG and fECG QRS waves entirely overlap. Some recent studies also
pay more attention on the preprocess procedure.

1.5 ADAPTIVE NOISE CANCELLATION:

ANC is a classical method in fECG extraction that uses single channel thoracic
mECG as reference signal, and one aECG as processed signal. ANC is based on
training an adaptive filter to remove the projection of thoracic mECG on aECG
recordings. Therefore, the adaptive filter for abdominal mECG removal and fECG
extraction require a reference signal that is morphologically similar to the
abdominal mECG waveform. The literatures show that signal propagation from
maternal heart to the abdomen is non-linear and the morphology of the ECG
waveforms (abdominal mECG and thoracic mECG) highly depends on the
electrode locations. It is not always feasible to completely remove the abdominal m

4
ECG using the thoracic mECG as reference signal or even reconstructing the
reference signal based on a linear combination of thoracic mECGs. Therefore,
ANC is limited for foetal ECG extraction since a strict similarity between
abdominal mECG and thoracic mECG is not always the case. To resolve this issue,
proposed the event synchronous adaptive interference canceller (ESAIC) concept
as a specific application of ANC in mECG interference cancellation. The method
attempted to use thoracic recording and abdominal recording to generate artificial
signal which were used as reference Deng et al. and Shao et al. have further studied
the ESAIC concept. The method attempted to reduce the impact of nonlinear
propagation from maternal heart to maternal abdomen on foetal ECG extraction to
a certain extent. Behar et al. also proposed a single-channel method that utilizes an
echo state neural network based on ANC. However, their approach should not be
termed as single-channel algorithm, since it still requires a chest signal besides the
abdominal channel.

FIG 1.1 Abdominal signal affected by PLI including harmonics.


5
CHAPTER-2

LITERATURE REVIEW

2.1 Comprehensive study on foetal ECG extraction


A V Rajesh; R Ganesan describes the most common type of defect with
which babies are born is related to heart, nearly 1 out of every 100. A physician
studies the electrical activity of the fetus's heart, by monitoring the foetal
Electrocardiogram (fECG) collected at the time of pregnancy from mother's
abdomen. Even though the signal acquisition and signal processing techniques has
been made a great deal of progress, the extraction and analysis of Foetal ECG is
still in its outset. Very low signal-to-noise ratio of the foetal ECG compared to the
maternal ECG is the biggest challenge faced by scientists working in this area. In
this paper, we have reviewed a wide range of signal processing techniques for the
extraction of foetal ECG, along with their shortcomings and advantages.

2.2 Clinical application of the Segmented-Beat Modulation Method for foetal


ECG extraction
A. Agostinelli; S. Fioretti; F. Di Nardo; L. Burattini describes the
assessment of the foetal well-being is accomplished with the monitoring of foetal
cardiac activity. In presence of risk labor, direct foetal electrocardiography (fECG)
can be obtained by positioning an electrode on the foetal scalp. However, its
invasiveness and application limited to labor have led to the introduction of the
indirect (noninvasive) fECG, obtained by applying the electrodes on the maternal
abdomen. The abdominal recordings are corrupted by the maternal ECG (mECG)
that often covers the fECG (the signal of interest). To extract the fECG, the mECG
has to be estimated and then subtracted from the abdominal recording. To this aim,
template-based techniques are often applied. However, such techniques are
typically not able to reproduce physiological heart rate (HR) and morphological
6
variability. To overcome this limit, an innovative template-based filtering
technique termed the Segmented-Beat Modulation Method (SBMM) has recently
been proposed. To evaluate its ability to extract the fECG, SBMM is applied here
to an abdominal recording. Direct fECG was simultaneously recorded for
comparison. Each RR interval of the direct fECG was correlated with the
corresponding RR interval of the indirect fECG, and a statistically significant
strong correlation (ρ=0.86, P< 10-26) was found. Thus, the SBMM proved to be a
potentially useful tool to provide a reliable fECG signal (extracted from an
abdominal recording) that can be used for monitoring the fetus health conditions.

2.3 Foetal ECG extraction from a single sensor by a non-parametric modeling


Mohammad Niknazar; Bertrand Rivet; Christian Jutten describes the foetal
ECG and MCG extraction from a single-channel recording. A recently proposed
nonparametric model to describe second-order statistical properties of ECG signal
simplified in this paper to make it computationally faster and easier to implement.
In the proposed method an ECG signal is first decomposed to sub-bands, and then
each sub-band is modeled separately, so less complex model is required. There is
no assumption about shape of ECG signal in the model, and experimental results
show its high performance on extraction of foetal cardiac signals.

2.4 Portable foetal ECG extractor from aECG


J Rolant Gini; K I Ramachandran; Ridhu H Nair; Pooja Anand describes the
creating an affordable fECG extractor by simplifying the process of fECG
extraction from aECG. Even though invasive fECG extraction is more accurate,
non-invasive method of extraction has been preferred during prenatal considering
the foetus’s health. This makes the non-invasive fECG extraction an emerging and
required field of research. This paper gives a fundamental idea to create a
prototype for extracting the foetal ECG from abdominal ECG. The aECG has been

7
pre-processed by normalization and filtering. Based on thresholding and first order
differentiation, the maternal peak has been identified from the pre-processed aECG
signal. Using the identified maternal peaks, QRS complex of mECG has been
identified and the same has been cancelled out from aECG to cull out the fECG.
The resultant signal has been a combination of fECG and noise. The foetal peaks
have been identified from the culled out signal.
The identified foetal peaks provide information like the QRS complex of the
foetus, foetus heart rate, diagnosis of any congenital disorder and other anomalies.
This simplified algorithm has been implemented with high level language C and
executed using Raspberry Pi. The execution results with a second delay and
Raspberry Pi can create a standalone platform at any place and is handy. The
system resulted in 100% accuracy when the selected channel happened to be near
the foetus’s heart. Even in other cases, it was proven to be good and effective. This
shows that the system is affordable and practically useable.
2.5 Fast ICA based technique for non-invasive foetal ECG extraction
Sonal Nikam ; Shankar Deosarkar describe the electrocardiogram (ECG)
plays an important role in the diagnosis process and providing information
regarding heart diseases, monitoring ECG signal has high clinical significance. Out
of 125 babies, 1 baby born with some form of congenital heart defect every year.
So analysis and synthesis of foetal electrocardiograms (FECG) for disease
detection is very important. The FECG is always contaminated by mother's ECG
(MECG) so, extracting the clean FECG signal is very necessary for foetal health
monitoring.
In this study, Fast ICA algorithm with kurtosis and Negentropy as a measure of
non-Gaussianity is discussed. Further the algorithm is proposed based on Fast ICA
with maternal R-peak suppression approach which gives 90.35% extraction of
foetal R-peaks when validated by directly taken scalp foetal ECG.
8
The performance of proposed algorithm is evaluated on abdominal and direct
foetal ECG database from PhysioNet site.
2.6 The Maternal ECG Suppression Algorithm for Efficient Extraction of
the Foetal ECG from Abdominal Signal
A.Matonia ; J.Jezewski ; K.Horoba ; A.Gacek ; P.Labaj present, non-
invasive recording of abdominal foetal electrocardiogram and analysis of the foetal
heart rate variability seems to be the most promising method to detect the foetal
hypoxia. The main problem is to obtain a good quality foetal ECG, which is
strongly distorted by maternal component of dominating energy.
The paper presents the new method of maternal electrocardiogram
recognition and suppression relying on determination of template maternal PQRST
complex and its subtraction during consecutive maternal cardiac cycles. The
efficiency of the developed method was evaluated and related to three other
selected methods for maternal ECG suppression using dedicated coefficients
created for this comparison.
2.7 A new foetal ECG extraction method using its skewness value which lies in
specific range
Fahimeh Jafari; Mohammad A Tinati; Behzad Mozaffari describes the
extraction of foetal electrocardiogram (fECG) from maternal skin electrode
measurements will be raised as a prominent issue. Because of foetal heart farness
from sensors, muscle contraction, instrumentation noise and etc, recorded signals
from mother's abdomen is strongly distorted by noise. So the desired signal (fECG)
must be extracted purely. This problem can be modelled from the perspective of
Blind Source Separation (BSS), almost all the BSS algorithms can be used to
separate the foetal ECG.
Since separating all the sources from a large number of sensor signals is not
necessary, blind source extraction (BSE) methods may be a better choice. In this
9
paper we proposed a lightweight algorithm, which extracts the foetal ECG with a
pre-knowledge about its skewness. By using skewness, we defined a cost function
by which we updated weight vector and through this we extracted foetal ECG as a
desired signal. Experimental results show that the proposed method improved
quality of extracted signal by increasing SNRsvd and SNRcor. Also computational
cost required for extracting FECG was decreased.
2.8 Fetal ECG extraction from a single abdominal ECG signal using SVD and
polynomial classifiers
M. Ayat ; K. Assaleh ; H. Nashash proposed a two-tier method for extracting
foetal ECG from a single lead abdominal ECG signal. The proposed method is
based on a combination of singular value decomposition (SVD) and polynomial
classifiers. As a first tier, SVD is used to extract an estimate of the maternal
component from the composite abdominal signal by exploiting its quasi-periodic
nature. The extracted maternal signal is then used along with the abdominal
composite signal to isolate the FECG component using polynomial classifiers. The
proposed method is validated on both real and synthetic data. Results demonstrate
effectiveness of proposed method.
2.9 The Maternal Abdominal ECG as Input to MICA in
the Fetal ECG Extraction Problem
J. L. Camargo-Olivares; R. Martin-Clemente; S. Hornillo-Mellado; M.
Elena; I. Roman presents a successful system for recovering the foetal
electrocardiogram using multidimensional ICA (MICA). MICA requires as many
observations as sources. To increase the number of observations, MICA is often
applied to data sets that include measurements taken at the mother's thoracic
region. However, experiments suggest that the propagation from the maternal heart
to the mother's abdomen is not a simple delay, and that approach may fail.
Alternatively, our method first estimates the maternal ECG directly from the
10
mother's abdomen. Then, input is thus estimated from ECG to MICA. Experiments
show superior performance as compared with the traditional approach.
2.10 Unobtrusive acquisition and extraction of fetal and maternal ECG in the
home setting
Manuja Sharma ; Peter Ritchie ; Tadesse Ghirmai ; Hung Cao ; Michael P.
H. Lau describe the electrocardiogram (ECG) has been used for over a century as
the method to diagnose the heart's performance as well as one of the key indicators
in vital-sign monitoring. Nevertheless, there has been no such a device to monitor
foetal ECG (fECG) in spite of high foetus mortality rate due to heart diseases.
In this work, we present a novel patch using non-contact electrodes (NCEs)
to acquire the abdominal ECG (aECG) of the mother which comprises both fECG
and maternal ECG (mECG) and a reference patch on mother's chest to extract
mECG. The device is based on a polyimide film with NCEs and circuits, Bluetooth
Low Energy (BLE) communication and a flexible Li-polymer battery.
A MATLAB algorithm was developed to precisely extract the fECG and
mECG using Linear Mean Square (LMS) adaptive filter. The system was
characterized and validated using recorded ECG signals and an online database
with zero error between R-peaks of stabilized filter outputs and required signals.
Therefore, our aECG and mECG patch hold promise to monitor the wellbeing
states of both the fetus and mother in the home setting as well as provide data for
early diagnoses of heart diseases even before the baby is born.

11
CHAPTER-3

EXISTING METHOD

3.1 KALMAN FILTER:

The Kalman Filter is used to predict the shape of missing geometry from an
unstructured mesh. This process in generally referred to as hole filling, and to my
knowledge this is the first attempt at using Kalman Filter for that purpose.

3.1.1 HOLE FILLING:

Hole filling is a really important process in computer graphics because so


many other modeling algorithms depend on the manifoldness of a mesh. And
besides being a requirement for other algorithms, holes are generally visually
displeasing (with exceptions of course) in a model, so being able to accurately fill a
hole is a desirable ability

.Holes in a mesh can come from various places and are often introduced as
an undesirable side affect of another process. Two processes for which the creation
or holes is common are that of data acquisition and mesh simplification. Data
acquisition is frequently done by modeling tangible items using tools like laser
rangefinders.

This is done from several vantage points, with the resulting range images
integrated into a final model. However, due to many factors including surface
reflectance, occlusions, and accessibility limitations, certain areas of the scenes are
frequently not fully sampled, leading to holes in the mesh.

3.1.2 KALMAN FILTER TECHNIQUE:

The Kalman Filter is a technique for calculating the optimum estimates of process
variables in the presence of noise. It works through a process of simultaneous
12
recursion formulas that predict and correct estimates continually over the series of
data points. The Kalman Filter is most frequently used to track a time-varying
signal in the presence of noise, of which a natural application is digital signal
processing. However, if you use the position of points in space as your variable (in
the form of a series of discrete data points), and make a prediction for what your
missing data points would likely be.

It is possible to use a Kalman Filter to estimate what a series of missing geometry


likely looked like (within some resemblance anyway). Hole filling in general
contains three major stages, which can be identified as follows. Please not that
these stages are my subjective qualification for what I observed in other hole filling
work.

3.1.3 STEPS FOR HOLE FILLING:

1. Find Holes
Find the holes by keeping track of the of faces each edge is connected to, if
you have a cycle of edges with only 1 face then those edges make up a hole.
A user defined threshold can be made present if one wants to prevent certain
holes from being filled.

A good heuristic for displeasure of hole is that of the number of edges in the
whole. One could also use geometric area of the hole, or cumulative edge
length (perimeter). Planarity of the hole is also another useful heuristic in
determining which holes the user may want filled, and which he or she may
not.

2. Triangulate the Hole


This is the process of taking the polygonal hole and turning it into a set of
triangles creating triangles.

13
3. Refine Triangulation
This is what my project focused on. This step helps to refine the
triangulation and make the geometry created more accurate and visually
appealing. More information can be found in the following process section.
The results for this project have not been measured in a formal way, although I
think you will agree that they do show visually appealing results. In completing
this project, I have found that the Kalman Filter can not only be used
for hole filling, but would also make a very nice geometric smoother.

FIG 3.1 FINAL OUTPUT OF HOLE FILLING

3.2 BLIND SOURCE ALGORITHM

Many algorithms have been proposed to solve the problem of blind source
separation (BSS), where n sources (s(t)) are observed (x(t)) through a constant,
instantaneous linear process (A), possibly including process noise (n(t)):

X (t) = As (t) + n (t),

14
Where, A is usually referred to as mixing matrix. This separation is to be carried
out with minimal knowledge on the sources s(t) and the mixing matrix A. In
independent component analysis (ICA) it is assumed that the sources are
independent of each other’s and that they have non-Gaussian distributions. Mixing
matrix is assumed to have rank (A) = n, i.e. there exist at least as many mixtures as
sources.

Fast algorithm for SBSS by de-noising / re-estimation Assume the data white or
pre-whitened.

3.2.1 PROCEDURES OF BSA:

1. Start from a random projection vector w.

2. Orthogonalize w with respect to the other already estimated projections W by w


← w − WTWw.

3. Normalize: w ← w ||w||.

4. Find the estimate for the source by ŝi = wT x.

5. De-noise the source estimate using I’th mask.

6. Re-estimate w to the MLS fit of the de-noised source estimate.

7. Repeat orthogonalization (step 2) and normalization (step 3) of w and estimation


(step 4) for ŝi. 8. If ∆w >, reiterate from step 5.

9. Add w to already estimated projections W and ŝi to ŝ. Increment i and go back to
step one, if not done components on their mode frequency, i.e. the frequency
content of the first signal was completely known, while only the main frequency of
the second was known. Respectively the on-off non-stationary of the third signal
was assumed to be known. Of the fourth it was known only that it is active in the

15
last fourth of the time course. The last signal was assumed to have a known quasi-
periodic repetition rate. Often it is the case that we want to use BSS for exploratory
data analysis. We would like to keep all the components having meaningful
characteristics and discard the rest. We suggest that in that case, each mask is used
to produce a candidate estimate of a component. The de-noising principle can be
extended to full blind source separation by adaptively creating suitable masks by
inspecting e.g. the spectrogram of the data.

3.3 CONCEPT:

A method for fetal ECG extraction based on wavelet analysis, the least mean
square (LMS) adaptive filtering algorithm, and the spatially selective noise
filtration (SSNF) algorithm. The threshold was set and noise components were
removed with the SSNF algorithm. The adaptive filtering has two inputs, an
original input and reference input the abdominal signal as original input d(n) and
thoracic as reference input ,coefficient are adjusted based on error signal. Wavelet
analysis and DE is to feature optimization (Extended Kalman Smoother). The
main aim of the application of DE (optimized parameters estimation stage) is to
minimize the objective function and find the optimize parameter (phase value,
amplitude value and width value of the noisy ECG components such as P, Q, R, S
and T wave), which will be useful for the state equation in the EKS.

16
CHAPTER-4

PROPOSED METHOD

4.1 OBJECTIVE:

To extract FOETAL ECG accurately, we propose a new method for ECG


extraction based on adaptive filtering and DE based feature optimization

4.2 SYSTEM ARCHITECTURE:

FIG 4.1 BLOCK DIAGRAM

4.3 VARIOUS METHODS USED:

In this paper, we propose an extensive ANC structure to remove the abdominal


mECG from abdominal recording. Concretely, the smooth window (SW) technique
and SVD method were combined (SWSVD) to estimate the abdominal mECG in
the aECG signal. The estimated signal replaced the thoracic mECG recording and
it was used as the reference signal in ANC. The limitation associated with the lack

17
of strict waveform similarity between the interference (mECG in aECG) and the
reference signal (mECG recorded in maternal thorax) could be avoided completely
in the proposed method. The method only requires one abdominal recording.
Therefore, the electrode configuration allows for building light and comfortable
recording systems for continuous long-term fetus monitoring. This paper is
organized as follows: in, the theory and implemented detail of our proposed
method are described. In, the two databases used in the current study and statistical
assessment are presented. In the theory and implementation detail of the four
typical single-channel methods are presented in detail. Presents the Results
while discusses the results. Moreover, the paper is concluded in ECG.

4.3.1 NON-INVASIVE fECG:

Non-invasive fetal electrocardiograms (fECGs) are an alternative method to


standard means of fetal monitoring which permit long-term continual monitoring.
However, in abdominal recording, the fECG amplitude is weak in the temporal
domain and overlaps with the maternal electrocardiogram (mECG) in the spectral
domain. Research in the area of non-invasive separations of fECG from abdominal
electrocardiograms (aECGs) is in its infancy and several studies are currently
focusing on this area. An adaptive noise canceller (ANC) is commonly used for
cancelling interference in cases where the reference signal only correlates with an
interference signal, and not with a signal of interest. However, results from some
existing studies suggest that propagation of electrocardiogram (ECG) signals from
the maternal heart to the abdomen is non-linear; hence the adaptive filter approach
may fail if the thoracic and abdominal MECG lack strict waveform similarity. In
this study, singular value decomposition (SVD) and smooth window (SW)
techniques are combined to build a reference signal in an ANC. This is to avoid the
limitation that thoracic mECGs recorded separately must be similar to abdominal

18
mECGs in waveform. Validation of the proposed method with r01 and r07 signals
from a public dataset, and a self-recorded private dataset showed that the proposed
method achieved F1 scores of 99.61%, 99.28% and 98.58%, respectively for the
detection of fetal QRS. Compared with four other single-channel methods, the
proposed method also achieved higher accuracy values of 99.22%, 98.57% and
97.21%, respectively. The findings from this study suggest that the proposed
method could potentially aid accurate extraction of fECG from mECG recordings
in both clinical and commercial applications.

4.3.2 ADAPTIVE NOISE CANCELLER:

ANC is a classical method in fECG extraction that uses single channel thoracic
mECG as reference signal, and one aECG as processed signal. ANC is based on
training an adaptive filter to remove the projection of thoracic mECG on aECG
recordings Therefore, the adaptive filter for abdominal mECG removal and fECG
extraction require a reference signal that is morphologically similar to the
abdominal mECG waveform. The literatures show that signal propagation from
maternal heart to the abdomen is nonlinear and the morphology of the ECG
waveforms (abdominal mECG and thoracic mECG) highly depends on the
electrode locations. It is not always feasible to completely remove the abdominal
mECG using the thoracic mECG as reference signal or even reconstructing the
reference signal based on a linear combination of thoracic mECGs. Therefore,
ANC is limited for foetal ECG extraction since a strict similarity between
abdominal mECG and thoracic mECG is not always the case. To resolve this issue,
proposed the event synchronous adaptive interference canceller (ESAIC) concept
as a specific application of ANC in mECG interference cancellation. The method
attempted to use thoracic recording and abdominal recording to generate artificial
signal which were used as reference Deng et al. and Shao et al. have further studied

19
the ESAIC concept. The method attempted to reduce the impact of nonlinear
propagation from maternal heart to maternal abdomen on fetal ECG extraction to a
certain extent. Behar et al. also proposed a single-channel method that utilizes an
echo state neural network based on ANC. However, their approach should not be
termed as single-channel algorithm, since it still requires a chest signal besides the
abdominal channel.

The novelty and the main difference between our proposed method and the other
algorithms based on the single-lead aECG signal are two folds. First, we use more
information from the single-lead aECG signal. Note that the traditional R peak
detection algorithms mainly count on the morphological landmarks (fiducially
points), such as the maximal points representing the R peaks, or the maximal
“energy” pattern driven by the QRS complex in the TF domain determined by, e.g.,
the wavelet transform. The mIHR and fIHR are then obtained by interpolating the
estimated R peak locations. On the other hand, the de-shape STFT allows us
to directly extract the mIHR and fIHR from the single-lead ECG signal, and the
fIHR from the rough fECG estimate. It is then possible to utilize the mIHR and
fIHR to guide an accurate R peak detection. Unlike the traditional approach, we
simultaneously use the frequency information (the mIHR and fIHR), which reflects
the time-varying and nonlinear beat-to-beat relationship, and the morphological
landmark information. Second, based on the nonlinear manifold model, we apply
the nonlocal median algorithm to extract the maECG and f ECG signals. For each
cardiac activity candidate, we only consider those ECG segments with a similar
pattern, and use the median to estimate the underlying cardiac activity. Compared
with the traditional TS methods where the mean or the mean together with the first
few principal components, of consecutive aECG segments containing cardiac
activities is considered to be the template of the cardiac activity, the nonlocal

20
median algorithm handles the following commonly encountered issues. The fact
that the QRST complex morphology is time-varying might be overlooked in the
traditional TS procedure; the mean of consecutive aECG segments containing
cardiac activities is well known to be sensitive to outliers; the TS algorithm is
sensitive to the number of principal components and an empirical optimization is
needed. The nonlocal median algorithm, on the other hand, could bypass these
limitations. In summary, the de-shape STFT is applied to get a better mIHR and
fIHR and hence maternal and foetal R peaks, and the nonlocal median is applied to
get a better mECG and fECG.

4.4 TYPES OF fECG SIGNLAS:

There are two main types of fECG signals. The first kind of signal is directly
recorded through an electrode attached to the foetal skin. For example, the
electrode could be attached to the scalp while the cervix dilates during delivery,
which is considered invasive. While the recorded signal is of high quality, it can
only be recorded during a specific and short period, and the instrument is not
designed for long-term monitoring purposes. The infection risk is also not
negligible. Therefore, it is not routinely used in clinics. This is called the direct
fECG signal, which the STAN monitors depends on.

The second kind of signal is recorded from the mother's abdomen, where the
sensor is close to the foetus so that the fECG signal is strong enough compared to
the maternal ECG. The recorded signal is called the abdominal ECG (aECG),
which is composed of the maternal cardiac activity, called the maternal abdominal
ECG (maECG), and the foetal cardiac activity, called the indirect fECG signal (or
non-invasive fECG signal). When there is no danger of confusion, we call the
indirect fECG signal simply the fECG signal in this paper. Excellent summaries of
available measurement techniques and fECG history. The aECG signal is non-

21
invasive, easy-to-obtain, and suitable for long-time monitoring purposes. However,
from the signal processing prospective, it is challenging to obtain the indirect
fECG signal from the aECG signal. For example, the fECG signal is always
“contaminated” by or mixed with the maECG, and the signal-to-noise ratio (SNR)
is generally low. These issues challenge the estimation of the fECG and hence the
HRV analysis from the aECG signals. Furthermore, even if the maECG signal
could be successfully decoupled from the fECG signal and perfectly de-noised,
interpreting the morphology of the fECG signal is still challenging. This issue
originates from the individual variation among subjects, e.g., the uterus position
and shape, and the foetal size and presentation. Therefore, even if we could
standardize the lead system on the mother's abdomen, the application of the fECG
waveform is still limited.

4.5 COMPARISON:

The above-mentioned algorithms all have their own merits and disadvantages; e.g.,
algorithms depending on multiple leads usually provide a more accurate result, but
the dependence on multiple leads renders it less applicable for screening and
monitoring purposes. On the other hand, the algorithms depending on the single-
lead aECG signal usually have lower accuracy, although they could be applied to a
wider range of situations. To simultaneously fulfil the practical need and the
accuracy, in this paper, we propose a novel algorithm to extract the foetal
instantaneous heart rate (fIHR) and the fECG signal from the single-lead aECG
signal from a different viewpoint. The proposed algorithm combines a recently
developed nonlinear time-frequency (TF) analysis called the de-shape short time
Fourier transform (de-shape STFT) and the nonlocal median; the de-shape STFT
extracts the maternal instantaneous heart rate (mIHR) from the single-lead aECG,
which provides the maternal R peak information.

22
S.NO METHOD SNR

1. CONVENTIONAL METHOD 91

2. EKF 96.2

3. EKS 98

TABLE 4.1 COMPARISONS OF VARIOUS METHODS

The paper is organized as follows, we discuss a phenomenological model for the


aECG and the mathematical background for the de-shape STFT and nonlocal
median. In Section 3, the single-lead fECG extraction algorithm is introduced. The
material and results are reported in. In the paper is summarized by a discussion,
including limitations and future works.

4.6 OVERVIEW OF THE PROJECT:

In this project, we proposed a new method for fetal ECG extraction based on
wavelet analysis, the least mean square (LMS) adaptive filtering algorithm, and the
spatially selective noise filtration (SSNF) algorithm. First, abdominal signal sand
thoracic signals were processed by stationary wavelet transform (SWT), and the
wavelet coefficients a teach scale were obtained.

For each scale, the detail coefficients were processed by the LMS algorithm. The
coefficient of the abdominal signal was taken as the original input of the LMS
adaptive filtering system, and the coefficient of the thoracic signal as the reference
input. Differential evaluation based feature selection performed for best feature
selection. Then, correlations of the processed wavelet coefficients were computed.
The threshold was set and noise components were removed with the SSNF
algorithm.

23
CHAPTER-5

REQUIREMENT ANALYSIS

5.1 SOFTWARE REQUIREMENT:

MATLAB with signal processing

5.2 HARDWARE REQUIREMENT:

System : Windows XP Professional Service Pack 2

Processor : Up to 1.5 GHz

Memory : Up to 512 MB RAM

5.1.1 DIGITAL SIGNAL PROCESSING:

5.1.1.1 INTRODUCTION:

Digital Signal Processing (DSP) and how it can be used in radio receiver
technology to improve performance and flexibility. Today, Digital Signal
Processing, DSP, is widely used in radio receivers as well as in many other
applications from television, radio transmission, or in fact any applications where
signals need to be processed. Today it is not only possible to purchase digital
signal processor integrated circuits, but also DSP cards for use in computers. Using
these DSP cards it is possible to develop software or just use a PC platform in
which to run the DSP card.

5.1.1.2 COMPARISON:

DSP has many advantages over analogue processing. It is able to provide far better
levels of signal processing than is possible with analogue hardware alone. It is able

24
to perform mathematical operations that enable many of the spurious effects of the
analogue components to be overcome. In addition to this, it is possible to easily
update a digital signal processor by downloading new software. Once a basic DSP
card has been developed, it is possible to use this hardware design to operate in
several different environments, performing different functions, purely by
downloading different software.

It is also able to provide functions that would not be possible using analogue
techniques. For example a complicated signal such as Orthogonal Frequency
Division Multiplex (OFDM) which is being used for many transmissions today
needs DSP to become viable. Despite this DSP have limitations. It is not able to
provide perfect filtering, demodulation and other functions. There are
mathematical limitations.

In addition to this the processing power of the DSP card may impose some
processing limitations. It is also more expensive than many analogue solutions, and
thus it may not be cost effective in some applications. Nevertheless it has many
advantages to offer, and with the wide availability of cheap DSP hardware and
cards, it often provides an attractive solution for many radio applications.

5.1.1.3 What is DSP?

As the name suggests, digital signal processing is the processing of signals


in a digital form. DSP is based upon the fact that it is possible to build up a
representation of the signal in a digital form. This is done by sampling the voltage
level at regular time intervals and converting the voltage level at that instant into a
digital number proportional to the voltage. This process is performed by a circuit
called an analogue to digital converter, A to D converter or ADC. In order that the
ADC is presented with a steady voltage whilst it is taking its sample, a sample and

25
hold circuit is used to sample the voltage just prior to the conversion. Once
complete the sample and hold circuit is ready to update the voltage again ready for
the next conversion. In this way a succession of samples is made.

FIG 5.1 Sampling a waveform for DSP

Once in a digital format the real DSP is able to be undertaken. The digital signal
processor performs complicated mathematical routines upon the representation of
the signal. However to use the signal it then usually needs to be converted back
into an analogue form where it can be amplified and passed into a loudspeaker or
headphones. The circuit that performs this function is not surprisingly called a
digital to analogue converter, D to A converter or DAC.
26
FIG 5.2 Block diagram of a DSP

5.1.1.4 ADVANTAGES:

The advantage of DSP, digital signal processing is that once the signals are
converted into a digital format they can be manipulated mathematically. This gives
the advantage that all the signals can be treated far more exactly, and this enables
better filtering, demodulation and general manipulation of the signal.

Unfortunately it does not mean that filters can be made with infinitely steep sides
because there are mathematical limitations to what can be accomplished. When
designing the hardware system for a DSP application it is necessary to carefully
consider the approach that will be taken.

One of the fundamental decisions involves whether to use a standard DSP


processor, or whether to use an FPGA in the DSP hardware. Each has its own
advantages and they need to be carefully balanced at the earliest stages of the
design.

27
5.1.1.5 DSP PROCESSOR:

A DSP processor is a specialized processor that is designed specifically for


operating complex mathematically orientated intensive calculations very swiftly.
As processing needs to be undertaken almost in real time, the speed of the
processor is one of the main limiting performance criteria for the performance of
the system For example very steep filters need more processing than those that are
not so steep, etc..

While DSP processors, despite their sophistication in terms of processing


have limitations, they also have advantages. One of these is in their cost. They may
still be expensive by some standards, but they are nevertheless cheaper than their
counterparts, the FPGA.

5.1.1.6 FPGAs for DSP:

The other approach that many adopt is to use an FPGA as the core of the
DSP hardware. These devices can be programmed and there are many set cores
that can be used to provide the routines that are required. For example if a filter is
required, then it is possible to tailor circuitry within the FPGA to undertake this.
Similarly other functions can be programmed in on top of the basic processor. In
this way the FPGA is able to be programmed to provide a highly efficient and
tailored solution.

The main disadvantage of the FPGA is its cost. FPGAs are more costly that
DSP processors and therefore performance has to be weighed against cost. FPGAs
and DSP processors provide two very different approaches to the design of DSP
hardware systems. Each has their own advantages. There are many high sampling

28
rate applications that an FPGA does easily, while the DSP could not. Equally, there
are many complex software problems that the FPGA cannot address. Radio
Frequency, RF, Technology and Design- concise guides, information, tutorials and
data about radio frequency, RF, technology and RF design.

RF technology is key to many aspects of electronics these days. With many


systems from cellular to other wireless technologies including, Wi-Fi, WiMAX,
NFC, RFID, and many other systems using RF signals.

5.1.2 TYPES OF RADIO SIGNAL MODULATION:

 Amplitude modulation, AM

 Quadrature amplitude modulation, QAM

 Frequency modulation, FM

 Phase modulation, PM

 Amplitude & Phase Shift Keying, APSK

5.1.2.1 RADIO SIGNAL MODULATION & MULTIPLE ACCESS


FORMATS

 Multicarrier modulation, MCM

 OFDM

 FBMC

 CDMA basics

 SCMA - Sparse code multiple access

 NOMA - Non-orthogonal multiple access


29
5.1.2.2 NOISE & INTERFERENCE:

 Types of electronic / RF noise

o Thermal noise

o Shot Noise

o Flicker 1/f noise

o Avalanche noise

 Phase noise / phase jitter tutorial

 Passive inter modulation , PIM tutorial

5.1.2.3 FREQUENCY SYNTHESIZERS:

 Phase locked loop tutorial

 Frequency synthesizer types available

 Indirect, PLL frequency synthesizer

 Direct digital synthesizer, DDs tutorial

5.1.2.4 RF BUILDING BLOCKS:

 RF combiners, splitters, hybrids, couplers tutorial

 Tutorial of the basics of RF filters

 Tutorial of other filters

 Butterworth filter

 Chebychev filter

30
 Bessel filter

 Elliptic / Causer filter

 Gaussian filter

 The fundamentals of RF mixers and mixing

 Attenuators

 Doherty amplifier

5.1.2.5 RADIO RECEIVER TECHNOLOGY:

 Super heterodyne radio receiver - superhet

 RF receiver sensitivity

 Software defined radio

 Cognitive radio technology

 FM demodulation and demodulators

 AM demodulation and demodulators

 Digital Signal Processing, DSP, tutorial

 Radio receiver selectivity & filters

 Efficiency of receivers

 Receiver overload performance

 Dynamic range

 FM reception - squelch, quieting and capture ratio

31
5.1.2.6 VSWR AND RETURN LOSS:

 Summary of Return loss and how it is used

 Chart / table relating return loss to VSWR and reflection co-efficient

5.1.2.7 BIT ERROR RATE:

 Bit error rate overview

 Bit error rate testing

5.1.3 MATLAB:

All of the program and all of the code was written in Math works Mat lab.
Mat lab is, in contrast to for example C or C++, a high level language based on
matrices. With over 30 years since Mat lab started taking shape, it has grown to
one of the most used programs for engineering simulations and modeling. Mat lab
is complemented by Simulink which is a graphical programming language where
instead of typing code the user selects boxes and elements representing different
operations sorts and draws connections between these.
Mat lab and Simulink can also be combined to work together. Mat lab also
includes various toolboxes with functions and objects that can be created to get a
project started. The toolboxes are related to various engineering fields such as
aerospace, electronics, control theory and many more. This makes Mat lab one of
the most popular software programs for engineers and scientists.
The many functions of sampling from a file and the mic, filtering and
reconstructing the signal, and the DSP toolbox were used. The DSP toolbox
provides analyzing tools such as Time Scope objects, Spectrum Analyzer objects
and filter constructing algorithms. Only a small part of these functions are used in

32
the finished project, but many of them were used in the development so that the
focus could be put onto one problem at a time.

5.1.3.1 GENERATION OF CODE

To construct the program, various tools in Mat lab have been used. To create
the Graphical User Interface (GUI), the Mat lab environment “Guide" has been
used. This is a tool to help create GUI’s more creatively by instead of typing code
specifying where to put buttons and axes, they can be dragged and placed on a
canvas which decreases the time and effort tremendously when working with a
complicated GUI. The main GUI's construction in “Guide" is shown in Figure

FIG 5.3 the main GUI in the creative setting Guide.

The base of the program is the main loop. Flowchart of the main loop can be
seen in Figure 5.2. The simplified version of the structure of the loop can be seen.
This pseudo code describes the test bench upon which the main loop is built. The
program clearly has three phases. The program is first initialized, the Audio

33
recorder" object is created, variables are loaded as well as memory for vectors and
arrays is reallocated. Then, in the main loop, the sound is sampled and divided into
frames. At the end of the loop there is usually either some plots created or some
sound is sent to the audio output.

FIG. 5.4 The loop that runs while the On/Off toggle button is pushed.

34
FIG. 5.5 Pseudo code of the base of a test bench, the foundation of the main
loop.

The middle of the loop is where the signal is processed, either by filtering or by
computing the FFT is performed. At the end of the program there is a terminate
phase, where in this case the “Audio recorder" object is released.
5.1.3.2 FILTER DESIGN ALGORITHMS:
Since this program was used for educational purposes there should be
different ways to construct and filter the audio. The different ways are listed below.
The main way of constructing a filter is by typing in the coefficients of the filter
and in the text boxes of the “Own filter design"-control panel.
 Create a Mat lab filter in the “Mat lab filter"-control panel.
 Create a Mat lab function and typing the name of the function in the “Own
filter function"-text box in the “Filter source" control panel.

35
When it comes to designing the filter for the “Own filter design", it is up to the
user to find the coefficients. Mat lab then uses the function “y = filter (b, a, x)" to
calculate the output y from input signal x with the help of coefficients b and a.
“Mat lab filter" uses the “Filter Design assistant" to calculate a filter object which
is also filtering with the help of “y = filter (filter object, x)". This provided tool
Mat lab includes design methods such as Equiripple, Kaiser Window, Butterworth,
Chebychev Type I and Type II and Elliptic.
The prefabricated filters have various design methods. The basic FIR and
IIR filter types have been created with the help of Mat lab's "filter builder", which
is slightly more complicated than “Filter Design Assistant".
5.1.3.3 GRAPHICAL USER INTERFACE:
The most important part of the program is the graphical user interface. The
main GUI can be seen in Figure, and the other two can be seen in Figure. In this
section the different parts of the GUI will be reviewed to give an idea of how the
program is used, in complement to the flowchart in Figure.
All of these separate control panels have an information button, which open
a separate help dialog with a small text describing the functionality of the control
panel as well as some of the limitations.
5.1.3.3.1 ON/OFF:
The On/Off control unit consists of three main interaction sources. There is
the On/Off toggle button which starts the main loop described by the flowchart in
Figure. There is also a pause toggle button which can be used at any point to pause
and restart. The pause button activates a spin loop in the main loop. While the
pause button is pushed the user could enter either the magnified time plot GUI or
the magnified FFT plot GUI. Third there is the reduced visual playback tick box
which is ticked by default.

36
5.1.3.3.2 SOURCE:
There is the option whether to sample from a file or whether to sample from the
mic input of the computer. Both of them use the same algorithm and both of them
process the music in real time. The mic input is the default and the file input is
merely thought of as a complement to increase the edibility of the program.

FIG.5.6 The main GUI's on/off control unit.

The user chooses how to sample the music and if the file input is chosen, the file
name has to be entered as text in the “File name"-text box. The entire file name has
to be entered, including the file type extension.

FIG. 5.7 THE SOURCE CONTROL PANEL.

37
5.1.3.3.3 MISCELLANEOUS:
Setting the sampling rate is only an option while the filter source is set to mic
input. When the main loop is running, the sampling rate text box is blocked from
usage but the user can still read out which sampling rate is used. It is the file's
sampling rate that sets the sampling rate at which the program samples the sound.
The default is 44100 Hz. The gain works in a similar manner as a volume knob. By
pressing the arrows, the gain multiplier can be increased or decreased. The user can
also choose to enter a non-integer value by typing the value into the textbox.

FIG.5.8 THE MISC CONTROL PANEL.

5.1.3.3.4 FILTER SOURCE:


The filter source control panel allows the user to choose the filter source. The
options are:
 Own filter design
 Mat lab filter (“Let Mat lab do it")
 Prefabricated filter

38
5.1.3.3.4.1 OWN FILTER DESIGN:
Since both IIR filters and FIR filters can be expressed as a fraction. The
Own filter design" panel is supposed to be self explanatory. The coefficients of the
filter are entered in the text box separated by a space (ASCII 32). This can be done
at any time. However, the main loop has to be off to press the push button \Update
filter". By pressing the “Update filter"-button the coefficients are saved as the
“Own filter design" object, making it possible to use the filter to filter the sound.
The idea is that the student has constructed a filter on paper and wants to apply it in
a real world application.
The “Own filter design" panel lets the student apply the filter easily on some
signal. The “Visualize own filter" is another tool to make the student understand
the properties of the filter has constructed by opening up the built in Mat lab GUI
“Filter Visualization Tool". In this environment the student can acquire
information about the magnitude response, phase response and other important
information about the structure, stability and type.

FIG. 5.9 OWN FILTER DESIGN MANAGEMENT CONTROL PANEL

39
OWN FILTER FUNCTION:
“Own filter design" and “Let Mat lab do it" uses the filter methods described
in Section. “Prefabricated filter" lets the user choose between a selection of filters
from a popup menu, some FIR filters, some IIR filters and some simpler filters
with sound effects. “Own filter function" lets the user construct a function script in
Mat lab which can receive an input vector, perform filtering or whatever the user
wishes to do with the samples, and return a vector of the same size.
This option is suitable if the user wishes to use more complicated filters.
This invites the user to play and create filters with sound effects, and cascaded
filters with endless possibilities. The only criterion to create such a filter is as
mentioned, that the size and shape are the same for input and output signal, and the
function header must be as described in Equation 3.1 with a header that handles an
indexation variable.
The reason for this is that many more advanced filters such as a anger for
instance has a periodical feature to create these sound effects. When Mat lab
divides the samples into frames, these frames represent such a short period of time
in a song that these periodical features do not have time to create an effect. Anger
has a periodical feature with a period of around 20-40ms, a frame of 1024 samples
sampled at 44100Hz represents a time from t = 0 seconds to t = 1 44100 fi1024 =
0:232 seconds.
The anger then needs to keep track of its own periodicity when the next
frame arrives so that the effect can continue without interruptions that would
worsen the sound. The filtering method can be changed anytime while the program
is running, even if the main loop is activated. To activate filtering, the tick boxes
“Apply filter" needs to be ticked.
Function y = test filter function (audio in; index)
40
FIG. 5.10 THE FILTER SOURCE CONTROL PANEL.

5.1.3.3.4.2 MATLAB FILTER:


When students will construct filters in the future, there is a great chance that
companies or others will have prefabricated filter algorithms and programs for this
purpose. Also, when discussing filter properties with coworkers and fellow
students it is important that the terminology is correct. The “Mat lab filter" panel
lets the student construct a filter and apply it without the tedious works of
calculating the coefficients by hand. Then “Create Mat lab filter"-push button
allows the user to create a filter using Mat lab's “Filter design assistant" by
specifying parameters to meet requirements.

FIG. 5.11 THE MATLAB FILTER DESIGN PANEL.

41
This gives an incentive to learn the terminology used in filter specifications as well
as common construction algorithm names. The “Change Mat lab filter"-push
button lets the user change the parameters of the already constructed filter and
“Visualize Mat lab filter" opens up the “Filter Visualization Tool" to acquire the
information already mentioned in Section 3.3.4. The text below gives some simple
information about the filter, but the text string mostly aims to indicate whether a
filter has already been created or not.
5.1.3.3.4.3 IMPULSE RESPONSE:
The user can plot a simple plot in the axes inside the “Impulse response"
panel. The interface is very limited and there are no possibilities for interaction.
The panel is merely there to give the user a rough idea of how the impulse
response of the filter might look like. The reason for this is that in Mat lab's “Filter
Visualization Tool" there already is possibilities of acquiring this information.

FIG. 5.12 IMPULSE RESPONSE PANEL WITH AXES.

42
5.1.3.3.4.4 SPECTRAL ANALYSIS:
The spectral analysis control panel is designed to communicate to the user
the sufficient information needed to be able to know what type of filter is needed.
“Spectral analysis" pause toggle button needs to be pressed.

FIG.5.13 THE SPECTRAL ANALYSIS CONTROL PANEL.

43
The top axes plot the FFT of the input signal and the bottom the output signal. It is
possible to change the visible range. However, only the x-axis can be changed and
only while pause is activated. So either the program has to be paused or if the user
needs more information, while pause is active (s)he can press the magnifying glass,
opening up the spectral analysis's GUI. With this interface open the user can
change both the limits of the x-axis and the y-axis to have a closer look. However,
only information from the present frame is available.
5.1.3.3.4.5 TIME PLOT OF INPUT SIGNAL:
The “Time plot"-panel works in a similar manner as the “Spectral analysis"-
panel. Though, in the main GUI only the input signal is available to look at. To be
able to see the time plot of the output signal, the user has to use the magnifying
glass push button to open the “Time plot"-GUI. This GUI looks very similar to the
“Spectral analysis"-GUI, with possibilities to change the limits of both the x-axis
and the y-axis, though only information from the past 2 seconds is available.

FIG. 5.14 TIME PLOT AXES WITH CONTROLS.

44
CHAPTER-6
IMPLEMENTATION AND RESULTS

6.1 OVERVIEW:

The proposed methodology, cancel the noise from the single channel noisy
ECG signal without requiring operator interaction. The block diagram of the
proposed methodology is shown in Fig. 1. The proposed methodology consists of
four stages namely phase assignment, template extraction, optimized parameters
estimation and filtering frame-work. In the phase assignment stage, the phase of
each sample according to the R-peaks in the ECG signal is assigned

. The mean amplitude, standard deviation and mean phase of the ECG for
one cycle are calculated in the template extraction stage. In the optimized
parameters estimation stage, using differential evolution (DE) the phase, width and
amplitude of the ECG components of the noisy ECG signal are estimated. Finally,
the output of phase assignment stage, optimized parameter estimation using DE
and noisy ECG signal is applied to extended Kalman smoother framework for
extraction of the de-noised ECG in the filtering framework.

6.2 VARIOUS STAGES:

The detail description of each stage in the proposed methodology is given below.

• Phase assignment

• Template extraction

• Optimized parameters estimation

• Filtering Framework

45
6.2.1 STAGE 1: PHASE ASSIGNMENT

The phase is used as second observation in addition to the noisy ECG signal. The
phase can be used for the estimation of mean amplitude, standard deviation and
mean phase of the ECG. The mean amplitude and mean phase of the ECG will be
useful for estimation of the phase, width and amplitude of P, Q, R, S and T wave
by using the DE technique. These phase and width values of P, Q, R, S and T wave
and it’s corresponding amplitude related to the mean amplitude and the mean
phase of the ECG will be also useful for the state equation in the EKS. The
standard deviation of the noisy ECG will be also useful for the measurement
equation of the EKS. This phase information helps us to synchronize the EKS
without manual synchronization according to the noisy ECG signal.

The main aim of the first stage is to calculate additional observation phase
according to the detected R peak from the noisy ECG signal. Here Shannon energy
envelope with Hilbert transform technique (SEHT) has been used for the R peak
detection from the ECG signal. The SEHT method shows better accuracy of R
peak detection from the noisy ECG recordings with varying QRS complex like the
ECG recording with low amplitude, wide QRS complex, muscle artifact and noise.
This method does not require any amplitude threshold and prior knowledge of the
past detected R peak. The SEHT method shows better accuracy in the R peak
detection than other methods using MIT-BIH arrhythmia database.

The extended Kalman smoother (EKS) requires very precise locations of the R
peaks for accurate estimation. The phase corresponds to each sample of the noisy
ECG has been assigned by using the location of the detected R peaks in the noisy
ECG signal. The phase of the ECG is in the range -p to p. The phase assignment
process is a linear warping of phase from -p to p between two detected R peaks.

46
FIG. 6.1 BLOCK DIAGRAM FOR DE-NOISING OF ECG SIGNAL

The assignment of phase to each sample of the abdominal ECG and the
normalized noisy ECG signal is represented in FIG.6.2.

FIG. 6.2 PHASE ASSIGNMENT APPROACH OF NORMALIZED ECG OF


FIRST CHANNEL FROM 100 M MIT-BIH ARRHYTHMIA DATABASE

6.2.2 STAGE 2: TEMPLATE EXTRACTION

In this stage, the template of the ECG (mean amplitude, standard deviation and
mean phase of the ECG) is extracted. The state equation of the EKS uses the
synthetic dynamic model, for this dynamic model parameters (amplitude, width,
and phase of P, Q, R, S and T wave of the ECG), process noise covariance matrix
and measurement noise covariance matrices are required for the implementation of
the EKS. These dynamic model parameters and noise covariance matrices are

47
estimated from the standard deviation, mean amplitude and mean phase of the
noisy ECG. The mean phase of the ECG consists of fs (value of sampling
frequency) number of samples. The MIT-BIH arrhythmia database has been used
for evaluation of result, as the sampling frequency of this database is 360 HZ, so
the number of samples for the mean phase of the ECG is previous samples.

The mean amplitude of the ECG is calculated by using the mean phase, phase
assignment and the noisy ECG. The mean amplitude of the ECG signal consists of
fs number of samples. The first sample of the mean amplitude of the ECG is the
mean of the samples of the noisy ECG where phase of the noisy ECG is -p. The
value of the mean amplitude of the ECG of other samples except the first sample is
explained as follows.

Initially, estimate all the sample numbers from the phase assignment to the ECG,
where the assigned phase is more than the value of the mean phase of previous
sample and less than or equal to the value of the corresponding sample. The mean
amplitude value at the corresponding sample is the average value of the calculated
samples from the noisy ECG signal.

The standard deviation of the ECG is calculated similarly as mean of the ECG, but
in the standard deviation of the ECG, the standard deviation of the estimated
samples according to the phase and the mean phase is calculated in the place of
average. The mean and standard deviation of the noisy ECG signal is shown in
FIG.6. 3. The error bar in this figure rep-resents the standard deviation with respect
to the mean amplitude of ECG. The DE algorithm uses the mean amplitude of the
ECG signal for the objective function. The standard deviation of the ECG is used
for the creation of the process and noise covariance matrices.

48
6.2.3 STAGE 3: OPTIMIZED PARAMETERS ESTIMATION

The main aim of the application of DE (optimized parameters estimation


stage) is to minimize the objective function and find the optimize parameter (phase
value, amplitude value and width value of the noisy ECG components such as P,
Q, R, S and T wave), which will be useful for the state equation in the EKS. The
objective function of the DE calculates the mean square error with the help of the
mean ECG signal and the synthetic dynamic model

FIG. 6.3 MEAN AND STANDARD DEVIATION OF FIRST CHANNEL


FROM 100 M MIT-BIH ARRHYTHMIA DATABASE

6.2.3.1 BASIC ABOUT DE:

The differential evolution (DE) algorithm is a population-based search


technique. DE consists of four stages namely initialization, mutation, crossover
and selection. The main aim of the DE algorithm is to evolve a population of NP,
D dimensional parameter vectors (target vectors), which encodes the candidates
49
solutions, formally randomizing individuals within the search space between
minimum and maximum parameter bounds.

In the mutation stage, the mutation vector is produced with respect to each target
vector by using positive control parameter of scaling [scaling factor (F)]. In this
work DE/rand/1 is used as a basic mutation strategy for the creation of mutant
vector. In the crossover stage trail vector is generated using the target vector and
corresponding mutant vector with the help of user specified parameter [CR (within
the range [0,1])]. Here the binomial (uniform) crossover has been used.

In the selection stage, initially, some parameters which exceed upper and lower
bound of the perspective field are reinitialized within the perspective field range.
Finally comparing the target vector and corresponding trial vector the target vector
for next generation will be replaced by the minimum value between these two.

The above three steps (mutation, crossover, and selection) are repeated generation
after generation until some specific termination criteria are satisfied. Finally, an
optimum solution corresponds to the objective function in the search space is
achieved using DE.

6.2.4 STAGE 4: FILTERING FRAMEWORK

In this stage, the de-noised ECG from the noisy ECG signal has been estimated by
using the EKS technique. The reason behind the use of the EKS for the estimation
of the de-noised ECG is due to the nonlinear transformation of five Gaussian
functions (P, Q, R, S and T wave) of the ECG signal.

6.2.4.1 BASIC about EKS:

The Kalman filter (KF) used to estimate the hidden state using measured data and
appropriate dynamic model. The dynamic model is created with the help of system

50
dynamics. The Kalman filter assumes linear relationship between measured data
and system dynamics. However, the natures of most of the systems are nonlinear.
The extended Kalman filter (EKF) is used in nonlinear systems as it assumes the
nonlinear relationship between the measured data and the system dynamics. The
extended Kalman smoother (EKS) consists of two stages. The first stage is EKF
operation, the second stage is backward recursive smoothing algorithm. Here in the
EKS fixed interval smoothing stage has been used. The EKF consists of two
vectors, one is state vector Sk and another one is observation vector Yk at instant
k. EKF consists of state equation and measurement equation.

6.3 RESULTS AND DISCUSSION:

FIG 6.4 FIGURE INPUT SIGNAL

51
FIG 6.5 FIGURE PEAK DETECTION

FIG 6.6 FIGURE AMPLITUDE ESTIMATION

52
FIG 6.7 DE BASED PHASE ESTIMATION

FIG 6.8 FIGURE OF NOISE SEPARATION

53
CHAPTER-7

CONCLUSION AND FUTURE ENHANCEMENT

7.1 CONCLUSION:

In this project, DE technique is used with the synthetic dynamic model within an
EKS framework for de-noising the noisy ECG signal. The proposed method (EKS
+ DE) shows better SNR improvement as compared to the other existing
techniques like EKF, EKS, wavelet soft threshold technique, non-local mean
(NLM), adaptive filtering and conventional filtering at different SNR. The
proposed method (EKS + DE) also shows lesser mean square error (MSE) and
percentage of distortion (PRD) compared to the other mentioned existing
techniques at different SNR. According to the obtained results, as long as the R
peaks are correctly detected, the proposed method claims its better SNR
improvement. Here, the Shannon energy has been used with Hilbert transform
method for R peak detection.

7.2 FUTURE WORKS:

The methods to reduce the signal to noise ratio (SNR) can be improved and hence
the better fECG can be obtained. This leads to less distortion and an efficient R-
peak detection.

54
REFERENCES

1. Panigrahy D, Rakshit M, Sahu PK (2016) “ FPGA implementation of heart


rate monitoring system”. J Med Syst 40:1–12. doi:10. 1007/s10916-015-
0410-4
2. Matsuyama A, Jonkman M (2006) “The application of wavelet and feature
vectors to ECG signals”. Australas Phys Eng Sci Med 29:13–17
3. Lee S, Kim IY, Park YC (2007)” Approximated affine projectionalgorithm
for feedback cancellation in hearing aids”. ComputMethods Programs
Biomed 87:254–261. doi:10.1016/j.cmpb.2007.05.014
4. Joshi SL, Vatti RA, Tornekar RV (2013) “A survey on ECG signaldenoising
techniques”. In: 2013 Int Conf Commun Syst NetwTechnol, pp 60–64. doi:
10.1109/CSNT.2013.22
5. Chang KM (2010)”Ensemble empirical mode decomposition forhigh
frequency ECG noise reduction”. Biomed Tech 55:193–
201.doi:10.1515/BMT.2010.030
6. Lu G, Brittain J-S, Holland P et al (2009) “Removing ECG noisefrom
surface EMG signals using adaptive filtering”. Neurosci Lett462:14–19.
doi:10.1016/j.neulet.2009.06.063
7. Marque C, Bisch C, Dantas R et al (2005) “Adaptive filtering forECG
rejection from surface EMG recordings”. J ElectromyogrKinesiol 15:310–
315. doi:10.1016/j.jelekin.2004.10.001
8. Izzetoglu M, Devaraj A, Bunce S, Onaral B (2005) “Motionartifact
cancellation in NIR spectroscopy using Wiener filtering”.IEEE Trans
Biomed Eng 52:934–938. doi:10.1109/TBME.2005.845243

55

You might also like