detectıon of dıseases usıng ecg signal

21
DETECTION OF DISEASES USING ECG SIGNAL EED 4094 Final Project Presentation By SERHAT DAĞ

Upload: serhat-dag

Post on 15-Feb-2017

63 views

Category:

Engineering


10 download

TRANSCRIPT

Page 1: detectıon of dıseases usıng ECG signal

DETECTION OF DISEASES USING ECG SIGNAL

EED 4094 Final Project Presentation

By

SERHAT DAĞ

Page 2: detectıon of dıseases usıng ECG signal

• In recent years, electrocardiogram (ECG) has been used as main method for the diagnosis of heart disease.

• The purpose of this study is detect heart diseases with ECG signal

Page 3: detectıon of dıseases usıng ECG signal

Electrocardiograms (Electrocardiography)

• Electrocardiography (ECG ) is the process of recording the electrical activity of the heart.

Figure 1: Represents a typical ECG

Page 4: detectıon of dıseases usıng ECG signal

Figure 2: Normal ECG signal and intervals

• A zero line is drawn at this time is called

the isoelectric line.

• The P wave indicates atrial depolarization

• QRS complex corresponds to the

depolarization of the right and left

ventricles of the human heart

• T wave represents the repolarization (or

recovery) of the ventricles.

• U waves are thought to represent

repolarization of the papillary muscles

Page 5: detectıon of dıseases usıng ECG signal

ARRHYTMIA

• Cardiac arrhythmia (irregular heartbeat) is a heterogeneous group of conditions involving abnormal electrical activity in the heart.

Normal Sinus Rhythm

• P-R interval should be between 0.12 and 0.20 seconds(120-200 ms)

• The rhythm is regular.

• Duration of RR interval should be between 480 and 600 ms

Page 6: detectıon of dıseases usıng ECG signal

Sinus tachycardia

• PR interval is between 0.12–0.20 seconds.

• Electrical signal is faster than usual.

• Due to the above reasons, duration of RR peak should be shorter than normal sinüs.

Figure 4 :Sinus tachycardia

Page 7: detectıon of dıseases usıng ECG signal

Sinus Bradycardia

• Electrical signal is slower than usual. The heart rate is slower.

• PR interval is between 0.12–0.20 seconds.

• Duration of RR peak should be bigger than tachycardia.

Figure 5:Sinus Bradycardia

Page 8: detectıon of dıseases usıng ECG signal

DATA

• ECG signals are collected from Physionet MIT-BIH arrhythmia database

ECG signals are described by a text header file (.hea), a binary data file (.dat) and a binary annotation file (.atr) :

• Header file consists of detailed information (such as number of samples, sampling frequency, format of ECG signal , patient’s history and the detailed clinical information)

• In binary data signal file (is used for project ) , raw ECG recordings were sampled at 360 Hz with an 12-bit (for each sample) resolution.

• Annotation file, contain some comments about analysis of signal quality results

Page 9: detectıon of dıseases usıng ECG signal

Wavelet Transform

WHY WE USE ?

• The wavelet transform can separate high frequency component andlow frequency component in time domain

• It allows accurate feature extraction from non-stationary signals like ECG.

WHAT IS WAVELET TRANSFORM?

The sum of over all time of the signal multiplied by scaled with wavelet function.

Page 10: detectıon of dıseases usıng ECG signal

Continuous Wavelet Transform

• This means

W a, b = −∞

+∞f t ᴪa,b (t) dt

where,

ᴪa,b t =1

aᴪ∗(

t−b

a)

Where * denotes complex conjugation and , ᴪ∗(𝑡−𝑏

𝑎) is a window function

called the mother wavelet, a’ is a scale factor ,b’ is also a translation factor

Page 11: detectıon of dıseases usıng ECG signal

Continuous Wavelet Transform

• Wavelets are defined by the wavelet function ψ(t) (the mother

wavelet) and scaling function φ(t) (also called father wavelet) in the time domain.

Let a=𝑎0−𝑟 , b=ka0

−rb0 and a0 = 2 , and b0 = 1

For ᴪa,b t =1

aᴪ∗(

t−b

a)

We can define scaling and wavelet function as below

Φj,k t = 2j

2ΦN 2jt − k , ᴪj,k t = 2j

2ᴪ(2kt − k)

Page 12: detectıon of dıseases usıng ECG signal

Discrete Wavelet Transform

• It provides enough information for signal. It offers a significant reduction In computation time, it mean it is faster .

𝑊ᴪ(j, k)= 1

M 𝑛 f(n)ᴪj,k(n) and 𝑊𝛷(𝑗0, k)=

1

𝑀 n f(n)Φj0,k(n)

For j≥ 𝑗0 and n∈ 𝑍

where

Φj,k t = 2j

2ΦN 2jt − k , ᴪj,k t = 2j

2ᴪ(2kt − k)

Page 13: detectıon of dıseases usıng ECG signal

Types Of Wavelet

• Φ𝑁 t = 𝑛 hΦ n 2 Φ(2t − n) and ᴪ(t)= 𝑛 hᴪ n 2 Φ(2t − n)

Where

• 𝛷(𝑡) = 1 when 0 ≤ t ≤ 10 otherwise

and ᴪ(𝑡)

1 when 0 ≤ t ≤ 1/2

−1 when1

2≤ t ≤ 1

0 otherwise

• ℎᴪ 𝑛 and ℎ𝛷 𝑛 is wavelet and scaling function coefficient. These coefficients indicate characteristic characteristics of wavelet and scaling function

Page 14: detectıon of dıseases usıng ECG signal

Daubechies Wavelet• Daubechies wavelet family are similar in shape to QRS complex

• It is more effective than other waves

Figure 6: Scaling function for wavelet Daubechies 8 Figure 7: wavelet function for wavelet Daubechies 8

Page 15: detectıon of dıseases usıng ECG signal

• if ᴪ𝑗,𝑘 𝑛 = 2𝑗

2ᴪ(2𝑗𝑛 − 𝑘) and ᴪ(t)= 𝑛 ℎᴪ 𝑛 2 𝛷(2𝑡 − 𝑛) are used

for

𝑊ᴪ(j, k)= 1

𝑀 𝑛 𝑓(𝑛)ᴪ𝑗,𝑘(𝑛)

𝑊ᴪ(j, k)= 𝑚 ℎᴪ 𝑚 − 2𝑘 𝑊𝛷(j+1, m) is found

This means,

𝑊ᴪ(j, k)= ℎᴪ −𝑛 * 𝑊ᴪ(j+1, m) and we can apply same operation for

approximation coefficient Therefore 𝑊𝛷(j, k)= ℎ𝛷 −𝑛 * 𝑊𝛷(j+1, m) for n=2k and

k≥ 0

Page 16: detectıon of dıseases usıng ECG signal

Decomposition tree

Figure 8: Relationship between digital wavelet coefficients

The original signal is filtered by half band low pass and high pass filter.

This is done for each coefficient.

Page 17: detectıon of dıseases usıng ECG signal

• The original signal is filtered by half band low pass and high pass filter. This is done for each coefficient. The width of the filter will be reduced by half for each level

Figure 9: Three level wavelet decomposition tree

Page 18: detectıon of dıseases usıng ECG signal

Figure 10:Approximation Coefficients of Signal Levels for db8

The high-frequency components are removed by wavelet transform. Therefore last signal

(8.Level) is smooth and maximum value can be found. In addition effect of scaling function can

be noticed.

Page 19: detectıon of dıseases usıng ECG signal

Peaks detection• Peaks of the R waves have a largest amplitude

• After the decompose the signal high frequency component isremoved. R peaks is noticeable

Figure 11:Approximation coefficient of signal At Level 4 (101.dat signal is

used)

Page 20: detectıon of dıseases usıng ECG signal

ALGORITHM OF PROGRAM• 1) Apply Discreate Wavelet Transform

• 2) R peak detection (Find the maximum value of ECG signal and locate Rloc )

• 3) P peak detection (Using window Rloc-90 to Rloc-10, find the maximum)

• 4)Q peak detection (The minima in the window of Rloc-40 to Rloc-10 )

• 5) S Peak Detection (The minima in the window of Rloc+5 to Rloc+40)

• 6) T Peak Detection (Using window of Rloc+25 to Rloc+90, find the maximum)

• 7) Calculate PR and PR Intervals

• 8) Decision for Patient Healthy or not Healthy

Page 21: detectıon of dıseases usıng ECG signal

• [1] Digital Image Processing (3rd Edition) 3rd Edition by Rafael C. Gonzalez, pp.477-493

• [2]ECG Feature Extraction Using Daubechies Wavelets S. Z. Mahmoodabadi, A. Ahmadian, M. D. Abolhasani, Tehran University of Medical Sciences (TUMS), Tehran, Iran

• [3] A Wavelet Transform Method to Detect P and S-Phases in Three Component Seismic Data Salam Al-Hashmi, Adrian Rawlins, Frank Vernon

• [4] THE MIT-BIH Arrhythmia Database On CD_ROM AND Software For Use With it, George B. Moody and Roger G. Mark

REFERENCES