detectıon of dıseases usıng ecg signal
TRANSCRIPT
DETECTION OF DISEASES USING ECG SIGNAL
EED 4094 Final Project Presentation
By
SERHAT DAĞ
• 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
Electrocardiograms (Electrocardiography)
• Electrocardiography (ECG ) is the process of recording the electrical activity of the heart.
Figure 1: Represents a typical ECG
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
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
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
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
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
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.
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
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)
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)
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
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
• 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
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.
• 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
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.
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)
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
• [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