0% found this document useful (0 votes)
31 views

EEB 551 Lab 2

Uploaded by

Chiko Kheru
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

EEB 551 Lab 2

Uploaded by

Chiko Kheru
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Faculty of Engineering & Technology

Department of Electrical & Electronic Engineering

EE551: Power System Economics

2022/2023(1)

Laboratory Work Two_ Dynamic Economic Dispatch


Distributed: 05 October 2022

To be performed: 10-21 October 2022

Due Date: 03 Nov 2022, 12MD

UBFET_EEB 551 Lab 2 © Dr D. Setlhaolo Page 1


Lab 2: Dynamic Economic Dispatch
1. Example
2. Lab Work

UBFET_EEB 551 Lab 2 © Dr D. Setlhaolo Page 2


1. Example

UBFET_EEB 551 Lab 2 © Dr D. Setlhaolo Page 3


2.3 Dynamic Economic Dispatch 33

Find the optimal solution of problem (2.16) under the following hypotheses:

0 6 P1 6 120, 0 6 P2 6 110, P1 + P2 = 200.

2.3 Dynamic Economic Dispatch


The main material of this section is from [2].
The traditional ED problem assumes constant power to be supplied by
a given set of units for a given time interval and attempts to minimize the
cost of supplying this energy subject to constraints on the static behavior of
the generating units. Additional system constraints specifying the minimum
or proper amount of reserve capacity required are often added to this basic
problem. Plant operators, to avoid shortening the life of the generator, try to
keep thermal stress within the turbines safe limits. This mechanical constraint
is usually translated into a limit on the rate of increase of the electrical out-
put. Such ramp rate constraints distinguish the problem from the traditional
static ED. Since the violations of these ramp rate constraints are assessed
by examining the generators output over a given time interval, this problem
cannot be solved for a single value of MW generation. Instead it involves the
minimization of the cost of producing a given profile of system generation over
a study period, i.e., it attempts to minimize the following objective function:
T X
X
CT = Ci (Pit ) (2.17)
t=1 i∈N

where T is the number of intervals in the study period; N is the set of commit-
ted units; Pit is the generation of unit i during the t-th time interval; Ci (Pit )
is the cost of producing Pit from unit i. This optimization is subject to the
following constraints:
Load generation balance:
X
Pit = Dt + Losst , (t = 1, 2, · · · , T ) (2.18)
i∈N

where D is the demand and Losst is the system transmission loss. Their sum
t

represents the effective load to be satisfied at the t-th time interval.


Ramp rate limits:

−DRi · ∆t 6 Pit+1 − Pit 6 U Ri · ∆t, (i ∈ N, t = 1, 2, · · · , T − 1) (2.19)

where U Ri and DRi are the maximum ramp up/down rates for unit i and
∆t is the duration of the time intervals into which the study period is divided.
Maximum capacity:
34 2 Applications in Economic Dispatch

Pit + Sit 6 Pimax , (i ∈ N, t = 1, 2, · · · , T ) (2.20)


where Sit is the spinning reserve contribution of unit i during the time interval
t and Pimax is the maximum capacity of unit i.
Minimum capacity:

Pit > Pimin , (i ∈ N, t = 1, 2, · · · , T ) (2.21)


where Pimin is the minimum capacity of unit i.
Maximum ramp spinning reserve contribution:

0 6 Sit 6 U Ri · ∆t (i ∈ N, t = 1, 2, · · · , T ) (2.22)

Minimum system spinning reserve:


X
Sit > SRt (t = 1, 2, · · · , T ), (2.23)
i∈N

where SRt is the system spinning reserve requirement for time interval t.
Line flow limits:

−F`max 6 F`t 6 F`max , (` = 1, 2, · · · , L) (2.24)

where F`t is the active power flow through transmission line `; F`max is the
upper limit on the active power flow along line `; and L is the number of lines
in the network.
The unit cost curves are often given as piece-wise linear functions. A linear
function, i.e., Ci (Pit )= No Load Cost of Unit i + αi Pit , where αi is a constant
parameter, is used for the sake of clarity in this section.
Now the problem is able to be formulated into a linear programming prob-
lem: PT P t
M inimize i∈N αi Pi
t=1 (2.25)
Subject to (2.18) − (2.24)

Exercise 2.5. In the above problem (2.25), let N = {1, 2, 3, 4}, T = 4, ∆t =


1, please neglect the restriction (2.24) and formulate (2.25) into the following
form:
M aximize cT x
Subject to Ax = b
x>0

Example 2.6. Solve Problem (2.25) for a system with 4 units by neglect-
ing transmission losses, line flow limits and spinning reserve conditions (i.e.
Losst = 0 and Sit = 0 for all t and neglect(2.22)-(2.24)) and using the following
data:

T = 3, N = {1, 2, 3, 4}, Ci (Pit ) = αi Pit , 1 6 i 6 4, t = 1, 2, 3.


2.3 Dynamic Economic Dispatch 35

α1 = 20, α2 = 35, α3 = 34, α4 = 13,


P1max = 400, P2max = 350, P3max = 350, P4max = 130,
min min min
P1 = 100, P1 = 80, P1 = 80, P1min = 30,
U R1 = DR1 = 60, U R2 = DR2 = 40, U R3 = DR3 = 40, U R4 = DR4 = 76.
Solution: We will use the Matlab function ‘linprog’ to solve the problem.
The ‘linprog’ function is able to solve the following kind of problem:

minx f T x
Ax 6 b
Aeq x = beq
lb 6 x 6 ub

Therefore it suffices to rewrite all the data in the problem into the above
matrix form.
Let x1 = P11 , x2 = P21 , x3 = P31 , x4 = P12 , x5 = P22 , x6 = P32 , x7 = P13 , x8 =
P2 , x9 = P33 , then the cost function can be written as F = f T x where
3

f T = (α1 , α2 , α3 , α4 , α1 , α2 , α3 , α4 , α1 , α2 , α3 , α4 )
= (20, 35, 34, 13, 20, 35, 34, 13, 20, 35, 34, 13).
P4
The equality constraint i=1 Pit = Dt , t = 1, 2, 3, can be rewritten as Aeq x =
beq with  
111100000000
Aeq = 0 0 0 0 1 1 1 1 0 0 0 0,
000000001111
beq = (1000, 1030, 900)T .
The inequality constraints −DRi = −U Ri 6 Pit+1 − Pit 6 U Ri , t = 1, 2, i =
1, 2, 3, 4, can be rewritten as

Pit − Pit+1 6 U Ri , −Pit + Pit+1 6 U Ri , t = 1, 2, i = 1, 2, 3, 4,

or equivalently Ax 6 b, where
36 2 Applications in Economic Dispatch
 
1 0 0 0 −1 0 0 0 0 0 0 0
 −1 0 0 0 1 0 0 0 0 0 0 0 
 
 0 1 0 0 0 −1 0 0 0 0 0 0 
 
 0 −1 0 0 0 1 0 0 0 0 0 0 
 
 0 0 1 0 0 0 −1 0 0 0 0 0 
 
 0 0 −1 0 0 0 1 0 0 0 0 0 
 
 0 0 0 1 0 0 0 −1 0 0 0 0 
 
 0 0 0 −1 0 0 0 1 0 0 0 0 
A=
 0
,
 0 0 0 1 0 0 0 −1 0 0 0 
 0 0 0 0 −1 0 0 0 1 0 0 0 
 
 0 0 0 0 0 1 0 0 0 −1 0 0 
 
 0 0 0 0 0 −1 0 0 0 1 0 0 
 
 0 0 0 0 0 0 1 0 0 0 −1 0 
 
 0 0 0 0 0 0 −1 0 0 0 1 0 
 
 0 0 0 0 0 0 0 1 0 0 0 −1 
0 0 0 0 0 0 0 −1 0 0 0 1

b = (60, 60, 40, 40, 40, 40, 76, 76, 60, 60, 40, 40, 40, 40, 76, 76)T .
The lower bound vector lb is

(100, 80, 80, 30, 100, 80, 80, 30, 100, 80, 80, 30)T ,

and the upper bound vector ub is

(400, 350, 350, 130, 400, 350, 350, 130, 400, 350, 350, 130).

Now substitute the above matrices and vectors in the function ‘linprog’,
the problem is solved with the minimum cost of 75710, and the corresponding
Pit ’s are

P11 = 400.0000, P21 = 120.0000, P31 = 350.0000, P41 = 130.0000


P12 = 400.0000, P22 = 150.0000, P32 = 350.0000, P42 = 130.0000
P13 = 350.0000, P23 = 110.0000, P33 = 310.0000, P43 = 130.0000

Exercise 2.7. Neglect the restriction (2.24) and solve the problem (2.25) for
the case of N = {1, 2, 3}, T = 3, α1 = 8, α2 = 7.8, α3 = 7.6, Loss1 = 5,
Loss2 = 5.2, Loss3 = 5.4, ∆t = 1, DR1 = U R1 = 5, DR2 = U R2 =
10,Pimax = 90, Pimin = 0, SR1 = 5, and SR2 = SR3 = 10, D1 = 175,
D2 = 180, D3 = 185, where i = 1, 2, 3.
2. Lab Work

UBFET_EEB 551 Lab 2 © Dr D. Setlhaolo Page 4


Introduction

Dynamic Economic Dispatch (DED) problems are considered which involve three types of
constraints—equality, dynamic and inequality constraints. There are roughly three main types of
constraints in the dynamic dispatch problem: the load demand balance in terms of equality
constraints, ramp rates in terms of dynamic constraints and generation capacity in terms of
inequality constraints. It is worthy to point out that the load demand balance, in a vertically
integrated utility environment, is an obligation, thus a hard constraint; while in other cases, such as
competitive markets, it is a soft constraint since the demand may not be necessarily met. The ramp
rate and generation capacity limitations are equipment constraints, thus hard ones. Some other
constraints such as spinning reserve, security constraints, etc., can be taken into consideration in
exactly the same fashion in both formulations of the dynamic dispatch problem but they all boil down
mathematically to the aforementioned three types of constraints. General constraints and objectives
including non-smooth and/or non-convex functions will be left to future research.

To this end, some notations are introduced. Let 𝑁 be a fixed positive integer, 𝑇 a sampling period 𝑁𝑇
the dispatch period. The dynamic dispatch problem can be considered over time intervals, or
dispatch interval, [𝑖𝑇, (𝑖 + 𝑁)𝑇) for any 𝑖 ≥ 0. Here the time from 0 𝑡𝑜 ∞ is divided into small
intervals [0, 𝑇), [𝑇, 2𝑇), [2𝑇, 3𝑇), …, [𝑖𝑇, 𝑗𝑇), denotes the union of
[𝑖𝑇, (𝑖 + 1)𝑇), [(𝑖 + 1)𝑇, (𝑖_2)𝑇), … , [(𝑗 − 1)𝑇, 𝑗𝑇). An example is a sampling period of an hour and a
dispatch interval of 24ℎ.

For the sake of simplicity, it is assumed throughout this work that [𝐼, 𝑗) denotes the time interval
[𝑖𝑇, 𝑗𝑇). When 𝑇 = 1ℎ, then interval [𝐼, 𝑗) denotes the 𝑖 − 𝑡ℎ hour, (𝑖 + 1) − 𝑡ℎ hour, …, and the
(𝑗 − 1) − 𝑡ℎ hour.

Assume that 𝑛 is the number of committed units, 𝑃𝑖𝑘 is the average power generated by unit 𝑖 during
𝑘 − 𝑡ℎ time interval [𝑘 − 1, 𝑘), 𝐶𝑖 (𝑃𝑖𝑘 ) and 𝑅𝑖 (𝑃𝑖𝑘 ) are the generation and ramping costs respectively
for unit 𝑖 to produce 𝑃𝑖𝑘 ; 𝐷𝑘 is the demand at time 𝑘 (i.e., the 𝑘 − 𝑡ℎ time interval); the variable 𝑢𝑖𝑘 is
the ramp rate of the unit 𝑖 at time 𝑘 and is also called control variable in this work; 𝑈𝑅𝑖 , and 𝐷𝑅𝑖 , are
the maximum ramp up/down rates for unit 𝑖; 𝑃𝑖𝑚𝑖𝑛 and 𝑃𝑖𝑚𝑎𝑥 are the minimum and maximum
capacity of unit 𝑖 respectively; the notation (𝑃𝑖𝑘 : 1≤ 𝑖 ≤ 𝑛, 𝑙 ≤ 𝑘 ≤ 𝑙 + 𝑗) denotes the vector
𝑙+𝑗
(𝑃1𝑙 , 𝑃2𝑙 , … , 𝑃𝑛𝑙 , 𝑃1𝑙+1 , 𝑃2𝑙+1 , … , 𝑃𝑛𝑙+1 , … , 𝑃1 , 𝑃2,…, 𝑃𝑛 ), and 𝐶(𝑃𝑖𝑘 : 1 ≤ 𝑖 ≤ 𝑛, 𝑙 ≤ 𝑘 ≤ 𝑙 + 𝑗) denotes the
𝑙+1 𝑙+1

cost (objective) function 𝐶 with variables {𝑃𝑖𝑘 : 1 ≤ 𝑖 ≤ 𝑛, 𝑙 ≤ 𝑘 ≤ 𝑙 + 𝑗}. Define 𝐷 = (𝐷1 , 𝐷2 , … , 𝐷𝑁 )𝑇 ,


𝑃𝑘 = (𝑃1𝑘 , 𝑃2𝑘 , … , 𝑃𝑛𝑘 )𝑇 , 𝑢𝑘 = (𝑢1𝑘 , 𝑢2𝑘 , … , 𝑢𝑛𝑘 )𝑇 , 𝑘 ≥ 0. The function [𝐶𝑖 (𝑃𝑖𝑘 ) + 𝑅𝑖 (𝑝𝐼𝐾 )] is assumed to be a
quadratic function 𝑎𝑖 (𝑃𝑖𝑘 )2 + 𝑏𝑖 𝑃𝑖𝑘 + 𝑏𝑖 with known positive constants 𝑏𝑖 , 𝑏𝑖 and 𝑐𝑖 .
The demand 𝐷𝑘 is assumed to be periodic with period N. This periodic assumption is made to reflect
the cyclic consumption behaviour and seasonal changes over the dispatch interval.
The following convention is also made:

𝑘
0 𝑖𝑓 𝑗 > 𝑘
∑ 𝑥𝑖 = {𝑥 + 𝑥 + ⋯ + 𝑥
𝑗 𝑗+1 𝑘 𝑖𝑓 𝑗 ≤ 𝑘
𝑖=𝑗

UBFET_EEB 551 Lab 2 © Dr D. Setlhaolo Page 5


DED Problem Formulation
Normally the DED problem for the dispatch interval [0, 𝑁) can be formulated as follows:

Given 𝑛, 𝑁, 𝐷𝑅𝑖 , 𝑈𝑅𝑖 , 𝑃𝑖𝑚𝑖𝑛 , 𝑃𝑖𝑚𝑎𝑥 , 1 ≤ 𝑖 ≤ 𝑛, and 𝐷, solve the following minimization problem:

min 𝐶(𝑃𝑖𝑘 : 1 ≤ 𝑖 ≤ 𝑛, 1 ≤ 𝑘 ≤ 𝑁)
𝑁 𝑛

∑ ∑[𝐶𝑖 (𝑃𝑖𝑘 ) + 𝑅𝑖 (𝑃𝑖𝑘 )]


𝑘=1 𝑖=1

subject to;
𝑛

∑ 𝑃𝑖𝑘 = 𝐷𝑘
𝑖=1

𝑗+1 𝑗
−𝐷𝑅𝑖 . 𝑇 ≤ 𝑃𝑖 − 𝑃𝑖 ≤ 𝑈𝑅𝑖 . 𝑇
𝑚𝑖𝑛
𝑃𝑖 ≤ 𝑃𝑖 ≤ 𝑃𝑖𝑚𝑎𝑥 ,
𝑘

(1 ≤ 𝑖 ≤ 𝑛, 1 ≤ 𝑗 ≤ 𝑁 − 1, 1 ≤ 𝑘 ≤ 𝑁)
Note that the variables in the above DED problem are;

{𝑃𝑖𝑘 : 1 ≤ 𝑖 ≤ 𝑛, 1 ≤ 𝑘 ≤ 𝑁}

Data
This is an application of DED to the following six unit generators. This standard example is derived
from Gaing (2004). The data is listed in Tables 1 & 2. The dispatch interval is and the sampling period
are 1 day and 1 hour, respectively. The generation cost and ramping cost curves are given as
quadratic functions 𝐶𝑖 (𝑃𝑖 ) + 𝑅𝑖 (𝑃𝑖 ) = 𝑎𝑖 + 𝑏𝑖 𝑃𝑖 + 𝑐𝑖 𝑃𝑖2 . The initial generations 𝑃𝑖0 have chosen such
that ∑10 0 0
𝑖=1 𝑃𝑖 < 𝐷 .

Table 1: Data of the six-unit system


Gen 𝑃𝑖𝑚𝑖𝑛 𝑃𝑖𝑚𝑎𝑥 𝑎𝑖 𝑏𝑖 𝑐𝑖 𝑈𝑅𝑖 𝐷𝑅𝑖 𝑃𝑖0
(MW) (MW) ($/h) ($/MWh) ($/MW2h) (MW/h) (MW/h) (MW)
1 100 500 240 7 0.0070 80 120 240
2 50 200 200 10 0.0095 50 90 50
3 80 300 220 8.5 0.0090 65 100 130
4 50 150 200 11 0.0090 50 90 80
5 50 200 220 10 0.0080 50 90 50
6 50 120 190 12 0.0075 50 90 50

Table 2: Load demand of the six-unit system for 24h


Time 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
(h)
Demand 95 942 935 930 935 963 989 102 112 115 120 123 119 125 126 125 122 120 115 109 102 984 975 960
(MW) 5 3 6 0 1 5 0 1 3 0 1 2 9 2 3

Requirement:

Develop a matlab code using ‘fmincon ‘to solve the DED problem. Find the values of and draw the
following;
-The demand and the optimal six generators output power.

UBFET_EEB 551 Lab 2 © Dr D. Setlhaolo Page 6


Provide an individual full report of your work in Ms word and submit to email
[email protected]. 12 pt Times New Roman, 1.5 equally spaced, justified.

References:
Gaing, Z. L. (2004, June). Constrained dynamic economic dispatch solution using particle swarm
optimization. In IEEE Power Engineering Society General Meeting, 2004. (pp. 153-158). IEEE.

UBFET_EEB 551 Lab 2 © Dr D. Setlhaolo Page 7

You might also like