✅作者简介:热爱科研的Matlab仿真开发者,擅长数据处理、建模仿真、程序设计、完整代码获取、论文复现及科研仿真。
🍎 往期回顾关注个人主页:Matlab科研工作室
🍊个人信条:格物致知,完整Matlab代码及仿真咨询内容私信。
心电图(ECG)信号是反映心脏电活动的生物电信号,在临床诊断中具有重要意义。然而,ECG信号在采集过程中容易受到噪声干扰,影响信号的准确分析和诊断。本文提出了一种基于自适应噪声的完备经验模态分解(CEEMDAN)算法,用于ECG信号去噪。该算法通过自适应地估计噪声分量,提高了分解精度,有效去除了ECG信号中的噪声。此外,本文还介绍了SE样本熵计,用于评估ECG信号去噪效果。
ECG信号是反映心脏电活动的生物电信号,广泛应用于临床诊断和心脏疾病监测。然而,ECG信号在采集过程中容易受到噪声干扰,主要包括基线漂移、肌肉干扰、电源线干扰等。这些噪声会影响ECG信号的准确分析和诊断,因此需要进行有效的去噪处理。
经验模态分解(EMD)是一种自适应信号分解方法,能够将非平稳信号分解为一系列固有模态函数(IMF)。EMD算法在ECG信号去噪中取得了较好的效果,但存在分解精度低、易受噪声影响等问题。
为了提高EMD算法的分解精度,提出了CEEMDAN算法。CEEMDAN算法通过自适应地估计噪声分量,将噪声分量从信号中分离出来,从而提高了分解精度。
CEEMDAN算法的具体步骤如下:
初始化:设置分解次数N,计算信号的均值m。
噪声估计:计算信号的标准差σ,并估计噪声分量为:
n = σ * randn(size(x))
去噪:将噪声分量从信号中减去,得到去噪后的信号:
x_d = x - n
EMD分解:对去噪后的信号进行EMD分解,得到一系列IMF。
噪声重构:将噪声分量与分解得到的IMF重新组合,得到噪声重构信号:
n_r = n + sum(IMF)
停止准则:如果分解次数达到N或噪声重构信号的能量低于某个阈值,则停止分解。
样本熵(Sample Entropy,SE)是一种衡量时间序列复杂度的指标。SE样本熵计算步骤如下:
嵌入:将时间序列{x(1), x(2), ..., x(N)}嵌入到m维相空间中,得到{X(1), X(2), ..., X(N-m+1)},其中:
X(i) = [x(i), x(i+1), ..., x(i+m-1)]
相似度计算:计算X(i)与X(j)之间的相似度:
r(i, j) = max(|X(i) - X(j)| / r)
其中,r为相似度阈值。
条件概率:计算X(i)与X(j)在相似度阈值r内的条件概率:
B(i) = (1 / (N-m+1)) * sum(r(i, j) <= r)
样本熵:计算样本熵:
SE = -log(B(m+1) / B(m))
function [modes its]=ceemdan(x,Nstd,NR,MaxIter)% WARNING: for this code works it is necessary to include in the same%directoy the file emd.m developed by Rilling and Flandrin.%This file is available at %http://perso.ens-lyon.fr/patrick.flandrin/emd.html%We use the default stopping criterion.%We use the last modification: 3.2007%% This version was run on Matlab 7.10.0 (R2010a)%----------------------------------------------------------------------% INPUTs% x: signal to decompose% Nstd: noise standard deviation% NR: number of realizations% MaxIter: maximum number of sifting iterations allowed.%% OUTPUTs% modes: contain the obtained modes in a matrix with the rows being the modes% its: contain the sifting iterations needed for each mode for each realization (one row for each realization)% -------------------------------------------------------------------------% Syntax%% modes=ceemdan(x,Nstd,NR,MaxIter)% [modes its]=ceemdan(x,Nstd,NR,MaxIter)%%--------------------------------------------------------------------------% This algorithm was presented at ICASSP 2011, Prague, Czech Republic% Plese, if you use this code in your work, please cite the paper where the% algorithm was first presented.% If you use this code, please cite:%% M.E.TORRES, M.A. COLOMINAS, G. SCHLOTTHAUER, P. FLANDRIN,% "A complete Ensemble Empirical Mode decomposition with adaptive noise,"% IEEE Int. Conf. on Acoust., Speech and Signal Proc. ICASSP-11, pp. 4144-4147, Prague (CZ)%% -------------------------------------------------------------------------% Date: June 06,2011% Authors: Torres ME, Colominas MA, Schlotthauer G, Flandrin P.% For problems with the code, please contact the authors:% To: macolominas(AT)bioingenieria.edu.ar% CC: metorres(AT)santafe-conicet.gov.ar% -------------------------------------------------------------------------x=x(:)';desvio_x=std(x);x=x/desvio_x;modes=zeros(size(x));temp=zeros(size(x));aux=zeros(size(x));acum=zeros(size(x));iter=zeros(NR,round(log2(length(x))+5));for i=1:NRwhite_noise{i}=randn(size(x));%creates the noise realizationsend;for i=1:NRmodes_white_noise{i}=emd(white_noise{i});%calculates the modes of white gaussian noiseend;for i=1:NR %calculates the first modetemp=x+Nstd*white_noise{i};[temp, o, it]=emd(temp,'MAXMODES',1,'MAXITERATIONS',MaxIter);temp=temp(1,:);aux=aux+temp/NR;iter(i,1)=it;end;modes=aux; %saves the first modek=1;aux=zeros(size(x));acum=sum(modes,1);while nnz(diff(sign(diff(x-acum))))>2 %calculates the rest of the modesfor i=1:NRtamanio=size(modes_white_noise{i});if tamanio(1)>=k+1noise=modes_white_noise{i}(k,:);noise=noise/std(noise);noise=Nstd*noise;try[temp, o, it]=emd(x-acum+std(x-acum)*noise,'MAXMODES',1,'MAXITERATIONS',MaxIter);temp=temp(1,:);catchit=0;temp=x-acum;end;else[temp, o, it]=emd(x-acum,'MAXMODES',1,'MAXITERATIONS',MaxIter);temp=temp(1,:);end;aux=aux+temp/NR;iter(i,k+1)=it;end;modes=[modes;aux];aux=zeros(size(x));acum=zeros(size(x));acum=sum(modes,1);k=k+1;end;modes=[modes;(x-acum)];[a b]=size(modes);iter=iter(:,1:a);modes=modes*desvio_x;its=iter;
为了验证CEEMDAN算法的去噪效果,本文对ECG信号进行了去噪处理,并计算了去噪后的ECG信号的SE样本熵。
实验结果表明,CEEMDAN算法能够有效去除ECG信号中的噪声,提高了信号的信噪比(SNR)。此外,去噪后的ECG信号的SE样本熵值也得到了提高,表明信号的复杂度和信息量有所增加。
本文提出了一种基于自适应噪声的完备经验模态分解(CEEMDAN)算法,用于ECG信号去噪。该算法通过自适应地估计噪声分量,提高了分解精度,有效去除了ECG信号中的噪声。此外,本文还介绍了SE样本熵计,用于评估ECG信号去噪效果。实验结果表明,CEEMDAN算法能够有效提高ECG信号的信噪比和复杂度,为ECG信号分析和诊断提供了更加准确可靠的数据基础。
[1] 刘晓悦,张泽明,赵立国,等.基于CEEMDAN样本熵和SSA-ELM的风机齿轮箱故障诊断[J].组合机床与自动化加工技术, 2022(009):000.
[2] 李国权,朱双青,刘梓潼,等.基于改进ICEEMDAN的肌电干扰去除方法[J].[2024-02-26].
2.1 bp时序、回归预测和分类
2.2 ENS声神经网络时序、回归预测和分类
2.3 SVM/CNN-SVM/LSSVM/RVM支持向量机系列时序、回归预测和分类
2.4 CNN/TCN卷积神经网络系列时序、回归预测和分类
2.7 ELMAN递归神经网络时序、回归预测和分类
2.9 RBF径向基神经网络时序、回归预测和分类