Sei sulla pagina 1di 1

j=15;

for i=1:35
X2(i,:)=X(j,:);
Y2(i,:)=X1(j,1);
j=j+65;
end
P=6; %Pole number of motor is 6
y11=Y2(2:35)';%[ids(267),ids(284),ids(291),ids(286),ids(249),ids(233),ids
(238),ids(324),ids(341),ids(351)];
%y12=iqs(10:50,:)';%[iqs(267),iqs(284),iqs(291),iqs(286),iqs(249),iqs(233
),iqs(238),iqs(324),iqs(341),iqs(351)];
x11=X2(2:35,:)';
%x12=Y(10:50,:)';
net1 =newlind(x11,y11); %Training neural network
%net2=newlind(x12,y12);
Y12 =sim(net1,x11); %Y is outputs of the trained network
%Y22=sim(net2,x12);
E1=y11-Y12; %Error of Y and sample outputs
%E2=y12-Y22;
SSE=sumsqr(E1); %Calculate sum squared error
%SSE1=sumsqr(E2);
Weight1=net1.IW{1,1}; %Output weight of network
%Weight2=net2.IW{1,1};
A=Weight1;
%B=Weight2;
Biase1=net1.b{1}; %Output bias of network
%Biase2=net2.b{1};
Ls1=(A(5)*A(3)-A(1)*A(6))/(A(6)*A(6));
Rs1=-A(3)/A(6); %Calculate Rs in T equivalentcircuit based on
Equation(8.13)
RrLr=A(6)/A(5);
Lr1=A(5)*Ls1*Ls1/(A(5)*Ls1-1);
Rr1=A(6)*(Ls1*Lr1-Ls1*Ls1);
%P1=-B(2);
%Rs2=-B(3)/B(6);
%Ls2=(B(5)*B(3)-B(1)*B(6))/(B(6)*B(6));
%Lr2=B(5)*(Ls2*Ls2)/(B(5)*Ls2-1);
%Rr2=B(6)*(Ls2*Lr2-(Ls2*Ls2));

Potrebbero piacerti anche