Professional Documents
Culture Documents
Title: Load Flow Analysis using Gauss-Seidel and Newton- Raphson Methods
Introduction:
To be familiar with Load Flow Analysis using Gauss-Seidel and Newton-Raphson methods
To calculate the power system parameters generally nodal analysis is used. In the subject node if
Kirchhoff's current law is applied then the following equation would be achieved;
For example let us consider a system having two nodes node 'i' and 'j'.
In bus-i total injected current is Ii, in bus-j Ij and in bus-k total injected current is Ik. Based on
Kirchhoff's current law;
If the impedances are converted into admittance values then the equation would become;
Slack bus:
Slack bus is the special generator bus which generally serves as the reference of the system.
In a slack bus the voltage magnitude and the angle are known parameters. Where active and
reactive power are unknown and can be changed based on the system requirement.
Gauss-Seidel Method:
In a three bus system if there is one slack, one PQ and one PV bus then the calculation can be
started from the PQ bus. If in the 1 bus 'i' is slack, 'j' is PV and 'k' is a PQ bus then, the
apparent power S3 can be represented;
In Gauss-Seidel method the unknown values are calculated from the known values in
iterations. The unknown parameters in first iteration is assumed then using the assumed value
other unknown values are calculated in multiple iterations until the difference between two
consecutive values (in-in-1) reach within a tolerant value.
Newton-Raphson Method:
In a three bus system if there is one slack, one PQ and one PV bus then the calculation can be
started from the PQ bus. If in the 1 bus 'i' is slack, 'j' is PV and 'k' is a PQ bus then, the
apparent power S3 can be represented. (See Equation Number 8, 9 and 10 from Gauss-Siedel
Method)
Now, the active and reactive power on the bus ‘k’ can be calculated as;
(13)
Newton-Raphson method uses the above equation and known active and reactive power in
iterations the following set of equations is prepared;
(14)
Where,
(15)
(16)
The calculated values are initially considered equal to the specified values and used to
calculate the unknown voltages and angles for the first time. After first iteration the new
calculated values are chosen.
Pre-Lab Homework:
Students must study load flow analysis and iterative solution of non-linear equations using
Gauss-Seidel and Newton-Raphson methods. Student also must be familiar with
MATLAB/Simulink/SimPowerSystem software before performing the experiment.
Software Requirement:
• PSA Lab Software
• MATLAB
Mathematical Problem:
For the following diagram reactances are given in per-unit on a 100 MVA base.
Experimental Procedure:
Reference(s):
[1] Stevenson, W. D. (1982). Elements of power system analysis. New York: McGraw-Hill.
base_power = 100;
Z12 = j*0.5;
Z13 = j*0.2;
Z23 = j*0.25;
Y12 = -1/Z12;
Y13 = -1/Z13;
Y23 = -1/Z23;
Y21 = Y12;
Y31 = Y13;
Y32 = Y23;
Y11 = -(Y12+Y13);
Y22 = -(Y12+Y23);
Y33 = -(Y23+Y13);
p_bus2 = 60/base_power;
p_bus3 = -80/base_power;
q_bus3 = -60/base_power;
voltage_bus1 = bus1(1,1)+j*bus1(1,2);
voltage_bus2 = bus2(1,1)*(1+j*0);
voltage_bus3 = 1+j*0;
V2 = [];
V3 = [];
% % % itr = 10;
% % %
% % % for i = 1:itr;
% % % q_bus2(i) = -
imag(conj(voltage_bus2)*(Y21*voltage_bus1+Y22*voltage_bus2+Y23*voltage_bus3));
% % % V2(i) = 1/Y22*((p_bus2-
j*(q_bus2(i))/conj(voltage_bus2))-Y21*voltage_bus1-Y23*voltage_bus3);
% % % V2_new(i) = V2(i)/abs(V2(i))*abs(voltage_bus2);
% % % V3(i) = 1/Y33*((p_bus3-j*(q_bus3)/conj(voltage_bus3))-
Y31*voltage_bus1-Y23*V2_new(i));
% % % voltage_bus3 = V3(i);
% % % voltage_bus2 = V2_new(i);
% % % end
%----------------------------------------------------------------------------------
--------------------------------------------------
% P2 =
abs(Y21*voltage_bus1*voltage_bus2)*cos(angle(Y21)+angle(voltage_bus1)-
theta2)+abs(Y22*(voltage_bus2)^2)*cos(Y22)+abs(Y23*voltage_bus2*volt3)*cos(angle(Y2
3)+theta3-theta2);
% P3 = abs(Y31*voltage_bus1*volt3)*cos(angle(Y31)+angle(voltage_bus1)-
theta3)+abs(Y33*(volt3)^2)*cos(Y33)+abs(Y23*voltage_bus2*volt3)*cos(angle(Y23)+thet
a2-theta3);
% Q3 =-abs(Y31*voltage_bus1*volt3)*sin(angle(Y31)+angle(voltage_bus1)-
theta3)-abs(Y33*(volt3)^2)*sin(Y33)-
abs(Y23*voltage_bus2*volt3)*sin(angle(Y23)+theta2-theta3);
% syms theta2
% f1(theta2) =
abs(Y21*voltage_bus1*voltage_bus2)*cos(angle(Y21)+angle(voltage_bus1)-
theta2)+abs(Y22*(voltage_bus2)^2)*cos(Y22)+abs(Y23*voltage_bus2*voltage_bus3)*cos(a
ngle(Y23)+angle(voltage_bus3)-theta2);
% diff(f1);
%
% syms theta2
% f2(theta2) =
abs(Y31*voltage_bus1*voltage_bus3)*cos(angle(Y31)+angle(voltage_bus1)-
angle(voltage_bus3))+abs(Y33*(voltage_bus3)^2)*cos(Y33)+abs(Y23*voltage_bus2*voltag
e_bus3)*cos(angle(Y23)+theta2-angle(voltage_bus3));
% diff(f2);
%
% syms theta2
% f3(theta2) = -
abs(Y31*voltage_bus1*voltage_bus3)*sin(angle(Y31)+angle(voltage_bus1)-
angle(voltage_bus3))-abs(Y33*(voltage_bus3)^2)*sin(Y33)-
abs(Y23*voltage_bus2*voltage_bus3)*sin(angle(Y23)+theta2-angle(voltage_bus3));
% diff(f3);
%
%
% syms theta3
% f4(theta3) =
abs(Y21*voltage_bus1*voltage_bus2)*cos(angle(Y21)+angle(voltage_bus1)-
angle(voltage_bus2))+abs(Y22*(voltage_bus2)^2)*cos(Y22)+abs(Y23*voltage_bus2*voltag
e_bus3)*cos(angle(Y23)+theta3-angle(voltage_bus2));
% diff(f4);
%
% syms theta3
% f5(theta3) =
abs(Y31*voltage_bus1*voltage_bus3)*cos(angle(Y31)+angle(voltage_bus1)-
theta3)+abs(Y33*(voltage_bus3)^2)*cos(Y33)+abs(Y23*voltage_bus2*voltage_bus3)*cos(a
ngle(Y23)+angle(voltage_bus2)-theta3);
% diff(f5);
%
% syms theta3
% f6(theta3) = -
abs(Y31*voltage_bus1*voltage_bus3)*sin(angle(Y31)+angle(voltage_bus1)-theta3)-
abs(Y33*(voltage_bus3)^2)*sin(Y33)-
abs(Y23*voltage_bus2*voltage_bus3)*sin(angle(Y23)+angle(voltage_bus2)-theta3);
% diff(f6);
syms volt3
f7(volt3) =
abs(Y21*voltage_bus1*voltage_bus2)*cos(angle(Y21)+angle(voltage_bus1)-
angle(voltage_bus2))+abs(Y22*(voltage_bus2)^2)*cos(Y22)+abs(Y23*voltage_bus2*volt3)
*cos(angle(Y23)+angle(voltage_bus3)-angle(voltage_bus2));
diff(f7);
syms volt3
f8(volt3) = abs(Y31*voltage_bus1*volt3)*cos(angle(Y31)+angle(voltage_bus1)-
angle(voltage_bus3))+abs(Y33*(volt3)^2)*cos(Y33)+abs(Y23*voltage_bus2*volt3)*cos(an
gle(Y23)+angle(voltage_bus2)-angle(voltage_bus3));
syms volt3
f9(volt3) = -abs(Y31*voltage_bus1*volt3)*sin(angle(Y31)+angle(voltage_bus1)-
angle(voltage_bus3))-abs(Y33*(volt3)^2)*sin(Y33)-
abs(Y23*voltage_bus2*volt3)*sin(angle(Y23)+angle(voltage_bus2)-
angle(voltage_bus3));
diff(f9);
delp2 = p_bus2 - 0;
delp3 = p_bus3 - 0;
delq3 = q_bus3 - 0;
% j1 = diff(f1);
% j2 = diff(f2);
% j3 = diff(f3);
%
% j4 = diff(f4);
% j5 = diff(f5);
% j6 = diff(f6);
volt3 = 1;
theta2 = 0;
theta3 = 0;
% For Plotting
theta2_new = [];
theta3_new = [];
volt3_new = [];
Q2_calc_new = [];
P2_calc_new = [];
Q3_calc_new = [];
P3_calc_new = [];
%------------------------------------------
j1 = -6*sin(theta2 - pi/2);
j2 = -4*sin(pi/2 + theta2);
j3 = -4*cos(pi/2 + theta2);
j4 = -4*sin(pi/2 + theta3);
j5 = -9*sin(theta3 - pi/2);
j6 = 9*cos(theta3 - pi/2);
% j7 = (4967757600021511*sign(volt3))/20282409603651670423947251286016;
j7 = abs(Y23*voltage_bus2)*cos(angle(Y23)+angle(voltage_bus3)-angle(voltage_bus2));
% j8 = (44709818400193599*sign(volt3))/81129638414606681695789005144064 +
(80184916214140221*abs(volt3)*sign(volt3))/1099511627776;
j8 = abs(Y31*voltage_bus1)*cos(pi/2-
theta3)+2*abs(volt3)*cos(angle(Y33))+abs(Y32*voltage_bus2)*cos(pi/2-theta3);
% j9 = - 9*sign(volt3) +
(abs(volt3)*sign(volt3)*80184913771710951*i)/1099511627776;
j9 = -abs(Y31*voltage_bus1)*sin(pi/2-theta3)+2*abs(volt3)*sin(angle(Y33))-
abs(Y32*voltage_bus2)*sin(pi/2-theta3);
del_v3 = [];
del_th2 = [];
del_th3 = [];
del_th2(i) = delp2*inv_jacob(1,1)+delp3*inv_jacob(1,2)+delq3*inv_jacob(1,3);
del_th3(i) = delp2*inv_jacob(2,1)+delp3*inv_jacob(2,2)+delq3*inv_jacob(2,3);
del_v3(i) = delp2*inv_jacob(3,1)+delp3*inv_jacob(3,2)+delq3*inv_jacob(3,3);
theta2 = theta2+del_th2(i);
theta3 = theta3+del_th3(i);
volt3 = volt3+del_v3(i);
theta2_new(i) = theta2;
theta3_new(i) = theta3;
volt3_new(i) = volt3;
%
P2_calc =
abs(Y21*voltage_bus1*voltage_bus2)*cos(angle(Y21)+angle(voltage_bus1)-theta2) +
abs(Y22*(voltage_bus2)^2)*cos(angle(Y22)) +
abs(Y23*voltage_bus2*volt3)*cos(angle(Y23)+theta3-theta2);
P3_calc = abs(Y31*voltage_bus1*volt3)*cos(angle(Y31)+angle(voltage_bus1)-
theta3) + abs(Y33*(volt3)^2)*cos(angle(Y33)) +
abs(Y23*voltage_bus2*volt3)*cos(angle(Y23)+theta2-theta3);
Q3_calc = abs(Y31*voltage_bus1*volt3)*sin(angle(Y31)+angle(voltage_bus1)-
theta3) + abs(Y33*(volt3)^2)*sin(angle(Y33)) +
abs(Y23*voltage_bus2*volt3)*sin(angle(Y23)+theta2-theta3);
%
P2_calc_new(i) = P2_calc;
Q3_calc_new(i) = P3_calc;
P3_calc_new(i) = Q3_calc;
%
delp2 = p_bus2 - P2_calc;
delp3 = p_bus3 - P3_calc;
delq3 = q_bus3 - Q3_calc;
Q2_calc = abs((P2_calc/(cos(theta2))-P2_calc)/(j*1));
Q2_calc_new(i) = Q2_calc;
end
% plot(theta2_new)
% plot(theta3_new)
% plot(volt3_new)
% plot(Q2_calc_new(i))
% delp2
% delp3
% delq3
% P2_calc
% P3_calc
% Q3_calc
%--------------------------------------------------------------------------