• 沒有找到結果。

A NOVEL QRS DETECTION ALGORITHM APPLIED TO THE ANALYSIS FOR HEART RATE VARIABILITY OF PATIENTS WITH SLEEP APNEA

N/A
N/A
Protected

Academic year: 2021

Share "A NOVEL QRS DETECTION ALGORITHM APPLIED TO THE ANALYSIS FOR HEART RATE VARIABILITY OF PATIENTS WITH SLEEP APNEA"

Copied!
5
0
0

加載中.... (立即查看全文)

全文

(1)

ABSTRACT

Sleep-related breathing disorders can cause heart rate changes known as cyclical variation. The heart rate variation of patients with obstructive sleep apnea syndrome (OSAS) is more prominent in sleep. For this reason, to analyze heart rate variability (HRV) of patients with sleep apnea is a very important issue that can assist physicians to diagnose and give suitable treatment for patients. In this paper, a novel QRS detection algorithm is developed and applied to the analysis for HRV of patients with sleep apnea. The advantageous of the proposed algorithm is the combination of digital filtering and reverse R wave detection techniques to enhance the accuracy of R wave detection and easily implement into portable ECG monitoring system with light complexities of computation. The proposed algorithm is verified by simulation and experimental results.

Biomed Eng Appl Basis Comm, 2005(October); 17: 258-262. Keywords: heart rate variability, QRS detection, sleep apnea.

Received: April 15, 2005; Accepted: Aug. 22, 2005 Correspondence: Ren-Guey Lee, Professor

Institute of Computer and Communication Engineering, National Taipei University of Technology, Taipei, Taiwan

E-mail: evans@ntut.edu.tw

1. INTRODUCTION

Heart rate and heart rate variability (HRV) during sleep are under the control of the autonomous nervous system. The features of sleep-related breathing disorders are repetitive cessations of respiratory flow and concomitant drops in oxygen saturation; moreover, the variation of heart rate is also obvious. Obstructive sleep apnea (OSA) is the most well-known manifestation of sleep-related breathing disorders. Sleep apnea is characterized by repetitive pauses in respiratory flow of at least 10 seconds which can occur

up to 600 times in one night, and also affects HRV during sleep. In addition the repetitive apneas are accompanied by a pronounced increased variation in heart rate which is strong enough to support diagnosis. Hence, the characteristic pattern of bradycardia and tachycardia during sleep apnea is important information [1].

This study is aimed at R wave detection algorithm of electrocardiogram (ECG) signals for patients with sleep apnea and then to analyze and get the information of HRV, that can assist physicians to diagnose and give suitable treatment for patients. Besides, the telecare device for OSA patients can be developed with a light complexity of computation method for R wave detection. In this paper, the proposed algorithm can execute in micro-controller for this purpose.

This paper is organized as follows. In Section 2,

A NOVEL QRS DETECTION ALGORITHM APPLIED TO

THE ANALYSIS FOR HEART RATE VARIABILITY OF

PATIENTS WITH SLEEP APNEA

R

EN

-G

UEY

L

EE1

, I-C

HI

C

HOU1

, C

HIEN

-C

HIH

L

AI1

, M

ING

-H

SIU

L

IU1

, M

ING

-J

ANG

C

HIU2 1

Institute of Computer and Communication Engineering,

National Taipei University of Technology,

(2)

259

APPLICATIONS, BASIS & COMMUNICATIONS

the methodology of our proposed system is given. Section 3 demonstrates the results of our system. Finally, we conclude our paper in Section 4.

2. METHOD

Generally, the commonly used automatic ECG recognition techniques include two parts: characteristics extraction, and waveform classification and recognition [2-5]. In this paper, the QRS wave detection algorithm is used as the characteristics extraction technique. The R wave is the most outstanding characteristic waveform in ECG signals since it usually has the highest or lowest value in QRS complex wave. The R wave detection is closely related to the discrimination of normal ECG cycle and the calculation of HRV.

A. R Wave Detection Algorithm

The R wave detection technique used in this paper is Modified So and Chan R wave detection algorithm (MSC algorithm) [2] that combined and modified from So and Chan and Tompkins algorithms. The most advantageous of the MSC algorithm is the combination of digital filtering and reverse R wave detection techniques to implement into portable ECG monitoring system.

The flowchart of MSC algorithm with the ability of real-time analysis is depicted in Fig. 1. Basically it can be divided into 6 steps, namely, digital band-pass filtering, signal slope calculation, slope threshold calculation, ECG QRS wave onset detection, R wave location searching, and slope threshold update. The execution steps of the algorithm are described in detail as follows:

(1) Digital band-pass filtering: The band-pass filter can be used to reduce muscle noise, 60 Hz power-line interference, baseline wander, and T wave interference. The setting of band-pass filter is based on the frequency of ECG QRS complex wave from 5 to 15 Hz.

a. Low-pass filter:

The transfer function of low-pass filter in body-attached device is described by

and the difference equation of low-pass filter is given by

The cut-off frequency of low-pass filter is 12 Hz. b. High-pass filter:

The transfer function of high-pass filter is described by

and the difference equation of high-pass filter is given by (1) (3)

1

2 2 6 1 1 ) (     z z z H (2)

nT T

xnT T

x nT x T nT y T nT y nT y 12 6 2 2 2        

1

32 16 1 32 1 ) (        z z z z H (4)

32

] [ 16 32 T nT x nT x T nT y T nT x nT y      

Fig 1. The flowchart of Modified So and Chan R wave detection algorithm.

(3)

The cut-off frequency of high-pass filter is 5 Hz, and the gain is 32.

(2) Signal slope calculation: The slope equation of ECG signal is described by

where X(n) represents the amplitude of the n-th received discrete ECG signal.

(3) Slope threshold calculation: The slope threshold equation is described by

where slope_thresh represents the ratio to the maximum slope. The smaller slope threshold has the higher sensitivity to detect R wave but the lower immunity to noise. On the contrary, the larger slope threshold has the better immunity to noise but the lower sensitivity to R wave detection.

(4) ECG QRS wave onset detection: The QRS wave onset can be detected by using either of the following two conditions, slope(n) > slope_thresh or slope2(n) > slope_thresh2.

Normally the waveform of noise interference is high and sharp. That is, the slope of a single noise point usually exceeds the slope threshold and produces a false detection in the algorithm. However, for two consecutive points, if both of the slopes are larger than the slope threshold or both of the square of slopes are larger than the square of slope threshold, these two points are most probably not the noise signals and can be used the onset of QRS wave.

(5) R wave location searching: According to the parameter setting in the preceding step, there can be two kinds of searching results: positive and reverse R wave detection.

a. Search for the maximum value in the region: positive R wave

b. Search for the minimum value in the region: reverse R wave

(6) Slope threshold update: Every time when R wave detection is completed, maxi must be updated. The update equation is described by

The filter parameter maxi is closely related to the sensitivity of detection to R waves with different amplitudes. The lower the maxi, the higher the sensitivity of detection to the amplitude difference (5) 2) 2X(n 1) X(n (n-1) -2X(n-2)-X slope(n)     (6) maxi 16 am thresh_par sh slope_thre u (7) (8) maxi am filter_par maxi first_max maxi -  onset QRS of height point R of height first_max 

Fig 2. (a) The results of R wave detection, (b) The curve of HRV of Record 119 in MIT-BIH database.

between neighboring R-R waves. Otherwise, the sensitivity would be lower. The first_max parameter represents the difference of height between QRS wave onset and apex of R wave. Since we have to consider the reverse R waves, the absolute value of first_max is taken to ensure that first_max is always positive.

The searching results of R waves are as shown in Fig. 2(a). The x , + , and in Fig. 2(a) represent the positions of QRS wave onset (positive R wave), QRS wave onset (reverse R wave), and R wave respectively. Every time when an R wave is detected, the slope threshold will be updated by using (7) and (8). According to the R wave detection results, two useful data can be acquired. One is HRV and the other is R wave absolute location. The equation to calculate HRV is described by

The curve of HRV is shown in Fig. 2(b).

(9) 60 _ _ u ¸¸ ¹ · ¨¨ © § terval in RR Rate Sample HRV

(4)

261

APPLICATIONS, BASIS & COMMUNICATIONS

MIT-BIH arrhythmia database has been used to verify the accuracy of MSC algorithm. We have also used 46 sets of the ECG record files in MIT-BIH database to test the accuracy of our system and the result is as shown in Table . From Table we can see that the average accuracy for the 46 sets of data is 95% which is acceptable. That is, our proposed algorithm can effectively detect the locations of R-waves, and by monitoring the intervals between R-waves, and it can also effectively detect abnormal HRV conditions.

3. RESULT

In this section, the ECG data of patient A with OSA of National Taiwan University Hospital (NTUH)

Fig 3. The waveforms of HRV analysis in patient A of NTUH: (a) R-R interval per beat, (b) R-R interval per minute.

Table . Results of testing by using 46 sets of ECG record files in MIT-BIH database

Record Total Beats FP*

FN† Accuracy‡ 100 2272 0 0 100% 101 1870 6 1 100% 102 2187 63 63 94% 103 2083 0 1 100% 104 2322 135 42 92% 105 1959 170 783 51% 106 1927 20 120 93% 107 2135 39 41 96% 109 2452 78 158 90% 111 2123 6 7 99% 112 2556 18 1 99% 113 1794 0 0 100% 114 1878 2 3 100% 115 1953 0 0 100% 116 2390 13 35 98% 117 1537 4 2 100% 118 2291 16 13 99% 119 1987 5 5 99% 121 1862 3 4 100% 122 2476 1 1 100% 123 1518 0 0 100% 124 1605 14 28 97% 200 2593 22 30 98% 201 1933 173 240 79% 202 2123 6 19 99% 203 2839 284 425 75% 205 2652 0 4 100% 207 2072 210 470 67% 208 2919 48 84 95% 209 3008 9 5 100% 210 2551 61 160 91% 212 2749 2 1 100% 213 3243 32 39 98% 214 2261 26 26 98% 215 3365 6 4 100% 217 2210 14 12 99% 219 2148 2 141 93% 220 2048 0 0 100% 221 2413 0 14 99% 222 2486 49 46 96% 223 2563 37 79 95% 228 2034 82 101 91% 230 2256 1 1 100% 231 1571 0 2 100% 232 1806 35 9 98% 234 2752 0 1 100% Average 95% *

FP: Number of false detections when there exist no beats but detected as “beats exist”

̙

FN: Number of false detections when there exist beats but detected as “beats does not exist”

̚

(5)

has been used to verify the feasibility of the proposed algorithm, and the practical results are presented. Fig. 3 presents respectively the HRV related waveforms of patient A. Moreover, the HRV differences of normal and OSA are shown in Fig. 4. These results confirm the feasibility of the proposed algorithm, and can support physicians to diagnose.

4. CONCLUSION

In this work, a novel QRS detection algorithm is proposed. Its theoretical evolution and applied results are also presented. The proposed algorithm can precisely detect R wave and further to analyze HRV of patients with sleep apnea. The acquired HRV information via the proposed algorithm can assist physicians to diagnose and give suitable treatment for patients with sleep apnea.

REFERENCE

1. Penzel T, Kantelhardt JW, Grote L, Peter JH, and Bunde A: Comparison of detrended fluctuation analysis and spectral analysis for heart rate variability in sleep and sleep apnea. IEEE Trans. Biomed. Eng. 2003; 50: 1143-1151.

2. Chen CC: A Portable Tele-Emergent System Supporting Electrocardiogram Discrimination. M.S. Thesis, Institute of Computer, Communication and Control, National Taipei University of Technology, Taiwan, June 2004.

3. Jiapu P and Tompkins WJ: A real-time QRS detection algorithm. IEEE Trans. Biomed. Eng. 1985; 32: 230-236.

4. So HH and Chan KL: Development of QRS detection method for real-time ambulatory cardiac monitor. Proceedings of the 19th Annual International Conference of the IEEE Engineering in Medicine and Biology Society 1997; 1: 289-292. 5. Tan KF, Chan KL, and Choi K: Detection of the

QRS complex, P wave and T wave in electrocardiogram. First International Conference on Advances in Medical Signal and Information Processing Proceedings 2000; 41-47.

Fig 4. HRV comparison of normal and obstructive sleep apnea. (Before 370 min. is normal; after 370 min. in patient A of NTUH)

數據

Fig 1. The flowchart of  Modified So and Chan R wave detection algorithm.
Fig 2. (a) The results of R wave detection, (b) The curve of HRV of Record 119 in MIT-BIH database.
Table  . Results of testing by using 46 sets of ECG record files in MIT-BIH database
Fig 4. HRV comparison of normal and obstructive sleep apnea. (Before 370 min. is normal; after 370 min

參考文獻

相關文件

Then, we tested the influence of θ for the rate of convergence of Algorithm 4.1, by using this algorithm with α = 15 and four different θ to solve a test ex- ample generated as

In summary, the main contribution of this paper is to propose a new family of smoothing functions and correct a flaw in an algorithm studied in [13], which is used to guarantee

For the proposed algorithm, we establish a global convergence estimate in terms of the objective value, and moreover present a dual application to the standard SCLP, which leads to

In this paper, we develop a novel volumetric stretch energy minimization algorithm for volume-preserving parameterizations of simply connected 3-manifolds with a single boundary

For the proposed algorithm, we establish its convergence properties, and also present a dual application to the SCLP, leading to an exponential multiplier method which is shown

 The 3SEQ maximum descent statistic describes clus tering patterns in sequences of binary outcomes, a nd is therefore not confined to recombination analy sis... New Applications (1)

A multi-objective genetic algorithm is proposed to solve 3D differentiated WSN deployment problems with the objectives of the coverage of sensors, satisfaction of detection

This research used GPR detection system with electromagnetic wave of antenna frequency of 1GHz, to detect the double-layer rebars within the concrete.. The algorithm