Multi-Objective Optimal Placement and Sizing of Distribution Static Compensator in Radial Distribution Networks With Variable Residential, Commercial and Industrial Demands Considering Reliability

This article presents an optimal placement and sizing of distribution static compensator (DSTATCOM) in radial distribution networks as multi-objective optimization with the objective of power loss reduction, voltage profile improvement and network reliability considering different variable demands using whale optimization algorithm (WOA). The WOA is inspired by the hunting behavior of humpback whales. The optimal location and size of DSTATCOM are considered as decision variables that are determined using the WOA. Network reliability is defined as energy not supplied (ENS) of the customers caused by line outages. The proposed method is implemented on IEEE 33-bus and Ahvaz 59-bus distribution networks. The optimal placement and sizing of DSTATCOM are investigated considering different residential, commercial and industrial loads, and also the effect of incorporating reliability is evaluated on power loss, minimum voltage and ENS. The simulation results show that the power loss and ENS are declined and also voltage profile is improved by determining the location and size of DSTATCOM in the networks in different loading conditions using the WOA. The obtained results demonstrate that considering reliability further reduces the ENS and more customer demand is met. The power loss decreases 21.60%, 30.71%, and 22.03% for residential, commercial and industrial loads in the 33-bus network and 26.86%, 31.94%, and 24.39% for the 69-bus network, respectively compared to base networks. Moreover, the performance of the WOA is compared with previous studies and the results indicate the superiority of the proposed method.


I. INTRODUCTION
Power loss created in the distribution networks is divided into two main parts, 60% of which is wasted in the lines and 40% in the transformers. Even a small reduction in this value can save a considerable amount of money [1], [2]. On the other hand, the rapid increase in power generation capital cost and the problems caused by the installation of The associate editor coordinating the review of this manuscript and approving it for publication was Yu Liu . reactive power sources in distribution networks have attracted more attention to exploit and enhance the operation of power distribution networks. Therefore, power loss reduction and voltage profile improvement are important challenges for the power network [3], [4]. Various methods are implemented for reducing the losses as well as improving the voltage profile in the networks. One of the conventional methods is the use of reactive compensation sources. The main advantages of this method are improving power factor, improving the voltage profile, reducing losses and increasing the capacity of feeders. Injecting reactive current to the distribution network increases the power losses and voltage deviations, which can be addressed by local reactive power generation using reactive compensators. Hence, network reactive compensation is necessary and installing a reactive compensator in the optimal location with an optimal size will reduce the cost of losses and improve the network voltage profile [3], [4]. One of the most common reactive compensation devices is the capacitor, which is used in distribution networks with different optimization methods and objectives. With optimal adoption of the capacitor, network performance can be improved by connecting parallel capacitors to the distribution feeders [5]. Another device that is applied to enhance the quality of power in the network is DSTATCOM [6], [7]. As a high-response control source, the DSTATCOM controller eliminates power fluctuations, reduces load current harmonics and regulates the voltage. The main parts of a DSTATCOM include a three-phase VSC and a control system. The VSC is coupled to the network in parallel via a transduction transformer [6], [7]. To achieve the major advantages of the DSTATCOM utilization method and enhance the operation of the network, it is essential to determine the optimal location and size of the DSTATCOM. Unsuitable placement and sizing of reactive compensators in the network increase the costs of power losses, energy production and power transmission. Therefore, in order to evaluate the effect of the DSTATCOM application in the distribution network, some indicators can be considered as voltage profile, power losses and reliability. The optimal placement and sizing of the DSTATCOM in the network can be solved in a variety of ways, and nowadays the use of intelligent algorithms is one of the most widely-used methods.
Different researches are conducted in the field of optimal placement and sizing of reactive power sources including capacitors and DSTATCOM in the networks. The following presents some important methods in this area. In [8], teaching-learning-based optimization (TLBO) is proposed for optimal placement and sizing of the capacitor in the network which aims to reduce power loss and energy reduction costs. The results show that the TLBO is successfully used in the network and reduces the loss cost. In [9], the cuckoo search algorithm (CSA) method is presented for optimal placement and sizing of the shunt static capacitors in distribution networks aiming to reduce costs and enhance the voltage profile. The simulation results indicate that the CSA reduces more power losses with higher convergence speed. In [10], the optimal placement and sizing of the capacitor are studied in a radial network to reduce the losses, enhance the voltage stability and reduce the reactive cost using the artificial bee colony (ABC) method. In [11], the optimal location and size of the capacitor are determined in the network using particle swarm optimization (PSO) to reduce energy losses cost and installation and reactive costs. In [12], the optimal location and size of the capacitor in the network are found to reduce the losses considering different load models using the krill herd (KH) algorithm. In [13], the flow pollution algorithm (FPA) is used for locating and sizing capacitor banks in the network with minimizing the losses, purchased reactive power cost and reactive sources installation cost. In [14], the biogeography-based optimization (BBO) method is applied for optimal placement and sizing of capacitors in radial networks with the objective of reducing active and reactive loss costs and also minimizing the energy purchased from the main grid considering multilevel and nonlinear loads. In [15], the optimal placement and sizing of the capacitor in the network are found with the objective of reducing losses and reactive costs using the improved harmony search algorithm (IHSA). In [16], the optimal location and size of the capacitor in the network are identified using bacterial foraging optimization (BFO) with the aim of loss minimization. In [17], the placement and sizing of parallel capacitors in the distribution network are optimally obtained to minimize the losses and the financial profit maximization via gravitational search algorithm (GSA). In [18], determining the optimal location and size of the parallel capacitors are evaluated for improving the network losses and operation via an imperialist competitive algorithm (ICA) and the genetic algorithm (GA). According to the results, the ICA is much more desirable than the conventional algorithms and has a greater ability to find the best global solution. In [19], the optimal placement and sizing of DSTATCOM with distributed generation are identified in the networks using the PSO algorithm to reduce losses and improve the voltage profiles. In [20], the optimal location and size of the DSTATCOM in the networks are determined using the immune algorithm (IA) with loss minimization and current and voltage improvement. In [21], the optimal sitting and sizing of DSTATCOM in the networks are evaluated with loss reduction using the CSA algorithm. In [22], the placement and sizing of DSTATCOM in the networks are presented with the objective of reducing the cost of energy losses and maximizing financial savings using the differential evolution (DE) algorithm. In [23], the determination of optimal location and size of DSTATCOM in the networks is studied with the aim of loss minimization and voltage profile enhancement considering voltage stability index using an analytical method, and the results indicate improvement of network performance after DSTATCOM optimization. In [24], the optimal placement of DSTATCOM is investigated with aim of loss reduction and voltage profile enhancement and also reduction of economic costs using the GA method. The results show a reduction in the network losses and voltage deviations. In [25], a modified grey wolf optimizer (GWO) is applied to determine the optimal location and size of the DSTATCOM in the distribution network to minimize the losses, enhance the voltage profile and reduce the costs. In [26], the gravitational search algorithm (GSA) is adopted for DSTATCOM placement and sizing for loss reduction, voltage deviation reduction and maximization of the annual energy saving of the network. In [27], Cuckoo Search Algorithm (CSA) is developed for optimal sizing and placement of DSTATCOM in the networks for power loss minimization. In [28], a probabilistic method is presented for optimal sizing and placement of DSTATCOM via PSO with minimizing the power losses and voltage deviation and DSTATCOM cost minimization. In [30], optimization of location and size of DSTATCOM is presented with aim of DSTATCOM size, power losses reduction and minimizing the DSTATCOM installation cost. In [31], multi-objective optimization of DSTATCOM is developed in radial distribution networks based on a fuzzy method aimed at minimizing the losses cost, reactive cost and voltage deviations via golden ratio optimization algorithm (GROM). In [32], GWO is developed for the optimal installation of D-STATCOM to reduce the losses and provide load balance in the system. In [33], a hybrid analytical-coyote optimization technique (COA) is presented to find the optimal location and size of DSTATCOM to minimize the voltage deviation and losses.
Evaluation of literature review on the optimal allocation of reactive compensators shows that, in most studies, the network load is assumed constant, which is one of the most important disadvantages of these studies. The amount of load in the networks depends on the time and the type of residential, commercial and industrial load pattern. Today, the use of DSTATCOM units in distribution networks is popular, so due to the load changes caused by variations in consumption patterns over time, it is necessary to plan and distribute variable and optimal reactive power using the DSTATCOM in the network. In operating conditions, reactive power transfer to the network can improve the performance of the distribution network, but given the load changes, reactive power injection by the DSTATCOM over time in distribution network buses should be guaranteed to improve network performance. In the literature review on the allocation of DSTATCOM in the distribution network, application of time-variable load and considering the types of residential, commercial and industrial loads have not been well addressed. In most studies, the load is considered constant, which leads to inaccurate operation and degrades network performance. Consequently, in this article that deals with DSTATCOM allocation, a variable load is assumed. Moreover, one of the important concerns in network operation is the reliability of customer supply. Given the special importance of avoiding the improper operation of the system, which can cause a large number of customers to have power outages, it is important to study reliability. The power interruption of the network customers due to line outages has been cited as one of the important issues in the reliability study of the distribution network. In the literature review on the allocation of DSTATCOM in the distribution network, the objective of improving reliability has not been well addressed. In other words, the probability of network line outage in the allocation of DSTATCOM is not considered in calculating the energy not supplied to the customers. The optimal allocation of DSTATCOM that improves the reliability or reduces the amount of energy not supplied to the customers due to the outage of the network lines outage should be found. This article evaluates the network reliability concerning the DSTATCOM allocation. Besides, due to the available optimization algorithms in solving various problems, an appropriate method with high optimization speed and accuracy that is not trapped in local optimal and can find the best installation site and size of DSTATCOM needs to be selected to achieve the best network performance. Each of the algorithms used in the literature review has strengths and weaknesses. Therefore, there is still a lot of motivation to use new methods in solving optimization problems. One of the optimization methods that has been very popular in the field of power system optimization in recent years and has a high speed and accuracy of optimization is the whale optimization algorithm (WOA), which is employed in this article to allocate DSTATCOM.
This study presents optimal placement and sizing of DSTATCOM in distribution networks considering hourly changes in its injected reactive power due to the hourly variations in three types of residential, industrial and commercial load. The aim is to reduce the losses and enhance the voltage profile and reliability of customers within 24 hours using the whale optimization algorithm (WOA) [34], which is a powerful method with high optimization speed and accuracy. In this study, one of the objectives of using DSTATCOM in the distribution network is to improve the reliability of the distribution network based on the reduction of energy not supplied (ENS) of customers. Therefore, the effect of considering reliability is also investigated in the DSTATCOM optimal sitting and sizing in distribution networks. Therefore, the main contributions of this article include multi-objective function, considering different types of variable demands including residential, commercial and industrial, DSTATCOM variable size distribution based on whale optimization algorithm and evaluating the effect of considering reliability in optimal use of DSTATCOM.
The main contributions of this research are presented below: • Multi-objective placement and sizing of DSTATCOM in radial distribution networks considering variable demands • Presentation of multi-objective problem based on losses, voltage profile and reliability • More reduction of energy not supplied of customers considering reliability in problem solution • Desirable performance of whale optimization algorithm to solve the DSTATCOM placement and sizing problem • Superiority of the proposed method compared with respect to previous studies In Section 2, the multi-objective function and constraints of the problem are presented. In Section 3, the modeling of the residential, commercial, and industrial demands are presented. In Section 4, an overview of the WOA and its implementation to solve the problem is described. In Section 5, the simulation results are outlined and the paper findings are concluded in Section 6.

II. PROBLEM FORMULATION A. OBJECTIVE FUNCTION
The multi-objective function of the optimal placement and sizing of DSTATCOM in the distribution network is presented VOLUME 9, 2021 with the objective of power losses minimization, voltage profile improvement and reliability enhancement based on the weighted coefficient method. The weighted coefficient method is used to normalize the objective function. The multi-objective function is formulated as follows: where, F 1,max , F 2,max and F 3,max are the maximum values of each objective functions of F 1 , F 2 and F 3 . w 1 , w 2 and w 3 refer to the weight coefficient of each function (|w 1 | + |w 2 | + |w 3 | = 1).

1) POWER LOSSES REDUCTION
The active power losses are caused by current passing through network lines that have ohmic resistance. The power losses based on the total network line losses are presented below [5], [15].
where, F 1 refers to the active power losses, R i the ohmic resistance of line i, |I @ i | The current of branch i and N branch is the number of network lines.

2) VOLTAGE PROFILE IMPROVEMENT
Improving the network voltage profiles is achieved by reducing bus voltage deviations. This objective function is presented below [5], [15].
In this equation, the total amount of voltage deviations of each network bus is calculated from the value of 1 p.u. Where, F 2 refers to the voltage profile function, V m is the voltage of bus m and N bus is the number of network buses.

3) RELIABILITY IMPROVEMENT
Reliability is one of the challenges in the distribution network operation. Given the special importance of getting the system out of proper operation, which can cause a large number of customers to have electricity outages, it is important to study the distribution network reliability evaluation. The power outage of network customers due to network line outages is one of the main factors in the issue of reliability of the networks, which is the effort of operators to reduce this index or improve the reliability. The energy not supplied (ENS) as reliability index is formulated as follows [35], [36].
Using this equation, the inability of the system to supply the network customer's demand and their power interruption is determined. Where, L refers to line numbers, r i is of line i resistance, N branch is the total number of lines, N i the number of disconnected loads due to the outage of line i, OR i the line outage value, L i is the length of the line, T i is the duration of fault repair, LD j is fault repair duration due to the outage of line i.
It should be noted that the multi-objective function of the optimal sitting and sizing of DSTATCOM in the distribution network considers losses minimization, voltage profile and reliability enhancement with a weighted coefficient method. Therefore, the WOA algorithm determines the capacity and location of the DSTATCOM in the distribution network to determine the best compromise between the three objectives (losses minimization, voltage profile and reliability enhancement). Therefore, the algorithm seeks to minimize the energy not supplied (ENS), which it calculates based on the outage rate of network lines and disconnection of load points in the network.
According to the equations provided, the active and reactive power injected into the network should be equal to the active and reactive power consumed by the network customers, in addition to the active and reactive power losses lost in the network lines. Where, R m,m+1 and X m,m+1 indicates the ohmic and reactance resistance between m and m+1 buses, P Post and Q Post are the substation active and reactive power, P load (m) and Q load (m) define the active and reactive loads of bus m, N rs refers to the number of DSTATCOMs installed in the network (in this study one DSTATCOM), P loss (i) and Q loss (i) refer to active and reactive losses and N rs b=1 Q rs (b) is the total reactive power can be placed in the network.

2) BUSES VOLTAGE
The voltage of the network buses must satisfy the below equation [15].
where, V m,min and V m,max refer to the low and high limitations of bus m voltage (between 0.9 and 1.1 p.u). The bus voltage should not exceed this range to maintain the network voltage stability.

3) REACTIVE OF EACH BUS
The reactive power value delivered to the bus by DSTATCOM should be less than its effective value.

4) NETWORK TOTAL REACTIVE POWER
The reactive power injected into the network by DSTATCOM should be less than or equal to 75% of the load reactive demand [13], [15].
The network power factor must follow bellow equation [15]: where, PF min and PF max refer to the minimum and maximum power factor of the network to manage the active and reactive power in the network.

6) ALLOWABLE LINE CAPACITY
The maximum mixed power passing through each network line is less than or equal to the rated value (S Li(rated) ) [15].
Q rs,min ≤ Q rs ≤ Q rs,max (11) In this study, 50 kV capacitors have been selected as the capacity of reactive units for placement in the network. In each network bus, a certain capacity of these reactive sources can be installed.

III. MODELING OF LOAD TYPES
In most operation studies of the distribution networks for load flow and voltage condition analysis, the load is considered constant. On the other hand, due to real load changes and understanding the effect of different loading on characteristics of the network, different loads including residential, commercial and industrial loads are selected for this study. In conventional power flow, active and reactive demands are usually considered constantly, while in the practical operation of the power system, the real load models ie residential, industrial and commercial loads depend on voltage and frequency. The voltage symbols α and β are defined in terms of load type. The characteristics of different types of loads based on the model of exponential loads are presented as follows [37]. where, V 0 defines the nominal (ref) voltage, α and β refers to constant values that depend on the load characteristics, and their values are given in Table 1.

IV. OPTIMIZATION METHOD
In this article, the WOA method is used to solve the optimal placement and sizing of DSTATCOM in the distribution network. The reason for selecting the WOA for this research is the high convergence speed and accuracy of this optimization method [34].

A. OVERVIEW OF WOA
Whales are known to be the largest mammals in the world. Whales are very intelligent and emotional animals. Humpback whales are interested in hunting small groups of fish on the surface of the water, which is performed by creating circular and spiral bubbles. The WOA intelligent algorithm is one of the nature-inspired and population-based optimization methods. The WOA related to swarm-based algorithms has some advantages over evolution-based algorithms. For example, the WOA preserves search space information over subsequent iterations while evolution-based algorithms discard any information as soon as a new population is formed. The WOA usually includes fewer operators compared to evolutionary algorithms (selection, crossover, mutation, elitism, etc.) and hence is easier to implement [34]. Figure 1 illustrates the pure feeding behavior of the humpback whale.

1) PREY SIEGE
The humpback whale identifies the prey's location and surrounds it. Search engine updates then search for their position relative to the best factor as follows [34].
where, t refers to iteration, A and C indicate the coefficient vectors, X * defines the best solution of the position vector, X refers to the hunting position vector, | | Absolute magnitude and · is multiply sign. Vectors A and C are defined as follows [34].
where, − → a indicates a linear vector from 0 to 2 in each iteration and − → r is a random vector between [0, 1]. Different locations around the best agent can reach the current position by adjusting the values of vectors A and C. Thus, a whale can update its position inside the prey space at any random position using (16)-(17).

2) PURE BUBBLE ATTACK
The pure bubble whale behavior is defined based on spiral motion. In the exploitation phase, the distance between the wall located in (X, Y) and the hunt located in (X * , Y * ) is a spiral relationship. This spiral motion is defined as follows [34].
By swimming around the prey, the whale traverses the following circular and spiral paths simultaneously as follows [34].

3) SEARCH FOR PREY
The position of the search factor in the exploration phase is randomly updated and considered the best search factor. The presented model is as follows [34].
These equations based on vector variability can be used to search for prey. In fact, humpback whales search randomly according to the position. Where, − − → x rand shows the position vector is random.
In each iteration of the WOA, search factors update their position relative to the obtained best solution. The WOA is transmitted between spiral or circular paths, with the value of p. In the end, the WOA method converges to achieve the best fitness value.

B. WOA IMPLEMENTATION IN PROBLEM SOLVING
The aim of using the WOA is the determination of location and size of DSTATCOM in the distribution networks considering mentioned objective function and satisfying the constraints. Hence, steps for the WOA implementation in DSTATCOM placement and sizing in the distribution networks are presented as follows, and also the flowchart of the WOA implementation is illustrated in Figure 2. Steps of using WOA for optimal placement of DSTATCOM.
Step 1) Initiate the distribution network data, line and load data, as well as determine the maximum number of iteration and population of the WOA algorithm. In this study, the number of populations, iterations and repetitions is considered 50, 100 and 30, respectively. The number of populations and maximum repetitions of the algorithm were selected based on the trial and error method and the experience of the authors in repeated performances of the program.
Step 2) Perform load flow and calculate power loss values, minimum network voltage and ENS value (considering outage rate of network lines) for the base network. In this study, the backward-forward method is used to solve the load flow.
Step 3) For each population of the WOA (whales), the set of decision variables is randomly determined. The objective function is then assigned to each set of variables corresponding to each whale. The whale is then selected as the representative with the best objective function value.
Step 4) The WOA population set is updated based on the mathematical equation of the spiral and circular movement of the whales and new optimization variables are randomly selected for the newly updated population.
Step 5) The load flow is executed and the value of the objective function for each set of new variables in step 4 is determined satisfying the operational constraints and the best whale with the best objective function (lowest value) is replaced after comparison with the best-obtained value in step 4 if it is better. In other words, a wall with a less objective function is considered the best member of the population.
Step 6) The optimization process continues until the convergence conditions are reached, i.e. the achievement of the best objective function value. The condition for achieving convergence is to perform the maximum iteration and repetition of the algorithm and achieve the minimum value of the objective function. If convergence conditions are met, go to step 7, otherwise, go to step 4.
Step 7) Stop the WOA and save the optimal location and size of DSTATCOM. Finally, the decision variables are optimally obtained using the WOA.
The simulation results of optimal placement and sizing of DSTATCOM using WOA and considering different load types in the distribution networks are presented. The maximum number of iterations, repetition and population of the WOA is considered 100, 30 and 50, respectively. These numbers are selected based on the trial and error method, authors' experience and multiple implementations of the optimization program. The schematic of the IEEE 33-bus network [38], [39] and Ahvaz 59-bus network [39] in Iran country is showed in Figures 3 and 4, respectively. In the 33-bus network (voltage of 12.66 kV), the demand is 3.715 MW and 2.3 MVar. Also, the total load of the 59-bus network (voltage of 33 kV) is 9.690 MW and 7.3182 MVar.

V. SIMULATION RESULTS AND DISCUSSION
For the optimal placement and sizing of DSTATCOM in networks, loads of the networks are considered as residential, commercial and industrial. The different Loading  coefficients for the 33-bus and 59-bus distribution network during 24 hours peak network load are shown in Figure 5 [40]. According to Eq. (1), the problem is solved for a set of different weighting coefficients, and in the end, the best set of weighting coefficients that have obtained the lowest objective function (global solution) is considered as the optimal coefficients. These coefficients are then used to solve the problem in different simulation modes. The optimal values of w 1 , w 2 and w 3 are determined 0.392, 0.287 and 0.321, respectively using WOA.

A. RESULTS OF 33-BUS IEEE NETWORK
The simulation results of optimal placement and sizing of one DSTATCOM in the 33-bus network are presented considering residential, commercial and industrial loads using WOA. The convergence curve of the WOA method is shown in Figure 6 in solving the problem. The WOA is capable to converge at a desirable speed and find the optimal solution with a desirable convergence speed.
The numerical results in the 33-bus network are presented in Tables 2-4. The 33-bus network losses before DSTATCOM optimization for residential, commercial and industrial loads during 24 hours are obtained 2532, 3133 and 2483 kW, respectively, the minimum voltage value is achieved 0.9131, VOLUME 9, 2021 Tables 2-4 without considering reliability. It is observed that in the study of residential load without considering reliability, by placing DSTATCOM in bus 9, the losses decreased from 2532 to 1972 kW and the ENS value decreased from 10.70 to 3.20 MW and also the minimum voltage increased from 0.9131 to 0.9391 p.u. Therefore, the performance of the 33-bus network is improved based on the optimal placement of a DSTATCOM in the 33-bus network. Optimal reactive power injection by DSTATCOM has improved the power loss, reliability and minimum voltage indices. As a result, network performance is improved for the residential load. In addition, the results showed that considering reliability in the objective function has further reduced ENS and further improved the reliability of network customers. On the other hand, in accordance with the changes in residential load, the variable reactive capacity of DSTATCOM is also showed during 24 hours with and without reliability in Figure 7. Thus, changes in the network load have led to injected reactive changes by DSTATCOM thus the network performance is improved. Also, the results presented in Tables 3-4 for commercial and industrial loads present an improvement in network performance with DSTATCOM optimization and its optimal placement and sizing. In the study of commercial load without considering reliability, by placing DSTATCOM in bus 9, the amount of losses decreased from 3133 to 2167 kW and the amount of ENS from 13.36 to 5.01 MWh and also the minimum voltage increased from 0.9131 to 0.9391 p.u. For industrial loads, considering reliability, by placing DSTATCOM in bus 10, the amount of losses decreased from 2483 to 1927 kW, the ENS is decreased from 9.07 to 2.45 MWh, and also the minimum voltage increased from 0.9131 to 0.9391 p.u. Also, the results according to Tables 3 and 4, for commercial and industrial loads, considering the reliability have shown that the ENS has been reduced and the network load is provided with higher reliability. The purpose of considering reliability in the objective function of the problem is to pay more attention to the supply of network customers, which is a very important index from a technical point of view. Therefore, the results showed that considering reliability improves network performance in terms of customers' load supply and improves network voltage conditions. For commercial and industrial loading, optimal injection of reactive power using the DSTATCOM causes power loss reduction, reliability enhancement and also improvement of minimum voltage index. Also, the DSTATCOM reactive power injection curve is shown in Figures 7 without and with considering reliability for residential, commercial and industrial loads. It is showed that the DSTATCOM reactive size is increased in some hours compared to without reliability so that the program injects more power into the network load and reduces the ENS of the customers. The obtained results of different loading showed that the commercial load has more power loss, weakest reliability index and minimum voltage and the residential and industrial load have a better condition in these three indices in DSTATCOM allocation in the network. However, it can be said that the commercial loading according to the profile of different types of load in Figure 5, has further weakened the network performance in terms of losses, reliability and voltage conditions. In contrast, residential and industrial loads have less weakened network performance. An optimization algorithm (WOA) is proposed to determine the optimal capacity and location of DSTAT-COM to achieve the minimum value of the multi-criteria objective function. DSTATCOM capacity is considered as an optimization variable. On the other hand, the network load varies based on the types of residential, commercial and industrial loads. Therefore, the capacitance of DSTATCOM varies according to the load changes during 24 hours and the optimization behavior of the algorithm during 24 hours, and for this reason, it is considered as a variable. Therefore, the optimization algorithm performs the optimization on an hourly basis in order to finally determine the optimal capacity profile of the DSTATCOM in accordance with the objective function and the variable load of the network, as well as the observance of operating constraints.
The curve of network losses, ENS, and minimum voltage for residential, commercial, and industrial loads for the  Figures 8 to 10, considering reliability, respectively.

33-bus network are illustrated in
As can be seen in Figures 8 to 10, the optimal placement and sizing of DSTATCOM in the 33-bus network reduced losses in the lines, as well as reduced the ENS value, and increased the minimum voltage in all 24 hours. According to the power loss curve, the amount of losses has increased in the hours when the load level is higher than the other hours. Also, the highest losses for different types of residential, industrial and commercial load occurred in the peak load. The reliability curve has shown that in the case of load density, the amount VOLUME 9, 2021 of interruption of the residential, industrial and commercial load has increased.
Of course, the optimal allocation of DSTATCOM has significantly reduced the power interruption of customers compared to the base state of the network. In addition, the amount of voltage deviations is significantly reduced by the injection of reactive power by DSTATCOM compared to the base network. Therefore, during the study period, DSTATCOM has improved the network characteristics at different loads at all hours by optimal variable injecting the reactive power. For residential load, the maximum network losses, the weakest reliability and the lowest minimum voltage occurred at 22.00, for commercial load at 11.00 and for industrial load at 12.00.

B. RESULTS OF 59 BUS AHVAZ NETWORK
In this section, the results of optimal placement and sizing of one DSTATCOM in the 59-bus network are presented via the WOA method. The convergence curve of the WOA in different loads is shown in Figure 11. As it is clear the optimal global solution is obtained using WOA in different loads in low iteration and with high convergence speed.
The results of DSTATCOM placement and sizing in 59-bus Ahvaz network are presented for residential, commercial and industrial loads using the WOA in Tables 5 to 7 Tables 5-7 without reliability. According to Table 5, in residential loads without reliability by placing one DSTATCOM in bus 39, the losses decreased from 2446 to 1788 kW and the ENS is decreased from 22.02 to 7.27 MW and also the minimum voltage is increased from 0.9760 to 0.9824 p.u. Therefore, the performance of the 59-bus network is enhanced with the optimal placement of one DSTATCOM in the network. The power loss is minimized, reliability and minimum voltage indices are enhanced with reactive power compensation using the DSTATCOM. So, the network performance is enhanced for the residential load. Besides, considering reliability in the objective function, ENS value is further reduced and improved reliability. The variable reactive capacity of the DSTATCOM is also VOLUME 9, 2021 TABLE 5. Results of DSTATCOM optimal sitting and sizing in real 59 bus distribution network for residential loading. shown in Figure 12 for 24 hours without reliability. The reactive power injected by DSTATCOM into the network is changed according to load variations so it has resulted in the improvement of network performance. In commercial load considering reliability, by placing one DSTATCOM in bus 39, the amount of losses from 2921 to 1984 kW and the ENS from 27.48 to 12.76 MWh is decreased and the minimum voltage is increased from 0.9760 to 0.9824 p.u. For industrial loads without reliability by placing one DSTATCOM in bus 43 the power loss is reduced from 2407 to 1812 kW and the ENS value is declined from 18.66 to 7.78 MWh and also the minimum voltage is increased from 0.9760 to 0.9826 p.u. Also, the results of Tables 6-7, for commercial and industrial loads considering the reliability cleared that the ENS is more reduced and the reliability is more improved. So, the results proved that considering reliability enhances the network performance in the view of customers' load  supply and enhances the network voltage conditions. For commercial and industrial loading, optimal injection of reactive power using the DSTATCOM causes power loss reduction, reliability enhancement and also improvement of minimum voltage index. The DSTATCOM injection power curve is depicted in Figure 12 without considering the reliability of commercial and industrial loads. It is observed that the DSTATCOM reactive capacity in considering reliability is increased compared to the objective function without reliability and the reliability is enhanced more by injecting more reactive to the network.
The network power losses, ENS and minimum voltage curves for residential, commercial and industrial loads are illustrated in Figures 13 to 15, respectively. It is clear that the optimal placement and sizing of DSTATCOM in the 59-bus network causes a reduction of the line losses and  the ENS values and also increasing the minimum voltage values in all 24 hours. The loss value is increased in the hours with higher demand. The losses of the network lines are decreased by optimal allocation of DSTATCOM in the 59 bus network and reactive power injection. The reliability curve also showed that the demand interruption of the residential, industrial and commercial customers is declined using optimization of the DSTATCOM in the network. Also, the voltage deviations are reduced by the injection of reactive power by DSTATCOM compared to the base network. Therefore, the network performance is enhanced in different loads by optimally injecting the reactive power of DSTATCOM. For residential loads, the maximum network losses, the weakest reliability and the lowest minimum voltage occurred at 22.00, for commercial load at 11.00 and for industrial load at 12.00 according to the types of loads.

C. COMPARING THE RESULTS WITH PREVIOUS STUDIES
In Table 8, some studies related to the placement and sizing of reactive power sources in the network are compared with the results of the WOA. The results of WOA including residential, commercial and industrial loads are compared with the studies with a constant load. In [13], the capacitor placement in the 33-bus distribution network is evaluated to reduce the cost of losses and the cost of purchasing reactive power considering the constant load using the FPA. The DSTATCOM is also applied in the 33-bus network to reduce power losses using the bat algorithm (BA) in [7]. The values of network losses obtained using FPA and BA methods are 134.47 and 143.97 kW, respectively. In [7], [13], the capacity of the reactive source is also considered constant due to the assumed constant load. The obtained power loss for residential, commercial and industrial loads using the WOA is obtained less than the FPA and BA methods in [7,13], due to considering the variable load demand and also DSTATCOM variable injected reactive power to the distribution network. Also, the minimum voltage obtained using the WOA method for different loads is higher than the minimum voltage achieved using FPA and BA methods. Therefore, changes in the reactive power injected to the network, reduce the power losses as well as reduce the network voltage deviations and thus improve the network performance. In this article, the effect of DSTATCOM optimization on network reliability is evaluated, which this subject has not been studied in [7], [13]. In [41], the allocation of reactive power resources as capacitor using genetic algorithm (GA), in [20] DSTATCOM optimal allocation via the immune algorithm (IA), in [42] optimal allocation of DSTATCOM via cuckoo search algorithm and in [43] optimal sizing and sitting of DSTATCOM based on bacterial foraging optimization algorithm is presented. As shown in Table 8, the proposed method-based WOA is obtained less power loss and more minimum voltage. Also, in these studies, the effect of considering reliability is not considered. So, the obtained results have confirmed the superiority of the WOA.

VI. CONCLUSION
In this article, the multi-objective optimal placement and sizing of DSTATCOM in IEEE 33-bus and Ahvaz 59-bus networks is presented with the objective of losses reduction, voltage profile and reliability enhancement with weighted coefficient method considering variable demands. In this study, a variable load is selected including residential, commercial and industrial load. The WOA algorithm as a powerful optimization method with high convergence speed and accuracy is applied to find the optimal installation location and size of DSTATCOM during 24 hours. Reliability is defined as energy not supplied index for network customers. The effect of optimal placement and sizing of one DSTAT-COM in the networks is investigated. In addition, the effect of considering reliability in the objective function on problem solution is evaluated. The simulation results are presented before and after the DSTATCOM optimization on losses, minimum voltage and network reliability. The results are showed that the WOA method is capable to obtain the lowest power losses and voltage deviations and the best reliability by optimizing the installation location and size of DSTAT-COM in different load types. The results are also cleared that considering the variable load has further reduced losses and voltage deviations as well as further reliability improvement. In other words, considering reliability has led to less energy not supplied to the network customers. Moreover, the performance of the WOA method in DSTATCOM application in the distribution network is compared with previous studies and its superiority is confirmed.