Keywords

1 Introduction

The reliability and security of power systems increase power quality and voltage delivered to the load. The use of DGs, to achieve these goals is considered a lot of attention. In the past decades, the power required is generated centrally. With the beginning of the 20th century, power networks spread widely throughout a country. The regional power companies had a lot of power over the area they covered [1].

These companies monopolized the production, transmission, and distribution of power. With the advancement of technology, the electricity industry has become more competitive in different countries. Also, with the expansion of cities in different parts of a country and the construction of large industrial factories, the amount of power required to supply network loads increased. Transmission lines are highly capable of transmitting power. Therefore, creating such facilities will cost a lot of money for the relevant companies. All of the above factors have led to a wide-ranging change in how power networks are powered. DGs can be classified into two categories, renewable and non-renewable, according to Fig. 1.

Fig. 1
figure 1

Types of DGs

DGs are not new, but they are economical, and their widespread use is a new concept. DGs refer to sources that have a production capacity from a few kW to about 30 MW. These units are placed in substations and distribution feeders near the loads. The use of distribution generators transforms a network from a centralized mode of production to a radically generated network. Figure 2 shows the structure of a network with centralized production and a network with DG.

Fig. 2
figure 2

a Centralized power system b Power system with DG

Fig. 3
figure 3

The ratio of energy produced by DGs to total power

Figure 3 shows the required power of the loads that are produced from DGs relative to the total network power in Europe and Denmark. As can be seen, the production of DG power in Europe has increased from 13.4% from 1998 to 2008 to 16.7%. Also, the capacity of DGs during these ten years in Denmark has increased from 11.7 to 28.7%.

In addition to the use of DG products in distribution networks, the development of simultaneous power and heat generation systems due to technological advances and reduced investment costs, as well as the economic benefits of this energy conversion process, led to a widespread approach by major energy consumers to use this technology is becoming. The high energy efficiency of these systems on a large scale, while reducing fuel consumption and environmental pollution by 50%, is a step towards the development of the electricity industry and the benefit of DGs. In these systems, the chemical energy of the fuel is released by a primary actuator (motor or turbine) and converted to mechanical power in the output shaft. Then the actuator shaft is coupled with a generator and electric power is generated. Due to the efficiency of the primary actuator, which is less than 50%, more than half of the fuel energy is dissipated in the form of heat, which can be converted into high-temperature and usable heat by placing suitable heat exchangers. DGs are one of the new trends in power systems to support increased demand. There is no clear definition of these resources. Different countries use different symbols, such as “embedded generation”, “DG” and “decentralized generation”. However, different definitions of DGs are provided by different organizations (IEEE, CIGRE, etc.), each of which has a specific aspect. This book uses the following reference definition [2]:

DGs are the sources of electrical energy connected to the power system that these sources are very close to the costumers and their production is much less than the centralized energy production sources.

To clarify the concept of DGs, Table 1 provides the dimensions of DGs [2].

Table 1 Size of DGs [2]

2 Types of DG Resources

In general, DGs can be categorized into two groups: DGs based on converters and the other DGs based on rotating machines. Converters are commonly used in DGs after DC processing to convert voltage to DC or AC. However, since the output value of the voltage and frequency must reach the nominal value, this voltage is first converted to DC and then to AC. In this section, we introduce the different types of DGs used in today’s power systems (photovoltaic (PV) system, wind turbine (WT), fuel cell (FC), micro turbine(MT), as well as synchronous and asynchronous generators).

2.1 PV System

A PV system converts the amount of light absorbed by the sun into electrical energy. In this system, semiconductor materials are used in the structure of solar cells. When these semiconductors are exposed to sunlight, they convert the energy absorbed by the photon into electrical energy. Cells are fixed or varied in a specific arrangement so that they absorb the maximum amount of sunlight and subsequently produce the maximum power [3]. Environmentally, these systems have no harmful pollutants. These systems are very easy to use and require no fuel other than sunlight. The disadvantages of these systems include the need for a large space to be exposed to sunlight and the high initial cost. Figure 4 shows a schematic of a PV system with a brief detail [3].

Fig. 4
figure 4

Schematic of a PV system [3]

The output voltage of PV systems is a DC voltage which is then converted to AC voltage using a converter.

2.2 WTs

WTs convert wind energy into electrical energy. Since wind speed is not constant during the day and night, the amount of power generated by wind generators also varies. A general schematic of wind generators is given in Fig. 5 so that its main components are shown in this figure [3].

Fig. 5
figure 5

Schematic of a wind generator [3]

The performance of a wind generator can be explained in two steps. Initially, the rotor converts the amount of kinetic energy absorbed by the wind into mechanical torque on the turbine shaft. Then, the production system converts this torque into electrical energy. In today’s wind generators, the output voltage is AC. The value of this voltage depends on the wind speed. Due to the variable wind speed, the generated AC voltage is first converted to DC voltage and then converted to the nominal AC voltage of the network using the converter. However, fixed-speed wind turbines are connected directly to the grid [3].

2.3 FCs

FCs act like a battery and are charged by gas with high hydrogen. Oxygen is also taken from the air to cause a chemical reaction [3]. The FC produces a DC voltage from the reaction of hydrogen and oxygen with the help of electrolytic ions. Then, the DC voltage generated using a converter is converted to AC voltage and delivered to the network. Figure 6 shows a schematic of a FC.

Fig. 6
figure 6

Schematic of a FC [7]

FCs also produce water along with electricity. The most important advantage of a FC is that it does not have a motive system, which increases reliability and does not produce noise. Also, these systems are able to operation with a wide range of FCs. On the other hand, its disadvantages include its impact on environmental pollution, its characteristic electrolytic aging, and the limited lifetime of FCs.

2.4 MTs

A MT uses the flow of a gas to convert thermal energy into mechanical energy. The combustible material (usually gas) is mixed with the air in the combustion chamber (air is pumped by a compressor). The result of this combination is the rotation of the rotor and power generation using a generator. Figure 7 shows a schematic of an MT [3]. The AC output voltage of the MTs cannot be connected directly to the main network. Therefore, it is first converted to DC voltage by a converter and then to AC voltage. One of the advantages of MTs is its clean performance (very low production of environmental pollutants) as well as its high efficiency. On the other hand, its disadvantages include its high maintenance costs and the lack of sufficient experience in this field [3].

Fig. 7
figure 7

Schematic of a MT

2.5 Synchronous and Asynchronous Generators

The synchronous and asynchronous generators are electrical machines that convert mechanical energy into electrical energy. Asynchronous generators generate electricity when the shaft rotates faster than the synchronous frequency. The shaft of Asynchronous generators is rotated using a turbine or an engine. The power factor of asynchronous generators depends on the load and its value varies. The performance of such generators is much more important than that of synchronous generators.

Asynchronous generators require reactive power to create a magnetic field. At present, reactive power generation sources such as capacitive banks are used to generate reactive power generators and loads at the relevant location. Therefore, asynchronous generators cannot be used as a backup generator when the system becomes an island [3].

Synchronous generators are used at a certain and synchronous speed. Unlike asynchronous generators, synchronous generators have a lag and variable power factor. Therefore, these generators can be used in power factor correction applications. A generator connected to a large network (connected to an infinite bus) has a small effect on the frequency and voltage of the network. Therefore, the rotor speed of these generators as well as the voltage value of the terminal is managed by the network.

In synchronous generators, a change in the excitation field changes the power factor. Also, a change in the amount of mechanical input power will change the output power of this generator. Therefore, when the synchronous generator is connected to an infinite bus, the over-excitation mode causes its power factor to be lagging, and also in the state the under excitation power factor is lead [3]. Therefore, excitation generators can be either reactive power generator or reactive power consumer. Today, synchronous generators are used in distribution systems as wind, hydro, and thermal generators. In general, such generators act as a power generator when placed at a low voltage level and have no role in controlling the network frequency. These generators are available in sizes from a few kW to a few MW [4].

3 The Effect of DGs on Power Networks

The sources of DGs used in distribution networks play a key role in the quality of power delivered to customers. However, the impact of such resources on distribution networks can have a positive or negative impact. In this section, the impact of such generators is evaluated and their behavior on an electrical system is examined. The difference in results between the presence of DGs and their absence in the network provides useful information to electricity companies and costumers. We now evaluate the impact of such resources on the different characteristics of a distribution network.

3.1 The Effect of DGs on Voltage Profile

Radial distribution systems set the grid voltage to an allowed level using load shift transformers (LTCs). In addition, line regulators are used on the distribution feeder as well as parallel capacitors in the feeders or along the lines to regulate the distribution network voltage. Installing DGs improves the voltage profile. Because the amount of the active and reactive power required is often generated at the load site, less power passes through the distribution network lines. Therefore, the amount of losses is reduced. Also, voltage drop decrease throughout the distribution network. However, in some cases, the installation of DGs on the network may also cause the voltage profile to deteriorate, depending on the characteristics of the DG resources as well as the location of their installation. Figure 8 shows the voltage profile of a feeder with and without installation of DG. This figure shows DGs alongside an LTC equipped with a voltage reduction compensator. According to the figure, the voltage profile of the feeders in presence of DGs is higher when the DG resources are not installed in the distribution network. This is because the voltage regulator inserts less tap into the circuit and the voltage profile decreases. Since the DG sources are located after the voltage regulator, the amount of load seen by the voltage regulator decreases with the presence of these sources, and the reason is that the regulator regulates less voltage at the end of the feeder [4]. To solve this problem, DG can be transferred to before the voltage regulator.

Fig. 8
figure 8

Voltage profile of a feeder with and without DG sources [4]

Installing DG resources across a network may cause the voltage to rise too high due to too much active and reactive power to the network. For example, installing a DG source at a location several loads powered by a distribution transformer increases the secondary voltage of the transformer and therefore increases the voltage at the location several loads. This state occurs when the distribution transformer is installed at a point in the network where the initial voltage value is set near or above the range (for example, according to the US National Standards Institution, the high setting value for the base voltage 120 V is 126 V). Under normal system conditions, in the absence of DGs, the voltage on the load side is less than the initial voltage of the distribution transformer. The installation of DG can reverse the transmission power and thus increase the secondary voltage of the transformer on the costumers’ side. When the DG size is less than 10 MW, its effect on the initial feeder voltage or the transformer’s primary side is negated. However, when the DG size is greater than 10 MW, then a voltage regulation analysis is necessary to ensure that the customer voltage is within its allowable range [4].

3.2 The Effect of DG Resources on Network Power Losses

One of the most important effects of installing DGs is its impact on distribution network power losses. In general, the installation of DGs reduces network power losses. The reason for this is that part of the power consumption is often produced in their place by DGs and the amount of active and reactive power passing through the distribution lines is reduced. According to the reference [5], the installation of DGs in the network to reduce power losses is similar to the use of capacitive banks to reduce power losses. The difference between the two is that DGs inject the amount of active power as well as reactive power into the network, while the capacitive bank injects only reactive power into the network. In general, transmission network generators are used with a power factor of about 0.85 phases. Therefore, by installing DGs in the network and producing reactive power, network generators can be used with a higher power factor [6].

The optimal location of DGs to minimize network power losses can be calculated using load flow analysis software. For example, if the feeders have a large amount of power losses, installing one or more DG sources in different parts of the network will have a positive effect on the total feeder power losses. On the other hand, if a large-sized distribution generator is installed in some parts of the network, it may cause an increase in the number of adjacent lines. In this case, the thermal limit of these lines exceeds its allowable value and causes problems for the distribution network. The owner most of the DGs are customers. Therefore, network operators are not able to decide on the location of these resources. Therefore, it is assumed that the amount of power losses is reduced by installing DG at the load site.

3.3 The Effect of DGs on Harmonics

In general, a network waveform (for example, voltage and current) is not a pure sine wave and has some harmonics. This fact is shown in Figs. 9, 10 and 11.

Fig. 9
figure 9

Comparison between a pure sinusoidal waveform and a harmonic waveform destroyed by harmonics

Fig. 10
figure 10

The contribution of fault currents drawn from DG sources and the loss of coordination between the main feeder relay and the side fuse

Fig. 11
figure 11

Operation costs

In general, harmonics exist to somewhat extent in all power systems. DGs can be one of the harmonic producers in the network. Harmonics can be generated from the generator itself (eg, synchronous generators) or through electronic power equipment such as converters. In the converter section, one of the most important parts of harmonic production is the power converters of the controlled silicon rectifier (SCR) type, which produce a high level of harmonic currents. Today, converters use IGBT technology based on pulse width modulation to reduce harmonics. This new technology causes the output waveform closer to a pure sine waveform and has a small amount of harmonics, which is acceptable for the IEEE 1547-2003 standard. Generator rotation is another factor in harmonic production. This harmonic value depends on many factors, including: the design of the generator winding (coil step), the nonlinearity of the core, the grounding of the generator, and other factors that cause harmonic production. The coil step is the most important factor in harmonic production. Comparing the types of winding steps in synchronous generators, the 2/3 winding step is the best step in terms of harmonics. Step 2/3 produces at least the third harmonic value. The third harmonic is the largest harmonic in the waveform of the system. On the other hand, the step 2/3 in generators has less impedance than the rest of the steps and therefore allows more harmonic current to pass through other parallel sources. Therefore, grounding the generator as well as using incremental transformers are good ways to limit production harmonies and prevent them from entering the network. The generator grounding scheme is a good choice for eliminating or reducing injectable harmonics into the network. In general, if we want to have a general comparison between harmonic production by DGs and other positive effects on the network, it can be seen that the harmonics produced by DGs do not cause much trouble for the network [5]. However, in some cases, the level of harmonic value generated by distribution generators may exceed its allowable value by the IEEE 519-1992 standard. These standard values are given in Table 2. These problems usually occur when they create resonance with capacitive banks or have equipment that is sensitive to harmonics. In the worst case, the additional heat from the harmonic generated by the generators of the DGs may cause damage to the network equipment. In this case, the DGs must be removed from the circuit.

Table 2 Permitted Harmonic Rates for Distribution Generators by IEEE 519-1992 Standard

Therefore, to design and install DGs in the network, special attention should be paid to the amount of harmonics produced. This harmonic value is evaluated according to the IEEE-519 standard. Therefore, the total harmonic value of the output should not exceed 5% and the value of each harmonic should not exceed 3%.

3.4 The Effect of DGs on the Short Circuit Level in the Network

The presence of DGs in the network affects the short circuit level of the network. When these resources are present in the network, the amount of fault current increases compared to the state without it [5]. The involvement of one of these sources in the occurrence of an error is not very high, but if a fault occurs, it will increase the fault current. If the number of small DGs in the network is high (or there are several large DGs in the network), the short circuit current level can be variable enough to eliminate the coordination between the relays and fuses of the network. The contribution of DGs in the faults that occur in the distribution network depends on various factors. These factors include the size of the DGs and its distance from the fault position. This contribution of the source of DGs in network faults can affect the reliability and security of distribution networks.

Therefore, DG sources have a significant impact on the fault current in the distribution network. In general, the contribution of harmonic generating sources of synchronous generators in the fault current is more than other types. After few cycles of fault, the contribution of fault currents from the DG sources related to the asynchronous and the synchronous generators is low, while after this time, the effect of DG resources on the fault current increases significantly.

3.5 The Effect of DGs on the Self-healing of the Distribution System

Self-healing refers to the specific ability of the smart grid that takes precautionary actions before the fault. It also performs fault location, isolation, and service restoration to minimize network damage after the fault. This process is performed with the help of communications infrastructure and remote control. Permanent fault in the distribution network, in addition to customer dissatisfaction, can cause heavy losses to power companies. Self-healing is the most important feature of the smart grid ensures continuity of electricity for the costumers. Also, with the increasing penetration of DG resources, the operating status of the network is changed in both normal and emergencies. In normal network operation mode, the goal is to minimize the costs of generation, operation, and pollution in the network. But in the self-healing mode, the goal is to feed maximum load in the faulty part. There are several ways to implement a self-healing scheme, including: Distribution system dividing into a number of MGs, Distributed generation resources, Multi-agent systems, Coordination storage and renewable resource, and Electric vehicles. In [56], the effect of DG on self-healing and reliability of the distribution system is investigated. In [57], the effect of storage and DG coordination on system self-healing is investigated. In [58, 59], a model is proposed to carry out Self-Healing in distribution level with consideration of combined gas and electrical network and with consideration of DGs types include Micro-Turbines (MTs), and Combined Heat and Power (CHP) units Energy Storages (ESs).

4 The Economic Aspects of Low Voltage Networks, Especially Micro-grids (MGs)

Power and heat supply to areas not connected to the main network have led power system operators and engineers to move toward MGs. The supply of electricity and heat through low-voltage networks such as MGs, which are composed of DG sources such as energy storage systems and wind turbine systems, has led to a reduction in costs. Construction of a new line will also reduce pollution from conventional power plants. The use of CHP system in low voltage networks will lead to optimal use of heat loss. Smart grids, especially MGs, do not have transmission and distribution power losses compared to conventional systems because power generation takes place near the load [8]. The economic dimension of DG resources in low-voltage networks is so important that it can also challenge the economies of conventional systems. One very important point about MGs is, firstly, the high cost of construction and, secondly, the cost of operating such systems that use new resources and energy storage systems is not clear accurately. The economic aspects of low voltage networks with the presence of renewable resources and small-scale fossil resources can be mentioned as follows:

1. Economic dispatch

2. Minimize costs

3. Buying and selling energy.

Use and combine a variety of DG resources optimal economic conditions.

The differences in the economic dimensions of renewable resources and small-scale fossil resources with traditional systems, the following can be mentioned:

1. The main goal in traditional systems is to generate electricity, and heat generation is not the main goal. Therefore, they have low efficiency. While on smart grids, especially MGs, the CHP is a major goal to increase overall power efficiency. To further explain a small-scale gas turbine, the efficiency of a gas turbine in the form of a simple cycle is approximately 40%, but if the same gas turbine is equipped with a CHP system, the efficiency will be about 70 to 80%.

2. Environmental issues are not considered in traditional systems in the study of production and demand optimization. However, in smart grids, low voltage is not present with the presence of DG sources, and in studies, the discussion of pollutants in the objective function of planning is considered [8]. Minimizing the costs and pollutants caused by fossil fuels play a major role in the optimal use of power systems. To achieve these goals, the researchers moved toward renewable energy and small-scale DGs, and considered limitations and limitations for resources using fossil fuels to reduce environmental concerns caused by fossil fuels (Tables 3, 4, 5). In other words, minimizing costs and pollutants in operation studies are considered as a function of the short-term production planning target, which is stated in Eq. 1 [9, 10].

Table 3 Objective functions and constraints to economic programs [9,10,11,12]
Table 4 Effective indicators in low voltage networks to accommodate and determine the size of DGs [15]
Table 5 Results for the studied methods
$$\begin{array}{*{20}c} {Minimize} \\ \end{array} F = \{ CF,EF\}$$
(1)

In the above relation, CF and EF express the total operating costs and the total weight of polluting gases, respectively. Operating costs are shown in Fig. 2. Equation 2 represents the cost function, which consists of the cost of repairs, maintenance costs, the cost of selling electricity, the income from energy, the cost of start-up energy production sources such as WTs and PVs, and the cost of producing units. Table 1 is given to further explain the Eq. 1 and express the constraint of the problem [9, 10].

$$CF = \sum\limits_{t = 1}^{T} {\sum\limits_{i = 1}^{I} {[MC(i,t) + C(i,t) + SU(i,t)] + \sum\limits_{t = 1}^{T} {[ - RG(t) + CG(t)]} } }$$
(2)

5 Placement of DG Resources

5.1 Introduction

In recent decades, changes in the structure of the electricity industry, as well as the privatization of the industry, have taken place in some countries. During this time, the electricity industry has undergone fundamental changes in terms of management and ownership due to increased efficiency and encouragement of investors, so that different parts of it, including production, transmission, and distribution, have been separated to create a suitable competitive environment. These changes, on the one hand, and factors such as environmental pollution, problems with the construction of new transmission lines and other problems, as well as technological advances in economics, and the construction of small-scale production units, on the other, have led to a desire to increase the use of small power units. Local power at the distribution voltage level is by renewable energy sources such as WT, PV, FC, MT, as well as a combination of these in distributed networks. With the presence of a combination of DGs in the distribution networks, they act as active networks, and therefore such networks are called active distribution networks.

Due to the increasing use of DG resources in distribution networks, determining their proper location is a basic need and the proper use of these resources in the network will have many benefits, including reducing losses and improving voltage profiles. Also, despite the energy resources in the distribution networks, in the event of an outage of the main source, the power supply will be partially possible in the form of island performance. Obviously, with the use of optimal islands, the number of blackouts will decrease. On the other hand, determining the boundaries of the islands will depend on the location and capacity of the DG units in the network. If the location of the DGs is not determined correctly, not only will there be no benefit. It worsens network else parameters. Therefore, the most important challenge in DG projects is to determine the location of these resources in distribution networks. To increase efficiency and reduce the negative effects of installing DG resources, location can be done with the aim of improving one parameter or more than one parameter. Single-target deployment greatly improves the desired parameter, but does not have much effect on other network parameters and sometimes destroys them. In contrast, multi-purpose locating helps to improve all parameters at the same time.

The most important step in using DG in distribution networks is their optimal location and capacity. This is important because it reduces costs associated with losses, reliability, and the cost of building production units. Also, the placement of DG units in distribution networks, along with other possible options for the development of the distribution network, such as the construction or strengthening of lines and substations, has been considered. On the other hand, uncertainty is one of the most important factors in increasing risk in the planning of power systems so that not consider this parameter leads to significant economic and technical losses.

5.2 Problem Modeling

In this section, we introduce the objective functions and the limitations that must be considered in the DG placement problem. Among the objective functions that can be considered in the problem of placement are.

Minimizing active power losses, minimizing energy losses, minimizing SAIDI, minimizing costs, minimizing voltage deviations, maximize DG capacity, maximize profits, maximize rate profits to costs, maximize loading limit voltage and improve power quality index. In the following, we will deal with some of the important objective functions that have been used in the literature on this issue.

5.2.1 Power Losses Index

Power Losses are always a concern for the electricity industry due to the waste of energy and resources, and its reduction is a priority for the industry’s programs and research activities. The distribution of DG in the distribution network has a great impact on power losses. This effect varies depending on the size and location of the DG installation. With proper placement of DG resources, network power losses can be significantly reduced. Since distribution networks with DG are active networks, the performance and control of the network are very interesting. Although there are several issues with the distribution network’s performance, there are also major technical implications due to the influence of renewable DGs, such as network power losses, voltage stability, and network security discussed here.

Distribution networks are usually radially structured to reduce the complexity of protection. Assessing and reducing network power losses is essential to increase system efficiency. The average power losses per year can be calculated as follows [13]:

$$Ploss = \sum\limits_{i = 1}^{{N_{b} }} {\frac{{r_{i} \left( {\mathop {\left( {\mathop P\nolimits_{D,i + 1} } \right)}\nolimits^{2} + \mathop {\left( {\mathop Q\nolimits_{D,i + 1} } \right)}\nolimits^{2} } \right)}}{{\mathop {\left( {\mathop V\nolimits_{i + 1} } \right)}\nolimits^{2} }}}$$
(3)

Here \(Q_{D,i + 1}\) and \(P_{D,i + 1}\) require the active and reactive power in the end bus receiving the −i + 1. \(V_{i + 1}\) is the voltage range at the end bus of the receiver −i + 1.The resistance of the completed transmission line r_i to bus −i + 1, Nb is the sum of the number of lines in the system.

5.2.2 Network Development Time Delay Index

Due to the development of population centers and the increase in electricity consumption, as well as a reliable supply of energy to customers, the development and strengthening of electricity distribution networks are inevitable. Distribution companies make significant investments in this section annually. If the load demand in the network exceeds the maximum allowable load, network reinforcement must be performed. In existing networks at the time of reaching some technical constraints such as maximum network transmission capacity or maximum voltage drop (due to increased load), network reinforcement is performed. Where DG is connected to the power supply, the demand for feeder pure peak (demand less than the capacity assigned to DG) reduces and releases the transmission capacity in its upstream branches to meet the demand for a new peak. The time required for development postpones. Therefore, the release of power transmission capacity in the distribution network can be considered as an indicator to delay the time of network development. This indicator is called the available transmission capacity and is indicated by the symbol (ATC) and is defined as the following relation for each branch i of the network. The margin of certainty of the transmission and storage capacity of the lines has been omitted [14].

$$\mathop {ATC}\nolimits_{i} = \mathop P\nolimits_{i,\text{max} } - \mathop P\nolimits_{i}$$
(4)

In the above relationship, \(\mathop P\nolimits_{i}\) is the power passing through branch i (branch with end node i) and \(\mathop P\nolimits_{i,\hbox{max} }\) is the maximum allowable power passing through branch i.

5.2.3 Voltage Stability Index

Voltage stability indicators are used to assess the level of voltage stability of buses in the transmission or distribution network. These tools are very quick and effective for calculating the offline stability of bus voltages. The voltage stability index (VSF) for each bus -i + 1 in the time interval t can be expressed as [13].

$$\mathop {VSF}\nolimits_{i + 1} = \left( {\mathop {2V}\nolimits_{i + 1} - \mathop V\nolimits_{i} } \right)$$
(5)

The average voltage stability for the entire distribution network can be calculated as follows.

$$\mathop {VSF}\nolimits = \frac{{\sum\limits_{i = 2}^{{\mathop N\nolimits_{b} }} {\mathop {VSF}\nolimits_{i + 1} } }}{{\left( {\mathop N\nolimits_{b} - 1} \right)}}$$
(6)

5.2.4 Constraints

(A) The power passing through each of the branches should not exceed the allowable power.

$$\mathop P\nolimits_{i} \le \mathop P\nolimits_{i,\text{max} }$$
(7)

(B) The voltage must remain within the allowable range.

$$\mathop V\nolimits_{i,\text{min} } \le \mathop V\nolimits_{i} \le \mathop V\nolimits_{i,\text{max} h}$$
(8)

(C) The one-way current flow constraint is as follows.

$$\mathop {\left( {ATC} \right)}\nolimits_{i,n} = \frac{{\mathop P\nolimits_{i,\text{max} } - \mathop P\nolimits_{i} }}{{\mathop P\nolimits_{i} }} \le 1$$
(9)

(D) The voltage of each bus shall not exceed its permissible limits.

$$\mathop V\nolimits^{\text{min} } \le \sqrt {\sum {h\mathop {\left( {\mathop V\nolimits_{i}^{\left( h \right)} } \right)}\nolimits^{2} } } \le \mathop V\nolimits^{\text{max} }$$
(10)

The general indicators used in various articles to discuss DG placement and measurement are summarized in the table below.

5.3 Solution Methods

In terms of problem solving method, DG placement is divided into three categories, which are shown in Fig. 12 [16].

Fig. 12
figure 12

Types of problem solving methods

5.3.1 Analytical Methods

In this method, DG is installed as much as 2/3 input power to the feeder. Its installation location is 2/3 Feeder. In this method, it is assumed that the load is evenly distributed throughout the feeder. In [17,18,19,20,21], this method has been used to solve the placement problem.

5.3.2 Numerical Methods

In numerical methods, mathematical modeling is used to solve the DG placement problem. Among the methods used to solve these problems can be divided into the following categories. In [16], the linear planning method is also introduced for DG placement, if this method cannot be done and only the optimal size of DG can be determined.

5.3.2.1 Gradient Search Method

This method is mostly used in mesh networks. In [22, 23], this method has been used to solve the DG placement problem. Suppose buses i… k are a set of whole n buses. A set of c resource units in these buses can use any technology. Our goal is to determine the amount of injection in each of these nodes for maximum profit. Therefore, the u controller vector can be expressed as follows [22].

$$U = \left\{ {\mathop P\nolimits_{1} \ldots\mathop P\nolimits_{k} } \right\},\quad i,k \in n$$
(11)

And the total injections should be expressed as an equality limit as follows:

$$\mathop P\nolimits_{1} + \cdots+ \mathop P\nolimits_{k} = C$$
(12)

To minimize power losses, the f index is obtained as follows:

$$f = \sum\limits_{j = 1}^{n} {\mathop P\nolimits_{i} }$$
(13)

The formulation of this issue can be summarized as follows:

$$Minimize\mathop {}\nolimits_{{}} f = \sum\limits_{j = 1}^{n} {\mathop P\nolimits_{i} }$$
(14)

and

$$g = 0$$
(15)

The mode vector x is as follows:

$$x = {\delta_{2}} \ldots{\delta_{3}} \ldots{\delta_{n}}\,\,{V_{2}}, {V_{3}} \ldots{P_{1}}$$
(16)

where \(\mathop \delta \nolimits_{2} \ldots \mathop \delta \nolimits_{3} \ldots\mathop \delta \nolimits_{n}\) are the angles of the buses 2 to n (\(\mathop \delta \nolimits_{1}\) is the angle in the reference bus and its value is zero.), V2, V3 indicate the voltage in the uncontrolled buses of the voltage. Note that the state vector of equation and the set of equations g must include the power injection bus P1, since f is containing P1. The reduced gradient method can be used to solve this problem. In this method, the Lagrangian shape is as follows:

$$L = f + \mathop \lambda \nolimits^{T} g$$
(17)

Where λ is the vector of the Lagrange and g coefficients including the grid equations. To minimize:

$$\frac{\partial L}{\partial X} = \frac{\partial f}{\partial X} + \mathop \lambda \nolimits^{T} \frac{\partial g}{\partial X}$$
(18)

In the reduced gradient method, an initial assumption is made for the vector U and used to calculate λ. The Lagrangian coefficients for the specified values of X and U in the repetition of k are determined as follows:

$$\mathop \lambda \nolimits^{k} = - \mathop {\left[ {\frac{\partial g}{\partial X}} \right]}\nolimits^{T - 1} \mathop {\left[ {\frac{\partial f}{\partial X}} \right]}\nolimits_{{\mathop X\nolimits^{k \cup K} }}$$
(19)

The Lagrangian gradient is determined by U as shown below [22]:

$$\frac{\partial L}{\partial U} = \frac{\partial f}{\partial U} + \left[ {\frac{\partial g}{\partial X}} \right]\mathop \lambda \nolimits^{k}$$
(20)

The control vector in k + 1 repetition is updated using the following equation [22]:

$$\mathop U\nolimits^{k + 1} = \mathop U\nolimits^{k} - A\mathop {\left[ {\frac{\partial L}{\partial U}} \right]}\nolimits_{{\mathop X\nolimits^{k} \mathop U\nolimits^{k} \mathop \lambda \nolimits^{k} }}$$
(21)

A is a constant. But instead of the reduced gradient method, the second method is usually used because the reduced gradient method does not converge for positive injections. In the second method, the vector z is expressed as follows [22]:

$$z = \mathop {\left[ {X,U,\lambda } \right]}\nolimits^{T}$$
(22)

Starting from the initial assumptions for z in the repetition of k + 1 is updated as follows [22].

$$\mathop z\nolimits^{k + 1} = \mathop z\nolimits^{k} - \mathop {\left[ {H\left( {\mathop z\nolimits^{k} } \right)} \right]}\nolimits^{ - 1} g\left( {\mathop z\nolimits^{k} } \right)$$
(23)

The Hsian H (z) matrix is determined as follows [22]:

$$\mathop H\nolimits_{1j} = \frac{{\mathop \partial \nolimits^{2} L}}{{\mathop \partial \nolimits_{{\mathop z\nolimits_{1} }} \mathop \partial \nolimits_{{\mathop z\nolimits_{j} }} }}$$
(24)
5.3.2.2 Second-Order Sequential Planning

In [25, 26], this method has been used to solve the DG placement problem without using fault level constraints. Conventional SQP is a numerical optimization technique that solves a finite minimization problem by solving a second-order planning sub problem (QP) in each main iteration to obtain a vector to search for a new d. For search, along with a suitable step size of the α scalar, it forms the next approximate solution point that can be used to start repeating another original SQP. Under the QP sub problem, a first-order objective function with real value is minimized that is subject to linear equality and inequality constraints. The QP sub-problem in repetition k is formulated using the second-order Taylor extension in approximating the SQP objective function. The Taylor expansion is formulated in the linearization of the SQP equality and inequality constraints at the asymmetrical point. The QP sub problem is formulated as follows [26]:

$$\begin{aligned} &Minimize\;X \in \mathop R\nolimits^{n} \;\mathop P\nolimits_{Losses} \left( {\mathop X\nolimits^{\left( k \right)} } \right) + \mathop {\nabla P}\nolimits_{Losses} \mathop {\left( {\mathop X\nolimits^{\left( k \right)} } \right)}\nolimits^{t} d + \frac{1}{2}\mathop d\nolimits^{T} \mathop H\nolimits^{\left( k \right)} d \hfill \\ &\mathop {\tilde{h}}\nolimits^{k} \left( d \right):h\left( {\mathop X\nolimits^{\left( k \right)} } \right) + \nabla \mathop h\nolimits^{t} \left( {\mathop X\nolimits^{\left( k \right)} } \right)d = 0 \hfill \\ &\mathop {\tilde{g}}\nolimits^{k} \left( d \right):g\left( {\mathop X\nolimits^{\left( k \right)} } \right) + \nabla \mathop g\nolimits^{t} \left( {\mathop X\nolimits^{\left( k \right)} } \right)d \le 0 \hfill \\ &\mathop X\nolimits^{l} \le X \hfill \\ &\le \mathop X\nolimits^{u} \hfill \\ \end{aligned}$$
(25)

where

\(\mathop {\nabla P}\nolimits_{Losses} \mathop {\left( {\mathop X\nolimits^{\left( k \right)} } \right)}\nolimits^{t}\):The gradient of the objective function at the point \(\mathop X\nolimits^{\left( k \right)}\).

d: A direction vector to search (n × 1).

\(\mathop H\nolimits^{\left( k \right)}\) A symmetric matrix of Hessian (n × n) at the point \(\mathop X\nolimits^{\left( k \right)}\).

\(\mathop {\tilde{h}}\nolimits^{k}\): First order Taylor expansion of equality constraints.

\(\nabla \mathop h\nolimits^{t} \left( {\mathop X\nolimits^{\left( k \right)} } \right)\): A Jacobine matrix (n × m) of equality constraints.

\(\mathop {\tilde{g}}\nolimits^{k}\): Second order Taylor expansion of nonequality constraints.

\(\nabla \mathop g\nolimits^{t} \left( {\mathop X\nolimits^{\left( k \right)} } \right)\): Jacobin matrix (n × p) of inequality constraints.

n,m and p: The number of equallity and non-equallity equations, respectively.

The SQP method uses the Lagrangian coefficient method for the general optimization problem constrained in Eq. 15. First defining the Lagrangian function problem at an approximate solution point X(k). Then apply the optimization conditions of the first order Karush-Kan-Tucker (KKT) to the Lagrange function; Finally, Newton’s method is used in Lagrangian function gradients to solve unknown variables. The KKT is the first order that the optimal conditions for the nonlinear set of Lagrangian gradient equations are shown in Eq. 26 [26].

$$\mathop {\left[ {\begin{array}{*{20}c} {\mathop \nabla \nolimits_{X} L\left( {X,\lambda ,\beta } \right)} \\ {h\left( X \right)} \\ {\mathop g\nolimits_{A} \left( X \right)} \\ \end{array} } \right]}\nolimits^{\left( k \right)} = 0$$
(26)

The λ and β column vectors are of the Lagrangian equivalence and inequality coefficients. Newton’s method is used to solve the above Eq. 16. Using Taylor’s first-order extension at a hypothetical solution point \((X^{(k)} ,\lambda^{(k)} ,\beta^{(k)} )\) to estimate \((X^{*} ,\lambda^{*} ,\beta^{*} )\) Newton’s KKT solution can be expressed as follows:

$$\mathop {\left[ {\begin{array}{*{20}c} {\mathop {\mathop \nabla \nolimits_{XX}^{2} }\nolimits L\left( {X,\lambda ,\beta } \right)} \\ {\nabla \mathop h\nolimits^{t} \left( X \right)} \\ {\mathop {\nabla \mathop g\nolimits_{A}^{t} }\nolimits \left( X \right)} \\ \end{array} \begin{array}{*{20}c} {\quad \nabla h\left( x \right)} \\ 0 \\ 0 \\ \end{array} \quad \begin{array}{*{20}c} {\nabla \mathop g\nolimits_{A} \left( X \right)} \\ 0 \\ 0 \\ \end{array} } \right]}\nolimits^{\left( k \right)} \left[ {\begin{array}{*{20}c} {\mathop d\nolimits^{\left( k \right)} } \\ {\mathop \lambda \nolimits^{{\left( {k + 1} \right)}} } \\ {\mathop \beta \nolimits^{{\left( {k + 1} \right)}} } \\ \end{array} } \right] = - \mathop {\left[ {\begin{array}{*{20}c} {\nabla \mathop f\nolimits_{RPL} \left( X \right)} \\ {h\left( x \right)} \\ {\mathop g\nolimits_{A} \left( X \right)} \\ \end{array} } \right]}\nolimits^{\left( k \right)}$$
(27)

By solving the KKT Newton system, the solution \(\left[ {\begin{array}{*{20}c} {\mathop d\nolimits^{\left( k \right)} } \\ {\mathop \lambda \nolimits^{{\left( {k + 1} \right)}} } \\ {\mathop \beta \nolimits^{{\left( {k + 1} \right)}} } \\ \end{array} } \right]\)is of the QP subset. The new vector obtained for the search provides new values for the Lagrangian coefficients to be used in the next iteration. The Hessian matrix of the Lagrangian function does not need to be calculated in each subsequent iteration. Instead, using the method (Go-Fletcher-Goldfrab-Shano) is approximated and updated in almost every major iteration [24]. Due to the resilience and effectiveness of SQP in controlling constraints on nonlinear optimization issues, it is used in many commercial optimization software [25].

5.3.2.3 Nonlinear Planning

The most widely used method in DG placement literature is the nonlinear planning method [27,28,29,30]. In [31], the proposed method for locating and sizing DGs is a multi-objective NLP problem with three objective functions, which include the number of DG units, power losses, and Voltage Stability Margin (VSM). The details of the functions and limitations of the proposed method are as follows.

Less DGs are preferred than many small DGs. Placement more DGs causes the distribution system in many buses to have problems with short circuit levels and requires a rescheduling of the protection coordinates. Therefore, minimizing the number of DGs is considered as the first objective function. The number of DGs is an integer variable, and this can create the proposed MINLP problem, which requires more calculations and also makes it more difficult to converge than an NLP problem. To prevent the proposed method from becoming a MINLP problem, a new method is used to calculate the number of DGs [31].

$$ndg = \sum\limits_{i \in SB} {\frac{{\mathop P\nolimits_{DGi} }}{{\mathop P\nolimits_{DGi} + \varepsilon }}}$$
(28)

If a DG is assigned to bus i while repeating the optimization problem, PDGi is non-volatile, and in this case the effect of ε is ignored and the fraction in (34.28) is very close to the unit. On the other hand, if no DG is assigned to bus i, the fraction will be zero. As a result, the ndg result in (34.28) shows the number of DGs in the network. Of course, although ndg is not the exact number of DG units as an integer, the minimum number of DGs is obtained by minimizing ndg. The second objective function is the active power losses, which is usually significant in distribution systems. Using an AC load flow model, branch power losses are different from total output and total loads [31]:

$$\mathop P\nolimits_{Loss} = \sum\limits_{i \in SB} {\mathop {PG}\nolimits_{i} - \mathop {PD}\nolimits_{total} }$$
(29)

Voltage stability has also been used as a objective function after placement. Fuzzy methods have been used in this article to determine the weight of the target functions. Also, all the limitations of the system (load flow, voltage, power passing through lines, etc.) are considered in this article [31].

5.3.2.4 Mixed Integer Nonlinear Programming

In [32], the MINLP model is used for optimal placement of different types of DG units. This study presents a Mixed Integer Nonlinear Programming (MINLP) approach to determine the optimal position and number of DGs in the hybrid market. For the optimal location of DGs, the most suitable area is first identified based on the actual node price and the sensitivity index to the loss of active power as an economic and operational criterion. After identifying the appropriate area, the MINLP method has been used to determine the location and optimal number of DGs in the area. The nonlinear optimization approach includes minimizing total fuel cost from conventional sources and DG, as well as minimizing line losses in the network. The pattern of active and reactive prices has been achieved, reducing line losses and saving fuel costs. Optimal DG penetration can provide both economic and operational benefits.

In a large regional power grid, identifying the most suitable area for DG penetration is important. Therefore, to find the most suitable area, economic and operational aspects must be considered. Node cost is an important indicator of the MW unit injection price per node and congestion in the transmission network. Sensitivity to line power losses provides information on the pattern of power losses in the transmission network with the power injection unit in each node. To get the most suitable area, the change in the price of the node in each bus and the sensitivity of line power losses have been used as economic and operational criteria. After identifying the most suitable area based on the price of the node and the sensitivity of the line power losses, the MINLP method can be used to find the optimal location and the number of DG in suitable area. The proposed MINLP model in [32] has been solved by the simultaneous use of GAMS and MATLAB software. The load flow equations have been solved in MATLAB software and its answers are transferred to GAMS software so that the rest of the modeling can be done by GAMS software. In the proposed work, an approach based on integrated second-order programming integration (SQP) and branch and border (BAB) techniques has been adopted to solve the MINLP formulation. This algorithm has better computational performance and strong convergence property [33]. The steps of the algorithm are as follows and the flowchart is shown in Fig. 13.

Fig. 13
figure 13

Flowchart for MINLP-based algorithm [32]

5.3.2.5 Dynamic Planning

The optimization problem in this method is modeled in several ways. One of the advantages of this method is that in different modes, the load can be modeled more accurately [34]. In most practical problems, successive programs must be performed at different times to solve a problem. Problems that are solved by successive decisions are called sequential decision problems. Dynamic planning is a type of multi-step decision-making problem that is an efficient mathematical method for studying and optimizing multi-step sequential decision problems [35]. The main steps of this algorithm are:

  • The problem is divided into stages. For each step, a decision policy is needed. On the other hand, each step represents a part of the problem that needs to be decided. The number of steps in DG allocation is equal to the number of candidate locations for DG installation. Decision-making procedures at each stage include reducing power losses and improving reliability.

  • Each step involves related situations. In the present study, the number of DGs with a certain capacity that can be allocated in the mentioned stages will be considered as an issue. At each stage, the current state will be transferred to the next state by decision.

  • Independent policies for the remaining steps can be pursued by understanding the current situation. In general, to optimize dynamic planning, current status information transfers all the information needed from previous behaviors that are needed to identify optimized policies from the current state to another.

  • The problem will be solved by finding the optimized policy for each case of the last case, which is named as the return solution. The answer to this step is obvious because the process is followed by the destination.

  • Optimized policy for all states of the “n” stage can be determined by a return function, assuming that the optimized policy is defined for all “n + 1” stages.

  • The solution is applied using the return function from one step to the previous step that runs from the end. At each stage, the optimized policy will be specified for all states of that stage. Finally, the optimized policy for the first stage will be specified.

$$\begin{aligned} \mathop f\nolimits_{n} \left( {\mathop S\nolimits_{n} ,\mathop X\nolimits_{n} } \right) = \mathop Z\nolimits_{n} \left( {\mathop X\nolimits_{n} } \right) + \mathop f\nolimits_{n + 1}^{ * } \left( {\mathop S\nolimits_{n} - \mathop X\nolimits_{n} } \right) \hfill \\ \mathop f\nolimits_{n} \left( {\mathop S\nolimits_{n} ,\mathop X\nolimits_{n} } \right) = \mathop Z\nolimits_{n} \left( {\mathop X\nolimits_{n} } \right) + \mathop {Max\sum\limits_{L = n + 1}^{Nloc} {\mathop Z\nolimits_{L} } \mathop X\nolimits_{l} \,f}\nolimits_{n + 1}^{ * } \left( {\mathop S\nolimits_{n} - \mathop X\nolimits_{n} } \right) \hfill \\ \mathop f\nolimits_{n} \left( {\mathop S\nolimits_{n} ,\mathop X\nolimits_{n} } \right) = Max\mathop f\nolimits_{n} \left( {\mathop S\nolimits_{n} ,\mathop X\nolimits_{n} } \right)\;and\;\sum\limits_{L = n + 1}^{Nloc} {\mathop X\nolimits_{l} } \hfill \\ \quad \quad \quad \quad \quad \quad = \mathop S\nolimits_{n} \hfill \\ \end{aligned}$$
(30)

where are n-state modes;

\(f_{n + 1}^{*}\)Optimized function in step n + 1.

\(X_{n}\)Decision in step n.

The proposed algorithm is based on dynamic planning for DG placement and can be extended to different distribution networks. The general diagram of the algorithm followed for DG placement is shown in Fig. 14.

Fig. 14
figure 14

Optimal DG placement method based on dynamic planning method [34]

5.3.2.6 Sequential Optimization

In [36], this method has been used to solve the DG placement problem. This paper discusses the compromise between reducing power losses and maximizing DG as a target function. Searching for an accurate global solution to the problem of DG placement and sizing requires a great deal of computational time. For example, selecting 9 DG locations from 68 potential candidates requires the following evaluation:

$$\mathop {\left( {\begin{array}{*{20}c} {68} \\ 9 \\ \end{array} } \right) = \frac{68!}{{9!\left( {68 - 9} \right)!}} \cong 4.93 \times 10}\nolimits^{10}$$
(31)

with about 0.15 seconds per OPF solution on a 1.73 GHz Core-Duo processor, the evaluation of the above combinations takes more than 200 years in a row. OO theory provides a possible framework for reducing search space and computational effort in ranking different options. The OO algorithm for finding the predetermined number of DGs can be summarized as follows:

  • Select N design (i.e. combinations of DG locations) from the search space so that at least one of them is at the top of the α percentage of all solutions with a probability level of P. The normal values of α and P are 0.1 and 99%, respectively.

  • Evaluate and order N designs using a raw and easy-to-calculate model.

  • Calculate the number of best examples in N designs that have at least one real good alternative, such as a case above 50, with a probability level equal to AP (K = 1). 0.95.

  • Evaluate each sample using an accurate OPF model and determine the appropriate solution.

5.3.2.7 Comprehensive Optimization

In [37,38,39], a comprehensive optimization method has been used to solve the DG placement problem by considering the load change. In power losses analysis, different types of customers are modeled, where a load of different types of customers varies during the day. Therefore, system power losses vary as a function of time. The issue of non-linear load flow is that the variable load over time makes it more complex. Therefore, the optimization problem involves a nonlinear model with voltage, current, and time-variable load limitations. The time variable load is interpreted as the change in the hourly load so that 24 loading conditions are modeled to show a daily load pattern. A comprehensive search of existing parts of the system is used to assess the reduction in power losses that can be achieved by adding DGs. The location of the DG is considered only in the separate devices of the sections.

In a search, DG locations are evaluated only at the beginning or at the separate input device of each section. The method for determining the optimal location for DG placement in the system is as follows.

(1) Perform load search statistics on the system and draw the load curve.

(2) Divide the load curve in different load windows so that the load conditions in each window are relatively constant.

(3) Adjust the DG output for different load windows to prevent the feedback from returning to the post.

(4) Do a comprehensive search for the load status of each window with the corresponding DG output and get the optimal locations based on two criteria - minimum power losses and minimum SAIDI for comparison. There are several reasons why a comprehensive search is used instead of the optimization algorithm. First, comprehensive search programming is easy. Second, a comprehensive search is done quickly. Third, this method ensures that global optimization is achieved. Due to the nonlinearity of the constraint problem, some optimization approaches may be trapped at a local optimal point.

5.3.3 Innovative Methods

5.3.3.1 Particle Swarm Optimization

Particle Swarm Optimization (PSO) has been used in [40,41,42] to DG placement. In [43], the Global Best PSO (gbest) algorithm is a method in which the position of each particle is affected by the best particle in all population particles. In this method, each particle has a specific position Xi and a certain speed Vi in the research space. The best unique position is called Pbest,i in the research space. It is proportional to the position in the research space that the position of this particle is the best value for minimizing (maximizing) the objective function compared to the previous values of this particle. Also, the best position of the particles among all the particles is called the optimal global position and is indicated by Gbest. The following relationships show how the values of each particle and the total global value are updated. Considering a minimization problem, the unique position Pbest,i of each particle and the time of the next time step, t + 1, are calculated as follows:

$$P_{best,i}^{t} = \left\{ \begin{aligned} P_{best,i}^{t} \, if \, f(x_{i}^{t + 1} ) > P_{best,i}^{t} \, \hfill \\ \, x_{i}^{t + 1} \, if \, f(x_{i}^{t + 1} ) \le P_{best,i}^{t} \, \hfill \\ \end{aligned} \right.$$
(32)

In this equation, f is a function of compatibility. The value of the best global position Gbest in the time step t is calculated as follows:

$$G_{best} = \hbox{min} \{ P_{best,i}^{t} \} ,where \, i \in [1,\ldots,n]{\text{ and }}n > 1$$
(33)

Therefore, the value of the best possible value is obtained by comparing all the particles. Since the value has a direct relationship with the values obtained for the best location of each particle, so the initial values for selecting the position of each particle at the beginning of the process are very important. For the gbest PSO method, calculate the particle velocity i as follows:

$$v_{ij}^{t + 1} = v_{ij}^{t} + c_{1} r_{1j}^{t} [p_{best,i}^{t} - x_{ij}^{t} ] + c_{2} r_{2j}^{t} [G_{best} - x_{ij}^{t} ]$$
(34)

In this equation:

\(v_{ij}^{t + 1}\): Particle velocity i in dimension j at time t.

\(x_{ij}^{t}\): The position of the particle i in the dimension j at time t.

\(p_{best,i}^{t}\): The best unique position of the particle i in the dimension j in the time t.

\(G_{best}\): The best global position of the particle i in dimension j in t.

\(c_{1}\)and\(c_{2}\): As cognitive and social parameters, respectively.

\(r_{1j}^{t}\) and \(r_{2j}^{t}\): Random numbers of uniform distribution of U (0.1) at time t.

In this section, DG placement is examined using the PSO algorithm. According to the explanations given for the two methods of gbest PSO and lbest PSO, the gbest PSO method is used in the replacement. In addition to using the PSO algorithm, the forward-backward sweep or Newton Raphson methods are also used to load flow on the network in each iteration. If the purpose of the placement is to sizing and placement in a distribution network simultaneously, the particles used in the algorithm take the size and position simultaneously. It should be noted that in the PSO algorithm, each particle is not a single value but contains a matrix with the required number of dimensions. In the following, the proposed algorithm will be explained in more detail.

Step 1: Enter the distribution network information along with the PSO algorithm parameters. In the first step, the network information is examined, including network load information, line intersection matrix, lines resistance and reactance, etc. Also, PSO algorithm parameters such as the number of repetitions, number of particles, and values of \(c_{1}\), \(c_{2}\),\(r_{1}\)and\(r_{2}\) are determined.

Step 2: Consider an initial random value for the velocity and position of all the particles. Set the counter to value 1. In this step, the proposed algorithm particles are randomly selected in a certain range. Since the particle value indicates the size and value of DG, therefore, the initial values are assigned to an acceptable value. Also in this step, the value of the counter that shows the same number of repetitions will be set to the value \(k = 1\) or the same number of repetitions.

Step 3: Compare the value of k with the maximum value of the setting. In this step, the value of k, which represents the same number of repetitions, is compared to its maximum value. Processing will continue if the value of k is less than or equal to the maximum value, but when the value of k is greater than the maximum value of the setting, the processing is completed and the optimal position and size of the DGs in the distribution network are delivered to output.

Step 4: Implement load flow, obtain voltage, voltage deviation, power losses, etc. In this step, using the load flow and other available information, the amount of network bus voltage, voltage deviation, the amount of power passing through the lines, the amount of line power losses and other network information will be obtained.

Step 5: Evaluate the defined objective function, calculate and save Pbest and Gbest. In this step, the value of the defined objective function is obtained in each iteration, and the Pbest and Gbest values are obtained for each particle based on the value obtained for the objective function. In this research, the objective function is defined as follows:

$$Minimize \, \sum\limits_{i = 1}^{nline} {P_{Loss,i} }$$
(35)

where i, the line index, nline, the number of network lines, and the loss \(P_{Loss,i}\)of line i is shown. Given the above relationship, the main goal is to minimize total network losses.

Step 6: Update the position and speed of the particles. In this section, according to the values obtained in each iteration, the value of the velocity and position of the particles for the next iteration is displayed. The update of these values is based on the relationships expressed for the velocity and position of the particle. After the update, the number of counters will increase by one and the processing will be repeated. The figure shows the proposed algorithm for placement using the gbest PSO algorithm. The above steps are described in the Fig. 15.

Fig. 15
figure 15

PSO algorithm for placement and sizing DG

5.3.3.2 Hybrid GAPSO Optimization Technique

In [55], a new methodology, hybrid GAPSO (HGAPSO), is developed to optimization of an off-grid hybrid energy system (HES). Since standard particle swarm optimization (PSO) algorithm suffers from premature convergence due to low diversity, and genetic algorithm (GA) suffers from a low convergence speed, in this study modification strategies are used in GAs and PSO algorithms to achieve the properties of higher capacity of global convergence and the faster efficiency of searching. The superiority of HGAPSO algorithm over GAs and PSO algorithms is in terms of convergence generations and computation time. The HGAPSO algorithm combines the advantages of swarm intelligence of the PSO algorithm and the natural selection mechanism of the genetic algorithm to increase the number of highly evaluated agents at each iteration step. We see how the proposed algorithm works in Fig. 16.

Fig. 16
figure 16

Flowchart of HGAPSO algorithm

DG placement is investigated by other intelligent algorithms such as GA [44,45,46,47,48], Tabu Search [49, 50], Ant Clooney [51], Artificial Bee Colony [52], Differential Evaluation [53] and Harmony Search [54] algorithms.

Example In the 33 bus distribution network shown in Figs. 17 and 18, do the DG placement problem with PSO, GAPSO, and MINLP methods. For better analysis, also specify the DG sizing system. The objective function for optimal placement and sizing is to reduce power losses. Also, after solving the problem, compare the voltages of each bus in both ways. Each DG can have a capacity of 0.5 to 1.5 MW. After determining the DG placement and sizing, check the system specifications in terms of power losses, execution time and voltage.

Fig. 17
figure 17

33 bus distribution system

Fig. 18
figure 18

Output voltage results for the studied methods

This has been done using the MINLP method of GAMS software and Knitro solver. The formulation for DG placement and sizing in the MINLP method is in accordance with the reference [32]. The PSO and GAPSO methods use the Newton Raphson load flow method to obtain power losses and voltage in each network arrangement and explains how this method works in Sections 3-4-5. The placement of all methods shows the same result, and according to the results, DGs should be in the 13th, 24th, and 30th buses. The power losses of active power and execution time in the MINLP method are less than the PSO and GAPSO. The reason for the lower execution time is the use of the Newton Raphson load flow method to solve power losses and voltage. In terms of voltage, the PSO method has a higher voltage profile level due to the selection of DGs with higher capacities. Because the allowable value set for this example is 0.95 to 1.05 p.u, voltages in the all methods are within the allowable range in terms of voltage. Although the MINLP method, like the PSO, is not guaranteed to achieve the optimal global response due to its nonlinear and non-convex problem, the MINLP method performs better performance due to lower power losses and execution time. The PSO and GAPSO algorithm for high-dimensional networks is not used due to the long time required to solve the problem.

6 Conclusions

This chapter first explains the advantages and disadvantages of using DGs in a distribution network. DG placement methods are divided into two categories: the use of intelligent algorithms and numerical optimization methods, and each of these methods is described. Finally, to compare these methods, simulation for the DG placement problem is performed with one of the numerical optimization methods and two heuristic methods (PSO and GAPSO). The numerical optimization method works better in terms of execution time and reducing power losses, and also allocates smaller values for each DG. PSO and GAPSO methods also have higher voltage profile levels due to the allocation of larger values for each DG. Therefore, the use of numerical optimization methods in high dimensional networks is recommended.