%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sample bus complex powers (P & Q) in MW %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
P1 = 7.5; P2 = 6; P3 = 4; P4 = 2; P5 = 1.5; P6 = 1; % IEEE source simulation purpose
Q1 = 6.61; Q2 = 3; Q3 = 2.3; Q4 = 0.45; Q5 = 0.25; Q6 = 0.5;
% Complex power at each node
C1 = P1+i*Q1; C2 = P2+i*Q2; C3 = P3+i*Q3; C4 = P4+i*Q4; C5 = P5+i*Q5;
C6 = P6+i*Q6;
%%%%%%%%%%%%%%%%%%%%%%%%
% Bus voltages in Volts %
%%%%%%%%%%%%%%%%%%%%%%%%
V1 = 480; V2 = 480*(0.6996-0.0923i); V3= 480*(0.1624-0.0915i); V4 = 480*(0.0051-0.0152i); V5 = 480*(0.0735+0.0425i); V6 = 480*(0.1172-0.1123i); % Distribution network is assumed to be local
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Branch Resistance or Tie bus resistance in Ohm %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
R1 = 05; R2 = 0.1; R3 = 0.15; R4 = 0.1; R5 = 0.1; R6 =0.15;
Res = [R2, R3, R4, R5, R6];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Equivelent Current Injection %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I1 = (P1 + j*Q1)'/V1;
I2 = (P2 + j*Q2)'/V2;
I3 = (P3 + j*Q3)'/V3;
I4 = (P4 + j*Q4)'/V4;
I5 = (P5 + j*Q5)'/V5;
I6 = (P6 + j*Q6)'/V6;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Current Injection Matrix %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I = [I2; I3; I4; I5; I6];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bus injection to branch current (BIBC) Matrix %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
R = [1 1 1 1 1; 0 1 1 1 1; 0 0 1 1 0; 0 0 0 1 0; 0 0 0 0 1];
% Bus Relation Matrix
B = R * I;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Power Loss in the system %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PLOSS = Res'.* real(B);
bus = 2:1:6;
bar(bus,PLOSS,0.5,'g')
title('\bf TotalPower loss in each bus')
xlabel('Bus Number')
ylabel('Power loss')
No comments:
Post a Comment