2.3.2. PV Modelling

The solar radiation probabilistic nature can be designated according to the probability density function (PDF) of Beta as follows [36,41]:

$$f\_{\mathbf{b}}(\mathbf{s}) = \begin{cases} \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta)} \mathbf{s}^{(\alpha - 1)} \left( \mathbf{1} - \mathbf{s} \right)^{\{\beta - 1\}} \mathbf{0} \le \mathbf{s} \le \mathbf{1}, & \alpha, \beta \ge \mathbf{0} \\\ 0, \text{ otherwise} \end{cases} \tag{17}$$

where *fb***(***s***)** refers to the s distribution function of Beta and s refers to the arbitrary variable of solar radiation in kilowatt per meter square; *α* and *β* refer to the parameters of *fb***(***s***)** which are computed exploiting the standard deviation (σ) and mean deviation (μ) as shown in (18). The value of standard deviation and mean deviation are presented in [42].

$$\beta = (1 - \mu) \left( \frac{\mu(1 + \mu)}{\sigma^2} - 1 \right); \alpha = \frac{\mu \times \beta}{1 - \mu} \tag{18}$$

The PV module output power output depends on the solar radiation and surrounding temperature as well as the PV module characteristics itself. The maximum output power related to solar radiation *s*, *Po***(***s***)**, can be expressed as [19]:

$$P\_{\mathcal{O}}(\mathbf{s}) = \mathbf{N} \times F\mathbf{F} \times V\_{\mathcal{Y}} \times I\_{\mathcal{Y}} \tag{19}$$

where,

$$FF = \frac{V\_{\rm MPP} \times I\_{\rm MPP}}{V\_{\rm oc} \times I\_{\rm sc}};\tag{20}$$

$$V\_y = V\_{oc} - k\_v \times T\_{cy};\tag{21}$$

$$I\_y = \text{s} [I\_{sc} + k\_i \times (T\_c - 25)];\tag{22}$$

$$T\_{cy} = T\_A + s(\frac{N\_{OT} - 20}{0.8}) \tag{23}$$

where, *N* refers to the module's number; *Tcy* and *TA* refer to the cell temperature and ambient temperature (*C***0**), respectively; Ki and Kv refer to the coefficient of current temperature (A/*C***0**) and coefficient of voltage temperature (V/*C***0**), respectively; FF refers to fill factor; NOT refers to rated working temperature of cell per *C***0**; *Isc* and refer to short circuit current (*A*) and open circuit voltage (*V*), respectively; *VMPP* and *IMPP* refer to voltage at maximum power point and current at maximum power point, respectively; *Po***(***s***)** refers to the PV module maximum output power at solar radiation (*s*). The prospective output power at solar radiation (*s*) is computed according to Equation (10). Therefore, the overall prospective output during the identified interval time *t*, *Pt* (*t* = 1 h in this study) can be expressed as follows:

$$P\_t = \int\_0^1 P\_o(s) f\_{lp}(s) ds\tag{24}$$

### 2.3.3. BESS Modelling

BESS is supposed to be linked to an alternating current (AC) system through bidirectional DC/AC converters [43]. In this paper, BESS works at unity power factor to discharge or charge active power. In another meaning, the BESS can work as a generator throughout the period of discharging and a load throughout the period of charging. The energy variation of BESS at bus *k* in time interval *t* is evaluated as the following [44]:

$$E\_{BESSk}(\mathbf{t}) = E\_{BESSk}(\mathbf{t} - \mathbf{1}) - \frac{P\_{BESSk}^{\text{discharge}}(\mathbf{t})}{\eta\_d} \Delta t\_\prime \text{ for } P\_{BESSk}(\mathbf{t}) > \mathbf{0} \tag{25}$$

$$E\_{BESSk}(t) = E\_{BESSk}(t-1) - \eta\_c \ P\_{BESSk}^{ch}(t) \Delta t\_\prime for \; P\_{BESSk}(t) \le 0 \tag{26}$$

$$
\mathfrak{n}\_{\rm BES} = \mathfrak{n}\_{\rm Ch} \times \mathfrak{n}\_{\rm Dch} \tag{27}
$$

where *EBESSk* refers to the overall energy stored inside the BESS; *Pdisch BESSk* and *<sup>P</sup>ch BESSk* refer to the BESS discharged and charged power, respectively; η*<sup>d</sup>* and η*<sup>c</sup>* refer to the BESS efficiency in case of discharging and charging, respectively; Δt indicates the duration of time interval t.

### 2.3.4. Sizing BES and PV

BESS is installed at the same location of PV in RDS. Therefore, the optimal sizing of BESS with PV are presented in [42]. Therefore, the charging and discharging energies of batteries at time (t) are calculated by Equations (28) and (29).

$$E\_{BESS,j}^{DC} = \int\_0^t P\_{BESS,j}^{DC}(t)dt = \sum\_{T=1}^{24} P\_{BESS,j}^{DC}(t)\Delta t\tag{28}$$

$$E\_{BESS,j}^C = \int\_0^t P\_{BESS,j}^C(t)dt = \sum\_{t=1}^{24} P\_{BESS,j}^C(t)\Delta t\tag{29}$$

(*E***(***PV* **<sup>+</sup>** *BES***),***j*) is a combination energy of BESS and PV at bus (*j*) which is determined by Equation (30). PV energy is determined by Equation (31).

$$E\_{(PV + BES),j} = E\_{PV,j}^{DS} + E\_{BES,j}^{DC} \tag{30}$$

$$E\_{\rm (PV),j} = E\_{PV,j}^{DS} + E\_{BES,j}^{C} \tag{31}$$

where *EDC BESS***,***<sup>j</sup>* is the discharging energy of BESS to the distribution system (DS). *EDS PV***,***<sup>j</sup>* is the injection power energy from PV to DS and *EC BESS***,***<sup>j</sup>* the charging energy which is drawing from PV to BESS.

Round-trip efficiency can be determined by the ratio of discharging energy to the charging energy as shown below:

$$
\eta\_{BES} = \frac{E\_{BES,j}^{DC}}{E\_{BES,j}^{C}} \tag{32}
$$

Consequently, PV energy is updated to Equation (33) as follows:

$$E\_{PV\_{\vec{y}}} = \frac{E\_{\text{(PV} + BESS), \vec{y}} - \left(\mathbf{1} - \eta\_{BESS}\right) E\_{PV\_{\vec{y}}}^{GR}}{\eta\_{BESS}} \tag{33}$$

$$P\_{PV,j} = K\_{PV}^o E\_{PV,j} \tag{34}$$

$$K\_{PV}^{o} = \frac{P\_{PV}^{o}}{E\_{PV}^{o}} \tag{35}$$

The high value of PV output during the day is evaluated by Equation (36).

$$P\_{PV,j} = K\_{PV}^{o} (\frac{E\_{(PV+BESS),j} - (1 - \eta\_{BESS})E\_{PV,j}^{GR}}{\eta\_{BESS}}) \tag{36}$$

where, *Eo PV* and *<sup>P</sup><sup>o</sup> PV* are the energy and maximum output of PV during the day, respectively. BESS sizing is determined by Equation (37).

$$E\_{BES,j}^{\rm Clr} = \frac{E\_{(PV+BES),j} - E\_{PV,j}^{Gr}}{\eta\_{BES}} \tag{37}$$

### **3. Optimization Methodology**

### *3.1. Frame Design*

In general, the recommended Archimedes optimization algorithm describes what occurs when objects that have different volumes and weights are dipped into a liquid. The following subsections indicate how the AOA was based on the phenomena elucidated in Archimedes' principle. Then, we explain how this law of physics is applied along with an algorithm of optimization [45].

### 3.1.1. Principle of Archimedes

The Archimedes principle declares that when dipping an object partially or completely into a liquid, the liquid goes flat out at an upward force on this object equivalent to liquid's weight dislodged by this object. Figure 5 describes that when an object is dipped into a liquid, it will be exposed to an upward force, named buoyant force, equivalent to the weight of the liquid dislodged by this object [46].

**Figure 5.** (**a**) An object is dipped into a liquid, and (**b**) the volume of liquid dislodged [45].
