Научная статья на тему 'Bundle branch block detection based on QRS analysis of digital ECG signal'

Bundle branch block detection based on QRS analysis of digital ECG signal Текст научной статьи по специальности «Медицинские технологии»

CC BY
110
15
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
ECG / MATHEMATICAL ANALYSIS / BUNDLE BRANCH BLOCK / QRS-COMPLEX / HEART DISEASES

Аннотация научной статьи по медицинским технологиям, автор научной работы — Davydov Nikita S, Khramov Alexander G.

In this study a new method of bundle branch block detection based on simple mathematical analysis is proposed. During our research we have done analysis of digital ECG signal and formulated a new algorithm of detection, which uses the most common mathematical methods of maximum and minimum search and calculating the mean value. All pieces of evidence of bundle branch block, which is used in this study, connected with QRS-complex and it properties. Besides part of QRS-complex detection, this method does not use any of signal transformation. QRS-detection algorithm does not effect on next stages and can be changed if it necessary. Final algorithm has been studied by 39 test samples. As a result of it 73% sensitivity has been reached.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Bundle branch block detection based on QRS analysis of digital ECG signal»

Bundle branch block detection based on QRS analysis of digital ECG signal

Nikita S. Davydov*, Alexander G. Khramov

Technical cybernetics department, Samara National Research University, 34 Moskovskoe Shosse, Samara 443086, Russia

* e-mail: amail9496@gmail.com

Abstract. In this study a new method of bundle branch block detection based on simple mathematical analysis is proposed. During our research we have done analysis of digital ECG signal and formulated a new algorithm of detection, which uses the most common mathematical methods of maximum and minimum search and calculating the mean value. All pieces of evidence of bundle branch block, which is used in this study, connected with QRS-complex and it properties. Besides part of QRS-complex detection, this method does not use any of signal transformation. QRS-detection algorithm does not effect on next stages and can be changed if it necessary. Final algorithm has been studied by 39 test samples. As a result of it 73% sensitivity has been reached.

Keywords: ECG, mathematical analysis, bundle branch block, QRS-complex, heart diseases.

Paper #3101 received 2016.09.21; revised manuscript received 2016.09.28; accepted for publication 2016.09.29; published online 2016.09.30. doi: 10.18287/JBPE16.02.030401

References

1. Cardiovascular diseases, World Health Organization (2016).

2. T. Jeon, B. Kim, M. Jeon, and B.-G. Lee, "Implementation of a portable device for real-time ECG signal analysis," BioMedical Engineering OnLine 13(1), 160 (2014).

3. E. I. Chazov, Guide to Cardiology, Moscow (2014).

4. G. I. Storghakov, and A. A.Gorbachenko, Guide to Cardiology, Moscow (2008).

5. V. N. Orlov, Guide to electrocardiography, Medical informational agency, Moscow (1997).

6. Y. I. Zubdinov. Alphabet of ECG, Rostov on Don (2003).

7. J Parak and J Havlik, "Ecg signal processing and heart rate frequency detection methods," Proceedings of Technical Computing Prague 8, 56-62 (2011).

8. Bundle Branch Block, Khabarovsk (2010).

9. X. Xu, and Y. Liu, "ECG QRS Complex Detection Using Slope Vector Waveform (SVW) Algorithm," IEMBS '04. 26th Annual International Conference of the IEEE, 3597-3600 (2004).

10. S. K. Salih, S. A. Aljunid, A. Yahya, and K. Ghailan, "A Novel Approach for Detecting QRS Complex of ECG signal," International Journal of Computer Science 9(6), 205-215 (2012).

11. S. Sumathi, and M. Y. Sanavullah, "Comparative Study of QRS Complex Detection in ECG Based on Discrete Wavelet Transform," International Journal of Recent Trends in Engineering 2(5), 273-277 (2009).

12. I. Sharma, R. Mehra, and M. Singh, "Adaptive filter design for ECG noise reduction using LMS algorithm," 4th International Conference on, Noida, 1-6 (2015).

13. A. A. Fedotov, A. S. Akulova, and S. A. Akulov, "Effective QRS-Detector Based on Hilbert Transform and Adaptive Thresholding," IFMBE Proceedings 57, 140-144 (2016).

1 Introduction

Diseases of the cardiovascular system are on the first place in the death rate in modern world [1].

Consequently, question about how early diagnosis and detection diseases on first stage can be implemented arises nowadays.

Algorithm of medical data analysis must be as accurate as it possible and have necessary calculation complexity to be able to give result of diagnosis in short time and with high specificity and sensitivity. Also it should not be too complicated and consume too much resources of calculating machine. Today most of the people have their own calculating machines are known as smartphones, or tablet PCs or smart bracelets or watches. And in the information age all people want to take care of their own health by using their pocket devices [2]. But not each of popular gadgets has enough performance to calculate and process millions of numbers, to do it quickly and to give accurate result.

Among the numerous methods of cardiovascular system research, the main place belongs to electrocardiography or ECG [3-5]. The analysis of ECG-signal can help doctors to make a conclusion about state of patient. In this signal, special attention focused on several peaks, which repeat in certain period and marked with letters P, Q, R, S, T and U [6]. Also time of each peak and interval is detected on ECG that allows determining the length of every process in the heart. The simplest to detect is complex that consists of three peaks: Q, R and S. Based on this data, computer can calculate cardiac rhythm of patient [7]. Length and form of QRS complex in a different leads of ECG can show presence or absence of anomalies and pathologies that indicate various heart diseases, for example, bundle branch block. [8]. Allocation of QRS-complex may be done by several methods that can be applied to different type of signal raw or filtered, e.g., slope vector waveform algorithm, novel approach or discrete wavelet transformation [9-12]. Method that uses in this study based on other R-peak detection method and has some improvements to detect Q and S peaks [13].

2 Materials and methods

2.1 QRS detection method

QRS detection starts from algorithm, based on Hilbert transform and band pass filtration. This basic algorithm allows detecting R-peak in ECG signal (see Fig. 1). R peak is a most visible peak throughout ECG signal. Proceeding from its location - Q and S peaks become easy to find.

In used method several steps are performed [13]:

- frequency filtering of raw input ECG-signal;

- Hilbert transform from filtered signal;

- calculating amplitude of analytic signal to get envelope curve;

- squaring amplitude of analytic signal to increase high-amplitude components.

In this algorithm, for frequency filtration band-pass filter is used. Bandwidth of filter is interval for 8 Hz to 20 Hz. It is caused by empiric research, because in that interval noise from muscles and other electrodes is erased. Then filtered signal is subject to Hilbert Transformation. This step prevents from phase delay and time delay. The point of adaptive algorithm is to in

formation of sliding window where algorithm is searching for maximum values that exceed the threshold. Threshold is determined a following formula:

L(i) =

0,4 •M(i); if a(i) > 0,2 • M(i) and M(i) < 2 • M(i — 1); 0,4 • M(i — 1); if a(i) > 0,2 • M(i) and M(i) > 2 • M(i — 1); 1,6 •a(i); if a(i) < 0,2 • M(i).

where L - threshold; a - value of standard deviation of signal amplitude in limits of current sliding window; M - maximum amplitude of signal in limits of current sliding window.

1 1 •

nJ-A| ¡¡¡J*

Fig. 1 Result of algorithm's work. Red points are R peaks.

After detection of R peak, it possible to find two minimums from left and right side in certain interval. To define this interval, we must know location of two neighboring R peaks that is called RR-interval. Then left RR interval and right RR interval divided into two subintervals, where necessary minimum is. To the left of the R peak subinterval includes Q peak and to the right of the R peak subinterval includes S peak (see Fig. 2). Also, to decrease computing, it is possible to divide both RR intervals into lesser subintervals. However, it is not such necessary, because quantity of information between two R peaks depends on sampling frequency and often does not exceed this limit.

Fig. 2 The result of the algorithm of QRS detection.

2.2 Broadening detection method

The first evidence of bundle branch block is broadening of QRS complex in the second standard lead. Bundle of His is a part of electrical conduction system in heart,

and when it is blocked by some reason, passing time of electric impulse increases. The normal duration of QRS complex in the second standard lead is 80-120 milliseconds. But when it is blocked, length of complex becomes more then 120 milliseconds.

To define length of QRS complex in the second lead of ECG complex, we need to calculate the average value of QRS complex in ECG signal. Summarize length of each QRS complex and divide it into their amount in signal, we simply get the answer. Duration of each QRS complex is calculated by subtracting time coordinates of S peak and Q peak. Also, amount of QRS complexes is a number of R peaks that has been detected in the previous step. It can be described by following formula:

N

T= 1Z(5(£)-c(£))'

¿=1

where T - mean length of QRS-complex in signal; N - amount of QRS-complexes in ECG-signal; S(i)>Q(i) - coordinates of S and Q peaks of QRS complex.

2.3 Analysis of V1 and V2 leads

However, ECG can be damaged and standard leads may be lost. In this situation, we can check chest ECG leads. First of them are V1 and V2 leads. In case of blocking left or right branch, there are different pieces of evidence that can be found in these leads.

2.3.1 Left branch block

In the case of left branch block, QRS complex has some changes connected with S peak and R peak. In this situation, amplitude of S peak much bigger, then amplitude of R peak that vice versa, lose its height. To detect this pathology, we need to calculate isoline of QRS complex. This line may be found by averaging signal values from the interval between Q peak and left neighboring peak S and S peak and right neighboring peak Q (see Fig. 3). It can be described by following formula:

N1 N2

1 i=1 2 i=1

where QRS - mean value for QRS-complex; N1 -amount of counts between Si-i peak and Qi peak; X(i) -count from interval between Si-i peak and Qi peak; N2 - amount of counts between Qi peak and Si+i peak; Y(i) - count from interval between Qi peak and Si+i peak.

After that, concerning this line, we can calculate amplitude of R and S peaks. The normal amplitude ratio is 4 or more, so R peak must be more than four times higher than S peak.

I is. i

Isoline

\

1 R i

0.3 0.4 0.5

Fig. 3 The isoline and R and S peaks in V1 lead. 2.3.2 Right branch block

In the case of right branch block, form of QRS complex strongly changes. After QRS complex appears additional peak that might be called R1. It has quite similar amplitude with R peak and goes immediately after S peak. QRS complex changes its form to letter "M".

This anomaly can be detected by searching maximum after S peak in 50 millisecond interval (see Fig. 4). Then amplitude of R1 peak might be checked and compared with amplitude of S peak.

Both amplitudes can be calculated by isoline and then be compared. Usually, after S peak goes T peak that has lesser amplitude than amplitude of S peak. Comparison of these two values allows making conclusion about patient's state.

2.4 Analysis of V5 and V6 leads

If the first two chest leads are missing, we can use V5 and V6 leads instead. In different type of blocks, there are different pieces of evidence.

2.4.1 Left branch block

QRS complex in V5 and V6 chest leads has the same form and parameters as normal, except one feature. On ascending or descending side of QRS complex we can see a little notch. It can be describe as pair of local minimum and maximum using mathematical terms (see Fig. 5).

R #

R1

P

A

"V

: 0,05

:

2.4.2 Right branch block

When the patient has right bundle branch block, in chest leads V5 and V6 we can see broadening of all QRS complex and especially broadening of S peak. The normal length of S peak is 20 milliseconds (see Fig. 6).

Fig. 4 Additional peak and its location

Fig. 6 Broadening of S peak.

0.92

0.91

0.905

-

R

-

S i

(

V

3.19

3.2 3.202 3.204 3.206 3.208 3.21 3.212 3.214 3.216

Fig. 5 Notch near R peak.

This pathological feature can be found by one of the one dimensional search algorithms. If algorithm has found at least one local minimum or maximum, it will confirm the presence of the disease.

To detect this anomaly we should take maximum value in 10 milliseconds to the right of detected S peak and value in 10 milliseconds to the left of S peak. In normal state, S peak has left value bigger than right value. If it is not, it is detected as anomaly.

3 Result and discussion

Based on the formulated algorithm, we created program modules that implement early described methods. All modules were realized in MATLAB with help of WFDB Toolbox from Massachusetts Institute of Technology.

During all experiments we used 39 samples. Each of them has all 12 leads and diagnosis that had been made by specialist. 30 signals have sampling frequency 1 KHz and 9 signals have sampling frequency 257 Hz. The 39 test samples include:

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

- 18 ECG of healthy patients;

- 15 ECG of patients with bundle branch block;

- 6 ECG of other type of heart block.

The point of experiment is in gradual reduction of input data's size, because small amounts of data can guarantee faster processing that may safe life and time of patient.

Table 1 Sensitivity and specificity of final algorithm.

Amount of input counts Sensitivity Specificity

100000 0,67 0,75

80000 0,67 0,75

75000 0,67 0,75

50000 0,67 0,71

25000 0,53 0,75

12500 0,67 0,75

6250 0,73 0,75

3125 0,67 0,71

From the experimental results (Table 1), we can see that with reducing of amount of input data, accuracy of algorithm expectedly decreases. It is connected with the loss of data, because most of algorithms formulated before are based on calculation of average.

However, value of sensitivity and specificity is quite stable. The mean value of sensitivity and specificity is 0,66 and 0,74 with standard deviation 0,057 and 0,019.

At figure 7 you can see how sensitivity and specificity are changing during tests from 100000 counts to 3125. On the fifth experiment algorithm showed abruptly drop in sensitivity (see Fig. 7). It might be connected with loss of information about QRS complexes that had the greatest broadening and had maximum weight in calculation of average.

Fig. 7 Sensitivity (green) and specificity (red) during experiments.

4 Conclusions

To summarize all results, it is necessary to notice that this algorithm does not give enough sensitivity and specificity because of its low resource consumption. It is based on information that it can get from parameters of QRS complex, but there are some others pieces of evidence that were not used.

This algorithm may be finalized by following ways:

- using properties of other peaks, such as P, T and U;

- replacing operations that depends on amount if input data, such us calculation of average;

- using more test samples with different sample frequency and large quantity of counts;

- using different method of QRS detection;

- using not only simple algorithm, such as searching of maximum and minimum.

However, this study can show that simplification of detection method cannot give good results even if it is based on easy to understand operation that doctors do every day.

Also, it is necessary to remember that not each of modern gadgets has enough performance to calculate several transformations of signal form different leads in a short time. So this algorithm might be improved by step that described above, but it may cost a lot time of calculation.

i Надоели баннеры? Вы всегда можете отключить рекламу.