Beruflich Dokumente
Kultur Dokumente
I.
INTRODUCTION
manual.
II.
A. Running a Simulation
The primary functionality of Matpower is to solve power
flow and optimal power flow (OPF) problems. This involves,
first: preparing the input data defining the all of relevant
power system parameters; second: invoking the function to
run the simulation and third: viewing and accessing the results
that are printed to the screen and/or saved in output data
structures or files.[2]
2
TABLE I
BUS DATA
Name
TABLE III
GENERATOR DATA
Column
Description
BUS_I
BUS_TYPE
1
2
PD
QD
GS
3
4
5
BS
BUS_AREA
VM
VA
BASE_KV
ZONE
VMAX
VMIN
LAM_P+
7
8
9
10
11
12
13
14
LAM_Q+
15
MU_VMAX+
16
MU_VMIN+
17
TABLE II
BRANCH DATA
Name
F_BUS
T_BUS
BR_R
BR_X
BR_B
RATE_A
RATE_B
RATE_C
TAP
Column
Description
1
2
3
4
5
6
7
8
9
SHIFT
10
BR_STATUS
11
ANGIM
12
ANGMAX
13
PF
14
QF
15
PT
16
QT
17
MU_SF
18
MU_ST
19
MU_ANGIM
20
MU_ANGMAX
21
Name
Column
Description
GEN_BUS
PG
QG
QMAX
1
2
3
4
QMIN
VG
MBASE
6
7
GEN_STATUS
PMAX
PMIN
PC1
9
10
11
PC2
12
QC1MIN
13
QC1MAX
14
QC2MIN
15
QC2MAX
16
RAMP_AGC
17
RAMP_10
18
RAMP_30
19
RAMP_Q
20
APF
MU_PMAX
21
22
MU_PMIN
23
MU_QMAX
24
MU_QMIN
25
bus bumber
real power output (MW)
reactive power output (MVAr)
maximum reactive power output
(MVAr)
minimum reactive power output
(MVAr)
voltage magnitude setpoint (p.u.)
total MVA base of machine, defaults
to baseMVA
Machine status: >0= machine in
service, <= machine out-of-service
maximum real power output (MW)
minimum real power output (MW)
lower real power output of PQ
capability curve (MW)
upper real power output of PQ
capability curve (MW)
minimum reactive power output at
PC1 (MVAr)
maximum reactive power output at
PC1 (MVAr)
minimum reactive power output at
PC2 (MVAr)
maximum reactive power output at
PC2 (MVAr)
ramp rate for load following/AGC
(MW/min)
ramp rate for 10 minute reserves
(MW)
ramp rate for 30 minute reserves
(MW)
ramp rate for reactive power (2 sec
timescale) (MVAr/min)
area participation factor
Kuhn-Tucker multiplier on upper Pg
limit (u/MW)
Kuhn-Tucker multiplier on lower Pg
limit (u/MW)
Kuhn-Tucker multiplier on upper Qg
limit (u/MVAr)
Kuhn-Tucker multiplier on lower Qg
limit (u/MVAr)
3
Then it can be run the Fast decoupled with this line of
code:
>> results = runpf('case7', mpopt);
Here it can be notice that in the function runpf it can be
added an additional option besides only the name of the
case.
This is better explained in number 4) Setting Options
A. Full Newton-Raphson
It has been considered to solve the problem by "Full
Newton Raphson" because this solution is going to be used as
the basis of comparison for the solution methods using "Fast
Decoupled". For ease and because the study case is not "Full
Newton Raphson, it is the Fast Decoupled. It has solved
the exercise with the help of MATPOWER.
Fig. 2. Command Window results for Full Newton Raphson, solved with
MATPOWER
4
TABLE IV
BUS VOLTAGES AND ANGLES FOR THE 7 BUS ELECTRIC SYSTEM
FULL NEWTON RAPHSON IN MATPOWER
BUS #
1
2
3
4
5
6
7
1.000
0.943
0.939
0.941
0.946
0.954
1.000
Voltage (angle in
degrees)
0.000
-4.293
-4.448
-4.096
-3.384
-2.708
2.708
B. Fast Decoupled
To solve the same case case7.m by Fast Decoupled,
first it has to define an option with a code line. And then with
the same function runpf access to the solution, the difference
between this and the Full Newton Raphson, is that in this case
in the runpf function, it is introduce the previous option that
it calls mpopt.
TABLE V
BUS VOLTAGES AND ANGLES FOR THE 7 BUS ELECTRIC SYSTEM
FAST DECOUPLED IN MATPOWER
BUS #
1
2
3
4
5
6
7
1.000
0.943
0.939
0.941
0.946
0.954
1.000
Voltage (angle in
degrees)
0.000
-4.293
-4.448
-4.096
-3.385
-2.708
2.708
NAME
BARRA 1
BARRA 2
BARRA 3
BARRA 4
BARRA 5
BARRA 6
BARRA 7
TABLE VI
FLEXIBLE DATA OF THE BUSES
UI,
U,
Nom.L-L
Magnitude
Magnitude
Volt.
kV
p.u.
13.8
13.8
1
230
227.5028
0.9891426
230
228.071
0.9916131
230
230.3669
1.001595
230
233.3397
1.01452
230
235.5325
1.024054
15
16.3044
1.08696
U, Angle
0
-4.100526
-4.299391
-4.063091
-3.507863
-2.944618
1.693085
5
TABLE VI
BUS VOLTAGES AND ANGLES FOR THE 7 BUS ELECTRIC SYSTEM
POWERFACTORY
BUS #
1
2
3
4
5
6
7
1
0.9891426
0.9916131
1.001595
1.01452
1.024054
1.08696
b20=
Voltage (angle in
degrees)
0
-4.100526
-4.299391
-4.063091
-3.507863
-2.944618
1.693085
b20=
( j3.3106 )52950
2
( j3.3106 )52915
2
= j0.0436 p . u .
= j0.0131 p .u .
V. MANUAL SOLUTION
PER UNIT CALCULATIONS
13.8 k 2 100 M
X T 1=0.1
=0.1 p . u .
13.8 k
100 M
230 k 2 100 M
X T 2=0.1
=0.05 p . u .
230 k
200 M
(
(
)(
)(
)
)
TABLE VII
UNKNOWN DATA
BUS
Z BASE =
(230 kV )
=529
100 M
TYPE
SWING
PV
PQ
PQ
UNKNOWING
-
7
V 2 ,2
V 3 , 3
V 4 , 4
V 5 , 5
POWER
P1 , Q 1
P7
P2 ,Q 2
P3 ,Q 3
P4 , Q 4
P5 ,Q 5
4
PQ
( 0.08+ j 0.5 ) / Km15 Km
X T / L 1=
=0.00227+ j 0.01448 p . u5.
PQ
529
Injection Active and Reactive Power
( 0.08+ j 0.5 )20 Km
n
X T / L 2=
=0.00302+ j 0.018904 p . u .
529
PK =V K Vm[G Kmcos ( km ) +B Kmsin ( km )]
m=1
( 0.08+ j 0.5 )40 Km
n
X T / L 3=
=0.00605+ j0.0378 p .u .
529
QK =V K Vm[G Kmcos ( km )B Kmsin ( km )]
( 0.08+ j0.5 )15 Km
m=1
X T / L 4=
=0.00227+ j 0.01418 p . u.
529
The respectively equations for the unknowing values are
( 0.08+ j 0.5 )50 Km
in APPENDIX B
X T / L 5=
=0.00756+ j 0.04726 p .ushown
.
529
It=0
Y T / L1=11.004 j 68.773 p . u .
Y T / L2=8.253 j51.579 p .u .
Y T / L3 =4.126 j 25.789 p . u .
Y T / L 4=11.004 j68.773 p .u .
Y T / L5 =3.3011 j 20.632 p .u .
b20=
b20=
b20=
( j3.3106 ) S / Km52915 Km
2
( j3.3106 )52920
2
( j3.3106 )52940
2
Flat Start:
o
= j0.01309 p .u .
= j 0.0175 p . u.
= j 0.0349 p . u .
[ ] [ ] [ ] [ ][ ]
sp
calc
P2 P2
P2
0.50.00
P3 sp P3calc
P3
0.50.00
P4 sp P4calc
P4
0.50.00
sp
calc
P
P
5
5
P5
0.50.00
sp
calc
P
P
P6
0.50.00
6
6
sp
calc
1.80.00
=
=
=
P7
P7 P7
0.3(0.0131)
Q2
Q2 sp Q 2calc
0.3(0.0306)
Q3
Q3 sp Q 3calc
0.3(0.096)
Q4
Q4 sp Q 4calc
0.3(0.048)
Q5
Q5 sp Q 5calc 0.3(0.0567)
Q6
Q6 sp Q 6calc
0.5
0.5
0.5
0.5
0.5
1.8
0.2869
0.2696
0.204
0.252
0.2453
[] [ ]
2
3
4
5
6
7
(1)
0.07
0.072908
= 0.067092
0.05509
0.043319
0.046681
[ ][ ]
[ ] [ ] [ ][ ]
V2
V3
'' 1
V 4 =B
V5
V6
V2
V3
V4
V5
V6
Tolerance= 1x10^-3. NO
'
(1)
0.047586
0.2869/1
0.05324
0.2696/1
0.204 /1 + 0.048741
0.252/1
0.047744
0.2433/1
0.039559
V2
V3
= V4
V5
V6
(0 )
V2
0.952414
V3
0.949676
+ V 4 = 0.951281
0.955256
V5
0.960441
V6
[[ ] ]
[
]
[ ] [ ][ ] [] [] [ ]
P2 sp P2calc
It=1
2
3
4
=B'1
5
6
7
0.5/1
0.5/1
0.5/1
0.5/1
0.5/1
1.8/1
2
0.07
3
0.072908
= 0.067092 4
0.05509
5
0.043319
6
0.046681
7
(1)
2
3
= 4
5
6
7
P2
0.043481
P3 sp P3calc
P3
sp
calc
0.00708
P4 P4
P4
0.011142
P5 sp P5calc
P5
0.000695
P6 sp P6calc
P6
0.049716
P7 = P7 sp P7calc = 0.07354
0.00886
Q2
Q2 sp Q 2calc
0.0088317
Q3
Q3 sp Q 3calc
0.095708
Q4
Q4 sp Q 4calc
0.093386
(0)
Q
sp
calc
5
2
Q5 Q 5
0.091276
Q6
sp
calc
3
Q6 Q 6
4
+
5
Tolerance=
1x10^-3. NO
6
7
It=2
[
]
[
]
[
]
[]
P2 spP2calc
0.043481
0.952414
0.00708
0.949676
0.004377
0.011142
0.00435
0.951281 = 0.004169
0.000695
0.003784
0.955256
0.003629
0.000048
0.049716
0.960441
0.07354
1.0
P2
0.014812
P3 spP3calc
P3
0.004045
P4 spP4calc
P4
0.007449
P5 spP5calc
P5
0.008972
sp
calc
P
P
P6
6
6
0.02439
sp
calc
=
=
P7
P7 P7
0.01442
sp
calc
0.006344
Q2
Q2 Q2
0.003521
sp
calc
Q3
Q3 Q3
0.004713
Q4
Q4 spQ4calc
0.002996
Q5
Q5 spQ5calc
0.007175
Q6
sp
calc
Q6 Q6
[] [ ]
[] [] [ ]
[] [ ]
[] [ ]
[ ] [ ][ ]
[ ] [ ] [ ][ ] [] [] [ ]
2
3
4
=B'1
5
6
7
(2)
2
3
4
5
6
7
2
3
4
5
6
7
2
3
= 4
5
6
7
(1)
2
3
4
+
5
6
7
Tolerance= 1x10^-3. NO
It=3
(2)
0.074377
0.077258
= 0.071261
0.058874
0.046948
0.046729
V2
V3
''1
V 4 =B
V5
V6
V2
V3
V4
V5
V6
(2)
0.00872
0.00886 /0.95214
0.00992
0.088317/0.949676
0.095708/0.951281 = 0.009631
0.093386/0.955256 0.008024
0.091276/0.960441
0.005995
V2
V3
= V4
V5
V6
(1)
V2
0.943634
V3
0.939756
+ V 4 = 0.94165
0.947231
V5
0.954446
V6
2
3
4
'1
=B
5
6
7
2
3
4
5
6
7
(3)
[]
0.014812
0.943634
0.004045
0.939756
0.000514
0.007449
0.000361
0.94165
0.00024
=
0.008972
0.000218
0.947231
0.000348
0.000373
0.02459
0.954446
0.01442
1.0
2
3
= 4
5
6
7
(2)
2
3
4
+
5
6
7
[] [ ]
2
3
4
5
6
7
(3)
0.074892
0.077619
= 0.071501
0.0559092
0.047296
0.047102
[ ] [ ][
[ ] [ ] [ ][ ]
V2
V3
''1
V 4 =B
V5
V6
V2
V3
V4
V5
V6
(3)
0.00096
0.006344/0.943634
0.001002
0.003521/0.939756
0.004713/0.94165 = 0.000984
0.002496/0.947231
0.000888
0.007143/0.954446
0.000813
V2
V3
= V4
V5
V6
(2 )
V2
0.942674
V3
0.938754
+ V 4 = 0.940666
0.946343
V5
0.953634
V6
[ ][ ][ ]
P2 spP2calc
P2
0.001336
P3 spP3calc
P3
sp
calc
0.000246
P4 P4
P4
0.000326
sp
calc
P5 P5
P5
0.000021
P6 spP6calc
P6
0.001187
P7 = P7 spP7calc = 0.00225
0.002192
Q2
Q2 spQ2calc
0.000404
Q3
Q3 spQ3calc
0.000877
Q4
Q4 spQ4calc
0.001305
Q5
sp
calc
Q5 Q5
0.003284
Q6
sp
calc
Q6 Q6
Tolerance= 1x10^-3. NO
It=4
[ ] [ ][ ]
] [] [] [ ]
[] [ ] [ ]
2
3
4
=B'1
5
6
7
(4 )
2
3
4
5
6
7
2
3
4
5
6
7
0.001336/0.942674
0.000031
0.000246/0.938754
0.000014
0.000326 /0.940666 = 0.000012
0.000021/0.946343
0.000031
0.001187 /0.953634
0.000038
0.00225/1
0.000151
2
3
= 4
5
6
7
(3 )
2
3
4
+
5
6
7
(3)
0.074928
0.077633
= 0.071488 [ rad ] =
0.059061
0.047258
0.047253
4.29273
4.44806
4.09597 [ deg ]
3.38393
2.70767
2.70738
[ ] [ ][ ]
[ ] [ ] [ ][ ]
V2
V3
'' 1
V 4 =B
V5
V6
V2
V3
V4
V5
V6
(4)
0.000114
0.002192/0.942674
0.000096
0.0004041/0.938794
0.000877/0.990666 = 0.000082
0.001308/0.946343
0.000077
0.003284/0.953634 0.000095
V2
V3
= V4
V5
V6
(3)
V2
0.94256
V3
0.938658
+ V 4 = 0.940585
0.946266
V5
0.953538
V6
[ ][ ][ ]
sp
calc
P2 P2
P2
0.000063
P3 spP3calc
P3
0.000155
P4 spP4calc
P4
0.000262
P5 spP5calc
P5
0.000263
sp
calc
P
P
P6
6
6
0.000354
sp
calc
=
=
P7
P7 P7
0.00029
sp
calc
0.000166
Q2
Q2 Q2
0.000104
sp
calc
Q3
Q3 Q3
0.000038
Q4
Q4 spQ4calc
0.000059
Q5
Q5 spQ5calc
0.000038
Q6
sp
calc
Q6 Q6
APPENDIX D
VIII.CONCLUSIONS
Tolerance= 1x10^-3.YES
Therefore, converges and the solution is:
TABLE VIII
BUS VOLTAGES AND ANGLES FOR THE 7 BUS ELECTRIC SYSTEM
FAST DECOUPLED MANUAL RESOLUTION
BUS #
1
2
3
4
5
6
7
1.000
0.94256
0.938658
0.940585
0.946266
0.9533538
1.000
Voltage (angle in
degrees)
0.000
-4.29273
-4.448806
-4.09597
-3.38393
-2.70767
2.70738
1
2
3
4
5
6
7
1.000
0.9397
0.9353
0.9354
0.9405
0.9486
1.000
Voltage (angle in
degrees)
0.000
-4.8694
-5.1038
-4.8467
-4.2288
-3.5990
1.5646
BIOGRAPHY
Alejandro X. Trejo was born in Quito, Ecuador in 1992. He
is studying Electrical Engineering in EPN since 2011.
He has received the High School degree from Colegio
Sebastian de Benalcazar in 200. He is interested in Renewable
Energies and low voltage design.
APPENDIX A
(CASE FORMAT FOR THE 7 BUSES ELECTRIC POWER SYSTEM OF STUDY)
function mpc = case7
%CASE9
Power flow data for 7 bus, 2 generator case.
%
Please see CASEFORMAT for details on the case file format.
%
%
Based on data from Joe H. Chow's book, p. 70.
%
%
MATPOWER
$Id: case9.m 2408 2014-10-22 20:41:33Z ray $
type
Pd
Qd
Gs
Bs
area
Vm
Va
baseKV
zone
Vmax
Vmin
3
1
1
1
1
1
2
0
50
50
50
50
50
0
0
30
30
30
30
30
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1.08
0
0
0
0
0
0
0
13.8
230
230
230
230
230
15
1
1
1
1
1
1
1
1.05
1.05
1.05
1.05
1.05
1.05
1.05
0.95;
0.95;
0.95;
0.95;
0.95;
0.95;
0.95;
%% generator data
%
bus Pg
Qg
mpc.gen = [
1
300
60.10
7
180
0
ramp_agc
0
0
];
-----%%
Qmax
Qmin
Vg
mBase
status
Pmax
Pmin
Qc1max
Qc2min
Qc2max
9900
9900
-9900
-9900
1
1
100
200
1
1
1000
1000
0
0
0
0
0
0
0
0
0
0
apf
0;
0;
0
0
0
0
%% branch data
%
fbus
tbus
mpc.branch = [
2
1
2
3
3
4
4
5
4
6
5
6
6
7
rateA
rateB
rateC
ratio
angle
status
angmin
0
0.002268
0.003024
0.006044
0.007551
0.002268
0
0.1
0.014177
0.018902
0.037791
0.047227
0.014177
0.05
0
0.02619
0.03492
0.06984
0.08732
0.02619
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
-360
-360
-360
-360
-360
-360
-360
angmax
360;
360;
360;
360;
360;
360;
360;
360;
];
%%----- OPF Data -----%%
%% generator cost data
%
1
startup shutdown
%
2
startup shutdown
mpc.gencost = [
2
0
0
1
0
0
2
0
0
1
0
0
];
n
n
0;
0;
x1 y1
c(n-1)
... xn
... c0
yn
APPENDIX B
(EQUATIONS OF UNKNOWING VALUES)
APPENDIX C
(MATLAB CODE)
y_line4_1=y_line1_4;
y_line4_2=y_line2_4;
y_line4_3=y_line3_4;
y_line4_4=15.663-j*98.002;
y_line4_5=-4.128+j*25.794;
y_line4_6=-3.295+j*20.615;
y_line4_7=0;
y_line5_1=y_line1_5;
y_line5_2=y_line2_5;
y_line5_3=y_line3_5;
y_line5_4=y_line4_5;
y_line5_5=17.051-j*93.759;
y_line5_6=-12.923+j*67.965;
y_line5_7=0;
y_line6_1=y_line1_6;
y_line6_2=y_line2_6;
y_line6_3=y_line3_6;
y_line6_4= -3.295+j*20.615;
y_line6_5=y_line5_6;
y_line6_6=16.218-j*108.58;
y_line6_7=j*20;
y_line7_1=y_line1_7;
y_line7_2=y_line2_7;
y_line7_3=y_line3_7;
y_line7_4=y_line4_7;
y_line7_5=y_line5_7;
y_line7_6=y_line6_7;
y_line7_7=-j*20;
%% Bus data
V1 = 1.0;
theta_1 = 0;
V7 = 1.0;
P2_sp = -0.5;
P3_sp = -0.5;
P4_sp = -0.5;
P5_sp = -0.5;
P6_sp = -0.5;
P7_sp = 1.8;
Q2_sp = -0.3;
Q3_sp = -0.2;
Q4_sp = -0.3;
Q5_sp = -0.3;
Q6_sp = -0.3;
% Qc = j*0.2;
%% Calculate Ybus
Ybus = [y_line1_1 y_line1_2 y_line1_3 y_line1_4 y_line1_5 y_line1_6 y_line1_7;
y_line2_1 y_line2_2 y_line2_3 y_line2_4 y_line2_5 y_line2_6 y_line2_7;
y_line3_1 y_line3_2 y_line3_3 y_line3_4 y_line3_5 y_line3_6 y_line3_7;
y_line4_1 y_line4_2 y_line4_3 y_line4_4 y_line4_5 y_line4_6 y_line4_7;
y_line5_1 y_line5_2 y_line5_3 y_line5_4 y_line5_5 y_line5_6 y_line5_7;
y_line6_1 y_line6_2 y_line6_3 y_line6_4 y_line6_5 y_line6_6 y_line6_7;
y_line7_1 y_line7_2 y_line7_3 y_line7_4 y_line7_5 y_line7_6 y_line7_7];
%% Calculate B' and B''
B_p= (-1).*[B(2,2) B(2,3) B(2,4) B(2,5) B(2,6) B(2,7);
B(3,2) B(3,3) B(3,4) B(3,5) B(3,6) B(3,7);
B(4,2) B(4,3) B(4,4) B(4,5) B(4,6) B(4,7);
B(5,2) B(5,3) B(5,4) B(5,5) B(5,6) B(5,7);
B(6,2) B(6,3) B(6,4) B(6,5) B(6,6) B(6,7);
B(7,2) B(7,3) B(7,4) B(7,5) B(7,6) B(7,7)];
B_pp= (-1).*[B(2,2) B(2,3) B(2,4) B(2,5) B(2,6);
B(3,2) B(3,3) B(3,4) B(3,5) B(3,6);
B(4,2) B(4,3) B(4,4) B(4,5) B(4,6);
B(5,2) B(5,3) B(5,4) B(5,5) B(5,6);
B(6,2) B(6,3) B(6,4) B(6,5) B(6,6)];
% Settings
tol = 10^-3;
iter = 0;
itermax = 50;
% Initialization
V2 = 1.0;
V3 = 1.0;
V4 = 1.0;
V5 = 1.0;
V6 = 1.0;
theta_2 = 0;
theta_3 = 0;
theta_4 = 0;
theta_5 = 0;
theta_6 = 0;
theta_7 = 0;
while 1
P2_calc = B(2,1)*V1*V2*sin(theta_2-theta_1)+ V2^(2)*G(2,2)+ G(2,3)*V2*V3*cos(theta_2-theta_3)+
B(2,3)*V2*V3*sin(theta_2-theta_3);
P3_calc = G(3,2)*V2*V3*cos(theta_3-theta_2)+ B(3,2)*V2*V3*sin(theta_3-theta_2)+ V3^(2)*G(3,3)+
B(3,4)*V4*V3*sin(theta_3-theta_4)+ G(3,4)*V4*V3*cos(theta_3-theta_4);
P4_calc = G(4,3)*V4*V3*cos(theta_4-theta_3)+ B(4,3)*V4*V3*sin(theta_4-theta_3)+ V4^(2)*G(4,4)+
G(4,5)*V4*V5*cos(theta_4-theta_5)+ B(4,5)*V4*V5*sin(theta_4-theta_5)+ G(4,6)*V4*V6*cos(theta_4-theta_6)+
B(4,6)*V4*V6*sin(theta_4-theta_6);
P5_calc = G(5,4)*V4*V5*cos(theta_5-theta_4)+ B(5,4)*V4*V5*sin(theta_5-theta_4)+ V5^(2)*G(5,5)+
G(5,6)*V6*V5*cos(theta_5-theta_6)+ B(5,6)*V6*V5*sin(theta_5-theta_6);
P6_calc = G(6,4)*V4*V6*cos(theta_6-theta_4)+ B(6,4)*V4*V6*sin(theta_6-theta_4)+ V6^(2)*G(6,6)+
G(6,5)*V6*V5*cos(theta_6-theta_5)+ B(6,5)*V6*V5*sin(theta_6-theta_5)+ B(6,7)*V7*V6*sin(theta_6-theta_7);
P7_calc = V7*20*sin(theta_7-theta_6);
Q2_calc = -B(2,1)*V2*V1*cos(theta_2-theta_1)+ G(2,3)*V2*V3*sin(theta_2-theta_3)- B(2,3)*V2*V3*cos(theta_2theta_3)- B(2,2)*V2^2;
Q3_calc = G(3,2)*V2*V3*sin(theta_3-theta_2)- B(3,2)*V2*V3*cos(theta_3-theta_2)+ G(3,4)*V4*V3*sin(theta_3theta_4)- B(3,4)*V4*V3*cos(theta_3-theta_4)- B(3,3)*V3^2;
Q4_calc = G(4,3)*V4*V3*sin(theta_4-theta_3)- B(4,3)*V4*V3*cos(theta_4-theta_3)+ G(4,5)*V4*V5*sin(theta_4theta_5)- B(4,5)*V4*V5*cos(theta_4-theta_5)- B(4,4)*V4^2+ G(4,6)*V4*V6*sin(theta_4-theta_6)B(4,6)*V4*V6*cos(theta_4-theta_6);
Q5_calc = G(5,4)*V5*V4*sin(theta_5-theta_4)- B(5,4)*V5*V4*cos(theta_5-theta_4)+ G(5,6)*V6*V5*sin(theta_5theta_6)- B(5,6)*V6*V5*cos(theta_5-theta_6)- B(5,5)*V5^2;
Q6_calc = G(6,4)*V6*V4*sin(theta_6-theta_4)- B(6,4)*V6*V4*cos(theta_6-theta_4)+ G(6,5)*V6*V5*sin(theta_6theta_5)- B(6,5)*V6*V5*cos(theta_6-theta_5)- B(6,6)*V6^2- B(6,7)*V6*V7*cos(theta_6-theta_7);
%
%
%
V=[V1 0;
0 V2];
v= det(V);
DP2
DP3
DP4
DP5
DP6
DP7
DQ2
DQ3
DQ4
DQ5
DQ6
=
=
=
=
=
=
=
=
=
=
=
(P2_sp
(P3_sp
(P4_sp
(P5_sp
(P6_sp
(P7_sp
(Q2_sp
(Q3_sp
(Q4_sp
(Q5_sp
(Q6_sp
P2_calc)/V2;
P3_calc)/V3;
P4_calc)/V4;
P5_calc)/V5;
P6_calc)/V6;
P7_calc)/V7;
Q2_calc)/V2;
Q3_calc)/V3;
Q4_calc)/V4;
Q5_calc)/V5;
Q6_calc)/V6;
if abs(DP2) < tol && abs(DP3) < tol && (DQ3) < tol
disp('Solution found')
disp('at iteration #')
disp(iter)
break
else
%
Jac = [-G(2,1)*V1*V2*sin(th2-th1) + B(2,1)*V1*V2*cos(th2-th1), G(2,1)*V1*cos(th2-th1)+B(2,1)*V1*sin(th2th1)+2*G(2,2)*V2;
%
G(2,1)*V2*V1*cos(th2-th1)+B(2,1)*V2*V1*sin(th2-th1), G(2,1)*V1*sin(th2-th1)-B(2,1)*V1*cos(th2-th1)2*B(2,2)*V2];
Dx = (B_p^-1)*[DP2; DP3; DP4; DP5; DP6; DP7];
Dy = (B_pp^-1)*[DQ2; DQ3; DQ4; DQ5; DQ6];
theta_2 = theta_2 + Dx(1);
theta_3 = theta_3 + Dx(2);
theta_4 = theta_4 + Dx(3);
theta_5 = theta_5 + Dx(4);
theta_6 = theta_6 + Dx(5);
theta_7 = theta_7 + Dx(6);
V2 = V2 + Dy(1);
V3 = V3 + Dy(2);
V4 = V4 + Dy(3);
V5 = V5 + Dy(4);
V6 = V6 + Dy(5);
iter = iter + 1;
end
APPENDIX D
(COMPARSION BETWEEN DIFFERENT METHOD OF SOLUTION FAST DECOUPLED)
TABLE X
COMPARATION BETWEEN ALL THE METHODS OF SOLUTIONS BY "FAST
DECOUPLED"
TABLE IV
BUS VOLTAGES AND
ANGLES FOR THE 7
BUS ELECTRIC
SYSTEM
FULL NEWTON
RAPHSON IN
MATPOWER
TABLE V
BUS VOLTAGES AND
ANGLES FOR THE 7
BUS ELECTRIC
SYSTEM
TABLE VI
TABLE Viii
TABLE IX
POWERFACTORY
FAST DECOUPLED IN
MATPOWER
BU
S#
Voltage
(magnitud
e in p.u.)
Voltage
(angle
in
degrees
)
BU
S#
Voltage
(magnitud
e in p.u.)
Voltage
(angle
in
degrees
)
BU
S#
Voltage
(magnitud
e in p.u.)
0.943
-4.293
0.943
-4.293
0.989142
6
0.939
-4.448
0.939
-4.448
0.991613
1
0.941
-4.096
0.941
-4.096
1.001595
0.946
-3.384
0.946
-3.385
1.01452
0.954
-2.708
0.954
-2.708
1.024054
2.708
2.708
1.08696
Voltage
(angle
in
degrees)
0
4.10052
6
4.29939
1
4.06309
1
3.50786
3
2.94461
8
1.69308
5
BUS #
Voltage
(magnitude in
p.u.)
Voltage (angle
in degrees)
BUS #
Voltage
(magnitude in
p.u.)
Voltage (angle
in degrees)
0.94256
-4.29273
0.9397
-4.8694
0.938658
-4.448806
0.9353
-5.1038
0.940585
-4.09597
0.9354
-4.8467
0.946266
-3.38393
0.9405
-4.2288
0.9533538
-2.70767
0.9486
-3.599
2.70738
1.5646
TABLE XI
ERROR (%) CALCULATION
BUS #
VOLTAGE
VOLTAGE
MAGNITUDE
ANGLE
ERROR (%) ERROR (%)
BUS #
VOLTAGE
VOLTAGE
MAGNITUDE
ANGLE
ERROR (%) ERROR (%)
BUS #
VOLTAGE
MAGNITUD
E ERROR (%)
VOLTAGE
ANGLE
ERROR (%)
BUS #
VOLTAGE
VOLTAGE
MAGNITUDE
ANGLE
ERROR (%) ERROR (%)
0.048931707
0.044834382
0.000466596
6.28931E-05
0.00349947
0.134265083
0.05603099
0.033410297
0.000364217
0.000181205
0.003940362
0.14743705
0.064394261
0.008034424
0.00044102
7.32422E-06
0.005951116
0.183276367
0.000295508
0.07243129
0.036602541
0.000281184
2.06856E-05
0.005813953
0.24964539
0.073431866
0.0873774
0.000677358
0.000121861
0.005660377
0.329025111
0.08696
0.374783973
0.000228951
0.422230428
0.003552183
0.209411347
0
ERROR PROMEDIO
ERROR
4.22155E-05 PROMEDI
O
0.057454302
0.083577574 ERROR
PROMEDIO
0.000318625
8.89886E-05 ERROR
PROMEDIO