4.3.1. Case 1: Without DGs

In the first case, the hourly load flow is carried out at each loading hour of the 33-bus system without DGs installations. At the peak loading (hour 12) and without DGs units, the initial power losses equal 211.2 kW. Bus 18 has a minimum voltage that equals 0.9038 p.u. as in [65].

4.3.2. Case 2: MG without Optimal Control on BGs, Wind, and PV with Daily Load Variation

In the second case, MG is operated without optimal control on DGs whereas the WTs and PVs generate its available power, and the BGs generate its full capacity at a unity power factor. For the small-scale PV DGs, the Beta-PDF is used to model the uncertainty of the solar irradiance and the evaluation of PV output power is performed as described in Figure 1 considering the uncertainties in solar irradiance. From the collected historical data, the mean and standard deviations of the hourly solar irradiance of the day are estimated. Based on that, the Beta-PDF is generated for each hour. Consequently, 20 different states of solar irradiance among the Beta-PDF are taken with equal step sizes of 0.05 kW/m<sup>2</sup> for each hour. Figure 7 displays their produced powers from each PV source at each hour. There is no power output to be generated from the PV sources in the first and last five hours in the morning and evening since there are no solar irradiances at these hours. Additionally, the highest output of each PV source occurred at 12 pm, with 55.2, 55.3%, 55.4%, 55.2% and 55.3% from their installed capacities for the PV sources at buses 13, 17, 20, 27, and 33, respectively.

**Figure 7.** Scheduled output power from each PV at each hour for the first MG.

For the WT-DGs, the Weibull-PDF is used to model the uncertainty of the wind speed and the evaluation of WT output power, considering that the uncertainties in wind speed is

performed as described in Figure 2. For each hour, the mean and standard deviations of the hourly wind speed of the day are estimated, and the associated Weibull-PDF is generated. Similarly, 20 states of the wind speed, for each hour, are considered where the step is 1.25 m/s. Figure 8 displays the hourly active and reactive powers that are produced from the WT source at bus 3. The type 4 distributed generation, WT-DG, is used in this study to deliver the active power and to consume reactive power using the induction generators at a fixed speed. At hour 18, the WT-DG produces the highest active power with 692.1 kW and consumes the highest reactive power with 69.16 kVAr. Thus, it is operated with 62.92% from its full capacity. At hour 7, the WT-DG is operated with 36.53% from its full capacity, where it produces the least active power with 401.8 kW and consumes the least reactive power with 56.45 kVAr.

**Figure 8.** Scheduled active and reactive power from wind at each hour for the first MG system.

On the other side, the BGs are operated at full capacity without optimal control. By running the load flow algorithm for these hourly circumstances, Figure 9 shows the total active power of each type of DG and the summation of loads and the hourly power losses. Then, Figure 9 concludes the following findings:


**Figure 9.** Results of the first MG operation without optimal control.

− − −

4.3.3. Case 3: MG with Optimal Control on BGs, WT, and PV Simultaneously with Daily Load Variation

In the third case, the EO algorithm is applied to operate the economical solution of MG considering the emission concerns by simultaneously minimizing the hourly operational costs and the accompanied pollutants. Added to that, the assessment of EO performance is carried out compared with other optimization algorithms such as DE [74] and RAO [75] techniques at different hours. The convergence comparisons between the developed EO, DE, and RAO algorithms at hours 6 and 12 are described in Figure 10 where the associated outcomes of them are tabulated in Tables 2 and 3 at hours 6 and 12, respectively. At hour 6 (Table 2), the developed EO achieves the minimum objective function of \$124.4644, whereas DE and RAO algorithms acquire objective functions of \$127.5425 and \$124.6005, respectively. Similarly, at hour 12 (Table 3), the developed EO achieves the minimum objective function of \$224.2039, whereas the DE and RAO algorithms acquire objective functions of \$234.7754 and \$224.2165, respectively.

**Figure 10.** Convergence curves of EO, DE and RAO for the first MG at hours 6 and 12, respectively.



\* negative sign means that wind consumes reactive power.


**Table 3.** Optimal operation of MG at hour 12 using EO, DE, and RAO algorithms.

\* negative sign means that wind consumes reactive power.

Based on the developed EO, the output powers of the PV, WT, and BGs are optimized besides the associated power factors of the BGs. Figure 11a shows the percentage apparent power of the BGs at buses 15, 25, 9, and 31 for each hour, whereas Figure 11b displays the hourly optimized value of the power factor. From Figure 11a,b:


**Figure 11.** Hourly Percentage apparent power and power factor for each BG for the first MG system.

To study the hourly power balance operation of the MG, Figure 12 illustrates the total active power for each type of DG and the summation of loads and hourly power losses. This figure leads to the following findings:


To assess the voltage quality of the MG operation for each hour, Figure 13 displays the minimum voltage at each hour for the three cases studied. It is shown that the minimum voltage is corrected in cases 2 and 3 where, when the voltages at all hours are below the permissible limit of 0.95 Pu in the case (case 1), the highest minimum voltage occurs at bus 18 at hour 5, whereas the least minimum voltage occurs at the same bus at hour 15. At both hours, the voltage profiles at all MG buses are described in Figure 14. The voltage profile at each bus is improved at light loading at hour 5. At this loading hour, the minimum voltage at bus 18 is corrected from 0.9495 to 0.9877 Pu, which exceeds the minimum limit of 0.95 Pu in case 3; consequently, this improvement represents 4.02%. Additionally, the voltage profile at each bus is improved at peak loading at hour 15, where the minimum voltage at bus 18 is improved with 7.822% and corrects the voltage from 0.9038 to 0.9745 Pu, which exceeds the minimum limit of 0.95 Pu in case 3.

**Figure 12.** Results of the optimal operation of the first MG.

**Figure 13.** Minimum voltage at each hour for different cases studied of the first MG.

**Figure 14.** Voltage profile for the first MG at light and peak loading at hours 5 and 15, respectively.

In addition, Figure 15 shows the hourly active power losses for the three cases that are greatly reduced from case 1 to cases 2 and 3, whereas the optimal operating strategy based on the developed EO algorithm in case 3 provides the minimum power losses at each hour through the day. Compared to case 1, the percentages of the reduction in power losses that are achieved by case 3 reach 81.9, 79.6, 73.7, 80.6, 80.9, 74.2, 71.8, 75.5, 84.9, 83.7, 85.3, 85.2, 85.5, 85.2, 84.2, 84.8, 82.1, 81.1, 82.4, 83.1, 83.7, 84.5, 84.3, and 79.8% for hours 1–24, respectively. Compared to case 2, the percentages of the reduction in power losses that are achieved by case 3 reach 41.9, 48.5, 48.6, 61.7, 61.8, 48.6, 31.6, 19.5, 22.3, 18.7, 19.7, 19.4, 19.9, 19.4, 18.3, 19.4, 16.7, 15.7, 17.6, 20.3, 19.1, 19.7, 21.3, and 27.6% for hours 1–24, respectively.

**Figure 15.** Active power losses at each hour for different cases for the first MG.

Additionally, the hourly operational costs and the associated emissions of the distributed energy sources in the MG for the cases studied are depicted in Figure 16. As shown, the operational costs and the associated emissions in the MG at each hour are greatly reduced from case 1 to cases 2 and 3. Despite that case 2 provides the least operational costs and the emissions in the MG in comparison to case 3, the penetration limit of the total output of the DGs in the MG exceeds the limits of the 60% penetration ratio, as detailed in Figure 9. In Figure 9, the penetration level in case 2 exceeds 100% at nine hours, where it reaches 129.96, 136.83, 143.25, 146.15, 145.67, 140.93, 126.89, 108.86, and 117.60% at hours 1–8 and 24, respectively.

**Figure 16.** Hourly optimal operational costs and the associated emissions in the MG for the first MG.
