Movatterモバイル変換


[0]ホーム

URL:


CN108937919A - A method of eliminating ECG baseline drift - Google Patents

A method of eliminating ECG baseline drift
Download PDF

Info

Publication number
CN108937919A
CN108937919ACN201810562846.2ACN201810562846ACN108937919ACN 108937919 ACN108937919 ACN 108937919ACN 201810562846 ACN201810562846 ACN 201810562846ACN 108937919 ACN108937919 ACN 108937919A
Authority
CN
China
Prior art keywords
baseline drift
electrocardiosignal
wavelet
ave
drift noise
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810562846.2A
Other languages
Chinese (zh)
Inventor
万相奎
吴海波
危竞
王仲昊
刘翔宇
陈瑞
帅亮
杨辉
李风从
丰励
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hubei University of Technology
Original Assignee
Hubei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hubei University of TechnologyfiledCriticalHubei University of Technology
Priority to CN201810562846.2ApriorityCriticalpatent/CN108937919A/en
Publication of CN108937919ApublicationCriticalpatent/CN108937919A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提出了一种消除心电信号基线漂移的方法。本发明将含有基线漂移噪声的原始心电信号与去QRS波心电信号的结构元素进行级联运算,得到第一次形态学滤波后心电信号;将第一次形态学滤波后心电信号与去T波心电信号的结构元素进行级联运算,得到第二次形态学滤波后心电信号;将第二次形态学滤波后心电信号B(t)即基线漂移噪声进行小波分解重构,以获得光滑的基线漂移噪声;通过含有基线漂移噪声的原始心电信号与光滑的基线漂移噪声计算得到消除基线漂移噪声的心电信号。本发明优点在于解决了心电信号失真的问题,提高了信号质量。

The invention proposes a method for eliminating baseline drift of electrocardiographic signals. In the present invention, the original ECG signal containing baseline drift noise and the structural elements of the QRS wave ECG signal are cascaded to obtain the ECG signal after the first morphological filtering; the ECG signal after the first morphological filtering Carry out cascading operation with the structural elements of the T-wave ECG signal to obtain the ECG signal after the second morphological filtering; the second morphological filtering ECG signal B(t), which is the baseline drift noise, is subjected to wavelet decomposition and reconstruction The structure is used to obtain smooth baseline drift noise; the ECG signal with baseline drift noise eliminated is obtained by calculating the original ECG signal containing baseline drift noise and smooth baseline drift noise. The invention has the advantages of solving the problem of distortion of the electrocardiographic signal and improving the signal quality.

Description

Translated fromChinese
一种消除心电信号基线漂移的方法A Method to Eliminate Baseline Drift of ECG Signal

技术领域technical field

本发明涉及心电信号处理领域,具体地涉及一种消除心电信号基线漂移的方法。The invention relates to the field of electrocardiographic signal processing, in particular to a method for eliminating baseline drift of electrocardiographic signals.

背景技术Background technique

心电图(Electrocardiogram,ECG)是一种以时间为单位记录心脏的电生理活动的诊疗技术。心脏跳动会引起心肌细胞做去极化变化,从而引起皮肤表面电学改变。所以心电图是一种典型的生物电信号。医疗器械在采集心电信号的同时也存在着许多的干扰,最主要有三类噪声干扰:工频噪声、肌电噪声和基线漂移噪声。其中,基线漂移往往是由电极和皮肤间的接触电阻变化、患者肢体的运动和呼吸造成,基线漂移的频率很低,其范围为0.05Hz至几Hz,在心电图上主要表现为是心电信号偏离正常的基线位置。因此,ECG信号去噪声效果较好时,才能终绘制出准确的心电波形图,这对医生做出正确的诊断尤为重要。Electrocardiogram (ECG) is a diagnosis and treatment technique that records the electrophysiological activity of the heart in units of time. The beating of the heart will cause the cardiomyocytes to make depolarization changes, which will cause electrical changes on the skin surface. So the electrocardiogram is a typical bioelectrical signal. There are also many interferences in the collection of ECG signals by medical devices. There are three main types of noise interference: power frequency noise, myoelectric noise and baseline drift noise. Among them, the baseline drift is often caused by the change of the contact resistance between the electrode and the skin, the movement and respiration of the patient's limbs, the frequency of the baseline drift is very low, and its range is 0.05Hz to several Hz, and it is mainly manifested as the ECG signal on the ECG Deviation from normal baseline position. Therefore, when the denoising effect of the ECG signal is good, an accurate ECG waveform can be finally drawn, which is particularly important for doctors to make a correct diagnosis.

目前,国内外对ECG信号消除基线漂移的方法很多,主要有中值滤波法、高通滤波法、自适应滤波法、拟合基线法、数学形态学滤波法和小波变换法等,但是这些方法还存在着一些缺陷。比如:At present, there are many methods for eliminating baseline drift of ECG signals at home and abroad, mainly including median filtering method, high-pass filtering method, adaptive filtering method, fitting baseline method, mathematical morphology filtering method and wavelet transform method, etc. There are some drawbacks. for example:

数学形态学滤波法主要是通过腐蚀、膨胀、开运算和闭运算四种形态学基本运算对含噪ECG信号进行处理,利用结构元素来提取ECG信号中的基线漂移分量,再用含噪ECG信号减去提取的基漂信号得到去除基漂的ECG信号,其滤波的效果也比较理想,在基线漂移较为严重时,其滤波效果仍然可以保持得不错,数学形态学运算简单,但是其提取的基线漂移信号存在一种矩形形式的失真。The mathematical morphological filtering method mainly processes the noisy ECG signal through four basic morphological operations of erosion, dilation, opening operation and closing operation, uses structural elements to extract the baseline drift component in the ECG signal, and then uses the noisy ECG signal to Subtract the extracted base drift signal to get the ECG signal without base drift, and the filtering effect is ideal. When the baseline drift is serious, the filtering effect can still be maintained well. The mathematical morphology operation is simple, but the extracted baseline A drift signal has a rectangular form of distortion.

小波变换法一般是将含噪的ECG信号进行高尺度的小波分解,再将分解后的高尺度近似分量系数置零,最后小波重构得到去除基线漂移的ECG信号,因为对ECG信号要进行小波高尺度分解,虽然也能达到较好的去除基漂的效果,但其运算量较大造成实时性较差,另外将分解后的高尺度近似分量系数置零的步骤也会引起滤波后ECG信号ST段较大的失真。The wavelet transform method generally decomposes the noisy ECG signal with high-scale wavelet, and then sets the decomposed high-scale approximate component coefficients to zero. Finally, the wavelet reconstruction obtains the ECG signal without baseline drift, because the ECG signal needs to be wavelet Although high-scale decomposition can also achieve a good effect of removing base drift, its large amount of calculation results in poor real-time performance. In addition, the step of setting the decomposed high-scale approximate component coefficients to zero will also cause the filtered ECG signal Larger distortion of the ST segment.

发明内容Contents of the invention

为了解决上述技术问题,本发明提供了一种消除心电信号基线漂移的方法。In order to solve the above technical problems, the present invention provides a method for eliminating baseline drift of ECG signals.

本发明的技术方案为一种消除心电信号基线漂移的方法,其特征在于包括以下步骤:The technical solution of the present invention is a method for eliminating baseline drift of electrocardiographic signals, which is characterized in that it comprises the following steps:

步骤1:将含有基线漂移噪声的原始心电信号与去QRS波心电信号的结构元素进行级联运算,得到第一次形态学滤波后心电信号;Step 1: Carry out cascading operation on the original ECG signal containing baseline drift noise and the structural elements of the QRS wave ECG signal to obtain the ECG signal after the first morphological filtering;

步骤2:将第一次形态学滤波后心电信号与去T波心电信号的结构元素进行级联运算,得到第二次形态学滤波后心电信号;Step 2: Carry out cascade operation on the ECG signal after the first morphological filtering and the structural elements of the T-wave ECG signal to obtain the ECG signal after the second morphological filtering;

步骤3:将第二次形态学滤波后心电信号即基线漂移噪声进行小波分解重构,以获得光滑的基线漂移噪声;Step 3: Perform wavelet decomposition and reconstruction on the ECG signal after the second morphological filtering, that is, baseline drift noise, to obtain smooth baseline drift noise;

步骤4:通过含有基线漂移噪声的原始心电信号与光滑的基线漂移噪声计算得到消除基线漂移噪声的心电信号。Step 4: Calculating the original ECG signal with baseline drift noise and the smooth baseline drift noise to obtain the ECG signal with baseline drift noise eliminated.

作为优选,步骤1中所述含有基线漂移噪声的原始心电信号为数据库中选取的含有基线漂移噪声的原始心电信号;Preferably, the original ECG signal containing baseline drift noise described in step 1 is the original ECG signal containing baseline drift noise selected in the database;

步骤1中所述去QRS波心电信号的结构元素的形状以QRS波形为标准;The shape of the structural elements of removing the QRS wave electrocardiogram described in step 1 takes the QRS waveform as a standard;

步骤1中所述去QRS波心电信号的结构元素的时间宽度应满足条件:The time width of the structural elements of removing the QRS wave ECG signal described in step 1 should meet the conditions:

β<T<δβ<T<δ

其中,QRS波形的时间宽度为β,去QRS波心电信号的结构元素的时间宽度为T,所需保留的信号波形时间宽度为δ;Wherein, the time width of the QRS waveform is β, the time width of removing the structural elements of the QRS wave ECG signal is T, and the required signal waveform time width to be retained is δ;

步骤1中所述含有基线漂移噪声的原始心电信号为:The original ECG signal containing baseline drift noise described in step 1 is:

f(n)(n∈[0,N-1])f(n)(n∈[0,N-1])

步骤1中所述去QRS波心电信号的结构元素为:The structural elements of removing the QRS wave electrocardiogram described in step 1 are:

h(m)(m∈[0,M-1])h(m)(m∈[0,M-1])

其中,N>>M;Among them, N>>M;

步骤1中所述级联运算为:The cascade operation described in step 1 is:

用h(m)对f(n)进行腐蚀运算为:Using h(m) to corrode f(n) is:

(fΘh)(n)=min{f(n+m)-h(m)}n∈[0,N-M]m∈[0,M-1](fΘh)(n)=min{f(n+m)-h(m)}n∈[0,N-M]m∈[0,M-1]

其中,对于在n点处腐蚀运算为先将h平移到n点处,将f与h序列相减,最后取相减的最小值;Among them, for the erosion operation at n points, first translate h to n points, subtract f and h sequences, and finally take the minimum value of the subtraction;

用h(m)对f(n)进行膨胀运算为:Using h(m) to expand f(n) is:

其中,对于在n点处膨胀运算为先将h左右翻转,再将翻转后的h平移到n点处与f相加,最后取相加的最大值;Among them, for the expansion operation at point n, first flip h left and right, then translate the flipped h to point n and add f, and finally take the maximum value of the addition;

步骤1中所述第一次形态学滤波后心电信号为:The ECG signal after the first morphological filtering described in step 1 is:

其中,F1为开运算公式:Among them, F1 is the opening operation formula:

即用h对f先进行腐蚀运算再进行膨胀;That is, use h to corrode f first and then expand it;

F2为闭运算公式:F2 is the closed operation formula:

即用h对f先进行膨胀运算再进行腐蚀;That is, use h to perform expansion operation on f first and then corrode;

作为优选,步骤2中所述第一次形态学滤波后心电信号为步骤1中所述第一次形态学滤波后心电信号;Preferably, the ECG signal after the first morphological filtering described in step 2 is the ECG signal after the first morphological filtering described in step 1;

步骤2中所述去T波心电信号的结构元素的形状以T波形为标准;The shape of the structural elements of the T wave ECG signal described in step 2 is based on the T waveform;

步骤2中所述第一次形态学滤波后心电信号为:The ECG signal after the first morphological filtering described in step 2 is:

Ave(n)(n∈[0,N-1])Ave(n)(n∈[0,N-1])

步骤2中所述去QRS波心电信号的结构元素为:Described in the step 2, the structural elements of removing the QRS wave electrocardiogram are:

k(m)(m∈[0,M-1])k(m)(m∈[0,M-1])

其中,N>>M;Among them, N>>M;

步骤2中所述级联运算为:The cascade operation described in step 2 is:

用k(m)对Ave(n)进行腐蚀运算为:Using k(m) to corrode Ave(n) is:

(AveΘk)(n)=min{Ave(n+m)-k(m)}n∈[0,N-M]m∈[0,M-1](AveΘk)(n)=min{Ave(n+m)-k(m)}n∈[0,N-M]m∈[0,M-1]

其中,对于在n点处腐蚀运算为先将Ave平移到n点处,将Ave与k序列相减,最后取相减的最小值;Among them, for the erosion operation at n points, Ave is first translated to n points, Ave is subtracted from the k sequence, and finally the minimum value of the subtraction is taken;

用k(m)对Ave(n)进行膨胀运算为:The expansion operation of Ave(n) with k(m) is:

其中,对于在n点处膨胀运算为先将k左右翻转,再将翻转后的k平移到n点处与Ave相加,最后取相加的最大值;Among them, for the expansion operation at n points, k is first flipped left and right, then the flipped k is translated to n points and added to Ave, and finally the maximum value of the addition is taken;

步骤2中所述第二次形态学滤波后心电信号为:The ECG signal after the second morphological filtering described in step 2 is:

其中,F3为开运算公式:Among them, F3 is the opening operation formula:

即用k对Ave先进行腐蚀运算再进行膨胀;That is, use k to corrode Ave first and then expand it;

F4为闭运算公式:F4 is the closed operation formula:

即用k对Ave先进行膨胀运算再进行腐蚀;That is, use k to perform expansion operation on Ave first and then corrode;

作为优选,步骤3中的小波分解重构采用Mallat算法进行分解重构,具体步骤;As preferably, the wavelet decomposition and reconstruction in step 3 adopts Mallat algorithm to decompose and reconstruct, specific steps;

选取波基函数选coif函数,小波分解重构的分解层数为J=8;Select the wave base function and select the coif function, and the number of decomposition layers of wavelet decomposition and reconstruction is J=8;

对基线漂移噪声进行Mallat算法分解,得到各层次的近似分量系数Aj和细节分量系数DjThe Mallat algorithm is used to decompose the baseline drift noise, and the approximate component coefficient Aj and the detail component coefficient Dj of each level are obtained;

中Mallat算法分解:Mallat algorithm decomposition in China:

其中,t为离散时间序列号,t=0,1…,N-1;A0B(t)为采样后的原始信号;j=1,2…,J为层数,J=log2N;h,g为时域中的尺度函数和小波函数分解滤波器,实际上是滤波器系数;Aj为信号A0B(t)在第j层的近似部分即低频部分的小波系数;Dj为信号A0B(t)在第j层的细节部分即高频部分的小波系数;Among them, t is the serial number of discrete time, t=0,1...,N-1; A0 B(t) is the original signal after sampling; j=1,2..., J is the number of layers, J=log2 N ; h, g are the scaling function and wavelet function decomposition filter in the time domain, which are actually filter coefficients; Aj is the wavelet coefficient of the approximate part of the signal A0 B(t) in the jth layer, that is, the low frequency part; Dj is the wavelet coefficient of the detail part of the signal A0 B(t) in the jth layer, that is, the high frequency part;

其中,h,g分别为尺度函数(其中,j,w∈Z,为常用函数),小波基coif函数在子空间正交基展开得到,即Among them, h, g are scaling functions (in, j,w∈Z, is a commonly used function), and the coif function of the wavelet basis is expanded on the subspace orthogonal basis, that is,

h(2t-w)可通过对尺度函数的傅里叶变换得到,具有低通滤波特性,同理,g(2t-w)可通过对小波函数C(t)的傅里叶变换得到,具有高通滤波特性,这样构成了频率各异的带通滤波器;h(2t-w) can be passed to the scaling function It can be obtained by Fourier transform of wavelet function C(t), which has low-pass filter characteristics. Similarly, g(2t-w) can be obtained by Fourier transform of wavelet function C(t), and has high-pass filter characteristics. bandpass filter;

先对基线漂移噪声信号B(t)进行采样,即离散化得到A0B(n);First sample the baseline drift noise signal B(t), that is, discretize to obtain A0 B(n);

接着,低频部分的小波系数Aj是通过第2j-1尺度(第j-1层)的近似部分的小波系数Aj-1与分解滤波器h卷积,然后将卷积的结果隔点采样得到的;Next, the wavelet coefficient Aj of the low-frequency part is convolved with the decomposition filter h by the wavelet coefficient Aj-1 of the approximate part of the 2ndj-1 scale (j-1 layer), and then the result of the convolution is separated by points sampled;

高频部分的小波系数Dj是通过第2j-1尺度(第j-1层)的近似部分的小波系数Aj-1与分解滤波器g卷积,然后将卷积的结果隔点采样得到的;The wavelet coefficient Dj of the high-frequency part is convolved with the decomposition filter g by the wavelet coefficient Aj-1 of the approximate part of the 2ndj-1 scale (j-1 layer), and then the result of the convolution is sampled at intervals owned;

通过分解,在每一尺度2j上(或第j层上),信号Aj-1被分解为近似部分的小波系数Aj(在低频子带上)和细节部分的小波系数Dj(在高频子带上);Through decomposition, at each scale 2j (or on the j-th layer), the signal Aj-1 is decomposed into wavelet coefficients Aj of the approximate part (on the low-frequency sub-band) and wavelet coefficients Dj of the detail part (on the on the high frequency sub-band);

对系数进行量化处理,将以下的近似分量和细节分量保留,以上的分解分量置零;To quantize the coefficients, the The following approximation and detail components are preserved, The above decomposition components are set to zero;

同样采用Mallat算法进行小波重构,得到光滑的基线漂移噪声;The Mallat algorithm is also used for wavelet reconstruction to obtain smooth baseline drift noise;

Mallat算法进行小波重构,其重构算法为:Mallat algorithm performs wavelet reconstruction, and its reconstruction algorithm is:

式中,j为分解的层数,若分解的最高层即分解的深度为J,则j∈[0,J-1];g,h为时域中的小波重构滤波器,实际上也是滤波器系;In the formula, j is the number of layers of decomposition, if the highest level of decomposition is J, then j∈[0, J-1]; g, h are wavelet reconstruction filters in the time domain, in fact filter system;

其中,信号A0在第2j尺度(第j层)的近似部分的小波系数,即低频部分的小波系数Aj是通过第2j+1尺度(第j+1层)的近似部分的小波系数Aj+1隔点插零后与重构滤波器h卷积以及第2j+1尺度(第j+1层)的细节部分的小波系数Dj+1隔点插零后与重构滤波器g卷积,然后求和得到的,不断重复这一过程,直至第2°尺度,得到重构信号;Among them, the wavelet coefficients of the approximate part of the signal A0 at the 2ndj scale (the jth layer), that is, the wavelet coefficients Aj of the low frequency part are the wavelets passing through the approximate part of the 2ndj+1 scale (j+1th layer) The coefficient Aj+1 is convolved with the reconstruction filter h after zero interpolation and the wavelet coefficient Dj+1 of the detail part of the 2ndj+1 scale (j+1 layer) is reconstructed after zero interpolation The filter g is convolved, and then summed to obtain, and this process is repeated until the 2° scale, and the reconstructed signal is obtained;

作为优选,步骤4中所述计算为将步骤1中所述含有基线漂移噪声的原始心电信号f减去步骤3中所述光滑的基线漂移噪声B′,最终获得消除基线漂移噪声的心电信号E:Preferably, the calculation in step 4 is to subtract the smooth baseline drift noise B' in step 3 from the original ECG signal f containing baseline drift noise in step 1, and finally obtain the ECG with baseline drift noise eliminated Signal E:

E=f-B′。E=f-B'.

与现有技术相比,本发明的优点为将数学形态学和小波变换巧妙的相结合,成功克服了形态学滤除基线漂移时,ECG信号不光滑,在QRS波群处产生一种矩形式失真。从而避免了含有基线漂移噪声的心电信号在P-R段和Q-T段失真较大,极大地提高了信号质量。Compared with the prior art, the present invention has the advantage of cleverly combining mathematical morphology and wavelet transform, and successfully overcomes that when the morphology filters out baseline drift, the ECG signal is not smooth, and a rectangular shape is generated at the QRS complex. distortion. Therefore, the electrocardiographic signal containing baseline drift noise is prevented from being greatly distorted in the P-R segment and the Q-T segment, and the signal quality is greatly improved.

附图说明Description of drawings

图1:本发明方法流程图;Fig. 1: the flow chart of the method of the present invention;

图2:第一次形态学消除QRS波群;Figure 2: The first morphological elimination of the QRS complex;

图3:第二次形态学提取基线漂移噪声;Figure 3: The second morphological extraction baseline drift noise;

图4:小波变换滤波流程图;Figure 4: Flow chart of wavelet transform filtering;

图5:小波分解图;Figure 5: Wavelet decomposition diagram;

图6:小波重构图;Figure 6: Wavelet reconstruction diagram;

图7:形态学与小波变换相结合的滤波流程图。Figure 7: Flowchart of filtering combining morphology with wavelet transform.

具体实施方式Detailed ways

为了便于本领域普通技术人员理解和实施本发明,下面结合附图及实施例对本发明作进一步的详细描述,应当理解,此处所描述的实施示例仅用于说明和解释本发明,并不用于限定本发明。In order to facilitate those of ordinary skill in the art to understand and implement the present invention, the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described here are only used to illustrate and explain the present invention, and are not intended to limit this invention.

下面结合图1至图7论述本发明实施例。参照图1,本发明实施例的具体步骤包括以下步骤:Embodiments of the present invention are discussed below with reference to FIGS. 1 to 7 . Referring to Fig. 1, the specific steps of the embodiment of the present invention include the following steps:

步骤1:将含有基线漂移噪声的原始心电信号与去QRS波心电信号的结构元素进行级联运算,得到第一次形态学滤波后心电信号;Step 1: Carry out cascading operation on the original ECG signal containing baseline drift noise and the structural elements of the QRS wave ECG signal to obtain the ECG signal after the first morphological filtering;

作为优选,步骤1中所述含有基线漂移噪声的原始心电信号为数据库中选取的含有基线漂移噪声的原始心电信号;Preferably, the original ECG signal containing baseline drift noise described in step 1 is the original ECG signal containing baseline drift noise selected in the database;

步骤1中所述去QRS波心电信号的结构元素的形状以QRS波形为标准;The shape of the structural elements of removing the QRS wave electrocardiogram described in step 1 takes the QRS waveform as a standard;

步骤1中所述去QRS波心电信号的结构元素的时间宽度应满足条件:The time width of the structural elements of removing the QRS wave ECG signal described in step 1 should meet the conditions:

β<T<δβ<T<δ

其中,QRS波形的时间宽度为β,去QRS波心电信号的结构元素的时间宽度为T,所需保留的信号波形时间宽度为δ;Wherein, the time width of the QRS waveform is β, the time width of removing the structural elements of the QRS wave ECG signal is T, and the required signal waveform time width to be retained is δ;

步骤1中所述含有基线漂移噪声的原始心电信号为:The original ECG signal containing baseline drift noise described in step 1 is:

f(n)(n∈[0,N-1])f(n)(n∈[0,N-1])

步骤1中所述去QRS波心电信号的结构元素为:The structural elements of removing the QRS wave electrocardiogram described in step 1 are:

h(m)(m∈[0,M-1])h(m)(m∈[0,M-1])

其中,N>>M;Among them, N>>M;

步骤1中所述级联运算为:The cascade operation described in step 1 is:

用h(m)对f(n)进行腐蚀运算为:Using h(m) to corrode f(n) is:

(fΘh)(n)=min{f(n+m)-h(m)}n∈[0,N-M]m∈[0,M-1](fΘh)(n)=min{f(n+m)-h(m)}n∈[0,N-M]m∈[0,M-1]

其中,对于在n点处腐蚀运算为先将h平移到n点处,将f与h序列相减,最后取相减的最小值;Among them, for the erosion operation at n points, first translate h to n points, subtract f and h sequences, and finally take the minimum value of the subtraction;

用h(m)对f(n)进行膨胀运算为:Using h(m) to expand f(n) is:

其中,对于在n点处膨胀运算为先将h左右翻转,再将翻转后的h平移到n点处与f相加,最后取相加的最大值;Among them, for the expansion operation at point n, first flip h left and right, then translate the flipped h to point n and add f, and finally take the maximum value of the addition;

步骤1中所述第一次形态学滤波后心电信号为:The ECG signal after the first morphological filtering described in step 1 is:

其中,F1为开运算公式:Among them, F1 is the opening operation formula:

即用h对f先进行腐蚀运算再进行膨胀;That is, use h to corrode f first and then expand it;

F2为闭运算公式:F2 is the closed operation formula:

即用h对f先进行膨胀运算再进行腐蚀;That is, use h to perform expansion operation on f first and then corrode;

步骤2:将第一次形态学滤波后心电信号与去T波心电信号的结构元素进行级联运算,得到第二次形态学滤波后心电信号;Step 2: Carry out cascade operation on the ECG signal after the first morphological filtering and the structural elements of the T-wave ECG signal to obtain the ECG signal after the second morphological filtering;

作为优选,步骤2中所述第一次形态学滤波后心电信号为步骤1中所述第一次形态学滤波后心电信号;Preferably, the ECG signal after the first morphological filtering described in step 2 is the ECG signal after the first morphological filtering described in step 1;

步骤2中所述去T波心电信号的结构元素的形状以T波形为标准;The shape of the structural elements of the T wave ECG signal described in step 2 is based on the T waveform;

步骤2中所述第一次形态学滤波后心电信号为:The ECG signal after the first morphological filtering described in step 2 is:

Ave(n)(n∈[0,N-1])Ave(n)(n∈[0,N-1])

步骤2中所述去QRS波心电信号的结构元素为:Described in the step 2, the structural elements of removing the QRS wave electrocardiogram are:

k(m)(m∈[0,M-1])k(m)(m∈[0,M-1])

其中,N>>M;Among them, N>>M;

步骤2中所述级联运算为:The cascade operation described in step 2 is:

用k(m)对Ave(n)进行腐蚀运算为:Using k(m) to corrode Ave(n) is:

(AveΘk)(n)=min{Ave(n+m)-k(m)}n∈[0,N-M]m∈[0,M-1](AveΘk)(n)=min{Ave(n+m)-k(m)}n∈[0,N-M]m∈[0,M-1]

其中,对于在n点处腐蚀运算为先将Ave平移到n点处,将Ave与k序列相减,最后取相减的最小值;Among them, for the erosion operation at n points, Ave is first translated to n points, Ave is subtracted from the k sequence, and finally the minimum value of the subtraction is taken;

用k(m)对Ave(n)进行膨胀运算为:The expansion operation of Ave(n) with k(m) is:

其中,对于在n点处膨胀运算为先将k左右翻转,再将翻转后的k平移到n点处与Ave相加,最后取相加的最大值;Among them, for the expansion operation at n points, k is first flipped left and right, then the flipped k is translated to n points and added to Ave, and finally the maximum value of the addition is taken;

步骤2中所述第二次形态学滤波后心电信号为:The ECG signal after the second morphological filtering described in step 2 is:

其中,F3为开运算公式:Among them, F3 is the opening operation formula:

即用k对Ave先进行腐蚀运算再进行膨胀;That is, use k to corrode Ave first and then expand it;

F4为闭运算公式:F4 is the closed operation formula:

即用k对Ave先进行膨胀运算再进行腐蚀;That is, use k to perform expansion operation on Ave first and then corrode;

步骤3:将第二次形态学滤波后心电信号B(t)即基线漂移噪声进行小波分解重构,以获得光滑的基线漂移噪声;Step 3: Perform wavelet decomposition and reconstruction on the ECG signal B(t) after the second morphological filtering, that is, baseline drift noise, to obtain smooth baseline drift noise;

步骤3中的小波分解重构采用Mallat算法进行分解重构,具体步骤;The wavelet decomposition and reconstruction in step 3 adopts the Mallat algorithm for decomposition and reconstruction, and the specific steps are;

选取波基函数选coif函数,小波分解重构的分解层数为J=8;Select the wave base function and select the coif function, and the number of decomposition layers of wavelet decomposition and reconstruction is J=8;

对基线漂移噪声进行Mallat算法分解,得到各层次的近似分量系数Aj和细节分量系数DjThe Mallat algorithm is used to decompose the baseline drift noise, and the approximate component coefficient Aj and the detail component coefficient Dj of each level are obtained;

中Mallat算法分解:Mallat algorithm decomposition in China:

其中,t为离散时间序列号,t=0,1…,N-1;A0B(t)为采样后的原始信号;j=1,2…,J为层数,J=log2N;h,g为时域中的尺度函数和小波函数分解滤波器,实际上是滤波器系数;Aj为信号A0B(t)在第j层的近似部分即低频部分的小波系数;Dj为信号A0B(t)在第j层的细节部分即高频部分的小波系数;Among them, t is the serial number of discrete time, t=0,1...,N-1; A0 B(t) is the original signal after sampling; j=1,2..., J is the number of layers, J=log2 N ; h, g are the scaling function and wavelet function decomposition filter in the time domain, which are actually filter coefficients; Aj is the wavelet coefficient of the approximate part of the signal A0 B(t) in the jth layer, that is, the low frequency part; Dj is the wavelet coefficient of the detail part of the signal A0 B(t) in the jth layer, that is, the high frequency part;

其中,h,g分别为尺度函数(其中,j,w∈Z,为常用函数),小波基coif函数在子空间正交基展开得到,即Among them, h, g are scaling functions (in, j,w∈Z, is a commonly used function), and the coif function of the wavelet basis is expanded on the subspace orthogonal basis, that is,

h(2t-w)可通过对尺度函数的傅里叶变换得到,具有低通滤波特性,同理,g(2t-w)可通过对小波函数C(t)的傅里叶变换得到,具有高通滤波特性,这样构成了频率各异的带通滤波器;h(2t-w) can be passed to the scaling function It can be obtained by Fourier transform of wavelet function C(t), which has low-pass filter characteristics. Similarly, g(2t-w) can be obtained by Fourier transform of wavelet function C(t), and has high-pass filter characteristics. bandpass filter;

先对基线漂移噪声信号B(t)进行采样,即离散化得到A0B(n);First sample the baseline drift noise signal B(t), that is, discretize to obtain A0 B(n);

接着,低频部分的小波系数Aj是通过第2j-1尺度(第j-1层)的近似部分的小波系数Aj-1与分解滤波器h卷积,然后将卷积的结果隔点采样得到的;Next, the wavelet coefficient Aj of the low-frequency part is convolved with the decomposition filter h by the wavelet coefficient Aj-1 of the approximate part of the 2ndj-1 scale (j-1 layer), and then the result of the convolution is separated by points sampled;

高频部分的小波系数Dj是通过第2j-1尺度(第j-1层)的近似部分的小波系数Aj-1与分解滤波器g卷积,然后将卷积的结果隔点采样得到;The wavelet coefficient Dj of the high-frequency part is convolved with the decomposition filter g by the wavelet coefficient Aj-1 of the approximate part of the 2ndj-1 scale (j-1 layer), and then the result of the convolution is sampled at intervals get;

通过分解,在每一尺度2j上(或第j层上),信号Aj-1被分解为近似部分的小波系数Aj(在低频子带上)和细节部分的小波系数Dj(在高频子带上);Through decomposition, at each scale 2j (or on the j-th layer), the signal Aj-1 is decomposed into wavelet coefficients Aj of the approximate part (on the low-frequency sub-band) and wavelet coefficients Dj of the detail part (on the on the high frequency sub-band);

对系数进行量化处理,将以下的近似分量和细节分量保留,以上的分解分量置零;To quantize the coefficients, the The following approximation and detail components are preserved, The above decomposition components are set to zero;

同样采用Mallat算法进行小波重构,得到光滑的基线漂移噪声;The Mallat algorithm is also used for wavelet reconstruction to obtain smooth baseline drift noise;

Mallat算法进行小波重构,其重构算法为:Mallat algorithm performs wavelet reconstruction, and its reconstruction algorithm is:

式中,j为分解的层数,若分解的最高层即分解的深度为J,则j∈[0,J-1];g,h为时域中的小波重构滤波器,实际上也是滤波器系;In the formula, j is the number of layers of decomposition, if the highest level of decomposition is J, then j∈[0, J-1]; g, h are wavelet reconstruction filters in the time domain, in fact filter system;

其中,信号A0在第2j尺度(第j层)的近似部分的小波系数,即低频部分的小波系数Aj是通过第2j+1尺度(第j+1层)的近似部分的小波系数Aj+1隔点插零后与重构滤波器h卷积以及第2j+1尺度(第j+1层)的细节部分的小波系数Dj+1隔点插零后与重构滤波器g卷积,然后求和得到的,不断重复这一过程,直至第2°尺度,得到重构信号;Among them, the wavelet coefficients of the approximate part of the signal A0 at the 2ndj scale (the jth layer), that is, the wavelet coefficients Aj of the low frequency part are the wavelets passing through the approximate part of the 2ndj+1 scale (j+1th layer) The coefficient Aj+1 is convolved with the reconstruction filter h after zero interpolation and the wavelet coefficient Dj+1 of the detail part of the 2ndj+1 scale (j+1 layer) is reconstructed after zero interpolation The filter g is convolved, and then summed to obtain, and this process is repeated until the 2° scale, and the reconstructed signal is obtained;

步骤4:通过含有基线漂移噪声的原始心电信号与光滑的基线漂移噪声计算得到消除基线漂移噪声的心电信号。Step 4: Calculating the original ECG signal with baseline drift noise and the smooth baseline drift noise to obtain the ECG signal with baseline drift noise eliminated.

作为优选,将步骤4中所述含有基线漂移噪声的原始心电信号f减去步骤3中所述光滑的基线漂移噪声B′,最终获得消除基线漂移噪声的心电信号E:As a preference, subtract the smooth baseline drift noise B' described in step 3 from the original ECG signal f containing baseline drift noise in step 4, and finally obtain the ECG signal E with baseline drift noise eliminated:

E=f-B′。E=f-B'.

应当理解的是,本说明书未详细阐述的部分均属于现有技术。It should be understood that the parts not described in detail in this specification belong to the prior art.

应当理解的是,上述针对较佳实施例的描述较为详细,并不能因此而认为是对本发明专利保护范围的限制,本领域的普通技术人员在本发明的启示下,在不脱离本发明权利要求所保护的范围情况下,还可以做出替换或变形,均落入本发明的保护范围之内,本发明的请求保护范围应以所附权利要求为准。It should be understood that the above-mentioned descriptions for the preferred embodiments are relatively detailed, and should not therefore be considered as limiting the scope of the patent protection of the present invention. Within the scope of protection, replacements or modifications can also be made, all of which fall within the protection scope of the present invention, and the scope of protection of the present invention should be based on the appended claims.

Claims (5)

CN201810562846.2A2018-06-042018-06-04A method of eliminating ECG baseline driftPendingCN108937919A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810562846.2ACN108937919A (en)2018-06-042018-06-04A method of eliminating ECG baseline drift

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810562846.2ACN108937919A (en)2018-06-042018-06-04A method of eliminating ECG baseline drift

Publications (1)

Publication NumberPublication Date
CN108937919Atrue CN108937919A (en)2018-12-07

Family

ID=64492744

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810562846.2APendingCN108937919A (en)2018-06-042018-06-04A method of eliminating ECG baseline drift

Country Status (1)

CountryLink
CN (1)CN108937919A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110623646A (en)*2019-09-092019-12-31山东中医药大学 A method for monitoring pregnancy induced hypertension
CN110638441A (en)*2019-08-292020-01-03上海询康数字科技有限公司Electrocardiogram noise reduction method and device, computer equipment and storage medium
CN110755069A (en)*2019-10-252020-02-07山东省计算中心(国家超级计算济南中心) A method for correcting baseline drift of ambulatory ECG signals with jumping mutation noise
CN110916672A (en)*2019-11-152020-03-27中南民族大学Old people daily activity monitoring method based on one-dimensional convolutional neural network
CN111568410A (en)*2020-05-182020-08-25中国矿业大学 A classification method of ECG data based on 12-lead and convolutional neural network
CN113303809A (en)*2021-05-272021-08-27河北省科学院应用数学研究所Method, device, equipment and storage medium for removing baseline drift and high-frequency noise
CN114010201A (en)*2021-11-252022-02-08湖南万脉医疗科技有限公司Cardiopulmonary coupling relation analysis method based on information gain
CN115034260A (en)*2022-05-262022-09-09浙江工业大学BPF-WT combined filtering method for structure dynamic characteristic identification
CN115034266A (en)*2022-06-132022-09-09四川新源生物电子科技有限公司Collected electroencephalogram signal denoising method, system, device and medium
CN115376067A (en)*2022-08-172022-11-22东南大学Subway public transport congestion monitoring and risk assessment system based on accelerometer

Citations (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090171627A1 (en)*2007-12-302009-07-02Olson Eric SSystem and Method for Surface Reconstruction from an Unstructured Point Set
US7570989B2 (en)*2004-11-222009-08-04Cardiodynamics International CorporationMethod and apparatus for signal assessment including event rejection
CN101658425A (en)*2009-09-112010-03-03西安电子科技大学Device and method for detecting attention focusing degree based on analysis of heart rate variability
CN102579039A (en)*2012-03-132012-07-18广东工业大学Method for detecting TWA (T wave alternans) in electrocardiogram
US20120278001A1 (en)*2008-07-152012-11-01Nellcor Puritan Bennett IrelandSignal Procesing Systems and Methods Using Basis Functions and Wavelet Transforms
CN103083013A (en)*2013-01-182013-05-08哈尔滨工业大学深圳研究生院Electrocardio signal QRS complex wave detection method based on morphology and wavelet transform
CN104318523A (en)*2014-10-152015-01-28北京海思敏医疗技术有限公司Filtering method and device of digital signals
CN105125204A (en)*2015-07-312015-12-09华中科技大学Electrocardiosignal denoising method based on ESMD (extreme-point symmetric mode decomposition) method
CN106529425A (en)*2016-10-202017-03-22包磊R-wave extraction method and system for ECG signals
US20170304630A1 (en)*2014-10-072017-10-26Neuroloop GmbHImplantable assembly
CN107693011A (en)*2017-11-132018-02-16湖北科技学院 A baseline filtering method for electrocardiogram signal
CN107802260A (en)*2017-11-092018-03-16湖北工业大学 A joint analysis method of time and space for ventricular repolarization variability
CN107951482A (en)*2017-11-132018-04-24浙江好络维医疗技术有限公司A kind of electrocardiosignal baseline based on wavelet decomposition and spline interpolation evens up method
CN108108761A (en)*2017-12-212018-06-01西北工业大学A kind of rapid transit signal lamp detection method based on depth characteristic study

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7570989B2 (en)*2004-11-222009-08-04Cardiodynamics International CorporationMethod and apparatus for signal assessment including event rejection
US20090171627A1 (en)*2007-12-302009-07-02Olson Eric SSystem and Method for Surface Reconstruction from an Unstructured Point Set
US20120278001A1 (en)*2008-07-152012-11-01Nellcor Puritan Bennett IrelandSignal Procesing Systems and Methods Using Basis Functions and Wavelet Transforms
CN101658425A (en)*2009-09-112010-03-03西安电子科技大学Device and method for detecting attention focusing degree based on analysis of heart rate variability
CN102579039A (en)*2012-03-132012-07-18广东工业大学Method for detecting TWA (T wave alternans) in electrocardiogram
CN103083013A (en)*2013-01-182013-05-08哈尔滨工业大学深圳研究生院Electrocardio signal QRS complex wave detection method based on morphology and wavelet transform
US20170304630A1 (en)*2014-10-072017-10-26Neuroloop GmbHImplantable assembly
CN104318523A (en)*2014-10-152015-01-28北京海思敏医疗技术有限公司Filtering method and device of digital signals
CN105125204A (en)*2015-07-312015-12-09华中科技大学Electrocardiosignal denoising method based on ESMD (extreme-point symmetric mode decomposition) method
CN106529425A (en)*2016-10-202017-03-22包磊R-wave extraction method and system for ECG signals
CN107802260A (en)*2017-11-092018-03-16湖北工业大学 A joint analysis method of time and space for ventricular repolarization variability
CN107693011A (en)*2017-11-132018-02-16湖北科技学院 A baseline filtering method for electrocardiogram signal
CN107951482A (en)*2017-11-132018-04-24浙江好络维医疗技术有限公司A kind of electrocardiosignal baseline based on wavelet decomposition and spline interpolation evens up method
CN108108761A (en)*2017-12-212018-06-01西北工业大学A kind of rapid transit signal lamp detection method based on depth characteristic study

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
RISHENDRA VERMA等: "A New Morphological Filtering Algorithm for Pre-processing of Electrocardiographic Signals", 《PROCEEDINGS OF THE FOURTH INTERNATIONAL CONFERENCE ON SIGNAL AND IMAGE PROCESSING 2012》*
WEITUO HAO 等: "ECG Baseline Wander Correction by Mean-Median Filter and Discrete Wavelet Transform", 《33RD ANNUAL INTERNATIONAL CONFERENCE OF THE IEEE EMBS》*
万相奎 等: "改进的三次样条插值心电基线漂移滤波法", 《生物医学工程学杂志》*
周承蓉: "《一种利用小波变换处理信号的自适应方法》", 《重庆理工大学学报(自然科学)》*
庞宇 等: "基于形态滤波的心电信号去除基线漂移方法", 《物理学报》*
毛玲 等: "基于形态滤波的心电信号基线矫正算法", 《信号处理》*
王金亮: "《心电信号的预处理及R波检测的研究》", 《万方数据库》*

Cited By (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110638441A (en)*2019-08-292020-01-03上海询康数字科技有限公司Electrocardiogram noise reduction method and device, computer equipment and storage medium
CN110623646A (en)*2019-09-092019-12-31山东中医药大学 A method for monitoring pregnancy induced hypertension
CN110755069A (en)*2019-10-252020-02-07山东省计算中心(国家超级计算济南中心) A method for correcting baseline drift of ambulatory ECG signals with jumping mutation noise
CN110755069B (en)*2019-10-252020-10-16山东省计算中心(国家超级计算济南中心)Dynamic electrocardiosignal baseline drift correction method for jump mutation noise
CN110916672A (en)*2019-11-152020-03-27中南民族大学Old people daily activity monitoring method based on one-dimensional convolutional neural network
CN111568410A (en)*2020-05-182020-08-25中国矿业大学 A classification method of ECG data based on 12-lead and convolutional neural network
CN113303809A (en)*2021-05-272021-08-27河北省科学院应用数学研究所Method, device, equipment and storage medium for removing baseline drift and high-frequency noise
CN114010201A (en)*2021-11-252022-02-08湖南万脉医疗科技有限公司Cardiopulmonary coupling relation analysis method based on information gain
CN115034260A (en)*2022-05-262022-09-09浙江工业大学BPF-WT combined filtering method for structure dynamic characteristic identification
CN115034266A (en)*2022-06-132022-09-09四川新源生物电子科技有限公司Collected electroencephalogram signal denoising method, system, device and medium
CN115376067A (en)*2022-08-172022-11-22东南大学Subway public transport congestion monitoring and risk assessment system based on accelerometer

Similar Documents

PublicationPublication DateTitle
CN108937919A (en)A method of eliminating ECG baseline drift
Kaur et al.Comparison of different approaches for removal of baseline wander from ECG signal
CN111616697B (en) A Denoising Algorithm of ECG Signal Based on New Threshold Function Wavelet Transform
Hu et al.Removal of baseline wander from ECG signal based on a statistical weighted moving average filter
CN107693004A (en)Fetal ECG extraction and fetal heart frequency recognition methods based on hilbert conversion
Pise et al.Comparative analysis of various filtering techniques for denoising EEG signals
Rashmi et al.ECG denoising using wavelet transform and filters
SharmaEEG signal denoising based on wavelet transform
Butt et al.Denoising practices for electrocardiographic (ECG) signals: a survey
Verma et al.An integration of improved median and morphological filtering techniques for electrocardiogram signal processing
Verma et al.An improved algorithm for noise suppression and baseline correction of ECG signals
Rakshit et al.An improved EMD based ECG denoising method using adaptive switching mean filter
Liu et al.ECG signal denoising based on morphological filtering
CN106236075B (en)A kind of noise-reduction method applied to portable electrocardiograph institute thought-read electrograph
Bhogeshwar et al.To verify and compare denoising of ECG signal using various denoising algorithms of IIR and FIR filters
Chieng et al.The study and comparison between various digital filters for ECG de-noising
Jabeur et al.Noise and artifacts elimination in ECG signals using wavelet, variational mode decomposition and nonlocal means algorithm
FehérDenoising ECG signals by applying discrete wavelet transform
Narwaria et al.Removal of baseline wander and power line interference from ECG signal-a survey approach
Roy et al.A new method for denoising ECG signal using sharp cut-off FIR filter
Heydari et al.Adaptive wavelet technique for EEG de-noising
Telezhkin et al.Wavelet-conversion in electrocardio signal processing
Suchetha et al.Empirical mode decomposition-based subtraction techniques for 50 Hz interference reduction from electrocardiogram
Manikandan et al.A novel approach for the reduction of 50Hz noise in electrocardiogram using variational mode decomposition
Gon et al.Removal of noises from an ECG signal using an adaptive S-median thresholding technique

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20181207

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp