Optimal Capacity and Location for Renewable-based Microgrids Considering Economic Planning in Distribution Networks

on economic planning


INTRODUCTION 1
Today, due to the increasing need for electricity and environmental issue and economic issues, renewable energy sources (RES) are of particular importance and their use in different countries is increasing day by day.Although renewable energy sources have various challenges such as uncertainty, but due to many advantages, distributed generations (DGs) can become a suitable source of power supply [1][2][3][4].According to the US Energy Agency, microgrids, consisting of DG units, are small-scale networks at low-pressure levels that have controllable and uncontrollable loads with distributed generation sources and energy storage systems that can be exploited in grid-connected or island mode [5,6].Due to the disadvantages of current distribution networks and the need to address these problems and restructure power systems, distribution networks are moving away from the traditional model and moving towards smart distribution *Corresponding Author Email: r.aazami@ilam.ac.ir (R. Aazami) networks.Accordingly, today's networks will be a cluster of microgrids in which each microgrid can function as a separate and independent unit.The high cost of constructing microgrids is one of the most important obstacles to the expansion of these networks.Therefore, the design of this network should be done optimally and taking into account the conditions of the system under study.
The design of microgrids involves two major steps.In the first step, distributed generation resources must be located at the distribution network level to convert the passive distribution network into an active distribution network.Then, with the optimal placement of the switches in the network lines obtained from the first step, the distribution network will become a set of interconnected microgrids.Researchers have examined the location of distributed generation sources from a variety of perspectives.

RELATED WORKS
Wang and Singh [7] provided an overview of the various methods used to design microgrids.Belfkira [8] proposed an optimal method for designing microgrids considering the reliability and security of the system.The main purpose of this study is to cluster the distribution network into a set of microgrids and only reliability indicators are used to design microgrids and the economic and technical aspects of the design are not discussed.Also, the location and capacity of distributed generation resources have not been done and the possible properties of resources and network load have not been seen in the design.Sharma et al. [9] also proposed a multi-objective economic method for the design of a single microgrid in which the uncertainty property of renewable distributed generation sources is considered but the load uncertainty property is not considered.Also, network design in terms of reliability and technical issues of the system, including voltage profile, system losses, and power quality has not been discussed.The design of microgrids based on selfhealing against possible accidents in the distribution network has been investigated by Borhanazad et al. [10].
The design of multiple microgrids interconnected by the minimum cut set method was discussed by Wang and Nehrir [11].Zou et al. [12], proposed an optimal model for the design of microgrids, taking into account the uncertainty in the production of distributed renewable sources such as wind turbines and photovoltaic systems.In this study, the objective function of the problem includes the cost of installation and operation of production units and energy storage resources and the aspects of reliability and environment are not considered.An optimal multi-objective economic method for locating distributed generation sources on the medium pressure side of the distribution network using a multiobjective harmonic search algorithm has been presented by Soroudi et al. [13].The design of microgrids has been investigated by Soroudi and Afrasiab [14] considering the development of transmission lines and delaying the development of the upstream network.
The conflict between the optimal performance of the microgrids and the maximum amount of investment of the investor is one of the existing problems for the design of the microgrids, which has been solved by Fang et al. [15] by using game theory.This study proposes a twolayer game model that programs the output power of the allocated capacity of each microgrid.In the first layer, the effects of renewable energy power uncertainty are reduced, and in the second layer, the profit in the worst conditions is maximized.In this design, by repeating the process of the first and second layers, the microgrid capacity is optimized.By using the improved artificial bee colony (IABC) algorithm, an optimal structure for determining the optimal capacity of combined cooling, heating, and power (CCHP) microgrid is presented by Zhang et al. [16].One of the advantages of using this algorithm is that it takes into account the economic, energy, and environmental impacts.
There are many ways to calculate the optimal capacity and location of DGs.One of them is the use of the PSO algorithm.PSO is a meta-heuristic algorithm, developed in 1995 [17][18][19].It should also be noted that the use of meta-heuristic algorithms can be a good solution to deal with nonlinear problems in the network.Also, to solve the sizing problems of renewable energy systems, meta-heuristic algorithms and especially PSO algorithm can be an effective solution [20][21][22].Niazi and Lalwani [23] studied by using the objective function, the microgrid capacity and location optimization are performed using three algorithms, PSO, Genetic Algorithm (GA), and Imperialist Competitive Algorithm (ICA), for a 13 bus radial system.By comparing the optimization results obtained by these three algorithms, it was found that the use of the PSO algorithm has been faster and better than GA and ICA algorithms.A combined method of two algorithms PSO and GA is proposed by HassanzadehFard and Jalilian [24].This method is proposed to determine the optimal location and size of DGs in the distribution network.This method can minimize network losses and improve voltage stability.In this study, the optimal size of DG is optimized in the first stage by the PSO algorithm, then in the second stage, with the help of the GA algorithm, the optimal location of the DG is determined.This method is performed on 33 and 69 bus systems.Optimizing the location and capacity of the DG, in addition to reducing losses, can improve the voltage profile in the system.Moradi and Abedini [25] designed a simulator by using the PSO algorithm to determine the optimal location and size of the DG.The Graphical User Interface (GUI), was used to design this simulator.The DG type on which this study was performed can supply active and reactive power and has a leading power factor between 0.8 and 0.9.
The use of fuzzy systems along with the PSO algorithm can also provide a way to optimally locate the DG.This method is performed on an IEEE 33 BUS radial distributed system [26].Nagaballi et al. [27] simultaneously considered the heating, cooling, electric load, and variable load systems, a PSO algorithm is proposed to find the optimal location and size of DGs in the distribution system.This distribution system includes PVs, fuel cells, ESS, and wind turbines.A method for determining the optimal position and size of gridconnected DGs for one IEEE 33 BUS radial system, is presented by HassanzadehFard and Jalilian [28].In this method, which is to reduce power losses and improve the voltage profile, the optimal size of dg is determined in the places predicted by the PSO algorithm.
Although the design of microgrids has been reported in previous references, the design of microgrids is multiple and interconnected and has not been considered all economic, technical, environmental, and 24-hour load planning and sources and location of switches.In this paper, an optimal and comprehensive method considering economic, technical, environmental aspects and with the aim of economic planning for the operation of intelligent distribution networks is presented.Also in the proposed method, power exchanges between the microgrid and the upstream network are considered to increase the reliability of the system and reduce loading in the island mode.The proposed method has been implemented in standard distribution networks using MATLAB software and the results show the efficiency and effectiveness of the proposed method.
In the continuation of the contents, in section 2, the studied network and its details are introduced.In section 3, the proposed plan is introduced and the modeling and formulation of the problem are examined.Section 4 describes the research results and examines the numerical data resulting from the paper along with the simulations performed.A conclusion of the paper is given at the end.Table 1 shows a comparison between the methods presented in previous studies with the method presented in this paper.

PROPOSED METHOD
In this paper, a two-level planning method is proposed to determine the boundary, number, and optimal capacity of microgrids in a distribution network structure.In this method, considering that the goal is to determine the number and optimal capacity of microgrids, it is defined in two levels.In the first level, the objective function is determined based on determining the boundary, number, and optimal capacity of microgrids, and this first level function must be executed in sync with the second level function.In the second level, economic planning for a distribution network is introduced and the results of the two levels are combined and lead to determining the boundary, number, and optimal capacity of microgrids based on the economic planning of the distribution network.
The objective function of the first level is the problem of locating microgrids to reduce the cost of unsupplied energy, reducing the cost of installing switches and reducing the cost of formulated losses.In the second objective function, the economic planning model of the distribution network is presented.The purpose of operating a distribution network in economic planning is to minimize the cost of managing and operating a distribution network.
It can be said that the use of a bi-level PSO algorithm, in order to determine the boundary, number and capacity of microgrids, is the main difference between the method presented in this paper compared to similar works done in the past.

1. Study System
The model proposed in this paper is applied to the IEEE 33 Bus system.The structure of this system is shown in Figure 1.Also, the data of this network is designed under the standard 33-bus system [14].
The network uses distributed generation resources including microturbines, diesel generators, fuel cells, photovoltaic systems, wind turbines, and batteries.The output power of microturbines, diesel generators, and fuel cells can be controlled and these sources are distributable.However, the power of renewable sources, namely PV and wind turbines, depends on weather conditions.The output power of PV and wind turbine sources depends on the intensity of sunlight and wind speed, respectively.To calculate the power of these sources, it is assumed that the average value of radiation intensity and wind speed is calculated based on historical data for daylight hours.The output power values of the sources and their installation locations are given in Table 2.

2. Two-level Planning
The issue of two-level planning has been raised as an important issue in decision theory.Decision-makers usually make decisions in a hierarchical structure, and their decisions are likely to contradict each other.It should be noted that two-level models are a subset of multilevel planning problems.Two-level planning is a special mode of multi-level planning in which there are only two levels in the structure.In two-level planning, two decision-makers in a hierarchical structure try to optimize their goals in some cases that conflict with each other.The second-level decision maker optimizes his goals under the parameters taken from the first-level decision-maker.The problem of two-level planning is a non-convex problem and therefore, if the number of variables is large, it will not be possible to solve it with traditional and classical methods.Of course, it should be noted that twolevel programming models have different types, such as linear, integer, nonlinear.Multilevel planning problems involve several target sets, which must be optimized over a given area.Although there is control over decision variables at different levels, it first allows him to influence the policies of other managers so that he can optimize his objective function.

Two-level PSO Algorithm
The two-level PSO algorithm is a meta-innovative algorithm based on the PSO algorithm.This algorithm starts by assigning a batch of particles to the answer space of the problem of determining the capacity and optimal location of several microgrids and determining the initial values of these particles and continues until the condition of stopping the search process is established.The final values of the variable vector x * as the location of the keys in the first level are two-level optimization.Also, the installation location of the keys resulting from the implementation of the first stage of the algorithm as an input parameter to the economic planning model (the second level of twolevel planning).The allocation of a batch of particles to the answer space of the problem of determining the capacity and optimal location of several microgrids and determining the initial values of these particles continues the two-level PSO algorithm.The search process continues until the condition is stopped.

4. Modeling the Proposed Method
The purpose of this work is to determine the capacity and optimal location of several microgrids in a distribution network.For this network, the installation location of the distributed generation is assumed to be specific, to reduce active power losses as well as reduce the economic planning costs of the distribution network.Distributed generations have different technologies and can be renewable or non-renewable.By considering distributed generation sources whose capacity and installation location are known, a new problem is defined for the optimal location of remote-control switches that delimit the distribution network into several microgrids.This work is formulated to improve reliability, reduce losses, and minimizing the cost of keys.The variables of the first problem will be used as the data of the second problem and vice versa.The problem algorithm website is in Figure 2. In this figure, the proposed problem structure is presented to determine the boundary and the optimal capacity of the number of microgrids based on economic planning, and the two-level optimization algorithm is used accordingly.

5. 1. Formulation of Microgrid Location Problem
After determining the status of distributed generation sources, network load conditions, and power values in the distribution network, the resulting system is divided into several microgrids.As mentioned, the distribution network is divided into several microgrids through the optimal location of automatic switches.These switches act when a fault occurs in the distribution network and isolate the faulty parts of the system from the rest.Therefore, the number and position of the remote Figure 2. Modeling framework for determining the capacity and optimal location of multiple microgrids in a distribution network control keys of the network are very important and directly affect the amount of load lost after an error in the network.These switches should be located in such a way that during the formation of the microgrid after the error occurs, the load of each microgrid is close to the value of the distributed generation resources of that microgrid to minimize the load lost in these conditions.
In this case, the installation or non-installation of keys on network lines is defined as a binary variable 'X' that has  (number of network lines) binary variable.For example, if a key is installed on the fifth line, X ( 5) is equal to one, otherwise, it is equal to zero.The problem of locating microgrids is formulated to reduce the cost of reliability and reduce the cost of installing switches, which is in the form of Equation (1).
Equation ( 2) is used for the objective function of reducing reliability costs: where  is the present value of the total unladen load cost of the buses, 1 and λ1, respectively, the length and failure rate of line l, the amount of load lost in bus No. n due to fault in line l,  is the number of the bus in the system,  is Value of unheated load in bus No. n,  is economic planning interval (5 years), InfR is inflation rate (2.1%), IntR is interest rate (0.75%) and 5% load growth for each year are considered.The cost of installing the keys can be calculated from Equation (3).
where CSW is the current value of the installation cost of all keys and Cinv, SW is the installation cost of each key.Now for the first level of constraints, the objective function must be modeled.One of the most important constraints is the discussion of power balance in each microgrid.Because there must be balance in each microgrid, so the constraint of power balance and the maximum number of switches that can be installed (maximum number of acceptable microgrids) is presented as follows: Electrical losses are one of the most important technical and economic indicators of distribution networks.Losses include active and reactive power losses.Because the distribution network lines are more resistant, so only active power losses are considered here.Figure 3 shows a single-line diagram of a part of a distribution system.
Based on the explanations provided, the active power losses for the connecting line of bus i and i+1 can be calculated as Equation ( 4).Where the variables Pi and Qi represent the active and reactive power, respectively, passing through the interface of bus ain i and i 1.Also, Ri, Ii, and Vi are ohmic resistance, line current, and bus 'i' voltage, respectively.
By calculating and adding the individual losses of distribution network lines, the total losses of network lines are obtained according to Equation (6).
, = ∑   (,  + 1) Where NB is the total number of bus networks of the desired distribution network and , is the total active power loss of this network.Therefore, the cost of active power losses can be calculated from Equation (7).
)   =1  =1 (7) where  is the cost of energy losses in dollars per kilowatt-hour ($ / kWh) and T is the study period for the above problem.The period studied in the first level is considered to be five years.

5. 2. Economic Planning Model
distribution network operator purpose is to minimize the cost of losses, management, and exploitation of the resources of the desired distributed generation.Equation (8) shows the  One of the most important constraints is the set of constraints that guaranteeing the maintenance of the voltage of the network bus in the acceptable range. .In particular, these constraints prevent the voltage across the network bus from falling below the allowable voltage limit as a problem in distribution networks.Also, similar to the conventional procedure in classical load distribution, the bus voltage in the distribution post is kept constant at a certain value, just like the slack bus.
This set of constraints ensures that the amount of power intended for distributed generation resources is less than the maximum and more than the minimum allowed for their production.
Power transmission capability by distribution network feeders is limited by their current limit, which is expressed as their apparent power limit in the MVA unit.

SIMULATIONS AND NUMERICAL RESULTS
The proposed scheme is applied to the IEEE 33 Bus radial distribution network and some of its specifications are given in Figure 1 and Table 2. Based on the measures taken and the existing assumptions, the distribution network is demarcated into several microgrids.Also, the price purchase chart of energy from the upstream network in terms of daylight hours is shown in Figure 4. Now, according to the implementation of the twolevel algorithm for the 33-bus network, the following results have been obtained for this network as follows.At this stage, according to the assumed 33 bus network, the location of power generation sources, and existing microgrids, three scenarios are examined.
Scenario A. Operation and management in a traditional network Scenario B. Operation and management in a traditional network with distributed generation resources Scenario C. Operation and management in the network, which turned to several microgrids (proposed plan).
Table 3 shows the results of different scenarios.In the first scenario, since there is no key and distributed generation sources, the energy supply of the network is through the upper hand network.The cost of buying electricity from the above grid is considered to be 100  $/MWh.The cost of lost load value is also considered equal to 1000 $/MWh.In the second scenario, since distributed generation sources are used, in addition to supplying energy to the network through the upstream network, scattered production sources are used.The cost of buying electricity from the above grid is considered to be 100 dollars per megawatt hour.The cost of lost load value is also considered equal to 100 dollars per megawatt hour.Scenario C, which is proposed in this paper, is about operation and management in a network that has been converted to several microgrids, and the results are shown in Table 3.According to this table, it is clear that the answer related to the use of two keys is the best answer for the objective functions.In this case, the results of the two-level program are based on the use of two keys.Two switches in the specified feeders, which are embedded in Figure 5 for three optimal microgrids.For the optimal response selected by the two-tier algorithm, the amount of resource generation power and the power purchased from the network is shown in Figure 6.Depending on the shape during peak hours, all sources have produced their maximum power to buy the minimum power from the network.This shows that the optimal use of distribution network resources has been achieved properly.
Figure 7 also shows the charging power as well as the total charge level of the two batteries.Based on this figure, it is also clear that the battery is charged during non-peak hours and discharged during peak hours.Figure 7 shows that the initial and final charge levels of the batteries are equal, which is one of the important constraints on the operation of batteries in a certain interval.The voltage profile of all distribution system busbars for 24 hours is shown in Figure 8.In this figure,   the black curve is related to the voltage range of the system busbars in the absence of DG and microgrid, and for the other curves, the corresponding clock is specified.

CONCLUSION
In order to optimally exploit distribution networks and increase the reliability of these systems, they can be divided into several different microgrids.In this paper, the capacity and location of distributed generation and energy storage systems are assumed for a radial distribution network.In this paper, a programming-based method using the two-level PSO algorithm to determine the boundary, number, and optimal capacity of microgrids in a distribution network structure is presented.The objective function of the first level formulates the problem of locating microgrids to reduce the cost of unsupplied energy, reducing the cost of installing switches, and reducing the cost of losses.In the second objective function, the economic planning model of the distribution network is presented.The goal of the distribution network operator in economic planning is to minimize the costs of managing and operating the distribution network.The results of the three scenarios examined show that in the scenario in which the proposed plan has been implemented, the amount of unsupplied energy is reduced by 30% compared to the baseline, the cost of losses is reduced by 33% and energy purchases from the upstream network are reduced by 16% compared to other scenarios.Based on the general results, using the proposed algorithm in this work, it is possible to determine the unsupplied energy cost, losses, and installation cost of switches in such a way that a certain level of improvement in reducing operation and management costs, reducing voltage deviation and reducing load Lost to be realized.This leaves the system operator free to choose the answer and increases the flexibility of the problem.Considering that in this article, the location of microgrids is considered fixed, this work can be improved in the future by placing microgrids at the same time.

Figure 3 .
Figure 3. Single-line diagram of a part of a distribution network

FunctionF
, which represents economic planning in a distribution network, includes function 1, which is the cost of managing and operating distributed generation resources.CG is the cost of power generation by distributed generation and COM is the cost of managing distributed generation resources.KCFT is the Power generation cost factor for distributed generation resources, KOMi is the cost generation management factor for distributed generation resources.() is the output power of distributed generation sources.M is the number and type of distributed generation sources.t is a 24-hour planning period for resource utilization and management.The C2 function is a function of the cost of pollution disposal and CK is the cost of waste disposal of distributed generation units, which is equal to $ 0.136 per kilowatt-hour.The equations for active and reactive power flux in the network as well as injectable active and reactive power developed by distributed generation sources are given below:   −   = ∑ |  ||  ||  |(  +   −   )  (12)   −   = − ∑ |  ||  ||  |(  +   −   ) (13)

Figure 4 .
Figure 4. Cost of purchasing electricity from the upstream network

Figure 5 .
Figure 5.The optimal response obtained from the implementation of a two-level algorithm

Figure 6 .
Figure 6.Production capacity of each network resource for 24-hour operation

Figure 7 .Figure 8 .
Figure 7.Total battery charge and discharge capacity and storage level of network batteries in the 24-hour operation

TABLE 1 .
Comparison of the proposed method with previous works [29]re 1.IEEE 33 BUS single-line distribution structure[29]

TABLE 2 .
Assumed locations and capacities for each power source in the 33 bus network

TABLE 3 .
Results of different scenarios