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 xt (1, 1) (:, 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); % x=rbf_micishedong(t,x) mu= 398600.4e +9; rol=7400000; Re = 6378000; % Equatorial radius 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; Fl = 160.0513* PI /180; % true near point Angle ul = wl+fl; % True latitude Angle J2 = 1.08263E-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 the reference coordinate transformation matrix of spacecraft fal1 = SQRT (rol mu * * (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); % when considering the J2 perturbation change over time the location of the radius gx1 - mu * x = (7)/R ^ 3 * (1 + 1.5 * J2 * (Re/R ^ 2) * (1-5 * (x ^ 2), (9)/R ^ 2)); % earth J2 perturbation of X direction under gravity item gy1 = - mu * X (8)/R ^ 3 * (1 + 1.5 * J2 * (Re/R ^ 2) * (1-5 * (X ^ 2), (9)/R ^ 2)); % earth J2 perturbation gz1 = Y under the direction of the earth's gravity item - mu * x (9)/R ^ 3 * (1 + 1.5 * J2 * (Re/R ^ 2) * (3-5 * (x ^ 2), (9)/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)); endCopy the code

3. Operation results









Fourth, note

Complete code or simulation focus on avatar