Declaration I hereby declare that this project report titled “ECG INTELLIGENT DECISION MAKER” was executed as per the course requirement for the Bachelor’s Degree of Technology in The Open University of Sri Lanka. No part of this has been submitted by me or any other candidate for a Degree or a Diploma in any other University or institution before. It is my own work. Date: 26/07/2011 i
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
DeclarationI hereby declare that this project report titled “ECG INTELLIGENT DECISION
MAKER” was executed as per the course requirement for the Bachelor’s Degree of
Technology in The Open University of Sri Lanka. No part of this has been
submitted by me or any other candidate for a Degree or a Diploma in any other
University or institution before. It is my own work.
Date: 26/07/2011
i
AbstractAn Electrocardiogram is a bioelectric signal which record heart electrical activity
versus time. It is an important diagnostic tool for heart functioning. The
interpretation of ECG signal is an application of pattern recognition. The technique
used in this pattern recognition comprises: signal pre-processing, feature extraction,
neural network for classification.
This project consists with two parts because this is a group project.
The first part is an acquisition of ECG data from patients & record these data in the
application develop by C#.net & SQL Server. It does develop by My Colleague.
Second Part is Analysis the ECG record & gets the diagnosis result from trained
ANN. This report describes about the second part.
In this project wavelet transform and neural network toolbox are used from Matlab
environment. The processed signal is used from PhysioNet’s databases which were
developed for research in cardio electrophysiology.
An automated system for arrhythmia classification is developed. The system can
classify 3 different types of arrhythmia with an accuracy of 99.08%. These are
normal sinus rhythm, Right bundle branch block, left bundle branch block. Before
testing, the proposed structures are trained by back propagation algorithm. The
processed signal is used from MIT- Arrhythmia Database which is available in
PhysioNet’s database.
This part interconnects with main application & SQL server Database.
ii
Acknowledgments I would like to express my gratitude towards all the people who have contributed
their precious time and effort to help me. Without whom it would not have been
possible for me to understand and complete the project.
I would like to thank our Project Supervisor Eng. G.Anthonys, for him guidance,
support, motivation and encouragement throughout the period this work was carried
out. Him readiness for consultation at all times, him educative comments, him
concern and assistance even with practical things have been invaluable.
Last but not least, my utmost gratitude towards my family and loved ones for their
continuous support and encouragement.
Thank you all !!
iii
Table of ContentsDeclaration...................................................................................................................i
5.1.1 Phase one – Training, Testing, Validation for pre-recorded data..........................33
5.1.2 Phase two – Testing Real Time Data..............................................................35
5.2 Specificity and Sensitivity 35
5.3 Discussions 36
5.3.1 Review of Theory & Approach.............................................................................36
5.3.2 Interpretation of Result..........................................................................................37
List of FiguresFigure 1.1-Overall project scope chart.........................................................................3
v
Figure 2.1-Charcteristics of ECG.................................................................................5Figure 3.1-Flow Diagram of the system.....................................................................14Figure 3.2-MIT-BIH Database...................................................................................14Figure 3.3-The MIT-BIH Arrhythmia Database Records..........................................15Figure 3.4-Algorithm for Base line drift....................................................................16Figure 3.5-Algorithm for Noise removing.................................................................17Figure 3.6-Samples of Beat........................................................................................20Figure 3.7-Feature Extraction Algorithm...................................................................23Figure 3.8-Flow Diagram of ANN.............................................................................24Figure 4.1-ECG Prerecorded Data.............................................................................29Figure 4.2-DW Toolbox use for Denoise...................................................................31Figure 4.3-Matlab GUI feature Extraction.................................................................31Figure 4.4-Beat Samples a) Normal ,b) LBBB ,c) RBBB.........................................33Figure 4.5-Train ANN................................................................................................33Figure 4.6-Real time ECG Diagnosis GUI.................................................................33Figure 5.1-Performance of ANN................................................................................34Figure 5.2-Training State of ANN.............................................................................35Figure 5.3-Confusion matrix of ANN........................................................................35Figure 5.4-Specificity & Sensitivity of ANN.............................................................37
List of Tables
vi
Table 2.1-Duration values & intervals for normal arrhythmia.....................................6Table 2.2-Comparison of Different Feature Extraction Techniques..........................12Table 3.1-ECG Wave Time Domain Feature Extraction...........................................18Table 3.2-Input Neurons of the ANN.........................................................................22Table 3.3-The output target vector of ANN...............................................................23Table 4.1-Use Toolboxes...........................................................................................25Table 4.2-ECG Records from MIT/BIH....................................................................26Table 4.3-Functions of Main Matlab GUI.................................................................29Table 5.1-Performance comparison of proposed Multi-ANN classifier....................35
List of Abbreviation
vii
ANN - Artificial Neural Network
BP - Back Propagation
DWT - Discreet Wavelet
ECG - Electro Cardio Graph
FNN - Fuzzy Neural Network
GUI - Graphical User Interface
LBBB - Left Bundle Branch Block
LVD - Left Ventricular Dimension
LVQ - Learning Vector Quantization
ML - Multi Layer
MLP - Multi Layer Perception
NN - Neural Network
NSR - Normal Sinus Rhythm
PB - Paced Beat
PCA - Principal Component Analysis
RBBB - Right Bundle Branch Block
SOM - Self Organizing Map
SVW - Slope Vector Waveform
viii
ix
ECG Intelligent Decision Maker
Chapter 1 - Introduction
1.1 Project Background
This project is a group project with two main parts. First part includes ECG gaining
hardware. It can get the ECG signal from the patient & analyze the signal. This part
has application develop by SQL SERVER & C#.net. Second part includes Intelligent
ECG analyzing system. This part consists with Signal processing techniques and
artificial neural network (ANN).In this part ANN train first using online databases.
After test the ANN using real time data get from the ECG hardware.
Our overall system will be used to implement a real time processing, intelligent, cost
effective, and easy-to-use ECG diagnostic system. It also gives suggestion to improve
the experiments and use of remote diagnostic medical systems for diagnosing at
homes in the future.
1.2 Problem Statement
Technological innovation has progressed at such an accelerated pace that it is has
permeated almost every facet of our lives. This is especially true in the field medicine
and delivery of health care services. As a result, AI technologies attached to the
biomedical experiments with better investing of more advanced technologies for best
monitoring of patient.
In Sri Lanka, cardiac disorders are common among the people but technology has not
improved with cardiac signal diagnosis technologies. Still Bioinformatics’
technologies and AI are rarely used for ECG signal diagnosis.
So Personnel Intelligent ECG Analyzing System is timely required with computerized
world to quick and accurate predictions which could be help to cardiologist to prevent
death amount by cardiac problems. This project idea is for making ECG Advisor
Intelligent software by using Signal Processing, Feature extraction, Neural
Networking, fuzzy logic and DB management technologies.
1
ECG Intelligent Decision Maker
1.3 Project Aim and Objectives
Aim
The aim of this overall project is to create ECG Signal analyzing system for diagnosis
decision making regarding to their health state without involving a doctor.
Objectives
Implementation a suitable method for the ECG features extraction.
Analyzing suitable features for improving the performance of diagnosis.
Build the best c architecture for the ECG signal classification.
2
ECG Intelligent Decision Maker
1.4 Project Description
The overall project has two main parts. Real time ECG Acquisition & Diagnosis the wave in
intelligently. Figure 1.1 shows the overall project scope.
Figure 1.1-Overall project scope chart
3
ECG Intelligent Decision Maker
1.5 Organization of the Report
In the second chapter I construe the basic principles of electrocardiogram
(ECG) which includes ECG Signal & Characteristics, Heart problems in this
project, literature survey of Feature Extraction Methods & researches done.
In the third chapter we discuss the detail design of the project.
The fourth chapter deals with implementation & testing of the design
In the last chapter I discuss the Results of the implementation & discussion,
conclusion and future works of the project.
4
ECG Intelligent Decision Maker
Chapter 2 - Project Literature Survey
2.1 Review of Theory
2.1.1 ECG Signal & Characteristics
Understanding the Electrocardiography and its characteristics is one of the most
important aspects during the development of this project. Electrocardiography or ECG
in short, is the most commonly used and direct method for assessing abnormalities of
cardiac rhythm. As shown in Figure 1 below, ECG tracing of the cardiac cycle
typically consists of a P wave, a QRS complex, and a T wave .
Figure 2.2-Charcteristics of ECG
ECG provides us with two types of information. First is the duration of electrical
wave crossing the heart, which is measured by measuring the time intervals on the
ECG. This will determined the regularity of the electrical activity, if it is normal,
slow, fast or irregular. Second is the amount of the electrical activity passing through
the heart muscle and is represented by the principal components (peaks and valleys)
of the ECG. Arrhythmia usually can be analyzed based on the change of the rhythm or
frequencies of the heartbeat. The normal values for duration of ECG waves and
intervals in adults were presented in the Table 2.1.
5
ECG Intelligent Decision Maker
Table 2.1-Duration values & intervals for normal arrhythmia
ECG Wave
Type
Description Time and
Amplitudes
P wave During normal atrial depolarization, the main
electrical vector is directed from the SA node
towards the AV node, and spreads from the right
atrium to the left atrium. This turns into the P wave
on the ECG.
0.25mV
0.08S
QRS
complex
The QRS complex is a recording of a single
heartbeat on the ECG that corresponds to the
depolarization of the right and left ventricles.
1.60mV
0.08S- 0.12S
PR interval The PR interval is measured from the beginning of
the P wave to the beginning of the QRS complex.
0. 12S to 0.2S
ST segment The ST segment connects the QRS complex and the
T wave.
0.08S to 0.12S
ST interval This represent the duration of J point to T on set 0.32S
T wave The T wave represents the repolarization (or
recovery) of the ventricles.
0.1mV to 0.5mV
0.16S
Q wave 0.4mV
QT interval The QT interval is measured from the beginning of
the QRS complex to the end of the T wave.
0.3S to 0.43S.
2.1.2 Heart problems in this project
Changes from the normal morphology of the electrocardiogram can be used to
diagnose many different types of arrhythmia or conduction problems. The
electrocardiogram can be split into different segments and intervals, which relate
directly to phases of cardiac conduction; limits can be set on these to diagnose