analysis of ecg signal using self organising map

28
1 CHAPTER 1 INTRODUCTION 1.1 INTRODUCTION Electrocardiogram (ECG) is a nearly periodic signal that reflects the activity of the heart. A lot of information on the normal and pathological physiology of heart can be obtained from ECG. However, the ECG signals being non-stationary in nature, it is very difficult to visually analyze them. Thus the need is there for computer based methods for ECG signal Analysis. A lot of work has been done in the field of ECG signal Analysis using various approaches and methods. The basic principle of all the methods however involves transformation of ECG signal using different transformation techniques including Fourier Transform, Hilbert Transform, Wavelet transform etc. Physiological signals like ECG are considered to be quasi-periodic in nature. They are of finite duration and non stationary. Hence, a technique like Fourier series (based on sinusoids of infinite duration) is inefficient for ECG. On the other hand, wavelet, which is a very recent addition in this field of research, provides a powerful tool for extracting information from such signals. There has been use of both Continuous Wavelet Transform (CWT) as well as Discrete Wavelet Transform (DWT). However CWT has some inherent advantages over DWT. Unlike DWT, there is no dyadic frequency jump in CWT. Moreover, high resolution in time-frequency domain is achieved in CWT. Transmission of ECG often results in the corruption of signal due to introduction of noise. [5] Various factors responsible for introduction of noise include poor channel conditions, Baseline wander (caused by respiration), 50 or 60 Hz power line interference etc. Analyzing such a noisy signal is bound to give erroneous results. Thus the signal is first made free of noise, a process called denoising or rather we may call it enhancement. A number of methods have been incorporated for enhancement ECG signal.

Upload: mahesh-soni

Post on 12-Apr-2017

118 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

1

CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION

Electrocardiogram (ECG) is a nearly periodic signal that reflects the activity of the heart.

A lot of information on the normal and pathological physiology of heart can be obtained

from ECG. However, the ECG signals being non-stationary in nature, it is very difficult to

visually analyze them. Thus the need is there for computer based methods for ECG signal

Analysis.

A lot of work has been done in the field of ECG signal Analysis using various

approaches and methods. The basic principle of all the methods however involves

transformation of ECG signal using different transformation techniques including Fourier

Transform, Hilbert Transform, Wavelet transform etc. Physiological signals like ECG are

considered to be quasi-periodic in nature. They are of finite duration and non stationary.

Hence, a technique like Fourier series (based on sinusoids of infinite duration) is inefficient

for ECG. On the other hand, wavelet, which is a very recent addition in this field of research,

provides a powerful tool for extracting information from such signals. There has been use of

both Continuous Wavelet Transform (CWT) as well as Discrete Wavelet Transform (DWT).

However CWT has some inherent advantages over DWT. Unlike DWT, there is no dyadic

frequency jump in CWT. Moreover, high resolution in time-frequency domain is achieved in

CWT.

Transmission of ECG often results in the corruption of signal due to introduction of noise. [5]

Various factors responsible for introduction of noise include poor channel conditions,

Baseline wander (caused by respiration), 50 or 60 Hz power line interference etc. Analyzing

such a noisy signal is bound to give erroneous results. Thus the signal is first made free of

noise, a process called denoising or rather we may call it enhancement. A number of methods

have been incorporated for enhancement ECG signal.

Page 2: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

2

These include use of filter banks, neural network, adaptive filtering etc. Empirical Mod

Decomposition is a recent development which provides a powerful tool for decomposing a

signal into a finite number of IMFs (Intrinsic Mode Functions). Empirical Mode

Decomposition (EMD) has been used in a number of literature for R-peak detection as well

as enhancement.

The process incorporated by us can be shown by the following block diagram:

Enhancement

ECG Signal

using EMD

R peak Detection R peaks

using CWT

Fig.1.1 Block diagram of the proposed method.

1.2 MOTIVATION

ECG reflects the state of cardiac heart and hence is like a pointer to the health conditions

of a human being. ECG, if properly analyzed, can provide us information regarding various

diseases related to heart. However, ECG being a non-stationary signal, the irregularities may

not be periodic and may show up at different intervals. Clinical observation of ECG can

hence take long hours and can be very tedious. Moreover, visual analysis cannot be relied

upon. This calls for computer-based techniques for ECG analysis. Various contributions have

been made in literature regarding beat detection and classification of ECG . Most of these use

frequency or time domain representation of ECG signals. But the major problem faced by the

coders is the vast variations in the morphologies of ECG signals. Moreover, we have to

consider the time constraints as well. Thus our basic objective is to come up with a simple

method having less computational time without compromising with the efficiency.

Page 3: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

3

This objective has motivated us to search and experiment with various techniques. We have

implemented enhancement using Empirical Mode Decomposition for its efficiency and we

have done the R peak detection using Continuous Wavelet Transform for its efficiency and

simplicity. Overall we have tried to minimize the computational time and maximize the

efficiency.

1.3 SUMMARY OF THESIS

The report is organized into the following chapters:

Chapter 1 gives an introduction regarding the project and the various methods used in ECG

signal analysis.

Chapter 2 is dedicated to description of ECG signal and the other biomedical aspects.

Chapter 3 describes the process of enhancement of ECG signal by the use of Empirical

Mode Decomposition method.

Chapter 4 describes the ECG signal using self organizing map.

Chapter 5 gives a conclusion and lays out some ideas for future work.

Page 4: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

4

CHAPTER 2

THEORETICAL ASPECTS OF ECG

2.1 HEART

The heart, located in the mediastinum, is the central structure of the cardiovascular

system. It is protected by the bony structures of the sternum anteriorly, the spinal column

posteriorly, and the rib cage.

Sinoatrial (SA) node is the dominant pacemaker of the heart, located in upper portion of

right atrium. It has an intrinsic rate of 60–100 bpm.

Atrioventricular(AV) node is a part of AV junctional tissue. It slows conduction, creating a

slight delay before impulses reach ventricles. It has an intrinsic rate of 40–60 bpm [10].

Table 1.1: Electrophysiology

Action Effect

Depolarization Shifting of electrolytes across the cell

membrane causes change in electric charge

of the cell. It results in contraction.

Repolarization Internal negative charge is restored and the

cells return to their resting state.

Page 5: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

5

Table 1.2: Conduction System Structure and Functions

Structure Function and Location

Sinoatrial (SA) Dominant pacemaker of the heart, located

Node In

upper portion of right atrium. Intrinsic rate

60–100 bpm.

Internodal Direct electrical impulses between SA and

Pathways AV

nodes.

Atrioventricular Part of AV junctional tissue. Slows

(AV) node conduction, creating a slight delay before

impulses reach ventricles. Intrinsic rate

40–60 bpm.

Bundle of His Transmits impulses to bundle branches.

Located below AV node.

Left bundle Conducts impulses that lead to left

Branch ventricle.

Right bundle Conducts impulses that lead to right

Branch ventricle.

Purkinje system Network of fibers that spreads impulses

rapidly throughout ventricular walls.

Located at terminals of bundle branches.

Page 6: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

The Heart: Phases

There are two phases of the cardiac cycle

Systole: The ventricles are full of blood and begin to contract. The mitral and tricuspid

valves close (between atria and ventricles). Blood is ejected through the pulmonic and aortic

valves.

Diastole: Blood flows into the at

ventricles.

2.2 ELECTROCARDIOGRAM (ECG)

Each cardiac cell is surrounded by and filled with solutions of Sodium (Na+),

Potassium (K+), and Calcium (Ca++). The interior of the cell membrane is

negative with respect to outside during resting conditions. When an electric impulse is

generated in the heart, the interior part becomes positive with respect to the exterior.

SA Node

Bundle of His

Left Bundle

Branch

Fig.2.1 Conduction System structure

phases of the cardiac cycle.

: The ventricles are full of blood and begin to contract. The mitral and tricuspid

valves close (between atria and ventricles). Blood is ejected through the pulmonic and aortic

: Blood flows into the atria and through the open mitral and tricuspid valves into

ELECTROCARDIOGRAM (ECG)

Each cardiac cell is surrounded by and filled with solutions of Sodium (Na+),

Potassium (K+), and Calcium (Ca++). The interior of the cell membrane is

negative with respect to outside during resting conditions. When an electric impulse is

generated in the heart, the interior part becomes positive with respect to the exterior.

Right Bundle

Branch

Purkinje Fibers

6

: The ventricles are full of blood and begin to contract. The mitral and tricuspid

valves close (between atria and ventricles). Blood is ejected through the pulmonic and aortic

ria and through the open mitral and tricuspid valves into the

Each cardiac cell is surrounded by and filled with solutions of Sodium (Na+),

Potassium (K+), and Calcium (Ca++). The interior of the cell membrane is considered to be

negative with respect to outside during resting conditions. When an electric impulse is

generated in the heart, the interior part becomes positive with respect to the exterior.

Page 7: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

This change of polarity is called depolarization. After

back to its original state. This phenomenon is called repolarization. The ECG records the

electrical signal of the heart as the muscle cells depolarize (contract) and repolarize.

A normal ECG signal is shown in Fig.4.

Fig.2.3 Normal ECG Signal and its various components

This change of polarity is called depolarization. After depolarization the cell comes

back to its original state. This phenomenon is called repolarization. The ECG records the

electrical signal of the heart as the muscle cells depolarize (contract) and repolarize.

A normal ECG signal is shown in Fig.4.

Fig.2.2 The various views of ECG

Normal ECG Signal and its various components

7

depolarization the cell comes

back to its original state. This phenomenon is called repolarization. The ECG records the

electrical signal of the heart as the muscle cells depolarize (contract) and repolarize.

Page 8: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

8

The impulses of the heart are recorded as waves called P-QRS-T deflections.The following is

the description and significance of each deflection and segment.

P wave indicates atrial depolarization (and contraction).

PR Interval measures time during which a depolarization wave travels from the atria to the

ventricles.

QRS Interval includes three deflections following P wave which indicates ventricular

depolarization (and contraction). Q wave is the first negative deflection while R wave is the

first positive deflection. S wave indicates the first negative deflection after R wave.

ST Segment measures the time between ventricular depolarization and beginning of

repolarization.

T wave represents ventricular repolarization.

QT Interval represents total ventricular activity.

2.3 ARRHYTMIA

Normally, the SA Node generates the initial electrical impulse and begins the cascade

of events that result in a heart-beat. For a normal healthy person the ECG comes off as a

nearly periodic signal with depolarization followed by repolarization at equal intervals.

However, sometimes this rhythm becomes irregular.

Cardiac arrhythmia (also dysrhythmia) is a term for any of a large and

heterogeneous group of conditions in which there is abnormal electrical activity in the heart.

The heart beat may be too fast or too slow, and may be regular or irregular.

Arrthymia comes in varieties. It may be described as a flutter in chest or sometimes

“racing heart”. The diagnosis of Arrthymia requires Electrocardiogram. By studying ECG,

Doctors can diagnose the disease and prescribe the required medications.

Page 9: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

9

CHAPTER 3

ENHANCEMENT OF ECG SIGNAL USING EMPIRICAL

MODE DECOMPOSITION METHOD

ECG provides information regarding the state of heart i.e. it gives us useful

data regarding diseases. Thus ECG analysis is an important method for monitoring patients.

However, the efficiency of diagnosis relies heavily upon accurate analysis of the signal. But

the ECG signal that we obtain for analysis is not free from noise. The most important job for

a coder is to denoise the ECG i.e. to extract the valid cardiac components and reject the rest

of the background noise.

Transmission of ECG often results in the corruption of signal due to introduction of noise.

Various factors responsible for introduction of noise include poor channel conditions,

Baseline wander (caused by respiration), 50 or 60 Hz power line interference etc. Analyzing

such a noisy signal is bound to give erroneous results. The process of extracting the required

components while rejecting the background noise is called Enhancement of ECG signal.

Numerous methods have been implemented for denoising ECG signals. Some of them are

use of Neural Networks, Wavelet Transform, Independent Component analysis etc. These

methods have shown good performance but have some limitations like arbitrary nature,

dependence on frequency content etc.

In our search for an efficient enhancement technique, we have implemented a combination of

Empirical Mode Decomposition method and low-pass filtering for the enhancement of ECG

signal.

3.1 Empirical Mode Decomposition

A new non-linear technique, called Empirical Mode Decomposition method, has

recently been developed by N.E.Huang et al for adaptively representing non-stationary

signals as sums of zero mean AM-FM components .

Page 10: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

10

EMD is an adaptive, high efficient decomposition with which any complicated signal can be

decomposed into a finite number of Intrinsic Mode functions (IMFs). The IMFs represent the

oscillatory modes embedded in the signal, hence the name Intrinsic Mode Function.

The starting point of EMD is to consider oscillations in signals at a very local level. It is

applicable to non-linear and non-stationary signal such as ECG signal.

An Intrinsic Mode function is a function that satisfies two conditions:

(1) The number of extrema and the number of zero crossings must differ by at most 1.

(2) At any point the mean value of the envelope defined by maxima and the envelope

defined by minima must be zero.

3.1.1 SIFTING PROCESS

Some of the assumptions made for decomposition are:

(1) The signal has at least two extrema: one maximum and one minimum

(2) The characteristic time scale is defined by the time lapse between the extrema.

(3) If the signal has no extrema but has inflection points, then the signal can be

differentiated one or more times to find the extrema.

The basic principle of this method is to identify the intrinsic oscillatory modes by their

characteristic time scales in the data empirically and then decompose the data.

A systematic way to extract the IMFS is called the Sifting Process and is described below:

1. Identify all the extrema of x(t).

Page 11: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

11

2. Interpolate between minima, ending up with a signal min (t) and similarly between

extrema to give max (t).

3. Compute the average: e(t)= ( min (t) + max (t))/2

4. Extract the detail: d(t) = x(t)-e(t) (Steps 1-4 are repeated till d(t) satisfies both the

criteria of IMF)

5. Iterate on the residual e(t)

In practice, after a certain number of iterations, the resulting signals do not carry significant

physical information. To prevent this, we go for some boundary conditions.

The sifting process was applied on an ECG signal to obtain the various IMFs. This

has been represented in Fig.5 and Fig.6

1

0.8

0.6

0.4

Sig

na

l 0.2

EC

G

0

Origin

al

-0.2

-0.4

-0.6

-0.8

-1 0 100 200 300 400 500 600 700 800 900 1000

No of samples

Fig.3.1 An ECG signal (200_1 of MIT-BIH database) containing 1000 samples

Page | 24

Page 12: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

12

IMF

1 0.2

0

-0.2

0 100 200 300 400 500 600 700 800 900 1000IM

F2 0.5

0

-0.50

100 200 300 400 500 600 700 800 900 1000

IMF

3 0.5

0

-0.50

100 200 300 400 500 600 700 800 900 1000

IMF

4 0.5

0

-0.50

100 200 300 400 500 600 700 800 900 1000

IMF

5 0.5

0

-0.50

100 200 300 400 500 600 700 800 900 1000

IMF

6 0.1

0

-0.10

100 200 300 400 500 600 700 800 900 1000

IMF

7 -0.05

-0.1

-0.150

100 200 300 400 500 600 700 800 900 1000 No of Samples

Fig.6.The various IMFs of the ECG signal given in Fig.3.1.

The EMD method is a powerful tool for analyzing ECG signal. It is very reliable as the base

functions depend on the signal itself. EMD is very adaptive and avoids diffusion and leakage

of signal.

3.2 METHODOLOGY

The basic principle of enhancement of ECG signal using EMD is expressing the

noisy ECG as sum of a series of IMFs.

Page 13: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

13

It has been shown that the 1st IMF contains nothing but high frequency noise. So we

can easily eliminate this component. The next two IMFs contain both noise as well as

information. It has been shown that if we remove the 2nd

IMF there is heavy distortion of the R- peaks. In order to remove noise while preserving the

information we go for filtering.

The whole procedure can be described by the following algorithm.

The ECG signal is first decomposed into IMFs. The sum of these IMFs should represent the

signal well. The IMFs are obtained using the sifting process described in the earlier section.

The first four IMFs are filtered to remove noise. We use a low pass filter as the noise

comprises the higher frequency components. The filter used by us in programming is the low

pass Butterworth filter. We use a Butterworth filter because of its inherent characteristics of

having a flat frequency response.

The 1st IMF is now eliminated. We reconstruct the enhanced signal by eliminating the 1st

IMF and adding up the rest IMFs.

3.3 EXPERIMENTAL RESULTS

We have used MIT-BIH database to validate the efficiency of our proposed method.

Simulation was carried out in MATLAB environment. We have added White Guassian noise

to the clean ECG signals to obtain a collection of noisy ECG signals with SNR varying from

5 dB to 30 dB.

Page 14: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

14

Table 2.1: Experimental Results for Enhancement Method using EMD

Noisy signal MIT BIH Record Enhanced Output SNR(dB) SNR(dB)

200_1 25 5 201_1 11.35

202_1 11 210_1 7.5 230_1 19.9 200_1 33.5

10 201_1 23.56 202_1 20.5 210_1 15.39 230_1 27.89 200_1 43

15 201_1 31.34 202_1 28.7 210_1 23.38 230_1 32.11 200_1 45

20 201_1 40.95 202_1 45.47 210_1 30.26 230_1 41 200_1 46.05

25 201_1 34.1 202_1 51 210_1 37 230_1 42.5 200_1 49.46

30 201_1 48.97 202_1 40.9 210_1 43.2

Page 15: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

15

CHAPTER 4

ECG SIGNAL USING SELF ORGANISING MAP

4.1 INTRODUCTION

According to sport shooting experts, the shooter’s ability to concentrate on the shooting

task is crucial in improving one’s performance, once high physical technique levels have

been achieved (steady body position, respiration, muscular and eye-movement control).

Since concentration is mainly a cerebral activity,we conducted an experiment where EEG

and ECG signals were read and digitised in real-time during the shooting activity. Previous

work suggested that these could be good indicators of concentration.Once we had all the

data (around 80Mb -120 Mb per shooting session), we had to devise adequate pre-processing

techniques in order to handle the high volume of data. Many techniques are known for

transforming EEG data into feature vectors suitable for clustering and classification . We

opted for the use of Fast Fourier Transforms (FFT) as described in the next section.But the

best that the FFT could give us were different types of channel spectra, therefore resulting in

20 spectra per shot, one per EEG channel. Since we wanted to apply SOMs to visually

inspect potential hidden relations in our data, we also had to find ways of merging all

channels into single feature vectors. Different approaches were tried and are described in

sections 4 and 5.

4.2 ECG signal acquisition and pre-processing

The subjects from which we recorded our data are shooters from the sport shooting team of

the Portuguese Navy. So far we have recorded data from 7 such shooters, but because of

difficulties with the recording software, in this paper we only present the results of shooters

numbers 3 to 7. Each shooter spent one morning at a shooting range, firing up to 12 rounds of

5 shots.For each shot, besides the EEG and ECG, we kept the target, and classified the shot

according to the score obtained (10 is right on the centre, 0 is outside the target).

Page 16: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

16

We then considered that shots with a score of 9 or 10 were good, 7 or 8 were average, and

up to 6 were bad. The electrodes were placed according to the standard 10-20 system.

The electrode leads are connected to a Braintronics ISO1032 preamplifier, that sends the

signal to a Braintronics CONTROL 1032 amplifier. There the signals are amplified, filtered

by a 50Hz notch filter and a 4th order 70Hz low-pass filter. A DATA TRANS-LATION

DT2821 ADC board is then used to digitise the resulting signals. The recorded data consists

of 22 signals, recorded with 12 bit resolution and a 512Hz sampling rate. Channel 22 is the

ECG, from where the heart beat rate is extracted using a simple spectra based algorithm.

Channel 18 is the signal of the right ear, that is used as reference for the differential

amplifiers, and thus contains no information. The remaining 20 channels are all subject to the

same initial pre-processing. First, the last 5 seconds before the shot are selected (2.5K

points). This signal is then broken up into 9 blocks of 512 points, with 50 % overlap between

them (so as to later obtain a Walsh periodogram). Each of these blocks is then multiplied by a

Hamming window to reduce frequency leakage, and it’s spectrum is calculated with a 512

point FFT. Thus each channel produces 9 spectra with 256 bins of real frequencies and a

width of 1Hz. Since we used a 70Hz low-pass filter and standard EEG bands range from 1-

30Hz we opted for using only the lower 30 bins.

Thus, when all information is used, we have 20 EEG channels with 9 spectra of 30 bins,

totaling 5400 EEG features, plus one heart beat rate feature. All subsequent pre-processing is

done on this EEG data.

4.3 SOM - SELF ORGANISING MAPS

Self-Organising Maps, also known as Kohonen Maps, in honour of its creator, are

thoroughly described in and have been widely used in many applications, including as a tool

for data fusio (an excellent bibliography can be found in

http://www.cis.hut.fi/nnrc/index.html).

Page 17: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

17

The SOM concept is based on the human brain’s cortex interactions, simplified in a

model in which different prototypes (neurones) try to represent the input data by competing

with each and every other neurone in every iteration, for a better mapping of the input data.

The basic SOM algorithmic procedure is as follows:

1. For a given training pattern x:

1.1 Calculate the distance of each neurone to the training pattern x (Calculation phase)

1.2 Find the neurone with smaller distance, and call it the winner W (Voting phase)

1.3 Change the network neurones with a function G, which depends on the learning rate

, the distance d to W (in the output plane), and the neighbourhood function F. Due

to the nature of the neighbourhood function, only the neurones closer to W (in the

output space) will be changed.

2. Update the learning rate and the neighbourhood function F according to some rule

3. Repeat steps 1 and 2 for the next training pattern, until some stopping criteria is reached.

In all our analysis we ran our algorithms 6 times with different initial values, to make sure

that the process always converged to the same final map. Whenever this did not happen, we

simply increased the number of iterations and the initial learning radius until a stable solution

was found.

A distributed SOM implementation was also used in building the maps for the largest

dataset (5401 features). A detailed description of this algorithm and its empirical evaluation

can be found in.

To visualise the results of the clustering performed by SOM, we frequently used U-matrices.

The U-Matrix of a SOM is obtained by calculating the distance, in the input space, between

neighbouring neurones.

Page 18: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

18

These distances are then represented on a map in grayscale (black being the greatest

distance, and white the smallest). Clusters can easily be identified as clear areas (nearby

neurones) separated by dark ridges (large distances to other clusters).

4.4 DATA FUSION

Since our main objective was finding an adequate set of features that would provide

high visual correlation between the EEG signal and shooting performance, most of our work

at this stage was concentrated on data fusion. Due to this fact, data fusion was performed

using different types of feature aggregation, motivated by several different reasons. Each

choice of feature aggregation led to a different training set, upon which the clustering

procedure was applied.

The training sets used were:

I) All the features (1 set of 5401 features).

In this training set, all features mentioned in Section 2 are used. It seems reasonable that

this approach would capture the dynamics of the signal prior to the shot. In this set, the

heart beat rate is also used.

II) All average spectra. (1 set of 601 features)

In this training set, we averaged the spectra of each channel, and by doing so assumed that

the signals are stationary during the 5 seconds before the shot. Each resulting spectrum is

the average of 9 spectra, and thus the signal to noise ratio is improved considerably. In this

set, the heart beat rate is also used.

III) Average spectra separated by hemisphere (2 sets of 330 features).

In these training sets, we separated the data in right and left hemisphere. Each hemisphere

consists of 8 EEG channels unique to that hemisphere, plus the three central channels (Fz,

Cz, Pz).

Page 19: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

19

This choice of features is motivated by the fact that the left and right sides of the brain are

reasonably distinct and all but one of the shooters were right handed and used the right eye

for aiming. We performed clustering on each side separately, and later merged the results.

IV) Average spectra by channel (19 sets of 30 features).

In these training sets, we used the spectra of each channel as a separate training set. By

analysing the ability to cluster the data sensibly, based on each channel independently, we

tried to determine if there were any channels more relevant to the task at hand.

In these training sets, power spectra within each band (alpha, beta, delta, and theta [6]) were

selected for all channels. Since each band has a different width, the number of features

selected varies. According to classic literature in the area [6] these frequency bands

correspond to well established activity patterns within the brain, and thus are the natural

choice for discriminating between the shots.

4.5 DECISION FUSION

Decision fusion was used for merging the results obtained in III and IV. The generated

datasets were used in building the corresponding SOMs, which were then labelled using the

same datasets. Labelling a SOM consists in finding the winning neurone in a SOM for each

data vector in the dataset and appending the data vector’s class label to the neurone’s label.

This labelling (usually called calibration in SOM terms) allowed us to use the

SOMs as classifiers, simply by having each neurone belong to the class that, in its label, is

most frequent.

Two different strategies were applied in fusing the SOMs classifications:

1. Majority (III, IV). This is the simplest decision fusion, where the final class is simply

the most ocurring class in the lower level classifiers. It is used for evaluation of

variation in SOMs classifications.

Page 20: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

20

2 Use of another SOM layer (IV). In this case, the results of the classification by the

original SOMs are fed as features to a fusing SOM. It is then used for visual inspection

of dispersion of the first level SOMs classifications. Higher levels of agreement on the

first level SOMs should lead to a smooth fusion SOM. If the decision fusion SOM is

messy or has outliers, then there is disagreement on the first level SOMs. In such cases,

simply by glancing at the outliers’ neighbours it’s easy to spot which class most of the

first level classifiers chose for it.

4.6 RESULTS

With all datasets, with the exceptions of III that will be discussed later, and certain

channels of IV, the data was clustered by shooter. We present these results for the first

dataset in Figure 2, and the others are very similar.

Since the data is clustered by shooter, it cannot be clustered by score. So as to cluster by

score, it is necessary to join all good shots in one cluster and bad ones in another, thus mixing

in those clusters the different shooters (which as in this case does not happen). Thus, to

classify the shots by score we have to analyse the data of each shooter individually.

None of the datasets tested provides good clustering by score for all shooters. However, 2 of

the individual channels (F7 and T3) provided reasonable clustering by scores, even when all

shooters are considered simultaneously. Furthermore, some of the shooters have their shots

clustered by score with some of the datasets. Shooter 3 has his shots clustered by score in

dataset IV (channel Cz), shooter 4 in dataset V, shooter 5 in datasets II, IV and V, and

shooter 7 in dataset IV. With shooter 6 no dataset was capable of clustering his shots by

score.

Page 21: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

21

To visualise the maps produced, we shall represent the mapped shots as crosses if they

correspond to good shots, triangles if they correspond to average shots, and circles otherwise,

as shown in Figure 1.

Figure 4.1 - Legend for the maps

The results for each of the training sets presented in section 4 are as follows:

I) Training set with all 5401 features. Different shooters are clearly identified for, as

we can see in Figure 2, shooters 4 and 5 have very distinct clusters (separated from the others

by dark lines in the U-Matrix), and shooters 6, 7, and 3, while in the same cluster, are

mapped to different areas. To obtain these maps we used the distributed version of SOM

mentioned in section 3. This allowed us to reduce the total training time of each map from

2h21m to 1h16m when using 2 machines, and even more when more machines where

available.

6 6 6 6 6 7 7 4 4 4 4

6 6 7 7 7 4 4 4

7 6 6 6 6 6 7 4 4 4

6 6 6 6 6 6 4 4 4

6 6 6 6 6 3 3 3 4

6 5 3 3 3 4 4 4

5 5 5 5 3 3 3

5 5 5 5 3 3 3 4 4 4

Figure4. 2 - U-Matrix obtained after applying a SOM to training set I.

Page 22: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

22

If we train SOM maps for each individual shooter, the results are generally bad.

This training set is only useful for shooter 5. In Figure 3 we can see that all good shots are

on the upper right corner, while the average shots are on the bottom left. Furthermore, in

the U-Matrix presented in Figure 4 we can see that there is a clear distinction between these

two areas. It could be argued that there are some good shots in the “bad area”, but these are

probably outliers that correspond to lucky shots that are good despite the bad conditions.

Figure 4.3 - Map obtained with training set II for shooter 2

II) Training set with average spectra separated by hemisphere (2 sets of 330 features).

We were unable to obtain good clusters of the data by scores for any shooter with this

dataset. However, as with all others, we could cluster rather easily by shooter. When we

fused the results obtained by each hemisphere, we managed to obtain the results presented

in Table 1.

Table 4.1 - Percentage of correct classification for each shooter, with and without decision fusion

Shooter 3 4 5 6 7 All

Best 50 70 57 53 45 47 Hemisphere

Fusion 53 70 70 58 60 55

Gain 3 0 13 5 14 8

Page 23: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

23

III) Training set with average spectra by channel (19 sets of 30 features). Our main

objective in this first phase of our work was to gain further insight over our data, which

was accomplished. Although most of the data fusion possibilities had a strong imprint of

each individual’s personal EEG traces, we were able to find some clues as to what were

the important frequency ranges in each case. These have already led us to try and find new

criteria that combine different frequency bands, on which we are currently working.

The data from the ECG did not influence in any way our results, since it was almost constant

for each shooter, and even amongst shooters the differences were not significant.

Our use of SOMs as a clustering tool for visual inspection of our data fusion options was,

as we expected, very useful. Also, decision fusion wise, we found SOMs to be very useful

as a visual inspection tool of a set of classifiers. High coherence means cleaner, smoother

maps, messy maps mean lots of variance within the classifier set and maps with disjoint

clusters could be good indicators that an extra classifier is needed to handle specific data

partitions

Page 24: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

24

CHAPTER 5

CONCLUSION AND FUTURE WORK

5.1. CONCLUSION

Our sole objective of this project was to develop a method for efficient analysis of ECG

signal.

In this piece of work, we have proposed a novel method of enhancement of ECG signal using

Empirical Mode Decomposition. Deviating from other approaches of using EMD, we

proposed the use of low-pass filters for efficient noise removal.

We have implemented a number of earlier proposed methods for R peak detection including

Hilbert Transform, Difference Operation Method and Continuous Wavelet Transform. We

have found that the efficiency in case of CWT is better as compared to other methods. The

average detection error rate for CWT is 0.01% as compared to 0.23% of Hilbert Transform

Method and 0.21% of DOM method. The sensitivity of DOM (99.94%) is better than CWT

(99.84%), but the low detection error rates compensates for this.

Thus our method of signal enhancement and R peak detection using Empirical Mode

Decomposition method and Continuous Wavelet Transform is a novel, efficient method

having less computation time, hence best suited for analysis of ECG signal for clinical

purposes.

5.2. FUTURE WORK

Empirical Mode Decomposition and Wavelet Transform are both very recent

Page 25: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

25

techniques. Hence a lot of research needs to be done on the properties so that

we can come up with still simpler methods for ECG signal Analysis.

Feature extraction is yet another field in ECG signal Analysis untouched by us.

But it is very important for classification of Arrthymia. Hence our future work

will be dedicated to feature extraction and classification.

The process of enhancement can be modified using more evolved techniques.

Research needs to be done for finding more efficient methods for signal

enhancement.

5.3 REFRENCES

[1] Yun-Chi Yeh, Wen-June Wang, “QRS complex detection for ECG signal: The

Difference Operation Method”, Computer Methods and Programs in Biomedicine 9

I(2008) 245-254

[2] D.Benitez, “The use of Hilbert Transform in ECG Signal Analysis”, Comput. Biol

.Med. 31 (2001) 399-406

[3] A.Ghaffari, H.Golabayani, M.Ghasemi, “A new mathematical based QRS

detector using continuous wavelet transform”, Computers and Electrical Engineering

34(2008) 81-91

[4] Yan Lu, Jingyu Yan, and Yeung Yam, “Model Based ECG denoising using

empirical mode decomposition,” IEEE International Conference on Bioinformatics

and Biomedicine, pp. 191-196, 2009.

Page 26: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

26

[5] Guodong Tang and Aina Qin, “ECG Denoising based on Empirical Mode

Decomposition,” 9th

International Conference for Young Computer Scientists, pp.

903-906

[6] N. E. Huang, Z. Shen, S. R. Long, M. C. Wu, H. H. Shih, Q. Zheng, N.-C. Yen,

C. C.Tung, and H. H. Liu, “The empirical mode decomposition and the Hilbert

spectrum for nonlinear and nonstationary time series analysis,” Proc. Roy. Soc.

Lond., vol. A 454, pp. 903–995, 1998.

[7] A.Barros, A.Mansour, and N.Ohnishi, “Removing Artifacts from ECG signals

using independent components analysis”, Neuro-computing, vol.22, pp-173-186, 1998

[8] G.D. Clifford and L. Tarassenko, “One-pass training of optimal architecture auto-

associative neural network for detecting ectopic beats,” Electron Lett., vol. 37, no. 18,

pp. 1126-1127, Aug. 2001

[9] P.M. Agante and J.P.M de Sa, “ECG noise filtering using wavelets using

soft thresholding methods”, in Proc. Comput. Cardiology 1999, pp. 535-542.

[10] F.A.Davis, “ECG_NOTES,” 2005

[11] Jing- tian Tang,Xiao –li Yang, “The Algorithm of R peak detection in ECG

based on empirical Mode Decomposition”, IEEE, 4th

International Conference on

Natural Computation.

[12] Hualao Ling,Qiu-Hua Lin and J.D.X.Chen, “Application of the Empirical Mode

decomposition to the analysis of Esophageal Reflux Disease”, IEEE transactions on

Biomedical Engineering, Vol.52,No.10 (2005)

Page 27: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

27

[13] Conor McCooey, Dinesh Kant Kumar and Irena Cosic, ”Decomposition of

Evoked Potentials using Peak Detection and the Discrete Wavelet Transform”,

proceedings of 2005 IEEE, pp 2071-2074 (2005)

[14] Yun-Chi Yeh, Wen-Jun Wang, Che Wun Chiou,” Cardiac arrhythmia diagnosis

method using linear discriminant analysis on ECG signals”, Measurement 42(2009)

778-789

[15] Sreeraman Rajan, R. Doraiswami, M. Stevenson and R.Waltrous,” Wavelet

based bank of correlators approach for phonocardiogram signal classification”, IEEE,

pp. 77-80 (1998)

[16] Nugent, C.D, Webb, J.A.C, Black, N.D., Wright, G.T.H.and M. McIntyre; “An

intelligent framework for the classification of the 12-lead ECG”, Artificial

Intelligence in Medicine 16 (1999) 205–222

[17] Szi-Wen Chena, Hsiao-Chen Chena and Hsiao-Lung Chanb ; “A real-time QRS

detection method based on moving-averaging incorporating with wavelet

denoising”;Computer methods and programs in biomedicine 82 (2006) 187–195.

[18] I.K. Daskalov and I.I. Christov, “Electrocardiogram signal preprocessing for

automatic detection of QRS boundaries” Medical Engineering & Physics, vol. 21, pp.

37–44, 1999.

[19] S.S. Mehta and N.S. Lingayat, “SVM-based algorithm for recognition of QRS

complexes in electrocardiogram”, IRBM 29 (2008) 310–317.

Page 28: ANALYSIS OF ECG SIGNAL USING SELF ORGANISING MAP

28

[20] S.S. Mehta, D.A. Shete, N.S. Lingayat and V.S. Chouhan , “K-means algorithm

for the detection and delineation of QRS-complexes in Electrocardiogram”, IRBM 47

(2009).