*5.4. The E*ffi*ciency Comparison between GA and PSO for the Objective Function Optimization*

The result comparison of the efficiency for providing the minimum value of the objective function between GA and PSO are shown as the iteration curves in Figure 6. It was observed that during the 0–400 iterations, GA could more quickly find the less objective function value than PSO, but the values were slightly different. After that, the objective value of GA almost remained constant while the objective value of PSO continued decreasing until the 800th iteration before facing a very small decrease until the maximum iteration. At the maximum iteration, PSO could obtain a superior objective value to that of GA, as evident in Table 3. When comparing the number of iterations and the operation time of each algorithm used for the optimization process, it was found that PSO took less time than that of GA, as presented in Table 3. Thus, regarding the overall efficiency for providing the minimum value of the objective function for the considered problem, PSO is more appropriate than GA in terms of both objective value and operation time.


**Table 3.** The comparison results between a number of iterations and time of use of Genetic Algorithm (GA) and Particle Swarm Optimization (PSO).

**Figure 6.** The comparison results between GA and PSO.

After the simulation of the BESS installation in the IEEE 33-bus distribution network with RES by using GA and PSO, the optimal siting of the BESS installation was the 6th bus obtained by both GA and PSO. The size of the BESS was 1.99 MW power and 14.23 MWh capacity provided by GA and 1.98 MW power and 14.98 MWh capacity provided by PSO. It could be observed that the size of the electric power and electric power capacity of the BESS provided by both algorithms had similar values. Thus, the optimal siting and sizing of the BESS for the distribution networks could be chosen by considering the minimum objective value that PSO can find as a better objective value than that of GA. For the BESS operation, it was noticeable that charging and discharging statuses given by GA and PSO for all 24 h were similar, and the electric powers of charging or discharging provided by GA and PSO were slightly different in each time duration.

After the BESS installation by using GA or PSO, it was found that the voltage level in the system could be improved to be in the range of the constraint (±5%), and the voltage deviation was enhanced compared to the base case. Additionally, power losses including active, reactive, and apparent power losses were significantly decreased when compared with the base case. In terms of the peak demand by considering power flow at the slack bus, it could be seen that after the installation of BESS, the power only flowed into the distribution network (one direction) while the power flowed into and out from the network for the base case. This is because the charging and discharging operations of the BESS could balance between the electricity generation and demand. Therefore, the investment in the distribution network expansion to support the increasing electricity demands in the future can be retarded by using the BESS installation.

To compare the efficiency of GA and PSO to solve the problem, the minimum objective function value and operation time were evaluated. From the simulation results, it was found that PSO could provide better objective value than that of GA. PSO also spent less optimization operation time than that of GA to provide the better final solution at the maximum iteration. Therefore, PSO is more appropriate than GA for solving the problem in this work.
