Electrocardiosignal self-adaptive R wave real-time detection method and system

文档序号:158426 发布日期:2021-10-29 浏览:28次 中文

阅读说明:本技术 一种心电信号自适应的r波实时检测方法及系统 (Electrocardiosignal self-adaptive R wave real-time detection method and system ) 是由 邓立 于 2020-04-26 设计创作,主要内容包括:本发明涉及心电信号检测领域,具体涉及一种心电信号自适应的R波实时检测方法及系统。包括以下步骤:S1:预处理;S2:实时检测;S3:有效性判断。本方明通过预处理、实时检测和有效性判断对不同形态R波进行自适应检测,并根据实时检测的结果来对检测参数进行更新,使检测R波更加准确有效,也使本发明在实际应用中能够不断地优化检测参数,贴近实时检测的R波的特征,更加准确有效的识别异常异常R波。(The invention relates to the field of electrocardiosignal detection, in particular to an electrocardiosignal self-adaptive R wave real-time detection method and an electrocardiosignal self-adaptive R wave real-time detection system. The method comprises the following steps: s1: pre-treating; s2: detecting in real time; s3: and (6) judging the effectiveness. The method carries out self-adaptive detection on the R waves with different forms through preprocessing, real-time detection and effectiveness judgment, updates the detection parameters according to the real-time detection result, and enables the detection of the R waves to be more accurate and effective.)

1. An electrocardiosignal self-adaptive R wave real-time detection method is characterized by comprising the following steps: comprises the following steps;

s1: preprocessing the acquired original electrocardiographic waveform data of the body surface and outputting high-frequency data;

s2: detecting a step length W according to a detection threshold value and a preset R wave2Detecting R waves in the high-frequency data in real time;

s3: after the R wave is detected, carrying out validity judgment on the R wave, outputting a valid judgment result of the currently detected R wave, and continuing to carry out R wave detection;

and in the validity judgment, if the detected R wave is valid, updating the detection parameters and outputting the R wave position and the R wave characteristic data.

2. The electrocardiosignal self-adaptive R wave real-time detection method according to claim 1, characterized in that: step S1 includes the following flow:

s11: inputting original electrocardio waveform data;

s12: removing baseline drift of the original electrocardiographic waveform data through a high-pass filter and removing high-frequency noise signals through a low-pass filter, and performing power frequency filtering processing by using a power frequency filtering algorithm;

s13: and performing wavelet decomposition on the filtered original electrocardio waveform data through two wavelet functions with different scales, and outputting high-frequency data.

3. The electrocardiosignal self-adaptive R wave real-time detection method according to claim 1, characterized in that: the detection parameters comprise a detection threshold, an amplitude threshold and an RR interval mean value, and the R wave feature data comprise a high-frequency data maximum value, an R wave amplitude and an RR interval time.

4. The electrocardiosignal self-adaptive R wave real-time detection method according to claim 3, characterized in that: the step of obtaining the detection threshold in step S2 is:

s21: by obtaining the maximum value V of the high-frequency data in the latest time periodmaxAnd according to the formula Tmax=α*VmaxCalculating an initial threshold TmaxOutputting an initial detection threshold value beta1*TmaxWherein α and β1Are all preset coefficients;

s22: according to the initial threshold value TmaxDetecting R waves in the high-frequency data according to a preset threshold detection step length W, acquiring the number of the R waves in the time period, and calculating the heart rate and the RR interval according to the detected R wave position and the number of the R waves;

s23: detecting whether the heart rate is in a normal range or not and whether the absolute value of the difference value between the RR interval and the mean value of the RR interval is smaller than a preset value or not, and if the conditions are met, judging that the initial threshold T is within the normal range or notmaxIf the condition is not satisfied, the process goes to step S2, and if the condition is not satisfied, the process goes to step S21 again.

5. The electrocardiosignal self-adaptive R wave real-time detection method according to claim 1, characterized in that: the validity judgment in the step S3 includes the following steps:

s31: amplitude detection: obtaining the amplitude of the high-frequency data, preliminarily comparing the amplitude with a preset amplitude threshold, if the high-frequency data is greater than or equal to the amplitude threshold, continuing to execute the validity judging step, and if the high-frequency data is smaller than the amplitude threshold, the R wave is invalid, and re-detecting the R wave;

s32: calculating R wave characteristic data in the high-frequency data;

s33: comparing the R wave feature data with historical mean values, and when the difference value is smaller than gamma1Outputting the R wave position and the R wave characteristic data, and updating the historical mean value; wherein said γ is1The historical mean value is a preset value, and the historical mean value is the mean value of R wave characteristic data of the latest 10R waves in the historical data.

6. The electrocardiosignal self-adaptive R wave real-time detection method according to claim 4, characterized in that: the step S2 is to clear the detection parameters when no R-wave is detected in a detection period, and to execute the step S21, where the detection period is a preset value.

7. The electrocardiosignal self-adaptive R wave real-time detection method according to claim 1, characterized in that: the step S2 skips an R-wave detection process of an invalid period after detecting the R-wave, and is configured to skip a refractory period, and reduce a processing calculation amount, where the invalid period is preset according to the refractory period of the target position.

8. The electrocardiosignal self-adaptive R wave real-time detection method according to claim 4, characterized in that: the method further comprises a step S4, wherein the step S4 and the step S2 are synchronously performed, and the method is used for performing heart rate stability judgment in a preset updating period and updating detection parameters according to the heart rate stability judgment result, and the heart rate stability judgment comprises the following steps:

and calculating the cycle variance of the RR intervals in the updating cycle, judging that the heart rate is stable if the cycle variance is smaller than a preset cycle variance threshold, and updating the detection threshold, the RR interval mean value and the amplitude threshold, wherein the updating mode is to calculate the mean value of the existing detection parameters and R wave characteristic data in the updating cycle.

9. An electrocardiosignal self-adaptive R wave real-time detection system is characterized in that: the system comprises an acquisition module, a preprocessing module, a wavelet processing module, a threshold calculation module, a real-time detection module and an effectiveness judgment module;

the acquisition module is used for acquiring original electrocardio waveform data of the body surface; the preprocessing module is electrically connected with the acquisition module and is used for preprocessing the original electrocardiographic waveform data; the wavelet processing module is electrically connected with the preprocessing module and is used for performing wavelet decomposition on the preprocessed original electrocardiographic waveform data and outputting high-frequency data highlighting R wave characteristics to the threshold value calculating module; the threshold calculation module is electrically connected with the wavelet processing module and is used for performing threshold calculation processing on high-frequency data; the real-time detection module is electrically connected with the threshold calculation module and is used for detecting R waves; the effectiveness judging module is used for detecting whether the R wave is effective or not and outputting a detection result.

10. The electrocardiosignal adaptive R wave real-time detection system according to claim 9, wherein: the device also comprises a period updating module and an amplitude value calculating module; the periodic updating module is electrically connected with the real-time detection module and is used for updating detection data; the amplitude calculation module is arranged in the effectiveness judgment module and used for calculating the amplitude of the input data.

Technical Field

The invention relates to the field of electrocardiosignal processing, in particular to an electrocardiosignal self-adaptive R wave real-time detection method and an electrocardiosignal self-adaptive R wave real-time detection system.

Background

The normal cardiac electrical activity starts at the sinoatrial node and sends out impulses which are transmitted down the channel of the special conduction system to excite the atria and ventricles in sequence, so that the heart contracts and performs the function of pumping blood, and the transmission of the sequential electrical excitation can cause a series of potential changes to form a corresponding waveform on the electrocardiogram. At present, in the field of cardiac electrophysiology, diagnosis of heart diseases is based on body surface electrocardiograms and intracardiac electrocardiograms, and detection of R waves in the body surface electrocardiograms is the basis of all diagnosis and judgment.

The existing R wave detection algorithm adopts a difference method, a slope method, a wavelet decomposition method and the like, has a better detection result for standard R waves, and most of the R waves in abnormal electrocardiograms can not be correctly identified.

Therefore, a method capable of automatically adjusting real-time detection parameters of the R wave is urgently needed to solve the problems that the form of the R wave is not fixed, the amplitude is not fixed and the like.

Disclosure of Invention

The invention aims to: aiming at the problem that the R wave in the abnormal electrocardiogram can not be accurately identified in the prior art, the electrocardiosignal self-adaptive R wave real-time detection method and the electrocardiosignal self-adaptive R wave real-time detection system are provided.

In order to achieve the purpose, the invention adopts the technical scheme that:

an electrocardiosignal self-adaptive R wave real-time detection method comprises the following steps;

s1: preprocessing the acquired original electrocardiographic waveform data of the body surface and outputting high-frequency data;

s2: detecting a step length W according to a detection threshold value and a preset R wave2Detecting R waves in the high-frequency data in real time;

s3: after the R wave is detected, carrying out validity judgment on the R wave, outputting a valid judgment result of the currently detected R wave, and continuing to carry out R wave detection;

and in the validity judgment, if the detected R wave is valid, updating the detection parameters and outputting the R wave position and the R wave characteristic data. The method carries out real-time detection on the R wave through the steps of preprocessing, real-time detection and effectiveness judgment, and updates the detection parameters according to the real-time detection result, so that the detection of the R wave is more accurate and effective, and the method can continuously optimize the detection parameters in practical application, is close to the characteristics of the R wave detected in real time, and more accurately and effectively identifies the abnormal R wave.

As a preferable aspect of the present invention, step S1 includes the following steps:

s11: inputting original electrocardio waveform data;

s12: removing baseline drift of the original electrocardiographic waveform data through a high-pass filter and removing high-frequency noise signals through a low-pass filter, and performing power frequency filtering processing by using a power frequency filtering algorithm;

s13: and performing wavelet decomposition on the filtered original electrocardio waveform data through two wavelet functions with different scales, and outputting high-frequency data. The invention carries out corresponding preprocessing on the original electrocardio waveform data, wherein wavelet transformation has the characteristic of multi-resolution, and the position of each frequency component on a time axis after transformation is kept unchanged, and the invention can obtain frequency domain characteristics on the premise of keeping the time domain characteristics of short-time rapidly-changing non-periodic signals, is very suitable for R wave characteristic extraction, is combined with filtering processing for use, effectively eliminates noise and other interferences, reduces the detection difficulty and enables the detection data to be more accurate.

As a preferred aspect of the present invention, the detection parameters include a detection threshold, an amplitude threshold, and an RR interval mean, and the R-wave feature data include a high-frequency data maximum, an R-wave amplitude, and an RR interval time.

As a preferable embodiment of the present invention, the step of acquiring the detection threshold in step S2 is:

s21: by obtaining the maximum value V of the high-frequency data in the latest time periodmaxAnd according to the formula Tmax=α*VmaxCalculating an initial threshold TmaxOutputting an initial detection threshold value beta1*TmaxWherein α and β1Are all preset coefficients;

s22: according to the initial threshold value TmaxDetecting R waves in the high-frequency data according to a preset threshold detection step length W, acquiring the number of the R waves in the time period, and calculating the heart rate and the RR interval according to the detected R wave position and the number of the R waves;

s23: detecting whether the heart rate is in a normal range or not and whether the absolute value of the difference value between the RR interval and the mean value of the RR interval is smaller than a preset value or not, and if the conditions are met, judging that the initial threshold T is within the normal range or notmaxIf the condition is not satisfied, the process goes to step S2, and if the condition is not satisfied, the process goes to step S21 again. The invention greatly improves the reliability of the initial threshold value and also greatly improves the reliability of the initial threshold value through threshold value calculation and threshold value validity judgmentThe accuracy of the subsequent detection of the invention.

As a preferable embodiment of the present invention, the validity judgment in step S3 includes the following steps:

s31: amplitude detection: obtaining the amplitude of the high-frequency data, preliminarily comparing the amplitude with a preset amplitude threshold, if the high-frequency data is greater than or equal to the amplitude threshold, continuing to execute the validity judging step, and if the high-frequency data is smaller than the amplitude threshold, the R wave is invalid, and re-detecting the R wave;

s32: calculating R wave characteristic data in the high-frequency data;

s33: comparing the R wave feature data with historical mean values, and when the difference value is smaller than gamma1Outputting the R wave position and the R wave characteristic data, and updating the historical mean value; wherein said γ is1The historical mean value is a preset value, and the historical mean value is the mean value of R wave characteristic data of the latest 10R waves in the historical data. According to the invention, through the operation of effectiveness judgment and historical data entry on the detected R wave, the influence caused by interference of other factors is avoided, the reliability of the detected R wave is improved, and meanwhile, the detection data is continuously updated, so that the subsequent detection difficulty is greatly reduced, the accuracy of the subsequent detection is improved, and the method is more effective and reliable.

As a preferred embodiment of the present invention, in the step S2, when no R-wave is detected in a detection period, the detection parameter is cleared, and the step S21 is executed, where the detection period is a preset value.

As a preferable aspect of the present invention, the step S2 is configured to skip an R-wave detection process of an invalid period after detecting the R-wave, so as to skip the refractory period and reduce the processing calculation amount, where the invalid period is preset according to the refractory period of the target location.

As a preferable scheme of the present invention, the method further includes step S4, where step S4 is performed in synchronization with step S2, and is configured to perform a heart rate stability determination in a preset update cycle, and perform detection parameter update according to a result of the heart rate stability determination, where the heart rate stability determination includes the following steps:

and calculating the cycle variance of the RR intervals in the updating cycle, judging that the heart rate is stable if the cycle variance is smaller than a preset cycle variance threshold, and updating the detection threshold, the RR interval mean value and the amplitude threshold, wherein the updating mode is to calculate the mean value of the existing detection parameters and R wave characteristic data in the updating cycle.

An electrocardiosignal self-adaptive R wave real-time detection system comprises an acquisition module, a preprocessing module, a wavelet processing module, a threshold value calculation module, a real-time detection module and an effectiveness judgment module;

the acquisition module is used for acquiring original electrocardio waveform data of the body surface; the preprocessing module is electrically connected with the acquisition module and is used for preprocessing the original electrocardiographic waveform data; the wavelet processing module is electrically connected with the preprocessing module and is used for performing wavelet decomposition on the preprocessed original electrocardiographic waveform data and outputting high-frequency data highlighting R wave characteristics to the threshold value calculating module; the threshold calculation module is electrically connected with the wavelet processing module and is used for performing threshold calculation processing on high-frequency data; the real-time detection module is electrically connected with the threshold calculation module and is used for detecting R waves; the effectiveness judging module is used for detecting whether the R wave is effective or not and outputting a detection result.

As a preferred scheme of the invention, the device also comprises a period updating module and an amplitude value calculating module; the periodic updating module is electrically connected with the real-time detection module and is used for updating detection data; the amplitude calculation module is arranged in the effectiveness judgment module and used for calculating the amplitude of the input data.

In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:

1. the method carries out real-time detection on the R wave through the steps of preprocessing, real-time detection and effectiveness judgment, and updates the detection parameters according to the real-time detection result, so that the detection of the R wave is more accurate and effective, and the method can continuously optimize the detection parameters in practical application, is close to the characteristics of the R wave detected in real time, and more accurately and effectively identifies the abnormal R wave.

2. The invention carries out corresponding preprocessing on the original electrocardio waveform data, wherein wavelet transformation has the characteristic of multi-resolution, and the position of each frequency component on a time axis after transformation is kept unchanged, and the invention can obtain frequency domain characteristics on the premise of keeping the time domain characteristics of short-time rapidly-changing non-periodic signals, is very suitable for R wave characteristic extraction, is combined with filtering processing for use, effectively eliminates noise and other interferences, reduces the detection difficulty and enables the detection data to be more accurate.

3. According to the invention, through threshold calculation and threshold validity judgment, the reliability of the initial threshold is greatly improved, and the accuracy of subsequent detection of the invention is also greatly improved.

4. According to the invention, through the operation of effectiveness judgment and historical data entry on the detected R wave, the influence caused by interference of other factors is avoided, the reliability of the detected R wave is improved, and meanwhile, the detection data is continuously updated, so that the subsequent detection difficulty is greatly reduced, the accuracy of the subsequent detection is improved, and the method is more effective and reliable.

5. The invention skips 11 acquisition cycles after detecting the R wave to achieve the effect of skipping the refractory period, thereby reducing the processing calculation amount.

Drawings

Fig. 1 is a schematic flow chart of an electrocardiographic signal adaptive R-wave real-time detection method according to embodiment 1 of the present invention.

Fig. 2 is a schematic flow chart of an electrocardiographic signal adaptive R-wave real-time detection method according to embodiment 2 of the present invention.

Fig. 3 is a schematic structural diagram of an electrocardiographic signal adaptive R-wave real-time detection system according to embodiment 4 of the present invention.

Fig. 4 is a schematic diagram of a wavelet decomposition module wavelet decomposition flow of the electrocardiosignal adaptive R-wave real-time detection system according to embodiment 4 of the present invention.

Detailed Description

The present invention will be described in detail below with reference to the accompanying drawings.

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Example 1

As shown in fig. 1, a method for detecting R-wave of an electrocardiographic signal in real time, which is adaptive, includes the following steps;

s1: preprocessing the acquired original electrocardiographic waveform data of the body surface and outputting high-frequency data;

s2: detecting a step length W according to a detection threshold value and a preset R wave2Detecting R waves in the high-frequency data in real time;

s3: after the R wave is detected, carrying out validity judgment on the R wave, outputting a valid judgment result of the currently detected R wave, and continuing to carry out R wave detection;

and in the validity judgment, if the detected R wave is valid, updating the detection parameters and outputting the R wave position and the R wave characteristic data.

The detection parameters comprise a detection threshold, an amplitude threshold and an RR interval mean value, and the R wave feature data comprise a high-frequency data maximum value, an R wave amplitude and an RR interval time.

Example 2

As shown in fig. 2, the present embodiment is different from embodiment 1 in that the present embodiment further includes a wavelet transform, a threshold calculation, and a periodic update process, including the following steps;

a) pretreatment: the method comprises the steps of collecting original electrocardiographic waveform data of a body surface through hardware equipment, and preprocessing the original electrocardiographic waveform data.

b) Wavelet transformation: and c, performing wavelet decomposition on the original electrocardio waveform data preprocessed in the step a through wavelet functions of two different scales, and outputting high-frequency data highlighting R wave characteristics.

c) And (3) threshold calculation: performing threshold calculation processing on the high-frequency data to obtain an initial threshold, and outputting the initial threshold and R wave characteristic data; the R wave feature data comprise high frequency data maximum values and RR interval time.

d) Real-time detection: setting detection parameters according to the initial threshold and the R wave characteristic data, and detecting the R wave in real time; and after the R wave is detected, judging the effectiveness of the R wave, outputting an effective judgment result of the currently detected R wave, and if the R wave is effective, recording R wave characteristic data and outputting the R wave position and the R wave characteristic data.

e) And (3) periodic updating: and storing data by taking the real-time RR interval as a storage period, judging the heart rate stability, and updating the detection data if the heart rate is stable.

Wherein, step a includes the following processes:

a1) collecting original electrocardiographic waveform data and outputting the original electrocardiographic waveform data.

a2) And removing baseline drift of the original electrocardiographic waveform data through a high-pass filter and removing high-frequency noise signals through a low-pass filter, then performing power frequency filtering processing by using a power frequency filtering algorithm, and outputting the preprocessed original electrocardiographic waveform data.

The step c comprises the following steps:

c1) obtaining the high-frequency data of the latest time period to obtain the maximum value V of the high-frequency datamaxAccording to the formula Tmax=α*VmaxCalculating an initial threshold TmaxWherein the time period is a preset parameter, alpha is a preset coefficient and satisfies that alpha is more than 0.5 and less than 0.9; the time period is 4000ms-6000ms]Taking values.

c2) According to the initial threshold value TmaxDetecting R waves in the high-frequency data according to a preset threshold detection step length W, acquiring the number of the R waves in the time period, and calculating an RR interval and a heart rate according to the detected positions and the number of the R waves;

and considering that the initial threshold value is calculated completely, otherwise, continuing to update the input data, and recalculating after 1s until the initial threshold value is successfully calculated.

c3) Judging whether the calculated value meets the condition: the heart rate satisfies [35, 300 ]]And the difference of RR intervals is less than 32ms, if the condition is satisfied,outputting the initial threshold value TmaxAnd R wave feature data and entering the step d, and entering the step a if the condition is not met.

The step e and the step d are synchronously carried out, and the method comprises the following steps:

e1) and taking the real-time RR interval as a storage period, and entering a step e2 when the storage number reaches 3.

e2) And (3) judging the heart rate stability: and e, calculating the cycle variance of the RR intervals in the storage cycle, judging that the heart rate is stable if the cycle variance is smaller than a preset cycle variance threshold, updating the detection threshold, the RR interval mean value and the amplitude threshold, clearing the storage times and entering step e 1.

Example 3

This example differs from example 2 in that step d satisfies the following steps:

d1) according to the initial threshold value TmaxSetting a detection threshold value, and inputting data by taking 16ms as an acquisition cycle;

when the product of the input times and the collection period 16ms is more than 3 times of the mean value of the RR intervals, entering the step c; the mean value of the RR intervals is the mean value of the latest 10 RR intervals in the historical data;

when the input times are more than 11 times and the product of the input times and the acquisition period 16ms is less than 3 times of the mean value of the RR intervals, outputting the real-time detection data and entering the step d 2.

d2) Step length W is detected by R wave2Detecting the amplitude of the real-time detection data, and comparing the amplitude with a preset amplitude threshold;

when the amplitude is greater than or equal to the amplitude threshold, entering step d 3;

when the amplitude is smaller than the amplitude threshold, step d1 is entered.

d3) Performing wavelet decomposition on the real-time detection data to obtain high-frequency data, and comparing the input times with the product of the acquisition period of 16ms and the RR interval mean value;

if the product is greater than or equal to the RR interval mean, go to step d 4;

if the product is less than the RR interval mean, proceed to step d 5.

d4) Detecting a step length W with a predetermined validity3Searching the maximum value of the high-frequency data, and enabling the detection threshold to be 90% of the detection threshold; and comparing said maximum value to 75% of said detection threshold; wherein the step size W3Less than said step length W2

If the maximum value is greater than or equal to 75% of the detection threshold value, judging that R waves are detected, and calculating R wave characteristic data in the real-time detection data; comparing the R wave feature data with a historical mean value, outputting the R wave position and the R wave feature data when the difference value is less than 30% of the historical mean value, recording the R wave feature data into the historical data, and entering step d 6; the historical mean value is the mean value of R wave characteristic data of the latest 10R waves in the historical data;

if the maximum value is less than 75% of the detection threshold value, determining that the R wave is not detected, and entering step d 1;

the detection window t of the step d11The detection window t of said step d42Are preset values and satisfy t2=10t1

d5) Acquiring the maximum values of the data of the two latest acquisition periods in the high-frequency data, and comparing the maximum values with 85% of the detection threshold value;

if the maximum value is greater than or equal to 85% of the detection threshold value, judging that R waves are detected, and calculating R wave characteristic data in the real-time detection data; comparing the R wave feature data with a historical mean value, outputting the R wave position and the R wave feature data when the difference value is less than 30% of the historical mean value, inputting the R wave feature data into the historical data for updating, and entering step d 6;

if the maximum value is less than 85% of the detection threshold value, it is determined that the R wave is not detected, and the process proceeds to step d 1.

d6) And d, setting the input times to zero, entering step d1, skipping the subsequent input continuous 11 acquisition cycles, not inputting data, and only accumulating the input times for skipping the refractory period and reducing the processing calculation amount.

Example 4

As shown in fig. 3, an adaptive R-wave real-time detection system for electrocardiographic signals includes an acquisition module, a preprocessing module, a wavelet processing module, a threshold calculation module, a real-time detection module, and a periodic update module.

The invention collects the body surface electrocardio waveform data through the collection module, and preprocesses the data through the preprocessing module after amplification and filtering so as to remove baseline drift and noise signals in the signals. Inputting the processed signal into a wavelet transform module, and extracting an R wave characteristic signal in the signal; and inputting the extracted R baud sign signal into an automatic threshold module for threshold calculation to obtain an initial threshold. And through the initial threshold, performing R wave real-time detection and updating the detected threshold in real time in the real-time detection module, then performing validity judgment, judging whether the detection result is an R wave, outputting the R wave position and R wave characteristic data, and simultaneously inputting the detection result into the automatic period calculation module to obtain the signal electrocardio period and the R wave amplitude.

A preprocessing module: and removing baseline drift of the data through a high-pass filter, removing high-frequency noise signals through a low-pass filter, then performing power frequency filtering processing by using a power frequency filtering algorithm, and transmitting the processed data into a wavelet transformation module.

A wavelet transformation module: using designed wavelet functionsThe inner product of the signals to be analyzed x (t) at two different scales is:

wherein the content of the first and second substances,is a function of a waveletAs a function of the shift τ and scale a, etcThe effective frequency domain representation is:wherein, Wx(a, τ) is the wavelet coefficient, X (ω),Are each x (t),The fourier transform of (d). The above two equations show that: the wavelet transform can be viewed as using fundamental frequency characteristicsThe band-pass filter filters the heart rate at different scales a, and the signal x (t) passes through the basic waveletTwo-in expansion (take a as 2)jJ-1, 2,3 … and binary translation (meaning each movement)) The formed odd function can obtain the binary discrete wavelet transform of the signal, namely wavelet decomposition.

The decomposition flow is shown in fig. 4, where S is the original electrocardiographic waveform data, a1, a2, A3 are low frequency portions, and the original signal is kept in a rough waveform, i.e., an approximate signal; d1, D2 and D3 are high-frequency parts, and highlight detail characteristics of signals, namely detail signals.

The preprocessed signals are subjected to wavelet decomposition through wavelet functions of two different scales, a high-frequency part with prominent R wave characteristics is obtained, and the obtained signals containing the R wave characteristics are input into a threshold calculation data cache and a real-time detection data cache.

A threshold calculation module: obtaining input data buffer maximum value VmaxThreshold calculation initial threshold TmaxComprises the following steps: t ismax=α*VmaxSearching data in the input data buffer by a certain step length W, and using an initial threshold value TmaxInspection, when inspectingWhen the first R wave is found, updating the threshold value and recording the position to skip the refractory period length (120-180ms), continuing to search, when the second R wave is detected, judging the effectiveness, if the R wave is invalid, continuing to search, if the R wave is valid, calculating the period, updating the threshold value, recording the original waveform characteristics of the R wave and the characteristics after wavelet decomposition, and outputting the initial threshold value TmaxAnd R-wave characterization data. And if the threshold value calculation results of three consecutive times are invalid values, removing information such as the threshold value, the period, the amplitude value and the like, and performing initial threshold value calculation again.

A real-time detection module: the real-time detection module also comprises an amplitude calculation module and an effectiveness judgment module; the real-time detection module obtains an initial threshold value TmaxThen, the step length W is detected by the R wave2Is a time interval, beta1*TmaxIs a threshold value, t1And (3) detecting the R wave by taking the millisecond as the size of a detection window, and increasing the refractory period and the effectiveness of the amplitude as screening before detection so as to reduce the calculated amount. Judging the magnitude relation between the detected period and the mean value of the RR intervals by taking the mean value of the RR intervals as a reference standard, and adopting beta when the magnitude relation is smaller than the mean value of the RR intervals2*TmaxThe threshold value is used as a detection standard, and beta is adopted when the average value of the RR intervals is larger than or equal to the average value of the RR intervals3*TmaxThreshold as detection criterion, t2Millisecond detection window size detects R-wave by W3As a step size, the initial threshold value T is decreasedmax10% (minimum not less than half of the mean of the previous cycle). When the R wave is not detected in the time of continuous 3 RR interval mean values, the information of the threshold, the period, the amplitude value and the like is eliminated, and the initial calculation of the threshold is carried out again. Wherein, 5 is more than or equal to n1≥10,β1、β2、β3Satisfies the condition of 0.9 & gtbeta1>β1>β1>0.5,t2=10t1Said step length W3Less than said step length W2

An amplitude calculation module: when the real-time detection module detects the R wave, the original waveform amplitude calculation is carried out on the detected R wave, the amplitude calculation is carried out on the outstanding R wave characteristic signal data obtained by the wavelet decomposition of the two scales, and the obtained R wave characteristic data are transmitted to the effectiveness judgment module.

The validity judging module: and comparing the result obtained by the amplitude calculation module with the R wave feature obtained by threshold calculation for judgment, if the feature difference is greater than a preset threshold gamma, determining that the detected waveform is not the R wave, and if the difference is less than the preset threshold gamma, updating the related feature parameters and the threshold of the R wave, wherein gamma takes the value in [0.6, 0.8 ].

A periodic update module: recording continuous n RR intervals, calculating variance of the recorded period, inputting n RR interval length cache data into a threshold module when the variance is less than a set threshold T, updating a period record cache, a threshold record cache and an R wave feature record cache, wherein n is a value in [3,5 ].

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于心脑电信号的心肺复苏后神经功能结局评估系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!