You are on page 1of 41

UNIVERSITY OF NAIROBI.

FACULTY OF ARCHITECTURE AND ENGINEERING.


DEPARTMENT OF ELECTRICAL AND INFORMATION
ENGINERRING.

PROJECT TITLE: OPTIMAL POWER FLOW.


PROJECT INDEX: 129.
NAME: KAMANDE ROSEMARY WANJIKU.
ADM NO.: F17/35946/2010.
SUPERVISOR: PROF. MANGOLI.
EXAMINER: DR. C. WEKESA.

Project report submitted in partial fulfillment of the requirement for the award
of the Degree of Bachelor of Science in Electrical and Information
Engineering of the University of Nairobi.
DATE OF SUBMISSION: 24TH APRIL 2015.

1
DECLARATION OF ORIGINALITY
1) I understand what plagiarism is and I am aware of the university policy in this regard.
2) I declare that this final year project report is my original work and has not been submitted elsewhere
for examination, award of a degree or publication. Where other peoples work or my own work has been
used, this has properly been acknowledged and referenced in accordance with the University of
Nairobis requirements.
3) I have not sought or used the services of any professional agencies to produce this work
4) I have not allowed, and shall not allow anyone to copy my work with the intention of passing it off as
his/her own work.
5) I understand that any false claim in respect of this work shall result in disciplinary action, in
accordance with University anti-plagiarism policy.

Signature:

Date:

2
DEDICATION.
I dedicate this project to my adorable, loving, zealous mentor, my mother, my sisters Florence and Joan
and brother Michael.

Thank you for your unwavering love and support.

3
ACKNOWLEDGEMENT.
I would like to acknowledge the department of Electrical and Information Engineering for entrusting me
with this project. I thank my supervisor, Prof. Mangoli for guiding me throughout this endeavour. His
insightful guidance cannot go unmentioned.
I would also like to thank my family for their hard work and dedication in ensuring that I have the
chance to pursue this degree.
I would also like to thank my friends and fellow classmates who believed in me and encouraged me to
always push on.
Last but not least, I would like to thank God for the gift of life, health and all the blessings that have
enabled me to come this far and to finish this project.

4
TABLE OF CONTENTS.

DECLARATION OF ORIGINALITY........................................................................................................3
LIST OF FIGURES......................................................................................................................................7
LIST OF TABLES.......................................................................................................................................8
ABSTRACT.................................................................................................................................................9

CHAPTER 1...............................................................................................................................................10
1. INTRODUCTION..................................................................................................................................10
1.2 PROBLEM STATEMENT..................................................................................................................11
1.3 OBJECTIVES......................................................................................................................................11
1.3.2 SPECIFIC OBJECTIVES.................................................................................................................11
1.4 PROJECT JUSTIFICATION...............................................................................................................12
1.5 PROJECT SCOPE................................................................................................................................12
1.6 REPORT ORGANIZATION...............................................................................................................12
.
CHAPTER 2..............................................................................................................................................13
2. LITERATURE REVIEW..................................................................................................................... 13
2.2 OPTIMAL POWER FLOW FORMULATION..13
2.3 CONTROLS14
2.4 CONSTRAINTS..15
2.5 LOAD FLOW.. ...........................................................................................................................16
2.5.1 LOAD FLOW FORMULATION.....................................................................................................17
2.6 POWER FLOW...............................................................................................................................18
2.6.1 CONSTRAINTS...19
2.6.1.2 GENERATOR AND LOAD CONSTRAINTS..19
2.6.1.3 VOLTAGE MAGNITUDE CONSTRAINTS...19
2.6.1.4 LINE FLOW THERMAL CONSTRAINTS.... 20
2.6.1.5 LINE FLOW CONSTRAINTS AS CURRENT LIMITATIONS.20
2.6.1.6 LINE FLOW CONSTRAINTS AS VOLTAGE ANGLE.21

5
CHAPTER 3..22
3. METHODOLOGY....22
3.1INTRODUCTION22
3.1.1 OPF PROBLEM ..22
3.1.2 OPF OBJECTIVE FOR FUEL COST MINIMISATION23
3.1.2.1 CONSTRAINTS....24
3.1.3OPF OBJECTIVE FUNCTION FOR POWER LOSS INIMISATION....25
3.1.3.1CONSTRAINTS.....25
3.1.4 OBJECTIVES ......26
3.1.5 OPF CHALLENGES....28
3.2. METHODOLOGIES..28
3.2.1 CONVENTIONAL METHODS..28
3.2.2 INTELLIGENT METHOD..29
3.3 NEWTON METHOD......30
3.3.1 SOLUTION ALGORITHM.........30
3.3.1.2 MERITS AND DEMERITS..........31

CHAPTER 4..33
4.1RESULTS AND ANALYSIS..33

CHAPTER 5.
5.1 CONCLUSION....36
5.2 RECOMMENDATIONS.36

CHAPTER 6.
6.1REFERENCES.39

DESIGN AND IMPLEMENTATION.

APPENDIX...38

6
LIST OF FIGURES
Figure 1:IEEE 14 bus system........................................................................................ 24

7
LIST OF TABLES
Table 2.1: Definitions of power flow formulae........................................................................................ 5
Table 4.1: Load flow characteristics....................................................................................................... 37
Table 4.2: Optimised bus Data................................................................................................................ 38
Table 4.3: Losses .....41

8
ABSTRACT.
The document describes the implementation of a methodology to solve the problem Optimal Power Flow.
The project provides a completely analytic model solution of large distribution systems, one which
automatically changes certain control variables to find a steady state operation point where the objective
minimizes generation cost, loss, load ability etc. while maintaining an acceptable system performance in
terms of limits on generators real and reactive powers, line flow limits etc.

9
CHAPTER 1.

INTRODUCTION.
Electrical power industry in the entire world has undergone a marginable and considerable overhaul in
the past years and will do so in many years to come. This is due to increased demand for power and
major developments in technology that require power to run. The reliable and secure operation of
electrical infrastructure, responsible for providing electricity for the most essential services and
commodities of modern society, is of utmost importance in the operation and development of todays
electrified world. An electrical power system shall be not only secure and reliable, but economically
optimal and efficient, meaning that electricity shall be provided minimizing generation costs and
transmission losses, and in general, meeting several economic, operational, or environmental objectives
and constraints. Two major concepts are central to the adequate and secure operation of an electrical
power system: reliability and security. Reliability is referred to as the probability of the power system to
maintain successful and satisfactory operation in the long term.

In the previous years, the electric power industry has been either a government-controlled or a
government - regulated Industry which existed as a monopoly. Businesses, people and industries were
required or recommended to purchase their power from the local monopolistic power company and in
this case Kenya Power and Lighting Company fits.. This was a physical engineering and legal
requirement. It just did not appear feasible to duplicate and to connect everyone to the power grid.
Various countries have started the bold journey of free market production and supply of electric power
industries and businesses now. This has introduced new opportunity for competition to reduce the cost.
Faced by increasingly complicated existence, power utilities need efficient tools and aids to ensure that
power of high quality is produced, transmitted and distributed at a lower cost thus the need for power
flow problem. Classical optimizations solve optimal power flow problems by minimization of an
objective function representing the total generation cost or transmission loss.

10
PROBLEM STATEMENT.
To study the Kenya Power systems and see the effects of proposed power upgrades i.e. negative or
positive outcome.

OBJECTIVES.
The main objective of an OPF is to reduce the costs of meeting the load demand for a power system
while up keeping the security of the system. From the viewpoint of an Optimal Power Flow, the
maintenance of system security requires keeping each device in the power system within its desired
operation range at steady-state. This will include maximum and minimum outputs for generators,
maximum MVA flows on transmission lines and transformers, as well as keeping system bus voltages
within specified ranges.

The secondary goal of an OPF is the determination of system marginal cost data. This marginal cost data
can aid in the pricing of MW transactions as well as the pricing auxiliary services

SPECIFIC OBJETIVES.
1. Economic dispatch (minimum cost, losses, MW generation or transmission losses).

2. Environmental dispatch.

3. Maximum power transfer .

4. Minimum deviation from a target schedule.

5. Minimum control shifts to alleviate violations.

6. Least absolute shift approximation of control shift.

7. Maximize system performance.

8. Minimize load shedding.

9. AVR settings within the specified limits.

10. Determine control setting

11
PROJECT JUSTIFICATION.
As earlier explained in the introduction, increased demand for power and major developments in
technology require power to run and the electric power industry has been either a government-controlled
or a government-regulated Industry which existed as a monopoly. Introduction of a free market
production and supply of electric power industries and businesses creates an increase of power into the
system and this needs to be accounted for in terms of total power production, consumption ,cost and
losses in order to give the consumer the best option. Hence a MATLAB Code will be used to optimize
OPF. MATLAB is a multi-paradigm numerical computing environment and fourth-generation
programming language. MATLAB is being used as an implementation tool in that it allows matrix
manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces,
and interfacing with programs written in other languages, including C, C++, Java, and Fortran.
Furthermore, MATLAB offers the platform to study dynamic systems in real-time.

PROJECT SCOPE.
This project will entail the following:
To write and run a code that describes optimal power flow.
To optimize power flow
To draw results that will describe the fulfillment of the main objective.

REPORT ORGANISATION.
The report will be organized into the following chapters:
Chapter 2 will give the literature review.
Chapter 3 will discuss the project methodology.
Chapter 4 will discuss the results of the project.
Chapter 5 will discuss address some recommendations and come up with a conclusion.

12
CHAPTER 2.
2.1 LITERATURE REVIEW.

Optimal Power Flow, OPF, is a set of computations to solve the power flow in a way that one or several
objectives are optimized. The OPF, given an initial state of the system, and a set of constraints,
determines the best possible values for the control variables that simultaneously fulfill the constraints
and optimize the objective function. Both the formulation and interpretation of the results of the OPF
differ from the traditional general purpose optimization problems. The particularities of the power flow
problem shall be accounted for and caution exerted when formulating the OPF and when analyzing the
results, including the feasibility of the formulation, as pointed out by:

The OPF must reflect and account for the characteristics of the power flow problem. The first
and most important step is the formulation of the problem. Special caution is necessary in order
to avoid poorly formulated problems, resulting from inadequate selection of controls to achieve a
particular objective function.
The OPF should include the mechanisms to deal with non-feasible solutions, instead of just
declaring a solution as non-feasible and aborting the execution.

The classical formulation and solution methods of the OPF requires that the target function be convex.
The nature of the OPF and the different methods used to solve it are beyond the scope of this report.
Power conventional flow has been the analysis tool routinely executed in control centers to assess the
system steady state operating condition. The ideology of optimal power flow, has gained great attention
since its application to power systems analysis. From systems planning viewpoint the OPF model
solution provides the optimal settings for the variables of a power network. From the power system
operation and control viewpoints, an OPF solution gives an answer to adjust. The optimal power flow
algorithms solve a nonlinear problem of the following form:

2.2 OPF FORMULATION.


The classic formulation of the OPF using the compact notation introduced is as follows:

13
Optimize f(x, u) (2.1)

Subject to:
G (x, u) = 0 (2.2)
H (x, u) < 0 (2.3)
umin _ u < umax (2.4)
The variables can be defined as shown in the below table

[u] vector of control independent variables


[x] vector of states dependent variables
[f(x, u)] Objective function. Function to be optimized
(minimized or maximized)
[g(x, u)] equality constraints, vector of power flow
equations
[h(x, u)] Inequality constraints, vector of systems inequalities.
Plant and transmission systems
operating limits.
max< lower and upper limits of the controls
TABLE 2.1: Definitions of the power flow formulation.

2.3 Controls.
Control parameters in OPF correspond to the variables that are specified and depend on the type of bus.
They can be voltage magnitudes in PU buses, transformer tap ratios, dispatchable real power, etc. The
most important step in OPF is the formulation where the objective functions are matched with
appropriate control variables. The classical target function of cost minimization is associated to the
generators active power production, whereas minimization of losses is normally associated with
voltage/VAR scheduling. The list of typical controls for different approaches is summarized as follows :
Active power
Generator MW outputs
phase-shifting taps
MW interchange transactions

14
HVDC link MW transfers
Reactive power
Generator voltages or reactive powers
in-phase transformer taps
shunt reactors and capacitors
Active and reactive power
transformers with varying complex turn ratios
generating unit start-up/shut-down
load reduction or shedding
line switching.

2.4 Constraints.
Equality constraints, correspond to the power flow equations, in AC. These constraints account basically
for the Kirchhoff laws. Inequality constraints, correspond to different limits in the states of the system.
Some typical constraints for different approaches are summarized
Active power
o spinning MW reserves
o area MW interchanges
o branch group MW transfer
o Bus voltage angle separations.
Reactive power
o Bus voltage
o branch VAR flows
o spinning MVAR reserves
o area MVAR interchanges
o Branch-group MVAR transfers.
Active and reactive power
o Branch current and MVA flows
o Branch-group MVA flows.

15
An optimization problem is said to be feasible, if and only if it has a feasibility region associated with it.
This region corresponds to the geometrical space where the controls are free to change while the
solution is kept optimal. Depending on the nature of the problem, the constraints can be soft meaning
they can be relaxed, or hard, meaning they are rigid and must be enforced. Upper and lower limits of
control variables are usually hard, corresponding to physical limitations. When an optimization
problem cannot simultaneously meet all the constraints, it is pronounced as non-feasible. However, as
stated before, an important aspect of the OPF is how it deals with such situations. The OPF solver
should provide the best possible solution without interactive guidance. When the problem is found to
be non-feasible it can be altered and resolved in two alternative ways that can be combined:

1. Modifying OPF controls or constraints


switching in additional controls (freeing previously fixed controls, connecting
extra generators, etc.)
switching operating limits to more expanded values, for instance switching from
long-term to medium term values.
network topology change
load reduction or shedding
2. The objective function is augmented in a way that operating limits causing infeasibility are
minimally affected. Augmentation is done with a series of weighted minimum-deviation functions,
in a similar way as the additional constraints are incorporated in the method developed. It is better to
find a solution where some limits are violated than not finding any solution at all.

2.5 Load Flow.


Load flows are used to ensure that electrical power transfer from generators to consumers through the
grid system is stable, reliable and economic. Conventional techniques for solving the load flow problem
are iterative, using the Newton-Raphson or the Gauss-Seidel methods. However, there has been much
interest in the application of stochastic search methods, such as Genetic Algorithms to solving power
system problems. Distributed alternative energy sources increase in geographically remote locations,
complicates load flow studies and has triggered a resurgence of interest in the topic

16
2.5.1 Load Flow Problem Formulation.
Load flow studies are based on a nodal voltage analysis of a power system. As an example, consider the
very simple system represented by the single-line diagram in

The two generators (1 and 2) are interconnected by one transmission line and are separately connected to
a load (3) by two other lines. If the phasor currents injected into the system are 1, 2, , 3, and the lines are
modelled by simple series admittances, then it is possible to draw the equivalent circuit for one
representative phase of the balanced three-phase system, as shown in Fig. 2. For the circuit, the nodal
voltage equations can be written directly. For example, at node 1:
1 = (12 + 13 )1 12 2 -13 3 . (1)
In general, for a system with r nodes, then at node n we have:
= 1 1 + 2 + + + = =1 (2)

Where:
= Sum of all admittances connected to node n
= sum of all admittances connected between nodes n and k
= current injected at node n
For the complete system of r nodes:
1 11 1 11 1
[ ] =
[ 1 ] [ ] = [I] = [Y]. [V] . (3)
1

where [Y] is the nodal admittance matrix. Formulation of the load flow problem is most conveniently
carried out with the terms in the nodal admittance matrix in polar notation:
= | | < .... (4)

Conventional circuit analysis proceeds directly from equation (3) by inverting the nodal Admittance
matrix and hence solving for the nodal voltages [V]. The load flow problem however, is complicated by
the lack of uniformity in the data about electrical conditions at the nodes. There are three distinct types
of nodal data, which relate to the physical nature of the power system:

17
a) Load nodes, (P-Q), where complex power = +j taken from or injected into the system
is defined. Such nodes may also include links to other systems. At these load nodes, the voltage
magnitude | | and phase angle must be calculated.

b) Generator nodes, (P-V), where the injected power, and the magnitude of the nodal voltage
are specified. These constraints reflect the generators operating characteristics, in which
power is controlled by the governor and terminal voltage is controlled by the automatic voltage
regulator. At the generator nodes the voltage phase angle n must be calculated.

c) Slack bus (swing bus) where the nodal voltage magnitude | | and phase angle are specified.
This node acts as the reference node and is commonly chosen to have a phase angle = 0 .
The power and reactive power delivered at this node are not specified.

In the system configuration of Fig. 1, each type of node is represented with node 1 being floating bus,
node 2 being a generator node and node 3 being a load node. Consequently values must be specified for
the power (2 ) injected at node 2, and the power (3 ) and reactive power (3 ) injected at node 3.
Negative values indicate that power or reactive power is being drawn from the system. The magnitude
of the voltage at node 1 can be specified, with the default value being 1.0 p.u, while the phase angle is
fixed at 0 . (= 1.0<0 ). At the generator node the voltage magnitude can be set by the user and the
phase angle 2 is calculated during the load flow solution. At the load node (node 3) the voltage
magnitude and phase angle have to be calculated.

2.6 Power Flow Equation.


Kirchhoffs current law requires that the sum of the currents injected and withdrawn at bus n equal zero:
= . (5)
If we define current to ground to be ( - ) and = 0
we have:
= ( - ) + ...(6)
= ( - ) = ( - ) - ( - ) +j ( ( - ) + ( -
)) (7)
= ( - ) ( - ) ..(8)

18
= ( - ) + ( - )) ... (9)

Current being a linear function of voltage we get the following equation after rearranging,
= + .. (10)
In matrix notation, the IV flow equations in terms of current (I) and voltage (V) in
are:
I = YV = (G + jB)( + j ) = G B + j(B +G ) ..(11)
Where = G B and = B +G
In another matrix format
I = = ( ) (12)

I = = ( ) ( ) .. (13)


Where Y = ( )

The I =YV equations are linear. If not, the linearity is lost since some elements of the Y matrix will be
functions of V. The traditional powervoltage power flow equations defined in terms of real power (P),
reactive power (Q) and voltage (V) are
S = P + jQ = .. (14)
The powervoltage power flow equations are quadratic. The IV flow equations are linear.

2.6.1 Constraints.
First, we introduce the physical constraints of generators, load, and transmission.

2.6.1.2 Generator and Load Constraints.


The lower and upper bound constraints for generation (injection) and load (withdrawal) are:
P ................................................................................................................... (15)
Q ..(16)
Inequalities along with other thermal constraints on equipment enforced at each generator bus constitute
a fourdimensional reactive capability curve, also known as a Dcurve since it is shaped like the

19
capital letter D, in the PQ space. Additional Dcurves defining the tradeoff between real and reactive
power constitute a convex set and can be easily linearized.

2.6.1.3 Voltage Magnitude Constraints.


The two constraints that limit the voltage magnitude in rectangular coordinates at each bus m are
( 2 ) + ( 2 ) ( 2 ) (17)

Again, each nonlinear inequality involves only the voltage magnitudes at bus m. In matrix terms, the
voltage magnitude constraints are:
+ 2 .. (18)
2 + .. (19)
and are determined by system studies. High voltages are often constrained by the capabilities
of the circuit breakers. Low voltage magnitude constraints can be due to operating requirements of
motors or generators.

2.6.1.4 Line Flow Thermal Constraints.


is a thermal transmission limit on k based on the temperature sensitivity of the conductor and
supporting material in the transmission line and transmission elements. Transmission assets generally
have three thermal ratings: steadystate, 4hour and 30minute. These ratings vary with ambient weather.
The apparent power at bus n on transmission element k to bus m is:
= ... (20)
In matrix notation,

Re ( ) = ( ) ( ) .. (21)


Im ( ) = ( ) ( ) ..... (22)

2.6.1.5 Line Flow Constraints as Current Limitations.


As current increases, lines sag and equipment may be damaged by overheating. The constraints that
limit the current magnitude in rectangular coordinates at each bus n on k are:
2
( ).2 + ( ).2

20
Again, the nonlinearities are convex quadratic and isolated to the complex current at the bus. Generally,
the maximum currents, are determined by material science properties of conductors and
transmission equipment, or as a result of system stability studies.

2.6.1.6 Line Flow Constraints as Voltage Angle Constraints.


The power flowing over an AC line is approximately proportional to the sine of the voltage phase angle
difference at the receiving and transmitting ends. The theoretical steadystate stability limit for power
transfer between two buses across a lossless line is 90 degrees. If this limit were exceeded, synchronous
machines at one end of the line would lose synchronism with the other end of the line. In addition,
transient stability and relay limits on reclosing lines constrain voltage angle differences. The angle
constraints used should be the
smallest of these angle constraints, which depend on the equipment installed and configuration.
However, many test cases do not include any voltage angle or line flow constraints. In general, system
engineers design and operate the system comfortably below the voltage angle limit to allow time to
respond if the voltage angle difference across any line approaches its limit

21
CHAPTER 3

3.1 Methodology.

Introduction.

The following chapter covers existing methodologies for solution of Optimal Power Flow (OPF)
problem. They include formulation of OPF problem, objective function, constraints, applications and in-
depth coverage of various popular OPF methods. The OPF methods are broadly grouped as
Conventional and Intelligent. Conventional methodologies include techniques like Gradient method,
Newton method, Quadratic Programming method, Linear Programming method and Interior point
method. Intelligent methodologies include the methods like Genetic Algorithm, Particle swarm
optimization. Solution methodologies for optimum power flow problem are extensively covered in this
chapter.

3.1.1 OPTIMAL POWER FLOW PROBLEM


In OPF, the values of some or all of the control variables need to be found so as to optimise (minimise or
maximize) a predefined objective. It is important that the proper problem definition with clearly stated
objectives be given at the onset. The quality of the solution depends on the accuracy of the model
studied. Objectives must be modeled and its practicality with possible solutions. Objective function
takes various forms such as fuel cost, transmission losses and reactive source allocation. Usually the
objective function of interest is the minimisation of total production cost of scheduled generating units.
This is most used as it reflects current economic dispatch practice and importantly cost related aspect is
always ranked high among operational requirements in Power Systems. OPF aims to optimise a certain
objective, subject to the network power flow equations and system and equipment operating limits. The
optimal condition is attained by adjusting the available controls to minimise an objective function
subject to specified operating and security requirements.
Some well-known objectives can be identified as below:
Active power objectives
Economic dispatch (minimum cost, losses, MW generation or transmission losses)
Environmental dispatch

22
Reactive power objectives.
MW and MVAr loss minimization
Minimum deviation from a target schedule
Minimum control shifts to alleviate Violations
Least absolute shift approximation of control shift

Among the above the following objectives are most commonly used:
Fuel or active power cost optimization.
Active power loss minimization.
VAr planning to minimise the cost of reactive power support
The mathematical description of the OPF problem is presented below:

3.1.2 OPF Objective Function for Fuel Cost Minimization


The OPF problem can be formulated as an optimization problem and is as follows: Total Generation cost
function is expressed as:
The objective function is expressed as:
2
( ) =
=1 ( + + ) .(23)

Min F ( ) = f (x ,u ) (24)

Satisfaction of nonlinear Equality Constraints:


G(x ,u) = 0 ..(25)
Nonlinear Inequality Constraints:
H(x,u) =0 ....(26)
f(x, u) is the scalar objective, g(x, u) represents nonlinear equality constraints (power flow equations),
and h(x, u) is the nonlinear inequality constraint of vector arguments x, u. The vector x contains
dependent variables consisting of:
Bus voltage magnitudes and phase angles
MVAr output of generators designated for bus voltage control
Fixed parameters such as the reference bus angle

23
Non controlled generator MW and MVAr outputs
Non controlled MW and MVAr loads
Fixed bus voltages, line parameters
Real and The vector u consists of control variables including:
Reactive power generation
Phase shifter angles
Net interchange
Load MW and MVAr (load shedding)
DC transmission line flows
Control voltage settings
LTC transformer tap settings

The equality and inequality constraints are:

Limits on all control variables


Power flow equations
Generation / load balance
Branch flow limits (MW, MVAr, MVA)
Bus voltage limits
Active / reactive reserve limits
Generator MVAr limits
Corridor (transmission interface) limits

3.1.2.1 Constraints for Objective Function of Fuel Cost Minimization

Consider Fig 3. representing a standard IEEE 14 Bus single line diagram. 5 Generators are connected to
5 buses. For a given system load, total system generation cost should be minimum. The network equality
constraints are represented by the load flow equations

(V,) - + = 0 (27)

24
(V, ) - + = 0 .. (28)

FIG. 3. Showing a 14 bus system.

And load balance equation


=1 - =1 - = 0. ... (29)

3.1.3 OPF Objective Function for Power Loss Minimization


The objective functions to be minimized are given by the sum of line losses

=
=1 ... (30)

Individual line losses can be expressed in terms of voltages and phase angles as

= ( 2 + 2 -2 cos ( )). (31)


The main objective thus can be written as:

2 2
Min =
=1 ( + -2 cos ( )). . (32)

25
This is a quadratic form and is suitable for implementation using the quadratic interior point method.
The constraints are equivalent to those for cost minimization, with voltage and phase angle expressed in

rectangular form.
The above flow chart summarises the power flow methods to obtain the required results.

3.1.3.1 Constraints for Objective Function of Power Loss Minimization

System quantities that are controllable are generator MW, controlled voltage magnitude, reactive power
injection from reactive power sources and transformer tapping. The objective here is to minimize the
power transmission loss function by optimizing the control variables within their limits. Therefore, no
violation on other quantities (e.g. MVA flow of transmission lines, load bus voltage magnitude,
generator MVAR) occurs in normal system operating conditions. These are system constraints to be
formed as equality and inequality constraints.

3.1.4 Objectives of Optimal Power Flow

26
Commercial OPF programs solve very large and complex power systems optimization problems in a
relatively less time. Different solution methods have been suggested to solve OPF problems. In a
conventional power flow, the values of the control variables are predetermined. In an OPF, the values of
some or all of the control variables need to be known in order to optimize (minimize or maximize) a
predefined objective. The OPF calculation has many applications in power systems, real-time control,
operational planning, and planning. In many modern energy management systems (EMSs) OPF is used.
OPF continues to be significant due to the growth in power system size and complex interconnections
For example, OPF should support deregulation transactions or furnish information on what
reinforcement is required. OPF studies can decide the tradeoffs between reinforcements and control
options as per the results obtained from carrying out OPF studies. It is clarified when a control option
enhances utilization of an existing asset (e.g., generation or transmission), or when a control option is an
inexpensive alternative to installing new facilities. Issues of priority of transmission access and VAr
pricing or auxiliary costing to afford price and purchases can be done by OPF. The main goal of a
generic OPF is to reduce the costs of meeting the load demand for a power system while up keeping the
security of the system. From the viewpoint of an OPF, maintenance of a system security requires
keeping each device in the power system within its desired operation range at steady-state. This includes
maximum and minimum outputs for generators, maximum MVA flows on transmission lines and
transformers, as well as keeping system bus voltages within specified ranges. The secondary goal of an
OPF is the determination of system marginal cost data. This marginal cost data can aid in the pricing of
MW transactions as well as the pricing auxiliary services such as voltage support through MVAR
support. The OPF is capable of performing all of the control functions necessary for the power system.
While the economic dispatch of a power system does control generator MW output, the OPF controls
transformer tap ratios and phase shift angles as well. The OPF also is able to monitor system security
issues including line overloads and low or high voltage problems. If any security problems occur, the
OPF will modify its controls to fix them, i.e., remove a transmission line overload. The quality of the
solution depends on the accuracy of the model used. It is essential to define problem properly with
clearly stated objectives be given at the onset. No two-power system utilities have the same type of
devices and operating requirements. OPF, to a large extent depends on static optimization method for
minimizing a scalar optimization function (e.g., cost). It employs first-order gradient algorithm for
minimization objective function subject to equality and inequality constraints. Solution methods were
not popular as they are computationally intensive than traditional power flow. The next generation OPF

27
has been greater as power systems operation or planning need to know the limit, the cost of power,
incentive for adding units, and building transmission systems a particular load entity.

3.1.5 Optimal Power Flow Challenges.


The thrust for OPF to solve problems of todays deregulated industry and the unsolved problem in the
vertically integrated industry has posed further challenges to OPF to evaluate the capabilities of existing
OPF in terms of its potential and abilities.

OPTIMAL POWER FLOW CHALLENGES.

1. Large number of variety of constraints and non-linearity of mathematical models OPF poses a big
challenge for the mathematicians as well as for engineers in obtaining optimum solutions.

2. The deregulated electricity market seeks answer from OPF, to address a variety of different types of
market participants, data model requirements and real time processing and selection of appropriate
costing for each unbundled service evaluation.

3. To cope up with response time requirements, modeling of externalities (loop flow, environmental and
simultaneous transfers), practicality and sensitivity for on line use.

4. How well the future OPF provides local or global control measures to support the impact of critical
contingencies, which threaten system voltage and angle stability simulated.

5. Future OPF has to address the gamut of operation and planning environment in providing new
generation facilities, unbundled transmission services and other resources allocations.

6. Finally it has to be simple to use and portable and fast enough.

3.2 OPF SOLUTION METHODOLOGIES

The solution methodologies can be broadly grouped in to two namely:


1. Conventional (classical) methods

28
2. Intelligent methods.

3.2.1 Conventional Methods

Traditionally, conventional methods are used to effectively solve OPF. The conventional methods are
based on mathematical programming approaches and used to solve different size of OPF problems. To
meet the requirements of different objective functions, types of application and nature of constraints, the
popular conventional methods is further sub divided into:
a) Gradient Method.
b) Newton Method.
c) Linear Programming Method.
d) Quadratic Programming Method.
e) Interior Point Method.

With excellent advancements been made in classical methods, they suffer the following disadvantages:
In most cases, mathematical formulations have to be simplified to get the solutions because of
the extremely limited capability to solve real-world large-scale power system problems.
They are weak in handling qualitative constraints.
They have poor convergence, may get stuck at local optimum, they can find only a single
optimized solution in a single simulation run, they become too slow if number of variables are
large.
They are computationally expensive for solution of a large system.

3.2.2 Intelligent Methods

To overcome the limitations and deficiencies in analytical methods, Intelligent methods based on
Artificial Intelligence (AI) techniques have been developed in the recent past. These methods can be
classified into:
a) Artificial Neural Networks
b) Genetic Algorithms (GA)
c) Particle Swarm Optimization (PSO)

29
d) Ant Colony Algorithm
The major advantage of the intelligent methods is that they are relatively versatile for handling various
qualitative constraints. These methods can find multiple optimal solutions in single simulation run. So
they are quite suitable in solving multi objective optimization problems. In most cases, they can find the
global optimum solution. The main advantages of intelligent methods is:
Possesses learning ability, fast, appropriate for non-linear modeling.
Its disadvantages are:
Large dimensionality.
Choice of training methodology.
3.3. Newton Method.
Newtons method is well known for solution of Power Flow. It has been the standard solution algorithm
for the power flow problem for the longest time The Newton approach is a flexible formulation that can
be adopted to develop different OPF algorithms suited to the requirements of different applications.
Although the Newton approach exists as a concept entirely apart from any specific method of
implementation, it would not be possible to develop practical OPF programs without employing special
sparsity techniques. The concept and the techniques together comprise the given approach. Other
Newton-based approaches are possible. Newtons method is a very powerful solution algorithm because
of its rapid convergence near the solution. This property is especially useful for power system
applications because an initial guess near the solution is easily attained. System voltages will be near
rated system values, generator outputs can be estimated from historical data, and transformer tap ratios
will be near 1.0 p.u.

3.3.1. Solution Algorithm


The solution for the Optimal Power Flow by Newtons method requires the creation of the Lagrangian
as shown below
L(x) = f (x) + () + ()
A gradient and Hessian of the Lagrangian is then defined as Gradient

() = (()
(
)
)

() is a vector of the first partial derivatives of the Lagrangian. By solving the equation, the solution
for the optimal problem can be obtained. ( ) It may be noted that special attention must be paid to

30
the inequality constraints of this problem. As noted, the Lagrangian only includes those inequalities that
are being enforced. For example, if a bus voltage is within the desired operating range, then there is no
need to activate the inequality constraint associated with that bus voltage. For this Newtons method
formulation, the inequality constraints have to be handled by separating them into two sets: active and
inactive. For efficient algorithms, the determination of those inequality constraints that are active is of
utmost importance. While an inequality constraint is being enforced, the sign of its associated Lagrange
multiplier at solution determines whether continued enforcement of the constraint is necessary.
Essentially the Lagrange multiplier is the negative of the derivative of the function that is being
minimized with respect to the enforced constraint. Therefore, if the multiplier is positive, continued
enforcement will result in a decrease of the function, and enforcement is thus maintained. If it is
negative, then enforcement will result in an increase of the function, and enforcement is thus stopped.

3.3.2 Merits and Demerits of Newton Method

The Merits and Demerits of Newton Method are summarized and given below.
Merits
1) The method has the ability to converge fast.

2) It can handle inequality constraints very well.

3) In this method, binding inequality constraints are to be identified, which helps in fast convergence.

4) For any given set of binding constraints, the process converges to the Kuhn-Tucker conditions in
fewer iterations.

5) The Newton approach is a flexible formulation that can be used to develop different OPF algorithms
to the requirements of different applications.

6) With this method efficient and robust solutions can be obtained for problems of any practical size.

7) Solution time varies approximately in proportion to network size and is relatively independent of the
number of controls or inequality constraints.

31
8) There is no need of user supplied tuning and scaling factors for the optimisation process.

Demerits
1) The penalty near the limit is very small by which the optimal solution will tend to the variable to float
over the limit

2) It is not possible to develop practical OPF programs without employing sparsity techniques.
3) Newton based techniques have a drawback of the convergence characteristics that are sensitive to the
initial conditions and they may even fail to converge due to inappropriate initial conditions.

32
CHAPTER 4.
4.1 Results.
Introduction.
As per the project objectives; to study the Kenya power systems and see the effect of proposed power
upgrades, data was collected from KPLC and used. The table below shows the results after applying
Newton Raphson method for power flow and later optimizing to get the difference. The data will be
used to come up with graphs to analyse the generated losses.

Newton Raphson Load Flow Analysis.


Bus V Angle Injection Generation Load
no. p.u Degree. MW Mvar MW Mvar MW Mvar
1 1.05 0.00 0.00 -26.471 164.00 28.529 164.00 55.00
2 1.05 -7.1857 0.00 -14.335 48.00 -8.355 48.00 6.00
3 1.05 -9.2162 0.00 -3.230 90.00 4.77 90.00 8.00
4 1.05 -8.8666 512.513 -193.166 552.513 191.166 40.00 6.00
5 1.05 -7.2284 32.053 46.698 176.053 101.698 144.00 55.00
6 1.05 -9.0899 -29.873 -61.861 -14.193 -50.661 15.680 11.200
7 1.05 -8.9601 -205.814 771.675 -205.814 771.675 0.000 0.000
8 1.05 -8.9870 0.00 0.103 0.00 -0.13 0.000 0.000
9 1.05 -8.7470 -292.705 109.297 -263.205 110.897 29.500 16.600
10 1.05 -9.2554 0.00 -2.936 9.00 2.864 9.000 5.800
11 1.05 -9.1391 0.000 -1.389 3.50 0.411 8.500 1.800

Table 4.1. The table describes load flow characteristics.

33
For OPF,
Converged in 4.91 seconds
Objective Function Value = 12,864.04 Ksh/hr
=========================================================================
| System Summary |
=========================================================================
How many? How much? P (MW) Q (MVAr)
--------------------- ------------------- ------------- -----------------
Buses 14 Total Gen Capacity 772.4 -149.0 to 234.0
Generators 5 On-line Capacity 772.4 -149.0 to 234.0
Committed Gens 5 Generation (actual) 388.5 112.3
Loads 7 Load 385.1 128.1
Fixed 7 Fixed 385.1 128.1
Dispatchable 0 Dispatchable - 0.0 of -0.0 -0.0
Shunts 0 Shunt (injection) -0.0 0.0
Branches 20 Losses (( 2 ) 3.33 7.34
Transformers 3 Branch Charging (inj) - 23.1
Inter-ties 0 Total Inter-tie Flow 0.0 0.0
Areas 1

Minimum Maximum
------------------------- --------------------------------
Voltage Magnitude 0.993 p.u. @ bus 4 1.060 p.u. @ bus 6
Voltage Angle -4.38 degree @ bus 5 0.00 degree @ bus 1
P Losses ( 2 ) - 0.78 MW @ line 1-5
Q Losses ( 2 ) - 3.32 MVAr @ line 1-2
Lambda P 39.69 Ksh/MWh @ bus 1 41.04 Ksh/MWh @ bus 5
Lambda Q -0.07 Ksh/MWh @ bus 5 0.22 Ksh/MWh @ bus 9

34
Bus Data
Bus no. Voltage Generation Load Lamda (ksh/MVA-
hr)
1 1.022 0000 228.76 43.59 136.00 45.00 39.687 0.001
2 1.009 -3.757 41.37 4.39 28.00 11.80 40.687 -
3 0.995 -4.221 48.06 60.00 64.00 60.00 40.961 0.085
4 0.993 -3.892 - - 0.32 7.10 40.875 0.081
5 1.003 -4.378 - - 117.30 -25.40 41.042 -0.071
6 1.060 -3.549 27.41 18.29 7.50 12.20 40.548 -
7 1.022 -3.996 - - - - 40.871 -0.041
8 1.019 -3.909 42.84 -13.97 32.00 17.40 40.857 -
9 1.018 -3.816 - - - - 40.869 0.217
10 1.042 -3.698 - - - - 40.676 0.049
11 1.057 -3.569 - - - - 40.566 0.008
12 1.060 -3.553 - - - 40.550 -0.002 -
13 1.059 -3.563 - - - - 40.553 -0.006
14 1.043 -3.628 - - - - 40.684 0.124
388.45 112.29 385.12 128.10

Table 4.2. Describes optimized bus data.


Branch Data.
From Bus Injection To Bus Injection Loss
Bus No. From bus To bus P (MW) Q(MVar) P (MW) Q(MVar) P( MW) Q(MVar)

1 1 2 50.71 -0.24 -50.15 -1.89 0.565 3.32


2 1 5 42.05 -1.17 -41.27 -0.69 0.784 3.18
3 2 3 4.60 1.37 -4.57 -5.68 0.037 0.09
4 2 9 -3.09 -12.22 3.13 8.82 0.039 0.09
5 2 5 62.00 5.33 -61.70 -8.12 0.306 0.71
6 3 4 -11.37 5.68 11.39 -6.87 0.013 0.08
7 4 5 8.56 -14.61 -8.53 14.84 0.037 0.22
8 4 7 -116.13 200.00 116.55 -201.78 0.416 -1.56
9 4 9 95.86 -185.84 -95.53 184.59 0.333 -1.25
10 5 6 -5.81 19.38 6.00 -19.00 0.187 0.38
11 6 11 7.08 11.61 -7.06 -11.58 0.013 0.03
12 6 12 0.86 1.08 -0.86 -1.08 0.000 0.00
13 6 13 5.98 12.39 -5.97 -12.38 0.002 0.01
14 7 8 -10.82 31.48 10.84 -31.37 0.018 0.10
15 7 9 -105.72 170.31 105.88 -169.37 0.162 0.93
16 9 10 -6.85 -11.12 6.98 11.40 0.134 0.27
17 9 14 -6.63 -12.91 6.75 13.24 0.115 0.33
18 10 11 -6.89 -11.40 7.06 11.58 0.078 0.19

3.331 7.34

35
Voltage Constraints |
==========================================================================
Bus # Vmin mu Vmin |V| Vmax Vmax mu
----- -------- ----- ----- ----- --------
6 - 0.940 1.060 1.060 12.269
12 - 0.940 1.060 1.060 0.129
The data shows the losses which were found to be 3.333 MW for the real power and 7.31MVars for
reactive power. This is after optimization. The total cost for optimization as shown was found to be
Ksh.12,864.04. Power generated for each bus is shown as 228.76 MW for generator 1, 41.37 MW for
generator 2, 48.06 MW for generator 3, 27.41 MW for generator 4, 42.84 MW for generator 5. When the
data above is plotted we get a clear difference of normal load flow and optimization.

Generation MW Profile.

900
800
700
600
Power, MW

500
400
300
200
100
0
-100
1 2 3 4 5 6 7 8 9 10 11 12
Before 28.529 -8.355 4.77 191.166 101.698 -50.661 771.675 -0.13 110.897 2.864 0.411
After 43.59 4.39 60 0 0 18.29 0 -13.97 0 0 0 0

Graph 4.4

36
Generation Mvar Profile.
900
800
700
600
Power, Mvar.

500
400
300
200
100
0
-100
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Before 28.529 -8.355 4.77 191.17 101.7 -50.66 771.68 -0.13 110.9 2.864 0.411
After 43.59 4.39 60 0 0 18.29 0 -13.97 0 0 0 0 0 0

Graph 4.5.

37
CHAPTER 5.
5.1 CONCLUSION.
The aim was to see the effects of the proposed power upgrades in Kenya. From the tabular and graphiical
results we conclude that the objective was met. We see that as we increase optimization i.e. in generation
increase in expenditure or cost is expected. This is clearly seen from the above results of Ksh. 12864.04 .
Load -flow studies are important for planning future expansion of power systems as well as in determining
the best operation of existing systems. From the findings, it is concluded that optimization has both
positiveand negative effects on the system.

38
CHAPTER 6.
6.1 References.
[1] O. Alsek and B. Stott. Optimal load flow with steady state security. IEEE Trans.
Power App. Syst., PAS-93(3):745751, May 1974.
[2] Groan Anderson. Modelling and Analysis of Electric Power Systems. Lecture notes
227-0526-00, ITET ETH. Zurich, 2010.
[3] Groan Anderson. Dynamics and Control of Electric Power Systems. Lecture notes
227-0528-00, ITET ETH. Zurich, 2011.
[4] F. Capitanescu, M. Glavic, D. Ernst, and L. Wehenkel. Applications of security constrained
optimal power flows. In Modern Electric Power Systems Symposium,
MEPS06, Wroclaw, Poland, September 2006.
[5] Hermann W. Dommel and William F. Tinney. Optimal power flow solutions. IEEE
Transactions on Power Apparatus and Systems, 87(10):18661876, October 1968.
[6] Robert Ethier, Ray Zimmerman, Timothy Mount, Robert Thomas, and William
Schulze. Auction design for competitive electricity markets. In HICSS Conference,
Maui, Hawaii, January 1997.
[7] Gabriela Glanzmann and Goran Andersson. Incorporation of n-1 security into optimal
power flow for facts control. IEEE, pages 683688, 2006.
[8] H. HARSAN, N. HADJSAID, and P.PRUVOT. Cyclic security analysis for security
constrained optimal power flow. IEEE transactions on Power Systems, 12(2):948953,
May 1997.
[9] G. Irisarri, A.M. Sasson, and D. Levner. Automatic contingency selection for on-line
security analysis real time tests. IEEE Transactions on Power Apparatus and
Systems, PAS-98(5):15521559, Sep/Oct 1979.
[10] Stevenson and Grainger, Power flow analysis.

39
APPENDIX.
Matlab code used for OPF is attached below.

40
41

You might also like