Chapter 7 Unit Commitment and Economic Dispatch
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
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.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
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.
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)
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.
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.
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:
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:
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
Thermal generating units cannot operate below a minimum power output and above
a maximum power output (capacity). These technical constraints can be expressed
as:
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.
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.
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.
Pg0 pg1 RD
g ug1 C Rg zg1 ;
SD
8g: (7.14)
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.
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
subject to
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
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:
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:
• 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
and:
• Power balance:
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.
This section describes and formulates the economic dispatch (ED) problem.
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.
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:
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.
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:
ın D 0; n: ref. (7.21)
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.
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.
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
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.
3
7.3 Economic Dispatch 215
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:
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.
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
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
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
subject to
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.
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.
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].
This section provides the GAMS codes [2] used to solve some of the illustrative
examples of this chapter.
7.6 GAMS Codes 223
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;
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
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
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
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
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
3 4
d1 = 0
1 2
0.5 ∼
0 ≤ p1 ≤ 4 2
C1V = 1
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,
3 4
d1 = 0
1 2
∼
232 7 Unit Commitment and Economic Dispatch
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)