HAR Merged

You might also like

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

A TECHNICAL SEMINAR REPORT

ON
“ECG SIGNAL PROCESSING USING TUNABLE Q FACTOR
WAVELET TRANSFORM”
Submitted to
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
In partial fulfillment of the requirement
For the award of the degree of

BACHELOR OF TECHNOLOGY
in

ELECTRICAL AND ELECTRONICS ENGINEERING


by

BOLLABOINA HARSHAVARDHAN 19641A0227


Under the esteemed guidance of

Mrs.P.THANUJA
Associate Professor

Department of Electrical and Electronics Engineering

VAAGDEVI COLLEGE OF ENGINEERING


UGC Autonomous
(Approved by AICTE New Delhi and permanently Affiliated to JNTU Hyderabad)
BOLLIKUNTA, WARANGAL-506005
2022-2023

1
Department of Electrical and Electronics Engineering

VAAGDEVI COLLEGE OF ENGINEERING


UGC Autonomous
(Approved by AICTE New Delhi and permanently Affiliated to JNTU Hyderabad)

BOLLIKUNTA, WARANGAL-506005
2022-2023

CERTIFICATE

This is to certify that the technical seminar entitled “ECG SIGNAL PROCESSING USING
TUNABLE Q FACTOR WAVELET TRANSFORM” that is being submitted by BOLLABOINA
HARSHAVARDHAN(19641A0227) in partial fulfillment for the award of Bachelor of Technology in
ELECTRICAL AND ELECTRONICS ENGINEERING during the academic year 2022-2023, is a
record of bonafide work carried out by them under our guidance and supervision.

The results embodied in this report have not been submitted to any other University or
Institute for the award of any degree or diploma.

GUIDE COORDINATOR HEAD OF THE DEPARTMENT

EXTERNAL EXAMINER

1
CANDIDATE DECLARATION
I hereby declare that the work presented in the technical seminar titled “ECG SIGNAL
PROCESSING USING TUNABLE Q FACTOR WAVELET TRANSFORM” submitted
towards completion of major project in IV-II semester of B. Tech (EEE) at the VAAGDEVI
COLLEGE OF ENGINEERING, Bollikunta, Warangal. It is an authentic record of any original
work pursued under the guidance of Mrs.P.THANUJA, Associate Professor, EEE Department.

Place: Warangal

Date:20/06/2023

BOLLABOINA HARSHAVARDHAN 19641A0227

3
ACKNOWLEDGEMENT

With great pleasure, I want to take this opportunity to express our heartfelt gratitude to
all the people who helped throughout the duration of this technical seminar.

I am grateful to the guide Mrs.P.THANUJA, Associate Professor, Department of EEE for


his support during the period of this technical seminar.

I am grateful to the co-ordinators Mr.T. Rajesh, Assistant professor & Mr.B.Nagaraju,


Associate professor, Department of EEE for their support during the period of this technical
seminar.

I am highly obligated to Mr. P.Purnachander Rao, Head of the Department, EEE


for his valuable suggestions, constant support and guidance and for his motivation and
encouragement.

I am highly indebted to Principal Dr. K. Prakash for his support during the period of
this technical seminar.

I would like to thank parents, teaching and non – teaching staff of Department of EEE
for sharing their knowledge.

Submitted by

BOLLABOINA HARSHAVARDHAN 19641A0227

4
ABSTRACT

Cardiac signal processing is usually a computationally demanding task as signals are


heavily contaminated by noise and other artifacts. In this paper, an effective approach for
peak point detection and localization in noisy electrocardiogram (ECG) signals is
presented. Six stages characterize the implemented method, which adopts the Hilbert
transform and a thresholding technique for the detection of zones inside the ECG signal
which could contain a peak. Subsequently, the identified zones are analyzed using the
wavelet transform for R point detection and localization. The conceived signal processing
technique has been evaluated, adopting ECG signals belonging to MIT-BIH Noise Stress
Test Database, which includes specially selected Holter recordings characterized by
baseline wander, muscle artifacts and electrode motion artifacts as noise sources. The
experimental results show that the proposed method reaches most satisfactory performance,
even when challenging ECG signals are adopted. The results obtained are presented,
discussed and compared with some other R wave detection algorithms indicated in
literature, which adopt the same database as a test bench. In particular, for a signal to noise
ratio (SNR) equal to 6 dB, results with minimal interference from noise and artifacts have
been obtained, since Se e +P achieve values of 98.13% and 96.91, respectively.

V
Table of Contents

Certificate
Declaration………………………………………………… III
Acknowledgement………………………………………… IV
Abstract…………………………………………………… V
Table of contents…………………………………………. VI
List of Figures…………………………………………… IX

CHAPTER 1

INTRODUCTION …………………………………………………………………. 1-3

1.1 The ECG signal and its interpretation …………………………. 1

1.2 Need of de-noising an ECG signal……………………………... 2

1.3 Organization of thesis…………………………………………... 3

CHAPTER 2

ELECTROCARDIOGRAM(ECG) .................................................................................. 4-9

2.1 Why is ECG used? What is ECG?..................................................... 4


2.2 How does an ECG machine detect the body’s electrical signals?... 5
2.3 ECG characteristics .................................................................................. 6
2.4 ECG acquisition ....................................................................................... 7
2.5 ECG filtering……………………………………………………….. 8
2.6 Preprocessing ECG signals………………………………………… 9

CHAPTER 3

SOURCES OF NOISE .......................................................................................................10-14

3.1 Power-line Interference Noise .................................................................. 10

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

WAVELET TRANSFORM………………………………………………………. 15-25

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

TUNABLE Q WAVELET TRANSFORM…………………………………….. 27-39

5.1 Introduction………………………………………..…………… 27
5.2 Parameters………………………………………………………. 28
5.3 Functions……………………………………………………….. 30

5.4 Spare Signal Representation…………………………………….. 35

5.5 Higher Q factor…………………………………………………. 37

5.6 Spare Signal Approximation………………………………….. 38

5.7 Dual Q Factor Signal decomposition………………………….. 39

CHAPTER 6

DENOISING…………………………………………………………………… 41-43

VII
6.1 Denoising Using TQWT………………………………………. 41

6.2 Importance of ECG Signal Processing………………………… 43

CHAPTER 7

7.1 RESULTS AND DISCUSSIONS…………………………………………….. 44-51

7.1.1 EMG Noise Signal Processing ………………………………… 44


7.1.2 PLI Noise Signal Processing…………………………………… 46
7.1.3 Respiration Noise Signal Processing………………………….. 48
7.2 Conclusion & Future Scope …………….……………………… 50
7.3 REFERENCES…………………………………………………… 51

VIII
LIST OF FIGURES

Fig 1.1.1 The Basic shape of an ECG Signal…………….. ……. 1


Fig 2.1.1 ECG Signal…………………………………………... 4
Fig 2.2.1 ECG Machine detect the body’s
Electrical signals ………………………… …………… 5
Fig 2.3.1 ECG Characteristics……………………… …. …….. 6
Fig 2.5.1 ECG Filtering……………………………. …………. 8
Fig 3.1.1 Power-line Interference Noise Processing……… … 11
Fig 3.2.1 Electrode Contract Noise Processing.........………… 11
Fig 3.3.1 Motion Artifact Noise Processing…….…………… 12
Fig 3.4.1 Muscle Noise Processing……………………… …. 13
Fig 3.5.1Baseline drift with respiration Noise Processing…… 13
Fig 3.8.1Electromyographic Noise Processing…………… …. 14
Fig 4.1.1 Demonstration of a)Wave b)A wavelet…………….. 16
Fig 4.2.1 Wavelet families……………………………………. 17
Fig 4.5.1 Signal processing application using WT……………. 24
Fig 4.6.1 Wavelet decompositon.……………………................ 26
Fig 4.6.2 Decomposition tree for three wavelet…………………. 26
Fig 5.2.1 WT with three stages(J=3)……………………………. 29
Fig 6.1.1 Denoising using T Q Factor WT……………………… 42
Fig 7.1.1(a) EMG Noise Removing Processing Lead 1………... 44
Fig 7.1.1(b) EMG Noise Removing Processing Lead 2……….. 45
Fig 7.1.1(c) EMG Original and Simplified Signal…………….. 45
Fig 7.1.2(a) PLI Noise Removing Processing Lead 1………… 46
Fig 7.1.2(b) PLI Noise Removing Processing Lead 2……….. 46
Fig 7.1.2(c) PLI Original and Simplified Signal……………. 47
Fig 7.1.3(a) Respiration Noise Removing Processing Lead 1 48
Fig 7.1.3(b) Respiration Noise Removing Processing Lead 2 48
Fig 7.1.3(c) Respiration Original and Simplified signal……. 49

IX
CHAPTER 1

1. INTRODUCTION

1.1 The ECG signal and its interpretation

Clinical diagnosis depends mainly on patient’s history and to a lesser extent by


physical examination. The ECG can provide an evidence to support a diagnosis, and
in some cases it is crucial for patient management. The ECG is essential for the
diagnosis, and therefore the management, of abnormal cardiac rhythms. It helps with
the diagnosis of cause of chest pain, and the proper use of thrombolysis in treating
myocardial infarction depends upon it.

1.1.1 Shape of an ECG

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

Fig 1.1.1 The basic shape of an ECG signal

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.

1.2 Need of de-noising an ECG signal

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 development of the electrocardiograph was the culmination of a scientific effort


aimed at perfecting a device conceived for the elucidation of a physiological
phenomenon. The development of the digital computer was the culmination of
scientific effort aimed at improving man’s welfare. Both of these fairly recent
innovations of modern technology have been moderately successful in their main
initial objectives. During the last five decades the analysis of the ECG signal evolved
from the simple visual inspection to completely automated diagnosis systems.

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)

2.1 Why is ECG used? What is ECG?


A technique of recording bioelectric currents generated by the heart. It records any
problems with the heart’s rhythm, and the conduction of the heart beat through the
heart which may be affected by underlying heart disease. Why is ECG used?-to check
how well medicines are working and whether they are causing side effects that affect
the heart.-to check the health of the heart when other diseases or conditions are present
such as high B.P., high cholesterol ,diabetes, etc..-to assess if the patient has had a heart
attack or evidence of a previous heart attack.-to observe the effects of medicines used
for coronary heart disease.-to see if there are too few minerals in the blood.-to diagnose
poor blood flow to the heart, heart attack and abnormalities of the heart.

Fig 2.1.1 ECG Signal

4
2.2 How does an ECG machine detect the body’s electrical signals?

Up to 12 self-adhesive electrodes will be attached to the selected locations on the skin


(limbs and chest). At rest, across the cell membrane, each heart muscle has a negative
charge, called the membrane potential. Decreasing this negative charge towards zero,
via influx of the +ve cations, Na+ and Ca++, is called depolarization, which activates
the mechanisms in the cell that cause it to contract. A healthy heart will have an orderly
progression of a wave of depolarization, during each heartbeat. This is detected as tiny
rises and falls in the voltage between two electrodes placed on either side of the heart
which is displayed as a wavy line either on a screen or on paper. This display indicates
the overall rhythm of the heart and weaknesses in different parts of the heart muscle.

Fig 2.2.1 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.

Fig 2.3.1 ECG Characteristics

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 frontend processing circuitry consists of an instrumentation amplifier which


reduces the common mode signal.

-Instrumentation amplifiers that operate on +/- 5V are commonly used to take


advantage of the large input voltage range.

-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.

-Other factors like AC power supply interference, RF interference from surgery


equipment, and implanted devices like pace makers and physiological monitoring
systems can also impact accuracy.

The main sources of noise in ECG are-

-Baseline wander (low frequency noise)

-Power line interference (50Hz or 60 Hz noise from powerlines).

-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).

-Other interference (i.e. radio frequency noise from other equipment).

Fig 2.5.1 ECG Filtering

8
2.6 Preprocessing ECG signals
Helps us remove contaminants from the ECG signals. ECG cantaminants can be
classified as-

-power line interference

-electrode pop or contact noise

-patient electrode motion artifacts

-electromyographic (EMG) noise

-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

3. SOURCES OF NOISE IN ECG SIGNAL

ECG signals may be corrupted by various kinds of noises. Typical examples are:

1. Power line interference.


2. Electrode contact noise.
3. Motion artifacts.
4. Muscle contraction.
5. Base line drifts with respiration.
6. Instrumentation noise generated by electronic devices.
7. Electro surgical noise
8. Electromyographic noise

3.1 Power line interference

It consist of 50/60Hz pickup and harmonics, which can be modeled as


sinusoids. Characteristics, which might need to be varied in a model of power line
noise, of 50/60Hz component include the amplitude and frequency content of the
signal. The amplitude varies up to 50 percent of peak-to-peak ECG amplitude, which
is approximately equivalent to 25mv.

10
Fig 3.1.1 Power-line interference noise Processing

3.2 Electrode contact noise


It is a transient interference caused by loss of contact between the electrode
and skin that effectively disconnects the measurement system from the subject. The
loss of contact can be permanent, or can be intermittent as would be the case when a
loose electrode is brought in and out of contact with the skin as a result of movements
and vibration. This switching action at the measurement system input can result in
large artifacts since the ECG signal is usually capacitive couple to the system. It can be
modeled as randomly occurring rapid base line transition, which decays exponentially
to the base line value and has a superimposed 50/60Hz component. Typically the
values of amplitude may vary to the maximum recorder output.

Fig 3.2.1 Electrode contact 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.

Fig 3.3.1 Motion Artifact noise Processing

3.4 Muscle Contraction

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

3.5 Base Line Drift with Respiration


The drift of the base line with respiration can be represented by a sinusoidal
component at the frequency of respiration added to the ECG signal. The amplitude
and frequency of the sinusoidal component should be variable. The variations could
be reproduced by amplitude modulation of the ECG by the sinusoidal component
added to baseline.

Fig 3.5.1 Base line Drift with Respiration Processing

13
3.6 Noise Generated by the electronic devices

The parameter detection algorithms cannot correct artifacts generated by electronic


devices. The input amplifier saturates and no information about the ECG reaches the
detector. In this case manual preventive and corrective action needs to be undertaken.

3.7 Electro surgical noise

It completely destroys the ECG and can be represented by a large amplitude sinusoid
with frequencies approximately between 100 KHz to 1MHz.

3.8 Electromyographic noise

Certainly! Electromyographic (EMG) noise is a type of interference in ECG signal


processing that is caused by electrical activity in the muscles near the electrodes used
to record the ECG signal. This can lead to interference in the ECG signal, making it
difficult to extract meaningful information. However, the tunable Q factor wavelet
transform can be used to effectively reduce EMG noise in 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 muscle noise frequency range: The frequency range of the muscle noise is
identified from the wavelet coefficients.

Manipulate the wavelet coefficients: The wavelet coefficients corresponding to the


muscle noise frequency range are manipulated to adjust the damping factor and, thus,
reduce the muscle noise in the ECG signal.

Reconstruct the ECG signal: The manipulated wavelet coefficients are used to
reconstruct the ECG signal, resulting in a signal with reduced muscle noise.

Fig 3.8.1 Electromyographic noise Processing

14
CHAPTER 4

4. WAVELET TRANSFORM
4.1 History

The development of wavelets can be linked to several separate trains of thought,


starting with Haar's work in the early 20th century. Notable contributions to wavelet
theory can be attributed to Zweig’s discovery of the continuous wavelet transform in
1975 (originally called the cochlear transform and discovered while studying the
reaction of the ear to sound), Pierre Goupillaud, Grossmann and Morlet's formulation
of what is now known as the CWT (1982), Jan-Olov Strömberg's early work on discrete
wavelets (1983), Daubechies' orthogonal wavelets with compact support (1988),
Mallat's multiresolution framework (1989), Nathalie Delprat's time-frequency
interpretation of the CWT (1991), Newland's Harmonic wavelet transform (1993) and
many others since.

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.

A wave is an oscillating function of time or space and is periodic. In contrast,


wavelets are localized waves. They have their energy concentrated in time or space
and are suited to analysis of transient signals. While Fourier Transform and STFT use
waves to analyze signals, the Wavelet Transform uses wavelets of finite energy.

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.

Fig 4.1.1 Demonstrations of (a) a Wave and (b) a Wavelet

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.

(a) (b) (c)

(d) (e) (f)

(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.

A wavelet is a wave-like oscillation with amplitude that starts out at zero,


increases, and then decreases back to zero. It can typically be visualized as a "brief
oscillation" like one might see recorded by a seismograph or heart monitor. Generally,
wavelets are purposefully crafted to have specific properties that make them useful for
signal processing. Wavelets can be combined, using a "shift, multiply and sum"
technique called convolution, with portions of an unknown signal to extract
information from the unknown signal.

More technically, a wavelet is a mathematical function used to divide a


given function or continuous-time signal into different scale components.
Usually one can assign a frequency range to each scale component. Each scale
component can then be studied with a resolution that matches its scale

Wavelet theory is applicable to several subjects. All wavelet transforms may be


considered forms of time-frequency representation for continuous-time (analog)
signals and so are related to harmonic analysis. Almost all practically useful discrete
wavelet transforms use discrete-time filter banks. These filter banks are called the
wavelet and scaling coefficients in wavelets nomenclature. These filter banks may
contain either finite impulse response (FIR) or infinite impulse response (IIR) filters.
The wavelets forming a continuous wavelet transform (CWT) are subject to the
uncertainty principle of Fourier analysis respective sampling theory: Given a signal
with some event in it, one cannot assign simultaneously an exact time and frequency
response scale to that event. The product of the uncertainties of time and frequency
response scale has a lower bound. Thus, in the scalogram of a continuous wavelet
18
transform of this signal, such an event marks an entire region in the time-scale plane,
instead of just one point. Also, discrete wavelet bases may be considered in the context
of other forms of the uncertainty principle.

A wavelet transform is the representation of a function by wavelets. The


wavelets are scaled and translated copies (known as "daughter wavelets") of a finite-
length or fast-decaying oscillating waveform (known as the "mother wavelet").
Wavelet transforms have advantages over traditional Fourier transforms for
representing functions that have discontinuities and sharp peaks, and for accurately
deconstructing and reconstructing finite, non-periodic and/or non-stationary signals.

In formal terms, this representation is a wavelet series representation of a


square-integrable function with respect to either a complete, orthonormal set of basis
functions, or an over complete set or Frame of a vector space, for the Hilbert space of
square integrable functions.

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.

4.3 Continuous wavelet transforms

The Continuous Wavelet Transform (CWT) is provided by equation


1  t − 
CWT (a, ) = x (t) dt (1)
  a 
a  

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.

The Wavelet Series is obtained by discretizing CWT. This aids in computation


of CWT using computers and is obtained by sampling the time-scale plane. The
sampling rate can be changed accordingly with scale change without violating the
Nyquist criterion. Nyquist criterion states that, the minimum sampling rate that allows
reconstruction of the original signal is 2ω radians, where ω is the highest frequency in
the signal. Therefore, as the scale goes higher (lower frequencies), the sampling rate
can be decreased thus reducing the number of computations.

In continuous wavelet transforms, a given signal of finite energy is projected on


a continuous family of frequency bands (or similar subspaces of the LP function space
L2(R)). For instance the signal may be represented on every frequency band of the form
[f, 2f] for all positive frequencies f>0. Then, the original signal can be reconstructed by
a suitable integration over all the resulting frequency components.

The frequency bands or subspaces (sub-bands) are scaled versions of a subspace


at scale 1. This subspace in turn is in most situations generated by the shifts of one
generating function L2 (R) , the mother wavelet. For the example of the scale one
frequency band this function is
sin(2t) − sin(t)
 (t) = 2sin c(2t) −sin c(t) = (2)
t

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

xa (t) =  WT x (a,b). a,b (t) db (4)


R

with wavelet coefficients

WT x(a,b) = x,a,b =  x(t) a,b (t)dt . (5)


R

4.4 Discrete wavelet transforms

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.

It is computationally impossible to analyze a signal using all wavelet


coefficients, so one may wonder if it is sufficient to pick a discrete subset of the upper
half plane to be able to reconstruct a signal from the corresponding wavelet
coefficients. One such system is the affine system for some real parameters a>1, b>0.
The corresponding discrete subset of the half plane consists of all the points
(am , na m b) with integers m, n Z 2 . The corresponding baby wavelets are now given as

 m,n (t) = a−m/2 (a−mt − nb) (6)

21
A sufficient condition for the reconstruction of any signal x of finite energy by the
formula

x(t) = 
mZ nZ
x,m,n . m,n (t) (7)

is that the functions {m,n :m, nZ 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:

is the condition for zero mean, and


  (t)dt
−
=0

  (t) 2 dt = 1 is the condition for 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).

An orthogonal wavelet is entirely defined by the scaling filter - a low-pass finite


impulse response (FIR) filter of length 2N and sum 1. In biorthogonal wavelets,
separate decomposition and reconstruction filters are defined. For analysis with
orthogonal wavelets the high pass filter is calculated as the quadrature mirror filter of
the low pass, and reconstruction filters are the time reverse of the decomposition
filters. Daubechies and Symlet wavelets can be defined by the scaling filter.

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

4.5 Applications of Discrete Wavelet Transform

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.

A related use is that of smoothing/denoising data based on wavelet coefficient


thresholding, also called wavelet shrinkage. By adaptively thresholding the wavelet
coefficients that correspond to undesired frequency components smoothing and/or
denoising operations can be performed. Wavelet transforms are also starting to be used for
communication applications. Wavelet OFDM is the basic modulation scheme used in HD-PLC
(a power line communications technology developed by Panasonic), and in one of the optional
modes included in the IEEE P1901 draft standard. The advantage of Wavelet OFDM over
traditional FFT OFDM systems is that Wavelet can achieve deeper notches and that it does not
require a Guard Interval.

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.

In DWT, the most prominent information in the signal appears in high


amplitudes and the less prominent information appears in very low amplitudes. Data
compression can be achieved by discarding these low amplitudes. The wavelet
transforms enables high compression ratios with good quality of reconstruction. At
present, the application of wavelets for image compression is one the hottest areas of
research. Recently, the Wavelet Transforms have been chosen for the JPEG 2000
compression standard.

Noisy Wavelet Wavelet De noised


Signal Decomposition Thresholding Reconstruction Signal

Fig 4.5.1 Signal processing application using Wavelet Transform.

Figure shows the general steps followed in a signal processing application.


Processing may involve compression, encoding, de-noising etc. The processed signal

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.

4.6 Wavelet de-noising


Practical ECGs are downloaded from Physiobank, with 1000 Hz sampling rate, one
minute length. Then that signals are re sampled to 200 Hz. The signals are
transformed, thresholded and inverse-transformed. The result is cleaned-up signal
that still shows important details. The general de-noising procedure involves three
steps is shown. The basic version of the procedure follows the steps described below.

i. Decomposition. Choose a wavelet, choose a level N. Compute the wavelet


decomposition of the signal s at level N.
ii. Thresholding detail coefficients. For each level from 1 to N, select a threshold and
apply soft or hard thresholding to the detail coefficients.
iii. Reconstruction. Compute wavelet reconstruction using the original approximation
coefficients of level N and the modified detail coefficients of levels from 1 to N.
There are two important steps: how to choose the threshold, and how to perform the
thresholding. Hard thresholding can be described as the usual process of setting to
zero the elements whose absolute values are lower than the threshold. Soft
thresholding is an extension of hard thresholding, first setting to zero the elements

25
whose absolute values are lower than the threshold, and then shrinking the nonzero
coefficients towards 0.

Low Pass down sample


F cAj
Lo_D 2
x
G cDj
Hi_D 2
down sample
High Pass

Figure 4.6.1 Wavelet decomposition

Discrete Wavelet Transform is referred as decomposition by wavelet filter banks.


DWT uses two filters, a low pass filter (LPF) and a high pass filter (HPF) to decompose
the signal into different scales shown. Aj is the Approximate Coefficients and Dj is the
Detailed Coefficients. The output coefficients of the LPF are called approximations
while the output coefficients of the HPF are called details. The approximations of the
signal are what define its identity while the details only imparts nuance.

cA1 cD1

cA2 cD2

cA3 cD3

C: cA3 cD3 cD2 cD1

L: cA3 cD3 cD2 cD1

Fig 4.6.2 Decomposition tree for three leve

26
CHAPTER 5

5. TUNABLE Q WAVELET TRANSFORM

5.1 Introduction

The Q-factor of a wavelet is a measure of the wavelets central frequency


to bandwidth ratio, and controls the oscillatory behavior of the wavelet. The
`tunable Q-Factor wavelet transform' (TQWT) is a flexible fully-discrete wavelet
transform, in which the usual wavelet variables of position (time) and scale
(frequency subband) are considered, along with an additional variable of Q-
factor (central frequency to bandwidth ratio of wavelets).
The TQWT toolbox is a set of programs implementing and illustrating the
TQWT. The programs validate the properties of the transform, clarify how the
transform can be implemented, and show how it can be used. The TQWT is
similar to the rational-dilation wavelet transform (RADWT), but the TQWT
does not require that the dilation-factor be rational.
The tunable Q-factor wavelet transform (TQWT) for which the Q-factor,
Q, of the underlying wavelet and the asymptotic redundancy (over-sampling
rate), r, of the transform are easily and independently specified. In particular,
the specified parameters Q and r can be real-valued. Therefore, by tuning Q, the
oscillatory behavior of the wavelet can be chosen to match the oscillatory
behavior of the signal of interest, so as to enhance the sparsity of a sparse signal
representation. The ability of the tunable Q-factor wavelet transform (TQWT)
to sparsely represent data along with the capability to manipulate the central
frequency to bandwidth ratio of the wavelet basis used for decomposition.
A subsequent two-channel filter bank algorithm implements the TQWT.
Using scaling operators in frequency to implement the subsequent high and low
pass filters; the TQWT can be implemented quickly and efficiently via the Radix
2-FFT.

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

Use Q = 1 for non-oscillatory signals. A higher Q  , Q 1


Q
value of Q is appropriate for oscillatory
signals.

Redundancy

The total over-sampling rate when the TQWT


is computed over many levels. It is r  , r 1
r
recommended to select r  3 in order that the
analysis/synthesis functions (wavelets) be
well localized.

Number of stages (levels) of the TQWT

J is the number of times the two-channel filter


J J  , J 1
bank is iterated. There will be a total of J + 1
sub-band. (The last subband will be the low-
pass subband.)

The Q-factor, denoted Q, affects the oscillatory behavior the wavelet;


specifically, Q affects the extent to which the oscillations of the wavelet are
sustained. Roughly, Q is a measure of the number of oscillations the wavelet
exhibits. For Q, a value of 1.0 or greater can be specified. (Q can be real-valued.)
The definition of the Q-factor of an oscillatory pulse is the ratio of its center
frequency to its bandwidth.
f0
Q= (1)
BW
28
This terminology comes from the design of electronic circuits.The parameter r
is the redundancy of the TQWT when it is computed using infinitely many
levels.
Here `redundancy' means total over-sampling rate of the transform (the
total number of wavelet coefficients divided by the length of the signal to which
the TQWT is applied.) The specified value of r must be greater than 1.0, and a
value of 3.0 or greater is recommended. (When r is close to 1.0, the wavelet will
not be well localized in time | it will have excessive ringing which is generally
considered undesirable.) The actual redundancy will be somewhat diffierent
than r because the transform can actually be computed using only a finite
number of levels. Moreover, when the radix-2 version of the TQWT is used, the
redundancy will be greater than the specified r due to zero-padding performed
within the radix-2 TQWT.

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

SUBBAND ENERGY (% OF TOTAL)


25

20

15

10

0
1 2 3 4 5 6 7 8 9
SUBBAND

Note that subband 1 corresponds to high-frequencies, while subband 9


corresponds to the low-pass band.

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.

WAVELETS: SUBBANDS 3 THROUGH 8

4
SUBBAND

0 50 100 150 200 250


Q = 1.00, r = 3.00 TIME (SAMPLES)

32
Frequency Responses: The frequency decomposition performed by the TQWT
can be displayed using the function PlotFreqResps.

FREQUENCY RESPONSES: Q = 1.00, R = 3.00


1

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.

FREQUENCY RESPONSES: Q = 1.00, R = 3.00

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.

FREQUENCY RESPONSES: Q = 1.00, R = 6.00

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

As the TQWT is over-sampled (redundant), the wavelet coefficients that


yield a given signal are not unique.
In some applications, it is useful to find a sparse set of wavelet coefficients for a
given signal x. One approach is basis pursuit (BP) [3], the idea of which is to find
a set of coefficients with minimal l1 -norm. Given a signal x, one needs to solve

the optimization problem:

arg min = w 1 , Such that TQWT −1 (w) = x


w

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

arg min   j w 1 , Such that TQWT −1 (w) = x


w j=1

Where wj represents sub band j, and  j are regularization parameters.

The vector  = ( 1 . . .  j +1 ) can be used to take into account the fact that the l2 -

norm of the wavelet is different in different subbands.

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)

Sparsification of the subbands can also lead to a different distribution of


signal energy across subbands. The resulting plot shows that sparsification can
have the effect of compressing the energy of the wavelet representation into
fewer subbands.

DISTRIBUTION OF SIGNAL ENERGY


SUBBAND ENERGY (% OF TOTAL)

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.

WAVELETS: SUBBANDS 5 THROUGH 17

5
6
7
8
9
SUBBAND

10
11
12
13
14
15
16
17

0 50 100 150 200 250


Q = 4.00, r = 3.00 TIME (SAMPLES)

FREQUENCY RESPONSES: Q = 4.00, R = 3.00


1

0.5

0
0 0.1 0.2 0.3 0.4 0.5
NORMALIZED FREQUENCY (HERZ)

37
5.6 Sparse signal approximation

Previously, we saw that a sparse representation of a signal can be


obtained by solving the basis pursuit problem. A related approach can be used
for signal denoising, where the observed signal y has been corrupted by
additive noise,

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

Then x can be estimated asTQWT −1 (w) .

Basis pursuit de-noising does not find an exact representation for y -


instead the resulting wavelet coefficients give an approximation to the given
signal y. It is appropriate when noise (or general stochastic component) is
present in the observed signal y.

38
5.7 Dual Q-factor signal decomposition

This section describes the sparse representation of a signal using two Q-


factors simultaneously. This problem can be used for decomposing a signal into
high and low `resonance components' [4].
Consider the problem of writing a given signal x as the sum of an oscillatory
signal X1 and a non-oscillatory signal X 2 ,
X = X1 + X 2 .
The signal X is a measured signal, and X1 and X 2 are to be determined in
such a way that X1 consists mostly of sustained oscillations and X 2 consists

mostly of non-oscillatory transients. As described in [4], such decomposition is


necessarily nonlinear in X , and it cannot be accomplished using frequency-
based filtering.
One approach is to model X1 and X 2 as having sparse representations using

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

based on `morphological component analysis' (MCA) [6], a general method for


signal decomposition based on sparse representations.
Denote TQWT1 and TQWT2 as the TQWT with two different Q-factors (high
and low Q-factors). Then the sought decomposition can be achieved by solving
the constrained optimization problem:
arg min 1 w1 1 + 2 w2 1 , Such that X = TQWT −1 (w ) + TQWT −1 ( w )
1 1 2 2
w1 ,w2

For greater flexibility, we will use sub band-dependent regularization:


J1 +1 J2 +1
argmin  1, j w1, j 1 +  2, j w2, j , Such that X = TQWT 1−1 ( w 1) + TQWT 2−1 ( w 2 )
w1 ,w2 1
j=1 j=1

where wi, j in (4) denotes sub band j of TQWTi for i = 1, 2.

After w1 and w2 are obtained, we set

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.

Resonance components of a noisy signal

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

respectively. The regularization parameters 1 and 2 are chosen by the user

according the power of the noise. After w1 and w2 are obtained,

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

The center frequency of subband is given by

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

6.1 Denoising using Tunable Q factor Wavelet tranform


Denoising using tunable Q factor wavelet transform is a powerful technique for removing
noise from ECG signals. The tunable Q factor wavelet transform is a modified version of the
standard wavelet transform that allows for greater control over the shape and size of the
wavelet basis functions. This control allows for more precise filtering of noise in the ECG
signal.

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.

Fig 6.1.1 Denoising Using Tunable Q factor Wavelet


Transform Processing

42

You might also like