Professional Documents
Culture Documents
LTH Iea 1060 PDF
LTH Iea 1060 PDF
Restoration
Application of a Search Algorithm
Lars Lindgren
Licentiate Thesis
Department of Measurement Technology and
Industrial Electrical Engineering
2009
Department of Measurement Technology and Industrial Electrical Engineering
Faculty of Engineering
Lund University
Box 118
SE-221 00 LUND
SWEDEN
http://www.iea.lth.se
ISBN 978-91-88934-52-9
CODEN:LUTEDX/(TEIE-1060)/1-144/(2009)
ii
School of Technology
Malmö University
iv
Abstract
Large blackouts are rare but can have a high impact on society and the econ-
omy. This impact strongly depends on their duration and therefore speedy
restoration is important.
More distributed and renewable generation and more interconnected power
systems that are operated close to their limits will lead to new challenges in
power system restoration. At the same time society is becoming ever more
dependent on electric power supply. The ability to restore the power supply
after blackouts is therefore vital and means to improve it should be investi-
gated.
For the operators in a control centre, restoration of a power system in-
volves taking a number of actions. If possible these follow written instruc-
tions, but often also needs to be improvised. This thesis proposes that au-
tomation is also applied to this task. An algorithm that finds a suitable se-
quence of actions to restore the power supply after a blackout can be used
both to assess different strategies or potential restoration difficulties before
any real event and to support the operators during an actual restoration situ-
ation.
This thesis shows that the restoration problem is NP-hard and proposes
a simple heuristic restoration algorithm based on the well known tree search
algorithm A∗ . The proposed algorithm is applied to a simplified power sys-
tem model using static load flow analysis.
NORDIC32, which is used as test system, is a fictitious power system
model with 32 substations and 36 generators. It attempts to broadly represent
the synchronized Nordel transmission system.
The algorithm has been found to be robust against variations in both the
search parameters and the power system model. For black start in the base
case the algorithm typically finds a sequence of around 750 actions that re-
v
store all loads after the algorithm has tested about 2000 actions. The actions
include network switching, startup and setpoint changes of generators and
load reconnections. On a 2.2 GHz AMD Opteron processor this computa-
tion takes less than 30 seconds.
The fact that the computation time is as short as 30 seconds indicates that
the algorithm realistically could handle more complex systems either larger
or with more detailed modelling.
Keywords
vi
Sammanfattning
vii
för att återställa elförsörjningen till alla förbrukare. För att finna dessa åtgär-
der testar algoritmen ca 2000 åtgärder. Dessa åtgärder innefattar kopplingar
i nätet, start och ändring av driftläge för kraftverksenheter samt belastnings-
tillkopplingar. På en 2,2 GHz AMD Opteron processor tar denna beräkning
mindre än 30 sekunder.
Det faktum att beräkningstiden är så kort som 30 sekunder visar att al-
goritmen bör kunna hantera mer komplexa system, antingen större eller med
mer detaljerade modellering.
viii
Acknowledgement
This project was initiated by Dr. Bo Eliasson who also supervised the begin-
ning of this project and my B.Sc. project.
This thesis had not been possible without the support from people around
me. I want to thank my supervisors at Lund University, especially:
Assoc. Prof. Olof Samuelsson, my main supervisor for his strong sup-
port even in periods when the work has progressed slowly and for his help
with both content and language.
Prof. Sture Lindahl, for using his expertise to give me many new views
and insights.
Prof. Gustaf Olsson and Magnus Akke for their enthusiasm and insights.
My colleagues at Malmö University and at the Department of Measure-
ment Technology and Industrial Electrical Engineering at Lund University
have been very important in the work with this thesis. I want to especially
thank Prof. Bengt J. Nilsson for his help with the computer science part of
this work and fellow postgraduate student Tech. Lic. Christian Andersson
for our close cooperation in the beginning of the project. I also want to thank
John Niubo at Malmö University for his support.
Energinet.dk, previously Eltra, has financed this project which is grate-
fully acknowledged. Two persons at Energinet.dk have been especially im-
portant, they are Assoc. Prof. John Eli Nielsen and Dr. Per Lund.
Of course I also want to thank my family and others for their support
during this work.
I have learned very much during this work.
ix
x
Terminology
Circuit breaker A mechanical switch that can operate fast and is able to
interrupt fault current at short-circuits without being damaged.
Distributed slack bus A slack bus in a power flow calculation is the bus
where the active power is adjusted to get the active power balance
right. In a power flow calculation with distributed slack bus this ad-
justment is distributed to several buses according to some weighting
factor.
Distribution network The low voltage and medium voltage networks that
distribute the power to small and medium sized customers. It is com-
mon that distribution networks are operated in a radial configuration
since that simplifies the protection system.
Electrical island A part of a power system that is disconnected from the rest
but remains energized. The main energized part of the power system
xi
can be seen as special case of an island.
Energy not delivered The energy that customers wanted to buy but could
not because of a power outage. Normally calculated as the predicted
consumption in the area that is without power.
Flat start Flat start means that all voltages are set to a fixed voltage, usually
the nominal value (1 p.u.) and all voltage phase angles are set to 0
before the first iteration in a power flow calculation.
Generating unit A power plant can have one or more generating units, each
mainly consisting of a turbine and a generator. Each generating unit
can be started independent of the other generating units.
N-1 criterion A rule in power system operation that demands that the sys-
tem shall be able to withstand the failure of any component without a
collapse.
Power flow analysis A calculation of the active and reactive power flows
in a power system given the generation and consumption in the sys-
tem. Can include different regulators such as voltage regulators and
tap changers. The most demanding step is to calculate the voltage
magnitude and phase angle for all buses, which is done iteratively. Af-
ter that the power flows on the lines and in the transformers are trivial
to calculate.
xii
Power plant A power plant consists of one or more co-located generating
units.
Reactive power Power that over a cycle in the AC voltage moves in both
directions so that on average no power is transferred but it still gener-
ates losses. In a system with inductive power lines the voltage can be
controlled by controlling the reactive power.
Switch A device that can close or open an electrical circuit, see circuit
breaker and disconnector.
Three phase symmetry A situation where the currents and voltages in the
three phases are identical except for a phase shift of 120 degree be-
tween the phases. In this case it is sufficient to calculate the power,
voltage and current in one phase and then multiply the power by three
to get the three phase power. High voltage AC systems are normally
operated close to three phase symmetry.
Top down restoration Restoration from one island in the system and then
expanding that island by energizing more and more components.
xiii
• Which components are connected directly to each other and thus
have the same voltage?
• Which electrical islands exists in the system?
Transmission system The high voltage part of a power system that trans-
mits power over long distances.
xiv
Contents
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Scope of the thesis . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Previous work . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.6 Outline of the thesis . . . . . . . . . . . . . . . . . . . . . . 7
2 Overview 9
2.1 The operational states of the power system . . . . . . . . . . 9
2.2 Restoration . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Power plant characteristics . . . . . . . . . . . . . . . . . . 15
2.4 Historical development of power system restoration . . . . . 18
2.5 Problem formulation . . . . . . . . . . . . . . . . . . . . . 19
4 Test system 31
4.1 Adaptations and details . . . . . . . . . . . . . . . . . . . . 31
4.2 Visualization . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 Test cases . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
xv
5 Characterization of the problem 41
5.1 NP-hardness . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6 Search algorithms 47
6.1 The A∗ algorithm . . . . . . . . . . . . . . . . . . . . . . . 49
6.2 Optimality . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.4 Power system restoration . . . . . . . . . . . . . . . . . . . 54
6.5 The fast and simple evaluation function, f1 (N, A) . . . . . . 58
6.6 The full evaluation function, f2 (N ) . . . . . . . . . . . . . 59
6.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7 Simulation results 63
7.1 Resulting sequence . . . . . . . . . . . . . . . . . . . . . . 63
7.2 The search . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
10 Conclusions 97
10.1 Algorithm and test system . . . . . . . . . . . . . . . . . . 97
10.2 Computation time . . . . . . . . . . . . . . . . . . . . . . . 99
xvi
11.5 Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . 103
References 105
A Implementation 111
xvii
xviii
Chapter 1
Introduction
The reliability of a power system depends on the frequency and the duration
of power outages. Much of the research about power systems focuses on
reducing the frequency of power outages.
The focus in this thesis is instead to reduce the duration of large power
outages or blackouts by improving the restoration process.
1.1 Background
This research project deals with the electric power system and specifically
how to manage a restoration situation in which large parts of the power
system have lost voltage after a fault or a collapse. In such situations, the
start-up and regulation of generating units must be accurately coordinated
with the connection of loads and power lines, to eliminate the risk of another
collapse.
This project was motivated by the growing amount of distributed power
generation which gives new questions about how restoration should be per-
formed. The large number of small generating units also raises questions
about if restoration can be performed automatically at a lower level in the
power system.
Five approaches to the study of these issues have been identified:
1. Theoretical arguments.
1
2 Chapter 1. Introduction
Power system restoration has of course been a necessary part power system
operation since the first power systems were built. The traditional method
is to have written instructions with general rules that are executed manually
[15]. Since the restoration situation can often not be known beforehand this
includes more or less improvisation. Since the use of computers became
common there have been attempts to automate the whole process or part of
the process.
The book “Power System Restoration methodologies & implementation
strategies“ by M. M. Adibi collects many of the key papers in the area and
complements these with comments [8]. The book was published year 2000.
The power system restoration research can be categorized according to
several different criteria:
Disturbance Some research focuses on the common case that only a small
part of the system is without power [18], other research focuses on
1
Defined as the energy that the customers are prevented from consuming by the blackout.
4 Chapter 1. Introduction
The most relevant articles found are listed below. The following criteria
have been used when selecting the articles:
• The used algorithm can find a sequence of actions for restoration from
black start or near black start of bulk power systems.
• Describes the used algorithm in enough details so the inner workings
of the system can be understood.
• Needs no system specific manually prepared restoration plans or guide-
lines.
1.3. Previous work 5
operators during restoration. First a target state is defined for the power
system a few hours later that the operators can modify if they wish.
Then the expert system tries to find actions that take the system to the
target state.
1.4 Contribution
In this work, a new tree search algorithm for power system restoration has
been developed. It is based on the well-known A∗ -algorithm. The algorithm
has been shown to be able to do a full restoration of a rather complex power
system with a simplified model. This is done without specifying any overall
restoration plan or specific goal state beforehand.
The work has been published in the papers:
The performance of the algorithm under different conditions has been in-
vestigated.
The power system restoration problem has been shown to be NP-hard.
This was done by reduction from Steiner tree in graphs.
1.5 Applications
Overview
9
10 Chapter 2. Overview
Figure 2.1: The operating states and state transitions of a power system,
adapted from [16]. White arrows represents foreseen or unfore-
seen disturbance. Gray arrows represent control and/or protective
actions.
2.2. Restoration 11
When a stable operating point with partial or total blackout is reached the
system enters the restoration state. The goal in this state is to reconnect all
loads, when this is achieved the system either enters the alert or the normal
operating state. This thesis focuses on the process of going from a stable
operating point to the alert state.
2.2 Restoration
need to be energized and a significant part of the generating units will not be
available.
In order to handle restoration situations the operators have prepared restora-
tion plans and guidelines for some typical blackout situations. The operators
will try to apply these to the current situation.
Two major strategies in power system restoration can be defined, bottom
up vs. top down. Bottom up means that several smaller electrical islands
are started in parallel; these are then used to energize the transmission sys-
tem. The need to synchronize the islands can slow down the process. Top
down means that the transmission system is energized from one point and all
the lower voltage levels are energized from the transmission system and the
whole energized power system is kept synchronized.
In Sweden the general plan is to restore the system from the North and
southwards, which is an example of top down. The reason for this is that the
hydropower in the North is normally much easier to use during the restora-
tion and faster to start. Also it is very likely that some part of the Northern
part of the system will not be affected by the blackout. Energinet.dk is work-
ing towards an ambitious bottom up strategy in their cell-project [28]. In
power systems that are dominated by large thermal power plants it is com-
mon to have separate plans for the restart of each large steam turbine plant,
which is a form of bottom up restoration.
The first priority is normally to energize all substations. This has several
reasons. The remote controls of substations operate on battery power and
are normally dimensioned for powering the substation control equipment a
specified time, Svenska Kraftnät has for example chosen 12 hours in new
substations [6], but this can be uncertain due to aging of the batteries. If the
batteries run out before the substations are energized the restoration is further
delayed due to the need to send service crew with mobile diesel generators
to the substation to power the control system and recharge the batteries.
It is also important to get power to the power plants so they can initiate
their preparation to start as soon as possible. If a thermal power plant is
without power for some time it will cool down and it will take a consider-
able amount of time to restart it. Also as larger parts of the system become
energized more resources become available to the operators. If there is some
other prioritized loads in addition to substation control and power plant aux-
iliaries it is also necessary to energize the substations in order to be able to
supply the prioritized loads. Another advantage of energizing substations
2.2. Restoration 13
object can be energized at a time without manually opening all the circuit
breakers first.
The DUBA system of each circuit breaker tries to re-close the breaker if
it was closed before the event and some predefined local conditions are met
[2]. The operations performed by the DUBA operation are delayed between
10 and 300 seconds after the conditions are fulfilled and after the last DUBA
initiated action in the substation. After large blackouts the DUBA will help
with the energization of the first substations but much of the restoration need
to be done manually [4]. This is due to the fact that the DUBA mostly tries
to restore the state before the event directly with very limited ability to adapt
to the current situation.
Power plants have an important role in bulk power system restoration. Differ-
ent types of power plants have very different characteristics, the most impor-
tant difference is that steam turbine power plants have much longer starting
times than for example hydro power and wind power.
Hydro power has very short starting time (a few minutes) and the active
power can be ramped up and down very fast (100 %/minute). It also runs
with high efficiency on partial load, and for this reason it is often used as
regulating power. A drawback when using hydro power as fast frequency
regulating power is that the power output has a non minimum phase charac-
teristic, e.g. when opening the guide vanes to give more power, the power
will temporarily decrease due to the acceleration of the water in the water-
ways. This is especially true in power stations with long waterways.
It has very low marginal cost but since a river has a limited amount of
water and the water can be stored in dams it is common to assign a price to
the water according to the expected electricity prices at later times. If the
water flow is too large it can be necessary to spill the water. If there are more
hydro power stations after each other the production must be coordinated so
that they use each others’ water.
There are also legal restrictions on maximum and minimum water flows
and levels in order to not disturb the ecology too much and not flood ar-
eas downstream. Hydro power generators are also very good at regulating
voltage.
16 Chapter 2. Overview
Diesel engines are mostly used as backup power, they are very fast to start
and regulate and also cheap to build but expensive to run. In sizes up to about
1 MW they can be mobile. They often have black start capability based on a
battery.
1
A power electronic device that can continuously control its generation or absorption of
reactive power.
2.3. Power plant characteristics 17
Gas turbines are used for larger units than diesel engines and take 5-30 min-
utes to start. They are fast to control and are therefore often used as regulat-
ing power and emergency power. They can often be started in a black net by
using compressed air or battery. The marginal cost is high but they are cheap
to build.
Steam turbines are used in most nuclear and coal fired power plants and pro-
duce about 80 % of the world’s electricity. They often have very long starting
times since it takes long time to heat the boiler. A steam turbine can be in
different states of readiness, cold (starting time 4-48 h), hot (starting time
30 minutes - 2 h), house load (starting time 5 minutes). The thermal iner-
tia makes steam turbines rather slow at regulating their active power output,
especially when the active power is increased.
Power plants based on steam turbines need rather much external power in
order to start.
When disconnected from the net due to faults in the net many units try to
continue supplying the internal power consumption (house load). In order
to achieve this, the power to the turbine must be decreased rapidly, which
is often done by letting steam bypass the turbine and go directly to the con-
denser. This is a sensitive process and in about 50% of the cases the unit will
trip when transition to house load is attempted [4].
A hot restart is only possible if the unit gets outside power within a speci-
fied time after the blackout.
Nuclear power plants also have to follow strict safety regulations and
sometimes need to get permission before starting. In the Swedish black-
out in 1983 the first nuclear generating unit was synchronized after 10 h and
all nuclear production was completely restored after about 80 h [1, pages
45-50].
Often a gas turbine is combined with a steam turbine in a combined cycle
power plant. In a combined cycle power plant the heat in the exhaust gases
from the gas turbine is used to produce steam for the steam turbine, this gives
higher overall efficiency.
18 Chapter 2. Overview
Restoration was straightforward in the first power systems as they were built
around a power plant that of course had black start capability. Since then
the power systems have become more and more interconnected over larger
and larger areas. Many newer power plants are not built to be able to start
independently of external power.
The way the power system is operated has also changed. The first systems
2.5. Problem formulation 19
were to a large extent operated by direct manual control of the primary com-
ponents. Then the operation was moved to local control rooms and these
have been more and more aggregated. Now most national power systems
are operated by computerized remote control (SCADA) from one or a few
centralized control rooms.
This means that the number of people that operates the system has de-
creased. Even if the operation of the system has been heavily rationalized
there will be a very high work load on the operators in a restoration situ-
ation. It also means that the operators do not have the same level of local
knowledge that was common before. On the other side they will have much
better overview of the system.
In Sweden the operators of the local control rooms had prepared rules for
what to do in the event of a blackout. When these control rooms were closed
some of these rules have been implemented in automatic systems and this is
what we now call DUBA.
Another important change is the deregulation of the electric market in
large parts of the world. This has led to the legal and administrative sep-
aration of network and production. This makes it harder to coordinate the
operations in uncommon situations where the market cannot operate as in-
tended.
This chapter describes the models of the different system components and
how the power system is simulated. The objective of these models is that they
are easy to implement and computationally cheap while still giving results
that are relevant from a power system perspective. The model is used by the
restoration algorithm to test different actions and to get the resulting values
such as frequency, voltages and currents. The model also generates a list
of available actions in each state. The model contains checks to determine
if a state is feasible which means that all components operate within their
specifications.
3.1 Simulation
The power system is simulated with a power flow calculation after every
action in the search algorithm. Much computation is saved by avoiding dy-
namic simulations for every step. If this algorithm should be used for real
restorations the most promising actions should be checked with a dynamic
simulation, which has not been implemented yet. Only the positive sequence
is modelled; in other words, three-phase-symmetry is assumed. For a trans-
mission system without faults this should be a reasonable assumption. The
power flow calculation includes frequency calculation and limits on active
and reactive power at generating units. This is necessary in order to model
the production distribution during the restoration. The frequency calculation
is developed from the concept of distributed slack bus. The frequency calcu-
lation assumes that all power units can be assigned a frequency response in
21
22 Chapter 3. Modeling and simulator
Figure 3.1: An example that shows how the frequency control efforts of sev-
eral generating units are merged. All generating units in the dia-
gram have a maximum power of 300 MW and a minimum power
of 50 MW. Generating units 1 and 2 have a frequency response of
833 MW/Hz and power unit 3 has a frequency response of 1250
MW/Hz. Every Generating unit has a different set point for ac-
tive power. The set point is the power obtained at 50 Hz. The
frequency is calculated so that a balance exists between the pro-
duction and the consumption including the active power losses.
MW/Hz that applies over the entire control range. Figure 3.1 illustrates how
the MW/Hz characteristics of several generating units are combined.
The program also contains a complete topology calculation and handles
several electrical islands running at the same time by performing a separate
power flow calculation for each of them. Since only static power flows are
calculated no proper synchronization checks can be done. The only check
that is done when islands are synchronized is that the resulting power flow
should represent a feasible state. The impedances of the components are
independent of the deviation from nominal frequency. The power flow equa-
tions are solved with the Newton-Raphson method [23].
3.2. Power system components 23
Figure 3.2: The model of a line, a π-link, so named because of the similarity of
the diagram to the Greek letter π (pi). The model has series induc-
tance (L), series resistance (R) and capacitance (C) to earth. Since
three-phase symmetry is assumed, only one phase is modelled.
∂P ∂P ∂P
∆P ∂θθ ∂V ∂f ∆θθ
∆Q = ∂Q ∂Q
(0...0)T ∆V (3.1)
P ∂θθ ∂V
∆ θ 1...1 0...0 0 ∆f
Each power flow iteration solves the equation 3.1 to update angles by ∆θθ ,
voltages by ∆V and frequency by ∆f . ∆P and ∆QP are the mismatches in
active and reactive power at each bus. Specifying ∆ θ drives the average
of the bus voltage phase angels to zero, which is an alternative to selecting
a reference bus. This is easier to handle when the topology changes than
a reference bus. All power flow calculations are calculated from flat start.1
The number of iterations in the power flow calculation has been limited to
50 and the tolerance for convergence are 10 kW active power error and 10
kvar reactive power error in each node. Incremental power flow calcula-
tions would decrease the time to calculate a power flow but would increase
the memory requirements. Tripping constraints for protections etc. are not
modelled. The nominal frequency is assumed to be the same throughout the
power system. All connections and disconnections are made with explicitly
modelled switches.
24 Chapter 3. Modeling and simulator
3.2.2 Transformers
Transformers are modelled as an ideal transformer in series with a π-link
with series resistance and series reactance and with shunt reactance. Only
real transformer ratios are modelled (no phase-shifting transformers). Trans-
formers with more than two windings are not modelled. In this thesis no
tap changers have been used. Transformers have a highest permitted current.
It is assumed that the transformers can be energized from either side but in
practice energization from the low voltage side is often avoided due to high
inrush currents.
3.2.4 Loads
All the power consuming equipment connected to a power system is aggre-
gated into larger objects called loads in simulations and calculations. This is
done both since the net owner lacks information about details of the customer
power consuming equipment and to simplify the calculations. At transmis-
sion level the load objects also include subtransmission and distribution nets
and tap changing transformers. In reality the loads are the most complex part
1
This means that all voltages are set to 1 p.u. and all voltage phase angles is set to 0 before
the first iteration. The reason for this is that it is easier to handle for the search algorithm since
values from all earlier net states need not to be stored.
3.2. Power system components 25
Generating units in the model can be on or off; black start units and plants
that survived the blackout are on in the initial state of the model. When a
generating unit that is off is energized from the net it will switch to the on-
state. Generating units that are on will not be turned off even if they are
disconnected. The model parameters and state variables can be seen in table
3.1 respectively 3.2. Active power is adjusted between Pmin and Pmax for
frequency control. Pset is the active power at nominal frequency. See Figure
3.1. Reactive power is adjusted between Qmin and Qmax by the automatic
voltage controller. Vset is the voltage with zero reactive power. Pset can be
changed between Pmin and Pmax in 10 steps. Vset can be changed in steps
of 0.01 p.u. as long as the reactive power is within its limits. When reactive
power is above Qmax , Vset cannot be increased and when reactive power is
below Qmin , Vset cannot be decreased. No changes can be made when the
generating unit is off.
A power system node is any location where two or more components are
connected. All nodes have a highest and a lowest permitted voltage and
frequency. A base voltage has also been defined for each node.
26 Chapter 3. Modeling and simulator
3.2.7 Switch
A switch can be placed between two nodes. Switches have two states: on
(closed) and off (open). Switches are modelled as capable of switching all
occurring currents on and off. Open switches can only be closed if one side
is energized; this simplifies the algorithm by avoiding to trying to close all
switches that are not affecting the current power flow. All closed switches
can be opened.
3.2.8 Faults
3.2.9 Substations
The starting point is a power system with a specific (operating) state. From
this state, the algorithm must find a sequence of actions that finally connects
all loads. All the intermediate states in this sequence must be feasible. There
may be several energized subsystems (islands). A feasible state is a state in
which the voltage and frequency at all energized nodes are within set limits
and the currents in all lines and transformers are below their thermal limits.
In order to simplify the algorithm only discrete actions are modelled, even
when changing continuous values such as active power set points. Available
actions are shown in Table 3.3.
Switches in non-energized parts of the power system are assumed to be off
(open) in their initial state. If automatic zero voltage protection is installed,
as it is in Sweden, this is a very reasonable assumption. Since only actions on
closed switches and energized components are considered, the search only
needs to cover parts of the power system that have been energized at some
time during the restoration. For a sequence of actions to be a valid solution
to the problem, all intermediate states must be feasible.
A state is described by:
28 Chapter 3. Modeling and simulator
• Switch states
Since the load in this model is determined only by the switch states, no extra
state is needed for the load.
3.4 Time
In order to calculate the energy not delivered and plot results against restora-
tion time an estimate of the time for each action is needed. This is arranged
in the following approximate way. Increasing and decreasing active power
set point by 10% on thermal non black start generating units are estimated
to take 5 minutes. All other actions are estimated to take 1 minute. Since in
real situations several actions can be taken in parallel by different operators,
these estimated times are divided by 3 before they are used in the calcula-
tion. This is of course a very coarse model of the time consumption during
the restoration. A more refined model would be needed to explicitly model
the used parallelism and the time dependent behaviour of the components.
30 Chapter 3. Modeling and simulator
Chapter 4
Test system
31
32 Chapter 4. Test system
Figure 4.1: Nordic 32, a fictitious power system model with certain similari-
ties with the “Nordel” power system. The diagram shows the sta-
tions with their designations and all lines and transformers with
approximate fictive geographic positions.
4.2. Visualization 33
generating unit with black start capability has been added in the South1 . This
shall represent gas turbines and other peaking generating units that are not
included in Nordic 32. The model has 545 switches, 10 900 MW of load
and 36 generating units. There are 17 256 MW generating capacity of which
10 866 MW are hydro power in the North the rest are thermal power in the
South. Only the hydropower and the black start unit in the South are used
for frequency control. The voltage regulators have almost perfect voltage
regulation, the full reactive control range will be used for a voltage deviation
of only 0.01 %.
The complete model file for this system can be seen in appendix B.
4.2 Visualization
The three different starting states shown in the Figures 4.4 - 4.6 are chosen
to test the algorithm under different conditions.
• Restoration from the North after a complete blackout. Only one gen-
1
This was done in order to be able to do black start in the South of the model. All
the existing generating units in the Southern part of Nordic32 has a minimum active power
generation and can therefore not be black started in the model. Another solution had been to
modify one of the existing generators, this has not been tested.
34 Chapter 4. Test system
Figure 4.2: Power flow visualisation elements. For interpretation see table 4.1.
• Restoration from the North and the South after a complete blackout.
The extra black starting generating unit in the South (FT63-G11) is
started in addition to the generating unit used in the previous example.
This is intended for testing of the algorithm in a situation with multiple
islands.
Figure 4.3: Power flow solution for the base case in Nordic 32. For interpre-
tation see table 4.1. 400 kV substations have names with 2 digits.
130 kV substations have names with three digits and the first are 1.
220 kV substations have names with three digits and the first are 2.
Lines between substations represent power lines if the substations
have the same voltage, otherwise they represent transformers.
4.3. Test cases 37
Figure 4.4: Initial state with one island in the North consisting of only the
substation CT72.
38 Chapter 4. Test system
Figure 4.5: Initial state with one island in the North and one in the South with
the substations CT72 and FT63.
4.3. Test cases 39
Figure 4.6: Initial state with the Northern half of the system running, some-
what similar to the situation after the collapse 1983.
40 Chapter 4. Test system
Parameter Description
Allowed fre- If the frequency in any part of the system deviates more than
quency deviation this amount from nominal frequency (50 Hz) the state is not
considered feasible. Default value is 0.5 Hz.
Highest allowed If the voltage in any part of the system exceeds this value the
voltage state is not considered feasible. Default value is 1.1 p.u.
Lowest allowed If the voltage in any part of the system is lower than this value
voltage the state is not considered feasible. Default value is 0.9 p.u.
Generation factor Maximum and minimum active generation is scaled by this
P value for all generators. Default value is 1.
Generation factor Maximum and minimum reactive generation is scaled by this
Q value for all generators. Default value is 1.
Generation Pinit The initial active power set point of the generating units as
fraction of Pmax − Pmin , Pinit = 0 ⇒ Pset = Pmin ,
Pinit = 1 ⇒ Pset = Pmax . If this does not match the
load there will be a frequency deviation. Default value is 0
Generation Vset Default initial voltage set point in per unit for the generating
units. Default value is 1
Load factor P All active load is multiplied by this factor.
Default value is 1
Load factor Q All reactive load is multiplied by this factor.
Default value is 1
Load step size All loads are divided into load steps of at maximum this value
factor multiplied by the default step size for the load.
Default value is 1
I limit factor All current limits on transmission lines and transformers are
multiplied by this value. Default value is 5. This almost
means that current limits are disregarded by default.
Load on factor The percentage of the loads on each busbar that will be con-
nected to that busbar from the start. This can be regarded as
loads without zero voltage protection. Default value is 0
Random lines This number of lines will be chosen randomly for removal.
missing This can be used for simulating random known line faults in
the system. Default value is 0.
Chapter 5
1
Planning problems are here used in a computer science context. In a power system
context it is common to differ between operational planning and expansion planning. The
difference is that the operational planning deals with how to run the system the coming hours
and days, while the expansion planning deals with how to add new components to meet future
demands over the coming years and decades.
41
42 Chapter 5. Characterization of the problem
5.1 NP-hardness
2
The travelling salesman problem is the problem facing a travelling salesman that need to
visit each city in a set of cities and want to find the order he/she should visit them in order
to minimize the travelled distance. The distance between each pair of cities is assumed to be
known.
3
It is always possible to state that all practical power system restoration problems have
less than some large number of components and then the computation time can be shown to
be less than some very large constant but this gives no useful limit.
5.1. NP-hardness 43
mapped to the power system, nodes and edges correspond directly to busbars
and power lines. There is only one generator in the system. The set of
nodes that need to be connected, correspond to the busbars with loads and
the generator busbar.
Reactive limits
In this case the associated cost of an edge is translated into the reactive
power generation of the corresponding power line and the maximum cost
c corresponds to the maximum reactive absorption of the generator. All line
impedances are assumed to be zero and all loads are assumed to be purely
active power. If all limits and conditions other than the reactive limit on the
generator are assumed to be set with large margins, then this system can be
restored if and only if there exists a Steiner tree with lower cost than c. This
proves that the power system restoration problem is NP-hard.
Since real power systems are built to be able to absorb the reactive power
from the lines this can seem to be unrealistic but in a real situation there can
be component failures. This could also be thought of as whether the load can
be restored before all generating units have been started.
Restoration time
In this case it is assumed that there are no stability problems in the system
so only the topology is interesting. Each power line has an associated time
needed to connect it6 . This time corresponds to the cost of the corresponding
edge.
If an optimal7 power system restoration sequence can be found, the cor-
responding minimum Steiner tree in graphs problem can be solved by com-
paring the restoration time with the maximum Steiner tree cost c. This again
proves that the power system restoration problem is NP-hard.
6
In the model used in this thesis where the cost of all switching operations is constant this
could be modelled by replacing the power line by a series of power lines that have switches
between them.
7
Optimal here means shortest possible restoration time.
5.1. NP-hardness 45
Discussion
There exist polynomial time algorithms that can calculate an approximation
of the minimum Steiner tree in graphs so that it is guaranteed to find a Steiner
tree that has a cost that is no more than 1.55 times the minimum cost [34].
Since the full power system restoration problem is much more complex
it is not likely that such approximation algorithms can be found for power
system restoration. The reason the full power system restoration problem is
more complex is that it need to take into account factors such as voltage drop
and the interaction between active and reactive power flows.
46 Chapter 5. Characterization of the problem
Chapter 6
Search algorithms
In order to find a sequence of actions that restores the power supply, a search
algorithm is used. The algorithm is designed so that, given an arbitrary state,
it attempts to find a sequence of actions that leads to a better state. Search
algorithms are an important part of computer science and artificial intelli-
gence.
A search algorithm is used to test different solution candidates to a prob-
lem in a systematic way. This is useful when it is easy to test if a proposed
solution is valid but it is hard to generate a valid solution directly. Since the
goal is to find a sequence of actions or in other words a path, a path finding
algorithm1 is needed. The environment in which the path exists is the state
space graph, where every possible state in the power system is represented
by a vertex in the graph and all actions in each state are represented by a di-
rected edge to the resulting state. This graph is enormously large; fortunately
it need not to be stored, only the relevant parts are generated when needed.
Every action has an associated cost; the algorithm tries to minimize the sum
of the cost of the actions in the action sequence. The search proceeds as a
tree where every choice in each node generates a new node; see Figure 6.1.
In this chapter the following terminology is used:
State A state in the state space graph, in the power system restoration this
means a state of the power system. Denoted by S.
1
The same algorithms can be used both when finding a physical path such as planning a
tour using public transportation and in more abstract state spaces such as in power system
restoration.
47
48 Chapter 6. Search algorithms
Figure 6.1: Example of a tree structure of nodes and actions, the arcs repre-
sents the actions. Examples of actions: closing a switch or increas-
ing the set point for active power production by 10 %.
Node A node in the search tree, each node has a unique path or sequence
of actions from the initial state to the state corresponding to this node.
Several nodes can represent the same state if there are several paths
to that state. Denoted by N . When referring to a node in the power
system this will be stated explicitly to avoid confusion.
Action An action can be applied to a state and this will lead to a new state.
Denoted by A.
Path A sequence of states and actions that goes from one state to another
state.
The search algorithm works much like a chess computer; the difference
is that in this case there is no opponent and because of this different search
algorithms are used.
Search algorithms can be categorized as uninformed and informed. Un-
informed search algorithms do not use any application specific information;
they only need to know what actions are available in each state and the cost
of the actions. Therefore, they need to test many paths until a path to a
goal is found. For any reasonably large power system restoration problem
this would be extremely slow. Informed search algorithms use some sort of
heuristics to find the most promising of the tested paths and extend them.
The heuristics are often in the form of an evaluation function that generates
6.1. The A∗ algorithm 49
a value for each path. This value indicates which path that is most promis-
ing. With a good evaluation function the search time can be reduced by
several orders of magnitude. Search algorithms can also be divided in online
algorithms and offline algorithms. Offline algorithms calculate the whole
sequence of actions from the start while online algorithms use information
collected during the execution of the actions to decide what to do next. On-
line algorithms are useful for handling uncertainty. Since no uncertainty is
modelled here an offline algorithm is used. For real power system restoration
an online algorithm would be needed. An online algorithm can be created by
rerunning an offline algorithm with the current state as the initial state during
the execution of the action sequence.
The algorithm used for the power system restoration in this project is based
on an informed search algorithm called A∗ [17]. In order to solve a path find-
ing problem with A∗ an initial state and four application specific functions
are needed. These are:
Resulting State Calculates the resulting state after a given action is applied
in a given state. It also calculates the cost of the action.
Estimated cost to reach the goal from the current state, h(S) Returns an
estimate of the cost for the shortest path from the state S to a goal state.
Can also be referred to as h(N ) where N is a node in the search tree
that corresponds to the state S.
Is goal Test if a given state is a goal state, in some cases this is equivalent to
h(S) = 0.
The sum of costs for all actions in the path to the node N is denoted g(N ).
A∗ uses f (N ) = g(N ) + h(N ) to guide the search, f (N ) is an estimate of
the cost of the shortest path from the initial state to a goal state such that the
path begins with the path to N .
A∗ begins with one set of nodes called OPEN that only contains the node
for the initial state and one empty set called CLOSED. The OPEN set will
50 Chapter 6. Search algorithms
contain nodes that have untested actions or actions that need to be re-evaluated.
The CLOSED set will contain nodes where all actions have been evaluated.
The following steps are repeated until a path to a goal is found or the OPEN
set is empty which indicates that no path from the initial state to a goal exists:
1. Select the node with the lowest value of f (N ) from the OPEN set, this
node will be called Nn and the corresponding state Sn . If the OPEN
set is empty then there does not exists any path from the initial state to
any goal.
(a) Calculate the resulting state after applying the action. This new
state is represented by a new node in the search tree.2
(b) If a node with the same state as the new node is not already in
the OPEN or CLOSED set then add it to the OPEN set.
(c) If a node with the same state as the new node is found in the
OPEN or CLOSED set and the new path gives a lower cost than
the previous then remove the old node and add the new node to
the OPEN set.
4. Move the state Sn from the OPEN set to the CLOSED set.
5. Go to step 1.
Generally an h(S) function that gives larger values will result in a nar-
rower faster search. If h(S) is exactly the cost of reaching a goal given any
state S and all values of f (N ) are unique only states on the optimal path will
be expanded.
6.2 Optimality
It can be shown that A∗ will find the shortest path to a goal if the heuristic
function h(S) never overestimates the cost of the cheapest path to the goal
2
If a node with the same state has previously been expanded then this could be replaced
by looking up the resulting state in a hash table in order to save calculations.
6.3. Example 51
6.3 Example
The small state space graph shown in Figure 6.2 will be used to illustrate
how A∗ works. The heuristic in Figure 6.2 is an example of an admissible
heuristic. The search tree generated by A∗ for this graph can be seen in
Figure 6.3. The arrows represent actions and the numbers on the arrows
represent the cost of the action. Nodes that represent the same states but
are on different paths are connected by a dotted line. The name of the state
is given at the upper row in each node. On the lower row are three fields
separated by /, these are:
1. Node number or number of nodes found before this node during the
search.
3. The status of the node when the search is finished. The abbreviations
are:
Figure 6.2: Example of a state space graph, the arrows represent actions and
the numbers on the arrows represent the cost of the action. The
name of the state and the value of h(S), the estimated cost of
reaching a goal from that node, are given in each state. The short-
est path from start to a goal is Start – A – B – Goal1 and has a cost
of 11.
RC The node was removed from the CLOSED set when a better path
to the same state was found. (Step 3c in the algorithm)
The table 6.1 shows the progress of the search for each iteration. The
algorithm does not need to visit the states E and F since they cannot be on
an optimal path unless h(C) is an overestimate5 . Three paths to Goal1 are
found and one to Goal2, the search continues until the optimal path is found.
It finds a path back to the start state (Start -> A -> Start) but correctly detects
that it has already a better path (The empty path) and stops searching that
path. All the directly following actions are always tested in sequence. The
cost of going from A to B is 3, this is less than h(A) − h(B) = 5, this means
that h(S) is not consistent and this is the reason that the suboptimal path to
B is expanded before A on the optimal path. When the new path to the state
B is found in node 7 the “children” Goal1 and C get updated so g(N ) and
f (N ) take the new path in to account.
5
The cost of reaching C is 6 and the estimated cost of reaching a goal from C is 10 so the
estimated cost of reaching a goal through any path that includes C is 16 while the cheapest
found path costs 11.
6.3. Example 53
Figure 6.3: Example of a search tree generated by A∗ for the graph in Figure
6.2. The arrows represent actions and the numbers on the arrows
represent the cost of the action. Nodes that represent the same
states but are on different paths are connected by a doted line.
Table 6.1: The content of the OPEN and CLOSED set in each step in the iter-
ation. Each node is represented by the name of the state, the value
of f (N ) and the value of g(N )
OPEN set CLOSED set
(Start, 6, 0)
(B, 10, 6) (A, 11, 2) (Goal1, 13, 13) (Start, 6, 0)
(A, 11, 2) (Goal1, 12, 12) (C, 17, 7) (Start, 6, 0) (B, 10, 6)
(B, 9, 5) (Goal2, 12, 12) (Goal1, 12, (Start, 6, 0) (A, 11, 2)
12) (C, 17, 7)
(Goal1, 11, 11) (Goal2, 12, 12) (C, 16, (Start, 6, 0) (A, 11, 2) (B,
6) 9, 5)
54 Chapter 6. Search algorithms
responds to a goal state it will take too long time so instead the search stops
as soon as a goal state is found.
Since there is no guarantee that there exists a path from the initial state to
a goal or that it will be found within reasonable time even if it exists, a limit
on the number of nodes to evaluate is needed. Since little improvement is
seen in the test runs after about 2000 nodes we set the maximum number of
nodes to 3000 after which the search will be aborted. The maximum number
of nodes to evaluate depends of course on the power system that shall be
restored.
The reason for choosing the action to test randomly from the most promis-
ing is that if no path to a goal is found in a search then a new search can be
run with a new and hopefully better result.
The high number of states and available actions makes the probability of
finding multiple paths to identical states low. Therefore the check for iden-
tical states in step 3 in the algorithm description has not been implemented.
In step 3 the resulting state is just added to the OPEN set. This saves some
computation but could on the other hand lead to recalculation of already cal-
culated states in rare cases. If the power system model is extended with
time dependent models of loads and power plants, the probability of finding
multiple paths to identical states will become even lower since the timing of
actions will affect the state.
Figure 6.4 and table 6.2 shows the search for a path in the example graph
in Figure 6.2 without checking for duplicate states.
The evaluation functions have a number of parameters that must be given
a value. The parameters are denoted pn where n is an integer.
In order to have some starting point when studying variations in these pa-
rameters, in chapter 8, all parameters are given a default value. These values
have been found by estimating the size of each term and the relative impor-
tance of the term. The chosen values were then refined by testing variations
around these values. The default parameters are chosen to contain only one
digit out of 1, 2, 3 or 5 in different decimal position or to be zero in order to
show that the exact value are irrelevant.
56 Chapter 6. Search algorithms
Figure 6.4: Identical to Figure 6.3 except that the check for duplicated states
has been removed. When the start state is reached in node 6 parts
of the search tree are duplicated.
6.4. Power system restoration 57
Table 6.2: The content of the OPEN and CLOSED set in each step in the it-
eration of A∗ with the check for duplicated states removed. Each
node is represented by the name of the state, the value of f (N ) and
the value of g(N ). Some states are represented by several paths but
only the cheapest path is of interest.
OPEN set CLOSED set
(Start, 6, 0)
(B, 10, 6) (A, 11, 2) (Goal1, 13, 13) (Start, 6, 0)
(A, 11, 2) (Goal1, 12, 12) (Goal1, 13, (Start, 6, 0) (B, 10, 6)
13) (C, 17, 7)
(B, 9, 5) (Start, 10, 4) (Goal2, 12, 12) (Start, 6, 0) (B, 10, 6) (A,
(Goal1, 12, 12) (Goal1, 13, 13) (C, 17, 11, 2)
7)
(Start, 10, 4) (Goal1, 11, 11) (Goal1, (Start, 6, 0) (B, 10, 6) (A,
12, 12) (Goal2, 12, 12) (Goal1, 13, 13) 11, 2) (B, 9, 5)
(C, 16, 6) (C, 17, 7)
(Goal1, 11, 11) (Goal1, 12, 12) (Goal2, (Start, 6, 0) (B, 10, 6) (A,
12, 12) (Goal1, 13, 13) (B, 14, 10) (A, 11, 2) (B, 9, 5) (Start, 10,
15, 6) (C, 16, 6) (C, 17, 7) (Goal1, 17, 4)
17)
58 Chapter 6. Search algorithms
f1 (N, A) is mainly used to avoid repeatedly testing bad actions in all nodes.
The function f1 (N, A) is shown in equation 6.1, lower values mean better
action.
f1 (S, A) = p1 nb − p2 ng + p3 r (6.1)
The function has three terms:
p1 nb nb is the number of times the action has been tested on other nodes in
the search tree before reaching the current node and the resulting node
had worse evaluation than the parent node. This statistic is collected
for each individual action e.g. closing a specific switch. This is in-
tended to avoid actions that have been bad in other nodes. The default
value of p1 is 1.
p2 ng ng is the number of times the action has been tested on other nodes
in the search tree before reaching the current node and the resulting
node had better evaluation than the parent node. This is intended to
prioritize actions that have been good in other nodes, this is most rel-
evant for actions that can be applied several times e.g. increasing or
decreasing set points. The default value of p2 is 0.
p3 r r is a random number between 0 and 1. This is intended to mix actions
that otherwise should have had the same evaluation. Since the other
terms are small integers it is likely that many actions otherwise would
have received the same evaluation. The default value of p3 is 0.01.
Theoretically any value strictly between 0 and 1 would give exactly
the same result.
If the action opens a switch and does not only disconnect a reactor or
capacitor then an additional value p4 is added to the evaluation function.
The default value of p4 is 10. The intention with this parameter is to give
lower priority to actions that open switches since the number of switches
that needs to be opened during a restoration is much lower than the number
of other actions.
This evaluation function could be improved in many ways, for example
the prioritization when connecting and disconnecting capacitors and reactors
could depend on the voltage in the power system node in the parent state.
6.6. The full evaluation function, f2 (N ) 59
The use of statistics from use of actions in other states gives the algorithm
a limited form of learning. Observe that the function is not recalculated for
actions in a given node when ng and nb changes.
Since actions that have been available in many nodes generally collect a
number of bad usages, newly available actions such as closing switches on
newly energized busbars will be given higher priority.
The full evaluation function is calculated after the topology and power flow
of the new state is calculated. Therefore there is much more information
available in order to give a better evaluation. This function is used to select
the node to expand next. The function can be seen in eq. 6.2.
f2 (N ) = g(N ) + p5 h(S) (6.2)
S is the state corresponding to the node N . f2 (N ) has two terms:
g(N ) is the number of steps in the path from the initial state to the node N .
p5 h(S) is an estimate of the remaining cost to a goal (a state were all loads
are supplied). p5 is used to adjust how optimistic the prediction will
be, the default value is 2.
Pload
−p7 Ptotal load
: This term gives priority to states that already supply a large
fraction of the load. Pload is the active power of the currently con-
nected loads. Ptotal load is the total amount of load in the system. The
default value of p7 is 500.
Pgen max −Pgen min
−p8 Ptotal load : This term gives priority to states that have much reg-
ulating power. Pgen max is the sum of the maximum active power of
all the energized generating units. Pgen min is the sum of the minimum
active power of all the energized generating units. The default value
of p8 is 50.
nlive
X nodes
(fi − fbase )2
i=1
p9 p 11
nlive
: This term gives priority to states where the fre-
nodes
quency in the power system nodes are near the base frequency 7 This
is the sum of the squared deviation in frequency normalized according
to the total number of energized power system nodes. The normaliza-
tion is done by dividing by nplive
11
nodes , the default value of p11 is 0.5.
This is a compromise between the sum of squared deviations (p11 = 0)
and the mean of squared deviations (p11 = 1). All power system nodes
in the same island will have the same frequency so the frequency of
a large island will have greater impact than the frequency of a small
island. The default value of p9 is 5.
nlive
X nodes
(|Vi | − 1)2
i=1
p10 p11
nlive
: This term is similar to the previous but gives pri-
nodes
ority to states with voltages near 1 p.u. instead of states with good
frequency. The same normalization exponent p11 is used. The default
value of p10 is 500. This value needs to be larger since voltages are
calculated in p.u. while frequencies are calculated in Hz and therefore
can have larger numerical deviations.
For states with violated limits in voltage, frequency or current a large value
is added to h(S) in order to guarantee that it has worse evaluation than any
state without violated limits.
7
fbase = 50Hz in the test system.
6.7. Summary 61
6.7 Summary
The power system restoration problem is a path finding problem in the state
space graph. A power system restoration algorithm based on the A∗ -algorithm
has been described. A∗ has a number of good theoretical properties if the
evaluation function fulfils some constraints.
No good evaluation function that fulfils these constraints has been found
for the power system restoration problem so the algorithm can not be guar-
anteed to find a path if one exists or to find the shortest path. According to
section 6.1 it is very likely that every evaluation function that fulfils these
constraints will give exponential computation time in some cases and thus
no useful guarantees could be made anyhow. If this is not true an efficient
algorithm to solve all NP-complete problems would exist.
The algorithm will hopefully find a good path in most of the cases.
The proposed algorithm has two evaluation functions. f1 (N, A) is a very
simple and fast evaluation function to compare different actions in the same
search tree node. It is based on statistics for the same action in other search
tree nodes. f2 (N ) calculates a power flow for the state corresponding to
search tree node N in order to compare it with other nodes, therefore it takes
longer time to calculate.
The algorithm is randomized so if it fails to find a good solution a new
attempt at running the algorithm can be made with a new result.
62 Chapter 6. Search algorithms
Chapter 7
Simulation results
The algorithm has been tested with the three cases presented for the test
system. Each of these has been tested with six different initiations of the
pseudo random generator. For each of the test cases one of these six test runs
has been selected for closer examination1 .
The state of the system at different stages during the restoration from both
the North and the South for the selected test run can be seen in the Figures
7.1, 7.2, 7.3, 7.4 and 7.5.
The Southern island grows much faster than the Northern island. The
lines from CT71 to CT11 and CT12 are energized very late which prevents
the Northern island from growing. Larger islands have larger number of
available actions and therefore the algorithm will test more actions on large
islands than on smaller. This will result in that large islands grow faster than
small. In reality the longer starting times for thermal power plants would
have slowed down the Southern island so the Northern island had grown
more before synchronization. The reason that the synchronization happens
so late is probably that the algorithm does no special handling of synchro-
nization and it is hard to find net states in which synchronization is immedi-
1
The random seed for the selected test run for start in the North and for start after a partial
blackout are 0. This initiation gave atypical behaviour for start from both the North and the
South at the same time so 1 was chosen instead. The initiation for the other 5 test runs was
10,11,12,13 and 14 for all three cases.
63
64 Chapter 7. Simulation results
Figure 7.1: The state of the power system after 10 % of the actions in the
restoration sequence when the restoration is started both from the
North and the South. Five substations are energized and some load
and generation has been connected.
7.1. Resulting sequence 65
Figure 7.2: The state of the power system after 25 % of the actions in the
restoration sequence when the restoration is started both from the
North and the South. The Southern island has grown to 19 substa-
tions while the Northern island is just two substations. Large parts
of the system are energized but very lightly loaded.
66 Chapter 7. Simulation results
Figure 7.3: The state of the power system after 50 % of the actions in the
restoration sequence when the restoration is started both from the
North and the South. 28 substations are energized. The voltage
angle differences in the system have increased. The islands have
met in substation CT71 but are not yet synchronized.
7.1. Resulting sequence 67
Figure 7.4: The state of the power system after 75 % of the actions in the
restoration sequence when the restoration is started both from the
North and the South. All substations and generating units are en-
ergized. Some power lines are not energized or only connected in
one end. The islands are still separated in substation CT71.
68 Chapter 7. Simulation results
Figure 7.5: The state of the power system after the complete restoration se-
quence when the restoration is started both from the North and the
South, compare with the normal state in Figure 4.3.
7.1. Resulting sequence 69
ately advantageous.
The total number of actions taken during the restoration sequence can be
seen in Figure 7.6. The graphs for restoration from the North and the South
and from the North are very similar and the restoration from a partial black-
out is similar to the later half of the other graphs. Two test runs for the partial
blackout that finds very few actions and then get stuck (Not visible in Figure
7.6). The sequences starts with almost the maximum 180 actions per hour,
during the latest 3 hour of the sequence the number of actions falls down
to about 100 actions per hour due to more adjustments of active power set
points is needed and takes longer time. This time estimate is of course very
rough and does not take into account for example that the number of actions
that can be taken in parallel increases with the size of the energized system.
The total available generation never limits the restoration in this case as
can be seen in Figure 7.7. In a real restoration it is possible that the rate of
load restoration would increase with the amount of synchronized generation
since larger load steps can be connected and the active power can be ramped
up faster. Since these aspects are not in the model it cannot be seen here.
70 Chapter 7. Simulation results
Figure 7.7: Upper line, connected active generating capacity. Lower line, con-
nected active load. Both as function of the simulated time for start
from both the North and the South at the same time. The black
lines are for the selected test run and the grey are for the other test
runs.
7.1. Resulting sequence 71
Figure 7.8: The frequency’s in the system as function of the simulated time for
start from both the North and the South. The black lines show the
selected test run and the grey lines show the other five test runs.
The frequencies in the system during the restoration from both the North
and the South can be seen in Figure 7.8. In the selected test run the synchro-
nization of the islands can be seen after ca. 4.5 hours. Frequencies between
49.5 and 50.5 are allowed, the frequencies are mostly in the lower part of
that band. One reason for this is that there are many more actions that lower
the frequency than raise it so the frequency will tend to be adjusted down
when too high faster than it is adjusted up when too low. One other reason
is that the evaluation function has terms that prioritize states with much load
connected and many switches closed.
The highest and lowest voltage in the system during the restoration from
both the North and the South can be seen in Figure 7.9. It also shows the
voltage after actions that have been tested but not used in the selected test
run. Voltages between 0.90 and 1.10 p.u. are allowed. There are some
tested actions that give too low voltages after about one hour, otherwise most
voltage related difficulties seem to be with too high voltages, probably due
to attempts to connect long lines.
The maximum voltage angle difference for the island with the largest an-
gle difference can be seen in Figure 7.10. After about one hour there are
72 Chapter 7. Simulation results
Figure 7.9: Highest and lowest voltage as function of the simulated time for
start from both the North and the South. The black lines show the
selected test run and the grey lines show the other five test runs.
Doted lines represent actions tested in the selected test run but not
used in the final sequence.
7.2. The search 73
Figure 7.10: Maximum voltage angle difference in any of the islands as func-
tion of the simulated time for start from both the North and the
South. The black lines show the selected test run and the grey
lines show the other five test runs. Doted lines represent actions
tested in the first test run but not used in the final sequence.
some actions that result in large increases in the maximum voltage angle
difference, this indicates some stability problems and is probably related to
the low voltages at the same time in Figure 7.9. The synchronization of the
island cannot be seen since none of the nodes in the Northern island nei-
ther get the highest or the lowest angles. The large differences in maximum
voltage angle difference between the different test runs are probable because
the voltage angles are not directly used in the evaluation function so it only
effects the evaluation indirectly. At the end of the restoration all the test runs
converge between 65 and 95 degrees.
The percentage of the test runs that succeeds in restoring the entire load and
the average not restored load can be seen in table 7.1. The average restora-
tion time for the different test cases can be seen in table 7.2. This is calcu-
lated as energy not delivered divided by the total load in the system. This
74 Chapter 7. Simulation results
Table 7.1: Restoration results for test cases with base parameters. Average
over 50 test runs.
Test case Complete Average load
restorations [%] not restored [%]
Restoration from the 86 0.13
North and the South
Restoration from the 92 1.7
North
Restoration after 32 22.0
partial blackout
Table 7.2: Average restoration times for test cases with base parameters. Av-
erage over 50 test runs.
Test case During Compensated
sequence [h] for not restored
load [h]
Restoration from the 2.83 2.85
North and the South
Restoration from the 2.91 3.07
North
Restoration after 1.25 3.45
partial blackout
is similar to the reliable index ASIDI [5]. If not all load is restored in the
found restoration sequence it is assumed that the remaining load will be re-
connected manually 10 hours after the end of the sequence when calculating
the energy not delivered. The best found complete restoration sequences for
the three test cases with respect to average restoration time have an average
restoration time of 2.53 hours for start from both the North and the South,
2.58 hours for start from the North only and 1.45 hours after a partial black-
out.
In Figure 7.11 the number of found actions that will be part of the final
sequence are plotted against the number of tested actions. For the total black-
7.2. The search 75
outs about 50 % of the first 1200 actions tested are used in the final sequence,
then the search becomes more difficult. The test runs for restoration from a
partial blackout are much more diverse and only about 30 % of the tested
actions is used in the final sequence. In Figure 7.12 a small part of a search
tree can be seen in detail. The algorithm very seldom backs up and tests
actions on other branches of the search tree but it has been observed in some
test runs. The reason for this is that there are so many actions to test on each
state.
The value of the evaluation function f2 (N ) for the search tree nodes along
the found sequence (path) can be seen in Figure 7.13. This value should
represent an estimate of the number of steps in the shortest sequence that
restores all loads and that begins with the current action sequence. In this
context it can seems strange to have negative values but it does not mater
since these values are only compared to each other. As stated in the algorithm
chapter this heuristic function is not admissible, this can be seen by the fact
that the value of f2 (N ) is higher for states along the path than for the found
goal state. The algorithm has very hard to find sequences that pass states
with higher evaluation than earlier states due to the high number of available
76 Chapter 7. Simulation results
7.3 Summary
The algorithm has been tested with the base parameter set presented in the
algorithm chapter and found to work well. The algorithm has some diffi-
culties with the partial blackout; this is probably because the algorithm has
difficulties redistributing the power production. Another reason for this can
be that the search parameters were mainly selected by trial and error on the
test case with start from both the North and the South. The algorithm does
very little backtracking. If no better state is found all the actions in the search
tree node with best evaluation will be tested before actions is tested in other
states. This takes long time so if the algorithm reaches a dead end the search
will be very slow.
7.3. Summary 77
Figure 7.13: The value of the evaluation function f2 (N ) for the search tree
nodes along the found sequence (path). The black lines represent
the selected test run for each test case and the grey lines represent
the other tests.
78 Chapter 7. Simulation results
Chapter 8
It is important that the need for tuning the search parameters is as low as
possible and that one set of search parameters should work well in many
different cases. Therefore a sensitivity analysis on the search parameters has
been done.
One parameter at a time has been changed; the default values have been
used for the other parameters. For each investigated value of each parameter
50 test runs have been performed. The average restoration time as defined in
7.2 has been used in order to compare how good different parameter values
are.
Equation 6.1:
f1 (S, A) = p1 nb − p2 ng + p3 r
79
80 Chapter 8. Algorithm parameter sensitivity analysis
the value of p1 and p3 do not to make any difference. The average restoration
time becomes about 6 minutes longer if p3 is 0.
p2 is used to increase the priority of actions that have been tested in other
states and given good results. p2 makes very little difference, probably be-
cause most actions are only useful once in each sequence and the search tree
is very dominated by one sequence.
The parameter p4 reduces the priority of actions that open switches other
than switches to shunt reactors and shunt capacitors. The impact of different
values of the parameter p4 can be seen in Figure 8.1.
All figures in this chapter will have the same lines but with different pa-
rameters on the horizontal axis.
The total restoration time including the assumed manual restoration of the
remaining load in 10 h after the end of the automatic restoration sequence is
shown. Below this line is a line that shows the part of the average restoration
time that is due to the manual reconnection of the remaining load. The sensi-
tivity to changes in the parameters has been tested both against the test case
8.2. The full evaluation function, f2 (N ) 81
with start from the North and the test case with start from both the North and
the South. As can be seen lower values than about 4 gives less successful
restoration. Values above that seem to give no difference, probably could
these actions be removed totally since they are not needed in most cases.
The default value is 10.
The fraction of the available untested actions that the action to test is cho-
sen from seems to make no difference as long as it is below 5% but it is
important to allow for good randomization so the algorithm can be rerun on
the same case until a good restoration sequence is found.
f2 (N ) = g(N ) + p5 h(S)
Figure 8.2: Average restoration time as a function of p5 , that scales the es-
timated remaining number of steps (cost). Observe the scale on
the horizontal axis. The default value of p5 is 2. The lines with
circles represent restoration from the North and the lines with x:s
represents restoration from both the North and the South.
the value of p5 is lower than about 1.2 then the algorithm does not find a
complete restoration sequence before the maximum number of states, 3000
is reached. If the estimate is too pessimistic more actions will look good so
in reality the found actions will not go as straight towards the goal; this is
seen as the faster restoration at 1.43 than at ∞. The default value of p5 is 2.
The parameter p6 is used to prioritize states with many closed switches,
the effect of this parameter can be seen in Figure 8.3. If this is below 0.5 the
action to close a switch with no other impact on the state such as energizing
an unconnected bus bar will look bad to the algorithm. Since a number of
such steps needs to be taken the algorithm will not find a complete restora-
tion sequence before it reaches the maximum number of tested actions. The
location of this transition is strongly dependent on the value of p5 , the tran-
sition in Figure 8.2 is to some extent a mirror image of this transition. A too
high value of p6 generates somewhat worse restoration sequences since there
will be too much focus on closing switches.
The evaluation of connected load, p7 is rather uncritical as can be seen
8.2. The full evaluation function, f2 (N ) 83
Figure 8.6: Average restoration time as a function of the parameter p10 scaling
the evaluation of voltage deviations. The default value is 500. The
lines with circles represent restoration from the North and the lines
with x:s represents restoration from both the North and the South.
values are less than 20 minutes. The best result was fond for the values 0.5
and 0.6. The default value of p11 is 0.5.
8.4 Summary
Most parameters have a wide range where the restoration algorithm gives
acceptable performance. There exists some critical transitions when the dif-
ferent parts of the evaluation function interact with each other, for example
p5 and p6 .
88 Chapter 8. Algorithm parameter sensitivity analysis
Chapter 9
Variations in the model parameters in table 4.2 have been tested in the same
way that variations in the search parameters were tested in the previous chap-
ter. This shows which conditions in the system that makes it hard to restore
the system. The ability to compare the difficulties of restoration in different
restoration situations was one of the main goals with automating the proce-
dure. The original goal was to be able to compare the restoration difficulties
in system with different amount of distributed generation of different types
but more development is needed before the algorithm can be used to compare
restoration with different production mixes in a useful way.
9.1 Limits
In order to make sure that all equipment works as intended the voltages, cur-
rents and frequencies need to be kept within certain limits. The narrower
these limits are the cheaper equipment can be used and the probability that
the equipment works as intended increases. On the other hand too narrow
limits can slow down the restoration as more actions will be rejected and
more set point adjustments need to be done. Figure 9.1 shows how the av-
erage restoration time depends on the allowed frequency deviation. If the
allowed frequency deviation is below ca 0.2 Hz then the restoration algo-
rithm gets difficulties. No improvement can be seen if the allowed frequency
deviation is above 0.8 Hz.
The default allowed voltage range is 0.9 to 1.1 p.u. the effect of changing
these limits can be seen in Figure 9.2. The voltage limits seem to have almost
89
90 Chapter 9. Model parameter sensitivity analysis
Figure 9.2: Average restoration time as a function of the highest and lowest
allowed voltage. The default values are 0.9 and 1.1 p.u. Grey
lines represent the lower voltage limit and black lines represent the
higher voltage limit. The lines with circles represent restoration
from the North and the lines with x:s represents restoration from
both the North and the South. The voltage limits have been tested
independent of each other with the other limit fixed to its default
value.
92 Chapter 9. Model parameter sensitivity analysis
no impact if they are outside 0.95 and 1.1 p.u. respectively. The restoration
seems to need to be allowed more over voltage than under voltage, this is
probably in order to be able to energize long lines. The algorithm will try to
keep the voltage as close to 1 p.u. as possible and will in most cases not find
a way to lower the voltage before connecting the line. These difficulties are
bigger when energizing from the North only.
As can be seen in Figure 9.3 the maximum allowed currents in the trans-
mission lines in this model are rather high compared to the currents in the
normal power flow in Figure 4.3.
The effect of scaling the maximum allowed currents can be seen in Figure
9.4. The restorations are only marginally affected as long as the current
limits are at least 50 % of their nominal values. By default the scale factor is
set to 5 which are almost equivalent to turning off the current limits.
Often during a restoration some components are out of service due to known
faults and maintenances work. Unknown faulty components are an extra
complication that is not handled here. In order to test the ability to restore
the system in such situations, restorations with different number of random
transmission lines removed have been tested1 . The result can be seen in
Figure 9.5. As expected restoration from the North are more sensitive to
missing lines than restoration from both the North and the South. Restoration
from the North is almost unaffected for up to 3 missing lines. Restoration
from both the North and the South is almost unaffected up to 6 missing lines.
The effect of uniformly scale the active and reactive load can be seen in
Figure 9.6. For scaling factors below 0.5 the restoration gives difficulties,
probably due to high reactive generation in lightly loaded lines, this mostly
affects restoration from the North only. For scaling factors between 0.5 and
1
In order to get as consistent result as possible 50 random permutations of the 52 trans-
mission lines where created. For each of the permutations and each value of n from 0 to 52
a restoration was attempted with the n first transmission lines in the sequence removed from
the model.
9.3. Scaling of the load 93
Figure 9.3: Schematic showing the current limits as the width of the transmis-
sion lines in the same scale as the earlier power flow visualizations.
94 Chapter 9. Model parameter sensitivity analysis
Figure 9.4: Average restoration time as a function of the scale factor for the
highest allowed current on transmission lines. The default values
are 5. The lines with circles represent restoration from the North
and the lines with x:s represents restoration from both the North
and the South.
9.3. Scaling of the load 95
Figure 9.6: Average restoration time as a function of the scaling of active and
reactive load. The lines with circles represent restoration from the
North and the lines with x:s represents restoration from both the
North and the South.
96 Chapter 9. Model parameter sensitivity analysis
1.0 the average restoration time is almost proportional to the load. This can
be explained by the proportionality between the number of load steps and the
amount of load. For scaling factors above 1.0 it is difficult to energize the
entire load even if the generating capacity is large enough due to difficulties
transmitting the power to some loads.
9.4 Summary
The restoration algorithm has been tested in different power system restora-
tion situations. Much of the features in the obtained result can be explained
from a basic understanding of power system restoration.
Chapter 10
Conclusions
In this work, the search algorithm A∗ has been adapted to the power system
restoration problem.
97
98 Chapter 10. Conclusions
The most important approximations made in the model are that it does not
contain:
This thesis also shows that any reasonable formulation of the power system
restoration problem is NP-hard. Hence it is unlikely that an algorithm with
guaranteed success in a reasonable time exists.
The algorithm implementation needs less than 3000 power flows and 30
seconds on a 2.2 GHz AMD OpteronTM in order to find a sequence of about
750 actions that restores the power after an almost complete blackout in
NORDIC32.
No direct tests are done on how the computation time increases with the
complexity of the power system. Since the problem is NP-hard the compu-
tation time increases exponentially with the complexity of the power system
in the worst case. The current results suggest that the algorithm scales al-
most linearly in terms of number of power flow calculations except when it
reaches a state where the evaluation function does not give enough guidance,
then the algorithm gets exponential running time.
100 Chapter 10. Conclusions
Chapter 11
Future work
The presented algorithm shows promising results but the modelling needs
to be complemented in order to reflect more important aspects of the power
system restorations. The most obvious features to add are uncertainty in how
the power system behaves and time dependent and dynamic models for load
and generation.
The present algorithm only handles static systems, i.e. systems in which
every change is due to an action. The algorithm needs to be upgraded
to handle dynamic phenomena such as generating unit start up times, lim-
ited rate of change of the active power of generating units, reconnection of
thermostatically-controlled loads, and so on.
The evaluation of the result of an action in such a model should not be
based only at the state of the system immediately after the action but should
take in consideration the future development of the power system state. This
is easiest done if the evaluation assumes that every evaluated action is the
last in the sequence.
A dynamic electromechanical simulation of the result of each action prob-
ably takes too much computation time. Instead repeated power flow calcu-
lations, for example at the times 1, 2, 4, 8, 16, 32, 64, 128, 256 and 512
minutes from each action is taken can be used.
Other forms of time dependence that need to be considered are the limited
rate at which actions can be executed and the delay from decision to execu-
101
102 Chapter 11. Future work
tion. This is especially important for actions that are executed manually.
There are a lot of details in the modelling of the power system components
that could be added such as:
• Tap changers.
• Protective relays.
• Switches with different ability to make and break current, this is the
difference between circuit breakers and disconnectors.
– Change the order in which actions are tested so that not all ac-
tions in the state with the best evaluation needs to be tested before
actions in other states are tested.
– Divide the evaluation of states into more steps where faster cal-
culations are used to determine which states to evaluate further.
The last step when it is almost decided that the action will be
used could be a full dynamic simulation of the action.
11.4. Distributed and hierarchical restoration 103
• Improve the evaluation functions for example by adding terms for new
variables such as voltage angle differences, short circuit power and so
on.
11.5 Uncertainty
values are compared against what is expected from the second model. If the
difference is larger than some threshold then the second model is updated by
some estimation algorithm so that it predicts values more similar to the one
from the first model and a new action sequence is computed from the current
state.
By introducing errors in the second model and in the measurements the
effect of such errors on the restoration can be studied
When doing a real restoration online the first model is of course replaced
by the real system.
This extension of the algorithm will increase the computation time sig-
nificantly by requiring a recalculation of the action sequence each time the
second model needs to be updated. By not computing a complete restoration
sequence each time the second model is updated this increase in restoration
time can be limited.
References
[5] Ieee guide for electric power distribution reliabilty indices. IEEE Std
1366-2003 (Revision of IEEE Std 1366-1998), 2004.
[7] CIGRE TF 38.02.08. Long term dynamics. phase ii. final report. Tech-
nical report, CE/SC 38 GT/WG 02, Ref. No. 102, 1995.
[9] Evert Agneholm. Cold Load Pick-up. PhD thesis, Chalmers university
of Technology, 1999.
105
106 References
[11] S. Barsali, R. Salvati, and R. Zaottini. Use of hvdc links for power
system restoration. Electric Power Systems Research, 79(6):973–983,
2009.
[12] Liu C.-C., Liou K.-L., Chu R.F., and Holen A.T. Generation capa-
bility dispatch for bulk power system restoration: a knowledge-based
approach. IEEE Transactions on Power Systems, 8(1):316–325, 1993.
[13] Teo C.Y. and Wei Shen. Development of an interactive rule-based sys-
tem for bulk power system restoration. IEEE Transactions on Power
Systems, 15(2):646–653, 2000.
[14] A. Edström and K. Walve. The training simulator aristo - design and
experiences. In IEEE Power Engineering Society Winter Meeting, New
York, NY, USA, 1999.
[16] L. H. Flink and K. Carlsen. Operating under stress and strain. In IEEE
Spectrum 15, 1978.
[17] P.E. Hart, N.J. Nilsson, and B. Raphael. A formal basis for the heuristic
determination of minimum cost paths. IEEE Transactions on Systems
Science and Cybernetics, 4(2):100–107, July 1968.
[18] Xiangzhen He, Zhiwei Liao, Wenxin Guo, Fushuan Wen, Junhui Liang,
and Jian Fu. A multi-objective model for transmission network restora-
tion based on multi-agent and tabu search. In 2008 Third Interna-
tional Conference on Electric Utility Deregulation and Restructuring
and Power Technologies, pages 2392–2397, Nanjing, China, 2008.
References 107
[20] Roger Kearsley. Restoration in sweden and experience gained from the
blackout of 1983. IEEE Transactions on Power Systems, 2(2):422–428,
May 1987.
[23] P. Kundur. Power system stability and control. McGraw-Hill, Inc, 1993.
ISBN 0-07-035958-X.
[24] Dong Liu, Yunping Chen, Guang Shen, and Youping Fan. A multi-
agent based approach for modeling and simulation of bulk power sys-
tem restoration. 2005 IEEE/PES Transmission & Distribution Confer-
ence & Exposition: Asia and Pacific, 2005.
[25] Dong Liu, Yunping Chen, Rongxiang Yuan, and Guang Shen. Back-
tracking based algorithm in hierarchical time-extended petri net model
for power system restoration. In 2005 IPEC The 7th International
Power Engineering Conference, Singapore, 2005.
[26] Qiang Liu, Libao Shi, Ming Zhou, Gengyin Li, and Yixin Ni. A new
solution to generators start-up sequence during power system restora-
tion. In 2008 Third International Conference on Electric Utility Dereg-
ulation and Restructuring and Power Technologies, pages 2845–2849,
Nanjing, China, 2008.
[27] Yan Liu and Xueping Gu. Reconfiguration of network skeleton based
on discrete particle-swarm optimization for black-start restoration. In
108 References
[28] Per Lund. The danish cell project - part 1: Background and general
approach. In 2007 IEEE Power Engineering Society General Meeting,
Tampa, Florida, USA, 2007.
[32] T.J. Overbye and J.D. Weber. Visualization of power system data. In
Proceedings of the 33rd Annual Hawaii International Conference on
System Sciences, 2000., volume vol.1, 2000.
[34] Gabriel Robins and Alexander Zelikovsky. Tighter bounds for graph
steiner tree approximation. SIAM Journal on Discrete Mathematics,
19:122–134, 2005.
[40] Kojima Y., Warashina S., Nakamura S., and Matsumoto K. Develop-
ment of a guidance method for power system restoration. IEEE Trans-
actions on Power Systems, 4(3):1219–1227, 1989.
110 References
Appendix A
Implementation
The first prototype of the system was developed in Matlab1 and used PSAT2
for power flow calculations. This was to slow and limited, it needed ca 30
minutes to find a restoration sequence.
Therefore the system was rewritten in C++3 . It worked well but lacked a
proper user interface and it was inconvenient to write simple scripting tasks
in C++.
This was solved by writing a Python4 program that encapsulates the com-
putation core that remains in C++.
The connection between the parts in C++ and Python is created by SWIG.
SWIG is an acronym for Simplified Wrapper Interface Generator and is a
program for generating interface code between code written in C/C++ and a
dynamic language such as Python5 . An overview of the software implemen-
tation can be seen in Figure A.1
1
See http://www.mathworks.com, 20 May 2009, the website of Mathworks, the company
that sells Matlab.
2
See F. Milano An Open Source Power System Analysis Toolbox, IEEE Trans.
on Power Systems, Vol. 20, No. 3, August 2005, pp. 1199-1206. and
http://www.power.uwaterloo.ca/ fmilano/psat.htm, 20 May 2009. The PSAT website of
PSAT’s creator Dr. Federico Milano.
3
GCC is used to compile the C++ code see http://gcc.gnu.org/, 20 May 2009, the GNU
Compiler Collection (GCC) website.
4
Python is a high-level, general purpose, interactive and object oriented language with a
large standard library. More info on: http://www.python.org/, 20 May 2009
5
See http://www.swig.org/, 20 May 2009, The SWIG website.
111
112 Appendix A. Implementation
• Functions to load and save power system models including the state of
the system.
• The topology calculation that deduces the islands and nodes to cal-
culate power flow for from the system topology and the status of the
switches.
• The power flow solver. This is a Newton Raphson solver that uses the
library Sparse 1.46 to solve the sparse linear equation systems of each
iteration, see section 3.1.
The power system model file, the model parameter file and the search
parameter file are python programs that are run by the main program in order
to set up the power system model and the parameters. Appendix B contains
the power system model file for the variant of NORDIC32 that is used in this
thesis.
The program can be used in two modes, by the web interface and by the
scripting interface. The web interface is used for testing restorations interac-
tively. A screenshot of the web interface can be seen in Figure A.2.
The scripting interface is used by the example script that generates the
data for the figures in chapter 7.
The batch system also uses the scripting interface.
6
See http://sparse.sourceforge.net, 20 May 2009. The website of the Sparse linear algebra
library.
7
See http://charles.karney.info/random/, 20 May 2009. The website for RandomLib
113
Figure A.2: A screenshot of the web interface. The plot shows the maximum
voltage angle difference during a restoration sequence.
The batch system is a set of Python scripts that are used to run large num-
bers of restoration simulations with variations in the parameters on a com-
puter cluster. It is used to generate the results in chapter 8 and 9.
Appendix B
Net data
115
116 Appendix B. Net data
for these .
51 Busbars(n,d,Vn=400,
52 Names=["CT11B","CT71","CT11A","CT21","CT22B","CT12A","CT12B","
CT72A","CT72B","CT22A","CT31","CT32A","FT44B","CT32B","FT41A",
"FT41B","FT42","FT44A","FT43B","FT43A","FT45","FT47A","FT61","
FT50A","FT50B","FT47B","FT62","FT63A","FT63B","FT51"])
53
54 Busbars(n,d,Vn=220, Names=["CT231","AT241"])
55
56 Busbars(n,d,Vn=130,Names=["AT111","CT111","AT121","CT112","AT131","
CT122","RT132B","FT142A","RT132A","FT142B","RT131B","RT131A","
RT133","FT150A","FT150B"])
57
58 #Declare the substation names and one node in each.
59 #The program finds the rest of the nodes by following all
60 #switches .
61 Substations (n, d, [
62 ("AT111_swy","AT111" ),
63 ("CT111_swy","CT111" ),
64 ("AT121_swy","AT121" ),
65 ("CT112_swy","CT112" ),
66 ("AT131_swy","AT131" ),
67 ("CT122_swy","CT122" ),
68 ("CT231_swy","CT231" ),
69 ("AT241_swy","AT241" ),
70 ("CT71_swy" ,"CT71" ) ,
71 ("CT11_swy" ,"CT11A" ),
72 ("CT21_swy" ,"CT21" ) ,
73 ("CT12_swy" ,"CT12A" ),
74 ("CT72_swy" ,"CT72A" ),
75 ("CT22_swy" ,"CT22A" ),
76 ("CT31_swy" ,"CT31" ) ,
77 ("CT32_swy" ,"CT32A" ),
78 ("FT41_swy" ,"FT41A" ),
79 ("FT42_swy" ,"FT42" ) ,
80 ("FT44_swy" ,"FT44A" ),
81 ("FT43_swy" ,"FT43A" ),
82 ("FT45_swy" ,"FT45" ) ,
83 ("FT47_swy" ,"FT47A" ),
84 ("FT61_swy" ,"FT61" ) ,
85 ("FT50_swy" ,"FT50A" ),
118 Appendix B. Net data
86 ("FT62_swy" ,"FT62" ) ,
87 ("FT63_swy" ,"FT63A" ),
88 ("FT51_swy" ,"FT51" ) ,
89 ("FT142_swy","FT142A"),
90 ("RT132_swy","RT132A"),
91 ("RT131_swy","RT131A"),
92 ("RT133_swy","RT133" ),
93 ("FT150_swy","FT150A")])
94
95 #Loads(net, defaults , load_point , Busbar,P , Q , step_size_p ) ;
96 #Each row generates as many loads as necessary so
97 #that P of each load will not be bigger than step_size_p .
98 #P and Q are distributed even between the loads generated on one row.
99 Loads(n, d, "AT111−T" , "AT111" , 1.0 , 0.4 , 0.2 ) ;
100 Loads(n, d, "CT111−T" , "CT111" , 2.0 , 0.8 , 0.2 ) ;
101 Loads(n, d, "CT112−T" , "CT112" , 3.0 , 1.0 , 0.2 ) ;
102 Loads(n, d, "CT122−T" , "CT122" , 2.8 , 0.95, 0.4 ) ;
103 Loads(n, d, "FT142−T1", "FT142A", 4.0 , 1.5 , 0.4 ) ;
104 Loads(n, d, "FT142−T2", "FT142B", 4.0 , 1.5 , 0.3 ) ;
105 Loads(n, d, "FT150−T1", "FT150A", 1.5 , 0.5 , 0.5 ) ;
106 Loads(n, d, "FT150−T2", "FT150B", 5.5 , 2.0 , 0.3 ) ;
107 Loads(n, d, "RT131−T1", "RT131A", 1.725, 0.03, 0.2 ) ;
108 Loads(n, d, "RT131−T2", "RT131B", 0.575, 0.01, 0.2 ) ;
109 Loads(n, d, "RT132−T1", "RT132A", 1.5 , 0.4 , 0.3 ) ;
110 Loads(n, d, "RT132−T2", "RT132B", 1.5 , 0.4 , 0.3 ) ;
111 Loads(n, d, "RT133−T" , "RT133" , 6.0 , 0.2 , 0.3 ) ;
112 Loads(n, d, "CT231−T" , "CT231" , 1.0 , 0.3 , 0.2 ) ;
113 Loads(n, d, "AT241−T" , "AT241" , 2.0 , 0.5 , 0.2 ) ;
114 Loads(n, d, "CT71−T" , "CT71" , 3.0 , 1.0 , 0.6 ) ;
115 Loads(n, d, "CT72−T1" , "CT72A" , 10.0 , 2.5 , 0.4 ) ;
116 Loads(n, d, "CT72−T2" , "CT72B" , 10.0 , 2.5 , 0.4 ) ;
117 Loads(n, d, "FT41A−T1", "FT41A" , 2.85 , 0.9 , 0.5 ) ;
118 Loads(n, d, "FT41−T2" , "FT41B" , 2.55 , 0.7 , 0.3 ) ;
119 Loads(n, d, "FT43−T1" , "FT43A" , 4.75 , 1.11, 0.3 ) ;
120 Loads(n, d, "FT43−T2" , "FT43B" , 4.25 , 1.92, 0.3 ) ;
121 Loads(n, d, "FT44−T1" , "FT44A" , 0.75 , 0.4 , 0.3 ) ;
122 Loads(n, d, "FT44−T2" , "FT44B" , 3.25 , 1.1 , 0.3 ) ;
123 Loads(n, d, "FT45−T" , "FT45" , 7.0 , 2.5 , 0.4 ) ;
124 Loads(n, d, "FT47−T1" , "FT47A" , 0.75 , 0.375,0.3 ) ;
125 Loads(n, d, "FT47−T2" , "FT47B" , 0.25 , 0.125,0.1 ) ;
126 Loads(n, d, "FT51−T" , "FT51" , 8.0 , 3.0 , 0.4 ) ;
119
1.75,−0.4 )
151 Generation_unit (n, d, "hydro" , "CT71−G" , "CT71" , 4.75, 0.0, 2.5
,−1.0 )
152 Generation_unit (n, d, "hydro" , "CT72−G1" , "CT72A" , 13.5, 0.0, 3.0
,−3.0 )
153 Generation_unit (n, d, "hydro" , "CT72−G2" , "CT72B" , 13.5, 0.0, 3.0
,−3.0 )
154 Generation_unit (n, d, "hydro" , "CT72−G3" , "CT72A" , 7.15, 0.0, 2.0
,−1.5 )
155 Generation_unit (n, d, "hydro" , "CT72−G4" , "CT72B" , 7.15, 0.0, 2.0
,−1.5 )
156 Generation_unit (n, d, "thermal" , "FT41−G" , "FT41A" , 0.0 , 0.0, 3.0
,−2.0 )
157 Generation_unit (n, d, "thermal" , "FT44−G1" , "FT44B" , 6.3 , 1.8, 3.5 ,
0.0 )
158 Generation_unit (n, d, "thermal" , "FT44−G2" , "FT44A" , 1.8 , 0.6, 1.0 ,
0.0 )
159 Generation_unit (n, d, "thermal" , "FT47−G1" , "FT47A" , 5.4 , 1.0, 3.0 ,
0.0 )
160 Generation_unit (n, d, "thermal" , "FT47−G2" , "FT47B" , 5.4 , 1.0, 3.0 ,
0.0 )
161 Generation_unit (n, d, "thermal" , "FT51−G1" , "FT51" , 6.3 , 1.5, 3.5 ,
0.0 )
162 Generation_unit (n, d, "thermal" , "FT51−G2" , "FT51" , 6.3 , 1.5, 3.5 ,
0.0 )
163 Generation_unit (n, d, "thermal" , "FT61−G" , "FT61" , 1.8 , 0.6, 1.0 ,
0.0 )
164 Generation_unit (n, d, "thermal" , "FT62−G1" , "FT62" , 5.4 , 1.5, 3.0 ,
0.0 )
165 Generation_unit (n, d, "thermal" , "FT62−G2" , "FT62" , 1.8 , 0.6, 1.0 ,
0.0 )
166 Generation_unit (n, d, "thermal" , "FT62−G3" , "FT62" , 1.8 , 0.6, 1.0 ,
0.0 )
167 Generation_unit (n, d, "thermal" , "FT63−G1" , "FT63A" , 5.4 , 1.5, 3.0 ,
0.0 )
168 Generation_unit (n, d, "thermal" , "FT63−G2" , "FT63A" , 5.4 , 1.5, 3.0 ,
0.0 )
169 #Define a black start unit in the South
170 # represents an aggregation of Gas turbines and hydro power in Scania and
Zealand
171 #that has black start capability , not part of the original Nordic 32
121
model.
172 #Give some modified defaults .
173 d_black_start = copy.deepcopy(d)
174 d_black_start . Generation_Pset =1.5/(5.4+1.5) #To get 50 Hz at 0 MW
175 d_black_start . Generation_dP_per_df_thermal=−4.0/7.0
176 Generation_unit (n, d_black_start , "thermal" , "FT63−G11", "FT63A",
5.4,−1.5, 3.0,−3.0 )
177
178 #Shunt_reactance( net , defaults , Name, bus, Qnom)
179 Shunt_reactance (n, d, "CT122−EK", "CT122" , 0.5)
180 Shunt_reactance (n, d, "FT142−EK", "FT142A", 2.0)
181 Shunt_reactance (n, d, "FT150−EK", "FT150A", 2.0)
182 Shunt_reactance (n, d, "RT131−EK", "RT131B", 1.0)
183 Shunt_reactance (n, d, "RT133−EK", "RT133" , 0.7)
184 Shunt_reactance (n, d, "CT11−X1" , "CT11A" ,−1.0)
185 Shunt_reactance (n, d, "CT11−X2" , "CT11B" ,−1.0)
186 Shunt_reactance (n, d, "CT11−X3" , "CT11A" ,−1.0)
187 Shunt_reactance (n, d, "CT11−X4" , "CT11B" ,−1.0)
188 Shunt_reactance (n, d, "CT12−X1" , "CT12A" ,−1.0)
189 Shunt_reactance (n, d, "CT12−X2" , "CT12B" ,−1.0)
190 Shunt_reactance (n, d, "CT12−X3" , "CT12A" ,−1.0)
191 Shunt_reactance (n, d, "CT12−X4" , "CT12B" ,−1.0)
192 Shunt_reactance (n, d, "CT21−X1" , "CT21" ,−1.5)
193 Shunt_reactance (n, d, "CT21−X2" , "CT21" ,−1.0)
194 Shunt_reactance (n, d, "CT22−X1" , "CT22A" ,−1.0)
195 Shunt_reactance (n, d, "CT22−X2" , "CT22B" ,−1.0)
196 Shunt_reactance (n, d, "CT31−X1" , "CT31" ,−1.5)
197 Shunt_reactance (n, d, "CT31−X2" , "CT31" ,−1.0)
198 Shunt_reactance (n, d, "CT31−X3" , "CT31" ,−1.0)
199 Shunt_reactance (n, d, "CT32−X1" , "CT32A" ,−1.5)
200 Shunt_reactance (n, d, "CT32−X2" , "CT32B" ,−1.0)
201 Shunt_reactance (n, d, "CT32−X3" , "CT32A" ,−1.0)
202 Shunt_reactance (n, d, "CT71−EK" , "CT71" , 4.0)
203 Shunt_reactance (n, d, "CT71−X1" , "CT71" ,−1.5)
204 Shunt_reactance (n, d, "CT71−X2" , "CT71" ,−1.5)
205 Shunt_reactance (n, d, "CT72−X1" , "CT72A" ,−1.5)
206 Shunt_reactance (n, d, "CT72−X2" , "CT72A" ,−1.0)
207 Shunt_reactance (n, d, "FT41−EK" , "FT41B" , 2.0)
208 Shunt_reactance (n, d, "FT41−X" , "FT41B" ,−1.0)
209 Shunt_reactance (n, d, "FT42−X1" , "FT42" ,−1.0)
210 Shunt_reactance (n, d, "FT42−X2" , "FT42" ,−1.0)
122 Appendix B. Net data