26 lines
520 B
Plaintext
26 lines
520 B
Plaintext
|
|
function Mat_G=FormG(Volt,PVi,PG,GB,AngleIJMat,indexi,indexj)
|
|||
|
|
t1=PG(PVi);
|
|||
|
|
%GP=t1;%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>P
|
|||
|
|
GP=[4.5 4.5]';
|
|||
|
|
%%<25><>·
|
|||
|
|
t1=Volt'*Volt;
|
|||
|
|
t2=real(GB).*cos(AngleIJMat)+imag(GB).*sin(AngleIJMat);
|
|||
|
|
t3=t1.*t2;
|
|||
|
|
t4=zeros(size(indexi,2),1);
|
|||
|
|
for I=1:size(indexi,2)
|
|||
|
|
t4(I)=Volt(indexi(I))*real(GB(indexi(I),indexj(I)))+t3(indexi(I),indexj(I));%<25><>·
|
|||
|
|
end
|
|||
|
|
LP=t4;
|
|||
|
|
%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Q
|
|||
|
|
t1=Volt'*Volt;
|
|||
|
|
t2=real(GB).*sin(AngleIJMat)-imag(GB).*cos(AngleIJMat);
|
|||
|
|
t3=t1.*t2;
|
|||
|
|
t4=sum(t3,2);%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Q
|
|||
|
|
GQ=t4;
|
|||
|
|
Mat_G=[
|
|||
|
|
GP;
|
|||
|
|
GQ(PVi);
|
|||
|
|
Volt';
|
|||
|
|
LP;
|
|||
|
|
];
|
|||
|
|
end
|