DEVELOPMENT OF UNIT COMMITMENT ASSESSMENT TECHNIQUE
BASED ON MALAYSIA GRID CODE REQUIREMENT
BAHARIN BIN HASHIM
A project report submitted in partial fulfillment of
the requirements for the award of the degree of
Master of Engineering (Electrical - Power)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
MAY 2007
iii
DEDICATION
To my beloved wife, sons, daughters, mother & parents in law.
Al-Fatihah to my late father.
iv
ACKNOWLEDGEMENTS
I first wish to express my sincere appreciation and gratitude to my thesis
supervisor, Dr. Azhar bin Khairuddin, for his invaluable ideas, support, critics and
encouragement guidance since the first beginning of this project. He has far exceeded
the expectations of a great supervision and provided means for the establishment of
the grounds of a good friendship.
I am also indebted to Universiti Teknologi Malaysia (UTM) for funding my
Master study.
At last, but not least, I am extremely grateful to my beloved wife Nor Mastika
bt. Mohammed, my sons, my daughters, my mum Timah bt. Abd. Rahman and my
parent in-law Mohammed bin Yusoff and Che Naemah bt. Che Daud. I am grateful
to all my family members. Without their unlimited dedication, support and love
throughout so many years, I would never have got this far. My sincere appreciation
also extends to all my colleagues and others who have provided assistance at various
occasions. Their views and tips are useful indeed. Unfortunately, it is not possible to
list all of them in this limited space.
v
ABSTRAK
Komitmen Unit adalah satu kaedah analisis yang diperlukan di dalam sistem
kuasa untuk merencanakan dan menghantar kuasa elektrik. Berbagai teknik
matematik telah dihasilkan bagi memenuhi keperluan untuk menyelesaikan masalah
komitmen unit di dalam sistem kuasa.
Dalam merencanakan penjanaan kuasa,
pelbagai syarat telah diperincikan oleh setiap negara di dalam bentuk kod dan
piawaian. Dalam sektor elektrik di Malaysia, proses perencanaan dan penghantaran
kuasa elektrik ditentukan oleh syarat khusus di dalam Kod Grid Malaysia 2006. Kod
edisi baru telah memperincikan syarat dan aturcara yang diperlukan untuk proses unit
komitmen bagi industri tenaga elektrik Malaysia. Tujuan utama projek ini adalah
untuk membina cara sistematik bagi menyelesaikan masalah komitmen unit secara
amnya dan untuk sektor elektrik Malaysia secara khususnya. Tujuan kedua adalah
untuk memanfaatkan cara ini bagi meminimumkan kos penjanaan dan pada masa
yang sama dapat menyelesaikan semua had berhubung dengan penghantaran tenaga
elektrik daripada syarikat penjanaan kepada penguna.
Syarat-syarat Kod Grid
Malaysia adalah dipertimbangkan di dalam memenuhi skop projek ini. Kaedah yang
dihasilkan deprogram dengan aturcara Turbo Pascal dan diuji dengan beberapa
system ujian. Kaedah Pemprograman Dinamik telah dipilih untuk menyelesaikan
proses komitmen unit. Atucara yang dihasilkan telah berjaya menganalisa sistem
kuasa berdasarkan Kid Grid Malaysia. Operasi penjanaan juga dapat dioptimakan
berpandukan pada permintaan beban harian.
Kos penjanaan juga dapat
diminimumkan disamping memenuhi permintaan beban. Akhirnya aturcara yang
dihasilkan dapat digunakan untuk menganalisis sistem kuasa di Malaysia.
vi
ABSTRACT
Unit commitment is one of the pertinent analyses required in the scheduling
and dispatch of power system.
Various mathematical techniques have been
developed to cater for the requirements of solving the unit commitment problems in
power system. In scheduling of power generation, various requirements have been
detailed out by countries in the forms of standards and codes.
For Malaysian
electricity sector, the process of scheduling and dispatch is governed by the
requirements specified in the established Malaysia Grid Code 2006. This newly
revised Code has detailed out the requirements and necessary procedure for the Unit
Commitment process for the Malaysia electrical energy environment. The main
objective of the project is to develop a systematic method in solving unit
commitment problem in general and for Malaysia electricity sector in particular. The
second objective is to utilize the method in order to minimize generating cost and at
the same time fulfilling all the constraints related to the delivery of electrical energy
from the generating companies to the consumers. The specific considerations to the
requirements of the Malaysian Grid Code are fulfilling the scope of the project. The
method has been programmed using Turbo Pascal language and tested on several test
systems. The Dynamic Programming method has been chosen to solve the unit
commitment process. The program has been successful applied to run the system
base on Malaysia Grid Code requirement. The generations have been able to be
optimized the operation of the system base on the load demand for the given day.
The generating costs of the generation have been minimized besides fulfilling the
load demands. Eventually, the program is capable to be used to analyze the Malaysia
power system.
vii
TABLE OF CONTENTS
CHAPTER
1
2
TITLE
PAGE
DECLARATION
ii
DEDICATION
iii
ACKNOWLEDGEMENTS
iv
ABSTRAK
v
ABSTRACT
vi
TABLE OF CONTENTS
vii
LIST OF TABLE
xi
LIST OF CHART
xii
LIST OF FIGURE
xiii
LIST OF APPENDICES
xv
LIST OF ABBREVIATIONS
xvi
INTRODUCTION
1
1.1
Introduction
1
1.2
Project Objective
4
1.3
Scope of work
5
1.4
Background on the Unit Commitment Analysis
6
1.5
Problem Statement
9
1.6
Project Report Outline
10
THEORY ON UNIT COMMITMENT
11
viii
2.1
Introduction to Unit Commitment (UC)
11
2.2
Application of Unit Commitment
14
2.3
Factor to Consider in Solving the UC Problem
15
2.3.1
The Objective of Unit Commitment
15
2.3.2
The Quantity of Supply
16
2.3.3
Compensating of Electricity Supplier
16
2.3.4
The Source of Electric Energy
17
2.4
2.5
3
Solution for Unit Commitment
18
2.4.1
Complete Enumeration
19
2.4.2
Priority List Methods
20
2.4.3
Dynamic Programming (DP)
21
2.4.4
Branch and Bound
25
2.4.5
Simulated Annealing
25
2.4.6
Decommit and Prune
27
2.4.7
Lagrangian Relaxation
28
Summary
30
PROJECT BACKGROUND
31
3.1
General Background and Concept
31
3.2
UC under Deregulated Power Industry
33
3.3
Load Demand Cycle
34
3.4
Constraint of Unit Commitment
36
3.4.1
Spinning Reserve Constraint
37
3.4.2
Thermal Unit Constraints
38
3.4.3
Start-up Cost Constraints
38
3.5
3.4.4 Hydro Constraints
39
3.4.5
Must-Run Constraints
40
3.4.6
Fuel Constraints
40
Introduction to Malaysia Grid Code System
40
3.5.1 General
46
ix
3.6
3.7
4
The Scope
47
3.5.3
General Requirement
48
3.5.4 Purpose
49
3.5.5
51
Generating Scheduling
Modeling the Malaysia Grid Code System for UC
Solution
52
Summary
56
METHODOLOGY
57
4.1
Introduction
57
4.2
Process Step of the Project Implementation
57
4.3
The UC Solution Methodology
60
4.3.1 Overview
60
4.3.2 Dynamic Programming Approach in UC
61
4.3.3 Modeling Approach
63
4.3.4 Solution Difficulty
65
4.3.5 Dynamic Programming Enhancement
67
Implementation
71
4.4.1 Input Requirement
73
4.4
5
3.5.2
4.4.1.1 Power Generation
73
4.4.1.2 Electrical Demand
75
4.5
Problem Facing
76
4.6
Summary
76
RESULT AND DISCUSSION
78
5.1
Testing the Algorithm (Program)
78
5.1.1 System Data
79
5.1.1.1 Generation Unit Data
79
5.1.1.2 Load Curve Data
89
x
5.1.1.3 Input Data File Format
5.1.2 Testing Data
81
Results and Analysis
88
5.2.1 Test 1 (IEEE 4 unit’s data)
88
5.2.2 Test 2 (IEEE 8 unit’s data)
90
5.2.3 Test 3 (IEEE 10 unit’s data)
92
5.2.4 Test 4 (IEEE 32 unit’s data)
94
5.2.5 Test 5 (MGC 10 unit’s data – Johore state)
95
5.2.6 Test 6 (MGC 10 unit’s data – Malacca state)
97
5.3
Discussion
98
5.4
Summary
99
5.2
6
80
CONCLUSIONS AND PROPOSED FUTURE WORK
100
6.1
Conclusions
100
6.2
Proposed Future Work
101
REFERENCES
103
APPENDIX
106
Appendix A
106
xi
LIST OF TABLES
TABLE NO
TITLE
PAGE
Table 4.1
Unit Generation data required for UC program
74
Table 4.2
Load Demand in 24 hours period
75
Table 5.1
IEEE 4 unit’s data
82
Table 5.2
IEEE 8 unit’s data
83
Table 5.3
IEEE 10 unit’s data
84
Table 5.4
IEEE 32 unit’s data
85
Table 5.5
MCG 10 unit’s data (Johore state)
86
Table 5.6
MCG 10 unit’s data (Malacca state)
87
xii
LIST OF CHART
CHART NO
TITLE
PAGE
Chart 4.1
Load Demand for one day (24 hours)
75
Chart 5.1
Load Demand profile for IEEE 4 units
82
Chart 5.2
Load Demand profile for IEEE 8 units
83
Chart 5.3
Load Demand profile for IEEE 10 units
84
Chart 5.4
Load Demand profile for IEEE 32 units
86
Chart 5.5
Load Demand profile for MGC 10 units
(Johore state)
87
Load Demand profile for MGC 10 units
(Malacca state)
88
Chart 5.6
xiii
LIST OF FIGURES
FIGURE NO
Figure 2.1
TITLE
PAGE
Changes in producer surplus when committing
generator G2
13
Treating the market as an additional generator
and / or load
18
Restricted search path in DP algorithm with N=3
And X=5
24
Figure 3.1
Simple “peak valley” load pattern
35
Figure 3.2
The entities in the Grid Code
42
Figure 3.3
The Malaysia Electricity Industry structure as
used in the Grid Code
43
Planning code (data required to be annually
submittedto the GSO)
44
Figure 2.2
Figure 2.3
Figure 3.4
Figure 3.5
Power system structure connected parties and
applicable code
45
Figure 3.6
The generation dispatch process
46
Figure 3.7
Main Grid system in Peninsular Malaysia
49
Figure 3.8
Major Generation Station under Malaysia Grid Code
50
Modeling the MGC system for UC solution
53
Figure 3.9
Figure 3.10 Typically, the incremental and average heat-reat
Curves for Fossil-fuel unit
54
xiv
Figure 3.11 Hydro Plant Efficiency
55
Figure 4.1
Project Process step Flow Diagram
59
Figure 4.2
Standard DP logic
66
Figure 4.3
Enhance DP logic
68
Figure 4.4
Enhance DP with hourly state Restriction
70
Figure 4.5
Flow diagram of the program
72
Figure 5.1
Result output on the IEEE 4 unit’s data with
Priory list
89
Result output on the IEEE 4 unit’s data with
Complete enumeration
90
Result output on the IEEE 8 unit’s data with
Priory list
91
Result output on the IEEE 8 unit’s data with
Complete enumeration
92
Result output on the IEEE 10 unit’s data with
Priory list
93
Result output on the IEEE 10 unit’s data with
Complete enumeration
94
Result output on the IEEE 32 unit’s data with
Priory list
95
Result output on the MGC 10 unit’s data
(Johor State) with Priory list
96
Result output on the MGC 10 unit’s data
(Melaka State) with Priory list
97
Figure 5.2
Figure 5.3
Figure 5.4
Figure 5.5
Figure 5.6
Figure 5.7
Figure 5.8
Figure 5.9
xv
LIST OF APPENDICES
APPENDIX
A
TITLE
Program
PAGE
106
xvi
LIST OF ABBREVIATIONS
AFLC
-
Average Full Load Cost
B&B
-
Branch and Bound
UC
-
Unit Commitment
CC
-
Combine Cycle
CPU
-
Control Processor Unit
CUF
-
Commitment Utilization Factor
DP
-
Dynamic Programming
DP-TC
-
Dynamic Programming Truncated Combination
DP-SC
-
Dynamic Programming Strict Combination
DP-STC
-
Dynamic Programming Sequential / Truncated Combination
DP-VW
-
Variable Window Dynamic Program
DP-ANN
-
Dynamic Programming – Artificial Neural Network
DISCO
-
Distribution Company
EC
-
Energy Commission
ESCO
-
Electricity Supply Company
FDP
-
Fuzzy Dynamic Programming
GENCO
-
Generating Companies
GSO
-
Grid System Operator
GT
-
Gas Turbine
IEEE
-
Institute of Electrical and Electronic Engineer
MGC
-
Malaysia Grid Code
MW
-
Mega Watt
MWh
-
Mega Watt hour
NLDC
-
National Load Dispatch Centre
QS
-
Qualifying Facility
SA
-
Simulated Annealing
xvii
SESCO
-
Sarawak Electricity Supply Corporation
SESB
-
Sabah Electricity Sdn Bhd
ST
-
Steam Turbine
TNB
-
Tenaga Nasional Berhad
Users
-
Power Generating Company
.
CHAPTER 1
INTRODUCTION
1.1
Introduction
A great problem developed from the industrial era is the dilemma of the
increasing demands for energy. As the electric power industry assumes an ever
increasing commitment to resolve the energy supply problem, it is subjected to
escalating societal pressure to:
i.
Generate reliably a sufficient amount of electricity to meet any
demands.
ii.
Retain or decrease its price rates.
iii.
Minimize the impact of its generation efforts upon the ecosphere.
Therefore, unit commitment is one of the pertinent analyses required in the
scheduling and dispatch of the power system. It is the process of deciding in
advance whether to turn on or off each generator on the power grid at a given hour.
It becomes an intricate mathematical decision process because the hourly decisions
are interdependent. Various mathematical techniques have been developed to cater
for the requirements of solving the unit commitment problems in power system.
2
Many utilities have daily load patterns which exhibit extreme variation
between peak and off-peak hours because people use less electricity on Saturday than
on weekdays, less on Sundays than on Saturdays, and at a lower rate between
midnight and early morning than during day. If sufficient generation to meet the
peak is kept on line throughout the day, it is possible that some of the units will be
operating near their minimum generating limit during the off-peak period. The
problem confronting the system operator is to determine which units should be taken
offline and for how long.
In most of the interconnected power system, the power requirement is
principally met by thermal power generation.
Several operating strategies are
possible to meet the required power demand, which varies from hour to hour over the
day. It is preferable to use an optimum or suboptimum operating strategy based on
economic criteria. In other words, an important criterion in power system operation
is to meet the power demand at minimum fuel cost using an optimal mix of different
power plants. Moreover, in order to supply high quality electric power to customers
in a secured and economic manner, thermal unit commitment (UC) is considered to
be one of the best available options.
With the advent of global crisis and the complication of energy resource
structure, the power system production simulation has become a major problem to
match effectively the various generating units in power systems and cut down the
fuel consumption.
Therefore more demands are placed on the probabilistic
production simulation. An engineer is always concern with the costs of product and
efficiency. For a power system to return a profit on the capital invested, a proper
planning and scheduling on operation is very important.
In scheduling and planning of power generation, various requirements have
been detailed out by countries in the forms of standards and codes. For Malaysia
electricity sector, the process of scheduling and dispatch is governed by the
3
requirements specified in the established Malaysia Grid Code 2006. This grid code
requirement must be meet and in the scope of work for developing the unit
commitment program.
4
1.2
Project Objective
The principle aims of this project are:i.
To develop a systematic method in solving a unit commitment problem
in general and for National Electricity sector in particular.
ii.
To utilize the method in order to minimize the generating cost and at the
same time fulfilling all the related to the delivery constrain of electrical
energy from the generating companies to the consumers.
5
1.3
Scope of Work
The project scope covers the following requirement;
i.
Development the program to solve the unit commitment that fulfills the
Malaysian Grid Code requirements.
ii.
Application of Dynamic Programming (DP) method by using Turbo
Pascal programming for solving the unit commitment problem.
iii.
Verification of the program to solve the unit commitment problem for
power system in general and for Malaysia system in particular.
6
1.4
Background on the Unit Commitment Analysis
Many strategies have already been developed to tackle the unit commitment
economic optimization.
In this work, only Dynamic Programming Method is
chosen.
Dynamic Programming (DP) is a name used for the methods in which a priori
impossible or improbable possibilities are left out.
The dynamic programming
algorithm (DP) has proven to be one of the successful approaches to unit
commitment.
This algorithm would systematically evaluate a large number of
possible decisions in terms of minimizing the overall cost in multistage scheduling
problem. Due to the enumerative nature of the method, dynamic programming
suffers from a long processing time that expands exponentially with the size of the
problem. Therefore a lot of algorithms have been developed to improve the DP
method problem in unit commitment. This development is not only scientifically
clumsy but will also amount in the largest possible calculation time.
Lowery [3] introduced the first algorithm on dynamic programming. In the
proposed method, the search of dynamic programming can proceed in a forward or
backward direction. The forward dynamic programming finds the most economical
schedule by starting at the initial stage accumulating total costs, then backtracking
from the combination of least accumulated cost starting at the stage and ending at the
initial stage. However, the disadvantage of the method is that the combinations of
units within a time period (the states) made the process problem. Typically each
stage represents one hour of operation. The time periods are longer.
C.K. Pang and H.C. Chen [4] have proposed a truncated dynamic
programming (DP-TC) method for the commitment of thermal units over periods of
up to 48 hours. With the truncated of potential uneconomical commitment schedules
7
at each time step, it is possible to use a dynamic programming method to find the
schedule having the least total cost. This DP-TC method is a fixed search window to
truncate the priority list in which only the truncated combination are evaluated.
However, the disadvantage of the method is that it requires a much longer processing
time to complete the process. The method had been developed when C.K. Pang,
G.B. Sheble and F. Albuyeh [5] proposed the Search Sequence Dynamic
Programming (DP-SC). This method uses a strict priority list search sequence to
reduce the possible combinations at every stage. However, the disadvantage of this
method that it requires a much longer processing time to complete the process. Fred
N. Lee [7] had improved the two methods [4] and [5] by proposed the dynamic
programming – sequential / truncated combination (DP-STC). It approach
sequentially determines the optimal commitment order for the available generating
units over a short-term operation horizon. The evaluation of a short-term unit
commitment method is based upon its solution quality and computational
requirement. The method proposed still had been faced the heavy dependence of its
computational requirement upon the demand variation in the studied system. If the
system hourly load exhibits large variations, it needs to use a large state space
truncation window to assure solution feasibility.
W.L.Snyder, H.D.Powell and J.C.Rayburn [6] had introduced the units with
similar characteristics such as minimum up/down times; generation capacity, start up
cost etc are classified into the same groups. Within each group, windows as well as
their positions on priority lists are defined and units follow the strict priority list
commitment and de-commitment order. Combinations are made of candidates from
different groups in a pre-defined order and economical evaluations are made
subsequently. The method has a disadvantage which is; the system will be failed if
the distinctions between different types of units in the system do not hold. Walter J.
Hobbs, Gary Hermon, Stephen Warner and Gerald B. Sheble [8] had found the new
method creates several states from each unique combination and links each state to
one of the possible paths to that combination. By preserving many predecessor
options, infeasibility may be avoided and more practical and economic solutions may
be reaches. However, the disadvantage was the increasing a minimum run time by
8
several hours. It might bring the unit on-line several hours earlier so that it could be
at full capacity during its true minimum run time.
The technology has been changed time to time, Chung Ching Su and Yuan
Yih Hsu [9] has developed a new approach using fuzzy dynamic programming
(FDP). A characteristic feature of this approach is that the errors in the forecasted
hourly loads can be taken into account by using fuzzy set notations, making the
approach superior to the conventional dynamic programming method which assumes
that the hourly loads are exactly known and there exist no errors in the forecasted
loads. However, the disadvantage of the approach that it requires more computer
time compare to the conventional dynamic programming method.
Therefore, it
required the CPU time higher for solving this problem.
Z. Ouyang and S. M. Shahidehpour [10] and [11] had proposed two methods.
First method knows as variable window dynamic program (DP-VW). It is a heuristic
improvement of the truncated window dynamic program. The proposed method
employs a variable window size according to load demand increments, and
corresponding experimental results indicate a substantial saving in the computation
time without sacrificing the quality of the solution. An iterative process for the
number of strategies saved in every stage to fine tune the optimal solution.
Disadvantage of this method was the probability of running DP-VW without
achieving a feasible solution becomes very low by incorporating no valid
combination and flow control mechanism. The second known as hybrid dynamic
programming – artificial neural network algorithm (DP-ANN). The proposed two
step process uses an artificial neural network (ANN) to generate a pre-schedule
according to the input load profile. Then the dynamic search is performed at those
stages where the commitment states of some of the units are not certain. It is based
on truncated window dynamic programming (DP-TC). However, the disadvantage
of this method that DP-ANN requires longer time to prepare the program for the
application because firstly, it should have training patterns developed for cases in
which a different number of units are in service.
9
1.5
Problem Statement
The methods proposed earlier in section (1.4) by the experts still facing with
many problems.
In this project, some limitation and advantages of each
methodology has been considered to solve the unit commitment problem based on
the Malaysian Grid Code requirement.
Scheduling the operation of the generating units involves the selection of the
units to be placed in operation and the allocation of the load among them. These two
points have been taken to minimize the sum of the startup, banking and expected
running costs subject to the demand, spinning reserve, minimum down time and up
time constraints. Another additional limitations have been considered in the project
was; a unit should not be started up more than once a day and no more than two units
of the same plant should be started up simultaneously.
In Malaysia, the demand for the electricity exhibits such large variations
between weekdays and weekends, and between peak and off-peak hours that it is
usually not economical to continuously keep on line all available generating units.
However, to determine which units should be kept on line and which ones should not
constitutes a difficult problem for the operator who seeks to minimize the system
production cost. This optimization problem has been formulated in each method of
unit commitment. Based on the accuracy, simplicity and computational time for the
nonlinear situation; the Dynamic Programming combination with priority list and
complete enumeration approaches have been selected to develop the suitable
program for solving the UC problem and in the same time fulfilling the Malaysian
Grid Code requirement.
10
1.6
Project Report Outline
This project report is divided into six chapters.
Chapter 2 presents the theory of the Unit Commitment and will explain detail
on the factor to consider for the UC. Several solution methods are discussed to show
that the different between each method terminology. Lastly, the method that is used
in this project is elaborated.
The unit project background is explained in Chapter 3. Load demand cycle,
modeling of the MGC system for UC solution and implementation of the method are
presented. Description of the Malaysia Grid Code requirement has also been
discussed detail.
In Chapter 4, the step of implementation for the project and the method for
UC problem solution chosen are expressed in detail. Flow chart of the program is
shown based on the topology applied in the project. The method for the topology is
categorized based on the most successful algorithm. The dynamic programming
(DP) approach is used to obtain the model developed for the analysis. Detail
explanation on the application with example is included.
Chapter 5 presents the analysis on IEEE test system and Tenaga Nasional
Berhad (TNB) system. The results of this analysis are elaborated in detail.
Chapter 6 draws conclusion and proposes future work for this project.
11
CHAPTER 2
THEORY ON UNIT COMMITMENT
2.1
Introduction to Unit Commitment (UC)
Unit Commitment (UC) refers to the strategic choice to be made in order to
determine which of the available power plants should be considered to supply
electricity. Unit commitment is not the same as dispatching. Dispatching consists of
fitting a given set of power plants into a certain electric demand. Unit commitment
appoints the set of plants from which dispatching can choose.
The difference
between both issues is time. In dispatching decisions, there is no time to rapidly
activate a power plant because the inertia of most plants will not allow this. Unit
commitment therefore prepares a set of plants and stipulates in which time period
they have to be on-line and ready for dispatching.
Unit commitment chooses plants taking into account a wide variety of
parameters, technological aspects (such as minimal operation point, minimum up and
down time and transient behavior) as well as economical considerations (such as
start-up costs and operational costs) and social elements (such as availability of staff
and work-schemes). Unit commitment optimization enables utilities to minimize
electricity generation costs.
12
To explain the process and the consequences of committing a unit, an
example with two generators is considered first. It is assumed that one generator is
already committed. Now the second available unit could also be started. But this
would need manpower, time and other resources such as fuel, gas etcetera. The
additional unit has to be brought to speed, it has to be synchronized and connected to
the network. Since a committed generator i produce at least minimum generated
power, PGimin, the additional costs for this second generator are at least;
CG2min = a20 + a21 * PG2min + a22 * P2G2min
(2.1)
The new minimum production amount of both generators combined is
PG12min = PG1min + PG2min
(2.2)
Where;
PGimin
= lower active produced / sold by generator i
CGimin
= lower cost function of generator i
ai0, ai1, ai2
= cost function factor of generator i
An advantage of committing additional unit is that the two generators
together offer a much more attractive supply curve. The example in Figure 2.1
shows, that the common cost curve CG12min (lower cost function of generator 1 and 2)
is flatter. This means that together they offer a higher amount of energy for a given
per-unit price. If the demand curve is fixed, its intersection with the common
incremental cost curve will be more to the right. This means that a bigger amount of
power is produced. On one side, the new market price λ is lower and each generator
per se produces less. On the other side, the sum of these lower profits could be
higher than for a single generator.
13
[$/MWh]
Demand
CG1inc
Incremental cost
CG2inc
Ag+
CG12inc
λ
a21
a11
PG12min
Figure 2.1
PG12
P [MWh]
Change in producer surplus when committing generator G2
Another advantage of spending the extra fixed costs a20 to turn on an extra
generator is that together their production reserve is higher. The two generators are
less likely to be overloaded in peak periods than a single generator. The additional
social profit S+ when adding generator 2 is given by the additional area AS+, which is
enclosed by CG1inc, CG12inc and the incremental demand curve, minus the additional
fixed costs a20.
S+ = AS+ - a20
Where;
S+
= social profit
AS+
= additional area
CGiinc = incremental cost function of generator i
(2.3)
14
S+ might be negative, indicating that it is not lucrative to turn on unit 2. In
this case it would be more profitable to produce with unit 1 only. If it is not assumed
that unit 1 is running yet, producing with unit 2 only is possible too. This could be
an even more profitable solution.
If there are N generating units, all possible
combinations of 1 to N generators have to be evaluated.
Finding the optimal
combination among these is called “solving the Unit Commitment problem”.
Usually “optimal” means raising minimum production costs for a given amount of
power PG. So in most cases the UC problem is solved for a fixed PG. But for the
market model in this work, optimal means producing the maximum social profit.
Not having a fixed PG complicates the UC problem. The power production of a
combination is only known after aggregating the incremental cost curves and
intersecting the total incremental cost curve with the incremental demand curve.
This is a considerable additional effort to merely find the total production amount.
For the UC schedule, not only the load or the demand at a certain time has to
be considered. There are also numerous limitations, which reduce the number of
feasible solutions. In pass two decades, several approaches such as priority lists,
branch and bound method, dynamic programming (DP) and Lagrangian relaxation
have been proposed for the unit commitment problem. In this project, Dynamic
Programming (DP) approach to unit commitment is applied.
2.2
Application of Unit Commitment
For utilities, unit commitment is a problem that is to be evaluated in a time
period of one day up to one week. The power system utilities need to optimize is
usually limited to ten to fifty power plants. Most unit commitment models described
in literature have been developed and improved.
15
In the broader context of energy, electricity or environmental modeling,
however, both the power system and the time period considered are much larger. In
such models (sued for i.e; the calculation of the emission or the energy use of a
country), unit commitment is not the main objective. In order not to have a
disproportional impact on the overall calculation time, the unit commitment
bottleneck in the model should be avoided. Therefore, a pragmatic choice between
accuracy and the share of unit commitment in the overall calculation time is to be
made.
2.3
Factor to Consider in Solving the UC Problem
Several factors have to consider for solving the UC. The detail will be
illustrated below.
2.3.1
The Objective of Unit Commitment
The objective of the unit commitment algorithm is to schedule units in the
most economical manner. For the GENCO deciding which units to commit in the
competitive environment, economical manner means one that maximizes its profits.
For the monopolist operating in a vertically integrated electric system, economical
means minimizing the costs. In Malaysia (Peninsular), Malaysia Grid Code (MGC)
is playing the role to standardize the power system network, also the dispatching and
UC foe every GENCO. Every GENCOs have to comply with the requirement from
the MGC.
16
2.3.2
The Quantity to Supply
In system with vertically integrated monopolies, it is common for electric
utilities to have an obligation to serve all demand within their territory. Forecasters
provide power system operators an estimated amount of power demanded. The UC
objective is to minimize the total operational costs subject to meeting all of this
demand (and other constraints they may be considering).
In competitive electric markets, the GENCO commits units to maximize its
profit. It relies on spot and forward bilateral contracts to make part of the demand
known a priori. The remaining share of the demand that it may pick up in the spot
market must be predicted. This market share may be difficult to predict since it
depends on how its price compares to that of other suppliers.
The GENCO may decide to supply less demand than it is physically capable
of. In the competitive environment, the obligation to serve is limited to those with
whom the GENCO has a contract. The GENCO may consider a schedule that
produces less than the forecasted. Rather than switching on an additional unit to
produce one or two unsatisfied MW, it can allow its competitors to provide that 1 or
2 MW that might have substantially increased its average cost.
2.3.3
Compensating the Electricity Supplier
Maximizing profits in a competitive requires that the GENCO know what
revenue is being generated by the sale of electricity. While a traditional utility might
have been guaranteed a fixed rate of return based on cost, competitive markets have
17
varying pricing schemes that may price electricity at that level of the last accepted
dib, the average of the buy, ask and sell offer, etc. When submitting offers to an
auctioneer, the GENCO’s offer price should reflect its prediction market share since
that determines how many units they have switched on, or in banking mode.
GENCOs recovering cost vie prices set during the bidding process will note that the
UC schedule directly affects the average cost, which indirectly affects the offering
price, making it an essential input to any successful bidding strategy.
Demand forecasts and expected market prices are important inputs to the
profit-based UC algorithm; they are used to determine the expected revenue, which
in turn affects the expected profit. If a GENCO produced two UC schedules each
having different expected profits, it should implement the one that provides for the
largest profit, which will not necessarily be the one that cost the least. Since prices
and demand are so important in determining the optimal UC schedule, price
prediction and demand forecasts become crucial.
2.3.4
The Source of Electric Energy
A GENCO may be in the business of electricity generation, but it should also
consider purchasing electricity from the market, if it is less expensive than its own
generating unit(s). The existence of liquid markets gives energy trading companies
an additional source from which to supply power that may not be as prevalent in
monopolistic system. In Figure 2.2, the market supply curve can be thought of as a
pseudo-unit to be dispatched to the GENCO. The supply curve for this pseudo-unit
represents an aggregate supply of all of the units participating in the market at the
time in question. The price forecast essentially sets the parameters of the unit. This
pseudo-unit has no minimum uptime, minimum downtime, or ramp constraints; there
are no direct start-up and shutdown costs associated with dispatching the unit.
18
Producer Quadratic Cost Curves
Price
($)
Demand Curves of Consumers
Price
($)
GENCOs’ units
ESCOs’ demand
Market demand
Market supply
MW produced
Figure 2.2
MW demanded
Treating the market as an additional generator and / or load
The liquid (fuel and gas) markets that allow the GENCO to schedule an
additional pseudo unit, also act as a load to be supplied. The total energy supplied
should consist of previously arranged bilateral or multilateral contracts arranged
through the market (and their associated reserves and losses). While the GENCO is
determining the optimal unit commitment schedule, the energy demanded by the
market (i.e. market demand) can be represented as DISTCO or ESCO buying
electricity. Each entity buying electricity should have its own demand curve. The
market demand curve should reflect the aggregate of the demand of all the buying
agents participating in the market. In Malaysia, the DISTCO registered under
Suruhanjaya Tenaga are 34 companies and for the ESCO are 3 main companies
(TNB, SESCO and SESB).
2.4
Solution for Unit Commitment
This section introduces some of the most widely applied methods to solve the
UC problem. A huge number of new methods and variants were developed in the
19
meantime. Since the number of methods is large and even more numerous variants
exist, it was not possible to cover all of them in the scope of this work. So the
following list is not exhaustive, but it shows the outlines of some methods and
highlights the points that were important for this project.
2.4.1
Complete Enumeration
The brute force method for solving the UC problem is Complete
Enumeration. All possible combinations of generators are evaluated. For each
combination the aggregated incremental cost curve is intersected with the aggregated
incremental demand curve and the resulting social profit is calculated.
The
combination with the highest social profit wins. Generators that do not belong to this
combination are not committed. On one side, this method is guaranteed to find the
optimal solution. But on the other side, it suffers from the curse of dimensionality.
For N generators there are 2N – 1 possible combination to evaluate.
(2.4)
It is obvious that this scales badly. For 20 generators not less than 1,048,575
possibilities have to be compared. Even with high computing performance available,
this method is not feasible for hundreds of generators.
Since in the program
developed with 10 generators are rare and since it serves as a good reference for
other methods, the complete enumeration method was implemented in this project.
20
2.4.2
Priority List Methods
This method arranges the generating units in a start up heuristic ordering by
operating cost combined with transition costs. The pre-determine order is then used
to commit the units such that the system load is satisfied.
It is simple and
straightforward method which works as follow:
i.
Assign a priority to each unit.
ii.
Turn on the units in order of descending priority until enough power is
produced.
Since priorities are usually static, priority list methods typically require very
low calculation performance. If the objective function is production cost or social
profit, economic factors are used to assign priorities. One possible factor is the
Average Full Load Cost (AFLC) which is a hint on which generator is generally
more profitable. But remember that it could be much more profitable to not run one
generator at full load but rather commit more units. Then the AFLC may not be
significant anymore.
Another possible ordering criterion is the Commitment Utilization Factor
(CUF), which is applied in combination with the AFLC. The CUF indicates the
percentage of a unit’s spinning capacity that would actually be consumed if this unit
was committed. Heuristic criteria as AFLC or CUF do not guarantee an optimal
ordering for every demand. So the obtained solutions might be sub-optimal.
Various enhancements to the priority list scheme can be made by grouping of
units to ensure that various constraints are met. This will note that the dynamic
programming methods usually create the same type of priority list for use in the
dynamic programming search. This method was implemented in this project.
21
2.4.3
Dynamic Programming (DP)
Stated in the power system parlance, the essence of dynamic programming
(DP) is for the total running cost of carrying x megawatt (MW) of load on N
generating units to be a minimum, the load y MW carried by unit N must be such
that the remaining load of (x-y) MW is carried by the remaining (N-1) units also at
minimum cost.
In mathematical from FN(x) = Min [ gN(y) + fN-1(x-y) ]
(2.5)
Where;
FN(x)
= minimum running cost of carrying x MW load on N generating
units
gN(y)
= cost of carrying y MW load on unit N
fN-1(x-y)
= minimum cost of carrying the remaining (x-y) MW load on the
remaining (N-1) units
Dynamic programming was the earliest optimization based method to be
applied to the unit commitment.
It is used extensively throughout the world.
Dynamic programming has many advantages over the enumeration scheme; the chief
advantage over enumeration scheme is the reduction in the dimensionality of the
problem. One such method uses in dynamic programming is the priority list ordering
where the least costly units to operate are committed first and the most costly units
are committed last. A strict priority list would result in a theoretically correct
dispatch and commitment only if;
i.
The no-load costs are zero
ii.
Unit input-output characteristics are linear
22
iii.
There are no other limits, constrains or restrictions
iv.
Start-up costs are a fixed amount
In the dynamic programming approach, the following assumptions made are;
i.
The state consists of an array of units with specified units operating and
the test de-committed (off-line).
ii.
The start-up costs are independent of the off-line or down-time (i.e; it is
a fixed amount with respect to time.
iii.
No unit shutting-down costs
iv.
There is a strict priority order will be used within each interval
v.
A specified minimum amount of capacity must be operating within each
interval
A feasible state is one in which the committed units can supply the required
load and that meets the minimum amount of capacity each period. Forward dynamic
programming approach runs forward in time from the initial hour to the final hour.
The forward approach can handle a unit’s start up costs that are a function of the time
it has been off-line (temperature dependent) and it can readily account for the
system’s history.
The recursive algorithm to compute the minimum cost in hour K with
combination I is,
Fcost (K, I) = Min [Pcost (K,I) + Scost (K-1,L:K,I) + Fcost (K-1,L)] (2.6)
{L}
Where;
Fcost (K, I)
= least total cost to arrive at state (K, I)
23
Pcost (K,I)
= production cost for state (K, I)
Scost (K-1,L:K,I)
= transition cost from state (K–1, L) to (K, I)
State (K, I) is the Ith combination in hour K. for the forward dynamic
programming approach, we define a strategy as the transition or path from one state
at a given hour to a state at the next hour. Note that two variables, X and N are;
i.
X = number of state to search each period
ii.
N = number of strategies or path to save at each step
These variables allow control of the computational effort. For complete
enumeration, the maximum value of X or N is 2N – 1 and for a simple priority list
ordering, the upper bound on X is n, the number of units. Reducing the number N
means that information is discarded about the highest cost schedules at each interval
and saving only the lowest N paths or strategies. There is no assurance that the
theoretical optimum will be found. This is illustrated in the Figure 2.3.
24
N
X
X
Interval K - 1
Figure 2.3
N
Interval K
X
Interval K + 1
Restricted search path in DP algorithm with N = 3 and X = 5
25
2.4.4
Branch and Bound
Lauer [17] and Cohen [18] presented a new approach for solving UC problem
based on branch and bound method, which incorporates all time dependent,
constrains and does not require a priority ordering of units.
The branch and bound procedure consists of the repeated application of the
following steps.
First, that portion of the solution space (i.e., set of decision
variables under consideration) in which the optimal solution is known to lie is
partitioned into subsets.
Second, if all of the elements in a subset violate the
constraint of the minimization problem, then that subset is eliminated from further
consideration (fathomed). Third, an upper bound on the minimum value of the
objective function is computed. Finally, lower bounds are computed on the value of
the objective function when the decision variables are constrained to lie in each
subset still under consideration.
A subset is then fathomed if its lower bound
exceeds the upper bound of the minimization problem, since the optimal decision
variable cannot lie in that subset. Convergence takes place when only one subset of
decision variables remain, and the upper and lower bounds are equal for that subset.
2.4.5
Simulated Annealing
Simulated Annealing (SA) is a method to solve the Unit Commitment (UC)
problem based on the simulation of re-crystallizing metal in the process of slow
cooling (annealing). When the metal is in a melted state, the structure is disordered.
Now the temperature is decreased step by step. At each temperature step down, the
system reaches a new thermodynamic equilibrium. As the metal cools down, the
26
structure becomes more and more ordered and the system approaches the ground
state (T = 0 K).
For solving the UC problem,
i.
The ground state corresponds to the optimal solution,
ii.
The current state of the metal corresponds to the current solution and
iii.
The total energy of the atoms corresponds to the production costs
The algorithm takes small steps in direction of the ground state. As in a melt
of metal, one region going to a state of lower energy influences its neighborhood.
Similarly for the UC problem, all generators take tiny steps in direction of minimum
cost, but also influence their neighborhood, i.e. changing their production or
commitment state affects production and costs of other units.
At each step, new feasible solutions are generated randomly. If the costs of a
new solution are lower, it is accepted for proceeding. If the costs are higher, the
solution is accepted with a certain probability, just as in the natural annealing
process, where some atoms may change to higher energy state with a certain (though
small) probability.
There are several possibilities to code the Unit Commitment problem for
solving it with Simulated Annealing algorithms. One straightforward approach is to
encode the generator states (on or off) as a binary number containing one bit for each
generator.
An advantage of this method is that it does not strongly depend on the initial
solution. The rules for selecting solutions which will be modified, the rules for
27
affecting the neighborhood and for the magnitude of the changes are heuristic.
Therefore the method generally finds only near-optimal but not optimal solution.
2.4.6
Decommit and Prune
The Decommit and Prune method accelerates the search for the optimal
solution to a Unit Commitment problem with flexible loads. It is derived from the
Complete Enumeration approach and uses the same search tree, which is recursively
built and traversed. However, only a fraction of all possible generator combinations
have to be evaluated. Since this approach uses a search tree, it is related to Branch
and Bound methods.
Nevertheless, the approach is different from Branch and
Bound. In B & B, bounds are calculated per tree level. Solution on the same tree
level is compared with respect to these bounds. In the Decommit and Prune method,
the combinations at a common tree level are treated separately.
Only the
improvement in social profit from a parent to a child node is considered as pruning
criterion. This method may be slower than B&B methods that apply heuristics to
more drastically prune the search tree, but it is guaranteed to find the optimal
solution and still performs better than the Complete Enumeration method.
This approach is developed which also starts with a schedule of all available
units committed. Units are also decommited one at a time. The unit which is chosen
for decommitment is the one that seems most disadvantageous by some relative
economic indices. One proposed decommitment strategy is to decommit the “unit
with the highest relative system cost saving. This criterion considers the cost of
other units for picking up the generation which was generated by the unit before it
was decommitted. This approach is very well suited for a fixed load. But when
loads are flexible, it cannot be told in advance how much energy has to be picked up
by the remaining generators. The intersection between incremental demand and
28
incremental supply curve can be at a completely different total power.
When
decommitting a generator, the consequence for the remaining generators cannot be
determined exactly in advance. Therefore the method is not suited for this project
2.4.7
Lagrangian Relaxation
Based on Lagrangian Relaxation approach, the UC problem can be written in
terms of:
i.
A cost function that is the sum terms each involving a single unit
ii.
A set of constraints involving a single unit
iii.
A set of coupling constraints (the generation and reserve constraints),
one for each hour in the study period, involving all of the units.
Formally, we can write the UC problem as follows;
Minimise ∑ ∑ OC (Gi(t), Ui(t))
t
(2.7)
i
Subject to the unit constraints; Li (Gi, Ui) ≤ 0.
(2.8)
For all units I, where Gi = (Gi (1), …, Gi(T)) and Ui = (Ui(1),…., Ui(T)) and the
coupling generation and reserve constrains
∑ Ri,n (Gi(t), Ui(t)) ≥ Res – Req(t)
i
(2.9)
29
For all times t and requirement n. Everett showed that an approximate
solution to this problem can be obtained by adjoining the coupling constraints onto
the cost using Lagrange multipliers. The resulting “relaxed” problem is to minimize
the so-called Lagrangian subject to the unit constraints
D(Gi, Ui) = ∑ ∑ [OC (Gi(t), Ui(t)) - ∑ λn(t) Ri,n (Gi(t), Ui(t))]
t
(2.10)
i
Where λn(t) are the multipliers associated with the nth requirement for time t.
Describing the Lagrangian Relaxation method requires answering the following
questions;
i.
How do we find the multipliers λn(t) so that the solution to the relaxed
problem is near the optimum,
ii.
How close to the optimum is the solution, and
iii.
How do we solve the relaxed problem?
Everett and dual theory
together provides us the insight to the above questions and solutions.
Lagrangian Relaxation is also being used regularly by some utilities. Its
utilization in production UC problem is much more recent than the dynamic
programming. It is much more beneficial for utilities with a large number of units
since the degree of sub optimality goes to zero as the number of units increases. It
has also the advantage of being easily modified to model characteristics of specific
utilities. It is relatively easy to add unit constraints. The main disadvantage of
Lagrangian Relaxation is its inherent sub optimality.
Using benders decomposition, the formulation is decomposed into a master
problem and a sub-problem.
The master problem solves UC with prevailing
constraints, except transmission security and voltage constraints, by augmented
30
Lagrangian Relaxation. The refinement or reduction in complexity of Lagrangian
Relaxation method has also been suggested.
2.5
Summary
Since the introduction of electricity supply to the public in the late 1800s,
people in many parts of the world have grown to expect an inexpensive reliable
source of electricity. Providing that electric energy economically and efficiently
requires the generation company to carefully control their generating units and to
consider many factors that may affect the performance, cost and profitability of their
operation. In this project, the Dynamic Programming with approach of Enumeration
method and Priority List methods has been considered in developing the program for
the UC problem solution. This will be explained in detail in Chapter 4.
31
CHAPTER 3
PROJECT BACKGROUND
3.1
General Background and Concepts
Various approaches have been developed to solve the optimal UC problem.
These approaches have ranged from highly complex and theoretically complicated
methods to simple rule-of-thumb methods. The scope of operation schedule problem
will vary strongly from utility to utility depending on their mix of units and particular
operating constraints.
The economic consequences of operation scheduling are very important.
Since fuel cost is a major cost component in Malaysia, reducing the fuel cost by little
as 0.5% can result in saving of millions of dollars per year for large utilities.
A very important task in the operation of a power system concerns the
optimal UC considering technical and economical constraints over a long planning
horizon up to one year. The solution of the exact long-term is not possible due to
exorbitant computing time and, on the other hand, the extrapolation of short-term UC
to long-term period is inadequate because too many constraints are neglected such as
maintenance time and price increases, etc.
32
The energy management systems have to perform more complicated and
timely system control functions to operate a large power system reliably and
efficiently.
In the case of a power pool that involves several generation areas
interconnected by tie line, the objective is to achieve the most economical generation
policy that could supply the local demands without violating tie-line capacity
constraints. Although the thermal and hydro thermal unit commitment (UC) of the
single area has been studied extensively, the multi-area generation schedule has not
been given enough attention. The available literature for the UC involving multiareas reveals that scheduling should be considered together with a viable economic
dispatch to preserve the tie line constraints.
In the past, demand forecast advised power system operators of the amount of
power that needed to be generated.
But under partially or fully deregulated
environment, in the future, bilateral spot and forward contracts will make part of the
total demand known a priori. The remaining part of the demand will be predicted as
in the past. However, the generating companies (GENCOs) share of this remaining
demand may be difficult to predict since it will depend on how its price compares to
that of other suppliers. The GENCO’s price will depend on the prediction of its
share of this remaining demand as that will determine how many units they have
switched on. The UC schedule directly affects the average cost and indirectly the
price, making it an essential input to any successful bidding strategy. There may be a
tendency to think that maximizing the profit is essentially the same as minimizing the
cost. This is not necessarily the case. We have to remember that since we no longer
have the obligation to serve the demand, the GENCOs may choose to generate less
than the demand.
This allows a little more flexibility and makes the problem
complex in the UC schedules under the deregulated environment. Finally, the profit
depends, not only on the cost, but also on revenue. If revenue increases more than
the cost does, the profit will increase. So for the next generation UC problem,
researchers have to still play an important role.
33
If the bid functions are no convex or no differentiable in nature, which is
commonly seen in both regulated and deregulated power industry, then the above
problem becomes complex. Further, the complexity increases if the competition is
encouraged in both suppliers and buyers side including emission constraints. So it
has been observed that the DP models, can handle the present day complex UC
problem commonly seen within developed countries.
With the available standard software products, electric utilities have to
enhance, evolve, and upgrade or add new applications such as UC solutions for
modern deregulated power industry in conjunction with energy management system.
3.2
UC Under Deregulated Power Industry
Since the mid 1980s, the electrical power supply industry around the world
has experienced a period of rapid and critical changes regarding the way electricity is
generated, transmitted, and distributed. The need for more efficiency in power
production and delivery has led to privatization, restructuring, and, finally,
deregulation of the power sectors in several countries traditionally under control of
federal and state governments. Many countries like Canada, England, New Zealand,
Australia, U.S and etc are already exercising with the deregulated electricity
industry. Though there have been some pitfalls here and there, the end users of the
system are enjoying the fruits of the deregulated electricity industry tree. So it is the
high time for both the developed and developing countries to modify or replace their
traditional algorithms based on the requirements of the modern power industry.
In any restructured or deregulated power industry, the pool implements a
power action based on the UC model. Suppliers submit their bids to supply the
34
forecasted daily inelastic demand. Each bid consists of a cost function and a set of
parameters that define the operative limits of the generating unit. After the pool
solves the UC problem, the system marginal price is determined for each time period.
The system marginal price is nothing but the maximum average cost among the
scheduled generators. Several scheduling and pricing concerns have been raised
with the use of UC models to conduct power pool auction. It si reported that the cost
minimization model does not always lead to lower prices when they are defined as
maximum average costs. Cost suboptimal solution that result in lower prices may
exist and, therefore, the applicability of cost minimization UC models for power pool
auctions is questioned.
3.3
Load Demand Cycle
Because human activities follow cycles, most system supplying services to a
large population will experience cycles.
This includes transportation systems,
communication systems, as well as electric power system. In Malaysia, the electrical
power system consumption follows a daily, weekly and seasonal cycle. Generally,
the total load on the system will be higher during the daytime and early evening
when the industrial and commercial are operation, lights are on. Lower during the
late evening and early morning when most of the population is asleep. On the
weekly cycle, the demand will be lower during the weekend day compare during
weekdays. On the seasonal cycle, the load will be lower during the public holiday
due to some industrial and commercial are close operation.
The load cycle is
depends on the demand from the users. Therefore, it’s not given a constant / fixes
demand to the electrical power production (power generation) operation.
Load cycles create economic problems for the power generation. Note that to
“Commit” a generating unit is to “turn it on” that is, to bring the unit up to speed,
35
synchronize it to the system, and connect it so it can deliver power to the network. It
is quite expensive to continuously run all the generation which is needed to meet the
peak power demands. A great deal of money can be saved by turning units off
(decommitting them) when they are not needed.
The least expensive way to supply the generation is not with all the units
running, or evens any combination involving two, three or four units. Rather, the
optimum commitment is to only running the unit can be met the demand, the most
economic unit. By only running the most economic unit, the load can be supplied by
that unit operating closer to its best efficiency. If the another unit is committed, both
units will be loaded further from their best efficiency points such that the net cost is
greater than one unit alone. Consider load follows a simple “peak-valley” pattern as
shown in Figure 3.1;
1500MW
1150MW Peak Load
Total Loading
1000MW
500MW
450MW Min. Load
3 PM
Figure 3.1
9 PM
3 AM
9 AM
3 PM
Time of day
Simple “peak valley” load pattern
The demand varies from time to time as shown in Figure 3.1 above. There
are number of power generating units and each of them have individual constrains so
36
that to optimize the operation. The variation in demand causes problem to optimally
supply the power, so that the operation cost should be as low as possible.
For the large variations of load, in order to optimize the operation of the
system, some of the units must be shut down as load goes down and then the units be
recommitted as load goes back up. The simple approach to the solution is a simple
priority list scheme. Therefore, the program should be based on the priority list
scheme algorithm.
3.4
Constraint of Unit Commitment
There are different constrains in the unit commitment. Each individual power
system, power pool, reliability council may impose different rules on the scheduling
of units depending on the generating makeup, load curve characteristic and such.
Malaysia will be based on the Malaysia Grid Code requirement.
The following constrains have to be considered when scheduling generating
units. Especially for multiple time periods these constrains complicate the Unit
Commitment. Decisions for one time period affect the feasible solutions for earlier
or later time periods.
37
3.4.1 Spinning reserve constraints
It is the term used to describe the total amount of on-line, synchronized
generation power committed less the current loading and power losses supplied.
This must be carried to protect the network from an unexpected loss of one or more
generation units.
Typical spinning reserve rules to be allocated to various units. The rule
specifies that reserve must be a given percentage of the forecasted demand or must
be capable of making up the loss of the most heavily loaded generation unit in a
given period of time. Others calculate reserve requirements as a function of the
probability of not having sufficient generation to meet the load. Not only must the
reserve be sufficient to make up for a generation unit failure, but the reserves must be
allocated among fast responding units and slow responding unit. This allows the
automatic generation control system to restore frequency and interchange quickly in
the event of a generating unit outage.
Beyond spinning reserve, the unit commitment problem may involve various
classes of “scheduled reserves” or “off line” reserves. These include quick start
diesel or gas turbine units as well as most hydro units and pump storage hydro units
that can be brought on line, synchronized, and brought up to full capacity quickly.
As such, these units can be “counted” in the overall reserve assessment, as long as
their time to come up to full capacity is taken into account. Reserves must be spread
around the system to avoid transmission limitations (bottling) and permit parts of the
system to run as “islands”.
38
3.4.2 Thermal unit constraints
It can undergo only gradual temperature changes and results in a time period
of several hours to bring a unit on-line. Various constrains arise as a result of such
restriction in the operation, such as:
i.
Minimum up time: once the unit is running, it should not be turned off
immediately
ii.
Minimum down time: once the unit is de-committed, the minimum time
before a unit can be recommitted.
iii.
Crew constraint: if a plant consists of two or more units, there are
usually only enough personnel to start one unit at time.
3.4.3 Start-up Cost Constraints
In addition, because the temperature and pressure of the thermal unit must be
moved slowly, a certain amount of energy must be expended to bring the unit on line.
This energy does not result in any MW generation from the unit and is brought into
the unit commitment problem as a start-up cost.
The start-up cost can vary from maximum “cold-start” value to a much
smaller value if the unit was only turned off recently and it still relatively close to
operating temperature. There are two approaches to treating a thermal unit during its
down period. First allows the unit’s boiler to cool down and then heat back up to
operating temperature in time for a scheduled turn on. Second (banking) requires the
sufficient energy be input to the boiler to maintain the operating temperature. The
cost for the two can be compared so that, the best approach can be chosen.
39
Start-up cost when cooling = Cc (1 – ε-t/α) x F + Cf
(3.1)
Where;
Cc
= cold-start cost (MBtu)
F
= fuel cost
Cf
= fixed cost (includes crew expense, maintenance expense) (R)
α
= thermal time constant for the unit
t
= time (h) the unit was cooled.
Start-up cost when banking = Ct x t x F + Cf
(3.2)
Where,
Ct
= cost (MBtu/h) of maintaining unit at operating temperature
Up to the certain number of hours, the cost of banking will be less than the
cost of cooling. Finally, the capacity limits of thermal units may change frequently,
due to maintenance or unscheduled outages of various equipment in the plant; this
must be taken into account in unit commitment.
3.4.4 Hydro Constraints
Unit commitment can’t be completely separated from the scheduling of hydro
units. In this project, we will assume that the unit commitment hydro-thermal
scheduling problem can be separated from the unit commitment problem.
40
3.4.5 Must-Run Constraints
Some unit are given a must-run status during certain times of the year for
reason of voltage support on the transmission network or for such purposes as supply
of steam for uses outside the steam plant itself.
3.4.6 Fuel Constraints
A system in which some units have limited fuel, or else have constraint that
require them to burn a specified amount of fuel in a given time, presents a most
challenging unit commitment problem.
3.5
Introduction to Malaysia Grid Code System
The Grid Code is designed to permit the development, maintenance and
operation of the Grid system in an efficient, coordinated and economical manner,
providing a defined level of power quality avoiding any undue discrimination
between Users and categories of Users connected to the Grid system.
In
coordinating design, development, operational planning and real time operation of
the system both the GSO and all Users connected to the system are required to
comply with the Grid Code to ensure secure and safe operation of the system. A
schedule of diagrams is also provided to Users to facilitate better understanding of
certain aspects of this Grid Code. The schedule of diagram includes:
41
i.
Figure 3.2 – the entities in the Grid Code
ii.
Figure 3.3 - the Malaysia Electricity Industry Structure as used in the
Grid Code
iii.
Figure 3.4 - Planning code (data required to be annually submitted to
the GSO)
iv.
Figure 3.5 - Power system structure, connected parties and applicable
code
v.
Figure 3.6 - the generation dispatch process
The diagrams are conceptual and do not imply any specific relationship
between entities and / or any ownership by or of any of the entities. In order for the
GSO to achieve the appropriate central coordination, the availability of an adequate
level of generation capacity is essential. The GSO applies the Generation Security
Standard to forecast additional generation investment requirements on an annual
basis. The GSO will endeavour to maintain overall reliability of the Grid System
within the approved Transmission System Reliability Standards and the delivered
power quality from the Grid system within the transmission system power quality
standards. This means that the GSO will endeavour to balance generation and
demand at all times from the portfolio of generating plant that is made available by
the Generators as the GSO does not own or operate any generating plant.
The GSO reports its annual assessment of Generation Adequacy to the
Energy Commission (EC) in fulfillment of one of TNB’s license duties. However,
under the Electricity Supply Act, 1990 (Act 447) and Energy Commission Act, 2001
(Act 610), the EC is responsible for the implementation of government policies of
ensuring generation adequacy by “securing that all reasonable demands for
electricity are satisfied”.
Based on the foregoing, it is concluded that the Grid Code is an essential
document to provide procedures, requirements, responsibilities and obligations of the
42
GSO and all Users of the Grid system to ensure its efficient development and secure
operation without unduly discriminating any User or category of Uses. It is for this
reason that compliance to the Grid Code is obligatory and not optional under the
license term applicable to each User.
PARTIES IN THE GRID CODE
The Energy Commission
Interconnected Party
Party outside the country
connected at
transmission voltage
Grid System Operator
Plans and Operates
Peninsular Malaysia
Grid System
Direct Connected
Customers
Connected and
metered at
transmission voltage
G
Generator
TNB generations &
IPPs
C
Network Operator
Operate network
at any voltage &
may import /
export to the grid
Distributors
Connected to Grid and
operate only at
distribution voltage
and import power from
grid
Interconnected Party
Party outside the country
connected at
transmission voltage
Figure 3.2
Single
Buyer
The entities in the Grid Code system
TNB
transmission
Owner of the
transmission
Network,
develop asset,
Operate and
maintains
43
Industry Structure in the Grid Code
ENERGY COMMISSION Regulator
Generation
Genting
Sanyen
PD
Power
POWERTEK
PORTFOLIO
TNB Jana
Manjung
Teknologi Tenaga
Perlis Cons
YTL
PORTFOLIO
MALAKOFF
PORTFOLIO
Mustaq
hydro
Projass
engineering
NUR
TNB
GENERATION
PORTFOLIO
TNB
HYDRO
PORTFOLIO
Transmission
TNB Transmission
Asset development,
operation & maintenance of
the system
Grid system operator (GSO)
Planning, development plan
and operation of grid system
Single
Buyer
Distribution
Other Distribution
Companies
TNB Distribution
Customers
Figure 3.3
The Peninsular Malaysia electricity industry structure in terms of
functions as used in the Grid Code
44
PLANNING CODE
STANDARD
PLANNING
DATA
Data required to be annually submitted to
GSO
General Planning Data to be submitted by:
i.
A new user for a new connection application
ii.
An existing user for a modification to the connection
This General Data will then become;
i.
Preliminary project data
ii.
Committed project data
iii.
Contracted project data
And finally;
iv.
Registered data for the current year
v.
Estimated registered data for future years
DETAILED
PLANNING
DATA
Detailed Planning Data to be submitted by:
i.
A new user for a new connection application
ii.
An existing user for a modification to the connection
This Detailed Data will then become;
i.
Preliminary project data
ii.
Committed project data
iii.
Contracted project data
And finally;
iv.
Registered data for the current year
v.
Estimated registered data for future years
Figure 3.4
Planning code (data required to be annually submitted to the GSO)
45
POWER SYSTEM, PARTIES AND CODE
External
parties
External
parties
EG
G
G
Directly connected
customers
Main interconnected
transmission system
(500kV and 275kV)
G
Transmission
system at 132kV
and 66kV)
Network
operator
G
Network
operator
Consumers
Distribution
system at 33kV
and below
Consumers
Directly connected
customers
Embedded
Distribution
EG
Generation
system
Transmission
system
Distribution
system
TOTAL POWER SYSTEM
GRID CODE
Figure 3.5
DISTRIBUTION CODE
Power system structure, connected parties and applicable code
46
THE GENERATION DISPATCH PROCESS
Day (-1): after
17:00 hrs sent to all
G’s by the GSO
Day (0): changes to
schedule due to
breakdown or
changes to declared
availability.
OK
Indicative day ahead
generation schedule
Contract data from single
buyer
Modified generator
schedule
Day ahead dispatch parameter
changes submitted by the
generator
Actual dispatch in real
time
Generator availability redeclarations in real time
GSO checks delivery
time / dispatch
parameters
Record redispatches
Information
Settlement
information
for single
buyer
Figure 3.6
NOT OK
Re-dispatch (another
generator)
Record re-dispatches
Information
Settlement
information
for single
buyer
The generation dispatch process
3.5.1 General
The Grid Code shall be complied with by the GSO and all Users of the Grid
system who are issued with generation and / or transmission and / or distribution
47
licenses by the energy commission. This grid code sets out the operating procedure
and principles governing the relationship between GSO and all Users of the grid
system. The grid code also specifies day to day procedures for both planning and
operation purposes and covers a wide range of operation conditions likely to be
encountered under both normal and exceptional circumstances.
3.5.2 The Scope
The grid code is designed to permit the development, maintenance and
operation of an efficient, coordinated and economical grid system. It is conceived as
a statement of what is optimal particularly from a technical point of view, for all
Users in relation to the planning, operation and use of the grid system.
All Users have a duty to provide such information and resources as are
necessary to facilitate compliance with and implementation of the grid code. The
GSO, in planning and operating the grid system and in contributing to the planning
and operation the grid system has to rely on the accuracy of information which the
Users supply regarding their plant parameters, requirements and intentions. The
GSO shall not be held responsible for any consequence which arises from its
reasonable and prudent actions on the basis of such information supplied by any of
the User.
48
3.5.3 General Requirement
While the Grid Code contains procedures for equitable management of the
technical and economic aspects of the Grid System taking into account a wide range
of operational conditions likely to be encountered under both normal and exceptional
circumstances, it is also necessary to recognize that it cannot predict and address all
possible operational situations. It also relies on compliance of all Users with the
procedures in their entirety. The Users must therefore understand and accept that the
GSO, in unforeseen circumstances, will act decisively, to reasonably and prudently
discharge his responsibilities towards ensuring system security at all times in
pursuance of any one or combination of the following General Requirements:
i.
The preservation or restoration of the Grid System integrity;
ii.
The compliance of the Users with obligations imposed by their
Licenses or the Grid Code;
iii.
The avoidance of the breakdown, separation, islanding, collapse or
blackout of the whole or parts of the Grid System;
iv.
The fulfillment of safety requirements under all circumstances and at
all times; or
v.
The prevention of damage to Plant and Apparatus or the environment.
The GSO shall brief the Grid Code Committee from time to time in relation
to the operational actions taken and the implementation of the provisions in the Grid
Code. Users shall provide such reasonable co-operation and assistance as the GSO
may request in pursuance of the above General Requirements, including compliance
with their License conditions, the Grid Code and the instructions issued by the GSO.
49
3.5.4 Purpose
The purpose of the Grid Code is to describe the rights and responsibilities of
all relevant parties towards realizing and maintaining the reliability of the Grid
System. The Grid Code is an inseparable integral part of a set of legal and technical
documents defining the governance of the Malaysian Electricity Supply Industry.
The figure 3.7 and 3.8 are shown about the main grid system and major generation
under MGC.
Figure 3.7
Main grid systems in Peninsular Malaysia
50
TEWA
GT 2x34MW
TTPC
CCGT 650MW
SKS (PRAI)
CC 1x350MW
GLGR
GT 2x110MW
ST 1x110MW
PRAI CCGT
700MW
SEGARI
GT 6x140MW Gas
ST 2x231MW Gas
JANAMANJUNG
Conv 3x690MW coal
NUR
CCGT 2x120MW
Pergau
Bersia
4x150MW
3x24MW
Kenering
3x40MW Temenggor
Chenderoh
4x87MW
4x10MW
Upper Piah
2x7MW
Lower Piah
2x27MW
Woh
3x30MW
Minor
12MW
KAPAR
Conv 2x300MW Gas/oil
Conv 2x300MW Gas/oil/coal
GT 2x110MW Gas
Conv 2x500MW Gas/oil/coal
CONNOUGHT BRIDGE
GT 4x130MW Gas
GT 2x106MW Gas
ST 100MW
P GUDANG
Conv 2x120MW
GT 2x87MW
ST 95MW
GT 2x110MW
PAHLAWAN
GT 2x103MW Gas
ST 116MW
GENTING SANYEN
GT 38MW + 20MW
GT 3x151MW Gas
ST 251MW
Figure 3.8
PD POWER
GT 4x109MW
PANGLIMA
GT 2x230MW
ST 120MW
SERDANG
GT 3x135MW Gas
GT 2x110MW Gas
Thermal
Hydro
YTL
GT 4x128MW
ST 2x134MW
Kenyir
4x100MW
Joh
4x25MW
GB3
GT 3x143MW Gas
ST 1x211MW Gas
TUANKU JAAFAR
GT 231MW + 222MW Gas
CC1 262MW Gas
GT 2x250MW Gas
CC2 250MW Gas
PAKA
CC 3x290MW Gas
GT 2x87MW Gas
ST 92MW
POWERTEK
GT 4x109MW Gas
SKS (Tg Bin)
Conv 3x700MW Coal
GT Gas Turbine
ST Steam Turbine
CC Combine Cycle
Conv Conventional thermal
Major generation station under Malaysia Grid code
YTL
GT 2x128MW
ST 134MW
51
3.5.5 Generation Scheduling
Scheduling the operations of Generating Units is a major component of
operations plans. Scheduling of the Generating Units depends upon the pattern of
demand by the system, the Least Cost operation of Grid System, the availability,
parameters and costs of Generating Units, the flexibility of operation of Generating
Units, constraints on the Transmission System, security requirements, and System
losses.
The objectives of SDC1 are to enable the GSO to prepare a schedule based on
a Least Cost Dispatch model (or models) which, amongst other things, models
variable costs, price data, fuel price data, heat rate data, gas volume and pressure
constraints, other fuel constraints, reservoir lake level, and repairing requirement,
and allows hydro/thermal optimization and is used in the Scheduling and Dispatch
process and thereby:
i.
Ensures the integrity of the interconnected Transmission System;
ii.
Ensures the security of supply;
iii.
Ensures that there is sufficient available generating Capacity to meet
Transmission System Demand as often as is practicable with an appropriate
margin of reserve;
iv.
Enables the preparation and issue of a Generation Schedule;
v.
Enables optimization of the total cost of Grid System operation over a
specific period taking into account scheduled and forced outages
vi.
Enables optimization of the use of generating and transmission capacities;
vii.
Enables use of Energy from hydro-power stations to optimize system
marginal costs taking due account of reservoir levels, repairing requirements
and seasonal variations, which are based upon long term water inflow
records; and
viii.
Maintains sufficient solid and liquid fuel stocks, optimizes hydro reservoir
depletion and to meet fuel-contract requirement.
52
3.6
Modeling the Malaysia Grid Code system for UC Solution
MGC's generation mix is representative of the diversity of generation
resources in all of Peninsular Malaysia. The company's resources include gas-fired,
hydroelectric, pumped storage, nuclear, and geothermal power plants, and qualifying
facilities (QFs) based on such technologies as cogeneration, biomass, and solar and
wind power. The complexity of NLDC's (under TNB) plant-scheduling problem
thus reflects the problem of optimizing resources in the larger statewide electricenergy market. The primary costs considered in scheduling plants to meet forecast
customer demand are fuel costs, which vary widely depending on the amount of
hydro energy available but are typically on the order of $550 million per year. An
improvement in scheduling that result in two percent fuel savings can thus yield
savings of approximately $12 million per year.
The schedules for the hourly operation of generating units for one day to one
week ahead, often termed the system's unit commitment, determine GENCO's gas
requirements over that period and whether it will be profitable to buy or sell energy
from other utilities. These schedules also determine what units will be available for
adjustments in real time, where real time means everything from a few hours ahead
of time to near instantaneous system control. In the operations of MGC's power
system, plant scheduling is the point at which policies are translated into binding
operational decisions that cost money to revise. Its position in the electric utility's
decision making process is midway between the long-term economic process of
deciding on capacity expansion and the very short term automated decision making
required adjusting operations to real-time physical conditions.
Modeling the scheduling problem requires a high level of detail for both the
economic and physical aspects of the power system (Figure 3.9).
To produce
production schedules and cost forecasts, UC program requires detailed forecasts of
system and resource conditions, which may be based in part on longer-term decision
53
models.
UC schedule and cost forecasts serve in turn as inputs for real time
economic operations and automated control processes.
65 units gas
Hourly
Thermal
13 units steam
7 units combine
l
15 units
conventional
Hydro
30 units
Unit
Commitment
Program
Production
Marginal & Total
Reserve
4 units pumped
hydro
Figure 3.9
Modeling the MGC system for UC solution
The problem of scheduling electric generating plants is well known to be a
difficult one, even for utilities with only fossil-fuel plants. Fossil-fuel plants have
significant fuel costs at their minimum operating levels, as given in Figure 3.10.
Thus, while the incremental fuel rate is increasing in energy, the average fuel use per
unit of energy is decreasing up to a most efficient operating point, generally near the
maximum operating level. It is also quite costly to start up a fossil-fuel power plant.
Further, taking such a plant on and off line frequently would stress its equipment
over the long term.
Finally, large fossil-fuel plants are typically subject to ramping limits
reflecting their inability to change operating levels rapidly. Ramping limits also
affect the ability of units to contribute to required margins of reserve, which is
capacity available to generate electricity immediately in case of an unexpected plant
failure or increase in demand. Because of these considerations, looking ahead one
54
day or one week requires a mixed-integer nonlinear formulation of the generic unit
commitment problem, with decision variables defined for the on-off states and for
the operating levels of each unit in each hour of a day or week.
Fuel Input (Btu/kWh)
Thermal Unit Heat Rate
Average Heat Rate
Incremental Heat Rate
Power Output (MW)
Figure 3.10
Typically, the incremental and average heat-rate curves for fossil-fuel
unit
On the other hand, scheduling hydroelectric plants is a nonlinear network
flow problem with side constraints, whose objective is to maximize the value of the
water in the system. The efficiency of hydro plants depends on the production level
and the number of units on line in plants with multiple units, as shown in Figure
3.11, and the difference in the elevations of the reservoirs above and below the plant
The amount of water allocated for use in a given week or day usually depends on an
inherently stochastic optimization of water use over one or two years.
.
55
Power
Transition point from 1 unit on-line to 2 units on-line
2
2 units on-line
1
1 unit on-line
Water
Figure 3.11
Hydro Plant efficiency
NLDC's plant-scheduling problem combines the problems of committing
fossil fuel units and scheduling hydro plants. Adding to the complexities of the two
individual problems are the interactions intrinsic to scheduling both types of resource
at once with respect to a single objective. In addition to fossil-fuel and hydro plants,
NLDC must also schedule geothermal plants and pumped-storage hydro plants
(which can pump water upstream during low-cost hours in order to generate power in
high-cost hours) and many different types of transactions with other utilities.
Scheduling such transactions at NLDC has evolved into the activity of energy
trading; energy traders consider the trade-offs between buying or selling energy and
turning units on or off. NLDC can also ask some QFs to curtail their operations if the
replacement cost of energy, based on the schedule, is low enough. The combination
of all of these resource types results in a problem that cannot be solved by any
generic software or single optimization technique.
56
3.7
Summary
With the fast-paced changing technologies in the power industry, new power
references addressing new technologies are coming to the market. The modern unit
commitment problem has been followed the technology trend and the requirement of
the national grid code. The major constraints for the unit commitment have been
givens in general view to understand before implementation of the project. General
view of the Malaysian Grid Code requirement on the unit commitment has been
explained in detail. The modeling of the Malaysian Grid Code system for the Unit
Commitment solution has been developed as a project structure for developing the
program. This will be explained in detail in Chapter 4.
57
CHAPTER 4
METHODOLOGY
4.1
Introduction
In this chapter describes in detail on the methodology of the project. The
methodology is divided into;
4.2
i.
Steps of the project implementation
ii.
The method chosen for the UC problem solution.
Steps of the Project Implementation
In the process to implement this project, several steps have to be taken to
complete the full implementation. Understanding of the unit commitment is the first
step before everything else is to be considered. A lot of reference books, papers and
others related to unit commitment have been researched, compared and analyzed.
The dynamic programming technique has been fully focused for implementation in
this project.
58
The second step is to understand the requirement of Malaysia grid code.
Suruhanjaya Tenaga and Tenaga Nasional have been contacted to get the latest
version of the Malaysia grid code which is the second version. The grid code
provides procedures required to fulfill the requirement in the reasonable opinion of
the grid system operator (GSO) in real time.
After all requirements are fully understood, the next step is to develop the
suitable program using Turbo Pascal language. The program will be based on the
dynamic programming with two approaches; by enumeration scheme and priority
list. All the formulation and the arrangement will be referred to the related research
papers as stated in the literature section. This program will be tested on several test
system before finally being used to analyse the Malaysian Grid Code. All the input
data will be based on the example data from the reference books or papers. Some
modification may require later on to fix the problem on the system program. The
next step is to get all the input data that required to fully testing on the Malaysia Grid
Code. This will involve totally with Tenaga Nasional and Suruhanjaya Tenaga.
Figure 4.1 on the next page shows the flow diagram on the summary of the
methodology process to complete this project.
59
START
Understanding Unit Commitment Concept
(Focus on Dynamic Programming)
Understanding Malaysia Grid Code
Requirement version 2.0
Developing the program for solving Unit
Commitment (Dynamic Programming
approach) using Turbo Pascal language
Test the program on several test for the
example input data
Input data collection from Tenaga Nasional
& Suruhanjaya Tenaga base on Malaysia
Grid Code
Analyze the Malaysia Grid Code (Malaysia
system)
Final report completion
END
Figure 4.1
Project Process Steps flow diagram
60
4.3
The UC Solution Methodology
The detailed account of the dynamically evolving dynamic programming
technique which is used for the solution of this scheduling and cost problem is
described in this chapter.
4.3.1 Overview
In a daily or weekly system operation horizon, scheduling the available units
according to an optimal commitment order will lead to an optimal or a near-optimal
commitment depends not only upon the relative operational economics of the
available units but also upon the system load variations.
A priority order and
complete enumeration determine solely upon the average full load operation costs of
available units have been used in various short time unit commitment approaches.
This predetermined priority and enumeration works quite well if the system
hourly loads exhibit little variation. Otherwise a commitment schedule directly
determined from such a priority order may result in significant additional operation
costs. Due to the fact flat and a proper unit commitment is especially essential when
system hourly loads vary significantly; an efficient method which schedules the
available units accordingly to an adaptively determined commitment order deserves
research attention.
This observation has led to the development of the proposed method. The
subject method sequentially determines the optimal order for scheduling the
available units. The resulting commitment order reflects both the effect of unit
61
operational costs and system load variations, i.e. for the same set of available
generating units, the optimal commitment orders for two different hourly demand
patterns can be significantly different.
4.3.2 Dynamic Programming Approach to UC
In conventional dynamic programming (DP) approach, an objective function
(normally the total operating cost over the study period) is to be minimized subject to
some constraints such as power generation-load balance, spinning reserve
requirement, minimum up time, minimum down time, and crew constraints. To do
this, the study period (one day for the present work) is divided into N stages (N=24
in the present case) and the objective function to be minimized is written as
N
I
COST = ∑ ∑ [ Fcosti (Gi(H)) + Scosti ]
H =1 i =1
Where;
COST
=
total cost over the study period
I
=
number of thermal units
Fcosti (Gi(H)) =
cost of production Gi at unit i during stage H
Scosti
start-up cost for thermal unit i
=
The generation-load balance equation is expressed as;
(4.1)
62
I
∑ Gi(H) + GHYDRO(H) > L(H), H = 1,2,…,N
i=1
(4.2)
Where;
GHYDRO(H) =
total power from hydro units at stage H
L(H)
load demand at stage H
=
To obtain a commitment schedule with lowest cost, a recursive algorithm has
been derived to compute the minimum cost at stage H (hour H) with state J [1]
COST (H, J) = min [Fcost (H, J) + Scost (H-1, K: H, J) + COST (H-1, K)]
{K}
(4.3)
Where;
COST (H, J)
= least total cost to arrive at state (H, J)
FCOST (H, J)
= fuel (production) cost for state (H, J)
SCOST (H-1, K: H, J) = start-up cost from state (H-1, K)
{K}
= set of feasible states at stage H-1
The fuel cost FCOST (H, J) is obtained by economically dispatching the units
on-line in state J at hour H. It is noted that, once the minimum costs for the states at
stage N are computed using equation. (4.3), the optimal commitment schedule can be
reached through backward tracing.
In this project, an enumeration and strict priority list algorithm has been
implemented in this program. The Dynamic programming has many advantages
over the enumeration scheme, the chief advantage being a reduction in the
63
dimensionality of the problem. Suppose we have found 4 units in a system and any
combination of them could serve the (single) load. There would be a maximum of 24
– 1 = 15 combinations to test. However, if a strict priority order is imposed, there are
only four combinations to try;
i.
Priority 1 unit
ii.
Priority 1 unit + Priority 2 unit
iii.
Priority 1 unit + Priority 2 unit + Priority 3 unit
iv.
Priority 1 unit + Priority 2 unit + Priority 3 unit + Priority 4 unit
A feasible state is one in which the committed units can supply the required
load and that meets the minimum amount of capacity each period.
4.3.3 Modeling Approach
A sequential priority list method was chosen for forming the unit
combinations to be evaluated in each hour of solution. From a given priority ranking
of all units, the program forms the working list for each hour which excludes all
unavailable, must-run, fixed-MW, and peaking units.
Unavailable units are not
considered at all during the forming of combinations, must-run and fixed-MW units
are always committed for the hour, and peaking units are independently committed
(based on price) during economic dispatch. The units which remain on the working
priority list form the first combination for the hour. Subsequent combinations are
formed by removing one unit at a time from commitment
The objective function of the DP algorithm is the minimization of total costs,
which consist of:
64
i.
Fuel costs
ii.
Operation and maintenance costs
iii.
Shut-down costs
iv.
Start-up costs
Fuel costs are calculated using unit heat rate, efficiency, and fuel price
information. Operating and maintenance costs are represented in two terms, both $/h
and $/MBtu. Start-up costs are expressed as a function of the number of hours the
unit has been down. Shut-down costs are defined as a fixed dollar amount for each
unit per shut-down and are applied in the hour the unit is taken off line.
The constraints which must be satisfied in the search for a minimum cost
solution are:
i.
System load
ii.
Interchange schedules
iii.
Reserve requirements
iv.
Unit high and low limits
v.
Unit rate limits
vi.
Unit hourly de-rating
vii.
Unit minimum down time
viii.
Unit minimum up time
ix.
Unit availability (must-run, fixed-MW, unavailable, available)
x.
Unit start-up ramps
xi.
Plant crew constraints
If during the course of solution an hour is reached in which no feasible
combination of units can be found, constraints are relaxed one-by-one until at least
one feasible state is found for the hour. In the case of excess or deficient generating
capacity after all relaxations have been invoked, either the minimum capacity or the
65
maximum capacity combination is selected as the one state for the hour and the
solution continues.
4.3.4 Solution Difficulty
It was found that the unit start-up profile logic worked as expected in fixing
unit output when required. However, the final study solution often included hours in
which there was insufficient generation even though there was adequate total
capacity on line. To obtain the needed output from the committed capacity in the
deficient hours, it would have been necessary to start the restricted units earlier in
order to be past the units' hours of start-up ramp restriction. This difficulty is not
unlike the time dependency problem reported in Snyder's work as warranting further
work.
In traditional dynamic programming, several states (or combination of units)
are evaluated each hour with the intent to find the predecessor path which results in
the lowest cumulative cost through that hour. Consequently, each state evaluated
will have only one predecessor path and all other possible predecessors to that state
will be discarded as being sub-economic.
Figure 4.2 is a representation of standard DP logic. For simplicity, four states
(A through D) are considered in each of three study hours. The solid lines show the
economic paths between states and the dashed lines show sub-economic paths which
have been dropped. No arc is shown between states if the transition is infeasible.
66
Initial
State
Figure 4.2
Hour 1
Hour 2
Hour 3
A
A
A
B
B
B
C
C
C
D
D
D
Standard DP logic
The cause of the solution difficulty lies in the time dependent nature of the
start-up constraint. Even though starting a unit early may not be the economic choice
at a given point in the solution, it may be the only feasible option when the start-up
ramp constraint has its effect in a later hour. That option may have been totally lost
during the solution through economic disqualification.
For example, in Figure 4.2 suppose the only feasible solution in hour 3 were
state C with that same commitment having been on line since hour 1. In this case,
the link back to state C in hour 1 has been eliminated by the time hour 3 is
considered.
67
4.3.5 Dynamic Programming Enhancement
A typical approach to dealing with problems of time dependency is to
broaden the search range of states investigated and/or to deepen the list of feasible
states saved each hour. Unfortunately, it is still likely that the necessary path to start
a given unit early may be eliminated in the standard search for optimality, even if all
possible states (2 to the nth power minus 1; where n is the number of units available)
were evaluated and saved each hour.
The problem is not that the state which
includes the constrained unit is not being considered. The problem is that it is being
eliminated as a possible predecessor to a future hour which needs it for feasibility.
Again referring to Figure 4.2, even if many more combinations had been evaluated
and saved, the path linking to state C in all hours would still have been dropped in
favor of the A-to-C transition in hour 2.
To solve this problem of time dependency, a technique was developed which
saves predecessor combinations to a given state even though they may not represent
the path of lowest cumulative cost. The enhanced dynamic programming method
designates the least cumulative cost predecessor as the path to the primary state for a
combination and also defines secondary states of the same combination by saving all
other predecessor paths. In this manner, the analysis may include path options which
would have been eliminated in a strict search for the one least cost predecessor for
each combination, but which may offer a better solution over the entire study period.
68
Initial
State
Hour 1
Hour 2
Hour 3
A
A
A
B
B1
B1
C
B2
B2
D
C1
B3
C2
B4
D2
C1
D2
C2
D1
D2
Figure 4.3
Enhance DP Logic
Figure 4.3 demonstrates how the same problem shown in Figure 4.2 would be
approached with the new technique. Since no predecessor paths are dropped during
solution, there are no dashed lines showing removed paths. Instead, new states of the
same combination are formed to preserve the links to all predecessors. A
letter/number notation is used to distinguish new states (e.g., the multiple states
formed from the B combination are indicated by B1, B2, B3, and B4).
69
Of course, there must be a limit on how many secondary states are saved or
the number of states each hour would expand unreasonably. The logic for restricting
the number of states is as follows:
i.
Each combination being evaluated for the current study hour is paired
with all of its feasible predecessors to form multiple states in the current
study hour.
ii.
From those multiple states, one is selected as the primary state for that
combination based on lowest cumulative cost. Each combination has one
primary state selected from its multiple states.
All other states are
designated as secondary.
iii.
When all array space is used up, the highest cumulative cost secondary
state is eliminated in favor of any new combination or lower cost
Secondary state found in further evaluation. In this manner, every unique
feasible combination is guaranteed a spot on the list of states to be
evaluated in an hour and secondary options are preserved for
consideration as paths to future hour solutions.
Of course the process of eliminating secondary states may also eliminate the
path necessary for future hour feasibility, but this method increases the likelihood
that the required early start will still be an option when needed.
Figure 4.4 illustrates the enhanced solution of Figure 4.3 with a limit of six
states saved in any hour. (From Figure 4.3, the D1 state in hour 2 and the B3 and B4
states from hour 3 were dropped). In this example, the linkage to the C combination
in all three study hours is preserved.
70
Initial
State
Hour 1
Hour 2
Hour 3
A
A
A
B
B1
B1
C
B2
B2
D
C1
C2
C1
D
C2
D
Figure 4.4
Enhance DP with hourly State Restriction
Note how the forming of secondary states will dynamically make use of
available solution space. If the search window for combinations is small or if
constraints make very few combinations feasible in an hour, much or all of the
remaining array space may be filled with secondary states. When a large number of
feasible combinations are considered, all allocated space may be taken by unique
states with no secondary states at all.
71
4.4
Implementation
In addition to selecting a solution algorithm, we needed to choose a tool to
manage the program's input and output data. For example, the generation data from
each power plant as the inputs and the units scheduled and cost as an output.
We initially implemented the solution with the relational database software,
including a high level programming language. The Unit Commitment solution
program itself was coded in high level program language, Turbo Pascal. Turbo
Pascal was still the standard language of scientific programming.
Thus, the flow diagram on the solution for this project as shown in Fig. 4.6
must be employed to get a generation schedule and minimizes total operating cost.
72
START
Fcost (K, I) = MIN [ Pcost (K, I) + Scost (K-1, L:K, I)] {L}
K=K+1
X = Do for all
state I in period K
{L} = ‘N” FEASIBLE STATES IN INTERVAL K - 1
Fcost (K, I) = MIN [ Pcost (K, I) + Scost (K-1, L:K, I) + Fcost (K-1, L) ]
SAVE N LOWEST COST
STRATEGIES
Do for all X = state
I in period K
NO
K = M, LAST HOUR?
TRACE OPTIMAL SCHEDULE
END
Figure 4.5
flow diagrams for the program
The program for the unit commitment algorithm proceeds in the following steps.
i.
Perform unit commitment for the whole system using dynamic programming
taking the constraints such as load generation balance, spinning reserve
requirement, and minimum up and down times, into account. The resultant
73
generation schedule, which is referred to as the base generation schedule,
does not take the dynamic security constraint into account.
ii.
Define a strategy as the transition or path from one state at a given hour to a
state at the next hour. The recursive algorithm to compute the minimum cost
in hour K with combination I.
These variables allow control of the
computational effort
iii.
Define the lowest cost. Save it, this process will return to (ii) if the system
value still able to decrease. After the program has defined the lower value
cost, it will proceed to the next step.
iv.
Determine the total generation at each area which is the sum of the load
demand at that area and the net out-going flow from the area. Perform area
economic dispatch for each of the three areas in the system. This program
will define which units are required to “on” and “off” base on the load
demand given.
4.4.1 Input Requirement
4.4.1.1 Power Generation
A power system with a small variety of power stations is from a modeling
point of view is not very challenging for UC. Unit Commitment will only determine
how many power plants are on-line. But since most of the operating plants have
more or less the same characteristics, this will not dramatically influence the
outcome.
74
Unit Commitment will become a real challenge for power systems with a
wide variety of power plants (nuclear, coal fired, gas fired, lignite fired, hydro,
renewable, etc.). In these cases, Unit Commitment not only determines how many
plants are on-line, but also which types of plants are active. The power system
chosen for the comparative test therefore contains different types of power plants.
This power system example is shown in Table 4.1. The parameters that are
given for all plants are the total power, the start and operation costs (expressed in the
hypothetical unit cost) and the minimum up and down time. All the parameters for
each unit will be an input to compute the problem of Unit Commitment.
Max MW
Incremental
heat rate
(Btu/kWh)
No load cost ao
(R/h)
Start up cost
Fuel cost
($/Mbtu)
Min up time (h)
455
150
455
9438
1000
9000
$1.20
8
8
8
coal
2
455
150
455
9438
970
10000
$1.20
8
8
8
coal
3
130
20
130
9381
700
1100
$2.30
8
8
-5
oil #6
4
130
20
130
9381
680
1120
$2.30
8
8
-5
oil #6
5
162
25
162
9620
450
1800
$2.30
8
8
-6
oil #6
6
80
20
80
9877
370
340
$3.00
4
4
-3
oil #2
7
85
25
85
9860
480
520
$3.00
4
4
-3
oil #2
8
55
10
55
14427
660
60
$3.00
4
4
-1
oil #2
9
55
10
55
14427
665
60
$3.00
4
4
-1
oil #2
10
55
10
55
0
670
60
$0.00
1
1
-1
hydro
Fuel Type
Min MW
1
Min down time
(h)
Installed
capacity MW
Initial Status
off-line / on-line
Unit Generation data required for UC program
Unit Gen
Table 4.1
75
4.4.1.2 Electrical Demand
For electricity demand, a one day period is used with three hour intervals for
twenty hours period, which results in 8 values (24 / 3 = 8). Because electricity
demand may differ from region to region, the demand patterns, shown in Figure 2,
are tested. The first three are a simple block wave, a triangular wave and a triangular
Load (MW)
wave with noise.
1600
1400
1200
1000
800
600
400
200
0
Series2
Series1
1 2 3 4 5 6 7 8 9 101112131415161718192021222324
period (hour)
11
12
13
14
15
16
17
18
19
20
21
22
23
24
1500
1400
1300
1200
1050
1000
1100
1200
1400
1300
1100
900
800
8
1200
1450
7
1150
9
5
6
1000
1100
10
3
4
850
950
1400
2
750
1300
1
Load Demand in 24 hours period
700
Table 4.2
Period
(hour)
Load Demand for one day (24 hours)
Load
(MW)
Chart 4.1
76
4.5
Problem Facing
Briefly, the first problem undertaken in this project was the availability of the
data. The author had difficulties to get full data base on the Malaysia Grid Code
(MGC), mostly TNB’s data are confidential and unable to get the whole Malaysian
generation data. Some input data given are the dummy value but related to the
original value. Therefore, the available data were only for state of Johor and Kedah
with 10 units’ generation each state.
The second problem was the inability of the program to run the big data of
generation. The program has been limited to run the generation data up to ten units
only. This method suffers from the curse of dimensionality because the problem of
the size (number of states) increases rapidly with the number of generating units to
be committed, which results in an unacceptable solution time.
4.6
Summary
The methodology if the project was divided into two sections, which are;
process step and the method chosen for UC solution. Process steps are the process
flow since this project started until it completed, while the method chosen for the UC
solution was the Dynamic Program approach. The DP is considered an effective
solution technique in power system, not only because scheduling is naturally a
sequential decision process, but also because formulation of the UC problem is easy
amenable. An enumeration and priority list has been considered in DP solution. Flow
diagram is illustrated the programming process implementation.
The input
requirements to the program have been detailed explain. The project has been faced
77
some problems; the availability of the data and inability the program to run the big
data.
78
CHAPTER 5
RESULTS AND DISCUSSION
5.1
Testing the Algorithm
Verification of this program has been done by testing the algorithm on power
system data.
Although the dynamic programming algorithm can accommodate
power system with any number of units, the testing has been conducted in two stages
as follow;
i.
Stage one – using IEEE test data with 3 units generation, 4 units
generation, 8 units generation, 10 units generation and 32 units generation
to verify the developed algorithm.
ii.
Stage two – using TNB and Malaysia Grid Code data. State of Johor with
10 units generation and state of Kedah with 10 units to prove the practical
applicability of the algorithm.
79
5.1.1 System Data
The system data required for running the program is described in this topic.
5.1.1.1 Generation Unit Data
The generating data was taken on the unit's low limit, high limit; incremental
cost, incremental heat rate and no load cost are input. The start up cost and fuel cost
are also included together with such parameters as minimum down and up time and
the initial unit status.
5.1.1.2 Load Curve Data
The load curve is specified as a series of constant MW load periods. Each
load period may be of any length in hours as set by the user. Up to 8 periods of load
data may be taken as the input.
80
5.1.1.3 Input Data File Format
The unit commitment input data file starts with two header lines of up to
eighty characters each. This is followed by a line with a single number equal to the
number of generating units represented. Each generating unit has exactly four lines
of data. The first is a dummy line of characters much like the header (it is ignored by
the program and just serves as a label in the data file). The second line contains the
unit low limit in MW, the unit high limit in MW and the unit incremental heat rate in
Btu/k Wh. The third line contains the unit no load cost in R/h, the unit start up cost in
R and the unit fuel cost in R/MBtu. The fourth line contains three integers: the unit
minimum up time in hours, the unit minimum down time in hours and the initial unit
status in hours (positive being hours up and negative being hours down at the start of
the schedule).
This is followed by another line with two entries containing the number of
periods in the load schedule and the length in hours for each period. This is followed
by a line with MW load values one for each period in the schedule. The
characteristics, parameters of the production, startup and shutdown costs of each unit
generators are given in the table. The system load daily profile is specified also in
the table and chart.
The following is an example of the data file for IEEE 4 units system given as
a file named UNITCOM1.DAT. The arrow (<----) denotes comments which do not
appear in the data file.
UNIT COMMITMENT DATA FILE - 8 PERIODS/4 UNITS (IEEE 4 units)
-------------------------------------------------------------------------------------------4
<---- number of units
unit 1 data
<---- dummy "comment line for first unit
25.0 80.0 10440.0
<---- unit 1 min MW, max MW, inc heat rate.
81
213.0 350.0 2.0
<---- unit 1 no load cost, start up cost, fuel cost
4 2 -5
<---- unit 1 min up time, min down time, initial status
unit 2 data
<---- dummy line for second unit
60.0 250.0 9000.0
585.62 400.0 2.0
5 3 8
unit 3 data
75.0 300.0 8730.0
684.74 1100.0 2.0
5 4 8
unit 4 data
20.0 60.0 11900.0
252.0 0.02 2.0
1 1 -6
8 1.0
<---- number of periods and length period in hours
450.0 530.0 600.0 540.0 400.0 280.0 290.0 500.0
<---- load MW values
5.1.2 Testing Data
The tests have been conducted for several data as below;
i.
IEEE 4 units data
- Given in tables 5.1 and chart 5.1
ii.
IEEE 8 units data
- Given in tables 5.2 and chart 5.2
iii.
IEEE 10 units data
- Given in tables 5.3 and chart 5.3
iv.
IEEE 32 units data
- Given in tables 5.4 and chart 5.4
v.
MGC 10 units data
- Given in tables 5.5 and chart 5.5 (State Johor
data)
vi.
MGC 10 units data
Melaka data)
- Given in tables 5.6 and chart 5.6 (State
82
10440
9000
8730
11900
11900
8440
8440
9000
$2.00
$2.00
$2.00
$2.00
$1.50
$1.50
$1.35
1.2
4
5
5
1
1
1
4
5
Initial Status
off-line / online
350
400
1100
0.02
350
100
400
200
Min down
time (h)
213
585.62
684.74
252
113
293
305
700
Min up time
(h)
Fuel cost
($/Mbtu)
80
250
300
60
60
480
800
300
Start up cost
25
60
75
20
25
25
225
60
No load cost
ao (R/h)
Max MW
80
250
300
60
60
480
800
300
G1
G2
G3
G4
G5
G6
G7
G8
Incremental
heat rate
(Btu/kWh)
Min MW
IEEE 4 unit’s data
Installed
capacity
MW
Unit Gen
Table 5.1
2
3
4
1
1
1
2
3
-5
8
8
-6
-5
-5
-5
8
Load Dem and (M W)
2500
2000
1500
Load (MW)
1000
Series1
500
0
1
2
3
4
5
6
7
Time (Hour)
Chart 5.1
Load Demand profile for IEEE 4 units
8
83
Initial Status off-line
/ on-line
Min down time (h)
Min up time (h)
Fuel cost ($/Mbtu)
Start up cost
No load cost ao
(R/h)
Incremental heat
rate (Btu/kWh)
Min MW
Max MW
IEEE 8 unit’s data
Installed capacity
MW
Unit Gen
Table 5.2
G1
80
25
80
10440
213
350
$2.00
4
2
-5
G2
250
60
250
9000
585.62
400
$2.00
5
3
8
G3
300
75
300
8730
684.74
1100
$2.00
5
4
8
G4
60
20
60
11900
252
0.02
$2.00
1
1
-6
G5
60
25
60
11900
113
350
$1.50
1
1
-5
G6
480
25
480
8440
293
100
$1.50
1
1
-5
G7
800
225
800
8440
305
400
$1.35
4
2
-5
G8
300
60
300
9000
700
200
$1.20
5
3
8
Load Dem and (MW)
2500
2000
1500
Load (MW)
1000
Series1
500
0
1
2
3
4
5
6
Time (Hour)
Chart 5.2
Load demand profile for IEEE 8 units
7
8
84
Incremental
heat rate
(Btu/kWh)
No load cost ao
(R/h)
Start up cost
Fuel cost
($/Mbtu)
Min up time (h)
150
455
9438
1000
9000
$1.20
8
8
8
coal
2
455
150
455
9438
970
10000
$1.20
8
8
8
coal
3
130
20
130
9381
700
1100
$2.30
8
8
-5
oil #6
4
130
20
130
9381
680
1120
$2.30
8
8
-5
oil #6
5
162
25
162
9620
450
1800
$2.30
8
8
-6
oil #6
6
80
20
80
9877
370
340
$3.00
4
4
-3
oil #2
7
85
25
85
9860
480
520
$3.00
4
4
-3
oil #2
8
55
10
55
14427
660
60
$3.00
4
4
-1
oil #2
9
55
10
55
14427
665
60
$3.00
4
4
-1
oil #2
10
55
10
55
0
670
60
$0.00
1
1
-1
hydro
1600
1400
1200
1000
800
600
400
200
0
Series2
Series1
1 2 3 4 5 6 7 8 9 101112131415161718192021222324
period (hour)
Chart 5.3
Fuel Type
Max MW
455
Min down time
(h)
Min MW
1
Load (MW)
Installed
capacity MW
Initial Status
off-line / on-line
IEEE 10 unit’s data
Unit Gen
Table 5.3
Load demand profile for IEEE 10 units
85
Min down
time (h)
Initial Status
off-line / online
15600
110
60
$2.30
8
8
-6
Oil #6
2
12
2.4
12
15600
110
60
$2.30
8
8
-6
12
15600
111
70
$2.30
8
8
-6
Min up time
(h)
12
Fuel cost
($/Mbtu)
No load cost
(R/h)
2.4
Min MW
12
Installed
capacity
MW
1
Unit Gen
Oil #6
Fuel
Incremental
heat rate
(Btu/kWh)
Start up cost
IEEE 32 unit’s data
Max MW
Table 5.4
Oil #6
3
12
2.4
Oil #6
4
12
2.4
12
15600
110
60
$2.30
8
8
-6
12
15600
110
60
$2.30
8
8
-6
Oil #6
5
12
2.4
Oil #2
6
20
16
20
15000
150
110
$3.00
4
4
-2
20
15000
150
100
$3.00
4
4
-2
Oil #2
7
20
16
Oil #2
8
20
16
20
15000
150
100
$3.00
4
4
-2
9
20
16
20
15000
150
100
$3.00
4
4
-2
Hydro
10
50
45
50
0
110
30
$0.00
1
1
-1
Hydro
11
50
45
50
0
110
30
$0.00
1
1
-1
Hydro
12
50
45
50
0
110
30
$0.00
1
1
-1
50
0
110
30
$0.00
1
1
-1
Oil #2
Hydro
13
50
45
Hydro
14
50
45
50
0
110
30
$0.00
1
1
-1
50
0
110
30
$0.00
1
1
-1
Hydro
15
50
45
Coal
16
76
15.2
76
12000
213
100
$1.20
12
12
8
76
12000
213
101
$1.20
12
12
8
Coal
17
76
15.2
Coal
18
76
15.2
76
12000
213
101
$1.20
12
12
8
Coal
19
76
15.2
76
12000
213
102
$1.20
12
12
8
Oil #6
20
100
25
100
10000
670
114
$2.30
8
8
-5
100
10000
670
114
$2.30
8
8
-5
Oil #6
21
100
25
Oil #6
22
100
25
100
10000
670
114
$2.30
8
8
-5
Coal
23
155
54.25
155
9700
550
282
$1.20
12
12
8
Coal
24
155
54.25
155
9700
550
282
$1.20
12
12
8
155
9700
550
283
$1.20
12
12
8
Coal
25
155
54.25
Coal
26
155
54.25
155
9700
550
282
$1.20
12
12
8
Oil #6
27
197
68.95
197
9600
780
227
$2.30
8
8
-6
Oil #6
28
197
68.95
197
9600
790
227
$2.30
8
8
-6
197
9600
780
227
$2.30
8
8
-6
Oil #6
29
197
68.95
Coal
30
350
140
350
9500
980
540
$1.20
12
12
8
LWR
31
400
100
400
10000
2000
1460
$0.60
24
24
8
LWR
32
400
100
400
10000
2000
1455
$0.60
24
24
8
86
Load Dem and (M W)
120
100
80
Series2
60
Series1
40
20
0
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425
Time (hour)
Start up cost
Fuel Cost
Min up time
Min down time
Initial Status
off-line / on-line
120
36
120
11957
36000
24000
5
6.066
2
4
-2
U2
120
36
120
11957
36000
24000
5
6.066
2
4
-2
87
37
87
14516
36000
24000
4
6.066
1
4
-2
87
37
87
14516
36000
24000
4
6.066
1
4
-2
6A
110
33
110
12766
36000
24000
5
6.066
1
4
-2
6B
110
33
110
12766
36000
24000
5
6.066
1
4
-2
GT11
130
40
130
12000
36000
25000
4
6.066
2
5
-3
GT12
130
40
130
12000
36000
25000
4
6.066
2
5
-3
ST10
130
40
130
9000
36000
25000
4
6.066
2
5
-3
U1
700
210
700
9991
38000
28000
5
5.79
8
8
8
PGPS
YTLPg
Tg. BIN
Unit Gen
GT3A
GT3B
Cold start (h)
No load cost
(R/h)
U1
Power Plant
Incremental
heat rate
(Btu/kWh)
MGC 10 unit’s data (Johore state)
Max MW
Table 5.5
Min MW
Load demand profile for IEEE 32 units
Installed
capacity
Chart 5.4
Load Dem and (MW)
87
2000
1800
1600
1400
1200
1000
800
600
400
200
0
Series2
Series1
1 2 3 4 5 6 7 8 9101112131415161718192021222324
Time (hour)
Incremental heat
rate (Btu/kWh)
No load cost
(R/h)
Start up cost
fuel cost
Cold start (h)
Min up time
Min down time
103
40
105
10556
32000
26000
6.066
15
2
5
-2
GT2
103
40
105
10556
32000
26000
6.066
15
2
5
-2
ST
116
45
120
8781
29000
26000
6.066
15
3
5
-2
GT11
230
70
230
11897
34000
25000
6.066
4
1
4
-1
GT12
230
70
230
11897
34000
25000
6.066
4
1
4
-1
ST
GT1A
GT1B
GT2A
GT2B
110
108.5
108.5
108.5
108.5
30
110
25
25
25
25
109
109
109
109
7660
12108
12108
12108
12108
30000
33000
33000
33000
33000
25000
26000
26000
26000
26000
6.066
6.066
6.066
6.066
6.066
4
1
1
1
1
2
1
1
1
1
5
4
4
4
4
-1
-1
-1
-1
-1
Powertek
Unit Gen
Initial Status offline / on-line
Max MW
GT1
Power Plant
Min MW
MGC 10 unit’s data (Malacca state)
Installed
capacity
Table 5.6
Pahlawan
Load demand profile for MGC 10 units (Johore state)
Panglima
Chart 5.5
88
1400
Load Demand (MW)
1200
1000
800
Series2
600
Series1
400
200
0
1 2 3 4 5 6 7 8 9 101112131415161718192021222324
Time (hour)
Chart 5.6
5.2
Load demand profile for MGC 10 units (Malacca state)
Results and Analysis
The results of each data tested are shown in Figures 5.1 to 5.9. The status of
the units is given as “ON” or “OFF” state and the total cost (optimum cost) for each
data is also presented.
5.2.1 Test 1 (IEEE 4 unit’s data)
The comparative results of Priority Listing and Complete enumeration for
IEEE system with 4 generating units are shown in Figure 5.1 and 5.2. These two
results have shown differences on the units activated and also the total generating
89
cost. By complete enumeration, the program has chosen the best way for scheduling
the generation at the optimum cost as compared to priority list. The maximum
number of states in dynamic search for this program is 256.
It has taken 15
combinations to obtain the best solution. While by priority list, the generation cost
increases by about 2.55%. On the other hand, the priority list is 5 time faster than
enumeration.
PERIOD 8 SYSTEM LOAD = 500.000 MW
STATE
PCOST PATH
UNIT STATUS
1
2
3
4
R/HR
2
-2
16
16
-14
10108
2
3
3
16
16
-14
10393
3
4
4
16
16
1
10761
3
FCOST
R
75143.38
75726.88
76094.9
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 75143.38 R
PERIOD STATE
8
7
6
5
4
3
2
1
Figure 5.1
2
2
3
3
3
3
2
2
1
OFF
OFF
ON
ON
ON
ON
OFF
OFF
UNIT STATUS
2
3
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
4
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
PCOST
R/HR
10108
6366
6490
8593
11113
12265
10648
9208
LOAD
MW
500
290
280
400
540
600
530
450
Result output on the IEEE 4 unit’s data with Priority List
90
STATE
1
2
9
10
1
1
1
-13
-13
UNIT STATUS
2
3
1
16
1
16
1
16
1
16
4
1
-5
1
-5
PCOST PATH
R/HR
10761
14
10393
14
10476
14
10108
14
FCOST
R
74276.88
73908.86
73641.88
73273.86
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 73273.86 R
PERIOD STATE
8
7
6
5
4
3
2
1
Figure 5.2
10
14
14
10
10
9
10
10
1
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
UNIT STATUS
2
3
ON
ON
OFF
ON
OFF
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
4
OFF
OFF
OFF
OFF
OFF
ON
OFF
OFF
PCOST
R/HR
10108
5748
5574
8308
10828
12450
10648
9208
LOAD
MW
500
290
280
400
540
600
530
450
Result output on the IEEE 4 unit’s data with complete Enumeration
5.2.2 Test 2 (IEEE 8 unit’s data)
The results are shown in figure 5.3 and figure 5.4. As explained in the test 1,
by complete enumeration the result is better than by priority list.
91
STATE
3
4
5
6
7
1
-13
-13
-13
-13
-13
UNIT STATUS
2
3
-3
-3
-3
-3
-3
1
1
1
1
1
4
-3
1
1
1
1
5
-4
-4
-4
-4
1
6
1
1
1
1
1
7
8
8
8
8
8
8
1
1
1
1
1
PCOST PATH FCOST
R/HR
R
56598
1 346518.26
57583
1 347483.08
62414
1 353434.50
64268
1 355688.56
65061
1 356831.52
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 346518.26 R
PERIOD STATE
8
7
6
5
4
3
2
1
Figure 5.3
3
1
1
6
7
2
1
1
1
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
2
OFF
OFF
OFF
ON
ON
OFF
OFF
OFF
3
OFF
OFF
OFF
ON
ON
OFF
OFF
OFF
UNIT STATUS
4
5
6
OFF OFF ON
OFF OFF OFF
OFF OFF OFF
ON OFF ON
ON ON ON
OFF OFF OFF
OFF OFF OFF
OFF OFF OFF
7
ON
ON
ON
ON
ON
ON
ON
ON
8
ON
OFF
OFF
ON
ON
ON
OFF
OFF
PCOST LOAD
R/HR
MW
56598 1500
10828
290
25526
720
80112 1800
96637 2200
35221
950
22450
630
16297
450
Result output on the IEEE 8 unit’s data with priority list
92
STATE
121
225
233
241
249
1
1
-13
-13
-13
-13
UNIT STATUS
2
3
-3
-4
-3
-4
-3
-4
-3
-4
-3
-4
4
-4
1
1
-4
-4
5
-4
1
-4
1
-4
6
1
1
1
1
1
7
8
8
8
8
8
8
1
1
1
1
1
PCOST PATH
R/HR
57993
254
58491
254
57563
254
57527
254
56598
254
FCOST
R
341626.24
342124.56
340864.86
341159.74
339881.24
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 339881.24 R
PERIOD STATE
8
7
6
5
4
3
2
1
Figure 5.4
249
254
254
185
129
253
254
254
1
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
2
OFF
OFF
OFF
ON
ON
OFF
OFF
OFF
3
OFF
OFF
OFF
OFF
ON
OFF
OFF
OFF
UNIT STATUS
4
5
6
OFF OFF ON
OFF OFF OFF
OFF OFF OFF
OFF OFF ON
ON ON ON
OFF OFF OFF
OFF OFF OFF
OFF OFF OFF
7
ON
ON
ON
ON
ON
ON
ON
ON
8
ON
OFF
OFF
ON
ON
ON
OFF
OFF
PCOST
R/HR
56598
10828
25526
73475
96637
35221
22450
16297
LOAD
MW
1500
290
720
1800
2200
950
630
450
Result output on the IEEE 8 unit’s data with complete Enumeration
In Figure 5.4, the no of state for system with 8 generating units almost
reaches the limit of the program, which is 256 states.
5.2.3 Test 3 (IEEE 10 unit’s data)
Figure 5.5 shows the results for the system with 10 generating units by priority
list.
93
STATE
3
4
5
6
7
11
1
16
16
16
16
16
16
UNIT STATUS
2
3
4
16
-1
-1
16
-1
-1
16
-1
5
16
5
5
16
5
5
16
1
1
5
-1
6
6
6
6
-1
6
-2
-2
-2
-2
4
-2
7
-2
-2
-2
-2
-2
-2
8
-9
-9
-9
-9
-9
-9
9
-9
-9
-9
-9
-9
-9
10
6
6
6
6
6
-1
8
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
9
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
PCOST PATH FCOST
R/HR
R
33233
6 431312.46
35393
6 433472.49
41431
6 439510.26
47528
6 445608.03
49737
7 449376.66
33091
6 431171.18
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 431171.18 R
PERIOD STATE
8
7
6
5
4
3
2
1
11
6
8
8
6
4
11
11
Figure 5.5
1
ON
ON
ON
ON
ON
ON
ON
ON
2
ON
ON
ON
ON
ON
ON
ON
ON
3
OFF
ON
ON
ON
ON
OFF
OFF
OFF
4
OFF
ON
ON
ON
ON
OFF
OFF
OFF
UNIT STATUS
5
6
7
OFF OFF OFF
ON OFF OFF
ON ON ON
ON ON ON
ON OFF OFF
ON OFF OFF
OFF OFF OFF
OFF OFF OFF
10
OFF
ON
ON
ON
ON
ON
OFF
OFF
PCOST
R/HR
33091
66137
62739
84494
66137
49150
34790
29694
LOAD
MW
800
1300
1100
1500
1300
1100
850
700
Result output on the IEEE 10 unit’s data with priority list
The result of the program in Figure 5.5 shows that it still able to complete the
test for the best output they can select. While with the 10 unit’s generator data, by
complete enumeration as shown in Figure 5.6, the program was unable to find the
solution due to the limitation of the number of states, which is 256. This will take a
long time for processing time if the number of state is increased. However, the
combination of the activated for the priority list is a best combination.
94
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
INITIAL CONDITIONS
STATE
UNIT STATUS
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
ON
ON
ON
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
ON
ON
ON
ON
OFF
OFF
OFF
ON
OFF
OFF
ON
ON
OFF
OFF
ON
ON
OFF
OFF
ON
OFF
ON
OFF
ON
OFF
ON
OFF
ON
PCOST PATH FCOST
R/HR
R
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 1000000000000.00 R
PERIOD STATE
Figure 5.6
UNIT STATUS
PCOST LOAD
R/HR MW
Result output on the IEEE 10 unit’s data with complete Enumeration
5.2.4 Test 4 (IEEE 32 unit’s data)
Figure 5.7 shows the actual output of the program for the system with 32
generating units.
95
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
33 ON ON OFF ON ON OFF ON ON OFF ON OFF ON OFF ON OFF OFF OFF OFF
OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
INITIAL CONDITIONS
STATE UNIT STATUS
1
21
19
20
33
25344
0
0
PCOST PATH
FCOST
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18
22 23 24 25 26 27 28 29 30 31 32 R/HR
R
136
0
25344
0
0
136
0
25344
0
0
138
0
0
0
12
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
PERIOD 1 SYSTEM LOAD = 56.000 MW
STATE UNIT STATUS
19
20
1
21
PCOST PATH
FCOST
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18
22 23 24 25 26 27 28 29 30 31 32 R/HR
R
THERE IS NO SOLUTION
Figure 5.7
Result output on the IEEE 32 unit’s data with priority list
The result in Figure 5.7 shows that the program developed is unable to run 32
units data. The limitation for the number of unit generator is only 10 units, therefore
for the big data with 11 units above; the output of the program will show “There is
no solution”.
5.2.5 Test 5 (MGC 10 unit’s data – Johore state)
Figure 5.8 shows the result for the system with 10 generating units for state of
Johore which is under Malaysian Grid Code requirement.
96
STATE
1
-1
-1
6
6
6
6
6
4
5
6
7
8
9
10
UNIT STATUS
2
3
-1
-4
6
-4
6
-4
6
-4
6
-4
6
-4
6
1
4
-4
-4
-4
-4
-4
1
1
5
-3
-3
-3
-3
1
1
1
6
-3
-3
-3
1
1
1
1
7
7
7
7
7
7
7
7
8
7
7
7
7
7
7
7
9
8
8
8
8
8
8
8
10
16
16
16
16
16
16
16
PCOST PATH
R/HR
603156
6
711093
6
819093
6
928680
6
1038620
6
1149973
6
1261325
6
FCOST
R
7103470.63
7211408.03
7319408.03
7452995.11
7586934.58
7722287.47
7857640.35
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 6995470.63 R
PERIOD STATE
8
7
6
5
4
3
2
1
3
6
6
8
10
6
4
2
Figure 5.8
1
OFF
ON
ON
ON
ON
ON
OFF
OFF
2
OFF
ON
ON
ON
ON
ON
OFF
OFF
3
OFF
OFF
OFF
OFF
ON
OFF
OFF
OFF
4
OFF
OFF
OFF
OFF
ON
OFF
OFF
OFF
UNIT STATUS
5
6
7
8
OFF OFF OFF ON
OFF OFF OFF ON
OFF ON ON ON
ON ON ON ON
ON OFF OFF ON
OFF OFF OFF ON
OFF OFF OFF ON
OFF OFF OFF OFF
9
ON
ON
ON
ON
ON
ON
ON
ON
10
ON
ON
ON
ON
ON
ON
ON
ON
PCOST
R/HR
495156
906318
895400
1175333
1427679
906318
624993
345274
LOAD
MW
900
1300
1250
1530
1670
1300
1000
700
Result output on the MGC 10 unit’s data (Johore State) with priority
list
For the Johor state data generation, that was proven this program was able to
run and given the best solution by using the priority list. The result shown in Figure
5.8 above illustrate that the UC problem program can be apply for the Malaysia Grid
Code requirement. The scheduling of the units to be activated is a solution for the
GSO to planning and control of the power system in Johore.
97
5.2.6 Test 6 (MGC 10 unit’s data – Malacca state)
Figure 5.9 shows the system with 10 generating units for the state of Malacca,
which is one of the Malaysian Grid Code requirements.
STATE
4
5
6
7
1
-4
-4
-4
-4
UNIT STATUS
2
3
-4
8
-4
8
-4
8
-4
8
4
8
8
8
8
5
8
8
8
8
6
7
7
7
7
7
-3
-3
-3
-3
8
-3
-3
-3
1
9
-1
-1
6
6
10
-1
7
7
7
PCOST PATH
FCOST
R/HR
R
546615
6
6798519.92
654711
6
6906615.91
762807
6
7014711.91
870903
6
7148807.90
OPTIMUM COMMITMENT SCHEDULE
TOTAL COST = 6798519.92 R
PERIOD STATE
8
7
6
5
4
3
2
1
4
6
6
8
10
6
5
3
Figure 5.9
1
OFF
OFF
OFF
OFF
OFF
ON
OFF
OFF
2
OFF
OFF
OFF
OFF
OFF
ON
OFF
OFF
3
ON
ON
ON
ON
ON
ON
ON
ON
4
ON
ON
ON
ON
ON
ON
ON
ON
UNIT STATUS
5
6
7
ON ON OFF
ON ON OFF
ON ON OFF
ON ON ON
ON ON ON
ON ON OFF
ON ON OFF
ON OFF OFF
8
OFF
OFF
OFF
ON
ON
OFF
OFF
OFF
9
OFF
ON
ON
ON
ON
ON
OFF
OFF
PCOST
10
R/HR
OFF 546615
ON 817355
ON 828372
ON 1088440
ON 1331560
ON 828372
ON 676361
OFF 425446
LOAD
MW
600
850
900
1100
1250
900
700
500
Result output on the MGC 10 unit’s data (Malacca State) with priority
list
For the Malacca state data generation, which was proven this program, was
able to run and given the best solution by using the priority list same as Johore state.
The result shown in figure 5.9 above illustrate that the UC problem program can be
apply for the Malaysia Grid Code requirement. The scheduling of the units to be
activated is was a solution for the GSO to planning and control of the power system
in Malacca.
98
5.3
Discussion
To show how optimization in UC cost can contribute to remarkable saving in
the power generation system, some test have been done using IEEE test data and
TNB (Malaysia Grid Code) data.
All the generators’ parameters and the load
demand at each hour were present on the previous section. The test was conducted in
two methods; first by priority list and second by complete enumeration. Since this
program has been developed with some limitation (maximum number of units = 10,
maximum numbers of periods in the schedule = 8 and the maximum number of states
in dynamic programming search = 256), the program cannot be run with the large
data (more than 10 units generator) and unable to choose complete enumeration for
the data with more than 8 units.
The results illustrated in the section 5.2 before have prove that the dynamic
program is able to solve most of the unit commitment constraints and minimize the
generating cost with given a solution for unit “ON” and “OFF” to meet the daily
demand at each area cover. The program developed also was successful to meet the
Malaysia Grid Code requirement. The result shown on the 32 units, this program
was unable to compute the data given due to the limitation of the number of units.
The maximum allow is only 10 units.
The results shown for the 10 units, only by chosen the priority list the
program was able to compute and gave an output. If the complete enumeration has
chose, this program will not able to give the output due to the maximum number of
states is 256. By the mathematic calculation, with 10 units; the number of
combination will be 210 – 1 = 1023 combination, with exceeds the limit of the
program.
99
In order to gain better insight in the differences between the results for
priority list method and complete enumeration method, the results on the test 1 and
test 2 are discussed in detail. The total costs calculated for the complete enumeration
are lower than for priority list. The complete enumeration also has given a better
chosen for the activated units. In term of time processing, the priority list is faster
than the complete enumeration.
5.4
Summary
The standard dynamic programming with complete enumeration and priority
list approaches has been tested with several generating data’s. The results have
shown that the program is successful to test the Malaysia Grid Code requirement. By
complete enumeration, the output showed better than by the priority list.
The
problems have been faced are; by complete enumeration, the program unable to run
the data with exceed the states which is 256 and the program was unable to run the
large generating units data which is more than 10 units. The approach used for
limiting the number of states in the work is a sequential priority method which forms
a series of unit combinations by simply including the next unit on each time.
100
CHAPTER 6
CONCLUSIONS AND PROPOSED FUTURE WORK
6.1
Conclusions
Most methods for the Unit Commitment optimization discussed in the
literature are designed for the electric utilities needs. On this project, Dynamic
Program and combination with Complete Enumeration and Priority List algorithm
has been chosen for the Unit Commitment Solution. The program developed had
some limitation on the number of unit and number of states due to the process time
of the computer.
The objective of this project is to develop a systematic method in solving unit
commitment problem in general and for Malaysia electricity sector in particular and
to utilize the method applied in order to minimize generating cost and at the same
time fulfilling all the constraints related to the delivery of electrical energy from the
generating companies to the consumers have been achieved. The program has been
successfully run for the system based on the Malaysian Grid Code requirements.
The generations were able to optimize the operation of the system base on the load
demand per day. The generating costs of the generation have been minimized and
fulfilled the demand
101
The advantages of the DP model as compared with a others programming
formulation include better base in operating efficiency, faster execution time, robust
performance, and portability. The DP model is easy to update and modify when the
system structure is changed. Adding and removing units is achieved by simply
adding and removing stages in the DP.
For modeling purposes, Priority Listing clearly prevails. The reduction in
calculation time is considerable (by a factor 5–10) and the loss in accuracy (2% –
3%) is acceptable. From a utilities-optimization point of view, clearly, cost
minimization will be more important than calculation time. Therefore, Complete
Enumeration will perhaps still be chosen for small number of unit’s generator such as
for the state electricity planning.
6.2
Proposed Future Work
The Dynamic Program with combination of Complete Enumeration suffers
from the curse of dimensionality because of the problem size (number of states)
increases rapidly with number of the generating units to be committed, which results
in an unacceptable solution time. For future improvements, this dimensionality
problem can be overcome through the use of successive approximation based on the
dynamic programming principle.
It may also reduces the memory and time
requirements.
The program also has some limitation on the number of generation units due
to the processing time and memory of the computer. The DP algorithm execution
time increases approximately linearly with additional units, whereas other methods
experience exponential increases in computation time. Therefore, several approaches
102
have to be developed to improve the Dynamic Programming. The future program
should be able to reduce the dimension, search space and execution time.
103
REFERENCES
1.
WOOD, A.J., WOLLENBERG, B.F, “Power Generation, Operation
and Control”, 2nd Edition. John Wiley & Sons, New York 1996.
2.
HADI SAADAT. “Power System Analysis”, 2nd Edition. Mc Craw
Hill, Milwaukee 2002
3.
LOWERY, P.G., “Generating Unit Commitment by Dynamic
Programming” IEEE transactions on power apparatus and system,
Vol. PAS-85, No.5, pages: 442 – 426, 1966.
4.
PANG, C.K, CHEN, H.C. ”Optimal Short Term Thermal Unit
Commitment”, IEEE transaction on power apparatus and system, Vol.
PAS-95, No.4, pages: 1336 – 1346, July/August 1976.
5.
PANG, C.K., SHEBLE, G.B., ALBUYEH, F. “Evaluation of
Dynamic
Programming
Based
Method
and
Multiple
Area
Representation for Thermal Unit Commitment”, IEEE transaction op
power apparatus and systems, Vol. PAS-100, No.3, pages: 1212 –
1218,March 1981.
6.
SNYDER Jr., W.L.POWELL Jr., H.D.RAYBURN,J.C. “Dynamic
Programming Approach to Unit Commitment”, IEEE transaction on
power systems, Vol. PWRS-2, No.2, pages: 339 – 347, May 1987.
7.
FRED N. LEE. “Short Term Thermal Unit Commitment”, IEEE
transaction on power systems, Vol. 3, No. 2, pages: 421-428, May
1988.
8.
WALTER J. HOBBS, GARY HERON, STEPHEN WARNER,
GERALD B. SHEBLE. “An Enhanced Dynamic Programming
Approach For Unit Commitment”, IEEE transaction on power
systems, Vol. 3, No.3, pages: 1201 – 1205, August 1988.
9.
CHUNG-CHING SU & YUAN-YIH HSU. “Fuzzy Dynamic
Programming: An Application to Unit Commitment”. IEEE
104
transaction on power systems, Vol. 6, No. 3, pages: 1231 – 1237,
August 1991.
10.
Z. OUYANG & S.M.SHAHIDEHPOUR. “An Intelligent Dynamic
Programming for Unit Commitment Application”. IEEE transaction
on power systems, Vol. 6, No. 3, pages: 1203 – 1209, August 1991.
11.
Z. OUYANG & S.M.SHAHIDEHPOUR. “A Hybrid Artificial Neural
Network-Dynamic Programming Approach to Unit Commitment”.
IEEE transaction on power systems, Vol. 7, No. 1, pages: 236 – 242,
February 1992.
12.
GERALD B. SHEBLE & GEORGE N. FAHD. “Unit Commitment
Literature Synopsis”. IEEE transaction on power systems, Vol. 9, No.
1, pages: 128 – 135, February 1994.
13.
K. AOKI, M. ITOH, T. SATOH, K. NARA and M. KANEZASHI,
“Optimal long-term unit commitment in large scale systems including
fuel constrained thermal and pump storage hydro,” IEEE Trans.
Power System, Vol. 4, pages: 1065 – 1073, August 1989.
14.
R.H.KERR, J.L.SCHEIDT, A.J.FONTANA and J.K.WILEY,”Unit
Commitment,” IEEE Trans. Power System, Vol. PAS-85, pages: 417
– 421, May 1966.
15.
S. A. KAZARLIS, A. G. BAKIRTZIS & V. PETRIDIS. “A Genetic
Algorithm Solution to the Unit Commitment Problem”. IEEE
transaction on power system, Vol. 11, No. 1, pages: 83 – 92, February
1996.
16.
Y.Y.HSU, C.C.SU, C.C.LIANG, C.J.LIN, C.T.HUANG,”Dynamic
Security Constrained Multi-area Unit Commitment”. IEEE Trans. On
Power System, Vol. 6, No. 3, pages: 1049 – 1055, August 1991.
17.
G.S.LAUER, N.R.SANDELL Jr, N.R. BERTSEKAS and T.A.
POSBERGH, “Solution of Large Scale Optimum Unit Commitment
Problems,”. IEEE Trans. Power Application System, Vol. PAS-101,
pages: 79 – 96, January 1982.
18.
A.I. COHEN and M.YOSHIMURA,”A branch and Bound Algorithm
for Unit Commitment,” IEEE Trans. Power App. System, Vol. PAS102, pages: 444 – 451, February 1983.
105
19.
The Malaysian Grid Code, Version 2 Edition 1.0, January 2006
20.
Malaysian Energy Commission, Statistic of Electricity Supply
Industry in Malaysia, Kuala Lumpur, Malaysia, 2005 Edition.
106
APPENDIX
APPENDIX A
Source Code of program in Turbo Pascal
{$R-} {Range checking off}
{$B+} {Boolean complete evaluation on}
{$S+} {Stack checking on}
{$I+} {I/O checking on}
{$N-} {No numeric coprocessor}
{$M 65500,16384,655360} {Turbo 3 default stack and heap}
{ $LINESIZE:150}
{ $PAGESIZE:68}
{ $DEBUG+}
{ $LINE+}
{
}
{ ------------------------------------------------------------------- }
{
Unit Commitment Program
}
{
POWER GENERATION OPERATION AND CONTROL
{
by BAHARIN HASHIM
}
{ ------------------------------------------------------------------- }
{ UNTMIN = Unit minimum MW
}
{ UNTMAX = Unit maximum MW
}
{ UNTGEN = Unit generation MW
}
{ UNTINC = Unit incremental cost R/mwhr
}
{ UNTNOLOADCOST = Unit no load cost R/hr
}
{ UNTSTARTCOST = Unit start up cost R
}
{ UNTFUELCOST = Unit fuel cost R/MBTU
}
{ UNTUPMIN = Unit minimum up time HR
}
}
107
{ UNTDOWNMIN = Unit minimum down time HR
}
{ UNTSTATINI = Holds initial unit status
}
{ SYSLOAD = System load MW
}
{ UNTSTAT = Unit status
}
{ UNTSTATLAST = Unit status for previous period;
}
{
1st index is state
}
{
2nd index is unit index
}
{
+ = on line/ - = off line
}
{
absolute value = number of HR
}
{ UNTSTATNOW = Same as UNTSTATLAST but for present period
{ UNTSTATTEMP = Holds temporary status during path search
}
{ FCOST = Cost of state at period K
}
{ PCOST = System production cost table
}
{ PATH = Pointer to optimal state last period
}
{ SETL = List of states in last period
}
{ SETX = List of states in this period
}
{ UNTFULLAVECOST = Unit full load average cost
}
{ ORDERINDEX = Order table returned from ordering subroutine
}
{
}
PROGRAM UNITCOM(INPUT,OUTPUT,INFILE);
}
Uses
WinCrt;
LABEL QUIT;
CONST
INFINITY = 1.0E12;
MAX_NUMUNITS = 140;
MAX_NUMSTATES = 256;
MAX_NUMPERIODS = 8;
IOVAL : INTEGER = 0;
IOERR : BOOLEAN = FALSE;
TYPE
SET_OF_UNIT_NUMBERS = SET OF 1..MAX_NUMUNITS;
STATE_ARRAY = ARRAY [1..MAX_NUMSTATES] OF
SET_OF_UNIT_NUMBERS;
UNIT_ARRAY_REAL = ARRAY [1..MAX_NUMUNITS] OF INTEGER;
UNIT_ARRAY_INTEGER = ARRAY [1..MAX_NUMUNITS] OF INTEGER;
STATE_ARRAY_REAL = ARRAY [1..MAX_NUMSTATES] OF REAL;
STATE_ARRAY_INTEGER = ARRAY [1..MAX_NUMSTATES] OF
INTEGER;
STATE_X_UNIT_ARRAY_INTEGER =
ARRAY [1..MAX_NUMSTATES] OF INTEGER;
FILENAME_ARRAY = STRING[25];
PERIOD_REC = RECORD
108
SYSLOAD:REAL;
PCOST:STATE_ARRAY_REAL;
FCOST:STATE_ARRAY_REAL;
PATH:STATE_ARRAY_INTEGER;
END;
DP_SOLUTION_ARRAY = ARRAY [0..MAX_NUMPERIODS] OF
PERIOD_REC;
VAR
INFILE:TEXT;
PERIOD_DATA:DP_SOLUTION_ARRAY;
UNTMIN:UNIT_ARRAY_REAL;
UNTMAX:UNIT_ARRAY_REAL;
UNTGEN:UNIT_ARRAY_REAL;
UNTINC:UNIT_ARRAY_REAL;
UNTNOLOADCOST:UNIT_ARRAY_REAL;
UNTSTARTCOST:UNIT_ARRAY_REAL;
UNTFUELCOST:UNIT_ARRAY_REAL;
UNTUPMIN:UNIT_ARRAY_INTEGER;
UNTDOWNMIN:UNIT_ARRAY_INTEGER;
UNTSTATINI:UNIT_ARRAY_INTEGER;
UNTSTAT:STATE_ARRAY;
UNTSTATLAST:STATE_X_UNIT_ARRAY_INTEGER;
UNTSTATNOW:STATE_X_UNIT_ARRAY_INTEGER;
UNTSTATTEMP:UNIT_ARRAY_INTEGER;
SETL:STATE_ARRAY_INTEGER;
SETX:STATE_ARRAY_INTEGER;
ORDERINDEX:STATE_ARRAY_INTEGER;
UNTFULLAVECOST:STATE_ARRAY_REAL;
NUMUNT:INTEGER;
NUMSTAT:INTEGER;
NUMPER:INTEGER;
PERIOD_LENGTH:REAL;
ORDERTYPE:INTEGER;
I,J,K,M,N,X:INTEGER;
INPUTCHAR,INCLUDE,QUITFLAG:CHAR;
NLIM,NMAX,XLIM,XMAX,XSTATE,LSTATE,VALID,OPTSTATE:INTEGER;
INITSTAT:INTEGER;
SCOST,PATHCOST,OPTCOST:REAL;
UNTCOST:REAL;
FILENAME:FILENAME_ARRAY;
LINENUMBER : INTEGER;
STATE:SET_OF_UNIT_NUMBERS;
CONTINUE,BORROW,PRINT_OUTPUT : BOOLEAN;
TITLE1, TITLE2 : STRING[80];
{----------------------------------------------------------------------------}
{ <f> <s> IO Check routine }
109
{$I-,R-}
procedure IOCheck( linenumber : integer );
{This routine sets IOErr equal to IOresult, then sets
IOFlag accordingly. It also prints out a message on
the 24th line of the screen.}
var
Ch
: Char;
begin
IOVal := IOresult;
{! 2. IORes^ult now returns different values corresponding to DOS error codes.}
IOErr := (IOVal <> 0);
GotoXY(1,24); ClrEol;
{ Clear error line in any case }
if IOErr then begin
Write(Chr(7));
case IOVal of
2 : Writeln('File does not exist');
3 : Writeln('Path not found ');
4 : Writeln('Too many files open ');
5 : Writeln('File access denied ');
12 : Writeln('Invalid file access code ');
15 : Writeln('Invalid drive number ');
100 : Writeln('Disk read error ');
101 : Writeln('Disk write error ');
102 : Writeln('File not assigned ');
103 : Writeln('File not open');
104 : Writeln('File not open for input');
105 : Writeln('File not open for output');
106 : Writeln('Error in numeric format');
150 : Writeln('Disk is write protected');
151 : Writeln('Unknown unit');
152 : Writeln('Drive not ready');
153 : Writeln('Unknown command ');
154 : Writeln('CRC error in data ');
155 : Writeln('Bad drive structure length ');
156 : Writeln('Disk seek error ');
157 : Writeln('Unknown media type ');
158 : Writeln('Selector not found ');
159 : Writeln('Printer out of paper ');
160 : Writeln('Device write fault ');
161 : Writeln('Device read fault ');
162 : Writeln('Hardware failure ');
else
Writeln('Unknown I/O error: ',IOVal:3)
end;
writeln( ' error on line ', linenumber, ' of input file ')
end
end; { of proc IOCheck }
{----------------------------------------------------------------------------}
110
procedure endprint( var outfile:text);
{Writes a form-feed character to printer to force all printout out}
{of printer buffeer}
begin
writeln(outfile, chr(12))
end; {end procedure}
{---------------------------------------------------------------------------}
{ <f> <s> DATA INPUT PROCEDURE }
PROCEDURE DATAINPUT;
LABEL QUIT;
VAR I,J : INTEGER;
A : CHAR;
BEGIN
WRITELN;
PRINT_OUTPUT := FALSE;
WRITE(' DO YOU WANT OUTPUT ON THE PRINTER? (Y OR N): ');
READLN( INPUTCHAR );
IF (INPUTCHAR = 'Y') OR (INPUTCHAR = 'y') THEN PRINT_OUTPUT :=
TRUE;
LINENUMBER := 0;
WRITELN;
WRITE('ENTER NAME OF INPUT FILE : ');
READLN(FILENAME);
ASSIGN(INFILE,FILENAME);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
{
}
{ Open data file }
{
}
RESET(INFILE);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
WRITELN;
{
}
{ Read file header }
{
}
LINENUMBER := LINENUMBER + 1;
READLN( INFILE, TITLE1 );
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
LINENUMBER := LINENUMBER + 1;
111
READLN( INFILE, TITLE2 );
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
{
}
{ Read number of units }
{
}
LINENUMBER := LINENUMBER + 1;
READLN(INFILE,NUMUNT);
{
}
{ Read unit data
{
}
}
FOR I := 1 TO NUMUNT DO BEGIN
LINENUMBER := LINENUMBER + 1;
READLN(INFILE); { read past comment for unit I }
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
LINENUMBER := LINENUMBER + 1;
READLN(INFILE,UNTMIN[I], UNTMAX[I], UNTINC[I]);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
LINENUMBER := LINENUMBER + 1;
READLN(INFILE,UNTNOLOADCOST[I], UNTSTARTCOST[I],
UNTFUELCOST[I]);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
LINENUMBER := LINENUMBER + 1;
READLN(INFILE,UNTUPMIN[I], UNTDOWNMIN[I], UNTSTATINI[I]);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
END;
{
}
{ Read number of periods and period length }
{
}
LINENUMBER := LINENUMBER + 1;
READLN(INFILE,NUMPER,PERIOD_LENGTH);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
{
}
{ Read load curve data }
112
{
}
FOR I := 1 TO NUMPER DO BEGIN
LINENUMBER := LINENUMBER + 1;
READ(INFILE,PERIOD_DATA[I].SYSLOAD);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
END;
CLOSE (INFILE);
IOCHECK( LINENUMBER );
IF IOERR THEN GOTO QUIT;
{
}
{ User input }
{
}
WRITELN;
WRITELN('SELECT UNIT ORDER OPTION ');
WRITELN('1 - PRIORITY ORDER ');
WRITELN('2 - COMPLETE ENUMERATION ');
WRITELN;
WRITE('ENTER OPTION NUMBER : ');
READLN(ORDERTYPE);
WRITELN;
WRITE('ENTER NUMBER OF SEARCH STATES IN PREVIOUS PERIOD (N)
: ');
READLN(NMAX);
WRITELN;
WRITE('ENTER NUMBER OF SEARCH STATES IN PRESENT PERIOD (X) :
');
READLN(XMAX);
WRITELN;
WRITE('INCLUDE UP/DOWN TIME CONSTRAINTS (Y OR N) : ');
READLN(INCLUDE);
WRITELN;
IF (INCLUDE <> 'Y') AND (INCLUDE <> 'y') THEN
BEGIN
FOR J := 1 TO NUMUNT DO BEGIN
UNTUPMIN[ J ] := 0;
UNTDOWNMIN[ J ] := 0;
END;
END;
QUIT:
END; { end of data input }
{----------------------------------------------------------------------------}
{ <f> <s> Datadump Procedure}
113
PROCEDURE DATADUMP( VAR OUTFILE : TEXT );
VAR I : INTEGER;
BEGIN
WRITELN(OUTFILE);
WRITELN(OUTFILE, ' DATA FILE : ',FILENAME);
WRITELN(OUTFILE);
WRITELN(OUTFILE, TITLE1);
WRITELN(OUTFILE, TITLE2);
WRITELN(OUTFILE);
WRITELN(OUTFILE,'UNIT DATA');
WRITELN(OUTFILE);
WRITE(OUTFILE,'UNIT MIN MAX INC NO LOAD ');
WRITELN(OUTFILE,'START FUEL MIN UP MIN DOWN INIT');
WRITE(OUTFILE,' MW MW HR COST ');
WRITELN(OUTFILE,'COST COST PERIODS PERIODS STATUS');
FOR I := 1 TO NUMUNT DO
BEGIN
WRITE(OUTFILE,I:4,' ');
WRITE(OUTFILE,UNTMIN[I]:4,' ');
WRITE(OUTFILE,UNTMAX[I]:4,' ');
WRITE(OUTFILE,UNTINC[I]:6,' ');
WRITE(OUTFILE,UNTNOLOADCOST[I]:6,' ');
WRITE(OUTFILE,UNTSTARTCOST[I]:5,' ');
WRITE(OUTFILE,UNTFUELCOST[I]:3,' ');
WRITE(OUTFILE,UNTUPMIN[I]:3,' ');
WRITE(OUTFILE,UNTDOWNMIN[I]:4,'
');
WRITELN(OUTFILE,UNTSTATINI[I]:4);
END; { I }
WRITELN(OUTFILE);
WRITELN(OUTFILE,'LOAD DATA DURING PERIODS OF
',PERIOD_LENGTH:1:3,' HOURS');
WRITELN(OUTFILE);
WRITELN(OUTFILE,'PERIOD LOAD');
WRITELN(OUTFILE,'
MW');
FOR I :=1 TO NUMPER DO
BEGIN
WRITELN(OUTFILE,I:4,' ',PERIOD_DATA[I].SYSLOAD:9:3);
END; { I }
WRITELN(OUTFILE);
IF ORDERTYPE = 1 THEN WRITELN(OUTFILE, ' PRIORITY ORDER ')
ELSE WRITELN(OUTFILE, ' COMPLETE ENUMERATION ');
WRITELN(OUTFILE);
WRITELN(OUTFILE,'NUMBER OF SEARCH STATES PREVIOUS PERIOD =
',NMAX:4);
114
WRITELN(OUTFILE);
WRITELN(OUTFILE,'NUMBER OF SEARCH STATES PRESENT PERIOD =
',NMAX:4);
WRITELN(OUTFILE);
IF (INCLUDE = 'Y') OR (INCLUDE = 'y') THEN
WRITELN(OUTFILE, ' MIN UP/DOWN CONSTRAINTS ARE INCLUDED')
ELSE
WRITELN(OUTFILE, ' MIN UP/DOWN CONSTRAINTS ARE NOT
INCLUDED');
WRITELN(OUTFILE);
END; { end datadump procedure }
{----------------------------------------------------------------------------}
{ <f> <s> Procedure statelist }
PROCEDURE STATE_LIST( VAR OUTFILE : TEXT );
VAR I,J : INTEGER;
BEGIN
WRITELN(OUTFILE);
WRITELN(OUTFILE,'UNIT STATUS TABLE USED IN DYNAMIC
PROGRAMMING SEARCH');
WRITELN(OUTFILE);
WRITELN(OUTFILE,'STATE UNIT STATUS');
WRITE(OUTFILE,' ');
FOR J := 1 TO NUMUNT DO WRITE(OUTFILE,J:4);
WRITELN(OUTFILE);
FOR J := 1 TO 7+NUMUNT*4 DO WRITE(OUTFILE,'-');
WRITELN(OUTFILE);
FOR I := 1 TO NUMSTAT DO BEGIN
WRITE(OUTFILE,I:4,' ');
FOR J := 1 TO NUMUNT DO BEGIN
IF (J IN UNTSTAT[ I ]) THEN
WRITE(OUTFILE,'ON ')
ELSE
WRITE(OUTFILE,'OFF ');
END; { J }
WRITELN(OUTFILE);
END; { I }
END;
{----------------------------------------------------------------------------}
{ <f> <s> Procedure FINAL_OUTPUT }
PROCEDURE FINAL_OUTPUT( VAR OUTFILE : TEXT );
115
VAR I,J : INTEGER;
BEGIN
WRITELN(OUTFILE);
OPTCOST := INFINITY;
OPTSTATE := 0;
FOR I := 1 TO NUMSTAT DO WITH PERIOD_DATA[NUMPER] DO BEGIN
IF (FCOST[ I ] <= OPTCOST) THEN BEGIN
{
}
{ New optimum end point }
{
}
OPTCOST := FCOST[ I ];
OPTSTATE := I;
END;
END; { I }
WRITELN(OUTFILE,'OPTIMUM COMMITMENT SCHEDULE ');
WRITELN(OUTFILE);
WRITELN(OUTFILE,'TOTAL COST = ',OPTCOST:1:2,' R');
WRITELN(OUTFILE);
WRITE(OUTFILE,'PERIOD STATE UNIT STATUS ');
FOR I:=1 TO NUMUNT*4-11 DO WRITE(OUTFILE,' ');
WRITELN(OUTFILE,' PCOST LOAD');
WRITE(OUTFILE,'
');
FOR J := 1 TO NUMUNT DO WRITE(OUTFILE,J:4);
WRITELN(OUTFILE,'
R/HR
MW');
FOR J := 1 TO 34+NUMUNT*4 DO WRITE(OUTFILE,'-');
WRITELN(OUTFILE);
FOR K := NUMPER DOWNTO 1 DO WITH PERIOD_DATA[K] DO BEGIN
WRITE(OUTFILE,K:4,' ',OPTSTATE:3,' ');
FOR J := 1 TO NUMUNT DO
IF (J IN UNTSTAT[ OPTSTATE ]) THEN
WRITE(OUTFILE,'ON ')
ELSE
WRITE(OUTFILE,'OFF ');
WRITE(OUTFILE,' ');
WRITE(OUTFILE,PCOST[ OPTSTATE ]:7:0,' ');
WRITELN(OUTFILE,SYSLOAD:8:3);
OPTSTATE := PATH[ OPTSTATE ];
END; { M }
END;
{----------------------------------------------------------------------------}
{ <f> <s> Setstate Procedure}
PROCEDURE SETSTATE(VAR STATE:SET_OF_UNIT_NUMBERS;
116
UNTSTAT:UNIT_ARRAY_INTEGER);
{ ------------------------------------------------------------------- }
{
}
{ SUBROUTINE TO CONVERT UNIT STATUS TO SET VARIABLE
}
{
}
{
}
VAR
I:INTEGER;
BEGIN
STATE:=[];
FOR I:=1 TO NUMUNT DO IF (UNTSTAT[ I ] > 0) THEN
STATE:=STATE+[I];
END;
{
}
{
}
{----------------------------------------------------------------------------}
{ <f> <s> Economic Dispatch Procedure }
PROCEDURE EDC;
{ ------------------------------------------------------------------- }
{
}
{ SUBROUTINE TO PERFORM ECONOMIC DISPATCH OF UNITS FOR
PERIOD 'K' }
{
}
{ RETURNS PCOST FOR PERIOD K
}
{
}
VAR
I,J:INTEGER;
MINUNT:INTEGER;
STOP:BOOLEAN;
SUMMAX,SUMMIN:REAL;
MININC:REAL;
UNTCOST,DISPLOAD:REAL;
UNTRANGE:REAL;
BEGIN
WITH PERIOD_DATA[K] DO FOR I := 1 TO NUMSTAT DO BEGIN
SUMMIN := 0.0;
SUMMAX := 0.0;
PCOST[ I ] := 0.0;
FOR J := 1 TO NUMUNT DO BEGIN
IF (J IN UNTSTAT[ I ]) THEN BEGIN
SUMMIN := SUMMIN + UNTMIN[ J ];
SUMMAX := SUMMAX + UNTMAX[ J ];
END
END; { J }
IF (SUMMIN >= SYSLOAD) OR (SYSLOAD >= SUMMAX) THEN
{
}
{ Failure of the above test means that the state is infeasible }
{ so we set the cost to infinity and do not dispatch.
}
{
}
117
PCOST[ I ] := INFINITY
ELSE BEGIN
{
}
{ Begin unit dispatch }
{
}
DISPLOAD := SYSLOAD - SUMMIN;
{
}
{ Set all units to min generation }
{
}
FOR J := 1 TO NUMUNT DO IF (J IN UNTSTAT[ I ])
THEN UNTGEN[ J ] := UNTMIN[ J ];
{
}
{ Find unit with least inc cost }
{
}
REPEAT
MININC := INFINITY;
MINUNT := 0;
FOR J := 1 TO NUMUNT DO BEGIN
IF (J IN UNTSTAT[ I ]) AND (UNTGEN[ J ] = UNTMIN[ J ]) AND
(UNTINC[ J ] < MININC) THEN BEGIN
MININC := UNTINC[J];
MINUNT := J;
END;
END;
UNTRANGE := UNTMAX[ MINUNT ] - UNTMIN[ MINUNT ];
STOP := (DISPLOAD < UNTRANGE);
IF (NOT STOP) THEN BEGIN
{
}
{ Dispatch unit to max }
{
}
UNTGEN[ MINUNT ] := UNTMAX[ MINUNT ];
DISPLOAD := DISPLOAD - UNTRANGE;
END;
UNTIL STOP;
{
}
{ Final unit part loaded }
{
}
UNTGEN[ MINUNT ] := UNTMIN[ MINUNT ] + DISPLOAD;
{
}
{ Calculate costs }
{
}
FOR J := 1 TO NUMUNT DO BEGIN
IF (J IN UNTSTAT[ I ]) THEN BEGIN
UNTCOST := UNTNOLOADCOST[J] + UNTFUELCOST[J]
* UNTGEN[J]*UNTINC[J]/1000.0;
UNTCOST := UNTCOST * PERIOD_LENGTH;
PCOST[I] := PCOST[I] + UNTCOST;
END;
END;
END;
118
END; { I }
END;
{
}
{
}
{----------------------------------------------------------------------------}
{ <f> <s> Unit State Dump Procedure }
PROCEDURE STATUSDUMP( K:INTEGER; VAR OUTFILE : TEXT);
{ ------------------------------------------------------------------- }
{
}
{ SUBROUTINE TO DUMP UNIT STATUS AT PERIOD 'K'
{
}
VAR
I,J:INTEGER;
}
BEGIN
IF K = 0 THEN
BEGIN
WRITELN(OUTFILE);
WRITELN(OUTFILE, ' INITIAL CONDITIONS ');
END
ELSE
BEGIN
WRITELN(OUTFILE);
WRITELN(OUTFILE,'PERIOD ',K,' SYSTEM LOAD = ',
PERIOD_DATA[K].SYSLOAD:1:3,' MW');
END;
WITH PERIOD_DATA[K] DO BEGIN
WRITE(OUTFILE,'STATE UNIT STATUS ');
FOR I:=1 TO NUMUNT*4-11 DO WRITE(OUTFILE,' ');
WRITELN(OUTFILE,' PCOST PATH FCOST');
WRITE(OUTFILE,' ');
FOR I:=1 TO NUMUNT DO WRITE(OUTFILE,I:4);
WRITELN(OUTFILE,' R/HR
R');
FOR I := 1 TO 30+NUMUNT*4 DO WRITE(OUTFILE,'-');
WRITELN(OUTFILE);
FOR I := 1 TO NUMSTAT DO BEGIN
{
}
{ skip infeasible states }
{
}
IF (PCOST[I] <> INFINITY) AND (UNTSTATNOW[ I, 1 ] <> 0) THEN
BEGIN
WRITE(OUTFILE,I:3,' ');
FOR J := 1 TO NUMUNT DO WRITE(OUTFILE,UNTSTATNOW[ I, J ]:4);
WRITE(OUTFILE,' ');
WRITE(OUTFILE,PCOST[ I ]:7:0,' ');
WRITE(OUTFILE,PATH[ I ]:3,' ');
WRITELN(OUTFILE,FCOST[ I ]:9:2);
END;
119
END;
END;
END;
{
}
{
}
{----------------------------------------------------------------------------}
{ <f> <s> Order Procedure }
PROCEDURE ORDER(VAR
ORDERTABLE:STATE_ARRAY_REAL;NUMORDER:INTEGER);
{ ------------------------------------------------------------------- }
{
}
{ SUBROUTINE TO ORDER A LIST, LEAST FIRST
{
}
{ input NUMORDER = the number of items order
}
{ input ORDERTABLE = the items to be ordered
}
{ output ORDERINDEX = pointer to order value table
}
{
}
{ NXT = Table used in order subroutine
}
{
}
VAR
STOP:BOOLEAN;
I,J,TOP,LAST,INDX:INTEGER;
NXT:STATE_ARRAY_INTEGER;
BEGIN
FOR I := 1 TO NUMORDER DO BEGIN
IF (I <= 1) THEN BEGIN
TOP := 1;
NXT[ 1 ] := 0;
END
ELSE BEGIN
J := TOP;
LAST := 0;
REPEAT
STOP := TRUE;
IF (ORDERTABLE[ I ] > ORDERTABLE[ J ]) THEN BEGIN
LAST := J;
J := NXT[ J ];
STOP := (J = 0);
IF (STOP) THEN BEGIN
NXT[ LAST ] := I;
NXT[ I ] := 0;
END
END
ELSE BEGIN
IF (J <> TOP) THEN BEGIN
NXT[ LAST ] := I;
{ J not = TOP }
NXT[ I ] := J;
END
ELSE BEGIN
TOP := I;
{ J = TOP }
}
120
NXT[ I ] := J;
END;
END;
UNTIL STOP;
END;
END;
INDX := 1;
J := TOP;
REPEAT
ORDERINDEX[ INDX ] := J;
J := NXT[ J ];
INDX := INDX + 1;
UNTIL (J = 0);
END;
{
}
{
}
{----------------------------------------------------------------------------}
{ <f> <s> Best States Procedure }
PROCEDURE BESTSTATES(VAR SETP:STATE_ARRAY_INTEGER;
VAR COST:STATE_ARRAY_REAL;
VAR LIM:INTEGER; MAX:INTEGER);
{ ---------------------------------------------- }
{
}
{ Subroutines puts the top MAX states into SETP }
{
}
VAR
DONE:BOOLEAN;
INDEX:INTEGER;
BEGIN
ORDER(COST,NUMSTAT);
DONE := FALSE;
LIM := 0;
WHILE NOT DONE AND (LIM < MAX) DO BEGIN
INDEX := ORDERINDEX[ LIM+1 ];
IF (COST[ INDEX ] = INFINITY) THEN
DONE := TRUE
ELSE BEGIN
LIM := LIM + 1;
SETP[ LIM ] := INDEX
END
END;
END;
{
}
{
}
{----------------------------------------------------------------------------}
{ <f> <s> Feasibility Test Procedure }
PROCEDURE FEAS;
{ ------------------------------------------------------------------- }
{
}
{ SUBROUTINE TO Test feasibility of transition
}
121
{ from UNTSTATLAST[ LSTATE ] to UNTSTAT
{
}
VAR
J:INTEGER;
BEGIN
VALID := 1;
SCOST := 0.0;
J:=1;
WHILE (VALID = 1) AND (J <= NUMUNT) DO BEGIN
IF (UNTSTATLAST[ LSTATE, J ] < 0) THEN
{
}
{ Logic below is for unit down last period }
{
}
IF (J IN UNTSTAT[ XSTATE ]) THEN
{
}
{ Unit up this period ( down to up ) }
{ TRANSITION - test for min down time }
{ Note: UNTSTATLAST is the number of }
{ periods the unit was down, while }
{ UNTDOWNMIN is min number of hours the }
{ unit must be down.
}
{
}
IF ( (-UNTSTATLAST[LSTATE,J] * PERIOD_LENGTH)
< UNTDOWNMIN[J]) THEN
{
}
{ Failed min down time test }
{
}
VALID := 0
ELSE BEGIN
{
}
{ Passed min down test, start unit }
{
}
UNTSTATTEMP[J] := 1;
SCOST := SCOST + UNTSTARTCOST[J];
END
ELSE
{
}
{ Unit down this period ( stays down )
}
{ NO TRANSITION - increase time down 1 period }
{
}
UNTSTATTEMP[ J ] := UNTSTATLAST[ LSTATE, J ] - 1
ELSE
{
}
{ Logic below is for unit up last period }
{
}
IF (J IN UNTSTAT[ XSTATE]) THEN
{
}
{ Unit up this period ( up to up )
}
{ NO TRANSITION - increase time up 1 period }
{
}
}
122
UNTSTATTEMP[ J ] := UNTSTATLAST[ LSTATE, J ] + 1
ELSE
{
}
{ Unit down this period ( up to down ) }
{ TRANSITION - test for min up time }
{ Note: UNTSTATLAST is the number of }
{ periods the unit was up, while }
{ UNTUPMIN is min number of hours the }
{ unit must be up.
}
{
}
IF ( (UNTSTATLAST[LSTATE,J] * PERIOD_LENGTH )
< UNTUPMIN[J]) THEN
{
}
{ Failed min up time test }
{
}
VALID := 0
ELSE
{
}
{ Passed min up time test, shut down unit }
{
}
UNTSTATTEMP[J] := -1;
J:=J+1;
END; { J }
END;
{---------------------------------------------------------------------------}
{ <f> <s> Main Program }
BEGIN
REPEAT
DATAINPUT;
IF IOERR THEN GOTO QUIT;
IF PRINT_OUTPUT THEN DATADUMP(LST)
ELSE DATADUMP(OUTPUT);
{
}
{ Build unit status tables }
{
}
IF (ORDERTYPE = 1) THEN BEGIN
{
}
{ Build priority order list }
{
}
NUMSTAT := NUMUNT;
FOR I := 1 TO NUMSTAT DO UNTSTAT[ I ] := [];
{
}
{ Calculate full load ave cost for each }
{ unit and order units.
}
{
}
FOR J := 1 TO NUMUNT DO BEGIN
UNTCOST := UNTNOLOADCOST[J] + UNTFUELCOST[J] *
123
UNTMAX[J]*UNTINC[J] / 1000.0;
UNTFULLAVECOST[ J ] := UNTCOST / UNTMAX[J];
END; { J }
{
}
{ Call ordering subroutine, returns }
{ table ORDERINDEX(I)=index to Ith unit }
{
}
ORDER(UNTFULLAVECOST,NUMSTAT);
STATE:=[];
FOR I := 1 TO NUMSTAT DO BEGIN
STATE := STATE + [ORDERINDEX[ I ]];
UNTSTAT[ I ] := STATE;
END; { I }
END
ELSE BEGIN
{
}
{ Build complete enumeration list }
{
}
STATE := [];
FOR I:=1 TO NUMUNT DO STATE := STATE + [I];
I := 0;
WHILE (STATE <> []) DO BEGIN
I := I+1;
UNTSTAT[ I ] := STATE;
BORROW := TRUE;
J := NUMUNT;
WHILE BORROW DO
IF (J IN STATE) THEN BEGIN
STATE := STATE - [J];
BORROW := FALSE
END
ELSE BEGIN
STATE := STATE + [J];
J := J - 1
END;
END;
NUMSTAT := I;
END;
{
}
{ Search list to find match for initial }
{ state, if not found add state
}
{
}
SETSTATE(STATE,UNTSTATINI);
I:=1;
WHILE (STATE <> UNTSTAT[I]) AND (I < NUMSTAT) DO I:=I+1;
IF (STATE = UNTSTAT[I]) THEN
{
}
{ Match found }
{
}
INITSTAT:=I
124
ELSE BEGIN
{
}
{ No match found, add state to match init }
{
}
NUMSTAT := NUMSTAT + 1;
INITSTAT := NUMSTAT;
IF PRINT_OUTPUT THEN
WRITELN(LST, 'INITIAL STATE NOT IN PRIORITY LIST, ADDING
STATE TO LIST')
ELSE
WRITELN(OUTPUT,
'INITIAL STATE NOT IN PRIORITY LIST, ADDING STATE TO LIST');
{
}
{ Store init state so it is in list }
{
}
UNTSTAT[ INITSTAT ] := STATE;
END;
{
}
{ Print unit status table }
{
}
IF PRINT_OUTPUT THEN STATE_LIST(LST)
ELSE STATE_LIST(OUTPUT);
{
}
{ LIMIT SEARCH STATES TO BE LESS THAN }
{ OR EQUAL TO THE NUMBER OF STATES }
{
}
IF (NMAX > NUMSTAT) THEN NMAX := NUMSTAT;
IF (XMAX > NUMSTAT) THEN XMAX := NUMSTAT;
{
}
{ Load FCOST and UNTSTATNOW tables to }
{ reflect initial conditions. Also }
{ initialize PATH AND PCOST for
}
{ initial conditions.
}
{
}
WITH PERIOD_DATA[0] DO BEGIN
FOR I := 1 TO NUMSTAT DO BEGIN
FCOST[ I ] := INFINITY;
FOR J := 1 TO NUMUNT DO UNTSTATNOW[ I, J ] := 0;
END; { I }
FCOST[ INITSTAT ] := 0.0;
PCOST[ INITSTAT ] := 0.0;
PATH[ INITSTAT ] := 0;
UNTSTATNOW[ INITSTAT ] := UNTSTATINI;
END;
{
}
{ Print initial conditions
}
{
}
IF PRINT_OUTPUT THEN STATUSDUMP(0,LST)
ELSE STATUSDUMP(0,OUTPUT);
125
{
}
{ Top of main dynamic programming loop }
{
}
CONTINUE := TRUE;
K := 1;
WHILE (K <= NUMPER) AND CONTINUE DO WITH PERIOD_DATA[K] DO
BEGIN
{
}
{ Store UNTSTATLAST from present status }
{
}
UNTSTATLAST := UNTSTATNOW;
FOR I := 1 TO NUMSTAT DO BEGIN
FCOST[ I ] := INFINITY;
PATH[ I ] := 0;
FOR J := 1 TO NUMUNT DO UNTSTATNOW[ I, J ] := 0;
END; { I }
{
}
{ Build SETL, list of states in last period }
{
}
IF (K = 1) THEN BEGIN
NLIM := 1;
SETL[ 1 ] := INITSTAT;
END
ELSE
{
}
{ Get top NMAX states in SETL
}
{
}
BESTSTATES(SETL,PERIOD_DATA[ K-1 ].FCOST,NLIM,NMAX);
{
}
{ Build PCOST for all states at period K }
{
}
EDC;
{
}
{ Build SETX, list of states in present }
{
}
BESTSTATES(SETX,PCOST,XLIM,XMAX);
{
}
{ Search all transitions from states }
{ in SETL to states in SETX
}
{
}
CONTINUE := FALSE;
FOR X := 1 TO XLIM DO BEGIN
XSTATE := SETX[ X ];
FOR N := 1 TO NLIM DO BEGIN
LSTATE := SETL[ N ];
FEAS;
IF (VALID = 1) THEN BEGIN
{
}
{ Valid transtion, see if cost is minimum }
{
}
126
PATHCOST := PERIOD_DATA[ K-1].FCOST[ LSTATE ] + SCOST +
PCOST[ XSTATE ];
IF (PATHCOST <= FCOST[ XSTATE ]) THEN BEGIN
{
}
{ New minimum cost path found }
{
}
FCOST[ XSTATE ] := PATHCOST;
UNTSTATNOW[ XSTATE ] := UNTSTATTEMP;
PATH[ XSTATE ] := LSTATE;
CONTINUE := TRUE;
END;
END;
END; { N }
END; { X }
{
}
{ Done with all paths for this period }
{ Print results for current period }
{
}
IF PRINT_OUTPUT THEN STATUSDUMP(K,LST)
ELSE STATUSDUMP(K,OUTPUT);
K := K + 1;
END; { K }
{
}
{ Printout routine }
{
}
IF CONTINUE THEN BEGIN
IF PRINT_OUTPUT THEN FINAL_OUTPUT(LST)
ELSE FINAL_OUTPUT(OUTPUT);
END
ELSE
IF PRINT_OUTPUT THEN WRITELN(LST,'THERE IS NO SOLUTION')
ELSE WRITELN(OUTPUT,'THERE IS NO SOLUTION');
QUIT:
IF PRINT_OUTPUT THEN ENDPRINT(LST);
WRITELN;
WRITE('DO YOU WANT TO RUN UNITCOM AGAIN? (Y OR N) : ');
READLN(QUITFLAG);
UNTIL (QUITFLAG <> 'Y') AND (QUITFLAG <> 'y');
{ ------------------------------------------------------------------- }
END.
© Copyright 2026 Paperzz