Sie sind auf Seite 1von 21

1

7 Buses Power Electric System


Alejandro Xavier Trejo Manosalvas
axtrejo@gmail.com
AbstractThis document contains different methods for
calculating power flows through "Fast Decoupled".
In the document, there are methods of solution: manual, using
simulation
software
with
graphical
user
interface
(PowerFactory), and using simulation software as it is matlab. In
the latter case, there is the case where the code is developed
entirely and the case in which the problem with the help of
MATPOWER is resolved.
Additionally, we have a comparison of results between
different methods used to determine which one most closely to
the solution obtained with "Full Newton Raphson". For this
comparison and with the help of "Matpower" the problem will
be solved by the method of "Full Newton Raphson" in order to
compare the results with respect to the solutions by "Fast
Decoupled"

Index Termsbus, fast decoupled, full newton Raphson,


matlab, matpower, power flow, PowerFactory, sep

I.

INTRODUCTION

HIS circuit hast to be solved by different ways, for


example, with PowerFactory, with a matlab code
and with matpower, additional it has to be solved

manual.

1) Preparing Case Input Data


Theinputdataforthecasetobesimulatedarespecifiedin
asetofdatamatricespackagedasthefieldsofaMATLAB
structure,referredtoasaMATPOWERcasestructand
conventionallydenotedbythevariablempc.Thisstructis
typically defined in a case file, either a functionMfile
whosereturnvalueisthempcoraMATfilethatdefinesa
variable named mpc when loaded. The main simulation
routines,whosenamesbeginwithrun(e.g.runpf,runopf),
acceptwitherafilenameoraMATPOWERcasestructas
aninput.
Use loadcase to load the data from a case file into a struct
if you want to make modifications to the data before
passing it to the simulation.
>> mpc = loadcase(casefilename);

The circuit to solve is:

Fig. 1. 7 Buses Power Electric System

II.

HOW TO USE MATPOWER

MATPOWER is a package of Matlab M-Files for solving


power flow and optimal power flow problems. It is intended as
a simulation tool for researches and educators that is easy to
use and modify. Matpower is designed to give the best
performance possible while keeping the code simple to
understand and modify.[1]

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]

The structure of the Matpower case data is described a bit


further in the next paragraph.
The data files used by MATPOWER are MATLAB MFiles which define and return a single MATLAB structure.
The M-Files format is plain text that can be edited using
any standard text editor. The fields of the struct are
baseMVA, bus, branch, gen and optionally gencost, where
baseMVA is a scalar and the rest are matrices. The columns
are similar to the columns in the standard IEEE CDF and
PTI formats. The number of rows in bus, branch and gen
are nb., nl and ng, respectively. If present, gencost has
either ng or 2ng rows, depending on whether it includes
costs for reactive power or just real power.
For this calculations (Fast Decoupled power flor), it has
the next format for: BUS DATA, GENERATOR
DATA, and BRANCH DATA

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

bus number (positive integer)


bus type (1 = PQ, 2 = PV, 3 = ref, 4
= isolated)
real power demand (MW)
reactive power demand (MVAr)
shunt conductance (MW demanded
at V = 1.0 p.u.)
shunt susceptance (MVAr injected at
V = 1.0 p.u.)
area number (positive integer)
voltage magnitude (p.u.)
voltage angle (degrees)
base voltage (kV)
loss zone (positive integer)
maximum voltage magnitude (p.u.)
minimum voltage magnitude (p.u.)
Lagrange multiplier on real power
mismatch (u/MW)
Lagrange multiplier on reactive
power mismatch (u/MVAr)
Kuhn-Tucker multiplier on upper
voltage limit (u/p.u.)
Kuhn-Tucker multiplier on lower
voltage limit (u/p.u.)

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

from" bus number


to" bus number
resistance (p.u.)
reactance (p.u.)
total line charging susceptance (p.u.)
MVA rating A (long term rating)
MVA rating B (short term rating)
MVA rating C (emergency rating)
transformer o_ nominal turns ratio,
(taps at \from" bus,
impedance at \to" bus, i.e. if r = x =
0, tap = Vf /Vt )
transformer phase shift angle
(degrees), positive delay
initial branch status, 1 = in-service, 0
= out-of-service
minimum angle di_erence, _f _t
(degrees)
maximum angle di_erence, _f _t
(degrees)
real power injected at \from" bus end
(MW)
reactive power injected at \from" bus
end (MVAr)
real power injected at \to" bus end
(MW)
reactive power injected at \to" bus
end (MVAr)
Kuhn-Tucker multiplier on MVA
limit at \from" bus (u/MVA)
Kuhn-Tucker multiplier on MVA
limit at \to" bus (u/MVA)
Kuhn-Tucker multiplier lower angle
di_erence limit (u/degree)
Kuhn-Tucker multiplier upper angle
di_erence limit (u/degree)

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)

2) Solving the Case


The solver is invoked by calling one of the main
simulationfunctions,suchasrunpforrunopf,passingina
casefilenameoracasestructasthefirstargument.For
example,forthisexercise,torunasimpleNewtonpower
flow with default options, it had to be created a file
case7(7busessystem)attheMATLABprompt,type:
>> runpf(case9);
Now to execute a Fast decoupled power flow, first it has to
define some options by the call of some functions in the
command window, and that lines of code are:
>> mpopt = mpoption('pf.alg', 'FDXB', 'pf.tol', 1e-4)
With this option is set to run a "fast decoupled" with a
tolerance of 1*10^-4.

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.

3) Accessing the Results


Bydefault,theresultsofthesimulationareprettyprinted
to the screen, displaying a system summary, bus data,
branch data and, for the OPF, binding constraint
information.Thebusdataincludesthevoltage,angleand
totalgenerationandloadateachbus.
The solution is also stored in a results struct available as an
optional return value from the simulation functions. This
results struct is a superset of the Matpower case struct
mpc, with additional columns added to some of the
existing data fields and additional fields. The
4) Setting Options
Matpower has many options for selecting among the
available solution algorithms, controlling the behavior of
the algorithms and determining the details of the pretty
printed output. These options are passed to the simulation
routines as a Matpower options struct. The fields of the
struct have names that can be used to set the corresponding
value via the mpoption function. Calling mpoption with no
arguments returns the default options struct, the struct used
if none is explicitly supplied.
Calling it with a set of name and value pairs modifies the
default vector.
For example, the following code runs a power ow on the 7bus example in case7.m using the fast-decoupled (XB
version) algorithm, with verbose printing of the algorithm
progress, but suppressing all of the pretty-printed output.
>> mpopt = mpoption (pf.alg, FDXB, verbose, 2, out.all, 0);

>> results = runpf(case7, mpopt);


To modify an existing options struct, for example, to turn
the verbose option off and re-run with the remaining
options unchanged, simply pass the existing options as the
first argument to mpoption.
>> mpopt = mpoption(mpopt, verbose, 0);
>> results = runpf (case300, mpopt);
III. SOLUTIONS WITH MATPOWER
For the resolution in MATLAB by MATPOWER, the 7 buses
system has to be introduce in a format that MATPOWER can
read.
The file will be called case7.m and it will be a function of
matlab.
This code is shown in APPENDIX A.

Fig. 2. Command Window results for Full Newton Raphson, solved with
MATPOWER

Voltages and angles of the bars are enclosed in red. These


are the values with which the solutions obtained are compared
with the solution with "FAST Decoupled"

4
TABLE IV
BUS VOLTAGES AND ANGLES FOR THE 7 BUS ELECTRIC SYSTEM
FULL NEWTON RAPHSON IN MATPOWER
BUS #

Voltage (magnitude in p.u.)

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 #

Voltage (magnitude in p.u.)

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

IV. SOLUTION IN POWERFACTORY


The DIgSILENT Power Factory is an integrated analysis of
power systems, characterizing reliable and flexible modeling
techniques and algorithms tool. It has been developed with
new
technology
programming
and
object-oriented
programming language C ++.
Achieves the best compromise between requirements of
easy handling and unlimited flexibility.[3]

Fig. 4. 7 Buses electric power system diagram in DIgSILENT

The flexible data of the system

NAME
BARRA 1
BARRA 2
BARRA 3
BARRA 4
BARRA 5
BARRA 6
BARRA 7

Fig. 3. Command Window results for Fast Decoupled, solved with


MATPOWER

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 #

Voltage (magnitude in p.u.)

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

2= 3=4 =5= 6=7 =0


V 2=V 3=V 4=V 5 =V 6=1[ p .u .]

= 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
'

B =Imag { Y BUS } without shunt elements


B '' =Imag { Y BUS } without phase shifter

(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

VII. COMPARATION BETWEEN THE METHODS OF


SOLUTION

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 #

Voltage (magnitude in p.u.)

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

VI. MATLAB SOLUTION

After analyzing the different ways of solving the same


circuit, and to perform a calculation error, it can be said
that the best way to solve a SEP by "Fast Decoupled".
It is through the help of "Matpower" the method by
which fewer errors are obtained, with respect to the
solution previously obtained with "Full Newton
Raphson"
By making converge power flow manually, it can be
appreciated and verify that through "Fast Decoupled" is
much more simple and short process with respect to
solve the same exercise with "Full Newton Raphson".
With the use of this powerful tool as it is PowerFactory
you can set different types of modeling of electrical
power systems and with this we can be prepared for
what might happen in a real system.
The implemented system does not generate a proper
power flow, and not even simulate if not being aware of
all the parameters that must be set within each block
(buses, lines, generators, loads). For this reason, is why
it should pay close attention to all the data that are
entered, otherwise it has been problems when the
program will try to run a power flow.
REFERENCES

[1]Ray D. Zimmerman and Carlos E. Murillo-Snchez, Matpower 5.1 Users


Manual. 20-Mar-2015.
[2] Ray D. Zimmerman and Carlos E. Murillo-Snchez, Matpower 5.1
Users Manual. 20-Mar-2015.
[3] GUA BSICA DE DIGSILENT POWER
FACTORY. .

The code of this solution is shown in the APPENDIX C


TABLE IX
BUS VOLTAGES AND ANGLES FOR THE 7 BUS ELECTRIC SYSTEM
FAST DECOUPLED MATLAB
BUS #

Voltage (magnitude in p.u.)

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 $

%% MATPOWER Case Format : Version 2


mpc.version = '2';
%%----- Power Flow Data
%% system MVA base
mpc.baseMVA = 100;
%% bus data
%
bus_i
mpc.bus = [
1
2
3
4
5
6
7
];

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

Pc1 Pc2 Qc1min

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

ramp_10 ramp_30 ramp_q


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)

P2=V 2[10sin 2+V 2 ( 11.004 )+ V 3 ( 11.004cos ( 23 ) ) +68.773sin ( 23 )]


23
11.00sin ( )

10cos 2+V 2 ( 78.7599 ) +V 3


Q2=V 2
P3=V 3 [V 2 ( 11.004cos ( 32 ) ) + 68.775sin ( 3 2 ) +19.257 V 3 +V 4 (8.253cos ( 3 4 ) ) +51.579sin ( 34 )]
Q3=V 3 [V 2 ( 11.004sin ( 32 ) )68.775cos ( 3 2) +120.3214 V 3+V 4 (8.253sin ( 3 4 ) ) 51.579cos ( 34 )]

P4 =V 4 [V 3 ( 8.253cos ( 4 3 ) ) +51.579sin ( 43 ) + 15.68V 4 +V 5 ( 4.126cos ( 45 ) +25.789sin ( 45 ) ) +V 6 (3.301cos ( 4 6 ) +20.632sin(

Q4 =V 4 [V 3 ( 8.253sin ( 4 3 ) ) 51.579cos ( 4 3 ) +97.904 V 4 +V 5 ( 4.126sin ( 4 5 )25.789cos ( 4 5 ) ) +V 6 (3.301sin ( 4 6 ) 20.632cos


P5=V 5 [V 4 (4.126cos ( 5 4 ) +25.789sin ( 5 4 ) ) + 15.13V 5 +V 6 (11.004cos ( 5 6 ) +68.773sin(5 6) ) ]
Q5=V 5 [V 4 (4.126sin ( 54 )25.789cos ( 54 ) ) +94.514 V 5 +V 6 (11.004sin ( 56 ) 68.773cos( 56 ) ) ]
P6=V 6 [V 4 ( 3.301cos ( 6 4 )+ 20.632sin ( 6 4 ) ) +V 5 (11.004cos ( 65 ) + 68.773sin ( 65 ) ) + 14.305V 6 +V 7 (20sin (6 7))]
Q6=V 6 [V 4 ( 3.301sin ( 6 4 ) 20.632cos ( 6 4 ) ) +V 5 ( 11.004sin ( 6 5) 68.773cos ( 6 5 ) ) +109.3483 V 6 +V 7 (20cos (6 7))]
P7=20 V 6 V 7sin ( 7 6 )

APPENDIX C
(MATLAB CODE)

clear all; close all; clc


%% MATLAB CODE TO SOLVE A POWER FLOW COMPOSED BY 7 BUSES
% Trejo Alejandro
%% Branch data
% z13 = 0.01+j*0.1;
% z12 = j*0.1;
% b10 = j*0.25;
% b20 = j*0.25;
% z23 = j*0.1;
%
%
% y13 = 1/z13;
% y12 = 1/z12;
% y23 = 1/z23;
y_line1_1=-j*10;
y_line1_2=j*10;
y_line1_3=0;
y_line1_4=0;
y_line1_5=0;
y_line1_6=0;
y_line1_7=0;
y_line2_1=y_line1_2;
y_line2_2=12.923-j*77.965;
y_line2_3=-12.923+j*67.965;
y_line2_4=0;
y_line2_5=0;
y_line2_6=0;
y_line2_7=0;
y_line3_1=y_line1_3;
y_line3_2=y_line2_3;
y_line3_3=21.163-j*119.558;
y_line3_4=-8.24+j*51.593;
y_line3_5=0;
y_line3_6=0;
y_line3_7=0;

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

if iter > itermax


disp('Diverged')
break
end
end
disp('Solution')
disp('V2 in p.u.')
disp(V2)
disp('V3 in p.u.')
disp(V3)
disp('V4 in p.u.')
disp(V4)
disp('V5 in p.u.')
disp(V5)
disp('V6 in p.u.')
disp(V6)
disp('Theta_2 in deg')
disp(theta_2*180/pi)
disp('Theta_3 in deg')
disp(theta_3*180/pi)
disp('Theta_4 in deg')
disp(theta_4*180/pi)
disp('Theta_5 in deg')
disp(theta_5*180/pi)
disp('Theta_6 in deg')
disp(theta_6*180/pi)
disp('Theta_7 in deg')
disp(theta_7*180/pi)

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

BUS VOLTAGES AND


ANGLES FOR THE 7 BUS
ELECTRIC SYSTEM

BUS VOLTAGES AND ANGLES FOR THE 7 BUS


ELECTRIC SYSTEM

BUS VOLTAGES AND ANGLES FOR THE 7 BUS


ELECTRIC SYSTEM

POWERFACTORY

FAST DECOUPLED MANUAL RESOLUTION

FAST DECOUPLED MATLAB

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

Das könnte Ihnen auch gefallen