implementation of a voltage sweep power flow method · pdf fileeeh power system s laboratory...

37
eeh power systems laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other Power Flow Techniques Semester Thesis PSL 1432 EEH – Power Systems Laboratory Swiss Federal Institute of Technology (ETH) Zurich Examiner: Prof. Dr. G¨ oran Andersson Supervisor: Dr. Stephan Koch Zurich, November 20, 2014

Upload: dinhdat

Post on 10-Mar-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

eeh power systemslaboratory

Feifei Teng

Implementation of a Voltage Sweep PowerFlow Method and Comparison with Other

Power Flow Techniques

Semester ThesisPSL 1432

EEH – Power Systems LaboratorySwiss Federal Institute of Technology (ETH) Zurich

Examiner: Prof. Dr. Goran AnderssonSupervisor: Dr. Stephan Koch

Zurich, November 20, 2014

Page 2: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Abstract

Traditional power flow analysis techniques such as the Newton-Raphson andthe Gauss-Seidel methods are widely used in analyzing power transmissionsystems. However, they are inefficient and may diverge due to the differentnetwork characteristics of power distribution systems such as radial and highR/X ratio. Therefore, other techniques such as the voltage sweep algorithmsare developed for power distribution systems.

In this thesis, the forward and backward sweep algorithm is studiedand validated in Java. The sweep algorithm can deal with balanced net-works which are radial or weakly meshed and contain distributed gener-ators. Networks with different topologies are implemented to assess theconvergence behavior of the sweeping algorithm and comparisons with es-tablished methods in the open-source Java power flow package JPower (theNewton-Raphson and Gauss-Seidel methods) are made.

Results show that the sweeping algorithm is more efficient in analyzingpower distribution systems: it has the least runtime among the three meth-ods and the time-saving advantage is more obvious for networks with lessloops and PV nodes.

i

Page 3: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Acknowledgments

This semester project was conducted at the ETH spin-off Adaptricity since09/2014. The full time project made me concentrate on my work and timeruns really fast for a 7-week project.

First of all, I would like to express my gratitude to my supervisor Dr.Stephan Koch for his support and guidance during this work. Thanks forthe opportunity he gave me to learn hands-on knowledge about Java pro-gramming and power flow analysis. I like especially the atmosphere in theAdaptricity office where everyone is so nice.

Thanks my parents for their consistent encouragement. How lucky I amto have such good parents! I also would like to thank all the friends aroundme. Thanks for being someone in my life.

ii

Page 4: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Contents

List of Figures v

List of Tables vi

1 Introduction 11.1 Background of the project . . . . . . . . . . . . . . . . . . . . 11.2 Power flow analysis . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2.1 Newton-Raphson method . . . . . . . . . . . . . . . . 21.2.2 Gauss-Seidel Iteration . . . . . . . . . . . . . . . . . . 31.2.3 Differences between power transmission and distribu-

tion systems . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Goal of the project . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Structure of the thesis . . . . . . . . . . . . . . . . . . . . . . 4

2 Forward/Backward Sweep Approaches 52.1 Element ordering . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Load flow equations . . . . . . . . . . . . . . . . . . . . . . . 5

2.2.1 Power summation method . . . . . . . . . . . . . . . . 62.2.2 Kirchhoff’s Law based method . . . . . . . . . . . . . 7

2.3 Weakly meshed networks . . . . . . . . . . . . . . . . . . . . 82.4 Distributed generators modeling . . . . . . . . . . . . . . . . 92.5 Transformers modeling . . . . . . . . . . . . . . . . . . . . . . 102.6 Convergence criteria . . . . . . . . . . . . . . . . . . . . . . . 11

3 Algorithm Implementation 123.1 Element ordering . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 Loop impedance matrix . . . . . . . . . . . . . . . . . . . . . 143.3 Voltage sweep calculation . . . . . . . . . . . . . . . . . . . . 153.4 Breakpoint power injection . . . . . . . . . . . . . . . . . . . 153.5 Convergence criteria . . . . . . . . . . . . . . . . . . . . . . . 16

4 Implementation results 174.1 Assessment on the sweeping algorithm . . . . . . . . . . . . . 17

4.1.1 Voltage mismatches after each iteration . . . . . . . . 17

iii

Page 5: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CONTENTS iv

4.1.2 Influence of convergence criteria . . . . . . . . . . . . 194.1.3 Influence of loops and PV nodes numbers . . . . . . . 194.1.4 Influence of PV node position . . . . . . . . . . . . . . 21

4.2 Comparison with the Gauss-Seidel and the Newton-Raphsonmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2.1 Runtime comparison . . . . . . . . . . . . . . . . . . . 224.2.2 Calculation results comparison . . . . . . . . . . . . . 23

5 Conclusions 25

A Benchmark networks 26

Bibliography 29

Page 6: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

List of Figures

1.1 The Newton-Raphson method iteration scheme . . . . . . . . 2

2.1 Ordered network example . . . . . . . . . . . . . . . . . . . . 62.2 π circuit model of a branch . . . . . . . . . . . . . . . . . . . 62.3 Network illustrating adding breakpoints in loops and PV nodes 92.4 Breakpoint current injection . . . . . . . . . . . . . . . . . . . 92.5 The breakpoint power injection method . . . . . . . . . . . . 102.6 PV bus breakpoint . . . . . . . . . . . . . . . . . . . . . . . . 102.7 Single-phase transformer model . . . . . . . . . . . . . . . . . 10

3.1 Flowchart of the proposed algorithm . . . . . . . . . . . . . . 13

4.1 Successive voltage difference for all buses . . . . . . . . . . . . 184.2 Voltage mismatches in breakpoints . . . . . . . . . . . . . . . 184.3 Runtime and iteration number under different convergence

criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.4 Runtime and iteration number with increasing loops . . . . . 204.5 Runtime and iteration number with increasing PV nodes . . . 204.6 Iteration number for different PV node position . . . . . . . . 214.7 Runtime comparison . . . . . . . . . . . . . . . . . . . . . . . 224.8 Voltage magnitude differences between the sweeping algo-

rithm and the N-R method . . . . . . . . . . . . . . . . . . . 234.9 Voltage magnitude differences between the sweeping algo-

rithm and the G-S method . . . . . . . . . . . . . . . . . . . 24

A.1 14-bus network . . . . . . . . . . . . . . . . . . . . . . . . . . 26A.2 29-bus network . . . . . . . . . . . . . . . . . . . . . . . . . . 27A.3 106-bus network . . . . . . . . . . . . . . . . . . . . . . . . . 28

v

Page 7: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

List of Tables

4.1 Characteristics of the benchmark networks . . . . . . . . . . . 224.2 Runtime comparison of different methods . . . . . . . . . . . 22

vi

Page 8: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Chapter 1

Introduction

1.1 Background of the project

Traditional power flow analysis techniques [1] such as the Newton-Raphson(N-R) and the Gauss-Seidel (G-S) methods are frequently used in powertransmission systems. However, for special cases which are usually calledill-conditioned power systems, these methods might be unstable and diverge[2]. Therefore, for power distribution systems which have high R/X ratioand are often regarded as ill-conditioned, other methods such as the forwardand backward sweep algorithm are used and developed.

1.2 Power flow analysis

There are basically four variables related to bus b, bus voltage magnitudeUb, voltage angle θb, active power Pb and reactive power Qb. Three basictypes of buses are defined depending on which of the four variables are given[3]:• PQ bus: Pb and Qb are given; Ub and θb are to be calculated, it

represents load buses without voltage control.• PV bus: Pb and Ub are given; Qb and θb are to be calculated, it

represents generation buses with voltage control.• Uθ bus: Ub and θb are given; Pb and Qb are to be calculated, it is

also called slack bus and is used to balance load or generation and serves asvoltage angle reference.

After defining all the buses in the network, the unknown variables ofevery bus are calculated using equality and inequality constraints of thenetwork. Therefore, power flow analysis is about solving a series of equationswith system parameters and get the result of the system states. A generalpower flow equation can be written as Eq. (1.1).

f(x,u,p) = 0 , (1.1)

1

Page 9: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 1. INTRODUCTION 2

where x is a vector of unknown system states, which refers to the unknownvariables of each bus. u is a vector with control output such as the activepower and voltage magnitude of a PV bus. p is system parameters such asseries impedance and shunt admittance of branches.

Therefore, the key to analyze a power system is to find efficient waysto solve power flow Eq. (1.1). Many algorithms have been adapted anddeveloped in the past few years. The Newton-Raphson method (N-R) andthe Gauss-Seidel (G-S) method are among the most widely used methodswhich have an excellent convergence characteristic and calculation efficiency.

1.2.1 Newton-Raphson method

The Newton-Raphson method is the most widely used iterative technique[4]. Its basic iteration scheme is illustrated in Figure 1.1.

x

f(x)

f(x1)

x1

f(x0)

x0x2

Figure 1.1: The Newton-Raphson method iteration scheme

Start with initial value of x(0), the state x is updated using Eq. (1.2)and (1.3):

J(x(v))∆x(v) = −f(x(v)) , (1.2)

x(v+1) = x(v) + ∆x(v) , (1.3)

where J(x(v)) is the Jacobian matrix with

J(x(v)) =∂f(x)

∂x. (1.4)

The N-R algorithm converges to the true value of x after several iterations.For power system analysis, the state x which needs to be solved and the

Page 10: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 1. INTRODUCTION 3

function f are formulated as [3]:

x =

U

), (1.5)

f =

(∆P(x)

∆Q(x)

)= 0 , (1.6)

where ∆P(x) and ∆Q(x) are the differences between active and reactivepower with their specified value.

The solution of x is updated using Eq. (1.7):

J(x(v))

(∆θ(v)

∆U(v)

)+

(∆P(x(v))

∆Q(x(v))

)= 0 , (1.7)

where

J =

∂∆P

∂θ

∂∆P

∂U∂∆Q

∂θ

∂∆Q

∂U

. (1.8)

Reference [1] gives detailed explanation of the N-R method applicationin power system analysis.

1.2.2 Gauss-Seidel Iteration

Given the same system equation as Eq. (1.1), the Gauss-Seidel iteration(G-S) is based on the iteration scheme of Eq. (1.9):

x(v+1) = f(x(v)) . (1.9)

Given an initial estimate of x(0), a series of state values could be obtainedusing Eq. (1.9):

x(1), x(2), x(3) · · ·

If the solution converges, i.e., |x(v) − f(x(v)| < ε when xv → x∗, it can bewritten as

x∗ = f(x∗) . (1.10)

1.2.3 Differences between power transmission and distribu-tion systems

According to the respective functions of power transmission and distributionsystems, they differ in multiple aspects.• Voltage level: the transmission system is used to carry electricity over

long distances. It is at a higher voltage level in order to reduce losses. How-ever, the distribution system is the final step of the delivery to end consumersand is operated at a lower voltage level.

Page 11: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 1. INTRODUCTION 4

• Topology: a transmission system is usually meshed whereas a distri-bution system typically has a radial or weakly meshed network.• Branch type: the transmission system is mainly composed of overhead

lines, which have a lower R/X ratio. For a distribution system, the structureof both overhead lines and cables makes the R/X ratio higher.

The above mentioned algorithms N-R and G-S are particularly usefulin power transmission systems. That is because they are especially efficientand have a good convergence characteristic in dealing with meshed networkswith low R/X ratios. However, in the case of a power distribution system,convergence problems make it necessary to find new possibilities to solve thepower flow equations.

There are two main categories of distribution power systems analysis al-gorithms. One is based on modified traditional methods N-R and G-S as in[5], [6], [7], [8]. The other way is the forward and backward sweep algorithmusing Kirchhoff’s laws or bi-quadratic equations [9], [10].

The forward and backward sweep method makes use of the ladder struc-ture of a radial network and solves the power flow equations step by step.It avoids complex calculation of matrices and thus gets rid of convergenceproblems caused by high R/X ratio but needs extra effort when dealingwith meshed networks. A detailed explanation of the sweeping algorithm ispresented in Chapter 2.

1.3 Goal of the project

In this semester thesis, a power flow computation method based on thevoltage sweeping algorithm shall be implemented in the distribution systemsimulator. It is realized in Java. The computations shall be validated bycomparing the results to an established power flow computation tool JPower[11](Java port of MATPOWER [12]). The performance (solution time for apower flow on a large distribution grid) shall be assessed and compared withthe Newton-Raphson and the Gauss-Seidel techniques available in JPower.

1.4 Structure of the thesis

In Chapter 2, the principle of the sweeping algorithm is explained, includingdifferent power flow equations and the way to deal with meshed networks.The model of distributed generators is also given. In Chapter 3, the sweep-ing algorithm we implemented in the project is introduced. In Chapter 4,the implementation results in Java are presented including the individualassessment on the sweeping algorithm and comparisons with JPower.

Page 12: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Chapter 2

Forward/Backward SweepApproaches

During the last few decades, a variety of different approaches based on theforward/backward sweep algorithm are used by researchers to get good con-vergence and fast calculation speed of power distribution systems. By avoid-ing solving simultaneous equations and large dimension matrices, the sweep-ing algorithm has the advantages of less computation effort and calculationtime compared to the N-R and G-S methods. During the last several years,multiple sweep based approaches are developed to adapt to different powersystem network structures and load types.

This chapter explains the principle of the forward and backward sweepalgorithms.

2.1 Element ordering

An element ordering process must be carried out to determine the calcula-tion sequence in the forward and backward sweep. Here the commonly usedbranch and node oriented method is introduced [13]. Figure 2.1 is an exam-ple of an ordered network. As it shows, the network is divided into differentlayers starting from the root bus. Each branch is ordered only after all thebranches in its upper layers have been ordered.

For the forward sweep, the calculation starts from the root bus to thelast ordered branch. For the backward sweep, the calculation is from thelast ordered bus back to the root bus.

2.2 Load flow equations

According to the different power flow equations used in the sweeping pro-cess, there are power summation method, current summation method and

5

Page 13: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 2. FORWARD/BACKWARD SWEEP APPROACHES 6

1

2

4

7

3

5

8

6

109

root bus

Figure 2.1: Ordered network example

admittance summation method[10], [14]. Here the first two approaches areintroduced.

2.2.1 Power summation method

Step 1: Backward sweepConsider the π model of a branch i in a distribution network in Figure 2.2,the series impedance is Ri + jXi and the shunt admittance is yi. The powerin the sending and receiving end are Ps + jQs and Pr + jQr respectively.P ′i +jQ′i and P ′′i +jQ′′i are the power flow after the shunt element in sendingend and before the shunt element in receiving end respectively. Therefore,the relation between the powers in both sides can be written as [15]:

Ri jXi

yi2

yi2

Pi + jQi

P ′′i + jQ′′i P ′i + jQ′i P Ir + jQI

r

PFr + jQF

r

PLr + jQL

r

P Is + jQI

s

PLs + jQL

s

Figure 2.2: π circuit model of a branch

P ′i = PLr + PF

r − P Ir , (2.1)

Q′i = QLr +QF

r −QIr − V 2

myi/2 , (2.2)

where the superscripts L, F and I in P and Q stand for load, flow andinjection respectively. Load power PL is given before calculation. The active

Page 14: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 2. FORWARD/BACKWARD SWEEP APPROACHES 7

and reactive power flow through branch i can be formulated as,

Pi = P ′i +RiP ′2i +Q′2i

V 2r

, (2.3)

Qi = Q′2i +XiP ′2i +Q′i2

V 2m

− V 2k yi/2 . (2.4)

If the network is radial, the power injections are assumed to be zero in everyiteration. For meshed networks, the calculation of power injection PI willbe explained in the meshed network part.

Eq. (2.1) – (2.4) are calculated backward to get active and reactive powerflow for every branch.Step 2: Forward sweepWith active and reactive power values available in the backward sweep, thecomplex voltage can then be calculated in a forward sequence using Eq. (2.5).

Vr = Vs − IiZi = Vk −S′′∗iV∗k

(Ri + jXi)

= Vk −P ′′i − jQ′′i

Vk(Ri + jXi)

= (Vk −P ′′i Ri +Q′′iXi

Vk)− j(P

′′i Xi −Q′′iRi

Vk) , (2.5)

where S′′i = P ′′i + jQ′′i , P′′i = Pi, Q

′′i = Qi + V 2

k yi/2.Eq. (2.5) is an application of Kirchhoff’s Voltage Law. Since the complex

voltage of the slack bus is specified, voltage of other buses can be attainedin a forward sweep calculation.

The backward and forward sweep equations are calculated iterativelyuntil it converges.

2.2.2 Kirchhoff’s Law based method

This approach [10] is a direct application of Kirchhoff’s Current Law (KCL)and Kirchhoff’s Voltage Law (KVL). Given the voltage of the root bus andan initial voltage guess of other buses, the algorithm takes three steps foreach iteration:Step 1: Nodal current calculation:The current injection at each node i is calculated using Eq. (2.6):

I(k)i = (Si/V

(k)i )∗ − yiV (k−1)

i , i = 1, 2, ..., n (2.6)

where Si is the power injection at node i, V(k)i is the voltage of node i

calculated from iteration k, yi is the shunt element of node i.Step 2: Backward sweep:

Page 15: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 2. FORWARD/BACKWARD SWEEP APPROACHES 8

Starting from the last ordered branch, current flow Jl in branch l is calculatedusing Eq. (2.7):

J(k)l = −Ilr +

∑Jlr, l = b, b− 1, ..., 1 (2.7)

where Ilr is the current injection of node lr calculated from step 1,∑Jlr is

the currents in branches emanating from node lr.Step 3: Forward Sweep:Starting from the root bus, the node voltages are updated using Eq. (2.8).

V(k)lr = V

(k)ls − ZlJ

(k)l , l = 1, 2, ..., b (2.8)

where ls and lr denote the sending and receiving end of branch l, Zl is theseries impedance of branch l.

The element ordering process is the same as in the power summationmethod.

There are also other forward and backward sweep methods such as [14],[16], [17]. Reference [14] proposed an admittance summation method whichis quite efficient for constant admittance loads. In [16], a simplified forwardand backward method is presented which has better performance than thebasic sweeping algorithm. Reference [17] gives a comprehensive review andcomparison of these sweep based approaches.

2.3 Weakly meshed networks

Power distribution systems are radial or weakly meshed in reality. Radialnetworks can be solved directly from the above mentioned sweeping equa-tions. For meshed networks, fictitious nodes are added to each loop thusthe loops are broken and the network is converted to a radial one. For loopsin the network, breakpoints are chosen in the ordering process. The lastordered branch in a loop is treated as a link and the breakpoints are addedin every link.

The PV bus is treated as a special kind of loop [15]: a breakpoint isadded at the PV bus and it is assumed that the PV bus is connected to afictitious bus of which the active power and voltage magnitude are specified.

Figure 2.3 illustrates the process of adding breakpoints in the loop andPV bus. l denotes the link of the loop and l1 and l2 are the two ends of thebreakpoint.

After the conversion of the network, the interrupted current or powerflow in the breakpoints can be replaced by current or power injection in thetwo ends of the breakpoints without affecting the network operating condi-tion.

Luo et al. proposed a compensation based power flow method [13]. It

Page 16: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 2. FORWARD/BACKWARD SWEEP APPROACHES 9

l

root bus

PV bus

l1l2

Figure 2.3: Network illustrating adding breakpoints in loops and PV nodes

uses nodal current injections to compensate for the power flows in the break-points. The current injection method is illustrated in Figure 2.4. This ap-proach is suitable for Kirchhoff’s Law based sweeping algorithm in whichnodal currents are calculated in each iteration. The current injection can beadded directly to the calculated nodal [13]. Reference [10] improves the for-mer method in that it uses active and reactive power as flow variables ratherthan complex currents thus simplifies the treatment of PV buses. The powerinjection method is illustrated in Figure 2.5. This approach is suitable forpower summation method which active and reactive power are updated ineach iteration.

Jj

Breakpoint j

−Jj Jj

Figure 2.4: Breakpoint current injection

2.4 Distributed generators modeling

With the development of renewable energy and smartgrids, distributed gen-erators become rather common and should not be omitted in distributionsystem analysis. They are classified as PQ or PV nodes thus different waysof modeling distributed generators have been used. If modeled as a PQnode, it is identical to a negative constant power load.

Page 17: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 2. FORWARD/BACKWARD SWEEP APPROACHES 10

Rest of the network

k

P,Q

Rest of the network

P,Q P,Q

k k′

Figure 2.5: The breakpoint power injection method

If modeled as a PV node in the network, the treatment is similar to thatof a loop. Figure 2.6 shows the breakpoint of a PV bus.

Restofthenetwork

jRestofthenetwork

Ps, Q

j

Ps, Q

j′Vs

Figure 2.6: PV bus breakpoint

2.5 Transformers modeling

The single-phase transformer model is shown in Figure 2.7. The seriesimpedance is Zt and the shunt element is Ym. The subscripts p and s denoteprimary and secondary side respectively.

Ip

VpZt Is

Vs

Ym

Figure 2.7: Single-phase transformer model

Page 18: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 2. FORWARD/BACKWARD SWEEP APPROACHES 11

2.6 Convergence criteria

Different criteria are used to check the convergence of the sweeping algo-rithm [13], [18], [19]. Reference [13] compares maximum active and reac-tive power mismatch between successive iterations to convergence criterion.Others such as [18] uses voltage differences in successive iterations to checkconvergence, which is explained in Eq. (2.9):

|V k+1 − V k| < ε . (2.9)

For meshed networks or networks with PV nodes, the voltage mismatchesin breakpoints can be used to check convergence:

∆Vj = |Vj1 − Vj2 | < ε , (2.10)

where j denotes a breakpoint and j1 and j2 are the two ends of the break-point.

For the breakpoint of a PV node, the difference between the node voltageand its specified voltage magnitude is checked:

∆Vj = |Vj1 − Vs| < ε . (2.11)

If the successive power or voltage differences or voltage mismatches inbreakpoints are below the pre-determined convergence criterion, the algo-rithm has converged and the calculation stops.

For networks with loops and PV nodes, it is not enough to use succes-sive voltage differences to check convergence because the voltages in the twoends of breakpoints might still mismatch even if the voltages in all buseshas converged. Therefore, the breakpoints voltage mismatches are crucialto check convergence of a meshed network.

Moreover, the two convergence criteria can be combined to obtain afaster and more robust sweeping algorithm. Reference [19] gives an adap-tive power flow method where the successive voltage differences are checkedto converge before breakpoints voltage mismatches are examined. Both thetwo convergence criteria are used to get faster convergence.

Page 19: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Chapter 3

Algorithm Implementation

In this project, the implemented algorithm is the compensation based volt-age sweep approach described in [10], [15], [20]. It deals with balanceddistribution networks which are weakly meshed and contain distributed gen-erators. Only one slack bus is assumed in the network. The branches aremodeled as π model, thus shunt capacitance is considered. Constant powerloads are assumed in the calculation. The parameters that need to be knownbefore calculation are active and reactive power loads in PQ buses, slack busvoltage magnitude and angle as well as specified voltage magnitude and ac-tive power in the distributed generators. The flow-chart of the proposedmethod is shown in Figure 3.1.

The procedure of this algorithm is explained in several parts in thischapter according to their implementation order.

3.1 Element ordering

The formation of a suitable model of the electrical network is the first stepof network analysis. Therefore, the element ordering process described inChapter 2 needs to be conducted before implementing the forward and back-ward sweep algorithm.

Before introducing the detailed process of the ordering process, somebasic terminologies must be explained.

In the network, line segments are called elements and their ends arecalled nodes. A connected subgraph containing all nodes but without closedpath is called a tree. The elements of a tree are called branches. Other con-necting elements which are not included in the tree are called links. Basicloop is the loop path which contains only one link.

As in Reference [21], the network elements are separated into two sub-sets: branches and links. In the ordering process, every element is checkedin the following three cases,

a) none of the element nodes are in the list of ordered nodes;

12

Page 20: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 3. ALGORITHM IMPLEMENTATION 13

Read in data

Element ordering

Loop impedance matrix construction

Breakpoint power injection calculations

Power summation (backward sweep);Node voltage calculation (forward

sweep); Breakpoint voltage calculation

Incremental changes of break-point current calculation

Converged ?

Print results

NO

YES

Figure 3.1: Flowchart of the proposed algorithm

Page 21: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 3. ALGORITHM IMPLEMENTATION 14

b) only one of the element nodes is in the list of ordered nodes;c) both element nodes are in the list of ordered nodes.Case a changes nothing, case b denotes a branch and the element takes

the next ordering element position with the other node takes the next or-dering nodes position. Case c suggests a link and it takes the next elementordering position. After checking all the elements in the network, fictitiouslinks are added if there are PV nodes in the network.

Two arrays are obtained after the element ordering process, which aredenoted as NS and NR. They contain the corresponding sending and receiv-ing nodes of each branch and link. The NS and NR arrays are preparationsfor the sweeping process and determine the calculation sequence.

3.2 Loop impedance matrix

This step is only necessary when there are loops or PV nodes in the network.Since breakpoints are added in loops, current or power injections are neededto compensate for the current flow in the breakpoints.

Power injection is calculated using the incremental changes of breakpointcurrent ∆Il and breakpoint voltage Vl. Therefore, in order to get the powerinjections Pinj , loop impedance matrix Z must be constructed for everybreakpoint. The relation of breakpoint power injection, breakpoint currentand voltage are explained in Eq. (3.1)–(3.3) .

∆Pinj = ∆IlVl , (3.1)

Z∆Il = ∆Vl , (3.2)

Vl = Vlr −Vls , (3.3)

where lr and ls denotes the receiving and sending end of breakpoint l.Before introducing the way to get loop impedance matrix, basic loop in-

cidence matrix C is constructed and the loop impedance matrix is deductedaccordingly. The elements of basic loop incidence matrix are:

cij = 1 if the ith element is incident to and oriented in the same directionas the jth basic loop;

cij = −1 if the ith element is incident to and oriented in the oppositedirection as the jth basic loop;

cij = 0 if the ith element is not incident to the jth basic loop.The loop impedance matrix Z is constructed based on the loop incidence

matrix. The elements of matrix Z are:zii, which is the diagonal element, is the sum of all the branches impedance

which form the loop;zij , which is the off-diagonal element, is the sum of all the mutual

branches impedance of basic loop i and j, the impedance takes the oppositesign if loop i and j have opposite orientation at the mutual branches.

Page 22: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 3. ALGORITHM IMPLEMENTATION 15

3.3 Voltage sweep calculation

The power summation method is used in this step. The sending real andreactive power is added to the receiving power using a backward sweep cal-culation. Based on the introduction of power summation method in Chapter2, Eq. (2.1)–(2.4) are used to do the backward calculation and Eq. (2.5) isused in forward sweep. More precisely, Eq. (3.4)–(3.9) are used to get thereal and imaginary part of complex voltage.

V r = V s − (Rs−r + jXs−r)Ps − jQs

V ∗s, (3.4)

V r = V s(1−PsRs−r +QsXs−r

V 2s

+ jQsRs−r − PsXs−r

V 2s

) . (3.5)

Define a and b as,

a = 1− PsRs−r +QsXs−rV 2s

, (3.6)

b =QsRs−r − PsXs−r

V 2s

. (3.7)

Then the real and imaginary part of receiving voltage can be calculatedusing Eq. (3.8)–(3.9),

Re{V r} = aRe{V s} − bIm{V s} , (3.8)

Im{V r} = bR{V s}+ aIm{V s} . (3.9)

3.4 Breakpoint power injection

After the sweeping process, complex voltages of each bus are known and thebreakpoints power injections can be calculated using the following equations,

Smr =V ms + V mr

2(Cm − jDm) , (3.10)

Sms = −Smr . (3.11)

Since the active power of a PV bus is specified, only reactive powerinjection is updated:

∆Qms = ∆DmV 2ms

Re{V ms}. (3.12)

To get the breakpoint current Cm + jDm, loop impedance matrix Z andbreakpoint voltage difference are used in Eq. (3.13).[

X R−R X

] [−∆D∆C

]=

[−∆E∆F

], (3.13)

Page 23: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 3. ALGORITHM IMPLEMENTATION 16

where R and X are the real and imaginary part of loop impedance matrixZ, ∆C and ∆D are the real and imaginary part of incremental change ofcomplex breakpoint current, ∆E and ∆F are the real and imaginary partof complex breakpoint voltage difference.

At breakpoint l, the breakpoint complex voltage difference is:

∆El + j∆F = V lr − V ls . (3.14)

For the PV nodes,

∆El = (V spls

Vls− 1)Re{V ls} , (3.15)

where V spls is the specified value of PV nodes’ voltage magnitude.

Thus, the power injection of every breakpoint can be updated using theabove equations.

3.5 Convergence criteria

In each iteration, the above mentioned steps are cycled until the results getconverged. For radial networks, the difference of successive voltage is used tocheck convergence. For meshed networks as well as networks with PV Nodes,the breakpoints voltage mismatches are used to check convergence. Themaximum successive voltage difference among all buses or maximum voltagemismatch in breakpoints are compared to the pre-determined convergencecriterion. Once it is below the convergence criteria, the calculation stops.

Page 24: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Chapter 4

Implementation results

The algorithm introduced in Chapter 3 was implemented in Java. In thischapter, the convergence behavior of the sweeping algorithm is assessed usingdifferent network topologies. Besides, implementation results are comparedwith the G-S and N-R methods in JPower.

First of all, an individual assessment on the sweeping algorithm is madeusing a 29-bus network. The topology is given in Appendix A. As shown inFigure A.2, there are in total 29 buses with 2 loops and 3 PV buses in thenetwork.

4.1 Assessment on the sweeping algorithm

4.1.1 Voltage mismatches after each iteration

For radial networks, the successive voltage differences for each bus are usu-ally used to check convergence of the sweeping algorithm. By removing theloops and PV nodes in the 29-bus network, the convergence behavior of thesweeping algorithm is assessed for a radial network. The successive voltagedifferences for all buses are calculated and plotted in Figure 4.1.

As in Figure 4.1, the successive voltage differences in all buses are de-creasing with each iteration. When the convergence criterion is set to 10−7,the sweeping algorithm converges in 2 iterations.

Assessment of the sweeping algorithm with meshed networks is made us-ing the original 29-bus network. The voltage mismatches in the five break-points are calculated for each iteration and plotted in Figure 4.2.

As in Figure 4.2, the voltage mismatches in the breakpoints are decreas-ing with each iteration. Once all the mismatches are within the convergencecriteria, the calculation stops. When the convergence criterion is set to 10−7,the sweeping algorithm converges in 11 iterations.

17

Page 25: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 4. IMPLEMENTATION RESULTS 18

1 2 3

10-13

10-12

10-11

10-10

10-9

10-8

10-7

10-6

10-5S

ucce

ssiv

e vo

ltage

diff

eren

ce (p

.u.)

Iteration number

Figure 4.1: Successive voltage difference for all buses

0 2 4 6 8 10 12-3.0x10-3

-2.5x10-3

-2.0x10-3

-1.5x10-3

-1.0x10-3

-5.0x10-4

0.0

5.0x10-4

1.0x10-3

1.5x10-3

2.0x10-3

2.5x10-3

3.0x10-3

loop 1 loop 2 PV 1 PV 2 PV 3

Vol

tage

mis

mat

ch (p

.u.)

Iteration number

Figure 4.2: Voltage mismatches in breakpoints

Page 26: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 4. IMPLEMENTATION RESULTS 19

4.1.2 Influence of convergence criteria

The convergence criteria determine how far the calculations are from the truevalue. Therefore, the effect of different convergence criterion is analyzed us-ing its influence on iteration number and runtime of the sweeping algorithm.Figure 4.3 shows results of increasing runtime and iteration number of thesweeping algorithm under decreasing convergence criteria.

1E-5 1E-6 1E-7 1E-86

8

10

12

14

16

1.2x10-41.3x10-41.4x10-41.5x10-41.6x10-41.7x10-41.8x10-41.9x10-42.0x10-42.1x10-4

Itera

tion

num

ber

Convergence criteria

Run

time

(s)

Figure 4.3: Runtime and iteration number under different convergence cri-teria

4.1.3 Influence of loops and PV nodes numbers

Known from the principle of the sweeping algorithm in Chapter 2, loops andPV nodes are treated as breakpoints and need extra treatment. Therefore,the sweeping algorithm needs more effort dealing with more loops and PVnodes. This is illustrated by the following process: by adding or subtractingloops and PV nodes in the 29-bus network, the runtime and iteration num-ber of the sweeping algorithm are calculated. Figure 4.4 shows increasingruntime and iteration number with more PV nodes in the network. Figure4.5 shows increasing runtime and iteration number with more loops in thenetwork.

Generally speaking, the iteration number and runtime of the sweepingalgorithm are increasing with more loops and PV node added since theyincrease the complexity of the network. However, the relationship is notnecessarily a strictly positive correlation because the position of the loopsor PV nodes also count. This results from the element ordering process ofthe sweeping algorithm. The network topology determines the calculation

Page 27: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 4. IMPLEMENTATION RESULTS 20

1 2 3 4

10

15

20

25

30

1.5x10-4

2.0x10-4

2.5x10-4

3.0x10-4

3.5x10-4

4.0x10-4Ite

ratio

n nu

mbe

r

Loop number

Run

time

(s)

Figure 4.4: Runtime and iteration number with increasing loops

1 2 3 4

4

5

6

7

8

9

1.4x10-4

1.6x10-4

1.8x10-4

2.0x10-4

2.2x10-4

2.4x10-4

2.6x10-4

2.8x10-4

Itera

tion

num

ber

PV node number

Run

time

(s)

Figure 4.5: Runtime and iteration number with increasing PV nodes

Page 28: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 4. IMPLEMENTATION RESULTS 21

sequence in the backward and forward sweeping process thus has an influenceon the final iteration number and runtime.

4.1.4 Influence of PV node position

To illustrate the influence of PV node position, only one PV bus is put inthe 29-bus network and calculations are made with it in different positions.The iteration number of each calculation is recorded. As in Figure 4.6, theinfluence of PV node position can be shown by the different iteration numberthe sweeping algorithm used to do the calculation. (No result is there forbus 28 because it is the slack bus.)

10 15 20 25 300

2

4

6

8

10

12

Itera

tion

Num

ber

PV node position

Figure 4.6: Iteration number for different PV node position

4.2 Comparison with the Gauss-Seidel and the Newton-Raphson methods

In this part, the performance comparison among the sweeping algorithm,the G-S method and the N-R method is presented. Three systems are usedto assess the convergence behaviors of the algorithms. The characteristics ofthe three grid topologies are listed in Table 4.1 and the network topologiesare given in Appendix A.

Page 29: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 4. IMPLEMENTATION RESULTS 22

4.2.1 Runtime comparison

Each algorithm is run for 1000 times and Table 4.2 gives average runtimefor the three networks respectively. Figure 4.7 compares the runtime of thethree algorithms.

Table 4.1: Characteristics of the benchmark networks

Network 1 2 3

Bus number 14 29 106

Loops 7 2 0

PV nodes 0 3 0

Transformers 4 13 5

Table 4.2: Runtime comparison of different methods

Method\Network 14-bus 29-bus 106-bus

Sweeping Algorithm 1.58e-4 s 6.86e-5 s 8.76e-5 s

Newton-Raphson 1.82e-4 s 1.32e-4 s 2.37e-3 s

Gauss-Seidel 7.92e-4 s 3.89e-3 s 3.26e-1 s

14-bus 29-bus 106-bus0.0

5.0x10-5

1.0x10-4

1.5x10-4

2.0x10-4

2.5x10-4

3.25x10-1

3.50x10-1

Run

time

(s)

Different bus system

Sweeping algorithm N-R G-S

Figure 4.7: Runtime comparison

As shown in Figure 4.7, the sweeping algorithm uses the least runtimefor all networks. More concrete comparison is given in Table 4.2. Comparingaverage runtime with the network characteristics, conclusion can be madethat the time-saving advantage of the sweeping algorithm is more obvious

Page 30: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 4. IMPLEMENTATION RESULTS 23

for networks with less loops and PV nodes. The reason of that is easy toexplain: for networks with more loops or PV nodes, more breakpoints areadded thus increasing effort is needed, which results in more runtime in thecalculation.

4.2.2 Calculation results comparison

The voltage magnitude differences between the sweeping algorithm and theG-S and the N-R methods are calculated under different convergence criteria.For the following results, the convergence criteria of the three algorithmsare equally set. Figure 4.8 shows voltage magnitude differences betweenthe sweeping algorithm and the N-R method. Figure 4.9 shows voltagemagnitude differences between the sweeping algorithm and the G-S method.The results show that the solutions of the three algorithms get closer withsmaller convergence criteria and the solution differences are mostly underthe convergence criteria.

10 15 20 25 30

10-9

10-8

10-7

10-6

Vol

tage

mag

nitu

de d

iffer

ence

(p.u

.)

Bus number

10-8

10-7

10-6

Figure 4.8: Voltage magnitude differences between the sweeping algorithmand the N-R method

Page 31: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

CHAPTER 4. IMPLEMENTATION RESULTS 24

10 15 20 25 30

10-9

10-8

10-7

10-6 10-8

10-7

10-6

Vol

tage

mag

nitu

de d

iffer

ence

(p.u

.)

Bus number

Figure 4.9: Voltage magnitude differences between the sweeping algorithmand the G-S method

Page 32: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Chapter 5

Conclusions

In the thesis, a backward and forward voltage sweep algorithm is imple-mented in Java. The algorithm is validated using different network examplesand comparisons with established power flow techniques (N-R and G-S) inJPower were made.

The assessment of the sweeping algorithm using a 29-bus network showsthat the voltage differences between successive iterations and voltage mis-matches in breakpoints are decreasing with the iteration process. It needsmore effort when dealing with an increasing number of loops and PV nodeswhich can be demonstrated by its increasing iteration number and runtime.Different convergence criteria and PV node position also have an influenceon the solution.

The comparison results show that the sweeping algorithm has fasterconvergence speed than the N-R and the G-S methods. The time-savingadvantage is more obvious especially for networks with less loops or PVnodes. Since power distribution systems are often radial or weakly meshed,the sweeping algorithm shows its convergence efficiency in analyzing powerdistribution systems compared to N-R and G-S.

25

Page 33: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Appendix A

Benchmark networks

Figure A.1: 14-bus network

26

Page 34: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

APPENDIX A. BENCHMARK NETWORKS 27

Figure A.2: 29-bus network

Page 35: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

APPENDIX A. BENCHMARK NETWORKS 28

Figure A.3: 106-bus network

Page 36: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

Bibliography

[1] William F Tinney and Clifford E Hart. Power flow solution by New-ton’s method. Power Apparatus and Systems, IEEE Transactions on,(11):1449–1460, 1967.

[2] S Suresh Reddy, S Sarat Kumar, and SVJ Kumar. Load flow solutionfor ill-conditioned power systems using runge-kutta and iwamoto meth-ods with facts devices. Journal of Theoretical & Applied InformationTechnology, 5(6), 2009.

[3] Goran Andersson. Power system analysis. lecture notes, ETH Zurich.

[4] Tjalling J Ypma. Historical development of the Newton-Raphsonmethod. SIAM review, 37(4):531–551, 1995.

[5] Fan Zhang and Carol S Cheng. A modified Newton method for radialdistribution system power flow analysis. Power Systems, IEEE Trans-actions on, 12(1):389–397, 1997.

[6] Vander Menengoy da Costa, Nelson Martins, and Jose Luiz R Pereira.Developments in the Newton Raphson power flow formulation based oncurrent injections. Power Systems, IEEE Transactions on, 14(4):1320–1326, 1999.

[7] Paulo AN Garcia, Jose Luiz R Pereira, Sandoval Carneiro Jr, Vander Mda Costa, and Nelson Martins. Three-phase power flow calculationsusing the current injection method. Power Systems, IEEE Transactionson, 15(2):508–514, 2000.

[8] Jen-Hao Teng. A modified Gauss–Seidel algorithm of three-phase powerflow analysis in distribution networks. International journal of electricalpower & energy systems, 24(2):97–102, 2002.

[9] GW Chang, SY Chu, and HL Wang. An improved backward/forwardsweep load flow algorithm for radial distribution systems. Power Sys-tems, IEEE Transactions on, 22(2):882–884, 2007.

29

Page 37: Implementation of a Voltage Sweep Power Flow Method · PDF fileeeh power system s laboratory Feifei Teng Implementation of a Voltage Sweep Power Flow Method and Comparison with Other

BIBLIOGRAPHY 30

[10] Guang-Xiang Luo and Adam Semlyen. Efficient load flow for largeweakly meshed networks. Power Systems, IEEE Transactions on,5(4):1309–1316, 1990.

[11] Jpower website: https://github.com/rwl/JPOWER.

[12] MATPOWER website: http://www.pserc.cornell.edu/matpower/.

[13] Dariush Shirmohammadi, HW Hong, A Semlyen, and GX Luo. Acompensation-based power flow method for weakly meshed distribu-tion and transmission networks. Power Systems, IEEE Transactionson, 3(2):753–762, 1988.

[14] Dragoslav Rajicic and Rubin Taleski. Two novel methods for radialand weakly meshed network analysis. Electric power systems research,48(2):79–87, 1998.

[15] MH Haque. Efficient load flow method for distribution systems with ra-dial or mesh configuration. IEE Proceedings-Generation, Transmissionand Distribution, 143(1):33–38, 1996.

[16] GW Chang, SY Chu, and HL Wang. A simplified forward and backwardsweep approach for distribution system load flow analysis. In PowerSystem Technology, 2006. PowerCon 2006. International Conferenceon, pages 1–5. IEEE, 2006.

[17] Ulas Eminoglu and M Hakan Hocaoglu. Distribution systems for-ward/backward sweep-based power flow algorithms: a review and com-parison study. Electric Power Components and Systems, 37(1):91–110,2008.

[18] Kultar Deep Singh and Smarajit Ghosh. A new efficient method forload-flow solution for radial distribution networks. Przegl ↪ad Elektrotech-niczny, 87:66–73, 2011.

[19] Y Zhu and Kevin Tomsovic. Adaptive power flow method for distribu-tion systems with dispersed generation. Power Delivery, IEEE Trans-actions on, 17(3):822–827, 2002.

[20] Dragoslav Rajicic, Risto Ackovski, and Rubin Taleski. Voltage correc-tion power flow. Power Delivery, IEEE Transactions on, 9(2):1056–1062, 1994.

[21] Jos Arrillaga and CP Arnold. Computer analysis of power systems.Wiley New York, 1990.