TWI552722B - R-wave detection algorithm using enhanced so and chan method - Google Patents

R-wave detection algorithm using enhanced so and chan method Download PDF

Info

Publication number
TWI552722B
TWI552722B TW103101206A TW103101206A TWI552722B TW I552722 B TWI552722 B TW I552722B TW 103101206 A TW103101206 A TW 103101206A TW 103101206 A TW103101206 A TW 103101206A TW I552722 B TWI552722 B TW I552722B
Authority
TW
Taiwan
Prior art keywords
slope
threshold
wave
data
value
Prior art date
Application number
TW103101206A
Other languages
Chinese (zh)
Other versions
TW201526871A (en
Inventor
張振豪
蘇思豪
林志鴻
Original Assignee
國立中興大學
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 國立中興大學 filed Critical 國立中興大學
Priority to TW103101206A priority Critical patent/TWI552722B/en
Publication of TW201526871A publication Critical patent/TW201526871A/en
Application granted granted Critical
Publication of TWI552722B publication Critical patent/TWI552722B/en

Links

Description

使用加強型So and Chan方法的R波偵測演算法 R-wave detection algorithm using enhanced So and Chan method

本發明係關於一種心電圖偵測的相關領域,特別是指一種使用加強型So and Chan方法的R波偵測演算法。 The invention relates to a related field of electrocardiogram detection, in particular to an R wave detection algorithm using a reinforced So and Chan method.

ECG的研究迄今已經超過50個年頭,所衍伸出的R波偵測的演算法也是多的數不勝數,常見的有小波轉換(wavelet)演算法、Tompkins演算法和動態閥值演算法等,本技術採用的是基於動態閥值演算法的So and Chan演算法並進行改良。 ECG research has been more than 50 years old, and the algorithms for R-wave detection are numerous. There are many wavelet transform algorithms, Tompkins algorithms and dynamic threshold algorithms. The technology uses the So and Chan algorithm based on the dynamic threshold algorithm and is improved.

So and Chan演算法是將取得的時域數據的每一點做斜率計算,接著找出最大斜率並訂定閥值來偵測QRS複合波,最後再偵測出R波的位置,由於此演算法是以計算斜率的方式來偵測R波,所以基線漂移的雜訊對其幾乎沒有影響。Modified So and Chan演算法針對受測者ECG訊號具有R波反轉的情況作改良,是將斜率做平方計算,若連續兩個點的斜率平方大於斜率閥值的平方則判定QRS_onest,此方法可以有效的偵測到正常的R波與R波反轉的情況。 The So and Chan algorithm calculates the slope of each point of the acquired time domain data, then finds the maximum slope and sets the threshold to detect the QRS complex, and finally detects the position of the R wave, due to this algorithm. The R wave is detected by calculating the slope, so the noise of the baseline drift has little effect on it. The Modified So and Chan algorithm improves the RG inversion of the subject's ECG signal by squared the slope. If the square of the slope of two consecutive points is greater than the square of the slope threshold, the QRS_onest is determined. Effectively detects normal R wave and R wave inversion.

請參考第1圖,係表示習知So and Chan演算法的流程圖。So and Chan演算法是由H.H.So和K.L.Chan於1997年發表之論文中所提及,此演算法為改良Friesen等人於1990年發表之論文而成。習知So and Chan演算法的步驟係包括:步驟SA1:提供心電圖資料;步驟SA2:根據提供的資料計算斜率;步驟SA3:獲取斜率最大值;步驟SA4:計算斜率閥值; 步驟SA5:確認連續兩點之斜率是否大於斜率閥值;若否,則回到步驟SA2;若是,則繼續下一步驟;步驟SA6:檢測QRS複合波起始點(QRS onset);步驟SA7:檢索R波最大值(R-peak);以及步驟SA8:更新斜率閥值,並回到步驟SA4。 Please refer to FIG. 1 for a flow chart showing a conventional So and Chan algorithm. The So and Chan algorithm was mentioned in a paper published by H.H.So and K.L.Chan in 1997. This algorithm was developed to improve the paper published by Friesen et al. in 1990. The steps of the conventional So and Chan algorithm include: step SA1: providing electrocardiogram data; step SA2: calculating a slope according to the provided data; step SA3: obtaining a slope maximum value; step SA4: calculating a slope threshold; Step SA5: confirm whether the slope of two consecutive points is greater than the slope threshold; if not, return to step SA2; if yes, proceed to the next step; step SA6: detect the QRS complex start point (QRS onset); step SA7: The R wave maximum value (R-peak) is retrieved; and step SA8: the slope threshold is updated, and the process returns to step SA4.

其中,在上述步驟SA2中,So and Chan演算法是將取得的時域數據的每一點做斜率計算,如公式(1)所示,slope(n)=-2X(n-2)-X(n-1)+X(n+1)+2X(n+2)…(1)。 Wherein, in the above step SA2, the So and Chan algorithm calculates the slope of each point of the acquired time domain data, as shown in the formula (1), slope ( n )=-2 X ( n -2)- X ( n -1) + X ( n +1) + 2 X ( n + 2) (1).

接著,在上述步驟SA3及步驟SA4,找出最大斜率並訂定閥值來偵測QRS複合波,最後再偵測出R波的位置,由於此演算法是以計算斜率的方式來偵測R波,所以基線漂移的雜訊對其幾乎沒有影響。計算斜率閥值(slope_threshold)係如公式(2), Then, in the above steps SA3 and SA4, the maximum slope is determined and the threshold is set to detect the QRS complex, and finally the position of the R wave is detected, because the algorithm detects the slope by calculating the slope. Waves, so the noise of the baseline drift has little effect on it. Calculate the slope threshold (slope_threshold) as shown in equation (2).

閥值的參數(threshold_parameter)可依心電圖的電壓振幅做調整為2、4、8、16;閥值代表與第i秒訊號中的最大斜率max i的倍率比值,當參數越小表示對R波偵測時有較高的靈敏度,但對抗雜訊的能力較差;而參數越大表示對R波的靈敏度較差,但是對抗雜訊的能力卻較強,在此選用8,當連續兩點的斜率大於斜率閥值時,代表此點為QRS波的起始位置(QRS onset),往下找出最大值即可定位出R波所在位置。每次偵測出R波後,maxi則更新一次,公式(3)及公式(4)如下: first_maxi=Height of R point-height of QRS onset…(4)。 The threshold parameter (threshold_parameter) can be adjusted to 2, 4, 8, 16 according to the voltage amplitude of the electrocardiogram; the threshold value represents the ratio of the magnification of the maximum slope max i in the ith second signal, and the smaller the parameter, the pair of R waves It has higher sensitivity when detecting, but has poorer ability to resist noise. The larger the parameter, the lower the sensitivity to R wave, but the stronger the ability to resist noise. In this case, select 8 when the slope of two consecutive points When it is greater than the slope threshold, it represents the starting point of the QRS wave (QRS onset), and the maximum value can be found below to locate the R wave. Each time the R wave is detected, maxi is updated once. Equation (3) and formula (4) are as follows: First _maxi= Height of R po int- height of QRS onset (4).

濾波器參數(filter_param)亦可設定為2、4、8、16,在此選用16,maxi的初始值預設為第一秒訊號中的最大斜率值。 The filter parameter (filter_param) can also be set to 2, 4, 8, and 16. Here, 16 is selected, and the initial value of maxi is preset to the maximum slope value in the first second signal.

此演算法適用在具移動性和即時性的心電圖監測系統,因其具有兩大特點:1.演算法的計算量少,較容易在可即時偵測的晶片上實現;2.其有對R波振幅大小具適應性的濾波參數,可增加其靈敏度。 This algorithm is applicable to the ECG monitoring system with mobility and immediacy, because it has two major features: 1. The algorithm has less computational complexity and is easier to implement on a wafer that can be detected immediately; 2. It has a pair of R Wave amplitude and adaptive filter parameters can increase its sensitivity.

但若雜訊為尖銳且陡峭的波形則容易造成誤判,若ECG波形具有R波反轉(QS complex)和RSR’波和T波高尖情形時偵測能力較差。 However, if the noise is sharp and steep, it is easy to cause misjudgment. If the ECG waveform has R wave inversion (QS complex) and RSR' wave and T wave high tip, the detection ability is poor.

Modified So and Chan演算法為台北科技大學於2008年發表,針對原始的So and Chan作改良並加入Tompkins演算法中的一些技巧,此方法針對受測者ECG訊號具有R波反轉的情況作改良。是將斜率做平方計算,若連續兩個點的斜率平方大於斜率閥值的平方則判定QRS_onest,此方法可以有效的偵測到正常的R波與R波反轉的情況。 The Modified So and Chan algorithm was published by the Taipei University of Science and Technology in 2008. It was developed for the original So and Chan and added some techniques in the Tompkins algorithm. This method improves the RG inversion of the ECG signal of the subject. . The slope is calculated as a square. If the square of the slope of two consecutive points is larger than the square of the slope threshold, the QRS_onest is determined. This method can effectively detect the normal R wave and R wave inversion.

請參考第2圖,係表示習知Modified So and Chan演算法的流程圖。Modified So and Chan演算法的步驟係包括:步驟SB1:提供心電圖資料;步驟SB2:計算斜率;步驟SB3:獲取斜率最大值;步驟SB4:計算斜率閥值;步驟SB5:確認連續兩點之斜率是否大於斜率閥值;若否,則繼續下一步驟;若是,則將QRS複合波起始參數(QRS onset)設定為True並將最大值參數(Max)設定為True(步驟SB51),再跳到步驟SB7;步驟SB6:確認連續兩點之斜率之平方值是否大於斜率閥值的平方值;若否,則回到步驟SB2;若是,則將QRS複合波起始參數(QRS onset)設定為True並將最大值參數(Max)設定為False(步驟SB61),再進行下一步驟;步驟SB7:確認QRS onset是否為True;若是,則R波等待次數(Wait_R)加1(步驟SB71),並繼續進行下一步驟;若否,則直接進行下一步驟;步驟SB8:確認Wait_R是否等於100;若否,則回到步驟SB2;若是,則繼續進行下一步驟;步驟SB9:確認最大值參數(Max)是否為True;若是,則檢索最大值max_point(步驟SB91),並進行下一步驟;若否,則檢索最小值min_point(步驟SB92),並進行下一步驟; 步驟SB10:將Wait_R設定為0;以及步驟SB11:更新斜率閥值,並結束流程。 Please refer to FIG. 2, which is a flow chart showing a conventional Modified So and Chan algorithm. The steps of the Modified So and Chan algorithm include: step SB1: providing electrocardiogram data; step SB2: calculating slope; step SB3: obtaining slope maximum; step SB4: calculating slope threshold; step SB5: confirming whether the slope of two consecutive points is Greater than the slope threshold; if not, proceed to the next step; if yes, set the QRS complex start parameter (QRS onset) to True and set the maximum parameter (Max) to True (step SB51), then jump to Step SB6: Step SB6: confirm whether the square value of the slope of two consecutive points is greater than the square value of the slope threshold; if not, return to step SB2; if yes, set the QRS complex start parameter (QRS onset) to True And setting the maximum value parameter (Max) to False (step SB61), and proceeding to the next step; step SB7: confirming whether QRS onset is True; if yes, increasing the number of R wave waits (Wait_R) by 1 (step SB71), and Proceed to the next step; if not, proceed directly to the next step; step SB8: confirm whether Wait_R is equal to 100; if not, return to step SB2; if yes, proceed to the next step; step SB9: confirm the maximum parameter (Max) is No; True; if yes, the maximum value max_point is retrieved (step SB91), and the next step is performed; if not, the minimum value min_point is retrieved (step SB92), and the next step is performed; Step SB10: Set Wait_R to 0; and Step SB11: Update the slope threshold and end the flow.

基於So and Chan和Modified So and Chan,提出了一個新的方法,就是當偵測到一個R波後,即暫停偵測QRS_onset一段時間,且R波偵測使用的並不是在偵測到QRS_onset後一段時間內的波峰最大值,而是選擇第一個轉折點,這樣的方式可以有效的改善發生RSR’波還有T波過高的誤偵測情形;且本案發明之技術減少Modified So and Chan中一直在計算斜率平方的運算量,是將斜率為負的值取絕對值後再做判斷,此方法一樣可以準確的偵測到逆向R波;並且在偵測到逆向R波時,不做閥值的更新。 Based on So and Chan and Modified So and Chan, a new method is proposed, that is, when an R wave is detected, the QRS_onset is paused for a period of time, and the R wave detection is not used after detecting the QRS_onset. The maximum value of the peak in a period of time, but the selection of the first turning point, this way can effectively improve the occurrence of false detection of RSR' wave and T wave too high; and the technology of the present invention reduces the Modified So and Chan The calculation of the square of the slope has been calculated. The absolute value of the slope is taken as an absolute value. This method can accurately detect the reverse R wave. When the reverse R wave is detected, the valve is not used. The value is updated.

本發明係提供一種使用加強型So and Chan方法的R波偵測演算法,其步驟係包括:步驟SC1:提供心電圖資料;步驟SC2:計算一斜率;步驟SC3:獲取一斜率最大值;步驟SC4:計算一斜率閥值;步驟SC5:確認該斜率是否為正值;若是,則進行下一步驟;若否,則計算該斜率的絕對值,並確認連續兩點之的該斜率絕對值是否大於該斜率閥值;若否,則回到該步驟SC2;若是,則進行一步驟SC7;步驟SC6:確認連續兩點之之該斜率是否大於該斜率閥值;若否,則回到該步驟SC2;若是,則繼續進行下一步驟;步驟SC7:檢測一QRS複合波起始點;步驟SC8:檢索一R波最大極值或一R波最小極值;步驟SC9:延遲時間;以及步驟SC10:假若該斜率為正值的話,則更新該斜率閥值,並結束流程。 The present invention provides an R wave detection algorithm using the enhanced So and Chan method, the steps of which include: step SC1: providing electrocardiogram data; step SC2: calculating a slope; step SC3: obtaining a slope maximum value; step SC4 : calculating a slope threshold; step SC5: confirming whether the slope is positive; if yes, proceeding to the next step; if not, calculating the absolute value of the slope, and confirming whether the absolute value of the slope of two consecutive points is greater than The slope threshold; if not, return to the step SC2; if yes, proceed to a step SC7; step SC6: confirm whether the slope of the two consecutive points is greater than the slope threshold; if not, return to the step SC2 If yes, proceed to the next step; step SC7: detecting a QRS complex starting point; step SC8: retrieving an R wave maximum extremum or an R wave minimum extremum; step SC9: delay time; and step SC10: If the slope is positive, the slope threshold is updated and the process ends.

藉此,可有效地降低R波的偵測錯誤,將R波偵測正確率從94.61%提升到99.16%,並使用FPGA開發板來完成R波偵測的驗證。 In this way, the R wave detection error can be effectively reduced, the R wave detection accuracy rate is improved from 94.61% to 99.16%, and the FPGA development board is used to verify the R wave detection.

步驟SA1~SA8‧‧‧So and Chan演算法的步驟 Steps of the SA1~SA8‧‧‧So and Chan algorithm

步驟SB1~SB11‧‧‧Modified So and Chan演算法的步驟 Steps of the steps SB1~SB11‧‧‧Modified So and Chan algorithm

步驟SC1~SC10‧‧‧本發明的步驟 Steps SC1~SC10‧‧‧ steps of the invention

第1圖係表示習知So and Chan演算法的流程圖。 Figure 1 is a flow chart showing a conventional So and Chan algorithm.

第2圖係表示習知Modified So and Chan演算法的流程圖。 Figure 2 is a flow chart showing a conventional Modified So and Chan algorithm.

第3圖係表示本發明使用加強型So and Chan方法的R波偵測演算法的流程圖。 Figure 3 is a flow chart showing the R-wave detection algorithm of the present invention using the enhanced So and Chan method.

第4圖係表示本發明之演算法與習知演算法的比較圖表。 Figure 4 is a graph showing a comparison of the algorithm of the present invention with a conventional algorithm.

第5圖係根據第4圖的數據所繪出的曲線圖。 Fig. 5 is a graph drawn from the data of Fig. 4.

第6圖到第13圖係表示從MIT-BIH資料庫擷取資料並以本發明之方法進行模擬分析所獲得的結果。 Fig. 6 through Fig. 13 show the results obtained by extracting data from the MIT-BIH database and performing simulation analysis by the method of the present invention.

第14圖係表示實際測量之數據。 Figure 14 shows the actual measured data.

第15圖係利用第14圖之數據,於該波形發生T波峰值高於R波峰值的波形。 Fig. 15 is a waveform in which the peak value of the T wave is higher than the peak value of the R wave in the waveform using the data of Fig. 14.

第3圖係表示本發明使用加強型So and Chan方法的R波偵測演算法的流程圖。 Figure 3 is a flow chart showing the R-wave detection algorithm of the present invention using the enhanced So and Chan method.

請參考第3圖所示,本發明的使用加強型(enhanced)So and Chan方法的R波偵測演算法,其步驟係包括:步驟SC1:提供心電圖資料;步驟SC2:計算斜率;步驟SC3:獲取斜率最大值;步驟SC4:計算斜率閥值(slope_threshold);步驟SC5:確認斜率是否為正值;若是,則進行下一步驟;若否,則計算斜率的絕對值slope_n(步驟SC51),並確認連續兩點之斜率絕對值是否大於斜率閥值;若否,則回到步驟SC2;若是,則進行步驟SC7; 步驟SC6:確認連續兩點之斜率是否大於斜率閥值;若否,則回到步驟SC2;若是,則繼續進行下一步驟;步驟SC7:檢測QRS複合波起始點(QRS onset);步驟SC8:檢索R波極值為最大或是最小;步驟SC9:延遲時間(hold time);以及步驟SC10:假若斜率為正值的話,則更新斜率閥值,並結束流程。 Please refer to FIG. 3, the R wave detection algorithm of the present invention using the enhanced So and Chan method, the steps of which include: step SC1: providing electrocardiogram data; step SC2: calculating slope; step SC3: Obtaining a slope maximum value; step SC4: calculating a slope threshold (slope_threshold); step SC5: confirming whether the slope is a positive value; if yes, proceeding to the next step; if not, calculating an absolute value slope_n of the slope (step SC51), and Confirming whether the absolute value of the slope of two consecutive points is greater than the slope threshold; if not, returning to step SC2; if yes, proceeding to step SC7; Step SC6: confirm whether the slope of two consecutive points is greater than the slope threshold; if not, return to step SC2; if yes, proceed to the next step; step SC7: detect the QRS complex start point (QRS onset); step SC8 : Searching for the R wave extreme value is maximum or minimum; Step SC9: Hold time; and Step SC10: If the slope is positive, the slope threshold is updated and the flow is ended.

其中,在上述步驟SC2中,So and Chan演算法是將取得的時域數據的每一點做斜率計算(計算每一點n的訊號X(n)的斜率slope(n)),如公式(1)所示,slope(n)=-2X(n-2)-X(n-1)+X(n+1)+2X(n+2)…(1)。 Wherein, in the above step SC2, the So and Chan algorithm calculates the slope of each point of the acquired time domain data (calculates the slope slope(n) of the signal X(n) of each point n), as in the formula (1) Shown, slope ( n )=-2 X ( n -2)- X ( n -1)+ X ( n +1)+2 X ( n +2) (1).

再者,計算斜率閥值(slope_threshold)係如公式(2), Furthermore, calculating the slope threshold (slope_threshold) is as in equation (2),

閥值的參數(threshold_parameter)可依心電圖的電壓振幅做調整為2、4、8、16;閥值代表與第i秒訊號中的最大斜率max i的倍率比值,當參數越小表示對R波偵測時有較高的靈敏度,但對抗雜訊的能力較差;而參數越大表示對R波的靈敏度較差,但是對抗雜訊的能力卻較強,在此以8為例,當連續兩點的斜率大於斜率閥值時,代表此點為QRS波的起始位置(QRS onset),往下找出最大值即可定位出R波所在位置。每次偵測出R波後,maxi則更新一次,公式(3)及公式(4)如下: first_maxi=Height of R point-height of QRS onset…(4)。 The threshold parameter (threshold_parameter) can be adjusted to 2, 4, 8, 16 according to the voltage amplitude of the electrocardiogram; the threshold value represents the ratio of the magnification of the maximum slope max i in the ith second signal, and the smaller the parameter, the pair of R waves It has higher sensitivity when detecting, but has poorer ability to resist noise. The larger the parameter, the lower the sensitivity to R wave, but the stronger the ability to resist noise. Here, 8 is taken as an example. When the slope is greater than the slope threshold, it represents the starting point of the QRS wave (QRS onset), and the maximum value can be found to locate the R wave. Each time the R wave is detected, maxi is updated once. Equation (3) and formula (4) are as follows: First _maxi= Height of R po int- height of QRS onset (4).

濾波器參數(filter_param)亦可設定為2、4、8、16,以16為例,maxi的初始值預設為第一秒訊號中的最大斜率值。 The filter parameter (filter_param) can also be set to 2, 4, 8, and 16. Taking 16 as an example, the initial value of maxi is preset to the maximum slope value in the first second signal.

以下圖式係說明MIT-BIH資料庫擷取資料並以本發明之方法進行模擬分析所獲得的結果,驗證的心電圖數據是取自近年來較為廣泛使用的美國麻省理工學院的MIT-BIH數據庫,MIT-BIH是一個心率失常的數據庫,每一筆資料皆為30分鐘的數據,可直接從麻省理工學院的網站上取得資料,而MIT-BIH Data 102係表示MIT-BIH中的編號102資料,以下 表示係依此類推。 The following diagram illustrates the results obtained by the MIT-BIH database and the simulation results obtained by the method of the present invention. The verified electrocardiogram data is taken from the MIT-BIH database of the Massachusetts Institute of Technology, which has been widely used in recent years. MIT-BIH is a database of arrhythmia. Each piece of data is 30 minutes of data, which can be obtained directly from the MIT website. MIT-BIH Data 102 is the number 102 in MIT-BIH. ,the following The expression is analogous.

請參考第6圖,係表示將MIT-BIH Data 102的資料用本發明之演算法偵測,可準確的抓到逆向的R波。請參考第7圖,係表示MIT-BIH Data 106的資料的逆向R波偵測。請參考第8圖,係表示MIT-BIH Data 111的資料,該筆資料在一段時間內出現了左束支堵塞(LBBB)的情形,本發明之演算法也能確實偵測到第一個R波峰,在第二波峰出現時不會再誤偵測為第二個R波。請參考第9圖,係表示MIT-BIH Data 111的資料,此資料在前段時間發生了左束支堵塞的情形,過了一陣子後接著發生了右束支堵塞(RBBB)的情形,演算法也確實能只抓到一個R波。請參考第10圖,係表示MIT-BIH Data 101的資料中突然發生的準位變化,在本發明之演算法中由於偵測R波是用斜率的方式做偵測,所以若遇到ECG訊號中有基線漂移(Baseline drift)的雜訊一樣可以偵測。請參考第11圖,係表示MIT-BIH Data 121的資料,該筆資料有著規律性的基線漂移雜訊,亦可偵測出正確的R波。請參考第12圖,係表示MIT-BIH Data 109的資料,在一連串的訊號中就算R波振幅忽然驟變一樣可以偵測。請參考第13圖,係表示MIT-BIH Data 209的資料,其中發生了一段連續R波振幅忽高忽低,本發明之演算法依然可以準確地抓到R波。請參考第14圖,係表示實際測量之數據,而第15圖係利用第14圖之數據,於該波形發生T波峰值高於R波峰值的波形,但以本發明之Enhanced So and Chan演算法依然可準確的抓到R波。 Please refer to Fig. 6, which shows that the data of MIT-BIH Data 102 is detected by the algorithm of the present invention, and the reverse R wave can be accurately captured. Please refer to Figure 7 for the reverse R-wave detection of the MIT-BIH Data 106 data. Please refer to Fig. 8 for the data of MIT-BIH Data 111. The data shows the situation of the left bundle branch blockage (LBBB) for a period of time. The algorithm of the present invention can also detect the first R. The peak will not be detected as the second R wave when the second peak appears. Please refer to Figure 9, which shows the data of MIT-BIH Data 111. This data has been blocked by the left bundle branch in the previous period. After a while, the right bundle branch blockage (RBBB) occurred. It is also true that only one R wave can be caught. Please refer to FIG. 10, which shows the sudden change of the position in the data of MIT-BIH Data 101. In the algorithm of the present invention, since the detected R wave is detected by the slope, if the ECG signal is encountered, Noise can be detected in the same way as baseline drift. Please refer to Figure 11, which shows the data of MIT-BIH Data 121, which has regular baseline drift noise and can detect the correct R wave. Please refer to Figure 12 for the information of MIT-BIH Data 109. It can be detected in a series of signals even if the amplitude of the R wave suddenly changes suddenly. Please refer to Fig. 13 for the data of MIT-BIH Data 209, in which a continuous R wave amplitude is high or low, and the algorithm of the present invention can still accurately capture the R wave. Please refer to Figure 14 for the actual measured data, and Figure 15 uses the data of Figure 14 for the waveform where the T-wave peak is higher than the R-wave peak, but with the Enhanced So and Chan algorithm of the present invention. The law still captures the R wave accurately.

因此,當偵測到一個R波後,即暫停偵測QRS複合波起始點(QRS onset)一段時間,且R波偵測使用的並不是在偵測到QRS複合波起始點(QRS onset)後一段時間內的波峰最大值,而是選擇第一個轉折點,這樣的方式可以有效的改善發生RSR’波還有T波過高的誤偵測情形;且減少Modified So and Chan中一直在計算斜率平方的運算量,是將斜率為負的值取絕對值後再做判斷,此方法一樣可以準確的偵測到逆向R波;並且在偵測到逆向R波時,不做閥值的更新;再者,可有效地降低R波的偵測錯誤,將R波偵測正確率從94.61%提升到99.16%,並使用FPGA開發板來完成R波偵測的驗證(如第4圖及第5圖所示)。 Therefore, when an R wave is detected, the QRS complex start point (QRS onset) is paused for a period of time, and the R wave detection is not used to detect the QRS complex start point (QRS onset) The maximum value of the peak after a period of time, but the first turning point, this way can effectively improve the occurrence of false detection of RSR' wave and T wave too high; and reduce Modified So and Chan has been in Calculating the operation amount of the square of the slope is to judge the negative value of the negative value of the slope. This method can accurately detect the reverse R wave; and when the reverse R wave is detected, the threshold is not used. Update; in addition, it can effectively reduce the R wave detection error, increase the R wave detection accuracy from 94.61% to 99.16%, and use the FPGA development board to complete the R wave detection verification (such as Figure 4 and Figure 5).

當前述係針對本發明之各實施例時,本發明之其他或進一步 的實施例係可被設計出而無須違反其基本範圍,且其基本範圍係由下列的申請專利範圍所界定。雖然本發明以相關的較佳實施例進行解釋,但是這並不構成對本發明的限制。應說明的是,本領域的技術人員根據本發明的思想能夠構造出很多其他類似實施例,這些均在本發明的保護範圍之中。 Other or further aspects of the invention when the foregoing is directed to various embodiments of the invention The embodiments can be devised without departing from the basic scope and the basic scope is defined by the following claims. Although the present invention has been explained in connection with the preferred embodiments, it is not intended to limit the invention. It should be noted that many other similar embodiments can be constructed in accordance with the teachings of the present invention, which are within the scope of the present invention.

步驟SC1~SC10‧‧‧本發明的步驟 Steps SC1~SC10‧‧‧ steps of the invention

Claims (1)

一種使用加強型(enhanced)So and Chan方法的R波偵測演算法,其步驟係包括:步驟SC1:提供心電圖資料;步驟SC2:計算該心電圖資料的時域數據每一點n的訊號X(n)的斜率slope(n),slope(n)=-2X(n-2)-X(n-1)+X(n+1)+2X(n+2);步驟SC3:獲取一斜率最大值;步驟SC4:計算一斜率閥值slope_threshold, 其中,threshold_parameter為閥值的參數,可依該心電圖資料的電壓振幅做調整,該閥值代表與第i秒訊號中的最大斜率max i的倍率比值;步驟SC5:確認該斜率slope(n)是否為正值;若是,則進行下一步驟;若否,則計算該斜率slope(n)的絕對值,並確認連續兩點(n,n+1)的斜率之絕對值是否大於該斜率閥值;若否,則回到該步驟SC2;若是,則進行一步驟SC7;步驟SC6:確認連續兩點(n,n+1)之該斜率是否大於該斜率閥值;若否,則回到該步驟SC2;若是,則繼續進行下一步驟;步驟SC7:檢測一QRS複合波起始點;步驟SC8:檢索一R波最大極值或一R波最小極值;步驟SC9:延遲時間;以及步驟SC10:假若該斜率為正值的話,則更新該斜率閥值,並結束流程。 An R-wave detection algorithm using an enhanced So and Chan method, the steps comprising: step SC1: providing electrocardiogram data; step SC2: calculating time-domain data of the electrocardiogram data, signal X of each point n (n) Slope slope(n), slope ( n )=-2 X ( n -2)- X ( n -1)+ X ( n +1)+2 X ( n +2); step SC3: obtaining a slope Maximum value; step SC4: calculating a slope threshold slope_threshold, Where, threshold_parameter is a parameter of the threshold value, which can be adjusted according to the voltage amplitude of the electrocardiogram data, the threshold value representing a ratio of the magnification of the maximum slope max i in the ith second signal; step SC5: confirming whether the slope slope(n) is Positive value; if yes, proceed to the next step; if not, calculate the absolute value of the slope slope(n) and confirm whether the absolute value of the slope of two consecutive points (n, n+1) is greater than the slope threshold If not, return to step SC2; if yes, proceed to step SC7; step SC6: confirm whether the slope of two consecutive points (n, n+1) is greater than the slope threshold; if not, return to the Step SC2; if yes, proceed to the next step; step SC7: detecting a QRS complex starting point; step SC8: retrieving an R wave maximum extremum or an R wave minimum extremum; step SC9: delay time; SC10: If the slope is positive, the slope threshold is updated and the process ends.
TW103101206A 2014-01-13 2014-01-13 R-wave detection algorithm using enhanced so and chan method TWI552722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103101206A TWI552722B (en) 2014-01-13 2014-01-13 R-wave detection algorithm using enhanced so and chan method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103101206A TWI552722B (en) 2014-01-13 2014-01-13 R-wave detection algorithm using enhanced so and chan method

Publications (2)

Publication Number Publication Date
TW201526871A TW201526871A (en) 2015-07-16
TWI552722B true TWI552722B (en) 2016-10-11

Family

ID=54197974

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103101206A TWI552722B (en) 2014-01-13 2014-01-13 R-wave detection algorithm using enhanced so and chan method

Country Status (1)

Country Link
TW (1) TWI552722B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200515898A (en) * 2003-10-22 2005-05-16 Surewin Technology Corp Pulse wave analysis device
TW201320961A (en) * 2008-12-15 2013-06-01 Proteus Digital Health Inc Body-associated receiver and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200515898A (en) * 2003-10-22 2005-05-16 Surewin Technology Corp Pulse wave analysis device
TW201320961A (en) * 2008-12-15 2013-06-01 Proteus Digital Health Inc Body-associated receiver and method

Also Published As

Publication number Publication date
TW201526871A (en) 2015-07-16

Similar Documents

Publication Publication Date Title
CN110420025B (en) Surface electromyogram signal processing method and device and wearable device
JP5200968B2 (en) Pulse wave analysis device, pulse wave analysis method, and pulse wave analysis program
Chatterjee et al. Real time P and T wave detection from ECG using FPGA
CN105105737A (en) Motion state heart rate monitoring method based on photoplethysmography and spectrum analysis
EP2854620A1 (en) Narrow band feature extraction from cardiac signals
WO2014047310A4 (en) System and method for determining sleep stage
CN105249925B (en) A kind of traditional Chinese medical pulse manifestation collecting device and noise reduction system and noise-reduction method
CN107233093B (en) R wave detection method and device and electronic equipment
Hoeksel et al. Detection of dicrotic notch in arterial pressure signals
JP2016534770A5 (en)
RU2017133292A (en) PROCESSING DEVICE, SYSTEM AND METHOD OF PROCESSING ACCELEROMETER SIGNALS FOR USE IN MONITORING LIFE INDICATORS OF A SUBJECT
JP5509153B2 (en) Gait analysis method, gait analysis device and program thereof
JP2008073077A (en) Data processor, data processing method and data processing program
JP2017127398A5 (en) Information processing apparatus, information processing system, measurement apparatus, measurement system, information processing method, and program
JP2018153250A5 (en)
CN105138823B (en) A kind of physiological signal quality determining method based on auto-correlation function
TWI552722B (en) R-wave detection algorithm using enhanced so and chan method
JP2015188603A (en) beat detecting device
WO2019146025A1 (en) Pulse wave calculation device, pulse wave calculation method and pulse wave calculation program
US10750969B2 (en) Heartbeat detection method and heartbeat detection device
JP2014176427A (en) Data analysis device and data analysis program
Fedotov A robust method for detecting the QRS complex of the ECG signal
CN110801214A (en) Heart rate real-time detection method and system
JP2015217060A (en) Heartbeat detection method and heartbeat detector
JP2008188092A (en) Data processing method, data processing device, and data processing program