Adaptive threshold iterative algorithm suitable for electrocardiosignal detection

文档序号:1663282 发布日期:2019-12-31 浏览:10次 中文

阅读说明:本技术 一种适用于心电信号检测的自适应阈值迭代算法 (Adaptive threshold iterative algorithm suitable for electrocardiosignal detection ) 是由 张中 李靖 吴克军 宁宁 于奇 于 2019-08-30 设计创作,主要内容包括:本发明属于模拟集成电路技术领域,特别涉及一种用于心电信号特征参数提取的自适应阈值迭代算法。本发明根据候选点和自适应阈值中高低阈值的关系,开发出两套自适应的迭代高阈值和低阈值规则,能够有效地检测出心电信号中的QRS波的R点,具有速度快、需要的存储容量少和对非常规QRS中R点识别度高等特点。(The invention belongs to the technical field of analog integrated circuits, and particularly relates to a self-adaptive threshold iterative algorithm for extracting electrocardiosignal characteristic parameters. According to the relation between the candidate point and the high and low thresholds in the adaptive threshold, two sets of adaptive iteration high threshold and low threshold rules are developed, the R point of the QRS wave in the electrocardiosignal can be effectively detected, and the method has the characteristics of high speed, low required storage capacity, high degree of identification of the R point in the unconventional QRS and the like.)

1. An adaptive threshold iterative algorithm suitable for electrocardiosignal detection comprises the following steps:

setting an initial value for double thresholds of an adaptive threshold iterative algorithm, wherein the middle threshold is 0.5-0.6, and the low threshold is 0.2-0.3;

step two, comparing all signal points of the electrocardiosignals subjected to noise removal by the preprocessing stage within 20ms, and selecting the point with the maximum signal amplitude as an R wave candidate point;

step three, comparing the R wave candidate points selected in the step two with the high threshold value in the step one:

for the first R candidate point: if the candidate point amplitude is higher than the low threshold value, determining the candidate point as the R point; if the candidate point amplitude is lower than the low threshold, searching the next R candidate point in the next 20 ms;

if the candidate point is higher than the high threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is larger than the refractory period time of the electrocardiosignal, determining the candidate point as the R point;

if the candidate point is higher than the high threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is less than the refractory period time of the electrocardiosignals, the amplitude values of the candidate point and the R point determined by the last adaptive threshold algorithm need to be compared: if the candidate point amplitude is larger, the candidate point replaces the R point determined by the last adaptive threshold algorithm; if the candidate point amplitude is smaller, eliminating the candidate point;

if the candidate point is lower than the high threshold but higher than the low threshold, and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is larger than the refractory period time of the electrocardiosignal, the candidate point is determined as the R point;

if the candidate point is lower than the high threshold and higher than the low threshold, and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is less than the refractory period time of the electrocardiosignal, the amplitude of the candidate point and the R point determined by the last adaptive threshold algorithm need to be compared: if the candidate point amplitude is larger, the candidate point replaces the R point determined by the last adaptive threshold algorithm; if the candidate point amplitude is smaller, eliminating the candidate point;

step four, after each candidate point is determined as the R point by the self-adaptive threshold algorithm, one threshold iteration is needed;

if the candidate point is the R point determined by the candidate point being higher than the high threshold, the dual thresholds iterate the thresholds as follows:

wherein c _ vth is the number of statistical R points confirmed by the algorithm, p1 is the error covariance between the predicted value and the true value, Q1 is the covariance of state process noise, R1 is the covariance of measurement noise, k _ vth1 is Kalman gain, thr0 is a low threshold, and thr1 is a high threshold; and (3) performing state updating on the threshold value according to a Constant Velocity (CV) model in a formula (2), calculating Kalman gain in a formula (4), performing measurement updating on the high threshold value in a formula (5), and updating the low threshold value according to a high threshold value multiplied by a in a formula (7).

If the candidate point is the R point determined by the candidate point being higher than the low threshold and lower than the high threshold, the dual thresholds iterate the thresholds according to the following rules:

where R2 is another measured noise covariance, equation (14) is updated for the low threshold as a b-fold higher threshold; r2 is a real number smaller than R1, designed to increase the iteration speed of the adaptive threshold, while a, b are fractions smaller than 1, and b > a.

Technical Field

The invention belongs to the technical field of analog integrated circuits, and particularly relates to a self-adaptive threshold iterative algorithm for extracting electrocardiosignal characteristic parameters.

Background

For an Electrocardiosignal (ECG), most useful information is concentrated in a PQRST wave group, the electrocardiosignal is in an useless baseline part for a long time, and in the process of signal transmission and processing, the electrocardiosignal tends to be preprocessed firstly, so that partial characteristics of the electrocardiosignal are extracted, a large amount of original redundant information is removed, and the transmission and storage cost is reduced.

The extraction of characteristic parameters of an electrocardiograph signal is shown in fig. 1, and usually includes two parts, one is a preprocessing stage and the other is a decision stage. The purpose of preprocessing is to extract the QRS wave as good as possible and remove noise interference; and the decision-making stage determines the QRS wave according to a set iteration rule. At present, a double-threshold type peak value detection is generally adopted in a traditional decision-making algorithm, but the traditional decision-making algorithm has the problems of low iteration speed, lack of theoretical basis, sensitivity to initial values, uneven QRS wave characteristic parameter extraction effect and the like.

Disclosure of Invention

Aiming at the problems of low iteration speed, lack of theoretical basis and the like of the traditional decision-level algorithm, the invention provides the self-adaptive threshold iteration algorithm suitable for electrocardiosignal detection, which can efficiently extract the characteristic parameters of electrocardiosignals, and is insensitive to initial values and high in iteration speed. The present invention is directed to decision-making stages only, with the preprocessing stage using the traditional approach.

The technical scheme of the invention is as follows:

an adaptive threshold iterative algorithm suitable for electrocardiosignal detection comprises the following steps:

step one, setting an initial value for double thresholds of an adaptive threshold iterative algorithm, wherein the middle threshold value of the double thresholds is 0.5-0.6, and the low threshold value of the double thresholds is 0.2-0.3.

And step two, comparing all signal points of the electrocardiosignals subjected to noise removal by the preprocessing stage within 20ms, and selecting the point with the maximum signal amplitude as an R wave candidate point.

Step three, comparing the R wave candidate points selected in the step two with the high threshold value in the step one:

for the first R candidate point: if the candidate point amplitude is higher than the low threshold value, determining the candidate point as the R point; if the candidate point amplitude is below the low threshold, then in the next 20ms time, the next R candidate point is found.

If the candidate point is higher than the high threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is larger than the refractory period time of the electrocardiosignal, determining the candidate point as the R point;

if the candidate point is higher than the high threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is less than the refractory period time of the electrocardiosignals, the amplitude values of the candidate point and the R point determined by the last adaptive threshold algorithm need to be compared: if the candidate point amplitude is larger, the candidate point replaces the R point determined by the last adaptive threshold algorithm; if the candidate point amplitude is smaller, eliminating the candidate point;

if the candidate point is lower than the high threshold but higher than the low threshold, and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is larger than the refractory period time of the electrocardiosignal, the candidate point is determined as the R point;

if the candidate point is lower than the high threshold and higher than the low threshold, and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is less than the refractory period time of the electrocardiosignal, the amplitude of the candidate point and the R point determined by the last adaptive threshold algorithm need to be compared: if the candidate point amplitude is larger, the candidate point replaces the R point determined by the last adaptive threshold algorithm; if the candidate point amplitude is smaller, eliminating the candidate point;

and step four, after the candidate point is determined as the R point by the self-adaptive threshold algorithm, one threshold iteration is needed.

If the candidate point is the R point determined by the candidate point being higher than the high threshold, the dual thresholds iterate the thresholds as follows:

wherein c _ vth is the number of statistical R points confirmed by the algorithm, p1 is the error covariance between the predicted value and the true value, Q1 is the covariance of state process noise, R1 is the covariance of measurement noise, k _ vth1 is Kalman gain, thr0 is a low threshold, and thr1 is a high threshold. And (3) performing state updating on the threshold value according to a Constant Velocity (CV) model in a formula (2), calculating Kalman gain in a formula (4), performing measurement updating on the high threshold value in a formula (5), and updating the low threshold value according to a high threshold value multiplied by a in a formula (7).

If the candidate point is the R point determined by the candidate point being higher than the low threshold and lower than the high threshold, the dual thresholds iterate the thresholds according to the following rules:

where R2 is another measured noise covariance, equation (14) is updated for the low threshold as a b-fold higher threshold. R2 is a real number smaller than R1, designed to increase the iteration speed of the adaptive threshold, while a, b are fractions smaller than 1, and b > a.

According to the relation between the candidate point and the high and low thresholds in the adaptive threshold, two sets of adaptive iteration high threshold and low threshold rules are developed, the R point of the QRS wave in the electrocardiosignal can be effectively detected, and the method has the characteristics of high speed, low required storage capacity, high degree of identification of the R point in the unconventional QRS and the like.

Drawings

FIG. 1 is a schematic diagram of an ECG signal feature parameter extraction framework;

FIG. 2 is a diagram illustrating an iteration of high and low thresholds in two cases;

FIG. 3 is a schematic diagram of the iteration of high and low thresholds in an actual ECG signal;

FIG. 4 is a diagram illustrating threshold iteration under different specific situations;

FIG. 5 is a schematic diagram of Kalman gain iteration conditions under different threshold initial values.

Detailed Description

The invention is further illustrated by way of example with reference to the accompanying drawings.

Fig. 2 shows an adaptive threshold iteration algorithm suitable for cardiac signal detection, which is adopted in an embodiment of the present invention, before performing threshold iteration, the cardiac signal needs to be preprocessed, where the preprocessing stage includes filtering and drying, etc., so as to enhance the signal-to-noise ratio of the cardiac signal, and facilitate subsequent peak detection and threshold iteration.

After the signal passes through the preprocessing stage, the initial values of the high and low thresholds are respectively set to be 0.6 and 0.4, and the refractory period time of the electrocardiosignal is set to be 0.24 second. And simultaneously setting the sampling point within the range of 20ms, and finding the maximum sampling point of the amplitude of the electrocardiosignal within the time period as the candidate point of the R point in the QRS wave.

Comparing the candidate points with a set high threshold initial value:

if the candidate point is higher than the high threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is more than 0.24 seconds, determining the candidate point as the R point; if the candidate point is higher than the high threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is less than 0.24 seconds, the amplitude of the candidate point and the R point determined by the last adaptive threshold algorithm needs to be compared, and if the amplitude of the candidate point is larger, the candidate point replaces the R point determined by the last adaptive threshold algorithm. If the candidate point amplitude is smaller, eliminating the candidate point; if the candidate point is lower than the high threshold but higher than the low threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is more than 0.24 seconds, determining the candidate point as the R point; if the candidate point is higher than the low threshold and the distance between the candidate point and the R point determined by the last adaptive threshold algorithm is less than 0.24 seconds, the amplitude values of the candidate point and the R point determined by the last adaptive threshold algorithm need to be compared, and if the amplitude value of the candidate point is larger, the candidate point replaces the R point determined by the last adaptive threshold algorithm. If the candidate point amplitude is smaller, eliminating the candidate point;

the updating of the threshold is iterated according to the rule shown in (1) in fig. 2, corresponding to the case where the candidate point is higher than the high threshold. Wherein the high threshold is updated according to the VC model, i.e., as shown in equation (2). The error covariance is updated according to equation (3) where the covariance Q1 of the state process noise is normalized to 1 and the covariance R1 of the measurement noise is set to 300 so that the kalman gain will settle to 0.056. The measurement update process for the high threshold is shown in equation (5), where m _ l (i) is the candidate point for this sub-threshold update. Finally, the error covariance value is shown by equation (6), and the low threshold is updated to 0.3 times the high threshold.

The updating of the threshold is iterated according to the rule shown in (2) in fig. 2, corresponding to the case where the candidate point is below the high threshold and above the low threshold (abnormal case). Wherein the high threshold is updated according to the VC model, i.e., as shown in equation (9). The error covariance is updated according to equation (10) where the covariance Q1 of the state process noise is normalized to 1 and the covariance R2 of the measurement noise is set to 100 so that the kalman gain will settle at 0.095. The setting can accelerate the iteration speed of the high and low threshold values, and avoids the influence on the threshold value iteration under the abnormal condition of the electrocardiosignal. The measurement update process for the high threshold is shown in equation (12), where m _ l (i) is the candidate point for this sub-threshold update. Finally, the error covariance value is shown in equation (13), and the low threshold is updated to 0.4 times the high threshold, so that the low threshold is not too low to cause iteration errors, which affects the determination of the R point in the QRS wave.

The method is applied based on the adaptive threshold iterative algorithm suitable for electrocardiosignal detection provided by the embodiment, and behavioral level verification is performed on matlab simulation software, so that the method is proved to be capable of effectively and adaptively adjusting the high and low thresholds according to the change of the amplitude value of the electrocardiosignal. As shown in fig. 3, which is a schematic diagram of high-low threshold iteration in an actual ECG signal in this embodiment, the ECG signal No. 202 from the MIT arrhythmia library is imported into matlab simulation software, a preprocessing module is debugged, and the ECG signal is fed into an adaptive threshold iteration algorithm module. The method can effectively and adaptively adjust the high and low thresholds and provide guarantee for subsequent peak detection.

FIG. 4 is a schematic diagram of threshold iteration in a specific case of an eccentric electrical signal. FIG. 4(1) shows the case where the R point in adjacent QRS waves increases slowly and the amplitude is lower than the high threshold, and the high and low thresholds both increase slowly; fig. 4(2) shows the case where the amplitude of the adjacent R point of the QRS wave is much smaller than that of the previous R point, and the high threshold value is steeply decreased, and the low threshold value is raised to a certain extent, so that the occurrence of false detection can be avoided. Fig. 4(3) shows the case where the adjacent R points of the QRS wave are only slightly smaller in magnitude than the previous R point, where the high threshold is slowly decreased and the low threshold is somewhat increased. Fig. 4(4) shows the case where the adjacent R point of the QRS wave is much larger in amplitude than the previous R point, where the high threshold rises slowly and the low threshold falls steeply.

FIG. 5 is a diagram illustrating Kalman gain iteration under different initial values of high threshold values. The invention is not sensitive to the high threshold initial value, thus relaxing the requirement on the setting of the initial value and increasing the practicability of the algorithm. Under the condition that other conditions are not changed, the results of (1), (4) and (5) in the attached drawings respectively correspond to Kalman gain iteration cases with initial values of 0.6/0.9/1.2/1.5. matlab simulation finds that after 147 iterations, the kalman gain variation conditions in the four cases are completely consistent.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种脑电信号采集系统及其控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!