基于时空RBF-NN进行非线性系统识别(Matlab代码实现)
原创
©著作权归作者所有:来自51CTO博客作者荔枝科研社的原创作品,请联系作者获取转载授权,否则将追究法律责任
💥💥💥💞💞💞欢迎来到本博客❤️❤️❤️💥💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
目录
💥1 概述
📚2 运行结果
🎉3 参考文献
🌈4 Matlab代码实现
💥1 概述
在本文中:实现了 RBF、分数 RBF 和时空 RBF 神经网络,用于非线性系统识别,可以找到用于非线性系统识别任务的径向基函数神经网络(RBF-NN)的三种变体。特别是,实现了具有常规和分数梯度下降的RBF,并将性能与时空RBF-NN进行了比较。
详细文章见参考文献。
📚2 运行结果
部分代码:
%%
% tic
for k=1:runs
Ic(k)=0;
If(k)=0;
Ist(k)=0;
U = zeros(3,1);
U(2:end)=[-1 -1];
for i1=1:len
U(1:end-1)=U(2:end);
U(end)=x(i1);
for i2=1:n1
ED_cf(:,i2)=exp((-(norm(U-c(i2))^2))/beeta^2);
end
for i2=1:n1
ED_st(:,i2)=exp((-(abs(U-c(i2))))/beeta^2);
end
%% RBF
y(i1)=sum(diag(W_c*ED_cf'))+bc;
d(i1)= h(1)*U(end) +h(2)*U(end-1)+h(3)*U(end-2)+h(4)*(cos(h(5)*U(end)) +exp(-abs(U(end))))+0.1*randn();
e_c=d(i1)-y(i1);
Ic(k)=Ic(k)+e_c*e_c'./len; %%% Objective Function W_c=W_c+meu_c*e_c*ED_cf;
bc=bc+meu_c*e_c;
%% Fractional RBF
yf(i1)=sum(diag(W_f*ED_cf'))+bf;
% d(i1)= h(1)*U(end) +h(2)*U(end-1)+h(3)*U(end-2)+h(4)*(cos(h(5)*U(end)) +exp(-abs(U(end))))+0.1*randn();
e_f=d(i1)-yf(i1);
If(k)=If(k)+e_f*e_f'./len; %%% Objective Function W_f=W_f+meu_f*e_f*ED_cf.*((1-alpha_f)+alpha_f*abs(W_f.^fp));
bf=bf+meu_f*e_f.*((1-alpha_f)+alpha_f*abs(bf.^fp));
end
% q_track(k) = q;
end
% time=toc
save comparison_train.mat% plot(q_track)
figure
semilogy(Ic,'r')
hold on
semilogy(If,'k')
semilogy(Ist,'b') Ist=0;
x=[-1 -1 ones(1,round(len/4)) -ones(1,round(len/4)) ones(1,round(len/4)) -ones(1,round(len/4))];
x=awgn(x,20); U(2:end)=[-1 -1];
n1=length(c);
Ic=0;
for i1=1:len-1
U(1:end-1)=U(2:end);
U(end)=x(i1);
for i2=1:n1
ED_st(:,i2)=exp((-(abs(U-c(i2))))/beeta^2);
end
y(i1)=sum(diag(W_c*ED_cf'))+bc;
d(i1)= h(1)*U(end) +h(2)*U(end-1)+h(3)*U(end-2)+h(4)*(cos(h(5)*U(end)) +exp(-abs(U(end))));
e_c=d(i1)-y(i1);
SE(i1)=e_c*e_c'; %%% Objective Function
Ic(i1)=mean(SE);
yf(i1)=sum(diag(W_f*ED_cf'))+bf;
% d(i1)= h(1)*U(end) +h(2)*U(end-1)+h(3)*U(end-2)+h(4)*(cos(h(5)*U(end)) +exp(-abs(U(end))));
e_f=d(i1)-yf(i1);
SEf(i1)=e_f*e_f'; %%% Objective Function
If(i1)=mean(SEf);
yq(i1)=sum(diag(W_st*ED_st'))+bst;
% d(i1)= h(1)*U(end) +h(2)*U(end-1)+h(3)*U(end-2)+h(4)*(cos(h(5)*U(end)) +exp(-abs(U(end))));
e_st=d(i1)-yq(i1);
SEq(i1)=e_st*e_st'; %%% Objective Function
Ist(i1)=mean(SEq);
plot(d,'cy')
hold on
plot(y,'r')
plot(yf,'r')
plot(yq,'b')
legend('RBF','FRBF','desired','qRBF')
%saveas(gcf,strcat('RBF.png'),'png')
🎉3 参考文献
[1]Khan, Shujaat, et al. “Spatio-Temporal RBF Neural Networks.” 2018 3rd {IEEE} International Conference on Emerging Trends in Engineering, Sciences and Technology ({ICEEST}), {IEEE}, 2018
🌈4 Matlab代码实现