ECG Final Group Project
ECG Final Group Project
Bachelor of Technology
In
By
Name Reference Number
P. SHIVANI 19017T1520
B. ABHISHEK 19017T1512
K. AAKASH 19017T1516
B. SUJAY 19017T1511
B. SHIRISHA 19017T1522
This is to certify that this thesis entitled “ ECG Signal Processing using Tunable Q Factor Wavelet
Engineering to the KAKATIYA UNIVERSITY is a record of work carried out during the
II
Declaration
I, the undersigned solemnly declare that the report of the project work entitled “ ECG SIGNAL
own work carried out at original during the course of my study under the supervision of my project
guide and is being submitted to the Department of Electronics & Communication Engineering,
University College Of Engineering, Kakatiya University, Kothagudem towards partial fulfilment for
P. SHIVANI
B. ABHISHEK
K. AAKASH
M. SUJAY
B. SHIRISHA
III
ACKNOWLEDGEMENT
We express our profound gratitude and deep regards to all the people who extended their support with
timely suggestions and indispensable help which made this project feasible.
We extend our sincere thanks to Sri. Dr.E.HARIKRISHNA, Principal for assisting and monitoring
as a project guide.
We take this opportunity to express our deep sense of gratitude and respect to our project coordinator
Sri. Dr.E.HARIKRISHNA without his constant encouragement it would not have been possible to
complete this work. We express our gratitude towards our project coordinator for his valuable guidance in
the completion of our project.
We extend our sincere thanks to Sri. Dr. K. BIKSHALU, Professor, Head of the Department of
Electronics and Communication Engineering, for extending whole hearted support and suggestions.
We are extremely grateful to Sri. Dr. K. PUNNAM CHANDAR, Principal, University college of
engineering, Bhadradri kothagudem, for providing the required facilities during project.
We would like to extend our sincere thanks to teaching staff members of the ECE Department Sri.
B. SRIKANTH, Sri. E. HARIKRISHNA & Mrs. B. ANASUYA, K. SWARNALATHA who have
contributed directly and/or indirectly to this major project in the form of encouragement and moral
support.
By
P. SHIVANI – (19017T1520)
B. ABHISHEK – (19017T1512)
K. AAKASH – (19017T1516)
M. SUJAY – (19017T1511)
B. SHIRISHA – (19017T1522)
IV
ABSTRACT
V
Table of Contents
Certificate
Declaration………………………………………………… III
Acknowledgement………………………………………… IV
Abstract…………………………………………………… V
Table of contents…………………………………………. VI
List of Figures…………………………………………… IX
CHAPTER 1
CHAPTER 2
CHAPTER 3
VI
3.2 Electrode contract Noise ........................................................................... 11
3.3 Motion Artifact Noise…………………………………….. …...... ... 11
3.4 Muscle Noise…………………………………………………. …… 12
3.5 Baseline drifts with Respiration……………………………………. 13
3.6 Instrumentation noise generated by electronic devices…………….. 13
3.7 Electro surgical Noise……………………………………………… 13
3.8 Electromyographic Noise………………………………………….. 14
CHAPTER 4
4.1 History………………………………………………………….. 15
4.2 Wavelet Families………………………………………………. 17
4.3 Continuous Wavelet Transforms ………………………………… 19
4.4 Discrete Wavelet Transforms…………………………………… 21
4.5 Applications of DWT…………………………………………… 23
4.6 Wavelet Denoising……………………………………………... 25
CHAPTER 5
5.1 Introduction………………………………………..…………… 27
5.2 Parameters………………………………………………………. 28
5.3 Functions……………………………………………………….. 30
CHAPTER 6
DENOISING…………………………………………………………………… 41-43
VII
6.1 Denoising Using TQWT………………………………………. 41
CHAPTER 7
VIII
LIST OF FIGURES
IX
CHAPTER 1
1. INTRODUCTION
The muscle mass of the atria is small compared to that of ventricles, so the electrical
change accompanying the contraction of atria is small. Contraction of the atria
associated with the ECG is called ‘P’. The ventricular mass is large, so there is a large
deflection of ECG when the ventricles are depolarized. This is called the QRS complex.
The ‘T’ wave of ECG is associated with the return of ventricular mass to its resting
repolarization state.
The basic shape of an ECG signal is shown in Fig. 1. The letters P, Q, R, S, and T are
chosen arbitrarily. The P,Q,R,S,T deflections are called the waves and Q,R,S waves
together make up a complex; and the interval between S and T waves is known as ST
segment.
R
6
Amplitude in volts
4
T
2
P
0
ST
Q segment
-2 S
0 0.5 1 1.5
Time in seconds
1
ECG is used to measure the electrical activity of the heart. Inside the heart there is a
specialized electrical conducting system that ensures the heart to expand and contract
this action is produced by sinoatrial node located below the right atrium in the heart.
SA node is called as pacemaker because it has the ability to initiate electrical pulses at
faster rate of 100 per minute.
An impulse sent from SA node starts the heart to beat, and then the electrical
current will flow down to the lower chambers of the heart or atria and produce the P;
electrical activity of the heart. Then the electrical current will flow down to the lower
chambers of the heart or ventricles producing the Q, R and S wave.
As stated earlier, ECG plays an important role in the diagnosis of heart diseases it is
vital for a physician to diagnose properly. For the proper diagnosis the ECG recorded
from the human body must be noise-free.
The morphology of ECG signal has been used for recognizing much variability's of
heart activity, so it is very important to get the parameters of ECG signal clear without
noise. This step gives a full picture and detailed information about the
electrophysiology of the heart diseases and the ischemic changes that may occur like
the myocardial infarction, conduction defects and arrhythmia. In order to support
clinical decision making, reasoning tool to the ECG signal must be clearly represented
and filtered, to remove out all noises and artifacts from the signal. ECG signal is one
of the bio signals that is considered as a non-stationary signal and needs a hard work
to de-noising.
2
1.3 Organization of thesis
The thesis is organized as follows. This chapter provides information regarding ECG
and its importance in diagnosis. Chapter 2 presents basic information regarding the
continuous, discrete wavelet transforms and its applications and denoising procedure.
Chapter 3 discusses the Principle Component Analysis (PCA) and its basic importance
in analysis of ECG signals Processing. Chapter 4 presents the method of combining of
Wavelet transform and PCA, leading to new mathematical formulation known as
Multi scale PCA (MSPCA).
Finally in Chapter 5 discusses the results and discussion to give the importance of
MSPCA in ECG Signal Processing. Conclusion is made in last section.
3
CHAPTER 2
2. ELECTROCARGIOGRAM(ECG)
4
2.2 How does an ECG machine detect the body’s electrical signals?
5
2.3 ECG Characteristics
-The ECG signal consists of low amplitude voltages in the presence of high amplitude
offsets and noise.
-The large offsets present in the system are due to halfcell potential developed at the
electrodes.
-Ag/AgCl (Silver- silverchloride) is the common electrode used in ECG systems and
has a maximum offset voltage of +/- 300 mV.
-The actual desired signal is +/- 0.5 mV superimposed on the electrode offset.
-In addition, the system also picks up the 50/60 Hz noise from the power lines which
forms the common mode signal.
- The amplitude of the power line noise may be very high. So, it has to be filtered.
6
2.4 ECG Acquisition
-Analog front-end processing forms an important part of the ECG system since it needs
to distinguish noise and the desired signal which is of small amplitude.
-The instrumentation amplifiers should have high input impedance since the skin
resistance could be very large.
-Operational amplifiers are needed for signal conditioning for the ECG device.
-The signal chain for the acquisition system consists of instrumentation amplifiers,
filters implemented through op-amps, and ACD s
7
2.5 ECG Filtering
-Signal processing is a huge challenge since the actual signal value will be 0.5 mV in
offset environment of 300 mV.
-Muscle noise (this noise is very difficult to remove as it is in the same region as the
actual signal. It is usually corrected in software).
8
2.6 Preprocessing ECG signals
Helps us remove contaminants from the ECG signals. ECG cantaminants can be
classified as-
-baseline wandering, The baseline wandering and other wideband noises are not easy
to be suppressed by hardware equipments. Instead the software scheme is more
powerful and feasible for offline ECG signal processing. You can use the following
methods to remove baseline wandering and other wideband noises. the most
significant and can strongly affect ECG signal analysis.
9
CHAPTER 3
ECG signals may be corrupted by various kinds of noises. Typical examples are:
10
Fig 3.1.1 Power-line interference noise Processing
11
3.3 Motion Artifacts
Motion artifacts are transient base line changes caused by changes in the electrode-
skin impedance with electrode motion. As this impedance changes, the ECG amplifier
sees different source impedance, which forms voltage divider with the amplifier input
impedance therefore the amplifier input voltage depends upon source impedance
,which changes as the electrode position changes. The usual cause for motion artifacts
will be assumed to be vibrations or moments of the subjects. The peak amplitude and
duration of the artifact are variable. This type of interference represents an abrupt shift
in baseline due to moment of the patient while the ECG is being recorded.
Muscle contractions cause heart factual mill volt level potentials to be generated. The
baseline electromyography is usually in the micro volt range and therefore is usually
insignificant. The maximum noise level is formed by adding random single precision
numbers of 50% of the ECG maximum amplitude to uncorrupted ECG.
12
Fig 3.4.1 Muscle Contraction Noise Processing
13
3.6 Noise Generated by the electronic devices
It completely destroys the ECG and can be represented by a large amplitude sinusoid
with frequencies approximately between 100 KHz to 1MHz.
Decompose the ECG signal using wavelet transform: The ECG signal is decomposed
into multiple frequency components at different scales using wavelet transform.
Identify the muscle noise frequency range: The frequency range of the muscle noise is
identified from the wavelet coefficients.
Reconstruct the ECG signal: The manipulated wavelet coefficients are used to
reconstruct the ECG signal, resulting in a signal with reduced muscle noise.
14
CHAPTER 4
4. WAVELET TRANSFORM
4.1 History
The transform of a signal is just another form of representing the signal. It does
not change the information content present in the signal. The Wavelet Transform
provides a time-frequency representation of the signal. It was developed to overcome
the short coming of the Short Time Fourier Transform (STFT), which can also be used
to analyze non-stationary signals. While STFT gives a constant resolution at all
frequencies, the Wavelet Transform uses multi-resolution technique by which
different frequencies are analyzed with different resolutions.
The wavelet analysis is done similar to the STFT analysis. The signal to be analyzed is
multiplied with a wavelet function just as it is multiplied with a window function in STFT, and
then the transform is computed for each segment generated. However, unlike STFT, in Wavelet
Transform, the width of the wavelet function changes with each spectral component. The
Wavelet Transform, at high frequencies, gives good time resolution and poor frequency
15
resolution, while at low frequencies; the Wavelet Transform gives good frequency resolution
and poor time resolution.
There are a large number of wavelet transforms each suitable for different applications.
• Continuous wavelet transform (CWT)
• Discrete wavelet transform (DWT)
• Fast wavelet transform (FWT)
• Lifting scheme & Generalized Lifting Scheme
• Wavelet packet decomposition (WPD)
• Stationary wavelet transform (SWT)
• Fractional wavelet transform
16
4.2 Wavelet Families
There are a number of basis functions that can be used as the mother wavelet
for Wavelet Transformation. Since the mother wavelet produces all wavelet functions
used in the transformation through translation and scaling, it determines the
characteristics of the resulting Wavelet Transform. Therefore, the details of the
particular application should be taken into account and the appropriate mother
wavelet should be chosen in order to use the Wavelet Transform effectively.
(g)
Fig 4.2.1 Wavelet families (a) Haar (b) Daubechies4 (c) Coiflet1 (d) Symlet2 (e) Meyer (f)
Morlet (g) Mexican Hat
17
Figure 9 illustrates some of the commonly used wavelet functions. Haar wavelet is one
of the oldest and simplest wavelet. Daubechies wavelets are the most popular
wavelets. They represent the foundations of wavelet signal processing and are used in
numerous applications. These are also called Max flat wavelets as their frequency
responses have maximum flatness at frequencies 0 and π. This is a very desirable
property in some applications. The Haar, Daubechies, Symlets and Coiflets are
compactly supported orthogonal wavelets. These wavelets along with Meyer wavelets
are capable of perfect reconstruction. The Meyer, Morlet and Mexican Hat wavelets
are symmetric in shape. The wavelets are chosen based on their shape and their ability
to analyze the signal in a particular application.
Wavelet transforms are classified into discrete wavelet transforms (DWTs) and
continuous wavelet transforms (CWTs). Note that both DWT and CWT are
continuous-time (analog) transforms. They can be used to represent continuous-time
(analog) signals. CWTs operate over every possible scale and translation whereas
DWTs use a specific subset of scale and translation values or representation grid.
Where x(t) is the signal to be analyzed. ψ(t) is the mother wavelet or the basis function.
All the wavelet functions used in the transformation are derived from the mother
wavelet through translation (shifting) and scaling (dilation or compression).
The mother wavelet used to generate all the basis functions is designed based
on some desired characteristics associated with that function. The translation
parameter τ relates to the location of the wavelet function as it is shifted through the
signal. Thus, it corresponds to the time information in the Wavelet Transform. The
scale parameter s is defined as |1/frequency| and corresponds to frequency
19
information. Scaling either dilates (expands) or compresses a signal. Large scales (low
frequencies) dilate the signal and provide detailed information hidden in the signal,
while small scales (high frequencies) compress the signal and provide global
information about the signal. Here the Wavelet Transform merely performs the
convolution operation of the signal and the basis function. The above analysis becomes
very useful as in most practical applications, high frequencies (low scales) do not last
for a long duration, but instead, appear as short bursts, while low frequencies (high
scales) usually last for entire duration of the signal.
with the (normalized) sinc function. The subspace of scale a or frequency band
is generated by the functions (sometimes called child wavelets)
(t) = 1 t − b , (3)
a,b a
a
20
Where a is positive and defines the scale and b is any real number and defines the shift.
The pair (a, b) defines a point in the right half plane R+ R .
The projection of a function x onto the subspace of scale a then has the form
The Wavelet Series is just a sampled version of CWT and its computation may
consume significant amount of time and resources, depending on the resolution
required. The Discrete Wavelet Transform (DWT), which is based on sub-band coding,
is found to yield a fast computation of Wavelet Transform. It is easy to implement and
reduces the computation time and resources required. The foundations of DWT go
back to 1976 when techniques to decompose discrete time signals were devised.
Similar work was done in speech signal coding which was named as sub-band coding.
In 1983, a technique similar to sub-band coding was developed which was named
pyramidal coding. Later many improvements were made to these coding schemes
which resulted in efficient multi-resolution analysis schemes.
In CWT, the signals are analyzed using a set of basis functions which relate to
each other by simple scaling and translation. In the case of DWT, a time-scale
representation of the digital signal is obtained using digital filtering techniques. The
signal to be analyzed is passed through filters with different cut-off frequencies at
different scales.
21
A sufficient condition for the reconstruction of any signal x of finite energy by the
formula
x(t) =
mZ nZ
x,m,n . m,n (t) (7)
is that the functions {m,n :m, nZ 2}form a tight frame of L2 (R).
For practical applications, and for efficiency reasons, one prefers continuously
differentiable functions with compact support as mother (prototype) wavelet
(functions). However, to satisfy analytical requirements (in the continuous WT) and in
general for theoretical reasons, one chooses the wavelet functions from a subspace of
the space L1 (R)L2 (R) This is the space of measurable functions that are absolutely and
square integrable:
and (8)
(t) dt
−
(t) 2 dt
−
Being in this space ensures that one can formulate the conditions of zero mean and
square norm one:
For ψ to be a wavelet for the continuous wavelet transforms the mother wavelet must
satisfy an admissibility criterion in order to get a stable invertible transform.
For the discrete wavelet transform, one needs at least the condition that the
wavelet series is a representation of the identity in the space L2 (R). Most constructions
of discrete WT make use of the multi resolution analysis, which defines the wavelet by
a scaling function. This scaling function itself is solution to a functional equation.
In most situations it is useful to restrict ψ to be a continuous function with a higher
number M of vanishing moments, i.e. for all integer m<M
(9)
t m (t)dt
−
=0
The mother wavelet is scaled (or dilated) by a factor of a, and translated (or shifted) by
a factor of b to give (under Morlet's original formulation):
22
(t) = 1 t − b (10)
a,b a
a
For the continuous WT, the pair (a,b) varies over the full half-plane R+ R ; for the
discrete WT this pair varies over a discrete subset of it, which is also called affine group.
These functions are often incorrectly referred to as the basis functions of the
(continuous) transform. In fact, as in the continuous Fourier transform, there is no basis
in the continuous wavelet transform. Time-frequency interpretation uses a subtly
different formulation (after Delprat).
Wavelets are defined by the wavelet function ψ(t) (i.e. the mother wavelet) and
scaling function φ(t) (also called father wavelet) in the time domain. The wavelet
function is in effect a band-pass filter and scaling it for each level halves its bandwidth.
This creates the problem that in order to cover the entire spectrum, an infinite number
of levels would be required. The scaling function filters the lowest level of the
transform and ensures the entire spectrum is covered. For a wavelet with compact
support, φ(t) can be considered finite in length and is equivalent to the scaling filter g.
Meyer wavelets can be defined by scaling functions
Wavelet transforms are now being adopted for a vast number of applications,
often replacing the conventional Fourier Transform. Many areas of physics have seen
this paradigm shift, including molecular dynamics, ab initio calculations, astrophysics,
density-matrix localization, seismic geophysics, optics, turbulence and quantum
mechanics. This change has also occurred in image processing, blood-pressure, heart-
rate and ECG analyses, DNA analysis, protein analysis, climatology, general signal
processing, speech recognition, computer graphics and multifractal analysis. In
23
computer vision and image processing, the notion of scale-space representation and
Gaussian derivative operators is regarded as a canonical multi-scale representation.
There is a wide range of applications for Wavelet Transforms. They are applied in
different fields ranging from signal processing to biometrics, and the list is still growing. One
of the prominent applications is in the FBI fingerprint compression standard. Wavelet
Transforms are used to compress the fingerprint pictures for storage in their data bank. The
previously chosen Discrete Cosine Transform (DCT) did not perform well at high compression
ratios. It produced severe blocking effects which made it impossible to follow the ridge lines in
the fingerprints after reconstruction. This did not happen with Wavelet Transform due to its
property of retaining the details present in the data.
24
is either stored or transmitted. For most compression applications, processing involves
quantization and entropy coding to yield a compressed image. During this process, all
the wavelet coefficients that are below a chosen threshold are discarded. These
discarded coefficients are replaced with zeros during reconstruction at the other end.
To reconstruct the signal, the entropy coding is decoded, then quantized and then
finally Inverse Wavelet Transformed.
During the last few years wavelet transform has proven to be a valuable tool in
applications areas for analysis of non stationary signals. Wavelet analysis is a tool for
analyzing localized variations of power with in a time series. By decomposing a time
series into time –frequency space, one is able to determine the both dominant-modes
of variability and how those modes vary in time and frequency. Wavelet analysis is a
promising method in signal analysis and because its capability of decomposing a
signal into elementary building blocks, excel in finding and identifying irregular
structures, so it is very useful in filtering tasks.
25
whose absolute values are lower than the threshold, and then shrinking the nonzero
coefficients towards 0.
cA1 cD1
cA2 cD2
cA3 cD3
26
CHAPTER 5
5.1 Introduction
27
5.2 Parameters
The main parameters for the TQWT are the Q-factor, the redundancy, and
the number of stages (or levels), as listed in Table I below
Table I. Parameter Description for TQWT
Parameter Description Note
Q-factor
Redundancy
W{4}
Stage 3
W{3}
Stage 2
x W{2}
Stage 1
W{1}
Fig 5.2.1 : Wavelet transform with three stages (J=3)
Therefore, the parameter r affects the redundancy of the TQWT but it is
not exactly equal to its redundancy.
The number of stages (or levels) of the wavelet transform is denoted by J.
The transform consists of a sequence of two-channel filter banks, with the low-
pass output of each filter bank being used as the input to the successive filter
bank. The parameter J denotes the number of filter banks. Each output signal
constitutes one subband of the wavelet transform. There will be J+1 subbands:
the high-pass filter output signal of each filter bank, and the low-pass filter
29
output signal of the final filter bank. For example, a 3-stage wavelet transform
is illustrated in Fig. 1.
5.3 Functions
The main functions for the TQWT are tqwt_radix2 and itqwt_radix2.
These functions compute the forward and inverse of the radix-2 version of the
TQWT. The radix-2 version of the transform uses FFTs which are powers of 2 in
length. The functions tqwt and itqwt also compute the forward and inverse
TQWT, but use FFTs of various lengths and are therefore less computationally
efficient. In practice, the radix-2 version of the TQWT should be used because
of its relative computationally efficiency. The reconstruction property of TQWT
can be easily verified by taking a simple example.
The function tqwt_radix2 returns a cell array w of wavelet coefficients.
The first subband (the high-frequency subband) is given by w{1}. For example,
eight stages of the TQWT are computed; there are a total of nine subbands. The
last subband, w{9}, being the low-pass subband. The higher redundancy is due
primarily to the use of the radix-2 version of the TQWT here.
Sub-bands: The all individual sub bands J1 through J2 can be displayed. The
parameter Fs refers to the sampling frequency of the signal. Below, sub bands 1
through 9 are displayed for a typical signal x. In the figure, the signal x is shown
at the top.
30
SUBBANDS OF SIGNAL
3
SUBBAND
9
0 50 100 150 200 250
Q = 1.00, r = 3.00, Levels = 8 TIME (SAMPLES)
The function has an option, 'E', that displays the energy in each subband
as a percentage of the total energy. In addition, the subbands can be displayed
with a `stem'-style with the option 'stem'.
SUBBANDS OF SIGNAL
1 2.61%
2 6.26%
3 10.66%
SUBBAND
4 16.55%
5 20.79%
6 23.61%
7 13.41%
8 4.59%
9 1.53%
0 50 100 150 200 250
Q = 1.00, r = 3.00, Levels = 8 TIME (SAMPLES)
Energy: The TQWT satisfies Parseval's theorem, meaning that the total energy
of the wavelet coefficients equals the energy of the signal. It can also be useful
to know how the energy of a signal is distributed across the subbands.
31
DISTRIBUTION OF SIGNAL ENERGY
20
15
10
0
1 2 3 4 5 6 7 8 9
SUBBAND
Wavelets: The wavelets may be displayed for a specified set of subbands using
the function PlotWavelets. The syntax is PlotWavelets(N,Q,r,J1,J2) where N is
the length of the wavelets (in samples), Q and r are the Q-factor and redundancy
parameters, and J1 and J2 are the first and last subbands for which the wavelet
is to be computed. The syntax PlotWavelets(...,'radix2') specifies that the
wavelets should be computed using the radix-2 version of the TQWT.
4
SUBBAND
32
Frequency Responses: The frequency decomposition performed by the TQWT
can be displayed using the function PlotFreqResps.
0.5
0
0 0.1 0.2 0.3 0.4 0.5
NORMALIZED FREQUENCY (HERZ)
The low Q-factor (Q = 1:0) can be recognized in both the shape of the
wavelets and in the plot of the frequency responses: The wavelets have a low-
oscillation behavior and the frequency responses are wide relative to their
center frequencies.
Due to the constant-Q property, the frequency responses have equal
width on a log frequency axis.
0.8
0.6
0.4
0.2
0
0.0156 0.0313 0.0625 0.125 0.25 0.5
NORMALIZED FREQUENCY (HERZ)
33
Effect of parameter r: Increasing r, while keeping Q unchanged, has the effect
of increasing the overlap between adjacent frequency responses. The parameter
r does not affect the general shape of the wavelet of frequency response (they
are controlled by Q). With a larger r, the number of levels J should be increased
in order to cover the same frequency range, because of the increased overlap.
The following figure shows
the frequency responses (on log frequency scale) with an r of 6. This is twice the
r used above, so twice the number of frequency bands are needed to cover the
same frequency range. Comparing the two figures, it can be seen that adjacent
bands overlap more when r is larger.
0.8
0.6
0.4
0.2
0
0.0156 0.0313 0.0625 0.125 0.25 0.5
NORMALIZED FREQUENCY (HERZ)
34
5.4 Sparse signal representation
For the radix-2 TQWT, the synthesis functions (wavelets) do not all have
the same energy (l2-norm squared). Specifically, the energy is different in
different subbands. Therefore, a suitable modification of the above problem is:
j+1
The vector = ( 1 . . . j +1 ) can be used to take into account the fact that the l2 -
35
SPARSE SUBBANDS (BASIS PURSUIT)
1 0.00%
2 7.22%
3 4.14%
SUBBAND
4 21.11%
5 3.99%
6 57.63%
7 3.29%
8 2.47%
9 0.15%
0 50 100 150 200 250
Q = 1.00, r = 3.00, Levels = 8 TIME (SAMPLES)
60
50
40
30
20
10
0
1 2 3 4 5 6 7 8 9
SUBBAND
36
5.5 Higher Q-factor
The TQWT allows the user to specify the Q-factor. By increasing Q, the
wavelets become more oscillatory (due to the higher Q-factor). Note that the
frequency responses are narrower now, compared to above where Q was set to
1.0. With Q increased from 1.0 to 4.0, more stages are needed in order to span
the same frequency range because each frequency response is narrower. Here
we have used 17 stages instead of 8 above.
5
6
7
8
9
SUBBAND
10
11
12
13
14
15
16
17
0.5
0
0 0.1 0.2 0.3 0.4 0.5
NORMALIZED FREQUENCY (HERZ)
37
5.6 Sparse signal approximation
y = x + n.
The problem is to estimate x from the observed signal y. If it is known
that x has a sparse representation with respect to a wavelet transform (or other
transform), then it can be estimated via sparsity-based methods.
One approach is basis pursuit denoising (BPD) [3] which minimizes the sum of
the l1 -norm of the transform coefficients and the energy of the residual:
J +1
arg min y −TQWT −1 ( w) + j wj
2
2 1
w j=1
38
5.7 Dual Q-factor signal decomposition
high Q-factor and low Q-factor wavelet transforms respectively [4]. In this case,
a sparse representation of the signal x using both high Q-factor and low Q-factor
TQWT jointly makes the identification of X1 and X 2 feasible. This approach is
X 1 = TQWT 1−1 ( w1 ) , 2 ( w 2) .
X 2 = TQWT −1
39
As above, we set the subband-dependent regularization parameters
proportional to the l2 -norms of the wavelets.
If the signal under analysis is noisy, then we should not ask for exact
equality as in (4). Just as the basis pursuit denoising (BPD) problem adapts the
basis pursuit (BP) problem to the noisy signal case, we can also apply resonance
decomposition to noisy signals. Suppose y represents the noisy signal, then the
problem can be formulated as the minimization of the following cost function:
J1 +1 J2 +1
argmin y −1w1 −2w2 w1, j 1 + 2, j w2, j
2 1, j
2
1
w1 ,w2 j=1 j=1
where 1 and 2 represent the inverse TQWT having high and low Q-factors
we set
X 1 = TQWT1−1 ( w1 ) , 2 ( w 2)
X 2 = TQWT −1
Note that the residual ( y − X1 − X 2 ) appears noise-like. For the problem
formulated in (6), the residual is the signal component that is sparsely
represented in neither the high Q-factor wavelet transform nor the low Q-factor
wavelet transform. For this reason, this formulation (6) accounts for the
presence of noise in the signal of interest.
5 Some formulas
fc ( j ) 0.25 j−1 (2 − ) fs
for j > 1, where fs is the sampling frequency of the input signal, and
40
CHAPTER 6
6. DENOISING
The following are the general steps involved in using tunable Q factor wavelet transform for
denoising ECG signals:
Decompose the ECG signal using wavelet transform: The ECG signal is decomposed into
multiple frequency components at different scales using wavelet transform.
Identify the noise frequency range: The frequency range of the noise is identified from the
wavelet coefficients.
Manipulate the wavelet coefficients: The wavelet coefficients corresponding to the noise
frequency range are manipulated to adjust the damping factor and, thus, remove the noise
from the ECG signal.
Reconstruct the ECG signal: The manipulated wavelet coefficients are used to reconstruct the
ECG signal, resulting in a signal with reduced noise.
Analyze the ECG signal: The reconstructed ECG signal is analyzed to extract useful
information, such as heart rate, arrhythmia, and ischemia.
By reducing noise in the ECG signal, it is possible to improve the accuracy of ECG analysis
and reduce the risk of misdiagnosis. The tunable Q factor wavelet transform is a powerful
technique for denoising ECG signals, and it has potential applications in diagnosing heart
diseases, monitoring heart conditions, and assessing the effectiveness of treatments.
It is important to note that the use of tunable Q factor wavelet transform for ECG signal
processing is still an active area of research, and further studies are needed to evaluate its
effectiveness and potential clinical applications. Additionally, other signal processing
41
techniques such as adaptive filtering and independent component analysis (ICA) can also be
used to denoise ECG signals.
42
6.2 Importance of ECG Signal Processing
ECG signal processing is an important field in medical signal processing that deals
with the analysis and interpretation of electrocardiogram (ECG) signals, which are
recordings of the electrical activity of the heart. ECG signals are often corrupted by
various types of noise, such as baseline wander, power line interference, and muscle
artifact. One common type of noise that can affect ECG signals is channel noise.
Channel noise is the noise that arises from the signal acquisition process, such as the
electronic components of the recording device and the electrode-skin interface. This
type of noise can be modeled as an additive white Gaussian noise (AWGN) with a
certain power spectral density (PSD).
Tunable Q-factor wavelet transform is a type of wavelet transform that allows the
adjustment of the wavelet's Q-factor, which controls the bandwidth of the wavelet
function. This can be useful in ECG signal processing because different Q-factors can
be chosen to selectively filter out different types of noise.
To apply tunable Q-factor wavelet transform to ECG signal processing, the first step is
to decompose the ECG signal into its wavelet coefficients using a wavelet transform.
Then, the wavelet coefficients are filtered using a tunable Q-factor wavelet filter bank.
The Q-factor can be adjusted for each filter in the bank to selectively filter out channel
noise at different frequencies. After filtering, the signal can be reconstructed using an
inverse wavelet transform.
In summary, channel noise is a type of noise that can affect ECG signals, and tunable Q-
factor wavelet transform can be used to selectively filter out this type of noise. This
technique involves decomposing the ECG signal into its wavelet coefficients, filtering
the coefficients using a tunable Q-factor wavelet filter bank, and then reconstructing
the signal using an inverse wavelet transform.
43
CHAPTER 7
-10
0 100 200 300 400 500 600 700 800 900 1000
-10
0 100 200 300 400 500 600 700 800 900 1000
-2
0 100 200 300 400 500 600 700 800 900 1000
Time (S)
-5
-10
0 100 200 300 400 500 600 700 800 900 1000
-5
-10
0 100 200 300 400 500 600 700 800 900 1000
-5
-10
0 100 200 300 400 500 600 700 800 900 1000
Time (S)
5 4
0 2
-5 0
Amplitude (V)
-10 -2
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000
0
0
-2
-2
-4
-4
-6
-8 -6
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000
Time (S)
45
7.1.2 PLI NOISE PROCESSING
-5
0 100
10
Amplitude (V)
-5
0 100 200 300 400 500
-5
0 100 200 300 400 500 600 700 800
Time (S)
-2
0 100 200 300 400 500 600 700 800 900 1000
-2
0 100 200 300 400 500 600 700 800 900 1000
-1
0 100 200 300 400 500 600 700 800 900 1000
Time (S)
46
Original signal 1 Simplified signal 1
10 10
5 5
0 0
Amplitude (V)
-5 -5
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000
2 2
1 1
0 0
-1 -1
-2 -2
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000
Time (S)
47
7.1.3 RESPIRATION NOISE PROCESSING
-5
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-5
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-5
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Time (S)
-2
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-2
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Recovered ECG signal Lead2
4
-2
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Time (S)
48
Original signal 1 Simplified signal 1
10 10
5 5
0 0
Amplitude (V)
-5 -5
0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 200 400 600 800 1000 1200 1400 1600 1800 2000
2
2
1
0
0
-1
-2 -2
0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 200 400 600 800 1000 1200 1400 1600 1800 2000
Time (S)
49
7.2 Conclusion & Future scope
ECG is a non-stationary biomedical signal that is invariably corrupted with different artifacts
during its recoding. Wavelet transform is a standard mathematical tool to analyze non-
stationary signals. This paper presents an approach for ECG enhancement by combining the
attractive properties of principal component analysis and wavelet analysis called multiscale
PCA. The resulting multi-scale PCA extracts relationships between the variables by PCA, and
between the measurements by wavelet analysis. In this application for ECG enhancement, the
multi-scale PCA served as a powerful tool when addressing problems related to noise reduction.
MSPCA eliminated the different types of noises present in the ECG signal. Results revealed
that Daubechies based MSPCA resulted in improved restoration of ECG morphology compared
to only wavelets. enhancement.
Development of more advanced and efficient algorithms for ECG signal processing using
tunable Q-factor wavelet transform, such as denoising, feature extraction, and classification.
Integration of tunable Q-factor wavelet transform with other signal processing techniques, such
as machine learning and deep learning, to improve the accuracy and robustness of ECG analysis.
Overall, the use of tunable Q-factor wavelet transform in ECG signal processing has a
promising future and has the potential to significantly improve the accuracy and efficiency of
ECG analysis.
50
7.3 REFERENCES
[1]. B. Bakshi,” Muliscale PCA with application to MSPC monitoring”, AlchE J, vol.
44 pp 1596-1610, 1998.
[3]. V.Almenar, A.Albiol, 1999. A new adaptive scheme for ECG enhancement,
Signal processing 75, pp:253-265.
[4]. Jaun Pablo Martinez, Rute Almeida, Salvador Olmos, Ana Rocha and Pablo
laguna , A wavelet-based ECG delineator. Evaluation on standard database ,
IEEE trans. Biomed. Eng.,vol.51,no.4,2004.
[5]. Thakor V.N., G. Xin-rong, S. Yi-chun and D.F.Hanley, 1993. Multi resolution
wavelet analysis of evoked potentials, IEEE Transactions on Bio Medical
Engineering, vol.40, no.11.
[6]. P.M.G. Agante da Silva and J.P. Marques de sa, “ ECG noise filtering using
wavelets with soft-thresholding methods” in proceedings of computers in
cardiology, pp. 535-538, Hanover, Germany, September 1999.
[7]. B. Mozaffary and M.A Tinati , “ ECG baseline wander elimination using wavelet
packets”, Transactions on engineering , computing and technology,vol.3,pp. 22-
24, 2004.
51