83
UNIVERSITY OF NAIROBI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING PROJECT 112: NETWORK EXPANSION PLANNING NAME: KITUKU SAMUEL WAMBUA ADM NO: F17/23806/2008 SUPERVISOR: DR. C. WEKESA EXAMINER:PROF M. K. MANG’OLI

INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Embed Size (px)

Citation preview

Page 1: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

UNIVERSITY OF NAIROBI

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

PROJECT 112: NETWORK EXPANSION PLANNING

NAME: KITUKU SAMUEL WAMBUA

ADM NO: F17/23806/2008

SUPERVISOR: DR. C. WEKESA

EXAMINER:PROF M. K. MANG’OLI

Page 2: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

DEDICATIONTo my dear parents and family for their continuous support throughout this course.

Page 3: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

ACKNOWLEDGEMENTSFirst and foremost, I would like to thank God for giving me the strength and ability to carry out this project. It has been a long journey to the completion of this project and it required the help of many people along the way. This project is a culmination of the support of these special people in my life.

I would also like to thank my supervisor, Dr. C. Wekesa, for being a source of guidance throughout the duration of the project. It gives me a great pleasure to credit my deepest appreciation and respect to my supervisor; He directed me right through the course of doing this project with his invaluable suggestions

My appreciation also goes out to my classmates for their suggestions and opinions on the project.

Lastly, I would like to appreciate my family for their continuous support.

Page 4: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

DECLARATION AND CERTIFICATION

This is my original work and has not been presented for a degree award in this or any other univer-

sity.

………………………………………..

KITUKU SAMUEL WAMBUA

F17/23806/2008

This report has been submitted to the Department of Electrical and Information Engineering, The

University of Nairobi with my approval as supervisor:

………………………………

Dr. C. WEKESA

Date: ……………………

Page 5: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

TABLE OF CONTENTSDEDICATION....................................................................................................................................2

ACKNOWLEDGEMENTS...............................................................................................................3

DECLARATION AND CERTIFICATION.....................................................................................4

Table of Contents..............................................................................Error! Bookmark not defined.

List of Figures...................................................................................Error! Bookmark not defined.

ABSTRACT........................................................................................................................................7

1 INTRODUCTION........................................................................................................................8

1.1 Problem Definition...............................................................Error! Bookmark not defined.

1.2 Objectives..............................................................................................................................8

1.3 Justification..........................................................................Error! Bookmark not defined.

1.4 Scope......................................................................................................................................9

2 LITERATURE REVIEW...........................................................................................................10

2.1 BACKGROUND OF TRANSMISSION EXPANSION PLANNING METHODS...Error! Bookmark not defined.

2.1.1 Static Transmission.......................................................Error! Bookmark not defined.

2.1.1.1 Heuristics methods................................................Error! Bookmark not defined.

2.1.1.2 Mathematical optimization methods.....................................................................14

2.1.1.3 Meta-heuristic Methods.........................................Error! Bookmark not defined.

2.2 Uncertainties in the TEP Problem........................................Error! Bookmark not defined.

2.2.1 Deterministic TEP Approach........................................Error! Bookmark not defined.

2.2.2 Non-deterministic TEP Approach................................Error! Bookmark not defined.

2.2.3 Problem Formulation………………………………………………………………...

2.3 Summary

3 METHODOLOGY.....................................................................Error! Bookmark not defined.

3.1 Optimal Power Flow............................................................................................................19

3.1.1 AC optimal power flow................................................................................................20

3.1.1.1 DC power Flow.....................................................................................................23

3.2 The mathematical formulation of Transmission Expansion.................................25

3.2.1 Transmission Network Enhancement methods ............................................................... 25

3.2.2 Proposed Deterministic Expansion Planning model ........................................................ 26

3.2.3 Objective Function .........................................................................................................27

3.2.4 Constraints............................................................................................................28

3.2.5 The langrarian Multiplier......................................................................................32

Page 6: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

3.2.6 Locational Marginal Price...................................................................................................34

3.2.7 Congestion cost…………………………………………………………………………….38

3.3 Software used for modeling the Expansion Problem…………………………………………..37

3.3.1 Important data for Model……………………………………………………………………..37

4. RESULTS AND ANALYSIS……………………………………………………………………39

5. CONCLUSION AND REFERTENCES………………………………………………………...41

ABSTRACTThis report handles Transmission Network Expansion Planning by the backward heuristic method. The main aim of the project is to find the optimal structure and at least alternatives of cost of transmission of the future load and generation configurations. In this report, the method of trans-mission investment proposed focuses on adding of transmission line congestions. This problem op-timizes the total investment and operation cost using the IEEE 14 bus using backward heuristic method.

Page 7: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

1. INTRODUCTION The supply of electricity to the loads in a typical power system, is carried out by three main processes; generation, transmission and distribution. The power generated at the generation stations is transferred to different distribution centers through a high voltage transmission networks. Power is reduced to lower voltage values at the distribution stations for easier distribution to the consumers. Due to the increasing demand of electrical power in the future, transmission network expansion is required to facilitate alternative paths for power transfer from the generation stations to the load centers. This expansion should be done in a proper and a timely manner and therefore, the Transmission Network Expansion Planning is defined as the problem of determining; [1]

a) Where to locate any new transmission linesb) When any new capacity must be installed c) Cost incurred in the whole process of expansion

The generation, transmission and distribution operations in a vertically integrated power system environment are performed by the responsible utility. Due to this condition, the network expansion is done in a way that the reliable operation of power system is not compromised [2]. Because of this, the planner is expected to select the optimal transmission expansion plan for the forecasted demand level. The Transmission Network Expansion Planning is usually performed by a constrained optimization approach which minimizes the total cost of investment and also ensures that loads are completely supplied during the normal conditions and once some types of contingencies occur on some system elements.

1.1 Objectives

The objective of the Transmission Network Expansion planning is to propose a transmission expansion planning strategy with the least cost and also fulfilling all the operation and security constraints of the system. This can be achieved by adding new components in the network that alter power flow through the existing transmission lines and reduce congestion, or by erecting new transmission lines either parallel to the existing ones or new right of way. This report focuses on pointing out an expansion planning strategy by building new transmission lines in order to cater for the increasing electrical demand in safe, secure and reliable condition. This will be achieved by formulating a method of TEP that takes into account the fluctuations of load level and power generation by multiple scenarios.

Based on the future demand of electrical power and power generation of the power system a number of typical scenarios are defined and the optimal solution TE plan which operates optimally under all dispatch condition is determined through a decision framework. The candidate expansion plan selection is carried out in such a way that the TEP problem reduces

7

Page 8: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

congestions which are caused by overloading of the transmission lines.

1.2 Scope

The scope of this project includes developing a mathematical formulation of Transmission Expansion Planning (TEP) problem consisting of an objective function of minimizing the total cost of the power system.

8

Page 9: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

2. LITERATURE REVIEW In the past, transmission expansion planning has been carried out and different approaches have been proposed. There are two TEP models namely

a) static model

b) dynamic model

This report mainly focuses on the static model.

a. Background of Transmission Expansion Planning Methods

In a regulated power system environment, the responsible power system utility takes the task of maintaining and expanding the existing and future electric power generation, transmission and distribution. Therefore to meet the growing demand condition, the utility forecasts the future demand and performs the necessary generation and transmission expansion plan. In the common practice it is usual that the generation plan comes prior to the transmission network expansion planning is carried out. In other words the TEP is performed after the new generating units to be installed and old decommissioning ones are determined. In this condition, the main focus of the transmission expansion planning is to select the optimal and least cost transmission investment alternatives. Therefore, the transmission expansion planning is formulated as an optimization problem with a set of technical and reliability constraints. This optimization process necessitates the earlier pronouncement of cost with an optimal transmission network configuration that minimizes the total investment and operation cost.

A conventional transmission expansion planning procedure decomposed the TEP problem into three steps given in figure 2-1 [2, 3]

1. Generate possible candidate transmission expansion alternatives

2. Perform financial and other analysis to guide the final plan selection

3. Conduct technical impact analysis to ensure the feasibility of the plan

9

Page 10: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Figure 2-1 Traditional Transmission expansion planning

On the other hand, deregulation of power system changes the objective of transmission expansion planning. The objective of TEP under deregulated environment is different from that in the traditional power industry. In regulated environment, the main concern is to maximize the total social welfare, long-term reliability and efficiency of the network. While in deregulated environment, besides maximizing the social welfare, problem formulation TEP should include maximization of the investor’s or stakeholder’s profit as its constraints [4]. Therefore in deregulated environment the decision of transmission expansion is made by taking the economic effect of the investment into account with the other power system investment criteria. It is a complex process as the model takes the generation expansion and market related uncertainties into account.

The main objective of transmission planning in deregulated power systems is to provide a nondiscriminatory competitive environment for all stakeholders while maintaining power system reliability [5]. The general framework of the transmission expansion planning in deregulated environment [2, 3] is shown in figure 2.2

10

Page 11: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Figure 2-2 transmission expansion planning procedure in deregulated environment

From the perspective of power system planning horizon transmission network expansion planning can be classified as static or dynamic. Static expansion involves finding the optimal plan for a single-stage planning horizon. For example, given the network configuration of this year and the peak generation/demand of next year, one can determine the expansion plan with minimum cost. This planning method answers only what transmission facilities must be added to the system and where it must be installed. This static modeling of transmission network planning is simpler and it allows solving problems of large size in shorter period of time than the dynamic methodology. This methodology can also extend to a multi-year context without difficulty.

Meanwhile in a dynamic planning, several years or stages are considered and a year-by-year expansion plan is made that goes from the initial year through the horizon year. The dynamic planning is very complex and large because the planner needs to answer the question when new transmission facilities must be installed in addition to the sizing and placement. This will result in large number of variables and constraints and requires enormous computational effort to obtain the optimal solution.

11

Page 12: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Figure 2-3- Classification of transmission expansion planning from view point of power

System horizon

This project is based only on static method of modeling.

i. Static Transmission Expansion Planning

From the view point of algorithms applied to solve the static TEP (STEP) problem, the transmission planning approach can be generally classified as: heuristic, mathematical optimizations and the meta-heuristic methods [6, 7].

1. Heuristics Methods

The term heuristics is used to describe all techniques that undergo a step by step generating, evaluating and selecting expansion option. A component of the solution is added at each step until good quality solution is found. It is robust and converges quickly to the optimal solution, but for large scale and complex problem it may converge to local solution that is very far away from the global optimal solution.

One of the first approaches developed to solve the transmission network expansion problem is dated of 1970 by Garver [8]. In this work, the problem was formulated as a power flow problem in which the objective function and constraints are described by linear functions that neglect the ohmic power loss. Based on the result of flow estimate new lines will be added on the largest overload network. Considering the added line, new linear flow is computed and

12

Page 13: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

the process continues until no overload exists in the system.

Latorre et al. [9] proposed a heuristic method that took the advantage of natural decomposition of the transmission expansion problem into investment and operation sub-problems. The investment sub-problem is solved by a heuristic procedure while the operation problem is solved by a well-known optimization technique.

The heuristic approach that tries to solve the same problem using sensitivity analysis was proposed [10-18]. At each step of the heuristic algorithm, the sensitivity index was used to determine the circuit to be added to the system. The sensitivity index can be built based on the algorithm that employs the electrical system performance (like minimum load shedding [10], load supplying capability [11],least criteria [13] the relaxed version of their own mathematical model [12], [14, 15] or optimal power flow in the circuit [16, 17]. In most of these models the interior point method is employed to solve the resulting linear or non-linear programming problem during each iteration.

2. M athematical optimization Methods

One of the first mathematical optimization methodadopted to solve the transmission network expansion problem is the linear programming technique where both the constraints and the objective functions are linear [19, 20]. The overall linear transmission expansion planning (TEP) problem was decomposed into two independent problems, investment and operation problems, which is defined by a linear programming model and independent Monte Carlo simulation based on DC load flow model respectively.

Nonlinear programming is the other mathematical programming tool used in solving the TEP problem [22]. In this scheme both the objective function and some of the constraints are formulated as nonlinear equations. The objective function considers the minimization of investment cost, ohmic and corona loss. The main drawbacks of this approach are that the optimal solution may fall into local optima and difficulties associated with the selection of initial value of the unknown power flow variables.

Another optimization method used in solving the expansion problem is the mathematical decomposition scheme. One of the first approaches is formulated by Pereira et al. [23].

3. Meta-Heuristic Methods

Meta-heuristic method integrates the features of mathematical optimization and heuristic method. One of the first approaches that are widely adopted to solve TEP problem, is the genetic algorithm (GA) [24], [25]. GA is based on the mechanism of evolution and natural

13

Page 14: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

genetics. In [24], GA is used to realize the multi-objective optimal planning of the TEP by considering the minimum investment cost, the optimum system reliability and minimum influence on the surrounding as its objective function. Silva et al. [26] reported the application of GA on TEP problem which implement the principle of simulated annealing (SA) for improvement of the mutation mechanism and generation of better individual. Later in 2001 [27], they proposed another approach that uses the transportation model to build the initial population and the levels of loss of load to select the best individual of the population. Combinations of GA and Neuro-computing (NC) [28] that can operate more effectively have also been applied for solving the TEP problem.

The simulated annealing (SA) [29] is the other type of optimization method that is applied to the TEP problem. The SA tries to avoid local optima by allowing temporary limited deterioration of the actual solution. A parallel SA algorithm [30], that greatly reduces the computational burden and improves the quality of the conventional SA solution, was adopted in solving expansion planning problem.

A new method of solving the static TEP problem which is based on the application of tabu search (TS) was developed by wen et al. [31]. They developed a tabu search-based method of solving the transmission network optimal planning problem as zero-one integer programming problem. In addition, a tabu search approach that includes intensification and diversification phase to the main tabu search concepts was also reported in [31]. A greedy randomization adaptive search procedure (GRASP) was also proposed by Binato et al. [32].

b. Uncertainties in the TEP problem

The process of solving a TEP problem requires handling of certain and uncertain information. The data which are not known at the time of planning are referred to as uncertain data. The factors that cause these uncertainties are [33];

Demand growth

Economic growth

Inflation and interest rates

Environmental regulation

Public opinion

Renewable energy sources

Availability of fuels and technologies

Individual power generating units (IPS)14

Page 15: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

These uncertainties can be classified as random and non-random. In random uncertainty the pattern of the parameters can be determined from the historical data’s and past observation. Uncertainties inload, renewable power generation and generator costs are categorized in this group. Non-random uncertainties are not repeatable and cannot be statistically represented from past experience [5]. Transmission expansion cost, shutting down of generators, and the like are grouped in this category.

Transmission expansion planning can be done with or without considering these uncertainties. Therefore, from the perspective of uncertainties in the power system, TEP can be divided into two categories [5, 34]:

1. Deterministic

2. Non-deterministic

i. Deterministic TEP Approach

A deterministic transmission expansion planning is formulated as a traditional optimization problem, which analyzes single or two representative scenarios. This scenarios can be worst peak load level, N-1 contingency or outage of a generating unit [35]. In this method the uncertain factors for future condition are assumed to be either perfectly known or forecasted based on current best information. Solving a TEP problem based on this method is quite simple and requires significantly less amount of effort. Thus, the optimal investment strategy of the network for the planning horizon is known with [34]. For every stage of the investment planning horizon, a new set of forecasts is assumed and decision of investment strategy will be made by recalculating the optimization problem. However, the main drawback of this method is that it tries to represent the past experience and future expectation by a single fact. Therefore, the expansion solution for the future condition becomes optimal only if it occurs as predicted. Otherwise, the solution may lead to inadequate or expensive planning decision. Besides the investment strategy of each stage is optimal for limited time of period, usually fails to provide long term investment plan [36].

ii. Non-Deterministic TEP Approach

In most cases, to provide safe operation of the power system, the deterministic transmission expansion planning is adopted by using the highest demand level (the worst case scenario). Since the probability of occurrence of this situation is less, the expansion plan may result in an investment cost which is much higher than needed [1]. Therefore, to overcome the drawback of the deterministic TEP approach, a non-deterministic TEP problem is formulated by generating a set of possible scenarios of the uncertain parameters that may take place in the future. In this approach, a number of possible scenarios will be analyzed and evaluated

15

Page 16: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

using security and performance analysis criteria. Consideration of uncertainties will help to identify a robust plan that is satisfactory under a range of possible outcome. In this condition, the TEP problem can be solved either by means of a stochastic optimization-based formulation, where the objective function is typically formulated in term of an expected value or by means of a decision-making framework, which encompasses a deterministic optimization plus a decision tree analysis [34]. The non-deterministic way of solving a TEP problem is a challenging task that needs an adequate treatment of different types of information. Therefore a great effort and care must be taken while solving the problem [4].

1. Scenario Analysis

Scenario analysis, besides the other non-deterministic TEP approaches, is one method used to solve a non-deterministic planning problem [5]. In this approach a number of possible future scenarios of uncertain parameters will be determined at first. Then all the scenarios will be analyzed and set of optimal expansion plan for scenario is determined. Depending on these set of optimal solutions of each scenarios, decision analysis technique will be carried out and a final optimal plan which is, on average adequate for all scenarios will be selected [37]. The decision criteria used for selection of the final varies from planner to planner depending on their interest. The selection criteria could be based on: Expected cost criteria, Minim ax regrets, Von Neumann-Morgenstern criterion, Hurwicz criterion, Robustness criterion and the like [5, 38]

iii. Problem Formulation In this report, a method of transmission expansion planning for future load and generation condition is proposed. The proposed approach is based on DC power flow model and location marginal price is introduced in the optimization problem to alleviate congestion. The TEP problem is formulated as an optimization problem with a set of equality and inequality opera-tional constraints. It has an integer decision variable that indicates the number of optimal can-didate investment plan. This term makes the problem to be a mixed integer nonlinear pro-gramming (MINLP) problem with continuous and integer (discrete) variables and nonlineari-ties in the objective function and constraints [39].

The general formulation of MINLP problem is [40]

16

Page 17: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

The eq. (2-1) is an objective function, which includes the capital investment cost of transmis-sion elements as well as the operating cost of the system. Eq. (2-2) represents the active power balance equality constraints and eq. (2-3) represents the inequality constraints imposed by the generating units and the transmission network of the power system. The vector vari-ables x and y are the control decision variables respectively, where y represents a vector of integer variables whereas x are continuous variables. X and Y impose the lower and upper bound binding restrictions on the variables. This problem is essentially finds the minimum of a real valued objective function subject to equality and inequality constraints defined by vec-tor valued functions (h and g) in the continuous-discrete (x-y) space [40].

Besides, an additional constraint which alleviates congestion or equalizes the locational mar-ginal price (LMP) of the system included in the optimization problem. In other words, all the transmission lines must transfer power that is lower than their maximum power transfer ca-pacity limit, no congestion. This constraint can be introduced either by:

To do so, in addition to the original equality and inequality constraints of the TEP problem, the extra constraints which are resulted from the derivation of the Lagrangian multiplier and the Karush-Khun-Tucker (KKT) optimality condition of the inequality constraints is included in the TEP optimization problem.

c. Summary

The literature review has provided an essential presentation on the approaches and conceptual frameworks, academic debates, scholarly writings and perspectives of the important subject matter of TEP models by categorizing them into various groups based on their techniques and

17

Page 18: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

approaches with an introductory backdrop. Under the static transmission expansion planning category, mathematical optimization methods, heuristics methods, meta-heuristic methods were the major approaches that are treated as one group of TEP model.

Definitions and outlooks on the process of solving a TEP problem have been discussed; meaning and implication of a TEP problem as part of the broader context of transmission expansion planning models have been presented. The cause of uncertainties in the TEP problem and the approaches, in the form of deterministic and non-deterministic with relevance to this thesis are discussed. The final part of the chapter, presents the TEP problem formulation used in this work.

18

Page 19: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

3. METHODOLOGY In an attempt to have a deeper understanding of the TEP approach, this chapter presents the mathematical formulation for the transmission expansion planning modeling based on optimal power flow (OPF) and locational marginal price (LMP). In doing so, the OPF and LMP derivation will be introduced. The chapter begins with the mathematical formulation of alternating current optimal power flow (AC OPF) and the linearized simplification of the AC power flow, the direct current optimal flow (DC OPF). Also included in this section is a formulation of a deterministic single-stage DC OPF based transmission expansion planning model. Then, the formulation of the Langrangian multiplier associated with the binding constraints of the proposed transmission expansion model is introduced. Later in this chapter, the physical meaning of the locational marginal price and congestion cost will be discussed. Finally a case of the IEEE 14 bus test power system of the proposed approach will be provided.

a. Optimal Power Flow

OPF is modeled as an optimization problem that minimizes or maximizes a given objective function subjected to a number of constraints. The most common objective function include minimum operation cost, minimum active power losses, minimum shift of generation or other control variable from an optimum operating point, etc. [41]. In general OPF problem can be expressed as [42];

Depending on the selected objective function, an OPF problem can be formulated in a different way. In most cases the objective of the OPF problem is to minimize the total generator fuel cost subjected to the power balance, transmission line power flow and

19

Page 20: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

generators power output limits. These constraints can be represented using AC power flow or DC power flow model. In AC OPF the AC power flow equations are utilized and both the active and reactive power balance at all nodes of the system are considered. In DC OPF, the AC approximation, DC power flow is used and only the active power balance of the system is taken into account. Detailed simplification is provided in section 3.1.2.

i. AC Optimal Power Flow

Given the π equivalent circuit of medium transmission line shown in Figure 3-1, the complex power that flow through the transmission line connecting bus I to bus j is given as:

The relationship between the impedance and admittance of the transmission line is:

20

Page 21: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

The general mathematical formulation of the AC OPF problem for power system including Nbnumber of buses, Ngnumber of generating units and Nlnumber of transmission lines can be formulated as:

Power balance Constraints:For each node of the transmission network the power balance equation must be applicable. This is given as the total power generation minus the total power demand at each bus must be equal to the net power flow through the lines connected to it. The real and reactive [power injections are expressed as;

21

Page 22: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

The equations for computing the real and reactive power injection at each bus is expressed as:

Power Flow Constraints: This constraint specifies the apparent power flow through transmission line (from bus i to bus j) have to be within the upper bound of the power transfer capability limit of the line. This limit is based on the thermal consideration of the line and given as:

Generator Capacity Constraints:This constraint specifies the maximum and minimum real and reactive power generation capability of the generating units. The power generations outside these limits are inapplicable due to technical reasons.

22

Page 23: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Voltage Constraints:This constraint specifies limit on the maximum and minimum voltage magnitude at each bus i.

ii. DC Power Flow

The dc power flow equations are resultants of linearization of the AC active and reactive power flow equations given in Eq.3-10 to Eq.3-17 above. These simplifying assumptions are:

i. Neglecting the resistance of the transmission lines as it is rather small compared to the inductance. This means that the conductance of the transmission lines are zero (Gij=0) and admittance matrix is represented only by the line susceptance (Bij). After applying this assumption the power flow equations are:

ii. These phase angle difference between any two buses is rather small. Therefore:

iii. The magnitudes of the voltages at each bus are equal to 1pu.

Therefore, after applying all assumptions to the AC OPF formulation, the DC optimal power flow equations are:

23

Page 24: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

3.2 The mathematical Formulation of the Transmission Expansion

As I have discussed in the second chapter the transmission expansion planning has been extensively studied and several mathematical modeling are employed to represent the transmission network. These are: the transportation model, the hybrid model, the disjunctive model, and the DC power flow model [61]. Recently the AC power flow model also came to application [16].

Usually the DC power flow model is the most extensively employed in solving long term TEP problem formulation as it satisfies the basic conditions stated by the operation planning studies of the power system network. It has an integer decision variable which indicates the selection and number of candidate circuits of the optimal expansion plan. The branch susceptance of each candidate circuit and the Kirchhoff’s voltage law (KVL) is expressed as

24

Page 25: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

a function of the integer variable. These terms make the problem to be a mixed-integer nonlinear programming (MINLP) problem that its complexity increases as the size of the system increases. Furthermore, the expansion plan obtained from this model should be further investigated by using more realisticoperation planning tools such as AC power flow, stability analysis, transient analysis and short circuit analysis [12]. To reduce the computational burden of the problem, the transportation and the hybrid models that are obtained by relaxing the constraint representing the Kirchhoff’s second law of the DC model are also used. This relaxation results in an integer linear programming problem, which is simpler to solve than that of the DC model.

3.2.1 Transmission Network Enhancement Methods

In the future, due to the growing energy demand of the power system, the existing transmis-sion system may become more stressed and congested. In congested power system the gener-ation and/or demand has to be rescheduled to ensure reliability, security and normal operation condition of the system. In doing so an increased power generation from the expansive gener-ating unit becomes mandatory as no power can transfer from the cheap generating bus to the load bus. This could cause an increase in the total operating cost and locational marginal price (LMP) at each bus. In the long run congestion of the power system can be relieved by increasing the available power transfer capability limit of the transmission system to meet the generation/load condition of the future power system. This in turn has additional system ben-efits such as reliability enhancement and reduction of system degradation due to operation close to capacity limit [42]. Otherwise, increase in the price of the electricity, decreases the security andreliability of the power system and increasing possibility of cascade outages of the system mayresult.There are several ways in which the transmission capacity of the network can be increased.Commonly, it can be classified into two groups. The first type of transmission networkEnhancement is to upgrade the power transfer capability of the existing transmission system. Thisis done by addition of new network components or replacing components that are already in thenetwork. These include [43]:- New relays and switches- New remote monitoring and control equipment- Re-conduct ring of existing links- Operating specific transmission line at higher voltage level, with in its design limits.- Installing new substation facilities to improve the power flow distribution among the different paths- Transformer upgrade- Capacitor additionThe second type of the network improvement, the one that is done in this work, is to build newtransmission lines in parallel to the existing grid.Traditionally TEP is mostly performed as cost minimization optimization problems thatminimize the sum of investment cost and the cost of load curtailment caused by lack oftransmission capacity, subjected to DC or AC load flow constraints. This way of the TEPapproach totally neglects the explicit optimization of the power production cost and them economic effect of transmission line congestion on the network power clearing price. A TEPproblem whose main objective is to minimize the in-vestment cost of the new transmission linesand the total operation cost of the generating units

25

Page 26: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

is proposed in this work. The mathematicalformulation of the proposed TEP problem is pre-sented in the next section.

3.2.2 Proposed Deterministic Expansion Planning ModelTransmission expansion planning is a planning process, though it has a dynamic nature, often tackled by the simplified static transmission planning mathematical model [46]. Depending onthe type of the power system and interest of the planner the objective function of the trans-mission expansion planning problem varies. For example in a market driven transmissionin-vestment the main purpose of the expansion strategy is to provide non-discriminatorycompet-itive environment meanwhile maintaining power system reliability. In this case, besidethe technical and economic criteria of the system, marketed based criteria must be included formeasuring the goodness of the expansion plan [5]. On the other hand, if the transmission planneris a non-profitable company, then the planning problem can be tackled as the mini-mization of theexpansion cost and the system operation cost meanwhile minimizing the con-gestion cost.Whereas, if the expansion is done by a profit based transmission company plan-ner, the decisionof the transmission expansion investment depend on the amount of money the company yieldand year of the investment return. In this section the formulation of the transmission expansionplanning, based on DC optimal power flow and LMP, used for this thesis work is presented asfollows:

Traditionally, transmission expansion planning is done by assuming the new candidateTransmission line to be built has the same characteristic (impedance and maximum powertransfer capacity) with the existing ones [43]. But in practice this may not be the case and thePlanner has the chance to select a new type of circuit sets that can be installed in parallel to theexisting ones or other new right of way. In this condition instead of using the index ( ij ) for acircuit with terminal buses of i and j , each circuit is identified by a pair of indices like ( ij, o ).ijL and o O , where L is the set of all lines connecting bus i and j andO is the set ofpossi-ble transmission line options.

Figure 3-2(a) represents TEP based on new transmission line options that have the sameCharacteristics with the existing one ( 0ij n ). While in Figure 3-2(b) the different characteris-tics ofthe existing ( 0ij n ) and the new transmission ( nij o , ) options is given in different color. After takingthis condition into consideration the mathematical formulation of the static transmissionexpansion planning problem will be conversed next.

26

Page 27: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

3.2.3Objective FunctionThe objective function of the TEP problem consists of the minimization of the sum of theInvestment cost and the operational cost. The investment cost is the cost of building the pro-posedtransmission line. It is dependent on various factors and mainly composed of installa-tion cost,labor cost, material cost and other related costs. For a single stage static expansion strategy, it isgiven as:

The operating cost is the cost of power generation needed to meet the demand. It is given as thesum of the quadratic cost function of all generating units. The total operating cost of real powergeneration for a system with " " g N generating units are given as:

The operation cost of the generators is calculated every hour or 8760 times a year. Therefore theannualized operation cost will be given as:

Thus, the final objective function, which is the minimization of the total investment and an-nualoperation cost of the expansion planning problem expressed as:

Given the above cost minimization objective function of the TEP problem, the mathematical

27

Page 28: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Model has to include the operational, physical, economic and social constraints that assureSecure and reliable system condition which satisfies the transmission network requirements [65].These constraints are based on DC OPF and are reformulated to include the effect of transmission line addition on the system variables and parameters.

3.2.4 ConstraintsThese constraints of the TEP problem reflect the limit on the operational and technical condi-tionsof the power system network. These are:- Active power balance - It is the linear equality constraint that models the Kirchhoff'sCurrent Law (KCL) and represents the conservation of active power flow at each bus ofthe given network.

\

BBusNewijis the ij element of new susceptance matrix of the transmission system after consider-ing the new candidate transmission line. The element of this matrix iscalculated as:

28

Page 29: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

The branch power flow - This constraint expresses the Kirchhoff's Voltage Law (KVL) ofthe equivalent DC network and limits the power flow at each branch of the power system.The power flow through the new transmission lines is positive if it flows fromi to j, andnega-tive otherwise. The power flow through branch i=j expressed in terms of theexisting and the new transmission line option of o is given as:

The inequality constraint reflects the upper and lower bound limits on the device’s physical andeconomical condition of the power system expansion problem. The physical devices that requireenforcement of limits are the generators and transmission lines. These constraints are:

- The transmission power flow limit - This inequality constraint represent the limit ofmaxi-mum power flow at each branch of the network based on the thermal and dynamicstability consideration. It is given for both the new and the existing transmission linesseparately as:

It should be noticed that if a candidate branch ij with option o is selected as an expansion planI.e.nI j=1 then Eq. (3-28) and Eq. (3-30) will become active. This will change the admittance-matrix and the power transfer distribution factor (PTDF) of the power system which resulted in adifferent power flow pattern. On the other hand, if the candidate branch is not selected i.e.

29

Page 30: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

nij =0then P ij, o, is zero and the PTDF and admittance matrix of the power system will re-mainthe same.- The generators power output limit - This constraint induce the minimum and maxi-mumpower generation limits of each generating units. Power generation outside this region isinfeasible due to technical reasons. It is represented as:

- The right of way limit - This constraint helps the planner to know the exact location and-number of new required lines. It is included in the expansion planning problem to definethe maximum number and location of new circuit that can be installed in a specifiedlocation. This is because the planners have to meet the community standards of visualimpact on the en-vironment along with the economic considerations. Mathematically it isgiven as [65].

Congestion alleviation constraint - induce the alleviation of any transmission linecongestion in the system. In other words, the LMP at every bus are equal.

The hard congestion alleviation constraint given in Eq. (3-34) may result in over investment as itdoes not allow a little congestion in the system. This may lead to an expensive and un-necessaryinvestment decision. To overcome this unnecessary investment due to non-severe congestion ofthe transmission line, the constraint which limits the maximum power flow through the existing transmission lines (Eq. 3-31) is relaxed to allow overloaded lines in the system. Then the expansion decision is made only on transmission lines that are suffering from a severecongestion, and congestion which are caused by small overloading’s will be fil-tered out. Thismodification is integrated by relaxing the constraint that limits power flow through the existinglines as:

30

Page 31: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

The Eq. (3-35) shows that the optimization problem will not activate the addition of line if theoverloading in the transmission line is not severe and power flow violation is not more than σpercent of the maximum power transfer capacity limit of the line. Eq. (3-36) controls themaximum number of overloaded transmission lines that can be allowed at the same time, in thiscase only one overloaded line is allowed. Besides the transmission line expansion and therelaxation of the power flow constraint in branch ij are mutually exclusive. This means that, ifextra line is built between buses i and j then the additional line must remove the over-loading inthe existing transmission line.In summary, the formulated TEP problem can be re-written as:

31

Page 32: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

3.2.5 The Lagrangian MultiplierThe Lagrangian multipliers of the power balance equation are the locational marginal price of thepower system. For the above TEP problem with objective function of Eq. (3-37) and con-straintsEqs. (3-38 – 3-46), the Lagrangian function can be formulated as [47]:

32

Page 33: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Note that in the above Lagrangian function, only constraints that have direct coupling withdecision variables Pgi and Ϭiare taken into account (Eq. 3-44 to Eq. 3-46) TEP modelcon-straints that do not have effect on the outcome of the above shadow prices are not included.-Taking the partial derivative of the Lagrangian function, with respect to the active powergen-erators output (Pgi) and the bus angle (Ϭi), equal to zero and applying the Karush-Khun-Tacker (KKT) optimality condition to the inequality constrain to Eqs. (3-41), (3-42) and (3-43)we get:

For simplicity of expression, Eq. (3-49) is given in vector form. The derivation and expres-sionsof the vectors are given in appendix A.Eq. (3-50) and Eq. (3-51) represents the KKT op-timality condition of the transmission linesthermal power flow limit through existing line, Eq. (3-52) and Eq. (3.53) represents the newcandidate transmission line and Eq. (3-54) and Eq. (3-55) represents power generation capacitylimit of the generating units.

33

Page 34: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

3.2.6 Locational Marginal PricesLocational marginal price (LMP) is a pricing system for buying and selling electric energy-considering the generation marginal cost and the physical aspects of the transmission system [67].It is the incremental cost of energy at each node (bus) of the power system. In other word it is theextra cost for supplying the next 1MW additional power at a specific bus with-out violating anysystem and operation constraints. All consumers purchase energy at the price of their load busesand all producers sell energy at the price of their generator buses. The LMP consists of threecomponents, which are marginal cost at the reference bus, marginal cost due to transmissionlosses and marginal cost due to transmission system congestion. Mathematically, thesecomponents can be represented in [66]. The derivation can be found in [68]:

The energy component of each LMP is simply the marginal cost of energy for the system at thereference bus (λ). During LMP calculation using DC OPF, the loss component of the LMP areneglected as a DC power flow model is a lossless network model which does not consider thetransmission system losses. The Lagrangian multiplier μijis the shadow price due to the bindingconstraint of power flow through the transmission lines. The congestion component of LMPshows the impact of each congested line on the LMP of the power system. It also de-notes theincrease in social welfare which could be achieved by slightly increasing the power limit of thecorresponding line [47]. When there is no congestion in the system or the line flow constraintsare not included in the optimization problem the congestion coefficient μijis

34

Page 35: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

zero and the LMPat all nodes will be equal to the LMP at the reference bus (λ). On the other hand, when one ormore of transmission line power flows is constrained, the congestion coef-ficient will not be zeroanymore and the LMPs at each bus will vary. The differences in the lo-cational marginal prices ofthe buses are dependent on the severity of the congestion. In this case two different situations canoccur. First, the congestion may prevent cheap supply of en-ergy from the serving bus to the loadbus. As a result expensive unit will be committed to re-place the cheaper unit and the LMP can behigher than the highest generation offer. Second, the LMP can be lower than the cheapestgenerator offer; in the case it is cheaper to pay cus-tomers at locations where load consumptionhelps to relieve congested transmission lines [47, 48].

3.2.7Congestion cost

When a transmission line is operating at its maximum power transfer capacity limit, it is calledcongested. This means that additional power transfer through this line is not allowed. Thereforeduring this situation, for secure and reliable operation of the power system, the con-gestion mustbe resolved by re-dispatching the generating unit outputs. This may lead in sup-plying the nextextra load from the more expensive generating unit and different LMPs at each bus appears.The congestion cost or rent refers to the cost difference between the total payment that the-consumers pay and that of total payment that the generator receives. If the system is notcon-gested, the cost that consumer pays will be equal with the total cost the producer earns and-congestion cost will be zero. If there is congestion in one or more of the transmission line, th-elocation marginal price (LMP) at the buses will not be the same. Therefore the cost that the-consumers pay and the generator receive will not be equal [47].Consider the l thtransmission line of a certain power network with end buses i and j shownbe-low in Figure 3-3. The congestion rent of the l thline is given as:

where TCR is the total congestion cost in the networkThe total congestion cost of the system can also be given as the sum of consumer payment minusthe sum of generators income [70].

35

Page 36: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

3.3 Software used for Modeling the Expansion ProblemIn this thesis, an advanced optimal tool called matlab was used for simulation and modeling of the TEP problem formulated above whose objective function and constraints are also given above. Matlab is an optimization tool used for solving mathematical problems including linear, nonlinear, mixed-interger nonlinear programming e.t.c it also provides links to many integrated powerful solvers that allows the user to solve all major mathematical programming problems. The expansion problem is solved first by identifying the candidate transmission line options of the integer investment variable of the master sub-problem. Then the nonlinear programming (NLP) operation sub-problem will be solved. This problem continues alternatively until the algorithm finds the optimal expansion plan or fulfills the termination criteria.

3.3.1 Important data For Model

Transmission expansion planning is a complex problem as it is subjected to uncertainty of the future data. Some of this data’s can be forecasted from past experience and future expectations. For reasonably priced transmission planning of the future operation condition, getting the exactestimation of all the required data is crucial. And the required data have to be forecasted ordetermined before the planning process started. Therefore great care must be given. The mostimportant information that the planner has to know before planning includes:

36

Page 37: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

The system network topology of the base year

Characteristics of the candidate transmission line circuits (like length an authorized right of way)

The power generation and demand profile of the planning horizon

Investment constraints

Possible types of transmission line

the cost of the transmission lines, etc.

37

Page 38: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

4.RESULTS AND ANALYSIS 4.2 Case study

The above proposed expansion planning approach is applied on a 14 bus system. This system has 14 buses, 5 generators and 20 transmission lines (figure 3-4). The different aspects of the power system are studied and the result is discussed.

Fig. 3-4 IEEE 14 bus system

38

Page 39: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Backward heuristic method was used where it started adding lines in all the existing corridors i.e. from the feasible region

Figp showing the backward heuristic method.

The backward search flow chart

39

Page 40: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

40

Page 41: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

41

Page 42: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

42

Page 43: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

43

Page 44: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Different candidate lines were added in the 14 bus system

Figure w shows IEEE 14-bus test system which is considered to show effectiveness of the proposed method. The system consists of 14 buses, with five generators located at buses 1,2,3,6, and 8. There are originally 20 transmission lines in the system. It is assumed that the system load level is expected to increase by 10%. The system following expansion is depicted in Figure F. One new line is added to the system between bus 6 and bus 12. The new installed line is denoted with dashed line.

Fig F

44

Page 45: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

5. CONCLUSION AND REFERENCES In the future, due to the growing electricity consumption, the existing transmission network maybecome stressed and congested. Under this condition for secure and reliable operation of thesystem either the load or the generation has to be rescheduled. This results increase in the priceof electricity, decrease in the reliability and security of the power system and increased-possibility of cascade outages. To overcome this problem transmission expansion planning hasbeen studied and a new approach of tackling the TEP problem is proposed.In this paper transmission expansion planning was carried out based on IEEE 14 bus test case. The proposed expansion was performed by considering investment cost as objective function and also all opera-tional constraints. Simulation results showed that the proposed methodology can successfully ap-plied to power systems.

REFERENCES

[1] J. A. López, "Risk Minimization in Power System Expansion and Power Pool ElectricityMarkets," Ph.D., Electrical and Computer Engineering University of Waterloo, Waterloo,Ontario, Canada, 2007.[2] F. Wu, et al., "Transmission investment and expansion planning in a restructuredelectricity market," Energy, vol. 31, pp. 954-966, 2006.[3] L. C. Wing, "Transmission Expansion Planning in Restructured Electricity Market," MSc.Thesis, University of Hong Kong, June 2007.[4] S. Sozer, "Transmission Expansion Planning to Alleviate Congestion in DeregulatedPower Market " Ph.d, Ph.D Thesis,Graduate Faculty of Auburn University, AuburnUniversity, 2006.[5] O. Buygi, "Transmission Expansion Planning in Deregulated Power Systems," Ph.d,Electrical Power Systems Institute, Darmstadt University of Technology, Darmstadt,2004.[6] G. Latorre, et al., "Classification of publications and models on transmission expansionplanning," Power Systems, IEEE Transactions on, vol. 18, pp. 938-946, 2003.[7] C. Lee, et al., "Transmission expansion planning from past to future," in IEEE PES,Power System Conference and Exposition, 10.1109/PSCE, 2006, pp. 257-265.[8] L. L. Garver, "Transmission network estimation using linear programming," PowerApparatus and Systems, IEEE Transactions on, pp. 1688-1697, 1970.[9] G. Latorre-Bayona and I. J. Perez-Arriaga, "Chopin, a heuristic model for long termtransmission expansion planning," Power Systems, IEEE Transactions on, vol. 9, pp.1886-1894, 1994.[10] M. Mirhosseini and A. Gharaveisi, "Transmission Network Expansion Planning with aHeuristic Approach," International Journal of Electronics Engineering 2, vol. 2, pp. 235-237, 2010.[11] M. V. F. Pereira and L. M. V. G. Pinto, "Application of sensitivity analysis of loadsupplying capability to interactive transmission expansion planning," Power Apparatusand Systems, IEEE Transactions on, pp. 381-389, 1985.Reference84[12] I. Sánchez, et al., "Transmission-expansion planning using the DC model and nonlin-earprogrammingtechnique," in IEE Proceeding Generation, Transmission and Distribution,

45

Page 46: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

2005, pp. 763-769.[13] A. Monticelli, et al., "Interactive transmission network planning using a least-effortcriterion," Power Apparatus and Systems, IEEE Transactions on, pp. 3919-3925, 1982.[14] I. Sánchez, et al., "Interior point algorithm for linear programming used in transmissionnetwork synthesis," Electric Power Systems Research, vol. 76, pp. 9-16, 2005.[15] R. Romero, et al., "Constructive heuristic algorithm for the DC model in networktransmission expansion planning," in Proc. IEE-Gen. Transm. Dist., 2005, pp. 277-282.[16] M. Rider, et al., "Power system transmission network expansion planning using ACmodel," Generation, Transmission & Distribution, IET, vol. 1, pp. 731-742, 2007.[17] E. J. deOliveira, et al., "Transmission system expansion planning using a sigmoidfunction to handle integer investment variables," Power Systems, IEEE Transactions on,vol. 20, pp. 1616-1621, 2005.[18] R. Bennon, et al., "Use of sensitivity analysis in automated transmission planning,"Power Apparatus and Systems, IEEE Transactions on, pp. 53-59, 1982.[19] V. Levi and M. Calovic, "Linear-programming-based decomposition method for optimalplanning of transmission network investments," Generation, Transmission andDistribution [see also IEE Proceedings-Generation, Transmission and Distribution], IEEProceedings, vol. 140, pp. 516-522, 1993.[20] R. Villasana, et al., "Transmission network planning using linear programming," PowerApparatus and Systems, IEEE Transactions on, pp. 349-356, 1985.[21] J. C. Kaltenbach, et al., "A mathematical optimization technique for the expansion ofelectric power transmission systems," Power Apparatus and Systems, IEEE Transactionson, pp. 113-119, 1970.[22] Z. M. Al-Hamouz and A. S. Al-Faraj, "Transmission expansion planning using nonlinearprogramming," in Proc. 2002 IEEE Power Eng. Soc. Transmission and DistributionCOnf., 2002, pp. 50-55 vol. 1.[23] M. Pereira, et al., "A decomposition approach to automated generation/transmissionexpansion planning," Power Apparatus and Systems, IEEE Transactions on, pp. 3074-3083, 1985.

[24] X. Jingdong and T. Guoqing, "The application of genetic algorithms in the multiobjec-tivetransmission network planning," in Proc. 4th Int. Conf. on Advances in PowerSystem Control , Operation and Management 1997, pp. 338-341 vol. 1.

[25] R. Gallego, et al., "Transmission system expansion planning by an extended geneticalgorithm," in Proc. IEE-Gen. Transm. Dist. , 1998, pp. 329-335.[26] E. L. Da Silva, et al., "Transmission network expansion planning under an improvedgenetic algorithm," Power Systems, IEEE Transactions on, vol. 15, pp. 1168-1174, 2000.[27] H. Gil and E. Da Silva, "A reliable approach for solving the transmission networkexpansion planning problem using genetic algorithms," Electric Power Systems Research,vol. 58, pp. 45-51, 2001.

[28] K. Yoshimoto, et al., "Transmission expansion planning using neuro-computinghybridized with genetic algorithm," 1819, p. 126.[29] R. Romero, et al., "Transmission system expansion planning by simulated annealing,"Power Systems, IEEE Transactions on, vol. 11, pp. 364-369, 1996.[30] R. Gallego, et al., "Parallel simulated annealing applied to long term transmissionnetwork expansion planning," Power Systems, IEEE Transactions on, vol. 12, pp. 181-

46

Page 47: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

188, 1997.

[31] E. L. Da Silva, et al., "Transmission network expansion planning under a tabu searchapproach," Power Systems, IEEE Transactions on, vol. 16, pp. 62-68, 2001.[32] S. Binato, et al., "A greedy randomized adaptive search procedure for transmissionexpansion planning," Power Systems, IEEE Transactions on, vol. 16, pp. 247-253, 2001.

[33] P. Linares, "Multiple criteria decision making and risk analysis as risk management toolsfor power systems planning," Power Systems, IEEE Transactions on, vol. 17, pp. 895-900, 2002.[34] P. Vasquez and F. Olsina, "Flexibilit Value of Distribution Generation in transmissionPlanning," InTech, pp. 352-384, 2010.[35] B. Gorenstin, et al., "Power system expansion planning under uncertainty," PowerS4] D. J. S. a. A. V. N. Sun, "A Comparison of Methodologies Incorporating Uncertaintiesinto Power Plant Investment Evaluations," presented at the 29th IAEE InternationalConference, June 2006.[36] M. Carrión, et al., "Vulnerability-constrained transmission expansion planning: Astochastic programming approach," Power Systems, IEEE Transactions on, vol. 22, pp.1436-1445, 2007.[37] H. Agabus, et al., "Optimal investment strategies for energy sector under uncertainty,"2006, pp. 120–123.[38] M. R. Bussieck and A. Pruessner, "Mixed-integer nonlinear programming," SIAG/OPTNewsletter: Views & News, vol. 14, pp. 19–22, 2003.[39] P. Kesavan, et al., "Outer approximation algorithms for separable nonconvex mixedinte-gernonlinear programs," Mathematical Programming, vol. 100, pp. 517-535, 2004.[40] A. J. Wood and B. F. Wollenberg, Power generation, operation, and control, 2nd ed.New York: Jhon Wiley and Sons, Inc, 1996.[41] F. Capitanescu, et al., "Interior-Point based Algorithm for the Solution of Optimal PowerFlow Problems," Electrical Power Systems Research 77, pp. 508-517, 2006.[42] R. Romero, et al., "Test systems and mathematical models for transmission networkexpansion planning," in IEE Proceedings Generation, Transmission and Distribution,2002, pp. 27-36.[43] J. Alseddiqui and R. Thomas, "Transmission expansion planning using multi-objectiveoptimization," 2006, pp. 1-8.[44] P. Joskow, "Patterns of transmission investment," 2006.[45] R. Fang and D. J. Hill, "A new strategy for transmission expansion in competitiveelectricity markets," Power Systems, IEEE Transactions on, vol. 18, pp. 374-380, 2003.[46] N. Leeprechanon, et al., "Optimal Transmission Expansion Planning Using Ant ColonyOptimization," Journal of Sustainable Energy & Environment, vol. 1, pp. 71-76, 2010.[47] D. Guatam and M. Nadarajah, "Influence of Distributed Generators on Congestion andLMP in Competitive Electricity Market," International Journal of Electrical andElectronics Engineering, pp. 538-545, 2010.ystems, IEEE Transactions on, vol. 8, pp. 129-136, 1993.

6.APPENDIX 47

Page 48: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

A . DCLF.m

clearclcnum=14;%% Problem inputs:busd = busdata;%% Busdata: Required bus data:%% Busdata(:,1): bus number%% Busdata(:,2): bus type 3=slack bus, 2=PV buses 1=PQ buses%% Busdata(:,3): bus generation%% Busdata(:,4): bus loadLinedata = linedata;%% Linedata: required branch data:%% Linedata(:,1): branch ID%% Linedata(:,2): branch source bus%% Linedata(:,3): branch destination bus%% Linedata(:,4): branch resistance%% Linedata(:,5): branch reactance%% Linedata(:,6): branch thermal loading%% Linedata(:,7): branch circuit ID%% Lg: load growthLg = null(1,1);%% Problem outputs:% Normal condition[Angle_r,Angle_d, Pf, Ol, Sol] = PFDC(busd, linedata, Lg);%% Angle_r: voltage phase (radian)%% Angle_d: voltage phase (degree)%% Pf: flow of branches%% Ol: over load amount of each branches%% Sol: sum of all overloads% N-1 condition[Col, Old] = contigent(busd, linedata, Lg);%% Col: total overload of each contingency%% Old: over load and power flow data of all branchs % in each contingency%% Printing the obtained results in both command window and% in result1.txt in the ANEP directoryfid = fopen('results.txt', 'wt');fprintf(fid, '********************************************');fprintf(fid, '*************************');fprintf(fid,'\n Normal');fprintf(fid,' condition\n');fprintf(fid, '********************************************');fprintf(fid,'*************************\n');fprintf(fid,'\n***************Bus data******************\n');fprintf(fid, ' No. bus Voltage angle (Rad)\n'); fprintf(fid, '*************** *******************\n'); for i = 1:size (busd,1);fprintf(fid, ' %10.0f %27.5f \n', ...busd(i), Angle_r(i,1)); endif Sol == 0 fprintf(fid, '\n No overload in normal condition\n');elseNL = size (linedata,1);fprintf(fid, '\n Overload at normal:');fprintf(fid,'\n Total overload of normal condition is'); fprintf(fid,' %3.5f pu\n',Sol);

48

Page 49: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

fprintf(fid, '***************************************'); fprintf(fid, '*************************************');fprintf(fid,'\n*************** Power flow and overload');fprintf(fid,' values of branches *****************\n');fprintf(fid, '****************************************');fprintf(fid, '************************************\n');fprintf(fid, '\n From bus To bus Circuit ID ');fprintf(fid, ' Line flow (pu) Overload (pu)\n');for i = 1 : NLfprintf(fid,'\n %1.0f %14.0f %15.0f %20.5f %20.5f\n'..., Ol(i,:)); endendfprintf(fid, '\n\n***************************************'); fprintf(fid, '*******************************************'); fprintf(fid, '*******');fprintf(fid,'\n N-1 condition\n');fprintf(fid, '*********************************************');fprintf(fid, '********************************************');if(Col == 0)fprintf(fid, '\n No overload in N-1 condition\n');fprintf(fid, '\n************************************\n');elsefprintf(fid, '\n*************************************'); fprintf(fid, '***************************************'); fprintf(fid, '*************\n');LCOL=Old{size (Col,1),1};fprintf(fid, ' Overload values of ');fprintf(fid, 'branches in N-1 condition');for i = 1 : size (Old,1) iOLD = Old{i,1}; iL = iOLD(1,:);fprintf(fid,'\n********************************');fprintf(fid,'**********************************');fprintf(fid,'***********************\n');fprintf(fid,' Total overload for outage of line: ');fprintf(fid,'');fprintf(fid,'From bus %3.0f to bus %3.0f and',iL(1:2));fprintf(fid,' circuit ID %3.0f is %6.5f pu\n',iL(3:4));fprintf(fid,'************************************');fprintf(fid,'************************************');fprintf(fid,'*****************\n');fprintf(fid,' following lines are overloaded in');fprintf(fid,' this outage\n');fprintf(fid,'*************************************');fprintf(fid,'**************************************');fprintf(fid,'**************\n');fprintf(fid,' From Bus To Bus Circuit ID ');fprintf(fid,'Overload (pu)\n');fprintf(fid,' ******* ****** ********** ');fprintf(fid,'***********');for j = 2 : size (iOLD,1);fprintf(fid,'\n %5.0f %10.0f %8.0f %18.5f\n',...iOLD(j,:)); endendendfclose(fid); %% Print in the command windowfprintf('*************************************************');

49

Page 50: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

fprintf('********************');fprintf('\n Normal condition\n');fprintf('*************************************************');fprintf('********************\n');fprintf('\n***************Bus data******************\n');fprintf(' No. bus Voltage angle (Rad)\n');fprintf('*************** *******************\n');for i = 1 : size (busd,1);fprintf(' %10.0f %27.5f \n', busd(i), Angle_r(i,1));endif Sol == 0 fprintf('\n No overload in normal Condition\n');elseNL = size (linedata,1);fprintf('\n overload at Normal:');fprintf('\n Total overload of normal condition is ');fprintf('%3.5f pu\n',Sol); fprintf('********************************************');fprintf('********************************');fprintf('\n**************** Power flow and overload ');fprintf('values of branches ****************\n');fprintf('*******************************************');fprintf('*********************************\n');fprintf('\n From bus To bus Circuit ID ');fprintf(' Line flow (pu) Overload (pu)\n'); for i = 1 : NLfprintf('\n %6.0f %12.0f %14.0f %16.5f %19.5f\n',...Ol(i,:)); endendfprintf('\n\n**********************************************');fprintf('*******************************************');fprintf('\n N-1 condition\n');fprintf('**************************************************');fprintf('***************************************\n');if(Col == 0)fprintf('\n No overload in N-1 condition\n');fprintf('\n************************************\n'); elsefprintf('\n********************************************');fprintf('*********************************************\n');LCOL=Old{size (Col,1),1};fprintf(' Overload values of branches in');fprintf(' N-1 condition');for i = 1 : size (Old,1) iOLD = Old{i,1}; iL = iOLD(1,:);fprintf('\n***************************************');fprintf('*****************************************');fprintf('*********\n');fprintf(' Total overload for outage of line: from ');fprintf('bus %3.0f to bus %3.0f and ',iL(1:2));fprintf('circuit ID %3.0f is %6.5f pu\n',iL(3:4)); fprintf('*****************************************');fprintf('*****************************************');fprintf('*******\n');fprintf(' Following lines are overloaded ');fprintf('in this outage\n');fprintf('*****************************************');fprintf('*****************************************');

50

Page 51: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

fprintf('*******\n');fprintf(' From Bus To Bus Circuit ID ');fprintf('Overload (pu)\n');fprintf(' ******* ****** ********** ');fprintf('***********');for j = 2 : size (iOLD,1); fprintf('\n %5.0f %10.0f %8.0f %18.5f\n',...iOLD(j,:));endendend

B. contingent.m

function[Col, Old] = contigent(busdata, linedata, Lg) if nargin<3 || isempty(Lg), Lg = 0;end%% Problem inputs:%% Busdata: required data of network buses:%% Busdata(:,1): bus number%% Busdata(:,2): bus type 3=slack bus, 2=PV buses 1=PQ buses%% Busdata(:,3): bus generation%% Busdata(:,4): bus load%% Linedata: required data of network branches:%% Linedata(:,1): branch ID%% Linedata(:,2): branch source bus%% Linedata(:,3): branch destination bus%% Linedata(:,4): branch resistance%% Linedata(:,5): branch reactance%% Linedata(:,6): branch thermal loading%% Linedata(:,7): branch circuit ID%% Lg: load growth%% Outputs%% Col: total overload of each contingency%% Cnis: total number of islands in each contingency%% Old: over load and power flow data of all branchs% in each contingency%% Computing overload and power flow data in each contingency% (each iteration) and summing all overloads (Col);Col = 0;for i = 1:size (linedata, 1)%% Updating Linedata after outage of each branchesl = setxor (linedata (:,1), i); %Exsiting branchsulinedata = linedata; ulinedata(i,4) = 10^10;ulinedata(i,5) = 10^10; ULD = ulinedata;ulinedata1 = linedata(esl,:); ULD1 = ulinedata1; UBD = busdata; nbus = size(busdata,1);%% Running dc power flow for updated bus data (UBD) and % updated line data (ULD)[angle_r,angle_d, PF, OL, SOL] = PFDC(UBD, ULD, Lg);%% Computing overload and power flow data of all branchs % in each contingency (each iteration)Col = Col+SOL;OL(:,4) = []; idOL = find(OL(:,4) ~= 0); OLF = OL(idOL,:); IOL(1,1) = linedata(i,2); IOL(1,2) = linedata(i,3);IOL(1,3) = linedata(i,7); IOL(1,4) = SOL;for j = 2:size(OLF,1)+1

51

Page 52: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

IOL(j,:) = OLF(j-1,:); endOld{i,1} = IOL;clearIOLend

C. PFDC.m

function [Angle_r,Angle_d, Pf, Ol, Sol] = ...PFDC(busdata, linedata, Lg) if nargin<3 || isempty(Lg), Lg = 0;end%% Problem outputs:%% Angle_r: voltage phase (radian)%% Angle_d: voltage phase (degree)%% Pf: flow of branches%% Ol: over load amount of each branches%% Sol: sum of all overloads%% Problem inputs:%% Busdata: required bus data:%% Busdata(:,1): bus number%% Busdata(:,2): bus type 3=slack bus, 2=PV buses 1=PQ buses%% Busdata(:,3): bus generation%% Busdata(:,4): bus load%% Linedata: required branch data:%% Linedata(:,1): branch ID%% Linedata(:,2): branch source bus%% Linedata(:,3): branch destination bus%% Linedata(:,4): branch resistance%% Linedata(:,5): branch reactance%% Linedata(:,6): branch thermal loading%% Linedata(:,7): branch circuit ID%% Lg: load growth%% Conversion block; to convert buses names% to consecutive numbersBusname=busdata(:,1);nbus = length(Busname);Busnumber = 1:nbus; NL = linedata(:,2);NR = linedata(:,3);%save namedata Busname Busnumber NL NRfor i = 1:length(NL)for j = 1:length(Busnumber); if NL(i) == Busname(j) nnl(i) = Busnumber(j); endif NR(i) == Busname(j) nnr(i) = Busnumber(j); endendendLD = linedata; LD(:,2) = nnl; LD(:,3) = nnr'; BD = busdata; BD(:,1) = Busnumber; %% Ybus calculation[Ybus, linedata, busdata] = Ybuscal(BD, LD, Lg);%% Load flow calculationnbus = size (busdata,1);nl = linedata(:,2);nr = linedata(:,3);

52

Page 53: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

Smax = linedata(:,7);nbr = length(nl); Ps1 = (busdata(:,4)-busdata(:,3)); baseMva=100;Mv=baseMva;Pmax=(Smax/Mv);%% Finding non-slack buses in the busdata matrixcode = busdata(:,2); [aa]=find(code~=3);for n = 1:length(aa)for m = 1:length(aa)Ymn = Ybus(aa(n),aa(m)); B(n,m) = -imag(Ymn); endPs(n,1) = Ps1((aa(n)),1);endBinv = inv(B); ang1 = Binv*Ps;Angle_r = zeros(nbus,1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%end%% Calculation Power flow and over load valuesfor i = 1 : length(aa)aaa = aa(i);Angle_r(aaa) = ang1(i);endAngle_d = Angle_r*(180/pi);jay = sqrt(-1); for i = 1:nbr Pf(i,1) = NL(i); Ol(i,1)=NL(i); Pf(i,2) = NR(i); Ol(i,2)=NR(i); Pf(i,3) = linedata(i,7); Ol(i,3)=linedata(i,7); Pf(i,4) = ((Angle_r(nl(i))-Angle_r(nr(i)))/...(linedata(i,5))/Mv);if abs(Pf(i,4))>Pmax(i)Ol(i,4) = Pf(i,4);Ol(i,5) = abs(Pf(i,4))-Pmax(i);elseOl(i,4) = Pf(i,4);Ol(i,5) = 0;endendSol = sum(Ol(:,5)); end

D. busdata.m

function busd = busdatas(num)

% no type Pd Pg Qd Vm Va baseKV Vmax Vminbusd = [ 1 3 0 2.32 0 1.06 0 132 1.06 0.94; 2 2 21.7 0.4 12.7 1.045 -4.98 132 1.06 0.94; 3 2 94.2 0 19 1.01 -12.72 132 1.06 0.94; 4 1 47.8 0 -3.9 1.019 -10.33 132 1.06 0.94; 5 1 7.6 0 1.6 1.02 -8.78 132 1.06 0.94; 6 2 11.2 0 7.5 1.07 -14.22 132 1.06 0.94; 7 1 0 0 0 1.062 -13.37 132 1.06 0.94; 8 2 0 0 0 1.09 -13.36 132 1.06 0.94;

53

Page 54: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

9 1 29.5 0 16.6 1.056 -14.94 132 1.06 0.94; 10 1 9 0 5.8 1.051 -15.1 132 1.06 0.94; 11 1 3.5 0 1.8 1.057 -14.79 132 1.06 0.94; 12 1 6.1 0 1.6 1.055 -15.07 132 1.06 0.94; 13 1 13.5 0 5.8 1.05 -15.16 132 1.06 0.94; 14 1 14.9 0 5 1.036 -16.04 132 1.06 0.94;];% busd = Bus_Data14;end

E. candidatedata.m

function Candid = Candidatedata %% Candidatedata% No fbus tbus r x b Smax Length(km) capacity cost($)% Length(km)capacity costCandid = [ 1 1 2 0.0192 0.0575 0.0528 80 20 1 1820000 2 1 5 0.0452 0.1652 0.0408 100 19 1 1729000 3 1 6 0.057 0.1737 0.0368 100 2 1 1911000 4 1 12 0.0132 0.0379 0.0084 100 15 1 1365000 5 2 3 0.0472 0.1983 0.0418 100 18 1 1638000 6 2 4 0.0581 0.1763 0.0374 100 26 1 2366000 7 2 5 0.0119 0.0414 0.009 80 10 1 910000 8 3 4 0.046 0.116 0.0204 80 17.5 1 1592500 9 4 5 0.0267 0.082 0.017 90 10 1 91000010 4 6 0.012 0.042 0.009 150 6 1 54600011 4 7 0 0.208 0 150 4 1 36400012 4 8 0 0.556 0 150 5 1 45500013 5 6 0 0.208 0 80 5 1 45500014 5 9 0 0.11 0 80 10 1 91000015 6 9 0 0.256 0 90 6 1 54600016 6 10 0 0.14 0 90 7 1 63700017 6 11 0.1231 0.2559 0 90 6 1 54600018 6 12 0.0662 0.1304 0 70 9 1 81900019 6 13 0.0945 0.1987 0 70 10 1 91000020 7 8 0.221 0.1997 0 90 4 1 36400021 7 9 0.0524 0.1923 0 90 3 1 27300022 8 9 0.1073 0.2185 0 90 4 1 36400023 9 10 0.0639 0.1292 0 90 4 1 36400024 9 14 0.034 0.068 0 100 6 1 54600025 10 11 0.0936 0.209 0 100 4 1 36400026 10 14 0.0324 0.0845 0 100 3 1 27300027 11 13 0.0348 0.0749 0 100 5 1 45500028 11 14 0.0727 0.1499 0 90 4 1 36400029 12 13 0.0116 0.0236 0 90 6 1 54600030 13 14 0.1 0.202 0 100 6 1 989800

];end

F. contingency.m

54

Page 55: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

function[COL, Cnis, OLD] = contingency(linedata, busdata)if isempty(busdata) fprintf('Input argument "busdata" containing the');fprintf(' information of buses.');error('"busdata" is undefined.');endif isempty(linedata) fprintf('Input argument "linedata" containing the');fprintf(' information of lines.');error('"linedata" is undefined.');end%% Problem outputs%% COL: total overload of each contingency%% Cnis: total number of islands in each contingency%% OLD: over load and power flow data of all lines% in each contingency%% Problem inputs:%% busdata: required data of network buses%% linedata: required data of network lines%% Computing overload and power flow data in each contingency% (each iteration) and summing all overloads (COL);Cnis=0;COL = 0;for i = 1:size (linedata, 1)%% Updating linedata after outage of each lineesl = setxor (linedata (:,1), i); % Exsiting linesulinedata = linedata; ulinedata(i,4) = 10^10;ulinedata(i,5) = 10^10; ULD = ulinedata;ulinedata1 = linedata (esl,:); ULD1 = ulinedata1;%% Computing number of islands in each contingencynl = ULD1(:,2); nr = ULD1(:,3);%% Exsiting buses:nbs = intersect (busdata (:,1), union(nl,nr)); Is = setxor(nbs,busdata (:,1)); % Islanded busesUBD = busdata;nbus = size(busdata,1);Os = Solution; % Optimal solutional = find(Os~=0);lengh=al;Cnis=Cnis+lengh(Is); % Number of islands%% Computing Ybus for updated bus data (UBD) and updated % line data (ULD) for each contingency [Ybus]= ybus_calc(UBD, ULD, [], [],[], []);%% Running dc power flow for UBD and ULD[angle_r,angle_d, PF, OL, SOL]= dcpf(UBD, ULD,Ybus);%% Computing overload and power flow data of all lines % in each contingency (each iteration)COL=COL+SOL; OL(:,3)=[]; idOL= OL(:,3)~=0;OLF=OL(idOL,:); IOL(1,1)=linedata(i,2);IOL(1,2)=linedata(i,3); IOL(1,3)=SOL; for j=2:size(OLF,1)+1IOL(j,:)=OLF(j-1,:);endOLD{i,1}=IOL; clearIOLend

55

Page 56: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

G. dcpf.m

function[angle_r,angle_d, PF, OL, SOL] = ...dcpf(busdata, linedata,Ybus)if nargin<3 || isempty(Ybus)fprintf('Input argument "Ybus" ');

endif nargin<2 || isempty(linedata)fprintf('Input argument "linedata" containing the');fprintf(' information of lines.');error('"linedata" is undefined.');endif isempty(busdata)fprintf('Input argument "busdata" containing the');fprintf(' information of buses.');error('"busdata" is undefined.');end%% Problem outputs:%% angle_r: voltage angle based on radian%% angle_d: voltage angle based on degree%% PF: power flow data of lines%% OL: overload information of lines%% SOL: total overload of the network%% Problem inputs:%% busdata: required data of network buses%% busdata: required data of network lines%% Ybus: computed ybus of the netowrknbus = size (busdata,1);nl = linedata(:,2);nr = linedata(:,3);Smax = linedata(:,7);nbr = length(nl);%% Computing net power of busesPs1 = (busdata(:,3)-busdata(:,4)); %% Finding non-slack buses in the busdata matrixcode = busdata(:,1); [aa] = find(code~=3);%% Forming Network suceptance matrix (B)

for n = 1:length(aa)for m = 1:length(aa)Ymn = Ybus(aa(n),aa(m));B(n,m) = -imag(Ymn); endPs(n,1) = Ps1((aa(n)),1);end%% Computing voltage angle values of all busesH =inv(B(n,m)); ang1 = H*Ps;%% angle_r: volatge angle based on radianangle_r=null(nbus,1);for i=1: length(aa)aaa = aa(i);angle_r(aaa) = ang1(i);end%% angle_d: voltage angle based on degreeangle_d = angle_r*(180/pi);%% Computing Power flow and overload of all lines

56

Page 57: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

for i = 1:nbr PF(i,1) = nl(i); OL(i,1) = nl(i);PF(i,2) = nr(i); OL(i,2) = nr(i);PF(i,3) = ((nl(i)-(nr(i))/(linedata(i,5))));if abs(PF(i,3))>Smax(i)OL(i,3) = abs(PF(i,3));OL(i,4) = abs(PF(i,3))-Smax(i);elseOL(i,3) = PF(i,3);OL(i,4) = 0;endend%% Computing total overload of the networkSOL = sum(OL(:,4));

end

H. gendata.m

function Gend =Gendata% generator data% bus Pg(mx) Pg(mn) Qg Qmax Qmin Vg mBase status Pmax PminGend = [ 1 200 50 -16.1 10 0 1.06 100 1 360.2 0; 2 80 20 50 50 -40 1.045 100 1 140 0; 5 50 15 37 40 -40 1.01 100 1 100 0; 8 35 10 37.3 40 -10 1.01 100 1 100 0; 11 30 10 16.2 24 -6 1.082 100 1 100 0; 13 40 12 10.6 24 -6 1.071 100 1 100 0;];

I. Linedata.m

function Linedata = linedata %% Linedata% no fbus tbus r x b Smax length(km) cost($) Linedata = [ 1 1 2 0.01938 0.05917 0.0528 99 20 1820000 ; 2 1 5 0.05403 0.22304 0.0492 140 19 1792000 ; 3 2 3 0.04699 0.19797 0.0438 67 18 1638000 ; 4 2 4 0.05811 0.17632 0.034 67 26 2366000 ; 5 2 5 0.05695 0.17388 0.0346 145 10 910000 ; 6 3 4 0.06701 0.17103 0.0128 80 17.5 1592500 ; 7 4 5 0.01335 0.04211 0 65 10 910000 ; 8 4 7 0 0.20912 0 98 4 364000 ; 9 4 9 0 0.55618 0 115 5 455000 ; 10 5 6 0 0.25202 0 100 5 455000 ;

57

Page 58: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

11 6 11 0.09498 0.1989 0 87 6 546000 ; 12 6 12 0.12291 0.25581 0 82 9 819000 ; 13 6 13 0.06615 0.13027 0 98 10 910000 ; 14 7 8 0 0.17615 0 135 4 364000 ; 15 7 9 0 0.11001 0 110 3 273000 ; 16 9 10 0.03181 0.0845 0 75 4 364000 ; 17 9 14 0.12711 0.27038 0 85 6 546000 ; 18 10 11 0.08205 0.19207 0 113 4 364000 ; 19 12 13 0.22092 0.19988 0 56 6 546000 ; 20 13 14 0.17093 0.34802 0 92 6 989800 ;

]; end

J. linetype.m

function LineType = linetype%%%% copper alluminium brass croded LineType= [ 1 2 3 4 5 6 7

];

end

K. total_cost.m

function[TC]=Total_Cost(Isolnew, Solution, candid, linetype) In=Isolnew;TC=0;for i=1:length (In)TC=TC+(candid(In(i),8))*candid(In(i),10)*Solution(In(i));end

L. ybus_calc.m

function[Ybus, linedata, busdata, nIs, nbus, bus_number]...= ybus_calc(busdata, linedata, Solution, ...Candidatedata, linetype, Lg)if isempty(Lg), Lg = 0;endif isempty(linedata) fprintf('Input argument "linedata" containing the');fprintf(' information of network lines.');error('"linedata" is undefined.');endif isempty(busdata)fprintf('Input argument "busdata" containing the');fprintf(' information of network buses.');error('"busdata" is undefined.');end%if nargin<3 | isempty(Solution), linedata = Linedata; end ??%% Problem outputs:%% Ybus: admittance matrix%% Bdata: data of network buses after considering load growth

58

Page 59: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

%% Ldata: data of network lines after adding candidate lines%% Nis: number of islands in the base network%% Nbus: number of buses%% Problem inputs: %% Busdata: data of the network buses%% Linedata: data of the network lines%% Candid: candidate lines%% Linetype: data of different line types%% Lg: load growth rateBd = busdata;Ld = linedata; Sol = Solution; Cl = Candidatedata;Lt = linetype; %% Finding suggested solutions %%Iz = find (Solution~=0);nIz = length(Iz); nline = size (linedata,1); for i = 1:nIz %s=nIz;%s=size(1:101);can(1,1) = size (linedata,1)+i; can(1,2) = Cl(Iz(i),2);can(1,3) = Cl(Iz(i),3); %candid(1,4)=(Lt((Cl(Iz(i),4)),2)*Cl(Iz(i),5))/...% (Cl(Iz(i),6));can(1,4) = 0;can(1,5) = Cl(Iz(i),5);can(1,6) = Cl(Iz(i),6);can(1,7) = Cl(Iz(i),7);can(1,8) = Cl(Iz(i),8);can(1,8)=Cl(Iz(i),9);can(1,9)=Cl(Iz(i),10);%can(1,10)=0;%can(1,11)=0;can(1,:)Ld(nline+i,:) = can(1,:);endlinedata = Ld; exl = size (linedata,1); %% Islanding detection and updating busdatabusnumber = Bd(:,1);nl = Ld(:,2);nr = Ld(:,3);nlr = union(nl,nr); %Is = setdiff(nlr,busnumber);Is = setxor(nlr,busnumber); bus_number = setxor(busnumber,Is); nbus = length(bus_number); nIs = length (Is); for j = 1:nbusbusdata (j,:) = bus_number(j,:); endbusdata(:,4) = busdata(:,4).*(1+Lg); busdata(:,5) = ...busdata(:,5).*(1+Lg);j = sqrt(-1); i = sqrt(-1); X = Ld(:,5);%r=Ld(:,4);nbr = length(Ld(:,1));Z = (j*X);

59

Page 60: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

y = ones(nbr,1)./Z; % Branch admittanceYbus = zeros(nbus,nbus); % Initialize Ybus to zero%% Formation of the off diagonal elementsfor k = 1:nbrYbus(nl(k),nr(k)) = Ybus(nl(k),nr(k))-y(k); Ybus(nr(k),nl(k)) = Ybus(nl(k),nr(k));end%% Formation of the diagonal elementsfor n = 1:nbusfor m = (n+1):nbusYbus(n,n) = Ybus(n,n)-Ybus(n,m); endfor m = 1:n-1 Ybus(n,n) = Ybus(n,n)-Ybus(n,m); endend

M. bs.m

function[Os, Adline, Noll, Coll, Angle, Mof] = bs...(busdata, linedata, Candid, linetype, Solution, ...Contingency, Lg, Mof) if nargin<8 || isempty(Mof) Mof = 10^20;endif nargin<7 || isempty(Lg) Lg = 0; Mof = 10^20; endif nargin<6 || isempty(Contingency) Contingency = 0;Lg = 0; Mof = 10^20;endif nargin<5 || isempty(Solution)Solution =ones(size(Candid,1),1);Contingency = 0;Lg = 0;Mof =10^20;endif nargin<4 || isempty(linetype)fprintf('Input argument "linetype" containing the');fprintf(' information of different types of lines.');error('"linetype" is undefined.');endif nargin<3 || isempty(Candid)fprintf('Input argument "Candid" containing the');fprintf(' information of candidate lines.');error('"Candid" is undefined.');endif nargin<2 || isempty(linedata)fprintf('Input argument "linedata" containing');fprintf(' the information of existing lines.');error('"linedata" is undefined.');end%% Problem outputs:%% Os: optimal solution of the NEP problem %% Adline: final set of selected candidate lines among % all candidates.%% Noll: overload of the existing and selected candidate

60

Page 61: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

% lines in normal condition after adding optimal candidate% line in each iteration (or in order of priority)%% Coll: overload of the existing and selected candidate lines% in N-1 condition after adding optimal candidate line% in each iteration%% Angle: voltage phase of all buses for adding the best% candidate line to the network%% Problem inputs:%% Busdata: data of the network buses%% Linedata: data of the network lines%% Candid: data of candidate lines%% Linetype: data of different line types%% Solution: the initial solution, which is a zero vector% for hybrid search algorithm%% Contingency: if contingency = 1, the problem is solved% by considering N-1 condition%% Lg: load growth rate%% Mof: minimum fitness, which is kept at high value for% the first iteration of the forward search algorithmnc = size (find(Solution ~= 0),1);%% Backward search algorithm %%%% Initializationdiff = 1; SID = 0; j = 1;ii = 0; jj = 0; kk = 0;Noll = null(1); Coll = null(1);for diff=1:100 | j<=2^nc Solution1 = Solution;[isol] = find(Solution1 ~= 0); best_sol = null(1);%% Adding all candidate lines to the present set of lines and% finding the best possible candidate to be eliminated% from the set of present and added candidate lines.% This step is iterated untill the the obtained fitness% function doesn't decrease.for i = 1:length (isol)Isol = isol(i);Solution1 (Isol) = 0;%% Updating corresponding line data and bus data according% to the eliminated candidate line; constructing ybus;% computing number of islands% after each candidate is eliminated from the network.[Ybus, linedata, busdata, nIs, nbus, bus_number] ...= ybus_calc(busdata, linedata, ...Solution1, Candid, linetype, Lg);%% busdata:Updated bus data after considering new candidates%% linedata:Updated line data after considering new andidates%% Running DC Power flow for updated line data and bus data% to obtain total overload in the normal condition[angle_r, angle_d, PF, OL, SOL] = ...dcpf(busdata, linedata, Ybus);%% NOL{i,1}: total overload in case of eliminating the i-th% candidate line among the added candidatesNOL{i,1} = OL; angle{i,1} = angle_r; %% Computing the total cost (TC) after eliminating % each candidate lineIsoln = find(Solution1~=0);%% TC: Total Cost[TC] = Total_Cost(Isoln, Solution1, Candid, linetype);%% Computing total overload in N-1 condition after eliminating

61

Page 62: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

% each candidate line%% If N-1 condition is considered in the algorithm and there % is no island in normal conditionif Contingency == 1 & nIs == 0 [COL, CnIs, OLF] = contingency(linedata, busdata); %% OOLF{i,1}: total overload in N-1 condition, in case of% eliminating the i-th candidate line among not% selected candidatesOOLF{i,1} = OLF; elseCOL = 0; CnIs = 0;endnline = size (linedata,1); %% Formation of fitness function (OF: NEP Objective Function)OF = TC+(10^12*((SOL)+COL))+(10^29*((nIs)+(CnIs))); if OF < Mof diff = (Mof-OF); Mof = OF; best_sol = Isol; j = j+1;elsej = j+1;end%% Eliminating the worst candidate line from the set of% candidate lines; retrieval the power flow and% overloaddata corresponding with the selected candidate% of each iterationSolution1(Isol) = Candid(Isol,6); endbest_sol_index = isempty(best_sol);if best_sol_index == 1;breakelseSolution(best_sol) = 0;ii = ii+1; best(ii,1) = best_sol; best(ii,2) = Mof;if Contingency == 1 jj = jj+1; bsol = find (isol == best_sol);Coll{jj,1} = OOLF{bsol,1}; kk = kk+1; Noll{kk,1} = NOL{bsol,1};Angle{kk,1} = angle{bsol,1};clearangleNOLelsekk = kk+1; bsol = find(isol == best_sol);Noll{kk,1} = NOL{bsol,1};Angle{kk,1} = angle{bsol,1};clearangleNOLendendend%% Adline: final set of selected candidate lines% among all candidatesOs = Solution; % Optimal solutional = find(Os~=0);if length(al)~=0;lb = length(best_sol);

62

Page 63: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

for i = 1:length(al)Adline(i,1) = Candid(al(i),2); Adline(i,2) = Candid(al(i),3); endremoved_line=null(1);for i = 1:lbremoved_line(i,1) = Candid(best(i),2);removed_line(i,2) = Candid(best(i),3);removed_line(i,3) = (best(i,2)/10^7); endelseAdline = null(1);end

N. backwardsearch.m

clearclcnum=30;%% Reading the input data %%%% Reading data of the network busesbusd = busdatas(num);%% Reading data of the network linesCandid = Candidatedata;%% Reading data of the candidate linesLinedata = linedata;%% Reading the information of defined line typesLineType = linetype;% reading other inputsGend =Gendata;%% Lg: load growth rate, Lg=1 means 100% load growth Lg = null(1,1);%% Mof: minimum fitness, which is kept at high value for% the first iteration of the forward search algorithmMof= null(1,2); %% Contingency=1 means the problem is solved, considering% N-1 condition.Contingency = null(1,3);%% Backward search starts with considering all candidate% lines added to the base network at the beginning)Solution =ones(size(Candid,1),1);%% Calling the backward search algorithm to% solve the NEP problem[Os, Adline, Noll, Coll, Angle, Mof] = bs(busd,...Linedata, Candid, LineType, Solution, ...Contingency, Lg, Mof); %plot( bs(busd, Linedata, Candid, LineType, Solution,Contingency, Lg, Mof))%% Os: optimal solution of the NEP problem %% Adline: final set of selected candidate lines % among all candidates%% Noll: overload of the existing and selected candidate lines% in normal condition after adding optimal candidate line% in each iteration (or in order of priority)%% Coll: overload of the existing and selected candidate lines% in N-1 condition after adding optimal candidate line% in each iteration%% Angle: voltage phase of all buses for adding the best% candidate line to the network

63

Page 64: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

%% Printing and saving the obtained results in result.txt% in the corresponding directoryfid = fopen('results.txt', 'wt');fprintf(fid, '--------------------------------------');fprintf(fid,'\n Added candidate lines are as follows:\n'); fprintf(fid, '--------------------------------------\n');fprintf(fid, ' From bus To bus\n');fprintf(fid, ' -------- ------');fprintf(fid, '\n %10.0f %15.0f', Adline'); fprintf(fid, '\n\n****************************************');fprintf(fid, '*****************************');fprintf(fid,'\n Normal');fprintf(fid,' condition\n');fprintf(fid, '********************************************');fprintf(fid, '*************************\n');if(isempty(Noll) == 1)fprintf(fid, 'No overloaded in normal condition\n');elseNNOLL = Noll{size (Noll,1),1}; NL = size (Linedata,1);NS = length (find (Os ~= 0));fprintf(fid, '\n Overload at normal');fprintf(fid,'Total overload of normal condition is');fprintf(fid,'3.5pu\n',sum(NNOLL(:,4))');fprintf(fid, '****************************************');fprintf(fid, '******************************');fprintf(fid, '\n*********************** Candidate');fprintf(fid, 'branches *************************\n');fprintf(fid, '****************************************');fprintf(fid, '******************************\n');fprintf(fid, '\n From bus To bus Line flow');fprintf(fid, ' (pu) Overload (pu)\n');for i = 1:NS%fprintf(fid,'\n NNOLL(i+NL,:)');fprintf(fid, '\n %10.0f %15.0f %20.5f %20.5f\n',...NNOLL(i,:));endfprintf(fid, '***************************************'); fprintf(fid, '********************************');fprintf(fid, '\n************************ Existing');fprintf(fid, ' branches **************************\n');fprintf(fid, '***************************************'); fprintf(fid, '********************************\n');fprintf(fid, '\n From bus To bus Line flow');fprintf(fid, ' (pu) Overload (pu)\n');for i=1:NLfprintf(fid, '\n %10.0f %15.0f %20.5f %20.5f\n',...NNOLL(i,:)); %NNOLL(i,:)); endfprintf(fid, '\n******************************');fprintf(fid, '********************************');fprintf(fid, '*********\n');endnco = size (Coll,1); oc = size(nco,1);nc = size (oc,1); ocl = 0;for i = 1:ncocc = oc(i,1);

64

Page 65: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

ocl =occ(1,1); end%ifif ocl==0; fprintf(fid, '\n No overload in N-1 condition\n');fprintf(fid, '\n************************************\n');elsefprintf(fid, '\n******************************');fprintf(fid, '********************************');fprintf(fid, '*********\n');LCOLL =size(Coll,1); fprintf(fid, ' Overloaded lines in');fprintf(fid, ' N-1 condition');for i = 1: size (LCOLL,1)iLCOLL = LCOLL(i,1); iL = iLCOLL(1,:);if iL(1,1) ~= 0 fprintf(fid, '\n******************************');fprintf(fid, '********************************');fprintf(fid, '*********\n');fprintf(fid,'Total overload for outage of line');fprintf(fid, ': from bus');fprintf(fid, '%3.0f to bus %3.0f is %6.5f\n',iL); fprintf(fid, '********************************');fprintf(fid, '********************************');fprintf(fid, '*******\n');fprintf(fid,' Following lines are overloaded');fprintf(fid,' in this outage\n');fprintf(fid, '******************************');fprintf(fid, '******************************');fprintf(fid, '***********\n');fprintf(fid, ' From bus To bus');fprintf(fid, ' Overload (pu)\n');fprintf(fid, ' ******* ****** *****');fprintf(fid, '******');for j = 2:size (iLCOLL,1); fprintf(fid, '\n %6.0f %7.0f %18.5f\n',...iLCOLL(j,:));endendendendLAngle = Angle{size (Angle,1),1};fprintf(fid,'\n****************************************\n');fprintf(fid,'\n***************Bus data*****************\n');fprintf(fid, ' No. bus Voltage angle (Rad)\n');fprintf(fid, '********** *********************\n');for i = 1:size (busdatas,1);fprintf(fid, '\n %10.0f %27.5f \n', i, LAngle(1,:)); endfclose(fid); fid = fopen('results1.txt', 'wt');fprintf(fid, '--------------------------------------');fprintf(fid, '\n Added candidate lines are as follows:\n');fprintf(fid, '--------------------------------------\n');fprintf(fid, ' From bus To bus\n');fprintf(fid, ' -------- ------');fprintf(fid, '\n %8.0f %11.0f', Adline'); fprintf(fid, '\n\n****************************************');fprintf(fid, '*****************************');

65

Page 66: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

fprintf(fid, '\n Normal'); fprintf(fid, ' condition\n');fprintf(fid, '********************************************');fprintf(fid, '*************************\n');if(isempty(Noll) == 1)fprintf(fid, 'No overloaded in normal condition\n');elseNNOLL = Noll{size (Noll,1),1}; NL = size (linedata,1);NS = length (find (Os~=0));fprintf(fid, '\n Overload at normal');fprintf(fid, 'Total overload of normal condition is');fprintf(fid, '%3.5f pu\n',sum(NNOLL(:,4)));fprintf(fid, '****************************************');fprintf(fid, '******************************');fprintf(fid, '\n*********************** Candidate');fprintf(fid, ' branches *************************\n');fprintf(fid, '*************************************');fprintf(fid, '*********************************\n');fprintf(fid, '\n From bus To bus Line flow');fprintf(fid, ' (pu) Overload (pu)\n');for i=1:NSfprintf(fid, '\n %6.0f %10.0f %20.5f %20.5f\n', ...NNOLL(i,:));%fprintf(fid, '\n NNOLL(i-9,:)');endfprintf(fid, '****************************************');fprintf(fid, '*******************************');fprintf(fid, '\n************************ Existing');fprintf(fid, ' branches **************************\n');fprintf(fid, '****************************************');fprintf(fid, '*******************************\n');fprintf(fid, '\n From bus To bus Line flow');fprintf(fid, ' (pu) Overload (pu)\n');for i=1:NLfprintf(fid, '\n %6.0f %10.0f %20.5f %20.5f\n',...NNOLL(i,:)); %fprintf(fid, '\n NNOLL(i,:)');endfprintf(fid, '\n********************************');fprintf(fid, '**********************************');fprintf(fid, '*****\n');endnco=size (Coll,1); oc=size(nco,1);nc=size (oc,1); ocl=0; for i=1:ncocc=oc(i,1);ocl=occ(1,1); end%ifif ocl==0fprintf(fid, '\n No overload in N-1 condition\n');fprintf(fid, '\n************************************\n');elsefprintf(fid, '\n**************************************');fprintf(fid, '*********************************\n');LCOLL=(size (Coll,1)); fprintf(fid, ' Overloaded lines in N-1');

66

Page 67: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

fprintf(fid, ' condition');for i=1: size (LCOLL,1)iLCOLL=LCOLL(i,1);iL=iLCOLL(1,:); if iL(1,1)~=0fprintf(fid, '\n*******************************');fprintf(fid, '*********************************');fprintf(fid, '*******\n');fprintf(fid,' Total overload for outage of line');fprintf(fid, ': from bus');fprintf(fid, ' %3.0f to bus %3.0f is%6.5f\n',iL); fprintf(fid, '*********************************');fprintf(fid, '*********************************');fprintf(fid, '*****\n');fprintf(fid,' Following lines are overloaded in');fprintf(fid, ' this outage\n');fprintf(fid, '*********************************');fprintf(fid, '*********************************');fprintf(fid, '*****\n');fprintf(fid, ' From bus To bus');fprintf(fid, ' Overload (pu)\n');fprintf(fid, ' ******* ****** *******');fprintf(fid, '****');for j=2:size (iLCOLL,1); fprintf(fid, '\n %6.0f %7.0f %18.5f\n',...iLCOLL(j,:));endendendendLAngle=Angle{size (Angle,1),1};fprintf(fid,'\n*****************************************\n');fprintf(fid,'\n***************Bus Data******************\n');fprintf(fid, ' No. Bus Voltage Angle (Rad)\n');fprintf(fid, '*************** *******************\n');for i=1:size (busdatas,1);fprintf(fid, '\n %10.0f %27.5f \n', i, LAngle(1,:)); %fprintf(fid, '\n i,(LAngle(i,:)'); endfclose(fid); clctyperesults1.txt%delete results1.txt

67

Page 68: INTRODUCTION - University of Nairobieie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/NE…  · Web viewThe power generated at the generation stations is transferred to different

68