potential/GradualMirror.m

132 lines
5.8 KiB
Matlab
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

clc
clear
%% 逐次镜像法
% [1]. 付宾兰, 邵.A., 高压输电线路分裂导线表面和周围电场的计算. 电网技术, 1984(Z1): 第83-91页.
% [2]. 韦钢与李海峰, 同杆并架多回线下方的电场强度和感应电压. 中国电力, 1999(03): 第39-42页.
% 采用文献的结果: 蒋兴良, 胡.A.舒.A., Analysis of Conductors Surface Electric Field of UHVDC Transmission Lines Based on Optimized Charge Simulation Method. 高电压技术, 2008(12): p. 2547-2551.
%%
%设置几个参数
semi_lineDistance=450;%分裂间距
semi_lineCount=6;%分裂数
ConductorX=[-11000,11000];%导线间距
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;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;
%子导线中心到导线中心的距离
R=semi_lineDistance/2/sin(arc/2);
%计算导线互电位和自电位系数
subconductorPos=[];
for phaseLoop=1:phaseN%导线
for sC=1:semi_lineCount
subconductorPos=[subconductorPos;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;%暂时认为地线和导线半径一样
matSubconductor=repmat(subconductorPos,1,length(subconductorPos));
conductor2conductorDistance=abs(matSubconductor-conj(matSubconductor'));
conductor2MirrorDistance=abs(matSubconductor-repmat(conj(mirrorSubconductorPos'),length(subconductorPos),1));
P1=1/2/pi/eslong*log(2*H./r);
P1(isnan(P1))=0;
P2=1/2/pi/eslong*log(conductor2MirrorDistance./conductor2conductorDistance);
P2(isinf(P2))=0;
Pij=P1+P2;
%求电荷
QRI=Pij\Volt;
% 计算镜像电荷
%只计算同极性和同极性对地镜像的镜像
innerMirrorPos=[];
innerMirrorQ=[];%内部镜像的电荷
for phaseLoop=1:phaseN
for sCOuter=1:semi_lineCount
for sCInner=1:semi_lineCount
if sCInner==sCOuter
innerMirrorPos=[innerMirrorPos;subconductorPos((phaseLoop-1)*semi_lineCount+sCOuter)];%先预留一个位置
innerMirrorQ=[innerMirrorQ;sum(QRI(1+(phaseLoop-1)*semi_lineCount:phaseLoop*semi_lineCount))];
continue
end
innerMirrorPos=[innerMirrorPos;subconductorPos(sCOuter+(phaseLoop-1)*semi_lineCount)+subconductorR^2/abs(subconductorPos(sCOuter+(phaseLoop-1)*semi_lineCount)-subconductorPos(sCInner+(phaseLoop-1)*semi_lineCount))*(subconductorPos(sCInner+(phaseLoop-1)*semi_lineCount)-subconductorPos(sCOuter+(phaseLoop-1)*semi_lineCount))./(abs(subconductorPos(sCInner+(phaseLoop-1)*semi_lineCount)-subconductorPos(sCOuter+(phaseLoop-1)*semi_lineCount)))];
innerMirrorQ=[innerMirrorQ;-QRI(sCInner+(phaseLoop-1)*semi_lineCount)];
end
end
end
for groundLoop=1:groundN%地线只用一根导线等效
innerMirrorPos=[innerMirrorPos;subconductorPos(groundLoop+semi_lineCount*phaseN)];%先预留一个位置
innerMirrorQ=[innerMirrorQ;sum(QRI(groundLoop+semi_lineCount*phaseN))];
end
%以下是验证部分
%选检验导线上一个角度
verifyPointN=200;
vrfRelA=linspace(0,2*pi,verifyPointN)';%vrf=verify
%计算检验点相对于子导线的位置
vrfRelPos=exp(1j*vrfRelA)*subconductorR;
%移动坐标,使验证的子导线中心和实际子导线中心重合。
vrfPos=[];
for phaseLoop=1:phaseN
for sC=1:semi_lineCount
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));
vrf2MirrorDistance=abs(matVrfPos-repmat(conj(conj(innerMirrorPos')),length(vrfPos),1));
Pij=1/2/pi/eslong*log(vrf2MirrorDistance./vrf2ConductorDistance);
%计算电压
V=Pij*innerMirrorQ;
Vvalidation=[];
for phaseLoop=1:phaseN
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=sum(error)/length(Vvalidation)
display('Finished.');
%计算场强
ABCy=imag(repmat(innerMirrorPos,1,length(vrfPos)));
ABCx=real(repmat(innerMirrorPos,1,length(vrfPos)));
y=imag(conj(matVrfPos'));
x=real(conj(matVrfPos'));
ERy=sum( ( (ABCy-y)./( (ABCy-y).^2+(ABCx-x).^2 )-(ABCy+y)./( (ABCy+y).^2+(ABCx-x).^2 ) ).*repmat(real(innerMirrorQ),1,length(vrfPos))./2/pi/eslong,1 );
EIy=sum( ( (ABCy-y)./( (ABCy-y).^2+(ABCx-x).^2 )-(ABCy+y)./( (ABCy+y).^2+(ABCx-x).^2 ) ).*repmat(imag(innerMirrorQ),1,length(vrfPos))./2/pi/eslong,1 );
ERx=sum( ( (ABCx-x)./( (ABCy-y).^2+(ABCx-x).^2 )-(ABCx-x)./( (ABCy+y).^2+(ABCx-x).^2 ) ).*repmat(real(innerMirrorQ),1,length(vrfPos))./2/pi/eslong,1 );
EIx=sum( ( (ABCx-x)./( (ABCy-y).^2+(ABCx-x).^2 )-(ABCx-x)./( (ABCy+y).^2+(ABCx-x).^2 ) ).*repmat(imag(innerMirrorQ),1,length(vrfPos))./2/pi/eslong,1 );
E2=sqrt(ERy.^2+EIy.^2+ERx.^2+EIx.^2+((ERy.^2-EIy.^2+ERx.^2-EIx.^2).^2+4*(ERy.*EIy+ERx.*EIx).^2).^.5);
E3=sqrt(ERy.^2+EIy.^2+ERx.^2+EIx.^2);
Emat=1/pi/2./eslong.*repmat(conj(innerMirrorQ'),length(vrfPos),1)./(vrf2ConductorDistance.^2).*(matVrfPos-repmat(conj(innerMirrorPos'),length(vrfPos),1))./vrf2ConductorDistance;
E=sum(Emat,2);
max(sqrt(2)*abs(E));
scatter(real(innerMirrorPos(1:length(innerMirrorPos)/1)),imag(innerMirrorPos(1:length(innerMirrorPos)/1)),[],'r');
axis equal
hold on;
scatter(real(vrfPos),imag(vrfPos),[],'k');