时序分解 | Matlab实现CEEMD互补集合经验模态分解时间序列信号分解
效果一览
基本介绍
Matlab实现CEEMD互补集合经验模态分解时间序列信号分解
1.分解效果图 ,效果如图所示,可完全满足您的需求~
2.直接替换txt数据即可用 适合新手小白 注释清晰~
3.附赠案例数据 直接运行main一键出图~文章来源:https://www.toymoban.com/news/detail-716093.html
程序设计
- 完整源码和数据获取方式:Matlab实现CEEMD互补集合经验模态分解时间序列信号分解。
function allmode=ceemd(Y,Nstd,NE,TNM)
% find data length
xsize=length(Y);
dd=1:1:xsize;
% Nornaliz data
Ystd=std(Y);
Y=Y/Ystd;
% Initialize saved data
TNM2=TNM+2;
for kk=1:1:TNM2,
for ii=1:1:xsize,
allmode(ii,kk)=0.0;
end
end
for iii=1:1:NE
% adding noise
for i=1:xsize,
temp=randn(1,1)*Nstd;
X1(i)=Y(i)+temp;
X2(i)=Y(i)-temp;
end
% sifting X1
end
nmode = 1;
while nmode <= TNM,
xstart = xend;
iter = 1;
while iter<=5,
[spmax, spmin, flag]=extrema(xstart);
upper= spline(spmax(:,1),spmax(:,2),dd);
lower= spline(spmin(:,1),spmin(:,2),dd);
、
% save a mode
for jj=1:1:xsize,
mode(jj,nmode) = xstart(jj);
end
end
% save the trend
for jj=1:1:xsize,
mode(jj,nmode+1)=xend(jj);
end
% add mode to the sum of modes from earlier ensemble members
allmode=allmode+mode;
%%%=============================================================
end
nmode = 1;
while nmode <= TNM,
xstart = xend;
iter = 1;
while iter<=5,
[spmax, spmin, flag]=extrema(xstart);
upper= spline(spmax(:,1),spmax(:,2),dd);
lower= spline(spmin(:,1),spmin(:,2),dd);
mean_ul = (upper + lower)/2;
xstart = xstart - mean_ul;
iter = iter +1;
end
xend = xend - xstart;
nmode=nmode+1;
% save a mode
for jj=1:1:xsize,
mode(jj,nmode) = xstart(jj);
end
end
% save the trend
for jj=1:1:xsize,
mode(jj,nmode+1)=xend(jj);
end
% add mode to the sum of modes from earlier ensemble members
allmode=allmode+mode;
%fprintf('-');
end
% ensemble average
allmode=allmode/NE/2;
% Rescale mode to origional unit.
allmode=allmode*Ystd;
参考资料
[1] https://blog.csdn.net/kjm13182345320/article/details/129215161
[2] https://blog.csdn.net/kjm13182345320/article/details/128105718文章来源地址https://www.toymoban.com/news/detail-716093.html
到了这里,关于时序分解 | Matlab实现CEEMD互补集合经验模态分解时间序列信号分解的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!