应用介绍
用matlab代码实现电力潮流计算中前推回代法
% BusNo RealPower(pu) ReactivePower(pu) bdata stands for bus data
bdata=[ 1 0 0
2 1.22 0.916
3 0.032 0.024
4 0.778 0.584
5 0.673 0.595
6 1.22 0.916
7 0.0488 0.0366
8 0.956 0.717
9 0.698 0.523
10 1.265 0.949 ];
% Inbus Outbus Resistance(pu) Reactance(pu) ldata stands for line data
ldata=[ 1 2 0.04997 0.06644
2 3 0.02332 0.03310
1 4 0.04664 0.06201
1 5 0.02082 0.02768
5 6 0.02500 0.03322
1 7 0.02665 0.03543
7 8 0.02748 0.03654
1 9 0.03331 0.04430
1 10 0.02082 0.02768 ];
%Forward Backward Sweep algorithm for Radial Distribution System
%function [] = radialforwardbackwardsweep ()
c = input('Enter the central bus no.: ');
Iterations = input('Enter the no. of iterations : ');
% ldat;
% bdat;
sizl=size(ldata);
sizb=size(bdata);
totalbus=sizb(1,1); %total no. of buses
%Find Terminal Buses by using the fact that a Terminal bus is never an inbus
for i=1:totalbus-1
Terminalbuses(i,1)=0;
Intermediatebuses(i,1)=0;
end
co=0;in=0;
for i=1:sizl(1,1)
for j=1:sizl(1,1)
if (i~=j)&&(ldata(i,2)==ldata(j,1))
co=co+1;
end
end
if co==0
in=in+1;
Terminalbuses(in,1)=ldata(i,2);
else
in=in+1;
Intermediatebuses(in,1)=ldata(i,2);
end
co=0;
end
%Initializing Voltage and Current matrices
for i=1:totalbus
Busvoltage(i,1)=0;
end
for i=1:sizl(1,1)
Linecurrent(i,1)=0;
end
for i=1:totalbus-1
if(Terminalbuses(i,1)~=0)
Busvoltage(Terminalbuses(i,1),1)=1;
end
end
for i=1:Iterations
%forward sweep
t=0;int=0;
for i=1:sizl(1,1)
for j=1:totalbus-1
if ldata(i,2)== Terminalbuses(j,1)
t=t+1;
end
end
if(t~=0)
Linecurrent(i,1)=conj(complex(bdata(ldata(i,2),2),bdata(ldata(i,2),3))/Busvoltage(ldata(i,2),1));
end
t=0;
end
for i=1:sizl(1,1)
for j=1:totalbus-1
if ldata(i,2) == Intermediatebuses(j,1)
int=int+1;
end
end
if(int~=0)
Busvoltage(ldata(i,2),1)=Busvoltage(ldata(i+1,2),1)+((Linecurrent(i+1,1))*(complex(ldata(i+1,3),ldata(i+1,4))));
Linecurrent(i,1)=(conj(complex(bdata(ldata(i,2),2),bdata(ldata(i,2),3))/Busvoltage(ldata(i,2),1)))+ Linecurrent(i+1,1);
end
int=0;
end
%backward sweep
Busvoltage(c,1)=1;
for i=1:sizl(1,1)
if (ldata(i,1)==c)
Busvoltage(ldata(i,2),1)=Busvoltage(c,1)-(Linecurrent(i,1)*(complex(ldata(i,3),ldata(i,4))));
else
Busvoltage(ldata(i,2),1)=Busvoltage(ldata(i,1),1)-(Linecurrent(i,1)*(complex(ldata(i,3),ldata(i,4))));
end
end
end
display(Linecurrent);
display(Busvoltage);
% end
©版权声明:本文内容由互联网用户自发贡献,版权归原创作者所有,本站不拥有所有权,也不承担相关法律责任。如果您发现本站中有涉嫌抄袭的内容,欢迎发送邮件至: www_apollocode_net@163.com 进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。
转载请注明出处: apollocode » 前推回代法潮流计算
文件列表(部分)
名称 | 大小 | 修改日期 |
---|---|---|
backwardforward.m | 1.00 KB | 2014-02-12 |
backwardforward_powermatlab | 0.00 KB | 2017-11-10 |
发表评论 取消回复