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. MANG’OLI. 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 people’s work or my own work has been used, this has properly been acknowledged and referenced in accordance with the University of Nairobi’s 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 CONTROLS…………………………………………………………………………………………14 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.1INTRODUCTION……………………………………………………………………………………22 3.1.1 OPF PROBLEM …………………………………………………………………………………..22 3.1.2 OPF OBJECTIVE FOR FUEL COST MINIMISATION…………………………………………23 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 today’s 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< π’πππ TABLE 2.1: lower and upper limits of the controls 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 generator’s 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 π¦π1 π¦1π π¦ππ π¦ππ π¦11 π£1 π¦ππ ] [π£π ] = [I] = [Y]. [V] ……………………………….……………… (3) π¦ππ π£π 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 generator’s 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. Kirchhoff’s 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 powerβvoltage power flow equations defined in terms of real power (P), reactive power (Q) and voltage (V) are S = P + jQ = ……………………………………………….. (14) The powerβvoltage 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 fourβdimensional reactive capability curve, also known as a “Dβcurve’ since it is shaped like the 19 capital letter D, in the PQ space. Additional Dβcurves 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: steadyβstate, 4βhour and 30βminute. 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 steadyβstate 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 indepth 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 πΉ(ππ ) = ∑ππΊ ) ……………………….(23) π=1 (∝π +π½πΌ ππΊπΌ + πΎπΌ ππΊπΌ 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 today’s 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. Newton’s 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. Newton’s 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 Newton’s 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 Newton’s 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 no. p.u Degree. MW Mvar Generation MW Mvar Load 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.00 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 0.103 Table 4.1. The table describes load flow characteristics. 33 -0.13 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 Losses ((πΌ 2 π ) 3.33 7.34 Branches 20 ------------- ----------------- 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 no. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Bus Data Generation Voltage 1.022 1.009 0.995 0.993 1.003 1.060 1.022 1.019 1.018 1.042 1.057 1.060 1.059 1.043 0000 -3.757 -4.221 -3.892 -4.378 -3.549 -3.996 -3.909 -3.816 -3.698 -3.569 -3.553 -3.563 -3.628 228.76 41.37 48.06 27.41 42.84 388.45 43.59 4.39 60.00 18.29 -13.97 112.29 Load 136.00 28.00 64.00 0.32 117.30 7.50 32.00 385.12 45.00 11.80 60.00 7.10 -25.40 12.20 17.40 128.10 Lamda (ksh/MVAhr) 39.687 0.001 40.687 40.961 0.085 40.875 0.081 41.042 -0.071 40.548 40.871 -0.041 40.857 40.869 0.217 40.676 0.049 40.566 0.008 40.550 -0.002 40.553 -0.006 40.684 0.124 Table 4.2. Describes optimized bus data. Bus No. From bus To bus Branch Data. From Bus Injection To Bus Injection P (MW) Q(MVar) P (MW) Q(MVar) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 1 2 2 2 3 4 4 4 5 6 6 6 7 7 9 9 10 50.71 42.05 4.60 -3.09 62.00 -11.37 8.56 -116.13 95.86 -5.81 7.08 0.86 5.98 -10.82 -105.72 -6.85 -6.63 -6.89 2 5 3 9 5 4 5 7 9 6 11 12 13 8 9 10 14 11 -0.24 -1.17 1.37 -12.22 5.33 5.68 -14.61 200.00 -185.84 19.38 11.61 1.08 12.39 31.48 170.31 -11.12 -12.91 -11.40 35 -50.15 -41.27 -4.57 3.13 -61.70 11.39 -8.53 116.55 -95.53 6.00 -7.06 -0.86 -5.97 10.84 105.88 6.98 6.75 7.06 -1.89 -0.69 -5.68 8.82 -8.12 -6.87 14.84 -201.78 184.59 -19.00 -11.58 -1.08 -12.38 -31.37 -169.37 11.40 13.24 11.58 Loss P( MW) Q(MVar) 0.565 0.784 0.037 0.039 0.306 0.013 0.037 0.416 0.333 0.187 0.013 0.000 0.002 0.018 0.162 0.134 0.115 0.078 3.32 3.18 0.09 0.09 0.71 0.08 0.22 -1.56 -1.25 0.38 0.03 0.00 0.01 0.10 0.93 0.27 0.33 0.19 3.331 7.34 - Voltage Constraints | ========================================================================== Bus # Vmin mu Vmin |V| Vmax Vmax mu ----- -------- ----- ----- 6 12 ----- -------- - 0.940 1.060 1.060 12.269 - 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. Power, MW Generation MW Profile. 900 800 700 600 500 400 300 200 100 0 -100 1 2 3 Before 28.529 -8.355 4.77 After 43.59 4.39 60 4 5 6 7 191.166 101.698 -50.661 771.675 0 0 18.29 Graph 4.4 36 0 8 9 10 11 -0.13 110.897 2.864 0.411 -13.97 0 0 0 12 0 Generation Mvar Profile. 900 800 Power, Mvar. 700 600 500 400 300 200 100 0 -100 1 2 Before 28.529 -8.355 After 43.59 4.39 3 4.77 60 4 5 6 7 8 191.17 101.7 -50.66 771.68 -0.13 0 0 18.29 Graph 4.5. 37 0 -13.97 9 10 11 110.9 2.864 0.411 0 0 0 12 13 14 0 0 0 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):745–751, 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):1866–1876, 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 G¨oran Andersson. Incorporation of n-1 security into optimal power flow for facts control. IEEE, pages 683–688, 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):948–953, 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):1552–1559, Sep/Oct 1979. [10] Stevenson and Grainger, Power flow analysis. 39 APPENDIX. Matlab code used for OPF is attached below. 40 41