Учебники / 0841558_16EA1_federico_milano_power_system_modelling_and_scripting
.pdf5.4 Homotopy Methods |
117 |
bifurcation analysis [276]. If the function is properly set up, the Jacobian matrix of (5.46), i.e.,
gy gμ |
(5.47) |
|
y μ |
||
|
is not singular at the SNB point. This property is important for ensuring the convergence of the Newton’s method close to the SNB point.
5.4.1Continuation Power Flow
Although the very first appearance of homotopy methods in a power system conference dates back to the seventies [307], the proposal of the technique known as Continuation Power Flow (CPF) was conceived in the nineties [5]. Currently, the most authoritative reference about continuation power flow analysis and its usage for voltage stability assessment is [39].
For the interested reader, a system programming-based implementation of general homotopy methods can be found in [344]. Simulation results of this software package for power system problems, as well as an in-depth discussion of homotopy methods can be found in [147]. Finally, an implementation of homotopy methods for power system analysis is presented in [56], whereas C- and Matlab-based implementations of the CPF analysis can be found in [42] and [194], respectively.
The CPF method described in following subsections consists in a predictor step realized by the computation of the tangent vector and a corrector step that can be obtained either by means of a local parametrization or a perpendicular intersection.
5.4.2Predictor Step
In the CPF analysis, the arc length that parametrizes (5.40) is defined as s ≡ μ. Thus, for a generic step i and for the solution (y(i), μ(i)), the following relation for the homotopy map ψ applies:
ψ(y(i)(μ(i)), μ(i)) = 0 dμ |
i |
= 0 = ψy |i dμ i + ψμ|i |
(5.48) |
|||
|
dψ |
|
dy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hence, the tangent vector for the solution (y(i), μ(i)) can be approximated
by: |
|
|
|
|
|
τ (i) = |
dy |
i |
≈ |
y(i) |
(5.49) |
dμ |
Δμ(i) |
||||
|
|
|
|
|
|
|
|
|
|
|
|
From (5.48) and (5.49), one has: |
|
|
|
|
|
|
|
|
|
|
|
τ (i) = −ψy−1|iψμ|i |
(5.50) |
||||
y(i) = τ (i)Δμ(i) |
|
118 5 Continuation Power Flow Analysis
A step size control k has to be chosen for determining the increment y(i) and Δμ(i) that appear in (5.44), along with the normalization (5.42) that avoids large steps when τ (i) 2 increases:
|
k |
kτ (i) |
||
Δμ(i) |
|
y(i) |
|
(5.51) |
|
|
|||
|
τ (i) 2 |
τ (i) 2 |
Figure 5.5 provides a pictorial representation of the predictor step.
The sign of the step size k determines whether to increase or decrease μ. In order to obtain a complete nose curve, k > 0 in the upper part and k < 0 in the lower one. It is easy to know if the current point is in the upper or in the lower part of the nose curve, since the determinant of the Jacobian matrix sign before and after SNB or critical LIB points changes.
(y˜(i), μ˜(i))
τ (i)
(y(i), μ(i)) |
ψ(y, μ) = 0 |
Fig. 5.5 Tangent predictor
For the sake of completeness, it is worth observing that predictor steps other than the tangent vector can be implemented. For example, an alternative predictor step is based on the secant [56]. The secant allows approximating the tangent τ (i) once two solutions (y(i−1), μ(i−1)) and (y(i), μ(i)) are known:
τ (i) = dy ≈ y(i) − y(i−1) (5.52)
dμ i
Predictions based on the secant have been observed to reach the maximum loading condition faster than those based on the tangent vector [39]. Faster means that the secant predictor requires less steps to reach the maximum loading point. However, the secant method may provide an inadequate prediction in case of sharp corners or if the solutions i − 1 and i are too far apart (see Figure 5.6). An e cient method to accelerate the convergence of the CPF analysis to the point of collapse is the Tangent Vector Index (TVI) proposed in [289].
5.4 Homotopy Methods |
|
|
119 |
|
(y˜(i), μ˜(i)) |
|
|
|
τ (i) |
|
(y(i−1), μ(i−1)) |
(y(i), μ(i)) |
|
|
|
(y(i−1), μ(i−1)) |
ψ(y, μ) = 0 |
ψ(y, μ) = 0 |
(y(i), μ(i)) |
|
|
|
|
|
|
|
τ (i) |
|
|
|
(y˜(i), μ˜(i)) |
(a) |
|
|
(b) |
Fig. 5.6 Secant predictor: (a) smooth function, and (b) sharp corner
Script 5.1 CPF Predictor Step
The following Python script implements a predictor step based on the tangent vector.
import system
from cvxopt.base import matrix, spmatrix, sparse, log from cvxopt.umfpack import symbolic, numeric, solve from cvxopt.lapack import gees
def predictor(k, Jsign):
exec system.Device.call pf exec system.Device.call gmu
B = sparse(system.DAE.Gy)
dy dmu = -matrix(system.DAE.Gmu)
if system.DAE.factorize: G = symbolic(B)
try:
solve(B, numeric(B, G), dy dmu) except:
G = symbolic(B)
solve(B, numeric(B, G), dy dmu)
Jsign old = Jsign
Jsign = gees(matrix(B, tc = ’z’), select = negative)
if Jsign != Jsign old: ksign = -1
Sflag = False
norm = sum(dz dmu**2)**0.5 if not norm: norm = 1.0
d mu = ksign*k/norm d_y = d mu*dy dmu
inc = matrix([d y, d mu])
120 |
5 Continuation Power Flow Analysis |
def negative(x):
return (x.real < 0.0)
The interface system.Device computes g and gy and gμ of all devices that compose the system. The functioning of the class system.Device is described in Script 3.2 of Chapter 3. Furthermore, observe the use of the symbolic factorization of the power flow Jacobian matrix. The symbolic re-factorization is needed whenever a LIB occurs.
An important point of the predictor step is how to decide if the sign of the step k has to be changed. As previously discussed, the sign of the determinant of the Jacobian matrix gy changes if the path has reached the lower part of the nose curve. Unfortunately computing the determinant is an expensive operation and cannot be used for real-size systems.
A simple method to compute the determinant of a matrix is using the LU factorization. In fact, one has:
A = L U
n |
|
det(A) = det(L)det(U ) = 1 · det(U ) = uhh |
(5.53) |
h=1 |
|
where uhh are the diagonal elements of the matrix U . However, e cient sparse matrix algorithms generally provides a variant of the LU factorization, namely the LU factorization with partial pivoting, or LUP factorization. In this case:
A = L U P |
(5.54) |
where P is a permutation matrix. Thus, the determinant of the matrix A depends also on P whose number of permutations has to be taken into account to define the sign of the determinant of A.
The proposed code uses an ordered Schur’s factorization through the function gees provided by the module cvxopt. The function gees returns the number of eigenvalues selected by a user-defined “ordering routine”. In this case, the ordering routine is the function negative. The rationale of this procedure is as follows. The determinant of a matrix can be also computed as the product of all eigenvalues λi of that matrix:
n |
|
det(A) = λh |
(5.55) |
h=1 |
|
Thus, if the number of negative eigenvalues increases or decreases by one, the sign of the determinant changes. The proposed approach allows also determining if the number of eigenvalues that change sign is more than one (e.g., in case a Hopf bifurcation occurs). In particular, it would work also if this number is even, while the method based on the LU factorization would fail in this case. However, the Schur’s factorization is computationally expensive for
5.4 Homotopy Methods |
121 |
large matrices and the LU factorization-based calculation of the determinant sign has to be preferred if Hopf bifurcations are not of interest.2
5.4.3Corrector Step
As discussed above, the most commonly used corrector step is (5.46), which is a set of ny + 1 equations in ny + 1 variables. The solution of (5.46) is the new point (y(i+1), μ(i+1)). This solution must be in the bifurcation manifold (i.e., the nose curve) of ψ and is an additional equation to guarantee a nonsingular set at the bifurcation point. As for the choice of , there are several options. Common continuation equations are the perpendicular intersection and the local parametrization.
In case of perpendicular intersection, whose pictorial representation is reported in Fig. 5.7, the expression of becomes [136]:
(y, μ) = Δμ(i) |
|
T |
|
μ− |
|
(μ(i) + Δμ) |
= Δμ(i) |
|
T |
! |
y(i) |
|
|
y |
(y(i) + y(i)) |
y(i) |
|
|
|||
|
|
− |
|
|
|
|
"
y− y˜(i)
˜(5.56)
μ− μ(i)
whereas for the local parametrization, either the parameter μ or a variable yk is forced to be an assigned value [5, 56]:
(y, μ) = μ − μ(i) − Δμ(i) = μ − μ˜(i) |
(5.57) |
or |
|
(y, μ) = yk − yk(i) − Δyk(i) = yk − y˜k(i) |
(5.58) |
The choice of the variable to be fixed depends on the bifurcation manifold of ψ, as depicted in Fig. 5.8.
Script 5.2 CPF Corrector Step
The following Python script implements a corrector step with both perpendicular intersection and local parametrization corrector steps. The system (5.46) is solved using a Newton’s method.
2The CVXOPT module does not currently provide a method for computing the determinant and does not return the LU factorization as a transparent Python object. Hence, a solution is to use the det function of the numpy.linalg module, as follows:
Jsign = numpy.linalg.det(matrix(B))
Since the function det internally uses the LAPACK package and the LU factorization, the computation of the determinant is relatively e cient. However, this requires factorizing the matrix B twice per each predictor step. Thus, the best solution is to modify the method solve cvxopt.umfpack module so that it returns the value (or the sign) of the determinant of the argument matrix to be factorized. This is possible only modifying the source C code of the CVXOPT package.
122 |
5 Continuation Power Flow Analysis |
π/2
(y(i+1) − y˜(i), μ(i+1) − μ˜(i))
τ (i)
(y(i+1), μ(i+1))
(y(i), μ(i))
ψ(y, μ) = 0
Fig. 5.7 Perpendicular intersection corrector
yk |
corrector |
= μ(i+1) − μ˜(i)
corrector
= yk(i+1) − y˜k(i)
μ
Fig. 5.8 Local parametrization corrector
import system
from cvxopt.base import matrix, spmatrix, sparse, log from cvxopt.umfpack import symbolic, numeric, solve
def corrector(inc, y old, v bus):
iter corr = 0
system.Settings.error = system.Settings.tol + 1
while system.Settings.error > system.Settings.tol:
if iter corr > system.Settings.maxiter: break
# call component functions exec system.Device.call pf
5.4 Homotopy Methods |
123 |
exec system.Device.call gmu
Mmu[0, 0] = 0.0
if system.CPF.method == ’perpendicular intersection’:
My = inc[n:n+m].T
rho = My*(system.DAE.y - y old - My.T)
else: # local parametrization
My[0, v_bus] = 1.0
rho = system.DAE.y[v bus] - inc[v bus] - y old[v bus]
A = sparse([[system.DAE.Gy, My ], [system.DAE.Gmu, Mmu]])
inc_corr = matrix([system.DAE.g, rho])
if system.DAE.factorize: F = symbolic(A)
if iteration > 1: system.DAE.factorize = False
try:
solve(A, numeric(A, F), inc corr) except:
F = symbolic(A)
solve(A, numeric(A, F), inc corr)
system.DAE.y -= inc corr[:m] system.DAE.mu -= inc corr[-1] iter corr += 1
system.Settings.error = max(abs(inc corr))
The following observations are relevant: (i) the interface Device is used for computing g and gy and gμ of all devices that compose the system; (ii) the function symbolic is used for symbolically factorizing the power flow Jacobian matrix (the symbolic re-factorization is needed whenever a LIB occurs); and (iii) in case of local parametrization, the variable yk used in the continuation function is the bus voltage magnitude of a PQ load with index v bus.
Example 5.4 Continuation Power Flow Analysis for the IEEE 14-Bus System
Figure 5.9 shows some results of the CPF analysis for the IEEE 14-bus system. The nose curves are obtained using a distributed slack bus model and neglecting reactive power limits of PV generators. In this case, the maximum loading condition is due to a SNB.
Figure 5.10 shows the results of the continuation power flow analysis enforcing PV generator reactive power limits. The figure shows both bus voltage magnitude at load buses, and the voltage magnitude and reactive power at bus 6. The voltage at bus 6 is constant until the PV generator reactive power is lower than its limits (i.e., 0.24 pu). Then, the reactive power is maintained equal to 0.24 pu and the bus voltage is let free to vary. The LIB caused by the reactive power saturation of the PV generator at bus 6 is not critical
124 |
|
|
|
|
5 Continuation Power Flow Analysis |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fig. 5.9 Nose curve for the IEEE 14-bus system without PV reactive power limits
since other generators have still an available reserve of reactive power. As a matter of fact, the maximum loading condition is a SNB because the slack generator is assumed to have an unlimited reactive power reserve.
Figure 5.11 shows the results of the continuation power flow analysis enforcing both PV and slack generator reactive power limits (it is assumed qGmax1 = 1.0 pu). In this case, the maximum loading condition is a LIB due to the slack generator maximum reactive power. In [332], a LIB is classified as static if it leads to the maximum loading condition and dynamic otherwise. This taxonomy can be misleading, since no dynamic device is actually considered. A simpler notation is critical for static LIBs and non-critical for dynamic ones.3
3In [325], only critical LIBs are called LIB, while non-critical LIBs are called breaking points. This definition bases its rationale on the fact that stability is not endangered for non-critical LIBs. In fact, a common definition of local bifurcation states that a bifurcation occurs when a parameter change causes the stability of an equilibrium (or fixed point) to change. In continuous systems, this corresponds to the real part of an eigenvalue of an equilibrium passing through zero. According to this definition, breaking points are not bifurcations. However, according to a more qualitative (or philosophical) definition, a bifurcation is a point of branching or forking where a non-linear system qualitatively shows new types of behavior. In this respect, while a change of stability of a non-linear system always implies the occurrence of a bifurcation, the occurrence of a bifurcation does not necessarily imply a change of stability.
5.4 Homotopy Methods |
125 |
||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fig. 5.10 Nose curve for the IEEE 14-bus system enforcing PV generator reactive power limits
126 |
5 Continuation Power Flow Analysis |
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fig. 5.11 Nose curve for the IEEE 14-bus system enforcing PV and slack generator reactive power limits
Any other limit can be checked during the CPF analysis. For example, bus voltage magnitude limits and transmission line and transformer thermal limits. However, these limits are conceptually di erent than generator reactive power limits because the former do not directly lead to a point of collapse. However, voltage and thermal limit violations have to be avoided to prevent cascade line tripping phenomena.
5.4.4Continuous Newton’s Method and Homotopy
This subsection discusses an analogy between the homotopy method proposed by Davidenko in [72] and the continuous Newton’s method presented in Chapter 4. Di erentiating the power flow equations (5.10) at an equilibrium point, one has:
0 = gy dy + gμdμ |
(5.59) |
Equation (5.59) leads to the homotopy method proposed by Davidenko for computing the variation of y as a function of the parameter μ [72]:
dy |
= −[gy ]−1gμ |
(5.60) |
dμ |