From 44fbced19450cb306d2e7c75976c39b25ab7db7d Mon Sep 17 00:00:00 2001 From: "dmy@lab" Date: Fri, 9 Oct 2015 10:51:34 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8A=8A=E6=A8=A1=E6=8B=9F=E7=94=B5=E8=8D=B7?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E5=9C=B0=E7=BA=BF=E5=8A=A0=E4=B8=8A=E4=BA=86?= =?UTF-8?q?=202.=E5=88=9D=E5=A7=8B=E5=8D=8A=E5=BE=84=E5=A4=AA=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E6=95=B0=E5=80=BC=E6=80=A7=E5=B7=AE=EF=BC=8C=E6=8E=A5?= =?UTF-8?q?=E8=BF=91=E5=A5=87=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dmy@lab --- SelfAdaptSimulation.m | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/SelfAdaptSimulation.m b/SelfAdaptSimulation.m index 94d7431..6a81524 100644 --- a/SelfAdaptSimulation.m +++ b/SelfAdaptSimulation.m @@ -10,17 +10,23 @@ semi_lineDistance=450;% semi_lineCount=6;%分裂数 ConductorX=[-11000,11000];%导线间距 ConductorY=[22000,22000,];%导线距地高度 -CSM_N=40;%每一个子导线的模拟电荷数 +GroundX=[-11000,11000];%地线坐标 +GroundY=[30000,30000]; +CSM_N=50;%每一个子导线的模拟电荷数 subconductorR=16.8;%子导线半径 phaseN=2;%相数,单回三相 +groundN=2;%地线数量 %% %设置电压 % 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(CSM_N*semi_lineCount,1);]; end +for vLoop=1:groundN + Volt=[Volt;Volt_(vLoop+phaseN)*ones(CSM_N,1);]; +end %按分裂数和分裂导线间距布置单相线路导线 %用极坐标 arc=2*pi/semi_lineCount; @@ -28,7 +34,7 @@ CSM_arc=2*pi/CSM_N; %子导线中心到导线中心的距离 R=semi_lineDistance/2/sin(arc/2); %计算模拟电荷的位置 -r1=5; +r1=8; error=10000; step=1/10; maxLoop=round((subconductorR-r1)/step); @@ -46,6 +52,14 @@ for Loop=1:maxLoop; matchPos=[matchPos;simulationChargePos/r1*subconductorR+ConductorX(phaseLoop)+1j*ConductorY(phaseLoop)+exp(1j*((sC-1)*arc+arc/2))*R]; end end + %地线的 + for groundLoop=1:groundN + %simulationChargeABCPos=[simulationChargeABCPos;simulationChargePos+GroundX(phaseLoop)+1j*GroundY(phaseLoop)];%移动到子导线中心 + simulationChargeABCPos=[simulationChargeABCPos;simulationChargePos+GroundX(groundLoop)+1j*GroundY(groundLoop)];%移动到子导线中心 + %同时计算匹配点的位置 + matchPos=[matchPos;simulationChargePos/r1*subconductorR+GroundX(groundLoop)+1j*GroundY(groundLoop)]; +% matchPos=[matchPos;GroundX(groundLoop)+1j*GroundY(groundLoop)]; + end % simulationChargeAPos=simulationChargePos+ConductorX(1)+1j*ConductorY(1); % simulationChargeBPos=simulationChargePos+ConductorX(2)+1j*ConductorY(2); % simulationChargePos=simulationChargeABCPos; @@ -61,6 +75,7 @@ for Loop=1:maxLoop; mirrorCharge2MatchPointDistance=abs(matMirrorChargePos-matMatchPos); % conductor2MirrorDistance=abs(conductor2MirrorDistance-diag(diag(conductor2MirrorDistance))); eslong=8.854187817*10^-12*1000; + eslong=1; % P1=1/2/pi/eslong*log(2*H./r); % P1(isnan(P1))=0; P2=1/2/pi/eslong*log(mirrorCharge2MatchPointDistance./CMS2MatchPointDistance); @@ -80,6 +95,9 @@ for Loop=1:maxLoop; 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(simulationChargeABCPos)); vrf2ConductorDistance=abs(matVrfPos-repmat(conj(simulationChargeABCPos'),length(vrfPos),1)); @@ -91,11 +109,15 @@ for Loop=1:maxLoop; for phaseLoop=1:phaseN Vvalidation=[Vvalidation;Volt_(phaseLoop)*ones(semi_lineCount*200,1);]; end + for groundLoop=1:groundN + Vvalidation=[Vvalidation;Volt_(groundLoop+phaseN)*ones(200,1);]; + end error=abs((V-Vvalidation)./Vvalidation); + error=[error(1:phaseN*semi_lineCount*200);abs(V(phaseN*semi_lineCount*200+1:end)-Vvalidation(phaseN*semi_lineCount*200+1:end))]; % error(isinf(error))=0; error=sum(error)/length(Vvalidation) %以下是验证部分 - if error<0.001 + if error<0.01 break; end r1=r1+1*step;