单独加了地线的计算代码,结果比较接近了。

Signed-off-by: dmy@lab <dmy@lab.com>
This commit is contained in:
dmy@lab 2015-10-08 18:10:39 +08:00
parent 2ac1e54f69
commit 209832e593
1 changed files with 29 additions and 11 deletions

View File

@ -9,18 +9,25 @@ clear
semi_lineDistance=450;%
semi_lineCount=6;%
ConductorX=[-11000,11000];%线
ConductorY=[22000,22000,];%线
ConductorY=[22000,22000,30000,30000];%线
GroundX=[-11000,11000];%线
GroundY=[30000,30000];
subconductorR=16.8;%线
phaseN=2;%
groundN=2;%线
%%
eslong=8.854187817*10^-12*1000;
eslong=1;
%
% Volt_=[1100/sqrt(3);1100/sqrt(3)*exp(1j*4/3*pi);1100/sqrt(3)*exp(1j*2/3*pi);];
Volt_=[800;-800;];
Volt_=[800;-800;0;0];
Volt=[];
for vLoop=1:phaseN
Volt=[Volt;Volt_(vLoop)*ones(semi_lineCount,1);];
end
for vLoop=1:groundN
Volt=[Volt;Volt_(vLoop+phaseN);];
end
%线线线
%
arc=2*pi/semi_lineCount;
@ -28,21 +35,21 @@ arc=2*pi/semi_lineCount;
R=semi_lineDistance/2/sin(arc/2);
%线
subconductorPos=[];
for phaseLoop=1:phaseN
for phaseLoop=1:phaseN%线
for sC=1:semi_lineCount
subconductorPos=[subconductorPos;ConductorX(phaseLoop)+1j*ConductorY(phaseLoop)+exp(1j*((sC-1)*arc+arc/2))*R];%线
%
% matchPos=[matchPos;simulationChargePos/r1*subconductorR+ConductorX(phaseLoop)+1j*ConductorY(phaseLoop)+exp(1j*((sC-1)*arc+arc/2))*R];
end
end
for grondLoop=1:groundN%线
subconductorPos=[subconductorPos;GroundX(grondLoop)+1j*GroundY(grondLoop)];%线
end
mirrorSubconductorPos=conj(subconductorPos);%线
H=diag(imag(subconductorPos));
r=eye(length(H))*subconductorR;
r=eye(length(H))*subconductorR;%线线
matSubconductor=repmat(subconductorPos,1,length(subconductorPos));
conductor2conductorDistance=abs(matSubconductor-conj(matSubconductor'));
% conductor2conductorDistance=conductor2conductorDistance-diag(diag(conductor2conductorDistance));
conductor2MirrorDistance=abs(matSubconductor-repmat(conj(mirrorSubconductorPos'),length(subconductorPos),1));
% conductor2MirrorDistance=conductor2MirrorDistance-diag(diag(conductor2MirrorDistance));
P1=1/2/pi/eslong*log(2*H./r);
P1(isnan(P1))=0;
P2=1/2/pi/eslong*log(conductor2MirrorDistance./conductor2conductorDistance);
@ -67,8 +74,15 @@ for phaseLoop=1:phaseN
end
end
end
for groundLoop=1:groundN%线线
innerMirrorPos=[innerMirrorPos;subconductorPos(groundLoop+semi_lineCount*phaseN)];%
innerMirrorQ=[innerMirrorQ;sum(QRI(groundLoop+semi_lineCount*phaseN))];
end
%
%线
vrfRelA=linspace(0,2*pi,200)';%vrf=verify
verifyPointN=200;
vrfRelA=linspace(0,2*pi,verifyPointN)';%vrf=verify
%线
vrfRelPos=exp(1j*vrfRelA)*subconductorR;
%使线线
@ -78,6 +92,9 @@ for phaseLoop=1:phaseN
vrfPos=[vrfPos;exp(1j*((sC-1)*arc+arc/2))*R+ConductorX(phaseLoop)+1j*ConductorY(phaseLoop)+vrfRelPos];
end
end
for groundLoop=1:groundN
vrfPos=[vrfPos;GroundX(groundLoop)+1j*GroundY(groundLoop)+vrfRelPos];
end
%
matVrfPos=repmat(vrfPos,1,length(innerMirrorPos));
vrf2ConductorDistance=abs(matVrfPos-repmat(conj(innerMirrorPos'),length(vrfPos),1));
@ -87,12 +104,13 @@ Pij=1/2/pi/eslong*log(vrf2MirrorDistance./vrf2ConductorDistance);
V=Pij*innerMirrorQ;
Vvalidation=[];
for phaseLoop=1:phaseN
Vvalidation=[Vvalidation;Volt_(phaseLoop)*ones(semi_lineCount*200,1);];
Vvalidation=[Vvalidation;Volt_(phaseLoop)*ones(semi_lineCount*verifyPointN,1);];
end
for groundLoop=1:groundN
Vvalidation=[Vvalidation;Volt_(groundLoop+phaseN)*ones(verifyPointN,1);];
end
error=abs((V-Vvalidation)./Vvalidation);
% error(isinf(error))=0;
error=sum(error)/length(Vvalidation)
%
display('Finished.');
%
ABCy=imag(repmat(innerMirrorPos,1,length(vrfPos)));