A list,

RBF neural network is a three-layer neural network, which includes input layer, hidden layer and output layer. The transformation from input space to hidden space is nonlinear, while the transformation from hidden space to output space is linear. The flow diagram is as follows:



The basic idea of RBF network is that RBF is used as the “basis” of the hidden element to form the hidden layer space, so that the input vector can be directly mapped to the hidden space without weight connection. When the center point of RBF is determined, the mapping relationship is determined. The mapping from the hidden layer space to the output space is linear, that is, the output of the network is the linear weighted sum of the output of the hidden element, where the weight is the adjustable parameter of the network. Among them, the function of the hidden layer is to map the vector from the lower dimension P to the higher dimension H, so that the case of the lower dimension linearly indivisible can become linearly separable to the higher dimension, mainly the idea of kernel function. Thus, the network mapping from input to output is nonlinear, while the network output is linear with respect to tunable parameters. The weights of the network can be solved directly by linear equations, which greatly speeds up learning and avoids local minimum problems.



2. RBF neural network learning problem

Ii. Source code

clc; clear all; close all; mu =3.986004418 e14;
al = 7400000; % Reference star orbit semi-major axis (m) n =sqrt(mu/(al^3)); % Reference star mean angular velocity N =2;
T = 2*pi/n;
t0 = 0;
tf = t0 + N*T;

x0=[0.3;0.1;0.2;0.2;0.12;0.17;0.09];
% xt0=[0.3;0.1;0.2;0.2;0.12;0.17;0.09;1.3;3.05;1.22];
% [t,x]=ode45('zitai_function',[t0:17:tf],x0);
% [t,xt]=ode45('zitai_ctrl',[t0:17:tf],xt0); 
% [t,xq]=ode45('oula',[t0:17:tf],[1.3;3.05;1.22]);
[t,x]=ode45('rbf_zitai',[t0:17:5000],x0);

% c0=pi/T;
% wrd=[-c0*sin(2*c0*t) 1.6*c0*sin(4*c0*t) 0.8*c0*sin(2*c0*t)];
% wr=[xt(:,5)-wrd(1.1) xt(:,6)-wrd(2.1) xt(:,7)-wrd(3.1)];
% fai=xq(:,1); sita=xq(:,2); pesi=xq(:,3);
% for i=1:1118
% q(i,1) =cos(pesi(i,:)/2) *sin(fai(i,:)/2) *cos(sita(i,:)/2) -sin(pesi(i,:)/2) *cos(fai(i,:)/2) *sin(sita(i,:)/2);
% q(i,2) =cos(pesi(i,:)/2) *cos(fai(i,:)/2) *sin(sita(i,:)/2) +sin(pesi(i,:)/2) *sin(fai(i,:)/2) *cos(sita(i,:)/2);
% q(i,3) =sin(pesi(i,:)/2) *cos(fai(i,:)/2) *cos(sita(i,:)/2) +cos(pesi(i,:)/2) *sin(fai(i,:)/2) *sin(sita(i,:)/2);
% q(i,4) =cos(pesi(i,:)/2) *cos(fai(i,:)/2) *cos(sita(i,:)/2) -sin(pesi(i,:)/2) *sin(fai(i,:)/2) *sin(sita(i,:)/2);
% end
unction dx=rbf_micishedong(t,x)
mu=398600.44 e+9;
rol=7400000;
Re = 6378000; % Equatorial radius of the earth el =0; % eccentricity IL =30*pi/180; % orbital inclination Ml =90*pi/180; % Flat approach Angle NL =sqrt(mu/rol^3);
wl = 0*pi/180; % Perigee argument raanl =100*pi/180; % liter intersection right ascension fl =160.0513*pi/180; % true near point Angle ul = wl+fl; % True latitude Angle J2 =1.08263 e-3;
A=[cos(ul)*cos(raanl)-sin(ul)*cos(il)*sin(raanl) cos(ul)*sin(raanl)+sin(ul)*cos(il)*cos(raanl) sin(ul)*sin(il);
   -sin(ul)*cos(raanl)-cos(ul)*cos(il)*sin(raanl) -sin(ul)*sin(raanl)+cos(ul)*cos(il)*cos(raanl) cos(ul)*sin(il);
   sin(il)*sin(raanl) -sin(il)*cos(raanl) cos(il)]; % Geocentric inertial coordinate system to reference spacecraft coordinate transformation matrix Fal1 =sqrt(mu*rol*(1-el^2)) * (1+2*el*cos(Ml)+el^2*0.5* (1+5*cos(2*Ml)+el^3))/rol^2;
fal2=2*sqrt(mu*rol*(1-el^2))*(el*nl*sin(Ml)+el^2*(nl*sin(2*Ml)+3*nl*cos(Ml)*sin(Ml))+el^3)/rol^2;
c=diag([0.1;0.1;0.1]);
% tao=diag([0.05;0.05;0.05]);
beta=0.05;
b=133*eye(3);
% f0=[1;1;1];
% D0=diag([0.5;0.5;0.5]);

xp=[x(7); x(8); x(9)];
xp1=[x(10); x(11); x(12)];
xpd=[x(1); x(2); x(3)];
xpd1=[x(4); x(5); x(6)];
e=xp-xpd;
e1=xp1-xpd1;
s=e1+c*e;
xpd2=[nl^2*x(1) +0*x(2) +2*nl*x(5) +2*nl^2*x(1);
      0*x(1)+nl^2*x(2)2 -*nl*x(4)-nl^2*x(2);
      -nl^2*x(3); ] ; % xpd2=[0.1;0.6;0.5];
XYZ=inv(A)*[rol+x(7); x(8); x(9)];
X=XYZ(1.1); Y=XYZ(2.1); Z=XYZ(3.1);
R=sqrt(X^2+Y^2+Z^2); % The time-dependent position radius gx1=-mu*x(7)/R^3* (1+1.5*J2*((Re/R)^2) * (1- 5*(x(9) ^2)/R^2)); The gravitational term gy1=-mu* X in X direction under % Earth J2 perturbation8)/R^3* (1+1.5*J2*((Re/R)^2) * (1- 5*(x(9) ^2)/R^2)); Gravitational term gz1=-mu*x in Y direction under % Earth J2 perturbation9)/R^3* (1+1.5*J2*((Re/R)^2) * (3- 5*(x(9) ^2)/R^2)); Gravitational term gXYZ =A*[GX1;gy1; gZ1] in Z direction under % Earth J2 perturbation gx=gxyz(1.1); gy=gxyz(2.1); gz=gxyz(3.1);

x0=[zeros(1.3),120];
c1=[0.5 0 0.5;
   0.5 0 0.5];
b=2;
node=3;
yd=[x(7) x(8) x(9)];
dyd=[x(10) x(11) x(12)];
ddyd=[2*nl*x(11) +3*nl^2*x(7) 2 -*nl*x(10) -nl^2*x(9)];

e=[x(7)-x(1) x(8)-x(2) x(9)-x(3)];
de=[x(10)-x(4) x(11)-x(5) x(12)-x(6)];

kp=0.5;
kd=0.3;
K=[kp kd]';
E=[e;de];
Fai=[0 1;-kp -kd];
A=Fai';
Q=[500 0;0 500];
P=lyap(A,Q);

W=[x(10) x(11) x(12)]';
xi=[e;de];
h=zeros(3,1);
for j=1:1:3
    h(j)=exp(-norm(xi(:,j)-c1(:,j))^2/(2*b^2));
end
Copy the code

3. Operation results









Fourth, note

Version: 2014 a