把PQQG作为常数加入潮流方程中。
添加了很多统计函数。
This commit is contained in:
14
Lineloss.m
14
Lineloss.m
@@ -1,8 +1,8 @@
|
||||
%% 计算线损
|
||||
function Lineloss(Linei,Linej,Liner,Linex,Lineb2,Transi,Transj,Transr,Transx,k0,Volt,Angle)
|
||||
function [dispLineloss dispTransloss]=Lineloss(Linei,Linej,Liner,Linex,Lineb2,Transi,Transj,Transr,Transx,Branchi,Branchg,Branchb,k0,Volt,Angle)
|
||||
%format long
|
||||
fprintf('功率为有名值\n');
|
||||
fprintf('节点号\t节点号\t有功损耗 MW\t无功损耗 MVar')
|
||||
% fprintf('功率为有名值\n');
|
||||
% fprintf('节点号\t节点号\t有功损耗 MW\t无功损耗 MVar')
|
||||
cmpVolt=Volt.*cos(Angle)+1i*Volt.*sin(Angle);
|
||||
cmpVolt=cmpVolt';
|
||||
y0=1i*Lineb2;
|
||||
@@ -16,13 +16,17 @@ deltLineS=Sij+Sji;
|
||||
dispLineloss=[Linei Linej real(deltLineS)*100 imag(deltLineS)*100];
|
||||
%full(dispLineloss)
|
||||
dispLineloss=sortrows(dispLineloss,-3);
|
||||
full(dispLineloss)
|
||||
full(dispLineloss);
|
||||
%% 以下是变压器损耗
|
||||
yij=1./(Transr+1i*Transx);
|
||||
Sij=cmpVolt(Transi)./k0.*conj( ( cmpVolt(Transi)./k0- cmpVolt(Transj) ).*yij );
|
||||
Sji=cmpVolt(Transj).*conj( ( cmpVolt(Transj)- cmpVolt(Transi)./k0 ).*yij );
|
||||
deltTransS=Sij+Sji;
|
||||
%% 接地支路损耗
|
||||
% 没有考虑变压器变比
|
||||
deltTransS =deltTransS+sum(cmpVolt(Branchi).*conj((cmpVolt(Branchi).*(Branchg+1j*Branchb))));
|
||||
%%
|
||||
dispTransloss=[Transi Transj real(deltTransS)*100 imag(deltTransS)*100];
|
||||
dispTransloss=sortrows(dispTransloss,-3);
|
||||
full(dispTransloss)
|
||||
full(dispTransloss);
|
||||
end
|
||||
Reference in New Issue
Block a user