0% found this document useful (0 votes)
37 views36 pages

Chapter 7 Unit Commitment and Economic Dispatch

Chapter 7 discusses the Unit Commitment (UC), Economic Dispatch (ED), and Network Constrained Unit Commitment (NCUC) problems, which are crucial for the economic management of power systems. The UC problem focuses on scheduling generating units to minimize costs while meeting demand and constraints, while the ED problem determines the power output of committed units. The chapter further elaborates on the formulation of these problems, including costs, constraints, and examples, emphasizing their relevance in electricity markets in the USA.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views36 pages

Chapter 7 Unit Commitment and Economic Dispatch

Chapter 7 discusses the Unit Commitment (UC), Economic Dispatch (ED), and Network Constrained Unit Commitment (NCUC) problems, which are crucial for the economic management of power systems. The UC problem focuses on scheduling generating units to minimize costs while meeting demand and constraints, while the ED problem determines the power output of committed units. The chapter further elaborates on the formulation of these problems, including costs, constraints, and examples, emphasizing their relevance in electricity markets in the USA.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Chapter 7

Unit Commitment and Economic Dispatch

This chapter describes and formulates three important problems for the economic
management of power systems, namely the Unit Commitment (UC), the Economic
Dispatch (ED), and the Network Constrained Unit Commitment (NCUC) problems.
The UC problem determines the commitment of generating units with the aim of
minimizing operating costs while supplying the demand and meeting technical and
security constraints. Then, once the commitment of generating units is decided,
the ED problem determines the actual power output of each generating unit that
is needed to supply all demands at minimum cost, while complying with the
technical constraints of the transmission network. Finally, if both the commitment
of generating units and transmission constraints are considered simultaneously, the
resulting problem is known as the NCUC problem. These three problems are mostly
considered in electricity markets throughout the USA.

7.1 Introduction

The operation of power systems involves the coordination of multiple generating


units that are used to supply the demand. This coordination requires considering
different technical aspects of generating units, e.g., power-output limits, ramping
limits, as well as different constraints of the power system as a whole, e.g., network
constraints.
Besides these important technical aspects needed to guarantee a reliable supply
of energy, it is also necessary to consider an efficient economic management. For
example, the cost of starting up a thermal generating unit that has been a couple of
days off-line is generally very high. Therefore, the planning of start-ups and shut-
downs of thermal generating units should be done carefully. In this sense, we define
the Unit Commitment (UC) problem, which consists of determining, for a given
planning horizon, the start-up and shut-down schedule of all production units so

© Springer International Publishing AG 2018 197


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_7
198 7 Unit Commitment and Economic Dispatch

that the electric demand is supplied and the total operating cost is minimized. At the
same time, the UC problem ensures that different technical and security constraints
pertaining to the generating units are satisfied.
Then, once the commitment of the generating units is decided, the next step is to
determine, for each hour of the planning horizon, the actual power output of each of
the committed generating units that is needed to supply the demand and to comply
with the limits imposed by the transmission network. This problem is denominated
as Economic Dispatch (ED).
An alternative is to consider both the commitment of generating units and the
transmission constraints simultaneously. In such a case, the resulting problem is
known as Network-Constrained Unit Commitment (NCUC).
These three problems are essential for the economic management of power
systems and are mostly considered in electricity markets throughout the USA.
The remaining of this chapter is organized as follows. Sections 7.2, 7.3, and 7.4
describe and provide the formulation of the UC, the ED, and the NCUC prob-
lems, respectively. These problems are illustrated through a number of examples.
Section 7.5 summarizes the chapter and includes some references for further
reading. Section 7.6 provides the GAMS [2] codes needed to solve some of the
illustrative examples in Sects. 7.2, 7.3, and 7.4. Finally, Sect. 7.7 includes some
exercises to further comprehend the concepts addressed in this chapter.

7.2 Unit Commitment

This section describes and formulates the UC problem.

7.2.1 Description

We consider a number of generating units that are used to supply the demand in a
given power system. The overall objective of the UC problem is to determine the
scheduling of generating units that is needed:
1. to minimize the total costs,
2. to supply the demand, and
3. to meet the different technical and security constraints.
For the sake of clarity, the following subsections describe the main ingredients of
the UC problem, including the planning horizon of the problem, and the economic,
technical, and security constraints of generating units that must be satisfied.
7.2 Unit Commitment 199

7.2.1.1 Planning Horizon

A typical planning horizon is one day divided into 24 h. If time intervals are denoted
by the index t, the planning horizon consists of the following time periods:

t D 1; 2; : : : ; N T ; (7.1)

where N T is the number of time periods in the planning horizon, which is typically
equal to 24.

7.2.1.2 Generating Units

The overall objective of the UC problem is to determine the start-up and shut-down
schedule of every generating unit in a power system. These generating units are
indexed by g:

g D 1; 2; : : : ; N G ; (7.2)

where N G is the number of generating units.


For the sake of simplicity, only thermal generating units are considered in the
remaining of this chapter.

7.2.1.3 Costs of Generating Units

The cost of producing electricity by thermal generating units can be expressed as:

cgt D cFgt C cV
gt C cgt C cgt ;
SU SD
8g; 8t; (7.3)

where:
• cgt is the total cost of generating unit g in time period t,
• cFgt is the fixed cost of generating unit g in time period t,
• cVgt is the variable cost of generating unit g in time period t,
• cSU
gt is the start-up cost of generating unit g in time period t, and
• cSD
gt is the shut-down cost of generating unit g in time period t.

Each of these costs is described below.


Fixed Costs
The no-load or fixed cost can be computed as:

cFgt D CgF ugt ; 8g; 8t; (7.4)


200 7 Unit Commitment and Economic Dispatch

where:
• CgF is the no-load cost of generating unit g and
• ugt is a binary variable that is equal to 1 if generating unit g is online in time
period t, and 0 otherwise.
Variable Costs
When a generating unit is producing electricity, it has a variable cost that can be
expressed as:

gt D Cg pgt ;
cV 8g; 8t;
V
(7.5)

where:
• CgV is the variable cost of generating unit g and
• pgt is the output power of generating unit g during time period t.
The fixed and variable costs constitute the running costs of generating units, i.e.,
the costs incurred by producing electricity. However, there are other significant costs
that must be considered. Particularly, a cost is incurred every time that a thermal
generating unit is started up. This cost is generally high and, thus, it usually has a
great impact on the scheduling of the generating units. A similar cost is incurred
every time that any of these units is shut-down. These costs are briefly described
below.
Start-Up Costs
The start-up cost is an exponential function of the time that a generating unit has
been off-line. However, this cost can be simplified in most cases and considered as
a constant. We will consider this simplification in this chapter.
Thus, every time a thermal generating unit is started up, its start-up cost is
incurred, which can be expressed as:

gt D Cg ygt ;
cSU 8g; 8t;
SU
(7.6)

where:
• CgSU is the start-up cost of generating unit g and
• ygt is a binary variable that is equal to 1 if generating unit g is started up at the
beginning of time period t, and 0 otherwise.
Shut-Down Costs
The shut-down cost can be expressed in a similar fashion as the start-up cost and
thus:

gt D Cg zgt ;
cSD 8g; 8t;
SD
(7.7)
7.2 Unit Commitment 201

where:
• CgSD is the shut-down cost of generating unit g and
• zgt is a binary variable that is equal to 1 if generating unit g is shut-down at the
beginning of time period t, and 0 otherwise.

7.2.1.4 Logical Expressions

Any thermal generating unit that is online can be shut-down but not started up.
Analogously, any generating unit that is off-line can be started up but not shut-down.
This can be expressed as:

ygt  zgt D ugt  ug;t1 ; 8g; 8t; (7.8a)


ygt C zgt  1; 8g; 8t; (7.8b)
ugt ; ygt ; zgt 2 f0; 1g; 8g; 8t: (7.8c)

Note that constraints (7.8a) include binary variables in both time periods t and
t  1. Thus, it is necessary to rewrite these constraints for the first time period of the
planning horizon as:

yg1  zg1 D ug1  Ug0 ; 8g; (7.9)

where Ug0 is equal to 1 if generating unit g is online in the time period prior to the
beginning of the planning horizon, and 0 otherwise.
Note as well that constraints (7.8b) are redundant provided that start-up and shut-
down costs are not null; however, including these constraints in the formulation
might be computationally advantageous.
Illustrative Example 7.1 Logical expressions
We verify below the logical conditions (7.8). To do so, we analyze different
examples:
1. We consider that generating unit g is online in both time periods t and t  1, i.e.,
ugt D 1 and ug;t1 D 1, respectively. This means that the considered generating
unit has been neither started up nor shut-down and, thus, both variables ygt and
zgt should be equal to 0. This is verified below.
If we check constraint (7.8a), we can see that if variables ugt and ug;t1 are both
equal to 1, there are two options for variables ygt and zgt , namely (1) ygt D 1
and zgt D 1, and (2) ygt D 0 and zgt D 0. However, only option (2) satisfies
constraint (7.8b).
2. We consider that generating unit g is online in time period t and was off-line in
time period t  1, i.e., ugt D 1 and ug;t1 D 0, respectively. This means that the
considered generating unit has been started up at the beginning of time period t
and, thus, variable ygt should be equal to 1 and variable zgt should be equal to 0.
202 7 Unit Commitment and Economic Dispatch

Table 7.1 Illustrative ugt ug;t1 ygt zgt


Example 7.1: combinations
of binary variables 0 0 0 0
0 1 0 1
1 0 1 0
1 1 0 0

This is verified below.


If we check constraint (7.8a), we can see that if variables ugt and ug;t1 are equal
to 1 and 0, respectively, binary variables ygt and zgt must be equal to 1 and 0,
respectively. Note that this solution satisfies constraint (7.8b).
The analysis for the remaining combinations of binary variables is straightfor-
ward. All possible combinations are provided in Table 7.1.


7.2.1.5 Power Bounds

Thermal generating units cannot operate below a minimum power output and above
a maximum power output (capacity). These technical constraints can be expressed
as:

g ugt  pgt  Pg ugt ;


Pmin 8g; 8t;
max
(7.10)

where:
• Pmin
g is the minimum power output of generating unit g and
• Pmax
g is the capacity of generating unit g.
The left-hand side of constraints (7.10) enforces that if generating unit g is online
during time period t, i.e., if ugt D 1, its power output should be above the minimum
power output. This minimum power output of thermal units is generally around 10%
of the capacity of the unit. Analogously, the right-hand side of constraints (7.10)
enforces that if generating unit g is online during time period t, i.e., if ugt D 1,
its power output should be below the maximum power output. Finally, note that if
ugt D 0, i.e., if generating unit g is off-line during time period t, constraints (7.10)
impose 0  pgt  0, i.e., pgt D 0.

7.2.1.6 Ramping Limits

From one time period to the next one, any thermal generating unit cannot increase
its power output above a maximum level, called the ramping-up limit. Analogously,
if the generating unit starts up, its maximum power output in that time period is
limited by the so-called start-up ramping limit. This can be represented as:

pgt  pg;t1  RU
g ug;t1 C Rg ygt ;
SU
8g; 8t; (7.11)
7.2 Unit Commitment 203

where:
• RU
g is the ramping-up limit of generating unit g and
• RSU
g is the start-up ramping limit of generating unit g.

Regarding constraints (7.11), note that:


1. If ug;t1 D 1 and ugt D 1, then generating unit g is neither started up nor shut-
down at the beginning of time period t. Since ygt D zgt D 0 (neither start-up nor
shut-down, as imposed by Eq. (7.8)), constraints (7.11) reduce to pgt  pg;t1 
RUg , 8g, which is the ramping-up limit.
2. If ug;t1 D 0 and ugt D 1, then generating unit g is started up at the beginning of
time period t. Since ygt D 1 and zgt D 0 (start-up in time period t, but not shut-
down, as imposed by Eq. (7.8)), constraints (7.11) reduce to pgt  pg;t1  RSU g ,
8g, which is the start-up ramping limit.
3. If ug;t1 D 1 and ugt D 0, then generating unit g is shut-down at the beginning
of time period t. Since ygt D 0 and zgt D 1 (shut-down in time period t, but not
start-up, as imposed by Eq. (7.8)), constraints (7.11) reduce to pgt  pg;t1  RU
g,
8g, which is trivially satisfied since pgt D 0.
For the first time period of the planning horizon, constraints (7.11) become:

pg1  Pg0  RU
g Ug0 C Rg yg1 ;
SU
8g; (7.12)

where Pg0 is the power output of generating unit g just prior to the first period of the
planning horizon.
Similarly, any thermal generating unit cannot decrease its power output above a
limit, which is called the ramping-down limit. Therefore:

pg;t1  pgt  RD
g ugt C Rg zgt ;
SD
8g; 8t; (7.13)

where:
• RD
g is the ramping-down limit of generating unit g and
• RSD
g is the shut-down ramping limit of generating unit g.

Regarding constraints (7.13), note that:


1. If ug;t1 and ugt D 1, then generating unit g is neither started up nor shut-down
at the beginning of time period t. Since ygt D zgt D 0 (as imposed by Eq. (7.8)),
constraints (7.13) reduce to pg;t1  pgt  RDg , 8g, which is the ramping-down
limit.
2. If ug;t1 D 1 and ugt D 0, then generating unit g is shut-down at the beginning
of time period t. Since ygt D 0 and zgt D 1 (as imposed by Eq. (7.8)),
constraints (7.13) reduce to pg;t1  pgt  RSD g , 8g, which is the shut-down
ramping limit.
204 7 Unit Commitment and Economic Dispatch

3. If ug;t1 D 0 and ugt D 1, then generating unit g is started up at the beginning


of time period t. Since ygt D 1 and zgt D 0 (as imposed by Eq. (7.8)),
constraints (7.13) reduce to pg;t1  pgt  RD
g , 8g, which is trivially satisfied
since pg;t1 D 0.
Finally, note that for the first time period of the planning horizon,
constraints (7.13) become:

Pg0  pg1  RD
g ug1 C Rg zg1 ;
SD
8g: (7.14)

7.2.1.7 Power Balance

The available generating units are used to satisfy the demand at each time period
and thus:
X
pgt D PDt ; 8t; (7.15)
g

where PD
t is the demand in time period t.

7.2.1.8 Security Constraints

Finally, for security reasons, the total output power available online should be larger
than the actual demand by a prespecified amount. This is formulated as:
X
g ugt  Pt C Rt ;
Pmax 8t;
D D
(7.16)
g

where RD t is the amount of required reserve (capacity available over the demand) in
time period t.
It is important to note that (7.16) might need to be modified to consider ramping
limits. However, this is not taken into account for the sake of simplicity. We refer
the interested reader to [5] for further details.

7.2.2 Formulation

Considering the definitions of the previous subsection, the formulation of the UC


problem is as follows:
min
XX 
CgF ugt C CgV pgt C CgSU ygt C CgSD zgt (7.17a)
t g
7.2 Unit Commitment 205

subject to

ygt  zgt D ugt  ug;t1 ; 8g; 8t; (7.17b)


ygt C zgt  1; 8g; 8t; (7.17c)

g ugt  pgt  Pg ugt ;


Pmin 8g; 8t;
max
(7.17d)
pgt  pg;t1  RU
g ug;t1 C Rg ygt ;
SU
8g; 8t; (7.17e)
pg;t1  pgt  RDg ugt C Rg zgt ;
SD
8g; 8t; (7.17f)
X
pgt D PDt ; 8t; (7.17g)
g
X
g ugt  Pt C Rt ;
Pmax 8t;
D D
(7.17h)
g

ugt ; ygt ; zgt 2 f0; 1g; 8g; 8t; (7.17i)

where variables in set  D fpgt ; ugt ; ygt ; zgt ; 8g; 8tg are the optimization variables
of problem (7.17).
Problem (7.17) is a mixed-integer linear programming (MILP) problem [8]. As
explained in Appendix B of this book, MILP problems can be efficiently solved
using branch-and-cut solvers.
Problem (7.17) is a simplified version of the UC problem since some constraints
have not been included for the sake of clarity, e.g., minimum up and down times
of generating units. A complete formulation of the UC problem can be found, for
example, in [5].
It is possible to write an alternative UC formulation that uses just one binary
variable per generating unit and time period. However, as shown in [5], using three
binary variables per generating unit and time period (one to model the on/off status,
one to model if start-up occurs, and one to model if shut-down occurs) generally
results in a more efficient formulation from the computational viewpoint. Although
this might seem counter-intuitive, this is not uncommon in MILP problems [1].
Illustrative Example 7.2 Unit commitment
We solve below a UC problem for a 3 h planning horizon. Three thermal generating
units are used to supply demands of 160 MW, 500 MW, and 400 MW in time periods
1, 2, and 3, respectively. Required reserves in these time periods are, respectively,
16 MW, 50 MW, and 40 MW.
Technical and economic data of the generating units are given in Table 7.2.
Generating units #1 and #2 are off-line prior to the first time period of the considered
planning horizon, while generating unit #3 is online and producing 100 MW.
Considering the above data, we formulate the UC problem.
206 7 Unit Commitment and Economic Dispatch

Table 7.2 Illustrative Example 7.2: data of generating units


Generating unit # 1 2 3
Minimum power output [MW] 50 80 40
Capacity [MW] 350 200 140
Ramping-down limit [MW/h] 300 150 100
Shut-down ramping limit [MW/h] 300 150 100
Ramping-up limit [MW/h] 200 100 100
Start-up ramping limit [MW/h] 200 100 100
Fixed cost [$] 5 7 6
Start-up cost [$] 20 18 5
Shut-down cost [$] 0.5 0.3 1.0
Variable cost [$/MWh] 0.100 0.125 0.150

First, the objective function to be minimized is as follows:


min

5 .u11 C u12 C u13 / C 7 .u21 C u22 C u23 / C 6 .u31 C u32 C u33 /


C 0:100 .p11 C p12 C p13 / C 0:125 .p21 C p22 C p23 / C 0:500 .p31 C p32 C p33 /
C 20 .y11 C y12 C y13 / C 18 .y21 C y22 C y23 / C 5 .y31 C y32 C y33 /
C 0:5 .z11 C z12 C z13 / C 0:3 .z21 C z22 C z23 / C 1:0 .z31 C z32 C z33 / :

The first, second, third, and fourth lines of the above objective function cor-
respond to the fixed, variable, start-up, and shut-down costs of generating units
through the planning horizon, respectively.
Next, we provide the constraints of the UC problem:
• Logical conditions:

y11  z11 D u11  0;


y12  z12 D u12  u11 ;
y13  z13 D u13  u12 ;
y21  z21 D u21  0;
y22  z22 D u22  u21 ;
y23  z23 D u23  u22 ;
y31  z31 D u31  1;
y32  z32 D u32  u31 ;
y33  z33 D u33  u32 ;
y11 C z11  1;
7.2 Unit Commitment 207

y12 C z12  1;
y13 C z13  1;
y21 C z21  1;
y22 C z22  1;
y23 C z23  1;
y31 C z31  1;
y32 C z32  1;
y33 C z33  1;
u11 ; y11 ; z11 ; u12 ; y12 ; z12 ; u13 ; y13 ; z13 2 f0; 1g;
u21 ; y21 ; z21 ; u22 ; y22 ; z22 ; u23 ; y23 ; z23 2 f0; 1g;
u31 ; y31 ; z31 ; u32 ; y32 ; z32 ; u33 ; y33 ; z33 2 f0; 1g:

• Power bounds:

50u11  p11  350u11 ;


50u12  p12  350u12 ;
50u13  p13  350u13 ;
80u21  p21  200u21 ;
80u22  p22  200u22 ;
80u23  p23  200u23 ;
40u31  p31  140u31 ;
40u32  p32  140u32 ;
40u33  p33  140u33 :

• Ramping limits:

p11  0  0 C 200y11 ;
p12  p11  200u11 C 200y12 ;
p13  p12  200u12 C 200y13 ;
p21  0  0 C 100y21 ;
p22  p21  100u21 C 100y22 ;
p23  p22  100u22 C 100y23 ;
208 7 Unit Commitment and Economic Dispatch

p31  100  100 C 100y31 ;


p32  p31  100u31 C 100y32 ;
p33  p32  100u32 C 100y33 ;

and:

0  p11  300u11 C 300z11 ;


p11  p12  300u12 C 300z12 ;
p12  p13  300u13 C 300z13 ;
0  p21  150u21 C 150z21 ;
p21  p22  150u22 C 150z22 ;
p22  p23  150u23 C 150z23 ;
100  p31  100u31 C 100z31 ;
p31  p32  100u32 C 100z32 ;
p32  p33  100u33 C 100z33 :

• Power balance:

p11 C p21 C p31 D 160;


p12 C p22 C p32 D 500;
p13 C p23 C p33 D 400:

• Security (reserve) constraints:

350u11 C 200u21 C 140u31  160 C 16;


350u12 C 200u22 C 140u32  500 C 50;
350u13 C 200u23 C 140u33  400 C 40:

The optimization variables of this UC problem are those included in set  D


fp11 , p12 , p13 , p21 , p22 , p23 , p31 , p32 , p33 , u11 , y11 , z11 , u12 , y12 , z12 , u13 , y13 , z13 , u21 ,
y21 , z21 , u22 , y22 , z22 , u23 , y23 , z23 , u31 , y31 , z31 , u32 , y32 , z32 , u33 , y33 , z33 g. Note that
these variables include two subscripts. The first one indicates the generating unit,
while the second one refers to the time period.
As shown in Appendix B of this book, the solution of the above UC problem can
be easily obtained using an appropriate optimization tool, e.g., CPLEX [4] under
GAMS [2].
7.3 Economic Dispatch 209

Table 7.3 Illustrative Generating unit/Time period 1 2 3


Example 7.2: commitment
status of generating units #1 1 1 1
#2 0 1 0
#3 0 1 1

Table 7.4 Illustrative Generating unit/Time period 1 2 3


Example 7.2: power outputs
[MW] of generating units #1 160 350 350
#2 0 100 0
#3 0 50 50

Table 7.3 provides the optimal commitment status of generating units, i.e.,
the optimal values of binary variables ugt , 8g, 8t, during the planning horizon.
Generating unit #1 is started up at the beginning of hour 1 and remains online during
the 3 h. Generating unit #2 is started up at the beginning of hour 2 and shut-down at
the beginning of hour 3. Generating unit #3 is shut-down at the beginning of hour
1 and started up at the beginning of hour 2. Then, it remains online during hours 2
and 3.
Table 7.4 provides the optimal power output of generating units during the
planning horizon. When all generating units are online (in time period 2), it is
preferable to use generating unit #1 at capacity since it has the lowest variable cost.
Note also that, although the variable cost of generating unit #2 is lower than that of
generating unit #3, it is preferable to use the latter in time period 3 and shut-down
generating unit #2. This is due to the high shut-down cost of generating unit #3 in
comparison with that cost of generating unit #2.
The optimal solution results in a minimum cost equal to $212.8.

An input GAMS [2] file to solve Illustrative Example 7.2 is provided in Sect. 7.6.

7.3 Economic Dispatch

This section describes and formulates the economic dispatch (ED) problem.

7.3.1 Economic Dispatch Without Network Constraints

The objective of the ED problem is to find out, for a single period of time, the output
power of every generating unit so that all demands are satisfied at minimum cost,
210 7 Unit Commitment and Economic Dispatch

while complying with different technical constraints of the generating units. Thus,
the ED problem can be formulated as:
min
X
CgV pg (7.18a)
g

subject to

Pmin
g  pg  Pmax
g ; 8g; (7.18b)
X
pg D D; (7.18c)
g

where variables in set  D fpg ; 8gg are the optimization variables of prob-
lem (7.18). Note that the ED problem (7.18) is solved for a single time period. Thus,
subscript t is not included in these optimization variables for the sake of clarity.
The objective function (7.18a) is the operating cost. Constraints (7.18b) impose
power bounds on generating units and constraint (7.18c) defines the power balance.
Note that the left and right bounds of (7.18b) can be properly adjusted to reflect
ramping limits. Finally, note that only the generating units that are scheduled to be
online are considered in problem (7.18).
Problem (7.18), the ED problem, is a simple linear programming (LP) problem
[8].
Illustrative Example 7.3 Economic dispatch without network constraints
We consider two generating units that are used to supply a demand of 0.85 MW.
Generating unit #1 produces at $6/MWh and its lower and upper power output limits
are, respectively, 0.15 MW and 0.6 MW. The production cost of generating unit #2
is $7/MWh and its lower and upper power output limits are, respectively, 0.1 MW
and 0.4 MW.
Considering these data, the formulation of the ED problem is as follows:
minp1 ;p2

6p1 C 7p2

subject to

0:15  p1  0:6;
0:10  p2  0:4;
p1 C p2 D 0:85:
7.3 Economic Dispatch 211

The solution of the above problem is p1 D 0:6 MW and p2 D 0:25 MW, i.e.,
the cheapest generating unit (#1) is used at capacity, while only 0.25 MW of the
expensive generating unit (#2) are used in order to supply the demand.
The total operating cost, i.e., the optimal value of the objective function, is $5.35.

Illustrative Example 7.4 Marginal prices
We consider the data and solution of Illustrative Example 7.3.
If we look at the dual variable associated with the power balance constraint,
i.e., to constraint p1 C p2 D 0:85, we observe that its value at the optimum is
$7/MWh. This indicates that the marginal cost of consuming one additional unit of
energy is $7/MWh, i.e., the production cost of generating unit #2, which would be
the generating unit used to supply this additional unit of energy since the cheapest
generating unit #1 is being already used at capacity.
This dual variable is also known as the marginal price [6]. This is generally the
price paid to generating units for producing electrical energy and the price paid by
consumers for consuming electrical energy.


7.3.2 Economic Dispatch Considering Network Constraints

The solution of the ED problem described in the previous subsection is trivial; we


use the generating units from the cheapest to the most expensive to supply the given
demand. However, in reality, this problem is more complicated since demands and
generating units are located at the different nodes of an electric power network.
Thus, cheap generating units may not be used at capacity due to network constraints.
The objective of the ED problem considering network constraints is to find out,
for a single period of time, the output power of every generating unit so that all
demands are satisfied at minimum cost, while complying with the different technical
constraints of the network and the generating units.

7.3.2.1 Power Flows Through Transmission Lines

Each transmission line of a power network transfers power from its sending-end to
its receiving-end node. As shown in Sect. 3.5.4 of Chap. 3 of this book, the amount
of active power transferred is approximately proportional to the difference of the
voltage angles at these nodes. The constant of proportionality is the susceptance
of the line. Therefore, the active power transferred from node n to node m through
transmission line n  m is:

pLnm D Bnm .ın  ım / ; 8n; 8m 2 n ; (7.19)


212 7 Unit Commitment and Economic Dispatch

where:
• n and m are the node indexes,
• pLnm is the power transferred from node n to node m through transmission line
n  m,
• Bnm is the susceptance of transmission line n  m,
• ın and ım are the voltage angles at nodes n and m, and
• n is the set of nodes directly connected to node n.

7.3.2.2 Capacity Limits of Transmission Lines

For physical reasons, the amount of power transmitted through a transmission power
line has a limit as explained in Sect. 6.2.1.5 of Chap. 6 of this book. This limit is
related to either thermal or stability considerations. Therefore, a power line should
be operated so that its transmission capacity limit is not violated. This can be
formulated as:

nm  Bnm .ın  ım /  Pnm ;


 Pmax max
8n; 8m 2 n ; (7.20)

nm is the transmission capacity of transmission line n  m.


where Pmax

7.3.2.3 Reference Node

The power transferred through transmission lines is proportional to voltage angles


differences and not to a given angle. Therefore, the value of an arbitrary angle can
be fixed to 0 and taken as the origin. That is:

ın D 0; n: ref. (7.21)

A consequence of arbitrarily selecting the origin is that voltage angles are


variables not limited in sign.

7.3.2.4 Power Bounds

The power produced by a generating unit is a positive variable bounded below and
above. The lower limit is due to stability conditions (similarly, a car cannot move at
a speed below a limit), while the upper bound is due to thermal limits (similarly, a
car cannot move at a speed above its maximum one). The above can be expressed
as:

Pmin
g  pg  Pmax
g ; 8g: (7.22)
7.3 Economic Dispatch 213

Note that only the generating units that have been scheduled to be online in the
UC problem described in Sect. 7.2 of this chapter are considered in the ED problem.

7.3.2.5 Power Balance

At every node of the electric network, the power produced by the generating units
located at that node minus the power consumed by the demands at that node must
be equal to the net power injected through the transmission lines connected to that
node. That is:
X X X
pg  Dj D Bnm .ın  ım /; 8n; (7.23)
g2˝nG j2˝nD m2n

where:
• j is the index for demands,
• Dj is the load consumption of demand j,
• ˝nG is the set of generating units located at node n, and
• ˝nD is the set of demands located at node n.

7.3.2.6 Cost Function

The overall objective of the ED problem is to find out the power productions of the
generating units that meet the demand at minimum cost. Therefore, we can define
the objective function of the ED problem as the minimization of the total production
cost. That is:
X
CgV pg : (7.24)
g

7.3.2.7 Formulation

Considering the above definitions and explanations, the formulation of the ED


problem is as follows:
min
X
CgV pg (7.25a)
g
214 7 Unit Commitment and Economic Dispatch

subject to
X X X
pg  Dj D Bnm .ın  ım /; 8n; (7.25b)
g2˝nG j2˝nD m2n

Pmin
g  pg  Pmax
g ; 8g; (7.25c)
 Pmax
nm  Bnm .ın  ım /  Pnm ;
max
8n; 8m 2 n ; (7.25d)
ın D 0; n: ref.; (7.25e)

where variables in set  D fpg ; 8gI ın ; 8ng are the optimization variables of
problem (7.25).
The objective function (7.25a) is the operating cost. Constraints (7.25b) define
the power balance per node, constraints (7.25c) impose power bounds on gen-
erating units, constraints (7.25d) impose bounds on transmission lines, and con-
straint (7.25e) fixes the voltage angle at the reference node. Note that all variables
in problem (7.25) are generally expressed using the per-unit system described in
Sect. 2.6 of Chap. 2.
Problem (7.25), the ED problem considering network constraints, is an LP
problem [8].
It is important to note that the ED considering network constraints is similar
to the dc OPF analyzed in Chapter 6. The reader is encouraged to analyze the
similarities of formulations of problems (6.15) and (7.25).
Illustrative Example 7.5 Economic dispatch
We consider the three-node three-line power system depicted in Fig. 7.1. The
generating unit at node 1 produces at $6/puMWh and its lower and upper power
limits are, respectively, 0.15 and 0.6 puMW. The production cost of the generating
unit at node 2 is $7/puMWh and its lower and upper power limits are, respectively,
0.1 and 0.4 puMW.
Transmission line 1–2 has a susceptance 2.5 puS and a transmission-capacity
limit of 0.3 puMW, line 1–3 has a susceptance of 3.5 puS and a transmission-
capacity limit of 0.5 puMW, while line 2–3 has a susceptance of 3.0 puS and a
transmission-capacity limit of 0.4 MW.
This system has a single demand located at node 3 with a value of 0.85 puMW
and the angle origin is at node 3.

Fig. 7.1 Illustrative ∼ ∼


Example 7.5: three-node
power system 1 2

3
7.3 Economic Dispatch 215

Considering these data, the formulation of the ED problem is as follows:


minp1 ;p2 ;ı1 ;ı2

6p1 C 7p2

subject to

0:15  p1  0:6;
0:10  p2  0:4;
p1 D 3:5.ı1  ı3 / C 2:5.ı1  ı2 /;
p2 D 3:0.ı2  ı3 / C 2:5.ı2  ı1 /;
 0:85 D 3:5.ı3  ı1 / C 3:0.ı3  ı2 /;
 0:3  2:5.ı1  ı2 /  0:3;
 0:4  3:0.ı2  ı3 /  0:4;
 0:5  3:5.ı1  ı3 /  0:5;
ı3 D 0:

The optimal solution of this problem is easily obtained using an appropriate


optimization tool, e.g., CPLEX [4] under GAMS [2]. Such solution requires
generating unit at node 1 to produce 0.565 puMW and generating unit at node 2
to produce 0.285 puMW. The total operating cost, i.e., the optimal value of the
objective function, is $5.385.

An input GAMS [2] file to solve Illustrative Example 7.5 is provided in Sect. 7.6.
Illustrative Example 7.6 Economic dispatch: impact of transmission capacity
limits
We consider again the data of Illustrative Example 7.5 and note that producing
energy from the generating unit located at node 1 is cheaper than producing energy
from the generating unit located at node 2. Thus, we would expect to use the
generating unit located at node 1 at capacity, i.e., working at its maximum power
output and, then, using the generating unit located at node 2 to supply the remaining
power demand.
However, if we analyze the results of Illustrative Example 7.5, we observe that
none of the two generating units is working at capacity. This is explained by the
constraints of the power network. For example, if we relax the transmission-capacity
limits of all transmission lines and consider them equal to 1 puMW, the solution
of the problem becomes p1 D 0:6 puMW and p2 D 0:25 puMW, i.e., the cheap
generating unit located at node 1 working at capacity. In such a case, the total
operating cost is $5.350, 0.65% below the total cost in Illustrative Example 7.5.
216 7 Unit Commitment and Economic Dispatch

Note that if transmission-capacity limits are relaxed, the solution matches the
solution of Illustrative Example 7.3, which considers an ED problem without
transmission constraints.

Illustrative Example 7.7 Economic dispatch: locational marginal prices
We consider again the data and results of Illustrative Example 7.5. The dual
variables associated with the power balance constraints at nodes 1, 2, and 3
are $6.00/puMWh, $7.00/puMWh, and $7.83/puMWh, respectively. These dual
variables indicate the marginal costs of consuming additional energy at nodes 1,
2, and 3, respectively.
Note that marginal costs are different at different nodes. The reason is that as the
generating unit located at node 1 is not used at capacity, it can be used to cover a
marginal increase in the energy demand at node 1. Then, the marginal cost at this
node is $6.00/puMWh. However, if the marginal increase in the energy demand
occurs at node 2, then the generating unit located at node 1 cannot be used due
to network congestion and the generating unit located at node 2 must be used.
Therefore, the marginal cost at node 2 is $7.00/puMWh.
A particularly interesting case is the one pertaining to node 3, whose marginal
cost is $7.83/puMWh, a cost higher than the production cost of any of the two
production units, i.e., $6/puMWh and $7/puMWh. How is this possible? This is
actually so because in order to additionally supply 0.1 puMWh (small enough
change) at node 3 while complying with the network constraints, it is necessary
that the cheaper unit located at node 1 reduces its production by 0.083340 puMWh
(0.56548–0.48214) and the expensive one located at node 2 increases its production
by 0.18334 puMWh (0.46786–0.28452), which result in an increase in the total
production cost of $0.78334 (6.16786–5.38452). Thus, the marginal cost at node
3 is 0.78334/0.1 = $7.8334/puMWh.
If we relax the transmission-capacity limits of transmission lines and consider
them equal to 1 puMW, then the dual variables associated with the power balance
constraints are equal to $7.00/puMWh at all nodes. In this case, the generating unit
located at node 1 is working at capacity and a marginal increase in the energy
demand at any node should be covered by the generating unit located at node 2,
whose production cost is $7.00/puMWh.
The dual variables associated with power balance constraints are generally
known as locational marginal prices (LMPs) [7]. These prices are usually paid
to generating units for producing electrical energy and charged to demands for
consuming electrical energy.


7.4 Network-Constrained Unit Commitment

The UC problem described in Sect. 7.2 determines the scheduling of each generating
unit with the aim of minimizing costs and supplying all the demands in a power
system. This UC problem is solved by taking into account the technical constraints
7.4 Network-Constrained Unit Commitment 217

of generating units. Then, once the scheduling of each generating unit is decided, the
ED problem described in Sect. 7.3 determines the power output of each scheduled
generating unit with the aim of minimizing operation costs, while meeting the
technical constraints of the power system, including network constraints.
However, note that when the UC problem is solved, we do not consider the
technical constraints of the transmission system, e.g., the transmission-capacity
limits. Similarly, when we solve the ED problem, we do not consider some technical
constraints of generating units, e.g., ramping limits. Thus, the solution of both
problems may be suboptimal and even infeasible.
A possible solution is to jointly solve the UC and the ED problems. The resulting
problem, known as the network-constrained unit commitment (NCUC) problem, is
formulated below:
min
XX 
CgV pgt C CgF ugt C CgSU ygt C CgSD zgt (7.26a)
t g

subject to

ygt  zgt D ugt  ug;t1 ; 8g; 8t; (7.26b)


ygt C zgt  1; 8g; 8t; (7.26c)

g ugt  pgt  Pg ugt ;


Pmin 8g; 8t;
max
(7.26d)
pgt  pg;t1  RU
g ug;t1 C g ygt ;
RSU 8g; 8t; (7.26e)
pg;t1  pgt  C
RD
g ugt g zgt ;
8g; 8t;
RSD (7.26f)
X X X
pgt  Djt D Bnm .ınt  ımt /; 8n; 8t; (7.26g)
g2˝nG j2˝nD m2n

nm  Bnm .ınt  ımt /  Pnm ;


 Pmax max
8n; 8m 2 n ; 8t; (7.26h)
X X 
g ugt 
Pmax Djt C Rjt ; 8r; 8t; (7.26i)
g2rG j2rD

ınt D 0; n: ref.; 8t; (7.26j)


ugt ; ygt ; zgt 2 f0; 1g; 8g; 8t; (7.26k)

where:
• rU is the set of generating units in reliability area r,
• rD is the set of demands located in reliability area r, and
• variables in set  D fpgt ; ugt ; ygt ; zgt ; 8g; 8tI ınt ; 8n; 8tg are the optimization
variables of problem (7.26).
218 7 Unit Commitment and Economic Dispatch

Fig. 7.2 Illustrative ∼ ∼


Example 7.8: three-node
power system 1 2

3

The objective function (7.26a) is the total cost (fixed, variable, start-up, and shut-
down costs) throughout the planning horizon. Constraints (7.26b)–(7.26c) represent
the running logic of generating units. Constraints (7.26d) enforce power bounds for
generating units. Constraints (7.26e)–(7.26f) are ramping constraints of generating
units. Constraints (7.26g) enforce energy balance per node. Constraints (7.26h)
impose transmission bounds per transmission line. Constraints (7.26i) enforce
security constraints per reliability area. Constraints (7.26j) state the reference node.
Finally, constraints (7.26k) are binary variable declarations. Note that all variables
in problem (7.26) are generally expressed using the per-unit system described in
Sect. 2.6 of Chap. 2 of this book.
Problem (7.26) is a MILP problem and is known as the NCUC problem. The
NCUC problem is used by most US Independent System Operators (ISOs).
Illustrative Example 7.8 Network-constrained unit commitment
We consider again the data of Illustrative Example 7.2. Now, we assume that the
three generating units are connected at different nodes of the three-node three-line
power system depicted in Fig. 7.2: generating unit #1 is located at node 1, generating
unit #2 is located at node 2, and generating unit #3 is located at node 3. On the other
hand, we assume that all the demand is at node 3. We consider that the base power
is 100 MW so that all data in Illustrative Example 7.2 can be easily transformed into
a per-unit system.
The three transmission lines have a susceptance of 3 puS and a transmission-
capacity limit of 2 puMW. The origin of voltage angles is at node 3.
We assume that there is a single reliability area that comprises the three nodes.
Considering these data, the formulation of the NCUC problem is as follows:
min

5 .u11 C u12 C u13 / C 7 .u21 C u22 C u23 / C 6 .u31 C u32 C u33 /


C 10:0 .p11 C p12 C p13 / C 12:5 .p21 C p22 C p23 / C 50:0 .p31 C p32 C p33 /
C 20 .y11 C y12 C y13 / C 18 .y21 C y22 C y23 / C 5 .y31 C y32 C y33 /
C 0:5 .z11 C z12 C z13 / C 0:3 .z21 C z22 C z23 / C 1:0 .z31 C z32 C z33 /
7.4 Network-Constrained Unit Commitment 219

subject to

y11  z11 D u11  0;


y12  z12 D u12  u11 ;
y13  z13 D u13  u12 ;
y21  z21 D u21  0;
y22  z22 D u22  u21 ;
y23  z23 D u23  u22 ;
y31  z31 D u31  1;
y32  z32 D u32  u31 ;
y33  z33 D u33  u32 ;
y11 C z11  1;
y12 C z12  1;
y13 C z13  1;
y21 C z21  1;
y22 C z22  1;
y23 C z23  1;
y31 C z31  1;
y32 C z32  1;
y33 C z33  1;
u11 ; y11 ; z11 ; u12 ; y12 ; z12 ; u13 ; y13 ; z13 2 f0; 1g;
u21 ; y21 ; z21 ; u22 ; y22 ; z22 ; u23 ; y23 ; z23 2 f0; 1g;
u31 ; y31 ; z31 ; u32 ; y32 ; z32 ; u33 ; y33 ; z33 2 f0; 1g;
0:50u11  p11  3:50u11 ;
0:50u12  p12  3:50u12 ;
0:50u13  p13  3:50u13 ;
0:80u21  p21  2:00u21 ;
0:80u22  p22  2:00u22 ;
0:80u23  p23  2:00u23 ;
0:40u31  p31  1:40u31 ;
0:40u32  p32  1:40u32 ;
220 7 Unit Commitment and Economic Dispatch

0:40u33  p33  1:40u33 ;


p11  0  0 C 2:00y11 ;
p12  p11  2:00u11 C 2:00y12 ;
p13  p12  2:00u12 C 2:00y13 ;
p21  0  0 C 1:00y21 ;
p22  p21  1:00u21 C 1:00y22 ;
p23  p22  1:00u22 C 1:00y23 ;
p31  1  1:00 C 1:00y31 ;
p32  p31  1:00u31 C 1:00y32 ;
p33  p32  1:00u32 C 1:00y33 ;
0  p11  3:00u11 C 3:00z11 ;
p11  p12  3:00u12 C 3:00z12 ;
p12  p13  3:00u13 C 3:00z13 ;
0  p21  1:50u21 C 1:50z21 ;
p21  p22  1:50u22 C 1:50z22 ;
p22  p23  1:50u23 C 1:50z23 ;
1  p31  1:00u31 C 1:00z31 ;
p31  p32  1:00u32 C 1:00z32 ;
p32  p33  1:00u33 C 1:00z33 ;
p11 D 3.ı11  ı31 / C 3.ı11  ı21 /;
p21 D 3.ı21  ı31 / C 3.ı21  ı11 /;
 1:60 D 3.ı31  ı11 / C 3.ı31  ı21 /;
 2  3.ı11  ı21 /  2;
 2  3.ı21  ı31 /  2;
 2  3.ı11  ı31 /  2;
ı31 D 0;
p12 D 3.ı12  ı32 / C 3.ı12  ı22 /;
p22 D 3.ı22  ı32 / C 3.ı22  ı12 /;
 5:00 D 3.ı32  ı12 / C 3.ı32  ı22 /;
 2  3.ı12  ı22 /  2;
7.4 Network-Constrained Unit Commitment 221

 2  3.ı22  ı32 /  2;
 2  3.ı12  ı32 /  2;
ı32 D 0;
p13 D 3.ı13  ı33 / C 3.ı13  ı23 /;
p23 D 3.ı23  ı33 / C 3.ı23  ı13 /;
 4:00 D 3.ı33  ı13 / C 3.ı33  ı23 /;
 2  3.ı13  ı23 /  2;
 2  3.ı23  ı33 /  2;
 2  3.ı13  ı33 /  2;
ı33 D 0;
3:50u11 C 2:00u21 C 1:40u31  1:60 C 0:16;
3:50u12 C 2:00u22 C 1:40u32  5:00 C 0:50;
3:50u13 C 2:00u23 C 1:40u33  4:00 C 0:40:

The optimization variables of this NCUC problem are those included in set  D
fp11 , p12 , p13 , p21 , p22 , p23 , p31 , p32 , p33 , u11 , y11 , z11 , u12 , y12 , z12 , u13 , y13 , z13 , u21 ,
y21 , z21 , u22 , y22 , z22 , u23 , y23 , z23 , u31 , y31 , z31 , u32 , y32 , z32 , u33 , y33 , z33 , ı11 , ı12 , ı13 ,
ı21 , ı22 , ı23 , ı31 , ı32 , ı33 g.
As explained in Appendix B of this book, the solution of the above NCUC
problem can be obtained using an appropriate optimization tool, e.g., CPLEX [4]
under GAMS [2].
Table 7.5 provides the optimal commitment status of generating units, i.e., the
optimal values of binary variables ugt , 8g, 8t, throughout the planning horizon.
Generating unit #1 is started up at the beginning of hour 2 and remains online the
following 2 h, generating unit #2 is started up at the beginning of hour 1 and remains
online during the 3 h, while generating unit #3 is shut-down at the beginning of
hour 3.
Table 7.6 provides the optimal power output of each generating unit during the
planning horizon.

Table 7.5 Illustrative Generating unit/Time period 1 2 3


Example 7.8: commitment
status of generating units #1 0 1 1
#2 1 1 1
#3 1 1 0
222 7 Unit Commitment and Economic Dispatch

Table 7.6 Illustrative Generating unit/Time period 1 2 3


Example 7.8: power outputs
[MW] of generating units #1 0 200 200
#2 100 200 200
#3 60 100 0

The data considered in this illustrative example and those considered in the UC
problem solved in Illustrative Example 7.2 are the same. However, the commitment
status and power outputs of generating units are different due to the network
constraints. As a result, the total operating cost in this example is 7.85% higher
than that in Illustrative Example 7.2 ($229.5 versus $212.8).
If transmission-capacity limits are relaxed and, for example, we consider that the
transmission-capacity limit of each transmission line is 4 puMW, then the solution
of the UC problem solved in Illustrative Example 7.2 and the solution of the NCUC
problem solved here are the same.

An input GAMS [2] file to solve Illustrative Example 7.8 is provided in Sect. 7.6.

7.5 Summary and Further Reading

This chapter describes three important problems for the technical and economic
management of centralized electricity markets, namely the UC, the ED, and the
NCUC problems. The UC determines, for a given planning horizon, the optimal
start-up and shut-down schedules of thermal generating units considering their
technical limits. The ED problem determines, for a single time period of the
planning horizon, the actual power output of each generating unit considering the
constraints of the transmission network. Finally, the NCUC jointly considers the UC
and ED problems.
These three problems are mostly used in markets throughout the USA, not in
Europe. The common practice in electricity markets in Western Europe is described
in the next chapter.
Additional details regarding UC and EC problems can be found, for instance, in
the monograph by Wollenberg et al. [9] or in the one by Gómez-Expósito et al. [3].

7.6 GAMS Codes

This section provides the GAMS codes [2] used to solve some of the illustrative
examples of this chapter.
7.6 GAMS Codes 223

7.6.1 Unit Commitment

An input GAMS [2] file to solve Illustrative Example 7.2 is provided below:
1 option optcr=0;
2 sets
3 t time_periods /0*3/
4 i units /1*3/
5 table gdat(i,*) unit data
6 pmin pmax rd rsd ru rsu cf csu csd cv
7 * (MW) (MW) (MW/h) (MW/h) (MW/h) (MW/h) ($) ($) ($) ($/MWh)
8 1 50 350 300 300 200 200 5 20 0.5 0.100
9 2 80 200 150 150 100 100 7 18 0.3 0.125
10 3 40 140 100 100 100 100 6 05 1.0 0.150;
11 table pdat(t,*) demand_and_reserve data
12 d r
13 * (MW) (MW)
14 1 160 16
15 2 500 50
16 3 400 40;
17 variables
18 zf objective function_variable
19 p(i,t) output of unit i at t
20 u(i,t) 1_if unit i on at t
21 y(i,t) 1_if unit i is started_up at the beginning of t
22 z(i,t) 1_if unit i is shut_down at the beginning of t;
23 positive variables p(i,t);
24 binary variables u(i,t),y(i,t),z(i,t);
25 u.fx(’1’,’0’)=0;
26 u.fx(’2’,’0’)=0;
27 u.fx(’3’,’0’)=1;
28 p.fx(’1’,’0’)=0;
29 p.fx(’2’,’0’)=0;
30 p.fx(’3’,’0’)=100;
31 equations
32 cost objective function
33 logice(i,t) start_up shut_down and_running logic
34 pmaxlim(i,t) capacity per unit and_period
35 pminlim(i,t) minimum power output per unit and_period
36 load(t) load balance per period
37 reserve(t) spinning reserve per period
38 rampup(i,t) ramping_up limit
39 rampdown(i,t) ramping_down limit;
40 cost..zf=e=
41 sum((t,i),
42 gdat(i,’cf’)*u(i,t)+gdat(i,’csu’)*y(i,t)+
43 gdat(i,’csd’)*z(i,t)+gdat(i,’cv’)*p(i,t));
44 logice(i,t)$(ord(t) gt 1)..
45 y(i,t)-z(i,t)=e=u(i,t)-u(i,t-1);
46 pmaxlim(i,t)$(ord(t) gt 1)..
47 p(i,t)=l=gdat(i,’pmax’)*u(i,t) ;
48 pminlim(i,t)$(ord(t) gt 1)..
49 p(i,t)=g=gdat(i,’pmin’)*u(i,t) ;
224 7 Unit Commitment and Economic Dispatch

50 load(t)$(ord(t) gt 1)..
51 sum(i,p(i,t))=e=pdat(t,’d’);
52 reserve(t)$(ord(t) gt 1)..
53 sum(i,gdat(i,’pmax’)*u(i,t))=g=pdat(t,’d’)+pdat(t,’r’);
54 rampup(i,t)$(ord(t) gt 1)..
55 p(i,t)-p(i,t-1)=l=gdat(i,’ru’)*u(i,t-1)+gdat(i,’rsu’)*y(i,t);
56 rampdown(i,t)$(ord(t) gt 1)..
57 p(i,t-1)-p(i,t)=l=gdat(i,’rd’)*u(i,t)+gdat(i,’rsd’)*z(i,t);
58 model uc /all/;
59 solve uc using mip minimizing zf;
60 options decimals=5;
61 display zf.l, p.l;
62 options decimals=0;
63 display u.l, y.l, z.l;

This code follows the math formulation of the UC problem in Illustrative


Example 7.2. However, comprehending all its details requires careful attention from
the reader.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 61 VARIABLE zf.L = 212.80000
objective function_variable
2 ---- 61 VARIABLE p.L output of unit i at t
3 0 1 2 3
4 1 160.00000 350.00000 350.00000
5 2 100.00000
6 3 100.00000 50.00000 50.00000
7 ---- 63 VARIABLE u.L 1_if unit i on at t
8 0 1 2 3
9 1 1 1 1
10 2 1
11 3 1 1 1
12 ---- 63 VARIABLE y.L 1_if unit i is started_up at the
beginning of t
13 1 2
14 1 1
15 2 1
16 3 1
17 ---- 63 VARIABLE z.L 1_if unit i is shut_down at the
beginning of t
18 1 3
19 2 1
20 3 1

Note that this output file is self-explanatory.


7.6 GAMS Codes 225

7.6.2 Economic Dispatch

An input GAMS [2] file to solve Illustrative Example 7.5 is provided below:
1 sets
2 g units /g1*g2/
3 d demands /d1/
4 n nodes /n1*n3/
5 g2n(g,n) g to n /g1.n1,g2.n2/
6 d2n(d,n) d to n /d1.n3/
7 n2n(n,n) n to n /n1.n2,n2.n1,n1.n3,n3.n1,n2.n3,n3.n2/;
8 alias(n,m);
9 table gdata(g,*) unit data
10 pmin pmax cost
11 * (MW) (MW) ($/MWh)
12 g1 0.15 0.6 6
13 g2 0.1 0.4 7;
14 table ddata(d,*) unit data
15 l
16 * (MW)
17 d1 0.85;
18 table ldata(n,n,*) line data
19 sus limit
20 * (pu) (kw)
21 n1.n2 2.5 0.3
22 n1.n3 3.5 0.5
23 n2.n3 3.0 0.4;
24 ldata(n,m,’sus’)$(ord(n) gt ord(m))=ldata(m,n,’sus’);
25 ldata(n,m,’limit’)$(ord(n) gt ord(m))=ldata(m,n,’limit’);
26 variables
27 z objetive function
28 p(g) power output of unit g
29 a(n) angle at node n;
30 p.lo(g)=gdata(g,’pmin’);
31 p.up(g)=gdata(g,’pmax’);
32 a.fx(’n3’)=0;
33 equations
34 cost objective function
35 maxp(n,m) line capacity nm
36 minp(n,m) line capacity mn
37 lbal(n) load balance constraint;
38 *
39 cost.. sum(g,gdata(g,’cost’)*p(g))=e=z;
40 maxp(n,m).. ldata(n,m,’sus’)*(a(n)-a(m))=l= ldata(n,m,’limit’);
41 minp(n,m).. ldata(n,m,’sus’)*(a(n)-a(m))=g=-ldata(n,m,’limit’);
42 lbal(n).. sum(g$g2n(g,n),p(g))-
43 sum(d$d2n(d,n),ddata(d,’l’))=e=
44 sum(m$n2n(m,n),ldata(n,m,’sus’)*(a(n)-a(m)));
45 model ed /all/;
46 solve ed using lp minimizing z;
47 option decimals=5;
48 display z.l, p.l, lbal.m, a.l;
226 7 Unit Commitment and Economic Dispatch

This code follows the math formulation of the ED problem in Illustrative


Example 7.5. However, comprehending all its details requires careful attention from
the reader.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 48 VARIABLE z.L = 5.38452
objetive function
2 ---- 48 VARIABLE p.L power output of unit g
3 g1 0.56548, g2 0.28452
4 ---- 48 EQUATION lbal.M load balance constraint
5 n1 6.00000, n2 7.00000, n3 7.83333
6 ---- 48 VARIABLE a.L angle at node n
7 n1 0.14286, n2 0.11667

Note that this output file is self-explanatory.

7.6.3 Network-Constrained Unit Commitment

An input GAMS [2] file to solve Illustrative Example 7.8 is provided below:
1 option optcr=0;
2 sets
3 g units /g1*g3/
4 d demands /d1/
5 n nodes /n1*n3/
6 g2n(g,n) g to n /g1.n1,g2.n2,g3.n3/
7 d2n(d,n) d to n /d1.n3/
8 n2n(n,n) n to n /n1.n2,n2.n1,n1.n3,n3.n1,n2.n3,n3.n2/
9 t time_periods /t0*t3/ ;
10 alias(n,m);
11 table gdat(g,*) unit data
12 pmin pmax rd rsd ru rsu cf csu csd cv
13 * (pu) (pu) (pu/h) (pu/h) (pu/h) (pu/h) ($) ($) ($) ($/pu)
14 g1 0.50 3.50 3.00 3.00 2.00 2.00 5 20 0.5 10.0
15 g2 0.80 2.00 1.50 1.50 1.00 1.00 7 18 0.3 12.5
16 g3 0.40 1.40 1.00 1.00 1.00 1.00 6 05 1.0 15.0;
17 table pdat(d,t,*) demand_and_reserve data
18 l r
19 * (pu) (pu)
20 d1.t1 1.60 0.16
21 d1.t2 5.00 0.50
22 d1.t3 4.00 0.40;
23 table ldata(n,n,*) line data
24 sus limit
25 * (pu) (pu)
26 n1.n2 3 2
27 n1.n3 3 2
28 n2.n3 3 2;
29 ldata(n,m,’sus’)$(ord(n) gt ord(m))=ldata(m,n,’sus’);
7.6 GAMS Codes 227

30 ldata(n,m,’limit’)$(ord(n) gt ord(m))=ldata(m,n,’limit’);
31 variables
32 zf objective function_variable
33 p(g,t) output of unit g at t
34 u(g,t) 1_if unit g on at t
35 y(g,t) 1_if unit g is started_up at the beginning of t
36 z(g,t) 1_if unit g is shut_down at the beginning of t
37 a(n,t) angle at node n at t;
38 positive variables p(g,t);
39 binary variables u(g,t),y(g,t),z(g,t);
40 u.fx(’g1’,’t0’)=0;
41 u.fx(’g2’,’t0’)=0;
42 u.fx(’g3’,’t0’)=1;
43 p.fx(’g1’,’t0’)=0;
44 p.fx(’g2’,’t0’)=0;
45 p.fx(’g3’,’t0’)=1;
46 a.fx(’n3’,t)=0;
47 equations
48 cost objective function
49 maxp(n,m,t) line capacity nm
50 minp(n,m,t) line capacity mn
51 lbal(n,t) load balance constraint
52 logice(g,t) start_up shut_down and_running logic
53 pmaxlim(g,t) capacity per unit and_period
54 pminlim(g,t) minimum power output per unit and_period
55 reserve(t) spinning reserve per period
56 rampup(g,t) ramping_up limit
57 rampdown(g,t) ramping_down limit;
58 *
59 cost.. zf=e=
60 sum((t,g),
61 gdat(g,’cf’)*u(g,t)+gdat(g,’csu’)*y(g,t)+
62 gdat(g,’csd’)*z(g,t)+gdat(g,’cv’)*p(g,t));
63 maxp(n,m,t)$(ord(t) gt 1).. ldata(n,m,’sus’)*(a(n,t)-a(m,t))=l=
ldata(n,m,’limit’);
64 minp(n,m,t)$(ord(t) gt 1).. ldata(n,m,’sus’)*(a(n,t)-a(m,t))=g=-
ldata(n,m,’limit’);
65 lbal(n,t)$(ord(t) gt 1).. sum(g$g2n(g,n),p(g,t))-
66 sum(d$d2n(d,n),pdat(d,t,’l’))=e=
67 sum(m$n2n(m,n),ldata(n,m,’sus’)*(a(n,t)-a(m,t)));
68 logice(g,t)$(ord(t) gt 1)..
69 y(g,t)-z(g,t)=e=u(g,t)-u(g,t-1);
70 pmaxlim(g,t)$(ord(t) gt 1)..
71 p(g,t)=l=gdat(g,’pmax’)*u(g,t) ;
72 pminlim(g,t)$(ord(t) gt 1)..
73 p(g,t)=g=gdat(g,’pmin’)*u(g,t) ;
74 reserve(t)$(ord(t) gt 1)..
75 sum(g,gdat(g,’pmax’)*u(g,t))=g=sum(d,pdat(d,t,’l’)+pdat(d,t,’r’)
);
76 rampup(g,t)$(ord(t) gt 1)..
77 p(g,t)-p(g,t-1)=l=gdat(g,’ru’)*u(g,t-1)+gdat(g,’rsu’)*y(g,t);
78 rampdown(g,t)$(ord(t) gt 1)..
79 p(g,t-1)-p(g,t)=l=gdat(g,’rd’)*u(g,t)+gdat(g,’rsd’)*z(g,t);
80 model ncuc /all/;
228 7 Unit Commitment and Economic Dispatch

81 solve ncuc using mip minimizing zf;


82 option decimals=5;
83 display zf.l, p.l, a.l;
84 options decimals=0;
85 display u.l, y.l, z.l;

This code follows the math formulation of the NCUC problem in Illustrative
Example 7.8. However, comprehending all its details requires careful attention from
the reader.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 83 VARIABLE zf.L = 229.50000
objective function_variable
2 ---- 83 VARIABLE p.L output of unit g at t
3 t0 t1 t2 t3
4 g1 2.00000 2.00000
5 g2 1.00000 2.00000 2.00000
6 g3 1.00000 0.60000 1.00000
7 ---- 83 VARIABLE a.L angle at node n at t
8 t1 t2 t3
9 n1 0.11111 0.66667 0.66667
10 n2 0.22222 0.66667 0.66667
11 ---- 85 VARIABLE u.L 1_if unit g on at t
12 t0 t1 t2 t3
13 g1 1 1
14 g2 1 1 1
15 g3 1 1 1
16 ---- 85 VARIABLE y.L 1_if unit g is started_up at the
beginning of t
17 t1 t2
18 g1 1
19 g2 1
20 ---- 85 VARIABLE z.L 1_if unit g is shut_down at the
beginning of t
21 t3
22 g3 1

Note that this output file is self-explanatory.

7.7 End-of-Chapter Exercises

7.1 Which is the purpose of the unit commitment problem? Which is the purpose
of the economic dispatch problem?
7.2 Describe the main differences between the unit commitment, the economic
dispatch, and the network-constrained unit commitment problems.
7.7 End-of-Chapter Exercises 229

Table 7.7 Exercise 7.5: data Generating unit # 1 2


of generating units
Minimum power output [MW] a=10 b=10
Capacity [MW] a b
Fixed cost [$] 1 1
Start-up cost [$] 10 10
Shut-down cost [$] 1 1
Variable cost [$/MWh] 1 1
Initial status Off Off

Fig. 7.3 Exercise 7.8: 2 2


0 ≤ p1 ≤ 3
0 ≤ p2 ≤ 3
three-node power system
C1V = 1 1 C2V = 2
∼ ∼
d3 = 0
1 3 2
B13 = 1 B23 = 1
max = 1
P13 max = 1
P23

7.3 Discuss the validity of the following statement: the total cost of the operating
condition that results from the solution of the network-constrained unit commitment
problem is always higher than the total cost of the operating condition that results
from the solution of the unit commitment problem.
7.4 Describe the main differences between the economic dispatch and the optimal
power flow problem described in Chap. 6.
7.5 Consider a two-unit one-period scheduling (unit commitment) problem. The
data of generating units are provided in Table 7.7. Considering that the demand is c,
the reserve c=10, and that there are no ramping constraints, write the corresponding
single-period unit commitment problem.
7.6 Consider again the data of Exercise 7.5 and a three-period planning horizon.
The demands in these three periods are c, 0:8c, and 1:2c, respectively, while the
reserve requirements are, respectively, c=10, 0:8c=10, and 1:2c=10. The up- and
down-ramping limits of generating units #1 and #2 are a=2 and b=4, respectively.
No start-up/shut-down ramping limits are considered. Formulate the corresponding
unit commitment problem.
7.7 Extend the formulation of the unit commitment problem provided in Sect. 7.2
by including minimum up and down times as described in [5].
7.8 Consider the three-node power system and data provided in Fig. 7.3:
1. Formulate the corresponding economic dispatch problem.
2. Write a specific GAMS code to solve this economic dispatch problem.
3. Solve the economic dispatch problem and discuss the solution obtained.
230 7 Unit Commitment and Economic Dispatch

Fig. 7.4 Exercise 7.9: 0 ≤ p3 ≤ 4


four-node power system C3V = 3
2

3 4

d1 = 0

1 2
0.5 ∼

0 ≤ p1 ≤ 4 2
C1V = 1

Table 7.8 Exercises 7.10: Generating unit # 1 2


data of generating units
Minimum power output [puMW] 0.15 0.2
Capacity [puMW] 1.5 1.5
Ramping-down limit [puMW/h] 0.2 0.3
Shut-down ramping limit [puMW/h] 0.2 0.3
Ramping-up limit [puMW/h] 0.2 0.3
Start-up ramping limit [puMW/h] 0.2 0.3
Fixed cost [$] 3 1
Start-up cost [$] 5 2
Shut-down cost [$] 1 1
Variable cost [$/puMWh] 10 20

Fig. 7.5 Exercise 7.10: #1 #2


three-node power system ∼ ∼
d3 = 0
1 3 2
B13 = 1 B23 = 1
max = 1
P13 max = 1
P23

7.9 Repeat Exercise 7.8 for the four-node power system depicted in Fig. 7.4. All
transmission lines have the same characteristics with a susceptance of 10 puS and a
capacity of 2 puMW.
7.10 Consider the two generating units whose technical and economic data are
provided in Table 7.8. These generating unit are located in a three-node power
system, whose data are provided in Fig. 7.5. Generating units #1 and #2 are located
at nodes 1 and 2, respectively, while there is a demand at node 3.
7.7 End-of-Chapter Exercises 231

We consider a 4 h planning horizon with hourly demands equal to 1, 0.9, 1.3, and
1.5 puMW, respectively. The reserve requirement is 10% of the demand at each time
period. There is a single reliability area comprising the three nodes.
Both generating units were online in the time period prior to the beginning of
the planning horizon with power outputs equal to 0.7 and 0.6 puMW for generating
units #1 and #2, respectively.
Considering these data:
1. Formulate the corresponding network-constrained unit commitment problem.
2. Write a specific GAMS code to solve this network-constrained unit commitment
problem.
3. Solve the network-constrained unit commitment problem and discuss the solu-
tion obtained.
7.11 Consider the two generating units whose technical and economic data are
provided in Table 7.9. These generating units are located in the four-node power
system depicted in Fig. 7.6. Generating units #1 and #2 are located at nodes 1 and 3,

Table 7.9 Exercises 7.10: Generating unit # 1 2


data of generating units
Minimum power output [puMW] 0.4 0.8
Capacity [puMW] 4 4
Ramping-down limit [puMW/h] 0.2 0.4
Shut-down ramping limit [puMW/h] 0.6 1.2
Ramping-up limit [puMW/h] 0.2 0.4
Start-up ramping limit [puMW/h] 0.6 1.2
Fixed cost [$] 5 2
Start-up cost [$] 10 8
Shut-down cost [$] 2 1
Variable cost [$/puMWh] 15 30

Fig. 7.6 Exercise 7.11: #2


four-node power system ∼

3 4

d1 = 0

1 2

232 7 Unit Commitment and Economic Dispatch

Table 7.10 Exercises 7.10: Time period/Node 1 2 4


data of demands [puMW]
1 0.5 2.0 2.0
2 0.7 2.2 2.2
3 0.4 1.8 1.8
4 0.6 2.0 2.0

respectively. All transmission lines have the same characteristics with a susceptance
of 10 puS and a capacity of 2 puMW.
There are three demands at nodes 1, 2, and 4. We consider a 4 h planning horizon
whose data are provided in Table 7.10.
There are two reliability areas: (1) the first one comprises nodes 1 and 2 and (2)
the second one comprises nodes 3 and 4. The reserve requirement is 10% of the
demand at each time period in each reliability area.
Both generating units were online in the time period prior to the beginning of the
planning horizon with power outputs equal to 2 and 2.5 puMW for generating units
#1 and #2, respectively.
Considering these data:
1. Formulate the corresponding network-constrained unit commitment problem.
2. Write a specific GAMS code to solve this network-constrained unit commitment
problem.
3. Solve the network-constrained unit commitment problem and discuss the solu-
tion obtained.

References

1. Bertsimas, D., Weismantel, R.: Optimization Over Integers. Dynamic Ideas, Belmont (2005)
2. GAMS. www.gams.com/ (2016)
3. Gómez-Expósito, A., Conejo, A.J., Cañizares, C.: Electric Energy Systems: Analysis and
Operation. Taylor and Francis, Boca Raton, FL (2008)
4. ILOG CPLEX. www.ilog.com/products/cplex/ (2016)
5. Ostrowski, J., Anjos, M.F., Vannelli, A.: Tight mixed integer linear programming formulations
for the unit commitment problem. IEEE Trans. Power Syst. 27(1), 39–46 (2012)
6. Pérez-Arriaga, J.I., Meseguer, C.: Wholesale marginal prices in competitive generation markets.
IEEE Trans. Power Syst. 12(2), 710–717 (1997)
7. Schweppe, F.C., Caramanis, M.C., Tabors, R.D., Bohn, R.E.: Spot Pricing of Electricity.
Springer, New York, NY (1988)
8. Sioshansi, R., Conejo, A.J.: Optimization in Engineering. Models and Algorithms. Springer,
New York, NY (2017)
9. Wood, A.J., Wollenberg, B.F., Sheblé, G.B.: Power Generation, Operation and Control, 3rd edn.
Wiley-Interscience, Hoboken, NJ (2013)

You might also like