%function allmode=eemd(Y,Nstd,NE)
%
% This is an EMD/EEMD program
%
% INPUT:
% Y: Inputted data;1-d data only
% Nstd: ratio of the standard deviation of the added noise and that
% of Y (0.2-0.3);噪声的标准差
% NE: Ensemble number for the EEMD (70-100)
% OUTPUT:
% A matrix of N*(m+1) matrix, where N is the length of the input
% data Y, and m=fix(log2(N))-1. Column 1 is the original data, columns 2, 3, …
% m are the IMFs from high to low frequency, and comlumn (m+1) is the
% residual (over all trend).
%
% NOTE:
% It should be noted that when Nstd is set to zero and NE is set to 1, the
% program degenerates to a EMD program.(for EMD Nstd=0,NE=1)
% This code limited sift number=10 ,the stoppage criteria can’t change.
%
% References:
% Wu, Z., and N. E Huang (2008),
% Ensemble Empirical Mode Decomposition: a noise-assisted data analysis method.
% Advances in Adaptive Data Analysis. Vol.1, No.1. 1-41.
%
% code writer: Zhaohua Wu.
% footnote:S.C.Su 2009/03/04
%
% There are three loops in this code coupled together.
% 1.read data, find out standard deviation ,devide all data by std
% 2.evaluate TNM as total IMF number–eq1.
% TNM2=TNM+2,original data and residual included in TNM2
% assign 0 to TNM2 matrix
% 3.Do EEMD NE times-------------------------------------------------------------loop EEMD start
% 4.add noise
% 5.give initial values before sift
% 6.start to find an IMF------------------------------------------------IMF loop start
% 7.sift 10 times to get IMF--------------------------sift loop start and end
% 8.after 10 times sift --we got IMF
% 9.subtract IMF from data ,and let the residual to find next IMF by loop
% 6.after having all the IMFs---------------------------------------------IMF loop end
% 9.after TNM IMFs ,the residual xend is over all trend
% 3.Sum up NE decomposition result-------------------------------------------------loop EEMD end
% 10.Devide EEMD summation by NE,std be multiply back to data
%
% Association: no
% this function ususally used for doing 1-D EEMD with fixed
% stoppage criteria independently.
%
% Concerned function: extrema.m
% above mentioned m file must be put together

function allmode=eemd(Y,Nstd,NE)

%part1.read data, find out standard deviation ,devide all data by std
xsize=length(Y);
dd=1:1:xsize;
Ystd=std(Y);
Y=Y/Ystd;

%part2.evaluate TNM as total IMF number,ssign 0 to TNM2 matrix
TNM=fix(log2(xsize))-1;
TNM2=TNM+2;
for kk=1:1:TNM2,
for ii=1:1:xsize,
allmode(ii,kk)=0.0;
end
end

%part3 Do EEMD -----EEMD loop start
for iii=1:1:NE, %EEMD loop -NE times EMD sum together

%part4 --Add noise to original data,we have X1
for i=1:xsize,temp=randn(1,1)*Nstd;X1(i)=Y(i)+temp;
end%part4 --assign original data in the first column
for jj=1:1:xsize,mode(jj,1) = Y(jj);
end%part5--give initial 0 to xorigin and xend
xorigin = X1;
xend = xorigin;%part6--start to find an IMF-----IMF loop start
nmode = 1;
while nmode <= TNM,xstart = xend; %last loop value assign to new iteration loop %xstart -loop start dataiter = 1;      %loop index initial value%part7--sift 10 times to get IMF---sift loop  start while iter<=10,[spmax, spmin, flag]=extrema(xstart);  %call function extrema %the usage of  spline ,please see part11.  upper= spline(spmax(:,1),spmax(:,2),dd); %upper spline bound of this sift lower= spline(spmin(:,1),spmin(:,2),dd); %lower spline bound of this sift mean_ul = (upper + lower)/2;%spline mean of upper and lower  xstart = xstart - mean_ul;%extract spline mean from Xstartiter = iter +1;end%part7--sift 10 times to get IMF---sift loop  end      %part8--subtract IMF from data ,then let the residual xend to start to find next IMF xend = xend - xstart;nmode=nmode+1;%part9--after sift 10 times,that xstart is this time IMF for jj=1:1:xsize,mode(jj,nmode) = xstart(jj);endend
%part6--start to find an IMF-----IMF loop end%part 10--after gotten  all(TNM) IMFs ,the residual xend is over all trend
%                        put them in the last column
for jj=1:1:xsize,mode(jj,nmode+1)=xend(jj);
end
%after part 10 ,original +TNM-IMF+overall trend  ---those are all in mode    allmode=allmode+mode;

end
%part3 Do EEMD -----EEMD loop end

%part10–devide EEMD summation by NE,std be multiply back to data
allmode=allmode/NE;
allmode=allmode*Ystd;

%part11–the syntax of the matlab function spline
%yy= spline(x,y,xx); this means
%x and y are matrixs of n1 points ,use n1 set (x,y) to form the cubic spline
%xx and yy are matrixs of n2 points,we want know the spline value yy(y-axis) in the xx (x-axis)position
%after the spline is formed by n1 points ,find coordinate value on the spline for [xx,yy] --n2 position.

EEMD(Ensemble Empirical Mode Decomposition)集合经验模式分解代码相关推荐

  1. EEMD(集合经验模态分解)

    1. EEMD(集合经验模态分解)的概念 EEMD(Ensemble Empirical Mode Decomposition)是最常见的一种EMD改进方法.他的优势主要是解决EMD方法中的模态混叠现 ...

  2. 集成经验模式分解eemdmatlab代码实现

    之前在CSDN上下载这些东西要积分,下载不了,所以搞了个这样的,亲测有效 集成经验模式分解eemd,一种改进的emd的信号分解方法matlab代码实现 function allmode=eemd(Y, ...

  3. 经验模式分解(EMD)——简介及Matlab工具箱安装

    最近在做脑电信号分析,在导师的建议下学习了一点经验模式分解(下面简称EMD)的皮毛,期间也是遇到了很多问题,在这里整理出来,一是为了自己备忘,二是为了能尽量帮到有需要的朋友. 一.EMD简介 经验模态 ...

  4. 克劳特法matlab,经验模式分解matlab

    EMD分解的matlab程序 %此版本为 ALAN 版本的整合注释版 function imf = emd(x...(x1) %当标准偏差系数 sd 大于 0.1 或 x1 不是固有模态函数时,分量终 ...

  5. 经验模式分解(EMD)的MATLAB工具箱安装详解

    经验模式分解(EMD)的MATLAB工具箱安装详解 MATLAB工具箱安装 时频分析工具箱 安装EMD工具箱 代码检验是否安装成功 MATLAB工具箱安装 首先,本文参考CSDN这篇文章https:/ ...

  6. 经验模式分解(EMD)及希尔伯特-黄变换(HHT)简介及matlab实现

    本文介绍过程涉及到两个链接工具包,可以自己网上搜索下载,以下提供了网盘下载的地址,因为作者主要做语音方面工作,所以后面的说明主要以说话人识别为例.(链接:https://pan.baidu.com/s ...

  7. 转载: EMD(Emprical mode decomposition)经验模态分解

    原文链接:     http://blog.sina.com.cn/s/blog_55954cfb0102e9y2.html 美国工程院士黄锷博士于1998年提出的一种信号分析方法:重点是黄博士的具有 ...

  8. 经验模式分解EMD算法原理

    目录 简介 假设条件与原理 假设条件 基本原理 EMD的优缺点 存在的问题 简介 经验模态分解(Empirical Mode Decomposition, EMD)算法是由 NE. Huang 等人提 ...

  9. [学习笔记]EMD经验模式分解

    Empirical Mode Decomposition 参考文献:The empirical mode decomposition and the Hilbert spectrum for nonl ...

最新文章

  1. 宗成庆:如何撰写毕业论文?
  2. Mac下使用Homebrew安装Sphinx和MySQL
  3. 截取最后一个下划线前面的字符
  4. python高级编程知识点_(转)python 高级编程技巧学习笔记
  5. 3.10 十进制转换为二进制
  6. 操作系统中的一些基本概念
  7. 音频放大电路_集成电路技术汇总:检测技巧
  8. 544B. Sea and Islands
  9. 互联网金融并不是传统银行的颠覆者
  10. Android获取系统ID(com.android.internal.R)
  11. MFC开发——MFC项目创建
  12. 2020 年 AIoT 产业概述
  13. android H5页面跳转APP,H5唤醒app并跳转到指定页面
  14. android5.0 输入法提取,搜狗手机输入法5.0 Android新版使用体验
  15. 秒读小说app带源码,开源阅读软件app,开源小说阅读app源码
  16. cv.threshold()
  17. 拿中国互联网的两个航母说事(一)--腾讯战略
  18. Python可视化-WordCloud生成云词图片
  19. android 清理缓存动画,Android仿微信清理内存图表动画(解决surfaceView屏幕闪烁问题)demo实例详解...
  20. log4j2远程漏洞事件

热门文章

  1. Android的Monkey测试
  2. 目前常用AD/DA芯片简介
  3. 知乎热议!如何把自己的导师培养成杰青?
  4. 扫地机器人对地面的压强_石头扫地机器人T6地图动态规划体验:扫地,就是让你明明白白...
  5. toString()方法的概念、应用、重写toString方法
  6. TCHAR与char的区别
  7. html编码有问题,html特殊字符编码问题导致的细节问题
  8. 网络基础知识—IP地址、MAC地址、PORT端口
  9. 计算机数字音乐小酒窝,小酒窝数字简谱哪有?
  10. html设置打开页面后自动关闭,Win7系统打开IE浏览器后页面自动关闭的四种解决方法...