A kind of adaptive CA-CFAR localization method of R wave of electrocardiosignal

文档序号:1746791 发布日期:2019-11-29 浏览:12次 中文

阅读说明:本技术 一种心电信号r波的自适应ca-cfar定位方法 (A kind of adaptive CA-CFAR localization method of R wave of electrocardiosignal ) 是由 包志强 罗小宏 赵志超 王宇霆 于 2019-09-03 设计创作,主要内容包括:本发明公开了一种心电信号R波的自适应CA-CFAR定位方法,先利用滤波器组对心电信号进行预处理;然后将预处理后的信号利用自适应CA-CFAR检测判决;最后由心电信号R波的间隔特性做一个不应期剔除规则的处理,得到R波的定位。本发明与经典的滤波后采用动态门限和差分方法的检测算法相比,由于预处理采用了滑动窗口滤波,增强了R波分量,提高了对较小R波的检测精度;与小波变换算法的R波检测和利用双斜率方法检测相比,由于采用了单元平均恒虚警方法,对噪声中信号的检测性能提高。(The invention discloses a kind of adaptive CA-CFAR localization methods of R wave of electrocardiosignal, pre-process first with filter group to electrocardiosignal;Then pretreated signal is utilized into adaptive CA-CFAR detection judgement;The processing that a refractory period rejects rule finally is done by the interval characteristics of R wave of electrocardiosignal, obtains the positioning of R wave.The present invention, since pretreatment uses sliding-window filtering, enhances R wave component, improves the detection accuracy to smaller R wave compared with the detection algorithm for using dynamic threshold and difference method after classical filtering;Compared with the R wave of Wavelet Transformation Algorithm detection and using double gradient method detections, due to using unit average constant false alarm method, the detection performance of Signal in Noise is improved.)

1. a kind of adaptive CA-CFAR localization method of R wave of electrocardiosignal, which is characterized in that including following operation:

1) ECG signal to be processed is filtered out into low-frequency noise and high-frequency noise by bandpass filtering, obtains QRS wave group congruences and highlights Signal e, then signal e is inverted to obtain signal S through absolute valuemax, and with low-pass filter to signal SmaxSmoothly obtain To signal m, then summation process is carried out to signal m through sliding-window filtering and obtains signal l (n);

2) signal l (n) is passed through into quadratic detection, obtains input signal yn

3) input signal ynThe mean power Z of the reference unit of middle to-be-measured cell D are as follows:

Wherein, xiAnd yiIt is the power of i-th of reference unit signal in the N number of reference unit in the front and back to-be-measured cell D respectively, n is signal Length, Z are mean power;

Mean power Z and Product-factor T-phase is multiplied to CA-CFAR thresholding S;The Product-factor T according toCome Setting, wherein PfaFor constant false alarm rate, RrIt is number of reference;Initial reference unit number and data sampling frequency fsRelationship be Rr =α × fs, α is coefficient;

4) cells D to be measured and thresholding S are normalized again and take its logarithm:

S=T × Z

Wherein, S is thresholding, and T is Product-factor, and Z is mean power, yDFor the measured signal after quadratic detection, max (yD) be yDMaximum value, max (S) be S maximum value;

5) to Dtest、StestCarry out following judgement:

Wherein, H1Indicate that R wave exists, H0Indicate that R wave is not present;

It 6) is H to court verdict1Signal carry out following refractory period rejecting, if each eartbeat interval should meet:

Wherein,For the R wave position that previous ought be detected,For the R wave position detected, f next timesFor data sampling frequency Rate;

If detecting this R wave navigated to is unsatisfactory for above formula at a distance from a upper R wave, this R wave navigated to is deleted, if Satisfaction then retains;

7) to the R wave detected, average heart rate is calculated according to RR interphase, updates number of reference further according to average heart rate, more Carry out step 3)~6 again after new number of reference) detection;

The number of reference RrWith palmic rate xrRelational expression are as follows: Rr=-2.376xr+499.911;

To number of reference RrAfter the completion of update, the R wave positioning in electrocardiosignal is completed.

2. the adaptive CA-CFAR localization method of R wave of electrocardiosignal as described in claim 1, which is characterized in that the band Pass filter is the 80 rank bandpass filters for using frequency band as 10~25Hz, and frequency and measured signal data sampling frequency are same;And Edge extension is carried out to ECG signal both ends, continuation length is the length of filter order, and continuation value respectively takes the big of its marginal value It is small.

3. the adaptive CA-CFAR localization method of R wave of electrocardiosignal as described in claim 1, which is characterized in that described is exhausted It is that wave crest is all reversed to posivtive spike to value processing:

Smax=| en| n=1,2,3...

enIt is signal after bandpass filtering, SmaxThe signal after absolute value reversion is done for signal.

4. the adaptive CA-CFAR localization method of R wave of electrocardiosignal as described in claim 1, which is characterized in that the letter Number SmaxIt is to carry out smoothly obtaining signal m by the low-pass filter of 20 rank 5Hz;

Following sliding-window filtering is respectively adopted to signal m signal m is handled to obtain signal l (n);

Wherein, w is sliding window size, and l (n) is gained signal after sliding window.

5. the adaptive CA-CFAR localization method of R wave of electrocardiosignal as claimed in claim 3, which is characterized in that also in sliding window Margin signal abandoned first is avoided to signal m both ends continuation before processing;

The slide window processing is to handle twice, first time sliding window size w18 are set as, second of sliding window w2It is set as 2.

6. the adaptive CA-CFAR localization method of R wave of electrocardiosignal as described in claim 1, which is characterized in that described is flat The processing of side's rule detection are as follows:

yn=(ln)2, n=1,2,3...

Wherein, l (n) is the signal after sliding-window filtering, ynFor the signal after quadratic detection.

7. the adaptive CA-CFAR localization method of R wave of electrocardiosignal as described in claim 1, which is characterized in that the perseverance False alarm rate PfaIt is set as: Pfa=10-2

Reference unit size, R in initial reference unit and data sampling frequency relationship are adjusted according to heart rate speedr=α × fs, fs For data sampling frequency, factor alpha=[0.6,1.2];Initial reference unit number is set as 300.

8. the adaptive CA-CFAR localization method of R wave of electrocardiosignal as described in claim 1, which is characterized in that set sampling frequency Rate is 360, and satisfaction detects positioning every time distance when being rejected and required by refractory period need to be greater than 81;If detecting this R navigated to Wave is small at a distance from a upper R wave to be equal to 81, then deletes this R wave navigated to.

Technical field

The invention belongs to the field of medical instrument technology, the electrocardiogram processing being related in medical instrument, in particular to a kind of heart The adaptive CA-CFAR localization method of electric signal R wave.

Background technique

Electrocardiogram (Electrocardiogram, ECG) signal can simply record the electrical activity generated by heart, be one The effective Noninvasive tool of kind can be used for measuring heart rate, check the abnormal rhythm of the heart, Diagnosing Cardiac, Emotion identification and biological characteristic A variety of biomedical applications such as identification.What it is due to electrocardiographic recorder is heart whithin a period of time by placing electricity with human body Pole and the small electrical activity generated, so the wave amplitude of electrocardiogram is smaller, typically millivolt (mV) rank, frequency range exist 0.05~100Hz, noise may directly cover signal sometimes, thus be a kind of low amplitude value, low frequency, low signal-to-noise ratio physiology Signal, this brings bigger difficulty to ECG signal sampling.

Pan and Tompkins etc. propose the detection algorithm of classical QRS complex, and filter group is utilized and filters in advance to signal Processing, bandpass filter effectively reduce the noise jamming in ECG signal, and using difference method and dynamic threshold to R wave Carry out detection and localization;Although effectively detecting R wave, accuracy is not high, bad to smaller R wave detection effect.Hulya K S, Suleyman C etc. is handled ECG signal using wavelet transformation, but algorithm noise immunity is weaker.WangY,Deepu C J Deng according to ECG signal property, signal is subjected to the processing of diclinic rate, QRS is finally become one and unimodal carries out detection positioning, algorithm Detection accuracy is improved, but its algorithmic stability performance of the small peak value signal in noise is weakened.

Summary of the invention

Present invention solves the technical problem that be to provide a kind of adaptive CA-CFAR localization method of R wave of electrocardiosignal, it can To improve detection accuracy and stability, while still there is good detection performance in low signal-to-noise ratio, existing electrocardio is overcome to believe The deficiency of number R wave detection.

The present invention is to be achieved through the following technical solutions:

A kind of adaptive CA-CFAR localization method of R wave of electrocardiosignal, including following operation:

1) ECG signal to be processed is filtered out into low-frequency noise and high-frequency noise by bandpass filtering, obtains QRS wave group congruences Then the signal e highlighted inverts signal e through absolute value to obtain signal Smax, and with low-pass filter to signal SmaxIt carries out flat It is sliding to obtain signal m, then summation process is carried out to signal m through sliding-window filtering and obtains signal l (n);

2) signal l (n) is passed through into quadratic detection, obtains input signal yn

3) input signal ynThe mean power Z of the reference unit of middle to-be-measured cell D are as follows:

Wherein, xiAnd yiIt is the power of i-th of reference unit signal in the N number of reference unit in the front and back to-be-measured cell D respectively, n is Signal length, Z are mean power;

Mean power Z and Product-factor T-phase is multiplied to CA-CFAR thresholding S;The Product-factor T according toTo be arranged, wherein PfaFor constant false alarm rate, RrIt is number of reference;Initial reference unit number and data sampling frequency Rate fsRelationship be Rr=α × fs, α is coefficient;

4) cells D to be measured and thresholding S are normalized again and take its logarithm:

S=T × Z

Wherein, S is thresholding, and T is Product-factor, and Z is mean power, yDFor the measured signal after quadratic detection, max (yD) it is yDMaximum value, max (S) be S maximum value;

5) to Dtest、StestCarry out following judgement:

Wherein, H1Indicate that R wave exists, H0Indicate that R wave is not present;

It 6) is H to court verdict1Signal carry out following refractory period rejecting, if each eartbeat interval should meet:

Wherein,For the R wave position that previous ought be detected,For the R wave position detected, f next timesIt is adopted for data Sample frequency;

If detecting this R wave navigated to is unsatisfactory for above formula at a distance from a upper R wave, this R navigated to is deleted Wave retains if meeting;

7) to the R wave detected, average heart rate is calculated according to RR interphase, updates reference unit further according to average heart rate Number, update number of reference after carry out step 3)~6 again) detection;

The number of reference RrWith palmic rate xrRelational expression are as follows: Rr=-2.376xr+499.911;

To number of reference RrAfter the completion of update, the R wave positioning in electrocardiosignal is completed.

The bandpass filtering is the 80 rank bandpass filters for using frequency band as 10~25Hz, frequency and measured signal number It is same according to sample frequency;And edge extension is carried out to ECG signal both ends, continuation length is the length of filter order, and continuation value is each Take the size of its marginal value.

The absolute value processing is that wave crest is all reversed to posivtive spike:

Smax=| en| n=1,2,3...

enIt is signal after bandpass filtering, SmaxThe signal after absolute value reversion is done for signal.

The signal SmaxIt is to carry out smoothly obtaining signal m by the low-pass filter of 20 rank 5Hz;

Following sliding-window filtering is respectively adopted to signal m signal m is handled to obtain signal l (n);

Wherein, w is sliding window size, and l (n) is gained signal after sliding window.

Margin signal abandoned first is avoided to signal m both ends continuation also before slide window processing;

The slide window processing is to handle twice, first time sliding window size w18 are set as, second of sliding window w2It is set as 2.

The processing of the quadratic detection are as follows:

yn=(ln)2, n=1,2,3...

Wherein, l (n) is the signal after sliding-window filtering, ynFor the signal after quadratic detection.

The constant false alarm rate PfaIt is set as: Pfa=10-2

Reference unit size, R in initial reference unit and data sampling frequency relationship are adjusted according to heart rate speedr=α × fs, fsFor data sampling frequency, factor alpha=[0.6,1.2];Initial reference unit number is set as 300.

If sample frequency is 360, satisfaction detects positioning every time distance when being rejected and required by refractory period need to be greater than 81;If inspection This R wave that survey navigates to is small at a distance from a upper R wave to be equal to 81, then deletes this R wave navigated to.

Compared with prior art, the invention has the following beneficial technical effects:

Using dynamic after the adaptive CA-CFAR localization method of R wave of electrocardiosignal provided by the invention, with classical filtering Thresholding is compared with the detection algorithm of difference method, since pretreatment uses sliding-window filtering, is enhanced R wave component, is improved To the detection accuracy of smaller R wave;Compared with the R wave of Wavelet Transformation Algorithm detection and using double gradient method detections, due to adopting With unit average constant false alarm method, the detection performance of Signal in Noise is improved.

Detailed description of the invention

Fig. 1 is ECG signal R wave positioning flow schematic diagram of the invention.

Fig. 2 is ECG signal R wave positioning signal processing schematic of the invention.

Fig. 3 is that ECG signal passes through pretreated signal.

Fig. 4 is the relation schematic diagram that reference unit size changes with palmic rate.

Fig. 5 is the result schematic diagram that ECG signal R wave of the invention positions.

Specific embodiment

Below with reference to embodiment, the invention will be described in further detail, described to be explanation of the invention rather than limit It is fixed.

The adaptive CA-CFAR localization method of a kind of R wave of electrocardiosignal provided by the invention, first with filter group to the heart Electric signal is pre-processed;Then pretreated signal is utilized into adaptive CA-CFAR detection judgement;Finally by electrocardiosignal The interval characteristics of R wave do the processing that a refractory period rejects rule, obtain the positioning of R wave.

Further referring to Fig. 1, Fig. 2, the adaptive CA-CFAR localization method of R wave of electrocardiosignal provided by the invention, packet Include following operation:

1) ECG signal pre-processes:

Bandpass filtering is first passed through, then does absolute value overturning, subsequently low-pass filtering, is finally filtered by sliding window twice Wave obtains preprocessed signal.

Using 80 ranks, the bandpass filter that frequency band is 10~25Hz carries out bandpass filtering, frequency and measured signal data Sample frequency is same.To avoid edge effect, ECG signal both ends are subjected to edge extension, continuation length is the length of filter order Degree, continuation value respectively take the size of its marginal value.The signal e obtained after bandpass filter mainly remains QRS complex, because The frequency band of bandpass filter has filtered out low-frequency noise and high-frequency noise between 10~25Hz, and QRS complex energy is mainly concentrated In 10~25Hz, so QRS wave group congruences are highlighted relative to other signals, i.e., QRS wave is increased relative to other signals Group's component, this provides useful information to the detection of R wave.

Signal e has multiple continuous relatively tall and big positive negative waves due to the signal being substantially filtered out other than QRS complex Absolute value processing is done to the signal after bandpass filtering, wave crest is all reversed to posivtive spike in peak:

Smax=| en| n=1,2,3... (1)

enIt is signal after bandpass filtering, n is the length of signal e, SmaxThe signal after absolute value reversion is done for signal.

Signal SmaxIt will appear multiple wave crests, so with low-pass filter to signal SmaxIt carries out smoothly obtaining signal m, low pass Filter is the low-pass filter of a 20 rank 5Hz.It loses by filtered signal energy, so with sliding window twice Filtering handles signal m, and sliding-window filtering essence is summed to signal in sliding window, i.e.,

Wherein, w is sliding window size, and n is the length of signal m, and l (n) is gained signal after sliding window.It is first right before slide window processing The continuation of signal both ends avoids margin signal abandoned, first time sliding window size w18 are set as, second of sliding window w2It is set as 2.By two The amplitude of signal is enhanced after secondary sliding window.

Referring to Fig. 3, in figure, the first row signal is the original signal of ECG signal, there is apparent baseline drift and faint height Frequency noise;As shown in the second row by bandpass filter (10-25Hz) filtered signal, relative to original signal bandpass filtering Signal afterwards eliminates baseline drift and high-frequency noise, and relative to other signals, QRS wave group congruences are highlighted;Due to this hair Bright main task is to navigate to R wave, so the signal after bandpass filtering is done an absolute value processing, all signals are become Just, as shown in Fig. 3 the third line, there are multiple wave crests, be filtered with low-pass filter (5Hz), LPF Cutoff high frequency Signal allows signal to obtain smoothly;It causes damages due to filtering twice to signal energy, so signal amplitude is lower, so to letter Number sliding-window filtering is carried out, the signal in confrontation sliding window is summed in fact, and signal energy increases, i.e. R wave more highlights.And Since pretreatment uses sliding-window filtering, R wave component is enhanced, the detection accuracy to smaller R wave is improved.

2) pretreated signal passes through quadratic detection, obtains the input signal of CA-CFAR:

yn=(ln)2, n=1,2,3... (3)

Wherein, l (n) is the signal after sliding-window filtering, ynFor the signal after quadratic detection.

3) adaptive CA-CFAR detection

3.1) constant false alarm rate PfaIt is arranged with Product-factor T

For ECG signal, Hz noise of the interference level typical from data acquisition equipment, human body own activity or flesh Baseline drift caused by the myoelectricity noise jamming that meat is shunk, and breathing or body shake etc. etc..These interference noises are usually It is known, and will be handled with cell-average in smooth-out after pretreatment, of the invention adaptive CA-CFAR detection Signal needs to be arranged constant false alarm rate P to improve the detection performance to Signal in NoisefaWith Product-factor T.

Due to average false-alarm probability PfaCan also be independent of interference noise, so false-alarm probability can precisely be set, Pfa For adjustable parameter, threshold value is suitably reduced in ECG signal detection, so that suspect signal is detected as far as possible, so PfaSetting It obtains larger.Specific PfaIt is set as:

Pfa=10-2 (4)

According to PfaProduct-factor T is set:

Wherein, RrIt is number of reference.

3.2) initial reference unit number RrSetting

When CA-CFAR is detected, choose suitable number of reference and need to consider two factors: one is desirable to reference unit It is larger, constant false alarm processing can in this way lost under steady state smaller;Another, to make constant false alarm handle unstable condition Transient process is short, it is necessary to which reference unit is small.Since human heartbeat's frequency is generally between 0.6-1.2s, initial reference unit number Coefficient is set as α, relationship between palmic rate are as follows: initial reference unit and data sampling frequency establish functional relation:

Rr=α × fs (6)

Wherein, fsFor data sampling frequency, factor alpha=[0.6,1.2].The MIT- provided according to Massachusetts Institute Technology The sample frequency of BIH database ECG signal is 360, by (6) formula, chooses α here and is satisfactory for 0.85s, so at the beginning of It is reasonable that beginning number of reference, which is set as 300,.

3.3) number of reference R is establishedrWith palmic rate xrRelational expression

To make reference unit adapt to the detection of ECG signal R wave, RrIt needs to update.

Specifically, emulating by 48 cases to MIT-BIH database, the best inspection of each case is respectively obtained Number of reference is surveyed, the relationship such as Fig. 4 is then fitted according to the corresponding optimal reference unit number of the heart rate of each case, Wherein abscissa is palmic rate, and ordinate is number of reference, and acquires Fitted reference unit RrWith the relationship of palmic rate Fitting function as shown in (7) formula.

Rr=-2.376xr+499.911 (7)

Wherein, xrIt is palmic rate, RrFor number of reference.

In fact, other waveforms amplitudes are relatively small, using pretreatment because R-wave amplitude is relatively large in ECG signal Afterwards, ideally, only a R wave for a surplus approximate pulse exists, and the signal between two R wave interphases levels off to 0;So in the heart In the faster situation of rate, RR interphase is shorter, and if reference unit is doing mean time number of reference greater than RR interphase, list can be made First average value increases, then dynamic threshold will will increase, may can't detect interested signal, so should be according to heart rate Speed appropriate adjustment reference unit size.

3.4) reference unit mean power Z is sought, the to-be-measured cell D and thresholding S of signal are handled.

To-be-measured cell D is the signal of centre one for sliding reference window each time, ynFor whole input signal, that is, pass through flat The input signal of CFAR detector after side's rule detection;Electrocardiosignal passes through Rr+ 1 sliding reference window processing, reference unit are put down Equal power Z, which is thresholding S, to be obtained by Product-factor T and the product of mean power Z, it is therefore desirable to calculate the average function in reference unit Rate;The foundation of reference unit: initial reference unit is available by (6) formula, the reference unit updated further according to (7) formula;

Mean power Z is obtained by following formula:

Wherein, xiAnd yiIt is the N number of reference unit in measured signal front and back respectively (since sliding window length is Rr+ 1, intermediate one is Measured signal, so reference unit is still Rr) interior signal, n is signal length, and Z is mean power.

It is multiplied to obtain CA-CFAR thresholding S with mean power Z by the Product-factor T set, i.e.,

S=T × Z (9)

4) thresholding is reduced to be corresponding, cells D to be measured and thresholding S is normalized and take its logarithm:

Wherein, yDFor the measured signal after quadratic detection, max (yD) it is yDMaximum value, S is dynamic threshold, max (S) For the maximum value of S.

5) to Dtest、StestCarry out following judgement:

It takes logarithm process that can improve estimated accuracy, the accuracy of detection can be promoted, adjudicate that measured signal to greatest extent Assuming that H1Under, i.e., target exists.Adjudicate formula are as follows:

Wherein, DtestTo take the measured signal after logarithm, StestTo take the dynamic threshold after logarithm;H1Indicate that target exists, H0Indicate that target is not present.

6) refractory period is rejected, and updates number of reference Rr

To H1Lower signal carries out refractory period rejecting, by the characteristic of ECG signal R wave spacing, i.e. this heartbeat and the heart next time Interval between jump should at least be greater than 0.2s, due to reducing thresholding, therefore interval is expanded to 0.225s, i.e., between each heartbeat Every should meet:

Wherein,For the R wave position that previous ought be detected,For the R wave position detected, f next timesIt is adopted for data Sample frequency.Meet (13) formula in this way to guarantee to reject unwanted positioning, the sample frequency of MIT-BIH database ECG signal is 360, therefore the distance of detection positioning is greater than 81 known to (13) formula every time, if this R wave and a upper R that detection navigates to The distance of wave is small to be equal to 81, then deletes this R wave navigated to.

7) to the R wave detected, according to RR interphase (when i.e. the R wave crest of this heartbeat is with the interval of heartbeat R wave crest next time Between) calculate average heart rate, update number of reference further according to average heart rate and do step 3)~6) detection, finally obtain best The detection of R wave.

Specifically, suspect signal and threshold value by electrocardiosignal after CA-CFAR detects to obtain logarithm process, detection positioning To the signal as shown in the first row in Fig. 5, the positioning of the second behavior R wave in original signal, which does not carry out signal Processing, there is apparent baseline drift, and third behavior removes the signal of positioning R wave after baseline drift, hence it is evident that subject to the positioning more of R wave Really.

Testing result show the present invention and classics filtering after use dynamic threshold and difference method detection algorithm phase Than enhancing R wave component, improving the detection accuracy to smaller R wave since pretreatment uses sliding-window filtering;With it is small The R wave of wave conversion algorithm is detected and is compared using double gradient methods detections, due to using unit average constant false alarm method, to making an uproar The detection performance of signal improves in sound.

Example given above is to realize the present invention preferably example, and the present invention is not limited to the above embodiments.This field Technical staff's technical solution according to the present invention technical characteristic any nonessential addition, the replacement made, belong to this The protection scope of invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种心电信号QRS波群定位方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!