*4.2. Objective Function*

The aim is to create the optimal combination of units for the hybrid renewable energy system to achieve maximum energy supply. To achieve this aim, the COE is minimized, high power supply reliability is maintained, the LPSP is minimized, excess power (PEXC) absorption is reduced dummy load (Pdum) to reduce the total system costs. To calculate this objective functions, the following formulas are applied:

$$\dim \mathcal{F}(\mathcal{X}) = \dim \left( \mathfrak{q}\_1 \, \text{COE} + \mathfrak{q}\_2 \text{LSPS} + \mathfrak{q}\_3 \right) \tag{20}$$

$$\mathcal{X} = \left[ \mathbf{N}\_{\text{PV}} \cdot \mathbf{N}\_{\text{WT}} \cdot \mathbf{N}\_{\text{fl}} \cdot \mathbf{N}\_{\text{Bat}} \right] \tag{21}$$

$$\text{LPSP} = \sum\_{\text{l}}^{8760} \frac{\text{LPS} \left(\text{t}\right)}{\text{P}\_{\text{L}} \left(\text{t}\right)} \tag{22}$$

$$\text{LPS}\left(\mathbf{t}\right) = \text{P}\_{\text{L}}\left(\mathbf{t}\right) - \left(\left(\mathbf{t}\right) + \text{SOC}\_{\text{Bat}}\left(\mathbf{t} - \mathbf{1}\right) - \text{SOC}\_{\text{min}}\right) \* \eta\_{\text{inv}}\tag{23}$$

$$P\_{\rm E\&C} = \sum\_{\rm 1}^{\rm 8760} \frac{P\_{\rm dum}\left(\mathbf{t}\right)}{P\_{\rm L}\left(\mathbf{t}\right)}\tag{24}$$

where, ϕ is the weight factor value of each objective function, X represents the control variables of the optimization problem that must be optimized using the studied optimization algorithms, and LPS(t) is the loss of power supply at any time.

### *4.3. Constraints*

The optimization procedure is based on the following limitations and on the upper and lower limit of the following decision variables;

$$\mathbf{1} \le \begin{bmatrix} \mathbf{N\_{PV}} \\ \mathbf{N\_{WT}} \\ \mathbf{N\_{g}} \\ \mathbf{N\_{Bat}} \end{bmatrix} \le \begin{bmatrix} \mathbf{N\_{PV}^{\max}} \\ \mathbf{N\_{WT}^{\max}} \\ \mathbf{N\_{g}^{\max}} \\ \mathbf{N\_{Bat}^{\max}} \end{bmatrix} \tag{25}$$

$$\text{LPSS} \le \text{LPSS}\_{\text{max}} \tag{26}$$

where, Nmax PV is the maximum number of PV, and <sup>N</sup>max WT represent the maximum number of WTs units, based on the maximum load and rated power of PV/wind unit, which set to be 410 (410 kW/1 kW) and 13 (410 kW/30 kW), respectively. Nmax <sup>g</sup> is the maximum number of generator units which set to be 8 (410 kW/50 kW), Nmax Bat is the maximum number of batteries which is set to be 1000.

### *4.4. System Management Strategy*

The methodology provided in this work aims to optimize the combination of PV, WT, biomass generators as the main power sources, and batteries which work to keep the energy supply continuous to the loads and enhancing the power supply, which reduces the costs of LPSP and PEXC. The flowchart explaining the operational strategy of the proposed hybrid system is presented in Figure 7, while the operating management methodology can be stated according to the following steps:


$$P\_{\rm Sur}(\mathbf{t}) = P\_{\rm rec}(\mathbf{t}) - P\_{\rm inv}(\mathbf{t}) \tag{27}$$

• When the maximum charge limit of the battery is reached, the storage system charging status remains unmodified and identical to the previous charge state (SOCBat(t) = SOCBat(t − 1)), while the surplus energy remaining is treated as waste energy (PW) that can be discharged into the dummy load.

$$P\_W(\mathbf{t}) = P\_{\text{Sur}}(\mathbf{t}) - \left(\mathbf{SOC}\_{\text{max}} - \text{SOC}\_{\text{Bat}}(\mathbf{t} - \mathbf{1})\right) \tag{28}$$

The energy stored in the battery bank shall be used to satisfy the load demand if the Pre generated from the proposed system cannot meet the load need and if the battery storage system charge is higher than a minimum permissible limit Pre(t) < Pinv(t) and SOCBat(t − 1) × (1 − σ) > SOCmin).

**Figure 7.** Flowchart of the operating management methodology.

### **5. Optimization Techniques**

To find the solution of optimal sizing problem, four optimization algorithms with the highest efficiency have been utilized.
