Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Учебники / 0841558_16EA1_federico_milano_power_system_modelling_and_scripting

.pdf
Скачиваний:
72
Добавлен:
08.06.2015
Размер:
6.72 Mб
Скачать

86

4 Power Flow Analysis

g(y)

g(y)

 

g˜y

g˜y

y

y

(a)

(b)

Fig. 4.7 Geometrical interpretation of the dishonest Newton’s method for a scalar function g(y). (a) well-conditioned case and (b) infinite-cycle case

(for example using the LU factorization) but approximated with the GMRES using an acceptable accuracy. The higher the accuracy, the smaller the number of iterations but also the higher the CPU time for approximating the Jacobian matrix factorization. Thus, GMRES-inexact Newton’s methods require a fine tuning that is generally obtained by preconditioning the matrix A in (4.59).

Pushing inexact methods to the limit, one can approximate the Jacobian matrix factorization using always the same factorization for each iteration of the Newton’s method. In other words, one can rewrite (4.40) as follows:

y

(i)

˜ 1g(i)

(4.60)

 

= [gy ]

 

y(i+1)

= y(i) + y(i)

 

where g˜y 1 is the inverse of gy computed for a given vector y˜ and maintained constant during all iterations. In this way, the number of iterations is generally quite high (tens versus 4-5 of the standard Newton’s method). However, since g˜y is factorized only once, CPU times generally decreases for large systems. The method (4.60) is called dishonest Newton’s method. The standard Newton’s method can be used in conjunction with the dishonest one. For example gy can be factorized at the first two or three iterations and then left constant for the remainders. It is also important to note that the dishonest method does not guarantee convergence (see Figure 4.7).

4.4.7Fast Decoupled Power Flow

A widely used variant of dishonest methods is the so-called Fast Decoupled Power Flow (FDPF). This technique was originally proposed in [299] and has been further developed and generalized in several variations. Most common variants are the XB and BX methods presented in [324].

4.4 Power Flow Solvers

87

gp,θ

gq,θ

gp,v

gq,v

Fig. 4.8 Pictorial representation of the power flow Jacobian matrix for the IEEE 14-bus system. The darker the area the higher the absolute value of the elements of the Jacobian matrix

The FDPF method can be used only if algebraic variables are voltage magnitudes and phases, i.e., the FDPF can be used only with the classical power flow model in polar form (4.16). Recalling (4.45), the power flow Jacobian matrix gy can be decomposed in four sub-matrices, namely gp,θ , gp,v , gq,θ , and gq,v . The FDPF approach consists in approximating these sub-matrices as constant through some smart assumptions. Thus the main di erence with the dishonest method lies in the fact that gy is not approximated using a given value y, but computed a priori.

The main observation that has led to the FDPF method is that there is a clear decoupling between the (p, θ) and (q, v) variables. A direct consequence is that the sensitivity of active power mismatches with respect to voltage magnitudes (i.e., gp,v ) and of reactive power mismatches with respect to voltage phases are relatively small (i.e., gq,θ ). This is pictorially illustrated in Figure 4.8. In this figure, the darker the region the higher the absolute value of matrix elements. Since the darker region is diagonal, one can expect that θ and v are quite decoupled.

The basic assumptions of the FDPF method are:

 

gp,θ ≈ B

gp,v = 0

(4.61)

gq,θ = 0

gq,v ≈ B

88

4 Power Flow Analysis

where B and B are simplified admittance matrices, as follows:

1.Line charging, shunts and transformer tap ratios are neglected when computing B ;

2.Phase shifters are neglected and line charging and shunts are doubled when computing B .

The XB and BX variants di er only in further simplifications of the B and B matrices respectively, as follows:

XB: line resistances and shunt conductances are neglected when computing

B ;

BX: line resistances and shunt conductances are neglected when computing

B .

For loss-less systems the XB and BX variants coincide. All assumptions are valid for HV transmission systems, where line and transformer resistances are generally one order of magnitude smaller than reactances. For distribution systems (e.g., medium or low voltage systems), where series resistances are similar or higher than reactances, the FDPF does not generally work well.9

The FDPF algorithm consists in solving two linear systems at each iteration, as follows:

θ(i+1)

= θ(i) [B ]1[V (i)]1gp(v(i), θ(i))

(4.62)

v(i+1)

= v(i) [B ]1[V (i)]1gq (v(i), θ(i+1))

 

where V (i) = diag(v1(i), v2(i), . . . , vn(ib)). To reduce the iteration number, the angles θ(i+1) are used for computing the reactive power mismatches gq . Since B and B are constant, these matrices can be factorized only once. However, B does not change only in case reactive power limits of PV generators are not binding. Otherwise, B has to be re-built and re-factorized each time a PV generator switches to a constant PQ load.

As in case of dishonest Newton’s methods, the FDPF does not ensure to get a solution, but the FDPF method generally shows better convergence properties than the dishonest one. It has also been observed that the FDPF is able to converge for some ill-conditioned case for which the standard Newton method fails [299].

9This is one of the reasons why some commercial tools distinguish between the power flow analysis for transmission and distribution systems. However, network parameters do not make any di erence if one uses a general Newton method. Rather, the main relevant di erence between transmission and distribution systems is the network topology. Transmission system are generally meshed, while distribution systems show a radial configuration. For the interested reader a selection of methods that takes advantage of the radial topology has been developed for distribution systems can be found in [71, 121, 191, 279, 357].

4.4 Power Flow Solvers

89

Script 4.5 Fast-Decoupled Power Flow

The Python implementation of a the FDPF algorithm is as follows:

from cvxopt.base import matrix, div

from cvxopt.umfpack import symbolic, numeric, solve

def fdpf():

#general settings iteration = 1

iter max = system.Settings.pf max iter convergence = True

tol = system.Settings.tol system.Settings.error = tol + 1 err vec = []

#main loop

while system.Settings.error > tol and iteration <= iter max:

if iteration == 1: # initialize variables sw = system.SW. geta() sw.sort(reverse = True)

no sw = system.Bus.a[:] no swv = system.Bus.v[:] for item in sw:

no sw.pop(item) no swv.pop(item)

pv = system.SW. geta(True) + system.PV. geta(True) ngen = sum(system.SW.n) + sum(system.PV.n) pv.sort(reverse = True)

no g = system.Bus.a[:] no gv = system.Bus.v[:] for item in pv:

no g.pop(item) no gv.pop(item)

Bp = system.Line.Bp[no sw, no sw]

Bpp = system.Line.Bpp[no g, no g]

Fp = numeric(Bp, symbolic(Bp))

Fpp = numeric(Bpp, symbolic(Bpp)) exec system.Device.call fdpf

# P-theta

da = -matrix(div(system.DAE.g[no sw], system.DAE.y[no swv])) solve(Bp, Fp, da)

system.DAE.y[no sw] += da exec system.Device.call fdpf

normP = max(abs(system.DAE.g[no sw]))

# Q-V

dV = -matrix(div(system.DAE.g[no gv], system.DAE.y[no gv])) solve(Bpp, Fpp, dV)

system.DAE.y[no gv] += dV exec system.Device.call fdpf

90

4 Power Flow Analysis

normQ = max(abs(system.DAE.g[no gv]))

inc = matrix([normP, normQ]) system.DAE.y += inc

system.Settings.error = max(abs(inc)) err_vec.append(system.Settings.error)

msg =

’Iteration = %3d

Max. Convergence Error = %8.7f’ \

 

% (iteration, system.Settings.error)

print

msg

 

 

iteration

+= 1

 

# stop if

the error increases too much

if iteration > 4 and err vec[-1] > 1000*err vec[0]:

print

’The error is increasing too much’

print

’Convergence

is likely not reachable’

convergence = False break

if iteration > iter_max:

print ’Reached maximum number of iterations’ convergence = False

where the variables SW and PV indicate the slack and PV generator classes, respectively, the method geta() returns the indexes of bus voltage phase angles, and the expression exec system.Device.call fdpf implements equations g. Function symbolic and numeric are executed only once at the first iteration for factorizing B and B .

Example 4.3 Comparison of Methods for Power Flow Analysis

In this example, several methods for power flow analysis are compared, namely the standard Newton’s method, the Jacobi and the Gauss-Seidel’s methods, a simple GMRES-based approach, the dishonest Newton’s method, the XB and the BX version of the FDPF. The test systems are the IEEE 14bus system, the IEEE 118-bus system, a real-world 1228-bus system and the 11856-bus system which is available at [359].10 These systems are chosen so that the bus number spans four orders of magnitude and there is one order of magnitude between one system and the following one.

10The 11856-bus system is formed putting together the IEEE 57-bus system 208 times. The resulting test system is thus composed of 208 independent networks and the complete power flow Jacobian matrix is formed by 208 diagonal blocks. However, if one does not take advantage of the structure of the Jacobian matrix, the factorization time depends only on the sparsity of the complete matrix, which is similar to the one of a fully interconnected network.

4.4 Power Flow Solvers

91

In order to use similar conditions for all methods, a flat start is used and generator reactive power limits are not enforced. Results are shown in Table 4.4. Relevant remarks are as follows:

1.Methods that involve the computation of the Jacobian matrix, no matter if approximated or kept constant, are generally faster than the GaussSeidel’s and Jacobi’s methods. Thus, the concern that is reported in some relatively old papers about the amount of memory used by Jacobian matrix is not actually an issue, at least for modern personal computers.

2.Overall, the Newton’s method is the best method among the ones considered in this example. The rationale behind this fact is twofold:

a.Sparse matrix factorization algorithms are very e cient. Furthermore, the symbolic factorization provided by the CVXOPT module allows saving additional CPU time.

b.One of the most critical bottlenecks of scripting languages is matrix memory allocation, slicing and manipulation in general. This is because any operation done on floating-point multi-dimensional arrays are not done by the scripting language itself but sent to some C-library through a hidden-layer interface (bridge). This bridge is where the interpreter wastes time.

In conclusion, in scripting languages the less the array manipulations the better. For these reasons, FDPF approaches are not faster than the Newton’s method.

3.As previously discussed, the Jacobi’s method is faster than the GaussSeidel’s one even if it requires more iterations. This happens because, in scripting languages, array operations are faster than scalar operations within a for-loop. However, the Jacobi’s method cannot be competitive with the Newton’s method for the reasons discussed in the previous point.

4.The GMRES method used in the simulations below is the version implemented in the module scipy.sparse.linalg [334]. No preconditioning is used. This is the slowest method among those considered in this example. Moreover, the simulation hangs up for the two biggest systems, probably due to array interface issues in the scipy module. In any case, also the Matlab implementation of the GMRES algorithm is generally slower than the LU factorization of sparse matrices.

5.With regard to the dishonest method, the Jacobian matrix is kept constant starting from the second iteration. As expected the number of iterations is higher than for the Newton’s method and also of the FDPF. However, CPU time is generally competitive.

6.The two versions of the FDPF show similar results for the considered systems. The BX version is slightly better (one iteration less for the 118 and 11856-bus systems) than the XB one, thus confirming the experimental results discussed in [324].

92

 

 

 

 

 

4

Power Flow Analysis

Table 4.4 Comparison of a variety of methods for power flow analysis

 

 

 

 

 

 

 

 

Newton

Jacobi

Gauss-Seidel

 

 

Bus #

Iter. # time [s]

Iter. # time [s]

Iter. # time [s]

 

 

 

 

 

 

 

 

 

 

14

4

0.0050

76

0.0217

56

0.0288

 

 

118

5

0.0287

580

0.505

388

2.738

 

 

1228

5

0.210

454

5.120

224

112.4

 

 

11856

4

3.15

340

399.0

173

9112

 

 

 

 

 

 

 

 

 

 

 

 

 

 

GMRES

Dishonest

FDPF-BX

 

 

Bus #

Iter. # time [s]

Iter. # time [s]

Iter. # time [s]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14

4

0.4339

7

0.0040

6

0.0053

 

 

118

7

53.53

15

0.0183

6

0.0117

 

 

1228

n.a.

n.a.

26

0.207

12

0.160

 

 

11856

n.a.

n.a.

10

3.820

5

5.174

 

4.4.8DC Power Flow

All methods discussed so far provide, with more or less e ciency, the exact solution of the problem (4.8). Besides the computational burden, the nonlinearity of (4.8) implies three relevant drawbacks:

1.Possible di culties in finding the solution (e.g., ill-conditioned cases).

2.In case of no convergence, impossibility to determine if the solution does not exist or cannot be reached.

3.Existence of multiple solutions.

These issues, while quite stimulating for researchers, seriously concern practitioners. A common solution consists in simplifying g(y) in order to obtain a set of linear equations. The result is the so-called dc power flow.

The basic assumption of the dc power flow model is to focus only on the (p, θ) world and completely neglect the (q, v) one. The hypotheses are:

1.All voltage magnitudes are assumed constant and equal to 1.0 pu and reactive powers are neglected.

2.Line resistance and charging are neglected when computing the simplified

admittance matrix B. The matrix B coincides with the susceptance matrix B of the XB variant of the FDPF if all transformer tap ratios and phase

shifter angles are 1 pu and 0 rad, respectively.

3. Bus voltage phases are considered small, so that sin θhk ≈ θhk and cos θhk 1.0.

The resulting system equations are:

p = + pφ

(4.63)

where p are the power injections at buses and θ are unknowns and pφ are the power shifts introduced by phase shifting transformers. Equation (4.63)

4.4 Power Flow Solvers

93

accounts for each bus of the network but the reference one. In other words, if the network contains nb buses, then B is a square matrix of order nb 1. Introducing the incidence matrix C, (4.63) can be rewritten as:

p = X1+ CT X1φ

(4.64)

where X = diag(m1x1, m2x2, . . . , mnc xnc ) are the series reactances multiplied by the o -nominal tap ratio of each network branch,11 nc is the number of branches that compose the transmission network, φ is the nc × 1 vector nc of phase shifts of each network branch. The incidence matrix C is a nc × (nb 1) matrix that accounts for network topology. Further insights of the incidence matrix C are given in Subsection 11.3.1 of Chapter 11.

Equation (4.63) has a formal similarity with a purely resistive linear dc system:

idc = Gdcvdc

(4.65)

where idc are currents injected at nodes, vdc are the node voltages and Gdc is the conductance nodal matrix. Hence the name “dc power flow”. However, this notation is misleading, since it implies that a dc system is necessarily linear. More precise definitions are linear power flow or approximated active power flow.

The dc power flow is an easy way out to avoid the issues inherent the nonlinear nature of power flow equations. The voltage phase angle error introduced by the dc power flow can vary between 1% and 20%. Errors typically increase as the loading level increases (see Figure 4.9 in Example 4.4). Furthermore, neglecting voltage magnitude variations and reactive power flows is an arguable assumption since voltage magnitudes and reactive powers play an important role in the behavior of ac power systems (e.g., voltage stability issues [39]). Chapters 5 and 6 show that it is possible to tackle and often to successfully solve nonlinearity issues at the price of involving adequate mathematical tools.

Example 4.4 Accuracy of the DC Power Flow

The most important drawback of the dc power flow approach is the inaccuracy of the results. The error on voltage magnitudes is generally within 10% and the error of bus voltage phase angles can be up to 20%. This may lead to a wrong estimation of power flows in transmission lines and transformers. Figure 4.9 shows the mean and maximum angle errors introduced by the dc power flow with respect to the exact solution provided by the Newton’s method for the IEEE 14-bus system. Angle errors are plotted versus the

11

 

 

th

 

 

ri2+xi2

 

Strictly speaking, the correct

i

 

element of matrix X is

mi

 

, where ri is

 

 

x2

 

 

 

 

 

 

i

 

the series resistance of the ith branch element. However, for ri < xi/3 the error introduced by approximating the correct value with mixi is lower than 1%.

94

4 Power Flow Analysis

Mean error

Max. error

Phase angle error [%]

Load level [pu]

Fig. 4.9 Mean voltage phase angle error of the dc power flow as a function of the loading level for the IEEE 14-bus system

loading level (1 means base case). While the mean error is relatively low, the maximum error vary considerably depending on the loading level.

In order to estimate the error introduced in transmission line active power flows, consider the following simple calculation. The active power flowing in a loss-less transmission line connecting buses h and k through a series reactance

xhk is:

phk = vhvk sin θhk xhk

Assuming that vh = vk = 1.0 pu, θhk = 0.1 rad and xhk = 0.1 pu, one has:

phk 1.0 pu

If each voltage is a ected by a 5% error and the angle di erence by a 10% error, and assuming the worst-case scenario in which all errors have the same sign:

p˜hk (vh + Δvh)(vk + Δvk ) (θhk + Δθhk ) = 1.21 pu

xhk

that leads to an error of more than 20%. In most engineering applications, an error of 20% is a su cient argument for dropping a method, especially taking into account that electrical measures of active power flows can be

4.4 Power Flow Solvers

95

easily obtained with an error of at most 5%. However, surprisingly enough, the dc power flow is widely used in power system planning and operation and in economic dispatch.

4.4.9Single and Distributed Slack Bus Models

The concept of single slack bus used in the classical power flow formulation is arguable for the following rationale. In the single slack bus model, an unique generator has to take care of system losses or, at least, of the entire power loss increment in case a contingency occurs (e.g., a transmission line outage). This is not the real behavior of the system, since turbine governors of synchronous machines vary the power production of all generators in case of power unbalance (see also Chapter 16). Furthermore, no physical generator has an unlimited capacity or can absorb a negative active power, while this is possible for slack generators. Thus, unless the slack bus is an equivalent model of a big network,12 the single slack bus model is not realistic. The distributed slack bus model allows avoiding this inconsistency.

The distributed slack bus model is based on a generalized power center concept and consists in distributing losses among all generators [23]. In mathematical terms, this is obtained by substituting the slack generator active power injection ph in (4.12) by a scalar variable kG and by rewriting all ph at generator buses (slack bus included) as follows:

ph = (1 + kGγh)pG0,h − pLh, h BG

(4.66)

where pG0,h is the loss net generator power, BG is the set of static generator buses, and γh is a factor that allows weighting the participation of each generator to network losses.

The loss participation factors γh can be fixed to 1, i.e., each generator contributes proportionally to its generated power, or computed based on the droop of the turbine governors as discussed Chapter 16. Other methods for defining γh values are based on synchronous machine inertiæ, frequency control participation factors and also economic dispatch [116, 118, 364]. The single slack bus formulation is a particular case of the distributed one, being γh = 0 for all generators except for the slack bus that has γslack = 1 (see also Subsections 10.2.2 and 10.2.1).

Equations (4.40) are still valid if using the distributed slack bus model. The same cannot be said for the Gauss-Seidel, FDPF and dc power flow approaches. The only change in (4.40) is the form of gy . In particular, the

following partial derivative has to be added to (4.46):

 

∂gph

= −γhpG0,h, h = BG

(4.67)

∂kG

12Big means with a power capacity much greater than those of physical generators modelled in the network.