ПРОГРЕСИВН1 ЩФОРМАЦГЙШ ТЕХНОЛОГИ
ПРОГРЕСИВН1 1НФОРМАЦ1ЙН1 ТЕХНОЛОГИ
ПРОГРЕССИВНЫЕ ИНФОРМАЦИОННЫЕ
ТЕХНОЛОГИИ
PROGRESSIV INFORMATICS _TECHNOLOGIES_
UDC 004.021
Dubrovin V. I.1, Tverdohleb J. V.2, Kharchenko V. V.3
Ph.D. in Engineering, professor, Zaporozhye national technical university, Ukraine 2Aspirant, Zaporozhye national technical university, Ukraine 3Student, Zaporozhye national technical university, Ukraine, E-mail: kharchenkoviktoriya@yandex.ua
R-PEAKS DETECTION USING WAVELET TECHNOLOGY
The given work presents the methodology of R-peaks detection in an electrocardiogram signal based on Discrete Wavelet Transformation. The optimal level decomposition of the detail coefficients can be determined by energy, frequency and cross-correlation analyses. The effectiveness of the proposed algorithm has been tested by using records obtained from the MIT/BIH Physionet arrhythmia database.
Keywords: ECG, wavelet transformation, R-peaks detection.
INTRODUCTION
An electrocardiogram (ECG) is a graphic record of the direction and magnitude of electrical activity of the heart that is generated by depolarization and repolarization of the atria and ventricles [1]. ECG gives information about the current state of the cardiovascular system and the pathological changes in the heart. Automatic analysis of the ECG signal is complex theoretical problem. It is closely related to the signal's physiological origin, which is the cause of its nondetermination, diversity, variability, unpredictability, non-stationarity and susceptibility to many kinds of noise. A number of modern mathematics methods have been developed for non-stationary signals' analysis. The most famous one is wavelet transformation, which allows to work with non-stationary signals, detect their features and determine the signal's frequency components' time localization unlike Fourier transformation. The wavelet transformation is signal decomposition into basis functions sets, which are derived from a single prototype wavelet by scaling (dilatations and contractions) and translations (shifts).
A typical ECG tracing of normal heartbeat (or cardiac cycle) consists of P-wave, QRS-complex and T-wave. A small «U-wave» is normally visible in 50 to 75 % of ECGs. The baseline voltage of the electrocardiogram is known as the isoelectric line [1-3]. The starting point for a number of modern computer electrocardiography techniques is
© Dubrovin V. I., Tverdohleb J. V., Kharchenko V. V., 2013
localizing of QRS-complexes, which positions are determined by positions of their maxima - R-peaks. Now there are a lot of methods for detecting the time R-peaks locations, which are based on finding the first and second derivatives, the amplitude estimation etc. Existing methods do not meet the requirements of researches, as they often give insufficient accuracy in R-peaks detection.
In this paper the method of ECG R-peaks detection based on the discrete wavelet transformation is proposed.
1 DISCRETE WAVELET TRANSFORMATION
In the multilevel discrete wavelet transformation the tree connection of low-pass and high-pass filters with different cut-off frequencies is used to analyze the signal through different scales. The approximation coefficients cA (smoothed signal) and the detail coefficients cD (high-frequency fluctuations of the signal) can be determined. The approximation coefficients are obtained by convolving the input signal 5 through the low-pass filter transfer function by formula (1) and then downsampling the convolution result by 2:
cAn = Z hks2n-k , (1)
keZ
where hk represents the k-th low-pass filter coefficient.
ISSN 1607-3274 . PagioeneKTpomKa, rn^opMaTHKa, ynpaBmHHA. 2013. № 2
The detail coefficients are obtained by convolving the input signal 5 with a high-pass filter transfer function by formula (2) and then downsampling the convolution result by 2:
cDn = Z 8ks2n-k , (2)
k<aZ
where gk denotes the k-th high-pass filter coefficient.
2 WAVELET BASIS SELECTION
The selection of mother wavelet is important problem before starting of the detection procedure. But there is no universal method suggested selecting the wavelet basis. The choice of the wavelet depends on the initial signal.
In the given work the wavelet proposed in [4] was used to analyze the ECG signal. It is a wavelet from Daubechies family («db6»). Daubechies wavelets show similarity with QRS-complexes and their energy spectrum is concentrated around the low frequencies [4].
3 R-PEAKS DETECTION METHODOLOGY
Let's consider the fragment of the ECG signal with duration of 3 minutes from the record No. 100 of MIT/BIH arrhythmia database [5]. The wavelet decomposition structure of ECG signal using «db6» wavelet is shown in Fig. 1. The original signal is shown at the top of the plot. The decomposed signal's reconstructed components within eight wavelet scales are shown below.
The detail coefficients of the fourth decomposition level are chosen to detect the R-peaks based on energy, frequency and cross-correlation analyses [4].
Energy analysis. Most of ECG energy of the QRS-complex is concentrated in the frequency range from 4 Hz to 50 Hz. Normally isoelectric segments (PQ, ST and TP) contain no energy and the signal amplitude is zero over these corresponding intervals [4]. The distribution curve of the signal decomposed levels energy is shown in Fig. 2.
10
Id
¿1 4
:
• -»■—
4 6 8 10 12
Decomposition level
14
Fig. 2. Energy plot of wavelet decomposition structure (record No. 100)
tOO Î00 »0 40»
too TOO too «00 tooo
HM 600
Sample
Fig. 1. Decomposition of the ECG signal (record No. 100)
nPOrPECHBHt IHOOPMA^ËHI TEXH0.n0nï
The energy curve shows that the energy is highest at level-4. Therefore, we consider that it consists the significant details of QRS-complexes.
Frequency analysis. Another justification of selecting d4 signal is its available frequency components correlated with that of the QRS-complex. The Fourier Transform of the d4 signal is performed and shown in Fig. 3. The bandwidth of the d4 signal is 2,5-39,5 Hz which is almost same as that ofa QRS-complex [1].
As the signal has the sampling frequency of 360 Hz, the signal's frequency spectrum is limited by the maximum frequency of 180 Hz according to the Nyquist rule.
Correlation analysis. In addition to the above two analyses the cross-correlation analysis between the reconstructed components and the original ECG signal was performed. This provides us the time domain relationship between the original and the decomposed signals. The analysis results are shown in table 1.
Table 1. Cross-correlation coefficients
Details Cross-correlation coefficient
d1 0,025
d2 0,112
d3 0,384
d4 0,585
d5 0,479
d6 0,317
d7 0,227
d8 0,202
From table 1 it is clear that the cross-correlation coefficient value of d4 is highest. So, it is obvious that the signal can be reconstructed by one branch of the wavelet coefficients. The 4th decomposition level is highly correlated with the original signal in time domain.
The algorithm of R-peaks detection consists of the following steps.
Step 1. Compute the signal decomposition up to 4 level.
Step 2. Carry out the signal reconstruction of the 4th decomposition level based on one branch of the wavelet coefficients.
Step 3. Determine the R-peaks locations as non-zero samples of d4.
Step 4. Eliminate the fault founded R-peaks using the following conditions:
- the normal QRS-complex duration must be 100 ms;
- the minimum value of RR-interval must be 200 ms.
4 RESULTS AND DISCUSSION
The proposed algorithm for R-peaks detection was implemented in the MatLab environment (v. 6.5) with the Wavelet Toolbox. The sample ECG signals of the present study were obtained from the MIT/BIH database via Physionet website [5]. MIT/BIH is a de facto standard of the testing of devices, systems and software intended for cardiac monitoring. The MIT/BIH arrhythmia database contains 48 two-channel records (each 30 minutes long) with the sampling frequency of360 Hz annotated by qualified medical professionals. As the annotations are assumed to
:I0J
1901
V
ID
3
3 «
ts
- T r i 1- 1 1 r
0 2D 4] ED M 10Û 120 14 IfB ISO
- i ^wiftikil»... 1 i -
O 2D <1 SO M lOO 1» 1« MO ISO
- -
O 73 <0 SO » 100 120 id 1» 160
" jml : -
0 2) A n w ID 130 140 1« 180
i
0 20 « ED » 100 120 140 IS ■en
■À -
5 20 4] 50 M 100 120 1J0 KO ■ BO
0 JO « № » « 1» 140 1« 160
0 XI « 5D w 100 120 140 160 ID
H
73
SO » 1(0
Frequency, Hz
is
I»
in
Fig. 3. Frequency distribution of details and ECG (record No. 100)
ISSN 1607-3274 . Радюелектронжа, шформатика, управлшня. 2013. № 2
be 100 % correct, the algorithm efficiency is determined by comparing the obtained results with them.
To assess the performance two statistical measurements were used [6]. These are the Sensitivity (Se), which gives the fraction of real events that are correctly detected and it is defined by formula (3):
Se = -
TP
TP + FN
-•100%,
(3)
and the Positive Predictivity (P+ ), which is the fraction of detections that are real events and it is defined by formula (4):
P+ =
TP
TP + FP
-•100%,
(4)
where FN (False Negatives) denotes the number of missed detections, FP (False Positives) represents the number of extra detections and TP (True Positives) is the number of the correctly detected QRS-complexes.
The average Sensitivity of the algorithm is 99,64 % and its Positive Predictivity is 99,82 %.
CONCLUSION
The algorithm is presented for the detection of the R-peaks in an ECG signal. This algorithm is based on the discrete
wavelet transformation. The detail coefficients of the fourth decomposition level are chosen to detect the R-peaks based on energy, frequency and cross-correlation analyses. The algorithm is evaluated for a number of records obtained from the MIT/BIH arrhythmia database. The accuracy of the algorithm is high due to the criteria (average Sensitivity is 99,64 % and average Positive Predictivity is 99,82 %.).
SPISOK LTTERATURY
1. Хан, М. Г. Быстрый анализ ЭКГ / М. Г. Хан. - М. : Бином, 1999. - 286 с.
2. Hampton, J. R. 150 ECG Problems / J. R. Hampton. - UK : Elsevier Science Health Science Division, 2008. - 320 p.
3. Зайченко, К. В. Съем и обработка биоэлектрических сигналов / К. В. Зайченко, О.О. Жаринов, А. Н. Кулин.- С.Пб. : РИО ГУАП, 2001. - 140 с.
4. Awadhesh, Pachauri Robust detection of R-wave using wavelet technique / Awadhesh Pachauri, Manabendra Bhuyan // World Academy of Science, Engineering and Technology. -2009. - № 56. - P. 56-60.
5. MIT-BIHArrhythmia Database [electronic resource]. - Access mode: http://www.physionet.org/physiobank/database/ mitdb.
6. (ANSI/AMIEC57): Testing and reporting performance results of cardiac hythm nd ST segment measurement algorithms, 1998. (AAMI Recommended Practice / American National Standard).
Стаття надшшла до редакцй 16.09.2013.
Дубровин В. И.1, Твердохлеб Ю. В.2, Харченко В. В.3
'Канд. техн. наук, профессор, Запорожский национальный технический университет, Украина
2Аспирант, Запорожский национальный технический университет, Украина
3Студентка, Запорожский национальный технический университет, Украина
ВЫЯВЛЕНИЕ R-ПИКОВ КАРДИОСИГНАЛ С ИСПОЛЬЗОВАНИЕМ ВЕЙВЛЕТ-ТЕХНОЛОГИИ
Данная работа посвящена методике обнаружения К-пиков сигнала ЭКГ, основанной на применении дискретного вейвлет-преобразования. Выбор детализирующих коэффициентов 4-го уровня разложения кардиосигнала был сделан на основании результатов проведенных энергетического, частотного и корреляционного анализов. Эффективность предложенного алгоритма была проверена с использованием записей из базы данных аритмий М1Т-В1Н РЬувюпе!
Ключевые слова: ЭКГ, вейвлет-преобразование, обнаружение К-пиков.
Дубровш В. I.1, Твердохлiб Ю. В.2, Харченко В. В.3
'Канд. техн. наук, професор, Запорiзький нацюнальний техшчний ушверситет, Украша
2Астрант, Запорiзький нацюнальний техшчний ушверситет, Украша
3Студентка, Запорiзький нацюнальний техшчний ушверситет, Украша
ВИЯВЛЕННЯ R-ПIКIВ КАРД1ОСИГНАЛУ З ВИКОРИСТАННЯМ ВЕЙВЛЕТ-ТЕХНОЛОГП
Дана робота присвячена методищ виявлення К-пшв сигналу ЕКГ, заснованш на застосуванш дискретного вейвлет-перетво-рення. Вибiр деталiзуючих коефщенив 4-го рiвня розкладання кардиосигнала було зроблено на пiдставi результата проведе-них енергетичного, частотного та кореляцшного аналiзiв. Ефективнють запропонованого алгоритму була перевiрена з викорис-танням запиав з бази даних аритмш М1Т-В1Н Physionet.
Ключовi слова: ЕКГ, вейвлет-перетворення, виявлення К-пшв.
REFERENCES
1. Khan M. G. By'str y'j analiz E'KG. Moscow, Binom, 1999, 286 p.
2. Hampton J. R. 150 ECG Problems. United Kingdom, Elsevier Science Health Science Division, 2008, 320 p.
3. Zajchenko K. V., Zharinov O. O., Kulin A. N. S''yom i obrabotka bioe'lectricheskix signalov. Saint Petersburg, RIO GUAP, 2001, 140 p.
4. Awadhesh Pachauri, Manabendra Bhuyan. Robust detection of R-wave using wavelet technique, World Academy of Science, Engineering and Technology, 2009, No. 56, pp. 56-60.
5. MIT-BIH Arrhythmia Database [electronic resource]. -Access mode: http://www.physionet.org/physiobank/ database/mitdb.
6. (ANSI/AMI EC57): Testing and reporting performance results of cardiac hythm nd ST segment measurement algorithms, 1998. (AAMI Recommended Practice / American National Standard).