当前位置:网站首页>Implementation of ICEEMDAN Decomposition Code in MATLAB
Implementation of ICEEMDAN Decomposition Code in MATLAB
2022-08-04 07:02:00 【Doraemon 001】
0, Preface
This article explains the ICEEMDAN decomposition method and shares the code.
1. Implementation of ICEEMDAN
The following is the main function part:
ecg=data;%data is a signal data to be decomposed, please replace it with your own data%% parameter settingsNstd = 0.2;nr = 1;MaxIter = 5000;%%ICEEMDAN[modes]=iceemdan(ecg,Nstd,NR,MaxIter,1);%iceemdanmodes=modes';t=1:length(ecg);[a b]=size(modes);figure;subplot(a+1,1,1);plot(t,ecg);% the ECG signal is in the first row of the subplotylabel('original')set(gca,'xtick',[])title('ICEEMDAN')axis tight;for i=2:asubplot(a+1,1,i);plot(t,modes(i-1,:));ylabel (['IMF ' num2str(i-1)]);set(gca,'xtick',[])xlim([1 length(ecg)])endsubplot(a+1,1,a+1)plot(t,modes(a,:))ylabel(['IMF ' num2str(a)])xlim([1 length(ecg)])xlabel('sample point')The code of the sub-function iceemdan:
function [modes]=iceemdan(x,Nstd,NR,MaxIter,SNRFlag)% The current is an improved version, introduced in:%[1] Colominas MA, Schlotthauer G, Torres ME. "Improve complete ensemble EMD: A suitable tool for biomedical signal processing"% Biomedical Signal Processing and Control vol. 14 pp. 19-29 (2014)%The CEEMDAN algorithm was first introduced at ICASSP 2011, Prague, Czech Republic%The authors will be thankful if the users of this code reference the work%where the algorithm was first presented:%[2] Torres ME, Colominas MA, Schlotthauer G, Flandrin P. "A Complete Ensemble Empirical Mode Decomposition with Adaptive Noise"% Proc. 36th Int. Conf. on Acoustics, Speech and Signa Processing ICASSP 2011 (May 22-27, Prague, Czech Republic)%Author: Marcelo A. Colominas%contact: [email protected]%Last version: 25 feb 2015desvio_x=std(x);x=x/desvio_x;[a,b]=size(x);temp=zeros(b,1);modes=zeros(b,1);aux=zeros(a,b);for i=1:NRwhite_noise{i}=randn(size(x));%creates the noise realizationsend;for i=1:NRmodes_white_noise{i}=emd(white_noise{i},'display',0);%calculates the modes of white gaussian noiseend;% save interval modes_white_noisefor i=1:NR %calculates the first modexi=x+Nstd*modes_white_noise{i}(:,1)'/std(modes_white_noise{i}(:,1));[temp, o, it]=emd(xi,'MaxNumIMF',1,'SiftMaxIterations',MaxIter,'display',0);aux=aux+(xi-temp')/NR;% nnnnnnnnnnnnnnnnJub local envelopeend;modes= (x-aux)'; %saves the first modemedias = aux; %r1k=1;aux=zeros(a,b);es_imf = min(size(emd(medias(1,:),'SiftMaxIterations',MaxIter,'display',0)));while es_imf>1 %calculates the rest of the modesfor i=1:NRtamanio=size(modes_white_noise{i});if tamanio(2)>=k+1noise=modes_white_noise{i}(:,k+1);if SNRFlag == 2noise=noise/std(noise); %adjust the std of the noiseend;noise=Nstd*noise;try[temp,o,it]=emd(medias(1,:)+std(medias(1,:))*noise','MaxNumIMF',1,'SiftMaxIterations',MaxIter,'display',0);catchtemp=emd(medias(1,:)+std(medias(1,:))*noise','MaxNumIMF',1,'SiftMaxIterations',MaxIter,'display',0);end;elsetry[temp, o, it]=emd(medias(1,:),'MaxNumIMF',1,'SiftMaxIterations',MaxIter,'display',0);catchtemp=emd(medias(1,:),'MaxNumIMF',1,'SiftMaxIterations',MaxIter,'display',0);end;end;aux=aux+(medias(1,:)+std(medias(1,:))*noise'-temp')/NR;% r2 r3 r...end;modes=[modes (medias(1,:)-aux)'];medias = aux;aux=zeros(size(x));k=k+1;es_imf = min(size(emd(medias(1,:),'SiftMaxIterations',MaxIter,'display',0)));end;modes = [modes (medias(1,:))'];modes=modes*desvio_x;The above code can be run directly to achieve signal decomposition.
边栏推荐
- Uos统信系统 IP地址以及完整主机名配置
- 一场聚会,转行渗透测试月薪13.5k,感谢那个女同学......
- 狗都能看懂的Vision Transformer的讲解和代码实现
- Interpretation of EfficientNet: Composite scaling method of neural network (based on tf-Kersa reproduction code)
- Uos统信系统 DNS
- 【HIT-SC-MEMO2】哈工大2022软件构造 复习笔记2
- 基于时序模式注意力机制(TPA)的长短时记忆(LSTM)网络TPA-LSTM的多变量输入风电功率预测
- 【HIT-SC-MEMO5】哈工大2022软件构造 复习笔记5
- 数据库sql的基础语句
- CMDB 阿里云部分实现
猜你喜欢

nacos 返回 403 unknown user 太他么坑了 源码解析

gRPC intro 1:RPC

Database knowledge: SQLServer creates non-sa user notes

数据库文档生成工具V1.0

SegNet——论文笔记

VMD结合ISSA优化LSSVM功率预测

JUC并发容器——阻塞队列

RuntimeError: You called this URL via POST, but the URL doesn‘t end in a slash and you have APPEND_S

子空间结构保持的多层极限学习机自编码器(ML-SELM-AE)

A semi-supervised Laplace skyhawk optimization depth nuclear extreme learning machine for classification
随机推荐
基于爬行动物搜索RSA优化LSTM的时间序列预测
Uos统信系统 CA根证书搭建
罗斯50分
SENet详解及Keras复现代码
ZYNQ之FPGA LED 灯闪烁实验
Unity Day03
Database knowledge: SQLServer creates non-sa user notes
JUC锁框架——CountDownLatch、CyclicBarrier和Semaphore
树莓派 4 B 拨动开关控制风扇 Rasberry Pi 4 B Add Toggle Switch for the Fan
Detailed explanation of DenseNet and Keras reproduction code
MySQL之SQL结构化查询语言
数据库实体类对应daoimpl,基础的增删改查。
Visualization and Animation Technology (Computer Animation)
DenseNet详解及Keras复现代码
数据库:整理四个实用的SQLServer脚本函数
目标检测中的先验框(Anchor)
Memory Management
狗都能看懂的Self-Attention讲解
JUC锁框架——基于AQS的实现,从ReentrantLock认识独占和共享
【HIT-SC-MEMO1】哈工大2022软件构造 复习笔记1