clc;
clear;
close all;
format compact ;
warning off
%% 读取数据
load D1000.mat
s=f(1:1000);
% 采样时间
t = 1:length(s);
%% EEMD分解
imf=eemd_n(s,0.2,100)';
temp_imf=sum(imf,1);
cancha=s-temp_imf;
imf=[imf; cancha];
K=size(imf,1);
figure;
grid on
plot(t,s,'b-','LineWidth', 1)
title('原始功率序列')
xlabel('时间/h')
ylabel('负荷')
figure;
grid on
for i=1:K
subplot(K,1,i)
plot(t,imf(i,:),'b-','LineWidth', 1);
grid on
if i==1;title('EEMD分解');
end
if i==K;xlabel('时间/h');end
ylabel(['IMF',num2str(i)])
end
%% 分解重组VS原始图
figure
plot(s,'r-');
hold on
plot(sum(imf,1),'b--')
legend('原始信号','重构信号')
智能算法及其模型预测