Escolar Documentos
Profissional Documentos
Cultura Documentos
Antonio J. Conejo
Luis Baringo
Power
System
Operations
Power Electronics and Power Systems
Series editors
Joe H. Chow, Rensselaer Polytechnic Institute, Troy, New York, USA
Alex M. Stankovic, Tufts University, Medford, Massachusetts, USA
David J. Hill, The University of Hong Kong, Pokfulam, Hong Kong
The Power Electronics and Power Systems Series encompasses power electronics,
electric power restructuring, and holistic coverage of power systems. The Series
comprises advanced textbooks, state-of-the-art titles, research monographs, profes-
sional books, and reference works related to the areas of electric power transmis-
sion and distribution, energy markets and regulation, electronic devices, electric
machines and drives, computational techniques, and power converters and
inverters. The Series features leading international scholars and researchers within
authored books and edited compilations. All titles are peer reviewed prior to
publication to ensure the highest quality content. To inquire about contributing to
the Power Electronics and Power Systems Series, please contact Dr. Joe Chow,
Administrative Dean of the College of Engineering and Professor of Electrical,
Computer and Systems Engineering, Rensselaer Polytechnic Institute, Jonsson
Engineering Center, Office 7012, 110 8th Street, Troy, NY USA, 518-276-6374,
chowj@rpi.edu.
123
Antonio J. Conejo Luis Baringo
Integrated Systems Engineering Electrical Engineering
Electrical and Computer Engineering University of Castilla - La Mancha
The Ohio State University Ciudad Real, Spain
Columbus, Ohio, USA
vii
viii Preface
Chapter 5 considers the state estimation problem and includes its formulation,
solution techniques, observability analysis, and bad measurement detection and
identification.
Chapter 6 addresses the formulation and solution of operation security problems,
including the optimal power flow and the security-constrained optimal power flow.
Chapter 7 considers a centralized market operation and provides formulation
and solution techniques for the unit commitment, the economic dispatch, and the
network-constrained unit commitment problems.
Chapter 8 considers a non-centralized market operation and addresses the self-
scheduling problem and the formulation of market clearing algorithms.
Finally, Appendix A reviews the solution to nonlinear systems of equations,
while Appendix B provides an introduction to optimization techniques.
The material in this book fits the needs of an advanced undergraduate or graduate
course on power system operations. Chapters 1 and 2 may be skipped if the students
are familiar with the analysis of power circuits. Chapters 7 and 8 may be skipped if
the economic operations of power systems do not need to be covered.
The book provides an adequate blend of engineering background and analytical
methods. This feature makes the book of interest to practitioners as well as to
students in power engineering and other engineering fields. Practical applications
are developed up to working algorithms (coded in GNU Octave and GAMS) that
can be readily used.
The benefits of reading this book include comprehension of power system
operation problems, and learning how to formulate such problems, solve them, and
interpret their solution outputs. This is done using a problem-solving engineering
approach.
To conclude, we would like to thank our colleagues and students at The
Ohio State University and Universidad de Castilla–La Mancha for their insightful
observations, pertinent corrections, and helpful comments.
1 Power Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Power System Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.1 Physical Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.2 Economic Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.3 Regulatory Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Power System Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.1 Day-Ahead Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.2 Hours Before Power Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.3 Minutes Before Power Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4 Power Markets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.1 Futures Market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.2 Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 Scope of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.1 What We Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.2 What We Do Not Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2 Power System Fundamentals: Balanced Three-Phase Circuits . . . . . . . . . 17
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2 Balanced Three-Phase Sequences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 Balanced Three-Phase Voltages and Currents . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.1 Balanced Three-Phase Voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.2 Balanced Three-Phase Currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.3 Equivalence Wye-Delta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3.4 Common Star Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.4 Instantaneous, Active, Reactive, and Apparent Power . . . . . . . . . . . . . . . 42
2.4.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.2 How to Measure Power? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.5 Why Three-Phase Power? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
ix
x Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Chapter 1
Power Systems
This introductory chapter provides an overview (1) of the physical, economic, and
regulatory layers of power systems; (2) of how such systems are operated; and
(3) of power markets, which constitute the prevalent paradigm of power system
management.
1.1 Introduction
We briefly describe below the physical, economic, and regulatory layers of power
systems.
Transformer Transformer
Transformer
400 kV
13.8 kV 20 kV 110 V per phase
3. distribution, and
4. supply.
Figure 1.1 illustrates the physical layer of a power system, including the genera-
tion, transmission, distribution, and supply subsystems. Each of these subsystems
has a different nominal voltage level. In this sense, it is important to note that
transformers interconnect these four subsystems since they regulate and change the
voltage levels.
Regarding the physical layer of a power system, Chaps. 2 and 3 provide the
fundamentals of three-phase circuit analysis [12, 13] and the basic models of power
system components, respectively. These chapters describe the physical foundations
of power systems.
Additional details regarding the physical layer of power systems can be found in
the monograph by Kothari and Nagrath [8].
1.2.1.1 Generation
The generation subsystem includes the production facilities that generate electricity.
Production facilities rely on nuclear or fossil fuels, and on renewable sources.
On the one hand, nuclear and fossil fuel facilities include nuclear power plants as
well as oil, coal, and natural gas-fired power plants. On the other hand, renewable
facilities include hydro, wind, solar, and biomass power plants.
Nuclear power plants are generally in decline due to potential security issues
and the costly long-term handling of nuclear residuals. However, once built, their
operation does not entail any direct environmental impact. Oil and coal-fired power
plants are also in decline due to their high environmental impact in terms of both
pollutant emissions (NOx and SOx ) and carbon dioxide (CO2 ) emissions.
Natural gas-fired power plants are increasingly common due to their efficiency
and high flexibility, which allow compensating demand and renewable-production
fluctuations. Furthermore, they have a limited environmental impact and are eco-
nomically competitive.
1.2 Power System Structure 3
1.2.1.2 Transmission
The transmission subsystem is the network of electricity freeways that allow moving
bulk electrical energy from production centers to consumption areas. It is the
backbone of the electrical grid.
Most transmission facilities are alternating current (ac) transmission lines with
voltage levels generally ranging from 100 kV to 600 kV. The frequency is 60 Hz
in USA, and 50 Hz in Europe and many other places in the world. Direct current
(dc) high voltage transmission lines are increasingly common since they do not
synchronize the systems they interconnect and they are economically competitive
for very long distances (e.g., longer than 1000 mi). A typical voltage level of a dc
transmission line is 500 kV.
The transmission subsystem includes power transformers, which allow inter-
connecting areas of the transmission subsystem that operate at different voltage
levels, and generating facilities, which are connected to the transmission network via
step-up transformers. A typical generation voltage level is 13.8 kV, while a typical
transmission voltage level is 400 kV. Thus, 13.8/400 kV transformers are required
in this case.
4 1 Power Systems
Line
Node
Figure 1.3 illustrates the transmission subsystem, specifying nodes (buses) and
lines. As the one depicted in this figure, most transmission subsystems are meshed
networks, not radial ones.
1.2.1.3 Distribution
The distribution subsystem is the network of electrical highways and roads that
allow moving electricity from the transmission system to the actual consumption
centers.
A typical distribution voltage is 20 kV and distribution networks are connected
to the transmission subsystem via power transformers. Distribution networks are
generally meshed circuits; however, they are usually operated radially for protection
reasons.
An increasing number of small generating facilities are located in distribution
networks, particularly solar- and wind-based renewable power units. This makes
some distribution networks net electricity producers during some hours of the day.
Moreover, this integration has triggered the need for an increasingly sophisticated
distribution management to ensure a reliable supply of electricity. This management
improvement leads to the concept of smart grid that incorporates up-to-date com-
munication of control technologies to ensure an efficient and economic management
of distribution networks, mimicking what is common in most transmission systems.
Figure 1.4 illustrates a distribution subsystem, including the substation that
reduces the voltage from transmission to distribution level (e.g., from 400 kV to
20 kV), the feeders, and the supply transformers that reduce the voltage from
distribution to consumption level (e.g., from 20 kV to 110 V per phase).
1.2.1.4 Supply
The supply subsystem comprises the low voltage (110 V in USA, and 220 V in
Europe and elsewhere) wires that surround every commercial facility and home,
1.2 Power System Structure 5
Substation Feeder
Feeder
Transformer
as well as the power transformer that interconnects such low voltage network
and the distribution grid. Note that industrial facilities typically include dedicated
distribution and supply subsystems.
The supply subsystem also includes protection and metering equipment. The
purpose of the former is protecting human users, while the purpose of the latter
is billing.
The supply subsystem increasingly accommodates special loads such as electri-
cal vehicles and on-the-roof photo-voltaic production facilities.
As communication and control devices become increasingly cheap, such devices
are being integrated into supply subsystems to provide the user with higher
flexibility and control in consuming electricity, adding to the smart grid idea.
Additional details regarding this economic layer can be found in the monograph by
Kirschen and Strbac [7].
Table 1.1 illustrates the time-frame from long-term planning to real-time control.
1.2.2.1 Planning
Long-term planning problems span from 1 to 20 years and pertain to networks, both
transmission and distribution, as well as to production facilities, i.e., generating
units. Long-term planning entails a high level of uncertainty since planning
decisions affect the operation of the system up to the distant future (e.g., 20 years
from now).
The transmission network is generally reinforced and expanded by publicly
regulated entities, namely:
1. by regional transmission organizations (RTOs) in the USA or
2. by transmission systems operators (TSOs) in Europe.
The objective of the RTO/TSO is to ensure that a reliable network is in place to
make it possible that the energy produced is efficiently delivered from production to
consumption centers.
Distribution networks, which might be municipally or privately owned, are
similarly reinforced and expanded under regulatory control. The objective is to
ensure that the distribution network enables an efficient distribution of electricity
from the transmission network to the consumption centers.
On the other hand, generating units are built and operated by private corporations
pursuing maximum profit. We refer to these corporations as power producers. Thus,
power producers build generating units to operate them through their life spans for
a profit, and compete among themselves for the supply of electricity.
1.2.2.2 Operations
1.2.2.3 Control
Active and reactive power controllers take full control of the operation of the system
during the last minutes prior to power delivery:
1. Active power controllers ensure that the system frequency is kept close to
60/50 Hz by compensating active power deviations. They also ensure that the
active power flows over interconnecting tie-lines are kept at prespecified target
values that are set based on economic agreements. Active power reserves are
used for this.
2. Reactive power controllers ensure a healthy voltage profile throughout the power
grid by using reactive power reserves in generating units and capacitor banks,
as well as by modifying the transformation ratio of power transformers (through
on-line tap changers). Additionally, over-voltage conditions might be controlled
using reactance banks.
Perfect Information
In this centralized approach, the central operator pays the generating units
enough to recover all incurred costs (including both building and operating costs).
These costs are based on prespecified standards and not on what the generating units
might claim. In turn, these costs are socialized, proportionally, among all consumers.
Similarly, the operator covers the actual costs of building and operating both the
transmission and distribution networks based on standard costs, and these building
and operating costs are in turn socialized among all consumers.
Finally, it is relevant to note that decisions pertaining to the reinforcement/expan-
sion of the system, involving generation, transmission, and distribution facilities, are
made centrally by a social planner, with the objective of minimizing both investment
and operation costs.
Figure 1.5 illustrates the centralized operation, representing a central operator
that gathers all required information, makes appropriate decisions, and informs
producers and consumers on how to proceed.
Figure 1.6 illustrates the market operation, representing a market operator that
receives offers and bids from producers and consumers, respectively, clears the
market, and informs producers and consumers of their assigned productions and
consumptions, respectively.
Power system operations, the main focus of this textbook, encompass the decisions
that are made within 1 day of power delivery. These decisions are briefly described
below.
Day-ahead operation revolves around the commitment of production units, i.e., the
scheduling of dispatchable (controllable) generating units for next-day operation.
Note that non-dispatchable generating units, such as weather-dependent renewable
ones, cannot be scheduled with accuracy since their production is uncertain.
The uncertainty pertaining to next-day demand, the uncertain production of
weather-dependent renewable generating units, and the possible contingencies of
generating and/or transmission facilities require the scheduling of reserves, i.e., the
scheduling of production capacity that is not used, but is ready to be used.
In a centralized framework, day-ahead operations rely on solving a unit com-
mitment algorithm by the system operator to identify the hourly on/off status of
each generating unit, as well as the actual hourly production and the level of reserve
allocated to each unit on a hourly basis. The objective is to minimize total production
cost, including the start-up costs of production units, which are significant. The
reader is referred to Chap. 7 of this book for additional details.
In a market framework, day-ahead operation relies on a market clearing algo-
rithm that pursuing maximum social welfare allocates energy production and
reserve levels to generating units. This is generally done using an auction. The
reader is referred to Chap. 8 of this book for additional details.
10 1 Power Systems
To ensure an economic and secure power supply, hours before power delivery
the operator needs generally to deploy reserves (i.e., to carry out production
adjustments) and to procure additional reserves if required. For this purpose,
it solves economic dispatch problems. The focus of these adjustments (reserve
deployments) is security, but keeping the costs involved as low as possible.
On the other hand, on a continuous basis, the operator checks that the voltage
profile is appropriate and that enough reactive power reserves are available to
guarantee, to a certain degree, that voltage issues, particularly voltage collapse, will
not appear.
Minutes before power delivery, the operation focus is mainly security. This is
guaranteed by solving an optimal power flow (OPF) problem, or a security-
constrained optimal power flow (SCOPF) problem.
An OPF represents very precisely the operation of the power system by using
the ac power flow equations. It is used to ensure a correct and secure functioning of
the system under the most likely situation in the immediate future (several minutes)
by introducing appropriate active and reactive power adjustments. The criterion is
maximum security, not minimum cost.
A SCOPF does the same that an OPF does, but enforcing as well that the
system operates correctly even if one or several contingencies occur, by introducing
preventive or corrective actions. Ex-ante preventive actions ensure that the system
operates correctly if a contingency occurs without any further correction. Ex-
post corrective actions ensure that the system can move to a correct state once a
contingency occurs by implementing appropriate corrections.
The reader is referred to Chap. 6 of this book for additional details on the OPF
and SCOPF problems.
OPF and SCOPF analysis relies on the power flow equations that are explained
in Chap. 4 of this book. Moreover, both problems use information obtained via a
state estimator, which is described in Chap. 5 of this book.
The power industry around the world relies mostly on power markets for its
management. During the late nineties, a paradigm change took place moving the
power industry organization from an optimal control approach to a market approach.
1.4 Power Markets 11
The pioneering work is due to the late Professor Fred C. Schweppe, who brilliantly
established the fundamentals of power markets [11].
Table 1.2 illustrates the structure of power markets, including the futures market
and the pool. Generally, power markets revolve around a futures market to carry out
long-term trading and around a pool to carry out short-term trading. These trading
floors are briefly described below.
Additional details regarding power markets can be found in the monograph by
Conejo et al. [3].
The futures market allows long-term trading spanning from 1 week to several years.
The trading instruments are mostly contracts and options.
A contract is an agreement between a power producer and a power consumer
to sell/buy at a given price a specified amount of electrical energy throughout a
particular time period, e.g., next month. A contract provides price stability and is
advantageous for producers if subsequent pool prices are comparatively lower on
average, and disadvantageous if subsequent pool prices are comparatively higher on
average.
An option is an agreement between a power producer and a power consumer to
provide the producer/consumer with the option at a future time to sell/buy at a given
price a specified amount of electrical energy throughout a particular time period,
e.g., next year. The party that holds the option to sell/buy at a given future time
pays a fee to the other party that provides the decision flexibility. In other words,
an option is a contract with the possibility of realizing it or not, based on future
information, and with a fee associated with such flexibility.
1.4.2 Pool
The pool consists of the day-ahead market, intra-day markets in some jurisdictions,
and the real-time market. These markets are briefly described below.
12 1 Power Systems
The day-ahead market is the backbone of electricity trading. In this market, power
producers submit production offers, consisting in a set of energy blocks at increasing
prices, and power consumers submit consumption bids, consisting in a set of energy
blocks at decreasing prices. In turn, the system operator, or independent system
operator (ISO), uses these production offers and consumption bids to clear the
market by determining the hourly clearing prices, the hourly energy production to
be assigned to each producer, and the energy consumption to be allocated to each
consumer.
Typically, the day-ahead market takes place daily on an hourly basis, by mid-day
the day prior to power delivery, and spans the 24 h of the power-delivery day.
Intra-day markets replicate the day-ahead market every few hours between the
clearing of the day-ahead market and the opening of the real-time market.
The purpose of the intra-day markets is allowing producers/consumers to correct
deviations and errors related to the outcomes of previous markets (day-ahead and
previous intra-day markets).
The intra-day markets that clear close to power delivery benefit particularly
weather-dependent (wind- and solar-based) power producers. This is so because
these producers have reduced control over their production levels and therefore
limited capacity to in-advance commitment. Since the day-ahead market involves
significant in-advance commitments, such market is not particularly attractive to
weather-dependent producers.
The real-time market is the last resort for consumers and weather-dependent
renewable power producers to buy or sell energy to comply with their commitments
(contracting obligations to consume/produce) made at the day-ahead and the intra-
day markets.
Producers that have experienced unexpected contingencies and cannot fulfill their
contracting obligations from the day-ahead and intra-day auctions must also settle
these obligations in the real-time market.
Typically, the real-time market takes place 10–20 min prior to power delivery.
This book focuses on operation problems within a time window ranging from one
day to seconds prior to power delivery. Its distinct feature is providing a thorough
analytical approach including algorithms, codes (in GAMS [4] and Octave [5]),
1.5 Scope of the Book 13
and many numerical examples. The reader interested in practical details is referred
to the operating procedures of the ISOs, e.g., those of PJM [10]. The scope of this
book is clarified below.
1.5.1 What We Do
We do not consider in this book fault analysis involving short-circuits and open-
conductor faults. The interested reader is referred to the friendly manual by Kothari
and Nagrath [8].
We do not consider either stability analysis including both small-signal and large-
signal perturbations. The interested reader is referred to the advanced monograph by
Bergen and Vittal [1].
Fast transient analysis involving atmospheric and connection transients as well
as harmonic analysis are neither considered in this book. The interested reader is
referred to the advanced manual by Gómez-Expósito et al. [6].
Operational planning problems, such as fuel procurement, maintenance schedul-
ing, and medium-term management of hydroelectric resources, are not considered
in this manual. The interested reader is referred to the monograph by Wood et al.
[14].
14 1 Power Systems
1.1 What are the typical voltage levels of the generation, transmission, distribution,
and supply subsystems?
1.2 Are distribution systems generally operated radially? Why? Why not?
1.3 Discuss the validity of the following statement: the control stage takes place
minutes prior to power delivery and its main purpose is minimizing the supply costs.
1.4 Describe the differences between a centralized and a market operation in the
management of electric energy systems.
1.5 Describe the differences between futures markets and power pools.
References
1. Bergen, A.R., Vittal, V.: Power Systems Analysis, 2nd edn. Prentice Hall, Upper Saddle River
(1999)
2. Conejo, A.J., Baringo, L., Kazempour, S.J., Siddiqui, A.S.: Investment in Electricity Genera-
tion and Transmission. Decision Making Under Uncertainty. Springer, New York (2016)
3. Conejo, A.J., Carrión, M., Morales, J.M.: Decision Making Under Uncertainty in Electricity
Markets. Springer, New York (2010)
4. GAMS (2016). Available at www.gams.com
References 15
2.1 Introduction
Power systems are generally based on three-phase alternating current (ac) circuits.
This chapter describes the fundamentals of this type of circuits and is organized as
follows. Section 2.2 defines balanced three-phase sequences. Section 2.3 describes
balanced three-phase voltage and currents, as well as the two different symmetrical
connections of system components and the equivalence among them. Section 2.4
defines instantaneous, active, reactive, and apparent powers and explains how to
measure them. Section 2.5 clarifies why three-phase power is generally preferred
over single phase-phase power. Section 2.6 defines the per-unit system, which is
used in the remaining chapters of this book. Section 2.7 summarizes the chapter
and suggests some references for further study. Finally, Sect. 2.8 proposes some
exercises for further comprehending the concepts addressed in this chapter.
where:
• A is the root mean square (RMS) value of the source,
• ! is its angular frequency (also known as angular speed) measured in radians
per second, and
• is its initial phase angle.
The RMS value of the source is computed as:
s
Z
1 T
AD a2 .t/dt; (2.2)
T 0
2
!D D 2f ; (2.3)
T
where f is the ordinary frequency (measured in Hertz).
2. Using a phasorial representation:
AN D A† : (2.4)
Figure 2.1 illustrates the relationship between a sinusoidal ac source (left plot)
and a rotating vector or phasor (right plot). Observe that the projection of the rotating
vector on the imaginary axisp(right-hand-side of the figure) renders the sinusoidal
form of the source: a.t/ D 2Asin .!t C /, shown on the left-hand side of the
figure.
If three ac sinusoidal sources (or phasors) have equal magnitude and equal angle
separation . 2 ı
3 rad or120 /, then they constitute a balanced three-phase sequence.
For example, the following three ac sources constitute a balanced three-phase
sequence:
2.2 Balanced Three-Phase Sequences 19
a(t)
Im √
2A
(w t + y )
y Re
wt
y
Fig. 2.1 Relationship between a sinusoidal AC source (left) and a rotating vector (right)
8 p
ˆ
<aA .t/ D p2Asin .!t
ˆ
C /;
a .t/ D 2Asin !t C 2 ; (2.5)
ˆ B 3
:̂a .t/ D p2Asin !t C C 2 :
C 3
Since aA .t/, aB .t/, and aC .t/ constitute a balanced three-phase sequence, then we
have:
Figure 2.2 shows a balanced three-phase sequence using phasors, where the
initial phase is 0. Note that the phasor denoted by AN A is leading 2=3 rad the
phasor denoted by AN B and lagging 2=3 rad the phasor denoted by AN C . In this case,
the balanced three-phase sequence is denominated positive sequence.
If phases B and C are swapped, we obtain the so-called negative sequence that is
shown in Fig. 2.3 and represented by the following phasors:
20 2 Power System Fundamentals: Balanced Three-Phase Circuits
2p
3
rad
2p
3
rad A¯A
2p
3
rad
A¯B
Fig. 2.3 Balanced
three-phase negative A¯B
sequence
2p
3
rad
2p
3
rad AA
2p
3
rad
AC
8
ˆ N
<AA D A†0;
ˆ
AN D A† C 2 ; (2.8)
ˆ B 3
:̂AN D A† 2 :
C 3
In power systems, the reference phasor is generally indicated using the letter R,
the phasor lagging 120ı (or 23
rad) using the letter S, and the phasor leading 120ı
2
(or 3 rad) using the letter T. That is:
2.3 Balanced Three-Phase Voltages and Currents 21
8
ˆ N ı
<AR D A†0 ;
ˆ
AN D A† 120ı ;
ˆ S
:̂AN D A† C 120ı :
T
R
+ −
ŪRS
−
S ŪT R
+
ŪST
− +
T
22 2 Power System Fundamentals: Balanced Three-Phase Circuits
8
ˆ N N ı
<UR D URN D UF †0 ;
ˆ
N DU
U N SN D UF † 120ı ; (2.9)
ˆ S
:̂U N TN D UF † C 120ı ;
NT D U
U NS CU
NR CU N T D 0: (2.10)
On the other hand, each line voltage is defined as the difference of two phase
voltages (lower plot of Fig. 2.4). That is:
8 p
ˆ N N N ı
<URS D UR US D p3UF †30 ;
ˆ
N DU
U NS U
N T D 3UF † 90ı ; (2.11)
ˆ ST p
:̂U NT U
N TR D U N R D 3UF †150ı :
Note that:
U N ST C U
N RS C U N TR D 0; (2.12)
ŪS
30◦
ŪST
2.3 Balanced Three-Phase Voltages and Currents 23
where:
• IL is the magnitude of the line current and
• ' is the angle of a phase voltage with respect to the corresponding line current.
Line currents are shown in Fig. 2.6.
Note that:
8
ˆ N N N
<IR C ITR D IRS ;
ˆ
IN C INRS D INST ; (2.15)
ˆS
:̂IN C IN D IN :
T ST TR
Since:
and:
or:
2 3 2 32 3
INRS 2 1 1 INS
4 INST 5 D 1 4 1 1 1 5 4 INT 5 :
3
INTR 1 2 1 0
2.3 Balanced Three-Phase Voltages and Currents 25
30◦
I¯R
30◦
I¯ST
I¯S
R
I¯R
I¯T R
I¯RS
I¯S
S
I¯ST I¯T
T
or:
8
ˆ
ˆ 1p N
ˆINRS D
ˆ 3 IR † C 30ı ;
ˆ
ˆ 3
<
1p N
INST D 3 IS † C 30ı ;
ˆ
ˆ 3
ˆ
ˆ
ˆ 1p N
:̂INTR D 3 IT † C 30ı ;
3
or similarly:
8
ˆ
ˆ 1p N
ˆ
ˆ INRS D 3IR † 150ı ;
ˆ
ˆ 3
<
1p N
INST D 3IS † 150ı ; (2.17)
ˆ
ˆ 3
ˆ
ˆ
ˆ 1p N
:̂INTR D 3IT † 150ı ;
3
and finally:
8
ˆ
ˆ 1p N
ˆ
ˆ INRS D 3IS † 30ı ;
ˆ
ˆ 3
<
1p N
INST D 3IT † 30ı ;
ˆ
ˆ 3
ˆ
ˆ
ˆ 1p N
:̂INTR D 3IR † 30ı :
3
Considering:
8
ˆ N ı
<IR D IG †0 ;
ˆ
IN D IG † 120ı ; (2.18)
ˆS
:̂IN D I † C 120ı ;
T G
From Eqs. (2.18) and (2.19) above, we conclude that the line and delta currents
in a balanced three-phase delta-connected generator are balanced sequences.
28 2 Power System Fundamentals: Balanced Three-Phase Circuits
Z̄y ĒS
− + I¯S
N ∼ S
Z̄y ĒT
− ∼ + I¯T
T
− + R
I¯T R I¯R
∼ E¯ C ∼ E¯A
+ −
Z̄ d Z̄d
Z̄ d I¯RS
− + I¯S
∼ S
I¯ST
E¯B I¯T
T
To preserve balance, three balanced voltage sources can be either wye (y) or delta
(d) connected, as shown in the upper and lower plots of Fig. 2.10, respectively. In
the wye connection, point N, known as the common start point, is considered as the
reference for phase voltages.
We consider the balanced voltage source sequence:
8
ˆ N ı
<ER D EF †0 ;
ˆ
EN D EF † 120ı ; (2.20)
ˆ S
:̂EN D E † C 120ı ;
T F
where EF is the magnitude of each voltage source, while the balanced voltage-source
current sequence is:
8
ˆ N ı
<IR D IL † .' 0/ ;
ˆ
IN D IL † .' 120/ı ; (2.21)
ˆS
:̂IN D I † .' C 120/ı ;
T L
2.3 Balanced Three-Phase Voltages and Currents 29
Then:
8 p p
ˆ N N N N ı ı
<ER ES D EA D p3ER †30 D p 3EF †30 ;
ˆ
EN EN T D EN B D 3EN S †30ı D 3EF † 90ı ; (2.23)
ˆ S
:̂EN EN D EN D p3EN †30ı D p3E †150ı :
T R C T F
On the other hand, these circuits should be equivalent under load conditions as
well. Thus:
8
ˆ N N N
<ITR IRS D IR ;
ˆ
IN INST D INS ; (2.24)
ˆ RS
:̂IN IN D IN :
ST TR T
or:
8
ˆ 1
ˆ
ˆ
ˆ INRS D p IG † 150ı ;
ˆ
ˆ 3
< 1
INST D p IG † C 90ı ; (2.26)
ˆ
ˆ 3
ˆ
ˆ
ˆN 1
:̂ITR D p IG † 30ı :
3
Under load conditions, line voltages in both connections should be equal. Thus,
from Fig. 2.10, we have:
or:
EN A C INRS ZN d D EN R EN S C INS INR ZN y : (2.28)
or:
1 p
p INR †150ı ZN d D 3INR † 150ı ZN y ; (2.30)
3
as well as:
1 p
p ZN d D 3ZN y ; (2.31)
3
and finally:
ZN d D 3ZN y : (2.32)
We conclude that the equivalence conditions for the wye and delta connections
in the circuits in Fig. 2.10 are as follows:
8 p
ˆ N N ı
<EA D p3ER †30 ;
ˆ
EN D 3EN †30 ;
ı (2.33)
ˆ B p S
:̂EN D 3EN †30ı ;
C T
and:
ZN d D 3ZN y ; (2.34)
or alternatively:
8
ˆ 1
ˆEN R D
ˆ p EN A † 30ı ;
ˆ
ˆ 3
ˆ
< 1 N
EN S D p EB † 30ı ; (2.35)
ˆ
ˆ 3
ˆ
ˆ
ˆ 1 N
:̂EN T D p EC † 30ı ;
3
2.3 Balanced Three-Phase Voltages and Currents 31
and:
1
ZN y D ZN d : (2.36)
3
Illustrative Example 2.3 Balanced three-phase circuit
We consider the circuit depicted in Fig. 2.11 in which voltage sources constitute a
known balanced three-phase positive sequence and impedances ZN iy and ZN cd are also
known. We compute below:
1. Currents INR , INS , and INT .
2. Currents INRS , INST , and INTR .
3. Voltages U N R, U N S , and U N T.
or:
2 32 3 2 3
2ZN iy C ZN cd ZN cd ZN iy IN1 EN R 1 ˛N 2
4 ZN cd 3ZN cd ZN cd 5 4 IN2 5 D 4 0 5:
ZN iy N N
Zcd 2Ziy C Zcd N N
I3 N 2
ER ˛N ˛N
and:
2 3
2 3 2 1 1 2 3
NI1 1 ˛N 2
1 6 N iy
Z 7
4 IN2 5 D 6 7 EN 4 0 5 ;
3ZN iy C ZN cd 4 1 1 C ZN cd 1 5 R
IN3 ˛N 2 ˛N
1 1 2
or:
8
ˆ
ˆ 3EN R
ˆIN1 D
ˆ ;
ˆ
ˆ 3Ziy C ZN cd
N
ˆ
ˆ
ˆ
< .1 ˛/ N EN R
IN2 D ;
ˆ
ˆ
ˆ 3ZN iy C ZN cd
ˆ
ˆ
ˆ
ˆIN D 3˛N EN R :
ˆ
:̂ 3
3ZN iy C ZN cd
or:
8
ˆ EN R
ˆINR D
ˆ ;
ˆ
ˆ
ˆ
ˆ ZN iy C 13 ZN cd
ˆ
ˆ
< EN S
INS D ;
ˆ
ˆ N iy C 1 ZN cd
Z
ˆ
ˆ 3
ˆ
ˆ EN T
ˆ
ˆINT D
:̂ :
ZN iy C 13 ZN cd
On the other hand, currents INRS , INST , and INTR are computed as:
8 ER .3 1 C ˛/
N
ˆ N N N
ˆIRS D I1 I2
ˆ
ˆ
D
N N
3Ziy C Zcd
;
ˆ
ˆ
ˆ
ˆ
< EN R .3˛N 1 C ˛/
N
INST D IN3 IN2 D ;
ˆ
ˆ N N
3Ziy C Zcd
ˆ
ˆ
ˆ
ˆ
ˆN EN R .˛N 1/
:̂ITR D IN2 D ;
3ZN iy C ZN cd
or:
8
ˆ EN R 1 ˛N 2
ˆ
ˆINRS D ;
ˆ
ˆ 3ZN iy C ZN cd
ˆ
ˆ
ˆ
ˆ 1
ˆ
< ˛N 2 EN R 1 ˛
EN R ˛N 2 ˛N N EN S 1 ˛N 2
INST D D D ;
ˆ
ˆ 3ZN iy C ZN cd 3ZN iy C ZN cd 3ZN iy C ZN cd
ˆ
ˆ
ˆ
ˆ 1
ˆ
ˆ
ˆN NER .˛N 1/ ˛N EN R 1 ˛ N EN T 1 ˛N 2
:̂ITR D D D :
3ZN iy C ZN cd 3ZN iy C ZN cd 3ZN iy C ZN cd
Note that the relationship between currents INRS , INST , INTR and INR , INS , INT is as follows:
p
INRS INST INTR 1 ˛N 2 3†30ı 1
D D D D D p †30ı :
INR INS INT 3 3 3
or:
8 N N
ˆ
ˆ
ˆ N R D EN R ER Ziy ;
U
ˆ
ˆ
ˆ
ˆ ZN iy C 13 ZN cd
ˆ
ˆ
ˆ
< N N
N S D EN S ES Ziy ;
U
ˆ
ˆ
ˆ ZN iy C 13 ZN cd
ˆ
ˆ
ˆ
ˆ EN T ZN iy
ˆ
ˆUN N
:̂ T D ET N ;
Ziy C 13 ZN cd
and finally:
8 0 1
ˆ
ˆ N
ˆ
ˆ N R D EN R @1 Ziy
A;
ˆ
ˆ U
1 ZN
ˆ
ˆ ZN C
ˆ
ˆ iy 3 cd
ˆ
ˆ 0 1
ˆ
ˆ
< N iy
Z
N S D EN S @1
U A;
ˆ
ˆ
ˆ ZN iy C 13 ZN cd
ˆ
ˆ
ˆ
ˆ 0 1
ˆ
ˆ
ˆ
ˆ ZN iy
ˆ
ˆUN D EN T @1 A:
:̂ T ZN iy C 13 ZN cd
I¯S
Z̄iy
1
Z̄
3 cd
+
∼ E¯S
−
I¯T
Z̄iy
1
Z̄
3 cd
+
∼ E¯ T
−
+ −
I¯T R ŪR I¯R
∼ ĒA ∼ Z̄ cy
ĒB
− +
I¯1 I¯2
Z̄ id Z̄ id
Z̄ id I¯RS Z̄ cy
ŪS I¯S
+ ∼ − N
I¯ST ¯ Z̄ cy
I3
Ē C ŪT I¯T
We compute below:
1. Currents INR , INS , and INT .
2. Currents INRS , INST , and INTR .
3. Phase voltages U N R, U
N S , and U
N T.
36 2 Power System Fundamentals: Balanced Three-Phase Circuits
We solve the circuit in Fig. 2.13 using the mesh-current method [5]:
2 32 3 2 3
3ZN id ZN id ZN id IN1 0
4 ZN id 2ZN cy C ZN id ZN cy 5 4 IN2 5 D 4 ˛N 2 EN A 5 :
ZN id ZN cy 2ZN cy C ZN id IN3 ˛N EN A
and:
2 3
2 3 ZN cy 2 3
IN1 6 1 C 1 1 7 0
1 NZid
4 IN2 5 D 6 7 4 ˛N 2 EN A 5 ;
N id C 3ZN cy 4
Z 1 2 15
IN3 ˛N EN A
1 1 2
and finally:
8
ˆ 1
ˆIN1 D N
ˆ
ˆ
EN ;
N cy A
ˆ
ˆ Z id C 3Z
ˆ
< 1
IN2 D EN A 1 ˛N 2 ;
ˆ
ˆ N
Zid C 3Zcy N
ˆ
ˆ
ˆ
ˆN 1
:̂I3 D EN .1 ˛/N :
NZid C 3ZN cy A
or:
2.3 Balanced Three-Phase Voltages and Currents 37
8
ˆ EN A 1 ˛N 2
ˆINR D
ˆ ;
ˆ
ˆ ZN id C 3ZN cy
ˆ
ˆ
ˆ
<
EN B 1 ˛N 2
INS D ;
ˆ
ˆ
ˆ ZN id C 3ZN cy
ˆ
ˆ
ˆ
ˆN EN C 1 ˛N 2
:̂IT D :
ZN id C 3ZN cy
Next, mesh currents INRS , INST , and INTR are computed as:
8
ˆ
ˆ ˛N 2 EN A
ˆINRS D IN1 IN2 D
ˆ ;
ˆ
ˆ
ˆ ZN id C 3ZN cy
ˆ
< ˛N EN A
INST D IN1 IN3 D ;
ˆ
ˆ
ˆ Zid C 3ZN cy
N
ˆ
ˆ
ˆ
ˆN EN A
:̂ITR D IN1 D ;
ZN id C 3ZN cy
or:
8
ˆ
ˆ EN B
ˆ
ˆ INRS D ;
ˆ
ˆ
ˆ ZN id C 3ZN cy
ˆ
< EN C
INST D ;
ˆ
ˆ
ˆ ZN id C 3ZN cy
ˆ
ˆ
ˆ
ˆN EN A
:̂ITR D :
NZid C 3ZN cy
Note that line currents (INR , INS , INT ) and mesh currents (INRS , INST , INTR ) constitute
balanced three-phase positive sequences. The relationship between line and mesh
currents is as follows:
Note that phases R, S, and T are decoupled. Thus, instead of analyzing the three-
phase circuit in Fig. 2.13, it is possible to consider the three equivalent single-phase
circuits depicted in Fig. 2.14. Using these equivalent single-phase circuits, we obtain
that phase voltages are equal to:
8
ˆ N N N
<UR D IR Zcy ;
ˆ
N D INS ZN cy ;
U
ˆ S
:̂U
N D IN ZN ;
T T cy
38 2 Power System Fundamentals: Balanced Three-Phase Circuits
I¯S
1
Z̄
3 id
Z̄cy
+
∼ 1 ¯
E 1 − a¯ 2
3 B
−
I¯T
1
Z̄
3 id
Z̄cy
+
∼ 1 ¯
E 1 − a¯ 2
3 C
−
or:
8
ˆ
ˆ
N R D EN A 1 ˛N 2
ZN cy
ˆ
ˆ U ;
ˆ
ˆ
ˆ ZN id C 3ZN cy
ˆ
<
N S D ˛N 2 EN A 1 ˛N 2
ZN cy
U ;
ˆ
ˆ
ˆ ZN id C 3ZN cy
ˆ
ˆ
ˆ
ˆN ZN cy
:̂UT D ˛N EN A 1 ˛N 2 :
NZid C 3ZN cy
N R, U
As in the case of line and mesh currents, the phase voltages U N S, U
N T constitute
also a balanced three-phase positive sequence.
We consider the balanced three-phase network depicted in Fig. 2.15. In this circuit,
we have:
2.3 Balanced Three-Phase Voltages and Currents 39
Z̄ I¯S
ĒS
− ∼ +
Z̄ I¯T
ĒT
N I¯N N
8
ˆ N NN
<ER Z IR D 0;
ˆ
NES ZN INS D 0; (2.40)
ˆ
:̂EN ZN IN D 0;
T T
and:
8
ˆ
ˆ EN R
ˆ
ˆ INR D ;
ˆ
ˆ ZN
ˆ
ˆ
<
EN S
INS D ; (2.41)
ˆ
ˆ ZN
ˆ
ˆ
ˆ
ˆ
ˆN EN T
:̂IT D :
ZN
1
INN D INR C INS C INT D .EN R C EN S C EN T /: (2.42)
ZN
Since voltage sources constitute a balanced sequence, we obtain:
INN D 0 (2.43)
and, thus:
N NN 0 D 0:
U (2.44)
Z̄ I¯T
Ē T
2 1 IN1 1 ˛N 2
ZN N
D ER : (2.45)
1 2 IN2 ˛N 2 ˛N
Thus:
1
IN1 EN R 2 1 1 ˛N 2
D ; (2.46)
IN2 ZN 1 2 ˛N 2 ˛N
and:
IN1 EN R 2 1 1 ˛N 2
D ; (2.47)
IN2 3ZN 1 2 ˛N 2 ˛N
and finally:
8
ˆ
ˆ EN
<IN1 D R ;
ZN (2.48)
ˆN EN EN
:̂I2 D ˛N R D T :
Z ZN
or:
8 1N
ˆ
ˆ INR D ER ;
ˆ
ˆ ZN
ˆ
ˆ
ˆ
< 1N
INS D ES ; (2.50)
ˆ
ˆ
ˆ ZN
ˆ
ˆ
ˆ 1N
:̂INT D ET ;
ZN
which is the same result previously obtained in Eq. (2.41) for the circuit with NN 0
connection.
Note also that:
N N 0 N D EN R INR ZN D EN R 1 EN R ZN D 0;
U (2.51)
ZN
as expected.
We note once more that phase equations are decoupled: the equation of a given
phase depends only on variables and constants of that phase. That is:
8
ˆ N NN
<ER D Z IR ;
ˆ
EN D ZN INS ; (2.52)
ˆ S
:̂EN D ZN IN ;
T T
In other words, the impedance matrix is diagonal, which verifies phase decoupling.
Thus, we can consider three independent single-phase networks as depicted in
Fig. 2.17.
Typically, the R equivalent single-phase circuit is used to represent the balanced
three-phase circuit. Note that such single-phase circuit includes all required infor-
mation to characterize the balanced three-phase circuit. The other two equivalent
single-phase circuits replicate the R one; circuit S lagging 120ı , and circuit T leading
120ı .
42 2 Power System Fundamentals: Balanced Three-Phase Circuits
+
∼ Ē R
−
I¯S
Z̄
+
∼ Ē S
−
I¯T
Z̄
+
∼ Ē T
−
One of the most important magnitudes in three-phase circuits is the power, which is
analyzed in this section.
2.4.1 Definitions
4
p.t/ D pR .t/ C pS .t/ C pT .t/
D uR .t/iR .t/ C uS .t/iS .t/ C uT .t/iT .t/: (2.54)
p 2 p 2
C 2UF sin !t C 2IL sin !t C ' ; (2.55)
3 3
where:
• UF is the RMS value of the phase voltage and
• IL is the RMS value of the line current.
Rearranging terms:
p.t/ D UF IL cos' cos .2Œ!t 0 '/
2
C UF IL cos' cos 2 !t '
3
2
C UF IL cos' cos 2 !t C ' (2.56)
3
and:
UL
p.t/ D 3UF IL cos' D 3 p IL cos': (2.57)
3
That is:
p
p.t/ D 3UL IL cos'; (2.58)
where UL is the RMS value of the line voltage. Thus, the instantaneous power at
any point of a balanced three-phase circuit is time invariant.
The three-phase active power, denoted by P, is equal to the instantaneous power
and, thus:
4
p
PD p.t/ D 3UL IL cos': (2.59)
The fact that in three-phase power systems the three-phase active power is time-
invariant makes these systems preferable over single-phase systems, in which the
active power has a nonzero average value, but is alternating. Alternating active
power results in vibrations and long-term mechanical issues, while time-invariant
active power does not. This is indeed a key reason for using three-phase systems
instead of single-phase ones.
The per-phase complex power is computed as:
8
ˆ UL
ˆ
ˆ
ˆ SN R D U
N R INR D p IL †';
ˆ
ˆ 3
ˆ
ˆ
< UL 2 2 UL
NSS D UN S INS D p IL † C C ' D p IL †'; (2.60)
ˆ
ˆ 3 3 3 3
ˆ
ˆ
ˆ
ˆ 2 2
ˆN UL
N T INT D p UL
:̂ST D U IL † C ' D p IL †':
3 3 3 3
44 2 Power System Fundamentals: Balanced Three-Phase Circuits
N is computed as:
Then, the three-phase complex power, S,
p
SN D SN R C SN S C SN T D 3UL IL †'
p p
D 3UL IL cos' C j 3UL IL sin '
D P C jQ; (2.61)
where:
4
p
QD 3UL IL sin' (2.62)
Note that the active power can be computed using either of the two expressions
below:
or:
p
PD 3UL IL cos': (2.64)
Equation (2.64) requires the system to be balanced, while Eq. (2.63) does not.
Active power is generally measured using a watt-meter that multiplies three
terms: the RMS value of current, the RMS value of the voltage, and the cosine
of the angle between these two signals (see (2.64)).
On the other hand, reactive power is measured as active power, but using var-
meters that, instead of multiplying by the cosine, multiply by the sine.
Finally, apparent power is measured using a volt-meter and an amp-meter.
If we need to measure energy, then we should use an energy meter, which is a
watt-meter that integrates over time.
S1 D S;
U1 D U; (2.65)
S
I1 :
U
Then, the conductor section should be:
I1 S
A1 D D (2.66)
ı ıU
and the required material is:
I1 Sd
M1 D 2A1 d D 2 d D 2 ; (2.67)
ı ıU
while losses are:
d S2 ıUd S
PL1 2I12 D 2 2 D 2 ıd; (2.68)
A1 U S U
S3 D S;
p
U3 D 3U; (2.69)
S3 S
I3 p D :
3U3 3U
I3 S
A3 D D (2.70)
ı 3ıU
and the required material is:
S Sd
M3 D 3A3 d D 3 dD ; (2.71)
3ıU ıU
while losses in this case are:
d S2 3ıUd S
PL3 3I32 D 3 2 D ıd: (2.72)
A3 9U S U
46 2 Power System Fundamentals: Balanced Three-Phase Circuits
M1
D 2; (2.73)
M3
i.e., the material required to transmit apparent power S [MVA] over a distance d
[km] with a phase-to-neutral voltage U [kV] considering a single-phase ac line is
about twice the material needed if a three-phase ac line is used.
On the other hand, we have:
PL1
D 2; (2.74)
PL3
i.e., the losses of transmitting apparent power S [MVA] over a distance d [km] with
a phase-to-neutral voltage U [kV] considering a single-phase ac line are about twice
the losses if a three-phase ac line is used.
This simple back-of-the-envelope analysis illustrates the economic advantage of
building/using a three-phase transmission line over a single-phase one.
This section defines and describes the per-unit system, which is important in power
systems spanning different voltage levels.
2.6.1 Motivation
Power transformers interconnect power system areas with different voltage levels.
This is a problem at the time of analyzing these systems since all magnitudes
need to be transformed to a single voltage level. However, if a per-unit analysis
is performed, this problem disappears and a unique voltage level is obtained. This
greatly simplifies the subsequent analysis.
M
mD ; (2.75)
MB
where:
• m is the per-unit value,
• M is the value of the variable/parameter in its own units, and
• M B is the base value.
Then, instead of analyzing a circuit using actual values, it is possible to analyze it
using per-unit values. This generally simplifies the subsequent analysis.
Illustrative Example 2.5 Illustration of per-unit analysis
We consider the single-phase circuit depicted in Fig. 2.18. Taking into account
that V D 220 V and Z D 55 , we obtain the current I. To do so, we analyze the
circuit using the per-unit system considering a base-voltage value of 220 V and a
base-current value of 2 A.
First, we obtain the equivalent per-unit circuit by transforming the voltage and
impedance values to per-unit values.
On the one hand, we compute the per-unit voltage v as follows:
V 220
vD D D 1 puV:
VB 220
In order to obtain the per-unit impedance, first we need to compute the base-
impedance value, which is obtained as the base-voltage value divided by the base-
current value, i.e.:
VB 220
ZB D D D 110 :
IB 2
Then, we obtain the per-unit impedance as:
Z 55
zD D D 0:5 pu:
ZB 110
Finally, we derive the equivalent single-phase circuit using per-unit values and
depict it in Fig. 2.19.
48 2 Power System Fundamentals: Balanced Three-Phase Circuits
v 1
iD D D 2 puA:
z 0:5
I D i I B D 2 2 D 4 A:
Using per-unit analysis in Illustrative Example 2.5 is not convenient since it is
V 220
possible to directly compute current I from the circuit in Fig. 2.18 as D D
Z 55
4 A. However, the use of a per-unit system to analyze power systems with multiple
voltage levels is most convenient for two reasons (provided that the per-unit system
is properly defined):
1. Power transformers disappear from the equivalent single-phase circuit. This is
further analyzed and shown in Sect. 3.3 of Chap. 3.
2. Voltage values are close to 1 puV, which allows detecting errors.
Besides these two important advantages, there is an additional advantage of using
a per-unit analysis for three-phase power systems:
3. The per-unit impedances of machines generally take values within tight bounds,
independently of their nominal values, which facilitates their characterization.
1
SB D SNk ; (2.76)
3
2.6 Per-Unit System 49
where:
• SB is the single-phase base power and
• SNk is the three-phase rated power of component k.
2. Recalling that power transformers separate the voltage zones of the network, we
select the base voltage in one zone as the rated phase voltage of one component
in that zone, i.e.:
1
UBi D p UNj ; (2.77)
3
where:
• UBi is the base-voltage value at zone i and
• UNj is the rated three-phase voltage of component j in zone i.
3. The base-voltage values in other zones are determined strictly complying with
the transformation ratios of the power transformers, which makes transformers
disappear from equivalent single-phase circuits, i.e.:
Ui
UBi D UBj ; (2.78)
Uj
where:
• UBi is the base-voltage value in zone i,
• UBj is the base-voltage value in zone j, and
• Ui =Uj is the three-phase transformation ratio of the power transformer
coupling zones i and j.
4. We define the base-current value and the base-impedance value per zone as
SB
IBi D (2.79)
UBi
and:
2
UBi
ZBi D ; (2.80)
SB
respectively, where:
• IBi is the base-current value at zone i and
• ZBi is the base-impedance value at zone i.
5. We specify phase shifts due to power transformers including delta and zigzag
connections. We explain transformer phase shifts in Chap. 3.
50 2 Power System Fundamentals: Balanced Three-Phase Circuits
Table 2.1 Illustrative Value Generator zone Line zone Motor zone
Example 2.6: base values
SB [MVA] 26.667 26.667 26.667
VB [kV] 6.351 69.859 2.794
IB [kA] 4.199 0.382 9.544
ZB [] 1.512 183.013 0.293
Note that the base values defined in this section are single-phase base values.
However, three-phase base values, equivalent to single-phase ones, are similarly
defined.
If we define the three-phase base-power value as:
4
SB3 D 3SB ; (2.81)
4
p
UB3i D 3UBi ; (2.82)
SB3 3SB SB
IB3i D p Dp p D D IBi (2.83)
3UB3i 3 3UBi UBi
and:
p 2
2
UB3 3UBi 2
UBi
ZB3i D D D D ZBi ; (2.84)
SB3 3SB SB
respectively.
The procedure to analyze power systems using a per-unit system comprises the five
steps below:
1. Define base values as explained in Sect. 2.6.3.
2. Transform the three-phase power system into an equivalent single-phase circuit
in which impedances are expressed in per unit.
3. Apply the operating conditions (in per unit).
4. Solve the circuit (in per unit).
5. Obtain actual values by multiplying per-unit values by the corresponding base
values.
52 2 Power System Fundamentals: Balanced Three-Phase Circuits
2.1 Why three-phase power systems are used instead of single-phase ones?
2.2 List the advantages of analyzing power systems using a per-unit system.
2.3 Consider the three-phase circuit depicted in Fig. 2.21. Voltage sources consti-
tute a balanced three-phase positive sequence:
8
ˆ N ı
<ER D 100†0 V;
ˆ
EN D 100† 120ı V;
ˆ S
:̂EN D 100†120ı V:
T
Ē R
Z̄ i ¯ Z̄ Z̄T R
− ∼ + ŪR1 IR ŪR2 I¯T R
I¯RS
Z̄RS
Ē S
Z̄ i ¯ Z̄
− ∼ + ŪS1 IS N
N
ŪS 2 I¯ST ŪT 2
Z̄ ST
Ē T
Z̄ i ¯ Z̄
− ∼ + ŪT 1 I T
G1 1 T1 2 3 T2 4 G2
L1
∼ ∼
L2 L3
5 7
T3 T4
6 8
C ∼ M
G2 T2
L2
∼
Using these data, determine the number of voltage zones and the base values of
each zone.
2.6 Consider the three-phase power system depicted in Fig. 2.23. The rated powers
and voltages of the system components are provided below:
• Generator G1 : 50 MVA, 12 kV.
• Generator G2 : 100 MVA, 15 kV.
• Transformer T1 : 50 MVA, 10/138 kV.
• Transformer T2 : 100 MVA, 15/138 kV.
Using as base values the rated parameters of generator G2 , determine the number
of voltage zones and the base values of each zone.
References
1. Bergen, A.R., Vittal, V.: Power Systems Analysis, 2nd edn. Prentice Hall, Upper Saddle River,
NJ (1999)
2. Duncan Glover, J., Sarma, M.S., Overbye, T.: Power System Analysis and Design, 5th edn.
Cengage Learning, Stamford, CT (2008)
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. Kothari, D.P., Nagrath, I.J.: Modern Power System Analysis, 4th edn. Tata McGraw Hill
Education Private Limited, New Delhi (2011)
5. Nilsson, J.W., Riedel, S.A.: Electric Circuits, 10th edn. Pearson, Upper Saddle River, NJ (2014)
Chapter 3
Power System Components: Models
This chapter describes models for the most common components of power systems
and shows how these components work in balanced steady-state operation. Compo-
nents described include generators and motors, power transformers, electrical lines,
and loads. We first describe the corresponding three-phase models and, then, the
equivalent single-phase models. We include a number of illustrative examples that
allow comprehending the concepts addressed in this chapter.
3.1 Introduction
The most common components of power systems are described in this chapter,
including their modeling and their working in balanced steady-state operation.
Section 3.2 describes generator and motors, which are used to produce electrical
energy and to provide mechanical power, respectively. Section 3.3 analyzes power
transformers, which are used to regulate and change voltage levels in power systems.
Section 3.4 describes the different types of loads in power systems. Section 3.5
describes transmission lines, which are used to connect different components within
power systems. The working of the different components described in Sects. 3.2,
3.3, 3.4, and 3.5 when they are interconnected constituting a power system is shown
in Sect. 3.6 through a number of illustrative examples. Section 3.7 summarizes the
chapter and suggests some references for further study. Finally, Sect. 3.8 proposes
some exercises to further comprehend the concepts addressed in this chapter.
Generators are key components of power systems as they produce energy, control
the frequency, and regulate voltage levels. Motors provide the mechanical power
that makes modern industry possible.
ēS
z̄i īS
− ∼ + ūS
N
ēT
z̄i īT
− ∼ + ūT
3.2 Generator and Motor 57
Thus, the equivalent single-phase circuit in Fig. 3.2 can be used. In this single-phase
circuit we have:
uN D eN zNiNi; (3.3)
+ ū
∼ ē
− −
e¯S
z̄i i¯S
− ∼ + ūS
N
e¯T
z̄i i¯T
− ∼ + ūT
58 3 Power System Components: Models
+ ū
∼ ē
− −
As in the case of the generator, matrix equation (3.4) decouples per phase,
rendering the equivalent single-phase circuit depicted in Fig. 3.4. In this single-
phase circuit we have:
uN D eN C zNiNi; (3.5)
Pout Pmec
D D : (3.6)
Pin Pele
Power transformers are used to regulate and change the voltage levels in a power
network. For example, transformers raise the generation voltage up to the voltage
of the transmission network to efficiently transmit energy. Then, at other nodes,
transformers lower the transmission voltage down to the voltage of the distribution
network to supply energy to consumers.
A three-phase power transformer is generally constituted by three single-phase
power transformers. To maintain symmetry, both primary and secondary windings
can be wye-, delta-, or zigzag-connected.
An example of a three-phase power transformer is provided in Fig. 3.5. In this
transformer, both the primary and secondary windings are wye-connected. For
notational convenience, the primary winding (generally the high-voltage winding)
is characterized without a prime (0 ), while the secondary one (generally the low-
voltage winding) is characterized with a prime (0 ). Then, the primary terminals
are denoted by R, S, T, while the secondary terminals are denoted by R0 , S0 , T 0 .
The rectangles in Fig. 3.5 represent the transformer windings, while the meaning
of the black circle at one of the sides of each of these rectangles is explained in
Sect. 3.3.2.1.
3.3 Power Transformer 59
s s
R c cR
s s
S c s s cS
s s
T c s s cT
N c c N
3.3.1 Definitions
The following voltages and currents are relevant to analyze three-phase power
transformers:
• Primary phase voltages: U N R, U N S, U N T.
• N N
Primary line voltages: URS , UST , U N TR .
• N
Primary winding voltages: UU , UV , U N N W.
• N N N
Primary line currents: IR , IS , IT .
• Primary delta currents (if they exist): INRS , INST , INTR .
• Secondary phase voltages: U N R0 , U N S0 , UN T0 .
• N 0
Secondary line voltages: URS , UST , UN 0 N TR
0
.
• N 0
Secondary winding voltages: UU , UV , UW . N 0 N0
UL
; (3.7)
UL0
60 3 Power System Components: Models
ŪU
+ ŪU − − +
R R
+ − + + − +
ŪRS ŪV
Ū RS
+ ŪV − − +
S− − S
ŪT R + + + + Ū T R
ŪR
ŪW
Ū ST Ū R
ŪST + ŪW − − +
Ū S
+ ŪS − T T − +
+ +
ŪT Ū T
− − − − − −
N N
Fig. 3.6 Primary and secondary voltages in a wye-wye connected power transformer
R R
I¯R I¯R
S S
I¯S I¯S
T T
I¯T I¯T
N N
Fig. 3.7 Primary and secondary currents in a wye-wye connected power transformer
where:
• UL is the primary line-voltage magnitude and
• UL0 is the secondary line-voltage magnitude.
Note that the transformation ratio of each of the single-phase transformers that
constitute the three-phase transformer is:
UU N
D 0; (3.8)
UU0 N
where:
• UU are UU0 are the primary and secondary winding-voltage magnitudes, respec-
tively, and
• N and N 0 are the numbers of primary and secondary winding turns, respectively.
3.3 Power Transformer 61
ŪU
+ ŪU − − +
R R
I¯R ŪV I¯R
+ ŪV − − +
S S
I¯S
ŪW I¯S
+ ŪW − − +
T T
I¯T I¯T
N N
ŪU = ŪR
ŪU = ŪR
N N
= Ū
ŪW T ŪV = Ū S
8
ˆ N N0
<UU is in phase with UU ;
ˆ
N is in phase with U
U N V0 ;
ˆ V
:̂U NW
N W is in phase with U 0
:
This correspondence is indicated by the black circles at the end of the rectangles
that represent the transformer windings in the upper plot of Fig. 3.8.
Also, by construction we have:
8
ˆ N N N0 N0
<UU D UR and UU D UR ;
ˆ
N DU
U N S and U
N V0 D U
N S0 ; (3.9)
ˆ V
:̂U N T and U
NW D U NW 0
DUN T0 :
These voltage relationships are shown in the lower plot of Fig. 3.8.
In this case, the three-phase transformer ratio is:
p
UL 3UF UF UU N
D p 0 D 0 D 0 D 0: (3.10)
UL0 3UF UF UU N
then:
UL N
IL0 D IL D 0 IL ; (3.12)
UL0 N
or:
IL0 N
D 0: (3.13)
IL N
ŪU
+ ŪU − + −
R R
I¯R Ū V I¯R
+ Ū V − + −
S S
I¯S
Ū W I¯S
+ Ū W − + −
T T
I¯T I¯T
N N
ŪU = ŪR
ŪU
N N
ŪW Ū V
Fig. 3.9 Voltage relationships in a wye-wye reversely connected (180ı ) three-phase power
transformer
8
ˆ N N N0 N0
<UU D UR and UU D URT ;
ˆ
N DU
U N S and U
N V0 D U
N SR
0
; (3.14)
ˆ V
:̂U N T and U
NW D U NW 0
DUN TS
0
:
+ Ū U − − ŪU +
R R
I¯R I¯R
+ Ū V − − ŪV +
S S
I¯S I¯S
+ Ū W − − ŪW +
T T
I¯T I¯T
N
ŪU = ŪR
ŪU = ŪRT
◦
Ū R 30
N Ū S
N 30◦
= Ū ŪV = ŪSR
ŪW TS 30◦
ŪT
ŪW = ŪT ŪV = ŪS
On the other hand, considering energy conservation, the ratio between line-
current magnitudes is:
IL0 UL p N
D 0 D 3 0: (3.16)
IL UL N
U¯U /2 ŪU /2
+ ŪU − + − + −
R R
I¯R ŪV /2 ŪV /2 I¯ R
+ ŪV − + − + −
S S
I¯S /2 /2
ŪW I¯ S
+ ŪW − ŪW
+ − + −
T T
I¯T I¯ T
N N
ŪU = ŪR
Ū T
N
Ū S N
On the other hand, considering energy conservation, the ratio between line-
current magnitudes is:
IL0 UL 2 N
D 0 D p 0: (3.19)
IL UL 3N
the power transformers, these transformers actually disappear from the equivalent
single-phase model (circuit), remaining solely phase shifts. This is illustrated below.
Consider a 100 MVA, 132=16 kV three-phase Yd11 power transformer with a
short-circuit reactance of 10% (this defines the internal impedance of the trans-
former referred to its own base values).
p base power is 90=3 MVA and the phase voltage on the low-
If the single-phase
voltage side is 15= 3 kV, then, in order to comply with the transformation ratio, the
phase voltage on the high-voltage side should be:
132 15
p kV:
16 3
On the one hand, the per-unit short-circuit impedance from the low-voltage
side is:
2
16
p 90
3
0:1 3 2 pu:
100
3 15
p
3
On the other hand, the per-unit short-circuit impedance from the high-voltage
side is:
2
132
p 90
3 3
0:1 2 pu:
100
3 132 15
p
16 3
Note that both values are identical, which shows that the transformer actually
disappears. That is, seeing it from the low-voltage side is identical to seeing it from
the high-voltage side.
Since this transformer is Yd11, the relative lag of low-voltage phasors with
respect to high-voltage ones is:
11 30ı D 330ı :
3.4 Load
where zNC is the per-unit impedance per phase. This model corresponds to the
balanced three-phase circuit depicted in Fig. 3.15.
Again, this model is decoupled per phase and the equivalent single-phase circuit
in Fig. 3.16 can be used. In this single-phase circuit, we have:
2 3 2 32 3
uN R r C jx 0 0 NiR
4 uN S 5 D 4 0 r C jx 0 5 4 NiS 5 ; (3.25)
uN T 0 0 r C jx NiT
where:
• r is the per-phase resistance and
• x is the per-phase reactance of the motor.
Note that the resistance r depends on the working conditions of the motor.
The model represented by matrix equation (3.25) corresponds to the balanced
three-phase circuit depicted in Fig. 3.17. Since this model is decoupled per phase,
the equivalent single-phase circuit in Fig. 3.18 can be used. In this single-phase
circuit, we have:
Pout Pmec
D D : (3.27)
Pin Pele
3.5 Electrical Line 71
c
?
p + jq
Fig. 3.19 Equivalent single-phase model of a balanced three-phase load with constant power
consumption
In this case, the power consumption (active and reactive) of the load is independent
of the voltage at the node at which it is connected, rendering the model depicted in
Fig. 3.19.
In this case, the voltage at the node at which the load is connected does not depend
on the load current. The single-phase model depicted in Fig. 3.20 can be used in
this case.
This section describes other key component of any power system: the electrical line.
R jX
S S
R jX
T T
Cy Cy Cy Cy Cy Cy
2 2 2 2 2 2
N N
It is important to note that the model in Fig. 3.21 is generally valid as long as the
length of the corresponding line is significantly smaller than the 60-Hz wavelength
(3104 miles) or the 50-Hz wavelength (5996 km).
In some short overhead ac lines, we have:
ˇ ˇ
ˇ 1 ˇ
jR C jXj ˇˇ ˇ; (3.28)
j!Cy ˇ
and, thus, the simplified equivalent single-phase circuit in Fig. 3.23 can be used.
Also, in some high voltage electrical lines we additionally have:
R X; (3.29)
and, thus, the series resistance R might be neglected with respect to the series
reactance X.
3.5 Electrical Line 73
.80 C j60/
SN R D MVA:
3
We consider that the receiving-end node of the line is the reference node, thus:
N R D 400
U p †0ı kV:
3
SN
INR D R D 144:3376† 36:8699ı A;
U NR
and:
N R j! Cy D 43:5312†90ı A;
INRshunt D U
2
respectively.
74 3 Power System Components: Models
Next, the current through the series impedance of the line, INL , is computed as:
NS D U
U N R C INL .R C jX/ D 236:6632†2:6922ı kV:
N S j! Cy D 44:6100†92:6922ı A;
INSshunt D U
2
and:
respectively.
Finally, the single-phase complex power supplied at the sending-end of the line is
SN
INL D INR D INS D R D 144:3376† 36:8699ı A;
U NR
NS D U
U N R C INL .R C jX/ D 240:9919†2:5402ı kV:
In this case, the single-phase complex power supplied at the sending-end of the
line is
N S INS D .26:875 C j22:083/ MVA D 34:784†39:4101ı MVA:
SN S D U
Note that the error is almost negligible in the active power, while there is a
significant error in the reactive power.
On the other hand, if we also neglect the series resistance, we obtain the following
results:
NS D U
U N R C INL .jX/ D 239:88†2:7591ı kV;
and:
N S INS D .26:667 C j22:083/ MVA D 34:623†39:6290ı MVA:
SN S D U
In this section, we describe how the parameters of an electrical line, namely, series
resistance, series reactance, and shunt capacitance, can be computed based on the
physical characteristics of the line.
3.5.2.1 Resistance
T D T0 Œ1 C ˛ .T T0 / ; (3.31)
where:
• T is the resistivity at temperature T,
• T0 is the resistivity at temperature T0 ,
• T0 is the reference temperature, and
• ˛ is the so-called temperature coefficient of resistivity.
The linear approximation embodied in Eq. (3.31) is generally valid provided that
the temperature does not vary too much with respect to T0 .
3.5.2.2 Inductance
0 D
LD ln 1=4 ; (3.32)
2 e r
where:
• D is the distance between phases,
• r is the radius of each conductor, and
• 0 is a constant known as the magnetic constant (or permeability of vacuum) and
its value is 4107 H/m.
D
3.5 Electrical Line 77
0 10
LD ln 1=4 D 1:1097 H=m:
2 e 0:05
Equation (3.32) requires that conductors are symmetrically arranged. Moreover,
it considers that there is a single solid core conductor per phase. However, in reality,
transmission lines are not that simple.
On the one hand, phases are not symmetrically but usually vertically or hori-
zontally arranged. In order to retrieve the symmetry, it is necessary to transpose
the phase every few hundred meters, as schematically depicted in Fig. 3.27. On the
other hand, instead of a solid core conductor, each phase is generally made by a set
of stranded conductors forming a cable. For example, Fig. 3.28 depicts a three phase
electrical line with horizontally arranged conductors and each conductor made by a
set of seven stranded conductors. In these cases, Eq. (3.32) becomes [1, 3]:
0 Dm
LD ln ; (3.33)
2 GMR
Fig. 3.28 Three phase electrical line with horizontally arranged conductors and each conductor
made by a set of seven stranded conductors
78 3 Power System Components: Models
• Dm is the geometric mean distance between phases, which can be computed as:
where di;ii , dii;iii , and diii;i are the distances between positions i and ii, ii and iii,
and iii and i, respectively, and
• GMR is the geometric mean radius of the cable, which can be computed as:
0 0 11=m 11=m
B Y
m Y
m
C
GMR D @ @e1=4 rk dj;k A A ; (3.35)
jD1 kD1;k¤j
where dj;k is the distance between the centers of conductors j and k, and m is the
number of stranded conductors in the cable.
Illustrative Example 3.5 Geometric mean radius of a cable
We consider the cable depicted in Fig. 3.29. It comprises six stranded conductors
with a radius of 2 cm each. We compute below the geometric mean radius of this
cable.
If we focus on conductor 1, we obtain that the distances between its center and
the centers of the remaining conductors are:
and:
p
d1;3 D d1;5 D 0:082 0:042 D 0:0693 cm:
The six conductors are symmetrically arranged and, thus, the distances between
centers for other conductors are the same. Thus, using Eq. (3.35) we obtain the
geometric mean radius as:
1=6
GMR D e1=4 0:02 0:04 0:0693 0:08 0:0693 0:04 D 4:61 cm:
3.5 Electrical Line 79
The detailed analysis of the inductance is beyond the scope of this book. For
additional information, the interested reader is referred either to the monograph by
Bergen and Vital [1] or to the one by Gómez-Expósito et al. [3].
Finally, once the induction coefficient per phase and per unit length is known, it
is possible to obtain the reactance per phase and per unit length as:
X D L!; (3.36)
where ! D 2f .
3.5.2.3 Capacity
2"0
Cy D ; (3.37)
ln D
r
where:
• D is the distance between phases,
• r is the radius of each conductor, and
• constant "0 is the vacuum permittivity, whose value is "0 D 36 1 109 F/m.
2"0
CD D 1:0486 1011 F=m:
10
ln 0:05
As in the case of the induction coefficient, Eq. (3.37) needs to be modified in
those cases in which the phases are not symmetrically arranged or when there are
multiple conductors per phase. In these cases, Eq. (3.38) should be used to compute
the phase-to-neutral capacity:
2"0
Cy D ; (3.38)
ln DCm
R
80 3 Power System Components: Models
where:
• Dm is the geometric mean distance between phases, which can be computed
using (3.34), and
• RC is the radius of the cable.
Additional information can be found in [1, 3].
4 PR
D 100; (3.39)
PS
where S and R stand for the sending- and receiving-ends of the line, respectively.
On the other hand, the regulation of an electrical line is defined as the voltage
magnitude increment at the sending-end of the line with respect to the voltage mag-
nitude at the receiving-end of the line, in percentage with respect to the voltage
magnitude at the receiving-end of the line, i.e., the regulation of an electrical line is
defined as:
4 US UR
D 100: (3.40)
UR
3.5 Electrical Line 81
uS ∠ d uR ∠ 0
− −
s̄S = pS + jqS s̄R = pR + jqR
We consider below an inductive balanced load that absorbs a complex power of:
Ni D uN S uN R D uS †ı uR †0 ; (3.42)
zN z†
uS † ı uR †0
sNR D uN RNi D uR †0 (3.43)
z†
uR uS u2
D †. ı/ R †: (3.44)
z z
The active and reactive powers at the receiving-end of the line are:
uR uS u2
pR D cos . ı/ R cos; (3.45)
z z
and:
uR uS u2
qR D sin . ı/ R sin; (3.46)
z z
respectively.
82 3 Power System Components: Models
uR uS u2
pR cos ı R cos ; (3.47)
x 2 x 2
and:
uR uS
pR sinı: (3.48)
x
Regarding reactive power, we have:
uR uS u2
qR sin ı R sin ; (3.49)
x 2 x 2
and:
uR uS u2
qR cosı R : (3.50)
x x
sinı ı; (3.51)
cosı 1: (3.52)
Then, we obtain:
uR uS
pR ı; (3.53)
x
and:
uR uS u2R
qR ; (3.54)
x x
or:
uR
qR .uS uR / : (3.55)
x
Considering (3.53) and (3.55), we conclude that pR mostly depends on the
voltage angle difference at the sending- and receiving-ends of the line, while qR
mostly depends on the voltage-magnitude difference.1
1
A word of caution: since a number of simplifying assumptions have been considered to derive the
above results, such results should be applied bearing in mind these simplifying assumptions.
3.6 Power System Examples 83
The previous sections describe individual models of the most common components
of power systems. In this section, we provide a set of examples to illustrate the
operation of these components when they are interconnected to form a power
system.
Illustrative Example 3.8 Power system first example
We consider the three-phase power system depicted in Fig. 3.31.
This system comprises a generator, two power transformers, an electrical line,
and a motor, whose main characteristics are provided below:
• Generator G: 60 MVA, 11 kV, x D 0:03 pu.
• Transformer T1 : 60 MVA, 132/12 kV, YNd11, x D 0:01 pu.
• Line L: 70 MVA, 132 kV, x D 0:02 pu.
• Transformer T2 : 60 MVA, 125/5 kV, YNd5, x D 0:01 pu.
• Motor M: 80 MVA, 5 kV, x D 0:03 pu.
Note that the per-unit values in these specifications are referred to the rated values
of each specific component.
The operating condition of the system is so that the voltage at the terminals of
the motor is 4% above its rated voltage and that the motor is consuming 60 MVA
with a power factor 0.9 inductive.
Using these data, we:
1. Determine the number of voltage zones, as well as the base values of each zone.
2. Obtain the equivalent single-phase circuit in per-unit.
3. Compute the phase voltage at the terminals of the generator.
Each transformer divides the system into two voltage zones. Thus, in this illus-
trative example we need to define three different voltage zones, namely generator
zone (zone 1), line zone (zone 2), and motor zone (zone 3).
Note that this example is a continuation of Illustrative Example 2.6 analyzed in
Chap. 2. There, base values for powers, voltages, currents, and impedances were
defined. Here, we also need to specify the angle shifts in each zone due to power
transformers.
For example, we fix the angle at the motor zone as ˛. Then, the angle shift at
the line zone is ˛ C 150ı due to transformer T2 (YNd5), while the angle shift at the
generator zone is ˛ C 180ı due to transformer T1 (YNd11).
Table 3.2 summarizes the base values in each zone.
Table 3.2 Illustrative Base Generator zone Line zone Motor zone
Example 3.8: base values
SB [MVA] 26.667 26.667 26.667
VB [kV] 6.351 69.859 2.794
IB [kA] 4.199 0.382 9.544
ZB [] 1.512 183.013 0.293
Phase shift ˛ C 180ı ˛ C 150ı ˛
i¯
-
z̄t1 z̄ l z̄t 2
z̄ g z̄m
ū g ū m
∼ ēg e¯m ∼
2
p5 80
3 3
zNm D j0:03 2 D j0:0320 pu:
80
3 5 132 p
11
125 12 3
Next, we derive the equivalent single-phase circuit depicted in Fig. 3.32, where
the three voltage zones are separated using dashed lines.
Next, we compute the phase voltage at the terminals of the generator.
The voltage at the terminals of the motor is 4% above its rated voltage and the
motor is consuming 60 MVA with a power factor 0.9 inductive. The power factor is
the cosine of the angle of the phase voltage with respect to the line current. Since
the motor is absorbing 60 MVA with a power factor 0.9, the absorbed active power
is 60 0:9 MW, and since the sin ' D sin.arccos.0:9// D 0:4359, the absorbed
reactive power is 60 0:4359 Mvar.
In such conditions, the per-unit complex power absorbed by the motor is:
60 1
sNm D .0:9000 C j0:4359/
3 80
3
D .0:6750 C j0:3269/ puVA D 0:7500†25:8419ı puVA:
Also, the per-unit phase voltage at the terminals of the motor is:
5 1
uN m D 1:04 p †0ı D 1:0744†0ı puV:
3 5 132 p
11
125 12 3
Note that we consider the node at the terminals of the motor as the reference node.
Next, the current through the electrical line is computed as:
ı
Ni D sNm D 0:75†25:8419 D 0:6981†25:8419ı puA:
uN m 1:0744†0ı
86 3 Power System Components: Models
L2 C
G T1 T2
L1
∼
M
∼
11
N g D 1:0924†1:8885ı p 12:0165
U †180ı D p †181:8885ı kV:
3 3
Illustrative Example 3.9 Power system second example
We consider the three-phase power system depicted in Fig. 3.33. The rated values
of its components are provided below (per-unit values refer to the corresponding
rated values):
• Generator: 200 MVA, 18 kV.
• Transformer T1 : 200 MVA, 130/20 kV, Yd11, x D 0:04 pu.
• Line L1 : ZN l1 D 7 C j14 /phase.
• Transformer T2 : 200 MVA, 130/8 kV, Yy0, x D 0:04 pu.
• Line L2 : ZN l2 D j0:06 /phase.
• Motor: 100 MVA, 8 kV.
• Impedance load: ZN c D .0:6 C j0:14/ /phase.
The motor works with a voltage at its terminals 5% above its rated value and absorbs
40 MW and 80 Mvar.
Using these data, we:
1. Determine the number of voltage zones and the base values of each zone.
2. Obtain the equivalent single-phase circuit using the per-unit system.
3. Compute the complex power absorbed by the load.
4. Compute the complex power supplied by the generator.
5. Compute the regulation and the efficiency of line L1 .
3.6 Power System Examples 87
The single-phase base-power value is 200/3 MVA and the base phase voltage at
the generator zone is equal to the generator rated voltage. Thus, zones and base
values are provided in Table 3.3.
Next, we compute the per-unit impedances of the system components using the
base values provided in Table 3.3.
The impedance of transformer T1 is:
202 200
zNt1 D j0:04 D j0:0494 pu;
200 182
the impedance of line L1 is:
200
zNl1 D .7 C j14/ D .0:1023 C j0:2045/ pu;
130 18 2
20
1302 200
zNt2 D j0:04 2 D j0:0494 pu;
200 130
20 18
200
zNl2 D j0:06 D j0:2315 pu;
8 18 2
20
200
zNc D .0:6 C j0:14/ D .2:3148 C j0:5401/ pu:
8 18 2
20
i¯ i¯c
e¯g e¯m
p
8 20 3 ı
uN m D 1:05 p †0 D 1:1667†0ı puV:
3 8 18
On the other hand, the per-unit complex power absorbed by the motor is:
1 1
sNm D .40 C j80/ D .0:2 C j0:4/ puVA:
3 200=3
Nic D uN m
D 0:4781†18:4349ı puA;
zNl2 C zNc
Next, we compute the phase voltage at the terminals of the generator as:
and:
respectively.
Thus, the regulation of line L1 is:
uS uR
D 100 D 14:17%:
uR
On the other hand, the complex powers at the receiving- and sending-ends of the
line are:
and:
respectively.
Then, the active powers at the receiving and sending-ends of the line are:
and:
respectively.
Finally, the efficiency of the line is:
pR
D 100 D 91:83%:
pS
90 3 Power System Components: Models
p11
uN 0m D 3 †0ı D 0:9167†0ı puV;
p12
3
i¯ 0
z̄t1 z̄ l z̄t 2
z̄g z̄ m
ū 0g ū 0m
∼ ēg ē m ∼
Fig. 3.36 Illustrative Example 3.10: equivalent single-phase circuit before the fault
3.6 Power System Examples 91
Table 3.4 Illustrative Base Generator zone Line zone Motor zone
Example 3.10: base values
50 50 50
SB [MVA]
3 3 3
12 60 12
VB [kV] p p p
3 3 3
i¯gf i¯mf
+ +
∼ e¯g e¯m ∼
− −
Fig. 3.37 Illustrative Example 3.10: equivalent single-phase circuit during the fault
30
0:8 1
sN0m D .0:8 j0:6/ D .0:6 j0:45/ puVA;
3 50
3
the line current is:
Ni0 D sNm D 0:8182†36:8699ı puA;
uN m
and:
respectively.
Then, fault currents are computed using the circuit in Fig. 3.37. That is:
Nifg D eN g
D 1:3457†60:8953ı puA;
zNg C zNt1 C zNl C zNt2
z̄g + z̄ t1 + z̄ l + z̄ t2 z̄ m
and:
An alternative way of computing the fault currents is based on the Thévenin and
superposition theorems [5]. In this case, the calculations proceed as follows.
Considering Fig. 3.36, the current prior to the fault is:
The Thévenin equivalent circuit prior to the fault from the motor terminals is
provided in Fig. 3.38.
The Thévenin voltage source is:
eN Th D uN om D 0:9167†0ı puV;
Then, the fault current and the incremental currents from the generator and motor
sides can be computed considering Fig. 3.39. That is, on the one hand:
On the other hand, the incremental currents from the generator and motors are:
zNm
Nifg D Nif D 1:6667†90ı puA
zNg C zNt1 C zNl C zNt2 C zNm
3.6 Power System Examples 93
f
ī- b
+
ēT h ∼m
−
D i¯gf-D i¯mf
z̄g + z̄ t1 + z̄ l + z̄ t2 z̄ m
and:
zNg C zNt1 C zNl C zNt2
Nifm D Nif D 9:1667†90ı puA;
zNg C zNt1 C zNl C zNt2 C zNm
respectively.
Using superposition, we derive the generator and motor currents under fault
conditions, i.e.:
Nifg D Ni0 C Nifg D 1:3457†60:8953ı puA
and:
Nifm D Ni0 C Nifm D 9:6797†93:8773ı puA;
respectively.
Note that in both cases (directly and using Thévenin and superposition) we obtain
the same solution.
The fault currents in Amps can be computed by multiplying the per-unit currents
by the corresponding base-current values. That is:
50
INgf D Nifg IgB D 1:3457†60:8953ı 3
12
D 3:2372†60:8953ı kA
p
3
and:
50
INmf D Nifm ImB D 9:6797†93:8773ı 3
12
D 23:2858†93:8773ı kA:
p
3
94 3 Power System Components: Models
This chapter describes models for the most common power system components,
namely generator, motor, power transformer, load, and electrical line. To do so, the
corresponding balanced three-phase model of each component is introduced first.
Second, we describe the functioning of the three-phase model of each component.
Finally, the equivalent single-phase model of each component is derived.
A number of examples are formulated and solved throughout the chapter to
illustrate the models of power system components, as well as to show their
applicability to the analysis of balanced three-phase power systems.
Additional information on models of power system components can be found in
[1] and [4]. Additionally, reference [2] provides further information on electrical
machines, and [3] on transmission lines.
3.1 Consider the three-phase power transformer depicted in Fig. 3.40, which
presents a delta-delta connection:
1. Compute the three-phase transformer ratio.
2. Compute the phase difference between UN R and UN R0 .
3. Name this three-phase power transformer using the naming convention explained
in Sect. 3.3.2.4.
3.2 A three-phase 380 kV electrical line is used to supply a load at nominal voltage
with a power factor 0.8 inductive. The line is 40 miles long. It has a resistance
3
of 0.1 /mile and an inductance of 103 H/mile. Considering a frequency of
60 Hz, compute:
+ Ū U − − ŪU +
R R
I¯R I¯R
+ Ū V − − ŪV +
S S
I¯S I¯S
+ Ū W − − ŪW +
T T
I¯T I¯T
G1 1 T1 2 3 T2 4 G2
L1
L2 L3
5 7
T3 T4
6 8
C M
1. The current at the sending- and receiving-ends of the line if the line regulation is
equal to 5%.
2. The complex power at the sending-end of the line.
3. The line efficiency.
4. The active power losses in the line.
3.3 Consider the three-phase power system depicted in Fig. 3.41. The characteris-
tics of the components of this system are provided below:
• Generators G1 and G2 : 500 MVA, 20 kV, x D 0:1 pu.
• Transformers T1 and T2 : 200 MVA, 500/18 kV, Yy1, x D 0:15 pu.
• Transformers T3 and T4 : 150 MVA, 500/20 kV, Dy11, x D 0:04 pu.
• Line L1 : X D 119 /phase.
• Line L2 : X D 50 /phase.
• Line L3 : X D 50 /phase.
• Load C: ZN D .12 C j15/ /phase.
• Motor M: 111 MW, cos=0.8 (inductive), 20 kV, D 0:925.
The operating condition is so that the motor is working at its rated values. Using
these data:
1. Determine the number of voltage zones and the base voltage in each zone.
2. Obtain the equivalent single-phase circuit using the per-unit system.
3. Compute the phase voltage at node 3.
4. Compute the current through line L1 , as well as the phase voltage at node 2. To
do so, assume that the voltage at the terminals of generator G2 is 20 kV and that
the phase difference between the voltages at nodes 4 and 3 is 8ı .
96 3 Power System Components: Models
G2 T2
L2
3.4 Consider the three-phase power system depicted in Fig. 3.42. The characteris-
tics of the system components are provided below:
• Generator G1 : 50 MVA, 12 kV, x D 0:2 pu.
• Generator G2 : 100 MVA, 15 kV, x D 0:4 pu.
• Transformer T1 : 50 MVA, 10/138 kV, YNyn6, x D 0:2 pu.
• Transformer T2 : 100 MVA, 15/138 kV, YNd11, x D 0:1 pu.
• Lines L1 and L2 : X D 20 /phase.
A balanced solid fault occurs at the terminals of generator G2 , where the voltage
is 15 kV. Using as base values the rated values of generator G2 :
1. Determine the number of voltage zones and the base values of each zone.
2. Obtain the equivalent single-phase circuit in per unit.
3. Obtain the Thévenin equivalent circuit at the terminals of generator G2 .
4. Compute the fault current.
References
1. Bergen, A.R., Vittal, V.: Power Systems Analysis, 2nd edn. Prentice Hall, Upper Saddle River,
NJ (1999)
2. Fitzgerald, A.E., Umans, S., Kingsley Jr., C.: Electric Machinery, 6th edn. McGraw-Hill, New
York, NY (2005)
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. Grigsby, L.: Electric Power Generation, Transmission, and Distribution. CRC Press, Boca
Raton, FL (2012)
5. Nilsson, J.W., Riedel, S.A.: Electric Circuits, 10th edn. Pearson, Upper Saddle River, NJ (2014)
Chapter 4
Power Flow
This chapter addresses the power flow problem, including its formulation, its
solution, and its analysis in specific cases. The solution of the power flow problem
provides a snapshot of the power system under analysis, which can then be utilized
to assess the health of its operation state. The power flow is a fundamental tool in
any power system control center.
4.1 Introduction
We consider a power system where the loads and the generator injections at different
nodes are known. The purpose of the power flow problem is determining the voltage
profile and the power flows throughout the network corresponding to these loads
and generator injections. It is important to note that the objective of the power flow
problem is to analyze a power system in steady-state operation, i.e., its objective is to
analyze a snapshot of the operation of the power system, not its dynamic evolution.
Since the power flow equations represent the functioning of a power network,
such equations are commonly embedded in any tool intended for operation analysis,
including:
1. state estimation,
2. short-term security analysis, and
3. market analysis.
Likewise, the power flow equations are also embedded in medium- and long-term
planning tools, including:
1. maintenance scheduling of generation and transmission facilities,
2. fuel procurement,
3. generation expansion planning, and
4. transmission expansion planning.
The remainder of this chapter is organized as follows. Section 4.2 provides the
nodal equations that relate nodal voltages and current injections in a power network.
Section 4.3 describes how to obtain the so-called admittance matrix that represents
the power network. Section 4.4 derives the power flow equations, which are similar
to the nodal equations but relating voltages and powers. The equations derived in
Sects. 4.2–4.4 are first described for a simple two-node power system for the sake of
clarity and then extended to the general case of a power system with n nodes. The
power flow equations constitute a system of nonlinear equations, whose solution
and outcome are analyzed in Sects. 4.6 and 4.7, respectively. Section 4.8 describes
the decoupled power flow formulation. Section 4.9 discusses the distributed slack
formulation. Section 4.10 describes the dc power flow formulation, which is a linear
approximation of the nonlinear formulation. Section 4.11 concludes the chapter
with a summary and provides some references for further reading. Sections 4.2–
4.7 and 4.10 include a number of clarifying examples. The GNU Octave codes
[5] to solve some of these clarifying examples are provided in Sect. 4.12. Finally,
Sect. 4.13 provides some exercises to further comprehend the concepts described in
this chapter.
In this section, we derive the equations that relate the nodal voltages and current
injections in a balanced three-phase power system. For the sake of clarity, these
equations are first derived for a simple two-node one-line power system. Then, these
equations are generalized for an n-node power system.
1 2
ī1 ī2
Fig. 4.2 Illustrative Example 4.1: balanced three-phase two-node power system
Considering the circuit in Fig. 4.1 and using Kirchhoff’s laws [12], we obtain
that the current injections at nodes 1 and 2 are:
i īi
1 1 1
2 ȳSi1 2 ȳSi2 2 ȳSin
ȳLi1 ȳLi2 ··· ȳLin
1 1 1
2 ȳSi1 2 ȳSi2 2 ȳSin
Fig. 4.3 Balanced three-phase n-node power network seen from node i
The equations derived in the previous section for a two-node power system are
generalized next to the case of an n-node power system, as the one depicted in
Fig. 4.3. This network is represented through its equivalent single-phase circuit in
per unit seen from node i.
The per-unit current injection at node i is:
X X1
Nii D yN Lij vN i vN j C yN Sij vN i ; 8i; (4.3)
j2˝i j2˝
2
i
where:
• Nii is the per-unit current injection at node i,
• vN i is the per-unit phase voltage at node i,
• yN Lij is the per-unit series admittance of the transmission line connecting nodes i
and j,
• yN Sij is the per-unit shunt admittance of the transmission line connecting nodes i
and j, and
• ˝i is the set of nodes directly connected to node i.
Illustrative Example 4.2 Nodal equations for a three-node power system
We consider the three-node power system schematically depicted in Fig. 4.4. The
three transmission lines connecting nodes 1, 2, and 3 are characterized by a series
impedance of .0:01 C j0:1/ pu˝ and negligible shunt admittance.
Next, we write the nodal equations that relate nodal voltages and current
injections in this network. First, we obtain the series admittance of the transmission
lines as:
1 1
yN L D D D .0:9901 j9:9010/ puS:
zNL 0:01 C j0:1
4.3 Admittance Matrix 101
3
i¯3
Then, using Eqs. (4.3), we obtain the current injections at the three nodes of the
network:
and:
Rearranging terms, the nodal equations that relate voltages and currents in the
three-node power system depicted in Fig. 4.4 are as follows:
and:
Given the nodal equations derived in the previous section, we now describe how
to obtain the so-called admittance matrix, which is used in the remaining of this
chapter to formulate the power flow equations.
102 4 Power Flow
We consider the nodal equations (4.1) and (4.2), derived in Sect. 4.2.1, that relate
the nodal voltages and the current injections in a two-node power system. By
rearranging terms, Eqs. (4.1) and (4.2) can be rewritten in matrix form as follows:
2 3
1
Ni1 6 yN L C 2 yN S NyL 7 vN 1
Ni2 D 4 1 5 vN 2 : (4.4)
Ny L yN L C yN S
2
The 2 2 matrix that multiplies the 2 1 vector of nodal voltages, i.e., matrix:
2 3
1
6 yN L C 2 yN S NyL 7
4 1 5;
NyL yN L C yN S
2
Thus, the admittance matrix of the two-node power system analyzed in Illustrative
Example 4.1 is:
j4:99 j5
puS:
j5 j4:99
Rearranging the terms of the nodal equations (4.3), derived in Sect. 4.2.2, that relate
the nodal voltages and current injections in an n-node power system, we obtain:
4.3 Admittance Matrix 103
X 1
X
Nii D yN Lij C yN Sij vN i C NyLij vN j ; 8i: (4.6)
j2˝
2 j2˝
i i
Denoting:
X 1
4
yN ii D yN Lij C yN Sij ; 8i; (4.7)
j2˝
2
i
and:
4
yN ij D yN Lij ; 8i; 8j; (4.8)
X
n
Nii D yN ij vN j ; 8i: (4.9)
jD1
Note that the summation in (4.9) is extended to all nodes because if nodes i and j
are not directly connected, then the corresponding element yN ij is null.
Considering (4.9) for all nodes, we obtain the following matrix equation:
Ni D yN vN ; (4.10)
where:
• Ni is the n 1 vector of nodal current injection phasors,
• vN is the n 1 vector of nodal (phase to neutral) voltage phasors, and
• yN is the so-called n n complex admittance matrix.
Illustrative Example 4.4 Admittance matrix for a three-node power system
We obtain the admittance matrix of the three-node power system analyzed in
Illustrative Example 4.2.
If the nodal equations derived in Illustrative Example 4.2 are rewritten using
matrix notation, we obtain:
2 3 2 32 3
Ni1 1:9802 j19:8020 0:9901 C j9:9010 0:9901 C j9:9010 vN 1
4 Ni2 5 D 4 0:9901 C j9:9010 1:9802 j19:8020 0:9901 C j9:9010 5 4 vN 2 5 :
Ni3 0:9901 C j9:9010 0:9901 C j9:9010 1:9802 j19:8020 vN 3
Thus, the admittance matrix of the three-node power system analyzed in Illustrative
Example 4.2 is:
104 4 Power Flow
2 3
1:9802 j19:8020 0:9901 C j9:9010 0:9901 C j9:9010
4
yN D 0:9901 C j9:9010 1:9802 j19:8020 0:9901 C j9:9010 5 puS:
0:9901 C j9:9010 0:9901 C j9:9010 1:9802 j19:8020
As a general rule, the admittance matrix for an n-node power system can be
obtained as follows:
1. The self-admittance of each node i, i.e., yN ii , is equal to the algebraic sum of all
admittances connected to that node.
2. The mutual-admittance between nodes i and k, i.e., yN ik , is equal to minus the sum
of all admittances connected between nodes i and k.
The admittance matrix is a symmetrical matrix, i.e., yN ik D yN ki , 8i, 8k. Moreover,
for large power systems, it is also a sparse matrix. For systems with more than 100
nodes, the number of zero elements is generally higher than 95%. This is so because
each node is only connected to its neighbors, not to all other nodes, and thus most
elements yN ik are null.
The nodal equations that relate nodal voltages and current injections in a balanced
power system were derived in Sect. 4.2 of this chapter. However, it is generally
convenient to work with powers instead of currents, because powers are metered
for billing purposes. Thus, these nodal equations are transformed in this section to
obtain the relationships between power injections and nodal voltages.
On the one hand, the complex power injected at nodes 1 and 2 of the two-node
power system depicted in Fig. 4.1 can be computed as follows:
and:
respectively, where:
• sNi is the per-unit complex power injected at node i,
• sNGi is the per-unit complex power generated at node i,
• sNDi is the per-unit complex power consumed at node i,
• pi is the per-unit active power injected at node i, and
• qi is the per-unit reactive power injected at node i.
On the other hand, using matrix equation (4.4) to replace the currents in (4.11)
and (4.12), we obtain:
sN1 D vN 1 yN 11 vN 1 C yN 12 vN 2 (4.13)
and:
sN2 D vN 2 yN 21 vN 1 C yN 22 vN 2 ; (4.14)
yN ik D yik ejik ; i D 1; 2; k D 1; 2; (4.15)
where:
• yik is the magnitude of the ikth element of the admittance matrix and
• ik is the angle of the ikth element of the admittance matrix.
Similarly, the voltages at different nodes are also written using Euler’s notation,
i.e.:
vN i D vi ejıi ; i D 1; 2; (4.16)
where:
• vi is the magnitude of the voltage at node i and
• ıi is the angle of the voltage at node i.
Then, we can rewrite (4.13) and (4.14) as:
sN1 D p1 C jq1 D v1 y11 v1 ej.11 / C y12 v2 ej.ı1 ı2 12 / (4.17)
and:
sN2 D p2 C jq2 D v2 y21 v1 ej.ı2 ı1 21 / C y22 v2 ej.22 / ; (4.18)
respectively.
106 4 Power Flow
These two complex equations result in the following four nonlinear real equa-
tions (two for active power and two for reactive power):
and:
The above Eqs. (4.19)–(4.22) are known as the power flow equations for a two-
node power system.
Illustrative Example 4.5 Power flow equations for a two-node power system
We write the power flow equations for the two-node power system described in
Illustrative Example 4.1.
The admittance matrix of this two-node power system was obtained in Illustrative
Example 4.3:
j4:99 j5 4:99† 90ı 5†90ı
yN D D puS:
j5 j4:99 5†90ı 4:99† 90ı
Simplifying, we obtain the following power flow equations for the considered
two-node power system:
4.4 Power Flow Equations 107
The power flow equations described in the previous section for a two-node power
system are extended here to the general case of an n-node power system.
The per-unit complex power injection vector (Ns) can be computed as:
Since:
sN D p C jq; (4.25)
then the real n 1 vectors of active (p) and reactive (q) power injections are:
and:
respectively, where < and = are the real and imaginary operators, respectively.
Row-wise the above equations are:
( )
X
n
pi D < vN i yN ik vN k ; 8i; (4.28)
kD1
and:
( )
X
n
qi D = vN i yN ik vN k ; 8iI (4.29)
kD1
or:
X
n
pi D vi yik vk cos.ıi ık ik /; 8i; (4.30)
kD1
108 4 Power Flow
and:
X
n
qi D vi yik vk sin.ıi ık ik /; 8i; (4.31)
kD1
where:
• pi is the ith element of the active power injection vector p,
• qi the ith element of the reactive power injection vector q,
• vi †ıi the ith element of the voltage vector vN , and
• yik †ik the ikth element of the admittance matrix yN .
The sets of nonlinear equations (4.30)–(4.31) are known as the power flow
equations.
Finally, note that the power injection is expressed at every node as the difference
between the powers generated and demanded at that node, i.e.:
pi D pG
i pi ;
D
8i; (4.32)
and:
qi D qG
i qi ;
D
8i; (4.33)
where:
• pG G
i and qi are the active and reactive powers generated at node i, respectively,
and
• pD D
i and qi are the active and reactive powers demanded at node i, respectively.
Illustrative Example 4.6 Power flow equations for a three-node power system
We write the power flow equations for the three-node power system described
in Illustrative Example 4.1. The admittance matrix of this three-node power system
was obtained in Illustrative Example 4.4:
2 3
1:9802 j19:8020 0:9901 C j9:9010 0:9901 C j9:9010
yN D 4 0:9901 C j9:9010 1:9802 j19:8020 0:9901 C j9:9010 5 puS;
0:9901 C j9:9010 0:9901 C j9:9010 1:9802 j19:8020
or similarly:
2 3
19:9007† 1:4711 9:9504†1:6705 9:9504†1:6705
yN D 4 9:9504†1:6705 19:9007† 1:4711 9:9504†1:6705 5 puS;
9:9504†1:6705 9:9504†1:6705 19:9007† 1:4711
and:
respectively.
The objective of the power flow problem is to determine the state of the power
system, including voltages (state variables), currents, active and reactive power
injections at all nodes, and active and reactive power flows through all transmission
lines. To do so, we use the power flow equations (4.30) and (4.31) derived in the
previous section. These equations constitute a set of 2n equations with 4n unknowns,
namely vi , ıi , pi , qi , i D 1; : : : ; n. Thus, it is necessary to specify 2n of these
unknowns and, then, solve the system defined by the power flow equations (4.30)
and (4.31) to determine the remaining 2n unknowns.
Depending on which of these unknowns are specified, the nodes of a power
system are classified into three categories, namely:
1. PQ nodes: both active and reactive power injections are known,
2. PV nodes: the active power injection and the voltage magnitude are known, and
3. slack nodes: the voltage magnitude and angle are known.
There is generally only one slack node whose angle is specified to be zero, becoming
the reference node as well, whereas any number of PQ or PV nodes is possible. Load
nodes are typically PQ, while generation nodes are either PV or slack.
110 4 Power Flow
For the sake of clarity and without loss of generality, in the following we assume
that the slack node is node #1, the following m 1 nodes are PV, and the remaining
n m nodes are PQ. Table 4.1 summarizes this classification of nodes.
Note that if one slack node is specified, as well as .m 1/ PV nodes and .n m/
PQ nodes, the power flow equations (4.30)–(4.31) constitute a nonlinear system of
2n equations and 2n unknowns. The 2n unknowns are:
1. the active (p1 ) and reactive (q1 ) power injections at the slack node,
2. the .m 1/ reactive power injections (qi , i D 2; : : : ; m) and .m 1/ voltage
angles (ıi , i D 2; : : : ; m) from PV nodes, and
3. the .n m/ voltage magnitudes (vi , i D m C 1; : : : ; n) and .n m/ voltage angles
(ıi , i D m C 1; : : : ; n) from PQ nodes.
The solution of this system of nonlinear equations is analyzed in the following
section.
4.6 Solution
The power flow equations (4.30) and (4.31) constitute a system of nonlinear
equations whose solution is analyzed in this section. Additional details can be found
in [4] and [7].
Since the power flow equations constitute a system of nonlinear equations, not
particularly bad-behaved, such system can be solved using generic solvers for
systems of nonlinear equations, such as those available through GNU Octave [5],
Python [14], or MATLAB [8].
For the sake of completeness, we review below the traditional Newton-Raphson
solution technique, which is commonly used to solve systems of nonlinear equa-
tions, and particularly, the power flow equations. However, we reiterate that given
the current capabilities on the state-of-the-art solvers for systems of nonlinear
equations, the direct use of such solvers will become increasingly common in the
power industry.
4.6 Solution 111
X
n
pi D vi vk .gik cos ıik C bik sin ıik / ; 8i; (4.34)
kD1
and:
X
n
qi D vi vk .gik sin ıik bik cos ıik / ; 8i; (4.35)
kD1
respectively, where:
• gik and bik are the real and imaginary parts, respectively, of the ikth element of
the admittance matrix, i.e., yN ik D gik C jbik , and
• ıik is the difference between the voltage angles of nodes i and k, i.e., ıik D ıi ık .
We know the active power injections at PV and PQ nodes, which are denoted as
sp
pi , i D 2; : : : ; n. If we consider initial values of the unknown voltage magnitudes
.0/ .0/
and angles, e.g., vi , i D m C 1; : : : ; n, and ıi , i D 2; : : : ; n, respectively, we
.0/ sp .0/
can use Eqs. (4.34) to compute pi , i D 2; : : : ; n. In general, we obtain pi ¤ pi
.0/ sp .0/ .0/
and, thus, we should find pi so that pi D pi C pi . Similarly, we know the
sp
reactive power injections at PQ nodes, which are denoted as qi , i D m C 1; : : : ; n.
.0/
Then, we can use Eqs. (4.35) to compute qi , i D m C 1; : : : ; n, and, in general,
sp .0/ .0/ sp .0/ .0/
obtain qi ¤ qi and, thus, we should find qi so that qi D qi C qi .
These active and reactive power increments can be obtained by making use of the
first-order terms of the Taylor series of Eqs. (4.34) and (4.35) for given values of the
state variables. Using matrix notation, these active and reactive power increments
can be computed as:
112 4 Power Flow
where:
• p is an nPV C nPQ 1 vector including the incremental active power injections
at PV and PQ nodes,
• q is an nPQ 1 vector including the incremental reactive power injections at
PQ nodes,
• J is the nPV C 2nPQ nPV C 2nPQ Jacobian matrix,
• nPV and nPQ are the number of PV and PQ nodes, respectively, and
• ˛ is the element-wise division.
Note that in the matrix equation (4.37), v.
/ ˛ v.
/ (divided element by element)
is used instead of v.
/ in order to improve computational efficiency.
The elements of the Jacobian matrix can be computed as [4]:
@pi
hii D D qi bii vi2 ; 8i; (4.38a)
@ıi
@pi
hik D D vi vk .gik sin ıik bik cos ıik / ; 8i; 8k ¤ i; (4.38b)
@ık
@pi
nii Dvi D pi C gii vi2 ; 8i; (4.38c)
@vi
@pi
nik Dvk D vi vk .gik cos ıik C bik sin ıik / ; 8i; 8k ¤ i; (4.38d)
@vk
@qi
jii D D pi gii vi2 ; 8i; (4.38e)
@ıi
4.6 Solution 113
@qi
jik D D vi vk .gik cos ıik C bik sin ıik / ; 8i; 8k ¤ i; (4.38f)
@ık
@qi
lii Dvi D qi bii vi2 ; 8i; (4.38g)
@vi
@qi
lik Dvk D vi vk .gik sin ıik bik cos ıik / 8i; 8k ¤ i: (4.38h)
@vk
Given the above derivations, the Newton-Raphson method comprises the follow-
ing steps:
• Step 0: initialize the iteration counter .
D 0/ and specify the voltage and power
data that are known. Specifically:
– the voltage at the slack node (angle and magnitude), i.e., v1 ; ı1 ,
– the active power injections at PV and PQ nodes, i.e., pi , i D 2; : : : ; n,
– the voltage magnitude at PV nodes, i.e., vi , i D 2; : : : ; m, and
– the reactive power injections at PQ nodes, i.e., qi , i D m C 1; : : : ; n.
• Step 1: build the complex admittance matrix as explained in Sect. 4.3 of this
chapter.
• Step 2: initialize voltage magnitudes (at PQ nodes) and angles (at PV and PQ
nodes), i.e.:
.0/
vi DVi ; i D m C 1; : : : ; n;
.0/
ıi Di ; i D 2; : : : ; n:
.
/ .
/
• Step 3: compute pi , i D 2; : : : ; n, and qi , i D m C 1; : : : ; n, using:
.
/ sp .
/
pi D pi pi ; i D 2; : : : ; n; (4.39)
and:
.
/ sp .
/
qi D qi qi ; i D m C 1; : : : ; n; (4.40)
respectively, where:
sp sp
– pi and qi are the known active (at PV and PQ nodes) and reactive (at PQ
nodes) power injections at node i, respectively, and
.
/ .
/
– pi and qi are the active (at PV and PQ nodes) and reactive (at PQ nodes)
power injections at node i computed using Eqs. (4.34) and (4.35), respectively,
at iteration
.
.
/ .
/
• Step 4: check if pi <
, i D 2; : : : ; n and qi <
, i D m C 1; : : : ; n,
where
is a prespecified tolerance. If so, the algorithm has converged. If not, the
algorithm continues at Step 5.
114 4 Power Flow
.
C1/ .
/ .
/
ıi D ıi C ıi ; i D 2; : : : ; n; (4.42)
and:
.
C1/ .
/ .
/
vi D vi C vi ; i D m C 1; : : : ; n; (4.43)
respectively.
• Step 8: update the iteration counter
C 1 and continue at Step 3.
For the sake of clarity, the flowchart of this algorithm is depicted in Fig. 4.5.
Additional details of the Newton-Raphson method can be found in [4] and in
Appendix A of this book.
Besides these general methods for solving systems of nonlinear equations, specific
software tools are available to solve the power flow problem. Relevant ones include
PowerWorld [13], a graphic-oriented tool, and GNU Octave-based MatPower [5, 9].
4.7 Outcome
The solution of the power flow equations provides the state variables of the power
system, which are the nodal voltages, i.e., vN i D vi †ıi , 8i. Once the state variables
are known, it is possible to compute all other relevant variables, e.g., currents and
power flows through transmission lines, as explained below.
The current flowing from node i to node j through transmission line ij is:
Niij D vN i vN j yN Lij C 1 vN i yN Sij ; 8i; 8j 2 ˝i : (4.44)
2
4.7 Outcome 115
v =0
(v)
Compute D p(v ) and D qi using (4.39) and (4.40)
YES
D p(i v) < e , i = 2; : : : ; n and D qi(v) < e , i = m+ 1; : : : ; n? END
NO
v +1 ← v
The apparent power flowing from node i to node j through transmission line ij is
then:
1
sNij D vN iNiij D vN i vN i vN j yN Lij C vi2 yN Sij ; 8i; 8j 2 ˝i : (4.45)
2
Thus, the active and reactive power flows from node i to node j through
transmission line ij are:
and:
respectively.
Alternatively, Eqs. (4.45) can be rewritten as:
1
sNij D vN i vN i yN Lij vN i vN j yN Lij C vi2 yN Sij
2
1
D vi2 yLij † Lij vi vj yLij † ıi ıj Lij C vi2 ySij † Sij ;
2
8i; 8j 2 ˝i : (4.48)
Then, on the one hand, the active power flow from node i to node j through
transmission line ij can be computed as:
1
pij D vi2 yLij cos Lij vi vj yLij cos ıi ıj Lij C vi2 ySij cos Sij
2
1
D vi2 yLij cos Lij vi vj yLij cos ıi ıj Lij C vi2 ySij cos Sij ;
2
8i; 8j 2 ˝i : (4.49)
On the other hand, the reactive power from node i to node j through transmission
line ij can be computed as:
1
qij D vi2 yLij sin Lij vi vj yLij sin ıi ıj Lij C vi2 ySij sin Lij
2
1
D vi2 yLij sin Lij vi vj yLij sin ıi ıj Lij vi2 ySij sin Sij ;
2
8i; 8j 2 ˝i : (4.50)
4.7 Outcome 117
Finally, the active power losses associated with transmission line ij can be
computed as:
Second, we write the power flow equations, which are obtained from Illustrative
Example 4.6. However, note that here we incorporate the known voltage and power
data, obtaining:
∼ p2 = 0.8
Fig. 4.6 Illustrative
∼ Slack
examen 4.7: three-node v̄1 = 1.00∠0 v̄2 = 1.05∠d 2
power system 1 2
0.01 + j0.1
0.01 + j0.1 0.01 + j0.1
3
s̄3 = −0.8 − j0.6
118 4 Power Flow
0:8 Dv3 Œ1:00 9:9504 cos.ı3 1:6705/ C 1:05 9:9504 cos.ı3 ı2 1:6705/
C19:9007v3 cos.1:4711/ ;
and:
The above equations constitute a system of six nonlinear equations and six
unknowns, namely v3 , ı2 , ı3 , p1 , q1 , and q2 , whose solution is:
and:
This solution can be obtained using one of the methods described in Sect. 4.6 of
this chapter, e.g., using GNU Octave [5]. The GNU Octave codes needed to obtain
this solution are provided in Sect. 4.12.
Next, currents through transmission lines can be computed using Eqs. (4.44):
On the other hand, the active power flows through transmission lines are obtained
using Eqs. (4.49):
4.8 Decoupled Power Flow 119
while the reactive power flows through transmission lines are obtained using
Eqs. (4.50):
Finally, the active power losses through transmission lines are obtained using
Eqs. (4.51):
In power systems, active powers (pi , 8i) are mostly related to voltage angles (ıi , 8i),
while reactive powers (qi , 8i) are mostly related to voltage magnitudes (vi , 8i). We
refer the reader to Sect. 3.5.4 of Chap. 3. Thus, a P-Q decomposed solution of the
power flow equations (4.30) and (4.31) is possible. Conceptually, the decomposed
solution strategy works as follows:
1. Specify (guess in the first iteration) the voltage angles ı2 ; : : : ; ın (i.e., for PQ and
PV nodes) and solve for vi (all PQ nodes), qi (all PV nodes), and q1 (slack node),
the Q-system below:
120 4 Power Flow
X
n
qi D vi yik vk sin .ıi ık ik / ; 8i: (4.52)
kD1
2. Specify (guess in the first iteration) vmC1 ; : : : ; vn (i.e., for all PQ nodes) and solve
for ı2 ; : : : ; ın (PQ and PV nodes) and p1 (slack node), the P-system below:
X
n
pi D vi yik vk cos.ıi ık ik /; 8i: (4.53)
kD1
3. Repeat steps 1-2 until small enough changes in ı2 ; : : : ; ın and vmC1 ; : : : ; vn occur
in two consecutive iterations.
In practice, this decomposition is implemented within a Newton solution algo-
rithm as the one described in Sect. 4.6.2 of this chapter. At each iteration, the P- and
Q-systems are not solved until convergence, but just a single Newton step is carried
out. Further details can be found in [4]. This technique is known as fast-decoupled
power flow algorithm.
where:
• pSlack is the active power injection at the slack node,
• pDT is the total active power demand in the power system,
• pGT is the total active power output of generating units located at nodes different
to the slack node, and
• lT are the total active power losses in the power system.
Since we consider just one slack node, this means that the generating units at
this node are responsible of covering all active power losses. Thus, the slack node
should be selected at a node with a large generating unit that is able to compensate
these active power losses.
Nevertheless, it might not be convenient to have just one generating unit to
balance the mismatch power. Therefore, it might be appropriate to distribute
4.10 dc Power Flow 121
the active power losses among different generating units through the so-called
participation factors, i.e.:
lg
Kg D ; 8g; (4.55a)
lT
X
Kg D 1; (4.55b)
g
where:
• Kg is the participation factor of generating unit g and
• lg is the active power loss supplied by generating unit g.
The formulation of the power flow problem considering a distributed slack node
formulation is out of the scope of this book. The interested reader is referred, for
instance, to [10] for additional details.
Consider the two-node power system depicted in Fig. 4.7. We assume that the shunt
admittances, as well as the series resistance of the transmission line connecting
both nodes are negligible, which is an assumption generally valid in transmission
systems. Thus, the voltage difference between nodes 1 and 2 can be computed as:
vN 1 vN 2 D jxNi; (4.56)
jx −ī
ī ī
v̄1 v̄2
Fig. 4.7 Balanced three-phase two-node power system (analysis using a dc power flow formula-
tion)
122 4 Power Flow
Using Eq. (4.56) to obtain current Ni, and substituting Ni in Eqs. (4.57) and (4.58)
render:
vN 1 vN 2
sN1 D vN 1 (4.59)
jx
and:
vN 2 vN 1
sN2 D vN 2 ; (4.60)
jx
respectively.
From Eqs. (4.59) and (4.60) we obtain:
v1 †ı1 v2 †ı2 v12 v1 v2
sN1 D v1 †ı1 D † †ı1 ı2 C (4.61)
x† 2 x 2 x 2
and:
v2 †ı2 v1 †ı1 v22 v1 v2
sN2 D v2 †ı2 D † †ı2 ı1 C ; (4.62)
x† 2 x 2 x 2
respectively.
Thus, the active power injections at nodes 1 and 2 are:
v1 v2 v1 v2
p1 D cos ı1 ı2 C D sin .ı1 ı2 / (4.63)
x 2 x
and:
v1 v2 v1 v2
p2 D cos ı2 ı1 C D sin .ı2 ı1 / ; (4.64)
x 2 x
respectively.
In transmission systems, the two additional assumptions below are generally
valid:
1. the voltage magnitudes are close to 1 in per unit and, thus, v1 v2 1 puV, and
2. the angle differences across lines are small and, thus, sin .ı1 ı2 / ı1 ı2 in
radians.
4.10 dc Power Flow 123
Using the above two assumptions, Eqs. (4.63) and (4.64) result in:
1
p1 D .ı1 ı2 / (4.65)
x
and:
1
p2 D .ı2 ı1 / ; (4.66)
x
respectively.
Equations (4.65) and (4.66) are the dc power flow equations for the two-node
power system depicted in Fig. 4.7. Unlike the power flow equations derived in
Sect. 4.4 of this chapter, which constitute a system of nonlinear equations, the dc
power flow approximate equations (4.65) and (4.66) are linear equations that relate
nodal active power injections and nodal voltage angles.
Illustrative Example 4.8 dc power flow for a two-node power system
We consider the two-node power system described in Illustrative Example 4.1.
However, we now assume that the shunt admittance is negligible.
First, we use Eqs. (4.65) and (4.66) to obtain the following dc power flow
equations:
1
p1 D .ı1 ı2 / ;
0:2
1
p2 D .ı2 ı1 / :
0:2
The above equations constitute a set of two linear equations and four unknowns
(p1 , p2 , ı1 , ı2 ). Thus, it is necessary to specify two unknowns. Specifically, we
consider that:
1. node #1 is the slack/reference node and, thus, ı1 D 0, and
2. node #2 is a PQ node, whose active power consumption is 1 puMW and, thus,
p2 D 1 puW.
Thus, the dc power flow equations become:
p1 D 5ı2 ;
1 D5ı2 :
Therefore, the solution of the dc power flow problem for the considered two-node
power system is:
p2 D1 puW;
ı2 D 0:2 rad:
124 4 Power Flow
A generally
˚ good initialsolution is to consider the flat-voltage profile solution,
i.e., 0 D 01 ; 02 ; V10 ; V20 D f0; 0; 1; 1g, since voltage magnitudes are generally
close to 1 puV and voltage angle differences are generally small. Using this solution,
the above expressions render:
1 1 1
p1 D ı1 ı2 D .ı1 ı2 /
x x x
and:
1 1 1
p2 D ı1 C ı2 D .ı2 ı1 / ;
x x x
respectively.
Note that these two equations are identical to the dc power flow equations (4.65)
and (4.66), respectively, derived in Sect. 4.10.1.
The dc power flow equations derived for a two-node power system in the previous
section are extended here to the general case of an n-node power system.
As previously stated, the simplifying assumptions below are generally valid in
transmission systems:
1. Voltage magnitudes are close to 1 in per unit and, thus:
vi 1; 8i: (4.67)
Taking into account the above assumptions, the active power flow equa-
tions (4.30) become:
126 4 Power Flow
X
n
pi bik cos ıi ık ; 8i; (4.70)
kD1
2
and:
X
n
pi bik sin .ıi ık / ; 8i; (4.71)
kD1
and finally:
X
n
pi bik .ıi ık / ; 8i: (4.72)
kD1
and:
bQ ik D
4
.bik / ; 8i; 8k: (4.75)
X
n
pi bQ ik ık ; 8i; (4.76)
kD1
which is a set of linear equations relating nodal active power injections and nodal
voltage angles. Equations (4.76) are the so-called dc power flow equations.
Note that the dc power flow equations constitute a set of n equations and 2n
unknowns, namely:
1. the n voltage angles ıi , 8i, and
2. the n active power injections pi , 8i.
However, according to the node classification in Sect. 4.5 of this chapter, we know
the voltage angle at the reference node (generally, node #1), as well as the active
4.10 dc Power Flow 127
Therefore:
pij bij ıi ıj ; 8i; 8j 2 ˝i : (4.78)
Finally, note that in the dc power flow problem active power losses are null, and
thus:
p1 D 9:9010ı2 9:9010ı3 ;
0:8 D 19:8020ı2 9:9010ı3 ;
0:8 D 9:9010ı2 C 19:8020ı3 :
We then eliminate the slack node equation. It is redundant since losses are zero.
Thus:
which is a linear system of 2 equations and 2 unknowns. Using matrix notation, the
above system becomes:
0:8 19:8020 9:9010 ı2
D ;
0:8 9:9010 19:8020 ı3
On the other hand, the power injection at the reference node is:
p1 D 0:
vN 1 1†0:0000ı puV;
vN 2 1†1:5432ı puV;
vN 3 1† 1:5432ı puV;
and:
p1 0 puW;
p2 0:8 puW;
p3 0:8 puW:
Note that to obtain this solution, we have considered the imaginary part of the
admittance matrix calculated in Illustrative Example 4.7, which was obtained by
considering the resistances of the lines. If, instead, resistances are eliminated from
the beginning, the imaginary part of the admittance matrix is:
2 3
20 10 10
4 10 20 10 5 puS;
10 10 20
and, thus:
bQ 11 D bQ 22 D bQ 33 D 20 puS;
bQ 12 D bQ 21 D 10 puS;
bQ 13 D bQ 31 D 10 puS;
bQ 23 D bQ 32 D 10 puS:
vN 1 1†0:0000ı puV;
vN 2 1†1:5279ı puV;
vN 3 1† 1:5279ı puV;
and:
p1 0 puW;
p2 0:8 puW;
p3 0:8 puW:
This chapter describes the power flow problem, which is a fundamental problem in
power system analysis. The objective of the power flow problem is determining the
voltage profile and the power flows throughout a power system knowing the active
and reactive power generations and demands.
Additional details on the power flow problem can be found in the textbook by
Kothari and Nagrath [7] and in the advanced monographs by Gómez-Expósito
et al. [4] and by Bergen and Vittal [2].
This section provides the GNU Octave codes [5] used for solving Illustrative
Example 4.7.
4.12 Octave Codes 131
The m-file below is a calling subroutine to solve the power flow example in
Illustrative Example 4.7 using the power flow function defined in Sect. 4.12.2:
1 clc
2 fun = @pfexample1;
3 x0 = [1,1,1,1,0,0]; x = fsolve(fun,x0);
4 v3=x(4); phase2=x(5); phase3=x(6);
5 phase2degrees=x(5)*(180/pi); phase3degrees=x(6)*(180/pi);
6 vpolar=[1 0; 1.05 phase2degrees; v3 phase3degrees]
7 a1=pol2cart(0,1.00); a2=pol2cart(x(5),1.05); a3=pol2cart(x(6),x
(4));
8 v1=a1(1)+j*a1(2);
9 v2=a2(1)+j*a2(2);
10 v3=a3(1)+j*a3(2);
11 i12=(v1-v2)/(0.01+j*0.1);
12 i13=(v1-v3)/(0.01+j*0.1);
13 i23=(v2-v3)/(0.01+j*0.1);
14 i21=-i12; i31=-i13; i32=-i23;
15 ipolara=[cart2pol(real(i12), imag(i12));
16 cart2pol(real(i13), imag(i13));
17 cart2pol(real(i23), imag(i23))];
18 ib=1000*(100/3)/(138/sqrt(3));
19 ipolar=[ipolara(:,2) ipolara(:,1)*180/pi]
20 ipolarAMPS=[ipolara(:,2)*ib ipolara(:,1)*180/pi]
21 %
22 s12=v1*conj(i12), s13=v1*conj(i13), s23=v2*conj(i23)
23 s21=v2*conj(i21), s31=v3*conj(i31), s32=v3*conj(i32)
24 %
25 l12=s12+s21, l13=s13+s31, l23=s23+s32
This m-file sets an initial solution, called the solution routine to solve the systems
of nonlinear equations, and compute relevant output variables.
The power flow function for example in Illustrative Example 4.7 is provided below:
1 function F = ACPF(x)
2 %
3 zr=0.01+j*0.1;
4 ybij=-1/zr;
5 pyij=cart2pol(real(ybij), imag(ybij));
6 mpyij=pyij(2); % off-diagonal element magnitude
7 ppyij=pyij(1); % off-diagonal element phase
8 ybii=+2*(1/zr);
9 pyii=cart2pol(real(ybii), imag(ybii));
10 mpyii=pyii(2); % diagonal element magnitude
11 ppyii=pyii(1); % diagonal element phase
132 4 Power Flow
12 %
13 F(1)=-x(1)+1.00*(mpyii*1.00*cos(-ppyii)...
14 +mpyij*1.05*cos(-x(5)-ppyij)...
15 +mpyij*x(4)*cos(-x(6)-ppyij));
16 F(2)=-0.8 +1.05*(mpyij*1.00*cos(x(5)-ppyij)...
17 +mpyii*1.05*cos(-ppyii)...
18 +mpyij*x(4)*cos(x(5)-x(6)-ppyij));
19 F(3)=0.8 +x(4)*(mpyij*1.00*cos(x(6)-ppyij)...
20 +mpyij*1.05*cos(x(6)-x(5)-ppyij)...
21 +mpyii*x(4)*cos(-ppyii));
22 F(4)=-x(2)+1.05*(mpyii*1.00*sin(-ppyii)...
23 +mpyij*1.05*sin(-x(5)-ppyij)...
24 +mpyij*x(4)*sin(-x(6)-ppyij));
25 F(5)=-x(3)+1.00*(mpyij*1.05*sin(x(5)-ppyij)...
26 +mpyii*1.00*sin(-ppyii)...
27 +mpyij*x(4)*sin(x(5)-x(6)-ppyij));
28 F(6)=0.6 +x(4)*(mpyij*1.00*sin(x(6)-ppyij)...
29 +mpyij*1.05*sin(x(6)-x(5)-ppyij)...
30 +mpyii*x(4)*sin(-ppyii));
31 %
This m-file solves the system of nonlinear equations pertaining to the power flow
problem of Illustrative Example 4.7.
3
s̄3 = −1 − j1
4.5 Consider the power system described in Exercise 4.4. Write the dc power flow
equations and solve them.
4.6 Consider the three-node power system depicted in Fig. 4.9. Using the data in
that figure:
1. Write the admittance matrix in polar form.
2. Write the power flow equations of node 1.
4.7 Consider the two-node power system depicted in Fig. 4.10. Tables 4.2 and 4.3
provide node and line data, respectively.
Using these data:
1. Obtain the admittance matrix.
2. Write the power flow equations.
3. Obtain the voltage (magnitude and angle) at each node of the system, as well as
the power flows through transmission lines.
4. Compute the active power losses in all transmission lines.
5. Repeat 2–4 considering a dc power flow formulation and compare the solution
achieved in this case with the previous results.
6. Check the results using the student version of PowerWorld [13].
134 4 Power Flow
1 2
∼
4.8 Repeat Exercise 4.7 for the three-node power system depicted in Fig. 4.11.
Tables 4.4 and 4.5 provide the node and line data, respectively.
4.9 Repeat Exercise 4.7 for the four-node power system depicted in Fig. 4.12.
Tables 4.6 and 4.7 provide the node and line data, respectively.
4.10 The dc power flow problem described in Sect. 4.10 allows formulating the
power flow problem through a set of linear equations. However, it has some
disadvantages. One of them is that it neglects the active power losses. In this
sense, reference [1] proposes a formulation that allows incorporating such losses.
Implement this formulation and, then, solve Illustrative Examples 4.8 and 4.10 again
using this alternative formulation. Compare the solutions achieved.
4.11 Consider the IEEE Reliability Test System (RTS) described in [6]. This is
a 24-node system that is usually considered for testing purposes in many power
system studies. Using the data provided in [6]:
References 135
Table 4.7 Exercise 4.8: line Line From node To node Series impedance
data
1 1 2 j0:01 pu˝
2 1 3 j0:01 pu˝
3 1 4 j0:01 pu˝
4 2 4 .0:01 C j0:01/ pu˝
5 3 4 .0:01 C j0:01/ pu˝
References
1. Alguacil, N., Motto, A.L., Conejo, A.J.: Transmission expansion planning: a mixed-integer LP
approach. IEEE Trans. Power Syst. 18(3), 1070–1078 (2003)
2. Bergen, A.R., Vittal, V.: Power Systems Analysis, 2nd edn. Prentice Hall, Upper Saddle River,
NJ (1999)
3. Chapra, S.C., Canale, R.P.: Numerical Methods for Engineers, 6th edn. McGraw-Hill, New
York (2010)
4. Gómez-Expósito, A., Conejo, A.J., Cañizares, C.: Electric Energy Systems: Analysis and
Operation. Taylor and Francis, Boca Raton, FL (2008)
5. GNU Octave. www.gnu.org/software/octave (2016)
6. Grigg, C., et al.: The IEEE Reliability Test System-1996. A report prepared by the Reliability
Test System Task Force of the Application of Probability Methods Subcommittee. IEEE Trans.
Power Syst. 14(3), 1010–1020 (1999)
7. Kothari, D.P., Nagrath, I.J.: Modern Power System Analysis, 4th edn. Tata McGraw Hill
Education Private Limited, New Delhi (2011)
8. MATLAB. www.mathworks.com/products/matlab (2016)
9. MatPower. www.pserc.cornell.edu/matpower (2016)
10. Meisel, J., System incremental cost calculations using the participation factor load-flow
formulation. IEEE Trans. Power Syst. 8(1), 357–363 (1993)
11. Moskowitz, M.A.: A Course in Complex Analysis in One Variable. World Scientific Publish-
ing, Singapore (2002)
12. Nilsson, J.W., Riedel, S.A.: Electric Circuits, 10th edn. Pearson, Upper Saddle River, NJ (2014)
13. PowerWorld. www.powerworld.com (2016)
14. Python. www.python.org (2016)
Chapter 5
Power System State Estimation
Electric power systems span over countries and continents to deliver electric
energy to almost every industry, business, and home. To accomplish this with high
reliability, it is necessary to know the state of the power system, i.e., its voltage
profile throughout the power network. In this context, the state estimation problem
aims at identifying the most likely state of a power system by considering a large-
enough number of redundant measurements.
5.1 Introduction
The overall objective of the state estimation problem is to identify the most likely
state of a power system. The state of a power system is defined by its node voltages.
Every node voltage is a complex variable, which is usually expressed in polar form.
The magnitude of this complex variable, which is related to the reactive power at
the node, provides the voltage magnitude, while its angle is a measure of the relative
height of this node in terms of active power flow.
In the remaining of the chapter, the state variables, i.e., the voltages across the
system, are denoted by:
vN i D vi †ıi ; i D 1; : : : ; n; (5.1)
where:
• vi is the voltage magnitude at node i,
• ıi the voltage angle at node i, and
• n is the number of nodes of the network.
Note that all magnitudes in this chapter are expressed using a per-unit system as
described in Sect. 2.6 of Chap. 2 of this book.
Since voltage angles appear always as differences, the angle of a given node can
be taken as the reference and thus:
ıi D 0; i: ref. (5.2)
5.2 Measurements
Meters of different types and qualities are installed throughout power systems
and used to estimate the system state, as well as for billing purposes. These
meters provide measurements of some of the system variables, e.g., active and
5.2 Measurements 139
reactive power flows through transmission lines, active and reactive power injections
at nodes, or voltage magnitudes. These measurements are generally redundant;
however, redundancy is used to improve the estimation.
The most common measurements available in any power system are:
• Voltage magnitudes:
– Voltage magnitudes are measured using voltmeters with a given level of
precision. A voltage magnitude measurement is available at almost every
node i of the system and is denoted by vQ i , being its level of quality given by
parameter iV . The smaller the value of parameter iV , the larger the precision
of the measurement. The set of available voltage measurements is denoted by
˝ V.
• Active and reactive power flows:
– Active power flow measurements are usually available at both ends of any
power line. The measurement of active power leaving node i toward node
j through transmission line i j is denoted by pQ ij , and it has a degree of
precision denoted by ijP . The set of available active power flow measurements
is denoted by ˝ PF .
– Similarly, reactive power flow measurements are generally available at both
ends of any power line and denoted by qQ ij , with a degree of precision given
by parameter ijQ . The set of available reactive power flow measurements is
denoted by ˝ QF .
• Active and reactive power injections:
– The active power injection at any node i can also be measured. These
measurements are denoted as pQ i , with a degree of precision given by parameter
iP . The set of available active power injection measurements is denoted by
˝ P.
– Analogously, the reactive power injection measurement at node i is denoted
by qQ i , with a degree of precision given by parameter iQ . The set of available
reactive power injection measurements is denoted by ˝ Q .
Table 5.1 summarizes these measurements.
It is important to note that Phasor Measurement Units (PMU), which are mea-
surement systems based on the Global Positioning System (GPS), are increasingly
available. Such units allow measuring simultaneously voltage and current magni-
tudes, as well as voltage and current angles. We do not consider PMU measurements
in this introductory chapter, but their processing is not different than the processing
of conventional measurements. However, if all measurements processed are voltage
and current magnitudes and angles, the resulting state estimation problem drastically
simplifies [7].
5.3 Estimation
zQ D zO C "; (5.3)
where:
• zQ is the measured value,
• zO is the exact value, and
• " is the measurement error.
Due to these measurement errors, it is not possible to obtain the exact value of
the state variables, and thus it is only possible to estimate them. An appropriate way
to proceed is to use all available measurements to generate the best estimation of the
system state in a least-square sense.
To do so, we first provide expressions for active/reactive power injections and for
active/reactive power flows. Note that these expressions were derived in Chap. 4 of
this book.
On the one hand, the active power injection at node i, i.e., pi ./, can be computed
as:
X
n
pi ./ D vi yik vk cos .ıi ık ik / ; 8i; (5.4)
kD1
where:
• yik †ik is the ijth element of the admittance matrix of the system.
Analogously, the reactive power injection at node i, i.e., qi ./, can be computed
as:
5.3 Estimation 141
X
n
qi ./ D vi yik vk sin .ıi ık ik / ; 8i: (5.5)
kD1
On the other hand, the active power flowing through transmission line i j from
node i to node j can be expressed as:
pij ./ D vi2 yLij cos Lij vi vj yLij cos ıi ıj Lij
1
C vi2 ySij cos Sij ; 8i; 8j 2 i ; (5.6)
2
where:
• pij ./ is the active power flowing through transmission line i j from node i to
node j,
• yLij †Lij is the series admittance of transmission line i j,
• ySij †Sij is the shunt admittance of transmission line i j, and
• i the set of nodes directly connected to node i through transmission lines.
The reactive power flowing from node i to node j through transmission line i j,
i.e., qij ./, can be expressed as:
qij ./ D vi2 yLij sin Lij vi vj yLij sin ıi ıj Lij
1
vi2 ySij sin Sij ; 8i; 8j 2 i : (5.7)
2
The above expressions and the available measurements are used to formulate the
following problem that allows estimating the most likely state of a power system,
i.e., determining the values of the state variables (vN i D vi †ıi ; 8i) that minimize the
quadratic error of every measurement with respect to its actual estimate:
minvi ;ıi ;8i
X 1 X 1 2 X 1 2
J ./ D .vk vQ k /2 C pj ./ pQ j C qj ./ qQ j
k
V
jP
jQ
k2˝ V j2˝ P j2˝ Q
X 1 X 1
C .pk` ./ pQ k` /2 C .qk` ./ qQ k` /2 : (5.8)
k`
PF
QF
k`
k`2˝ PF k`2˝ QF
Note that each term in the above problem represents the quadratic error of the
corresponding measurement with respect to its actual estimation. Each of these
terms is multiplied by the corresponding measurement precision weight in order
to take into account how accurate each measurement is.
In compact form, problem (5.8) can be rewritten as:
142 5 Power System State Estimation
minx1 ;:::;xo
X
m
J .x1 ; : : : ; xo / D wk .hk .x1 ; : : : ; xo / zk /2 ; (5.9)
kD1
where:
• x1 ; : : : ; xo are the state variables,
• z1 ; : : : ; zm are the available measurements,
• w1 ; : : : ; wm are the measurements weights (representing their relative precisions),
and
• hi ./; : : : ; hm ./ are functions expressing measurements as functions of the state
variables.
It should be noted that problem (5.9) above is a well-behaved unconstrained
nonlinear programming (NLP) problem [12].
A particular case of interest pertains to no-load nodes. We know with certainty
that the active and reactive power injections at these nodes are null so that we can
use such information to formulate the state estimation problem. Thus, if no-load
nodes are considered in the formulation of problem (5.8), it can be recast as the
following optimization problem:
minvi ;ıi ;8i
X 1 X 1 2 X 1 2
J ./ D .vk vQ k /2 C pj ./ pQ j C qj ./ qQ j
k
V
jP
jQ
k2˝ V j2˝ P j2˝ Q
X 1 X 1
C .pk` ./ pQ k` /2 C .qk` ./ qQ k` /2 (5.10a)
k`
PF QF
k`
k`2˝ PF k`2˝ PF
subject to
pi ./ D 0; 8i 2 ˝ N ; (5.10b)
qi ./ D 0; 8i 2 ˝ N ; (5.10c)
X
m
J .x1 ; : : : ; xo / D wk .hk .x1 ; : : : ; xo / zk /2 (5.11a)
kD1
subject to
hj ./ D 0; 8j 2 ˝ N : (5.11b)
5.3 Estimation 143
1
∠ − 90◦
0.15
∼
v1 = 1.07 1 2 v2 = 1.01
p12 = 0.83 p21 − 0.81
q = 0.73 q − 0.58
1 1
p12 D v12 cos v1 v2 cos ı1 0 C C0
0:15 2 0:15 2
1
D 0 C v1 v2 sin.ı1 0/
0:15
1
D v1 v2 sin ı1
0:15
and:
1 1
q12 D v12 sin v1 v2 sin ı1 0 C 0
0:15 2 0:15 2
1 1
D v12 v1 v2 cos.ı1 0/
0:15 0:15
1 1
D v12 v1 v2 cos ı1 ;
0:15 0:15
respectively.
Similarly, the active and reactive power flows in direction 2 1 are:
144 5 Power System State Estimation
1 1
p21 D v22 cos v2 v1 cos 0 ı1 C C0
0:15 2 0:15 2
1
D 0 C v2 v1 sin.ı1 /
0:15
1
D v2 v1 sin ı1
0:15
and:
1 1
q21 D v22 sin v2 v1 sin 0 ı1 C 0
0:15 2 0:15 2
1 1
D v22 v2 v1 cos.ı1 /
0:15 0:15
1 1
D v22 v2 v1 cos ı1 ;
0:15 0:15
respectively.
Thus, the state estimation problem for the considered two-node power system
can be formulated as:
minv1 ;v2 ;ı1
1 1
J./ D Œv1 1:072 C Œv2 1:012
0:012 0:012
2
1 1
C v v
1 2 sin ı1 0:83
0:012 0:15
2
1 1 2 1
C v v v
1 2 cos ı 1 0:73
0:012 0:15 1 0:15
2
1 1
C v2 v1 sin ı1 C 0:81
0:012 0:15
2
1 1 2 1
C v v2 v1 cos ı1 C 0:58 :
0:012 0:15 2 0:15
The solution of this problem can be obtained using GAMS [5] and is:
An input GAMS file to solve this illustrative example is provided in Sect. 5.8.
5.4 Observability 145
The solution of problem (5.9) can be directly obtained using some of the solvers
available in GAMS [5] for NLP problems, e.g., CONOPT [3]. An alternative way
of obtaining this solution is solving the first-order optimality conditions that must
be satisfied at the minimum, i.e.:
@J.x1 ; : : : ; xo /
D 0; 8i: (5.12)
@xi
Note that problem (5.12) is a system of nonlinear equations that can be solved
using, for example, the Newton–Raphson method. The interested reader is referred
to Appendix A of this book and to [8] for further details.
5.4 Observability
Before trying to solve the state estimation problem, it is convenient to check if the
available measurements are enough to estimate the state of the system. It might be
possible that the number of measurements is not sufficient to estimate the state. Or
even if the number of measurements is large enough, they might be concentrated in
a region of the system, and not enough measurements are available in other regions.
In this context, it is relevant the concept of observability, which refers to determining
whether or not the set of available measurements is sufficient to estimate the state
of the system.
We denote by 2n 1 the number of state variables (n voltage magnitudes and
n 1 voltage angles) and by m the number of measurements. Depending on these
numbers, we distinguish three cases:
1. If m < 2n 1, then the number of measurements is not enough and the system
is not observable.
2. If m D 2n 1, then there is no redundancy in the measurements.
3. If m > 2n 1, then there are m 2n C 1 redundant measurements.
Depending on the number and types of measurements, as well as on the topology of
the system, cases 2 and 3 can be observable or not.
It is important to remark that a system is non-observable if it is not possible to
estimate all the state variables. However, it may be possible to estimate a subset of
these state variables. Moreover, in some cases, non-observable systems can be made
observable by using artificial measurements. For example, we may use previous
estimates as inaccurate measurements.
In the remaining of this section we explain how to determine if a power system
is observable or not.
146 5 Power System State Estimation
where:
• r, s, t, u, and v are the numbers of voltage measurements, active power
measurements, reactive power measurements, active power flow measurements,
and reactive power flow measurements, respectively,
• i.1/j.1/ and i.u/j.u/ denote the first and last active power flow measurements,
respectively,
• k.1/`.1/ and k.v/`.v/ refer to the first and last reactive power flow measure-
ments, respectively.
5.4 Observability 147
h.x/ D z; (5.15)
where:
• z is the m 1 vector of measurements.
For observability purposes, i.e., to identify if the number of measurements is
enough to estimate the state of the system, we may linearize the above expression,
which renders:
Hx D z; (5.16)
We also assume that measurements are error free, i.e., we assume that vector z
contains no error.
We also recall that:
• H is an m o matrix,
• z is an m 1 vector, and
• x is an o 1 vector.
Irrespective of the number of equations (m) and unknowns (o), depending on the
rank of matrix H and on the rank of matrix H extended with the column vector z,
matrix equation (5.16) has generally many solutions [2]. These solutions can be
expressed as:
x D xP C N; (5.18)
where:
• xP is a particular solution,
• N is the o k null-space matrix corresponding to H, and
• is a k 1 vector of parameters.
The null space [2] of matrix H can be obtained, for example, using GNU Octave
[6] through the function:
null.H/:
148 5 Power System State Estimation
Note that if the null space matrix is null, the linear system of equations (5.16)
results in a single solution, i.e., the particular solution. This corresponds to the
observable case. On the other hand, the linear system of equations (5.16) results
in many solutions if the null space matrix is not null. This correspond to the non-
observable case.
For the non-observable case, it is convenient to identify which state variables
are observable and which ones are not. With this purpose, we write below row i of
matrix equation (5.16), i.e.:
X
k
xi D xiP C Nij j ; 8i: (5.19)
jD1
and:
2 3
v1
x D 4 v2 5 ;
ı1
Then:
H D rx h.x/
2 3
1 0 0
6 0 1 0 7
6 7
6 7
6 1 1 1 7
6 v 2 sin ı1 v 1 sin ı1 v1 v2 cos ı 1 7
6 0:15 0:15 0:15 7
6 7
6 1 1 1 1 7
D6
6 2v1 v2 cos ı1 v1 cos ı1 v1 v2 sin ı1 77:
6 0:15 0:15 0:15 0:15 7
6 7
6 1 1 1 7
6 v2 sin ı1 v1 sin ı1 v1 v2 cos ı1 7
6 0:15 0:15 0:15 7
6 7
4 1 1 1 1 5
v2 cos ı1 2v2 v1 cos ı1 v2 v1 sin ı1
0:15 0:15 0:15 0:15
The actual operating condition is not known. Thus, in order to evaluate matrix H
one option is to consider the flat solution, i.e., v1 D 1, v2 D 1, and ı1 D 0. In such
a case, matrix H becomes:
2 3
1 0 0
6 0 1 0 7
6 7
6 1 7
6 0 0 7
6 0:15 7
6 1 1 7
H D rx h.x/ D 6 6 0 7:
7
6 0:15 0:15 7
6 1 7
6 0 0 7
6 0:15 7
4 1 1 5
0
0:15 0:15
The null space of matrix H is:
2 3
000
N D 40 0 05;
000
and, thus, neither the angle nor the voltage magnitudes are observable.
A GNU Octave [6] file to verify the above observability analysis is provided in
Sect. 5.8.
The first step before solving a state estimation problem is filtering the available
measurements in order to detect those that are clearly erroneous and, in such a
case, eliminating these erroneous measurements before solving the state estimation
problem. However, some erroneous measurements may remain after this filtering
stage, and thus it is necessary to use a procedure to identify these erroneous
measurements.
If all measurement errors are assumed to be Gaussian distributed and if each
precision parameter (i.e., kV , jP , jQ , klPF , klQF ) is characterized by the variance
of the corresponding error, then the objective function J.x/ exhibits a 2 probability
distribution with m o degrees of freedom. Thus, if no erroneous measurement is
present in the set of available measurements, we have:
probability J.x / 2 .1 ˛; m o/ D 1 ˛; (5.20)
chi2inv.0:99; 3/ D 11:345:
J D 7:936:
Considering a confidence level of 0:99 (i.e., ˛ D 0:01) and taking into account
that the degrees of freedom of the 2 distribution of J are 3 (6 measurements minus
3 state variables), we obtain (using GNU Octave [6]):
2 .0:99; 3/ D 11:345:
Since 11:345 > 7:936, we can conclude that no erroneous measurements are
present with a confidence level of 99%.
Next, we include an error in the voltage measurement at node 1. In this case, the
set of measurements is:
2 3 2 3
vQ 1 1:17
6 vQ 7 6 1:01 7
6 27 6 7
6 7 6 7
6 pQ 12 7 6 0:83 7
zD6 7D6 7
6 qQ 12 7 6 0:73 7
6 7 6 7
4 pQ 21 5 4 0:81 5
qQ 21 0:58
J D 26:711:
Since 11:345 < 26:711, we conclude that one or several erroneous measurements
are present with a confidence level of 99%.
The test described in this section only allows detecting whether or not the
set of measurements includes measurement errors. This test, however, does not
allow identifying which are the erroneous measurements. To do so, it is necessary
to follow an erroneous measurement identification procedure as described in the
following section.
154 5 Power System State Estimation
Once the presence of erroneous measurements is detected (as explained in Sect. 5.5),
the specific erroneous measurements have to be identified. This is carried out
through the so-called normalized residual test, which is described in the following.
Once the optimal solution, i.e., x1 ; : : : ; xo , has been obtained, the m 1 vector of
residuals (r) is computed as:
r D z h.x /: (5.21)
The expected value and the covariance matrix of this residual vector are:
Exp.r/ D 0 (5.22)
and:
Cov.r/ D ˝; (5.23)
In matrix equation (5.24), the Jacobian matrix H and matrix W are defined as:
2 @h .x/ @h1 .x/ 3
1
6 @x1 @xo 7
6 :: :: :: 7
H D rx h.x/ D 6
6 : : :
7
7 (5.25)
4 @h .x/ @hm .x/ 5
m
@x1 @xo
and:
W D diag.w1 ; : : : ; wm /; (5.26)
respectively.
Then, using matrix ˝, the normalized residual corresponding to measurement i
is computed as:
ri
riN D p ; 8i: (5.27)
˝ii
This normalized residual is Gaussian distributed with 0 mean and variance equal
to 1 [8].
5.6 Erroneous Measurement Identification 155
The normalized residual test is based on the fact that with a .1 ˛/ confidence
level, the largest normalized residual rkN corresponds to an erroneous measurement
if [1]:
˛
jrkN j ˚ 1 1 ; (5.28)
2
norminv.p; yN ; y2 /;
where:
• p is the probability,
• yN is the mean of random variable y, and
• y2 is the variance of random variable y.
For example:
0:01
norminv 1 ; 0; 1 D 2:5758:
2
Note that in Illustrative Example 5.3 we concluded that this set of measurements
includes at least one erroneous measurement.
Using the available measurements as input of the state estimation problem, we
obtain the following optimal solution:
2 3 2 3
v1 1:133
x D 4 v2 5 D 4 1:043 5 :
ı1 0:104
156 5 Power System State Estimation
and:
2 3
1 0 0
6 0 1 0 7
6 7
6 7
6 1 1 1 7
6 v2 sin ı1 v1 sin ı1 v1 v2 cos ı1 7
6 0:15 0:15 0:15 7
6 7
6 1 1 1 1 7
H D 6 2v1 v2 cos ı1 v1 cos ı1 v1 v2 sin ı1 7
6 0:15 0:15 0:15 0:15 7
6 7
6 1 1 1 7
6 v2 sin ı1 v1 sin ı1 v1 v2 cos ı1 7
6 7
6 0:15 0:15 0:15 7
4 1 1 1 1 5
v2 cos ı1 2v2 v1 cos ı1 v2 v1 sin ı1
0:15 0:15 0:15 0:15
5.6 Erroneous Measurement Identification 157
2 3
1 0 1
6 0 1 0 7
6 7
6 7
6 0:72184 0:78413 7:83556 7
D6 7:
6 8:19090 7:51252 0:81785 7
6 7
4 0:72184 0:78413 7:83556 5
6:91576 6:39414 0:81785
1 ˛ D 1 0:01 D 0:99;
then:
1 ˛ 1 0:01
˚ 1 D˚ 1 D 2:5758:
2 2
Since the largest absolute value normalized residual is r1N D 5:01021 > 2:5758,
measurement 1 (i.e., the measurement corresponding to the voltage magnitude at
node 1) is erroneous with a 99% confidence level.
A GNU Octave [6] file to verify Illustrative Example 5.4 is provided in Sect. 5.8.
158 5 Power System State Estimation
This chapter describes the state estimation problem [9–11], a fundamental problem
in power system analysis. The objective of the state estimation problem is determin-
ing the most likely state of a power system by considering a large enough number
of (necessarily) inexact measurements.
Additional information about the state estimation problem can be found in the
monograph by Abur and Gómez-Expósito [1].
This section provides the GAMS [5] and GNU Octave [6] codes for solving some
of the illustrative examples described in this chapter.
An input GAMS [5] file to solve Illustrative Example 5.1 is provided below:
1 scalars
2 x line reactance / 0.15/
3 v1m Voltage measurement at node 1 / 1.07/
4 v2m Voltage measurement at node 2 / 1.01/
5 p12m Active power 12 measured at 1 / 0.83/
6 q12m Reactive power 12 measured at 1 / 0.73/
7 p21m Active power 21 measured at 2 /-0.81/
8 q21m Reactive power 21 measured at 2 /-0.58/;
9 variables
10 v1 Voltage magnitude at node 1. Exact value: 1.0966
11 v2 Voltage magnitude at node 2. Exact value: 1.0000
12 d1 Angle of node 2. Exact value: 0.1097
13 e Error;
14 equations
15 error Error equation;
16 error..e =e=
17 1/(0.01**2)*sqr(v1-v1m) +
18 1/(0.01**2)*sqr(v2-v2m) +
19 1/(0.01**2)*sqr((1/x)*v1*v2*sin(d1)-p12m) +
20 1/(0.01**2)*sqr((1/x)*(sqr(v1)-v1*v2*cos(d1))-q12m) +
21 1/(0.01**2)*sqr(-(1/x)*v2*v1*sin(d1)-p21m) +
22 1/(0.01**2)*sqr((1/x)*(sqr(v2)-v1*v2*cos(d1))-q21m);
23 model estimate /all/;
24 solve estimate using nlp minimizing e;
The reader may verify that this GAMS [5] code reproduces the optimization
problem analyzed in Illustrative Example 5.1.
5.8 GAMS and Octave Codes 159
The part of the GAMS output file that provides the optimal solution is given
below:
A GNU Octave [6] file to carry out the observability analysis in Illustrative
Example 5.2 is provided below:
1 clc
2 % All measurements
3 H=...
4 [ 1 0 0
5 0 1 0
6 0 0 1/0.15
7 1/0.15 -1/0.15 0
8 0 0 -1/0.15
9 -1/0.15 1/0.15 0];
10 null_vpq = null(H)
11 % Only v and q measurements
12 Hvq = H([1:2 4 6],:);
13 null_vq = null(Hvq)
14 % Only p measurements
15 Hp = H([3 5],:);
16 null_p = null(Hp)
17 % Only v1 and q21 measurements
18 Hv1q21 = H([1 6],:);
19 null_v1q21 = null(Hv1q21)
20 % Only v2 and q12 measurements
21 Hv2q12 = H([2 4],:);
22 null_v2q12 = null(Hv2q12)
23 % Only v1 and q12 measurements
24 Hv1q12 = H([1 4],:);
25 null_v1q12 = null(Hv1q12)
26 % Only v2 and q21 measurements
27 Hv2q21 = H([2 6],:);
28 null_v2q21 = null(Hv2q21)
29 % Only v measurements
160 5 Power System State Estimation
30 Hv = H([1 2],:);
31 null_v = null(Hv)
32 % Only q measurements
33 Hq = H([4 6],:);
34 null_q = null(Hq)
The reader may verify that this m-file reproduces almost verbatim the math
analysis in Illustrative Example 5.2.
A GNU Octave [6] file to solve Illustrative Example 5.4 is provided below:
1 clc
2 y=1/0.15; v1=1.133; v2=1.043; d1=0.104;
3 W=diag((1/(0.01)**2)*ones(6,1));
4 z=[1.17 1.01 0.83 0.73 -0.81 -0.58]’;
5 h=[
6 v1
7 v2
8 v1*v2*y*sin(d1)
9 v1**2*y-v1*v2*y*cos(d1)
10 -v2*v1*y*sin(d1)
11 v2**2*y-v2*v1*y*cos(d1)
12 ];
13 r=z-h;
14 H=[
15 1 0 0
16 0 1 0
17 v2*y*sin(d1) v1*y*sin(d1) v1*v2*y*cos(d1)
18 2*v1*y-v2*y*cos(d1) -v1*y*cos(d1) v1*v2*y*sin(d1)
19 -v2*y*sin(d1) -v1*y*sin(d1) -v1*v2*y*cos(d1)
20 -v2*y*cos(d1) 2*v2*y-v1*y*cos(d1) v2*v1*y*sin(d1)
21 ];
22 Omega=inv(W)-H*inv(H’*W*H)*H’;
23 absrN=abs(r./sqrt(diag(Omega)))
24 Phi=norminv(1-0.01/2,0,1)
The reader may verify that this m-file reproduces almost verbatim the math
analysis in Illustrative Example 5.4.
ȳ12 = 1∠ − p /2
v1 =1 1 2 v2 =1
p12 =a p21 = −b
Fig. 5.2 Exercise 5.4: two-node power system and available measurements
1. k < 2n 1.
2. k D 2n 1.
3. k > 2n 1.
Is it guaranteed that the system is observable in any of the cases above? If so,
why? If not, why not?
5.4 Consider the two-node power system in Fig. 5.2. Knowing that the available
measurements are v1 , v2 , p12 , and p21 , that the angle origin is node 2, and that meter
variances are all 1, formulate the corresponding state-estimation problem.
5.5 Consider the two-node power system depicted in Fig. 5.3. Table 5.2 provides
line data. The angle origin is at node 1. Available measurements are provided in
Table 5.3.
Using these data, answer the questions below:
1. Is the system observable with the available measurements?
2. Is there any erroneous measurement? Is so, identify and eliminate it. Consider a
confidence level equal to 95%.
3. Estimate the system state.
5.6 Repeat Exercise 5.5 if the voltage measurement at node 2 is 1.20 puV.
162 5 Power System State Estimation
1 2
5.7 Repeat Exercise 5.5 for the three-node power system depicted in Fig. 5.4.
Table 5.4 provides line data. The angle origin is at node 1. Available measurements
are provided in Table 5.5.
5.8 Note that node 2 in the three-node power system analyzed in Exercise 5.7 is
a no-load node. Thus, we know with certainty that the active and reactive power
injections at this node are null, i.e., we know that p2 D 0 and q2 D 0. Repeat
Exercise 5.5 considering these two exact (virtual) measurements.
5.9 Repeat Exercise 5.5 for the four-node power system depicted in Fig. 5.5.
Table 5.6 provides line data. The angle origin is at node 1. Available measurements
are provided in Table 5.7.
References 163
Table 5.6 Exercise 5.9: line Line From node To node Series impedance
data
1 1 2 j0:01 pu
2 1 3 j0:01 pu
3 1 4 j0:01 pu
4 2 4 .0:01 C j0:01/ pu
5 3 4 .0:01 C j0:01/ pu
References
1. Abur, A., Gómez-Expósito, A.: Power System State Estimation: Theory and Implementation
CRC Press, Boca Raton, FL (2004)
2. Castillo, E., Cobo, A., Jubete F., Pruneda R.E.: Orthogonal Sets and Polar Methods in Linear
Algebra: Applications to Matrix Calculations, Systems of Equations and Inequalities, and
Linear Programming. Wiley, New York (1999)
3. CONOPT (2016). Available at www.conopt.com
4. da Silva, A.M.L., Do Coutto Filho, M.B., Cantera, J.M.C.: An efficient dynamic state
estimation algorithm including bad data processing. IEEE Trans. Power Syst. 2(4), 1050–1058
(1987)
5. GAMS (2016). Available at www.gams.com
6. GNU Octave (2016). Available at www.gnu.org/software/octave
7. Gómez-Expósito, A., Abur, A.: Foreword for the special section on synchrophasor applications
in power systems. IEEE Trans. Power Syst. 28(2), 1907–1909 (2013)
8. Gómez-Expósito, A., Conejo, A.J., Cañizares, C.: Electric Energy Systems: Analysis and
Operation. Taylor and Francis, Boca Raton, FL (2008)
9. Schweppe, F.C.: Power system static-state estimation, Part III: implementation. IEEE Trans.
Power Apparat. Syst. PAS-89(1), 130–135 (1970)
10. Schweppe, F.C., Rom, D.B.: Power system static-state estimation, Part II: approximate model.
IEEE Trans. Power Apparat. Syst. PAS-89(1), 125–130 (1970)
11. Schweppe, F.C., Wildes, J.: Power system static-state estimation, Part I: exact model. IEEE
Trans. Power Apparat. Syst. PAS-89(1), 120–125 (1970)
12. Sioshansi, R., Conejo, A.J.: Optimization in Engineering. Models and Algorithms. Springer,
New York, NY (2017)
Chapter 6
Optimal Power Flow
This chapter describes the optimal power flow problem. The objective of this
problem is to find out the active and reactive power dispatch (output) of every
generating unit in a power system that is needed to supply all loads at minimum cost,
while satisfying network and technical constraints. Particularly, voltage magnitudes
throughout the network should be at acceptable levels, and transmission-capacity
limits of all transmission lines should be satisfied. Objectives other than minimum
generation cost are also common.
6.1 Introduction
Active and reactive power demands in a power system need to be supplied both
efficiently and reliably. This is done using the available generating units and the
interconnections with neighboring power systems. In this context, the objective of
the optimal power flow (OPF) problem [1, 3] is determining the active and reactive
power needed from each generating unit to supply all demands, while satisfying
network and technical constraints.
The active and reactive power dispatch (output) of each generating unit is
generally decided with the aim of minimizing costs. However, other objectives are
also possible, e.g., minimum active power losses throughout the network.
The time frame of the OPF problem is typically several minutes prior to power
delivery. That proximity to real-time operation requires a very precise modeling
of all technical constraints governing the generation, transmission, distribution,
and supply of electricity. Such precise modeling is embedded within the OPF
constraints.
The solution of the OPF problem constitutes a snapshot of a future optimal
operating condition of the power system under study. However, since the OPF
problem is solved before power delivery, it may occur that one of the generating
units that is scheduled to provide active and reactive power becomes unavailable
due to a contingency. Thus, the solution of the OPF problem is optimal from an
economic point of view, but it might not be secure since some demands might not
be supplied if a contingency occurs.
In the above context, it is appropriate to consider the security-constrained optimal
power flow (SCOPF) problem, which is an OPF problem that includes security
constraints, so that the failure of one or several generating units, or of one or several
transmission lines does not cause any operation issue.
The remaining of this chapter is organized as follows. Section 6.2 describes
and provides the formulation of the OPF problem. This problem is extended in
Sect. 6.3, which describes and provides the formulation of the SCOPF problem.
Both problems are illustrated through a number of examples. Section 6.4 sum-
marizes the chapter and includes some references for further reading. Section 6.5
provides the GAMS codes [4] needed to solve the illustrative simple examples of
Sects. 6.2 and 6.3. Finally, Sect. 6.6 includes some exercises to further comprehend
the concepts addressed in this chapter.
6.2.1 Description
One of the key constraints of the OPF problem is the power balance (active and
reactive) at each node of the system.
6.2 Optimal Power Flow 167
On the one hand, the active power balance at any node needs to be enforced, i.e.:
X X X
pg LdP D pik ./; 8i; (6.1)
g2˝i d2i k2i
where:
• pg is the active power output of generating unit g,
• ˝i is the set of generating units located at node i,
• LdP the active power load of demand d,
• i is the set of demands located at node i,
• pik ./ is the active power flowing from node i to node k through transmission line
ik, which is a function of the voltage magnitudes, vi , vk , and the voltage angles,
ıi , ık , at nodes i and k, and
• i is the set of nodes directly connected to node i through transmission lines.
On the other hand, reactive power balance at any node needs to be imposed as
well and thus:
X X Q X
qg Ld D qik ./; 8i; (6.2)
g2˝i d2i k2i
where:
• qg is the reactive power output of generating unit g,
• LdQ is the reactive power load of demand d, and
• qik ./ is the reactive power flowing from node i to node k through transmission
line ik, which is a function of the voltage magnitudes, vi , vk , and the voltage
angles, ıi , ık , at nodes i and k.
The active power pik ./ flowing from node i to node k through transmission line ik,
as described in Chap. 4 of this book, is:
Similarly, the reactive power qik ./ flowing from node i to node k through
transmission line ik, as described in Chap. 4 of this book, is:
Any generating unit g that is online can produce active power above and below a
lower and an upper limit, respectively, i.e.:
Pmin
g pg Pmax
g ; 8g; (6.5)
where:
• Pmin
g (nonnegative) is the minimum active power output of generating unit g and
• Pmax
g is the maximum active power output of generating unit g.
For most thermal units (not nuclear ones), Pmin
g is close to 0:1 Pmax
g , while for
min
hydroelectric units Pg is close to zero.
Similarly, any generating unit g that is online can produce reactive power above and
below a lower and an upper limit, respectively, i.e.:
Qmin
g qg Qmax
g ; 8g; (6.6)
where:
• Qmin
g (nonrestricted in sign) is the minimum reactive power output of generating
unit g and
• Qmax
g is the maximum reactive power output of generating unit g.
Typically, Qmax
g Qmin g , i.e., the capacity of an electric generating unit to
produce reactive power is similar to its capacity to consume reactive power.
The apparent power (magnitude of the complex power sNik ./) flowing from node i to
node k through transmission line ik is (as described in Chap. 4 of this book):
p
sik ./ D C .pik .//2 C .qik .//2 ; 8i; 8k 2 i : (6.7)
6.2 Optimal Power Flow 169
where Sikmax if the maximum apparent power through transmission line ik.
This limit is related to the thermal capacity of the conductors of the line.
However, stability constraints may further reduce this limit.
The voltage magnitude of any node i throughout the network is bounded above and
below. Therefore:
where Vimin and Vimax are, respectively, the lower and upper limits of the voltage
magnitude at node i.
ıi ; 8i: (6.10)
Moreover, the voltage angle at the reference node is known and thus:
ıi D 0; i: ref. (6.11)
The objective of the OPF problem is to find out the active and reactive power
production of each generating unit that minimizes the overall cost and satisfies all
the constraints described in the previous sections.
It is important to note that there is no significant cost for reactive power
production or consumption. Thus, the overall cost comprises the active power
production cost of each generating unit.
If Cg is the marginal cost of active power production by generating unit g, then
the total production cost is:
X
Cg pg : (6.12)
g
170 6 Optimal Power Flow
It should be noted that a general cost function may be considered instead and
thus:
X
cg pg ; (6.13)
g
X
e.g., we may consider a quadratic cost function, i.e., CgF C CgL pg C CgQ p2g ,
g2˝
where CgF , CgL , and CgQ are the fixed, linear, and quadratic cost terms, respectively,
of the cost function of generating unit g.
6.2.2 Formulation
Considering the description in Sect. 6.2.1, the OPF problem can be formulated as:
min
X
cg .pg / (6.14a)
g
subject to
X X X
pg LdP D pik ./; 8i; (6.14b)
g2˝i d2i k2i
X X X
qg LdQ D qik ./; 8i; (6.14c)
g2˝i d2i k2i
Pmin
g pg Pmax
g ; 8g; (6.14g)
Qmin
g qg Qmax
g ; 8g; (6.14h)
Vimin vi Vimax ; 8i; (6.14i)
ıi ; 8i; (6.14j)
ıi D 0; i: ref.; (6.14k)
6.2 Optimal Power Flow 171
˚
where variables in set D vi ; ıi ; 8iI pg ; qg ; 8gI pik ; qik ; sik ; 8i; 8k 2 i are the
optimization variables of problem (6.14).
Problem (6.14) is the so-called OPF problem. Objective function (6.14a) is
the total cost. Constraints (6.14b) and (6.14c) impose the active and reactive
power balance at each node, respectively. Active and reactive power flows through
transmission lines are defined by constraints (6.14d) and (6.14e), respectively. Con-
straints (6.14f) enforce the capacity limits for transmission lines. Constraints (6.14g)
and (6.14h) limit the active and reactive power production of each generating unit,
respectively. Constraints (6.14i) and (6.14j) enforce the voltage magnitude and angle
limits at each node, respectively. Finally, constraint (6.14k) sets the voltage angle
at the reference node.
6.2.3 Solution
The OPF problem (6.14) is a nonlinear programming (NLP) problem [6], whose
solution can be obtained using one of the methods below:
1. Iterative methods, e.g., Newton methods [8].
2. NLP optimization solvers, e.g., CONOPT [2].
3. Specific software tools, e.g., Matpower [9].
For the sake of simplicity, in the remaining of this chapter we use CONOPT
under GAMS [4] to obtain the solution of OPF problem.
Illustrative Example 6.1 Optimal power flow
We consider a power network with three nodes and three transmission lines, as
the one depicted in Fig. 6.1.
Using the series impedance of transmission lines, we first compute the series
admittances in per unit and radians as follows:
1
YL12 †L12 D YL13 †L13 D YL23 †L23 D D 9:9504† 1:4711 puS:
0:01 C j0:1
0 ≤ p1 ≤ 3 0 ≤ p2 ≤ 0.8
−2 ≤ q1 ≤ 2 −2 ≤ q 2 ≤ 2
C1 = 2 Z¯ L12 = 0.01 + j 0.1 C2 = 1
max = S max = 0.25
S 12 21
max = S max = 2
S 13 max = S max = 2
S 23
31 32
¯
Z L13 = 0.01 + j 0.1 ¯
Z L23 = 0.01 + j 0.1
3 0.95 ≤ v 3 ≤ 1.10
d3 = 0
0.8 + j 0.6
5. The marginal production costs of generating units at nodes 1 and 2 are $2/puW
and $1/puW, respectively.
6. The capacity limits of transmission lines 1–2, 1–3, and 2–3 (in both directions)
are 0.25 puVA, 2 puVA, and 2 puVA, respectively.
7. The reference node is node 3 and, thus, ı3 D 0.
The OPF problem formulation is provided below.
On the one hand, the objective is to:
minp1 ;p2 ;q1 ;q2 ;v1 ;v2 ;v3 ;ı1 ;ı2 ;ı3
2p1 C 1p2 :
The capacity constraints of transmission lines in directions 1–2, 1–3, and 2–3
are, respectively:
h 2
9:9504 cos.1:4711/v12 9:9504v1 v2 cos.ı1 ı2 C 1:4711/
2 i1=2
C 9:9504 sin.1:4711/v12 9:9504v1 v2 sin.ı1 ı2 C 1:4711/ 0:25;
h 2
9:9504 cos.1:4711/v12 9:9504v1 v3 cos.ı1 ı3 C 1:4711/
2 i1=2
C 9:9504 sin.1:4711/v12 9:9504v1 v3 sin.ı1 ı3 C 1:4711/ 2;
h 2
9:9504 cos.1:4711/v22 9:9504v2 v3 cos.ı2 ı3 C 1:4711/
2 i1=2
C 9:9504 sin.1:4711/v22 9:9504v2 v3 sin.ı2 ı3 C 1:4711/ 2:
0 p1 3;
0 p2 0:8:
2 q1 2;
2 q2 2:
0:95 v1 1:10;
0:95 v2 1:10;
0:95 v3 1:10:
ı1 ;
ı2 ;
ı3 D 0:
The solution of the OPF problem in per unit (angles in radians) is provided in
Tables 6.1, 6.2, 6.3, and 6.4 (note that superscript indicates optimal value).
Table 6.1 provides the total cost, as well as the active and reactive power
outputs of generating units. As expected, most of the active power is supplied
by the generating unit at node 2, whose marginal production cost is half the
marginal production cost of the generating unit at node 1. Both generating units
are used to supply a demand of 0.8 puW and 0.6 puvar of active and reactive power,
respectively. However, the total active and reactive power outputs are 0.8052 puW
Table 6.4 Illustrative Example 6.1: complex power flows and losses
sN
12 [puVA] 0:24946688 C j0:00228492
sN
21 [puVA] 0:24998341 C j0:00288037 sN N
12 C s 21 [puVA] 5:1653 10
4
C j5:1653 103
sN
13 [puVA] 0:28037374 C j0:31863181
sN
31 [puVA] 0:27887877 j0:30368212 sN N
13 C s 31 [puVA] 0:0014950 C j0:0149497
sN
23 [puVA] 0:52428159 C j0:32792149
sN
32 [puVA] 0:52112123 j0:29631788 sN N
23 C s 32 [puVA] 0:0031604 C j0:0316036
and 0.6517 puvar, respectively. These differences are due to the active and reactive
power losses in transmission lines.
Table 6.2 provides the voltage at each node. Voltage magnitudes are in per unit,
while voltage angles are in radians. Note that the voltage magnitude at node 2 is at
its upper limit.
Table 6.3 provides the apparent power flows in each transmission line and in
both directions. All these flows are below the corresponding limits. However, the
apparent power flow of transmission line 1–2 (in direction 2–1) is at its upper limit,
which means that this line is congested.
Finally, Table 6.4 provides complex power flows and line losses.
The OPF problem in Illustrative Example 6.1 is solved using CONOPT [2] under
GAMS [4]. Two GAMS codes to solve this problem are provided in Sect. 6.5.
Illustrative Example 6.2 Impact of voltage magnitude and transmission capacity
limits on the OPF problem
If we observe the data and results of Illustrative Example 6.1, it seems logical
that the active power supplied by the generating unit at node 2 is higher than the
active power supplied by the generating unit at node 1 since the marginal cost of the
latter is twice the marginal cost of the former.
However, note that the maximum power that can be supplied by the generating
unit at node 2 is 0.8 puW, while only 0.7743 puW are supplied by that unit. This is
due to the network constraints of the power system under study. If we look at the
results of Illustrative Example 6.1, we observe that both the voltage magnitude at
node 2 and the apparent power flow in transmission line 1–2 (in direction 2–1) are
at their upper limits. This prevents the cheap generating unit at node 2 to be used at
capacity.
176 6 Optimal Power Flow
To verify this, we relax these two limits and consider that the upper bound for
voltage magnitudes at every node is 1.2 puV, while the capacity of transmission line
1–2 in both directions is considered to be 2 puVA.
The solution of the OPF problem in both cases (with original and relaxed limits)
are provided in Tables 6.5, 6.6, and 6.7.
Table 6.5 provides the total cost, as well as the active and reactive power outputs
of the generating units. By relaxing the voltage magnitude and apparent power
limits, the active power output of the generating unit at node 2 is at its upper limit
(0.8 puW). This translates into a 3.27% reduction of the total cost.
Table 6.6 provides the voltage at each node. Note that if voltage magnitude and
apparent power limits are relaxed, the voltage magnitude at all nodes is above its
original limit, which was 1.1 puV.
Finally, Table 6.7 provides the apparent power flows in each transmission line
and in both directions. Note that by considering the relaxed limits, the apparent
power flow in transmission line 1–2 (in both directions) is above its original limit,
which was 0.25 puVA.
6.2 Optimal Power Flow 177
6.2.4 dc Formulation
The OPF problem (6.14) formulated in the previous section is an NLP problem.
Solving it may require a very large computation time in power systems with a large
number of nodes and transmission lines.
For off-line analysis, it might be possible to use a dc formulation of the power
flow problem. However, note that the solution of this linearized problem is only
approximate and does not guarantee that all technical constraints are satisfied.
As explained in Sect. 4.10 of Chap. 4 of this book, the approximations considered
in the dc power flow are threefold:
1. Voltage magnitudes are equal to 1 in per unit.
2. Resistances are neglected.
3. Voltage angle differences across lines are considered to be small.
These assumptions allow formulating the linearized OPF problem as the follow-
ing linear programming (LP) problem:
min
X
cg .pg / (6.15a)
g
subject to
X X X
pg LdP D pik ./; 8i; (6.15b)
g2˝i d2i k2i
ıi ı k
pik ./ D ; 8i; 8k 2 i ; (6.15c)
Xik
pik ./ Pmax
ik ; 8i; 8k 2 i ; (6.15d)
Pmin
g pg Pmax
g ; 8g; (6.15e)
ıi ; 8i; (6.15f)
ıi D 0 i: ref.; (6.15g)
where:
• Xik is the reactance of transmission line ik,
• Pmax
ik is the maximum active power flow through transmission line ik, and
• variables in set D fpg ; 8gI pik ./; 8i; 8k 2 i I ıi ; 8ig are the optimization
variables of problem (6.15).
Problem (6.15) is a dc OPF problem. The objective function (6.15a) is the
total production cost. Constraints (6.15b) impose the active power balance at
each node of the system. The active power flows through transmission lines are
defined by constraints (6.15c) and limited by the corresponding capacity limits by
178 6 Optimal Power Flow
constraints (6.15d). Constraints (6.15e) impose lower and upper limits on the power
outputs of generating units. Finally, constraints (6.15f) and (6.15g) impose bounds
on voltage angles and fix to 0 the voltage angle at the reference node, respectively.
It is relevant to note that using model (6.15), pik D pki since losses are ignored.
Moreover, no constraints can be enforced on voltage magnitudes, apparent power
flows, or reactive power generation. Hence, the outcome of this model might not be
realizable in practice.
Illustrative Example 6.3 dc OPF problem
We consider again the data of Illustrative Example 6.1. However, in this case, we
solve a dc OPF problem.
Considering the assumptions of the dc OPF problem, the formulation is as
follows:
minp1 ;p2 ;ı1 ;ı2 ;ı3
2p1 C 1p2
subject to
ı1 ı 2 ı 1 ı3
p1 D C ;
0:1 0:1
ı2 ı 1 ı 2 ı3
p2 D C ;
0:1 0:1
ı3 ı1 ı3 ı2
0:8 D C ;
0:1 0:1
ı1 ı 2
0:25;
0:1
ı1 ı3
2;
0:1
ı2 ı3
2;
0:1
ı2 ı1
0:25;
0:1
ı3 ı1
2;
0:1
ı3 ı2
2;
0:1
0 p1 3;
0 p2 0:8;
ı1 ;
6.3 Security-Constrained Optimal Power Flow 179
ı2 ;
ı3 D 0:
The solution of the dc OPF problem and its comparison with the solution of the
ac OPF problem solved in Illustrative Example 6.1 are provided in Tables 6.8 and
6.9.
Table 6.8 provides the total cost and the active power outputs of the generating
units. Solutions of both problems are similar. However, the total power output in the
dc OPF problem is lower than that in the ac OPF problem. This is so because in the
dc OPF problem, resistances are not considered, and thus active power losses are
null.
Table 6.9 provides the active power flows through transmission lines. Solutions
of both problems are also similar in this case.
The OPF problem in Illustrative Example 6.3 is solved using CPLEX [7] under
GAMS [4].
A GAMS code to solve this problem is provided in Sect. 6.5.
The OPF problem analyzed in the previous section is extended in this section by
including security constraints. The resulting problem is known as the security-
constrained optimal power flow (SCOPF), i.e., an OPF problem with security
constraints.
180 6 Optimal Power Flow
6.3.1 Description
The output of the OPF problem analyzed in the previous section provides the
operating condition of the system that minimizes total production cost and meets
all the technical and network constraints. This solution is economically optimal;
however, it is generally not secure. For example, if we consider the solution of
the OPF problem and assume that a transmission line is unavailable due to a
contingency, the output from the OPF problem may no longer be feasible.
To deal with this issue, the SCOPF problem seeks to identify an operating
condition that renders minimum operating cost, but that is also secure with respect
to a prespecified set of contingencies, i.e., of component failures.
Typical contingencies include the failure of a transmission line or of a generating
unit. Multiple-element contingencies are also possible, including the failure of
one or more transmission lines, and/or of one or more generating units. In this
sense, if we ensure security for any contingency involving just one element (either
transmission line or generating unit), we say that the operation state of the system
is n 1 secure. If, on the other hand, we ensure that the system operation state is
secure for any contingency involving at most k elements, we say that the operation
state of the system is n k secure.
This security enforcement can be done either in a preventive or in a corrective
manner. The preventive approach ensures that the system operates without limit
violations (including transmission line capacity and voltage level) after the contin-
gency. On the other hand, the corrective approach ensures that, after the contingency,
the system can transition to another feasible operating condition without limit
violations.
For the sake of simplicity, we adopt below a corrective approach, which is
generally more economical than a preventive approach. However, a preventive
approach can be implemented similarly.
6.3.2 Formulation
subject to
X X X
pg LdP D pik ./; 8i; (6.16b)
g2˝i d2i k2i
X X X
qg LdQ D qik ./; 8i; (6.16c)
g2˝i d2i k2i
6.3 Security-Constrained Optimal Power Flow 181
Pmin
g pg Pmax
g ; 8g; (6.16g)
Qmin
g qg Qmax
g ; 8g; (6.16h)
Vimin vi Vimax ; 8i; (6.16i)
ıi ; 8i; (6.16j)
ıi D 0; i: ref.; (6.16k)
X X X
pg! LdP D pik! ./; 8i; 8!; (6.16l)
g2˝i d2i k2i
X X X
qg! LdQ D qik! ./; 8i; 8!; (6.16m)
g2˝i d2i k2i
2
pik! ./ D vi! YLik cos.Lik / vi! vk! YLik cos.ıi! ık! Lik /
1 2
C vi! YSik cos.Sik /; 8i; 8k 2 i ; 8!; (6.16n)
2
2
qik! ./ D vi! YLik sin.Lik / vi! vk! YLik sin.ıi! ık! Lik /
1 2
vi! YSik sin.Sik /; 8i; 8k 2 i ; 8!; (6.16o)
2
q
C .pik! .//2 C .qik! .//2 Sik!
max
; 8i; 8k 2 i ; 8!; (6.16p)
g! pg! Pg! ;
Pmin 8g; 8!;
max
(6.16q)
g! qg! Qg! ;
Qmin 8g; 8!;
max
(6.16r)
Vimin vi! Vimax ; 8i; 8!; (6.16s)
ıi! ; 8i; 8!; (6.16t)
ıi! D 0; i: ref.; 8!; (6.16u)
pg! pg Rg ; 8g; 8!; (6.16v)
pg pg! Rg ; 8g; 8!; (6.16w)
182 6 Optimal Power Flow
where variables in sets D fvi ; ıi ; 8iI pg ; qg ; 8gI pik ; qik ; sik ; 8i; 8k 2 i g
and ! D fvi! ; ıi! ; 8iI pg! , qg! ; 8gI pik! ; qik! ; sik! ; 8i; 8k 2 i g, 8!, are the
optimization variables of the SCOPF problem (6.16).
Equation (6.16a) is the objective function of the SCOPF problem and rep-
resents total production cost. This problem includes three sets of constraints,
namely (6.16b)–(6.16k), (6.16l)–(6.16u), and (6.16v) and (6.16w).
Constraints (6.16b)–(6.16k) are the conventional constraints of the OPF problem.
Note that these constraints are identical to those considered in the OPF prob-
lem (6.14b)–(6.14k).
Constraints (6.16l)–(6.16u) are OPF constraints per contingency !. These
constraints ensures that if contingency ! occurs, then there is a feasible system
operating condition. Note that constraints (6.16l)–(6.16u) are similar to con-
straints (6.14b)–(6.14k) but including subscript !.
Finally, constraints (6.16v) and (6.16w) are coupling conditions (ramping limits)
liking pre- and post-contingency operating conditions. Note that Rg is the active
power up-/down-ramp limit of generating unit g.
Illustrative Example 6.4 Security-constrained optimal power flow
A single-contingency SCOPF example is provided below. We consider Illus-
trative Example 6.1 and impose corrective protection against a contingency that
reduces the capacity of transmission line 2–3 to 0:4 puVA. The ramp limits of
generating units at nodes 1 and 2 are 3 puW and 0.2 puW, respectively.
The formulation of the SCOPF problem includes all the constraints considered in
Illustrative Example 6.1 and some additional constraints that allow considering the
contingency in transmission line 2–3. Thus, the formulation of this SCOPF problem
is as follows:
min
2p1 C 1p2
subject to
2
9:9504 sin.1:4711/v1! 9:9504v1! v3! sin.ı1! ı3! C 1:4711/;
2
q2! D 9:9504 sin.1:4711/v2! 9:9504v2! v1! sin.ı2! ı1! C 1:4711/
2
9:9504 sin.1:4711/v2! 9:9504v2! v3! sin.ı2! ı3! C 1:4711/;
2
0:6 D 9:9504 sin.1:4711/v3! 9:9504v3! v1! sin.0 ı1! C 1:4711/
2
9:9504 sin.1:4711/v3! 9:9504v3! v2! sin.0 ı2! C 1:4711/;
h 2
2
9:9504 cos.1:4711/v1! 9:9504v1! v2! cos.ı1! ı2! C 1:4711/
2
2 i1=2
C 9:9504 sin.1:4711/v1! 9:9504v1! v2! sin.ı1! ı2! C1:4711/ 0:25;
h 2
2
9:9504 cos.1:4711/v1! 9:9504v1! v3! cos.ı1! ı3! C 1:4711/
2
2 i1=2
C 9:9504 sin.1:4711/v1! 9:9504v1! v3! sin.ı1! ı3! C 1:4711/ 2;
h 2
2
9:9504 cos.1:4711/v2! 9:9504v2! v3! cos.ı2! ı3! C 1:4711/
2
2 i1=2
C 9:9504 sin.1:4711/v2! 9:9504v2! v3! sin.ı2! ı3! C1:4711/ 0:4;
h 2
2
9:9504 cos.1:4711/v2! 9:9504v2! v1! cos.ı2! ı1! C 1:4711/
2
2 i1=2
C 9:9504 sin.1:4711/v2! 9:9504v2! v1! sin.ı2! ı1! C1:4711/ 0:25;
h 2
2
9:9504 cos.1:4711/v3! 9:9504v3! v1! cos.0 ı1! C 1:4711/
2
2 i1=2
C 9:9504 sin.1:4711/v3! 9:9504v3! v1! sin.ı3! ı1! C 1:4711/ 2;
h 2
2
9:9504 cos.1:4711/v3! 9:9504v3! v2! cos.ı3! ı2! C 1:4711/
2
2 i1=2
C 9:9504 sin.1:4711/v3! 9:9504v3! v2! sin.ı3! ı2! C1:4711/ 0:4;
ı1! ;
ı2! ;
ı3! D 0;
p1! p1 3;
p1 p1! 3;
p2! p2 0:2;
p2 p2! 0:2;
where the set D fp1 , p2 , q1 , q2 , v1 , v2 , v3 , ı1 , ı2 , p1! , p2! , q1! , q2! , v1! , v2! ,
v3! , ı1! , ı2! , ı3! g includes the optimization variables of the considered SCOPF
problem.
Results of the SCOPF problem and its comparison with the results of the OPF
problem in Illustrative Example 6.1 are provided in Tables 6.10, 6.11, and 6.12.
Table 6.10 provides the total cost, as well as the active and reactive power outputs
of the generating units. These results verify that enforcing security constraints
results in a different operating condition. The resulting optimal cost is higher than
that without security enforcement, but protection is in place. We observe that the
expensive generating unit at node 1 picks a higher share of the load.
Table 6.11 provides the voltage magnitude at each node. Note that in this case
the results of the OPF and the SCOPF problems are rather similar.
6.5 GAMS Codes 185
Finally, Table 6.12 provides the apparent power flows in each transmission line
and in both directions. Note that, considering the SCOPF problem, transmission line
1–2 becomes slightly loaded.
An input GAMS [4] file to solve the SCOPF problem with a single contingency
(as the one in Illustrative Example 6.4 above) is provided in Sect. 6.5.4.
This chapter describes and analyzes the OPF and SCOPF problems.
On the one hand, the OPF problem allows determining the active and reactive
power outputs of each generating unit that are needed to supply all demands in
a power system with a desired objective (e.g., minimum production cost) but, at
the same time, enforcing operation limits of both the generation and transmission
systems.
On the other hand, a SCOPF problem is an OPF problem with constraints
ensuring an appropriate functioning of the system even if contingencies occur.
Security is generally enforced in a corrective, not preventive, manner.
The OPF and SCOPF problems are important tools in any power system control
center. Particularly, the SCOPF problem ensures a secure operation minutes prior to
power delivery.
Additional details regarding the OPF and the SCOPF problems is provided in the
monograph by Gómez-Expósito et al. [5] and in that by Wood et al. [8].
This section includes different GAMS [4] codes to solve the illustrative examples
in Sects. 6.2 and 6.3 namely:
1. Two GAMS codes to solve the OPF problem in Illustrative Example 6.1: (1) a
simple code that is only valid for the system and data considered in Illustrative
Example 6.1 and (2) a rather general code that can be readily used for any power
system.
2. A GAMS code to solve the dc OPF problem in Illustrative Example 6.3.
3. A GAMS code to solve the SCOPF problem in Illustrative Example 6.4.
186 6 Optimal Power Flow
A simple input GAMS [4] file to solve the OPF problem in Illustrative Example 6.1
is provided below:
1 parameters
2 yl / 9.95037190209989/
3 al / -1.47112767430373/;
4 variables
5 z, p1, p2, q1, q2, v1, v2, v3, d1, d2;
6 p1.lo = 0; p2.lo = 0;
7 p1.up = 3; p2.up = 0.8;
8 q1.lo = -2; q2.lo = -2;
9 q1.up = 2; q2.up = 2;
10 v1.lo = .95; v2.lo = .95; v3.lo = .95;
11 v1.up = 1.1; v2.up = 1.1; v3.up = 1.1;
12 d1.lo = -pi; d2.lo = -pi;
13 d1.up = pi; d2.up = pi;
14 v1.l=1; v2.l=1; v3.l=1;
15 d1.l=0; d2.l=0;
16 equations
17 of, bp1, bp2, bp3, bq1, bq2, bq3, l12, l21, l13, l31, l23, l32;
18 of.. z =e= 2*p1 + p2;
19 bp1.. p1 =e= yl*cos(al)*(v1)**2-yl*v1*v2*cos(d1-d2-al)+
20 yl*cos(al)*(v1)**2-yl*v1*v3*cos(d1- 0-al);
21 bp2.. p2 =e= yl*cos(al)*(v2)**2-yl*v2*v1*cos(d2-d1-al)+
22 yl*cos(al)*(v2)**2-yl*v2*v3*cos(d2- 0-al);
23 bp3.. -0.8 =e= yl*cos(al)*(v3)**2-yl*v3*v1*cos( 0-d1-al)+
24 yl*cos(al)*(v3)**2-yl*v3*v2*cos( 0-d2-al);
25 bq1.. q1 =e= -yl*sin(al)*(v1)**2-yl*v1*v2*sin(d1-d2-al)-
26 yl*sin(al)*(v1)**2-yl*v1*v3*sin(d1- 0-al);
27 bq2.. q2 =e= -yl*sin(al)*(v2)**2-yl*v2*v1*sin(d2-d1-al)-
28 yl*sin(al)*(v2)**2-yl*v2*v3*sin(d2- 0-al);
29 bq3.. -0.6 =e= -yl*sin(al)*(v3)**2-yl*v3*v1*sin( 0-d1-al)-
30 yl*sin(al)*(v3)**2-yl*v3*v2*sin( 0-d2-al);
31 l12.. sqrt(sqr(yl*cos(al)*(v1)**2-yl*v1*v2*cos(d1-d2-al))+
32 sqr(-yl*sin(al)*(v1)**2-yl*v1*v2*sin(d1-d2-al))) =l=
0.25;
33 l21.. sqrt(sqr(yl*cos(al)*(v2)**2-yl*v2*v1*cos(d2-d1-al))+
34 sqr(-yl*sin(al)*(v2)**2-yl*v2*v1*sin(d2-d1-al))) =l=
0.25;
35 l13.. sqrt(sqr(yl*cos(al)*(v1)**2-yl*v1*v3*cos(d1- 0-al))+
36 sqr(-yl*sin(al)*(v1)**2-yl*v1*v3*sin(d1- 0-al))) =l=
2;
37 l31.. sqrt(sqr(yl*cos(al)*(v3)**2-yl*v3*v1*cos( 0-d1-al))+
38 sqr(-yl*sin(al)*(v3)**2-yl*v3*v1*sin( 0-d1-al))) =l=
2;
39 l23.. sqrt(sqr(yl*cos(al)*(v2)**2-yl*v2*v3*cos(d2- 0-al))+
40 sqr(-yl*sin(al)*(v2)**2-yl*v2*v3*sin(d2- 0-al))) =l=
2;
41 l32.. sqrt(sqr(yl*cos(al)*(v3)**2-yl*v3*v2*cos( 0-d2-al))+
42 sqr(-yl*sin(al)*(v3)**2-yl*v3*v2*sin( 0-d2-al))) =l=
2;
6.5 GAMS Codes 187
This GAMS code above follows almost verbatim the mathematical formulation
of the OPF problem in Sect. 6.2.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 46 VARIABLE z.L = 0.83607872
2 VARIABLE p1.L = 0.03090686
3 VARIABLE p2.L = 0.77426500
4 VARIABLE q1.L = 0.32091674
5 VARIABLE q2.L = 0.33080185
6 VARIABLE v1.L = 1.09770030
7 VARIABLE v2.L = 1.10000000
8 VARIABLE v3.L = 1.06635924
9 VARIABLE d1.L = 0.02123196
10 VARIABLE d2.L = 0.04191265
11 EQUATION l12.L = 0.24947734
12 EQUATION l21.L = 0.25000000
13 EQUATION l13.L = 0.42442392
14 EQUATION l31.L = 0.41230595
15 EQUATION l23.L = 0.61838798
16 EQUATION l32.L = 0.59947612
A rather general input GAMS [4] file to solve the OPF problem in Illustrative
Example 6.1 is provided below. It is relevant to note that any number of nodes,
generating units, transmission lines, and demands can be considered if this GAMS
code is used.
1 $title opf
2 set
3 g index of units /g1*g2/
4 n index of nodes /n1*n3/
5 g2n(g,n) units to nodes /g1.n1,g2.n2/;
6 alias(n,np);
7 table Gdat(g,*) unit data
8 Pmin Pmax Qmin Qmax Cost
9 g1 0.0 3.0 -2.0 2.0 2
10 g2 0.0 0.8 -2.0 2.0 1;
11 table Ndat(n,*) node data
12 Vmin Vmax Pd Qd
13 n1 0.95 1.10 0.0 0.0
188 6 Optimal Power Flow
The part of the GAMS output file that provides the optimal solution is given
below:
A simple input GAMS [4] file to solve the dc OPF problem in Illustrative
Example 6.3 is provided below:
1 parameters
2 x / 0.1/;
3 variables
4 z, p1, p2, d1, d2;
5 p1.lo = 0; p2.lo = 0;
6 p1.up = 3; p2.up = 0.8;
7 d1.lo = -pi; d2.lo = -pi;
8 d1.up = pi; d2.up = pi;
9 d1.l=0; d2.l=0;
10 equations
11 of, bp1, bp2, bp3, p12, p21, p13, p31, p23, p32;
190 6 Optimal Power Flow
Note that this GAMS code reproduces almost verbatim the mathematical formu-
lation of the OPF problem in Illustrative Example 6.3.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 25 VARIABLE z.L = 0.82500000
2 VARIABLE p1.L = 0.02500000
3 VARIABLE p2.L = 0.77500000
4 VARIABLE d1.L = 0.02750000
5 VARIABLE d2.L = 0.05250000
6 EQUATION p12.L = -0.25000000
7 EQUATION p21.L = 0.25000000
8 EQUATION p13.L = 0.27500000
9 EQUATION p31.L = -0.27500000
10 EQUATION p23.L = 0.52500000
11 EQUATION p32.L = -0.52500000
An input GAMS [4] file to solve the SCOPF problem in Illustrative Example 6.4,
i.e., a SCOPF problem with a single contingency, is provided below. This code
admits any number of nodes, demands, transmission lines, and generating units, but,
for simplicity, it considers a single contingency involving just transmission lines.
1 $title scopf
2 set
3 g index of units /g1*g2/
4 n index of nodes /n1*n3/
5 g2n(g,n) units to nodes /g1.n1,g2.n2/;
6 alias(n,np);
7 table Gdat(g,*) unit data
8 Pmin Pmax Qmin Qmax Cost Ramp
9 g1 0.0 3.0 -2.0 2.0 2 3
6.5 GAMS Codes 191
63 qc.lo(g)=Gdat(g,’Qmin’);
64 qc.up(g)=Gdat(g,’Qmax’);
65 vc.lo(n)=Ndat(n,’Vmin’);
66 vc.up(n)=Ndat(n,’Vmax’);
67 dc.lo(n)=-pi;
68 dc.up(n)= pi;
69 dc.fx(’n3’)=0;
70 equations
71 cost objective function
72 Pfcal(n,np) P flow calculation
73 Qfcal(n,np) Q flow calculation
74 Pbal(n) P node balance
75 Qbal(n) Q node balance
76 Slim(n,np) S flow limit
77 Pfcalc(n,np) P flow calculation under contingency
78 Qfcalc(n,np) Q flow calculation under contingency
79 Pbalc(n) P node balance under contingency
80 Qbalc(n) Q node balance under contingency
81 Slimc(n,np) S flow limit under contingency
82 changep(g) change in P calculation
83 changeq(g) change in Q calculation
84 pchlimup(g) ramping up limit
85 pchlimdw(g) ramping down limit;
86 Pfcal(n,np)..pf(n,np)=e=
87 v(n)**2*Ldat(n,np,’yl’)*cos(-Ldat(n,np,’thel’))-
88 v(n)*v(np)*Ldat(n,np,’yl’)*cos(d(n)-d(np)-Ldat(n,np,’thel’))+
89 (1/2)*v(n)**2*Ldat(n,np,’yshalf’)*cos(-Ldat(n,np,’thes’));
90 Qfcal(n,np)..qf(n,np)=e=
91 v(n)**2*Ldat(n,np,’yl’)*sin(-Ldat(n,np,’thel’))-
92 v(n)*v(np)*Ldat(n,np,’yl’)*sin(d(n)-d(np)-Ldat(n,np,’thel’))+
93 (1/2)*v(n)**2*Ldat(n,np,’yshalf’)*sin(-Ldat(n,np,’thes’));
94 Pfcalc(n,np)..pfc(n,np)=e=
95 vc(n)**2*Ldatc(n,np,’yl’)*cos(-Ldatc(n,np,’thel’))-
96 vc(n)*vc(np)*Ldatc(n,np,’yl’)*cos(dc(n)-dc(np)-Ldatc(n,np,’
thel’))+
97 (1/2)*vc(n)**2*Ldatc(n,np,’yshalf’)*cos(-Ldatc(n,np,’thes’));
98 Qfcalc(n,np)..qfc(n,np)=e=
99 vc(n)**2*Ldatc(n,np,’yl’)*sin(-Ldatc(n,np,’thel’))-
100 vc(n)*vc(np)*Ldatc(n,np,’yl’)*sin(dc(n)-dc(np)-Ldatc(n,np,’
thel’))+
101 (1/2)*vc(n)**2*Ldatc(n,np,’yshalf’)*sin(-Ldatc(n,np,’thes’));
102 cost.. z =e= sum(g,Gdat(g,’cost’)*p(g));
103 Pbal(n).. sum(g$g2n(g,n),p(g))-Ndat(n,’Pd’)=e=sum(np,pf(n,np));
104 Qbal(n).. sum(g$g2n(g,n),q(g))-Ndat(n,’Qd’)=e=sum(np,qf(n,np));
105 Slim(n,np).. sqrt(power(pf(n,np),2)+power(qf(n,np),2))=l=Ldat(n,
np,’cap’);
106 Pbalc(n).. sum(g$g2n(g,n),pc(g))-Ndat(n,’Pd’)=e=sum(np,pfc(n,np))
;
107 Qbalc(n).. sum(g$g2n(g,n),qc(g))-Ndat(n,’Qd’)=e=sum(np,qfc(n,np))
;
108 Slimc(n,np).. sqrt(power(pfc(n,np),2)+power(qfc(n,np),2))=l=Ldatc
(n,np,’cap’);
109 changep(g).. cp(g) =e= pc(g)-p(g);
110 changeq(g).. cq(g) =e= qc(g)-q(g);
6.5 GAMS Codes 193
Note that this GAMS code reproduces almost verbatim the mathematical formu-
lation of the SCOPF problem in Illustrative Example 6.4.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 116 VARIABLE p.L unit g P generation
2 g1 0.38321178, g2 0.42117706
3 ---- 116 VARIABLE q.L unit g Q generation
4 g1 0.32364526, g2 0.32024311
5 ---- 116 VARIABLE v.L node n voltage magnitude
6 n1 1.10000000, n2 1.10000000, n3 1.06760682
7 ---- 116 VARIABLE d.L node n angle
8 n1 0.03097860, n2 0.03204448
9 ---- 116 VARIABLE pf.L P flow per line
10 n1 n2 n3
11 n1 -0.01276879 0.39598057
12 n2 0.01277016 0.40840690
13 n3 -0.39382588 -0.40617412
14 ---- 116 VARIABLE qf.L Q flow per line
15 n1 n2 n3
16 n1 0.00128375 0.32236151
17 n2 -0.00127014 0.32151325
18 n3 -0.30081460 -0.29918540
19 ---- 116 VARIABLE pc.L unit g P generation under contingency
20 g1 0.58407515, g2 0.22117706
21 ---- 116 VARIABLE qc.L unit g Q generation under contingency
22 g1 0.65651618, g2 -0.00399412
23 ---- 116 VARIABLE vc.L node n voltage magnitude under
contingency
24 n1 1.10000000, n2 1.07898824, n3 1.05674798
25 ---- 116 VARIABLE dc.L node n angle under contingency
26 n1 0.03621330, n2 0.02799306
27 ---- 116 VARIABLE pfc.L P flow per line under contingency
28 n1 n2 n3
29 n1 0.11952171 0.46455344
30 n2 -0.11900518 0.34018224
31 n3 -0.46119208 -0.33880792
32 ---- 116 VARIABLE qfc.L Q flow per line under contingency
33 n1 n2 n3
34 n1 0.21957814 0.43693804
35 n2 -0.21441285 0.21041873
36 n3 -0.40332442 -0.19667558
37 ---- 116 VARIABLE cp.L change in p due to contingency
38 g1 0.20086337, g2 -0.20000000
194 6 Optimal Power Flow
0 £ p1 £ 3 0 £ p 2 £ 0.8
-2 £ q 1 £ 2 -2 £ q 2 £ 2
C1 = 2 Z̄ L12a = 0.01 + j 0.1 C2 = 1
max = S max = 0.25
S 12a 21a
0 £ p1 £ 2 0 £ p2 £ 4
- 2 £ q1 £ 2 - 4 £ q2 £ 4
C1 = 2 C2 = 4 3+ j2
0.90 £ v i £ 1.10
1 2 3 i = 1, 2, 3
Z̄ L12 = j 0.2 Z̄ L23 = 0.01 + j 0.1 d2=0
max = S max = 2 max = S max = 5
S 23
S 12 21 32
3 4
0.95 ≤ v i ≤ 1.10
i = 1, 2, 3, 4
d1 = 0
1 2
.5 + j 1
2+ j 1
0 ≤ p1 ≤ 4
−4 ≤ q 1 ≤ 4
C1 = 1
References
1. Carpentier, J.: Contribution à l’étude du dispatching économique (in French). Bull. Soc. Fr.
Elect. 8(3), 431-447 (1962)
2. CONOPT. Available at www.conopt.com (2016)
3. Dommel, H.W., Tinney, W.F.: Optimal power flow solutions. IEEE Trans. Power Apparatus Syst.
PAS-87(10), 1866-1876 (1968)
4. GAMS. Available at www.gams.com (2016)
5. Gómez-Expósito, A., Conejo, A.J., Cañizares, C.: Electric Energy Systems: Analysis and
Operation. Taylor and Francis, Boca Raton (2008)
6. Sioshansi, R., Conejo, A.J.: Optimization in Engineering. Models and Algorithms. Springer,
New York (2017)
7. The ILOG CPLEX. Available at www.ilog.com/products/cplex/ (2016)
8. Wood, A.J., Wollenberg, B.F., Sheblé, G.B.: Power Generation, Operation, and Control, 3rd edn.
Wiley, New York (2013)
9. Zimmerman, R.D., Murillo-Sánchez, C.E., Thomas R.J.: MATPOWER: steady-state operations,
planning and analysis tools for power systems research and education. IEEE Trans. Power Syst.
26(1), 12-19 (2011)
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)
Chapter 8
Self-Scheduling and Market Clearing Auction
This chapter describes two relevant problems for the economic management of
power systems, namely (1) the self-scheduling problem of an electricity producer
that owns several electricity generating units and use them to sell energy in an
electricity market pursuing maximum profit and (2) the market clearing auction to
be used by a market operator to clear the electricity market. These problems are
specifically relevant in western European electricity markets, not in USA electricity
markets.
8.1 Introduction
There are two main groups of agents in any power system, namely power producers
and power consumers. Power producers own electricity generating units and are
responsible for supplying the electric energy demanded by power consumers. In
this sense, it is important to note that power producers are generally profit-oriented
private entities, i.e., they decide how much electric energy to sell in order to
maximize their respective profits. In this context, we define the self-scheduling
problem. This problem is solved by each electricity producer to determine the
production of its own generating units with the aim of maximizing its profit while
complying with the technical constraints of these units.
Each power producer uses the outputs of the self-scheduling problem to decide
its production offers per generating unit in the electricity market. These offering
decisions define, for a given market price, the electric energy that a power producer
is willing to generate.
Similarly, each power consumer decides its consumption bids per demand in
the market. In this case, bidding decisions determine, for a given market price, the
electric energy that a power consumer is willing to consume.
Then, using both the production offers of the power producers and the consump-
tion bids of the power consumers, an independent agent, which is usually referred
to as the market operator, clears the market. In this process, using a market clearing
auction, the market operator determines which offers from power producers and
which bids from power consumers to accept. That is, the market operator determines
the electric energy to be provided by each power producer and the electric energy
to be consumed by each consumer. Moreover, the market operator also determines
the market price, i.e., the price to be paid to/paid by power producers/consumers for
producing/consuming electric energy.
The market outputs, i.e., the power schedules and market prices, are generally
determined with the purpose of maximizing a welfare measure, e.g., minimizing
generation costs.
These two problems, namely, the self-scheduling and the market clearing
problems, are relevant in electricity markets in western Europe, not in the USA.
In the USA, the economic management of electricity markets is generally based on
the unit commitment problem as explained in Chap. 7 of this book.
The remaining of this chapter is organized as follows. Section 8.2 describes and
formulates the self-scheduling problem of a power producer. Section 8.3 describes
different market clearing auctions. Both Sects. 8.2 and 8.3 include a number
of clarifying examples. Section 8.4 summarizes the chapter and suggests some
references for further study. The GAMS [5] codes used to solve some of the
examples in Sects. 8.2 and 8.3 are provided in Sect. 8.5. Finally, Sect. 8.6 provides
some exercises to further comprehend the concepts described in this chapter.
8.2 Self-Scheduling
8.2.1 Description
The outputs of the self-scheduling problem are then used by the power producer
to decide its offering strategy in the electricity market. The offering strategy of a
power producer sets the energy that the power producer is willing to supply for a
given market price.
Thermal generating units are generally not coupled among each other (the
functioning of a given generating unit does not influence the functioning of others).
Thus, the self-scheduling problem of a thermal power producer decomposes by
generating unit. That is, each thermal unit can be self-scheduled independently of
other thermal generating units.
This is not the case of hydro power units located along a river basin that share a
common and scarce resource: water. This case is not considered in this chapter for
the sake of simplicity.
It is important to note that generating units cannot be decoupled either if the
power producer intends to manipulate the market clearing prices to its own benefit.
Again, for simplicity, we do not consider in this chapter this market power case. The
interested reader is referred to [4] for further details.
Generally, each power producer in an electricity market owns a number of
generating units. However, for the sake of clarity, in the following we consider that
each producer owns a single generating unit.
8.2.2 Notation
The main notation used to formulate the self-scheduling problem is described below.
8.2.2.1 Indexes
• zgt is a binary variable used to indicate the shut-down of generating unit g at time
period t. It is equal to 1 if generating unit g is shut-down at the beginning of time
period t and equal to 0 otherwise.
8.2.2.3 Constants
8.2.3 Formulation
subject to
ugt Pmin
g pgt ugt Pmax
g ; 8t; (8.1b)
pgt pg;t1 RU
g ug;t1 C Rg ygt ;
SU
8t; (8.1c)
pg;t1 pgt RD
g ugt C Rg zgt ;
SD
8t; (8.1d)
ygt zgt D ugt ug;t1 ; 8t; (8.1e)
ygt C zgt 1; 8t; (8.1f)
ugt ; ygt ; zgt 2 f0; 1g; 8t: (8.1g)
8.2 Self-Scheduling 237
The objective function, Eq. (8.1a), is the profit achieved by the power producer
using generating unit g throughout the planning horizon. This profit, to be maxi-
mized, includes two terms, namely:
X
1. term t pgt that represents the selling revenues and
Xt
V
2. term Cg pgt C CgF ugt C CgSU ygt C CgSD zgt that represents the total costs, i.e.,
t
variable, online, start-up, and shut-down costs.
Equations (8.1b)–(8.1g) represent the technical constraints of generating unit
g and constitute the constraints of the self-scheduling problem. At each time
period, constraints (8.1b) enforce the minimum power output and the capacity,
constraints (8.1c) enforce ramping-up and start-up ramping limits, constraints (8.1d)
enforce ramping-down and shut-down ramping limits, constraints (8.1e)–(8.1f)
ensure the online, start-up, and shut-down sequence logic, and, finally, con-
straints (8.1g) are binary variable declarations.
Constraints (8.1b)–(8.1g) are very similar to those considered and described in
Sect. 7.2 of Chap. 7 of this book. This section was devoted to the unit commitment
(UC) problem. Note that the UC problem is solved by a central entity that determines
the scheduling of each generating unit with the aim of minimizing total costs
while supplying the demand and complying with the technical requirements of
the generating units. However, the self-scheduling problem is solved by a power
producer to determine the scheduling of its own generating units with the aim of
maximizing its own profit while complying with the technical constraints of its
generating units.
The self-scheduling problem (8.1) is a mixed-integer linear programming
(MILP) problem [9]. As explained in Appendix B of this book, MILP problems
can be solved using commercially available branch-and-cut solvers.
For the sake of simplicity, we do not include all technical constraints in the
self-scheduling problem (8.1). For example, the minimum on/off times of thermal
generating units, which are not considered in problem (8.1), may be included as
explained in [1].
Illustrative Example 8.1 Self-scheduling
We consider a power producer that owns one thermal generating unit with the
technical and economic data provided in Table 8.1.
This power producer solves the self-scheduling problem for its generating unit
and for a 6-h planning horizon divided into hourly time steps. The forecast market
prices for these 6 h are provided in Table 8.2.
Considering these data, we formulate below the self-scheduling problem of the
generating unit owned by the considered power producer.
First, the objective function to be maximized is:
3p11 .5p11 C u11 C 20y11 C 10z11 / C 5p12 .5p12 C u12 C 20y12 C 10z12 /
C6p13 .5p13 C u13 C 20y13 C 10z13 / C 6p14 .5p14 C u14 C 20y14 C 10z14 /
C4p15 .5p15 C u15 C 20y15 C 10z15 / C 2p16 .5p16 C u16 C 20y16 C 10z16 / :
238 8 Self-Scheduling and Market Clearing Auction
Table 8.1 Illustrative Example 8.1: data of the thermal generating unit
Capacity 300 MW
Minimum power output 30 MW
Ramping-up limit 150 MW/h
Ramping-down limit 100 MW/h
Start-up ramping limit 200 MW/h
Shut-down ramping limit 100 MW/h
Initial status 0 (off-line)
Initial power output 0 MW
Online cost $1/h
Variable cost $5/MWh
Start-up cost $20
Shut-down cost $10
This objective function represents the profit achieved by the power producer
using its owned generating unit throughout the planning horizon. This objective
function includes the revenues (forecast market price times power production at
each time period) minus operation costs (including variable, fixed, start-up, and
shut-down costs at each time period).
Note that the optimization variables in the above objective function include two
subscripts. The first subscript indicates generating unit 1 (since the power producer
owns just a single generating unit, this subscript may be suppressed), while the
second subscript identifies the time period.
Next, we formulate the constraints of the self-scheduling problem:
• Power output limits:
• Ramping-up limits:
• Ramping-down limits:
• Logic expressions:
Finally, the optimization variables of the above self-scheduling problem are those
included in set D fp11 , p12 , p13 , p14 , p15 , p16 , u11 , u12 , u13 , u14 , u15 , u16 , y11 , y12 ,
y13 , y14 , y15 , y16 , z11 , z12 , z13 , z14 , z15 , z16 g:
The above self-scheduling problem is a MILP problem [9] that can be solved,
for instance, using CPLEX [10] under GAMS [5].
The optimal solution of this problem is provided in Table 8.3. The first column
identifies the time period, while the second and third columns indicate the optimal
on/off status and the power output of the generating unit at each time period,
respectively.
We observe that it is optimal to turn on the thermal generating unit from time
periods 2 to 5. These time periods exhibit the highest market prices.
The optimal value of the objective function, i.e., the total profit achieved by the
power producer throughout the planning horizon, is $366.
A rather generic GAMS [5] input file to solve Illustrative Example 8.1 is
provided in Sect. 8.5.
Illustrative Example 8.2 Self-scheduling: impact of ramping limits
We consider again the data and results of Illustrative Example 8.1. Table 8.4
provides the revenue (second column), cost (third column), and profit (fourth
column) achieved by the power producer at each time period.
Note that the power producer achieves negative profits, i.e., it incurs losses, at
time periods 2, 5, and 6. This is due to the ramping constraints of the generating unit
that do not allow this unit to increase/decrease its power output from zero/capacity to
capacity/zero. However, note that despite the negative profits at some time periods,
this solution maximizes the total profit achieved by the power producer throughout
the planning horizon.
If the ramping limits are relaxed, i.e., if we do not consider them in the problem
formulation, we obtain the results provided in Table 8.5. In this case, it is optimal
8.2 Self-Scheduling 241
Table 8.4 Illustrative Time period Revenue [$] Cost [$] Profit [$]
Example 8.2: revenues, costs,
and profits at each time 1 0 0 0
period 2 750 771 21
3 1800 1501 299
4 1200 1001 199
5 400 501 101
6 0 10 10
Total 4150 3784 366
to use the generating unit (at capacity) at time periods 3 and 4. Moreover, we only
obtain a negative profit at time period 5 due to the shut-down cost of the generating
unit at the beginning of this time period. In such a case, the total profit increases up
to $568.
On the other hand, if the ramping limits are further restricted and we consider
them to be half the values provided in Table 8.1, we obtain the results provided in
Table 8.6. In this case, there are again three time periods with negative profits and
the total profit reduces to $166.
As shown above, the ramping constraints limit the flexibility of the generating
unit and this might have a significant impact on the profits achieved by the power
producer.
242 8 Self-Scheduling and Market Clearing Auction
This section introduces basic microeconomic principles [6], and describes and
formulates typical market clearing auctions.
Price [$/MWh]
Quantity [MWh]
Price [$/MWh]
Quantity [MWh]
The market operator receives, for each time period of the study horizon (e.g.,
for each hour of the day), production offer curves from the generating units of
each power producer and consumption bid curves from the demands of each
power consumer. Then, this market operator aggregates all of them and use these
aggregated production offer and consumption bid curves to clear the market.
In order to clear the market, the market operator seeks to maximize the social
welfare, which is the sum of the producer surplus and the consumer surplus.
Figure 8.3 illustrates the social welfare, the producer surplus, and the consumer
surplus in a simple case involving a single time period and no constraints of any
type.
8.3 Market Clearing Auction 245
Price [$/MWh]
Social Welfare=
Producer Surplus+Consumer Surplus
Quantity [MWh]
p∗
Optimal Production
In Fig. 8.3, the stepwise decreasing curve represents the consumption bid (pairs
of energy quantity and price), while the stepwise increasing curve represents the
production offer (pairs of energy quantity and price). The market clearing price
is denoted by and is obtained at the crossing of these two curves, while the
accepted production/consumption level is denoted by p and is also obtained at the
crossing of these two curves. Note that the market clearing price is the price paid
by power consumers for consuming energy and the price paid to power producers
for supplying energy. This price is the same for all consumers and producers,
independently of their bid and offer prices. Moreover, this price is a marginal
price because it represents the incremental cost of supplying an additional unit of
electrical energy [7].
The area between the consumption bid curve (demand curve) and the horizontal
dashed line representing the market clearing price is the consumer surplus. This
consumer surplus is a measure of the happiness of the consumers as it is equal to
the difference between the amount that the consumers are willing to pay (energy
times bid price) and the actual consumers’ payment (energy times market clearing
price).
On the other hand, the area between the horizontal dashed line representing the
market clearing price and the production offer curve (supply curve) is the producer
surplus. This producer surplus represents the happiness of the producers as it is
equal to the difference between the actual producers’ revenue (energy times market
clearing price) and the revenue that producers are willing to accept (energy times
offer price).
246 8 Self-Scheduling and Market Clearing Auction
Considering the market as whole, the social welfare is a measure of the happiness
of both consumers and producers and equals consumer surplus plus producer
surplus.
Finally, note that consumer surplus, producer surplus, and social welfare are
nonnegative quantities.
Further details on the above microeconomic concepts can be found in the
microeconomic monograph by Nicholson and Snyder [6].
8.3.5 Formulation
Given the definitions and explanations in the previous sections, we next formulate
three market clearing auctions.
8.3.5.1 Notation
For the sake of clarity, the main notation used in the formulation of the market
clearing auction problem is defined below.
Indexes
Optimization Variables
Constants
• PG max
tgb is the size in MWh of production block b offered by generating unit g at
time period t,
• PLnmmax is the transmission capacity of transmission line nm,
• Dtdc is the consumption bid price of block c of demand d at time period t, and
• Gtgb is the production offer price of block b of generating unit g at time period t.
Sets
The most simple instance of a market clearing auction is a single-period auction that
does not consider network constraints. This problem can be formulated as:
maxpD ;8d;8cIpG ;8g;8b
dc gb
XX XX
D
dc pdc
D
G G
gb pgb (8.2a)
d c2dD g b2gG
subject to
dc Pdc
0 pD D max
; 8d; 8c 2 dD ; (8.2b)
gb Pgb
0 pG G max
; 8g; 8b 2 gG ; (8.2c)
XX XX
gb
pG dc D 0:
pD (8.2d)
g b2gG d c2dD
21 C 8:2p22 C 8:5p23 C 9p31 C 9:5p32 C 10p33 :
C8pG G G G G G
0 pD
11 0:20;
12 0:12;
0 pD
13 0:10;
0 pD
14 0:05:
0 pD
8.3 Market Clearing Auction 249
111 0:05;
0 pG
112 0:12;
0 pG
113 0:13;
0 pG
121 0:08;
0 pG
122 0:08;
0 pG
123 0:09;
0 pG
131 0:07;
0 pG
132 0:05;
0 pG
133 0:02:
0 pG
• Energy balance:
G
p11 C pG
12 C p13 C p21 C p22 C p23 C p31 C p32 C p33
G G G G G G G
pD11 C p12 C p13 C p14 D 0:
D D D
Finally, the optimization variables of this problem are those included in set D
fpD
11 , p12 , p13 , p14 , p11 , p12 , p13 , p21 , p22 , p23 , p31 , p32 , p33 g. These optimization
D D D G G G G G G G G G
variables include two subscripts. The first one indicates the demand/generating unit,
while the second one refers to the consumption/production block.
The solution of this market clearing auction is provided below.
Accepted production offers of the generating units are provided in Table 8.9,
while accepted consumption bids of the demand are provided in Table 8.10.
We observe that, as expected, the accepted production offer blocks are those with
the lowest offer prices (see Table 8.7), while the accepted consumption bid blocks
are those with the highest bid prices (see Table 8.8).
This solution provides an optimal value of the objective function, i.e., of the
social welfare, of $2.252.
Price [$/MWh]
15
10
8.2
Quantity [MWh]
0.25 0.42 0.5 0.75
where:
• ˘g is the profit achieved by the power producer that owns generating unit g,
G
• Cgb is the cost of production block b of generating unit g, and
• pgb is the optimal value of variable pG
G
gb obtained from problem (8.2).
Note that, for the sake of simplicity, we do not include fixed, start-up, or shut-
down costs in Eqs. (8.3).
In some situations, power producers offer the energy they produce at prices equal
to the variable costs of their receptive generating units, i.e., offer prices G
gb , 8g, 8b,
are equal to variable costs Cgb G
, 8g, 8b. In such a situation, we say that producers
behave competitively.
Illustrative Example 8.5 Single-period market clearing auction: revenues and
profits
We consider again the data and results of Illustrative Example 8.3. If we assume
that the power producers owning the generating units behave competitively, i.e.,
if their offer prices are equal to their variable costs, the profit pertaining to each
generating unit can be computed as follows:
˘1 D .8:2 4:0/ 0:05 C .8:2 6:0/ 0:12 C .8:2 7:0/ 0:13 D $0:630;
˘2 D .8:2 8:0/ 0:08 C .8:2 8:2/ 0:04 C .8:2 8:5/ 0 D $0:016;
˘3 D .8:2 9:0/ 0 C .8:2 9:5/ 0 C .8:2 10:0/ 0 D 0:
At the optimum, note that none of the generating units achieves a negative profit.
2 3
X XX XX
4 D
tdc ptdc
D
G G 5
tgb ptgb (8.4a)
t d c2dD g b2gG
252 8 Self-Scheduling and Market Clearing Auction
subject to
tdc Ptdc ;
0 pD D max
8t; 8d; 8c 2 dD ; (8.4b)
tgb Ptgb ;
0 pG G max
8t; 8g; 8b 2 bG ; (8.4c)
XX XX
tgb
pG tdc D 0;
pD 8t: (8.4d)
g b2 G d c2dD
b
C8pG121 C 8:2p122 C 8:5p123 C 9p131 C 9:5p132 C 10p133
G G G G G
G
C 15pD211 C 10p212 C 8:5p213 C 3p214 4p211 C 6p212 C 7p213
D D D G G
C8pG221 C 8:2p222 C 8:5p223 C 9p231 C 9:5p232 C 10p233
G G G G G
subject to
111 0:2;
0 pD
112 0:12;
0 pD
113 0:1;
0 pD
114 0:05;
0 pD
211 0:3;
0 pD
212 0:22;
0 pD
213 0:12;
0 pD
214 0:07;
0 pD
111 0:05;
0 pG
112 0:12;
0 pG
113 0:13;
0 pG
121 0:08;
0 pG
122 0:08;
0 pG
254 8 Self-Scheduling and Market Clearing Auction
0 pG
123 0:09;
131 0:07;
0 pG
132 0:05;
0 pG
133 0:02;
0 pG
211 0:05;
0 pG
212 0:12;
0 pG
213 0:13;
0 pG
221 0:08;
0 pG
222 0:08;
0 pG
223 0:09;
0 pG
231 0:07;
0 pG
232 0:05;
0 pG
0 pG233 0:02;
G
p111 C pG112 C p113 C p121 C p122 C p123 C p131 C p132 C p133
G G G G G G G
pD 111 C p112 C p113 C p114 D 0;
D D D
G
p211 C pG212 C p213 C p221 C p222 C p223 C p231 C p232 C p233
G G G G G G G
pD 211 C p212 C p213 C p214 D 0;
D D D
are the optimization variables. These variables include three subscripts. The first one
indicates the time period, the second one indicates the demand/generating unit, and
the third one refers to the consumption/production block.
The formulation of this multi-period market clearing auction is similar to that
of the single-period market clearing auction provided in Illustrative Example 8.3.
However, in this case constraints are imposed for all time periods and the objective
function represents the social welfare throughout the planning horizon (all time
periods).
The solution is given and discussed below.
Accepted production offers are provided in Table 8.13, while accepted consump-
tion bids are provided in Table 8.14.
Note that hours 1 and 2 are decoupled. Thus, we achieve the same power
schedules for hour 1 than those obtained in Illustrative Example 8.3.
8.3 Market Clearing Auction 255
Price [$/MWh]
15
10
8.5
Quantity [MWh]
0.2 0.4 0.55 0.6
The market prices in hours 1 and 2 are $8.2/MWh and $8.5/MWh, respectively.
Figure 8.5 represents the consumption bid and production offer curves, as well as
the optimal price and consumption/production level for hour 2.
256 8 Self-Scheduling and Market Clearing Auction
Finally, the social welfare throughout the planning horizon is $5.361, while the
profit achieved by each generating unit throughout the planning horizon can be
computed as follows:
2 3
X XX XX
4 D
tdc ptdc
D
G G 5
tgb ptgb (8.5a)
t d c2dD g b2gG
subject to
tdc Ptdc ;
0 pD D max
8t; 8d; 8c 2 dD ; (8.5b)
tgb Ptgb ;
0 pG G max
8t; 8g; 8b 2 bG ; (8.5c)
X X X X X
tgb
pG tdc D
pD Bnm .ıtn ıtm / W tn ; 8t; 8n; (8.5d)
g2˝nG b2gG d2˝nD c2dD m2n
The objective function (8.5a) and constraints (8.5b)–(8.5c) are the same as those
considered in the multi-period market clearing auction without network constraints.
The differences between these two problems are constraints (8.5d) that represent the
energy balance per node and time period, constraints (8.5e) that impose transmission
8.3 Market Clearing Auction 257
capacity limits per transmission line and time period, and constraints (8.5f) that fix
to zero the voltage angle at the reference node for all time periods.
Problem (8.5) entails one energy balance constraint per time period and node
(Eqs. (8.5d), 8t, 8n). Recall that the dual variables associated with these energy
balance constraints provide the market clearing prices. However, in this case prices
can be different at different nodes. The reason is simple: we may use a cheap
generating unit to supply a demand at a given node but this cheap generating
unit may not be used to supply a demand at a different node due to transmission
congestion. Therefore, these dual variables (tn ) are usually known as locational
marginal prices (LMPs) or spot prices [8].
Finally, note that variables and parameters in problem (8.5) are generally
expressed using the per-unit system described in Sect. 2.6 of Chap. 2 of this book,
mainly if the power system under study includes power transformers that divide the
system in different voltage areas.
Illustrative Example 8.7 Transmission-constrained multi-period market clearing
auction
The transmission-constrained multi-period auction is illustrated using the exam-
ple below. We consider again the data of Illustrative Example 8.6. However, in this
case we assume that the generating units and the demand are located at the three-
node power network depicted in Fig. 8.6. Generating units 1, 2, and 3 are located at
nodes 1, 2, and 3, respectively, while the demand is located at node 3. The data of
the transmission network are provided in Fig. 8.6. We consider a base power of 1
MW so that all the data of Illustrative Example 8.6 can be easily transformed into a
per-unit system.
1 2
3 d3 = 0
C8pG121 C 8:2p122 C 8:5p123 C 9p131 C 9:5p132 C 10p133
G G G G G
G
C 15pD211 C 10p212 C 8:5p213 C 3p214 4p211 C 6p212 C 7p213
D D D G G
C8pG221 C 8:2p222 C 8:5p223 C 9p231 C 9:5p232 C 10p233
G G G G G
subject to
0 pD
111 0:2;
112 0:12;
0 pD
113 0:1;
0 pD
114 0:05;
0 pD
211 0:3;
0 pD
212 0:22;
0 pD
213 0:12;
0 pD
214 0:07;
0 pD
111 0:05;
0 pG
112 0:12;
0 pG
113 0:13;
0 pG
121 0:08;
0 pG
122 0:08;
0 pG
123 0:09;
0 pG
131 0:07;
0 pG
132 0:05;
0 pG
133 0:02;
0 pG
211 0:05;
0 pG
212 0:12;
0 pG
213 0:13;
0 pG
8.3 Market Clearing Auction 259
0 pG
221 0:08;
222 0:08;
0 pG
223 0:09;
0 pG
231 0:07;
0 pG
232 0:05;
0 pG
233 0:02;
0 pG
D
131 C p132 C p133 p111 C p112 C p113 C p114 D 3:1.ı13 ı11 / C 3:3.ı13 ı12 /;
pG G G D D D
D
231 C p232 C p233 p211 C p212 C p213 C p214 D 3:1.ı23 ı21 / C 3:3.ı23 ı22 /;
pG G G D D D
where the optimization variables of this problem are those included in set D
fpD D D D D D D D G G G G G G
111 , p112 , p113 , p114 , p211 , p212 , p213 , p214 , p111 , p112 , p113 , p121 , p122 , p123 , p131 ,
G
p132 , p133 , p211 , p212 , p213 , p221 , p222 , p223 , p231 , p232 , p233 , ı11 , ı12 , ı13 , ı21 , ı22 , ı23 g.
G G G G G G G G G G G
We observe that this solution differs from that obtained in Illustrative Exam-
ple 8.6. In this case, not all the cheapest production blocks can be used at capacity.
For example, the size of production block 3 of generating unit 1 is 0.13 puMWh
(per unit MWh) with an offer price equal to $7/puMWh. However, the 0.13 puMWh
are not fully used in any of the 2 h while other more expensive production blocks
are used (those of generating units 2 and 3). This is due to transmission congestion.
As a result, the social welfare decreases to $5.0451.
The locational marginal prices that clear the market are provided in Table 8.17.
It is important to note that prices vary across nodes due to transmission congestion
and across time periods due to demand differences.
Finally, Figs. 8.7 and 8.8 represent the offer and bid curves, as well as the
accepted production offers and consumption bids in hours 1 and 2, respectively.
A rather generic GAMS [5] input file to solve Illustrative Example 8.7 is
provided in Sect. 8.5.
8.3 Market Clearing Auction 261
Price [$/puMWh]
Offer curve
18
Bid curve
16 Accepted offers
Accepted bids
14
12
10
8
6
4
2
Quantity [puMWh]
0.1 0.2 0.3 0.4 0.5 0.6 0.7
Price [$/puMWh]
Offer curve
18
Bid curve
16 Accepted offers
Accepted bids
14
12
10
8
6
4
2
Quantity [puMWh]
0.1 0.2 0.3 0.4 0.5 0.6 0.7
Table 8.18 Illustrative Example 8.8: profits achieved by each generating unit [$]
Generating unit Without transmission constraints With transmission constraints
1 1.350 0.540
2 0.080 0.064
3 0 0.079
This chapter describes two relevant problems in the economic management of elec-
tricity markets, namely the self-scheduling of power producers and the formulation
of market clearing auctions. Additional details on these problems can be found in
the monograph by Conejo et al. [3].
This section provides the GAMS [5] codes used to solve some of the illustrative
examples provided in this chapter.
8.5 GAMS Codes 263
8.5.1 Self-Scheduling
A GAMS [5] input file to solve Illustrative Example 8.1 is provided below:
1 $title self-scheduling problem
2 option optcr=0;
3 set t periodos /t1*t6/;
4 table price(t,*) prices per period
5 mp
6 t1 3
7 t2 5
8 t3 6
9 t4 6
10 t5 4
11 t6 2;
12 scalars
13 pmax capacity /300/
14 pmin minimum power output /30/
15 rup ramping_up limit /150/
16 rdown ramping_down limit /100/
17 rstart start_up ramping limit /200/
18 rshut shut_down ramping limit /100/
19 vini initial status /0/
20 pini initial power output /0/
21 cf fix cost /1/
22 cv marginal cost /5/
23 csu start_up cost /20/
24 csd shut_down cost /10/;
25 variables
26 tprof total profit
27 ppp(t) profit per period;
28 positive variables
29 p(t) power output per period;
30 binary variables
31 v(t) status (1 if_on & 0 if_off)
32 y(t) start_up indicator (1 if_started_up)
33 z(t) shut_down indicator (1 if_shut_down);
34 equations
35 profit objective function
36 pppe(t) profit per period
37 maxp(t) capacity limits
38 minp(t) minimum power output limits
39 rampup(t) ramping_up constraints (periodo "t"
40 rampup0(t) ramping_up constraints (period "1")
41 rampdw(t) ramping_down constraints (periodo "t")
42 rampdw0(t) ramping_down constraints (period "1")
43 status(t) on-line start_up shut_down logic (periodo "t")
44 status0(t) on-line start_up shut_down logic (periodo "1")
45 link(t) start_up & shut_down linking logic;
46 pppe(t).. ppp(t) =e=
47 price(t,’mp’)*p(t)-cv*p(t)-cf*v(t)-csu*y(t)-csd*z(t);
48 profit.. tprof =e= sum(t,ppp(t));
49 maxp(t).. p(t) =l= pmax*v(t);
264 8 Self-Scheduling and Market Clearing Auction
This GAMS input file follows the math formulation of the optimization problem
in Illustrative Example 8.1.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 68 VARIABLE v.L status (1 if_on & 0 if_off)
2 t2 1, t3 1, t4 1, t5 1
3 ---- 70 VARIABLE p.L power output per period
4 t2 150.00, t3 300.00, t4 200.00, t5 100.00
5 ---- 70 VARIABLE tprof.L = 366.00 total
profit
6 ---- 70 VARIABLE ppp.L profit per period
7 t2 -21.00, t3 299.00, t4 199.00, t5 -101.00, t6
-10.00
A rather generic GAMS [5] input file to solve Illustrative Example 8.7 is provided
below:
1 $title network constrained multi-period auction
2 set
3 t periods /t1,t2/
4 g units /g1*g3/
5 b generating blocks /b1*b3/
8.5 GAMS Codes 265
6 d demands /d1/
7 c demand blocks /c1*c4/
8 n nodes /n1*n3/
9 n2n(n,n) node to node /n1.n2,n1.n3,n2.n3/
10 g2n(n,g) units to nodes /n1.g1,n2.g2,n3.g3/
11 d2n(n,d) demands to nodes /n3.d1/;
12 alias(n,m)
13 scalar
14 pi number pi /3.14159265358979/;
15 table line(n,n,*) line data
16 sus lim
17 n1.n2 3.0 0.8
18 n1.n3 3.1 0.2
19 n2.n3 3.3 0.8;
20 line(n,m,’sus’)$(ord(n)gt ord(m))=line(m,n,’sus’);
21 line(n,m,’lim’)$(ord(n)gt ord(m))=line(m,n,’lim’);
22 table offer(g,b,t,*) production offers
23 pog lambdag
24 g1.b1.t1 0.05 4
25 g1.b2.t1 0.12 6
26 g1.b3.t1 0.13 7
27 g2.b1.t1 0.08 8
28 g2.b2.t1 0.08 8.2
29 g2.b3.t1 0.09 8.5
30 g3.b1.t1 0.07 9
31 g3.b2.t1 0.05 9.5
32 g3.b3.t1 0.02 10
33 *
34 g1.b1.t2 0.05 4
35 g1.b2.t2 0.12 6
36 g1.b3.t2 0.13 7
37 g2.b1.t2 0.08 8
38 g2.b2.t2 0.08 8.2
39 g2.b3.t2 0.09 8.5
40 g3.b1.t2 0.07 9
41 g3.b2.t2 0.05 9.5
42 g3.b3.t2 0.02 10
43 table bid(d,c,t,*) consumption bids
44 pod lambdad
45 d1.c1.t1 0.20 15
46 d1.c2.t1 0.12 10
47 d1.c3.t1 0.10 8.5
48 d1.c4.t1 0.05 3
49 d1.c1.t2 0.30 15
50 d1.c2.t2 0.25 10
51 d1.c3.t2 0.12 8.5
52 d1.c4.t2 0.07 3;
53 variables
54 sw social welfare
55 pg(g,b,t) production block b of unit g at t
56 pd(d,c,t) consumption block l of demand d at t
57 delta(n,t) angle at node n at t;
58 pg.lo(g,b,t)=0;
59 pg.up(g,b,t)=offer(g,b,t,’pog’);
266 8 Self-Scheduling and Market Clearing Auction
60 pd.lo(d,c,t)=0;
61 pd.up(d,c,t)=bid(d,c,t,’pod’);
62 delta.fx(’n3’,t)=0;
63 equations
64 swe social welfare
65 bal(n,t) balance per node
66 maxf(n,m,t) line capacity nm
67 minf(n,m,t) line capacicy mn;
68 swe.. sw=e=sum(t,sum((d,c), bid(d,c,t,’lambdad’)* pd(d,c,t))-
69 sum((g,b), offer(g,b,t,’lambdag’)*pg(g,b,t)));
70 bal(n,t).. sum(d$d2n(n,d),sum(c,pd(d,c,t)))
71 -sum(g$g2n(n,g),sum(b,pg(g,b,t)))=e=
72 -sum(m,line(n,m,’sus’)*(delta(n,t)-delta(m,t)));
73 maxf(n,m,t)$n2n(n,m).. line(n,m,’sus’)*(delta(n,t)-delta(m,t))=l=
74 line(n,m,’lim’);
75 minf(n,m,t)$n2n(n,m).. line(n,m,’sus’)*(delta(n,t)-delta(m,t))=g=
76 -line(n,m,’lim’);
77 model auction /all/;
78 solve auction using mip maximizing sw;
79 option decimals=4;
80 display pg.l, pd.l, sw.l, delta.l, bal.m;
This GAMS input file follows the math formulation of the optimization problem
in Illustrative Example 8.7.
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 83 VARIABLE pg.L production block b of unit g at t
2 t1 t2
3 g1.b1 0.0500 0.0500
4 g1.b2 0.1200 0.1200
5 g1.b3 0.1145 0.0145
6 g2.b1 0.0355 0.0800
7 g2.b2 0.0800
8 g2.b3 0.0855
9 g3.b1 0.0700
10 g3.b2 0.0500
11 ---- 83 VARIABLE pd.L consumption block l of demand d at t
12 t1 t2
13 d1.c1 0.2000 0.3000
14 d1.c2 0.1200 0.2500
15 ---- 83 VARIABLE sw.L = 5.0451 social
welfare
16 ---- 83 VARIABLE delta.L angle at node n at t
17 t1 t2
18 n1 0.0645 0.0645
19 n2 0.0364 0.0697
20 ---- 83 EQUATION bal.M balance per node
21 t1 t2
22 n1 7.0000 7.0000
23 n2 8.0000 8.5000
24 n3 8.9091 9.8636
8.1 What is the objective of the self-scheduling problem? Describe the main
differences between this problem and the unit commitment problem analyzed in
Chap. 7.
8.2 Explain why market clearing prices can be different at different nodes of an
electric power network.
8.3 Discuss the validity of the following statement: the social welfare of a market
clearing auction that does not consider network constraints is always higher than the
social welfare of the same auction, but considering network constraints. Why? Why
not?
8.4 Consider a power producer that participates in an EU-type electricity market.
The study horizon comprises two time periods with forecast prices equal to $3/MWh
and $2/MWh. Consider also that the power producer owns a single generating unit
with the technical and economic data in Table 8.19. Without considering ramping
constraints, formulate the corresponding two-period self-scheduling problem.
8.5 Extend the formulation of the self-scheduling problem provided in Sect. 8.2 by
including minimum up- and down-time constraints as described in [1].
8.6 Two generating units and two demands participate in an EU-type electricity
market. Tables 8.20 and 8.21 provide the production offer and consumption bid data
of generating units and demands, respectively.
Considering these data:
1. Formulate the corresponding market clearing auction.
2. Write a specific GAMS code to solve this market clearing auction.
3. Obtain the solution of the market clearing auction and discuss the results.
4. Obtain the market clearing prices.
5. Calculate the profit achieved by each generating unit.
8.7 Consider again the data of Exercise 8.6. Consider also that the generating units
and demands are located in a three-node power network with the data in Fig. 8.9.
3 4
d1 = 0
1 2
∼
G1 D1
References
1. Arroyo, J.M., Conejo, A.J.: Optimal response of a thermal unit to an electricity spot market.
IEEE Trans. Power Syst. 15(3), 1098–1104 (2000)
2. Chang, H.-J.: Economics. The User’s Guide. Bloomsbury Press, New York (2014)
3. Conejo, A.J., Carrión, M., Morales, J.M.: Decision Making Under Uncertainty in Electricity
Markets. Springer, New York (2010)
4. Gabriel, S.A., Conejo, A.J., Fuller, J.D., Hobbs, B.F., Ruiz, C.: Complementarity Modeling in
Energy Markets. Springer, New York (2013)
5. GAMS (2016). Available at www.gams.com/
6. Nicholson, W., Snyder, C.M.: Microeconomic Theory: Basic Principles and Extensions, 11th
edn. South-Western Cengage Learning, Mason (2011)
7. Pérez-Arriaga, J.I., Meseguer, C.: Wholesale marginal prices in competitive generation
markets. IEEE Trans. Power Syst. 12(2), 710–717 (1997)
8. Schweppe, F.C., Caramanis, M.C., Tabors, R.D., Bohn, R.E.: Spot Pricing of Electricity.
Springer, New York (1988)
9. Sioshansi, R., Conejo, A.J.: Optimization in Engineering. Models and Algorithms. Springer,
New York (2017)
10. The ILOG CPLEX (2016). Available at www.ilog.com/products/cplex/
Appendix A
Solving Systems of Nonlinear Equations
Chapter 4 of this book describes and analyzes the power flow problem. In its ac
version, this problem is a system of nonlinear equations. This appendix describes
the most common method for solving a system of nonlinear equations, namely, the
Newton-Raphson method. This is an iterative method that uses initial values for the
unknowns and, then, at each iteration, updates these values until no change occurs
in two consecutive iterations.
For the sake of clarity, we first describe the working of this method for the case of
just one nonlinear equation with one unknown. Then, the general case of n nonlinear
equations and n unknowns is considered.
We also explain how to directly solve systems of nonlinear equations using
appropriate software.
f .x/ D 0: (A.1)
.0/
To do so, we first consider a given value of x, e.g., x . In general, we have that
f x.0/ ¤ 0. Thus, it is necessary to find x.0/ so that f x.0/ C x.0/ D 0.
Using Taylor series, we can express f x.0/ C x.0/ as:
where
is the iteration counter.
Considering the above, the Newton-Raphson method consists of the following
steps:
• Step 0: initialize the iteration counter (
D 0) and provide an initial value for x,
i.e., x D x.
/ D x.0/ .
• Step 1: compute x.
C1/ using Eq. (A.5).
• Step 2: check if the difference between the values of x in twoˇ consecutiveˇ
iterations is lower than a prespecified tolerance
, i.e., check if ˇx.
C1/ x.
/ ˇ
<
. If so, the algorithm has converged and the solution is x.
C1/ . If not, continue
at Step 3.
• Step 3: update the iteration counter
C 1 and continue at Step 1.
Illustrative Example A.1 Newton-Raphson algorithm for a one-unknown problem
f .x/ D x2 3x C 2;
A Solving Systems of Nonlinear Equations 273
df .x/
D 2x 3:
dx
The Newton-Raphson algorithm proceeds as follows:
• Step 0: we initialize the iteration counter (
D 0) and provide an initial value for
x, e.g., x.
/ D x.0/ D 0.
• Step 1: we compute x.1/ using the equation below:
.0/ 2
.1/ .0/ x 3x.0/ C 2 02 3 0 C 2
x Dx .0/
D0 D 0:6667:
2x 3 203
• Step 2: we compute absolute value of the difference between x.1/ and x.0/ , i.e.,
j0:6667 0j D 0:6667. Since this difference is not small enough, we continue at
Step 3.
• Step 3: we update the iteration counter
D 0 C 1 D 1 and continue at Step 1.
• Step 1: we compute x.2/ using the equation below:
.1/ 2
.2/ .1/x 3x.1/ C 2 0:66672 3 0:6667 C 2
x Dx D 0:6667 D 0:9333:
2x.1/ 3 2 0:6667 3
• Step 2: we compute the absolute value of the difference between x.2/ and x.1/ ,
i.e., j0:9333 0:6667j D 0:2666. Since this difference is not small enough, we
continue at Step 3.
• Step 3: we update the iteration counter
D 1 C 1 D 2 and continue at Step 1.
This iterative algorithm is repeated until the difference between the values of x in
two consecutive iterations is small enough. Table A.1 summarizes the results. The
algorithm converges in four iterations for a tolerance of 1 104 .
Note that the number of iterations needed for convergence by the Newton-
Raphson algorithm is small.
f .x/ D 0; (A.7)
where:
• f .x/ D Œf1 .x/ f2 .x/ : : : fn .x/> D 0: Rn ! Rn ,
• x D Œx1 x2 : : : xn > ,
• 0 D Œ0 0 : : : 0> , and
• > denotes the transpose operator.
Given an initial value for vector x, i.e., x.0/ , we have, in general, that f x.0/ ¤ 0.
Thus, we need to find x.0/ so that f x.0/ C x.0/ D 0. Using the first-order Taylor
series, f x.0/ C x.0/ can be approximately expressed as:
f x.0/ C x.0/ f x.0/ C J.0/ x.0/ ; (A.8)
Since we seek f x.0/ C x.0/ D 0, from Eq. (A.8) we can compute x.0/ as:
1 .0/
x.0/ J.0/ f x : (A.10)
A Solving Systems of Nonlinear Equations 275
where
is the iteration counter.
Considering the above, the Newton-Raphson algorithm consists of the following
steps:
• Step 0: initialize the iteration counter (
D 0) and provide an initial value for
vector x, i.e., x D x.
/ D x.0/ .
• Step 1: compute the Jacobian J using (A.9).
• Step 2: compute x.
C1/ using matrix equation (A.12).
• Step 3: check every element of the absolute value of the difference between
the values of vector x in two
ˇ consecutive ˇ iterations is lower than a prespecified
tolerance , i.e., check if ˇx.
C1/ x.
/ ˇ < . If so, the algorithm has converged
and the solution is x.
C1/ . If not, continue at Step 4.
• Step 4: update the iteration counter
C 1 and continue at Step 1.
For the sake of clarity, this iterative algorithm is schematically described through
the flowchart in Fig. A.1.
Illustrative Example A.2 Newton-Raphson algorithm for a two-unknown problem
n =0
?
x = x (0)
?
- Compute the Jacobian J (n ) using (A.9)
?
Compute x (n +1) using (A.12)
?
(n +1) YES
- END
x − x (n ) < e ?
NO
?
n +1 ← n
• Step 2: we compute x.1/ and y.1/ using the matrix equation below:
1 .0/
x.1/ x.0/ 1 C y.0/ x.0/ x C x.0/ y.
/ 4
D
y.1/ y.0/ 1 1 x.0/ C y.0/ 3
1
1:98 2:02 1:98 4 104 1:9900
D D :
1:02 1 1 0 1:0100
• Step 3: we compute the difference between x.1/ and x.0/ , i.e., j1:9900 1:98j D
0:01, as well as the differences between y.1/ and y.0/ , i.e., j1:0100 1:02j D 0:01.
Since these differences are not small enough, we continue with Step 4.
• Step 4: we update the iteration counter
D 0 C 1 D 1 and continue with Step 1.
This iterative algorithm is repeated until the differences between the values
of x and y in two consecutive iterations are small enough. Table A.2 provides
the evolution of the values of these unknowns. The algorithm converges in nine
iterations for a tolerance of 1 104 .
Note that the number of iterations needed by the Newton-Raphson algorithm is
rather small.
Next, we consider a different initial solution. Table A.3 provides the results. In
this case, the algorithm converges in 11 iterations for a tolerance of 1 104 .
We conclude that the initial solution does not have an important impact on
the number of iterations required for convergence, provided that convergence is
attained. However, convergence is not necessarily guaranteed, and the Jacobian
may be singular at any iteration. Further details on convergence guarantee and on
convergence speed are available in [1].
278 A Solving Systems of Nonlinear Equations
The GNU Octave [2] routines below solve Illustrative Example A.1:
1 clc
2 fun = @NR1;
3 x0 = [0]; x = fsolve(fun,x0)
1 function F = NR1(x)
2 %
3 F(1)=x(1)*x(1)-3*x(1)+2;
1 function F = NR2(x)
2 %
3 F(1)=x(1)+x(1)*x(2)-4;
4 F(2)=x(1)+x(2)-3;
This appendix describes the Newton-Raphson method, which is the most common
method for solving systems of nonlinear equations, as those considered in Chap. 4
of this book. The Newton-Raphson method is based on an iterative procedure that
updates the value of the unknowns involved until the changes in their values in two
consecutive iterations are small enough.
Different illustrative examples are used to show the working of the Newton-
Raphson method. Additionally, this appendix explains also how to directly solve a
system of nonlinear equations using appropriate software, such as GNU Octave [2].
Additional details can be found in the monograph by Chapra and Canale on
numerical methods in engineering [1].
References
1. Chapra, S.C., Canale, R.P.: Numerical Methods for Engineers, 6th edn. McGraw-Hill, New York
(2010)
2. GNU Octave (2016): Available at www.gnu.org/software/octave
3. MATLAB (2016): Available at www.mathworks.com/products/matlab
Appendix B
Solving Optimization Problems
B.1.1 Formulation
subject to
X
Aij xi D Bj ; j D 1; : : : ; m; (B.1b)
i
X
Dik xi Ek ; k D 1; : : : ; o; (B.1c)
i
xi 2 R; i D 1; : : : ; n; (B.1d)
where:
• R is the set of real numbers,
• Ci , 8i, are the cost coefficients of variables xi , 8i, in the objective function (B.1a),
• Aij , 8i, and Bj are the coefficients that define equality constraints (B.1b), 8j,
• Dik , 8i, and Ek are the coefficients that define inequality constraints (B.1c), 8k,
• n is the number of continuous optimization variables,
• m is the number of equality constraints, and
• o is the number of inequality constraints.
In compact form, the LP problem (B.1) can be written as:
minx
C> x (B.2a)
subject to
Ax D B; (B.2b)
Dx E; (B.2c)
x2R n1
; (B.2d)
where:
• superscript > denotes the transpose operator,
• C 2 Rn1 is the cost coefficient vector of the variable vector x in the objective
function (B.2a),
• A 2 Rmn and B 2 Rm1 are the matrix and the vector of coefficients that define
equality constraint (B.2b), and
• D 2 Ron and E 2 Ro1 are the matrix and the vector of coefficients that define
inequality constraint (B.2c).
Some examples of LP problems are the dc optimal power flow problem analyzed
in Chap. 6 or the economic dispatch problem described in Chap. 7 of this book.
B.1.2 Solution
One of the most common and efficient methods for solving LP problems is the
simplex method [2]. A detailed description of this method can be found, for
instance, in [4].
LP problems can be also solved using one of the many commercially available
software tools. For example, in this book we use CPLEX [5] under GAMS [3].
Illustrative Example B.1 Linear programming
We consider a generating unit with a capacity of 10 MW and a variable cost of
$21/MWh. This generating unit has to decide its power output for the following 6 h,
B Solving Optimization Problems 283
knowing that the electric energy prices in these hours are $10/MWh, $15/MWh,
$22/MWh, $30/MWh, $24/MWh, and $20/MWh, respectively.
Considering these data, we formulate the following LP problem:
maxp1 ;p2 ;p3 ;p4 ;p5 ;p6
subject to
0 p1 10;
0 p2 10;
0 p3 10;
0 p4 10;
0 p5 10;
0 p6 10:
The solution of this problem is (note that a superscript in the variables below
indicates optimal value):
p1 D 0;
p2 D 0;
p3 D 10 MW;
p4 D 10 MW;
p5 D 10 MW;
p6 D 0:
3 equations fobj, eq1a, eq1b, eq2a, eq2b, eq3a, eq3b, eq4a, eq4b,
eq5a, eq5b, eq6a, eq6b;
5 fobj.. z=e=10*p1+15*p2+22*p3+30*p4+24*p5+20*p6-21*(p1+p2+p3+p4+
p5+p6);
284 B Solving Optimization Problems
7 eq1a.. 0=l=p1;
8 eq1b.. p1=l=10;
9 eq2a.. 0=l=p2;
10 eq2b.. p2=l=10;
11 eq3a.. 0=l=p3;
12 eq3b.. p3=l=10;
13 eq4a.. 0=l=p4;
14 eq4b.. p4=l=10;
15 eq5a.. 0=l=p5;
16 eq5b.. p5=l=10;
17 eq6a.. 0=l=p6;
18 eq6b.. p6=l=10;
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 23 variable z.l = 130.000
2 variable p1.l = 0.000
3 variable p2.l = 0.000
4 variable p3.l = 10.000
5 variable p4.l = 10.000
6 variable p5.l = 10.000
7 variable p6.l = 0.000
B.2.1 Formulation
subject to
X X
Aij xi C G`j u` D Bj ; 8j; (B.3b)
i `
X X
Dik xi C H`k u` Ek ; 8k; (B.3c)
i `
xi 2 R; 8i; (B.3d)
y` 2 I; ` D 1; : : : ; p; (B.3e)
where:
• I is the set of integer variables,
• Ci , 8i, and R` , 8`, are the cost coefficients of variables xi , 8i, and y` , 8`,
respectively, in the objective function (B.3a),
• Aij , 8i; G`j , 8`; and Bj are the coefficients that define equality constraints (B.3b),
8j,
• Dik , 8i; H`k , 8`; and Ek are the coefficients that define inequality
constraints (B.3c), 8k, and
• p is the number of integer optimization variables,
In compact form, MILP problem (B.3) can be written as:
minx;y
subject to
Ax C Gy D B; (B.4b)
Dx C Hy E; (B.4c)
x 2 Rn1 ; (B.4d)
y 2 Ip1 ; (B.4e)
where:
• C 2 Rn1 and R 2 Rp1 are the cost coefficient vectors of the variable vectors x
and y, respectively, in objective function (B.2a),
• A 2 Rmn , G 2 Rmp , and B 2 Rm1 are the matrices and vector of coefficients
that define equality constraint (B.2b),
• D 2 Ron , H 2 Rop , and E 2 Ro1 are the matrices and vector of coefficients
that define inequality constraint (B.2c),
Some examples of MILP problems are the unit commitment problem described
in Chap. 7 or the self-scheduling problem analyzed in Chap. 8 of this book.
286 B Solving Optimization Problems
B.2.2 Solution
subject to
2u1 p1 10u1 ;
2u2 p2 10u2 ;
2u3 p3 10u3 ;
2u4 p4 10u4 ;
2u5 p5 10u5 ;
2u6 p6 10u6 ;
u1 ; u2 ; u3 ; u4 ; u5 ; u6 2 f0; 1g:
p1 D 0;
p2 D 0;
p3 D 0;
p4 D 10 MW;
p5 D 10 MW;
B Solving Optimization Problems 287
p6 D 0;
u1 D 0;
u2 D 0;
u3 D 0;
u4 D 1;
u5 D 1;
u6 D 0:
Contrary to the solution of Illustrative Example B.1, we can see that in this
example it is not optimal to turn on the generating unit at the third time period
as a result of its fixed cost.
This solution renders an objective function value of $70.
A simple input GAMS [3] file to solve Illustrative Example B.2 is provided
below:
1 variables z, p1, p2, p3, p4, p5, p6;
5 equations fobj, eq1a, eq1b, eq2a, eq2b, eq3a, eq3b, eq4a, eq4b,
eq5a, eq5b, eq6a, eq6b;
7 fobj.. z=e=10*p1+15*p2+22*p3+30*p4+24*p5+20*p6-21*(p1+p2+p3+p4+
p5+p6)-5*(u1+u2+u3+u4+u5+u6);
9 eq1a.. 2*u1=l=p1;
10 eq1b.. p1=l=10*u1;
11 eq2a.. 2*u2=l=p2;
12 eq2b.. p2=l=10*u2;
13 eq3a.. 2*u3=l=p3;
14 eq3b.. p3=l=10*u3;
15 eq4a.. 2*u4=l=p4;
16 eq4b.. p4=l=10*u4;
17 eq5a.. 2*u5=l=p5;
18 eq5b.. p5=l=10*u5;
19 eq6a.. 2*u6=l=p6;
20 eq6b.. p6=l=10*u6;
25 display z.l, p1.l, p2.l, p3.l, p4.l, p5.l, p6.l, u1.l, u2.l, u3.
l, u4.l, u5.l, u6.l;
288 B Solving Optimization Problems
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 25 variable z.l = 70.000
2 variable p1.l = 0.000
3 variable p2.l = 0.000
4 variable p3.l = 0.000
5 variable p4.l = 10.000
6 variable p5.l = 10.000
7 variable p6.l = 0.000
8 variable u1.l = 0.000
9 variable u2.l = 0.000
10 variable u3.l = 0.000
11 variable u4.l = 1.000
12 variable u5.l = 1.000
13 variable u6.l = 0.000
B.3.1 Formulation
f .x1 ; : : : ; xn / (B.5a)
subject to
where:
• f .x1 ; : : : ; xn /: Rn ! R is the nonlinear objective function (B.5a),
• Aj .x1 ; : : : ; xn /: Rn ! R are the nonlinear functions that define equality
constraints (B.5b), 8j, and
• Dk .x1 ; : : : ; xn /: Rn ! R are the nonlinear functions that define inequality
constraints (B.5c), 8k.
B Solving Optimization Problems 289
f .x/ (B.6a)
subject to
A .x/ D 0; (B.6b)
D .x/ 0; (B.6c)
x 2 Rn ; (B.6d)
where:
• f .x/: Rn ! R is the nonlinear objective function (B.6a),
• A .x/: Rn ! Rm is the nonlinear function that defines equality constraint (B.6b),
and
• D .x/: Rn ! Ro is the nonlinear function that defines inequality con-
straint (B.6c).
Some examples of NLP problems are the state estimation problem described in
Chap. 5 or the ac optimal power flow problem analyzed in Chap. 6 of this book.
B.3.2 Solution
ct D 15pt C 2p2t ; t D 1; : : : ; 6:
subject to
0 p1 10;
0 p2 10;
0 p3 10;
0 p4 10;
0 p5 10;
0 p6 10:
The solution of this problem is (note that a superscript in the variables below
indicates optimal value):
p1 D 0;
p2 D 0;
p3 D 1:75 MW;
p4 D 3:75 MW;
p5 D 2:25 MW;
p6 D 1:25 MW:
3 equations fobj, eq1a, eq1b, eq2a, eq2b, eq3a, eq3b, eq4a, eq4b,
eq5a, eq5b, eq6a, eq6b;
5 fobj.. z=e=10*p1+15*p2+22*p3+30*p4+24*p5+20*p6-15*(p1+p2+p3+p4+
p5+p6)-2*(p1*p1+p2*p2+p3*p3+p4*p4+p5*p5+p6*p6);
7 eq1a.. 0=l=p1;
8 eq1b.. p1=l=10;
9 eq2a.. 0=l=p2;
10 eq2b.. p2=l=10;
11 eq3a.. 0=l=p3;
12 eq3b.. p3=l=10;
13 eq4a.. 0=l=p4;
14 eq4b.. p4=l=10;
15 eq5a.. 0=l=p5;
16 eq5b.. p5=l=10;
B Solving Optimization Problems 291
17 eq6a.. 0=l=p6;
18 eq6b.. p6=l=10;
The part of the GAMS output file that provides the optimal solution is given
below:
1 ---- 23 variable z.l = 47.500
2 variable p1.l = 0.000
3 variable p2.l = 0.000
4 variable p3.l = 1.750
5 variable p4.l = 3.750
6 variable p5.l = 2.250
7 variable p6.l = 1.250
This appendix provides brief formal descriptions of the three types of optimization
problems considered in this book, namely, LP problems, MILP problems, and NLP
problems. A detailed description of these problems can be found in the monograph
by Sioshansi and Conejo [4].
References
A Reactive power, 44
ac source Voltages, 21
Angular frequency, 18
Ordinary frequency, 18 E
Period, 18 Economic dispatch, 197, 209
Phasorial representation, 18 Capacity limits of transmission lines, 212
Root mean square, 18 Cost function, 213
Sinusoidal representation, 18 Description, 211
Active and reactive power decoupling, Example, 210, 214
81 Example: impact of transmission capacity
Admittance matrix, 101 limits, 215
Alternating current (ac), 17 Example: locational marginal prices, 216
Example: marginal prices, 211
Formulation, 213
B GAMS code, 225
Balanced three-phase circuits, 17 Locational marginal prices, 216
Active power, 43 Marginal prices, 211
Apparent power, 44 Power balance, 213
Balanced three-phase sequence, 18 Power bounds, 212
Common star connection, 38 Power flows through transmission lines,
Currents, 23 211
Delta currents, 25 Reference node, 212
Equivalence wye-delta, 28 Electrical line, 71
Exercises, 52 Capacity, 79
How to measure power?, 44 Efficiency, 80
Instantaneous power, 43 Geometric mean radius, 78
Line currents, 23 Inductance, 76
Line voltages, 22 Model, 71
Magnitudes, 21 Parameters, 75
Negative sequence, 20 Reactance, 79
Phase voltages, 22 Regulation, 80
Positive sequence, 19 Resistance, 75
Power, 42 Resistivity, 75
G Formulation, 217
Generator and motor, 56 GAMS code, 226
Efficiency, 58 Newton-Raphson method, 111
Three-phase generator, 56
Three-phase motor, 57
O
Optimal power flow, 165
I Active power limits, 168
Introduction, 1 Concluding remarks, 185
dc example, 178
dc formulation, 177
K dc GAMS code, 189
Kirchhoff’s laws, 99 Description, 166
Example, 171
Formulation, 170
L GAMS code, 185
Load, 68 Introduction, 165
Constant impedance, 69 Objective function, 169
Constant power, 71 Power balance, 166
Constant voltage, 71 Power flows through transmission lines,
Induction motor, 69 167
Induction motor efficiency, 70 Reactive power limits, 168
Model, 69–71 Security, 179
Solution, 171
Transmission line limits, 168
M Voltage angle limits, 169
Magnetic constant, 76 Voltage magnitude limits, 169
Market clearing auction, 242 Optimization problems, 281
Bids, 233 Linear programming, 281
Consumer surplus, 244 Linear programming: example, 282
Consumption bid curve, 244 Linear programming: formulation, 281
Example, 248, 252, 257 Linear programming: GAMS code, 283
Formulation, 246 Linear programming: simplex method,
Formulation: multi period, 251 282
Formulation: single period, 247 Linear programming: solution, 282
Formulation: transmission-constrained Mixed-integer linear programming, 284
multi-period, 256 Mixed-integer linear programming:
GAMS code, 264 branch-and-bound methods, 286
Introduction, 234 Mixed-integer linear programming:
Locational marginal prices, 257 example, 286
Market clearing price, 250 Mixed-integer linear programming:
Market operator, 234 formulation, 284
Offers, 233 Mixed-integer linear programming: GAMS
Participants, 242 code, 287
Producer surplus, 244 Mixed-integer linear programming:
Production offer curve, 243 solution, 286
Profit of generating units, 250 Non-linear programming, 288
Social welfare, 244 Non-linear programming: example, 289
Non-linear programming: formulation,
288
N Non-linear programming: GAMS code,
Network-constrained unit commitment, 197 290
Example, 218 Non-linear programming: solution, 289
Index 295
P Power transformer, 58
Per-unit system, 46 Connections, 61
Base value, 48 Denomination, 66
Definition, 46 Model, 67
Example, 47, 50 Per-unit analysis, 66
Procedure, 51 Transformation ratio, 60
Permittivity, 79
Phasor, 18
Power, 42 S
Active power, 43 Scope of the book, 12
Apparent power, 44 What we do, 13
How to measure power?, 44 What we do not do, 13
Instantaneous power, 43 Security-constrained optimal power flow, 179
Reactive power, 44 n 1 security, 180
Power flow, 97 n k security, 180
Applications, 97 Concluding remarks, 185
Concluding remarks, 130 Corrective approach, 180
dc formulation, 121 Description, 180
Decoupled, 119 Example, 182
Distributed slack, 120 Formulation, 180
Equations, 104 GAMS code, 190
Example, 117 Introduction, 179
Example in Octave, 130 Preventive approach, 180
Exercises, 132 Self-scheduling, 234
Introduction, 97 Description, 234
Nodal equations, 98 Example, 237, 240
Outcome, 114 Formulation, 236
Slack, PV, and PQ nodes, 109 GAMS code, 263
Solution, 110 Introduction, 233
Power markets, 10 Self-scheduling and market clearing auction,
Day-ahead market, 12 233
Futures market, 11 Final remarks, 262
Intra-day markets, 12 Introduction, 233
Pool, 11 Sinusoidal ac source, 18
Real-time market, 12 State estimation, 137
Power system Cumulative distribution function, 155
Fundamentals, 17 Erroneous measurement detection, 152
Model components, 55 Erroneous measurement detection: 2 test,
Power system components 152
Examples, 83 Erroneous measurement detection:
Power system operations, 9 Example, 153
Day-ahead operation, 9 Erroneous measurement identification, 154
Hours before power delivery, 10 Erroneous measurement identification:
Minutes before power delivery, 10 Example, 155
Power system structure, 1 Erroneous measurement identification:
Centralized operation, 7 Normalized residual test, 154
Distribution, 4 Estimation, 140
Economic layer, 5 Estimation: Example, 143
Generation, 2 Exercises, 160
Market operation, 8 Measurements, 138
Physical layer, 1 Non-observable, 148
Regulatory layer, 7 Observability, 145
Supply, 4 Observability: Example, 148
Transmission, 3 Observable, 148
296 Index