Abstract
This chapter introduces three kinds of RBF neural network control laws based on gradient descent rule, including supervisory control law, model reference adaptive control law, and self-adjust control law; the weight value learning algorithms are presented. Several simulation examples are given.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Noriega JR, Wang H (1998) A direct adaptive neural network control for unknown nonlinear systems and its application. IEEE Trans Neural Netw 9(1):27–34
Suykens JAK, Vandewalle JPL, Demoor BLR (1996) Artificial neural networks for modeling and control of nonlinear systems. Kluwer Academic, Boston
Author information
Authors and Affiliations
Appendix
Appendix
3.1.1 Programs for Sect. 3.1.2
The program of RBF supervisory control: chap3_1.m
%RBF Supervisory Control
clear all;
close all;
ts=0.001;
sys=tf(1000,[1,50,2000]);
dsys=c2d(sys,ts,'z');
[num,den]=tfdata(dsys,'v');
y_1=0;y_2=0;
u_1=0;u_2=0;
e_1=0;
xi=0;
x=[0,0]';
b=0.5*ones(4,1);
c=[-2 -1 1 2];
w=rands(4,1);
w_1=w;
w_2=w_1;
xite=0.30;
alfa=0.05;
kp=25;
kd=0.3;
for k=1:1:1000
time(k)=k*ts;
S=1;
if S==1
yd(k)=0.5*sign(sin(2*2*pi*k*ts)); %Square Signal
elseif S==2
yd(k)=0.5*(sin(3*2*pi*k*ts)); %Square Signal
end
y(k)=-den(2)*y_1-den(3)*y_2+num(2)*u_1+num(3)*u_2;
e(k)=yd(k)-y(k);
xi=yd(k);
for j=1:1:4
h(j)=exp(-norm(xi-c(:,j))^2/(2*b(j)*b(j)));
end
un(k)=w'*h';
%PD Controller
up(k)=kp*x(1)+kd*x(2);
M=2;
if M==1 %Only Using PID Control
u(k)=up(k);
elseif M==2 %Total control output
u(k)=up(k)+un(k);
end
if u(k)>=10
u(k)=10;
end
if u(k)<=-10
u(k)=-10;
end
%Update NN Weight
d_w=-xite*(un(k)-u(k))*h';
w=w_1+ d_w+alfa*(w_1-w_2);
w_2=w_1;
w_1=w;
u_2=u_1;
u_1=u(k);
y_2=y_1;
y_1=y(k);
x(1)=e(k); %Calculating P
x(2)=(e(k)-e_1)/ts; %Calculating D
e_1=e(k);
end
figure(1);
plot(time,yd,'r',time,y,'k:','linewidth',2);
xlabel('Time(second)');ylabel('Position tracking');
legend('Ideal position signal','Tracking position signal');
figure(2);
subplot(311);
plot(time,un,'k','linewidth',2);
xlabel('time(s)');ylabel('un');
legend('Control input with RBF');
subplot(312);
plot(time,up,'k','linewidth',2);
xlabel('time(s)');ylabel('up');
legend('Control input with P');
subplot(313);
plot(time,u,'k','linewidth',2);
xlabel('time(s)');ylabel('u');
legend('Total control input');
3.1.2 Programs for Sect. 3.2.2
Programs: chap3_2.m
%Model Reference Aapative RBF Control
clear all;
close all;
u_1=0;
y_1=0;
ym_1=0;
x=[0,0,0]';
c=[-3 -2 -1 0 1 2 3;
-3 -2 -1 0 1 2 3;
-3 -2 -1 0 1 2 3];
b=2;
w=rands(1,7);
xite=0.35;
alfa=0.05;
h=[0,0,0,0,0,0,0]';
c_1=c;c_2=c;
b_1=b;b_2=b;
w_1=w;w_2=w;
ts=0.001;
for k=1:1:3000
time(k)=k*ts;
yd(k)=0.50*sin(2*pi*k*ts);
ym(k)=0.6*ym_1+yd(k);
y(k)=(-0.1*y_1+u_1)/(1+y_1^2); %Nonlinear plant
for j=1:1:7
h(j)=exp(-norm(x-c(:,j))^2/(2*b^2));
end
u(k)=w*h;
ec(k)=ym(k)-y(k);
dyu(k)=sign((y(k)-y_1)/(u(k)-u_1));
d_w=0*w;
for j=1:1:7
d_w(j)=xite*ec(k)*h(j)*dyu(k);
end
w=w_1+d_w+alfa*(w_1-w_2);
%Return of parameters
u_1=u(k);
y_1=y(k);
ym_1=ym(k);
x(1)=yd(k);
x(2)=ec(k);
x(3)=y(k);
w_2=w_1;w_1=w;
end
figure(1);
plot(time,ym,'r',time,y,'k:','linewidth',2);
xlabel('time(s)');ylabel('ym,y');
legend('Ideal position signal','Tracking position signal');
figure(2);
plot(time,u,'r','linewidth',2);
xlabel('time(s)');ylabel('Control input');
3.1.3 Programs for Sect. 3.3.3
RBF NN Self-adjust Control:chap3_3.m
%Self-Correct control based RBF Identification
clear all;
close all;
xite1=0.15;
xite2=0.50;
alfa=0.05;
w=0.5*ones(6,1);
v=0.5*ones(6,1);
cij=0.50*ones(1,6);
bj=5*ones(6,1);
h=zeros(6,1);
w_1=w;w_2=w_1;
v_1=v;v_2=v_1;
u_1=0;y_1=0;
ts=0.02;
for k=1:1:5000
time(k)=k*ts;
yd(k)=1.0*sin(0.1*pi*k*ts);
%Practical Plant;
g(k)=0.8*sin(y_1);
f(k)=15;
y(k)=g(k)+f(k)*u_1;
for j=1:1:6
h(j)=exp(-norm(y(k)-cij(:,j))^2/(2*bj(j)*bj(j)));
end
Ng(k)=w'*h;
Nf(k)=v'*h;
ym(k)=Ng(k)+Nf(k)*u_1;
e(k)=y(k)-ym(k);
d_w=0*w;
for j=1:1:6
d_w(j)=xite1*e(k)*h(j);
end
w=w_1+d_w+alfa*(w_1-w_2);
d_v=0*v;
for j=1:1:6
d_v(j)=xite2*e(k)*h(j)*u_1;
end
v=v_1+d_v+alfa*(v_1-v_2);
u(k)=-Ng(k)/Nf(k)+yd(k)/Nf(k);
u_1=u(k);
y_1=y(k);
w_2=w_1;
w_1=w;
v_2=v_1;
v_1=v;
end
figure(1);
plot(time,yd,'r',time,y,'k:','linewidth',2);
xlabel('Time(second)');ylabel('Position tracking');
legend('Ideal position signal','Tracking position signal');
figure(2);
plot(time,g,'r',time,Ng,'k:','linewidth',2);
xlabel('Time(second)');ylabel('g and Ng');
legend('Ideal g','Estimation of g');
figure(3);
plot(time,f,'r',time,Nf,'k:','linewidth',2);
xlabel('Time(second)');ylabel('f and Nf');
legend('Ideal f','Estimation of f');
Rights and permissions
Copyright information
© 2013 Tsinghua University Press, Beijing and Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Liu, J. (2013). RBF Neural Network Control Based on Gradient Descent Algorithm. In: Radial Basis Function (RBF) Neural Network Control for Mechanical Systems. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34816-7_3
Download citation
DOI: https://doi.org/10.1007/978-3-642-34816-7_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-34815-0
Online ISBN: 978-3-642-34816-7
eBook Packages: EngineeringEngineering (R0)