Você está na página 1de 303

Power Electronics and Power Systems

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.

More information about this series at http://www.springer.com/series/6403


Antonio J. Conejo • Luis Baringo

Power System Operations

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

ISSN 2196-3185 ISSN 2196-3193 (electronic)


Power Electronics and Power Systems
ISBN 978-3-319-69406-1 ISBN 978-3-319-69407-8 (eBook)
https://doi.org/10.1007/978-3-319-69407-8

Library of Congress Control Number: 2017958755

© Springer International Publishing AG 2018


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of
the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology
now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specific statement, that such names are exempt from the relevant
protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book
are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or
the editors give a warranty, express or implied, with respect to the material contained herein or for any
errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

Printed on acid-free paper

This Springer imprint is published by Springer Nature


The registered company is Springer International Publishing AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
To the memory of my father, Policarpo
Conejo, who taught me why induction motors
rotate.
—Antonio J. Conejo

To my parents, Luis and Sacri.


—Luis Baringo
Preface

Power System Operations provides an introduction to power system modeling,


power system steady-state analysis, power system estimation, power system secu-
rity, and electricity markets.
Specifically, this book covers the analysis of three-phase circuits, the modeling
of power system components, the power flow problem, the power system state
estimation problem, and the analysis of power system operation security. It also
provides an overview of electricity markets, including the unit commitment, the
economic dispatch, the self-commitment, and the market clearing problems.
The book embodies a problem-solving approach resulting in an up-to-date
analysis of the most important problems in power system operations, and it includes
many illustrative examples to clarify the power engineering concepts covered.
This textbook is intended for advanced undergraduate and graduate teaching in
power engineering and other engineering disciplines. It is also useful for industry
practitioners since it provides many practical examples developed up to working
algorithms.
This book consists of eight chapters and two appendices.
Chapter 1 provides an introduction to power systems, describing its physical,
economic, and regulatory layers, as well as the way in which such systems are
operated. It also describes how power markets work. Finally, it summarizes the
contents of the book.
Chapter 2 reviews the analysis of three-phase circuits and defines three-phase
voltages and currents; three-phase active, reactive, and apparent powers; and the
per-unit systems. This chapter provides an appropriate background of three-phase
power for the unfamiliar reader, establishing the link between the physical reality
and analytical techniques. It can be skipped by readers with knowledge of three-
phase circuit analysis.
Chapter 3 provides steady-state models for the most common components of a
power system, namely, generators, motors, transformers, lines, and loads.
Chapter 4 addresses the power flow problem, including nodal equations, admit-
tance matrix, power flow equations, solution techniques, and result analysis.

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.

Columbus, Ohio, USA Antonio J. Conejo


Ciudad Real, Spain Luis Baringo
June 2017
Contents

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

2.6 Per-Unit System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46


2.6.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.6.2 Per-Unit System Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.6.3 Definition of Base Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.6.4 Per-Unit Analysis Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.7 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.8 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3 Power System Components: Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.2 Generator and Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.2.1 Three-Phase Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.2.2 Three-Phase Motor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.3 Power Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.3.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.3.2 Connections of a Three-Phase Power Transformer. . . . . . . . . 61
3.3.3 Per-Unit Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.3.4 Model of a Three-Phase Power Transformer . . . . . . . . . . . . . . . 67
3.4 Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.4.1 Constant-Impedance Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.4.2 Induction Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.4.3 Load with Constant Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.4.4 Load with Constant Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.5 Electrical Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.5.1 Equivalent Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.5.2 Parameters of Electrical Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.5.3 Efficiency and Regulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3.5.4 Active and Reactive Power Decoupling . . . . . . . . . . . . . . . . . . . . 81
3.6 Power System Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.7 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
3.8 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4 Power Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4.2 Nodal Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.2.1 Two-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.2.2 n-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.3 Admittance Matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
4.3.1 Two-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.3.2 n-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.4 Power Flow Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.4.1 Two-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.4.2 n-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Contents xi

4.5 Slack, PV, and PQ Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109


4.6 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.6.1 Direct Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.6.2 Newton-Raphson Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
4.6.3 Software Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.7 Outcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.8 Decoupled Power Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
4.9 Distributed Slack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4.10 dc Power Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.10.1 Two-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.10.2 n-Node Power System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4.11 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.12 Octave Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.12.1 Calling Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.12.2 Power Flow Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.13 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
5 Power System State Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.2 Measurements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.3 Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
5.4 Observability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
5.5 Erroneous Measurement Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
5.6 Erroneous Measurement Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
5.7 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5.8 GAMS and Octave Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5.8.1 Estimation Example in GAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5.8.2 Observability Example in Octave . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
5.8.3 Erroneous Measurement Detection Example in Octave. . . . 160
5.9 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
6 Optimal Power Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
6.2 Optimal Power Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
6.2.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
6.2.2 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
6.2.3 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
6.2.4 dc Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
6.3 Security-Constrained Optimal Power Flow . . . . . . . . . . . . . . . . . . . . . . . . . . 179
6.3.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.3.2 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.4 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
xii Contents

6.5 GAMS Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185


6.5.1 Simple OPF Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
6.5.2 Generic OPF Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
6.5.3 dc OPF Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
6.5.4 SCOPF GAMS Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
6.6 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
7 Unit Commitment and Economic Dispatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
7.2 Unit Commitment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
7.2.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
7.2.2 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
7.3 Economic Dispatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
7.3.1 Economic Dispatch Without Network Constraints . . . . . . . . . 209
7.3.2 Economic Dispatch Considering Network Constraints . . . . 211
7.4 Network-Constrained Unit Commitment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
7.5 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
7.6 GAMS Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
7.6.1 Unit Commitment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
7.6.2 Economic Dispatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
7.6.3 Network-Constrained Unit Commitment . . . . . . . . . . . . . . . . . . . 226
7.7 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8 Self-Scheduling and Market Clearing Auction . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2 Self-Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.2.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.2.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.2.3 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.3 Market Clearing Auction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.3.1 Market Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.3.2 Production Offer Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.3.3 Consumption Bid Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.3.4 Social Welfare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.3.5 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.4 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
8.5 GAMS Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
8.5.1 Self-Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
8.5.2 Market Clearing Auction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
8.6 End-of-Chapter Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Contents xiii

Appendix A Solving Systems of Nonlinear Equations . . . . . . . . . . . . . . . . . . . . . 271


A.1 Newton-Raphson Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
A.1.1 One Unknown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
A.1.2 Many Unknowns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
A.2 Direct Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
A.2.1 One Unknown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
A.2.2 Many Unknowns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
A.3 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

Appendix B Solving Optimization Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281


B.1 Linear Programming Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
B.1.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
B.1.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
B.2 Mixed-Integer Linear Programming Problems . . . . . . . . . . . . . . . . . . . . . . . 284
B.2.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
B.2.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
B.3 Nonlinear Programming Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
B.3.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
B.3.2 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
B.4 Summary and Further Reading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

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

This introductory chapter provides a general overview of power systems and is


organized as follows. Section 1.2 describes the structure of power systems, including
their physical, economic, and regulatory layers. Section 1.3 describes the operation
of power systems, from 1-day ahead to minutes before power delivery. Section 1.4
overviews the structure and working of power markets. Section 1.5 clarifies the
scope of this book. Finally, Sect. 1.6 proposes some exercises.

1.2 Power System Structure

We briefly describe below the physical, economic, and regulatory layers of power
systems.

1.2.1 Physical Layer

The physical layer of a power system includes four subsystems, namely:


1. generation,
2. transmission,

© Springer International Publishing AG 2018 1


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_1
2 1 Power Systems

Transformer Transformer
Transformer
400 kV
13.8 kV 20 kV 110 V per phase

Generation Transmission Distribution Supply

Fig. 1.1 Physical layer of a power system

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

Nuclear Fossil fuel Hydro Wind Solar

Fig. 1.2 Generation subsystem

Once built, hydroelectric facilities entail no environmental impact and have


high operational flexibility. However, the operation of hydroelectric power plants
depends on a limited resource, namely, its reservoir water content. Thus, their opera-
tion is constrained. Moreover, suitable geographical locations to build hydroelectric
power plants are limited, and in many places exhausted.
Weather-dependent renewable facilities such as solar- and wind-based power
plants entail no environmental impact. However, their production is stochastic
(variable and, to some extent, unknown in advance). Thus, they need back-up from
controllable (dispatchable) facilities such as natural gas-fired power plants.
Finally, it is important to remark that storage facilities help integrating an
increasing level of weather-dependent renewable production since such facilities
allow shifting the excess of production in low demand periods (e.g., during the
night) to high-demand periods (e.g., in the middle of the day).
Figure 1.2 illustrates the generation subsystem, including nuclear, fossil fuel
(coal, oil, gas), hydro, wind, and solar power plants.

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

Fig. 1.3 Transmission subsystem

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

Fig. 1.4 Distribution subsystem

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.

1.2.2 Economic Layer

Depending on the time framework, we distinguish different problems in any power


system:
1. Electric energy systems have to be built, reinforced, and expanded, which leads
to long-term planning problems, spanning from 1 to 20 years into the future.
2. Once built, these systems need to be operated to supply the electrical demand
while pursuing an economic objective (e.g., minimum supply cost) and satisfying
technical constraints. Operations problems span from 1 month to minutes.
3. Finally, minutes prior to power delivery, supply security becomes paramount.
The objective is then to supply the demand with security with respect to eventual
contingencies involving both generating units, transmission lines, and/or power
transformers. At this control stage, economic issues play a secondary role.
6 1 Power Systems

Table 1.1 From long-term Long-term Operation


planning to real-time control
planning planning Operation Control
1 year to 1 month to 1 week to 10 min to
20 years 1 week 10 min real time

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

Power system operations involve decisions within a time frame of 1 month to


minutes in advance to power delivery. We distinguish three different operation
decisions, namely:
1. operation planning decisions that are made around 1 month prior to power
delivery and that pertain typically to fuel procurement (nuclear fuel, coal, oil,
1.2 Power System Structure 7

and natural gas), hydro resource management, and preventive maintenance of


both production and transmission/distribution facilities,
2. operation decisions within a day that involve the procurement of reserves (backup
power ready to take over if contingencies occur) and the scheduling of generating
units for production, and
3. operation decisions within minutes of power delivery that involve the actual
dispatching of generating units ensuring a reliable supply of energy while com-
plying with technical requirements, particularly voltage levels and transmission
line limits.

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.

1.2.3 Regulatory Layer

Electric energy systems are managed either in a centralized (optimal control)


manner or through a market. These two regulatory and management approaches
are briefly described below.
Additional details regarding the regulatory layer can be found in the monograph
by Pérez-Arriaga et al. [9].

1.2.3.1 Centralized Operation

In a centralized approach, a central operator has perfect knowledge of the entire


system, including both economical and technical data. Then, using optimal control
principles, this central operator plans and operates the system to supply the demand
at minimum cost. It is important to realize that the central operator makes all
decisions, while power producers are simply told when and how to operate their
own production units.
8 1 Power Systems

Perfect Information

Producers Central Operator Consumers

Fig. 1.5 Centralized operation

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.

1.2.3.2 Market Operation

A market operation involves both regulated and competitive activities.


On the one hand, power producers compete freely by building and operating
production facilities. The actual trading of electricity is generally organized via
a futures market and a pool. Transactions in the futures market are long-term
and materialize in contracts and options spanning from 1 week to several years.
Transactions in the pool are short-term and generally involve a day-ahead market
and a real-time or balancing market. The day-ahead market is cleared once a day,
1 day prior to power delivery, while the real-time market is cleared 10–20 min in
advance to power delivery.
On the other hand, the transmission grid is operated under strict regulatory
criteria to ensure an unimpeded and efficient energy trade among power producers
and consumers. Similarly, the operation of the distribution grids is regulated to
enable a free trade of electricity at the retail level. Both transmission and distribution
grids are reinforced/expanded by network planners pursuing maximum social
welfare.
1.3 Power System Operations 9

Producers Market Operator Consumers

Prices, Productions, and Consumptions

Fig. 1.6 Market operation

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.

1.3 Power System Operations

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.

1.3.1 Day-Ahead Operation

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

1.3.2 Hours Before Power Delivery

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.

1.3.3 Minutes Before Power Delivery

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.

1.4 Power Markets

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

Table 1.2 Structure of Futures market: Power pool:


power markets
3 years to 1 week 1 day to 10 min
Contracts Day-ahead auction
Options Intra-day auctions
Real-time auction

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].

1.4.1 Futures Market

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

1.4.2.1 Day-Ahead Market

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.

1.4.2.2 Intra-Day Markets

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.

1.4.2.3 Real-Time Market

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.

1.5 Scope of the Book

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 first establish the fundamentals of power system analysis by reviewing three-


phase circuits (Chap. 2) and by describing the most common models of power
system components (Chap. 3).
Next, we derive and analyze in detail the power flow equations and the power
flow problem (Chap. 4). The power flow equations constitute a precise physical
representation of how electricity flows through networks and constitute the key
mathematical component of any power system analysis.
The state estimation problem is considered next (Chap. 5). This problem filters
measurements of diverse nature, which necessarily contain errors, to derive an
accurate description of the state of the system in terms of its state variables. It
provides the data required for any operation decision or analysis.
The optimal power flow and the security-constrained optimal power flow are
the tools used by the system operators to ensure a secure power system operation
minutes prior to power delivery. These problems are considered in Chap. 6.
The daily operation is considered in Chaps. 7 and 8, which provide the USA and
European approaches, respectively. Chapter 7 focuses on the unit commitment and
economic dispatch problems, while Chap. 8 focuses on the self-scheduling problem
and on market clearing algorithms.

1.5.2 What We Do Not 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

Table 1.3 What we do and what we do not do


What we do What we do not do
Three-phase circuit analysis Fault analysis
Power system component modeling Stability analysis
Power flow analysis Electromagnetic transient analysis
State estimation Harmonic analysis
Optimal power flow Operation planning
Security-constrained optimal power flow Long-term expansion planning
Unit commitment
Economic dispatch
Self-scheduling
Market clearing

Finally, long-term reinforcement and investment problems are not considered in


this book either. The interested reader is referred to the monograph by Conejo et al.
[2].
For the sake of clarity, Table 1.3 illustrates what we do and what we do not do in
this book.

1.6 End-of-Chapter Exercises

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

5. GNU Octave (2016). Available at www.gnu.org/software/octave


6. Gómez-Expósito, A., Conejo, A.J., Cañizares, C.: Electric Energy Systems: Analysis and
Operation. Taylor and Francis, Boca Raton (2008)
7. Kirschen, D.S., Strbac, G.: Fundamentals of Power System Economics. Wiley, Hoboken (2004)
8. Kothari, D.P., Nagrath, I.J.: Modern Power System Analysis, 4th edn. Tata McGraw Hill
Education Private Limited, New Delhi (2011)
9. Pérez-Arriaga, J.I. (ed.): Regulation of the Power Sector. Springer, London (2013)
10. PJM (2016). Available at www.pjm.com/library/manuals.aspx
11. Schweppe, F.C., Caramanis, M.C., Tabors, R.D., Bohn, R.E.: Spot Pricing of Electricity.
Springer, New York (1988)
12. Sulzberger, C.L.: Triumph of AC – from Pearl Street to Niagara. IEEE Power Energy Mag.
1(3), 64–67 (2003)
13. Sulzberger, C.L.: Triumph of AC, part 2 – the battle of the currents. IEEE Power Energy Mag.
1(4), 70–73 (2003)
14. Wood, A.J., Wollenberg, B.F., Sheblé, G.B.: Power Generation, Operation, and Control, 3rd
edn. Wiley, Hoboken (2013)
Chapter 2
Power System Fundamentals: Balanced
Three-Phase Circuits

This chapter reviews the fundamentals of balanced three-phase alternating current


(ac) circuits. First, we define positive and negative balanced three-phase sequences.
Second, we analyze balanced three-phase voltages and currents. Third, the different
types of power are defined and measurements techniques for power are briefly
reviewed. Fourth, we provide an overview of the analysis of balanced three-phase
circuits using the per-unit system. This chapter provides an appropriate background
of three-phase power for the unfamiliar reader, establishing the link between
the physical reality and analytical techniques. It can be skipped by readers with
knowledge of three-phase circuit analysis.

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.

© Springer International Publishing AG 2018 17


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_2
18 2 Power System Fundamentals: Balanced Three-Phase Circuits

2.2 Balanced Three-Phase Sequences

There are two ways of representing an ac source:


1. Using a sinusoidal representation:
p
a.t/ D 2Asin .!t C /; (2.1)

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

where T is the period (measured in seconds).


The angular frequency ! is defined as the rate of change of the phase of the
sinusoidal source and is computed as:

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:

aA .t/ C aB .t/ C aC .t/ D 0: (2.6)

The reader is encouraged to verify that (2.6) is correct.


We may also represent the balanced sinusoidal sources in (2.5) using phasors,
i.e.:
8
ˆ N
<AA D A† ;
ˆ
AN D A†  2 ; (2.7)
ˆ B 3
:̂AN D A† C 2 :
C 3

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

Fig. 2.2 Balanced


three-phase positive sequence
A¯C

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

Therefore, in power systems, a balanced three-phase positive sequence is gener-


ally represented as RST, while a negative one as RTS.

2.3 Balanced Three-Phase Voltages and Currents

In this section, we analyze voltages and currents in balanced three-phase circuits


with different connections.

2.3.1 Balanced Three-Phase Voltages

In a balanced three-phase circuit, we identify two balanced voltage sequences,


namely phase voltages and line voltages, as described below and illustrated in
Fig. 2.4.
Phase voltages are defined as the voltages between each phase and a reference
point known as “common star point,” usually denoted as N (upper plot of Fig. 2.4).
That is:

Fig. 2.4 Phase (upper plot) R


and line (lower plot) voltages +
S
in a balanced three-phase +
T
network ŪR +
ŪS
ŪT
− − −
N

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

where UF is the magnitude of the phase voltage.


Since phase voltages constitute a balanced sequence, we have:

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)

i.e., the line voltages also constitute a balanced sequence.


Phasor diagrams for both phase voltages and line voltages are shown in Fig. 2.5.

Fig. 2.5 Balanced phase and ŪT R ŪRS


ŪT
line voltages
30◦
90◦
30◦
ŪR
90◦
90◦

ŪS
30◦

ŪST
2.3 Balanced Three-Phase Voltages and Currents 23

2.3.2 Balanced Three-Phase Currents

In a balanced three-phase network, the line currents constitute a balanced sequence,


i.e.:
8
ˆ N ı
<IR D IL †.'  0/ ;
ˆ
IN D IL †.'  120/ı ; (2.13)
ˆS
:̂IN D I †.' C 120/ı ;
T L

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:

INR C INS C INT D 0: (2.14)

Illustrative Example 2.1 Currents in a balanced three-phase delta-connected load

We consider the balanced three-phase delta-connected load (impedance ZN per


phase) depicted in Fig. 2.7. We show below that if this load is supplied by a balanced
three-phase line-current sequence (INR , INS , INT ), then the delta currents, i.e., the currents
“inside” the delta (INRS , INST , INTR ), constitute a balanced sequence as well.
From Fig. 2.7, we obtain:

Fig. 2.6 Balanced line I¯R


currents -
I¯S
-
I¯T
-
Fig. 2.7 Balanced delta
R - r
currents
I¯R ?I¯RS
Z̄ Z̄
I¯S Z̄ ¯
S - r- 6
r IT R
I¯T I¯ST
T -
24 2 Power System Fundamentals: Balanced Three-Phase Circuits

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:

INR C INS C INT D 0

and:

INS C INT C INR D 0;

subtracting the above two expressions renders:

INRS C INST C INTR D 0: (2.16)

Considering (2.15) and (2.16), we obtain:


8
<  INRS C INST D INS ;
 INST C INTR D INT ;
: N
IRS C INST C INTR D 0;

which in matrix form is:


2 32 3 2 3
1 1 0 INRS INS
4 0 1 1 5 4 INST 5 D 4 INT 5 :
1 1 1 INTR 0

Solving for the delta currents yields:


2 3 2 31 2 3
INRS 1 1 0 INS
4 INST 5 D 4 0 1 1 5 4 INT 5
INTR 1 1 1 0

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

Thus, we can express delta currents as a function of line currents as:


8
ˆ
ˆ 1 N 
ˆ
ˆ INRS D 2IS  INT ;
ˆ
ˆ 3
<
1 N 
IST D IS  INT ;
ˆ
ˆ 3
ˆ
ˆ
ˆ 1 N 
:̂ITR D IS C 2INT :
3

Since INR C INS C INT D 0, we get:


8
ˆ
ˆ 1 N 
ˆINRS D
ˆ IR  INS ;
ˆ
ˆ 3
<
1 N 
INST D IS  INT ;
ˆ
ˆ 3
ˆ
ˆ
ˆ 1 N 
:̂INTR D IT  INR ;
3
or:
8
ˆ
ˆ 1p N
ˆ
ˆ INRS D 3IR † C 30ı ;
ˆ
ˆ 3
<
1p N
INST D 3IS † C 30ı ;
ˆ
ˆ 3
ˆ
ˆ
ˆ 1p N
:̂INTR D 3IT † C 30ı ;
3
or finally:
8
ˆ 1
ˆ
ˆ
ˆ INRS D p IL † .' C 30/ı ;
ˆ
ˆ 3
< 1
INST D p IL † .'  90/ı ;
ˆ
ˆ 3
ˆ
ˆ
ˆN 1
:̂ITR D p IL † .' C 150/ı :
3

We conclude that if the line currents used to supplied a balanced delta-connected


load constitute a balanced three-phase sequence, then the delta currents INRS , INST ,
and INTR have equal magnitude and equal angle separation, i.e., the delta currents
constitute a balanced three-phase sequence as well.
Figure 2.8 visualizes the relationship between line currents and delta currents in
a balanced three-phase delta-connected load.

26 2 Power System Fundamentals: Balanced Three-Phase Circuits

Fig. 2.8 Balanced line and I¯T


delta currents in a balanced
delta-connected load

I¯T R 30◦ I¯RS

30◦
I¯R

30◦

I¯ST
I¯S

R
I¯R
I¯T R
I¯RS
I¯S
S
I¯ST I¯T
T

Fig. 2.9 Balanced three-phase delta-connected generator

Illustrative Example 2.2 Currents in a balanced three-phase delta-connected gen-


erator
We obtain below the relationships between the line and delta currents in a
balanced delta-connected generator as the one in Fig. 2.9. Note that a simplified
circuit diagram is used to show exclusively the reference directions for the currents.
If instead of a delta-connected load we consider a delta-connected generator, the
current balance equations become (Fig. 2.9):
8
ˆ N N N
<IR C ITR D IRS ;
ˆ
IN C INRS D INST ;
ˆ S
:̂IN C IN D IN :
T ST TR

Since INRS C INST C INTR D 0, we get (see (2.16)):


8
ˆ
ˆ 1 N 
ˆ
ˆ INRS D IS  INR ;
ˆ
ˆ 3
<
1 N 
INST D IT  INS ;
ˆ
ˆ 3
ˆ
ˆ
ˆ 1 N 
:̂INTR D IR  INT ;
3
2.3 Balanced Three-Phase Voltages and Currents 27

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

where IG is the magnitude of the line current, we have:


8
ˆ 1
ˆ
ˆ
ˆ INRS D p IG †  150ı ;
ˆ
ˆ 3
< 1
INST D p IG † C 90ı ; (2.19)
ˆ
ˆ 3
ˆ
ˆ
ˆN 1
:̂ITR D p IG †  30ı :
3

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

Fig. 2.10 Voltage sources: ĒR


Z̄y
wye (upper plot) and delta
− + I¯R
(lower plot) connected ∼ R

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

2.3.3 Equivalence Wye-Delta

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

where IL is the magnitude of the line current. We derive below equivalence


conditions for the wye and delta connections considering the circuits in Fig. 2.10.
On the one hand, these circuits should be equivalent under no load conditions,
i.e., if currents are null:

INR D INS D INT D 0: (2.22)

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

Considering (2.17) and (2.18) renders:


8
ˆ 1
ˆ
ˆ INRS D p INS †  30ı ;
ˆ
ˆ 3
ˆ
< 1 N
INST D p IT †  30ı ; (2.25)
ˆ
ˆ 3
ˆ
ˆ
ˆ 1 N
:̂INTR D p IR †  30ı ;
3

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:

EN A C INRS ZN d D EN S C ZN y INS  ZN y INR C EN R ; (2.27)


30 2 Power System Fundamentals: Balanced Three-Phase Circuits

or:
 
EN A C INRS ZN d D EN R  EN S C INS  INR ZN y : (2.28)

Considering (2.23), we obtain:


p
EN A C INRS ZN d D EN A C 3INR †  150ı ZN y ; (2.29)

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

Fig. 2.11 Illustrative


Z̄iy ĒR
Example 2.3: balanced ¯ Z̄cd I¯T R
three-phase circuit − ∼ + ŪR I R
I¯RS
I¯1
Z̄cd I¯2
Z̄iy Ē S
¯
− ∼ + Ū S I S
I¯ST
Z̄cd
I¯3
Z̄iy Ē T
¯
− ∼ + Ū T I T

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.

Since voltage sources constitute a balanced three-phase positive sequence, we


have:
8
ˆ N
<ER ;
ˆ
EN D ˛N 2 EN R ;
ˆ S
:̂EN D ˛N EN ;
T R

where ˛N D 1†120ı . Additionally note that ˛N 2 D ˛N D 1†120ı


The circuit in Fig. 2.11 is solved below using the mesh-current method [5]:
2 32 3 2 3
2ZN iy C ZN cd  ZN cd  ZN iy IN1 EN R  EN S
4 ZN cd 3ZN cd  ZN cd 5 4 IN2 5 D 4 0 5
ZN iy  ZN cd 2ZN iy C ZN cd IN3 EN S  EN T
32 2 Power System Fundamentals: Balanced Three-Phase Circuits

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

Solving for the currents:


2 3 2 31 2  3
IN1 2ZN iy C ZN cd  ZN cd  ZN iy EN R 1  ˛N 2
4 IN2 5 D 4 ZN cd 3ZN cd  ZN cd 5 4  0 5;

IN3 ZN iy N N
 Zcd 2Ziy C Zcd N N 2
ER ˛  ˛

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

Thus, currents INR , INS , and INT are:


8
ˆ NR D IN1 D EN R
ˆ
ˆ I ;
ˆ
ˆ
ˆ
ˆ ZN iy C 13 ZN cd
ˆ
ˆ
< .˛N  1/ EN R ˛N 2 EN R
INS D IN3  IN1 D D ; (2.37)
ˆ
ˆ
ˆ ZN iy C 13 ZN cd ZN iy C 13 ZN cd
ˆ
ˆ
ˆ
ˆ
ˆINT D IN3 D ˛N EN R
:̂ ;
ZN iy C 13 ZN cd
2.3 Balanced Three-Phase Voltages and Currents 33

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

Finally, voltages U N S , and U


N R, U N T are computed as:
8
ˆ N N N N
<UR D ER  IR Ziy ;
ˆ
N D EN S  INS ZN iy ;
U (2.38)
ˆ S
:̂U
N D EN  IN ZN ;
T T T iy
34 2 Power System Fundamentals: Balanced Three-Phase Circuits

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

Note that (INR ; INS ; INT ), (INRS ; INST ; INTR ), and (U


N R; U
N S; U
N T ) constitute balanced three-
phase positive sequences.
Currents and voltages have been obtained by analyzing the three-phase circuit
depicted in Fig. 2.11. However, note that the resulting equations for line cur-
rents (2.37) and phase voltages (2.38) are decoupled per phase. Thus, instead of
using the three-phase circuit in Fig. 2.11, it is possible to use the three equivalent
single-phase circuits, one per phase, depicted in Fig. 2.12.

Illustrative Example 2.4 Equivalent single-phase circuits
We consider the balanced three-phase circuit depicted in Fig. 2.13. Impedances
ZN id and ZN cy , as well as voltage sources are known. Moreover, voltage sources
constitute a balanced three-phase positive sequence and, thus:
8
ˆ N
<EA ;
ˆ
EN D ˛N 2 EN A ; (2.39)
ˆ B
:̂EN D ˛N EN :
C A
2.3 Balanced Three-Phase Voltages and Currents 35

Fig. 2.12 Illustrative


Example 2.3: equivalent I¯R
single-phase circuits Z̄ iy
1

3 cd
+
∼ E¯R

I¯S
Z̄iy
1

3 cd
+
∼ E¯S

I¯T
Z̄iy
1

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

Fig. 2.13 Illustrative Example 2.4: balanced three-phase circuit

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

Solving for the currents:


2 3 2 31 2 3
IN1 3ZN id  ZN id  ZN id 0
4 IN2 5 D 4 ZN id 2ZN cy C ZN id  ZN cy 5 4 ˛N 2 EN A 5 ;
IN3 ZN id  ZN cy 2ZN cy C ZN id ˛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

Then, we can compute currents INR , INS , and INT as follows:


8  
ˆ
ˆ EN A 1  ˛N 2
ˆ
ˆ INR D IN2 D ;
ˆ
ˆ ZN id C 3ZN cy
ˆ
ˆ
ˆ
<  
EN A ˛N 2  ˛N
INS D IN3  IN2 D ;
ˆ
ˆ
ˆ ZN id C 3ZN cy
ˆ
ˆ
ˆ
ˆ EN A .˛N  1/
ˆN
:̂IT D IN3 D N ;
Zid C 3ZN cy

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:

INRS INST INTR ˛N 2 1


D D D D p †  150ı :
IR NIS NIT 1  ˛N 2 3

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

Fig. 2.14 Illustrative


Example 2.4: equivalent I¯R
1
single-phase circuits Z̄
3 id
Z̄ cy
+ 
∼ 1 ¯
E 1 −a¯ 2
3 A

I¯S
1

3 id
Z̄cy
+ 
∼ 1 ¯
E 1 − a¯ 2
3 B

I¯T
1

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.


2.3.4 Common Star Connection

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

Fig. 2.15 Common star − ∼ +


connection: analysis of circuit
with connection NN 0 Z̄ I¯R
ĒR
− ∼ +

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

Adding these currents, we obtain:

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)

That is, connection NN 0 is immaterial.


Next, we analyze the same network, but in this case without connection NN 0 ,
as depicted in Fig. 2.16. Solving this circuit by the mesh-current method [5], we
obtain:
40 2 Power System Fundamentals: Balanced Three-Phase Circuits

Fig. 2.16 Common star − ∼ +


connection: analysis of circuit
without connection NN 0 Z̄ I¯R
Ē R I¯1
− ∼ +
N N
Z̄ I¯S
Ē S I¯2
− ∼ +

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

Then, line currents can be computed as:


8 1
ˆ
ˆ INR D IN1 D EN R ;
ˆ
ˆ N
< Z
NIS D IN2  IN1 D 1 EN R .˛N  1/ ; (2.49)
ˆ
ˆ
ˆ ZN
:̂IN D IN D 1 EN ;
2
ZN
T T
2.3 Balanced Three-Phase Voltages and Currents 41

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

or, in matrix form:


2 3 2 32 3
EN R ZN 0 0 INR
4 EN S 5 D 4 0 ZN 0 5 4 INS 5 : (2.53)
EN T 0 0 ZN INT

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

Fig. 2.17 Equivalent


single-phase circuits I¯R

+
∼ Ē R

I¯S

+
∼ Ē S

I¯T

+
∼ Ē T

2.4 Instantaneous, Active, Reactive, and Apparent Power

One of the most important magnitudes in three-phase circuits is the power, which is
analyzed in this section.

2.4.1 Definitions

The instantaneous power at any point of a three-phase circuit is defined as:

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)

Thus, considering a balanced three-phase circuit, p.t/ can be computed as:


p p
p.t/ D 2UF sin.!t/ 2IL sin.!t  '/
 
p 2 p 2
C 2UF sin !t  2IL sin !t  '
3 3
2.4 Instantaneous, Active, Reactive, and Apparent Power 43

 
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)

is the three-phase reactive power.


The magnitude of the three-phase complex power (S) is the so-called three-phase
apparent power.

2.4.2 How to Measure Power?

Note that the active power can be computed using either of the two expressions
below:

P D UR IR cos'R C US IS cos'S C UT IT cos'T ; (2.63)

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.

2.5 Why Three-Phase Power?

We illustrate below the economic advantage of three-phase power versus single-


phase power through an example.
2.5 Why Three-Phase Power? 45

We consider the transfer of apparent power S [MVA] over a distance d [km]


with a phase-to-neutral voltage U [kV]. Additionally, we consider that the available
conductor admits a maximum current density ı [A=cm2 ].
Using single-phase ac power, we have:

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

where  is the resistivity of the material used.


Using three-phase ac power, we have:

S3 D S;
p
U3 D 3U; (2.69)
S3 S
I3  p D :
3U3 3U

In this case, the conductor section should be:

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

Note that, on the one hand:

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.

2.6 Per-Unit System

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.

2.6.2 Per-Unit System Definition

Any electrical variable or parameter (voltage, current, power, impedance) can be


expressed as a function of its own units or with respect to a reference value known
as base value, i.e.:
2.6 Per-Unit System 47

Fig. 2.18 Illustrative


Example 2.5: single-phase I
circuit using real magnitudes
+
∼ V = 220 V Z = 55 W

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

Fig. 2.19 Illustrative


Example 2.5: single-phase i
circuit using per-unit
+
∼ v = 1 puV z = 0.5 pu W
magnitudes

Next we can compute the per-unit current i as:

v 1
iD D D 2 puA:
z 0:5

Finally, we can obtain the actual current I as:

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.

2.6.3 Definition of Base Values

An appropriate definition of the base values is as follows:


1. We select a common single-phase base power, typically 1=3 of the rated power
of the component of highest rated power, i.e.:

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

Fig. 2.20 Illustrative G T1 T2 M


Example 2.6: power system L
∼ ∼

Illustrative Example 2.6 Per-unit analysis: base values


We consider the three-phase power system depicted in Fig. 2.20. This system
comprises a generator, two power transformers, a transmission line, and a motor.
The rated powers and voltages of these components are provided below:
• Generator G: 60 MVA, 11 kV.
• Transformer T1 : 60 MVA, 132/12 kV.
• Line L: 70 MVA, 132 kV.
• Transformer T2 : 60 MVA, 125/5 kV.
• Motor M: 80 MVA, 5 kV.
Using these data, we determine below the number of voltage zones, and the base
values of each zone.
Each power transformer divides the system into two voltage zones. Thus, we
have three voltage zones, namely, generator zone (zone 1), line zone (zone 2), and
motor zone (zone 3).
Next, we follow the procedure described above to determine the base values in
each zone:
1. We select the single-phase base power as 1/3 of the rated power of the motor,
80
which has the highest rated power, i.e., SB D D 26:667 MVA. Note that this
3
base-power value is the same for all voltage zones.
2. We fix the base-voltage value of one of the zones as the rated phase voltage of one
of the components of that zone. For example, we select the base-voltage value in
11
the generator zone as the rated phase voltage of the generator, i.e., UB1 D p D
3
6:351 kV.
3. We compute the base-voltage values in other zones by using the transformation
132 11
ratios of transformers that separate each zone, i.e., UB2 D p D 69:859 kV
12 3
5 132 11
and UB3 D p D 2:794 kV.
125 12 3
4. We define the base-current value and the base-impedance value per zone using
the corresponding base-power and base-voltage values, as well as Eqs. (2.79)
and (2.80), respectively. For example, the base-current value in the generator
26:667  106
zone is IB1 D 3
D 4:199 kA, while the base-impedance value in the
6:351
  10 2
69:859  103
line zone is ZB2 D D 183:013 .
26:667  106
Table 2.1 summarizes the base values in each zone.

2.6 Per-Unit System 51

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)

and the line base-voltage value in each zone as:

4
p
UB3i D 3UBi ; (2.82)

then single-phase and three-phase base-current and single-phase and three-phase


base-impedance values coincide. That is:

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.

2.6.4 Per-Unit Analysis Procedure

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

A number of examples to illustrate this procedure to analyze power systems are


provided in Sect. 3.6 of Chap. 3.

2.7 Summary and Further Reading

This chapter provides an overview of the fundamentals of power systems. First, we


define balanced sequences, balanced voltages and currents, and powers. Second,
we illustrate why three-phase power systems are used instead of single-phase ones.
Finally, we provide an introduction to the analysis of power systems considering a
per-unit system, which is used and further analyzed in the following chapters of this
book.
Basic references regarding power system analysis include Kothari and Nagrath
[4] and Duncan Glover et al. [2]. Advanced references include Gómez-Expósito
et al. [3] and Bergen and Vittal [1].

2.8 End-of-Chapter Exercises

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

Impedances ZN i are equal to j5 , impedances ZN ` are equal to j15 , and impedances


ZN RS D ZN ST D ZN TR are equal to j30 .
Using these data:
1. Compute currents INR , INS , and INT , as well as currents INRS , INST , and INTR .
2. Compute voltages U N R1 , UN S1 , and UN T1 , as well as voltages U N R2 , U
N S2 , and U
N T2 .
3. Recompute the above voltages and currents if an impedance of j20  is con-
nected between nodes N and N 0 .
4. Compute the above voltages and currents if impedances ZN RS , ZN ST , and ZN TR are
equal to 10 , j10 , and j10 , respectively. Is it possible in this case to use
the equivalent single-phase circuit?
2.4 Consider a balanced three-phase load that is supplied at a line voltage of 400 kV
and absorbs a line current of 500†  10ı A:
2.8 End-of-Chapter Exercises 53

Ē 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

Fig. 2.21 Exercise 2.3: three-phase circuit

G1 1 T1 2 3 T2 4 G2
L1
∼ ∼

L2 L3

5 7

T3 T4

6 8

C ∼ M

Fig. 2.22 Exercise 2.5: power system

1. Compute the instantaneous power consumed in phases R, S, and T.


2. Compute the instantaneous three-phase power consumed by the load.
3. Compute the reactive and apparent power consumed by the load.
2.5 Consider the three-phase power system depicted in Fig. 2.22. The rated powers
and voltages of the system components are provided below:
• Generators G1 and G2 : 500 MVA, 20 kV.
• Transformers T1 and T2 : 200 MVA, 500/18 kV.
• Transformers T3 and T4 : 150 MVA, 500/20 kV.
• Motor M: 111 MW, cos D 0:8 (inductive), 20 kV.
54 2 Power System Fundamentals: Balanced Three-Phase Circuits

Fig. 2.23 Exercise 2.6: G1 T1


power system L1

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.

© Springer International Publishing AG 2018 55


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_3
56 3 Power System Components: Models

3.2 Generator and Motor

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.

3.2.1 Three-Phase Generator

Figure 3.1 depicts the balance steady-state three-phase model of a three-phase


generator. This is the simplest model of a synchronous machine functioning as a
generator. Analyzing synchronous generators is beyond the scope of this book. The
interested reader is referred to [2].
In the model in Fig. 3.1:
• eN R , eN S , and eN T are the open-circuit voltages per phase,
• uN R , uN S , and uN T are the phase voltages,
• NiR , NiS , and NiT are the phase currents, and
• zNi represents the internal impedance per phase of the generator.
Note that all these magnitudes are represented in per unit as described in Sect. 2.6
of Chap. 2.
The matrix equation that describes the operation of the generator depicted in
Fig. 3.1 is as follows:
2 3 2 3 2 32 3
uN R eN R zNi 0 0 NiR
4 uN S 5 D 4 eN S 5  4 0 zNi 0 5 4 NiS 5 : (3.1)
uN T eN T 0 0 zNi NiT

Observe that Fig. 3.1 represents a wye-connected three-phase generator. A delta-


connected three-phase generator can be represented by an equivalent wye-connected
three-phase generator and, thus, the matrix equation (3.1) is general.

Fig. 3.1 Model of a balanced ēR


three-phase generator z̄i īR
− ∼ + ūR

ēS
z̄i īS
− ∼ + ūS
N
ēT
z̄i īT
− ∼ + ūT
3.2 Generator and Motor 57

Matrix equation (3.1) decouples per phase, i.e.:


8
ˆ N
<uN R D eN R  zNi iR ;
ˆ
uN D eN S  zNiNiS ; (3.2)
ˆ S
:̂uN D eN  zN Ni :
T T i T

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)

where uN , eN , and Ni refer to phase R.

3.2.2 Three-Phase Motor

Figure 3.3 depicts the balanced steady-state three-phase model of a three-phase


motor. This is the simplest model of a synchronous machine functioning as a motor.
Analyzing synchronous motors is beyond the scope of this book. The interested
reader is referred to [2].
The matrix equation describing the model in Fig. 3.3 is as follows:
2 3 2 3 2 32 3
uN R eN R zNi 0 0 NiR
4 uN S 5 D 4 eN S 5 C 4 0 zNi 0 5 4 NiS 5 : (3.4)
uN T eN T 0 0 zNi NiT

Fig. 3.2 Equivalent


+
single-phase model of a i¯
three-phase generator z̄i

+ ū
∼ ē
− −

Fig. 3.3 Model of a balanced e¯R


three-phase motor z̄i i¯R
− ∼ + ūR

e¯S
z̄i i¯S
− ∼ + ūS
N
e¯T
z̄i i¯T
− ∼ + ūT
58 3 Power System Components: Models

Fig. 3.4 Equivalent


+
single-phase model of a i¯
three-phase motor z̄i

+ ū
∼ ē
− −

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)

where uN , eN , and Ni refer to phase R.


An electrical motor transforms electrical power into mechanical power. Thus, we
define the per-unit efficiency of a motor as the output power (mechanical power)
divided by the input power (electrical power), i.e.:

Pout Pmec
D D : (3.6)
Pin Pele

3.3 Power Transformer

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

Fig. 3.5 Three-phase wye-wye connected power transformer

In the following sections we first provide definitions related to power transform-


ers. Second, we analyze alternative connections of power transformers. Third, we
analyze the operation of power transformers using the per-unit system described in
Sect. 2.6 of Chap. 2. Finally, we provide single-phase equivalent models for power
transformers.

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

• Secondary line currents: INR0 , INS0 , INT0 .


• Secondary delta currents (if they exist): INRS 0
, INST
0
, INTR
0
.
Primary and secondary voltages are shown in Fig. 3.6 for a three-phase wye-wye
connected power transformer. Figure 3.7 shows the relevant primary and secondary
currents for this transformer.
We define the transformation ratio of a three-phase transformer as:

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

3.3.2 Connections of a Three-Phase Power Transformer

The transformation ratios of three-phase power transformers depend on the connec-


tion of the primary and secondary windings. This is analyzed below for some of the
most common connections.

3.3.2.1 Wye-Wye Connection

The simplest connection for a three-phase power transformer is primary wind-


ing wye-connected and secondary winding wye-connected, as in the transformer
depicted in the upper plot of Fig. 3.8.
In this case, note that by construction:

Ū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

ŪW = ŪT ŪV = ŪS

Fig. 3.8 Voltage relationships in a wye-wye connected three-phase power transformer


62 3 Power System Components: Models

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

Observe that U N R and U


N R0 are in phase as indicated in the lower plot of Fig. 3.8. If,
on the other hand, the wye-wye connection is the one depicted in the upper plot of
Fig. 3.9, then the phase difference between U N R and U
N R0 is 180ı .
Finally, it is simple to obtain the relationship between primary and secondary
currents considering the energy conservation law. Since:
p p
SD 3UL IL D 3UL0 IL0 ; (3.11)

then:
UL N
IL0 D IL D 0 IL ; (3.12)
UL0 N

or:

IL0 N
D 0: (3.13)
IL N

3.3.2.2 Wye-Delta Connection

A three-phase wye-delta connected power transformer is depicted in the upper plot


of Fig. 3.10. In this case we have:
3.3 Power Transformer 63

Ū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

Ū S =−U¯ V ŪT = −U¯W




N N

ŪW Ū V

ŪW = ŪT Ū R = −U¯U ŪV = ŪS

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
:

Then, the three-phase transformer ratio is:


p p
UL 3UF 3UU p N
D D D 3 0: (3.15)
UL0 0
UF UU0
N

Observe that voltages U N R and U


N R0 are not in phase as shown in the lower plot of
N R is leading 30ı with respect to U
Fig. 3.10. Voltage U 0 N R.
64 3 Power System Components: Models


+ Ū 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

Fig. 3.10 Voltage relationships in a wye-delta connected three-phase power transformer

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

3.3.2.3 Wye-Zigzag Connection

A three-phase wye-zigzag connected power transformer is shown in the upper plot


of Fig. 3.11. In this case we have:
8
ˆ
ˆU
ˆ NU D U
N R and UN U0 D p2 U N R0 ;
ˆ
ˆ 3
ˆ
ˆ
ˆ
<
U N S and U
NV D U N V0 D p2 UN S0 ; (3.17)
ˆ
ˆ 3
ˆ
ˆ
ˆ
ˆ
ˆN N T and UNW 0 2 N0
:̂UW D U Dp U T:
3
3.3 Power Transformer 65

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

ŪW = ŪT Ū R ŪV = Ū S

Fig. 3.11 Voltage relationships in a wye-zigzag connected three-phase power transformer

Observe that U N R and U


N R0 are not in phase as shown in the lower plot of Fig. 3.11.
N R is lagging 150ı with respect to U
Voltage U 0 N R.
The three-phase transformer ratio in this case is:
p p
UL 3UF 3UU 2 UU 2 N
0 D p D 3 0 Dp 0 D p : (3.18)
UL 0
3UF U
2 U 3 UU 3 N0

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

Other connections regarding the primary and secondary windings of three-phase


power transformers are possible. However, their analysis is not different than the
one above. The interested reader is encouraged to explore alternative connections.
66 3 Power System Components: Models

Fig. 3.12 Relationship 12


between R and R0 in a Yd11 R (high)
power transformer 11
30◦
R  (low)
Yd11

low −30◦ high

low +30◦ high

3.3.2.4 Denomination of Power Transformers

Three-phase power transformers are named according to the following conven-


tion:
1. A wye connection is represented by “Y” in the high-voltage side and by “y” in
the low-voltage side. Analogously, a delta connection is represented by “D” and
“d” in the high- and low-voltage sides, respectively, while a zigzag connection is
represented by “Z” and “z” in the high- and low-voltage sides, respectively.
2. If the common star point is accessible, it is denoted by “N” and “N” in the high-
and low-voltage sides, respectively.
3. The lagging of the low-voltage phasor with respect to the high-voltage one is
indicated in hours, i.e., in multiples of 30ı .
For instance, using the above naming convention, the three-phase power trans-
former in Fig. 3.8 is a YNyn0 transformer, the one in Fig. 3.9 a YNyn6 transformer,
the one in Fig. 3.10 a YNd11 transformer, and the one in Fig. 3.11 a YNzn5
transformer.
Figure 3.12 shows the relationship between the lag of the low-voltage phasor (R0 )
with respect to the high-voltage phasor (R) in a Yd11 transformer. The phase origin
is selected so that R corresponds with the imaginary axis and, thus it can be viewed
as the minute needle of a clock that points at 12. Then, the hour needle pointing at
11 corresponds to R0 .

3.3.3 Per-Unit Analysis

As explained in Sect. 2.6 of Chap. 2, base values, if appropriately selected, result


in a drastic simplification in the analysis of three-phase circuits. This simplification
is very important in power systems that include power transformers. If base values
in these systems are selected to strictly comply with the transformation ratios of
3.3 Power Transformer 67

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.3.4 Model of a Three-Phase Power Transformer

The per-unit matrix equation describing the functioning of a balanced three-phase


power transformer is given below:
2 3 2 3 2 32 3
uN RA uN RB zNK 0 0 NiR
4 uN SA 5  4 uN SB 5 D 4 0 zNK 0 5 4 NiS 5 : (3.20)
uN TA uN TB 0 0 zNK NiT
68 3 Power System Components: Models

Fig. 3.13 Model of a z̄K


three-phase power ūRA ūRB
transformer in per unit
i¯R
z̄K
ūSA ūSB
i¯S
z̄K
ūTA ūT B
i¯T

Fig. 3.14 Equivalent z̄ K


single-phase model of a i¯
three-phase power + +
transformer ūA ūB
− −

This matrix equation corresponds to the model depicted in Fig. 3.13.


Note that the transformer matrix equation is decoupled per phase, i.e.:
8
ˆ N
<uN RA  uN RB D zNk iR ;
ˆ
uN  uN SB D zNk NiS ; (3.21)
ˆ SA
:̂uN  uN D zN Ni :
TA TB k T

Therefore, an equivalent single-phase model can be derived, as shown in Fig. 3.14.


In this single-phase model we have:

uN A  uN B D zNK Ni; (3.22)

where uN A , uN B , and Ni refer to phase R.

3.4 Load

According to its characteristics, we distinguish four types of loads, namely:


1. constant-impedance load,
2. induction motor,
3. load with constant power consumption, and
4. load with constant voltage.
These types of loads are described in the sections below.
3.4 Load 69

Fig. 3.15 Model of a z̄ C


balanced three-phase ū R
impedance load i¯R
z̄ C
ū S N
i¯S
z̄ C
ū T
i¯T

Fig. 3.16 Equivalent z̄C


single-phase model of a ī
balanced three-phase +
impedance load ū

3.4.1 Constant-Impedance Load

The power consumption of a constant-impedance load depends on the voltage at the


node at which the load is connected.
A per-unit model for a three-phase impedance load is provided below:
2 3 2 32 3
uN R zNC 0 0 NiR
4 uN S 5 D 4 0 zNC 0 5 4 NiS 5 ; (3.23)
uN T 0 0 zNC NiT

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:

uN D zNC Ni; (3.24)

where uN and Ni refer to phase R.


It is relevant to note that a three-phase delta-connected load can be easily
transformed into a wye-connected one, and then use the model in Fig. 3.15. This
transformation is explained in Sect. 2.3.3 of Chap. 2.

3.4.2 Induction Motor

A three-phase induction motor is a particular impedance load. It can be represented


using the model below:
70 3 Power System Components: Models

Fig. 3.17 Model of a r jx


three-phase induction motor ūR
i¯R
r jx
ūS N
i¯S
r jx
ūT
i¯T

Fig. 3.18 Equivalent r jx


¯
single-phase model of a c -i
three-phase induction motor +

c−

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:

uN D .r C jx/ Ni; (3.26)

where uN and Ni refer to phase R.


Finally, we define the per-unit efficiency of the induction motor as the output
power (mechanical power) divided by the input power (electrical power), i.e.:

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

Fig. 3.20 Equivalent


single-phase model of a +
balanced three-phase load
with constant voltage
∼ ū

3.4.3 Load with Constant Power

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.

3.4.4 Load with Constant Voltage

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.

3.5 Electrical Line

This section describes other key component of any power system: the electrical line.

3.5.1 Equivalent Circuit

A three-phase electrical line can be represented using the -model depicted


in Fig. 3.21 and the corresponding equivalent single-phase circuit in Fig. 3.22.
This model implies that conductors are symmetrically arranged with respect to
themselves and ground. It comprises the series impedance of the line, R C jX, and
Cy
its shunt capacitance, which is divided into two identical parts, , placed at the
2
sending- and receiving-ends of the line.
72 3 Power System Components: Models

Fig. 3.21 -model of a R jX


three-phase electrical line
R R

R jX
S S

R jX
T T

Cy Cy Cy Cy Cy Cy
2 2 2 2 2 2

N N

Fig. 3.22 Equivalent R jX


single-phase circuit of a
three-phase electrical line
Cy Cy
2 2

Fig. 3.23 Equivalent R+ jX


single-phase circuit of a
three-phase electrical line
with negligible shunt
capacitance

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

Table 3.1 Parameters of the Parameter Value


electrical line in Illustrative
Example 3.1 Resistance [] 10
Reactance [] 100
Capacitance [F] 1
Nominal voltage [kV] 400
Frequency [Hz] 60

Fig. 3.24 Illustrative 10 W j 100 W


Example 3.1: equivalent I¯S I¯L I¯R
single-phase circuit of an + ¯shunt I¯Rshunt +
electrical line ?
IS

ŪS 1 · 10−6 1 · 10−6 ŪR


F F
2 2
− −

Illustrative Example 3.1 Model of electrical lines


We consider a three-phase electrical line whose characteristics are provided in
Table 3.1. This line is used to supply a balanced three-phase load of 80 MW at
nominal voltage with a power factor 0.8 inductive.
Using these data, we compute:
1. The voltage at the sending-end of the line.
2. The complex power supplied at the sending-end of the line.
The equivalent single-phase circuit of this line is depicted in Fig. 3.24.
The single-phase complex power absorbed by the load is:

.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

Then, currents INR and INRshunt can be computed as:

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:

INL D INR C INRshunt D 123:2415†  20:4560ı A;

while the voltage at the sending-end of the line is:

NS D U
U N R C INL .R C jX/ D 236:6632†2:6922ı kV:

Then, currents INSshunt and INS are computed as:

N S j! Cy D 44:6100†92:6922ı A;
INSshunt D U
2
and:

INS D INSshunt C INL D 113:3845†0:7526ı A;

respectively.
Finally, the single-phase complex power supplied at the sending-end of the line is

N S INS D .26:819 C j0:90822/ MVA D 26:834†1:9396ı MVA:


SN S D U

Illustrative Example 3.2 Simplified model of electrical lines
We solve Illustrative Example 3.1 considering that:
1. The shunt capacitances can be neglected.
2. The shunt capacitances and the series resistance can be neglected.
If the shunt capacitances are neglected, we obtain the equivalent single-phase
circuit depicted in Fig. 3.25.
Then, the current through the line can be computed as:

SN 
INL D INR D INS D R D 144:3376†  36:8699ı A;
U NR

while the voltage at the sending-end of the line is:

NS D U
U N R C INL .R C jX/ D 240:9919†2:5402ı kV:

Fig. 3.25 Illustrative I¯S I¯L 10+j 100 I¯R


Example 3.2: equivalent
single-phase circuit of the + +
electrical line with neglected ŪS ŪR
− −
shunt capacitances
3.5 Electrical Line 75

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


3.5.2 Parameters of Electrical Lines

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

The resistance per phase is:


`
RD ; (3.30)
S
where:
• S is the conductor section accounting for the skin effect [1],
• ` is the line length, and
•  is the resistivity of the conductor material.

Illustrative Example 3.3 Resistance of an aluminum conductor


We consider an aluminum conductor whose diameter and length are 5 cm and
1000 m, respectively. The resistivity of aluminum at 20ı C is 2:82  108   m:
Thus, we compute the resistance of the considered conductor using (3.30) as:
1000
R D 2:82  108  0:05 2 D 0:0144 :
 2

76 3 Power System Components: Models

The resistivity of most materials varies with temperature according to the


following equation:

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

For the sake of illustration, we consider a balanced three-phase electrical line


with symmetrically arranged conductors and including one conductor per phase,
as schematically depicted in Fig. 3.26.
In this case, the induction coefficient per phase and per unit length is [1, 3]:

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.

Fig. 3.26 Balanced


three-phase electrical line r
with symmetrically arranged
conductors and one conductor
per phase
D D

D
3.5 Electrical Line 77

Illustrative Example 3.4 Inductance of a balanced three-phase electric line


We consider the electrical line depicted in Fig. 3.26. It is a balanced three-phase
electric line with symmetrically arranged conductors and one conductor per phase.
The distance between phases is D D 10 m and the radius of the conductor in each
phase is r D 5 cm. We compute below the induction coefficient per phase of this
line.
This induction coefficient per phase can be directly computed using (3.32):

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

Phase T Phase S Phase R


Position iii ...

Phase S Phase R Phase T


Position ii ...

Phase R Phase T Phase S


Position i ...

Fig. 3.27 Transposition of a three-phase electrical line

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

Fig. 3.29 Illustrative


Example 3.5: cable made by a 2 3
set of 6 stranded conductors 1 4
6 5

• Dm is the geometric mean distance between phases, which can be computed as:

Dm D .di;ii dii;iii diii;i /1=3 ; (3.34)

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:

d1;2 D d1;6 D 2  0:02 D 0:04 cm;

d1;4 D 4  0:02 D 0:08 cm;

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

The phase-to-neutral capacity of a balanced three-phase electrical line with sym-


metrically arranged conductors and including just one conductor per phase (as the
one schematically depicted in Fig. 3.26) can be computed as [1, 3]:

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.

Illustrative Example 3.6 Capacity of a balanced three-phase electric line


We consider again the electrical line described in Illustrative Example 3.4 and
depicted in Fig. 3.26. We compute below the capacity per phase of this line, which
can be directly obtained using (3.37):

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].

3.5.3 Efficiency and Regulation

There are two important parameters to characterize the operation of an electrical


line, namely the efficiency and the regulation.
The efficiency of an electrical line is defined as the active power output at the
receiving-end of the line as a percentage of the active power input at the sending-
end of the line, i.e., the efficiency is defined as:

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

Illustrative Example 3.7 Efficiency and regulation of an electrical line


We compute below the efficiency and regulation of the electrical line in Illustra-
tive Example 3.1.
Considering the results of Illustrative Example 3.1 we obtain that the efficiency
of the electrical line is:
80
PR 3 100 D 99:43%;
D 100 D
PS 26:819
while its regulation is:
400
236:6632  p
US  UR 3

D 100 D 100 D 2:48%:
UR 400
p
3


3.5 Electrical Line 81

Fig. 3.30 Decoupling of z∠ q


active and reactive power ī
+ +

uS ∠ d uR ∠ 0
− −
s̄S = pS + jqS s̄R = pR + jqR

3.5.4 Active and Reactive Power Decoupling

We consider below an inductive balanced load that absorbs a complex power of:

sNR D pR C jqR : (3.41)

This load is supplied at constant voltage uN R D uR †0 through a balanced electrical


line characterized by a per-phase impedance zN D z† . The voltage at the sending-
end of the line is uN S D uS †ı and the current through the line is Ni. The corresponding
circuit is provided in Fig. 3.30.
The current through the line can be computed as:

Ni D uN S  uN R D uS †ı  uR †0 ; (3.42)
zN z†

while the complex power at the receiving-end of the line is:

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

For transmission lines, generally  


2 . That is, r D <.Nz/  0 and x D =.Nz/ 
z. Thus:

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

On the other hand, ı is generally small and thus:

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

3.6 Power System Examples

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.

Fig. 3.31 Illustrative G T1 T2 M


Example 3.8: power system L
∼ ∼
84 3 Power System Components: Models

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ı ˛

Next, we compute the per-unit impedances of the equivalent single-phase circuit.


Note that the per-unit values of the different components are referred to their
corresponding rated values and, thus, it is necessary to obtain the per-unit values
with respect to the base values defined in Table 3.2. To do so, we first obtain
the impedances in  using the rated values of the corresponding components. For
example, in the case of the generator, we have:
 2
11
p
3
ZN g D j0:03 D j0:0605 :
60
3
Next, we compute the per-unit impedance using the base values provided in
Table 3.2:
j0:0605
zNg D D j0:0400 pu:
1:512
Similarly, we obtain the per-unit impedances of the remaining components of the
system:
 2
12
p 80
3 3
zNt1 D j0:01  2 D j0:0159 pu;
60
3 11
p
3
 2
132
p 80
3 3
zNl D j0:02  2 D j0:0272 pu;
70
3 132 p
11
12 3
 2
125
p 80
3 3
zNt2 D j0:01  2 D j0:0142 pu;
60
3 132 p
11
12 3
3.6 Power System Examples 85


-
z̄t1 z̄ l z̄t 2
z̄ g z̄m
ū g ū m
∼ ēg e¯m ∼

Fig. 3.32 Illustrative Example 3.8: equivalent single-phase circuit

 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

Fig. 3.33 Illustrative Example 3.9: power system

Then, the phase voltage at the terminals of the generator is:

uN g D uN m C Ni .Nzt2 C zNl C zNt1 / D 1:0924†1:8885ı puV:

Finally, we obtain the phase voltage at the terminals of the generator in kV by


multiplying the per-unit value by the base-voltage value at the generator zone and
including the corresponding phase shift, i.e.:

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

Table 3.3 Illustrative Example 3.9: base values


Base Generator zone Line 1 zone Motor and load zone
200 200 200
SB [MVA]
3 3 3
18 130 18 8 18
VB [kV] p p p
3 20 3 20 3
Phase shift ˛ ˛  30ı ˛  30ı

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

the impedance of transformer T2 is:

1302 200
zNt2 D j0:04  2 D j0:0494 pu;
200 130
20 18

the impedance of line L2 is:

200
zNl2 D j0:06   D j0:2315 pu;
8 18 2
20

and the impedance of the load is:

200
zNc D .0:6 C j0:14/   D .2:3148 C j0:5401/ pu:
8 18 2
20

The equivalent single-phase circuit is depicted in Fig. 3.34.


The motor absorbs .40 C j80/ MVA and works with a voltage magnitude at its
terminals 5% above its rated value. Using a per-unit system, the phase voltage at the
terminals of the motor is:
88 3 Power System Components: Models

i¯ i¯c

z̄t1 z̄ l 1 z̄t 2 i¯m z̄ l 2


z̄g z̄m

ūg ūS ūR ūm ūc z̄c

e¯g e¯m

Fig. 3.34 Illustrative Example 3.9: equivalent single-phase circuit

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

Considering these data, the current absorbed by the load is:

Nic D uN m
D 0:4781†18:4349ı puA;
zNl2 C zNc

the phase voltage at the terminals of the load is:

uN c D Nic zNc D 1:1365†5:3009ı puV;

and the complex power absorbed by the load is:

sNc D uN cNic D .0:5292 C j0:1235/ puVA:

Next, the current absorbed by the motor is:



Nim D sNm D 0:3833†  63:4349ı puA
uN m

and the total current is:

Ni D Nic C Nim D 0:7967†  38:3248ı puA:

Next, we compute the phase voltage at the terminals of the generator as:

uN g D uN m C Ni .Nzt2 C zNl1 C zNt1 / D 1:3874†5:7519ı puV


3.6 Power System Examples 89

and the power supplied by the generator as:

sNg D uN gNi D .0:7941 C j0:7689/ puVA:

The phase voltages at the sending- and receiving-ends of line L1 are:

uN S D uN m C Ni .Nzt2 C zNl1 / D 1:3604†4:5613ı puV

and:

uN R D uN m C NiNzt2 D 1:1915†1:4844ı puV;

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:

sNR D uN RNi D .0:7292 C j0:6077/ puVA;

and:

sNS D uN SNi D .0:7941 C j0:7376/ puVA;

respectively.
Then, the active powers at the receiving and sending-ends of the line are:

pR D < fNsR g D 0:7292 puW;

and:

pS D < fNsS g D 0:7941 puW;

respectively.
Finally, the efficiency of the line is:
pR
D 100 D 91:83%:
pS


90 3 Power System Components: Models

Illustrative Example 3.10 Balanced fault analysis


We consider the three-phase power system depicted in Fig. 3.35.
The rated values for its components are provided below:
• Generator: 50 MVA, 12 kV, x D 10%.
• Transformer T1 : 50 MVA, 60/12 kV, x D 15%.
• Line L: 50 MVA, 60 kV, x D 15%.
• Transformer T2 : 50 MVA, 60/12 kV, x D 15%.
• Motor: 50 MVA, 12 kV, x D 10%.
The voltage at the terminals of the motor is 11 kV and it absorbs 30 MW with
a power factor 0.8 capacitive. A balanced solid fault (equivalent to a three-phase
balanced load whose impedances are zero) occurs at the terminals of this motor.
Using these data, we compute below the fault currents.
A balanced three-phase fault is equivalent to connecting a balanced three-phase
load of very small or null impedances. If this load is null, then the fault is called
solid. Balanced faults can be computed directly or by using the Thévenin and the
superposition theorems [5]. We illustrate these two methods below.
The corresponding equivalent single-phase circuit is provided in Fig. 3.36. The
phase
p base power is 50/3 MVA and the phase base voltage at the generator zone is
12= 3 kV. The base values in the remaining zones are provided in Table 3.4. Note
that base values match the rated values of the system components and, thus, it is not
necessary to transform the given per-unit impedances.
The phase voltage at the terminals of the motor is:

p11
uN 0m D 3 †0ı D 0:9167†0ı puV;
p12
3

Fig. 3.35 Illustrative G T1 T2 M


Example 3.10: power system L

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

z̄t1 z̄l z̄t 2


i¯ f
z̄g z̄m

+ +
∼ e¯g e¯m ∼
− −

Fig. 3.37 Illustrative Example 3.10: equivalent single-phase circuit during the fault

the power absorbed by the motor is:

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

while the generator and motor voltage sources are:


 
eN g D uN 0m C Ni0 zNg C zNt1 C zNl C zNt2 D 0:7401†29:1047ı puV;

and:

eN m D uN 0m  Ni0 zNm D 0:9680†  3:8773ı puV;

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

Nifm D eN m D 9:6797†93:8773ı puA;


zNm
92 3 Power System Components: Models

Fig. 3.38 Illustrative


Example 3.10: Thévenin +
equivalent at the terminals of ēT h ∼
the motor before the fault −

z̄g + z̄ t1 + z̄ l + z̄ t2 z̄ m

and:

Nif D Nifg C Nifm D 10:8333†90ı puA:

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:

Ni0 D 0:8182†36:8699ı puA:

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;

while the Thévenin impedance is:


 
zNTh D zNg C zNt1 C zNl C zNt2 k zNm D j0:55 k j0:10 D j0:0846 pu:

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:

Nif D eN Th D 10:8333†90ı puA:


zNTh

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

Fig. 3.39 Illustrative Example 3.10: analysis via Thévenin

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

3.7 Summary and Further Reading

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.8 End-of-Chapter Exercises

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

Fig. 3.40 Exercise 3.1: power transformer with a delta-delta connection


3.8 End-of-Chapter Exercises 95

G1 1 T1 2 3 T2 4 G2
L1

L2 L3

5 7

T3 T4

6 8

C M

Fig. 3.41 Power system in Exercise 3.3

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

Fig. 3.42 Power system in G1 T1


Exercise 3.4 L1

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.

© Springer International Publishing AG 2018 97


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_4
98 4 Power Flow

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.

4.2 Nodal Equations

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.

4.2.1 Two-Node Power System

Consider a balanced three-phase two-node power system, whose equivalent single-


phase circuit in per unit is depicted in Fig. 4.1. Nodes 1 and 2 are interconnected
through a transmission line represented by its series and shunt admittances.

Fig. 4.1 Balanced ȳ L


ī1 ī2
three-phase two-node power
system
v̄1 v̄2
1 1
2 ȳS 2 ȳS
4.2 Nodal Equations 99

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:

Ni1 D 1 yN S vN 1 C yN L .vN 1  vN 2 / (4.1)


2
and:

Ni2 D 1 yN S vN 2 C yN L .vN 2  vN 1 / ; (4.2)


2
respectively, where:
• Ni1 and Ni2 are the per-unit current injections at nodes 1 and 2, respectively,
• vN 1 and vN 2 are the per-unit phase voltages at nodes 1 and 2, respectively,
• yN L is the per-unit series admittance of the transmission line connecting nodes 1
and 2, and
• yN S is the per-unit shunt admittance of the transmission line connecting nodes 1
and 2.
Illustrative Example 4.1 Nodal equations for a two-node power system
We consider the two-node power system schematically depicted in Fig. 4.2.
Nodes 1 and 2 are connected through a transmission line whose series impedance is
j0:2 pu˝ and whose shunt admittance is j0:02 puS.
We write below the nodal equations that relate nodal voltages and current
injections in this network. To do so, we first compute the series admittance of the
line as:
1 1
yN L D D D j5 puS:
zNL j0:2

Then, using Eqs. (4.1) and (4.2) we obtain:

Ni1 D 1 j0:02vN 1  j5 .vN 1  vN 2 / D j4:99vN 1 C j5vN 2


2
and:

Ni2 D 1 j0:02vN 2  j5 .vN 2  vN 1 / D j5vN 1  j4:99vN 2 ;


2
respectively.

100 4 Power Flow

i īi

1 1 1
2 ȳSi1 2 ȳSi2 2 ȳSin
ȳLi1 ȳLi2 ··· ȳLin
1 1 1
2 ȳSi1 2 ȳSi2 2 ȳSin

v̄1 v̄2 v̄n


1 2 n

Fig. 4.3 Balanced three-phase n-node power network seen from node i

4.2.2 n-Node Power System

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

Fig. 4.4 Illustrative


ī1 i¯2
Example 4.2: balanced 1 2
three-phase three-node power
system

3
i¯3

Then, using Eqs. (4.3), we obtain the current injections at the three nodes of the
network:

Ni1 D .0:9901  j9:9010/ .vN 1  vN 2 / C .0:9901  j9:9010/ .vN 1  vN 3 / ;


Ni2 D .0:9901  j9:9010/ .vN 2  vN 1 / C .0:9901  j9:9010/ .vN 2  vN 3 / ;

and:

Ni3 D .0:9901  j9:9010/ .vN 3  vN 1 / C .0:9901  j9:9010/ .vN 3  vN 2 / :

Rearranging terms, the nodal equations that relate voltages and currents in the
three-node power system depicted in Fig. 4.4 are as follows:

Ni1 D .1:9802  j19:8020/ vN 1  .0:9901  j9:9010/ vN 2  .0:9901  j9:9010/ vN 3 ;


Ni2 D .1:9802  j19:8020/ vN 2  .0:9901  j9:9010/ vN 1  .0:9901  j9:9010/ vN 3 ;

and:

Ni3 D .1:9802  j19:8020/ vN 3  .0:9901  j9:9010/ vN 1  .0:9901  j9:9010/ vN 2 :

4.3 Admittance Matrix

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

4.3.1 Two-Node Power System

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

is referred to as the admittance matrix.


Illustrative Example 4.3 Admittance matrix for a two-node power system
We obtain the admittance matrix of the two-node power system analyzed in
Illustrative Example 4.1.
If the nodal equations derived in Illustrative Example 4.1 are rewritten using
matrix notation, we obtain:
    
Ni1 j4:99 j5 vN 1
Ni2 D : (4.5)
j5 j4:99 vN 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

4.3.2 n-Node Power System

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)

Eqs. (4.6) become:

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.

4.4 Power Flow Equations

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.

4.4.1 Two-Node Power System

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:

sN1 D sNG1  sND1 D p1 C jq1 D vN 1Ni1 (4.11)

and:

sN2 D sNG2  sND2 D p2 C jq2 D vN 2Ni2 ; (4.12)


4.4 Power Flow Equations 105

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)

respectively, where yN ik is the ikth element of the admittance matrix.


For convenience, the terms of the admittance matrix are written using Euler’s
notation [11], i.e.:

yN ik D yik ej ik ; 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):

p1 D v1 Œy11 v1 cos . 11 / C y12 v2 cos .ı1  ı2  12 / ; (4.19)


q1 D v1 Œy11 v1 sin . 11 / C y12 v2 sin .ı1  ı2  12 / ; (4.20)
p2 D v2 Œy21 v1 cos .ı2  ı1  21 / C y22 v2 cos . 22 / ; (4.21)

and:

q2 D v2 Œy21 v1 sin .ı2  ı1  21 / C y22 v2 sin . 22 / : (4.22)

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ı

Then, using Eqs. (4.19)–(4.22) we obtain:



   
p1 D v1 4:99v1 cos 90ı C 5v2 cos ı1  ı2  90ı ;

   
q1 D v1 4:99v1 sin 90ı C 5v2 sin ı1  ı2  90ı ;

   
p2 D v2 5v1 cos ı2  ı1  90ı C 4:99v2 cos 90ı ;

   
q2 D v2 5v1 sin ı2  ı1  90ı C 4:99v2 sin 90ı :

Simplifying, we obtain the following power flow equations for the considered
two-node power system:

p1 D 5v1 v2 sin .ı1  ı2 / ;


q1 D v1 Œ4:99v1  5v2 cos .ı1  ı2 / ;
p2 D 5v1 v2 sin .ı2  ı1 / ;
q2 D v2 Œ5v1 cos .ı2  ı1 / C 4:99v2  :


4.4 Power Flow Equations 107

4.4.2 n-Node Power System

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:

sN D diag fNvg Ni ; (4.23)

where “diag” is an operator that converts an n  1 vector into an n  n diagonal


matrix.
Using the matrix equation (4.10), we obtain:

sN D diag fNvg yN  vN  : (4.24)

Since:

sN D p C jq; (4.25)

then the real n  1 vectors of active (p) and reactive (q) power injections are:

p D < fdiag fNvg yN  vN  g (4.26)

and:

q D = fdiag fNvg yN  vN  g ; (4.27)

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

where angles are in radians.


Then, using Eqs. (4.30) and (4.31), we obtain:
4.5 Slack, PV, and PQ Nodes 109

p1 Dv1 Œ19:9007v1 cos .1:4711/ C 9:9504v2 cos .ı1  ı2  1:6705/


C9:9504v3 cos .ı1  ı3  1:6705/ ;
p2 Dv2 Œ9:9504v1 cos .ı2  ı1  1:6705/ C 19:9007v2 cos.1:4711/
C9:9504v3 cos .ı2  ı3  1:6705/ ;
p3 Dv3 Œ9:9504v1 cos .ı3  ı1  1:6705/
C9:9504v2 cos .ı3  ı2  1:6705/ C 19:9007v3 cos.1:4711/ ;

and:

q1 Dv1 Œ19:9007v1 sin .1:4711/ C 9:9504v2 sin .ı1  ı2  1:6705/


C9:9504v3 sin .ı1  ı3  1:6705/ ;
q2 Dv2 Œ9:9504v1 sin .ı2  ı1  1:6705/ C 19:9007v2 sin .1:4711/
C9:9504v3 sin .ı2  ı3  1:6705/ ;
q3 Dv3 Œ9:9504v1 sin .ı3  ı1  1:6705/ C 9:9504v2 sin .ı3  ı2  1:6705/
C19:9007v3 sin .1:4711/ ;

respectively.


4.5 Slack, PV, and PQ Nodes

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

Table 4.1 Classification of Type Node # Known Unknown


nodes in power systems
Slack iD1 vi , ıi pi , qi
PV i D 2; : : : ; m vi , pi ıi , qi
PQ i D m C 1; : : : ; n pi , qi vi , ıi

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].

4.6.1 Direct Solution

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

4.6.2 Newton-Raphson Method

A Newton-Raphson algorithm is generally the engine of most common solvers of


systems of nonlinear equations. For the sake of completeness, the application of this
method to solving the power flow problem is briefly described below.
It is relevant to note that the Newton-Raphson method has a quadratic rate of
convergence, and only a few iterations are needed to get close to the solution.
The iteration time increases linearly with the number of nodes, but the number of
iterations is fairly independent of the number of nodes.
Given an initial solution of the unknowns and using Taylor series, the Newton-
Raphson method iteratively updates the values of these unknowns until convergence
is attained. A detailed description of this method can be found in [3] and in
Appendix A of this book. In this section, we briefly describe how this method can
be applied to the power flow problem.
The power flow equations (4.30) and (4.31) derived in Sect. 4.4 can be rewritten
as follows:

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

2 @p @p2 @p2 @p2 3.


/
2
 
2 3 6 @ı2 @ın @vmC1 @vn 7 2 .
/ 3
p2
.
/ 6 : :: :: :: 7 ı2
6 :: :: 7
6 : 7 6 :: : : : : : 7 6 : 7
6 :: 7 6 @p @pn @pn @pn 7 6 :: 7
6 7 6 n 7 6 7
6 .
/ 7 6   7 6 .
/ 7
6 pn 7 6 @ı2 @ın @vmC1 @vn 7 6 ın 7
6 .
/ 7 D 6 @q @qmC1 @qmC1 @qmC1 7 6 .
/ 7 ;
6 qmC1 7 6 mC1 7 6 vmC1 7
6 7 6   7 6 7
6 :: 7 6 @ı2 @ın @vmC1 @vn 7 6 :: 7
4 : 5 6 : :: :: :: :: :: 7 4 : 5
6 : : : 7
qn
.
/ 6 : : : : 7 vn
.
/
4 @q @qn @qn @qn 5
n
 
@ı2 @ın @vmC1 @vn
(4.36)
where superscript
is the iteration counter.
Equation (4.36) above can be rewritten in compact form as:
      
p.
/ h.
/ n.
/ ı .
/ ı .
/
D DJ ; (4.37)
q.
/ j.
/ l.
/ v ˛ v.
/
.
/
v.
/ ˛ v.
/

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 D i ; 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

• Step 5: compute the elements of the Jacobian matrix J.


/ for iteration
using
Eqs. (4.38).
• Step 6: obtain the incremental voltage angles and magnitudes using the matrix
equation below:
   1  
ı .
/ h.
/ n.
/ p.
/
D : (4.41)
v ˛ v.
/
.
/
j.
/ l.
/ q.
/

• Step 7: update the voltage angles and magnitudes using equations:

.
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.

4.6.3 Software Tools

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

Define the known data:


Slack node: v1 , d1 = 0
PV nodes: vi , pi , i = 2; : : : ; m
PQ nodes: pi , qi , i = m+ 1; : : : ; n

Build the admittance matrix

Initialize voltage magnitudes and angles:


(0)
vi = Vi i = m+ 1; : : : ; n
di = D i(0) i = 2; : : : ; n

(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

Compute J(v) using (4.38)

Compute Dd (v) and D v (v) using (4.41)

Update d (v+1) and v (v+1) using (4.42) and (4.43)

v +1 ← v

Fig. 4.5 Algorithm flowchart for the Newton-Raphson method


116 4 Power Flow

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:

pij D <fNsij g; 8i; 8j 2 ˝i ; (4.46)

and:

qij D =fNsij g; 8i; 8j 2 ˝i ; (4.47)

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:

lij D jpij C pji j; 8i; 8j 2 ˝i : (4.51)

Illustrative Example 4.7 Power flow solution


We consider the three-node three-line power system depicted in Fig. 4.6. Data for
this system is provided in the following:
• The voltage at the slack node (node #1) is 1†0ı puV. It is the reference node as
well.
• Node #2 is a PV node with active power injection equal to 0.8 puW and voltage
magnitude equal to 1.05 puV.
• Node #3 is a PQ node with active and reactive power injections being, respec-
tively, 0:8 puW and 0:6 puvar.
The series impedance of every line is .0:01 C j0:1/ pu˝, while the shunt admittance
is negligible.
All values in this illustrative example are in pu with respect to a voltage base of
138 kV (phase to phase) and a power base of 100 MW (three-phase).
Using these data, we first obtain the admittance matrix. Since the line data of this
example are the same as those in Illustrative Example 4.4, the 3  3 complex node
admittance matrix is also the same (angles in radians):
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

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:

p1 D1:00 Œ1:00  19:9007 cos.1:4711/ C 1:05  9:9504 cos .ı2  1:6705/


C9:9504v3 cos .ı3  1:6705/ ;
0:8 D1:05 Œ1:00  9:9504 cos.ı2  1:6705/ C 1:05  19:9007 cos.1:4711/
C9:9504v3 cos.ı2  ı3  1:6705/ ;

∼ 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:

q1 D1:00 Œ1:00  19:9007 sin.1:4711/ C 1:05  9:9504 sin.ı2  1:6705/


C9:9504v3 sin.ı3  1:6705/ ;
q2 D1:05 Œ1:00  9:9504 sin.ı2  1:6705/ C 1:05  19:9007 sin.1:4711/
C9:9504v3 sin.ı2  ı3  1:6705/ ;
0:6 Dv3 Œ1:00  9:9504 sin.ı3  1:6705/ C 1:05  9:9504 sin.ı3  ı2  1:6705/
C19:9007v3 sin.1:4711/ :

The above equations constitute a system of six nonlinear equations and six
unknowns, namely v3 , ı2 , ı3 , p1 , q1 , and q2 , whose solution is:

vN 1 Dv1 †ı1 D 1:00000†0:00000ı puV;


vN 2 Dv2 †ı2 D 1:05000†1:14866ı puV;
vN 3 Dv3 †ı3 D 0:98992†  1:50153ı puV;

and:

sN1 Dp1 C jq1 D .0:0094  j0:39/ puVA;


sN2 Dp2 C jq2 D .0:8 C j1:09/ puVA;
sN3 Dp3 C jq3 D .0:8  j0:6/ puVA:

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):

Ni12 D0:53787†118:62736ı puA;


Ni13 D0:27815†  16:17362ı puA;
Ni23 D0:75995†  46:31987ı puA:

On the other hand, the active power flows through transmission lines are obtained
using Eqs. (4.49):
4.8 Decoupled Power Flow 119

p12 D 0:25770 puW;


p21 D 0:26059 puW;
p13 D 0:26714 puW;
p31 D 0:26637 puW;
p23 D 0:53941 puW;
p32 D 0:53363 puW;

while the reactive power flows through transmission lines are obtained using
Eqs. (4.50):

q12 D 0:47212 puvar;


q21 D 0:50105 puvar;
q13 D 0:07748 puvar;
q31 D 0:06974 puvar;
q23 D 0:58801 puvar;
q32 D 0:53026 puvar:

Finally, the active power losses through transmission lines are obtained using
Eqs. (4.51):

l12 D0:0028931 puW;


l13 D0:00077368 puW;
l23 D0:0057752 puW:

4.8 Decoupled Power Flow

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.

4.9 Distributed Slack

As explained in Sect. 4.5 of this chapter, we distinguish three types of nodes in a


power system, namely slack, PV, and PQ nodes. In both PV and PQ nodes, the
active power is known and fixed, which means that the active power output at the
slack node must be equal to the total active power demand minus the total active
power generation (of generating units other than those located at the slack node)
plus the active power losses in the network, i.e.:

pSlack D pDT  pGT C lT ; (4.54)

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.

4.10 dc Power Flow

The dc power flow equations constitute a linear approximation of the nonlinear


power flow equations around a given solution of these equations. Therefore, they
provide an approximate solution.

4.10.1 Two-Node Power System

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)

where x is the reactance of the transmission line.


In this system, the complex power injection at node 1 is:

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

sN1 D vN 1Ni ; (4.57)

while the complex power injection at node 2 is:


 
sN2 D vN 2 Ni : (4.58)

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

Illustrative Example 4.9 dc power flow equations using Taylor series


There is an alternative method to derive the dc power flow equations, by using
the Taylor series around the flat-voltage profile. This is illustrated below.
We consider a two-node power system with negligible shunt admittances and
series resistance, i.e., the system analyzed in Sect. 4.10.1 of this chapter and depicted
in Fig. 4.7. For this system, we obtained that the active power injections at nodes 1
and 2 are:
v1 v2
p1 D sin .ı1  ı2 /
x
and:
v1 v2
p2 D sin .ı2  ı1 / ;
x
as derived in Eqs. (4.63) and (4.64), respectively. ˚
Next, we approximate p1 and p2 around a given solution  0 D 01 ; 02 ; V10 ; V20
using the first-order terms of the Taylor series, i.e.:
   
 0  @p1  0  0
 @p1  0  
p1 D p1  C ı1  1 C ı2  02
@ı1 @ı2
 0  0
@p1    @p1   
C v1  V10 C v2  V20
@v1 @v2
V10 V20   V 0V 0   
D sin 01  02 C 1 2 cos 01  02 ı1  01
x x
V 0V 0    V0   
 1 2 cos 01  02 ı2  02 C 2 sin 01  02 v1  V10
x x
V 0    
C 1 sin 01  02 v2  V20
x
and:
   
  @p2  0   @p2  0  
p2 D p2  0 C ı1  01 C ı2  02
@ı1 @ı2
 0  0
@p2    @p2   
C v1  V10 C v2  V20
@v1 @v2
V10 V20   V 0V 0   
D sin 02  01  1 2 cos 02  01 ı1  01
x x
0 0
V V     V0   
C 1 2 cos 02  01 ı2  02 C 2 sin 02  01 v1  V10
x x
V 0   
C 1 sin 02  01 v2  V20 ;
x
respectively.
4.10 dc Power Flow 125

A generally
˚ good initial solution 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.


4.10.2 n-Node Power System

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)

2. Resistances are much smaller than reactances and, thus:

yik  bik ; 8i; 8k 2 ˝i ; (4.68a)



†.Nyik /  ; 8i; 8k 2 ˝i : (4.68b)
2
3. Angle differences across transmission lines are small and, thus:

sin .ıi  ık /  ıi  ık ; 8i; 8k 2 ˝i : (4.69)

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

Rearranging terms, from Eqs. (4.72) we obtain:


0 1
X
n X
n
pi  @ bik A ıi C .bik / ık ; 8i: (4.73)
kD1;k¤i kD1;k¤i

For the sake of clarity, we denote:


0 1
X
n
bQ ii D
4@
bik A ; 8i; (4.74)
kD1;k¤i

and:

bQ ik D
4
.bik / ; 8i; 8k: (4.75)

Thus, Eqs. (4.73) render:

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

power injections at n  1 nodes, namely the PV and PQ nodes. Therefore, the


dc power flow equations (4.76) result in a set of n equations and n unknowns,
namely:
1. the n  1 voltage angles ıi , 8i ¤ 1, and
2. the active power injection at the reference node, i.e., p1 .
Next, we obtain the power flows through transmission lines, i.e., pij , 8i, 8j 2 ˝i .
To do so, we use Eqs. (4.49) and assume:
 
1. vi  vj  1 and sin ıi  ıj  ıi  ıj .
1
2. rij  0 and, thus, yN Lij  D jbij D bij †  =2. That is, yLij D bij and
jxij
Lij D =2.
3. yN Sij D 0.
Then, Eqs. (4.49) render:
 
pij  0  yLij cos ıi  ıj  Lij C 0
 
 bij cos ıi  ıj C
2
 
 bij sin ıi  ıj
 
 bij ıi  ıj ; 8i; 8j 2 ˝i : (4.77)

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:

pij D pji ; 8i; 8j 2 ˝i : (4.79)

Illustrative Example 4.10 dc power flow example


We consider the three-node power system described in Illustrative Example 4.7,
whose admittance matrix in rectangular coordinates is:
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
128 4 Power Flow

The imaginary part of this admittance matrix is:


2 3
19:8020 9:9010 9:9010
4 9:9010 19:8020 9:9010 5 puS:
9:9010 9:9010 19:8020

Considering Eqs. (4.74) and (4.75), we obtain:

bQ 11 D bQ 22 D bQ 33 D 9:9010 C 9:9010 D 19:8020 puS;


bQ 12 D bQ 21 D 9:9010 puS;
bQ 13 D bQ 31 D 9:9010 puS;
bQ 23 D bQ 32 D 9:9010 puS:

Therefore, the dc power flow equations (4.76) are:

p1 D 19:8020ı1  9:9010ı2  9:9010ı3 ;


p2 D 9:9010ı1 C 19:8020ı2  9:9010ı3 ;
p3 D 9:9010ı1  9:9010ı2 C 19:8020ı3 :

Since ı1 D 0 (slack/reference node), p2 D 0:8 puW (PV node), and p3 D 0:8


puW (PQ node), we obtain:

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:

0:8 D 19:8020ı2  9:9010ı3 ;


0:8 D 9:9010ı2 C 19:8020ı3 ;

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

whose solution is:


     
ı2 0:026933 1:5432ı
D rad D :
ı3 0:026933 1:5432ı
4.10 dc Power Flow 129

On the other hand, the power injection at the reference node is:

p1 D 0:

Then, the dc solution is:

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:

In this case, the system to be solved is:


    
0:8 20 10 ı2
D ;
0:8 10 20 ı3

whose solution is:


     
ı2 0:026667 1:5279ı
D rad D :
ı3 0:026667 1:5279ı
130 4 Power Flow

The new dc solution is then:

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:

Finally, to compute power flows through transmission lines we use (4.78):

p12 D 10.0  0:026667/ D 0:26667 puW;


p21 D 10.0:026667  0/ D 0:26667 puW;
p13 D 10.0 C 0:026667/ D 0:26667 puW;
p31 D 10.0:026667  0/ D 0:26667 puW;
p23 D 10.0:026667 C 0:026667/ D 0:53333 puW;
p32 D 10.0:026667  0:026667/ D 0:53333 puW:

4.11 Summary and Further Reading

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].

4.12 Octave Codes

This section provides the GNU Octave codes [5] used for solving Illustrative
Example 4.7.
4.12 Octave Codes 131

4.12.1 Calling Subroutine

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.

4.12.2 Power Flow Function

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.

4.13 End-of-Chapter Exercises

4.1 What is the objective of the power flow problem?


4.2 List applications of the power flow equations.
4.3 Consider the two-node power system depicted in Fig. 4.8. The series admittance
of the transmission line connecting nodes 1 and 2 is yN L D a†  2 puS, being null
its shunt admittance.
Using these data, write the admittance matrix in polar form using radians.
4.4 Consider the two-node power system described in Exercise 4.3 and depicted in
Fig. 4.8. Node 1 is both the slack and reference node, being the voltage at this node
equal to 1†0 puV. Node 2 is a PQ node, whose active and reactive power loads are b
puW and c puvar, respectively. Using these data and the admittance matrix obtained
in Exercise 4.3, write the power flow equations.

Fig. 4.8 Exercises 4.3, 4.4, b + jc


and 4.5: two-node power ∼
system
1 ȳL = a∠ − p2 2
4.13 End-of-Chapter Exercises 133

Fig. 4.9 Exercise 4.6: ∼ Slack ∼


three-node power system v̄1 = 1.00∠0 v̄2 = 1.00∠d 2
1 2
ȳ23 = 1∠ − p2
ȳ13 = 1∠ − p2 ȳ12 = 1∠ − p2

3
s̄3 = −1 − j1

Fig. 4.10 Exercise 4.7: ∼ ∼


two-node power system
1 2

Table 4.2 Exercise 4.7: node Node Type Voltage Power


data
1 Slack 1.02 puV pD D 1:5 puW
qD D 0:9 puvar
2 PV 1.01 puV pG D 1 puW

Table 4.3 Exercise 4.7: line data


Line From node To node Series impedance Shunt admittance
1 1 2 .0:01 C j0:1/ pu˝ 0:1 puS
2 1 2 .0:01 C j0:1/ pu˝ 0:1 puS

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

Fig. 4.11 Exercise 4.8: ∼


three-node power system
1 2 3

Table 4.4 Exercise 4.8: node Node Type Voltage Power


data
1 Slack 1.02 puV –
2 PQ – –
3 PQ – pD D 1 puW
qD D 1 puvar

Table 4.5 Exercise 4.8: line data


Line From node To node Series impedance Shunt admittance
1 1 2 j0:02 pu˝ 0:02 puS
2 2 3 j0:01 pu˝ 0:01 puS

Fig. 4.12 Exercise 4.9: ∼


four-node power system
3 4

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.6 Exercise 4.9: node Node Type Voltage Power


data
1 Slack 1.02 puV pD D 0:5 puW
qD D 1 puvar
2 PQ – pD D 1 puW
qD D 0:5 puvar
3 PV 1.01 puV pG D 2 puW
4 PQ – pD D 1 puW
qD D 0 puvar

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˝

1. Obtain the admittance matrix.


2. Obtain the power flow solution.
3. Obtain the dc power flow solution.

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.

© Springer International Publishing AG 2018 137


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_5
138 5 Power System State Estimation

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)

In order to estimate the system state, a number of measurements are generally


available, e.g., voltage magnitudes at nodes, active and reactive power flows through
transmission lines, or active and reactive power injections at some nodes. The
number of available measurements is generally larger than the number of those
needed to estimate the system state and, thus, some of these measurements are
redundant. However, measurements include errors and, therefore, it is not possible
to obtain the exact system state. Then, we use all available measurements to obtain
the most likely state of the power system.
It is important to note that the state estimation problem that we consider is a
static problem in which all measurements were obtained simultaneously. We do not
consider the dynamic state estimation problem [4].
Given the available measurements, the state estimation problem comprises five
steps, which are listed below:
1. Data pre-filtering to eliminate those measurements that are clearly wrong, e.g.,
voltage measurements with disproportionately large/small voltage magnitude
values.
2. Ex-ante topology analysis to obtain a physical description of the system network.
3. Observability analysis to determine if the available measurements are enough to
estimate the system state.
4. State estimation to obtain the most likely system state.
5. Erroneous measurements analysis to detect and to identify possible erroneous
measurements in the available measurements.
The remaining of this chapter is organized as follows. Section 5.2 characterizes
the available measurements in a power system. Section 5.3 describes the state
estimation problem. A procedure to determine whether or not the state of a power
system is observable is provided in Sect. 5.4. Sections 5.5 and 5.6 describe how to
detect and identify erroneous measurements, respectively. Section 5.7 summarizes
the chapter and suggests references for further reading. Sections 5.3–5.6 include
a number of examples to illustrate the main concepts addressed in this chapter.
Some of these examples can be implemented in GAMS [5] and/or GNU Octave
[6] using the codes provided in Sect. 5.8. Section 5.9 concludes the chapter with
some exercises to comprehend the concepts described.

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

Table 5.1 Most common measurements available in power systems


Measurement Notation Precision metric Set of measurements
Voltage magnitude vQi iV ˝V
Active power flow pQ ij ijPF ˝ PF
Reactive power flow qQ ij QF
ij ˝ QF
Active power injection pQ i iP ˝P
Q
Reactive power injection qQ i i ˝Q
140 5 Power System State Estimation

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

In order to characterize the state of a power system, it is necessary to estimate the


state variables. To do so, we use the available measurements described in Sect. 5.2
of this chapter. It is important to recall that the number of measurements available
is usually larger than the minimum required to calculate the state of the network.
However, available measurements are not exact since they include measurement
errors, i.e.:

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)

where ˝ N is the set of no-load nodes.


In this case, problem (5.10) can be rewritten in compact form as:
minx1 ;:::;xo

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

Fig. 5.1 Illustrative Example 5.1: two-node power system

Illustrative Example 5.1 Estimation problem


We consider a power system that comprises two nodes and a single power
line connecting these two nodes, as depicted in Fig. 5.1. The transmission line is
1
characterized through its constant series admittance yL12 † 12 D †  90ı puS
0:15
and we consider that its shunt admittance is null, i.e., yS12 D 0. The origin for angles
is taken at node 2. Voltage magnitude measurements at nodes 1 and 2 are 1.07 puV
and 1.01 puV, respectively. Active power measurements at both ends of the line
are respectively 0.83 puW and 0:81 puW, while reactive power measurements at
both ends of the line are 0.73 puvar and 0:58 puvar, respectively. All meters have
identical precision involving a variance of 0:012 and there are no power injection
measurements.
Using these measurements, we estimate below the system state.
To do so, we first derive the expressions that relate the available measurements
and the system state variables.
The active and reactive power flows in direction 1  2 are:

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:

v1 D 1:088 puV;


v2 D 0:994 puV;
ı1 D 0:114 rad;
J  D 7:936:

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

Consistent with Eq. (5.9), we denote by x the o  1 vector of state variables


(o D 2n  1), i.e.:
2 3
v1
6 : 7
6 :: 7
6 7
6 7
6 vn 7
xD6 7; (5.13)
6 ı1 7
6 7
6 :: 7
4 : 5
ın1

and by h .x/ the functional m  1 vector expressing each measurement as a function


of the state variables, i.e.:
2 3
vQ 1
6 :: 7
6 : 7
6 7
6 vQ r 7
6 7
6 7
6 pQ 1 ./ 7
6 :: 7
6 7
6 : 7
6 7
6 pQ s ./ 7
6 7
6 qQ 1 ./ 7
6 7
6 :: 7
h.x/ D 6 : 7; (5.14)
6 7
6 qQ ./ 7
6 t 7
6 pQ 7
6 i.1/j.1/ ./ 7
6 :: 7
6 7
6 : 7
6 7
6 pQ i.u/j.u/ ./ 7
6 7
6 qQ k.1/`.1/ ./ 7
6 7
6 :: 7
4 : 5
qN k.v/`.v/ ./

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

In compact form and assuming exact measurements, we have:

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)

where H is the Jacobian matrix:


2 @h .x/ @h1 .x/ 3
1

6 @x1 @xo 7
6 : : :: 7
6
H D rx h.x/ D 6 : : : 7: (5.17)
: : 7
4 @h .x/ @hm .x/ 5
m

@x1 @xo

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

Considering (5.19), we conclude that state variable xi is observable (unique) if Nij D


0; 8j, and non-observable otherwise.
Illustrative Example 5.2 Observability
We consider again Illustrative Example 5.1.
In this case, the measurement and state variable vectors are:
2 3
vQ 1
6 vQ 7
6 27
6 7
6 pQ 7
z D 6 12 7
6 qQ 12 7
6 7
4 pQ 21 5
qQ 21

and:
2 3
v1
x D 4 v2 5 ;
ı1

respectively, while the functional vector h.x/ expressing each measurement as a


function of the state variables is:
2 3
v1
2 3 6 7
v1 6 v2 7
6 v 7 6 6 1 7
6 2 7 6 v1 v2 sin ı1 7
6 7 0:15 7
6 p12 ./ 7 6 6 1 1 7
7
h.x/ D 6 7 D v2  v1 v2 cos ı1 7 :
6 q12 ./ 7 6 6 1
0:15 0:15 7
6 7
4 p21 ./ 5 6 6 1 7
7
6 v2 v1 sin ı1 7
q21 ./ 4 0:15 5
2 1 1
v2  v2 v1 cos ı1
0:15 0:15
5.4 Observability 149

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, the system state is observable.


Next, we analyze what happens if only some of the measurements are avail-
able:
1. If only voltage and reactive power measurements are available, then:
2 3
1 0 0
6 0 1 07
6 7
6 1 1 7
HD6 6  07
6 0:15 0:15 7 7
4 1 1 5
 0
0:15 0:15
150 5 Power System State Estimation

and its null space is:


2 3
0
N D 405;
1

and, thus, the angle is not observable.


2. If only active power measurements are available, then:
21 3
00
6 0:15 7
HD4 5
1
00
0:15

and its null space is:


23
0 1
N D 41 0 5;
0 0

and, thus, the two voltage magnitudes are not observable.


3. If only v1 and q21 measurements are available, then:
2 3
1 0 0
HD4 1 1 5
 0
0:15 0:15

and its null space is: 2 3


0
N D 405;
1

and, thus, the angle is not observable.


4. If only v2 and q12 measurements are available, then:
2 3
0 1 0
HD4 1 1 5
 0
0:15 0:15
and its null space is:
2 3
0
N D 405;
1

and, thus, the angle is not observable.


5.4 Observability 151

5. If only v1 and q12 measurements are available, then:


2 3
1 0 0
HD4 1 1 5
 0
0:15 0:15

and its null space is:


2 3
0
N D 405;
1

and, thus, the angle is not observable.


6. If only v2 and q21 measurements are available, then:
2 3
0 1 0
HD4 1 1 5
 0
0:15 0:15

and its null space is:


2 3
0
N D 405;
1

and, thus, the angle is not observable.


7. If only voltage measurements are available, then:
 
100
HD
010

and its null space is:


2 3
0
N D 405;
1

and, thus, the angle is not observable.


8. If only reactive power measurements are available, then:
2 1 1 3
 0
6 0:15 7
H D 4 0:15 5
1 1
 0
0:15 0:15
152 5 Power System State Estimation

and its null space is:


2 3
0:70711 0
N D 4 0:70711 0 5;
0 1:00000

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.


5.5 Erroneous Measurement Detection

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)

where 1  ˛ is a confidence level (e.g., 0:99).


The GNU Octave [6] function chi2inv(1  ˛; m  o) allows evaluating the
2 distribution, e.g.:

chi2inv.0:99; 3/ D 11:345:

Considering the above, the following test can be performed:


1. Assume a confidence level .1  ˛/.
2. Compute 2 .1  ˛; m  o/.
3. If J.x / < 2 .1  ˛; m  o/ there are no erroneous measurements for the
considered confidence level .1˛/. Otherwise, there are one or several erroneous
measurements for the considered confidence level.
5.5 Erroneous Measurement Detection 153

Illustrative Example 5.3 Erroneous measurement detection


We consider again Illustrative Example 5.1, whose set of measurements is:
2 3 2 3
vQ 1 1:07
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

This measurement set renders the following objective function value:

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

and the optimal value of the objective function is:

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

5.6 Erroneous Measurement Identification

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)

respectively, where the covariance matrix ˝ can be computed as [8]:


 1 >
˝ D W1  H H> WH H : (5.24)

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

where ˚ 1 .p/ is the inverse of the cumulative distribution function of a Gaussian


random variable with 0 mean and standard deviation 1 evaluated at probability p.
In GNU Octave [6], the inverse of the cumulative distribution function of a
Gaussian random variable is computed using the function:

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

Illustrative Example 5.4 Erroneous measurement identification example


We consider again Illustrative Examples 5.1 and 5.3. 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

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

Considering this optimal solution, we compute the measurements as functions of


the estimated state variables:
2 3
v1
6 v2 7 2 3
6 7 1:13300
6 1 7 6
6 v1 v2 sin ı1 7 6 1:04300 7 7
6 7 6
6 1
0:15
1 7 6 0:81785 7 7
h.x / D 6

6 v1
2
 v1 v2
7
cos ı1 7 D 6 7:
6 0:15 0:15 7 6 6 0:72237 7
6 1 7 4 0:81785 7 5
6 
v2 v1 
sin ı1 7
6 0:15 7
4 5 0:58323
2 1 1
v2  v2 v1 cos ı1
0:15 0:15

The residuals are then:


2 3
0:0370000
6 0:0330000 7
6 7
6 7
 6 0:0121510 7
r D z  h.x / D 6 7:
6 0:0076335 7
6 7
4 0:0078490 5
0:0032335

On the other hand, we have:


2 3
10000 0 0 0 0 0
6 0 10000 0 0 0 0 7
6 7
6 7
6 0 0 10000 0 0 0 7
WD6 7
6 0 0 0 10000 0 0 7
6 7
4 0 0 0 0 10000 0 5
0 0 0 0 0 10000

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

Then, matrix ˝ can be computed as:


 1
˝ D W1  H H> WH H>
2 3
5:453700 4:880616 0:059121 0:163244 0:059121 0:969591
64:880616 4:658973 0:070187 0:945465 0:070187 0:3994167
6 7
6 7
4 6 0:059121 0:070187 5:052672 0:463157 4:947328 0:5461087
D 10  6 7:
6 0:163244 0:945465 0:463157 4:096265 0:463157 4:7784607
6 7
4 0:059121 0:070187 4:947328 0:463157 5:052672 0:5461085
0:969591 0:399416 0:546108 4:778460 0:546108 5:685719

Thus, the absolute values of the normalized residuals are:


2 3
5:01021
6 4:83469 7
6 7
6 7
6 1:70943 7
jr j D jr ˛ diag.˝/j D 6
N N
7;
6 1:19269 7
6 7
4 1:10422 5
0:42882

where ˛ is the element-wise division.


If the desired confidence level is:

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

5.7 Summary and Further Reading

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].

5.8 GAMS and Octave Codes

This section provides the GAMS [5] and GNU Octave [6] codes for solving some
of the illustrative examples described in this chapter.

5.8.1 Estimation Example in GAMS

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:

2 ---- VAR v1 -INF 1.088 +INF EPS


3 ---- VAR v2 -INF 0.994 +INF EPS
4 ---- VAR d1 -INF 0.114 +INF EPS
5 ---- VAR e -INF 7.936 +INF .

7 v1 Voltage magnitude at node 1. Exact value: 1.0966


8 v2 Voltage magnitude at node 2. Exact value: 1.0000
9 d1 Angle of node 2. Exact value: 0.1097
10 e Error

Note that the above results are self-explanatory.

5.8.2 Observability Example in Octave

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.

5.8.3 Erroneous Measurement Detection Example in Octave

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.

5.9 End-of-Chapter Exercises

5.1 What is the objective of the state estimation problem?


5.2 List several applications of the state estimation problem.
5.3 Consider an n-node power system with k available measurements. Discuss
observability in the following cases:
5.9 End-of-Chapter Exercises 161

ȳ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

Fig. 5.3 Exercise 5.5: ∼ ∼


two-node power system
1 2

Table 5.2 Exercise 5.5: line data


Line From node To node Series impedance Shunt admittance
1 1 2 .0:01 C j0:1/ pu 0:1 puS
2 1 2 .0:01 C j0:1/ pu 0:1 puS

Table 5.3 Exercise 5.5: available measurements


Magnitude Measurement Precision (variance)
v1 1.0258 puV 0:012
v2 1.0103 puV 0:012
p1 0:9980 puW 0:022
q1 0.2104 puvar 0:022
p2 1.0110 puW 0:022
q2 0:3813 puvar 0:022

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

Fig. 5.4 Exercise 5.7: ∼


three-node power system
1 2 3

Table 5.4 Exercise 5.7: line data


Line From node To node Series impedance Shunt admittance
1 1 2 j0:02 pu 0:02 puS
2 2 3 j0:01 pu 0:01 puS

Table 5.5 Exercise 5.7: available measurements


Magnitude Measurement Precision (variance)
v1 1.0212 puV 0:012
v3 1.0015 puV 0:012
p12 0.9901 puW 0:022
q12 1.0234 puvar 0:022
p32 1:0115 puW 0:022
q32 1:0300 puvar 0:022

Fig. 5.5 Exercise 5.9: ∼


four-node power system
3 4

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

Table 5.7 Exercise 5.9: available measurements


Magnitude Measurement Precision (variance)
v1 1.0200 puV 0:012
v2 1.0035 puV 0:012
v3 1.0115 puV 0:012
v3 1.0028 puV 0:012
p12 0.9215 puW 0:032
q12 0.4012 puvar 0:032
p13 1.3318 puW 0:022
q13 1.0101 puvar 0:022
p42 0.0163 puW 0:022
q42 0.3940 puvar 0:022

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

© Springer International Publishing AG 2018 165


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_6
166 6 Optimal Power Flow

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 Optimal Power Flow

This section describes and formulates the OPF problem.

6.2.1 Description

First, we describe the ingredients of the OPF problem.


We consider a power system with the following characteristics:
• The system has n nodes indexed by i (i D 1; : : : ; n).
• Generating units and demands, indexed by g and by d, respectively, are located
at different nodes of the system.
• Nodes are connected through transmission lines, which are represented using the
-model described in Sect. 3.5 of Chap. 3 of this book.
The OPF problem ensures that all demands are supplied and that all network and
technical constraints are satisfied. This is described in the sections below.
It is important to note that all variables and constants used in this chapter are
represented using the per-unit system described in Sect. 2.6 of Chap. 2 of this book.

6.2.1.1 Power Balance

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 d2 i 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 d2 i 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.

6.2.1.2 Power Flows Through Transmission Lines

The active power pik ./ flowing from node i to node k through transmission line ik,
as described in Chap. 4 of this book, is:

pik ./ D vi2 YLik cos. Lik /  vi vk YLik cos.ıi  ık  Lik /


1
C vi2 YSik cos. Sik /; 8i; 8k 2 i ; (6.3)
2
where:
• vN i D vi †ıi and vN k D vk †ık are the voltages (magnitudes and angles) at nodes i
and k, respectively,
• YN Lik D YLik † Lik is the per-unit admittance of transmission line ik, and
• YN Sik D YSik † Sik is the per-unit shunt admittance of transmission line ik.
168 6 Optimal Power Flow

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:

qik ./ D vi2 YLik sin. Lik /  vi vk YLik sin.ıi  ık  Lik /


1
 vi2 YSik sin. Sik /; 8i; 8k 2 i : (6.4)
2

6.2.1.3 Active Power Limits

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.

6.2.1.4 Reactive Power Limits

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.

6.2.1.5 Transmission Line Limits

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

This apparent power is limited at each transmission line and thus:


q
C .pik .//2 C .qik .//2  Sikmax ; 8i; 8k 2 i ; (6.8)

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.

6.2.1.6 Voltage Magnitude Limits

The voltage magnitude of any node i throughout the network is bounded above and
below. Therefore:

Vimin  vi  Vimax ; 8i; (6.9)

where Vimin and Vimax are, respectively, the lower and upper limits of the voltage
magnitude at node i.

6.2.1.7 Voltage Angle Limits

Finally, the voltage angles should be within given bounds, i.e.:

   ıi  ; 8i: (6.10)

Moreover, the voltage angle at the reference node is known and thus:

ıi D 0; i: ref. (6.11)

6.2.1.8 Objective Function

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 d2 i k2i
X X X
qg  LdQ D qik ./; 8i; (6.14c)
g2˝i d2 i k2i

pik ./ D vi2 YLik cos. Lik /  vi vk YLik cos.ıi  ık  Lik /


1
C vi2 YSik cos. Sik /; 8i; 8k 2 i ; (6.14d)
2
qik ./ D vi2 YLik sin. Lik /  vi vk YLik sin.ıi  ık  Lik /
1
 vi2 YSik sin. Sik /; 8i; 8k 2 i (6.14e)
2
q
C .pik .//2 C .qik .//2  Sikmax ; 8i; 8k 2 i ; (6.14f)

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

We assume that the shunt admittances are null.


Additionally, we consider the following data (see Fig. 6.1):
1. Node 1 includes a generating unit with lower and upper bounds of active power
generation equal to 0 and 3 puW, respectively, and of reactive power generation
equal to 2 puvar and 2 puvar, respectively.
2. Node 2 includes a generating unit with lower and upper bounds of active power
generation equal to 0 and 0.8 puW, respectively, and of reactive power generation
equal to 2 puvar and 2 puvar, respectively.
3. Node 3 is a load node with active and reactive power demands equal to 0.8 puW
and 0.6 puvar, respectively.
4. The lower and upper limits of voltage magnitudes for all three nodes are 0.95 puV
and 1.10 puV, respectively.
172 6 Optimal Power Flow

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

0.95 ≤ v 1 ≤ 1.10 1 2 0.95 ≤ v 2 ≤ 1.10

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

Fig. 6.1 Illustrative Example 6.1: three-node power system

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 :

Note that the objective function above is linear.


On the other hand, the constraints of the OPF problem are provided and briefly
described below.
The active power balance constraints at nodes 1, 2, and 3 are, respectively:

p1 D 9:9504 cos.1:4711/v12  9:9504v1 v2 cos.ı1  ı2 C 1:4711/


C 9:9504 cos.1:4711/v12  9:9504v1 v3 cos.ı1  ı3 C 1:4711/;
p2 D 9:9504 cos.1:4711/v22  9:9504v2 v1 cos.ı2  ı1 C 1:4711/
C 9:9504 cos.1:4711/v22  9:9504v2 v3 cos.ı2  ı3 C 1:4711/;
 0:8 D 9:9504 cos.1:4711/v32  9:9504v3 v1 cos.ı3  ı1 C 1:4711/
C 9:9504 cos.1:4711/v32  9:9504v3 v2 cos.ı3  ı2 C 1:4711/:
6.2 Optimal Power Flow 173

The reactive power balance constraints at nodes 1, 2, and 3 are, respectively:

q1 D 9:9504 sin.1:4711/v12  9:9504v1 v2 sin.ı1  ı2 C 1:4711/


 9:9504 sin.1:4711/v12  9:9504v1 v3 sin.ı1  ı3 C 1:4711/;
q2 D 9:9504 sin.1:4711/v22  9:9504v2 v1 sin.ı2  ı1 C 1:4711/
 9:9504 sin.1:4711/v22  9:9504v2 v3 sin.ı2  ı3 C 1:4711/;
 0:6 D 9:9504 sin.1:4711/v32  9:9504v3 v1 sin.ı3  ı1 C 1:4711/
 9:9504 sin.1:4711/v32  9:9504v3 v2 sin.ı3  ı2 C 1:4711/:

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:

Similarly, the capacity constraints of transmission lines in directions 2–1, 3–1,


and 3–2 are, respectively:
h 2
9:9504 cos.1:4711/v22  9:9504v2 v1 cos.ı2  ı1 C 1:4711/
 2 i1=2
C 9:9504 sin.1:4711/v22  9:9504v2 v1 sin.ı2  ı1 C 1:4711/  0:25;
h 2
9:9504 cos.1:4711/v32  9:9504v3 v1 cos.ı3  ı1 C 1:4711/
 2 i1=2
C 9:9504 sin.1:4711/v32  9:9504v3 v1 sin.ı3  ı1 C 1:4711/  2;
h 2
9:9504 cos.1:4711/v32  9:9504v3 v2 cos.ı3  ı2 C 1:4711/
 2 i1=2
C 9:9504 sin.1:4711/v32  9:9504v3 v2 sin.ı3  ı2 C 1:4711/  2:
174 6 Optimal Power Flow

Active power limits are:

0  p1  3;
0  p2  0:8:

Reactive power limits are:

 2  q1  2;
 2  q2  2:

Voltage magnitude limits are:

0:95  v1  1:10;
0:95  v2  1:10;
0:95  v3  1:10:

Finally, voltage angle limits are:

   ı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.1 Illustrative Cost [$] 0.8361


Example 6.1: cost, active, and
p
1 [puW] 0.0309
reactive power outputs
p
2 [puW] 0.7743
q
1 [puvar] 0.3209
q
2 [puvar] 0.3308

Table 6.2 Illustrative vN1 [puV] 1:0977†0:0212


Example 6.1: voltage outputs
vN2 [puV] 1:1000†0:0419
vN3 [puV] 1:0664†0
6.2 Optimal Power Flow 175

Table 6.3 Illustrative s [puVA] 0.2495


12
Example 6.1: apparent power
s
21 [puVA] 0.2500
flows
s
13 [puVA] 0.4244
s
31 [puVA] 0.4123
s
23 [puVA] 0.6184
s
32 [puVA] 0.5995

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

Table 6.5 Illustrative Original limits Relaxed limits


Example 6.2: cost, active, and
reactive power outputs Cost 0.8361 0.8088
p
1 [puW] 0.0309 0.0044
p
2 [puW] 0.7743 0.8000
q
1 [puvar] 0.3209 0.3370
q
2 [puvar] 0.3308 0.3070

Table 6.6 Illustrative Original limits Relaxed limits


Example 6.2: voltage
magnitude output vN1 [puV] 1:0977†0:0212 1:1988†0:0170
vN2 [puV] 1:1000†0:0419 1:2000†0:0357
vN3 [puV] 1:0664†0 1:1699†0

Table 6.7 Illustrative Original limits Relaxed limits


Example 6.2: apparent power
output s
12 [puVA] 0.2495 0.2672
s
21 [puVA] 0.2500 0.2675
s
13 [puVA] 0.4244 0.4209
s
31 [puVA] 0.4123 0.4108
s
23 [puVA] 0.6184 0.6199
s
32 [puVA] 0.5995 0.6044

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 d2 i 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

Table 6.8 Illustrative ac OPF dc OPF


Example 6.3: cost and active
power outputs Cost 0.8361 0.8250
p
1 [puW] 0.0309 0.0250
p
2 [puW] 0.7743 0.7750

Table 6.9 Illustrative ac OPF dc OPF


Example 6.2: apparent power
output p
12 [puVA] -0.2495 -0.2500
p
21 [puVA] 0.2500 0.2500
p
13 [puVA] 0.2804 0.2750
p
31 [puVA] -0.2789 -0.2750
p
23 [puVA] 0.5243 0.5250
p
32 [puVA] -0.5211 -0.5250

   ı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.

6.3 Security-Constrained Optimal Power Flow

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

A SCOPF problem embodying a corrective approach and considering a selected


number of contingencies indexed by ! is provided below:
min;!
X  
cg pg (6.16a)
g

subject to
X X X
pg  LdP D pik ./; 8i; (6.16b)
g2˝i d2 i k2i
X X X
qg  LdQ D qik ./; 8i; (6.16c)
g2˝i d2 i k2i
6.3 Security-Constrained Optimal Power Flow 181

pik ./ D vi2 YLik cos. Lik /  vi vk YLik cos.ıi  ık  Lik /


1
C vi2 YSik cos. Sik /; 8i; 8k 2 i ; (6.16d)
2
qik ./ D vi2 YLik sin. Lik /  vi vk YLik sin.ıi  ık  Lik /
1
 vi2 YSij sin. Sik /; 8i; 8k 2 i ; (6.16e)
2
q
C .pik .//2 C .qik .//2  Sikmax ; 8i; 8k 2 i ; (6.16f)

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 d2 i k2i
X X X
qg!  LdQ D qik! ./; 8i; 8!; (6.16m)
g2˝i d2 i 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

Constraints in Illustrative Example 6.1;


p1! D 9:9504 cos.1:4711/v12  9:9504v1! v2! cos.ı1!  ı2! C 1:4711/
2
C 9:9504 cos.1:4711/v1!  9:9504v1! v3! cos.ı1!  ı3! C 1:4711/;
2
p2! D 9:9504 cos.1:4711/v2!  9:9504v2! v1! cos.ı2!  ı1! C 1:4711/
2
C 9:9504 cos.1:4711/v2!  9:9504v2! v3! cos.ı2!  ı3! C 1:4711/;
2
 0:8 D 9:9504 cos.1:4711/v3!  9:9504v3! v1! cos.ı3!  ı1! C 1:4711/
2
C 9:9504 cos.1:4711/v3!  9:9504v3! v2! cos.ı3!  ı2! C 1:4711/;
2
q1! D 9:9504 sin.1:4711/v1!  9:9504v1! v2! sin.ı1!  ı2! C 1:4711/
6.3 Security-Constrained Optimal Power Flow 183

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;

0:95  v1!  1:10;


0:95  v2!  1:10;
0:95  v3!  1:10;
0  p1!  3;
0  p2!  0:8;
 2  q1!  2;
 2  q2!  2;
184 6 Optimal Power Flow

Table 6.10 Illustrative OPF SCOPF


Example 6.4: cost, active, and
reactive power outputs Cost [$] 0.8361 1.1876
p
1 [puW] 0.0309 0.3832
p
2 [puW] 0.7743 0.4212
q
1 [puvar] 0.3209 0.3236
q
2 [puvar] 0.3308 0.3202

Table 6.11 Illustrative OPF SCOPF


Example 6.4: voltage
magnitude outputs v1 [puV] 1.0977 1.1000
v2 [puV] 1.1000 1.1000
v3 [puV] 1.0664 1.0676

Table 6.12 Illustrative OPF SCOPF


Example 6.4: apparent power
outputs s
12 [puVA] 0:2495 0:0128
s
21 [puVA] 0:2500 0:0128
s
13 [puVA] 0:4244 0:5106
s
31 [puVA] 0:4123 0:4956
s
23 [puVA] 0:6184 0:5198
s
32 [puVA] 0:5995 0:5045

   ı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.

6.4 Summary and Further Reading

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].

6.5 GAMS Codes

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

6.5.1 Simple OPF Code

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

43 model simpleopf /all/;


44 solve simpleopf using nlp minimizing z;
45 option decimals = 8;
46 display z.l, p1.l, p2.l, q1.l, q2.l, v1.l, v2.l, v3.l, d1.l,
47 d2.l, l12.l, l21.l, l13.l, l31.l, l23.l, l32.l;

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

Note that this output file is self-explanatory.

6.5.2 Generic OPF Code

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

14 n2 0.95 1.10 0.0 0.0


15 n3 0.95 1.10 0.8 0.6;
16 table Ldat(n,np,*) line data
17 yl thel yshalf thes cap
18 n1.n2 9.95037190209989 -1.47112767430373 0 0 0.25
19 n1.n3 9.95037190209989 -1.47112767430373 0 0 2
20 n2.n3 9.95037190209989 -1.47112767430373 0 0 2;
21 Ldat(n,np,’yl’) $(ord(n) gt ord(np))=Ldat(np,n,’yl’);
22 Ldat(n,np,’thel’)$(ord(n) gt ord(np))=Ldat(np,n,’thel’);
23 Ldat(n,np,’yshalf’) $(ord(n) gt ord(np))=Ldat(np,n,’yshalf’);
24 Ldat(n,np,’thes’)$(ord(n) gt ord(np))=Ldat(np,n,’thes’);
25 Ldat(n,np,’cap’) $(ord(n) gt ord(np))=Ldat(np,n,’cap’);
26 variables
27 z objective function
28 p(g) unit g P generation
29 q(g) unit g Q generation
30 v(n) node n voltage magnitude
31 d(n) node n angle
32 pf(n,np) P flow per line
33 qf(n,np) Q flow per line;
34 p.lo(g)=Gdat(g,’Pmin’);
35 p.up(g)=Gdat(g,’Pmax’);
36 q.lo(g)=Gdat(g,’Qmin’);
37 q.up(g)=Gdat(g,’Qmax’);
38 v.lo(n)=Ndat(n,’Vmin’);
39 v.up(n)=Ndat(n,’Vmax’);
40 d.lo(n)=-pi;
41 d.up(n)= pi;
42 d.fx(’n3’)=0;
43 equations
44 cost objective function
45 Pfcal(n,np) P flow calculation
46 Qfcal(n,np) Q flow calculation
47 Pbal(n) P node balance
48 Qbal(n) Q node balance
49 Slim(n,np) S flow limit;
50 Pfcal(n,np)..pf(n,np)=e=
51 v(n)**2*Ldat(n,np,’yl’)*cos(-Ldat(n,np,’thel’))-
52 v(n)*v(np)*Ldat(n,np,’yl’)*cos(d(n)-d(np)-Ldat(n,np,’thel’))+
53 (1/2)*v(n)**2*Ldat(n,np,’yshalf’)*cos(-Ldat(n,np,’thes’));
54 Qfcal(n,np)..qf(n,np)=e=
55 v(n)**2*Ldat(n,np,’yl’)*sin(-Ldat(n,np,’thel’))-
56 v(n)*v(np)*Ldat(n,np,’yl’)*sin(d(n)-d(np)-Ldat(n,np,’thel’))+
57 (1/2)*v(n)**2*Ldat(n,np,’yshalf’)*sin(-Ldat(n,np,’thes’));
58 cost.. z =e= sum(g,Gdat(g,’cost’)*p(g));
59 Pbal(n).. sum(g$g2n(g,n),p(g))-Ndat(n,’Pd’)=e=sum(np,pf(n,np));
60 Qbal(n).. sum(g$g2n(g,n),q(g))-Ndat(n,’Qd’)=e=sum(np,qf(n,np));
61 Slim(n,np).. sqrt(power(pf(n,np),2)+power(qf(n,np),2))=l=Ldat(n,
np,’cap’);
62 model opf /all/;
63 solve opf using nlp minimizing z;
64 option decimals = 8;
65 display p.l, q.l, v.l, d.l, pf.l, qf.l, Slim.l, z.l;
6.5 GAMS Codes 189

The part of the GAMS output file that provides the optimal solution is given
below:

1 ---- 65 VARIABLE p.L unit g P generation


2 g1 0.03090686, g2 0.77426500
3 ---- 65 VARIABLE q.L unit g Q generation
4 g1 0.32091673, g2 0.33080186
5 ---- 65 VARIABLE v.L node n voltage magnitude
6 n1 1.09770030, n2 1.10000000, n3 1.06635924
7 ---- 65 VARIABLE d.L node n angle
8 n1 0.02123196, n2 0.04191265
9 ---- 65 VARIABLE pf.L P flow per line
10 n1 n2 n3
11 n1 -0.24946688 0.28037374
12 n2 0.24998341 0.52428159
13 n3 -0.27887877 -0.52112123
14 ---- 65 VARIABLE qf.L Q flow per line
15 n1 n2 n3
16 n1 0.00228492 0.31863181
17 n2 0.00288037 0.32792149
18 n3 -0.30368212 -0.29631788
19 ---- 65 EQUATION Slim.L S flow limit
20 n1 n2 n3
21 n1 0.24947734 0.42442392
22 n2 0.25000000 0.61838798
23 n3 0.41230595 0.59947612
24 ---- 65 VARIABLE z.L = 0.83607872
objective function

Note that this output file is self-explanatory.


As expected, the simple GAMS code and the generic one provide identical
results. The simple one allows comprehending easily the OPF problem, while the
generic one allows solving problems with an arbitrary number of nodes, generating
units, transmission lines, and demands.

6.5.3 dc OPF Code

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

12 of.. z =e= 2*p1 + p2;


13 bp1.. p1 =e= (d1-d2)/x+(d1- 0)/x;
14 bp2.. p2 =e= (d2-d1)/x+(d2- 0)/x;
15 bp3.. -0.8 =e= ( 0-d1)/x+( 0-d2)/x;
16 p12.. (d1-d2)/x =l= 0.25;
17 p21.. (d2-d1)/x =l= 0.25;
18 p13.. (d1- 0)/x =l= 2;
19 p31.. ( 0-d1)/x =l= 2;
20 p23.. (d2- 0)/x =l= 2;
21 p32.. ( 0-d2)/x =l= 2;
22 model simpleopf /all/;
23 solve simpleopf using lp minimizing z;
24 option decimals = 8;
25 display z.l, p1.l, p2.l, d1.l, d2.l, p12.l, p21.l,
26 p13.l, p31.l, p23.l, p32.l;

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

Note that this output file is self-explanatory.

6.5.4 SCOPF GAMS Code

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

10 g2 0.0 0.8 -2.0 2.0 1 0.2;


11 table Ndat(n,*) node data
12 Vmin Vmax Pd Qd
13 n1 0.95 1.10 0.0 0.0
14 n2 0.95 1.10 0.0 0.0
15 n3 0.95 1.10 0.8 0.6;
16 table Ldat(n,np,*) line data
17 yl thel yshalf thes cap
18 n1.n2 9.95037190209989 -1.47112767430373 0 0 0.25
19 n1.n3 9.95037190209989 -1.47112767430373 0 0 2
20 n2.n3 9.95037190209989 -1.47112767430373 0 0 2;
21 Ldat(n,np,’yl’) $(ord(n) gt ord(np))=Ldat(np,n,’yl’);
22 Ldat(n,np,’thel’)$(ord(n) gt ord(np))=Ldat(np,n,’thel’);
23 Ldat(n,np,’yshalf’) $(ord(n) gt ord(np))=Ldat(np,n,’yshalf’);
24 Ldat(n,np,’thes’)$(ord(n) gt ord(np))=Ldat(np,n,’thes’);
25 Ldat(n,np,’cap’) $(ord(n) gt ord(np))=Ldat(np,n,’cap’);
26 table Ldatc(n,np,*) line data under contingency
27 yl thel yshalf thes cap
28 n1.n2 9.95037190209989 -1.47112767430373 0 0 0.25
29 n1.n3 9.95037190209989 -1.47112767430373 0 0 2
30 n2.n3 9.95037190209989 -1.47112767430373 0 0 0.4;
31 Ldatc(n,np,’yl’) $(ord(n) gt ord(np))=Ldatc(np,n,’yl’);
32 Ldatc(n,np,’thel’)$(ord(n) gt ord(np))=Ldatc(np,n,’thel’);
33 Ldatc(n,np,’yshalf’) $(ord(n) gt ord(np))=Ldatc(np,n,’yshalf’)
;
34 Ldatc(n,np,’thes’)$(ord(n) gt ord(np))=Ldatc(np,n,’thes’);
35 Ldatc(n,np,’cap’) $(ord(n) gt ord(np))=Ldatc(np,n,’cap’);
36 variables
37 z objective function
38 p(g) unit g P generation
39 q(g) unit g Q generation
40 v(n) node n voltage magnitude
41 d(n) node n angle
42 pf(n,np) P flow per line
43 qf(n,np) Q flow per line
44 pc(g) unit g P generation under contingency
45 qc(g) unit g Q generation under contingency
46 vc(n) node n voltage magnitude under contingency
47 dc(n) node n angle under contingency
48 pfc(n,np) P flow per line under contingency
49 qfc(n,np) Q flow per line under contingency
50 cp(g) change in p due to contingency
51 cq(g) change in q due to contingency;
52 p.lo(g)=Gdat(g,’Pmin’);
53 p.up(g)=Gdat(g,’Pmax’);
54 q.lo(g)=Gdat(g,’Qmin’);
55 q.up(g)=Gdat(g,’Qmax’);
56 v.lo(n)=Ndat(n,’Vmin’);
57 v.up(n)=Ndat(n,’Vmax’);
58 d.lo(n)=-pi;
59 d.up(n)= pi;
60 d.fx(’n3’)=0;
61 pc.lo(g)=Gdat(g,’Pmin’);
62 pc.up(g)=Gdat(g,’Pmax’);
192 6 Optimal Power Flow

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

111 pchlimup(g).. cp(g) =l= Gdat(g,’ramp’);


112 pchlimdw(g).. -cp(g) =l= Gdat(g,’ramp’);
113 model opf /all/;
114 solve opf using nlp minimizing z;
115 option decimals = 8;
116 display p.l, q.l, v.l, d.l, pf.l, qf.l,
117 pc.l, qc.l, vc.l, dc.l, pfc.l, qfc.l
118 cp.l, cq.l, Slim.l, z.l;

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

39 ---- 116 VARIABLE cq.L change in q due to contingency


40 g1 0.33287092, g2 -0.32423723
41 ---- 116 EQUATION Slim.L S flow limit
42 n1 n2 n3
43 n1 0.01283317 0.51060509
44 n2 0.01283317 0.51977588
45 n3 0.49556861 0.50446934
46 ---- 116 VARIABLE z.L = 1.18760061
objective function

Note that this output file is self-explanatory.

6.6 End-of-Chapter Exercises

6.1 What is the objective of the OPF problem?


6.2 What is the key difference between an OPF and a SCOPF problem?
6.3 Discuss the validity of the following statement: the cost of the optimal operating
condition that results from the SCOPF problem is always higher than the cost of the
optimal operating condition that results from the OPF problem.
6.4 Formulate the SCOPF problem considering a dc formulation of the power flow
equations.
6.5 Consider the two-node power system and data provided in Fig. 6.2:
1. Formulate the corresponding OPF problem.
2. Write a specific GAMS code (not generic) to solve this OPF problem.
3. Solve the OPF problem and discuss the solution achieved.

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

Line 12a 0.95 £ v 2 £ 1.10


0.95 £ v 1 £ 1.10 1 2
Line 12b d2 = 0
Z̄ L12b = 0.01 + j 0.1
0.8 + j 0.6 max = S max = 2
S 12b 1.2 + j 0.6
21b

Fig. 6.2 Exercise 6.1: two-node power system


6.6 End-of-Chapter Exercises 195

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

Fig. 6.3 Exercise 6.8: three-node power system

6.6 Consider again the data of Exercise 6.5:


1. Formulate the corresponding SCOPF problem. Assume that there are two
possible contingencies, namely (1) the capacity of line 12a is reduced to 0 and
(2) the capacity of line 12b is reduced to 1 puVA. The ramp limits of generating
units at nodes 1 and 2 are 1 puW and 0.4 puW, respectively.
2. Write a specific GAMS code (not generic) to solve this SCOPF problem.
3. Solve the SCOPF problem. Compare the results with those achieved in Exer-
cise 6.5.
6.7 Consider again the data of Exercise 6.5:
1. Formulate the corresponding dc OPF problem.
2. Write a specific GAMS code (not generic) to solve this dc OPF problem.
3. Solve the dc OPF problem. Compare the results with those achieved in Exer-
cise 6.5.
6.8 Repeat Exercises 6.5–6.7 for the three-node power system depicted in Fig. 6.3.
Assume that the possible contingencies are (1) the capacity of line 12 is reduced to
1 puVA and (2) generating unit at node 1 becomes unavailable. The ramp limits of
generating units at nodes 1 and 2 are 2 puW and 0.5 puW, respectively.
6.9 Repeat Exercises 6.5–6.7 for the four-node power system depicted in Fig. 6.4.
All transmission lines have the same characteristics with a series impedance of
.0:01 C j0:1/ pu˝ and a capacity of 2 puVA (in both directions). Assume that the
possible contingencies are (1) the capacity of line 12 is reduced to 1 puVA, (2) the
capacity of line 13 is reduced to 0, and (3) the capacity of line 14 is reduced to
1 puVA. The ramp limits of generating units at nodes 1 and 3 are 1 puW and 2 puW,
respectively.
6.10 Extend the GAMS code provided in Sect. 6.5.4 for the SCOPF problem so that
any number of contingencies can be considered.
196 6 Optimal Power Flow

Fig. 6.4 Exercise 6.9: 0 ≤ p3 ≤ 4


four-node power system −4 ≤ q 3 ≤ 4
C3 = 3
2 + j1

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

The operation of power systems involves the coordination of multiple generating


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

© Springer International Publishing AG 2018 197


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

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

7.2 Unit Commitment

This section describes and formulates the UC problem.

7.2.1 Description

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

7.2.1.1 Planning Horizon

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

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

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

7.2.1.2 Generating Units

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

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

where N G is the number of generating units.


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

7.2.1.3 Costs of Generating Units

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

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

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

Each of these costs is described below.


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

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


200 7 Unit Commitment and Economic Dispatch

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

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

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

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

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

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

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

7.2.1.4 Logical Expressions

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

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


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

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

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

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

Table 7.1 Illustrative ugt ug;t1 ygt zgt


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

This is verified below.


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


7.2.1.5 Power Bounds

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

g ugt  pgt  Pg ugt ;


Pmin 8g; 8t;
max
(7.10)

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

7.2.1.6 Ramping Limits

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

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

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

Regarding constraints (7.11), note that:


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

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

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

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

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

Regarding constraints (7.13), note that:


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

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


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

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

7.2.1.7 Power Balance

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

where PD
t is the demand in time period t.

7.2.1.8 Security Constraints

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

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

7.2.2 Formulation

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


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

subject to

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


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

g ugt  pgt  Pg ugt ;


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

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

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

Table 7.2 Illustrative Example 7.2: data of generating units


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

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


min

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


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

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

y11  z11 D u11  0;


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

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

• Power bounds:

50u11  p11  350u11 ;


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

• Ramping limits:

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

p31  100  100 C 100y31 ;


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

and:

0  p11  300u11 C 300z11 ;


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

• Power balance:

p11 C p21 C p31 D 160;


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

• Security (reserve) constraints:

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


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

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


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

Table 7.3 Illustrative Generating unit/Time period 1 2 3


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

Table 7.4 Illustrative Generating unit/Time period 1 2 3


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

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

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

7.3 Economic Dispatch

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

7.3.1 Economic Dispatch Without Network Constraints

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

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

subject to

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

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

6p1 C 7p2

subject to

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

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

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


7.3.2 Economic Dispatch Considering Network Constraints

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


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

7.3.2.1 Power Flows Through Transmission Lines

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

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


212 7 Unit Commitment and Economic Dispatch

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

7.3.2.2 Capacity Limits of Transmission Lines

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

nm  Bnm .ın  ım /  Pnm ;


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

nm is the transmission capacity of transmission line n  m.


where Pmax

7.3.2.3 Reference Node

The power transferred through transmission lines is proportional to voltage angles


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

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

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


variables not limited in sign.

7.3.2.4 Power Bounds

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

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

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

7.3.2.5 Power Balance

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

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

7.3.2.6 Cost Function

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

7.3.2.7 Formulation

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


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

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

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

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

Fig. 7.1 Illustrative ∼ ∼


Example 7.5: three-node
power system 1 2

3
7.3 Economic Dispatch 215

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


minp1 ;p2 ;ı1 ;ı2

6p1 C 7p2

subject to

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

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


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

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

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

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


7.4 Network-Constrained Unit Commitment

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

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

subject to

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


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

g ugt  pgt  Pg ugt ;


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

nm  Bnm .ınt  ımt /  Pnm ;


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

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


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

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

Fig. 7.2 Illustrative ∼ ∼


Example 7.8: three-node
power system 1 2

3

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

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


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

subject to

y11  z11 D u11  0;


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

0:40u33  p33  1:40u33 ;


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

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

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

Table 7.5 Illustrative Generating unit/Time period 1 2 3


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

Table 7.6 Illustrative Generating unit/Time period 1 2 3


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

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

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

7.5 Summary and Further Reading

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

7.6 GAMS Codes

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

7.6.1 Unit Commitment

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

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

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


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

Note that this output file is self-explanatory.


7.6 GAMS Codes 225

7.6.2 Economic Dispatch

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

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


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

Note that this output file is self-explanatory.

7.6.3 Network-Constrained Unit Commitment

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

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

81 solve ncuc using mip minimizing zf;


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

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

Note that this output file is self-explanatory.

7.7 End-of-Chapter Exercises

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

Table 7.7 Exercise 7.5: data Generating unit # 1 2


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

Fig. 7.3 Exercise 7.8: 0 ≤ p1 ≤ 2


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

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

Fig. 7.4 Exercise 7.9: 0 ≤ p3 ≤ 4


four-node power system C3V = 3
2

3 4

d1 = 0

1 2
0.5 ∼

0 ≤ p1 ≤ 4 2
C1V = 1

Table 7.8 Exercises 7.10: Generating unit # 1 2


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

Fig. 7.5 Exercise 7.10: #1 #2


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

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

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

Table 7.9 Exercises 7.10: Generating unit # 1 2


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

Fig. 7.6 Exercise 7.11: #2


four-node power system ∼

3 4

d1 = 0

1 2

232 7 Unit Commitment and Economic Dispatch

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


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

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

References

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

© Springer International Publishing AG 2018 233


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8_8
234 8 Self-Scheduling and Market Clearing Auction

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

This section describes and formulates the self-scheduling problem of a power


producer.

8.2.1 Description

We consider a power producer that owns a number of generating units. Given a


forecast market price profile spanning a study horizon (e.g., 1 day) divided into
different time steps (e.g., hourly time steps), the objective of the self-scheduling
problem is to identify the scheduling (on/off status) as well as the desired production
level of each of the generating units owned by the power producer at each time
step of the considered study horizon. These decisions are made with the aim of
achieving maximum profit (revenue minus cost), while complying with the technical
constraints of the generating units (capacity, ramping limit, minimum production
level, and others).
8.2 Self-Scheduling 235

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

The indexes of the self-scheduling problem are:


• g is the index of generating units and
• t is the index of time periods.

8.2.2.2 Optimization Variables

The optimization variables of the self-scheduling problem are:


• pgt is the power output of generating unit g at time period t,
• ugt is a binary variable used to model the status of generating unit g at time
period t. It is equal to 1 if generating unit g is online at time period t and equal to
0 otherwise,
• ygt is a binary variable used to indicate the start-up of generating unit g at time
period t. It is equal to 1 if generating unit g is started up at the beginning of time
period t and equal to 0 otherwise, and
236 8 Self-Scheduling and Market Clearing Auction

• 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

The constants of the self-scheduling problem are:


• CgF is the online (fixed) cost of generating unit g,
• CgSD is the shut-down cost of generating unit g,
• CgSU is the start-up cost of generating unit g,
• CgV is the variable cost of generating unit g,
• Pmax
g is the capacity of generating unit g,
min
• Pg is the minimum power output of generating unit g,
• RD
g is the ramping-down limit of generating unit g,
• RSD
g is the shut-down ramping limit of generating unit g,
• RSU
g is the start-up ramping limit of generating unit g,
• RU
g is the ramping-up limit of generating unit g, and
• t is the forecast market price at time period t.

8.2.3 Formulation

The self-scheduling problem of generating unit g is mathematically formulated


below:
maxpgt ;ugt ;ygt ;zgt ;8t
X
 
t pgt  CgV pgt C CgF ugt C CgSU ygt C CgSD zgt (8.1a)
t

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

Table 8.2 Illustrative Example 8.1: market price data


Time period Forecast market price [$/MWh]
1 3
2 5
3 6
4 6
5 4
6 2

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:

30u11  p11  300u11 ;


30u12  p12  300u12 ;
30u13  p13  300u13 ;
30u14  p14  300u14 ;
30u15  p15  300u15 ;
30u16  p16  300u16 :
8.2 Self-Scheduling 239

• Ramping-up limits:

p11  0  150  0 C 200y11 ;


p12  p11  150u11 C 200y12 ;
p13  p12  150u11 C 200y13 ;
p14  p13  150u11 C 200y14 ;
p15  p14  150u11 C 200y15 ;
p16  p15  150u11 C 200y16 :

• Ramping-down limits:

0  p11  100u11 C 100z11 ;


p11  p12  100u12 C 100z12 ;
p12  p13  100u13 C 100z13 ;
p13  p14  100u14 C 100z14 ;
p14  p15  100u15 C 100z15 ;
p15  p16  100u16 C 100z16 :

• Logic expressions:

y11  z11 D u11  0;


y12  z12 D u12  u11 ;
y13  z13 D u13  u12 ;
y14  z14 D u14  u13 ;
y15  z15 D u15  u14 ;
y16  z16 D u16  u15 ;
y11 C z11  1;
y12 C z12  1
y13 C z13  1;
y14 C z14  1;
y15 C z15  1;
y16 C z16  1:
240 8 Self-Scheduling and Market Clearing Auction

Table 8.3 Illustrative Status of generat-


Example 8.1: results Time period ing unit Power output [MW]
1 0 0
2 1 150
3 1 300
4 1 200
5 1 100
6 0 0

• Declaration of binary variables:

u11 ; u12 ; u13 ; u14 ; u15 ; u16 2 f0; 1g;


y11 ; y12 ; y13 ; y14 ; y15 ; y16 2 f0; 1g;
z11 ; z12 ; z13 ; z14 ; z15 ; z16 2 f0; 1g:

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

Table 8.5 Illustrative Status of


Example 8.2: results with generating Power output
relaxed ramping limits
Time period unit [MW] Profit [$]
1 0 0 0
2 0 0 0
3 1 300 279
4 1 300 299
5 0 0 10
6 0 0 0
Total  600 568

Table 8.6 Illustrative Status of


Example 8.2: results with generating Power output
restricted ramping limits
Time period unit [MW] Profit [$]
1 0 0 0
2 1 75 21
3 1 150 149
4 1 100 99
5 1 50 51
6 0 0 10
Total  375 166

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

The outputs of the self-scheduling problem formulated in this section can be


used by the power producer to decide the offering strategy of its generating units
in the electricity market. For example, once the optimal schedule and the optimal
hourly production level of each generating unit are identified, each of these hourly
production levels can be offered at the marginal cost of the unit. The remaining
capacity above the optimal production level can be either not offered (which is not
possible in most electricity markets) or offered at a very high price, so that it is not
accepted in the market. Further details on offering strategies of power producers and
market clearing are provided in Sect. 8.3 of this chapter.
The self-scheduling problem (8.1) is formulated using a deterministic approach.
That is, the problem is solved considering that market prices are known by the power
producer. However, in reality, market prices are not known when the self-scheduling
problem is solved. Thus, it is generally convenient to represent the uncertainty in the
market prices.
Finally, note that we assume that the power producer determines its self-schedule
with the aim of maximizing profit. However, it may also have alternative objectives,
e.g., minimizing the risk of the profit variability associated with its self-schedule.
Both the uncertainty and risk management modeling are beyond the scope of this
chapter. The interested reader is referred to [3] for further details.

8.3 Market Clearing Auction

This section introduces basic microeconomic principles [6], and describes and
formulates typical market clearing auctions.

8.3.1 Market Participants

The agents participating in any electricity market are:


1. the power producers that own generating units and produce electrical energy,
2. the power consumers that consume electrical energy, and
3. the market operator that clears the market and determines the production of the
generating units of each power producer and the consumption of the demands of
each power consumer, as well as the market clearing price.
In order to clear the market, i.e., to determine the production schedule of
generating units and demands, the market operator uses a market clearing auction.
Market clearing auctions seek to maximize a measure of the business welfare.
Adopting a neoclassical economics view, almost all market clearing auctions aim
at maximizing the social welfare [2]. The working of market clearing auctions, as
well as the concept of social welfare are briefly explained below.
8.3 Market Clearing Auction 243

Generally, each power producer in an electricity market owns a number of


generating units to supply the electricity demand, while each power consumer is
responsible for a number of loads whose demands need to be supplied. For the sake
of clarity and simplicity, in the following we consider that each power producer
owns a single generating unit and that each power consumer is responsible for a
single load.

8.3.2 Production Offer Curves

Each power producer participating in an electricity market submits the production


offer curves of its generating units to the market operator. These production offer
curves are generally different for each time period of the study horizon, which is
divided into different time steps, e.g., hourly time steps. Any of these production
offer curves generally comprises pairs of energy quantity and price that indicate, for
each price, the energy quantity that a power producer is willing to supply.
Figure 8.1 illustrates an example of step-wise production offer curve for a
generating unit. Note that production offer curves are monotonically increasing,
i.e., the higher the price, the higher the energy that the generating unit is willing
to supply.
These production offer curves may be obtained, for instance, using the outputs
of the self-scheduling problem and the procedure described at the end of Sect. 8.2
of this chapter.

Price [$/MWh]

Quantity [MWh]

Fig. 8.1 Production offer curve


244 8 Self-Scheduling and Market Clearing Auction

Price [$/MWh]

Quantity [MWh]

Fig. 8.2 Consumption bid curve

8.3.3 Consumption Bid Curves

Similarly, each power consumer participating in an electricity market submits the


consumption bid curves of its demands to the market operator for each time period
of the study horizon. As production offer curves, any of these consumption bid
curves generally comprises pairs of energy quantity and price. However, they
indicate, for each price, the energy quantity that a demand is willing to consume.
Figure 8.2 depicts a consumption bid curve for a demand. Note that consumption
bid curves are monotonically decreasing, i.e., the higher the price, the lower the
energy that the demand is willing to consume.

8.3.4 Social Welfare

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

Clearing ∗ Consumer Surplus


λ
Price
Producer Surplus

Quantity [MWh]
p∗
Optimal Production

Fig. 8.3 Social welfare

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

The indexes of the market clearing auctions are:


• b is the index of production blocks,
• c is the index of consumption blocks,
• d is the index of demands,
• g is the index of generating units, and
• t is the index of time periods.

Optimization Variables

The optimization variables of the market clearing auctions are:


• pD
tdc is the consumption block c bid by demand d at time period t,
• pG
tgb is the production block b offered by generating unit g at time period t, and
• ıtn is the voltage angle at node n at time period t.

Constants

The constants used in the market clearing auction are:


• Bnm is the susceptance of transmission line nm,
• PD max
tdc is the size in MWh of consumption block c bid by demand d at time
period t,
8.3 Market Clearing Auction 247

• 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 sets considered in the market clearing auction are:


• n is the set of nodes directly connected to node n.
• ˝nD is the set of demands located at node n,
• ˝nG is the set of generating units located at node n,
• dD is the set of consumption blocks of demand d, and
• gG is the set of production blocks of generating unit g.

8.3.5.2 Single-Period Market Clearing Auction

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

The objective function (8.2a) represents the social welfare to be maximized


by the market operator. As explained in Sect. 8.3.4 of this chapter, this social
welfare represents the area between the accepted consumption bids and the accepted
production offers.
Constraints (8.2b) are bid bounds on the consumption energy of all demands,
constraints (8.2c) are offer bounds on the production energy of all generating units,
and constraint (8.2d) represents the energy balance.
For the sake of clarity and since we consider a single time period, we do not
include subscript t (time periods) in the formulation of problem (8.2).
248 8 Self-Scheduling and Market Clearing Auction

Table 8.7 Illustrative Example 8.3: production offers


Offer Generating unit 1 Generating unit 2 Generating unit 3
Block #1 #2 #3 #1 #2 #3 #1 #2 #3
Energy [MWh] 0.05 0.12 0.13 0.08 0.08 0.09 0.07 0.05 0.02
Price [$/MWh] 4.0 6.0 7.0 8.0 8.2 8.5 9.0 9.5 10.0

Table 8.8 Illustrative Bid Demand


Example 8.3: consumption
bids Block #1 #2 #3 #4
Energy [MWh] 0.20 0.12 0.10 0.05
Price [$/MWh] 15.0 10.0 8.5 3.0

The market clearing auction (8.2) is formulated as a linear programming (LP)


problem [9]. As explained in Appendix B of this book, the solution of this type of
problems can be obtained using appropriate software tools, e.g., CPLEX [10] under
GAMS [5].
Illustrative Example 8.3 Single-period market clearing auction
We solve below a simple market clearing auction. We consider three power
producers (each one owns a single generating unit) that supply a single demand.
Data of production offers are provided in Table 8.7. Note that each generating unit
uses three production offer blocks. On the other hand, data of consumption bids are
provided in Table 8.8. In this case, the demand uses four consumption bid blocks.
Using these data, we formulate below the market clearing auction problem.
First, the objective function to be maximized is as follows:
 G
15pD
11 C 10p12 C 8:5p13 C 3p14  4p11 C 6p12 C 7p13
D D D G G


21 C 8:2p22 C 8:5p23 C 9p31 C 9:5p32 C 10p33 :
C8pG G G G G G

This objective function represents the social welfare.


Next, we formulate the constraints of the market clearing auction.
• Consumption limits of consumption bids:

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

• Production limits of production offers:

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.

Table 8.9 Illustrative Example 8.3: accepted production offers


Accepted offer Generating unit 1 Generating unit 2 Generating unit 3
Block 1 2 3 1 2 3 1 2 3
Energy [MWh] 0.05 0.12 0.13 0.08 0.04    

Table 8.10 Illustrative Accepted bid Demand


Example 8.3: accepted
consumption bids Block 1 2 3 4
Energy [MWh] 0:20 0:12 0:10 
250 8 Self-Scheduling and Market Clearing Auction

Price [$/MWh]

15

10
8.2

Quantity [MWh]
0.25 0.42 0.5 0.75

Fig. 8.4 Illustrative Example 8.3: solution

Illustrative Example 8.4 Single-period market clearing auction: prices


We consider again the data and results of Illustrative Example 8.3. If we
look at the optimal value of the dual variable associated with the energy balance
constraint (8.2d), we see that it is equal to $8.2/MWh. This dual variable is known
as the market clearing price and it is the price paid to power producers for providing
electrical energy and the price paid by power consumers for consuming electrical
energy. We remark that it is a marginal price, as it represents the incremental cost of
marginally supplying an additional unit of electrical energy [7].
Figure 8.4 depicts the stepwise increasing curve of production offers (in red)
and the stepwise decreasing curve of consumption bids (in blue). The crossing of
these two curves determines the market clearing price ($8.2/MWh), as well as the
accepted production and consumption levels (total of 0.42 MWh).

We denote as  the optimal value of the dual variable associated with the energy
balance constraint (8.2d). As explained in Illustrative Example 8.4, this dual variable
is the market clearing price, which is the price paid to power producers for providing
electrical energy and the price paid by power consumers for consuming electrical
energy.
Then, we can compute the profit achieved by the power producer that owns
generating unit g as:
X  G
˘g D   Cgb
G
pgb ; 8g; (8.3)
b2gG
8.3 Market Clearing Auction 251

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).

Equations (8.3) include two terms, namely:


X
1. term  pG
gb that represents the revenues achieved by generating unit g and
b2gG
X
G G
2. term Cgb pgb that represents the costs incurred by generating unit g.
b2gG

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.


8.3.5.3 Multi-Period Market Clearing Auction

The single-period market clearing auction formulated in the previous section is


extended here to the case of a multi-period framework. The formulation of the
market clearing auction in this case is as follows:
maxpD ;8t;8d;8cIpG ;8t;8g;8b
tdc tgb

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

The objective function (8.4a) represents the social welfare to be maximized by


the market operator throughout the planning horizon (usually, the 24 h of a day).
Constraints (8.4b)–(8.4d) are similar to constraints (8.2b)–(8.2d) but in this case for
all time periods.
It is important to note that ramping constraints of generating units are not
included in the multi-period market clearing auction since in most electricity mar-
kets complying with such constraints is the responsibility of the power producers,
not of the market operator. However, if needed, these constraints can be easily
incorporated. Note that not incorporating ramping limits makes problem (8.4)
decomposable by time period.
Illustrative Example 8.6 Multi-period market clearing auction
The planning horizon of Illustrative Example 8.3 is extended to 2 h.
Production offer data for the three power producers (note that each one owns a
single generating unit) are provided in Table 8.11, while consumption bid data for
the consumer with a single demand are provided in Table 8.12. Note that while the
production offers are the same in both time periods, the consumption bids (energy
quantities) change in hour 2.

Table 8.11 Illustrative Example 8.6: production offers


Offer Generating unit 1 Generating unit 2 Generating unit 3
Hour 1
Block #1 #2 #3 #1 #2 #3 #1 #2 #3
Energy [MWh] 0.05 0.12 0.13 0.08 0.08 0.09 0.07 0.05 0.02
Price [$/MWh] 4.0 6.0 7.0 8.0 8.2 8.5 9.0 9.5 10.0
Hour 2
Block #1 #2 #3 #1 #2 #3 #1 #2 #3
Energy [MWh] 0.05 0.12 0.13 0.08 0.08 0.09 0.07 0.05 0.02
Price [$/MWh] 4.0 6.0 7.0 8.0 8.2 8.5 9.0 9.5 10.0
8.3 Market Clearing Auction 253

Table 8.12 Illustrative Bid Demand


Example 8.6: consumption
bids Hour 1
Block #1 #2 #3 #4
Energy [MWh] 0.20 0.12 0.10 0.05
Price [$/MWh] 15.0 10.0 8.5 3.0
Hour 2
Block #1 #2 #3 #4
Energy [MWh] 0.30 0.25 0.12 0.07
Price [$/MWh] 15.0 10.0 8.5 3.0

Considering these data, the formulation of the multi-period market clearing


auction is as follows:
max
 G
15pD
111 C 10p112 C 8:5p113 C 3p114  4p111 C 6p112 C 7p113
D D D G G


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

where variables in set  D fpD D D D D D D D G G


111 , p112 , p113 , p114 , p211 , p212 , p213 , p214 , p111 , p112 ,
p113 , p121 , p122 , p123 , p131 , p132 , p133 , p211 , p212 , p213 , p221 , p222 , p223 , p231 , p232 , p233 g
G G G G G G G G G G G G G G G G

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

Table 8.13 Illustrative Example 8.6: accepted production offers


Accepted offer Generating unit 1 Generating unit 2 Generating unit 3
Hour 1
Block 1 2 3 1 2 3 1 2 3
Energy [MWh] 0.05 0.12 0.13 0.08 0.04    
Hour 2
Block 1 2 3 1 2 3 1 2 3
Energy [MWh] 0.05 0.12 0.13 0.08 0.08 0.09   

Table 8.14 Illustrative Accepted bid Demand


Example 8.6: accepted
consumption bids Hour 1
Block 1 2 3 4
Energy [MWh] 0.20 0.12 0.10 
Hour 2
Block 1 2 3 4
Energy [MWh] 0.30 0.25  

Price [$/MWh]

15

10
8.5

Quantity [MWh]
0.2 0.4 0.55 0.6

Fig. 8.5 Illustrative Example 8.6: solution (hour 2)

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:

˘1 D .8:2  4:0/  0:05 C .8:2  6:0/  0:12 C .8:2  7:0/  0:13


C .8:5  4:0/  0:05 C .8:5  6:0/  0:12 C .8:5  7:0/  0:13 D $1:350;
˘2 D .8:2  8:0/  0:08 C .8:2  8:2/  0:04 C .8:2  8:5/  0
C .8:5  8:0/  0:08 C .8:5  8:2/  0:08 C .8:5  8:5/  0:09 D $0:080;
˘3 D .8:2  9:0/  0 C .8:2  9:5/  0 C .8:2  10:0/  0
C .8:5  9:0/  0 C .8:5  9:5/  0 C .8:5  10:0/  0 D $0:

8.3.5.4 Transmission-Constrained Multi-Period Market Clearing Auction

The multi-period market clearing auction formulated in the previous section is


extended here to consider also the constraints of the transmission network:
maxpD ;8t;8d;8cIpG ;8t;8g;8bIıtn ;8t;8n
tdc tgb

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

 PLnmmax  Bnm .ıtn  ıtm /  PLnmmax ; 8t; 8n; 8m 2 n ; (8.5e)


ıtn D 0; 8t; n: ref. (8.5f)

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.

Generating unit 1 B12 = B21 = 3 puS Generating unit 2


Lmax = PLmax = 0.8 puMW
P12
∼ 21 ∼

1 2

Lmax = PLmax = 0.2 puMW


P13 Lmax = PLmax = 0.8 puMW
P23
31 32
B13 = B31 = 3.1 puS B23 = B32 = 3.3 puS

3 d3 = 0

Generating unit 3 ∼ Demand

Fig. 8.6 Illustrative Example 8.7: auction network


258 8 Self-Scheduling and Market Clearing Auction

Using the above data, we formulate the transmission-constrained multi-period


auction as the following LP problem:
max
 G
15pD
111 C 10p112 C 8:5p113 C 3p114  4p111 C 6p112 C 7p113
D D D G G


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

111 C p112 C p113 D 3:1.ı11  ı13 / C 3:0.ı11  ı12 /;


pG G G

121 C p122 C p123 D 3:0.ı12  ı11 / C 3:3.ı12  ı13 /;


pG G G

 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

211 C p212 C p213 D 3:1.ı21  ı23 / C 3:0.ı21  ı22 /;


pG G G

221 C p222 C p223 D 3:0.ı22  ı21 / C 3:3.ı22  ı32 /;


pG G G

 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

 0:2  3:1.ı11  ı13 /  0:2;


 0:8  3:0.ı11  ı12 /  0:8;
 0:8  3:3.ı12  ı13 /  0:8;
 0:2  3:1.ı21  ı23 /  0:2;
 0:8  3:0.ı21  ı22 /  0:8;
 0:8  3:3.ı22  ı23 /  0:8;
ı13 D 0;
ı23 D 0;

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

The formulations of this problem and of that considered in Illustrative Exam-


ple 8.6 are very similar. The objective function, demand limits, and production
limits are the same. The differences are in the energy balance constraints since in
this example we have one constraint per node and time period. Moreover, in this
example we include the constraints defining the capacity limits of transmission lines
and the constraints that define the voltage angle at the reference node.
The solution is provided below.
The accepted production offers of generating units are provided in Table 8.15,
while the accepted consumption bids of the demand are provided in Table 8.16.
260 8 Self-Scheduling and Market Clearing Auction

Table 8.15 Illustrative Example 8.7: accepted production offers


Accepted offer Generating unit 1 Generating unit 2 Generating unit 3
Hour 1
Block 1 2 3 1 2 3 1 2 3
Energy [MWh] 0.05 0.12 0.1145 0.0355     
Hour 2
Block 1 2 3 1 2 3 1 2 3
Energy [MWh] 0.05 0.12 0.0145 0.08 0.08 0.0855 0.0700 0.0500 

Table 8.16 Illustrative Accepted bid Demand


Example 8.7: accepted
consumption bids Hour 1
Block 1 2 3 4
Energy [MWh] 0.20 0.12  
Hour 2
Block 1 2 3 4
Energy [MWh] 0.30 0.25  

Table 8.17 Illustrative Node Hour 1 Hour 2


Example 8.7: locational
marginal prices [$/puMWh] 1 7.0000 7.0000
2 8.0000 8.5000
3 8.9091 9.8636

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

Fig. 8.7 Illustrative Example 8.7: solution in hour 1

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

Fig. 8.8 Illustrative Example 8.7: solution in hour 2


262 8 Self-Scheduling and Market Clearing Auction

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

Illustrative Example 8.8 Multi-period transmission-constrained market clearing


auction: impact of transmission capacity limits
We analyze below the impact of transmission capacity limits on the solution of a
market clearing auction with transmission constraints.
To do so, we solve again Illustrative Example 8.7 but in this case we relax the
transmission capacity limits of all the lines and consider them equal to 3 puMW. In
such a case, we obtain that the solution is the same than that obtained in Illustrative
Example 8.6, i.e., in the multi-period market clearing auction without transmission
constraints.
Finally, Table 8.18 provides the profits achieved by each generating unit in both
cases (with and without transmission constraints).
Note that due to the congestion in the transmission network, the profits of
generating units 1 and 2 are reduced, while the profit of generating unit 3 increases.
This is due to the changes in their power schedules and also to the price differences
across the network. For example, the price paid to generating unit 1 in the case
with transmission congestion is $7/puMWh in both time periods, while it receives
$8.2/puMWh and $8.5/puMWh in hours 1 and 2, respectively, in the case without
transmission congestion.


8.4 Summary and Further Reading

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].

8.5 GAMS Codes

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

50 minp(t).. p(t) =g= pmin*v(t);


51 rampup(t)$(ord(t) gt 1)..
52 p(t)-p(t-1) =l= rup*v(t-1)+rstart*y(t)+pmax*(1-v(t));
53 rampup0(t)..
54 p(’t1’)-pini =l= rup*vini+rstart*y(’t1’)+pmax*(1-v(’t1’));
55 rampdw(t)$(ord(t) gt 1)..
56 p(t-1)-p(t) =l= rdown*v(t)+rshut*z(t)+pmax*(1-v(t-1));
57 rampdw0(t)..
58 pini-p(’t1’) =l= rdown*v(’t1’)+rshut*z(’t1’)+pmax*(1-vini);
59 status(t)$(ord(t) gt 1)..
60 y(t)-z(t) =e= v(t) - v(t-1);
61 status0(t)..
62 y(’t1’)-z(’t1’) =e= v(’t1’) - vini;
63 link(t)..
64 y(t)+z(t) =l= 1;
65 model uss /all/;
66 solve uss using mip maximizing tprof;
67 option decimals=0;
68 display v.l;
69 option decimals=2;
70 display p.l,tprof.l,ppp.l;

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

This output file is self-explanatory.

8.5.2 Market Clearing Auction

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

This output file is self-explanatory.


8.6 End-of-Chapter Exercises 267

8.6 End-of-Chapter Exercises

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.

Table 8.19 Exercise 8.4: data of generating unit


Unit # 1
Capacity [MW] a
Minimum power output [MW] a=10
Fixed cost [$] 1
Start-up cost [$] 10
Shut-down cost [$] 1
Variable cost [$/MWh] 1
Initial status [1/0] 0
268 8 Self-Scheduling and Market Clearing Auction

Table 8.20 Exercise 8.6: production offers


Offer Generating unit G1 Generating unit G2
Hour 1
Block #1 #2 #3 #4 #1 #2 #3 #4
Energy [MWh] 0.8 0.6 0.4 0.2 0.5 0.5 0.5 0.5
Price [$/MWh] 11.8 12.6 13.5 14.0 10.1 11.2 12.3 13.0
Hour 2
Block #1 #2 #3 #4 #1 #2 #3 #4
Energy [MWh] 0.8 0.6 0.4 0.2 0.5 0.5 0.5 0.5
Price [$/MWh] 11.8 12.6 13.5 14.0 10.1 11.2 12.3 13.0

Table 8.21 Exercise 8.6: consumption bids


Bid Demand D1 Demand D2
Hour 1
Block #1 #2 #3 #4 #1 #2 #3 #4
Energy [MWh] 0.4 0.2 0.1 0.1 0.6 0.3 0.1 0.1
Price [$/MWh] 16.2 14.6 12.1 10.0 16.1 14.2 12.5 11.0
Hour 2
Block #1 #2 #3 #4 #1 #2 #3 #4
Energy [MWh] 0.7 0.3 0.2 0.1 0.8 0.4 0.2 0.1
Price [$/MWh] 16.2 14.6 12.1 10.0 16.1 14.2 12.5 11.0

Fig. 8.9 Exercise 8.7: G1 D1 D2 G2


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

Generating units G1 and G2 are located at nodes 1 and 2, respectively, while


demands D1 and D2 are located at nodes 1 and 3, respectively. The base power
is 1 MW.
Considering these data, repeat Exercise 8.6 and compare the results achieved.
What happens if the capacity of transmission lines is equal to 5 puMW?
8.8 Repeat Exercise 8.7 if the two generating units and two demands are located
in the four-node power system depicted in Fig. 8.10. Generating units G1 and G2
are located at nodes 1 and 3, respectively, while demands D1 and D2 are located at
nodes 2 and 4, respectively. All transmission lines have a susceptance of 10 puS and
a capacity of 1 puMW. The base power is 1 MW.
References 269

Fig. 8.10 Exercise 8.8: G2 D2


four-node power system ∼

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.

A.1 Newton-Raphson Algorithm

The Newton-Raphson algorithm is described in this section.

A.1.1 One Unknown

Consider a nonlinear function f .x/ W R ! R. We aim at finding a value of x so that:

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.

© Springer International Publishing AG 2018 271


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8
272 A Solving Systems of Nonlinear Equations

 
Using Taylor series, we can express f x.0/ C x.0/ as:

 .0/  .0/ 2  .0/


    df .x/ x d2 f .x/
f x.0/ C x.0/ D f x.0/ C x.0/ C C :::
dx 2 dx2
(A.2)
Considering
 .0/ only.0/the
 first two terms in Eq. (A.2) and since we seek to find x.0/
.0/
so that f x C x D 0, we can approximately compute x as:
 
.0/ f x.0/
x   : (A.3)
df .x/ .0/
dx

Next, we can update x as:

x.1/ D x.0/ C x.0/ : (A.4)


 
Then, we check if f x.1/ D 0. If so, we have found a value of x that satisfies
 
f .x/ D 0. If not, we repeat the above step to find x.1/ so that f x.1/ C x.1/ D 0
and so on.
In general, we can compute x.
/ as:
 
.
C1/ .
/ f x.
/
x Dx  ; (A.5)
df .x/ .
/
dx

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

We consider the following quadratic function:

f .x/ D x2  3x C 2;
A Solving Systems of Nonlinear Equations 273

whose first derivative is:

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.


Table A.1 Illustrative Iteration x


Example A.2: results
0 0
1 0.6667
2 0.9333
3 0.9961
4 1.0000
274 A Solving Systems of Nonlinear Equations

A.1.2 Many Unknowns

The Newton-Raphson method described in the previous section is extended in this


section to the general case of a system of n nonlinear equations with n unknowns,
as the one described below:
8
ˆ
ˆ f1 .x1 ; x2 ; : : : ; xn / D 0;
ˆ
ˆ
ˆ
<f2 .x1 ; x2 ; : : : ; xn / D 0;
:: (A.6)
ˆ
ˆ :
ˆ
ˆ
:̂f .x ; x ; : : : ; x / D 0;
n 1 2 n

where fi .x1 ; x2 ; : : : ; xn / W Rn ! R, i D 1; : : : ; n, are nonlinear functions.


The system of equations (A.6) can be rewritten in compact form as:

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)

where J is the n  n Jacobian:


2 3
@f1 .x/ @f1 .x/ @f1 .x/

6 @x1 @xn 7
6 @f .x/ @f@x.x/ 2
@f2 .x/ 7
6 2 2 7
6  7
6
JD6 @x 1 @x 2 @x n 7: (A.9)
: : :: : 7
6 : :: : :: 7
6 : 7
4 @fn .x/ @fn .x/ @fn .x/ 5

@x1 @x2 @xn

 
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

Then, we can update vector x as:

x.1/ D x.0/ C x.0/ : (A.11)

In general, we can update vector x as:



1  .
/ 
x.
C1/ D x.
/  J.
/ f x ; (A.12)

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

We consider the following system of two equations and two unknowns:


(
f1 .x; y/ D x C xy  4;
f2 .x; y/ D x C y  3:

We aim at finding the values of x and y so that f1 .x; y/ D 0 and f2 .x; y/ D 0. To


do so, we use the Newton-Raphson method.
First, we compute the partial derivatives:
8
ˆ
ˆ @f1 .x; y/
ˆ
ˆ D 1 C y;
ˆ
ˆ @x
ˆ
ˆ @f1 .x; y/
ˆ
< D x;
@y
ˆ .x; y/
ˆ
ˆ
@f 2
D 1;
ˆ
ˆ @x
ˆ
ˆ
ˆ @f2 .x; y/
:̂ D 1:
@y
276 A Solving Systems of Nonlinear Equations

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

Fig. A.1 Algorithm flowchart for the Newton-Raphson method

Second, we build the Jacobian matrix:


 
1Cy x
JD :
1 1

Then, we follow the iterative procedure described above:


• Step 0: we initialize the iteration counter (
D 0) and provide initial values for
variables x and y, e.g., x.
/ D x.0/ D 1:98 and y.
/ D y.0/ D 1:02, respectively.
• Step 1: we compute the Jacobian matrix J at iteration
D 0:
     
.0/ 1 C y.0/ x.0/ 1 C 1:02 1:98 2:02 1:98
J D D D :
1 1 1 1 1 1
A Solving Systems of Nonlinear Equations 277

Table A.2 Illustrative Iteration x y


Example A.2: results
0 1.9800 1.0200
1 1.9900 1.0100
2 1.9950 1.0050
3 1.9975 1.0025
4 1.9987 1.0013
5 1.9994 1.0006
6 1.9997 1.0003
7 1.9998 1.0002
8 1.9999 1.0001
9 2.0000 1.0000

• 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

Table A.3 Illustrative Iteration x y


Example A.2: results
considering a different initial 0 2.1000 0.9000
solution 1 2.0500 0.9500
2 2.0250 0.9745
3 2.0125 0.9875
4 2.0062 0.9938
5 2.0031 0.9969
6 2.0016 0.9984
7 2.0008 0.9992
8 2.0004 0.9996
9 2.0002 0.9998
10 2.0001 0.9999
11 2.0000 1.0000

A.2 Direct Solution

Generally, the Newton-Raphson method does not need to be implemented. An off-


the-self routine (in GNU Octave [2] or MATLAB [3]) embodying the Newton-
Raphson algorithm can be used to solve systems of nonlinear equations.
Illustrative Examples A.1 and A.2 are solved below using GNU Octave routines.

A.2.1 One Unknown

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;

The solution provided by GNU Octave is:


1 x = 1.00000
A Solving Systems of Nonlinear Equations 279

A.2.2 Many Unknowns

The GNU Octave routines below solve Illustrative Example A.2:


1 clc
2 fun = @NR2;
3 x0 = [1.98,1.02]; x = fsolve(fun,x0)

1 function F = NR2(x)
2 %
3 F(1)=x(1)+x(1)*x(2)-4;
4 F(2)=x(1)+x(2)-3;

The solution provided by GNU Octave is:


1 x =
2 1.9994 1.0006

A.3 Summary and Further Reading

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

This appendix provides an overview of the general structure of some of the


optimization problems considered through the chapters of this book, namely, linear
programming, mixed-integer linear programming, and nonlinear programming
problems.

B.1 Linear Programming Problems

The simplest instance of an optimization problem is a linear programming (LP)


problem. All variables of an LP problem are continuous and its objective function
and constrains are linear.

B.1.1 Formulation

The general formulation of an LP problem is as follows:


minxi ;8i
X
Ci xi (B.1a)
i

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)

© Springer International Publishing AG 2018 281


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8
282 B Solving Optimization Problems

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

10p1 C 15p2 C 22p3 C 30p4 C 24p5 C 20p6


 21 .p1 C p2 C p3 C p4 C p5 C 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:

This solution renders an objective function value of $130.



A simple input GAMS [3] file to solve Illustrative Example B.1 is provided
below:
1 variables z, p1, p2, p3, p4, p5, p6;

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;

20 model example_lp /all/;


21 solve example_lp using lp maximizing z;

23 display z.l, p1.l, p2.l, p3.l, p4.l, p5.l, p6.l;

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 Mixed-Integer Linear Programming Problems

A mixed-integer linear programming (MILP) problem is an LP problem in which


some of the optimization variables are not continuous but integer.

B.2.1 Formulation

The general formulation of a MILP problem is as follows:


minxi ;8iIy` ;8`
X X
Ci xi C R` y` (B.3a)
i `
B Solving Optimization Problems 285

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

C> x C R> y (B.4a)

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

MILP problems can be solved using branch-and-cut methods. A detailed description


of these methods can be found, for instance, in [4].
MILP problems can also be 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.2 Mixed-integer linear programming
We consider again the data of Illustrative Example B.1. However, in this case, we
assume that the generating unit has a minimum power output of 2 MW and a fixed
cost of $25.
Considering these data, we formulate the following MILP problem:
minp1 ;p2 ;p3 ;p4 ;p5 ;p6 ;u1 ;u2 ;u3 ;u4 ;u5 ;u6

10p1 C 15p2 C 22p3 C 30p4 C 24p5 C 20p6


 21 .p1 C p2 C p3 C p4 C p5 C p6 /
 25 .u1 C u2 C u3 C u4 C u5 C u6 /

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:

In this example it is necessary to include binary variables to represent the on/off


status of the generating unit at each time period.
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 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;

3 binary variables u1, u2, u3, u4, u5, u6;

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;

22 model example_milp /all/;


23 solve example_milp using mip maximizing z;

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 Nonlinear Programming Problems

A nonlinear programming (NLP) problem is an optimization problem in which the


objective function and/or some of the constraints are nonlinear.

B.3.1 Formulation

The general formulation of an NLP problem is as follows:


minxi ;8i

f .x1 ; : : : ; xn / (B.5a)

subject to

Aj .x1 ; : : : ; xn / D 0; 8j; (B.5b)


Dk .x1 ; : : : ; xn /  0; 8k; (B.5c)
xi 2 R; 8i; (B.5d)

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

Problem (B.5) can be rewritten in compact form as:


minx

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

Solving NLP problems is generally more complicated than solving LP problems or


MILP problems.
NLP problems can be solved using one of the many commercially available
software tools. For example, in this book we use CONOPT [1] under GAMS [3].
Further information about NLP problems can be found, for instance, in [4].
Illustrative Example B.3 Nonlinear programming
We consider again the data of Illustrative Example B.1. However, in this case, we
assume that the generating unit has a quadratic cost function so that the cost is:

ct D 15pt C 2p2t ; t D 1; : : : ; 6:

Considering these data, we formulate the following NLP problem:


maxp1 ;p2 ;p3 ;p4 ;p5 ;p6

10p1 C 15p2 C 22p3 C 30p4 C 24p5 C 20p6


 15 .p1 C p2 C p3 C p4 C p5 C p6 /
 
 2 p21 C p22 C p23 C p24 C p25 C p26
290 B Solving Optimization Problems

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:

This solution renders an objective function value of $47.5.



A simple input GAMS [3] file to solve Illustrative Example B.3 is provided
below:
1 variables z, p1, p2, p3, p4, p5, p6;

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;

20 model example_nlp /all/;


21 solve example_nlp using nlp maximizing z;

23 display z.l, p1.l, p2.l, p3.l, p4.l, p5.l, p6.l;

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

B.4 Summary and Further Reading

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

1. CONOPT (2016). Available at www.conopt.com/


2. Dantzig, G.B.: Linear Programming and Extensions. Princeton University Press, Princeton, NJ
(1963)
3. GAMS (2016). Available at www.gams.com/
4. Sioshansi, R., Conejo, A.J.: Optimization in Engineering. Models and Algorithms. Springer,
New York (2017)
5. The ILOG CPLEX (2016). Available at www.ilog.com/products/cplex/
Index

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

© Springer International Publishing AG 2018 293


A.J. Conejo, L. Baringo, Power System Operations, Power Electronics and Power
Systems, https://doi.org/10.1007/978-3-319-69407-8
294 Index

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

State estimation (cont.) Costs of generating units: Start-up costs,


Residuals, 154 200
System state, 137 Costs of generating units: Variable costs,
Systems of nonlinear equations, 110, 271 200
Direct solution, 278 Example, 205
Direct solution: many unknowns, 279 Formulation, 204
Direct solution: one unknown, 278 GAMS code, 223
Jacobian, 274 Generating units, 199
Newton-Raphson algorithm, 271 Logical expressions, 201
Newton-Raphson algorithm: example, 272, Logical expressions: Example, 201
275 Network-constrained unit commitment,
Newton-Raphson algorithm: many 216
unknowns, 274 Planning horizon, 199
Newton-Raphson algorithm: one unknown, Power balance, 204
271 Power bounds, 202
Taylor series, 272, 274 Ramping limits, 202
Security constraints, 204
U Unit commitment and economic dispatch,
Unit commitment, 197, 198 197
Costs of generating units, 199 Exercises, 228
Costs of generating units: Fixed costs, 199 Final remarks, 222
Costs of generating units: Shut-down costs, GAMS codes, 222
200 Introduction, 197

Você também pode gostar