时序分解 | MATLAB实现CEEMDAN+SE自适应经验模态分解+样本熵计算

时序分解 | MATLAB实现CEEMDAN+SE自适应经验模态分解+样本熵计算

效果一览

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

基本介绍

MATLAB实现CEEMDAN+SE自适应经验模态分解+样本熵计算
包括频谱图
附赠案例数据 可直接运行
直接替换excel数据即可使用 适合新手小白

程序设计

  • 完整源码和数据获取方式:私信回复MATLAB实现CEEMDAN+SE自适应经验模态分解+样本熵计算
function [modes its]=ceemdan(x,Nstd,NR,MaxIter)
 

%----------------------------------------------------------------------
%   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: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;
————————————————
版权声明:本文为CSDN博主「机器学习之心」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/kjm13182345320/article/details/119920826

参考资料

[1] https://blog.csdn.net/kjm13182345320/article/details/129215161
[2] https://blog.csdn.net/kjm13182345320/article/details/128105718

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-01-26 10:58:01       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-26 10:58:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-26 10:58:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-26 10:58:01       18 阅读

热门阅读

  1. 数据结构进阶:二叉搜索树

    2024-01-26 10:58:01       33 阅读
  2. XGBoost系列8——XGBoost的未来:从强化学习到AutoML

    2024-01-26 10:58:01       34 阅读
  3. Android 通知栏使用总结

    2024-01-26 10:58:01       32 阅读
  4. IPQ5018: Low-Cost OFDMA Supported WiFi 6 IIoT Solution DR5018

    2024-01-26 10:58:01       28 阅读
  5. 演讲比赛流程管理系统代码示例

    2024-01-26 10:58:01       32 阅读
  6. 蒙特卡洛模拟之逆变换法

    2024-01-26 10:58:01       34 阅读