Powerapps - Optimal Power Flow Formulation: Dr. Raghunatha Ramaswamy Opf Document-Some Notes Thursday, May 12, 2011
Powerapps - Optimal Power Flow Formulation: Dr. Raghunatha Ramaswamy Opf Document-Some Notes Thursday, May 12, 2011
Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
1
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
Table of Contents
1 OPF Problem Statement ....................................................................................................................... 3
1.1 Vector u ......................................................................................................................................... 3
1.1.1 Costs Associated with Vector [u] for Economic Dispatch ..................................................... 4
1.1.2 Costs Associated with Transmission loss minimization ........................................................ 5
1.1.3 Minimizing Transmission Cost/ or Cost of Specific Power Transaction ................................ 5
1.1.4 Minimizing the Bus Power Cost ............................................................................................ 5
1.1.5 ATC Calculation .................................................................................................................... 5
1.1.6 Tie Line Power Control .......................................................................................................... 5
1.1.7 Tracing of Tie Line Power Flows ........................................................................................... 5
1.2 Vector x ......................................................................................................................................... 5
1.3 Vector h ......................................................................................................................................... 6
2 Reduced Model Formulation ................................................................................................................. 6
2.1 Transmission Loss Minimization by Minimizing the Slack Generation ......................................... 8
2.2 Economic Dispatch with Network Constraints .............................................................................. 9
2.2.1 Minimization of Generation Cost or Cost of Production ........................................................ 9
2.2.2 Handling Slack Generation Cost ......................................................................................... 10
2.3 Security Constraints .................................................................................................................... 10
2.3.1 Handling MVA limits ............................................................................................................ 10
2.4 Sensitivities ................................................................................................................................. 11
2.4.1 Sensitivities of Bus Powers with respect to bus voltage magnitudes and angles ............... 11
2.4.2 Sensitivities of Bus Powers with respect to shunt reactive power compensation ............... 12
2.4.3 Sensitivities of Bus powers with respect to transformer tap ............................................... 12
2.4.4 Sensitivities with respect to controlled series compensation .............................................. 14
2.4.5 Sensitivities with respect to phase shifters ......................................................................... 14
2.4.6 Sensitivities of Bus Voltages to Bus Power Injections ........................................................ 15
2.4.7 Calculation of the Slack Bus Generation Sensitivity ........................................................... 18
2.4.8 Calculation of Sensitivities of the Reactive power Generation ........................................... 19
2.4.9 Line/Transformer Flows Security constraints ...................................................................... 19
3 Simplex Tableau Formulation ............................................................................................................. 20
3.1 Size of the LP Tableau ................................................................................................................ 22
4 References .......................................................................................................................................... 22
2
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
Subject to constraints
[Controller minimum and maximum limits] (3)
[Dependent variable minimum and maximum limits] (4)
[Functional Security Constraints] (5)
Constraints defined by (2) are the power flow equations to be satisfied at any operating point. These
(equation 2) simply denote that the load flow mismatch power must be 0 for specified operating point and
for given values of x and u.
1.1 Vector u
Vector u is a set of control variables which may comprise
1) Generator excitations . Excitation is a control variable as it can be controlled by the AVR of the
generator.
2) Constant MVAR type reactive power controls. Though most reactive power compensations are shunt
capacitors or shunt reactors of constant impedance type, constant MVAR type compensation can be
considered in view of the fact, that load powers are specified as constant powers for load flow
problem. Thus constant MVAR type compensation will enable us to know the MVAR compensation
3) Transformer taps: The actual implementation uses inverse of the tap, . This control is
needed for given load to improve the objective and meet constraints.
represented by the vectors,, , , !" . Algorithm will use these values in per
3
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
Constant impedance type compensations may be represented by vectors - #, # , # , # !" .
4) Capacitive reactive power compensations of constant impedance type, like shunt capacitors.
The limits are specified in MVAR and converted to susceptance within the PowerApps program on
system base MVA.
impedance type compensations may be represented by vectors - #, # , # , # !" . Note the
5) Inductive reactive power compensations of constant impedance type like shunt reactors. Constant
user may specify the compensation limits in MVAR and the same may be converted to susceptance
format [b] on system MVA base.
vectors$, $ , $ , $ !" , where all values are in per unit and on system base. These are
6) Active power bus injections: These controllers may be denoted by the
currently restricted to economic dispatch function for generators only. In PowerApps the problem of
economic dispatch using these controls are solved first, followed by reactive power dispatch using
7) Series Compensation represented by vectors or variables as%, % , % , % !" on system
other specified controllers.
base.
Where, . These variables may be represented by- ', ' , ' , ' !" .
8) Phase shifter control. Similar to transformer, a phase shifter is represented by a complex turns’ ratio.
&
For Generator MW controllers specified in section 1.1 a common cost model based on MW power flow
can be used. The cost model can be of the format
( () * ( + * (, +, (6)
Where, () , is a fixed cost in Currency/MW installed capacity, irrespective of the fact whether the
particular unit/component is in service or not. This is a kind of facility charge to be levied to get returns on
investment on facilities.
The costs, ( and (, are operating costs based on the operation of the unit/component and covers the
cost of operation, maintenances and any other miscellaneous expenses
Cost
1600
1400
1200
1000
800
Cost
600
400
200
0
Pmw 0 10 20 30 40 50 60 70 80 90
4
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
The coefficients of equation [6] can be obtained from the cost curves as shown in the figure using curve
fitting techniques.
Since C0 is a fixed component, it remains constant and costs are minimized based on variable
components C1 and C2 only.
As explained previously slack generation is dependent variable in load flow jacobian as transmission loss
is unknown quantity. Minimization transmission loss is equivalent to minimization of slack MW
generation. Consequently we can express slack generation as function of other control variables and
minimize the same for minimizing the transmission loss. This assumes that all other bus power
specifications are specified and constant. This in turn implies MW power controls cannot bus used as
controls when minimizing slack generation for purpose of loss minimization. If MW controls are used with
slack bus power as minimization function, slack bus power will reduce without any guarantee of loss
minimization.
This cost model can follow the equation 6, where P refers to specific power transaction in a specified line
or lines. P is to be expressed as function of other control variables as transmission line flows are
dependent variable.
Again this may follow the same cost model as equation [6]. Bus power need to be expressed as function
of various controllers using sensitivity relations and the cost model has to be used.
With MW power controls specified along with any other controls indicated, we might try to maximize the
line loading of specified tie-line, subject to security constraints. This provides an increase tie-line flow
without violating any security constraint and indicates the Available transmission capacity of the line.
The security constraints of tie line flows are function of the various controls. The cost coefficients
associated with a given tie line flow, indicates which controls are most efficient in controlling power flows
in a given tie line. Consequently OPF can provide solutions to tie line power control.
The sensitivities of tie line power flows with respect to generation MW controls indicate the participation of
the various generation companies and load centers in the power flow of a particular tie-line flow. This
information is likely to be useful while trying to minimize the cost of the transmission or determining the
payments to be made to the generation companies from end consumers.
1.2 Vector x
Vector x denotes the dependent variables state variables, bus voltage magnitude and phase angles of all
PQ buses in the system. Further bus voltage angles of PV buses are also part of the vector x. The slack
bus voltage angle is a fixed parameter.
Most other dependent variables such as reactive power generation, slack generation, line flows etc. are
5
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
From the consumer point of view, phase angle does not have much significance and these do not appear
directly in any constraints or objective equation in direct manner. However, from the quality of power
supply point of view, bus voltage magnitudes needs to be maintained within acceptable tolerances. Thus
we need to specify the limits on bus voltage in per unit. Typically these limits are 1.05 per unit for upper
1.3 Vector h
These are security limits and comprises of
- MW flows through lines at given operating power factor. MVA flow sensitivities needs to be
- MW flows through transformers at given operating power factor. MVA flow sensitivities needs to
- Specified MW flow through phase shifter. This may not be necessarily security limit, but an
equality constraint for scheduled power flow in a given line. By specifying the limits equal to the
Note: Scheduled power exchange over line can be specified as equality constraint with maximum and
minimum limits specified as same value, making it an equality constraint.
, 0 (2),
Can be linearized around the power flow solution [Where the mismatch is 0 or minimum] to get the
following equations
/ 1 ∆ * / 1 ∆ 0
0 0
0 03
(7)
or
0 5 0
∆ 4 / 1 / 1 ∆
0 03
(8a)
or
Where,
0 5 0
6 4 / 1 / 1
0 03
(8c)
6
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
0 5
Note the inverse / 1 is simply the inverse of the power flow jacobian at the operating point, under
0
consideration.
• Bus voltage angle of all buses [except the slack bus voltage angle], which is invariant and a fixed
specified parameter during load flow solution.
• Bus voltage magnitude of all PQ buses [except for slack and PV Generator bus, which are control
variables].
Note that even when load flow converts some PV buses to PQ buses to satisfy the reactive power
limit, the generator buses are always treated as PV bus for purpose of sensitivity calculations as
per equation (8).
If 7#8 is the number of buses and 79 is the number of generators, then, will have
Again we notice that is made of $, . and is made of several type of controllers. Consequently we may
write equation (8a) as follows [written in the form of a single bus, each entries however, denotes a vector,
or matrix as applicable.]
∆EBF E
M EB E P
5 0A L F O
∆E E
0A 0A 0A 0A
||
0A 0A 0A
0EBF E 0G 0 0I 0J 0& L ∆# O
; ∆= ? 4 @0C D @ D ∆ O (8d)
∆< 0< 0|B|
0C L
|| ∆E E
0C 0C 0C 0C 0C
∆. O
0C
0& L
|=|
0< 0|B| 0EBF E 0G 0 0I 0J
L ∆% O
K ∆' N
Each entry in (8d) is either a matrix or vector. We need to compute all the values of (8d) in an efficient
way. In actual implementation, equation (8d) is formulated as pairs of [∆Q, |B| for each bus [P,Q], i.e these
∆B
variables appear alternatively in the matrix, rather than as separate vector’s or matrices. The exact
structure of [8d] for a 2 bus system, connected between bus “i” and bus “j” and having two controllers’ u1
and u2 will be as follows
5
EU E P
0AR 0AR
| |
0AR 0AR
M 0<R
0AR 0AR
∆Q 0|BR | 0<S 0EBS E M03V 03W P
M ∆BR P L 0CR 0CR
| |
0CR 0CR O
EU E O L 0CR 0CR O
L |BR| O L 0<R 0|BR | 0<S 0EBS E L03V 03W O ∆
L ∆<S O L0AS O L 0AS 0AS O X∆ Y
L EU EO
0AS 0AS 0AS
L ∆=S O L 0<R | |
(8e)
L03V 03W O
,
0|BR | 0<S 0EBS E O
K T=S T N L0CS L0CS 0CS O
E EO
0CS
| |
0CS 0CS
K 0<R 0|BR | 0<S 0EBS E U N K03V 03W N
Note that for any bus voltage angle, or voltage magnitude, we determine sensitivity with respect to any
given controller from (8e). [Of course, we will not have entries corresponding to slack bus voltage angle
and voltage magnitudes corresponding to each generator bus and slack bus, as these do not exist in the
load flow jacobian]
From the equation (8c) and (8e) it is seen that 6 has a dimension of 2Nbus*Nu, where Nbus is number
of buses and u is number of controllers. Thus to get (i,j) element of the 6 we only need to multiply i
th
0 5
row of 4 / 1 with j column of / 1.The calculation of 6 , is therefore done without using full matrix
0
7
th
0 03
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
0 5
technique. Instead using sparse matrix technique, the required row of 4 / 1 , is generated and is
0
multiplied with required column of / 1. Further the matrix / 1 is also sparse and only non-zero elements
0 0
03 03
of this matrix need to be stored in a compact format.
If Nbus is the total number of buses, Nu is the total number of controllers, the first matrix on the RHS of
(8d) is 2Nbus*2Nbus dimension. The second matrix on RHS of (8d) is [2Nbus*Nu] dimension. The
resulting product is 2Nbus*Nu dimension. We only need to use this resulting matrix dimension for storing
required information with size [2Nbus*Nu]. The same matrix may be later used for LP Tableau after all
sensitivities are computed. Organizing this computer memory storage efficiently is the important
requirement in the OPF software development.
The slack generation +Z , is function of dependable variables x and control variables u
The changes in slack generation due to changes in x and u is therefore given by
0A[\ ] 0A[\ ]
∆+Z / 1 ∆ * / 1 ∆
0 03
(9a)
0A[\ ] 0A[\ ]
∆+Z / 1 6 ∆ * / 1 ∆
0 03
(9b)
0A[\ ] 0A[\ ]
∆+Z X/ 1 6 * / 1 Y ∆
0 03
(9c)
Thus we minimize the slack generation, ∆+Z , which is equivalent to loss minimization, under the
assumption that other generations are fixed and invariable. The coefficients of ∆, in (9c) are the required
cost coefficient in the objective function. The cost coefficient having highest magnitude evidently denotes
the control variable of highest influence on the objective function.
Note again, that in this problem, all MW generations are fixed from economic dispatch and cannot be
changed. Thus this problem is equivalent to optimal reactive power dispatch, with all MW generations
held constant.
Note that the vector u, in this problem does not have active power injection as a control variable.
Typically among the vector u, only the slack generation excitation control ∆E E influences the slack
generation,+Z . No other controllers are likely to be connected directly to the slack bus.
Note we should not specify generator transformer tap controller and Generator excitation controller
together as they have the same similar role to play. Both these controllers influence the reactive power
output similarly. Consequently tap controllers are specified for ICT’s or for transformers connected
8
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
0A[\ ]
The term / 1 ∆ in equation (9b) therefore usually represent only the slack bus ∆E E. The effect of the
03
]
other controllers on slack generation is accounted by the term / [\1 6 ∆. However, care must be
0A
0
taken to account for the direct influence of any other controller on slack generation.
No MW Generation Controller should be used with this objective, as the assumption is all MW
generation are fixed and minimization of slack generation is the minimization of system losses.
If there are no major security constraint violations in the solution of section 2.1, we may say that we have
the optimal solution. But security constraints such as the following may exist
[Note ABT constraints fall under the above. ABT is also related to frequency. Frequency is not directly
handled in OPF which is a static analytical model, where frequency cannot be modeled. However,
frequency is related to power flows and it is usually possible to predict the loading condition and resulting
frequency, based on system operating condition observation in energy control centers. These
observations are used in imposing the line load limits and operating limits to control frequencies]
It may now be necessary to introduce additional controllers like MW generations, which are ignored in the
section 2.1
In addition the transmission cost is omitted in the section 2.1 and the economic dispatch was considered
purely the cost of generation only. However, in the present day – deregulated market, the cost of
transmission, distribution and generation are all different. This cost is now available for all components as
per section 1.1.1.
The above equations have both control variables u[Bus power injections from generations Pi] and
dependent variables [dependent Pi of components whose cost also has to be minimized, say,
transmission cost – May comprise transmission line flows, Load bus powers].
Except for the slack generation, remaining generations are modeled as control variables in load flow
jacobian. The dependent variables of slack generation [Refer equation (9c)] and line flows [Refer
equation 11(b) and 11(d)] must be expressed in terms of other controllers and used in equation [9d].
Let + be the d , generation with cost model ( () * ( + * (, +, , Then, the variation of the cost of d
e(
( * 2(, +
e+
9
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
To minimize the total cost of generation in the system we need to minimize the sum of all expressions
similar to [9e], thus our objective will be
Minimize
∆( ∑c
c ∆( ∑c) ∆+ ∑c
c ( * 2(, + ∆+
c 0gR
0AR
[9f]
Where n is the number of generation control whose cost is to be minimized. The slack generation is
expressed in terms of other controllers and used in [9f].
Without doubt, the cost of the slack generation must be included in [9f]. However the slack generation is
dependent on other controllers and its relation with other controllers is given by the expression
0A[\ ] 0A[\ ]
∆+Z X/ 1 6 * / 1 Y ∆
0 03
(9c)
Consequently the entire expression of (9c) must be multiplies with (Z * 2(,Z + and later added to
equation [9f] to obtain the objective function.
(5)
Where
, (10)
∆ / 1 ∆ * / 1 ∆
0d 0d
0 03
(11a)
∆ X/ 1 6 * / 1Y ∆
0d 0d
0 03
(11b)
Elements of h may comprise reactive power limits of generation, line loading limits [either MW or MVA] as
function of control variables.
The power flow jacobian handles active and reactive power mismatches and provide active and reactive
10
power sensitivities. Similarly sensitivity of active and reactive power flows can also be obtained from the
power flow expressions. To handle MVA limits we need to use the following relations
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
- $, * . ,
h
, (11c)
∆
- ∆$ * ∆.
0i 0i
0" 0I
(11d)
$, * . , 5 , . 2$
0i h
0" ,
(11e)
Since,
- $, * . , 5
h
, (11f)
We get
-. $
0i
0"
(11g)
-. .
0i
0I
(11h)
Thus if we now mva flow, active power flow p and reactive power flow q, and sensitivity of active power
flow and reactive power flow with respect to [x] and [u], we can formulate mva flow limit constraints in the
OPF problem.
2.4 Sensitivities
2.4.1 Sensitivities of Bus Powers with respect to bus voltage magnitudes and angles
k||, Ql and independent bus voltage magnitudes [generator excitation specifications{| |}] are obtained
The sensitivities of the bus power injections with respect to dependent bus voltage magnitude and angles
by using partial derivatives as used in formulation of power flow jacobian [1]. The following notations [1]
are used in partial derivatives. The sensitivity with respect to the slack bus voltage angle [reference bus]
is ignored as it is invariant and a reference angle.
s * p#
(12b)
m s
(12c)
(12d)
| | n 4 # 9n
0Av 0Cv
0<w 0|Bw |
(13a)
4 | | 9n * # n
0Cv 0Av
0<w 0|Bw |
(13b)
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
Equations 13a to 13f provides the required sensitivity of the bus power injections with respect to the bus
voltage magnitude and their phase angles. Note that these sensitivities are same as load flow jacobian
elements.
2.4.2 Sensitivities of Bus Powers with respect to shunt reactive power compensation
Let,qd , be the per unit susceptance of the shunt reactive power compensation provided at a bus and yd
be the bus voltage magnitude in per unit. The reactive power injected in to the bus by the shunt element
is given by
The sensitivity of the reactive power absorption as a function of shunt susceptance is given by
4|d |,
0C[z
0{[z
(14b)
For constant power compensation the right hand side of equation (14b) becomes -1.0
Equations (14a) and (14b) influences only the reactive power bus injections at the bus to which the
compensating equipment is connected. The equations (14a) and (14b) correspond to / 1 ∆ portion of
0
03
the equation (7).
Note: |}~ in 14(a) denotes power flowing out of the bus, which is positive for inductor [with –
ve }~ ] and |}~ is negative for capacitors [with +ve }~ ], with these notations the derivative
|}~
}~
, will have similar conventions like line flows.
In the next section sensitivity of the reactive power flow in transformer is given. The transformer is
connected between buses p and q. If the transformer tap is 1 and bus q is grounded [voltage magnitude
sine component will be -90 and equal to -1.0 and "I denotes susceptance q"I . Thus (15k) will be
and angle 0], the equations (15k) represents equation for a shunt reactor as follows, For a pure reactor
0
."I s
I 4E", "I Esin"I
,
E" E q"I (15k)
t q
p
T:1 ypq
12
T=1/
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
Let p and q be the transformer terminal buses with the off nominal turns ratio T:1, with the relation .
The series admittance of the transformer is "I . ‘t’ is the fictitious node representing the terminal of ideal
transformer T: 1 turns ratio.
EB E
|B |
(15a)
(15h)
Now we use the relation from (15a) in (15g) and (15h). i.e. | | E" E and Q Q" . Further by changing
the subscript, ‘t’ to ‘p’, appropriately and separating real and imaginary parts we get the following
$"I 9k I l E , ", "I Ecos"I 4E" I "I E8Q" 4 QI 4 "I (15i)
$I" 9kI I l EI, "I E8"I 4 E" I "I E8QI 4 Q" 4 "I (15j)
."I s
I 4E , ", "I Esin"I 4 E" I "I E8Q" 4 QI 4 "I (15k)
.I" s
I I 4EI, "I Esin"I 4 E" I "I E8QI 4 Q" 4 "I (15l)
[A special case of 15k for shunt compensation is found by setting Eq=0, 1, which gives equation
(14a)]
The partial derivative equations of the flows with respect to the variable is given by the following
0"
0
2E", "I Ecos"I 4 E" I "I E8Q" 4 QI 4 "I (15m)
0"
0
4E" I "I E8QI 4 Q" 4 "I (15n)
0I
42E", "I Esin"I 4 E" I "I E8Q" 4 QI 4 "I
0
(15o)
13
0I
4E" I "I E8QI 4 Q" 4 "I
0
(15p)
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
From equation (15m, 15n, 15o, 15p), it is seen that bus powers P and Q of “from (p)” and “to (q)” buses
are affected. This information from equations (15m to 15p) is part of equation/ 1 ∆.
0
03
If B is the susceptance in per unit [negative for inductance and positive for capacitance], connected
between the two buses p and q, the following power flow equations apply.
becomes as follows]
."I s
" "I 4#"I E", E * #"I E" I E8Q" 4 QI
(16f)
.I" s
I I 4#"I EI, E * #"I E" I E8QI 4 Q"
(16g)
The partial derivatives of the power flow equations with respect to #"I are as follows
(16h)
4E E} 4
(16i)
4E E} 4
(16j)
4E E * E E¡¢} 4
(16k)
4E E * E E¡¢} 4
(16l)
t q
p
a:1 ypq
14
Page
a=1/'
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
The following equation gives the mathematical model of the phase shifter
¥ ¥
"I 4 "
X Y ¤ ¥
¦X Y
I" 4 "I I
(17a)
||§¨; ' |'|§©; ¨ 4©; "I E"I E§"I , then the power flow equations for the phase shifter
are given by [refer to two winding transformer equations for analogy]
$"I 9k I l E' , ", "I E 4 E'" I "I E8© * Q" 4 QI 4 "I (17b)
$I" 9kI I l EI, "I E 4 E'" I "I E8QI 4 Q" 4 © 4 "I
."I s
I 4E' , ", #"I E 4 E'" I "I E8© * Q" 4 QI 4 "I
(17c)
.I" s
I I 4EI, #"I E 4 E'" I "I E8QI 4 Q" 4 © 4 "I
(17d)
(17e)
Note that equations 17b to 17e are similar to equations (15i) to (15l)
Function Derivative
sin(x) cos(x)
cos(x) − sin(x)
ª««¬
ª
E®¯« ¯¬ °«¬ E±²³ * ´« 4 ´¬ 4 µ«¬ (17f)
ª«¬«
4E®¯« ¯¬ °«¬ E±²³´¬ 4 ´« 4 4 µ«¬
ª
(17g)
ª¬«¬
4E®¯« ¯¬ °«¬ E¶·± * ´« 4 ´¬ 4 µ«¬
ª
(17h)
ª¬¬«
E®¯« ¯¬ °«¬ E¶·±´¬ 4 ´« 4 4 µ«¬
ª
(17i)
The inverse of the load flow jacobian provides the required sensitivity of the dependent variables,, with
respect to the bus power injections. The bus power injections form the right hand side of the load flow
jacobian equation [the mismatch vector].
PowerApps’s jacobian matrix follows the formulation as per the reference [1]. The general structure
between nodes ‘k’ and ‘m’ are denoted in the following equation.
15
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
|t | |
|
M eQ P M ∆Qn P
e+t e+t e+t e+t
| | | |
∆+n
L ex |
|O L v O M ∆x P
e t eQ
e
|t |
∆B
t
ext ext ex
L eQ O L Bv O L n O
t t
t | |
e t eQ
e| |
L OL OL O (18)
Le+ OL O L O
L eQ |t | |
|O L∆Q O L ∆+ O
e+
e+
e+
O L ∆Bw O K∆x N
| | e| |
Lex
e t eQ
|t | |
|N K Bw N
t
K eQ
ex
ex
ex
t | |
e t eQ
e| |
Notes:-
1. For slack bus the corresponding angle column does not exist as slack bus voltage is the
reference bus. Correspondingly there is no P mismatch entry for slack bus.
not exist. Correspondingly there is Q mismatch entries [∆xn and voltage magnitude correction
2. For all PV bus where voltage control is possible, the corresponding column and corrections do
entries [∆n /n . This applies to Slack bus also as the slack bus voltage is a control variable.
3. The entries of the jacobian matrices are computed from equations 12 and 13.
4. The inverse of the jacobian matrix in equation (18) is the sensitivity matrix and provides the
injection. Note we do not get the sensitivity with respect to slack generation ∆+Z and reactive
sensitivity of the bus voltage angle and magnitude with respect to the active and reactive power
power generations, ∆x as these are not modeled in the right hand side of the load flow jacobian
equation [There is no mismatch power component for these]. Both these are dependent
variables.
5. The jacobian matrix is structurally symmetric, but the values are not symmetric.
6. By providing 1.0 per unit power injection [or mismatch ] at bus ‘k’ and keeping all other mismatch
entries 0 in equation 18, and solving (18), we get the sensitivity of the entire system bus voltage
magnitude and phase angle with respect to the injected 1.0 per unit power. Thus we can obtain
sensitivity for 1.0 per unit active or reactive power. The resulting sensitivity solution is the
0 5
corresponding column of the inverse of the load flow jacobian/ 1 .
0
The equation (18) provides the first part of equation (7), which is reproduced here.
/ 1 ∆ * / 1 ∆ 0
0 0
0 03
(7)
The second part is the variation of the bus power injections with respect to the controllers which we have
considered earlier.
2.4.6.2 Sensitivity of Bus Power Injection for Constant Impedance Type Compensation
In this case equation (14b) is applicable and is reproduced again from section 2.4.2
4|d |,
0C[z
0{[z
(14b)
This implies that the unity or ‘-1’ value in equation (18a) is now replaced by 4|d |,
16
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
The equations (15m) to (15p) of two winding transformers provides the entries relevant entries of
equation (18a) , where there will be 4 entries for sending end P,Q and receiving end P,Q and contributes
E¹ º E 4 E » E¡¢} 4 4 ¼
to the second part of the equation (7). The relevant portion are repeated here again
¹
(15m)
4E » E¡¢} 4 4 ¼
¹
(15n)
4 E¹ E 4 E » E} 4 4 ¼
¹
(15o)
4E » E} 4 4 ¼
¹
(15p)
From equation (15m, 15n, 15o, 15p), it is seen that P,Q of “from” and “to” buses are affected. This
information from equations (15m to 15p) is part of equation/ 1 ∆.
0
03
Similarly it should now be possible to relate bus power sensitivities of other controllers to / 1 ∆½
º
½
matrix. Most series elements, such as phase shifter, series compensated lines are similar to
transformer in the sense these controllers affect P,Q flows like transformers.
Generator excitation controlE E, influences the generator active power generation, reactive power
generation and bus power injections of the connected buses. These are computed from equation 13.
However, we must note that generator active power generation is a specified quantity and do not change.
Only the slack active power generation is dependent variable and entries related to this will be non-zero.
|n | entries do not exist for PV buses [where k is generator bus]. But exist for
0Av
0|Bv |
Thus in equation 13,
slack bus. Equation (13) is reproduced in the following once again.
|¿ | Á¿ ¾ 4 ¿ þ
À¾ |¾
¿ |¿ |
(13a)
4 |¿ | Á¿ þ * ¿ ¾
|¾ À¾
¿ |¿ |
(13b)
Since Generator Excitation corresponds to Slack bus and PV bus in PowerApps load flow, the elements
of partial derivatives with respect to slack bus voltage angle and with respect to generator excitation will
Page
not exist in regular load flow. Consequently we need to temporarily convert the slack bus and the PV
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
buses to PQ buses and formulate the jacobian. This jacobian will now contain all related sensitivities and
required partial derivatives must now be extracted from this jacobian. For identifying and differentiating
this jacobian from load flow jacobian, wherein all buses are considered as PQ buses we can call this as
PQjacobian instead of load flow jacobian. Note the PQjacobian will also have information about generator
reactive power output partial derivative with respect to generator excitation controls which forms part of H
matrix for security constraints.
Note that Slack Generation ∆+n does not exist in equation (18) in the load flow jacobian. Consequently
we need to compute this separately as follows
| | n 4 # 9n
0Av 0Cv
0<w 0|Bw |
(13a)
4 | | 9n * # n
0Cv 0Av
0<w 0|Bw |
(13b)
Now assume that the bus ‘k’ in the equations refers to slack bus and bus ‘m’ refers to non-slack bus.
Further assume bus ‘m’ is not a PV bus [i.e. voltage controlled bus, meaning slack bus is not directly
connected to PV bus].
Equations (13a) and (13b) give the variation of the slack generation [in this case ‘Pk’] with respect to the
bus voltage angle and bus voltage magnitude of bus ‘m’.
Equation (13c) is not valid for slack bus, whose angle ‘Qn ’ is the reference angle and is typically 0 in value.
Typically slack bus voltage magnitude is a control variable and belongs to vector ‘u’ and equation (13e)
provides the necessary sensitivity of the slack generation with respect to its own excitation control ‘Ek’.
Note that generator transformer taps are not part of control variables. The effect of generator taps
can be handled through ‘Ek’. Thus the slack bus generation via its own generator transformer is
ignored. [Do not represent generator transformer tap as control variables in the input data]
The slack bus generation is expressed in terms of the control [u] and dependent [x] variables as follows
∆+Z
e+8 e+8
∆ * ∆
(19b)
e e
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
∆+Z X 6 Y ∆
e+8 e+8
* (19c)
e e
Equation (19c) is the required cost function, when the objective of the optimization is minimization
of the slack generation or minimization of the transmission loss.
Similar to slack generation, the reactive power generation ∆xn does not exist in equation (18). We
2.4.8 Calculation of Sensitivities of the Reactive power Generation
therefore have to use the equations 12 and 13 again to compute the sensitivities in the following format
similar to slack generation
∆x X 6 Y ∆
ex ex
* (20)
e e
Notes:
corresponding generator excitation E E which belongs to the vector u. [Equation (13f) is applicable in this
1. Usually the only control variable that influences a specific generator reactive power generation is the
case]. No other controller is likely influence reactive power generation, unless they are directly connected
to the Generator bus, which appears unlikely. Generator transformer tap is usually not considered as a
control variable]
2. The second term related to dependent variable influence on changes in generator reactive power is
given by equations (13a), (13b), and (13d). [Equation (13d) is not applicable for slack bus, as slack
voltage angle does not change]
∆ X/ 1 6 * / 1Y ∆
0d 0d
0 03
(11b)
The elements of the first matrix in (11b) are related to dependent variables [bus voltage magnitudes,
phase angles of PQ buses, fixed tap positions or variables on the left hand side of equation (18)].
The elements of the second matrix in (11b) are related to control variables that directly influences the
power flows in concerned line/transformer/phase shifter/series compensator etc.
tap 1 for lines as tap is not applicable in case of lines. The elements of (11b) are computed from the
Constraints on line/transformer flows are implemented based on equations given for transformers. The
$"I 9k I l E , ", "I Ecos"I 4E" I "I E8Q" 4 QI 4 "I (15i)
$I" 9kI I l EI, "I E8"I 4 E" I "I E8QI 4 Q" 4 "I (15j)
."I s
I 4E , ", "I Esin"I 4 E" I "I E8Q" 4 QI 4 "I (15k)
.I" s
I I 4EI, "I Esin"I 4 E" I "I E8QI 4 Q" 4 "I (15l)
19
The partial derivative equations of the flows with respect to the variable is given by the following
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
E¹Å º E 4 EÅ Å » E¡¢} 4 4 ¼
¹
(15m)
4EÅ Å » E¡¢} 4 4 ¼
¹
(15n)
4 E¹Å E 4 EÅ Å » E} 4 4 ¼
¹
(15o)
4EÅ Å » E} 4 4 ¼
¹
(15p)
For normal lines, 1, [not a control variable]. For transformer exists as control variable portion [u]. For
phase shifter additional variables will exist [phase shift angle]. For TCSC series compensation will exist as
control variable.
the generator bus voltage as control variable will exist in the formulation of / 1.
~
Apart from the control variable, if the circuit in question is directly connected to a generator bus,
½
either bus ‘p’ or bus ‘q’ is a generator bus or "I refers to variable series compensation or ¼ , has part of
In equations (15i) to (15p), (15m) to (15p) type of equations with respect to controllers will exist only if
phase shifter angle. In the absence of these there will be no entries related to / 1 matrix, of equation
0d
03
(11b).
The entries of / 1 will exist in (11b) related to variables belonging to dependent variables [x].
0d
0
Subject to constraints
[Controller minimum and maximum limits] (3)
[Dependent variable minimum and maximum limits] (4)
[Security Constraints] (5)
0 5 0
∆ 4 / 1 / 1 ∆
0 03
(8a)
∆ 6 ∆ (8b)
0A[\ ] 0A[\ ]
, ∆+Z X/ 1 6 * / 1 Y ∆ ( ] ∆
0 03
Page
(9c)
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
∆ X/ 1 6 * / 1Y ∆ Æ∆
0d 0d
0 03
(11b)
0A[\ ] 0A[\ ]
Minimize , ∆+Z X/ 1 6 * / 1 Y ∆ ( ] ∆
0 03
(9c)
However in actual implementation we Maximize the negative of (9c) and change the limits to ≤ instead of
≥, consequently our problem becomes
Maximize
0A[\ ] 0A[\ ]
4, 4∆+Z 4 X/ 1 6 * / 1 Y ∆ 4( ] ∆
0 03
[22a]
subject to
4∆
4∆
[22c]
∆
∆
[22d]
4Æ∆
4∆
[22e]
Æ∆
∆
[22f]
[22h]
Equation [22] may be put in matrix notation or simplex tableau as follows [23 Tableau]
46 4∆
6 ∆
4Æ 4∆
Æ ∆
4s 4∆
s ∆
4( ] 0
[22i]
The 0 in the bottom right cell indicates that the initial value of the objective function is 0.
Student must be able to compute the individual matrices of the tableau 23 and formulate the tableau of
[23] using class CPFCMat
21
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011
This document is a Proprietary Property of Kalkitech prepared by Dr Raghunatha Ramaswamy of PSG. Reproduction of
any portion of this document without specific permission from Kalkitech is prohibited.
A. The number of columns in the tableau is = number of control variables + 1. If Nu is the number of
control variables considered for the OPF problem, then, the number of columns in the LP tableau
is Nu+1. The array of CPFCControlvar class in CPFCCase will give the number of control
variables considered for the OPF studies.
B. The number of rows in Sx = number of dependent variables having constraints. Assuming there
are constraints only on bus voltage magnitude, this number is equal to the number of PQ buses
[of bus type 3]. Thus if Ngen is the number of generators, Nbus is the number of buses, the
number of PQ buses are (Nbus-Ngen)
C. The number of rows of [H] matrix is equal to the number of security constraints specified. It
becomes expensive to consider all possible line flow constraints. As a minimum we may consider
only generator reactive power limits only, in which case the we will have Ngen number of rows in
[H] matrix. If line flow constraints are also considered [as may be needed for ABT solutions], the
number of rows in [H] will increase by the number of line flow constraints considered. Student
may therefore provide an input option for which line flows needs to be considered.
D. The identity matrix in the tableau is diagonal and has same number of rows and columns as the
number of controllers Nu.
E. The total number of rows in the LP tableau is twice the number of constraints as upper and lower
limits are represented separately. In addition there is one more bottom row which stores the cost
coefficient of the objective function.
4 References
1. William F.Tinney, Clifford E.Hart, “Power flow solution by Newton’s method”, IEEE transactions on
Power Apparatus and Systems, Vol. PAS-86, No. 11, November 1967.
2. Hermann W. Dommel, William F.Tinney, “Optimal Power Flow Solutions”, IEEE transactions on
Power Apparatus and Systems, Vol. PAS-87, No. 10, October 1968.
22
Page
Dr. Raghunatha Ramaswamy OPF Document-Some Notes Thursday, May 12, 2011