Probabilistic Load Flow–Based Optimal Placement and Sizing of Distributed Generators

: Distributed generation (DG) is gaining importance as electrical energy demand increases. DG is used to decrease power losses, operating costs, and improve voltage stability. Most DG resources have less environmental impact. In a particular region, the sizing and location of DG resources signiﬁcantly affect the planned DG integrated distribution network (DN). The voltage proﬁles of the DN will change or even become excessively increased. An enormous DG active power, inserted into an improper node of the distribution network, may bring a larger current greater than the conductor’s maximum value, resulting in an overcurrent distribution network. Therefore, DG sizing and DG location optimization is required for a systematic DG operation to fully exploit distributed energy and achieve mutual energy harmony across existing distribution networks, which creates an economically viable, secure, stable, and dependable power distribution system. DG needs to access the location and capacity for rational planning. The objective function of this paper is to minimize the sum of investment cost, operation cost, and line loss cost utilizing DG access. The probabilistic power ﬂow calculation technique based on the two-point estimation method is chosen for this paper’s load ﬂow computation. The location and size of the DG distribution network are determined using a genetic algorithm in a MATLAB environment. For the optimum solution, the actual power load is estimated using historical data. The proposed system is based on the China distribution system, and the currency is used in Yuan. After DG access, active and reactive power losses are reduced by 53% and 26%, respectively. The line operating cost and the total annual cost are decreased by 53.7% and 12%, respectively.


Introduction
Distributed generation (DG) is a small-scale (usually 1 kW-50 MW) distributed power production unit, located near the load, meant to fulfil the load requirement of specialized customers or supplement the grid for economic efficiency. DG entails installing and operating a portfolio of tiny, compact, and environmentally-friendly mechanisms [1]. DG may be used to produce a whole customer's electrical supply to reduce peak demand, backup emergency production, or improve dependability of the grid. DG technology is less and generator power uncertainty variables change together and are then calculated. The calculated results and the power system voltage of each branch node start load probability statistical properties of the trend. The random trend and probabilistic load flow methods are the most mainstream methods to solve the flow problems. The random method, in which the trend is an uncertain factor of the system as a random variable at a certain point in time, to study these random variables affects the calculation of the uncertainty of the results brought about at each time point to the traditional trend. The probability of the trend method is the study of uncertain variables' impact on the grid over some time. The nonlinear flow equations to solve the error caused by the linear model is shown in reference [29]. Monte Carlo simulation is randomly selected from the random variable data, subject to the probability distribution characteristic variable. Then, the data is associated with the selected simulation solution as an input variable, so the node voltage is determined to be accurate and branch flows.
The cumulate bind Gram-Charlier series expansion is shown in [30]. The series expansion uses a relatively simple calculation rather than complex mathematical convolution calculation. The method reduces the memory footprint, the linear model of the trend, to improve the calculation speed and accuracy. However, the Convolution Method and cumulative probability trend assume that the random variables are unrelated, and there is a relationship between the random variables' practical problems. The point estimate method (PEM) is a probability-to-certainty problem solving technique that considers the correlation between input variables [30,31]. It can be used, in conjunction with the existing probabilistic load flow algorithm, to obtain an accurate distribution for quantity. The PEM is then used to fit the more probabilistic trend solution. The point estimation method is the most widely used two-point and three-point estimation method, wherein the two methods [32], including the Two Point Estimate Method (2PEM), are the most common.
The main contributions of this paper are as follows: i. This paper collects and analyzes a series of research works on probabilistic power flow, DG location, and capacity problems based on the point estimation method. ii.
Genetic algorithm is used to optimize DG location and capacity. The forward and backward substitution method is used to calculate probabilistic power flow. iii.
The economic model of distribution network planning with DG is established. The objective function is to minimize DG cost, line loss cost, and power purchase cost. The three inequality constraints are node voltage constraints, conductor current constraints, and DG operation constraints. The penalty factor is introduced to establish a new comprehensive, objective function. iv.
Historical load data of the actual power grid is used for the simulation, the genetic algorithm is used to optimize the calculation. The optimization results are compared with those of the DG distribution network without access. v.
A graphical interface software for DG location is developed by MATLAB programming.

Proposed Approach
There are several types of power flow calculation methods in the power system. In this paper, probabilistic load flow is based on a two-point estimate method chosen for power flow calculation. For the DG sizing and location, the genetic algorithm is used.

Probabilistic Power Flow Algorithm Based on Two-Point Estimation Method
Suppose there are n nodes in a grid structure, branch b, PQ node l, then its flow equations system, Cartesian coordinates can be expressed as [21]: where: Y random column vector, representing.
where P is the reactive power, Q i It means no power, V it represents a node voltage; Z represents active and reactive power; g represents node power, h is representing the branch power.
The two-point estimation method is a method based on the point estimation method. It is called the two-point estimation method because only two values are needed in the calculation. These two values are distributed on both sides of the mean value of each random variable. Then, the two values are used to replace the mean of corresponding random variables. The probabilistic power flow in Equations (1) and (2) are used to calculate deterministic power flow. The other random variables are still taken at the mean. If there are m random variables in a power system, then deterministic power flow calculation needs to be calculated 2m times. The probabilistic power flow of the two-point estimation method depends on the results of deterministic and probabilistic power flow calculations. It can be applied with only minor changes in the deterministic power flow calculation program, improving efficiency and ensuring accuracy. This is one of the reasons why the two-point estimation method is chosen.

Power Flow Calculation of Distribution Network with DG
Through the power flow calculation of the distribution network, we can intuitively understand and evaluate the operation status of the target grid. For the power flow calculation of a distribution network with DG, because DG itself is a power generation equipment, it can provide power, it is necessary to consider the influence of different installation locations and capacity of DG on power transmission. DG is usually used as an additional alternative power supply. The installation site is usually directly located at or around the load. This paper assumes that all DG installation sites are now installed on load nodes. Figure 1 is a single radial line topology. There are n nodes on this line. Assuming that the DG accessed is on the i node, according to the active P DGi , size of active P Li and DG, and the loads on the node, the active flow of the node will encounter some situations.
where: random column vector, representing. , , , . . , , , , , . . , , , where is the reactive power, It means no power, it represents a node voltage; represents active and reactive power; represents node power, ℎ is representing the branch power.
The two-point estimation method is a method based on the point estimation method. It is called the two-point estimation method because only two values are needed in the calculation. These two values are distributed on both sides of the mean value of each random variable. Then, the two values are used to replace the mean of corresponding random variables. The probabilistic power flow in Equations (1) and (2) are used to calculate deterministic power flow. The other random variables are still taken at the mean. If there are random variables in a power system, then deterministic power flow calculation needs to be calculated 2 times. The probabilistic power flow of the two-point estimation method depends on the results of deterministic and probabilistic power flow calculations. It can be applied with only minor changes in the deterministic power flow calculation program, improving efficiency and ensuring accuracy. This is one of the reasons why the two-point estimation method is chosen.

Power Flow Calculation of Distribution Network with DG
Through the power flow calculation of the distribution network, we can intuitively understand and evaluate the operation status of the target grid. For the power flow calculation of a distribution network with DG, because DG itself is a power generation equipment, it can provide power, it is necessary to consider the influence of different installation locations and capacity of DG on power transmission. DG is usually used as an additional alternative power supply. The installation site is usually directly located at or around the load. This paper assumes that all DG installation sites are now installed on load nodes. Figure 1 is a single radial line topology. There are nodes on this line. Assuming that the DG accessed is on the i node, according to the active , size of active and DG, and the loads on the node, the active flow of the node will encounter some situations. a. When, the load node is equivalent to an active power supply node, which provides active power to the distribution network, and the reverse power flow will occur. b. When, there is no active power flow between the distribution network and the load node, excluding other factors. c. When the substation will continue to transmit power to the load node, and the active power transferred will be reduced to compared with the case without DG.
From the above analysis, it can be seen that, when DG is only connected to node on the distribution line and the active power of load node, is larger than the total active load time of feeder node to , i.e., ⋯ The direction of power flow will be reversed, and DG will conversely transmit power to the power side of a.
When, P DGi > P Li the load node is equivalent to an active power supply node, which provides P DGi − P Li active power to the distribution network, and the reverse power flow will occur. b.
When, P DGi = P Li there is no active power flow between the distribution network and the load node, excluding other factors. c.
When P DGi < P Li the substation will continue to transmit power to the load node, and the active power transferred will be reduced to P DGi − P Li compared with the case without DG. From the above analysis, it can be seen that, when DG is only connected to node i on the distribution line and the active power P DGi of load node, i is larger than the total active load time of feeder node i to n, i.e., P DGi > P Li + P Li+1 + P Li+2 + . . . + P Ln The direction of power flow will be reversed, and DG will conversely transmit power to the power side of the distribution network, which is also a potentially adverse effect on the stable operation of the distribution system after DG is connected. When multiple load nodes are connected to DG on this line, the flow direction of other branches can also be obtained by similar analysis. It is not difficult to see that, when many DGs are connected to the distribution network, the power flow direction of the line may change. Most scholars believe that the capacity of DG access should be limited to ensure that the direction of power flow will not change after DG access to the distribution network. According to the characteristics of distribution network structure, there are many methods to calculate power flow in literature. At present, the more mature algorithms include the forward and backward substitution method, fast decoupling method, and Z bus method [33]. Due to the rapid stability of the forward and backward substitution method in power flow calculation of the distribution network, this paper uses forward and backward substitution methods to solve power flow calculation of a distribution network with DG, which connects DG as a "negative" load to the load point. The following Equations can describe the power flow equations in radiation lines: where: i = 1, 2, . . . . . . , n, the active load power P L , load reactive power P L , DG active power P o . All the above variables are random variables with mean and probability distribution density. In power flow calculation, the rotation is combined with the two-point estimation method. Figure 2 shows the probabilistic power flow calculation flowchart based on the two-point estimate method.

Network Loss Calculating Model of Distribution Network
Generally, the calculation of network loss is divided into two parts: one is the line loss of the distribution network, the other is the power loss of the transformer. The sum

Network Loss Calculating Model of Distribution Network
Generally, the calculation of network loss is divided into two parts: one is the line loss of the distribution network, the other is the power loss of the transformer. The sum of all branch line losses in the feeder is the distribution network line. Transformer losses are divided into no-load and load losses. The operating voltage and capacity of the transformer determine the size of no-load losses, and the size of load determines the size of load losses. Much of the literature about line loss is very clear. The calculation method of transformer loss is mainly introduced below. There are two ways to measure transformers: high-supply meter and low-supply meter. For high-supply meter users, copper loss and iron loss of transformers have been counted as inactive meter and reactive meter without additional calculation. Voltage transformer capacity below 160 kVA is measured by high supply and low meter. Transformer loss is related to parameters and load curve. The previous calculation process was rather complicated. This paper uses the following formulas [34] to calculate transformer loss: Transformer power loss calculation: where, P L is representing power loss of transformer; P o is the no-load active power loss of transformer; K is equivalent coefficient RMS of daily load; B is load factor; P e is active load loss for transformer rated load; Operation hour is T which is 720 h; A is for daily consumption; cos ∝ is for the secondary side force ratio of the transformer, take 0.85 here; S e is transformer rated capacity. The reactive power loss of the transformer is calculated by the following equations [34]: where reactive power loss of the transformer is Q L ; reactive power loss for no-load transformer is θ o ; K is equivalent coefficient RMS of daily load; B is the load factor; θ e is the reactive power loss of the transformer rated load; Operation hour is T which is 720 h; L o is no-load current of the transformer as a percentage of rated current (%); S e is the transformer rated capacity; V e is the impedance voltage percentage. For aspect calculation, the values of K and B can be divided into four cases, according to the nature of electricity consumption, as shown in Table 1 below:

Problem Definition and Mathematical Model
This paper establishes an economic model of distribution network planning with DG for the time of 10 years. When the number, location, and capacity of DG are uncertain, the objective function is to minimize the sum of investment and operation cost, line loss cost, and all purchase costs after DG access. The penalty factor is introduced to restrict the operation of node voltage, conductor current, and distributed generation. Inequality constraints are converted into equality constraints and added to the calculation of objective functions. Objective Function: min Z cost = C DG + C L + C en (11) Goal 1. Minimal DG's investment and operating costs Goal 2. Minimum operating costs for distribution network systems Goal 3. The minimum cost of purchasing electricity among them, (12) is minimizing the DG investment and operation cost. Where C DG is converted to the annual investment and operating expenses of DG, n DG indicates the number of DGs connected to the distribution network; ∂ i represents the average annual cost coefficient of fixed investment for the i th DG; C DGi fixed investment cost of the i th DG (10,000 yuan); C pu is the unit prize (RMB/kWh); ∆E DGi is the total annual energy loss of i th DG; W DGi is inspection and maintenance costs of the i th DG.
Equation (13), where C L is converted to annual line operating costs; n l is the total number of branches; C pu is unit prize (RMB/kWh); τ max is annual maximum load loss hours of the i th branch; ∆P Li is active power loss on branch i. Equation (14) represents the minimum cost of purchasing electricity, where C en is the electricity purchasing cost; T max is the maximum load annual utilization hours (h); P ∑ Newload is total additional load; P ∑ DG is DG's total active output; C pu is the total unit prize; n DG is represents the number of DGs connected to the distribution network; λ i is the power factor of i th DG; S DGi is capacity of i th DG.

Constraints
Constraints include two types: equality and inequality constraints. Among them, the power flow calculation Equations (3)-(5) are equality constraints. Inequality constraints include node voltage constraints, conductor current inequality constraints and DG access capacity constraints. The node voltage control is set to 7% of the reference voltage within a safe range, and the upper limit of the branch current is set to 420 A. As mentioned above, the relay protection devices of radial lines only allow one-way power flow to pass. To control the DG access capacity not to exceed the node's load, the DG access capacity does not exceed 10% of the total maximum load of the power grid.
(1) Node voltage constraints where, U i represents the voltage of the i th node (kv); U imax − U i is the upper limit (kv); U imin − U is the lower limit; K u is the penalty factor of node voltage, K u generally takes a larger value, when meeting the requirements, it takes a value of 0.
(2) Conductor current inequality constraints where, I j is represents the current of branch j; I jmax is the upper limit of the current allowed by the j th branch; K I is conductor current penalty factor, the principle of value is the same as K U . (3) Distributed power operating constraints where, S ∑ DG is the total capacity for DG access to the grid; S L is the 10% of total grid load; K ∑ DG is the DG injection amount penalty factor, the principle of value is the same as K U .
The above inequality constraint, in the form of a penalty factor, is introduced into the objective function. The new objective function is obtained: In this paper, the genetic algorithm (GA) is used to solve the minimum value problem of DG location and the capacity objective function problem, also known as a multi-objective optimization problem.

DG Location and Sizing
The single value of all groups is the average installed capacity of DG at the location. Apparently, DG, based on natural climate effects, exhibits volatility, interstitially, and randomness. Figure 3 shows the DG location and sizing algorithm flowchart. In the power flow calculation with DG, DG is described as a probability variable, but in the decisionmaking, the following decision variables (one chromosome in the genetic algorithm) are determined: DG = (DG1, DG2, . . . DGn) the value is the expected value with a probability distribution, so it is a certain value in each decision. Therefore, when the genetic algorithm is introduced, each time the chromosome group to be selected is given, it will be used as the power generation capacity of the i th DG. The two-point estimation is also entered into the power flow calculation to obtain the objective function. In solving the DG location and size problem, an initial population is generated by random generation, which contains the location and size information of DG. This paper assumes that each DG is installed on a load node, and one load node can only install one DG. For a radial distribution topology that allows n nodes to install DG, the location and size information of DG access can be represented by a set of variables C = (c 1 , c 2 , . . . , c n ). The value of c i is converted to binary coding by real coding in the genetic algorithm, and the output is converted to real number output. The size of c i represents the location and capacity information of DG access to the corresponding load node i, and if c i = 0, the load node does not access DG. If multiplying the capacity base value is the DG access capacity of the node. To reduce the error, the capacity base value a i of each node is equal to the maximum load value P maxi of the node divided by the maximum of the actual decision variables. The range of actual decision variables is [0, 15], so c 6 = 5 node 6 is the maximum load value, P max6 = 100 kW, a 6 = P max6 15 = 100 15 The access node capacity 6 is The range of actual decision variables in this paper is taken [0, 31]. Choosing an appropriate fitness function has a significant impact on the results of optimization calculation.
The objective function is regarded as the fitness function, and the constraint condition is transformed into an unconstrained form in the form of a penalty factor. Finally, the final planning scheme is determined according to the individual fitness. In this paper, the roulette method is used to select and then execute related transfer operations. We have tested different parameters. Therefore, the most satisfactory results come from these values. Thus, we set crossover rate P c1 = 0.9, P c2 = 0.6, mutation rate P m1 = 0.1, P m2 = 0.001. In this paper, the maximum number of cycles T = 100, and the minimum number of optimal individuals T p = 30. The linear scaling algorithm is used to individually loop calculations. If the number of loops is 100, the program exits the loop and proceeds with the following calculation. If the number of cycles does not reach 100, but the optimal solution of the objective function has been found, then the cycle also exits in advance. The range of actual decision variables in this paper is taken [0,31]. Choosing an ap propriate fitness function has a significant impact on the results of optimization calcula tion. The objective function is regarded as the fitness function, and the constraint condi tion is transformed into an unconstrained form in the form of a penalty factor. Finally, the final planning scheme is determined according to the individual fitness. In this paper, the roulette method is used to select and then execute related transfer operations. We have tested different parameters. Therefore, the most satisfactory results come from these val ues. Thus, we set crossover rate 0.9, 0.6, mutation rate 0.1, 0.001 In this paper, the maximum number of cycles 100, and the minimum number of op timal individuals 30. The linear scaling algorithm is used to individually loop calcu lations. If the number of loops is 100, the program exits the loop and proceeds with the following calculation. If the number of cycles does not reach 100, but the optimal solution of the objective function has been found, then the cycle also exits in advance.

Results and Case Studies
This article takes the modified IEEE 62 nodes as an example. A configuration diagram of the power distribution network is shown in Figure 4. The radial distribution network [35] structure consists of 62 nodes and 61 branches. Among them, node 24 and node 31 are connected by small hydropower stations as power points, so load data is calculated as a negative number, while the other nodes are load points.
The load nodes in the network can run and install DG, which is directly installed on the load nodes. Load data, herein provided by the examples, and basic parameters are as follows in Table 2. Assuming that each node load is independent of each other, the input and output have the same probability distribution, and the load parameters of the nodes obey the normal distribution.

Results and Case Studies
This article takes the modified IEEE 62 nodes as an example. A configuration diagram of the power distribution network is shown in Figure 4. The radial distribution network [35] structure consists of 62 nodes and 61 branches. Among them, node 24 and node 31 are connected by small hydropower stations as power points, so load data is calculated as a negative number, while the other nodes are load points. The load nodes in the network can run and install DG, which is directly installed on the load nodes. Load data, herein provided by the examples, and basic parameters are as follows in Table 2. Assuming that each node load is independent of each other, the input and output have the same probability distribution, and the load parameters of the nodes obey the normal distribution. In addition, the unit resistance value of the line is R = 0.46 Ω/km, and the unit reactance value is X = 0.368 Ω/km. The probabilistic load flow is calculated using the forward and backward probabilistic load flow algorithm. Hence, it is necessary to know the connection relationship of each node and other parameters needed for power flow calculation. This paper assumes that only load and DG random fluctuations are considered, and other variables are not considered for the time being. For a given distribution network structure shown in Figure 4, when the number, location and capacity of DG access are uncertain, the objective function is minimized. The improved genetic algorithm is used to obtain the DG location and capacity selection results in Table 3. Wherein the compensation capacity of the node 0 indicates that the node does not access DG, locating and sizing of the actual program can be simplified, as shown in Table 4.  In addition, the unit resistance value of the line is R = 0.46 Ω/km, and the unit reactance value is X = 0.368 Ω/km. The probabilistic load flow is calculated using the forward and backward probabilistic load flow algorithm. Hence, it is necessary to know the connection relationship of each node and other parameters needed for power flow calculation. This paper assumes that only load and DG random fluctuations are considered, and other variables are not considered for the time being. For a given distribution network structure shown in Figure 4, when the number, location and capacity of DG access are uncertain, the objective function is minimized. The improved genetic algorithm is used to obtain the DG location and capacity selection results in Table 3. Wherein the compensation capacity of the node 0 indicates that the node does not access DG, locating and sizing of the actual program can be simplified, as shown in Table 4.
Comparative analysis of before and after DG access is shown in Table 5. This program's objective function value corresponds to the average annual total cost of 490.1953 million before DG access, which, converted into the purchase of electricity per year, is 361.4664 million yuan. The annual operating costs for the line are 5.3174 yuan. The annual investment and operation of DG cost are 75.5910 million yuan. The annual DG operation constraint penalty fee is 0 Yuan. At the same time, the annual node current penalty fee is also 0 Yuan. The annual node voltage penalty fee is 0 Yuan. All penalties are zero, indicating that each constraint is met after access to the DG, and no crossover occurs.  Figure 5 shows that each node voltage (red line), after the access DG, is significantly higher than the previous access (blue) for each node voltage. Still, the voltage does not exceed the upper limit, indicating that access DG improves the voltage's quality. Before DG multiple access, the closer and distal branches' node voltage dropped due to losses Energies 2021, 14, 7857 13 of 16 caused by the system. The DG ratio is greater in the peripheral access node and the voltage boost; therefore, the phase node voltage near the tip is reduced more than the head-end node voltage. This is because the access DG can effectively reduce the power flow on the line, thereby reducing the line loss, but it does not eliminate the loss of the node voltage compared to tip or head-end node voltage reduction. Such as peripheral node 15, the compensation voltage before 9.4916 kV, compensation voltage 9.7443 kV, increases by 2.67%, while the front 17 of the node voltage compensation distal 9.8956 kV, compensation voltage 9.9600 kV, increases by 0.5134%.
Line operating cost (million RMB) 11.4878 5.3174 DG operation in investment costs (million RMB) 0 75.5910 Figure 5 shows that each node voltage (red line), after the access DG, is significantly higher than the previous access (blue) for each node voltage. Still, the voltage does not exceed the upper limit, indicating that access DG improves the voltage's quality. Before DG multiple access, the closer and distal branches' node voltage dropped due to losses caused by the system. The DG ratio is greater in the peripheral access node and the voltage boost; therefore, the phase node voltage near the tip is reduced more than the head-end node voltage. This is because the access DG can effectively reduce the power flow on the line, thereby reducing the line loss, but it does not eliminate the loss of the node voltage compared to tip or head-end node voltage reduction. Such as peripheral node 15, the compensation voltage before 9.4916 kV, compensation voltage 9.7443 kV, increases by 2.67%, while the front 17 of the node voltage compensation distal 9.8956 kV, compensation voltage 9.9600 kV, increases by 0.5134%. It can be seen from Figure 6 that each branch current (red line) after DG access is smaller than each branch current (blue line) before DG access, and the line current corresponds to the corresponding line network. The loss will be reduced. Figure 7 shows the change in active loss before and after the DG is connected. The trends in Figures 5-7 are generally consistent. The node voltage, node current, and branch loss closely relate to a given distribution network structure. It is necessary to configure the location and capacity of the DG properly. To demonstrate the changes produced by the distribution network to the access DG, the figure below compares the parameters before and after DG access. It can be seen from Figure 6 that each branch current (red line) after DG access is smaller than each branch current (blue line) before DG access, and the line current corresponds to the corresponding line network. The loss will be reduced. Figure 7 shows the change in active loss before and after the DG is connected. The trends in Figures 5-7 are generally consistent. The node voltage, node current, and branch loss closely relate to a given distribution network structure. It is necessary to configure the location and capacity of the DG properly. To demonstrate the changes produced by the distribution network to the access DG, the figure below compares the parameters before and after DG access.

Conclusions
Based on the summarized relevant results, a comparative analysis of probabilistic power flow calculation is presented in this paper. Here, a probabilistic power flow calculation, based on the two-point estimation method, is proposed. It applies this method to the DG customized capacity problem of a given distribution network grid structure. The objective function is to minimize the sum of investment and operation cost, line loss cost, and purchase cost of DG every year. DG access results show that the proposed method can reduce active power losses by 53% as well reactive power losses. The proposed method can reduce active power losses by 53% and reactive power losses by 26%. The line operating cost is decreased by 53.7%, and the total annual cost reduced by 12%. The penalty factor is introduced to transform the three inequality constraints of node voltage, conductor current, and operation of distributed generation into equality constraints, which are also added to the objective function calculation. In the future, the mathematical model for DG-based distribution network design will be further researched and enhanced to account for the effect of other important variables on the distribution network.

Conclusions
Based on the summarized relevant results, a comparative analysis of probabilistic power flow calculation is presented in this paper. Here, a probabilistic power flow calculation, based on the two-point estimation method, is proposed. It applies this method to the DG customized capacity problem of a given distribution network grid structure. The objective function is to minimize the sum of investment and operation cost, line loss cost, and purchase cost of DG every year. DG access results show that the proposed method can reduce active power losses by 53% as well reactive power losses. The proposed method can reduce active power losses by 53% and reactive power losses by 26%. The line operating cost is decreased by 53.7%, and the total annual cost reduced by 12%. The penalty factor is introduced to transform the three inequality constraints of node voltage, conductor current, and operation of distributed generation into equality constraints, which are also added to the objective function calculation. In the future, the mathematical model for DG-based distribution network design will be further researched and enhanced to account for the effect of other important variables on the distribution network.