The present invention relates to a technology of extracting biological information such as a heartbeat interval (R-R interval) from an electrocardiographic waveform and, more particularly, to a heartbeat detection method and heartbeat detection device for detecting a heartbeat while acquiring an electrocardiographic waveform in real time.
Measuring a heartbeat by a body-worn device capable of measuring an ECG (Electrocardiogram) waveform is useful as such a measured heartbeat can be used for controlling the load intensity of training in sports, evaluating the autonomic function in daily life, and the like. In recent years, a shirt-type device with electrodes has been developed, and heartbeat monitoring has been performed more easily in various scenes.
As a method of detecting a heartbeat (R wave) from an ECG waveform, a method of detecting a peak in time series is convenient. That is, a threshold is set for the time series of the sampling data of the ECG waveform. When the sampling data exceeds the threshold, an R wave is detected.
When an R wave is detected based on not the ECG waveform itself but a data string obtained by calculating the time difference of the ECG waveform, the following advantages can be achieved: (I) undulation in a baseline is canceled; and (II) a peak can be detected even if an S wave is larger than an R wave due to individual differences and the like. Furthermore, an index is calculated by taking into consideration a clearance formed before and after a peak, and also by noticing the fact that the widths of the peaks derived from a Q wave, an R wave, and an S wave are almost constant and without any individual differences. The R wave can be detected with more accuracy when time series of the calculated indices are used.
When detecting an R wave using a threshold, for example, there is proposed a method of setting the threshold based on the maximum value of a data string for the first 2 seconds, and updating the threshold based on the average value of peak values every five heartbeats (see, for example, Non-Patent Literature 1). In this method, it is possible to reflect the trend of a signal level on the threshold.
However, when acquiring an ECG waveform, noises may be added to the waveform. Especially in wearable devices that are worn by bodies of subjects, a disturbance of an ECG waveform is more likely to occur. In particular, noise with a very large amplitude that cannot be obtained from the cardiac potential of a human may be mixed into the ECG waveform due to floating of an electrode or the like. When such a large noise is added, the threshold may jump due to the effect of the noise, and an R wave may not be detected afterwards.
To solve this problem, Patent Literature 1 discloses an arrangement of optimizing a threshold in consideration of noise in an ECG waveform.
As described above, in the conventional heartbeat detection method, when a large noise is added to an ECG waveform, a threshold may jump due to the effect of the noise, and an R wave may not be detected afterwards. To solve this problem, Patent Literature 1 discloses an arrangement of optimizing a threshold.
However, Patent Literature 1 does not disclose details of detection result information for determining whether a threshold level is an appropriate level or not, and it may thus be difficult to optimize the threshold when the threshold jumps due to the presence of noise in the electrocardiographic waveform.
The present invention has been made in consideration of the above problem, and has as its object to provide a heartbeat detection method and heartbeat detection device capable of appropriately detecting a heartbeat even if a noise is superimposed on an electrocardiographic waveform.
According to the present invention, there is provided a heartbeat detection method including, a first step of calculating, for each sampling time, a time difference value of sampling data from a sampling data string of an electrocardiographic waveform of a living body, a second step of calculating an index value for heartbeat detection based on the time difference value calculated in the first step, a third step of determining whether a peak of the index value exceeding a current threshold is detected, and when consecutively detecting equal to or greater than a predetermined number of peaks, calculating a threshold candidate based on an average value of most recent predetermined number of peaks among the peaks of equal to or greater than the predetermined number that are being detected, a fourth step of comparing the threshold candidate calculated in the third step with a threshold limit value based on a difference limit value that is likely be a time difference value of the electrocardiographic waveform of the living body, not updating the threshold when the threshold candidate exceeds the threshold limit value, and setting the threshold candidate as a new threshold when the threshold candidate has a value that is equal to or less than the threshold limit value, and a fifth step of setting, when detecting a peak of the index value that exceeds the threshold, a sampling time of the peak as a heartbeat time.
According to the present invention, there is also provided a heartbeat detection device including, a time difference value calculation unit configured to calculate, for each sampling time, a time difference value of sampling data from a sampling data string of an electrocardiographic waveform of a living body, an index value calculation unit configured to calculate an index value for a heartbeat detection based on the time difference value calculated by the time difference value calculation unit, a threshold setting unit configured to determine whether a peak of the index value that exceeds a current threshold is detected, configured to calculate, when consecutively detecting equal to or greater than a predetermined number of peaks, a threshold candidate based on an average value of most recent predetermined number of peaks among the peaks of equal to or greater than the predetermined number that are being detected, configured not to update the threshold when the threshold candidate exceeds a threshold limit value based on a difference limit value that is likely be a time difference value of the electrocardiographic waveform of the living body, and configured to set the threshold candidate as a new threshold when the threshold candidate has a value that is equal to or less than the threshold limit value, and a heartbeat time determination unit configured to set the sampling time of the peak as the heartbeat time when the peak of the index value exceeding the threshold is detected.
According to the present invention, a time difference value is calculated from a sampling data string of an electrocardiographic waveform of a living body, an index value for a heartbeat detection is calculated based on the time difference value, a threshold candidate is calculated based on the average value of a predetermined number of most recent peaks among peaks of the index value exceeding a current threshold, and the threshold candidate is compared with a threshold limit value based on a difference limit value that is likely be the time difference value of the electrocardiographic waveform of the living body. Then, when the threshold candidate exceeds the threshold limit value, the threshold is not updated, and when the threshold candidate is equal to or less than the threshold limit value, the threshold candidate is set as a new threshold. Therefore, even if large noise is mixed in the electrocardiographic waveform, it is possible to prevent the threshold used for heartbeat detection from jumping off. As a result, according to the present invention, it is possible to detect a heartbeat more appropriately even if noise is superimposed on the electrocardiographic waveform.
The embodiment of the present invention will be described below with reference to the accompanying drawings.
The heartbeat detection method according to this embodiment will be described below. In this embodiment, x(n) represents a data string obtained by sampling the ECG waveform where n (n=1, 2, . . . ) represents a number assigned to one sampling data. The greater the number n is, the later the sampling time becomes, as a matter of course.
The electrocardiograph 1 measures the ECG waveform of a living body (human body) (not shown), and outputs the sampling data string x(n) of the ECG waveform. At this time, the electrocardiograph 1 outputs the sampling data string by adding sampling time information to each sampling data. Note that a practical method of measuring the ECG waveform is a well-known technique and a detailed description thereof will be omitted.
The storage unit 2 stores the sampling data string x(n) of the ECG waveform and the sampling time information, which have been output from the electrocardiograph 1.
To calculate a time difference value y(n) of the sampling data x(n), the time difference value calculation unit 3 acquires, from the storage unit 2, data x(n+1) one sampling operation after the sampling data x(n) and data x(n−1) one sampling operation before the sampling data x(n) (step S1 of
y(n)=x(n+1)−x(n−1) (1)
The index value calculation unit 4 calculates an index value for heartbeat detection based on the time difference value y calculated by the time difference value calculation unit 3 (step S3 of
That is, when yT represents the time difference value at time T of the calculation target, and ymin represents the smallest value of the time difference value in the predetermined time domain before time T in which the calculation is targeted and that in the predetermined time domain after time T in which the calculation is targeted, an index value I at time T in which the calculation is targeted is given by:
I=−(yT−y min) (2)
In this embodiment, Δt2>Δt1 is satisfied, and Δt1=25 ms and Δt2=150 ms are set. Note that the positive or negative sign of the subtraction result is inverted in order to set a peak derived from the R wave to a positive value.
Th=α×I max (3)
Note that the initial setting period indicates a period of 2 s from the start of measurement of a heartbeat or a period of 2 s from when a peak search operation is reset, as will be described later.
The threshold setting unit 5 determines whether the peak of the index value I exceeding the current threshold Th can be detected (step S12 of
Thc=β×Iave (4)
The threshold setting unit 5 compares the calculated threshold candidate Thc with a threshold limit value L based on the current threshold Th and a difference limit value that appears more likely be the time difference value of the ECG wave of a human. When the threshold candidate Thc exceeds the threshold limit value L, the threshold Th is not updated (YES in step S15 of
The threshold setting unit 5 performs the above processing for each sampling time. When the peak of the index value I exceeding the threshold Th is detected consecutively, the threshold candidate Thc is successively calculated by repeatedly executing the processing in step S14. When the threshold candidate Thc is equal to or smaller than the threshold limit value L, the threshold Th is updated.
When the peak of the index value I exceeding the threshold Th cannot be detected for 3 seconds after initially setting the threshold Th or after updating the threshold Th (YES in step S17 of
Next, when the peak of the index value I exceeding the threshold Th is detected (YES in step S5 of
By repeating the processes in steps S1 to S6 for each sampling time, time-series data containing multiple heartbeat time points are obtained.
In the example shown in
In addition, the threshold Th is updated at time t4 by the processing of the threshold setting unit 5. However, since the value of the peak of the index value I derived from noise is incorporated, the threshold Th jumps from 448 μV to 2,075 μV. Since the threshold Th jumps, peaks derived from R waves at subsequent time points t5, t6, t7, t9, and t10 are smaller than the threshold Th, and are not unwantedly detected as heartbeats.
Since the peak of the index value I exceeding the threshold Th cannot be detected for 3 seconds after updating the threshold Th, the threshold setting unit 5 resets the peak search operation at time t8, and a period of 2 seconds after that is used for setting of the initial threshold. The new threshold Th is set at time t11, and the peak of the index value I derived from the R wave exceeds the threshold Th at time t12, and is detected as a heartbeat. Subsequently, the peak of the index value I derived from the R wave is detected as a heartbeat at time t13, and the value of the R-R interval is output. At time t13, the value of the R-R interval returns to a normal value close to 1,000 ms. That is, in the example shown in
Consider a possible maximum value of the time difference of the ECG waveform of a human, and conversely, a value that is unlikely be the time difference of the ECG waveform of a human. A QRS interval (from the beginning of a Q wave to the end of an S wave) is 0.06 to 0.1 seconds (see Yamasawa, “Easy-to-Understand Electrocardiogram, Reveal Heart Disease from 12-lead Electrocardiogram”, Elsevier Japan, 2003).
A time that takes from the highest value of the R wave to the lowest value of the S wave can be considered to be about 15 to 25 ms as ¼ of the QRS interval. Furthermore, during the time from the highest value of the R wave to the lowest value of the S wave, the value changes near the center most suddenly. Assuming that the time range of the change is about half the time from the highest value of the R wave to the lowest value of the S wave, the time range can be estimated to be about 7.5 to 12.5 ms. Assuming that during this time range, a change in cardiac potential corresponding to a QRS amplitude occurs, it is considered that the rate of change in the cardiac potential is about 350 μV/ms at the most. When the rate of change of the cardiac potential is converted to a time difference value obtained by equation (1), 700 μV is obtained for a sampling interval of 1 ms, and is largely rounded to 1,000 μV by giving a margin.
As described above, when the sampling interval is 1 ms, a time difference value exceeding 1,000 μV is unlikely be the time difference of the ECG waveform of a human. The standard value is set to 5,000 μV for a sampling interval of 5 ms. That is, when dT represents the sampling interval, a difference limit value X that is likely be the time difference value of the ECG waveform of a human is given by:
X=dt [ms]×1000 [μV] (5)
As described above, the index value I shown in
When a value obtained by multiplying, by the coefficient β=0.4, the average value Iave of the predetermined number V (in this embodiment, V=5) of peaks exceeding the current threshold Th is set as a new threshold Th′, when p represents the standard peak value of the index value I, the updated threshold Th′ is normally about Th′=p×β=p×0.4. When an abnormal noise with a peak value X is generated for once, the next threshold Th′ increases by (X−p)/5×0.4=0.08X−0.2Th. When X=5000 μV, 400−0.2Th [μV] is obtained. That is, when the sampling interval is 5 ms, when the increase amount of the next threshold Th′ with respect to the current threshold Th exceeds 400−0.2Th [μV], there is a greater probability that the threshold is being influenced by the noise.
In this embodiment, when the threshold candidate Thc calculated in step S14 exceeds the threshold limit value L=400+0.8Th [μV] (=Th+400−0.2Th) with respect to the current threshold Th (YES in step S15), the threshold Th is not updated. Note that the general formula of the threshold limit value L is given by:
L=Th+(β/V)x−(1/V)Th (6)
The threshold Th at time t1 is 448 μV. After the peak of the index value I derived from the R wave exceeds the threshold Th at time t1, and the peak of the index value I derived from noise exceeds the threshold Th at time t2. Thus, the threshold candidate Thc=2075 μV is calculated based on the value of the peak. At this time, the threshold limit value L=400+0.8Th=758.4 μV is obtained. Since the threshold candidate Thc=2075 μV exceeds the threshold limit value L, the threshold Th is not updated by the processing in step S15, and the threshold Th=448 μV will be continuously used. As a result, according to this embodiment, unlike
As described above, according to this embodiment, it is possible to detect a heartbeat more appropriately even if a noise is superimposed on the ECG waveform.
The second embodiment of the present invention will be described.
In this embodiment, the difference from the first embodiment is the operation of the threshold setting unit 5a. The operation of the threshold setting unit 5a will be described with reference to
When updating a threshold Th in step S16, the threshold setting unit 5a according to this embodiment uses a value obtained by averaging a current threshold Th (i−1) and a threshold candidate Thc(i) calculated in step S14. That is, when Th(i) represents the updated threshold, the threshold setting unit 5a calculates the threshold Th(i) by:
Th(i)=r×Thc(i)+(1−r)×Th(i−1) (7)
In equation (7), r represents a predetermined coefficient (for example, r=0.1). In this way, when updating the threshold Th, it is possible to suppress a sudden shift of the threshold Th by averaging the current threshold Th and the threshold candidate Thc, thereby achieving stability. The remaining components are as described in the first embodiment.
In the example shown in
The threshold Th at time t20 is 222 μV, as described above. After the peak of the index value I derived from the noise exceeds the threshold Th at time t21, when the threshold Th is updated at time t22, the threshold candidate Thc=531 μV is equal to or smaller than the threshold limit value L=578 μV. Since, however, the threshold setting unit 5a sets, as the new threshold Th, a value obtained by averaging the threshold Th=222 μV and the threshold candidate Thc=531 μV, the updated threshold Th is about 250 μV, thereby suppressing any increase in the threshold Th. As a result, according to this embodiment, unlike the case shown in
As described above, according to this embodiment, it is possible to eliminate the influence of noise that cannot be eliminated in the first embodiment, thereby detecting a heartbeat more appropriately.
The third embodiment of the present invention will be described next.
In this embodiment, the difference from the first embodiment is the operation of the heartbeat time determination unit 6a, and thus the operation of the heartbeat time determination unit 6a will be described.
When the peak of an index value I exceeding a threshold Th is detected (YES in step S5 of
In the example shown in
To the contrary, in this embodiment, the threshold Th is the same as in the first embodiment. Since, however, the value of the peak of the index value I exceeds the index limit value Z at time t2, the heartbeat time determination unit 6a does not detect the peak as a heartbeat. As a result, the R-R interval (the interval between times t1 and t3) calculated from a heartbeat detected at time t3 is set to a correct value close to 1,000 ms.
In this way, in this embodiment, it is possible to detect a heartbeat more appropriately than in the first embodiment.
Note that this embodiment has explained the case in which the heartbeat time determination unit 6a is applied to the first embodiment. The same may apply to the second embodiment, as a matter of course.
The storage unit 2, time difference value calculation unit 3, index value calculation unit 4, threshold setting unit 5 or 5a, and heartbeat time determination unit 6 or 6a described in each of the first to third embodiments can be implemented by a computer including a CPU (Central Processing Unit), a storage device, and an interface, and a program for controlling these hardware resources.
The present invention is applicable to a technique of detecting heartbeats of a living body.
1 . . . electrocardiograph, 2 . . . storage unit, 3 . . . time difference value calculation unit, 4 . . . index value calculation unit, 5, 5a . . . threshold setting unit, 6, 6a . . . heartbeat time determination unit
Number | Date | Country | Kind |
---|---|---|---|
JP2016-203352 | Oct 2016 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2017/034444 | 9/25/2017 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2018/074145 | 4/26/2018 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5092340 | Yamaguchi et al. | Mar 1992 | A |
5564430 | Jacobson et al. | Oct 1996 | A |
20120238892 | Sarkar | Sep 2012 | A1 |
20130237868 | Choi et al. | Sep 2013 | A1 |
20140073975 | Engelbrecht | Mar 2014 | A1 |
20170281021 | Matsuura | Oct 2017 | A1 |
Number | Date | Country |
---|---|---|
103300848 | Sep 2013 | CN |
106687033 | May 2017 | CN |
07-067844 | Mar 1995 | JP |
2013-184062 | Sep 2013 | JP |
10-2013-0103259 | Sep 2013 | KR |
2016035701 | Mar 2016 | WO |
2016039182 | Mar 2016 | WO |
2017150156 | Sep 2017 | WO |
Entry |
---|
Chung, Peter, “ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK) with the ADS1298 ECG-HE”, Texas Instruments Incorporated, Application Report SPRABJ1, Jan. 2011, 20 pages. |
International Preliminary Reporton Patentability received for PCT Patent Application No. PCT/JP2017/034444, dated May 2, 2019, 12 pages (7 pages of English Translation and 5 pages of Original Document). |
International Search Report and Written Opinion received for PCT Patent Application No. PCT/JP2017/034444, dated Nov. 7, 2017, 14 pages (7 pages of English Translation and 7 pages of Original Document). |
Yamasawa, “Easy-to-Understand Electrocardiogram, Reveal Heart Disease from 12-lead Electrocardiogram”, Elsevier Japan, 2003, 6 pages (2 page of English Translation Cover Sheet and 4 pages of original document). |
Supplementary European Search Report and Search Opinion received for EP Patent Application No. 17862105.8, dated Feb. 19, 2020, 8 pages. |
Number | Date | Country | |
---|---|---|---|
20190320926 A1 | Oct 2019 | US |