Zoafshan Ms17 Ce Thesis
Zoafshan Ms17 Ce Thesis
Author
ZoAfshan
Fall 2017-MS (CE) 00000205299
Supervisor
Co-Supervisor
i
Segmentation and Classification of Phonocardiogram Signals using Machine
Learning Techniques
Author
ZoAfshan
Fall 2017-MS (CE) 00000205299
Thesis Supervisor:
Co-Supervisor
ii
Declaration
I certify that this research work titled “Segmentation and Classification of Phonocardiogram
Signals using Machine Learning Techniques” is my own work. The work has not been presented
elsewhere for assessment. The material that has been used from other sources it has been properly
acknowledged / referred.
Signature of Student
ZoAfshan
Fall 2017-MS (CE) 00000205299
iii
Plagiarism Certificate (Turnitin Report)
This thesis has been checked for Plagiarism. Turnitin report endorsed by Supervisor is attached.
Signature of Student
ZoAfshan
MS (CE) 00000205299
Signature of Supervisor
Dr. Farhan Hussain
iv
Copyright Statement
Copyright in text of this thesis rests with the student author. Copies (by any process) either in
full, or of extracts, may be made only in accordance with instructions given by the author and
lodged in the Library of NUST College of Electrical & Mechanical Engineering (CEME).
Details may be obtained by the Librarian. This page must form part of any such copies made.
Further copies (by any process) may not be made without the permission (in writing) of the
author.
The ownership of any intellectual property rights which may be described in this thesis is vested
in NUST School of Mechanical & Manufacturing Engineering, subject to any prior agreement to
the contrary, and may not be made available for use by third parties without the written
permission of the CEME, which will prescribe the terms and conditions of any such agreement.
Further information on the conditions under which disclosures and exploitation may take place is
available from the Library of NUST School of Electrical & Engineering, Islamabad.
v
Acknowledgements
I would like to express my sincere gratitude to my supervisor Dr. Farhan Hussain for boosting
my morale and for his continual assistance, motivation, dedication and invaluable guidance in my quest
for knowledge. I am blessed to have such a co-operative advisor and kind mentor for my research.
Along with my advisor, I would like to acknowledge my entire thesis committee: Dr.
Muhammad Usman Akram, Dr. Arslan Shaukat from CEME and Dr. Shahzor Ahmad for their
cooperation and prudent suggestions.
Finally, I would like to express my gratitude to all my friends and the individuals who have
encouraged and supported me through this entire period.
vi
Dedicated to my exceptional parents and adored siblings whose tremendous
support and cooperation led me to this wonderful accomplishment.
vii
Abstract
Cardiovascular diseases (CVDs) are one of the major causes of deaths in the world. CVDs
generally describe the conditions of the heart that involve narrowed or blocked blood vessels,
causing heart attack, angina or stroke. Human heart beats continuously due to contraction and
relaxation of heart muscles. During the contraction state which is also termed as systole the
ventricles contract, forcing blood through vessels into the lungs and the body. During the
relaxation which is termed as diastole the ventricles are filled with the blood coming from the
right and left atria. Sounds produced by the heart due to snap shut of the valves are the heart
sounds which can be heard and detected through stethoscope and phonocardiograph. The
phonocardiogram (PCG) signals provide valuable information about the heart condition for exact
and timely detection of heart diseases. Digital stethoscopes have the ability to record the PCG
signal and transmit it for further analysis and identification of abnormal sounds. PCG signal
consists of various events like S1 sound, S2 sound, S3 sound, S4 sound and murmurs. S1 and S2
are the main events considered for the heart sound segmentation which are followed by the
systolic and diastolic activities of the heart. This research work proposes a heart sound
segmentation and classification algorithm which diagnose the abnormal symptoms of the heart in
time. The proposed algorithm first performs segmentation of heart sound into S1, systole, S2 and
diastole, afterwards it extract features from these four states to perform classification of PCG as
normal or abnormal. The proposed algorithm is implemented on the PhysioNet heart sound
challenge dataset using Support Vector Machine and Convolutional Neural Network for
classification of heart beats into S1 and S2 based on extracted features. For classification of
normal and abnormal heart sound Support Vector Machine, K-Nearest Neighbor and Neural
Network are employed. The developed algorithm is suitable for the detection of normal and
abnormal heart sounds for cardiovascular disease detection.
8
Table of Contents
DECLARATION ....................................................................................................................................................... III
PLAGIARISM ICERTIFICATE I(TURNITIN IREPORT) .................................................................................................. IV
COPYRIGHT ISTATEMENT ....................................................................................................................................... V
ACKNOWLEDGEMENTS ......................................................................................................................................... VI
ABSTRACT .............................................................................................................................................................. 8
CHAPTER 1: INTRODUCTION ................................................................................................................................ 13
1.1 INTRODUCTION.......................................................................................................................................................13
1.2 MOTIVATION .........................................................................................................................................................15
1.3 PROBLEM STATEMENT .............................................................................................................................................16
1.4 SCOPE ..................................................................................................................................................................16
1.5 OBJECTIVES ...........................................................................................................................................................16
1.6 THESIS STRUCTURE..................................................................................................................................................17
CHAPTER 2: CLINICAL BACKGROUND ................................................................................................................... 18
OVERVIEW ..................................................................................................................................................................18
2.1 THE CIRCULATORY SYSTEM .......................................................................................................................................18
2.2 THE HEART ............................................................................................................................................................20
2.3 THE CARDIAC CYCLE ................................................................................................................................................21
2.3.1 Systole .........................................................................................................................................................21
2.3.2 Diastole .......................................................................................................................................................21
2.4 HEART SOUNDS ......................................................................................................................................................22
2.4.1 Primary Heart Sounds .................................................................................................................................22
2.4.2 Extra Heart Sounds .....................................................................................................................................23
2.5 PHONOCARDIOGRAM...............................................................................................................................................24
CHAPTER 3: LITERATURE REVIEW......................................................................................................................... 27
OVERVIEW ..................................................................................................................................................................27
3.1. NOISE EXTRACTION ...........................................................................................................................................28
3.1.1. FILTERS AND TRANSFORMS .............................................................................................................................28
3.2. PCG CLASSIFICATION BASED ON SEGMENTATION ....................................................................................................29
3.2.1. SEGMENTATION AND CLASSIFICATION OF HEART BEATS........................................................................................29
3.2.2. SEGMENTED PCG CLASSIFICATION ...................................................................................................................30
3.2.2.1. FEATURES EXTRACTION ..............................................................................................................................31
3.2.2.2. CLASSIFIER...............................................................................................................................................31
3.3. PCG CLASSIFICATION WITHOUT SEGMENTATION.....................................................................................................31
CHAPTER 4: PROPOSED METHODOLGY ................................................................................................................ 34
OVERVIEW ..................................................................................................................................................................34
4.1. SIGNAL ASSESSMENT ..............................................................................................................................................34
4.2. SIGNAL PREPARATION FOR PROCESSING.....................................................................................................................35
4.3. PREPROCESSING ....................................................................................................................................................35
4.4. PEAK IDENTIFICATION .............................................................................................................................................36
4.4.1. MULTI-LEVEL THRESHOLDING ...............................................................................................................................36
9
4.5. S1 AND S2 CLASSIFICATION .....................................................................................................................................37
4.5.1. SEGMENTATION OF S1 AND S2 USING MACHINE LEARNING ........................................................................................38
4.5.1.1 FEATURE EXTRACTION........................................................................................................................................38
4.5.1.1.1. TIME DOMAIN FEATURES ...............................................................................................................................38
4.5.1.1.2. FREQUENCY DOMAIN FEATURES ......................................................................................................................38
4.5.1.2. TRAIN MODEL FOR S1 AND S2 CLASSIFICATION ......................................................................................................38
4.6. SEGMENTATION OF S1 AND S2 USING SPECTROGRAM AND DEEP LEARNING ......................................................................39
4.6.1. HEART BEAT SPECTROGRAMS ................................................................................................................................39
4.6.2. CNN MODEL .....................................................................................................................................................40
4.7. POST-PROCESSING .................................................................................................................................................42
4.8. PCG CLASSIFICATION..............................................................................................................................................44
4.8.1. FEATURE EXTRACTION..........................................................................................................................................44
4.8.2. PCG CLASSIFIER .................................................................................................................................................45
CHAPTER 5: IMPLEMENTATION AND PERFORMANCE EVALUATION ..................................................................... 46
OVERVIEW ..................................................................................................................................................................46
5.1. DATASET (PHYSIONET/COMPUTING IN CARDIOLOGY CHALLENGE)...................................................................................46
5.2. SIGNAL ASSESSMENT ..............................................................................................................................................46
5.3. SEGMENTATION .....................................................................................................................................................48
A. PREPROCESSING .......................................................................................................................................................49
B. TRUE PEAK IDENTIFICATION ........................................................................................................................................50
C. SEGMENTATION (S1 AND S2) .....................................................................................................................................51
I. PEAK CLASSIFICATION USING CRAFTED FEATURES AND SVM ..............................................................................................51
II. CLASSIFICATION USING SPECTROGRAM AND CONVOLUTIONAL NEURAL NETWORK ...............................................................52
D. POST PROCESSING ...................................................................................................................................................54
5.4. CLASSIFICATION OF PCG SIGNALS (NORMAL AND ABNORMAL) .......................................................................................55
CHAPTER 6: CONCLUSION AND FUTURE WORK ................................................................................................... 58
OVERVIEW ..................................................................................................................................................................58
6.1. CONCLUSION.........................................................................................................................................................58
6.2. FUTURE WORK ......................................................................................................................................................59
10
List of Figures
FIGURE 1.1: TOP 10 CAUSES OF DEATH GLOBALLY .................................................................................................................14
FIGURE 1.2: GRAPHICAL REPRESENTATION OF PCG, ECG AND PPG ..........................................................................................15
FIGURE 2.1: LYMPHATIC SYSTEM OF HUMAN.........................................................................................................................19
FIGURE 2.2 : HUMAN HEART ..............................................................................................................................................20
FIGURE 2.3 : DURING (A) CARDIAC DIASTOLE (B) ATRIAL SYSTOLE (C) ATRIAL DIASTOLE, VENTRICLES CONTRACT FORCING BLOOD OUT SIDE
.............................................................................................................................................................................22
FIGURE 2.4 : DIFFERENT HEART SOUNDS ..............................................................................................................................23
FIGURE 2.5: DIGITAL STETHOSCOPE .....................................................................................................................................24
FIGURE 2.6: ECG VS PCG .................................................................................................................................................25
FIGURE 3.1: FLOW OF LITERATURE ......................................................................................................................................27
FIGURE 4.1: CLASSIFYING PCG SIGNAL AS SUITABLE OR NOT SUITABLE USING CRITERIA...................................................................35
FIGURE 4.2: PROPOSED METHODOLOGY FOR CLASSIFICATION OF S1 AND S2 ...............................................................................36
FIGURE 4.3: MULTI-LEVEL THRESHOLD ALGORITHM, WHERE “CP” DENOTES CANDIDATE PEAKS AND “SP” DENOTES SELECTED PEAKS ......37
FIGURE 4.4 : HYPER-PLANE AND MARGINS OF SUPPORT VECTOR MACHINE.................................................................................39
FIGURE 4.5: ALEXNET ARCHITECTURE ..................................................................................................................................41
FIGURE 4.6: MODIFIED ALEXNET ARCHITECTURE ...................................................................................................................42
FIGURE 4.7: POST-PROCESSING RESULTS ..............................................................................................................................43
FIGURE 5.1: SIGNAL ASSESSMENT, A) SUITABLE (B AND C) NOT SUITABLE SIGNALS .......................................................................47
FIGURE 5.2: CHUNKS OF PCG SIGNAL FROM ORIGINAL SIGNAL .................................................................................................48
FIGURE 5.3: PREPROCESSING OF PCG, (A) ORIGINAL SIGNAL (B) FILTERED AND DE-SPIKED SIGNAL (C) ENVELOPE OF NOISE FREE SIGNAL
(D) NORMALIZED ENVELOPE OF NOISE FREE SIGNAL ........................................................................................................49
FIGURE 5.4: PEAK IDENTIFICATION.......................................................................................................................................50
FIGURE 5.5: CLASSIFICATION OF S1 AND S2 ..........................................................................................................................52
FIGURE 5.6: SPECTROGRAM OF S1 PEAK ...............................................................................................................................53
FIGURE 5.7: SPECTROGRAM OF S2 PEAK ...............................................................................................................................53
FIGURE 5.8: PCG SIGNAL LABELING AFTER POST-PROCESSING ..................................................................................................54
11
List of Tables
12
Chapter 1: INTRODUCTION
1.1 Introduction
The circulatory system delivers blood to the body and comprises of heart, veins,
capillaries and arteries [1]. Illnesses and the disorders affect the heart and in some
cases result in the form of severe cardiovascular diseases (CVDs). Some of them
are angina, arrhythmia, congenital heart disease, coronary artery ailment, heart
attack, heart failure, dilated cardiomyopathy, hypertrophic cardiomyopathy, mitral
regurgitation, mital valve prolapse, pulmonary stenosis, aortic stenosis, atrial
fibrillation and radiation heart diseases etc. CVDs affect normal working of the
heart and also shrink the veins, arteries and capillaries. Consequently, it lessens the
stream of the blood supply into the limbs. On the other hand, in some cases it
causes enlargement of the arteries because of the presence of excessive blood
which may result in rupturing of arteries. Some of the risk factors for CVDs
include smoking, a high fat and carbohydrate diet, stress, extreme alcohol intake,
high blood cholesterol, diabetes, obesity, high blood pressure and hypertension.
The signs of CVDs are not distinct, however typical indications to distinguish the
CVDs are feeling pressure, pain in the chest, or discomfort in left arms, shoulders,
and elbows, dizziness and cold sweats. Although CVDs are confirmed with stroke
or heart attack. Some of the apparent warnings include difficulty in speaking,
vision reduction, dizziness, loss of harmonization or balance, headache,
forgetfulness or unresponsiveness of one side of body [2] [3].
13
The CVDs are generally hard to detect due to the nonappearance of signs of CVDs.
In particular, in initial phase of the heart disease, abnormality detection is the most
thoughtful task. Conversely, the correct analysis at prior phase is a very critical
task and important for the decreasing of death rate. The common means of
examination include Physical Examination, Medical History, Angiography,
Nuclear Imaging, Stress Test, Echocardiogram, Electrocardiogram, X-Rays, and
Cardiac Computerized Tomography, Medical Resonance Imaging and Cardiac
Catheterization etc. Continuous monitoring of heart beat is of great importance in
early diagnosis of CVDs [5].
14
A cardiac cycle consists of different heart activities which result in different heart
sounds. S1 and S2 represent the occurrence of main events as they correspond to
the systolic and diastolic activities of the heart which in turn are considered useful
for the heart sound segmentation. In normal human beings the heart cycle usually
contains four components: first sound (S1), systolic period, second sound (S2) and
diastolic period. Retrieving presence and identifying location of each heart sound
component within a cardiac cycle may help in the examination of signal for an in-
depth study on the heart ailment recognition. For this purpose, it is required to
segment the PCG signal according to cardiac activities.
Once heart sound segmentation is carried out, afterwards the heart sound is
classified as normal or abnormal.
1.2 Motivation
Phonocardiogram signals have been used for the examination of heart sounds in
route to determine the disorder of heart. However, the occurrence of noise and
close interclass similarities between S1 and S2 makes the job hard. So, the purpose
of this study is to develop an effective segmentation algorithm based on the
statistical signal processing and state of the art convolutional neural network,
which is proficient in distinguishing key cardiac events, decreases the
computational difficulty and has the capability to detect almost all cardiac
illnesses. The proposed segmentation technique uses suggested splitting algorithms
to separate the PCG signal into series of cardiac cycles and also classify the normal
and abnormal heart beats of the cardiac cycle to save valuable lives by easy and
on-time analysis.
1.4 Scope
The maximum number of the heart ailments is related to the heart and circulatory
problems. This study promises early identification of any abnormality in heartbeat/
heart sounds so that the patient can be screened in early stages of the disease
development and subsequently patients could be recommended for advanced
treatment in time. The developments of such clinical solutions are really needed in
the developing countries like Pakistan particularly in the rural areas where expert
cardiologists and advanced treatment facilities are not available. Therefore, the
development of a method for heart disease diagnosis is essential. This study aims
to develop a method which can become part of a bigger telemedicine program and
to expand the health facilities in underprivileged localities.
1.5 Objectives
16
of an accurate and automatic system for the initial analysis of CVDs especially in
underdeveloped areas. The main objectives of the research are
1. To found the measures for the quality assessment of PCG signals prior to
any processing for elimination of noisy signals.
2. To formulate algorithm for the identification of locations of heart sounds (S1
and S2) in PCG signals using signal processing techniques and machine
learning algorithms specifically CNN.
3. To develop method for classification of heart sounds as normal or abnormal
based on the machine learning algorithms.
Chapter5 presents the detailed results and the performance evaluation of proposed
methodology. The performance parameters used for evaluation of each phase is
explained and their results are shown with the help of figures, bar graphs and
tables.
Chapter6 states the summary of thesis and the future work that can be done in
order to further extend this research.
17
CHAPTER 2: CLINICAL BACKGROUND
Overview
In this chapter we will discuss the circulatory system of the heart. This includes
discussion about the heart, its working and generation of heart sounds. Also, the
clinical description, and performance assessment metrics of the working of the heat
will be detailed in this chapter.
2.1 The Circulatory System
The circulatory system allows blood circulation and nutrients transportation to and
from cells in the body. It is a massive system containing organs and vessels. It is
also responsible for the transport of blood, oxygen, nutrients (electrolytes and
amino acids etc.), carbon dioxide and hormones from and to cells. It provides
sustenance and protection to the body and also aids in its fight against diseases.
Circulatory system often compromises of two independent systems, lymphatic and
cardiovascular systems which work together to achieve overall mission of life
survival.
The lymphatic system involves the circulation of lymph through the body. The
path of lymph is comparatively larger than the path of blood. Lymphatic system is
composed of lymph, lymph vessels, lymph capillaries, lymph tissues and lymph
nodes. The excess blood plasma that is filtered from interstitial fluid is known as
lymph which is transported back to lymphatic system [7]. Figure 2.2 shows the
lymphatic system of human.
18
Figure 2.1: Lymphatic System of Human
Blood consists of red blood cells, plasma, white blood cells and platelets. The
blood is pumped by the heart through the network of veins and arteries. Almost 4
to 6 litters of blood are present in an adult person. Blood compromises of 7 percent
of the entire body weight. Cardiovascular system is responsible for sustaining the
appropriate blood pressure. Blood circulation is of two kinds: systemic circulation
and pulmonary circulation. The systemic circulation includes the circulation of the
oxygenated blood to the body while pulmonary circulation includes the path of
blood inside the lungs for oxygenated blood towards the heart from the lungs via
pulmonary veins. The circulatory system with pulmonary and systemic circulation
is shown in Figure. The circulatory system is most vulnerable to diseases than any
other system in the body due to its hugeness.
19
2.2 The Heart
Human heart is a muscular organ, positioned slightly left to the midpoint in chest.
It is approximately the size of ones fist. It comprises of two independent halves i.e.
the right and the left, which prevents oxygen-rich blood from mixing with the
oxygen-poor blood. The right side of the human heart consists of the right atrium
and the right ventricle and the left side consists of the left atrium and the left
ventricle. The blood flow within the heart is controlled by the four valves which
are tricuspid, mitral, pulmonary and aortic. In normal people, the valves
completely open and completely close periodically to ensure zero outflow. To
perform normal functioning, the opening of the valves must occur when it is
required to be opened.
Human heart beats endlessly with the contraction and relaxation of heart muscles.
During the contraction state (which is also called as systole) ventricles contract,
forcing blood into the vessels of the lungs and the body. During the relaxation state
(which is called as diastole) the ventricles are filled with the blood coming from
the right and left atria. [8]
A normal heart usually beats about 60 to 100 times per minute. With each
heartbeat, the oxygen-rich blood is transmitted to different parts of the body. After
delivering oxygen, the blood returns to the heart which is in turn transmitted to the
20
lungs to obtain oxygen-rich blood. The deoxygenated blood comes in to the right
atrium from veins which are passed into right ventricle to be pumped to lungs for
removal of carbon di oxide and oxygenation. The oxygenated blood from lungs is
pumped into the left atrium which is passed to the left ventricle, from where it is
pumped to different organs of the body through aorta. In summary, the human
circulatory system consists of the following circuits:
The pulmonary circuit which provides blood flow between the heart and
lungs.
The systemic circuit which allows blood to flow to and from the rest of the
body.
Systole period represents the contraction of right and left ventricles and discharge
of blood into aorta and pulmonary artery which is allowed through the opening of
the aortic and pulmonic valves while the atrio-ventricular valves remains closed
during systole period to prevent the flow of blood into the ventricles.
2.3.2 Diastole
Diastole represents the relaxation of left and right ventricles and flow of blood
from left to right atrium into the left and right ventricles respectively. The blood
runs through the mitral and tricuspid valves. In diastole, right atrium receives
blood from body whereas left atrium receives blood from lungs after oxygenation.
Left and right atria contracts at the end of diastole period pushing an extra amount
of blood into ventricles.
21
Figure 2.3 : During (a) Cardiac diastole (b) Atrial systole (c) Atrial diastole, ventricles contract forcing blood out side
The heart generates the electrical activity throughout the cardiac cycle as a result of
which atria and ventricles contract. It causes the blood to be forced between heart
chambers and throughout the body. Heart produces sounds as a result of heart
beating and flow of blood through it during cardiac cycle. Also, the vibrations are
produced by the closure of heart valves creating turbulence, which are audible and
can be listened through stethoscope during cardiac auscultation by the examiner.
The heart sounds are distinct and unique that gives valuable acoustic information
about the heart condition. Normally in adults there are two heart sounds, i.e. Lub
and Dub, generated by closure of semilunar and atrio-ventricular valve.
2.4.1 Primary Heart Sounds
There are two normal primary heart sounds, i.e. S1 and S2, associated with closure
of heart valves. S1 is also called as first heart sounds or “Lub”. S1 is generated by
closing of tricuspid and bicuspid valves during the start of systole period. The
vibrations are produced as a result of turbulence during ventricles contraction in
systole and it could be easily heard with stethoscope placed at apex of heart. It has
two components: M1 which is caused by closure of mitral valves and T1 which is
caused by tricuspid valve closure. M1 occurs before T1 with an approximate 25-45
cycles per second whereas it elapses for an interval of around 0.14-0.15s. [9]
22
S2 is known as second heart sound or “Dub”. S2 is produced by the closure of
semilunar valves during the end of systole or early diastole period. S2 is best heard
with of the stethoscope placed at aortic area. It has two components: A2 caused by
closure of aortic valve and P2 caused by closure of pulmonary valve. Generally, S2
sound is louder and high-pitched as compared to S1 sound with a frequencies
falling in the range of 40-70 Hz. In addition, its duration is relatively longer which
elapses for an interval of around 0.11-0.12s [9]. S1 and S2 are known as the
primary heart sounds.
In addition to the primary heart sounds, extra heart sounds may also be present in a
cardiac cycle which may be benign or pathological. Extra heart sounds are named
as S3 and S4 which are low frequency sounds named as „gallops‟. S3 and S4 can
be produced due to the vibration in either halves of the heart. Generally, S3 is
located at third part of the diastole which elapses for around 0.1s with a frequency
of 40-50Hz. The primary cause of S4 sound is considered as hypertension due to
23
which it appears in a cardiac cycle just before S1 i.e. late diastole period and it has
very low frequency (less than 20Hz).
2.4.3 Murmurs
These are roaring, whooshing, turbulent fluid noise that occurs between first and
second heart sound. Murmurs are generated as result of blood flows through the
heart valves. These sounds have to be loud enough so that they can be heard with
the help of stethoscope. Normally there are two types of murmurs. A murmur
which is generated as a result of biological conditions outside heart is physiologic
or functional murmur. Whereas, the other category involves murmurs which occurs
due to the defects in the heart structure or different heart disease can be associated
with it. Murmurs can be benign or pathological. For instance, functional murmurs
are not harmful. On the other hand, pathological murmurs are produced as a result
of different medical problems including heart valves leakage or shrinkage, or
existence of irregular path for blood flow inside or near heart. Murmurs are usually
characterized on the basis of their occurrence or timing in a cardiac cycle i.e. the
part of cardiac cycle (diastole and systole) during which they are audible. These
are classified into systolic and diastolic murmurs. Different types of murmurs are
shown in Figure 2.4.
2.5 Phonocardiogram
The heart sounds are listened through stethoscope and recorded using a technique
known as phonocardiography. The condition of heart can be analyzed by the
audible vibrations produced in result of closing of valves. Phonocardiogram (PCG)
is one of the widely used non-invasive ways for observing the disorders of heart
via stethoscope. Digital stethoscopes have the capability to record the PCG signal
and transmit it for further analysis and identification of possibly abnormal sounds.
[10] Digital stethoscopes can efficiently detect and record the presence of meek
(low-magnitude) heart sounds which are difficult to be detected using ordinary
stethoscope in harsh environment [11].
24
Human heart beats periodically because of the intricate interaction among
dynamics of blood pressure and flow and compliance of heart chambers and blood
vessels. Vibrations are generated as a result of these mechanical events. Acoustic
signals are produced from these vibrations which can be recorded through digital
stethoscope over the chest wall. Figure 2.6 illustrates the relationship between
occurrence of fundamental heart sounds in a cardiac cycle and the corresponding
ECG and PCG signals.
Although, heart sound recording and analysis can be employed as an effective and
low-cost alternative for heart abnormality screening, however, there are few
challenges involved in this process. Firstly, the accurate segmentation (i.e.
segmentation) of primary heart sounds (i.e. S1 and S2) is very important for the
detection of any heart abnormality as it provides the basis for the upcoming
classification stage. Another challenge is vulnerability of heart sound from
different noise sources. In particular, external noises present in the near-by setting
of the signal acquisition arrangement (e.g. human speech, noise generated by
appliances and devices), measurement noise due to involvement of sensors and
other components data acquisition system. In contrast, internal noises (coming
from the patient body) for instance sounds originating from lungs and other body
parts, speech etc. may also deteriorate the desired PCG signal. Consequently, it is
the foremost task to remove the undesired noises from the acquired signal using
appropriate noise filtering methods.
25
PCG signals have attracted growing attentions due to the fact that it displays the
heart sounds which are correlated with heart mechanical activity. PCG signals
provide most valuable qualitative and quantitative information of heart sounds and
murmurs. PCG permits the examination of features to wider extent than
auscultation. PCG is comparatively new metric and correct segmentation and
classification of heart sounds has been a challenging task because of inconsistency
of heart cycles. Many researchers have been trying to analyze PCG signals using
different methods like filtering, transform based algorithms, de-noising, feature
extraction and classification etc. Contributions made by different researchers in
this regard are explained in the next chapter in detail. Major aims of research on
PCG signals are to localize heart sounds and then to classify signals as a normal or
abnormal.
26
CHAPTER 3: LITERATURE REVIEW
Overview
Medical signals processing is an emerging field of the time and it plays an
important role in the identification of solutions for different diseases. One of the
problems which need our concentration is continuous monitoring of the heart
condition using automated methods. Phonocardiogram signals are mostly used for
the continuous monitoring of the cardio issues and for the analysis of heart as
normal and abnormal.
The classification of heart sound (as normal and abnormal) is divided into two
categories; one is the classification based on segmentation and second is the
classification without segmentation. In the first category, the segmentation of
phonocardiogram signal is performed before final classification, and in the second
category the final classification is performed using the unsegment
phonocardiogram signal.
Automated analysis and detection of heart sounds in PCG signals for the detection
of cardiac diseases can be done using various approaches as suggested by
literature. However, each method involves few common PCG signal analysis steps
such as noise reduction, pre-processing, feature extraction, etc. Some of the most
recent used algorithms and advancements in this field are summarized in this
chapter. Furthermore, this chapter represents related works on the heart sound
segmentation and PCG signal classification and the motivation for the present
work are drawn to overcome the major limitations of automated heart sound
analysis system and set the ground for the proposed methodology.
The literature will follow the sequence as given in the Figure. In the first
subsection noise reduction is discussed, after that classification of PCG signal is
presented which is divided into two sub categories; classification along with
segmentation and classification without segmentation.
27
3.1. Noise Extraction
PCG signals represent the audible sound of the heart. The process of capturing
heart sounds is known as auscultation. During auscultation both inter and intra-beat
variations are added within the original PCG signal. This noise disrupts the original
signal and changes its amplitude, thus makes the detection of the S1 and S2 peaks
a challenging task.
To ensure the good quality of the signal, it is important to remove this noise from
the original signal before proceeding towards further preprocessing. To examine
the quality of the signal, researchers introduced different methods. Researchers
suggested the use of anti-aliasing filters (low-pass and high-pass filters) [10],
adaptive filtering (to minimize the least mean square error and increase the signal
to noise ratio) [12], Short Time Fourier Transform, Wavelet Transforms [13],
Continuous Wavelet Transform [14], Empirical Mode Decomposition [15], and
multi-level singular value decomposition (SVD) for signal de-noising. These
techniques have been successfully employed to eliminate the unwanted noise from
the signal. For better understanding of these techniques some basics of the filtering
techniques are discussed below.
Filters and Transforms
Filters play an essential role in the field of signal processing. Filter is a special type
of a process which is used to remove the unwanted part of signal, or suppress the
effect of unwanted or unnecessary signal or to restore the original signal from
corruption. The simplest form of corruption during processing of signals is additive
noise. There are different types of filters which can be used according to the
requirements. Filters are categorized as linear or non-linear, time variant or time
invariant, causal or non-causal, discrete time or continuous time, finite or infinite
impulse response filters, etc. Simplest of these are the linear filters which include
the low-pass, high-pass, and band-pass filters. In literature the usage of
Butterworth and Chebyshev filters [16] and [17] and their variants is found quite
often. These linear filters are used for the separation of noise from the signal using
different cutoff frequencies provided that the signal does not overlap in the
frequency domain. Non- linear filters for noise removal operate mostly in time
domain and work within a small window and use statistical features to estimate the
value of each sample. Examples of non-linear filters are median filters, mixers,
energy transfer filters etc. Median filters are used to remove spike noise. Energy
transfer filters are used to move energy to higher or lower frequency bands. For
PCG signals, researchers suggest to calculate the Shannon Energy in order to
obtain the envelope of PCG signal.
28
Other important signal processing tool is the use of Transforms which are
employed to change the mathematical representation of the signal from one form to
another by applying some mathematical procedures. Sometimes it is difficult to
study the signal in its original domain. Therefore, in order to extract the useful
information from the signal one can transform the signal from its original domain
to some other. It has been observed that for manipulation of the signal its original
form best suits it and for processing of the signal its transform domain best suits it.
Different types of Transforms used for the PCG signal processing include Fourier
Transform (FT), Short Time Fourier Transform (STFT), Discrete Wavelet
Transform (DWT) [13], Continuous Wavelet Transform (CWT) [14], Hilbert
Transform, Homomorphic Transform [10] etc. In addition, for PCG segmentation
and classification the most widely used transformations are Homomorphic
Transform, Hilbert Transform and Wavelet Transform.
After noise extraction next section that is going to presented is PCG Classification.
As said before this classification is further sub categorized as classification with
segmentation and classification without segmentation. In section 3.2 PCG
classification based on segmentation is presented and in section 3.3 PCG
classification without segmentation is presented.
3.2. PCG Classification based on Segmentation
For more precise analysis of PCG signals, initial step is the accurate identification
of FHS (First heart sound –S1). The more S1 detection is accurate, the more end
results would be better. Afterwards, the detection of SHS (Second Heart Sound –
S2) is carried out. [18] These two S1 and S2 in each PCG signal provide the basis
for the analysis of heart sound diseases. Scholars have employed various different
techniques for the identification of S1 and S2 that are based upon time domain,
frequency domain or both time-frequency domains. A brief discussion on the
segmentation methods of heart beats is discussed in the following.
3.2.1. Segmentation and Classification of Heart Beats
Most of the heart beat segmentation methods follow the same preprocessing
approach started with noise reduction by applying filters and the normalization of
the signal using the absolute maximum. Followed by the application of the
envelope detection methods, which involves the Hilbert Transform, Homomorphic
Envelope, Wavelet Transform, Shannon Energy, Power Spectral Density [10].
Most of the previous techniques are based on the energy calculation of the PCG
signal like in [19] Shannon envelop of signal is extracted in a continuous window.
For the peak detection in each window a pre-defined peak detection function is
used. Others have used rule of thumbs and facts based distinction to differentiate
29
between S1 and S2 which is, that diastolic is greater than systolic. In some papers
extra peaks are removed by applying one specific threshold.
After the segmentation of PCG signals as S1 and S2, these segments are passed to
the feature extraction stage, followed by classification stage, where according to
their features they are classified as normal and abnormal. In literature, researchers
have used various methods in order to classify the PCG signals. Some are based on
30
clustering like K-Means; others used statistical analysis like Hidden Markov
Method, K-Nearest Neighbor. Few other studies have employed classification
techniques like Support Vector Machine, Neural Network, and Convolutional
Neural Network, etc. Some of the features and classifiers are discussed below.
Features Extraction
Features generally show the distinctive attribute of an item. To classify the PCG
signal as normal or abnormal both time-domain and frequency domain features are
extracted. The time domain features are used to analyze the changes in the signal
with the passage of time. The frequency domain features are used to analyze the
frequency contents in the signal lies. In segmentation-based heart sound analysis
approach, different features are calculated at two different stages. At first the
features are extracted to find the S1 and S2 and in the second stage (i.e.
classification) features are extracted to classify the signal as normal and abnormal.
Some common features are mean, median, kurtosis, energies, entropy, spectral
edges, etc.
Classifier
Various classifiers are found in the literature which researchers preferably employ
for the classification of heart sounds. In [10] springer used a modified form of the
Hidden Markov Model (i.e. Hidden Semi Markov Model) for the classification of
PCGs. Similarly in [25] Simarjat kaur et.al and Lubaib et.al used fuzzy K-NN,
Bayesian and Gaussian mixer Model based KNN for the classification. In [26], two
stages were employed, the first stage performed segmentation using SVM and
ANN was used for the final classification of PCGs.
3.3. PCG Classification without Segmentation
The second approach for the classification of heart sounds is classification without
performing segmentation. Researchers have opted this approach to directly classify
the PCG signals into normal and abnormal class skipping the intermediate
segmentation stage. In [27] authors performed the classification of heart sound
without segmentation using 5 categories of feature that include Linear Predictive
Coefficient (LPC), Entropy based features, Mel Frequency Cepstral coefficients
(MFCC), wavelet transform based features, and features over power spectral
density. From the set of 40 features, 18 features were chosen using one of the
search algorithms (called wrapper based) for the feature selection. In this method
sequential forward selection search was used. For the classification a total of 20
feed forward Artificial Neural Networks (ANN) with two hidden layers, with 25
hidden neurons nodes in each layer were used. In output layer 4 neurons were used
for the purpose of two classification tasks at the same time, two for normal vs.
abnormal and two for good vs. bad. In [28] authors classify the heart sound
31
recording as normal or abnormal by extracting the morphological features of the
PCG signals. Several features are extracted from both temporal and spectral
domains, for example, the frequency characteristics of systolic and diastolic
segments and resampled wavelet envelop features and the classification is
performed using support vector machine. In [29] authors detected the abnormalities
in heart sounds from the short duration un-segmented phonocardiograms and
wavelet entropy at a wavelet scale of 1.7 and with a threshold of 7.8. Heart signal
was recorded for 5 seconds, and then wavelet coefficients were calculated.
Afterwards, wavelet energy and entropy was calculated and it was passed to the
criterion function which used a threshold to classify the signal as normal or
abnormal. In [30] authors focused on the automatic classification of
normal/abnormal heart sound recordings using state of the art convolutional neural
network. Power Spectral Density (PSD) features with a window of 150ms were
extracted. These spectrograms were fed to the network for the classification task.
Support vector machine, logistic regression and random forest were also used for
the classification and their results were compared. In [31] authors presented a
novel approach for the classification of normal/ abnormal heart sound recordings
by using temporal dynamics of the signal using Markov features along with other
statistical and frequency domain features. These features were trained over the
ensemble of artificial neural networks and gradient boosting trees.
S.
Paper Dataset Technique Score/Accuracy Sensitivity Specificity
No
Classifying Heart Sound
Recording Using Deep Physionet Without
1 88% 75% 100%
Convolutional Neural 2016 segmentation
Network
Abnormal heart sound Physionet Without
2 77% 95% 60%
detection 2016 segmentation
Morphological Determination With
of Pathalogical PCG Signal Physionet segmentation
3 81% 87% 75%
by Time and Frequency 2016 (using springer
Domain Analysis segmentation)
With
PCG Classification using Physionet Segmentation
4 79% 81%5 76%
Neural Network Approach 2016 (using springer
segmentation)
Automatic Classification of
Physionet Without
5 periodic Heart Sounds using 75% - -
2016 segmentation
CNN
Analysis of PCG Signal
using Quality Assessment
With
6 and Homomorphic filters for Pascal 90% 92% 89%
segmentation
localization and classification
of heart sound
32
In summary, in the light of the studied literature researchers have reported that the
segmented PCG Classification shows better results and performs well as compared
to the un-segmented PCG Classification. It is also important to have huge amount
of data for the training of CNN classifier, otherwise the prediction accuracy of the
trained model will degrade. Furthermore, for the training of CNN model equal
amount of data of all classes is necessary to avoid the biasness.
33
CHAPTER 4: PROPOSED METHODOLGY
Overview
This chapter presents the proposed methodology which starts from the data quality
assessment, signal preprocessing, peak identification, segmentation and concludes
on the final classification of the PCG (as normal or abnormal). The aim of this
proposed methodology is to improve the accuracy of the SI, S2 segmentation by
using the machine learning techniques. Furthermore, deep learning technique is
employed to improve the accuracy.
Evaluation of PCG signal is started by taking the discrete wavelet transform of the
signal using Daubechies wavelet. The signal is decomposed by implementing a
subband coding algorithm [32]. In subband coding, the signal is passed through
different filters. In the first, the signal is passed through low-pass filter and then
decimated using dyadic decomposition which provides the approximate
coefficients of the PCG signal. In the second, the signal is passed through this
high-pass filter then decimated through dyadic decomposition which provides
detailed coefficients by separating high frequency components. This process is
performed for the first time to get the 1st level approximate coefficients.
Afterwards, the same process is repeated on the obtained decomposed signals
which give the 2nd level approximate coefficients. In the proposed methodology,
these coefficients are used as evaluation criteria.
In the proposed method, the quality of the PCG signal is further investigated by
passing it through two fitness tests. In the first test, the root mean square of
successive differences of the entire PCG signal is obtained and in the second test,
the ratio of zero crossing in the signal to the length of signal is obtained. Fitness of
signal is determined against pre-defined threshold values. The signal is considered
suitable if it pass all the test criteria, else it is considered failed. This is shown in
Figure 4.1.The suitable signal is passed to the next phase in which signal is
prepared for further processing.
34
Figure 4.1: Classifying PCG signal as suitable or not suitable using criteria
4.2.1. Preprocessing
In preprocessing, PCG signal is first passed through butter-worth low pass filter
with the cutoff frequency of 400Hz, to remove the high frequency component.
Afterwards, this filtered signal is passed through the butter-worth high pass filter
with cutoff frequency of 25Hz. This filtered signal is then given to the spike
removal function, which removes the extra noise peaks and provides a de-spiked
signal. Subsequently, the envelope of resultant signal is obtained by using a Hilbert
35
envelope extraction method. Finally, the signal is normalized to smooth the signal
using a normalized function.
Multi-Level Thresholding
The employment of one perfect, global threshold value for the candidate peak
determination (for S1 and S2) is not possible. There are two main issues in the
selection of one specific threshold value. First, by selecting a low threshold value,
peaks in systole and diastole intervals are also selected along with S1 and S2
peaks. Second, by selecting a high threshold value, sometimes the misdetection of
S1 peaks happens. However the peaks in systole and diastole intervals are not
detected anymore. This is due to the fact that the signal with high „Signal to Noise
ratio‟ (SNR) performs well with low threshold value and signal with low SNR
works well with high threshold value.
36
which is centered on the beat, and all the remaining signal magnitude is set to zero
except the candidate peak. This is done to avoid the overlap between the two
peaks. The same process is applied on every peak and finally total peaks are
counted. If this count is greater than or less than the specific value, then for both
cases new threshold value will be introduced for the selection criteria of candidate
peaks and all the windowing process is repeated once again. After the final
calculation, selected peaks are obtained which then pass to the feature extraction
phase.
Figure 4.3: Multi-Level Threshold Algorithm, where “cp” denotes candidate peaks and
“sp” denotes selected peaks
37
trains the model to classify the peaks as S1 and S2. Both of these approaches are
discussed in the following subsections.
Feature Extraction
After peak detection, various features are extracted from the detected beats using a
sliding window. The part of the windowed signal having only one peak is given to
the feature extractor. Both time and time-frequency domain features are included
which provide useful information about the heart beats. These features are
calculated within the window and label is assigned to each window.
38
linear and non-linear distinctions. For linear data linear SVM is used and vice
versa.
On the basis of data type we classify SVM into two types. One is Hard SVM which
use for non-linear non separable data and Soft SVM for linearly separable data.
The most common method used for non-separable data is kernel method. These
kernels are used to map features space into higher space. This involves change in
feature representation. For the classification of S1 and S2, which is a binary
classification problem SVM is used with kernel trick to map the features into
higher dimensions using Radial Base Function (RBF) kernel.
CNN Model
Convolutional Neural Network (CNN) is the state of the art network. CNN is very
powerful and most influential neural network model which works on numerous
aspects of field. As its name indicates, it is a combination of some mathematical
operation called convolution and some bio inspired neural thing. But together they
both perform specular job.
CNN are simply a neural network which uses convolution operation instead of
simple multiplication. CNN consists of many layers, having one input and one
output layer, in the middle there are bunch of layers performing different tasks.
This bunch of portion is also termed as hidden layers. CNN typically consists of
pooling layers, normalization layers masked by some activation function Rectified
Linear Unit (RELU) or sigmoid.
In the proposed approach, one of the CNN model called Alexnet is used with
some modification in its input layers, hidden layers and output layers. AlexNet is
the name of a CNN model. It is designed by Alex Krizhevsky [33][34]. The
architecture of AlexNet consists of twenty five layers: first is input layer, five of
them are convolutional layers, 7 Relu layers, 3 max pool layers, 2 dropout layers, 3
fully connected layers, and in the last softmax and classifier, which are shown in
Figure 4.5.
In the proposed method, this Alexnet architecture is modified by changing its last 6
layers, as shown in Figure 4.6. Firstly last 6 layers of Alexnet are removed and
replaced by 3 new layers, having only one fully connected layer, softmax and
classifier. Spectrograms are given to the CNN model as training samples along
with the labels. Once the model is trained then unseen samples are given to the
model for testing. After the final decision of the classifiers (for the give sample as
S1 or S2), the final post-processing is performed.
40
Figure 4.5: AlexNet Architecture
41
Figure 4.6: Modified AlexNet Architecture
42
4.5. Post-Processing
After the classifier assigns the predicted states to the peaks as S1 and S2, these
states are given to the next module which assigns cardiac cycle labels to the
remaining part of the signal. The sequence of the cardiac cycle is S1, systole, S2
and diastole. To do this post-processing step is introduced.
In this step, algorithm uses the timing durations mention by the Schmidt to find the
mean and standard deviations for S1 and S2. These mean and standard deviations
values are used along with the assign labels provided by the classifier, to label the
PCG signal. Once S1 and S2 are labeled, algorithm measures the distance between
the states and assigns a systole label to the interval between every S1 and S2 and a
diastole label to the interval between S2 and S1. This applies to the whole chunk.
Resultant labels for all the states, in all the chunks are combined together.
Afterwards, these obtained states along with PCG signal is forwarded to the next
phase of the proposed methodology for the classification of the PCG signal as
normal or abnormal.
43
4.6. PCG Classification
For the classification of PCG signal as normal or abnormal, features are calculated
based on the location, position and distance between the assigned states. Different
features are calculated which are then used by the classifiers for the final decision.
Different classifiers were considered but based on the preliminary results Support
Vector Machine (SVM) was selected as the final classifier due to its better
performance. Feature extraction and classifiers for PCG signal is discussed in the
next section.
Feature Extraction
The assigned states from post-processing phase are given to the feature extractor
along with the original normalized resampled signal. Features are calculated based
on the intervals, mean and standard deviation ratios, absolute amplitude ratios, and
power averages of states, etc. List of features is given in the Table 2.
List of Features
44
20. Standard Deviation value of the absolute amplitude ratios between diastole period and s1
period in each heart beat
These features are extracted from each PCG signal and then passed to the classifier
which categorizes the PCG signal as normal or abnormal.
PCG Classifier
The proposed methodology is dealing with the two classes at a moment which
means that a binary classifier is required here. To do this job, Support Vector
Machine algorithm is used which is trained on the features provided by the above
mention feature extraction stage.
In the next chapter the results are discussed obtained by the implementation of the
above mentioned methodology
45
CHAPTER 5: IMPLEMENTATION AND PERFORMANCE EVALUATION
Overview
PCG datasets are publicly available for researchers which are helpful in the
assessment of the developed segmentation and classification methods. In this
study, PhysioNet/Computing in Cardiology 2016 Challenge dataset is employed
for the performance evaluation of the developed PCG segmentation technique. The
dataset comprise of more than 3000 PCG recordings, taken from both normal and
abnormal adults and children. The PhysioNet dataset consists of 2,575 normal and
665 abnormal PCG signals. The data is classified in three categories i.e. normal,
abnormal and uncertain. There are signals ranging from 5 seconds to 120 seconds
length. The uncertain part of the dataset is often discarded and is not used for
supervised classification. [35]
5.2. Signal Assessment
Implementation:
The PCG signal is first passed through the assessment module before further
processing so as to check whether the PCG signal is classifiable or not. As there
are three categories of signals in the PhysioNet dataset i.e. (i) normal signal, (ii)
abnormal and (iii) the uncertain which is destroyed due to the presence of noise.
Therefore, first we split them into two categories, i.e. certain/suitable/fit and
uncertain. To separate these two categories PCG signal is passed through two tests.
If it passes the fitting criteria it is selected as suitable/certain data else it is
categorized as uncertain.
46
square and calculate its ratio of zero crossing in the PCG signal to the signal
length. After determination of signal suitability, entire signal is divided into
smaller chunks. Different signals having different seconds or minute length
recording are now chunked into the same length for processing.
Results:
In this section, the results of signal assessment stage are presented. Figure 5.1 (a, b,
c) show few examples of original PCG signal which were passed through signal
assessment stage.
47
It is clear from the results that Signal “a” is suitable for further processing whereas
Signal “b” and “c” belong to the uncertain category of the signals as both signals
do not fulfill the quality assessment criteria. Moreover, all the suitable signals are
divided into equal-length of 6000 samples. Figure 5.2 shows the original signal
along with its three chunks of same length.
5.3. Segmentation
In this phase S1 and S2 events are localized in the PCG signal. The process of
segmentation is implemented in different steps as given in the following sub-
sections and results of each sub-module are illustrated and discussed.
48
A. Preprocessing
Implementation:
After obtaining the suitable (classifiable) signals different preprocessing
techniques are performed. First signal is passed through the Butterworth low pass
filter with cutoff frequency of 400Hz (order 2). Then the signal is given to the
Butterworth high pass filter with cutoff frequency of 25Hz (order 2). Furthermore,
the removal of spikes is carried out using a Schmidt spike removal function.
Followed by the extraction of envelope using Hilbert transform. Finally, the
resultant signal is normalized using simple mean and standard deviation formula.
Results:
The results of different preprocessing operations are illustrated in Figure 5.3.
Figure 5.3 (a) shows a smaller chunk of the original (classifiable) signal. Figure 5.3
(b) shows the signal obtained after filtering and spike removal operations. It is
clear that after preprocessing the signal became smooth and spikes have been
removed. Furthermore, Figure 5.3 (c) shows the obtained envelop of the
preprocessed signal which contains useful information regarding the S1 and S2
activities. Finally, normalized envelop of the processed signal is obtained as shown
in Figure 5.3 (d).
Figure 5.3: Preprocessing of PCG, (a) Original Signal (b) Filtered and De-spiked Signal (c) Envelope of Noise
Free Signal (d) Normalized Envelope of Noise Free Signal
49
B. True Peak Identification
Implementation:
In this stage, true peaks are extracted from the preprocessed signal. Firstly all
peaks are identified using peak finders which are called the candidate peaks for the
S1 and S2. Afterwards, a multi-level threshold is employed for the identification of
the true peaks. Using these thresholds true peaks are selected from the pool of
peaks which will be sent to the feature extractor to classify them as S1 and S2
based on their features.
Results:
The noise-free PCG signal chunk and its normalized Homomorphic envelop are
shown in Figure 5.4 (a) and 5.4 (b) respectively. The results of the peak finder
stage illustrating the candidate peaks is given in Figure 5.4 (c).
50
From this processed signal candidate peaks based on initial threshold are obtained,
as shown in Figure 5.4 (d). Afterwards, true peaks are detected using the
developed multi-level threshold criteria and false peaks are eliminated, as
illustrated in Figure 5.4 (e).
C. Segmentation (S1 and S2)
For the S1 and S2 peak classification two different algorithms were proposed in
this study. First approach was based on the features using the Support Vector
Machine. Second approach was employed spectrograms of peaks and
convolutional neural network. The implementation of both methods and their
results are discussed in the following.
Implementation:
For each detected peak, a small-window segment encompassing the detected peak
is obtained. The window-size is chosen such that each window segment consists of
only one true peak and other local peaks are cleaned (if they are present in the
window segment). For each window segment containing true peak features are
extracted (refer to Table 1). These features are fed to SVM classifier for training.
After training SVM is enabled to classify the peaks as S1 and S2.
Results:
In this section, the results of the segmentation using statistical features and SVM
classifier are presented and discussed. Figure 5.5 illustrate the peak identification
results where the true peaks are labeled based on the SVM training. The
performance of the developed segmentation/ segmentation algorithm is further
quantified in terms of accuracy. Accuracy is the degree of performance which
confirms the algorithm results are correct and close to the standard. According to
the obtained result given in Table 3, the segmentation accuracy of SVM with
single-threshold method is 81% which improves to 87.57% with the incorporation
of the developed multi-level threshold segmentation method. Moreover, the
developed segmentation method was also implanted using Artificial Neural
Network (ANN). However, segmentation accuracy of SVM classifier is
comparatively better than ANN.
51
Figure 5.5: Classification of S1 and S2
SVM ANN
One threshold 81.0 79.33
Multi-Threshold 87.57 82.01
Table 3: Comparison results of single and multi-level threshold
Implementation:
Similarly, the classification of peaks is also performed using spectrogram of
obtained true peaks. A similar windowing procedure is applied to obtain the true
peak, however instead of its feature calculation, its spectrogram are obtained using
Short Term Fourier Transform. These spectrograms are fed as input to the
convolutional neural network which learn features in 100 iterations and train its
52
model. Final testing of model is carried on unseen samples of spectrogram which
classify them as S1 and S2.
Results:
Spectrograms of some of captured S1 and S2 peaks are shown in Figure 5.6 and
5.7 respectively. Different performance metrics (including accuracy, sensitivity
and specificity) are calculated for the evaluation of developed spectrogram based
CNN segmentation algorithm with statistical features based classification methods
(i.e. SVM and ANN). The comparison results are shown in Table 4. It is clear from
the results that spectrogram approach is useful in peak segmentation and
outperforms statistical feature based approach. In addition, the spectrogram and
CNN combination gives an overall segmentation accuracy of 91.20 % as compared
to SVM and ANN classifier.
53
Approach Classifier Accuracy Sensitivity Specificity
Spectrogram CNN 91.20 94.05 88.53
Statistical Features SVM 87.57 92.08 83.08
Statistical Features ANN 82.01 87.33 76.93
D. Post Processing
After the assignment of S1 and S2 peak by the classifier, assessment of its result is
required. This means that to examine whether the assigned states are correct or not.
It happens sometimes that classifier assigns a wrong state to the detected peak, i.e.
assign S1 to S2 or S2 to S1. To check this post-processing step is required. In this
algorithm search for a sequence as S1 S2 S1 or S2 S1 S2 is carried out. Once this
sequence is found, algorithm assigns systole state between every S1 and S2 and
diastole between every S2 and S1. This will complete one cycle as S1, systole, S2
and diastole which are shown in the Figure 5.8.
54
5.4. Classification of PCG signals (Normal and Abnormal)
Implementation:
The state sequences (i.e. S1, Systole, S2, diastole) obtained after post-processing
are forwarded to the final stage in which features are extracted based on the
intervals between the states, their ratios, mean, standard deviation, amplitudes and
other power energy features. These calculated features are given to the final
classifier which classifies the PCG signal as normal and abnormal. Classifier
employed for this purpose is Support Vector Machine (SVM) which performs the
binary classification.
C 29 14 15
D 53 26 27
F 110 55 55
55
Results:
Firstly, PCG signal segmentation was performed using the developed multi-level
threshold, statistical features and SVM based segmentation approach. Afterwards,
PCG signal classification is performed using different classifiers and the results of
the performance comparison are shown in Table 6. It is clear that SVM and ANN
perform better as compared to KNN. Nonetheless, the performance of SVM is
fairly consistent on each sub-dataset and an overall classification accuracy of
86.89% which supports the suitability of SVM for PCG signal classification.
56
S.No Paper Dataset Technique Score/Accuracy
Physionet SVM without
1 Proposed Methodology I 86.89
2016 spectrogram
Physionet SVM with
2 Proposed Methodology II 93.33
2016 spectrogram
Classifying Heart Sound
Recording Using Deep Physionet
3 CNN 88%
Convolutional Neural 2016
Network
Morphological
Determination of
Physionet
4 Pathalogical PCG Signal SVM 81%
2016
by Time and Frequency
Domain Analysis
57
CHAPTER 6: CONCLUSION AND FUTURE WORK
Overview
This chapter covers the final conclusion regarding the development and the
implementation of proposed methodology.
6.1. Conclusion
Human heart pumps blood to the all organs of the body. It takes the deoxygenated
blood, cleans it and pumps out the oxygenated blood. This whole cycle can be
divided into four events S1, systole, S2, and diastole. Among the other modalities
of monitoring heart condition, phonocardiograms (PCGs) are widely being used for
the assessment of the cardiovascular diseases (CVDs). These PCGs are obtained
using the digital stethoscope which records the activities of the heart in the form of
sound waves. These sound waves when played can be heard as “lub” and “dub”.
These sounds follow the sequence as lub dub lub…. or dub lub dub ….
Cardiologists monitor the condition of heart using these sounds. In urban areas
where there is lack of expert cardiologist or even in some areas where there is no
availability of expert cardiologist, expert systems are needed. To cope with this
situation, this research work proposed a smart automated method for the
assessment of phonocardiogram using the machine learning techniques. For the
training and testing of the proposed algorithm Physionet challenge dataset 2016
was used. The method was tested and verified using the mentioned dataset.
In the proposed method the Phonocardiogram signal is first tested for its quality
assessment. When found suitable it is further send to the next phase, or if it fails it
is rejected by the system to be further processed. The reason of rejection can be
due to presence of high noise contents in the signal. After the quality assessment,
signal is preprocessed. Pre-processing is performed to further clean the signal and
make it suitable for further processing. Preprocessing involves filtering of
phonocardiogram signal using high and low pass filters, removal of extra spikes if
present, extraction of envelop of the de-spiked phonocardiogram, and finally
normalizing this envelop. After preprocessing, next is the peak detection phase. In
this phase peaks are localized first using single threshold method and secondly by
the proposed multi-threshold method which shows improved results for selecting
the candidate peaks thus making the first contribution of the proposed research
work. Segmentation of peaks is important to analyze the state of the heart. The
sequence of S1, systole, S2, and diastole are followed by the healthy heart. To find
out the sequence we need to exactly find out the location of S1 and S2. So for this,
these peaks are given to the feature extractor. Features of these peaks are extracted
58
and passed to the trained classifier for labeling them as S1 and S2. The classifier
used for this purpose is Support Vector Machine (SVM). Many researchers used
SVM for the classification of S1 and S2. In this research another method is
proposed for segmentation of the S1 and S2. Spectrograms of the selected peaks
are calculated and the classifier Convolutional Neural Network (CNN) is used to
extract features and to classify them as S1 and S2. The result of SVM and CNN are
also compared with the Artificial Neural Network (ANN). The proposed method
using CNN performed better as compared to the the previous method and thus
making the second contribution for this research work. After getting the location of
S1 and S2 post processing is applied which assign systole and diastole states to the
PCG signal. The signal area between S1 and S2 is labeled as systole and the signal
area is labeled as diastole. These labeled signals are given to the next feature
extractor where features are calculated from the whole signal and thus given to the
next classifier which is again SVM for the classification of PCG signal as normal
and abnormal. The results of classification is compared with the K-Nearest
Neighbor (KNN) and the Artificial Neural Network (ANN) .The result for both
segmentation and classification shows better results from the previous research
works.
6.2. Future Work
59
References
[1] G. Buckberg, N. Nanda, C. Nguyen, and M. Kocica, “What Is the Heart? Anatomy, Function,
Pathophysiology, and Misconceptions,” J. Cardiovasc. Dev. Dis., vol. 5, no. 2, p. 33, 2018.
[2] D. Kelley, “Heart Disease: Causes, Prevention, and Current Research,” JCCC Honor. J., vol. 5, no. 2, p. 1,
2014.
[3] E. Nason, “An overview of cardiovascular disease and research,” Int. Consort. Cardiovasc. Dis., vol. 1, pp.
1–10, 2007.
[4] H. Mehrtash, R. Laing, and V. J. Wirtz, “Comparative analysis of essential medicines for cardiovascular
diseases in countries of the WHO Eastern Mediterranean Region,” East. Mediterr. Heal. J., vol. 24, no. 5,
pp. 427–434, 2018.
[5] S. Tjiharjadi and A. Fajar, “Human heart rate detection application,” Proc. - 2017 Int. Conf. Soft Comput.
Intell. Syst. Inf. Technol. Build. Intell. Through IOT Big Data, ICSIIT 2017, vol. 2018-Janua, pp. 167–172,
2017.
[6] M. W. Arnaudin and J. J. Mintzes, “Students‟ alternative conceptions of the human circulatory system: A
cross‐age study,” Sci. Educ., vol. 69, no. 5, pp. 721–733, 1985.
[7] W. L. Olszewski, “The lymphatic system in body homeostasis: physiological conditions.,” Lymphat. Res.
Biol., vol. 1, no. 1, 2003.
[8] A. J. Weinhaus and K. P. Roberts, “Anatomy of the human heart,” Handb. Card. Anatomy, Physiol. Devices
Second Ed., pp. 59–85, 2005.
[9] Q. Mubarak, M. U. Akram, A. Shaukat, and A. Ramazan, “Quality Assessment and Classification of Heart
Sounds Using PCG Signals,” no. February, pp. 1–11, 2018.
[10] D. B. Springer, L. Tarassenko, and G. D. Clifford, “Logistic regression-HSMM-based heart sound
segmentation,” IEEE Trans. Biomed. Eng., vol. 63, no. 4, pp. 822–832, 2016.
[11] S. Swarup and A. N. Makaryus, “Digital stethoscope: Technology update,” Med. Devices Evid. Res., vol. 11,
pp. 29–36, 2018.
[12] M. P. R. M, D. M. Meshram, N. Dewangan, and D. R. Kumar, “Implementation of Adaptive Algorithm for
PCG Signal Denoising,” Ijireeice, vol. 3, no. 4, pp. 33–42, 2015.
[13] P. Bentley and Y. Deng, “A Robust Heart Sound Segmentation and Classification Algorithm using Wavelet
Decomposition and Spectrogram,” Ext. Abstr. First PASCAL Hear. Chall. Work. held after AISTATS, 2012.
[14] J. Pedrosa, A. Castro, and T. T. V. Vinhoza, “Automatic heart sound segmentation and murmur detection in
pediatric phonocardiograms,” 2014 36th Annu. Int. Conf. IEEE Eng. Med. Biol. Soc. EMBC 2014, no.
December 2015, pp. 2294–2297, 2014.
[15] M. Azad and F. Khaled, “An Efficient Way to Convert 1D Signal to 2D Digital Image Using Energy
Values,” pp. 1–40, 2018.
[16] E. F. Gomes, P. J. Bentley, M. Coimbra, E. Pereira, and Y. Deng, “Classifying heart sounds: Approaches to
the PASCAL challenge,” Heal. 2013 - Proc. Int. Conf. Heal. Informatics, pp. 337–340, 2013.
[17] E. F. Gomes, A. M. Jorge, and P. J. Azevedo, “Classifying heart sounds using multiresolution time series
motifs: An exploratory study,” ACM Int. Conf. Proceeding Ser., pp. 23–30, 2013.
[18] L. N. Sharma, “Heart sound segmentation usingmultiscale squared energy envelope,” ACM Int. Conf.
Proceeding Ser., vol. Part F1319, pp. 43–48, 2017.
[19] F. Chakir, A. Jilbab, C. Nacir, A. Hammouch, and A. Hajjam El Hassani, “Detection and identification
algorithm of the S1 and S2 heart sounds,” Proc. 2016 Int. Conf. Electr. Inf. Technol. ICEIT 2016, pp. 418–
420, 2016.
[20] B. Bozkurt, I. Germanakis, and Y. Stylianou, “A study of time-frequency features for CNN-based automatic
heart sound classification for pathology detection,” Comput. Biol. Med., vol. 100, pp. 132–143, 2018.
[21] K. A. Babu, B. Ramkumar, and M. S. Manikandan, “S1 and S2 heart sound segmentation using variational
mode decomposition,” IEEE Reg. 10 Annu. Int. Conf. Proceedings/TENCON, vol. 2017-Decem, pp. 1629–
1634, 2017.
[22] I. Grzegorczyk et al., “PCG classification using a neural network approach,” Comput. Cardiol. (2010)., vol.
43, pp. 1129–1132, 2016.
[23] J. J. G. Ortiz, C. P. Phoo, and J. Wiens, “Heart sound classification based on temporal alignment
techniques,” Comput. Cardiol. (2010)., vol. 43, pp. 589–592, 2016.
[24] J. Rubin, R. Abreu, A. Ganguli, S. Nelaturi, I. Matei, and K. Sricharan, “Classifying heart sound recordings
using deep convolutional neural networks and mel-frequency cepstral coefficients,” Comput. Cardiol.
(2010)., vol. 43, pp. 813–816, 2016.
60
[25] J. M. Keller, M. R. Gray, and J. A. Givens, “A fuzzy k-{NN} neighbor algorithm,” IEEE Trans. Syst. Man
Cybern., vol. SMC-15, no. 4, pp. 580–585, 1985.
[26] S. K. Randhawa and M. Singh, “Classification of Heart Sound Signals Using Multi-modal Features,”
Procedia Comput. Sci., vol. 58, pp. 165–171, 2015.
[27] C. Potes, S. Parvaneh, A. Rahman, and B. Conroy, “Ensemble of Feature:based and Deep learning:based
Classifiers for Detection of Abnormal Heart Sounds,” 2016 Comput. Cardiol. Conf., vol. 43, 2017.
[28] M. A. Goda and P. Hajas, “Morphological determination of pathological PCG signals by time and frequency
domain analysis,” Comput. Cardiol. (2010)., vol. 43, pp. 1133–1136, 2016.
[29] P. Langley and A. Murray, “Abnormal heart sounds detected from short duration unsegmented
phonocardiograms by wavelet entropy,” Comput. Cardiol. (2010)., vol. 43, pp. 545–548, 2016.
[30] G. Clifford et al., “Classification of Normal/Abnormal Heart Sound Recordings: the PhysioNet/Computing
in Cardiology Challenge 2016,” 2016 Comput. Cardiol. Conf., vol. 43, pp. 3–6, 2017.
[31] S. Vernekar, S. Nair, D. Vijaysenan, and R. Ranjan, “A novel approach for classification of
normal/abnormal phonocardiogram recordings using temporal signal analysis and machine learning,”
Comput. Cardiol. (2010)., vol. 43, pp. 1141–1144, 2016.
[32] D. Popov, A. Gapochkin, and A. Nekrasov, “An algorithm of daubechieswavelet transform in the final field
when processing speech signals,” Electron., vol. 7, no. 7, pp. 1–10, 2018.
[33] H. C. Shin et al., “Deep Convolutional Neural Networks for Computer-Aided Detection: CNN
Architectures, Dataset Characteristics and Transfer Learning,” IEEE Trans. Med. Imaging, vol. 35, no. 5, pp.
1285–1298, 2016.
[34] X. Han, Y. Zhong, L. Cao, and L. Zhang, “Pre-trained alexnet architecture with pyramid pooling and
supervision for high spatial resolution remote sensing image scene classification,” Remote Sens., vol. 9, no.
8, 2017.
[35] G. D. Clifford et al., “The PhysioNet/Computing in Cardiology Challenge 2015: Reducing false arrhythmia
alarms in the ICU,” Comput. Cardiol. (2010)., vol. 42, pp. 273–276, 2015.
61