Professional Documents
Culture Documents
No :
Date:
Newton Raphson Method
Aim:
To calculate various line flows of an interconnected power system using the Newton
Raphson method of power flow analysis and determine the voltage and load angle at all buses
in the system.
Software Used:
Matlab Software
Theory:
Load flow analysis is performed on a symmentrical steady state operating condition of
power system under normal mode of operation
The solution of load flow gives bus voltages and line/transformer power flow for a given load
condition.
This information is essential for long term planning and operational planning.
Long Term Planning
Load flow analysis helps in investigating the effectiveness of alternative plans and choosing
the bus best pan for system expansion to meet the projected operating state
Operational planning
It helps in choosing the best unit commitment plan and generation schedules to run the plan
and generation schedules to run the system efficiently for the next days load condition without
violating the bus voltages and line flow operating limits.
Steps for load flow study:
The following work has to be performed for a load flow study
= |Vi||Vj||Yij|<(ij-i+j)
Equating real and imaginary part
Pical= |Vi||Vj||Yij|cos(ij-i+j)
Qical=- |Vi||Vj||Yij|sin(ij-i+j)
The quation constitute a set of non linear algebraic equation in terms of the independent variables V
in p.u. and phase angle in radians
Pi(,V) Pii=0
Qi(,V) Qii=0
For every bus whose bus phase angle is unknown include the respective real power
balance equation
For every bus whose bus voltage magnitude V is unknown, include respect power balance
equation.
Algorithm:
Step 1:
Formulate Y bus matrix
Step 2:
Assume flat start for starting voltage solution
i=0, for i=1,2,3, ...N
|Vi|= 1.0,
|Vi|=|Vi|
Step 3:
For load bus Calculate Pi cal and Qi cal
Pical= |Vi||Vj||Yij|cos(ij-i+j)
Qical=- |Vi||Vj||Yij|sin(ij-i+j)
Step 4:
For PV buses, check for Q limit violation
Step 5:
Compute mismatch vector using
Pi =Pi(spec) Pi cal
Qi = Qi(spec) Qi cal
Step 6:
Pi (max) = max | Pi|;
i=M+1,....N
Step 7:
Compute Jacobian matrix using
J=
Pi/
Qi/ |V|
Qi/
Qi/ |V|
J1
J2
J3
J4
Step 8 :
Obtain state correction vector
P
=
[ J ]-1
|V|
Step 9:
Update state vector using
V new = V old + V
new = old +
Step 10:
This procedure is continued until
|P|< and |Q| <, otherwise go to step 3.
Start
Read linear data, bus data tolerance for P and Q
Compute Y bus
Initial voltage state vector
Bus No i=1
I=i+1
Pical=
Qical=-
Calculate
|Vi||Vj||Yij|cos(ij-i+j)
|Vi||Vj||Yij|sin(ij-i+j)
Is
I refer to
Pv bus
Calculate
Pi =Pi(spec) Pi cal
Check for
Q limit
If Qi cal > Qi (max)
Qi(spec) = Qi(max)
Is i< N
Form J=
Pi/
Qi/
Qi/ |V|
Qi/ |V|
P
=
-1
[J]
|V|
Check
For tolerance
|P|< and |Q| <,
Iter=iter+1
Calculate line flow
Slack bus power
Total line losses
Reactive power generator at pv bus
Print
Stop
Manual Calculation:
Step 1:
Y=
Y11
Y21
Y31
Y12
Y22
Y32
Y13
Y23
Y33
Y=
(1/J0.18)+(1/j0.18)
-(1/J0.18)
-(1/J0.18)
-(1/J0.18)
(1/J0.18)+(1/j0.18)
-(1/J0.18)
11.1111<-1.57
5.5556<1.57
5.5556<1.57
-(1/J0.18)
-(1/J0.18)
(1/J0.18)+(1/j0.18)
5.5556<1.57
11.1111<-1.57
5.5556<1.57
5.5556<1.57
5.5556<1.57
11.1111<-1.57
Step 2
Initial Bus Voltages
V1 old = 1.03V
1=0
Slackbus
Bus No
V2 old=1.02V
=0
PV bus
Bus No 2
V3old=1.0V
=0
PQ Bus
bus No 3
Step 3:
Check for Q limit Violation
Q2cal = -{|V2||V1||Y21|sin(21-2+1)+|V2|2|Y22|sin (22)+|V2||V3||Y23|sin(21-2+3)}
= -{ 1.02x1.03x5.5556xsin(1.57) + 1.022sin(-1.57) + 1.02x1.0x5.5556xsin(1.57)
= -{ 5.8367-11.1111+5.6667} = 0.05658
Step 4:
Calculate |P| and |Q|
P2(spec) = PG2- PD2 = 1.5-0=1.5
P3(spec) = PG3-PD3 = 0-2 = -2
Q2(spec)=QG2 QD2=0Q3(spec) = QG3-QD3=0-0.5 = -0.5
P2 cal = {|V2||V1||Y21|cos(21-2+1)+|V2|2|Y22|cos (22)+|V2||V3||Y23|cos(21-2+3)}
={1.02x1.03x5.5556xcos(1.57) + (1.02)2x11.1111xcos(-1.57)+ 1.02x1.0x5.5556xcos(1.57)}
={4.6479x10-3+9.2055x10-3+4.5126x10-3} = 0.018366
P3 cal = {|V3||V1||Y31|cos(31-3+1)+ |V3||V2||Y32|cos(32-3+2)+|V3|2|Y33|cos (33)}
={1x1.03x5.5556xcos(1.57)+1x1.02x5.5556xcos(1.57)+1x1x11.1111xcos(-1.57)}
={4.5568x10-3+4.5126x10-3+8.8841x10-3} = 0.017954
Q3 cal = -({|V3||V1||Y31|sin(31-3+1)+ |V3||V2||Y32|sin(32-3+2)+|V3|2|Y33|sin (33)}
=-{(1.0x1.03x5.5556xsin(1.57)+1.0x1.02xsin(1.57)+1x1x11.1111xsin(-1.57)}
=-{5.7223+5.6667-11.1111} = -0.2779
P2 =P2(spec) P2 cal=1.5 0.018366 =1.481634
P3 =Pi(spec) P3 cal = -2-0.017954=-2.017954
Q3 = Qi(spec) Q3 cal=-0.5-(-0.2779)=-0.2221
Step 6
Step7:
Compute Jacobian matrix
J=
Pi/
Qi/
Pi/ |V|
Qi/ |V|
J1
J2
J3
J4
The diagonal and off diagonal elements of J1 are
Pi/ i= |Vi||Vj||Yij|sin(ij-i+j)
Pi/ j = -|Vi||Vj||Yij|sin(ij-i+j) for ij
P2 cal = {|V2||V1||Y21|cos(21-2+1)+|V2|2|Y22|cos (22)+|V2||V3||Y23|cos(21-2+3)}
P2/ 2={|V2||V1||Y21|sin(21-2+1)+|V2||V3||Y23|sin(23-2+3)}
={1.02x1.03x5.5556xsin(1.57) + 1.02x1x5.5556xsin(1.57)}
={5.8367+5.6667}
= 11.5034
P2/ 3=-{|V2||V3||Y23|sin(23-2+3)}
=-{1.02x1.03x5.5556xsin(1.57)
=-{5.8367}
P3 cal = {|V3||V1||Y31|cos(31-3+1)+ |V3||V2||Y32|cos(32-3+2)+|V3|2|Y33|cos (33)}
P3/ 2=-{|V3||V2||Y32|sin(32-3+2)}
=-{1.0x1.02x5.5556xsin(1.57)}
=-{5.6667}
P3/ 3={|V3||V1||Y31|sin(31-3+1)+ |V3||V2||Y32|sin(32-3+2)}
=-{1.0x1.03x5.5556xsin(1.57)+1x1.02x5.5556xsin(1.57)
=-{5.7223+5.6667}=-11.389
[J]
J1
J2
J3
J4
[J1]
11.5034
-5.6667
[J2]
0.02703
0.026765
[J3]
[ 9.1605x10-3
[J4]
[10.8332]
-5.8367
-11.389
9.06935x10-3]
[J]
11.5034
-5.6667
9.1605x10-3
-5.8367
-11.389
9.06935x10-3
2
3
V3
[J]-1
P2
P3
Q3
2
3
V3
0.0705
-0.03507
-3.0249x10-5
-0.0333
-0.071211
8.7815x10-5
0.17177
0.09166
-0.0207
2
3
V3
0.02703
0.026765
10.8332
-9.3527x10-5
2.6346x10-4
0.09230
1.48163
-2.01795
-0.2221
2 new = 2 old + 2
=1.5 + 1.17177 = 1.67177
new
3 = 3 old + 3
=-2 + 0.09166 = -1.90834
V3 new = V3 old + V3
=-0.2221+(-0.0207) = -0.2428
Matlab Coding
Program
n=4;
ng=1;
pd=[0 1.7 2 .8];
q=[0 -1.0535 -1.2394 0];
pg=[0 0 0 3.18];
p=pg-pd;
v=[1 1 1 1.02];
th=[0 0 0 0];
e=.01
yb=[8.98519-44.835953i -3.815629+19.078144i -5.169561+25.847809i 0;
-3.815629+19.078144i 8.98519-44.835953i 0 -5.169561+25.847809i ;
-5.169561+25.847809i 0 8.193267-40.863838i -3.023705+15.118528i;
0 -5.169561+25.847809i -3.023705+15.118528i 8.193267-40.863838i;]
b=imag(yb)
g=real(yb)
an=angle(yb)
my=abs(yb)
for k=1:n
pp(k)=0;
qq(k)=0;
for l=1:n
pe(k)=v(k)*my(k,l)*v(l)*cos(an(k,l)-th(k)+th(l))+pp(k);
pp(k)=pe(k);
qe(k)=-v(k)*my(k,l)*v(l)*sin(an(k,l)-th(k)+th(l))+qq(k);
qq(k)=qe(k);
end
end
pp
qq
delp(1:3)=(p(2:n)-pp(2:n));
delq(1:2)=(q(2:3)-qq(2:3));
chan=[delp delq]
for k=2:n
for l=1:n
if k~=l
j1(k,l)=-v(k)*v(l)*my(k,l)*sin(an(k,l)+th(l)-th(k));
j2(k,l)=v(k)*v(l)*my(k,l)*cos(an(k,l)+th(l)-th(k));
j3(k,l)=-v(k)*v(l)*my(k,l)*cos(an(k,l)+th(l)-th(k));
j4(k,l)=-v(k)*v(l)*my(k,l)*sin(an(k,l)+th(l)-th(k));
end
end
end
for k=2:n
j1(k,k)=0;
j3(k,k)=0;
for m=1:n
if (k~=m)
H(k,k)=j1(k,m)+j1(k,k);
j1(k,k)=H(k,k);
L(k,k)=j3(k,m)+j3(k,k);
j3(k,k)=-L(k,k);
end
end
j1(k,k)=-j1(k,k);
j2(k,k)=pp(k)+v(k)^2*g(k,k);
j4(k,k)=qq(k)-v(k)^2*b(k,k);
j4
end
j11(1:3,1:3)=j1(2:4,2:4);
j12(1:3,1:2)=j2(2:4,2:3);
j13(1:2,1:3)=j3(2:3,2:4);
j22(1:2,1:2)=j4(2:3,2:3);
jacob=[j11 j12;j13 j22];
delta=inv(jacob)*chan';
dth(2:n)=delta(1:3);
th=th+dth
dv=[0 0 0 0];
dv(2:3)=delta(4:n+1);
v=v+dv
x=sign(dv);
for k=1:n
if dv(k)<0
y(k)=-dv(k);
else
y(k)=dv(k);
end
end
z=max(y);
while (z>0.01)
for k=1:n
pp(k)=0;
qq(k)=0;
for l=1:n
pe(k)=v(k)*my(k,l)*v(l)*cos(an(k,l)-th(k)+th(l))+pp(k);
pp(k)=pe(k);
qe(k)=-v(k)*my(k,l)*v(l)*sin(an(k,l)-th(k)+th(l))+qq(k);
qq(k)=qe(k);
end
end
pp
qq
delp(1:3)=(p(2:n)-pp(2:n));
delq(1:2)=(q(2:3)-qq(2:3));
chan=[delp delq]
for k=2:n
for l=1:n
if k~=l
j1(k,l)=-v(k)*v(l)*my(k,l)*sin(an(k,l)+th(l)-th(k));
j2(k,l)=v(k)*v(l)*my(k,l)*cos(an(k,l)+th(l)-th(k));
j3(k,l)=-v(k)*v(l)*my(k,l)*cos(an(k,l)+th(l)-th(k));
j4(k,l)=-v(k)*v(l)*my(k,l)*sin(an(k,l)+th(l)-th(k));
end
end
end
for k=2:n
j1(k,k)=0;
j3(k,k)=0;
for m=1:n
if (k~=m)
H(k,k)=j1(k,m)+j1(k,k);
j1(k,k)=H(k,k);
L(k,k)=j3(k,m)+j3(k,k);
j3(k,k)=-L(k,k);
end
end
j1(k,k)=-j1(k,k);
j2(k,k)=pp(k)+v(k)^2*g(k,k);
j4(k,k)=qq(k)-v(k)^2*b(k,k);
j4
end
j11(1:3,1:3)=j1(2:4,2:4);
j12(1:3,1:2)=j2(2:4,2:3);
j13(1:2,1:3)=j3(2:3,2:4);
j22(1:2,1:2)=j4(2:3,2:3);
jacob=[j11 j12;j13 j22];
delta=inv(jacob)*chan';
dth(2:n)=delta(1:3);
th=th+dth
dv=[0 0 0 0];
dv(2:3)=delta(4:n+1);
v=v+dv
x=sign(dv);
for k=1:n
if dv(k)<0
y(k)=-dv(k);
else
y(k)=dv(k);
end
end
z=max(y);
end
Input
n=4;
ng=1;
pd=[0 1.7 2 .8];
q=[0 -1.0535 -1.2394 0];
pg=[0 0 0 3.18];
v=[1 1 1 1.02];
th=[0 0 0 0];
e=.01
yb=[8.98519-44.835953i -3.815629+19.078144i -5.169561+25.847809i 0;
-3.815629+19.078144i 8.98519-44.835953i 0 -5.169561+25.847809i ;
-5.169561+25.847809i 0 8.193267-40.863838i -3.023705+15.118528i;
0 -5.169561+25.847809i -3.023705+15.118528i 8.193267-40.863838i;]
Output
th =
0 -0.0170 -0.0327
v=
1.0000
0.9824
0.0266
0.9690
1.0200
Result
The program code to calculate various line flows of an interconnected power system using
the Newton Raphson method of power flow analysis was generated and executed and the
voltage and load angle at all buses in the system were determined.