时序分解 | Matlab实现DBO-VMD基于蜣螂优化算法优化VMD变分模态分解时间序列信号分解
目录
- 时序分解 | Matlab实现DBO-VMD基于蜣螂优化算法优化VMD变分模态分解时间序列信号分解
- 效果一览
- 基本介绍
- 程序设计
- 参考资料
效果一览
基本介绍
1.利用蜣螂优化算法优化VMD中的参数k、a,适应度函数可自由选为包络熵、信息熵、样本熵、排列熵,包含分解效果图、频率图、收敛曲线等图~
2.蜣螂优化算法DBO是23年提出的新算法,用的人很少,适合作为创新~
3.直接替换Excel数据即可用,注释清晰,适合新手小白。
4.附赠时间序列测试数据,直接运行main文件即可一键出图。
程序设计
- 完整源码和数据获取方式私信博主回复:Matlab实现DBO-VMD基于蜣螂优化算法优化VMD变分模态分解时间序列信号分解。
[x, y] = size(signal);
if x > yC = y;% number of channelsT = x;% length of the Signalsignal = signal';
elseC = x;% number of channelsT = y;% length of the Signal
end
%---------- Preparations
% Sampling Frequency
fs = 1/T;% Mirroring
f(:,1:T/2) = signal(:,T/2:-1:1);
f(:,T/2+1:3*T/2) = signal;
f(:,3*T/2+1:2*T) = signal(:,T:-1:T/2+1);
% Time Domain 0 to T (of mirrored signal)
T = size(f,2);
t = (1:T)/T;
% frequencies
freqs = t-0.5-1/T;
% Construct and center f_hat
f_hat = fftshift(fft(f,[],2),2);
f_hat_plus = f_hat;
f_hat_plus(:,1:T/2) = 0;%------------ Initialization
% Maximum number of iterations
N = 500;
% For future generalizations: individual alpha for each mode
Alpha = alpha*ones(1,K);
% matrix keeping track of every iterant
u_hat_plus_00 = zeros(length(freqs), C, K);
u_hat_plus = zeros(length(freqs), C, K);
omega_plus = zeros(N, K);
% initialize omegas uniformly
switch initcase 1omega_plus(1,:) = (0.5/K)*((1:K)-1);case 2omega_plus(1,:) = sort(exp(log(fs) + (log(0.5)-log(fs))*rand(1,K)));otherwiseomega_plus(1,:) = 0;
end
参考资料
[1] https://blog.csdn.net/kjm13182345320/article/details/129215161
[2] https://blog.csdn.net/kjm13182345320/article/details/128105718