Derivation of the Power Flow Equations & System Covariance...

29
2 2 = = + = Φ ∶ 1 e I ft e I tf e V 0 f e I 0 ft e V f e c = e V 0 f 1 = e V 0 f = e V f e c e I ft (e c) * = e I 0 ft (1) = e I 0 ft = e I ft (e c) * e I 0 ft = e V 0 f j B sh 2 + e V 0 f - e V t ( e y ft ) e I tf = e V t j B sh 2 + e V t - e V 0 f ( e y ft )

Transcript of Derivation of the Power Flow Equations & System Covariance...

Page 1: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

Derivation of the Power Flow Equations& System Covariance Matrices

Samuel Chevalier (Citations not included)

1 Power Flow Problem

The power �ow equations, given by (22) and (23), are derived in Sec. 1.2, and then an iterative solutionmethod (Newton-Raphson) for the equations is outlined in Sec. 1.3.

1.1 Pi Model with Tap Changing and Phase Shifting Transformer

Before the power �ow model can be properly derived, we must consider the transmission system model used todescribe the grid. When standard transformers are present in a per unit transmission system, their presence(aside from losses) can be neglected. Transformers with an o� nominal tap ratio or phase shifting capabilitymust be taken into account though. Figure (1) shows the presence of such a transformer incorporated intothe standard Pi circuit model for transmission lines.

𝑗𝐵𝑠ℎ

2

𝑗𝐵𝑠ℎ

2

𝑦 𝑓𝑡 = 𝑦 𝑓𝑡 𝑒𝑗∅𝑓𝑡 = 𝐺 + 𝑗𝐵 𝑉𝑓 𝑉𝑡

𝐵𝑢𝑠 𝑓 𝐵𝑢𝑠 𝑡

𝐼 𝑓𝑡

𝑐 = 𝑐 𝑒𝑗Φ ∶ 1

𝐼 𝑡𝑓

Figure 1: Pi Transmission Model with O�-Nominal Turns Ratio Transformer

The currents Ift and Itf can be derived using Kirchho�'s Current Law and the transformer equations.

The voltage across the secondary side of the transformer is given by V ′f and can be computed by rearranging

the following equation, which relates turns ratios to winding voltages. The secondary side current I ′ft canbe found in very similar way. Notice the necessary complex conjugate operator on the current equation.

Vfc

=V ′f1

=⇒ V ′f =Vfc

(1)

Ift (c)∗

= I ′ft (1) =⇒ I ′ft = Ift (c)∗

(2)

We can use the known bus voltage values to compute the unknown currents.

I ′ft = V ′f

(jBsh

2

)+(V ′f − Vt

)(yft) (3)

Itf = Vt

(jBsh

2

)+(Vt − V ′f

)(yft) (4)

The expressions for secondary winding complex voltage and current can be substituted by (1) and (2).

1

Page 2: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

Ift =

Vfc

(jBsh2

)+(Vfc − Vt

)(yft)

c∗

Itf = Vt

(jBsh

2

)+

(Vt −

Vfc

)(yft)

Both of these current values can now be placed in matrix form.[IftItf

]=

[yft+j

Bsh2

|c|2−yftc∗

−yftc yft + jBsh2

][VfVt

](5)

It can be noted that if the transformer does not cause phase shifting, the admittance matrix of (5) is sym-metric (because c is purely real). Further, if the transformer also has a nominal turns ratio, the admittancematrix simpli�es to the following symmetric matrix.[

yft + jBsh2 −yft−yft yft + jBsh2

]=

[Yff YftYtf Ytt

](6)

As will be shown in the following section, (6) is essential for the development of the Power Flow Problem.We now formally introduce the Ybus matrix which is de�ned in the following way:

Yii =sum of admittances connected to bus i

Yik = -(sum of admittances connected between bus i and k ) for i 6= k

Because the pi circuit model is used, the shunt admittance between any two buses is shared (equally) in thediagonal terms. This is only true, though, if no transformer with an o� nominal turns ratio is present. Whensuch a transformer is present, we must employ the admittance values given in (5).

For example, in a small, two bus system with c = 1, we have the following diagonal admittance values.

Y11 = 1R12+jX12

+ jB12

2

Y22 = 1R12+jX12

+ jB12

2

1.2 Derivation of the Power Flow Equations

We begin by de�ning power injections at node i as the power generated at the node minus the

power consumed.P inji = PGi − PLi (7)

Qinji = QGi −QLi (8)

For a general power system of an undetermined size, each nodal current Ii is de�ned as the injected nodalcurrent. Using Kirchho�'s Current Law, these injected currents can be calculated. The term yik is anadmittance value, while Yik is a Ybus value. The following analysis is completed for a system with c = 1 (seeFigure (1)) in order to simplify calculations. The results hold for the general case, though.

I1 = y12(V1 − V2) + y13(V1 − V3) + ...+ jB12

2V1 (9)

I1 = V1(y12 + y13...+ jB12

2) + V2(−y12) + V3(−y13) + ... = V1(Y11) + V2(Y12) + V3(Y13) + ... (10)

Alternatively, the equation for the injected nodal current can be written using the sum of the Ybus elements.We assume there are K total buses in the system.

Ii =

K∑k=1

YikVk i = 1, 2, ...,K (11)

2

Page 3: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

Assuming the Ybus matrix is known, along with all system voltages, the system currents can be calculatedby vectorizing (11).

I = YbusV (12)

where V = [V1, V2...VK ]> and I = [I1, I2...IK ]>. Once injected currents are known, injected complex powercan be calculated. At each bus, this is simply the product of the voltage and the complex conjugate of theinjected current.

Si = Sinji = P inj

i + jQinji = ViI

∗i i = 1, 2, ...,K (13)

Substituting (11) in to (13), we arrive at the power injection equation in terms the system admittance values.

P inji + jQinj

i = Vi

[K∑k=1

YikVk

]∗i = 1, 2, ...,K (14)

At this point, phasor notation of the voltages and admittance values is invoked.

Vi = Viejθi (15)

Yik = Yikejφik (16)

It is also common to write the admittance values in terms of rectangular coordinates:

Yik = Gik + jBik (17)

where G is the conductance value and B is the susceptance value. The phasor values can be substituted into(14).

P inji + jQinj

i = Vi

K∑k=1

YikVkej(θi−θk−φik) i = 1, 2, ...,K (18)

The voltage angle di�erence between node i and k is now de�ned as follows.

θi − θk = θik (19)

We use properties of complex arithmetic to decompose (18). A given phasor value rejθ can be decomposedinto its rectangular coordinates, with real part x and imaginary part y, in the following way:

rejθ = r cos(θ) + j · r sin(θ) = x+ jy (20)

The complex conjugate of this phasor will have a negated imaginary value.[rejθ

]∗= x− jy (21)

To decompose (18), the admittance value Yik is put into rectangular coordinates (as shown in (17)) and thevoltage phasor is split into rectangular coordinates using the sin and cos property of (20).

P inji + jQinj

i = Vi

K∑k=1

YikVkej(θik−φik) = Vi

K∑k=1

Vkej(θik) [Gik − jBik]

= Vi

K∑k=1

Vk [cos(θik) + j sin(θik)] [Gik − jBik]

= Vi

K∑k=1

Vk [Gik cos(θik) +Bik sin(θik) + jGik sin(θik)− jBik cos(θik)] i = 1, 2, ...,K

Now that the power injection expression has been decomposed, it can be separated into its real and reactivepower components. Following are the steady state power �ow equations.

3

Page 4: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

P inji = Vi

K∑k=1

Vk [Gik cos(θik) +Bik sin(θik)] i = 1, 2, ...,K (22)

Qinji = Vi

K∑k=1

Vk [Gik sin(θik)−Bik cos(θik)] i = 1, 2, ...,K (23)

1.3 Using the Newton-Raphson Method to Solve the Steady State Power Flow

Problem

For a given system, an iterative method can be used to solve for all of the unknown system voltage magnitudesand angles. Initially, we generate two vectors �lled with these variables. We number the system such thatthe swing bus is bus number one. Therefore, θ1 = 0 and V1 is set to a constant voltage (in dynmic modeing,there is no swing bus). Other variables may or may not be known.

θ = [θ2...θK ]>

V = [V2...VK ]>

For notation's sake, the voltage and phase angle values can be placed into a single vector of algebraicvariables.

x =

[θV

](24)

We now de�ne the mismatch equations at each bus. Ultimately, through the N-R method, we are attemptingto drive these mismatch values to zero.

fi(x) = 0 = P inji −Vi

K∑k=1

Vk [Gik cos(θik) +Bik sin(θik)] i = 2, 3, ...,K (25)

fj(x) = 0 = Qinji −Vi

K∑k=1

Vk [Gik sin(θik)−Bik cos(θik)] i = 2, 3, ...,K j = K + 1, ..., 2K − 2 (26)

f(x) = 0 =

[P(x)−Pinj

Q(x)−Qinj

](27)

Not all power injections are known (such as reactive power injections at generator (PV) buses), so theseelements are eliminated from the mismatch vector. When correct voltage and current values are �nallysolved for, the mismatch equations become zero.

In order to iteratively solve for the true values of x, the Newton-Raphson method is implemented. Thismethod uses the derivative of any function g(y) to iteratively calculate the roots of the function. Let usde�ne g(y) like so:

g(y) = (y − 1)3 − 1 (28)

Clearly, the function only has one root, located at y = 2. To use N-R to solve for this solution, we begin byguessing at a solution. We will try y = 0. Next, we implement the following equation to move this guesscloser to the roots.

yn+1 = yn −g(yn)

g′(yn)(29)

4

Page 5: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

Initial Value of yn Calculated yn+1 Iteration

0 .6667 1

.6667 3.7778 2

3.7778 2.8951 3

2.8951 2.3562 4

2.3562 2.0854 5

2.0854 2.0065 6

2.0065 2.0000 7

Table 1: Iterative Solutions to g(y) using the N-R method.

This equation can be rearranged for a more intuitive sense of how the N-R method works.

0 = (yn+1 − yn) · g′(yn) + g(yn) (30)

If we want to �nd a solution that is approximately a root for the equation g(y), we choose a new inputvalue yn+1 whose di�erence from the current input value yn multiplied by the derivative of the function atyn plus the current function value g(yn) sends the expression to 0. This will approximately send g(yn) to 0also. As this operation is repeated, the true roots of the function can be found. Table 1 shows an exampleof this process using (29) on (28).

With the power �ow problem, we are dealing with a system of nonlinear equations (which have no closedform solution), so we de�ne a Jacobian of derivative values to drive the system to a solution.

J(x) =

[∂P(x)∂θ

∂P(x)∂V

∂Q(x)∂θ

∂Q(x)∂V

](31)

The Jacobian values for all o� diagonal terms are found by taking the derivatives of (22) and (23).

∂Pi(x)

∂θk= ViVk(Gik sin(θik)−Bik cos(θik)) i 6= k (32)

∂Pi(x)

∂Vk= Vi(Gik cos(θik) +Bik sin(θik)) i 6= k (33)

∂Qi(x)

∂θk= −ViVk(Gik cos(θik) +Bik sin(θik)) i 6= k (34)

∂Qi(x)

∂Vk= Vi(Gik sin(θik)−Bik cos(θik)) i 6= k (35)

On the diagonals of this Jacobian matrix, the phase angle variables vanish, because θi − θi = 0. TheJacobian values for all diagonal terms are found by again taking the derivatives of (22) and (23). All elementsof these equations are involved (every summation element) in the diagonal terms since all of them are a�ectedby Vi or θi. This makes for a more interesting derivative.

∂Pi(x)

∂θi= −Qi(x)−BiiV 2

i (36)

∂Pi(x)

∂Vi=Pi(x)

Vi+GiiVi (37)

∂Qi(x)

∂θi= Pi(x)−GiiV 2

i (38)

∂Qi(x)

∂Vi=Qi(x)

Vi−BiiVi (39)

5

Page 6: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

Once the full Jacobian has been computed, (40) is used to compute successive solutions. (Note this equation'ssimilarity to (29)).

xn+1 = xn − J−1(xn)f(xn) (40)

Finally, (40) can be rewritten in terms of the power �ow problem.[θn+1

Vn+1

]=

[θnVn

]−

[∂P(xn)∂θ

∂P(xn)∂V

∂Q(xn)∂θ

∂Q(xn)∂V

]−1 [P(xn)−Pinj

Q(xn)−Qinj

](41)

2 Introduction to the Covariance Matrix

To illustrate how to analytically solve for a simple covariance matrix, we begin by de�ning a vector functionf(x) which has an input of three di�erent variables.

y = f(x) (42)

The three functions in f(x) are arbitrarily de�ned in (43), (44), and (45).

f1(x) = x1 + x2 + x3 (43)

f2(x) = 2x2 + x3 (44)

f3(x) = x1 + 2x2 (45)

The partial derivatives of the function are taken and placed into a vector.

fx(x) = ∇f(x) =

[∂f(x)

∂x1,∂f(x)

∂x2,∂f(x)

∂x3

](46)

Alternatively, we can de�ne this vector of derivatives as a Jacobian.

[∂f(x)

∂x1,∂f(x)

∂x2,∂f(x)

∂x3

]=

∂f1(x)∂x1

∂f1(x)∂x2

∂f1(x)∂x3

∂f2(x)∂x1

∂f2(x)∂x3

∂f2(x)∂x3

∂f3(x)∂x1

∂f3(x)∂x2

∂f3(x)∂x3

(47)

Ultimately, the derivatives in (47) are based on the basic de�nition of the derivative: dydx = 4y

4x . Therefore,

(47) can be rewritten:4y = fx(x)4x (48)

To compute the covariance matrix of the function, we use the operation shown in (49).

4y [4y]>

= [fx(x)4x] [fx(x)4x]>

= fx(x)4x [4x]>fx(x)> (49)

This can be rewritten explicitly in the notation of the symmetric covariance matrix.

σ2y =fx(x)σ2

xfx(x)> =

σ2f1f1

σ2f1f2

σ2f1f3

σ2f2f1

σ2f2f2

σ2f2f3

σ2f3f1

σ2f3f2

σ2f3f3

(50)

6

Page 7: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

3 Power System Covariance Matrix Calculation

3.1 Stochastic Noise Model and Assumptions

In modeling a dynamic power system, the noise in the system must be governed by an appropriate model.In this case, we assume stochastic noise is injected into the loads in the following way:

P(t) = P0(1 + u) (51)

Q(t) = Q0(1 + u) (52)

where u is a vector of random load �uctuations. We model these load �uctuations as an Ornstein-Uhlenbeckprocess (stationary, Gaussian, and Markovian). Since this is a mean reverting Gaussian process, the loadare constantly changing, but over time, the following observation is true:

E [P(t)] = P0 (53)

E [Q(t)] = Q0 (54)

That is, the expected values of the loads over time remain �xed at the base load value. The derivative (orinstantaneous change) in the �uctuations is given below.

u = −Eu + Inξ (55)

where In is simply the n by n identity matrix and E is a diagonal matrix of inverse time correlations.

E =

t−1corr1

0 · · · 0

0 t−1corr2

......

. . . 00 · · · 0 t−1

corrn

(56)

We de�ne the inverse time correlations like so: γ = 1tcorr

. The variableξ is a vector of independent Gaussianrandom variables. Each individual element ξi has the following properties:

E [ξi(t)] = 0 (57)

E [ξi(t)ξj(t)] = δijσ2ξδI(t− s) (58)

Clearly, each element ξi is zero mean, and it is uncorrelated with itself and with all other realizations at allother times. The intensity of the noise is given by the variance value σ2

ξ . This can be stated in the followingmanner:

〈ξi(t1)ξi(t2)〉 = σ2ξδ(t1 − t2) (59)

Based on these assumptions, we can compute the (non-normalized) auto-correlation of the load �uctuations.

〈ui(t+4t)ui(t)〉 =σ2ξ

2γe−γ|4t| (60)

If 4t = 0, the equation directly computes the variance of the noise �uctuations. It should be noted that thisis di�erent than the variance of the noise.

σ2u =

σ2ξ

2γ(61)

Now, since we know the derivative of the load �uctuations, we can use Euler's method (based in the TaylorSeries approximation) to integrate towards a future value of u(t). This process is shown in (62).

7

Page 8: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

u(t+4t) = u(t) + u(t)4t (62)

= u(t) + [−γu(t) + ξ]4t= u(t)− γu(t)4t+ ξ4t

In order to computationally generate ξ values, we can use MATLAB's �randn� function. This commandpulls data points from a zero-mean Gaussian distribution which has a variance (and standard deviation) of1. The standard deviation of the noise can be found by rearranging (61) and taking the square root of bothsides.

σξ =√

2γσu (63)

Finally, we arrive at the �nal expression for future, auto-correlated noise �uctuation values. In this expression,we invoke the MATLAB function �randn�.

u(t+4t) = u(t)− γu(t)4t+

√2γ√4t

σu · randn(1, 1)·4t = u(t)− γu(t)4t+√

2γ4tσu · randn(1, 1) (64)

3.2 Voltage and Phase Angle Covariance Matrix

We begin by writing equations for a power system in terms of algebraic and di�erential equations. Thedi�erential variables are found in x (disregard the variable de�nitions found in Sec. (1) and Sec. (2)).Generator rotor angles and speeds are examples of di�erential variables, and both of these can be found inthe dynamical swing equation de�ned by (66).

x =

δω...

(65)

Pm = Pe(δ) +Dω +Mdω

dt(66)

δ = α (ω − ω0) (67)

where α is a per unit scaling factor. The system algebraic variables are found in y. These are the voltagemagnitudes, voltage phases, and other variables used for the solving the power �ow equations and staticgenerator equations.

y =

θV...

(68)

Finally, we de�ne vector u which contains all of the load �uctuation data (this acts as an input forthe system). These variables are placed into systems of algebraic and di�erential equations: f representsthe di�erential equations and g represents the algebraic equations. The dynamic version of the power �owequations are contained in g.

x = f(x,y) (69)

0 = g(x,y,u) (70)

To derive the approximate covariance matrix for the system, we begin by linearizing (70) using the �rsttwo terms of the multivariate Taylor Series Expansion.

0 = g(x,y,u)

∣∣∣∣x,y,u

+∂g

∂x4x +

∂g

∂y4y +

∂g

∂u4u (71)

8

Page 9: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

Because we are linearizing about the solution (root), the �rst term of (71) is zero. We can rearrange theexpression and solve for 4y. For notation's sake, we can also rewrite the partial derivatives with theshorthand notation of gx, gy, and gu.

− gy4y = gx4x + gu4u (72)

Now, ∆y can be solved for explicitly, and the RHS of (72) can be written as an inner product.

4y =[−g−1

y gx −g−1y gu

] [ 4x4u

](73)

We can also linearize (69) using the �rst two terms of the multivariate Taylor Series.

x = f(x,y)

∣∣∣∣x,y

+ fx4x + fy4y (74)

We can eliminate 4y by substituting in the expression in (73). We can also de�ne 4x on the LHS of (74)by subtracting f(x,y) on both sides (this serves as the perturbation of the derivative term).

4x = fx4x + fy[−g−1

y gx −g−1y gu

] [ 4x4u

]=[fx − fyg

−1y gx −fyg−1

y gu

] [ 4x4u

](75)

A similar linearization process can be performed on (55).

u = (−Eu + Inξ) + (−Eu + Inξ)′4u = (−Eu + Inξ)− E4u (76)

Once again, we can de�ne 4u as the change of the derivative, and it can be calculated by pulling −Eu ontothe LHS of (76). Finally, we arrive at an expression for 4u.

4u = −E4u + Inξ (77)

We can now combine (75) and (77) into one single equation which relates the sensitivity of the derivativesto the sensitivity of the original variables.[

4x4u

]=

[fx − fyg

−1y gx −fyg−1

y gu

0 −E

] [4x4u

]+

[0In

]ξ (78)

where n is the length of u. By de�ning a new variable z =[4x 4u

]>and naming the matrices, we can

further simplify (78).

z = Az +Bξ (79)

The form of (79) can be exploited to (iteratively) solve for the covariance matrix of the variables in z.The Lyapunov equation can be solved, where X is the covariance matrix and A and B are de�ned in (79).

AX +XA> +BB> = 0 (80)

Aσ2z + σ2

zA> +BB> = 0 (81)

The expression in (81) will yield the covariance matrix for z, but in order to analytically solve for σ2y, we

must use the transformation found in (73) in the following fashion. σ2y is ultimately the covariance matrix

of the algebraic variables.

σ2y =

[−g−1

y gx −g−1y gu

]σ2z

[−g−1

y gx −g−1y gu

]>(82)

9

Page 10: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

3.3 Autocorrelation and Cross-Correlation Matrices

With σ2z and σ2

y known, equations from �Handbook of Stochastic Methods for Physics, Chemistry, and theNatural Sciences� by Gardiner can be used to solve for correlations. For instance, the full autocorrelationmatrix is given by (83).

E[z(t)z>(s)

]= e−A·|∆t|σ2

z ∆t = (t− s) (83)

By choosing a single variable and dividing by its variance, its normalized autocorrelation function can becalculated.

Rzi(4t) = E[zi(t)z

>i (s)

]/σ2

zi (84)

As is done in (82), the correlation matrix for z can be transformed into the correlation matrix from just thealgebraic variables.

E[y(t)y>(s)

]=[−g−1

y gx −g−1y gu

]E[z(t)z>(s)

] [−g−1

y gx −g−1y gu

]>(85)

The autocorrelation matrix E[y(t)y>(s)

]contains both the correlations of the voltage magnitudes and

voltage phases (as a subset of the full matrix). σ2y will be similar in form to (86). Of course, this will be a

fully symmetric matrix, and as the system grows su�ciently large, the covariance matrix will tend towardssparsity. This is because voltages (magnitudes and phases) associated with buses which are electrically farfrom each other are highly uncorrelated.

σ2y =

σ2θ1θ1

σ2θ1θ2

· · · σ2θ1V2

· · ·σ2θ2θ1

σ2θ2θ2

.... . .

...σ2V1V1

σ2V1V2

σ2V2θ1

σ2V2V1

σ2V2V2

... · · ·. . .

(86)

4 Extension to the Current Covariance Matrix

In Section 3, expressions for the variance, covariance, autocorrelation, and cross-correlation are derived forthe algebraic variables. These include V and θ, but they do not include I (current magnitudes and phases).To accomplish this, we must begin with basic circuit analysis of the Pi Equivalent Circuit Model.

𝑗𝐵𝑠ℎ

2

𝑗𝐵𝑠ℎ

2

𝑦 𝑓𝑡 = 𝑦 𝑓𝑡 𝑒𝑗∅𝑓𝑡 = 𝐺 + 𝑗𝐵 𝑉𝑓 𝑉𝑡

𝐵𝑢𝑠 𝑓 𝐵𝑢𝑠 𝑡

𝐼 𝑓𝑡

𝑐 = 𝑐 𝑒𝑗Φ ∶ 1

Figure 2: Pi Equivalent Transmission Line Model

Because all state variables are known and the system is fully characterized, we can use the voltagephasors and admittance values to solve for the current phasor Itf (although the phase angle will ultimately

10

Page 11: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

be ignored). Initially we use the voltage on the secondary side of the transformer V ′f . Its relationship to Vfis given in 1.

Ift =(V ′f

)jBft2

+(V ′f − Vt

)|yft| ejφft (87)

Ift =

(Vfc

)jBft2

+

(Vfc− Vt

)|yft| ejφft

The expression in (87) can rearranged such that the voltage terms are grouped separately.

Ift =

(Vfc

)(jBft2

+ |yft| ejφft)− Vt

(|yft| ejφft

)(88)

The expression in (88) can be written in terms of the expanded voltage phasors.

Ift =∣∣∣Vf ∣∣∣ ejθf

∣∣∣Bft2

∣∣∣ ej π2 + |yft| ejφft

c

− ∣∣∣Vt∣∣∣ |yft| ej(θt+φft) (89)

Now we combine the admittance terms attached to∣∣∣Vf ∣∣∣.

|y′| ejφ′

=

∣∣∣Bft2

∣∣∣ ej π2 + |yft| ejφft

|c| ejΦ(90)

Rewriting (89) yields a simpli�ed expression.

Ift =∣∣∣Vf ∣∣∣ |y′| ej(θf+φ′) −

∣∣∣Vt∣∣∣ |yft| ej(θt+φft) (91)

Both sides of the current phasor expression can be divided by the angle associated with the �rst terms inequation (91).

Ift

ej(θf+φ′)=∣∣∣Vf ∣∣∣ |y′| − ∣∣∣Vt∣∣∣ |yft| ej(θt−θf+φft−φ′) (92)

Dividing by an angle simply shifts the phasor diagram of the current; it does not alter the currentmagnitude. In this case ,we are investigating current magnitude variance, so we can shift the phasor all wewant without a�ecting magnitude. We now de�ne a new quantity I ′ft. This value has the same magnitude

as Ift but a slightly shifted phase.

I ′ft =Ift

ej(θf+φ′)(93)∣∣∣I ′ft∣∣∣ =

∣∣∣Ift∣∣∣ (94)

An expression for I ′ft can now be written.

I ′ft =∣∣∣Vf ∣∣∣ |y′| − ∣∣∣Vt∣∣∣ |yft| ej(θt−θf+φft−φ′) (95)

To gain a more intuitive sense for the problem, we can draw a triangle which relates the three separate termsin (95).

In order to determine the change in current magnitude, we employ trigonometric identities which directly

relate changes in Vf , Vt, θf , and θt to changes in∣∣∣Ift∣∣∣. The law of cosines can be employed for this purpose,

11

Page 12: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

𝑎 = 𝑉 𝑓 𝑦 ′

𝑏 = 𝑉 𝑡 𝑦 𝑓𝑡

𝐶 = 𝜃𝑡 − 𝜃𝑓 + ∅𝑓𝑡 − ∅′

𝑐 = 𝐼 𝑓𝑡′ = 𝐼 𝑓𝑡

𝐶

Figure 3: The relationship between the current vectors is shown. Three magnitudes and one angle are known.Clearly, the magnitude of the current depends on four dynamic variables: Vf , Vt, θf , and θt. The values ofφft and φ

′ are static.

as it relates three magnitudes and an angle of any sort of triangle. The law of cosines is given in (96), withmagnitudes a, b, and c and angle C given in Figure (3).

c2 = a2 + b2 − 2ab cosC (96)

Since the current magnitude is equal to the variable c in (96), we must take the implicit derivative of thefunction with respect to a, b, and C.

∂ac2 = 2c

∂c

∂a= 2a− 2b cosC

∂c

∂a=a− b cosC

c(97)

The same computation can be done for b.

∂bc2 = 2c

∂c

∂b= 2b− 2a cosC

∂c

∂b=b− a cosC

c(98)

And �nally, this can be completed for angle C.

∂Cc2 = 2c

∂c

∂C= 2ab sinC

∂c

∂C=ab sinC

c(99)

All of these derivative equations can be extended to the current, voltage, and admittance values of the trianglein (3). Again, admittance values do not e�ectively change, so at all times, |y′| and |yft| are constant. Thisfact is re�ected in the simpli�ed derivative terms below.

∂∣∣∣Ift∣∣∣

∂∣∣∣Vf ∣∣∣ =

|y′|(∣∣∣Vf ∣∣∣ |y′| − ∣∣∣Vt∣∣∣ |yft| cos(θt − θf + φft − φ′)

)∣∣∣Ift∣∣∣ (100)

∂∣∣∣Ift∣∣∣∂∣∣∣Vt∣∣∣ =

|yft|(∣∣∣Vt∣∣∣ |yft| − ∣∣∣Vf ∣∣∣ |y′| cos(θt − θf + φft − φ′)

)∣∣∣Ift∣∣∣ (101)

12

Page 13: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

∂∣∣∣Ift∣∣∣∂θf

=−∣∣∣Vf ∣∣∣ |y′| ∣∣∣Vt∣∣∣ |yft| sin(θt − θf + φft − φ′)∣∣∣Ift∣∣∣ (102)

∂∣∣∣Ift∣∣∣∂θt

=

∣∣∣Vf ∣∣∣ |y′| ∣∣∣Vt∣∣∣ |yft| sin(θt − θf + φft − φ′)∣∣∣Ift∣∣∣ (103)

As previously stated, the law of cosines gives an equation for the current magnitude.∣∣∣Ift∣∣∣2 =(∣∣∣Vf ∣∣∣ |y′|)2

+(∣∣∣Vt∣∣∣ |yft|)2

− 2(∣∣∣Vf ∣∣∣ |y′|)(∣∣∣Vt∣∣∣ |yft|) cos(θt − θf + φft − φ′)

This expression can be square rooted and then written as a function h.∣∣∣Ift∣∣∣ = h(Vf , θf ,Vt, θt) (104)

Once again, the �rst two terms of the multivariate Taylor Series Expansion can be used to �nd the sensitivityof the current magnitude with respect to voltage magnitudes and voltage phases. We will linearize aboutthe steady state operating point (i.e. Vf , θf ,Vt, θt) and solve for the sensitivity of the current magnitude.Voltage and current magnitudes will now be written as true magnitudes instead of absolute values of phasors.∣∣∣Ift∣∣∣ = Ift ≈ Ift

∣∣∣∣∣Vf ,θf ,Vt,θt

+∂Ift∂Vf4Vf +

∂Ift∂θf4θf +

∂Ift∂Vt4Vt +

∂Ift∂θt4θt (105)

Now, the LHS can be perturbed, and Ift

∣∣∣∣Vf ,θf ,Vt,θt

can be subtracted from both sides to yield the current

magnitude sensitivity. The partials also can be evaluated.

4Ift =Vf (y′)

2 −Vty′yft cos(θt − θf + φft − φ′)

Ift4Vf −

Vfy′Vtyft sin(θt − θf + φft − φ′)

Ift4θf

Vt (yft)2 −Vfyfty

′ cos(θt − θf + φft − φ′)Ift

4Vt +Vfy

′Vtyft sin(θt − θf + φft − φ′)Ift

4θt(106)

Writing 106 as an inner product yields the following expression.

4Ift =[

∂Ift∂Vf

∂Ift∂θf

∂Ift∂Vt

∂Ift∂θt

]4Vf

4θf4Vt

4θt

(107)

As expressed in (68), the algebraic variables contained in y contain all necessary values of V and θ, so thechange in the algebraic variables will be equivalent to ∆y. Using the function h de�ned in (104) along with4y, the current di�erential can be written more compactly:

4Ift =[hVf hθf hVt hθt

][4y] (108)

Finally, we vectorize the expression in (108) and generalize for the entire system.

4Ift =[hVf hθfhVthθt

][4y] (109)

Assuming we have already solved for the covariance matrices σ2z and σ2

y, then we can use a transformationbased on (108) to solve for σ2

Ift.

σ2Ift

=[hVf hθf hVt hθt

]σ2y

[hVf hθf hVt hθt

]>(110)

Employing the transformation from σ2z to σ2

y shown in (82), we arrive at the following.

σ2Ift

=[hVf hθfhVthθt

] [−g−1

y gx −g−1y gu

]σ2z

[−g−1

y gx −g−1y gu

]> [hVf hθfhVthθt

]>(111)

13

Page 14: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

5 Introduction to the IEEE 39 Bus System in PSAT

The IEEE 39 bus model has a total of ten synchronous generators in the system. In the model we have beenstudying, we use type I turbine governors models, type II AVRs, and type IV synchronous generators (formodel de�nitions, see �Power Systems Analysis Toolbox�). When the power �ow has been run, the statevariables x and the algebraic variables y are all initialized. They are de�ned below. Entries in x1 correspondto generator state variables, entries in x2 correspond to exciter state variables, entries in x3 correspond toturbine governor state variables, and entries in x4 correspond to frequency dependent load state variables.

x1 =

δ1ω1

e′q1e′d1

...δ10

ω10

e′q10

e′d10

x2 =

Vm1

Vr11

Vr21

Vf1

...Vm10

Vr110

Vr210

Vf10

x3 =

xg11

xg21

xg31

...xg110

xg210

xg310

x4 =

xFl1...

xFl31

x =

x1

x2

x3

x4

(112)

The vector x has 141 total entries. This means the state matrix will have size (141x141). The expressionfor the state matrix is de�ned in (75).

4x =[fx − fyg

−1y gx

]4x (113)

There are 169 Algebraic Variables, where the �rst 78 are theta and voltage magnitude values.

y1 =

θ1

...θ39

V1

...V39

6 Participation Factors of the Reduced Power Flow Jacobian

6.1 Building the Reduced Power Flow Jacobian

In the steady state power �ow problem, we de�ne three types of buses: PQ, PV, and the Swing Bus. Activeand reactive powers are known at the PQ buses, active powers and voltages are known are the PV buses, andvoltage and phase angle are both known at the Swing Bus. Ultimately, we want to solve for the algebraicvariables we don't know (V, θ) using power values which we do know (P,Q). Therefore, we employ thefollowing notation.

∆PR : 4P at all n− 1 buses in the system except the Swing (Reference) Bus

∆θR : 4θ at all n− 1 buses in the system except the Swing (Reference) Bus

∆QPQ : 4Q at all PQ buses in the system

14

Page 15: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

∆VPQ : 4V at all PQ buses in the system

In order to solve the steady state power �ow problem using the NR method, we employ the power �owJacobian J as shown in (41), but this is only done for buses with known power injections.[

θn+1

Vn+1

]−[θnVn

]=

[∆θ∆V

]= −

[∂P(xn)∂θ

∂P(xn)∂V

∂Q(xn)∂θ

∂Q(xn)∂V

]−1 [P(xn)−Pinj

Q(xn)−Qinj

]This is the same Jacobian which is derived when we apply the Taylor Series to the power �ow equations (22)and (23). This is done below. We linearize around the steady state operating point Vn,θn. These are thesystem wide voltage magnitudes and phases at discrete moment n. Assume this is done for all buses initially.

P inji (V,θ) ≈ Pinj

i (V,θ)

∣∣∣∣Vn,θn

+∂Pi

inj(V,θ)

∂θ∆θ +

∂P inji (V,θ)

∂V∆V (114)

Qinji (V,θ) ≈ Qinj

i (V,θ)

∣∣∣∣Vn,θn

+∂Qinj

i (V,θ)

∂θ∆θ +

∂Qinji (V,θ)

∂V∆V (115)

Subtracting the steady state operating point on both sides of the equation yields the active power andreactive power injection sensitivities. Henceforth, the ”inj” superscript is dropped: all powers are injectedpowers (de�ned by (7) and (8)).[

4Pi(V,θ)4Qi(V,θ)

]=

[∂Pi (V,θ)

∂θ∂Pi(V,θ)

∂V∂Qi(V,θ)

∂θ∂Qi(V,θ)

∂V

] [∆θ∆V

](116)

This linear system can be written using more compact notation. The Jacobian and the injected powerexpressions are extended to the entire system. Before solving the system though, we typically remove the allunnecessary variables and Jacobian elements, such as Q and V at all PV bus indices along with correspondingJacobian elements. To show this, we use the vector subscripts ∆PR, ∆QPQ, ∆θR, and ∆VPQ de�ned abovesince we have eliminated certain variables from the problem.[

∆PR∆QPQ

]=

[JPRθR JPRVPQ

JQPQθR JQPQVPQ

] [∆θR

∆VPQ

](117)

Since we are interested in deriving participation factors for only the PQ buses, we remove all of the PVand swing bus elements (rows and columns) from the original Jacobian. We are able to remove the columnsassociated with these generators because we hold4V and4θ for any given generator at 0. We can remove therows associated with the generators because we do not care about their active and reactive power variations.Therefore, we reduce the following 2n x 2n matrix down to a 2(n− (m+ 1)) x 2(n− (m+ 1)) matrix, wherethere are m PV buses and one swing bus.[

JPθ JPV

JQθ JQV

]=⇒

[JrPθ JrPV

JrQθ JrQV

]We now rede�ne the �reduced� power �ow problem, where we only incorporate the power and algebraicvariable variations of the PQ buses.[

∆Pr

∆Qr

]=

[JrPθ JrPV

JrQθ JrQV

] [∆θr

∆Vr

](118)

In order to perform V-Q sensitivity analysis (an important aspect of voltage stability analysis), we assumethat the incremental change in real power ∆Pr at each bus is equal to 0. In this way, we can study howincremental changes in injected reactive power a�ect system voltages.

15

Page 16: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

0 = JrPθ∆θr + JrPV∆Vr ⇒ ∆θr = −Jr−1Pθ JrPV∆Vr (119)

∆Qr = JrQθ∆θr + JrQV∆Vr (120)

Substituting the �nal expression for ∆θr into (120) yields the following equation.

∆Qr =[JrQV − JrQθJ

r−1Pθ JrPV

]∆Vr = [JR] ∆Vr (121)

This approach can be directly followed when there are exactly 2n algebraic variables (n voltages magnitudevariables and n voltage angle variables). If there are more than 2n variables (which will often be the casefor dynamic models and simulations), these variables can be directly removed from the state matrix. Thematrix gy can be decomposed like so:

gy =

[g

(2n,2n)y g

(2n,m)y

g(m,2n)y g

(m,m)y

](122)

We assume that the �rst 2n variables are voltage angles and magnitudes and the rest of the variables iny exist at indices 2n + 1 through m. We can compute the power �ow Jacobian which depends only on Vand θ through the following Kron reduction.

J = g(2n,2n)y − g(2n,m)

y

[g(m,m)y

]−1

g(m,2n)y (123)

This matrix can be decomposed into the reduced power �ow Jacobian as is done in (121).Assuming the power �ow problem for this system can be solved using the Newton Raphson method, the

matrix JR can be assumed non singular and written as the product of its right eigenvector matrix P , its lefteigenvector matrix Q, and its diagonal eigenvalue matrix Λ, such that:

JR = PΛQ (124)

Now that all of the eigenvectors and eigenvalues of the reduced power �ow Jacobian are given, we canemploy the technique called Selective Mode Analysis (SMA). Through SMA, modal participation factorscan be generated. We begin by normalizing the right and left eigenvectors. Due to the their orthogonality,the relationship between the ith right (column) eigenvector pi and the jth left (row) eigenvector qj can bedescribed based on the Kronecker delta function.

piqj = δj,i =

{1 i = j

0 i 6= j(125)

6.2 Participation Factors of a State Matrix

At this point, the participation factors can be derived. Before we do so for JR, let us motivate the processby starting with a slightly more familiar system. Consider the continuous-time linear time-invariant systemgiven by (126).

x(t) = Ax(t) (126)

Assuming initial conditions x(0) = x0, the solution to the dynamical system is given by the following:

x(t) = eAtx0 (127)

Since this is an LTI system, and A(t) = A, we de�ne a mode of the system by eλitpi (where pi is a righteigenvector). The solution of the system evolves along the trajectory corresponding to the initial conditionx0. Assuming matrix A has distinct eigenvalues, we will represent the matrix using the following notation(notice its similarity to (124)).

A = PAP−1 = PAQ (128)

16

Page 17: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

In (128), A is given in Jordan Form with distinct eigenvalues (all non-trivial Jordan Blocks).

A =

λ1 0 · · · 0

0 λ2

......

. . . 00 · · · 0 λn

(129)

The expression eAt can be computed using the following equation.

eAt = PeAtQ (130)

And eAt can be constructed simply.

eAt =

eλ1t 0 · · · 0

0 eλ2t...

.... . . 0

0 · · · 0 eλnt

(131)

Returning to the solution of the LTI system (127), we can substitute (130) in for eAt.

x(t) =(PeAtQ

)x0 =

[p1 p2 · · · pn

]eλ1t 0 · · · 0

0 eλ2t...

.... . . 0

0 · · · 0 eλnt

q1

q2

...qn

x0 (132)

After performing the matrix arithmetic associated with (132), the expression can be simpli�ed, where pi,jrefers to the jth element of the ith right eigenvector and qi,j refers to the j

th element of the ith left eigenvector.

x(t) =[p1 p2 · · · pn

]eλ1t 0 · · · 0

0 eλ2t...

.... . . 0

0 · · · 0 eλnt

q1 · x0

q2 · x0

...qn · x0

=

p1,1 p2,1 · · · pn,1p1,2 p2,2 pn,2...

. . ....

p1,n p2,n · · · pn,n

(q1 · x0)eλ1t

(q2 · x0)eλ2t

...(qn · x0)eλnt

The expression can now be broken down state by state.

x1(t)x2(t)...

xn(t)

=

n∑i=1

pi,1(qi · x0)eλit

n∑i=1

pi,2(qi · x0)eλit

...n∑i=1

pi,n(qi · x0)eλit

Looking at an individual state (x1(t)), we can provide a more intuitive expression for the participationfactors. To be clear, eλ1t signi�es the �rst system mode.

x1(t) = p1,1(q1 · x0)eλ1t + p2,1(q2 · x0)eλ2t + · · ·+ pn,1(qn · x0)eλnt (133)

17

Page 18: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

At this point, two interesting points can be made. First, if the initial conditions x0 lie along the trajectoryof a right eigenvalue (say, for example, x0 = αp1), then the �rst state will depend entirely on the �rstmode. This is because the left and right eigenvectors corresponding to di�erent eigenvalues are orthogonal.Therefore, their dot product is 0.

x1(t) = p1,1(q1 · αp1)eλ1t (134)

Second, if we assume the initial conditions are simply the unit vector lying in the direction of, say, the�rst coordinate axis (x0 = e1 = [ 1 0 · · · 0] ), then the expression for the �rst state simpli�es to thefollowing equation.

x1(t) = p1,1(q1,1)eλ1t + p2,1(q2,1)eλ2t + · · ·+ pn,1(qn,1)eλnt (135)

Clearly, the state is just the summation of a series of scalars. At this point, we can de�ne participationfactors as the product of the jth element of the ith right eigenvector and the jth element of the ith lefteigenvector (the index i corresponds to a system mode and the index j corresponds to a system state).

ρi,k = pi,jqi,j (136)

6.3 Participation Factors of JR

The notion of participation factors can now be related to the reduced power �ow Jacobian. Its functionalusage is de�ned in (121) and restated here:

∆Qr = [JR] ∆Vr (137)

Because JR is not a true state matrix (A) relating a state vector (x) to its derivative (x), the solutionproposed in (127) can be ignored. However, the matrix can still be decomposed in a very similar fashion.Assuming the power �ow problem for this system can be solved using the Newton Raphson method, thematrix JR can be assumed non singular and written as the product of its right eigenvector matrix P , its lefteigenvector matrix Q, and its diagonal eigenvalue matrix Λ, such that:

JR = PΛQ

Again, we de�ne the participation factors. They are de�ned in the following way, for the ith mode (eigenvalue)and the jth state. To be clear, pi,j refers the j

th element of the ith right eigenvector, and qi,j refers to thejth element of the ith left eigenvector.

ρi,j = pi,jqi,j (138)

�����������������������������������������������

Alternatively, the participation factors can be written using the left and right eigenvector matrices. In thiscase, the indices refer to the ith and jth rows and columns (however they may be used) of the right eigenvectormatrix P and the left eigenvector matrix Q.

ρi,j = Pj,iQi,j (139)

Based on the assumptions we have made about the system, we assume JR has distinct eigenvalues and linearlyindependent eigenvectors. We begin by decomposing the Jacobian using a simple similarity transform.

18

Page 19: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

∆Qr =[p1 p2 · · · pn

]λ1 0 · · · 0

0 λ2

......

. . . 00 · · · 0 λn

q1

q2

...qn

∆Vr

=[p1 p2 · · · pn

]λ1 0 · · · 0

0 λ2

......

. . . 00 · · · 0 λn

q1 ·∆Vq2 ·∆V

...qn ·∆V

=

p1,1 p2,1 · · · pn,1p1,2 p2,2 pn,2...

. . ....

p1,n p2,n · · · pn,n

λ1(q1 ·∆V)λ2(q2 ·∆V)

...λn(qn ·∆V)

It becomes helpful to look how changing voltage a�ects the change in injected reactive power of a single bus(4Q1 for example).

4Q1 = p1,1λ1(q1 ·∆Vr) + p2,1λ2(q2 ·∆Vr) + · · ·+ pn,1λn(qn ·∆Vr) (140)

In order to determine how the reactive power at bus 1 is a�ected by the voltage at only bus 1, we sim-ply hold all other voltage magnitudes constant. The voltage di�erential vector simply becomes ∆Vr =[ 4V1 0 · · · 0 ]. The reactive power di�erential equation changes accordingly.

4Q1 = (λ1p1,1q1,1 + λ2p2,1q2,1 + · · ·+ λnpn,1qn,1)4V1 (141)

At this point, we can incorporate the participation factors, de�ned in (136). Again, ρi,j de�nes how jth stateis a�ected by the ith mode. Clearly, (142) shows that individual reactive power states can be expressed as asuperposition of modes of varying degrees of participation.

4Q1 = (λ1ρ1,1 + λ2ρ2,1 + · · ·+ λnρn,1)4V1 (142)

The problem can now be re-framed slightly. In (142), we express a reactive power state as a superpositionof modes. Conversely, we can also express each mode as a superposition of di�erent states. This is useful,because we also know that the smallest eigenvalue (the one closest to 0 (all eigenvalues are real and positive))corresponds to the most unstable mode. By collecting the participation factors of the most unstable mode,we can understand how the di�erent system states (buses) contribute to the overall system instability. Ifwe compute the reactive power changes at each node based on the voltage changes at each local node, weobtain the following set of equations.

4Q1 = (λ1ρ1,1 + λ2ρ2,1 + · · ·+ λnρn,1)4V1

4Q2 = (λ1ρ1,2 + λ2ρ2,2 + · · ·+ λnρn,2)4V2

...

4Qn = (λ1ρ1,n + λ2ρ2,n + · · ·+ λnρn,n)4VnAs noted, each eigenvalue λ corresponds to a system mode. For this reason, we sum all of the participationfactors (and their coe�cient eigenvalues) associated with each mode. Because the eigenvectors have beennormalized, the following equation holds.

λ1 = λ1ρ1,1 + λ1ρ1,2 + · · ·+ λ1ρ1,n = λ1

n∑i=1

ρ1,i (143)

19

Page 20: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

where ρ1,i is the participation factor of the ith state to the �rst mode. Clearly, each mode contributes toeach state, and each state contributes to each mode. The size of the eigenvalues have one other particularlyinteresting characteristic. Recognizing that P = Q−1, the following manipulations may be made.

∆Qr =[p1 p2 · · · pn

]λ1 0 · · · 0

0 λ2

......

. . . 00 · · · 0 λn

q1

q2

...qn

∆Vr

[p1 p2 · · · pn

]−1∆Qr =

λ1 0 · · · 0

0 λ2

......

. . . 00 · · · 0 λn

q1

q2

...qn

∆Vr

q1

q2

...qn

∆Qr =

λ1 0 · · · 0

0 λ2

......

. . . 00 · · · 0 λn

q1

q2

...qn

∆Vr

Now, we can isolate a single mode (mode 1, for example).

q1∆Qr = λ1q1∆Vr

This single mode can be decomposed down into its constituent reactive power and voltage states.

q1,14Q1 + q1,24Q2 + · · ·+ q1,n4Qn = q1,14V1 + q1,24V2 + · · ·+ q1,n4Vn

Clearly, the relationship between 4Q and 4V for any jth isolated state (holding all else constant) is givenby the following expression.

q1,j4Vj

q1,j4Qj=4Vj

4Qj=

1

λj(144)

This is true for all states of a given mode. Therefore, the mode which will have the largest voltage variationfor a given reactive power change will have the smallest eigenvalue. For this reason, this mode will be ofgreat interest to study.

7 Load-Voltage (PQ/V) Sensitivity of a 2 Bus System

Shown in Figure (4) is the pi-equivalent circuit model used in the previous analysis of Sec. 4. A generatorhas been added on the �from� bus while a load of consuming Pt + jQt complex power has been added on the�to� bus. The transformer has also been removed. Using this model, we can employ the power �ow equationsto determine the �ow of both real and reactive power.

Equations (22) and (23) de�ne the injected power at bus i. Injected power is de�ned as the powergenerated at a node minus the power consumed at a node. Since we are dealing with a 2 bus system, theequations simplify. We must begin by assembling a nodal admittance matrix.

Y =

[G+ jB + j

Bft2 −G− jB

−G− jB G+ jB + jBft

2

](145)

Following are the power injections at the load bus only. Since the �from� bus is attached to a generator, weassume θf = 0 and Vf = 1.

P injt = V2

tG+ Vt [−G cos(θt)−B sin(θt)] (146)

20

Page 21: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

𝑗𝐵𝑓𝑡

2

𝑗𝐵𝑓𝑡

2

𝑦 𝑓𝑡 = 𝑦 𝑓𝑡 𝑒𝑗∅𝑓𝑡 = 𝐺 + 𝑗𝐵 𝑉 𝑓 = 𝑉 𝑓 𝑒𝑗𝜃𝑓

𝐵𝑢𝑠 𝑓 𝐵𝑢𝑠 𝑡

𝐼 𝑓𝑡 G

𝑃𝑡 + 𝑗𝑄𝑡

𝑉 𝑡 = 𝑉 𝑡 𝑒𝑗𝜃𝑡

Figure 4: Pi Equivalent Circuit Model with Generator and Load

Qinjt = −V2

t (B +Bft2

) + Vt [−G sin(θt) +B cos(θt)] (147)

Clearly, neither power injection expression depends on θf since θtf = θt − θf = θt. Since no power (real orreactive) is generated at the �to� bus, the injected power expressions are simply equal to the negative of thepower consumed at this bus. Therefore, the following is true:

PLoadt = −

(P injt

)= Vt [G cos(θt) +B sin(θt)]−V2

tG (148)

QLoadt = −

(Qinjt

)= V2

t (B +Bft2

) + Vt [G sin(θt)−B cos(θt)] (149)

Assuming the transmission line in long, then then resistance is much smaller than the series reactance. Wetherefore neglect the line conductance along with the shunt susceptance. This simpli�es the equations.

PLoadt = VtB sin(θt) (150)

QLoadt = V2

tB −VtB cos(θt) (151)

For the sake of convention, we will convert to reactance: X = − 1B since G = 0. Also, we can write the

complex power of the load in the following way, where β = tan(φ) is a power factor parameter and φ is thephase shift between the load voltage and current.

SLoadt = PD(1 + jβ) (152)

Using this notation, PD = PLoadt and βPD = QLoad

t . Equations (150) and (151) can be combined and θt canbe eliminated by using the identity sin2 θ + cos2 θ = 1.(

PLoadt

)2= (PD)

2=

(−Vt sin(θt)

X

)2

(QLoadt +

V2t

X

)2

=

(βPD +

V2t

X

)2

=

(Vt cos(θt)

X

)2

(PD)2

+

(βPD +

V2t

X

)2

=V2t

X2

(PD)2

+ β2P 2D +

V4t

X2+

2βPDV2t

X=

V2t

X2

V4t + (2βPDX − 1) V2

t +((β2 + 1)P 2

DX2)

= 0 (153)

21

Page 22: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

0 0.5 1 1.50

0.2

0.4

0.6

0.8

1

1.2

1.4

PF = .97 lag

PF = 1

PF = .97 lead

V2 t

System Load PD

Student Version of MATLAB

Figure 5: �To� Bus Voltage Magnitude plotted as a function of System Load

The equation given by (153) is the quadratic formula for V2t . Therefore, it can be solved for explicitly.

(V2t

)=

(1− 2βPDX)±√

(2βPDX − 1)2 − 4 ((β2 + 1)P 2

DX2)

2(154)

As the system approaches a saddle node bifurcation (located at the maximum power transfer point on thenose curve), the voltage magnitude clearly become much more sensitive to power variations. Such sensitivityis exhibited by an exponential increase in voltage variance as the system becomes overloaded. This is shownrather clearly in Figure (5).

We can employ the delta method on (154) to estimate the variance of the bus voltage as a function ofpower demand (PD). First, we begin by taking the square root of both sides.

Vt =

√√√√ (1− 2βPDX)±√

(2βPDX − 1)2 − 4 ((β2 + 1)P 2

DX2)

2(155)

According to the delta method, the variance of the function f(X), where X is a random variable of knownmean and variance, can be calculated using the delta function like so (higher order terms of the Taylor seriesare neglected).

σ2f (X ) ≈ f

′(E[X])2σ2X (156)

The �rst step for employing the delta method is taking the derivative of Vt:

dVt

dPD=

1

2

1

2− βPDX +

√(2βPDX − 1)2 − 4

((β2 + 1)P 2

DX2)

2

− 1

2

× (157)

(−βX +

1

4

((2βPDX − 1)2 − 4

((β2 + 1)P 2

DX2))− 1

2 (4 (2βPDX − 1)βX − 8(β2 + 1)PDX

2))

The variance of the voltage can now be found through the calculation de�ned in (156). This expressioncan be veri�ed in MATLAB.

σ2V ≈

(dVt

dPD

∣∣∣∣E[PD]

)2

σ2PD (158)

22

Page 23: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

The following two �gures show this method in action. After de�ning a two bus power system, we computethe �to� bus voltage as a function of β (as is done in (155). Next, after injecting stochastic noise into thesystem for a series of load levels (up to PD ≈ 1.29), we compute the variance with (158). We evaluate thisexpression at E[PD], or the average noise level (found via simulation).

0.8 0.9 1 1.1 1.2 1.30

2

4

6

8x 10

−5

Bus

Vol

tage

Var

ianc

e

System Load PD

Student Version of MATLAB

Figure 6: Bus Voltage Variance as Load Increases (Variance computed analytically)

The load can be increased even more (up to PD ≈ 1.37) in order to show the dramatic e�ects of increasedloading on variance. Clearly, the variance approaches ∞ as the loading level approaches the nose curve.

0.8 1 1.2 1.4 1.60

0.2

0.4

0.6

0.8

1

1.2

1.4x 10

−3

Bus

Vol

tage

Var

ianc

e

System Load PD

Student Version of MATLAB

Figure 7: Bus Voltage Variance as Load Increases (Variance computed analytically)

Since an analytical function for bus voltage variance is known, we can now calculate another usefulderivative: the change in bus voltage variance with respect to the change is reactive power. The parameterβ relates directly to the amount of reactive power relative to the total active power.

dσ2V

8 E�ects of a Tap Changer on the PV Nose Curve

When a tap changing transformer is present on a transmission line, the �to� bus voltage can be regulatedby increasing or decreasing the tap ratio (note: we assume there is not phase shift in this example). Such asystem is shown in Figure 8.

23

Page 24: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

𝑗𝐵𝑠ℎ

2

𝑗𝐵𝑠ℎ

2

𝑦 𝑓𝑡 = 𝑦 𝑓𝑡 𝑒𝑗∅𝑓𝑡 = 𝐺 + 𝑗𝐵 𝑉𝑓 𝑉𝑡

𝐵𝑢𝑠 𝑓 𝐵𝑢𝑠 𝑡

𝐼 𝑓𝑡

𝑐 = 𝑐 ∶ 1

𝐼 𝑡𝑓 G

𝑃𝑡 + 𝑗𝑄𝑡

Figure 8: Pi Model with Tap Changing Transformer

8.1 Solving the Simpli�ed Lossless System: G = Bsh

s= 0

We will now solve for the �to� bus voltage as a function of load for a speci�ed power factor value, but wewill ignore line resistance and shunt capacitance. We can solve this system using a very similar method tothe one employed in Section 7, except we must update the admittance matrix appropriately (by adding theo�-nominal tap ratio).

Y =

[G+jB+j

Bsh2

c2−G−jB

c−G−jB

c G+ jB + jBsh2

]=

[Yff YftYtf Ytt

](159)

Following are the power injections at the load bus only. Since the �from� bus is attached to a generator, weassume θf = 0 and Vf = 1 .

P injt = V2

tG+ Vt

[−G cos(θt)−B sin(θt)

c

]== V2

tG+ Vt [−G cos(θt)−B sin(θt)]Vf

c?

Qinjt = −V2

t (B+Bsh

2)+Vt

[−G sin(θt) +B cos(θt)

c

]== −V2

t (B+Bsh

2)+Vt [−G sin(θt) +B cos(θt)]

Vf

c?

Clearly, neither power injection expression depends on θf since θtf = θt − θf = θt. Since no power (real orreactive) is generated at the �to� bus, the injected power expressions are simply equal to the negative of thepower consumed at this bus. Therefore, the following is true:

PLoadt = −

(P injt

)= Vt

[G cos(θt) +B sin(θt)

c

]−V2

tG (160)

QLoadt = −

(Qinjt

)= V2

t (B +Bsh

2) + Vt

[G sin(θt)−B cos(θt)

c

](161)

Assuming the transmission line in long, then then resistance is much smaller than the series reactance. Wetherefore neglect the line conductance along with the shunt susceptance. This simpli�es the equations.

24

Page 25: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

PLoadt =

VtB sin(θt)

c(162)

QLoadt = V2

tB −VtB cos(θt)

c(163)

For the sake of convention, we will convert to reactance: X = − 1B since G = 0 . Also, we can write the

complex power of the load in the following way, where β = tan(φ) is a power factor parameter and φ is thephase shift between the load voltage and current.

SLoadt = PD(1 + jβ)

Using this notation, PD = PLoadt and βPD = QLoad

t . Our load expressions can be simpli�ed and combined,and θt can be eliminated by using the identity sin2 θ + cos2 θ = 1.

(PLoadt

)2= (PD)

2=

(−Vt sin(θt)

Xc

)2

(QLoadt +

V2t

X

)2

=

(βPD +

V2t

X

)2

=

(Vt cos(θt)

Xc

)2

(PD)2

+

(βPD +

V2t

X

)2

=V2t

X2c2

(PD)2

+ β2P 2D +

V4t

X2+

2βPDV2t

X=

V2t

X2c2

V4t +

(2βPDX −

1

c2

)V2t +

((β2 + 1)P 2

DX2)

= 0

This equation is given by the quadratic formula for V2t . Therefore, it can be solved for explicitly.

(V2t

)=

(1c2 − 2βPDX

)±√(

2βPDX − 1c2

)2 − 4 ((β2 + 1)P 2DX

2)

2(164)

Following is a plot of the square of load voltage as a function of demand for varying values of c. The powerfactor corresponds to a capacitive load.

25

Page 26: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

0 0.5 1 1.50

0.5

1

1.5

c = 1

c = .95

c = .85

V2 t

System Load PD

Student Version of MATLAB

Figure 9: V 2t bus voltage as a function of PD for various tap values: c = Vf

Vt. Power Factor = .97 leading

8.2 Solving the Full System: G 6= 0 & Bsh

s6= 0

In this case, we can solve for the �to� bus voltage in a very similar method to the one employed in Section8.1. We begin with the same admittance matrix.

Y =

[G+jB+j

Bsh2

c2−G−jB

c−G−jB

c G+ jB + jBsh2

]=

[Yff YftYtf Ytt

](165)

Following are the power injections at the load bus only. Since the �from� bus is attached to a generator, weassume θf = 0 and Vf = 1 .

P injt = V2

tG+ Vt

[−G cos(θt)−B sin(θt)

c

]== V2

tG+ Vt [−G cos(θt)−B sin(θt)]Vf

c?

Qinjt = −V2

t (B+Bsh

2)+Vt

[−G sin(θt) +B cos(θt)

c

]== −V2

t (B+Bsh

2)+Vt [−G sin(θt) +B cos(θt)]

Vf

c?

Clearly, neither power injection expression depends on θf since θtf = θt − θf = θt. Since no power (real orreactive) is generated at the �to� bus, the injected power expressions are simply equal to the negative of thepower consumed at this bus. Therefore, the following is true:

PLoadt = −

(P injt

)= Vt

[G cos(θt) +B sin(θt)

c

]−V2

tG (166)

QLoadt = −

(Qinjt

)= V2

t (B +Bsh

2) + Vt

[G sin(θt)−B cos(θt)

c

](167)

Rearranging both sides yields the following expressions.

26

Page 27: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

PLoadt + V2

tG =Vt

cG cos(θt) +

Vt

cB sin(θt) (168)

QLoadt −V2

t (B +Bsh

2) =

Vt

cG sin(θt)−

Vt

cB cos(θt) (169)

Also, we can write the complex power of the load in the following way, where β = tan(φ) is a power factorparameter and φ is the phase shift between the load voltage and current (θv − θi).

SLoadt = PD(1 + jβ)

Ultimately, we wish to solve for Vt explicitly. To eliminate the nonlinear trigonometric terms, we squareboth expressions (θt can be eliminated through the identity sin2 θ + cos2 θ = 1). We also write the activeand reactive load demand in terms of PD and β.

(PD + V2

tG)2

=

(Vt

cG cos(θt) +

Vt

cB sin(θt)

)2

(170)

(βPD −V2

t (B +Bsh

2)

)2

=

(Vt

cG sin(θt)−

Vt

cB cos(θt)

)2

(171)

Computing the square of each side yields the following expanded expressions.

P 2D + V4

tG2 + 2PDV2

tG =V2t

c2G2 cos2(θt) +

V2t

c2B2 sin2(θt) + 2

V2t

c2BG sin(θt) cos(θt)

β2P 2D + V4

t (B +Bsh

2)2 − 2βPDV2

t (B +Bsh

2) =

V2t

c2G2 sin2(θt) +

V2t

c2B2 cos2(θt)− 2

V2t

c2BG sin(θt) cos(θt)

Both of these equations can now be summed together. As shown, the �nal terms in cancel out and theexpression simpli�es.

P 2D + V4

tG2 + 2PDV2

tG+ β2P 2D + V4

t (B +Bsh

2)2 − 2βPDV2

t (B +Bsh

2)

=V2t

c2G2 cos2(θt) +

V2t

c2B2 sin2(θt) +

V2t

c2G2 sin2(θt) +

V2t

c2B2 cos2(θt) + 2

V2t

c2BG sin(θt) cos(θt)− 2

V2t

c2BG sin(θt) cos(θt)

=V2t

c2G2(cos2(θt) + sin2(θt)

)+

V2t

c2B2(sin2(θt) + cos2(θt)

)=

V2t

c2G2 +

V2t

c2B2

=V2t

c2(G2 +B2

)We can bring all terms onto the left side of the equation and thus set the expression equal to 0. The equationis �ipped around and like terms can be grouped.

27

Page 28: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

0 = P 2D + V4

tG2 + 2PDV2

tG+ β2P 2D + V4

t (B +Bsh

2)2 − 2βPDV2

t (B +Bsh

2)− V2

t

c2(G2 +B2

)= V4

t

(G2 + (B +

Bsh2

)2

)+ V2

t

(2PDG− 2βPD(B +

Bsh2

)−(G2 +B2

c2

))+ V0

t

(P 2D + β2P 2

D

)This equation can be solved by using the quadratic formula for V2

t . Therefore V2t can be solved for explicitly.

V2t =

−(

2PDG− 2βPD(B +Bsh

2 )−(G2+B2

c2

))±√(

2PDG− 2βPD(B +Bsh

2 )−(G2+B2

c2

))2− 4

(G2 + (B +

Bsh2 )2

) (P 2D + β2P 2

D

)2(G2 + (B +

Bsh2 )2

)(172)

One last operation will yield the explicit �to� bus voltage.

Vt =

√√√√√√−(

2PDG− 2βPD(B +Bsh

2 )− Gc2− B2

c2

)±√(

2PDG− 2βPD(B +Bsh

2 )− Gc2− B2

c2

)2− 4

(G2 + (B +

Bsh2 )2

) (P 2D + β2P 2

D

)2(G2 + (B +

Bsh2 )2

)(173)

This expression uses series admittance (conductance & susceptance) terms. Line parameters are usuallygiven in terms of series impedance (resistance & reactance). The relationship between these parameters isgiven below.

R = R{

1

G+ jB

}⇒ G = R

{1

R+ jX

}(174)

X = I{

1

G+ jB

}⇒ B = I

{1

R+ jX

}(175)

Following is a plot of the �to� bus voltage as a function of demand for varying values of c. The power factorcorresponds to a slightly inductive (lagging) load. The following line parameters were used (roughly basedo� averages from the IEEE 39 Bus System parameters):

R = 0.003

X = .03Bsh

2= 1

0 0.5 1 1.5 2 2.5 30

0.5

1

1.5

c = 1c = .85

c = .7

Vt

System Load PD

Student Version of MATLAB

Figure 10: Vt bus voltage as a function of PD for various tap values: c = VfVt. Power Factor = .99 lagging

28

Page 29: Derivation of the Power Flow Equations & System Covariance …schevalier.com/.../02/Power-Flow-and-Covariance-Matrix.pdf · 2017-02-10 · Derivation of the Power Flow Equations &

There is one interesting point to note after observing the results from Figures 9 and 10: even when theload PD = 0, the �to� bus voltage Vt is NOT simply equal to Vf (minus shunt losses). If no current is �owingto the load, there is no current �owing through the transformer, meaning it will not be stepping the voltageup by the appropriate tap ratio. If this is the case, when PD = 0, we should see Vt ≈ Vf = 1. Because ofhow the admittance matrix is structured, though, this is not the case. The admittance matrix is structuredin a way that assumes the primary side voltage will be adjusted (increased, in this case) by 1

c . Therefore, if

no current is �owing in the circuit, and there is no voltage drop, we will have Vt =Vfc .

As is done in Section 7, the variance of the �to� bus voltage can be solved for using the Delta Methodgiven by (156). Once again, we inject load noise according to the model outlined in subsection (3.1). Noiseis added to the load PD in the following way:

PD(t) = PD0(1 + u)

The load �uctuation parameter follows an Ornstein-Uhlenbeck process, and it has the following mean andstandard deviation.

E[u] = 0

σu = 0.01

Based on these values, we can calculate the standard deviation and expected value of the load.

E[PD] = 0

σPD= PD ∗ 0.01

Next, the derivative of (172) must be taken (with respect to PD) for the top side of the nose curve.

V′t =

dVt

dPD

=1

2

−(

2PDG − 2βPD(B +Bsh

2) − G

c2− B2

c2

)+

√(2PDG − 2βPD(B +

Bsh2

) − Gc2− B2

c2

)2− 4

(G2 + (B +

Bsh2

)2) (P2D

+ β2P2D

)2

(G2 + (B +

Bsh2

)2)

− 1

2

×

1

2

(G2 + (B +

Bsh2

)2)−

(2G − 2β(B +

Bsh

2)

)+

1

2

2PDG − 2βPD(B +Bsh

2) −

G

c2−B2

c2

2

− 4

(G

2+ (B +

Bsh

2)2) (P

2D + β

2P

2D

)−12×

2

2PDG − 2βPD(B +Bsh

2) −

G

c2−B2

c2

(2G − 2β(B +Bsh

2)

)− 4

(G

2+ (B +

Bsh

2)2) (

2PD + 2β2PD

)

29