完整版短路计算matlab程序.docx

上传人:b****4 文档编号:4336583 上传时间:2023-05-07 格式:DOCX 页数:19 大小:17.74KB
下载 相关 举报
完整版短路计算matlab程序.docx_第1页
第1页 / 共19页
完整版短路计算matlab程序.docx_第2页
第2页 / 共19页
完整版短路计算matlab程序.docx_第3页
第3页 / 共19页
完整版短路计算matlab程序.docx_第4页
第4页 / 共19页
完整版短路计算matlab程序.docx_第5页
第5页 / 共19页
完整版短路计算matlab程序.docx_第6页
第6页 / 共19页
完整版短路计算matlab程序.docx_第7页
第7页 / 共19页
完整版短路计算matlab程序.docx_第8页
第8页 / 共19页
完整版短路计算matlab程序.docx_第9页
第9页 / 共19页
完整版短路计算matlab程序.docx_第10页
第10页 / 共19页
完整版短路计算matlab程序.docx_第11页
第11页 / 共19页
完整版短路计算matlab程序.docx_第12页
第12页 / 共19页
完整版短路计算matlab程序.docx_第13页
第13页 / 共19页
完整版短路计算matlab程序.docx_第14页
第14页 / 共19页
完整版短路计算matlab程序.docx_第15页
第15页 / 共19页
完整版短路计算matlab程序.docx_第16页
第16页 / 共19页
完整版短路计算matlab程序.docx_第17页
第17页 / 共19页
完整版短路计算matlab程序.docx_第18页
第18页 / 共19页
完整版短路计算matlab程序.docx_第19页
第19页 / 共19页
亲,该文档总共19页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

完整版短路计算matlab程序.docx

《完整版短路计算matlab程序.docx》由会员分享,可在线阅读,更多相关《完整版短路计算matlab程序.docx(19页珍藏版)》请在冰点文库上搜索。

完整版短路计算matlab程序.docx

完整版短路计算matlab程序

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%PowerSystemAnalysis'Project:

MatlabProgram

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clearall

closeall

clc

a=exp(j*2*pi/3);

A=[111;

1a^2a;

1aa^2];

Sref=900e6;

Uref=300e3;

Iref=Sref/(sqrt(3)*Uref);

%datafromthedifferentdocuments:

Positive;

Negative;

Zero;

%runpowerflow:

opt=mpoption('ENFORCE_Q_LIMS',1);

results=runpf(case9gs,opt);

Vp=[results.bus(:

8).*(cos(pi/180*results.bus(:

9))+j*sin(pi/180*results.bus(:

9)))];

clc;

%Menu:

Bucle=1;

while(Bucle==1)

%Menu:

disp('________________________________________________________________________________________')

disp('%%%%%%Programtocalculatethesymetricalandunsymetricalshortcircuitfaults%%%%%%');

disp('1)Symetricalfault(threephaseshortcircuitfault)');

disp('2)Unsymetricalfault(Asinglephasetogroundfault)');

disp('0)Forexittheprogram');

obtion=input('Choosetheoptionyouwanttobecalculatedbytypingitsnumber:

','s');

disp('________________________________________________________________________________________')

%Calculationofthefault

switch(obtion)

%%

case'1'

disp('YouHavechoose:

SYMETRICALFAULT');

disp('');

disp('Pleasefollowthemenu');

%Askforthefault'sbusnumberandtheRfvalue:

disp('');

disp('*******************************************************************************')

disp('*DATA*')

disp('*******************************************************************************')

bus=input('Please,numberthebuswherethethreephaseshortcircuitfaultoccur.Busnumber:

');

%bus=bus+1;%Sincenodezeroisalsoanalyzed,thebusnumberXwillhaveaX+1index

Rf=input('PleasewritethevalueofthearcresistanceRfperphase.Rf=');

%Calculation:

If=zeros(8,1);

If(bus)=Vp(bus)/(Zpos(bus,bus)+Rf);

Vs=Vp-Zpos*If;

%ShowingtheResults:

disp('');

disp('*******************************************************************************')

disp('*RESULTS*')

disp('*******************************************************************************')

FaultCurrent=sprintf('Theshortcircuitcurrentsis:

%gA.withangle%g?

Iref*abs(If(bus)),180/pi*angle(If(bus)));

disp(FaultCurrent);

figure();

compass(If(bus),'blue');

holdon

compass(If(bus)*a,'red');

compass(If(bus)*a^2,'green');

text(-abs(If(bus)),-abs(If(bus)),'ShortCircuitcurrent');

disp('')

disp('TheVoltagesatallthebusesinthesystemare:

')

disp('_____________________________________________')

disp('BusVAngle[Degree]')

disp('_____________________________________________')

VoltageTokke=sprintf('Tokke%gV%g?

Uref*abs(Vs

(1)),180/pi*angle(Vs

(1)));disp(VoltageTokke)

VoltageVinje=sprintf('Vinje%gV%g?

Uref*abs(Vs

(2)),180/pi*angle(Vs

(2)));disp(VoltageVinje)

VoltageSonga=sprintf('Songa%gV%g?

Uref*abs(Vs(3)),180/pi*angle(Vs(3)));disp(VoltageSonga)

VoltageVemork=sprintf('Vemork%gV%g?

Uref*abs(Vs(4)),180/pi*angle(Vs(4)));disp(VoltageVemork)

VoltageRjukan=sprintf('Rjunkan%gV%g?

Uref*abs(Vs(5)),180/pi*angle(Vs(5)));disp(VoltageRjukan)

VoltageFlesaker=sprintf('Flesaker%gV%g?

Uref*abs(Vs(6)),180/pi*angle(Vs(6)));disp(VoltageFlesaker)

VoltageTveiten=sprintf('Tveiten%gV%g?

Uref*abs(Vs(7)),180/pi*angle(Vs(7)));disp(VoltageTveiten)

VoltageRod=sprintf('Rod%gV%g?

Uref*abs(Vs(8)),180/pi*angle(Vs(8)));disp(VoltageRod)

disp('_____________________________________________')

figure()

subplot(2,4,1)

compass(Vs

(1),'b');

holdon

compass(Vs

(1)*a,'r');

compass(Vs

(1)*a^2,'g');

text(-abs(Vs

(1)),-abs(Vs

(1)),'Tokke`sVoltagevectors');

subplot(2,4,2)

compass(Vs

(2));

holdon

compass(Vs

(2)*a,'r');

compass(Vs

(2)*a^2,'g');

text(-abs(Vs

(2)),-abs(Vs

(2)),'Vinje`sVoltagevectors');

subplot(2,4,3)

compass(Vs(3));

holdon

compass(Vs(3)*a,'r');

compass(Vs(3)*a^2,'g');

text(-abs(Vs(3)),-abs(Vs(3)),'Songa`sVoltagevectors');

subplot(2,4,4)

compass(Vs(4));

holdon

compass(Vs(4)*a,'r');

compass(Vs(4)*a^2,'g');

text(-abs(Vs(4)),-abs(Vs(4)),'Vemork`sVoltagevectors');

subplot(2,4,5)

compass(Vs(5));

holdon

compass(Vs(5)*a,'r');

compass(Vs(5)*a^2,'g');

text(-abs(Vs(5)),-abs(Vs(5)),'Rjukan`sVoltagevectors');

subplot(2,4,6)

compass(Vs(6));

holdon

compass(Vs(6)*a,'r');

compass(Vs(6)*a^2,'g');

text(-abs(Vs(6)),-abs(Vs(6)),'Flesaker`sVoltagevectors');

subplot(2,4,7)

compass(Vs(7));

holdon

compass(Vs(7)*a,'r');

compass(Vs(7)*a^2,'g');

text(-abs(Vs(7)),-abs(Vs(7)),'Tveiten`sVoltagevectors');

subplot(2,4,8)

compass(Vs(8));

holdon

compass(Vs(8)*a,'r');

compass(Vs(8)*a^2,'g');

text(-abs(Vs(8)),-abs(Vs(8)),'Rod`sVoltagevectors');

disp('')

disp('*******************************************************************************')

disp('*CURRENTS*')

disp('*******************************************************************************')

Q=input('Doyouwanttoknowanyofthecurrentsthroughtwoconnectedpoints?

Y/N:

','s');

k=0;

whileQ=='Y'

k=k+1;

B1(k)=input('Writethefirstbusnumber:

');

B2(k)=input('Writethesecondbusnumber:

');

ifYpos(B1(k),B2(k))==0

disp('')

disp('Warning:

*************Thereisnoconnectionbetween*************')

disp('')

k=k-1;

else

Ibranch(k)=(Vs(B1(k))-Vs(B2(k)))*(-Ypos(B1(k),B2(k)));

end

Q=input('Doyouwanttoknowanymoreofthecurrents?

Y/N:

','s');

end

disp('')

disp('*******************************************************************************')

disp('*CURRENTSRESULTS*')

disp('*******************************************************************************')

disp('')

ifk==0

disp('Therearenocurrentsresults');

end

forK=1:

k

Current=sprintf('Frombusno%gtobusno%gthecurrentflowingis:

%gA%g?

B1(K),B2(K),Iref*abs(Ibranch(K)),180/pi*angle(Ibranch(K)));disp(Current)

figure();

compass(Ibranch(K),'blue');

holdon

compass(Ibranch(K)*a,'red');

compass(Ibranch(K)*a^2,'green');

text(-abs(Ibranch(K)),-abs(Ibranch(K)),'Currentbetweenselectednodes');

end

%%

case'2'

disp('YouHavechoose:

UNSYMETRICALFAULT');

disp('Theprogramonlycalcutessinglelinetogroundfaults,itisconsidertohappeninphase"a"')

disp('')

disp('Pleasefollowthemenu');

%Askforthefault'sbusnumberandtheRfvalue:

disp('');

disp('*******************************************************************************')

disp('*DATA*')

disp('*******************************************************************************')

bus=input('Please,numberthebuswherethesinglephasetogroundfaultoccur.Busnumber:

');

%bus=bus+1;%Sincenodezeroisalsoanalyzed,thebusnumberXwillhaveaX+1index

Rf=input('PleasewritethevalueofthearcresistanceRfperphase.Rf=');

%Calculationofthecurrents:

Ifphaseground=3*Vp(bus)/(Zpos(bus,bus)+Zneg(bus,bus)+Zzero(bus,bus)+3*Rf);

%Fasea

Ifa=zeros(8,1);

Ifa(bus)=Ifphaseground;

Ifa1=Ifa/3;

Ifa2=Ifa/3;

Ifa0=Ifa/3;

fork=1:

8

Ifault=A*[Ifa0(k);Ifa1(k);Ifa2(k)];

IF(k,:

)=Ifault';

end

%Voltages;

%Fasea:

V1=Vp-Zpos*Ifa1;

V2=-Zneg*Ifa2;

V0=-Zzero*Ifa0;

fork=1:

8

U=A*[V0(k);V1(k);V2(k)]

V(k,:

)=transpose(U)

end

%ShowingtheResults:

disp('');

disp('*******************************************************************************')

disp('*RESULTS*')

disp('*******************************************************************************')

disp('')

FaultCurrent=sprintf('Theshortcircuitcurrentsis:

%gA.withangle%g?

Iref*abs(Ifa(bus)),180/pi*angle(Ifa(bus)));

disp(FaultCurrent);

figure();

compass(IF(bus,1),'red');

holdon

compass(IF(bus,2),'blue');

compass(IF(bus,3),'green');

text(-abs(IF(bus,1)),-abs(IF(bus,1)),'ShortCircuitcurrent');

disp('')

disp('TheVoltagesatallthebusesinthesystemare:

')

disp('__________________________________________________________________________________________________')

disp('BusVaVbVc');

disp('__________________________________________________________________________________________________')

VoltageTokke=sprintf('Tokke%gVand%g?

%gVand%g?

%gVand%g?

',Uref/sqrt(3)*abs(V(1,1)),180/pi*angle(V(1,1)),Uref/sqrt(3)*abs(V(1,2)),180/pi*angle(V(1,2)),Uref/sqrt(3)*abs(V(1,3)),180/pi*angle(V(1,3)));disp(VoltageTokke)

VoltageVinje=sprintf('Vinje%gVand%g?

%gVand%g?

%gVand%g?

',Uref/sqrt(3)*abs(V(1,1)),180/pi*angle(V(2,1)),Uref/sqrt(3)*abs(V(2,2)),180/pi*angle(V(2,2)),Uref/sqrt(3)*abs(V(2,3)),180/pi*angle(V(2,3)));disp(VoltageVinje)

VoltageSonga=sprintf('Songa%gVand%g?

%gVand%g?

%gVand%g?

',Uref/sqrt(3)*abs(V(3,1)),180/pi*angle(V(2,1)),Uref/sqrt(3)*abs(V(3,2)),180/pi*angle(V(3,2)),Uref/sqrt(3)*abs(V(3,3)),180/pi*angle(V(3,3)));disp(VoltageSonga)

VoltageVemork=sprintf('Vemork%gVand%g?

%gVand%g?

%gVand%g?

',Uref/sqrt(3)*abs(V(4,1)),180/pi*angle(V(2,1)),Uref/sqrt(3)*abs(V(4,2)),180/pi*angle(V(4,2)),Uref/sqrt(3)*abs(V(4,3)),180/pi*angle(V(4,3)));disp(VoltageVemork)

VoltageRjukan=sprintf('Rjukan%gVand%g?

%gVand%g?

%gVand%g?

',Uref/sqrt(3)*abs(V(5,1)),180/pi*angle(V(2,1)),Uref/sqrt(3)*abs(V(5,2)),180/pi*angle(V(5,2)),Uref/sqrt(3)*abs(V(5,3)),180/pi*angle(V(5,3)));disp(VoltageRjukan)

VoltageFlesaker=sprintf('Flesaker%gVand%g?

%gVand%g?

%gVand%g?

',Uref/sqrt(3)*abs(V(6,1)),180/pi*angle(V(2,1)),Uref/sqrt(3)*abs(V(6,2)),180/pi*angle(V(6,2)),Uref/sqrt(3)*abs(V(6,3)),180/pi*angle(V(6,3)));disp(VoltageFlesaker)

VoltageTveiten=sprintf('Tveiten%gVand%g?

%gVand%g?

%gVand%g?

',Uref/sqrt(3)*abs(V(7,1)),180/pi*angle(V(2,1)),Uref/sqrt(3)*abs(V(7,2)),180/pi*angle(V(7,2)),Uref/sqrt(3)*abs(V(7,3)),180/pi*angle(V(7,3)));disp(VoltageTveiten)

VoltageRod=spr

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 外语学习 > 韩语学习

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2