时序分解 | Matlab实现CEEMDAN完全自适应噪声集合经验模态分解时间序列信号分解
目录
效果一览
基本介绍
Matlab实现CEEMDAN完全自适应噪声集合经验模态分解时间序列信号分解
1.分解效果图 ,效果如图所示,可完全满足您的需求~
2.直接替换数据即可用 适合新手小白 注释清晰~
3.附赠案例数据 直接运行main一键出图~
程序设计
- 完整源码和数据获取方式:Matlab实现CEEMDAN完全自适应噪声集合经验模态分解时间序列信号分解。
clike
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:NR
white_noise{i}=randn(size(x));%creates the noise realizations
end;
for i=1:NR
modes_white_noise{i}=emd(white_noise{i});%calculates the modes of white gaussian noise
end;
for i=1:NR %calculates the first mode
temp=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 mode
k=1;
aux=zeros(size(x));
acum=sum(modes,1);
while nnz(diff(sign(diff(x-acum))))>2 %calculates the rest of the modes
for i=1:NR
tamanio=size(modes_white_noise{i});
if tamanio(1)>=k+1
noise=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,:);
catch
it=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;
参考资料
[1] https://blog.csdn.net/kjm13182345320/article/details/129215161
[2] https://blog.csdn.net/kjm13182345320/article/details/128105718