- Open Access
- Total Downloads : 1749
- Authors : B. Priyadarshini, R.K.Ranjan, Rajeev Arya
- Paper ID : IJERTV1IS6457
- Volume & Issue : Volume 01, Issue 06 (August 2012)
- Published (First Online): 30-08-2012
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Determining ECG characteristics using wavelet transforms
Determining ECG characteristics using wavelet transforms
1B. Priyadarshini 2R.K.Ranjan, 3Rajeev Arya
1,2,3Indian School of mines dhanbad
Electro cardiogram by definition means the recording of heart electrical activity. Electrocardiogram (ECGs) represents the electrical signature of the heart activities whose proper working is very important to the human body. An ECG wave is used to predict abnormalities by a careful study of the features. Delay in cardiac re-polarization causes ventricular tachyarrhythmia as well as Tor Sade de pointes (TdP) and irregular heart beat. A feature of TdP is pronounced prolongation of the QT interval in the supraventricular beat preceding the arrhythmia. TdP can degenerate into ventricular fibrillation, leading to sudden death. The RR interval represents the amount of time between heart beats. If a subjects heart rate is over 100 beats per minute they are said to be in sinus tachycardia. And below 100 beats per minute are said to in be sinus Brady cardiac. The present work compares ECG feature extraction system based on the multi-resolution wavelet transform with that of older time plane system. The feature extraction has been done by using Daubechies 4 & 6.
Keywords: ECG, Multi resolution Analysis, Soft or Hard Thresholding, Signal Averaging, five point derivative.
-
Electro cardiogram by definition means the recording of heart electrical activity. This is caused by de- polarization and re-polarization of cardio myocytes or otherwise called cardiac cells. This continuous cycle of de-polarization and re-polarization causes the heart rhythm. So by studying the cardiogram one can detect the anomalies in the heart functioning. ECG signal can be sensed by surface electrodes.
different scales to measure the required parameters of ECG signal. The detailed analysis and algorithms are given further.
-
The electric signal in heart is generated by rhythmic excitation of heart achieved by continuous process of de-polarization and re- polarization of cardiac cells. Initially cardiac cells are negatively polarized inside compared to exterior of the cell. Diffusion of sodium and
Fig.1 Transmission of the cardiac impulse through the heart [1]
To analyze the ECG signal more efficiently we adapt the frequency domain analysis technique using wavelet transform. Wavelet transform allows us to decompose the time-limited signals at various scales, which is
nitially cardiac cells are negatively polarized inside
going to be essential in case of ECG signals. I
Fig.2 Normal ECG waveform [2]
Firstly a MATLAB program is created in order to de- noise the ECG signal that is measured by cardiograph. This can be done using 1-D wavelet analysis. Then the signal is decomposed into a no. of different signals at
compared to exterior of the cell. Diffusion of sodium and calcium ions into interior of cells causes de- polarization and immediate diffusion of a large no. of potassium ions out of cell causes re-polarization. This
process continues for lifelong producing a rhythmic cardiac excitation.
Fig.2 represents normal ECG signal. P-wave is caused by spread of de-polarization through atria followed by atria contraction. QRS-complex is a result of de- polarization of ventricles which initiates the contraction of ventricles. T-wave represents re-polarization of ventricles, thats when ventricle muscles begin to relax.
-
ruinous. Wavelet transform provides all those desirable features required to analyze an ECG signal. Moreover, at each point in time ECG signal contains different amount of frequency contents. It is important to focus on the frequency content at required point of time, in detail. So the time localization of spectral components is needed i.e. time-frequency representation of the signal is needed. By using wavelet transform a signal can be decomposed into a finite set of coefficients that describe the frequency content of a given signal at any particular point of time. In case of ECG signal processing the Daubechies wavelet is used as basis
The ECG measurement system comprises of following function blocks.
Transducer – an AgCl electrode converts ECG into electrical voltage (Range ~ 1mV to 5mV).
Instrumentation Amplifier analogy device, amplifies
function.
The wavelet transform of a signal in analog domain can be represented as
Wsf(x) = f(x)*s(x) = (1)
[6]the differential input (CMRR-90dB, Gain-1000). Isolator [5] – Opt coupler used to isolate In-amp and output.
Band-pass filter Used to filter unnecessary data of signal being received (pass band 0.04Hz to 150Hz)
Fig.3 Function block diagram of ECG measuring system
-
The frequency analysis of the ECG signal is done by wavelet transform. The use of Fourier transform will not yield optimum results. the This is because Fourier Transforms domain stretches out to infinity. Since ECG signal contains sharp spikes, trying to limit the frequency interval of its Fourier transform may result in considerable amount of data loss. But this kind of loss in physiological signals is extremely undesirable and
S represents the scaling factor and dilation of (t) by a factor s can be expressed as
s(t) = . (2)
Fraction is used for energy normalization [7].
Like sins and cosines used as basis functions for Fourier transforms, wavelet functions are used as basis functions for wavelet transforms. The equation stating the basis function of wavelet transform is given by [8]
Fig.4 2048-point DAUB4 mother wavelet [9]
(s,l)(x) = ).(2-s.x-l) ……. (3)
is mother function of wavelet family (Daubechies wavelet in case of ECG signals),s and l are integers
that scale and dilate the mother wavelet. Scale indexs indicates the width of wavelet and location index l indicates the position. These indices cause self- similarity to the wavelet basis functions that makes them particularly interesting. The fractal self-similarity of the Daubechies mother wavelet is shown in Fig.4.
To span data domain at different resolutions, wavelet function is used in a scaling equation.
W(x) = -1)kck+1.(2x+k)…. (4)
Here W(x) is scaling function for and ck are the wavelet coefficients, satisfying the linear and quadratic constrains of the form
k = 2 and k.ck+2l = 2l,0 Here is unit impulse function.
-
For ECG signal, wavelets can not only help with the decomposition but also help obtaining the de- noised dataset. This is done through the technique called wavelet shrinkage and thresholding [10] methods. Since wavelet transform decomposes the signal with basis functions at different resolutions both gross features and local details are preserved. The idea of thresholding to omit those coefficients corresponding to local details in the dataset, less than a particular threshold. By this localized smoothing is done without effecting the sharp changes.
-
According to following algorithm [11] shown in fig.5 programming. Those programs R-R interval, P-R interval, QRS interval are calculated. These parameters
-
Fig.5 Block diagram of algorithm to determine the ECG characteristic points[11]
are required in the EKG interpretation chart [12] to diagnose the functioning of heart. For the EKG prediction chart, Heart rate, P-R interval and QRS interval are calculated using the Mat lab programming. Regularity of beats, nature of P-wave and marriage of P&QRS complex waves are determined by observing the ECG sinal through cardiograph.
ECG sample data is downloaded from PTB-DB in
*.mat format and loaded into workspace using load ecg function (user defined). In wavelet toolbox 1-D wavelet analysis is selected. Sample data in workspace is imported to wavelet toolbox and is analyzed using 8- level db2 wavelets. Then the signal is de-noised using fixed form soft is done in Mat lab. By executing threshold method assuming the scaled white noise structure. The de-noised signal is exported to workspace.
The remaining program written on the basis of algorithm illustrated in Fig.5 is executed on the de- noised signal and the required Heart rate, P-R interval and QRS interval are obtained along with P, Q, R, S
and T points. X-axis is in ms and Y-axis is in mV.Forpatient001/s0010_rem.mat
Fig.6 8-level decomposition using db2 wavelet
. Fig.7Denoising signal using thresholding technique
Fig.9 Detecting R-wave and R-peak
Fig.10 Detecting the QRS complex and Q, S points
Fig.11 Detecting P-wave and P,T points
Fig.8 Original signal and de-noised signal
In command window we get the results as RR-interval= 0.732 sec.
Heart rate=82 beats per minute, PR-interval= 0.1153 sec. And QRS- interval= 0.096 sec.
Complete results are shown in appendix-I
-
A graphic user interface is designed in MATLAB to perform above operations. In mat lab start/MATLAB/GUIDE (GUI builder)/create new GUI/ Blank GUI (default) is selected to create a blank GUI. A list box and six pushbuttons were added to the figure. The GUI layout is as follows
Fig.12 GUI layout
Call back function for each pushbutton is nothing but the programs those are used obtain respective parameters.
-
Since we are basing our algorithm based upon normal ECG signal characteristics, there exist some limitations on using program. The algorithm can give accurate results only if the heart rate is between 34 to 160 beats per minute. This is a limitation due to programming. If required, by adding more loops and decreasing the interval that check for R-peaks, wider range of heart rates can be analysed.
Fig.13 Error due to abnormally low S-point
Fig.14 Error due to abnormally low P-wave
The minima after R- point, S, is much less than zero level than R-peak. Due to this after squaring the 23-25 details of the signal, the peak value shifts from R to S. So S will identify as point R. Since remaining characteristic points are dependent upon detection of R, results couldnt be obtained. In some patients the occurred errors are due to error in zero crossing detection. Since the zero level of ECG signal is fluctuating a small error probability exists.
-
Normal ECG signal characteristics are learnt by familiarizing the generation and propagation of ECG signal. Different types of ECG leads are observed and one of them is chosen to be analyzed. According to processing of that signal referred algorithms been designed and programs are written according to that algorithm. Behavior of wavelets is understood and suitable wavelet for ECG signal processing is chosen to be Daubechies wavelet. Concept of de-noising is by
thresholding the coefficients, is understood by time- frequency localization plane. The parameters to extract from program have been learnt by understanding EKG prediction chart. The downloaded signals are successfully analyzed and possible errors have been noted.
Though all points are determined successfully, from a number of observations it is revealed that seldom there is a significant error in determining the zero crossing points. Adjusting threshold points in de-noising, using different scales and/or basis functions might be possible solutions.
-
References
-
Text book of medical physiology (eleventh edition) by Guyton andHall; ch.10Rhythmic excitation of heart and ch.11 Normal electro cardiogram. .
-
Comprehensive lectrocardiology: Theory and Practice in Health and Disease (1st ed., Vol. 1, 2, and 3), 1785 pp. Pergamon Press, New York. [3]http://www.cisl.columbia.edu/kinget_group/student_projec ts/ECG%20Report/E6001%20ECG%20final%20report.htm
-
Detection of ECG Characteristic Points Using Wavelet Transforms by Cuiwei Li, ChongxunZheng, and ChangfengTai; IEEE transactions on biomedical engineering, vol.42, no.1, 1995.
-
Using Wavelet Transforms for ECG Characterization an online digital signal processing system by J.S. Sahambi &
R.K.P. Bhatt(Electrical Engineering Department),S.N. Tandon (Centre for Biomedical Engineering), Indian Institute of Technology Delhi; IEEE engineering in medicine and biology(0739-5175/97), January/February 2007.
-
Numerical Recipes in Fortran, Cambridge University Press, New York, 1992, pp. 498-499,584-602.
-
An introduction to wavelets by Amara Graps ; IEEE Computational Science and Engineering, Summer 1995,vol. 2, num. 2, published by the IEEE Computer Society, 10662 Los Vaqueros Circle, Los Alamitos, CA 90720, USA.
-
An introduction to wavelets or The wavelet transform: whats in it for you? by Andrew E. Yagle and Byung-Jae Kwak (Dept. of Electrical Engineering and Computer Science, The University of Michigan, Ann Arbor, MI); Presentation to Ford Motor Co.May 21, 1996.
-
ECG feature extraction using daubechies wavelets by S.Z.Mahmoodabadi (MSc), A. Ahmadian (PhD), M.D. Abolhasani (PhD) (TUMS, Tehran, Iran & RCSTIM, Tehran, Iran); Proceedings of fifth IASTED international conference, Visualization, Imaging and Image processing, sept.7-9, 2005, Benidorm, Spain.
-
Basic Dysrhythmias, Interpretation and Management (3rd Edition) by Robert J. Huszar, Mosby.
Appendix-i
Following Table shows the results obtained for 55 sample signals from 20 patients. Source is http://www.physionet.org/cgi-bin/atm/ATM.(e: indeterminable parameter or possible error).
Patien t |
File name (*.mat ) |
RR- int. calcul ated (in sec) |
RR- int. obser ved(in sec) |
Rate (beat s/ min ute) |
PR- int. (in sec.) |
RS in. (in sec .) |
Accu racy( RR- int.) |
Patien t001 |
s0010 _rem |
0.732 |
0.728 |
82 |
0.11 6 |
0.0 96 |
99.4 5% |
s0014 lrem |
0.716 |
0.7 |
84 |
0.12 5 |
0.0 96 |
97.7 1% |
|
s0016 lrem |
0.748 |
0.746 |
80 |
0.12 5 |
0.0 96 |
99.7 3% |
|
Patien t002 |
s0015 lrem |
0.718 |
0.718 |
83 |
e |
e |
100 % |
Patien t003 |
s0017 lrem |
0.8 |
0.804 |
75 |
0.15 6 |
0.1 07 |
99.5 % |
Patein t004 |
s0020 arem |
0.736 |
0.738 |
82 |
0.15 6 |
0.0 96 |
99.7 3% |
s0020 brem |
0.744 |
0.746 |
81 |
0.18 2 |
00 85 |
99.7 3% |
|
Patien t005 |
s0021 arem |
0.64 |
0.639 |
94 |
0.09 9 |
0.0 96 |
99.8 4% |
s0021 brem |
0.63 |
0.631 |
95 |
0.08 2 |
0.0 75 |
99.8 4% |
|
s0025 lrem |
0.582 |
0.584 |
103 |
0.07 9 |
0.0 75 |
99.6 6% |
|
s0031 lrem |
0.656 |
0.66 |
91 |
0.06 5 |
0.0 32 |
99.3 9% |
|
s0101 lrem |
0.938 |
0.938 |
64 |
e |
e |
100 % |
|
Patien t006 |
s0022 lrem |
0.684 |
0.668 |
88 |
0.13 1 |
0.0 96 |
97.6 % |
s0027 lrem |
0.77 |
0.772 |
78 |
0.09 5 |
0.0 96 |
99.7 4% |
|
s0064 lrem |
0.802 |
0.793 |
75 |
0.06 7 |
0.0 96 |
98.8 6% |
|
Patien t007 |
s0026 lrem |
0.816 |
0.826 |
74 |
0.08 7 |
0.0 85 |
98.7 9% |
s0029 lrem |
0.834 |
0.827 |
72 |
0.10 7 |
0.0 85 |
99.1 5% |
|
s0038 lrem |
0.844 |
0.845 |
71 |
0.10 1 |
0.0 75 |
99.8 8% |
|
s0078 lrem |
1.172 |
1.172 |
51 |
0.12 7 |
0.0 96 |
100 % |
|
Patien t008 |
s0028 lrem |
1.012 |
1.024 |
69 |
0.07 2 |
0.1 07 |
98.8 3% |
s0037 lrem |
0.984 |
0.992 |
61 |
0.20 7 |
0.0 96 |
99.1 9% |
|
s0068 lrem |
0.872 |
0.872 |
69 |
0.07 5 |
0.0 96 |
100 % |
Table showing ECG parameters of a random sample group (Source: physionet.org/PTB-DB)
Patien t009 |
s0035 _rem |
0.704 |
0.696 |
85 |
0.09 5 |
0.0 85 |
98.8 5% |
Patien t010 |
s0051 lrem |
0.728 |
0.728 |
82 |
0.06 9 |
0.0 85 |
100 % |
Patien t011 |
s0039 lrem |
0.68 |
0.676 |
88 |
0.08 6 |
0.0 96 |
99.4 1% |
s0044 lrem |
0.718 |
0.718 |
84 |
0.08 |
0.0 75 |
100 % |
|
s0049 lrem |
0.68 |
0.67 |
88 |
0.07 5 |
0.0 85 |
98.5 1% |
|
s0067 lrem |
0.918 |
0.916 |
65 |
0.07 3 |
0.0 85 |
99.7 8% |
|
Patien t012 |
s0043 lrem |
1.138 |
1.128 |
53 |
0.13 4 |
0.1 16 |
99.1 1% |
s0050 lrem |
0.958 |
0.96 |
63 |
0.22 |
0.0 96 |
99.7 9% |
|
Patien t013 |
s0045 lrem |
0.698 |
0.701 |
86 |
0.07 2 |
0.0 75 |
99.5 7% |
s0051 lrem |
0.728 |
0.728 |
82 |
0.06 9 |
0.0 85 |
100 % |
|
s0072 lrem |
0.694 |
0.704 |
86 |
0.05 9 |
0.0 85 |
98.5 8% |
|
Patien t014 |
s0046 lrem |
0.732 |
0.714 |
82 |
0.18 8 |
0.0 85 |
97.4 8% |
s0056 lrem |
0.814 |
0.81 |
74 |
0.12 9 |
0.0 85 |
99.5 1% |
|
s0071 lrem |
0.75 |
0.753 |
80 |
0.12 4 |
0.0 75 |
99.6 % |
|
Patien t015 |
s0047 lrem |
0.526 |
0.524 |
116 |
0.15 1 |
0.0 75 |
99.7 8% |
s0057 lrem |
0.734 |
0.732 |
82 |
0.13 3 |
0.0 96 |
99.7 3% |
|
s0152 lrem |
0.894 |
0.886 |
67 |
0.14 5 |
0.0 96 |
98.4 2% |
|
Patien t016 |
s0052 lrem |
0.982 |
0.988 |
61 |
e |
0.0 75 |
99.3 9% |
s0060 lrem |
0.8 |
0.802 |
75 |
0.10 4 |
0.0 96 |
99.7 5% |
|
s0076 lrem |
1.088 |
1.079 |
55 |
e |
0.0 85 |
99.1 6% |
|
Patien t017 |
s0053 lrem |
0.612 |
0.632 |
98 |
0.12 4 |
0.0 85 |
96.8 3% |
s0055 lrem |
0.968 |
0.959 |
62 |
0.20 7 |
0.0 85 |
99.0 6% |
|
s0063 lrem |
0.774 |
0.77 |
78 |
0.14 6 |
0.0 85 |
99.4 8% |
|
s0075 lrem |
0.976 |
0.974 |
61 |
0.17 3 |
0.0 85 |
99.7 9% |
|
Patien t018 |
s0054 lrem |
0.704 |
0.695 |
85 |
0.12 7 |
0.0 75 |
98.7 % |
s0059 lrem |
0.768 |
0.767 |
78 |
0.13 2 |
0.1 07 |
99.8 7% |
|
s0082 lrem |
0.876 |
0.873 |
68 |
0.17 3 |
0.0 85 |
99.6 6% |
|
Patien t019 |
s0058 lrem |
0.662 |
0.67 |
91 |
0.08 1 |
0.0 96 |
98.8 % |
s0070 lrem |
0.672 |
0.672 |
89 |
0.08 2 |
0.0 64 |
100 % |
|
s0077 lrem |
0.834 |
0.840 |
72 |
0.26 2 |
0.0 96 |
99.2 8% |
|
Patien t020 |
s0062 lrem |
0.862 |
0.852 |
70 |
0.09 9 |
0.0 96 |
98.8 3% |
s0069 lrem |
1.088 |
1.086 |
55 |
0.21 1 |
0.0 96 |
99.8 2% |
|
s0079 lrem |
0.77 |
0.778 |
78 |
0.14 3 |
0.0 96 |
98.9 7% |
International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 1 Issue 6, August – 2012