Major Project Report
Major Project Report
By
Alankar Arya
06EE06
Electrical and Electronics
Engineering
NITK, Surathkal
Dr. H. S. Y. Shastry
Professor
Department of Electrical and Electronics Engineering
At
The successful completion of this project gives me an opportunity to thank the people who
have directly and indirectly helped me in shaping up the final outcome of this project.
Finally we would like to thank all those who were great source of help and inspiration during
various stages of the project.
2
Contents
1. INTRODUCTION…………………………………………………...…4
2. THEORY………………………………………………………………5
5. REFERENCES………………………………………………………..12
3
Introduction
Method used for power flow analysis is Gauss-Seidel iteration method by assigning
estimated values to the unknown bus voltages and by calculating a new value for each bus
voltage from the estimated values at the other buses and the real and reactive power specified.
This process is continued till convergence takes place,
4
Theory
Power flow problem formulation
The goal of a power flow study is to obtain complete
voltage angle and magnitude information for each bus in a power system for specified load
and generator real power and voltage conditions. Once this information is known, real and
reactive power flow on each branch as well as generator reactive power output can be
analytically determined. Due to the nonlinear nature of this problem, numerical methods are
employed to obtain a solution that is within an acceptable tolerance.
The solution to the power flow problem begins with identifying the known
and unknown variables in the system. The known and unknown variables are dependent on
the type of bus.
With one exception, a bus with at least one generator connected to it is called a Generator
Bus.
The exception is one arbitrarily-selected bus that has a generator. This bus is referred to as
the Slack Bus.
In the power flow problem, it is assumed that the real power PD and reactive
power QD at each Load Bus are known. For this reason, Load Buses are also known as PQ
Buses. Therefore, for each Load Bus, both the voltage magnitude and angle are unknown and
must be solved for;
PD QD
P P
Q Q
For Generator Buses, it is assumed that the real power generated PG and the voltage
magnitude |V| is known. for each Generator Bus, the voltage angle must be solved for;
PG
P
V
For the Slack Bus, it is assumed that the voltage magnitude |V| and voltage phase Θ are
known. There are no variables that must be solved for the Slack Bus. P and Q are not known
because at the end of teration total I2X loss is compensated here.
|V| Θ
Slack
bus
5
In a system with N buses and R generators, there are then 2(N − 1) − (R − 1) unknowns.
In order to solve for the 2(N − 1) − (R − 1) unknowns, there must be 2 (N − 1 ) − ( R − 1)
equations that do not introduce any new unknown variables. The possible equations to use are
power balance equations, which can be written for real and reactive power for each bus.
where Pi is the net power injected at bus i, Gik is the real part of the element in the Ybus
corresponding to the ith row and kth column, Bik is the imaginary part of the element in the
Ybus corresponding to the ith row and kth column and θik is the difference in voltage angle
between the ith and kth buses.
Equations included are the real and reactive power balance equations for each Load Bus and
the real power balance equation for each Generator Bus.
Only the real power balance equation is written for a Generator Bus because the net reactive
power injected is not assumed to be known and therefore including the reactive power
balance equation would result in an additional unknown variable.
For similar reasons, there are no equations written for the Slack Bus.
6
Gauss-Seidel Method for power flow analysis
For preliminary understanding of the method, assume that all buses are of the P-Q
type except the slack bus.Since the slack bus voltage is completely specified, there is no
iteration involved for this bus. For all buses except slack bus. Bus admittance matrix Ybus is
calculated initially, then for;
S *p n
Ip
V *
Y
q 1
pq Vq , p = 1, 2… n; p s
p
1 S *p n
Vp * ( * Y pqVq ) p = 1, 2… n; p s
Y pp Vp q 1& p q
1 P jQ
V1( k 1) * ( 1 ( k )* 1 Y12V2( k ) Y13V3( k ) ............ Y1nVn( k ) )
Y11 V1
1 P jQ
V2( k 1) * ( 2 ( k )* 2 Y21V1( k 1) Y23V3( k ) .......... .. Y2 nVn( k ) )
Y22 V2
1 Pp jQ p
V p( k 1) *( Y p1V p( k 1) ...... Y pp 1V p(k11) Y pp 1V p(k1) ...... Y pnVn( k ) )
Y pp V p( k )*
.
.
.
7
.
1 P jQ
Vn( k 1) * ( n ( k )* n Yn1V1( k 1) YnpV p( k 1) ............ Ynn1Vn(k11) )
Ynn Vn
There is no iteration defined for the equation corresponding to the slack bus as its voltage is
known.
At a PV bus the computions are different since reactive power Q is not specified at such a
sp
bus. The voltage magnitude must be held at the value V p , because of equipment limitations
max min sp cal
Qp can vary between Q p and Q p , At the PV bus Q p is replaced by Q p
cal *
Where Q p = Im(Vp I p ) , latest available value of the voltages are used. With this value of
Q pcal , V p( k 1) is computed. Since the voltage at the bus must be maintained at |Vp|sp, the real
and imaginary parts of Vp(k+1) are adjusted to satisfy this condition while retaining the angle as
follows:
f p( k 1)
Define p
( k 1)
tan 1 ( k 1)
ep
1)
V p((knew ) | V p |
sp
cos p( k 1) j | V p | sp sin p( k 1)
These values are used in subsequent computations. To take into account the limits on the
reactive power the following logic is used:
cal max cal max cal min cal min
If Q p > Q p , set Q p = Q p . If Q p < Q p , set Q p = Q p . Then do the
computation as for a PQ bus. There is no adjustment of Vp(k+1) in that case. If the subsequent
cal
computation, Q p does not fall within the available reactive power, the bus is switched back
to a PV bus.
The whole iteration process takes place till the convergence takes place, given by the
condition
Max|Vp(k+1) – Vp(k) | < Cv
After the computations have converged, line flows and slack bus power are calculated as
follows:
Let the line connecting bus p to bus q have a series admittance of ypq and total line
charging admittance of y’pq. Then the current in the line is given by
The line loss in line p-q is given by the algebraic sum of Ppq + j Qpq and Pqp + j Qqp.
8
The slack bus power is calculated by summing the flows on the lines terminating at the slack
bus.
Assume initial values for bus voltages V0p p = 1,2,3….n ; p ≠s; slack bus voltage specified
yes
P = p +1
Is p
No =s
Test for PQ or PV
PQ bus bus
PV bus
Compute Qcal
No
Is Qcalp> Is Qcalp<
Qmaxp yes yes
Qminp
Compute Vk+1 p
cal max cal min
Set Q = Q p p
Set Q = Qp p
Adjust Vk+1 p
Replace Qspp= Qcalp
Compute Vk+1 p
Replace Vkp by Vk+1p
sto
No
Advance bus p
count P = p +1 Is p
>=n Print
9
yes
for q = 1:n,
nextvoltage(p)= nextvoltage(p)-expm1(Ybus(p,p))*(Ybus(p,q)*initialvol(q));
end
busvoltage(p)= nextvoltage(p);
else
for q = 1:n,
Qcal(p) =Qcal(p)+ conj(Ybus(p,q))*conj(busvoltage(q));
end
Qcal(p)=Qcal(p)*imag(busvoltage(p));
if ( Qcal(p)>Qmaxa(p) )
Qcal(p)=Qmaxa(p);
Qa(p)=Qcal(p);
nextvoltage(p)= expm1(Ybus(p,p))*(Pa(p)-Qa(p))/conj(initialvol(p));
initialvol(p) = busvoltage(p);
10
for q = 1:n,
nextvoltage(p)= nextvoltage(p)-expm1(Ybus(p,p))*(Ybus(p,q)*initialvol(q)
end
busvoltage(p)= nextvoltage(p);
else
if (Qcal(p)<Qmina(p) )
Qcal(p)=Qmina(p);
Qa(p)=Qcal(p);
nextvoltage(p)= expm1(Ybus(p,p))*(Pa(p)-Qa(p))/conj(initialvol(p));
initialvol(p) = busvoltage(p);
for q=1:n,
nextvoltage(p)= nextvoltage(p)-expm1(Ybus(p,p))*(Ybus(p,q)*initialvol(q));
end
busvoltage(p)= nextvoltage(p);
else
initialvol(p) = busvoltage(p);
nextvoltage(p)= expm1(Ybus(p,p))*(Pa(p)-Qa(p))/conj(initialvol(p));
for q=1:n,
nextvoltage(p)= nextvoltage(p)-expm1(Ybus(p,p))*(Ybus(p,q)*initialvol(q));
end
theta = angle(nextvoltage(p));
busvoltage(p)=complex(abs(nextvoltage(p)*cos(theta)),
(abs(nextvoltage(p)*sin(theta))));
end
end
end
p = p + 1;
end % while ends here
for i = 1:n,
deltaV(i) = busvoltage(i)-initialvol(i);
end
if (max(deltaV)<0.01)
for i = 2:n,
d = 0;
e = 0;
for j = 2:n,
if((i~=1) & (j~=1))
linecurrent(i,j) = (busvoltage(i)-busvoltage(j))*Y1(i,j)+busvoltage(i)*(linecharging(i,j)/2);
Pbus(i,i)= real(busvoltage(i)*((conj(busvoltage(i)-busvoltage(j))*conj(Ybus(i,j)))+(conj(busvoltage(i))*conj(linecharging(i,j)/2))));
Qbus(i,i)= imag(busvoltage(i)*((conj(busvoltage(i)-busvoltage(j))*conj(Ybus(i,j)))+(conj(busvoltage(i))*conj(linecharging(i,j)/2))));
d = d + Pbus(1,j) + Pbus(j,1);
e = e + Qbus(1,j) + Qbus(j,1);
end
end
end
Pbus(1,1) = d;
Qbus(1,1) = e;
Voltage = (busvoltage);
Voltage
Angle = (angle(busvoltage));
Angle
break;
else
k = k + 1;
end
end
11
References
1. M. Pai; Computer Techniques in Power System Analysis.
3. www.wikipedia.com
12
13