Matlab实现SSA-ICEEMDAN麻雀算法优化ICEEMDAN时间序列信号分解 可直接运行 分解效果好 适合作为创新点(Matlab完整源码和数据)
1.ICEEMDAN方法的分解效果取决于白噪声幅值权重(Nstd)和噪声添加次数(NE),因此,采用智能优化算法对这2个参数进行优化,适应度函数包括包络熵、样本熵、信息熵、排列熵,可随时切换,完全满足您的需求。
2.直接替换Excel数据即可用,注释清晰,适合新手小白[火]
3.附赠时间序列测试数据,可直接运行main一键出图[闪亮]
4.数据为excel数据,方便替换,运行主程序main即可,可直接运行matlab程序。
ST = 0.7;%预警值
PD = 0.4;%发现者的比列,剩下的是加入者0.7
SD = 0.2;%意识到有危险麻雀的比重
PDNumber = round(pop*PD); %发现者数量
SDNumber = round(SD*PD);%意识到有危险麻雀数量
%种群初始化
X0=initialization(pop,dim,ub,lb);
X = X0;
%计算初始适应度值
fitness = zeros(1,pop);
for i = 1:pop
fitness(i) = fobj(X(i,:));
end
[fitness, index]= sort(fitness);%升排序
BestF = fitness(1);
WorstF = fitness(end);
GBestF = fitness(1);%全局最优适应度值
for i = 1:pop
X(i,:) = X0(index(i),:);
end
curve=zeros(1,Max_iter);
GBestX = X(1,:);%全局最优位置
X_new = X;
for i = 1: Max_iter
disp(['第',num2str(i),'次迭代'])
BestF = fitness(1);
WorstF = fitness(end);
R2 = rand(1);
for j = 1:PDNumber
if(R2<ST)
X_new(j,:) = X(j,:).*exp(-j/(rand(1)*Max_iter));
else
X_new(j,:) = X(j,:) + randn()*ones(1,dim);
end
end
for j = PDNumber+1:pop
% if(j>(pop/2))
if(j>(pop - PDNumber)/2 + PDNumber)
X_new(j,:)= randn().*exp((X(end,:) - X(j,:))/j^2);
else
%产生-1,1的随机数
A = ones(1,dim);
for a = 1:dim
if(rand()>0.5)
A(a) = -1;
end
end
AA = A'*inv(A*A');
X_new(j,:)= X(1,:) + abs(X(j,:) - X(1,:)).*AA';
end
end
Temp = randperm(pop);
SDchooseIndex = Temp(1:SDNumber);
for j = 1:SDNumber
if(fitness(SDchooseIndex(j))>BestF)
X_new(SDchooseIndex(j),:) = X(1,:) + randn().*abs(X(SDchooseIndex(j),:) - X(1,:));
elseif(fitness(SDchooseIndex(j))== BestF)
K = 2*rand() -1;
X_new(SDchooseIndex(j),:) = X(SDchooseIndex(j),:) + K.*(abs( X(SDchooseIndex(j),:) - X(end,:))./(fitness(SDchooseIndex(j)) - fitness(end) + 10^-8));
end
end
%边界控制
[1] https://blog.csdn.net/kjm13182345320/article/details/129215161
[2] https://blog.csdn.net/kjm13182345320/article/details/128105718