pes2014/Lineloss.asv

38 lines
1.6 KiB
Plaintext
Raw Normal View History

%% <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
function [dispLineloss dispTransloss]=Lineloss(Linei,Linej,Liner,Linex,Lineb2,Transi,Transj,Transr,Transx,Branchi,Branchg,Branchb,k0,Volt,Angle)
%format long
% fprintf('<27><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>ֵ\n');
% fprintf('<27>ڵ<EFBFBD><DAB5><EFBFBD>\t<>ڵ<EFBFBD><DAB5><EFBFBD>\t<>й<EFBFBD><D0B9><EFBFBD><EFBFBD><EFBFBD> MW\t<>޹<EFBFBD><DEB9><EFBFBD><EFBFBD><EFBFBD> MVar')
cmpVolt=Volt'.*cos(Angle')+1i*Volt'.*sin(Angle');
% cmpVolt=cmpVolt';
y0=1i*Lineb2;
%yj0=1i*standardinput(:,7);
yij=1./(Liner+1i*Linex);
%% <20><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
Sij=cmpVolt(Linei).*conj( cmpVolt(Linei) .* y0 + ( cmpVolt(Linei)- cmpVolt(Linej) ).*yij );
Sji=cmpVolt(Linej).*conj( cmpVolt(Linej) .*y0 + ( cmpVolt(Linej)- cmpVolt(Linei) ).*yij );
%Sij1==Sij2
deltLineS=Sij+Sji;
%% <20><>һ<EFBFBD>ּ<EFBFBD><D6BC>ʽbegin
ss=1*(Volt(Linei)'.^2.*abs(yij).*cos( angle(yij) ) -Volt(Linei)'.*Volt(Linej)'.*cos( Angle(Linei)' - Angle(Linej)' - angle(yij)).*abs(yij));
ss=(Volt(Linei)'.^2+Volt(Linej)'.^2).*abs(yij).*cos(angle(yij))-2*Volt(Linei)'.*Volt(Linej)'.*cos( Angle(Linei)' - Angle(Linej)').*cos( - angle(yij)).*abs(yij);
ss=Volt(Linei)'.*Volt(Linej)'.*abs(yij).*cos()
%% <20><>һ<EFBFBD>ּ<EFBFBD><D6BC>ʽend
dispLineloss=[Linei Linej real(deltLineS)*100 imag(deltLineS)*100];
%full(dispLineloss)
% dispLineloss=sortrows(dispLineloss,-3);
full(dispLineloss);
%% <20><><EFBFBD><EFBFBD><EFBFBD>DZ<EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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;
%% <20>ӵ<EFBFBD>֧·<D6A7><C2B7><EFBFBD><EFBFBD>
% û<>п<EFBFBD><D0BF>DZ<EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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);
end