You are on page 1of 106

EE-862: Power System Operation

& Control
Fall-2020

School of Electrical Engineering & Computer


Science (SEECS)

1
Optimal Power-Flow

• The problem of optimizing the performance of a


power system network is formulated as a general
optimization problem.
• It is required to state from which aspect the
performance of the power system network is
optimized
• In optimization problem, the objective function
becomes ‘to minimize the overall cost of
generation in economic scheduling and unit
commitment problem

2
Optimal Power-Flow

• It is based on allocating the total load on a station


among various units in an optimal way with cases
being taken into consideration in a load-scheduling
problem.
• It is based on allocating the total load on the system
among the various generating stations.

3
Optimal Power-Flow

The optimal power flow problem:


• Refers to the load flow that gives maximum system
security by minimizing the overloads
• Aims at minimum operating cost and minimum
losses
• Based on operational constraints
• The optimal power flow (OPF), couples the ED
calculation with a power flow calculation so that the
ED and the power flow are solved simultaneously

4
Optimal Power-Flow
• The total losses of the power system are simply part of
the power flow calculation and are reflected in the
loading of the generation on the reference bus—thus,
• There is no need to specifically calculate the losses
since they are inherently a part of the power flow.
• More importantly, the ED can be constrained to meet
transmission system limits such as MW or MVA flow
limits on lines or transformers or voltage limits on buses.
• The result is the generation dispatch representing the
minimum $/h total generation cost and that also solves
the power flow at that optimum.

5
Optimal Power-Flow

• The optimization problem of minimizing the


instantaneous operating costs in terms of real and
reactive-power flows.
• The optimal power flow problem without considering
constraints, i.e., unconstrained optimal power flow
problem, is first studied and then the optimal power
flow problem with inequality constraints is studied.
• The inequality constraints are introduced first on
control variables and then on dependent variables.

6
Optimal Power-Flow
Does not Include e Cost

Does not Include Line limits

7
Optimal Power-Flow

8
Optimal Power-Flow

9
Optimal Power-Flow
WITHOUT INEQUALITY CONSTRAINTS
The primary objective of the optimal power flow
solution is to minimize the overall cost of generation.
This is represented by an objective function (or) cost
function as
Eq. 1

subject to power (load) flow constraints

Eq. 2
Eq. 3

10
Optimal Power-Flow
WITHOUT INEQUALITY CONSTRAINTS

where 𝑉𝑖 = | 𝑉𝑖 |∠𝛿𝑖 is the voltage at bus ‘i’

𝑉𝑗 = | 𝑉𝑗 |∠𝛿𝑗 is the voltage at bus ‘j’


𝑌𝑖𝑗 = | 𝑌𝑖𝑗 |∠𝜃𝑖𝑗 is the mutual admittance
between the i and j buses
𝑃𝑖 = the specified real-power at bus i

𝑄𝑖 = the specified reactive-power at bus i

11
• The net real power injected into the system at
the ith bus

𝑃𝑖 = 𝑃𝐺𝑖 − 𝑃𝐷𝑖

• The net reactive power injected into the system


at the i bus,

𝑄𝑖 = 𝑄𝐺𝑖 − 𝑄𝐷𝑖

12
Optimal Power-Flow
WITHOUT INEQUALITY CONSTRAINTS
For load buses (or) P–Q buses, P and Q are specified and
hence Equations (2) and (3) form the equality constraints.
For P–V buses, P and |V| are specified as the function of
some vectors and are represented as

where x is a vector of dependent variables


and y is a vector of independent variables
Represented as

13
Optimal Power-Flow
WITHOUT INEQUALITY CONSTRAINTS

14
Optimal Power-Flow
WITHOUT INEQUALITY CONSTRAINTS
• Out of these independent variables certain variables are
chosen as control variables
• Which are to be varied to yield an optimal value of the
objective function.
• The remaining independent variables are called fixed or
disturbance or uncontrollable parameters

Let ‘u’ be the vector of control variables and ‘p’ the vector
of fixed or disturbance variables

15
• Hence, the vector of independent variables can
be represented as the combination of vector of
control variables ‘u’ and vector uncontrollable
variables ‘p’ and is expressed as

• The choice of ‘u’ and ‘p’ depends on what aspect


of power system is to be optimized. The control
parameters may be:

16
• The control parameters may be:
1. Voltage magnitude at P–V buses,
2. P at generator buses with controllable power
3. Slack bus voltage and regulating transformer
tap setting as additional control variables
4. In the case of buses with reactive-power control,
𝑄𝐺𝑖 is taken as a control variable.
Now, the optimal power flow problem can be stated as

17
Now, the optimal power flow problem can be stated as

Subject to equality constraints

Define the corresponding Lagrangian function by


augmenting the equality constraint to the objective
function through a Lagrangian multiplier λ as
18
19
Where λ is a vector of the Lagrangian multiplier of
suitable dimension and is the same as that of equality
constraint, f (x, u, p).
The necessary
Eq. 4
conditions for an
optimal solution
are as Eq. 5

Equality constraints Eq. 6

20
21
22
Optimal Power Flow Solution by N–R method

Consider the general load flow problem of the N–R


method by considering a set of ‘n’ non-linear algebraic
equations

Be the initial values

Be the corrections, which on


being added to the initial guess,
give an actual solution

23
Optimal Power Flow Solution by N–R method

By expanding these equations according to Taylor’s series


around the initial guess, we get

+higher
Terms

Are the derivatives of fi with


respect to

24
Optimal Power Flow Solution by N–R method

Neglecting higher order terms, we can write Equation


in a matrix form as

Eq. 7

25
Optimal Power Flow Solution by N–R method

Or in vector matrix form as

Eq.8

where 𝑗 𝑜 is known as the Jacobian matrix and is obtained


by differentiating the function vector ‘f ’ with respect to
‘x’ and evaluating it at 𝑥 𝑜

26
Optimal Power Flow Solution by N–R method

By comparing with Equations (4), (5), and (6) with (7)


and (8) it is observed that is the Jacobian
matrix

Jacobian matrix and The partial derivatives of equality


constraints with respect to dependent variables are
obtained as Jacobian elements in a load flow solution.
The equality constraints are basically the real and
reactive-power flow equations

27
Optimal Power Flow Solution by N–R method

Then, may be expressed as partial derivatives of

28
Optimal Power Flow Solution by N–R method

The Equations (4), (5), and (6) are non-linear algebraic


equations and can be solved iteratively by employing a simple
technique that is a ‘gradient method’ and is also called the
steepest descent
The basic technique employed in the steepest descent
method is to adjust the control parameters ‘u’ so as to move
from one feasible solution point to a new feasible solution
point in the direction of the steepest descent (or negative
gradient). Here, the starting point of feasible solution is one
where a set of values ‘x’ (i.e., dependent variables) satisfies
Equation (6) for given ‘u’ and ‘p’.

29
Optimal Power Flow Solution by N–R method

The new feasible solution point refers to a location where the


lower objective function is achieved
These moves are to be repeated in the direction of negative
gradient till minimum value is reached.
Hence, this method of obtaining a solution to non-linear
algebraic is also called the negative gradient method

30
Algorithm for computational procedure

Step 1: Make an initial guess for control variables 𝑢0


Step 2: Find the feasible load flow solution by the N–R
method. The N–R method is an iterative method and the
solution does not satisfy the constraint equation (6). Hence,
to satisfy Equation (5), ‘x’ is improved as algebraic is also
called the negative gradient method as follows

Δx is obtained by solving the set of linear equations


of the Jacobian matrix of Equation (8) as given
below
31
Algorithm for computational procedure

The final results of Step-2 provide a feasible


solution of ‘x’ and the Jacobian matrix

32
Algorithm for computational procedure

Step 3: Solve Equation (4) for λ and it is obtained

Eq. 9

Step 4: Substitute λ from Equation (9) into


Equation (5) and calculate the gradient
For computing the gradient, the Jacobian
matrix, ,is already known from Step 2.

33
Algorithm for computational procedure

Step 5: If the gradient is nearly zero within


the specified tolerance, the optimal solution is
obtained. Otherwise
Step 6: Find a new set of control variables as

Here, Δu is a step in the negative direction of the gradient.


The parameter α is a positive scalar, which controls the
step i’s (size of steps), and the choice of α is very important.
34
Inequality constraints on control variables

• The inequality constraints are introduced on control


variables, and then the method of obtaining a
solution to the optimal power flow problem is
discussed.
• The permissible values of control variables, in fact, are
always constrained, such that.

For example, if the real power or reactive-power generation


are taken as control variables, then inequality constraints
become
35
Inequality constraints on control variables

In finding the optimal power flow solution, Step 6 of


the algorithm gives the change in control variable as

Here and the new control variable

36
Inequality constraints on control variables

This new value of control variable must be checked whether


it violates the inequality constraints on the control variable

If the correction Δu causes to exceed one of the limits, ‘u ’


is set equal to the corresponding limit, i.e., the new
value of u is determined as

otherwise set

37
Inequality constraints on control variables

After a control variable reaches any of the limits, its


component in the gradient should continue to be computed
in later iteration, as the variable may come within limits at
some later stages. The optimality condition under inequality
constraints can be rewritten as Kuhn–Tucker conditions

38
Inequality constraints on control variables

Therefore, now, in Step 5 of the algorithm of Section, the


gradient vector has to satisfy the optimality condition given
by Equation

39
OPTIMAL POWER FLOW USING THE
DC POWER FLOW

• A linear approximation to power flow


• Not a Power Flow Computation for DC network
• Simplifying assumptions
All Line resistances are ZERO
All Voltage Magnitudes are equal to 1 p.u.
Voltage Angle are so small that
sin( 𝜃𝑖 − 𝜃𝑘 ) ≅ ( 𝜃𝑖 − 𝜃𝑘 )
cos( 𝜃𝑖 − 𝜃𝑘 ) ≅ 1

40
Power Flow Equations
N
PkI - å Vk Vi[Gki cos(q k - q i ) + B ki sin(q k - q i )] = 0
i=1
N
QkI - å Vk Vi[Gki sin(q k - q i ) - Bki cos(q k - q i )] = 0
i=1

• Set of non-linear simultaneous equations


• Need a simple linear relation for fast and intuitive
analysis
• DC power flow provides such a relation but
requires a number of approximations
Assumptions
Neglect Reactive Power
N
PkI - å Vk Vi[Gki cos(q k - q i ) + B ki sin(q k - q i )] = 0
i=1
N
QkI - å Vk Vi[Gki sin(q k - q i ) - Bki cos(q k - q i )] = 0
i=1

N
PkI - å Vk Vi[Gki cos(q k - q i ) + B ki sin(q k - q i )] = 0
i=1
Assumptions
Neglect Resistance of the Branches
N
PkI - å Vk Vi[Gki cos(q k - q i ) + B ki sin(q k - q i )] = 0
i=1

N
PkI - å Vk Vi Bki sin(q k - q i ) = 0
i=1
Assumptions.
All Voltage Magnitudes = 1.0 p.u
N
PkI - å Vk Vi Bki sin(q k - q i ) = 0
i=1

N
PkI
- å Bki sin(q k - q i ) = 0
i=1
Assumptions
All angles are small N
PkI - å Bki sin(q k - q i ) = 0
i=1

If a is small: sina » a (a in radians)

N N
(q k - q i )
PkI - å Bki (q k - q i ) = 0 or PkI -å =0
i=1 i=1 x ki
Interpretation
N
(q k - q i )
PkI -å =0
i=1 x ki P1I P2I
P12
q1 q2
N
x12
PkI - å Pki = 0 x13 x 23
i=1 P31 P23
(q - q i ) q3
Pki = k
x ki P3I

(q1 - q 2 ) (q 2 - q 3 ) (q 3 - q1 )
P12 = ; P23 = ; P31 =
x12 x 23 x13
Why is it called dc power flow?

• Reactance plays the role of resistance in dc circuit


• Voltage angle plays the role of dc voltage
• Power plays the role of dc current

(q k - q i ) (Vk - Vi )
Pki = I ki =
x ki R ki
DC power flow
• Start with the objective function

Here i is an index over the buses and is the cost function of


the generator at bus i.
Generator limit inequality constraints

This formulation, however, uses the DC power flow formulation as


DC power flow
DC power flow
• Formulate the DCOPF problem using the Lagrange
multiplier approach .
• Write the basic formulation of the problem as

This formulation includes a term at the right-hand end that is


there as an equality constraint to force the reference-bus phase
angle to 0 (without this constraint the OPF will not solve
properly). The generator inequality constraints can then be added
so that we obtain
DC power flow

• Formulate the DCOPF problem using the Lagrange


multiplier approach .
• Write the basic formulation of the problem as
Example: DC power flow

Using the three-generator ED problem , we have


Example: DC power flow

We have solved this example to deliver 850 MW and


the result of ED ignoring losses was

The Lagrange multiplier as


Example: DC power flow
Example: DC power flow

The Bx matrix is formed using


the line reactances as follows
Example: DC power flow
To keep the power injections
in MW, we multiply [Bx] by
100, and the result is

Do the calculations using the Lagrangian while ignoring the


generation limits.
This allows to have only equality constraints, and the
solutions of the Lagrangian are simply a solution of a set of
linear equations.
The expression for the Lagrangian with the power flow
equations written out becomes
Example: DC power flow
Example: DC power flow
• we have assumed the reference bus to be bus 1
• We now must solve the Lagrangian by taking the
derivatives of L with respect to each independent
variable in the problem.
• The independent variables are
Example: DC power flow
• We need derivatives of L with respect to each of
these variables
Example: DC power flow
• We need derivatives of L with respect to each of
these variables
Example: DC power flow
• We need derivatives of L with respect to each of
these variables
• The numerical values for this matrix are
• The numerical values for this matrix are
• The numerical values for this matrix are
• The numerical values for this matrix are
• The solution of the equation

which matches the ED solution found in Chapter 3.


The lambda values are also same lambda as found
• The solution of the equation

bus phase angles and power flows are


• The Network
EXAMPLE DCOPF WITH TRANSMISSION LINE
LIMIT IMPOSED
• Consider Three-bus system and add a constraint to
the system representing the flow limit on line 1–2.
• The limit will be set to 150 MW.
• Since the flow on line 1–2 was at 158.1776 MW
when we dispatched it earlier, imposing the 150 MW
limit will result in the line being held at the limit.
• Thus, we can simply add another equality constraint
to the Lagrangian.
• Normally we shall use an inequality constraint for line
flow limits, but in this introduction we will use the
equality constraint.
• The added constraint is
EXAMPLE DCOPF WITH TRANSMISSION LINE
LIMIT IMPOSED

The added constraint is

𝑃12 = 100 𝛽𝑥 (𝜃1 − 𝜃2 ) =

This constraint is added to the Lagrangian with its


own Lagrange multiplier, and the result is
This constraint is added to the Lagrangian with its
own Lagrange multiplier, and the result is
The derivatives of the Lagrangian also reflect the
new constraint and new Lagrange multiplier
The derivatives of the Lagrangian also reflect the
new constraint and new Lagrange multiplier
Note that new terms appear in the derivatives with
respect to 𝜃1 and 𝜃1 as well as the new derivative
with respect to λ5 .
The set of linear equations is shown as follow
• The numerical values for this matrix are
• The numerical values for this matrix are
• The numerical values for this matrix are
The solution to this set of equation

which matches the ED


solution already found
The lambda values are
• Because the line flow on line 1–2 is at its limit, the lambda
values are different
• The Locational Marginal Price (LMP) values for the buses
are equal to these lambda values.
• Finally, the bus phase angles and power flows are
• Resulting dispatch and power flows with flow constraint
on line 1–2.
Example of LPOPF

• Solving the full non-linear OPF problem by hand


is too difficult, even for small systems
• We will solve linearized 3-bus examples by hand

89
Example
A B CA

1 2 10 $/MWh
PA

PAMAX=390MW

3
CB
450 MW

Economic dispatch:
PA = P = 390 MW
max 20$/MWh
A PB

PB = 60 MW PBMAX= 150 MW

90
Flows resulting from the economic dispatch
390MW 60MW
A B

Flowmax = 200MW

1 2

Flowmax = 260MW Flowmax = 200MW

450 MW

Assume that all the lines have the same reactance

Do these injection result in acceptable flows?

91
Calculating the flows using superposition
Because we assume a linear model, superposition is
applicable

390 MW 60 MW

1 2

3
450 MW

390 MW 60 MW

1 2 1 2

3 3
390 MW
60 MW
92
Calculating the flows using superposition (1)

390 MW

FA FB
1 2

3
390 MW

FA = 2 x FB because the path 1-2-3 has twice the reactance


of the path 1-3

FA + FB = 390 MW

FA = 260 MW
FB = 130 MW

93
Calculating the flows using superposition (2)

60 MW

FD FC
1 2

3
60 MW

FC = 2 x FD because the path 2-1-3 has twice the reactance


of the path 2-3

FC + FD = 60 MW

FC = 40 MW
FD = 20 MW

94
Calculating the flows using superposition (2)

60 MW

FD FC
1 2

3
60 MW

FC = 2 x FD because the path 2-1-3 has twice the reactance


of the path 2-3

FC + FD = 60 MW

FC = 40 MW
FD = 20 MW

95
Calculating the flows using superposition (3)
390 MW 60 MW

130 MW 20 MW
260 MW 40 MW
1 2 1 2

3 3
390 MW 60 MW

390 MW 60 MW
110 MW
280 MW 170 MW
1 2
Fmax = 260 MW
3
450 MW

96
Correcting unacceptable flows
390 MW 60 MW

280 MW
1 2

Must reduce flow F1-3 by 20 MW 3


450 MW

• Must use a combination of reducing the injection at bus 1 and


increasing the injection at bus 2 to keep the load/generation
balance
• Decreasing the injection at 1 by 3 MW reduces F1-3 by 2 MW
• Increasing the injection at 2 by 3 MW increases F1-3 by 1 MW
• A combination of a 3 MW decrease at 1 and 3 MW increase at 2
decreases F1-3 by 1 MW
• To achieve a 20 MW reduction in F1-3 we need to shift 60 MW of
injection from bus 1 to bus 2
97
Check the solution using superposition
330 MW 120 MW

110 MW 40 MW
220 MW 80 MW
1 2 1 2

3 3
330 MW 120 MW

330 MW 120 MW
70 MW
260 MW 190 MW
1 2
Fmax = 260 MW
3
450 MW

98
Comments (1)

• The OPF solution is more expensive than the


ED solution
– CED = 10 x 390 + 20 x 60 = $5,100
– COPF = 10 x 330 + 20 x 120 = $5,700
• The difference is the cost of security
– Csecurity = COPF - CED = $600
• The constraint on the line flow is satisfied exactly
– Reducing the flow below the limit would cost
more

99
Comments (2)

• We have used an “ad hoc” method to solve this


problem
• In practice, there are systematic techniques for
calculating the sensitivities of line flows to
injections
• These techniques are used to generate
constraint equations that are added to the
optimization problem

100
Security Constrained OPF (SCOPF)

• Conventional OPF only guarantees that the


operating constraints are satisfied under normal
operating conditions
– All lines in service
• This does not guarantee security
– Must consider N-1 contingencies

101
Example: base case solution of OPF
330MW 120MW
A 70 MW B

1 2

260 MW 190 MW

450 MW

102
Example: contingency case
330MW 120MW
A 0 MW B

1 2

330 MW 120 MW

450 MW

Unacceptable because overload of line 1-3 could lead to


a cascade trip and a system collapse

103
Formulation of the Security Constrained OPF

Power flow equations


Subject to:
for the base case

Operating limits for


the base case

Power flow equations


for contingency k
"k
Operating limits
for contingency k

Subscript 0 indicates value of variables in the base case


Subscript k indicates value of variables for contingency k
104
Preventive security formulation
subject to:

This formulation implements preventive security because


the control variables are not allowed to change after the
contingency has occurred:
uk = u0   "k
105
Corrective security formulation
subject to:

uk - u0 £ Du max

• This formulation implements corrective security because


the control variables are allowed to change after the
contingency has occurred
• The last equation limits the changes that can take place
to what can be achieved in a reasonable amount of time
• The objective function considers only the value of the
control variables in the base
106 case

You might also like