1. Introduction
With the rapid development of the global economy and steady increase in the population, electricity demand is increasing dramatically, exacerbating the electricity crisis and increasing environmental pollution. Consequently, the widespread use of renewable energy sources (RESs) has expanded to meet electricity demand, boost transport electrification, support green energy promotion, and reduce the increased environmental pollution [
1,
2]. However, the overuse of RESs generation may result in numerous power quality (PQ) and reliability problems to power systems such as overloading of components in the system (devices, transformers, cables, lines, and motors), increased power losses, thermal overloading, overvoltage problems, harmonic distortion problems, protective equipment malfunctions, in addition to the increased hazards of exceeding the permissible short-circuit capacity limits [
3,
4,
5]. Thus, enhancement of the hosting capacity (HC), which expresses the maximum generation capacity from the RESs that the power system can host without exceeding the operational limits, is important to increase the penetration level of RESs safely while satisfying the system operation constraints [
5,
6].
Also, to make the RESs a cost-effective facility and commoditized alternative for electricity production, RESs could be incorporated for self-consumption, i.e., the electricity produced from RES is not injected into the distribution or transmission grid and consumed by the RES owner (or associates with contracts with the RES owner) [
7]. Thus, RES production prioritizes self-consumption and then exports to the rest of the distribution or transmission network when the RES production exceeds the total demand needs. This simple harmonization in consuming the electricity produced from RES can play an essential role in reducing the total operation cost and increasing profitability [
8,
9]. In this regard, increasing the self-consumption rate (SCR) of RESs and enhancing the HC of the power systems or grid-connected MGs is a must for smoothing energy transition from conventional fuel-based into renewable-based energy resources. Besides, other factors influence the output power of RESs, such as intermittency and geographic limitations [
10].
Measures on the main grid side and energy storage (ES) have to be considered to overcome these RES issues and organize self-consumption efficiently. ES is regarded as a promising technology that can enhance system reliability and enhance the resiliency to disruptions and increase the hosted RESs penetration [
11]. ES systems (ESSs) can provide multi-benefits for an electrical network, such as improving PQ performance and system reliability, improving HC, overcoming uncertainty issues associated with RESs, enhancing the system stability, decreasing the power import through peak times by feeding the peak loads, and reducing the total operation cost of the electrical network [
11,
12,
13,
14]. Currently, ESS applications are increasing in MG and distribution systems. MGs can integrate distributed generators (DGs), especially RESs, ESSs, and mixed electrical loads, and can operate either connected to the grid (grid-connected mode) or islanded without connection to the grid (islanded mode) [
15,
16].
At the peak load, a transformer’s overloading may occur because the transformer capacity is limited [
17]. The traditional solution is to reinforce the transformer, i.e., increase the transformer capacity, but this depends on the availability of a standby transformer or investment costs [
18]. Therefore, to decrease the transformer’s load rate, the load at peak time should be shed or transferred to off-peak times [
17]. Thus, the choice of optimal location and appropriate size of ESSs and the reasonable schedule of energy generated by DGs, ESSs, and the main grid according to climatic conditions and load requirements is not only related to the reliability of the entire system’s power supply or electrical PQ but also extends to the economy and reliability of the system’s operation to a large extent.
It is of great significance to study the optimal allocation of ESSs. In this regard, many research works have been published in recent years to evaluate the optimal allocation of ESSs and manage energy to improve the MG’s technical and economic performance. Some studies have been devoted to obtaining only the optimal ESS capacity without considering the impact of the ESS location on the MG performance [
19,
20,
21]. For instance, Mahmoud et al. [
19] formulated a mixed linear integer model to get the battery ESS’s optimal size. The objective function aimed to maximize the profitable utilization of batteries and keep the operation protected. Wu et al. [
20] suggested a two-stage stochastic mixed-integer programming approach for determining the optimal size of multiple types of DGs to realize economic benefits while considering uncertainties in grid disturbance, load, and renewable generation. Feng et al. [
21] presented an optimization approach based on multi-attribute utility theory to determine a hybrid ESS (HESS) optimal capacity to benefit from their complementary characteristics. The optimization approach combines both isolated and grid-connected modes of MG operation in the optimization problem formulation. In the grid-connected mode, the objective function was to minimize the operation cost, while in the isolated mode, improving the MG reliability was the goal. Some studies have also been devoted to obtaining ESS’s optimal size and location to enhance MG performance [
22,
23,
24,
25]. For instance, Nojavan et al. [
22] formulated a mixed-integer non-linear model to obtain ESS’s optimal allocation considering a demand response (DR) program. The multi-objective function aimed to minimize the total investment and operation cost and minimize load expectation loss. Mostafa et al. [
23] presented an optimization method based on the symbiotic organism search to determine the optimal location and size of ESS by minimizing the MG’s total power loss while enhancing the MG voltage stability and the voltage profile of the MG buses. Chen and Duan [
24] formulated an optimization approach based on the genetic algorithm for optimal allocation and economic analysis of ESSs and DGs in the MG, considering ESSs’ and DGs’ dynamic capacity adjustment to deal with the non-smooth cost functions to help supply the customer demand and secure the MG. The optimal allocation and economic analysis were determined. However, the HC in the presence of the ESSs was not discussed. Qiu et al. [
25] formulated a two-stage stochastic planning model to allocate and analyze ESS presence in the MG, considering controllable loads. The optimal allocation decisions and economic analysis of the ESS were determined through a cost-benefit analysis approach. However, most of the existing studies have not investigated the impacts of ESSs-location, capacity, and number-on the SCR of the RESs, HC of the MG, and the transformer loading capacity.
To redress this gap, this paper formulates a two-stage optimization framework to improve a grid-connected MG performance. Firstly, the optimal allocation decisions of the battery ES systems (BESSs) are provided to enhance the SCR of the RESs and the HC of the MG. Secondly, an operation strategy with the results (location, number, and capacity) of the BESSs obtained from the first stage is handled as an objective function to minimize the total operation cost of the MG under investigation. The IEEE 33-bus radial system is modified to act as the MG with high RESs penetration. The problem is solved using a recent swarm intelligence optimization algorithm called the Harris hawks optimization (HHO) algorithm. The proposed optimal operation strategy considers numerous constraints, such as the charge-discharge balance, number and capacity limitations of the BESSs, and the different technical performance constraints of the MG. The main contribution of this work can be outlined as follows:
Investigation of the SCR of the RESs and HC of the MG in the presence of batteries.
Minimizing the total operation cost of the MG with high RESs penetration while optimizing the BESSs (location, capacity, and number) enhances the SCR of the RESs and HC of the MG.
Investigation of the impacts of the optimally allocated BESSs on the loading capacity of the main transformer feeding the MG.
Investigation of the impact of variation of efficiency and depth of discharge of the BESSs on the total operation cost and the power losses of the MG.
The rest of the paper is organized as follows:
Section 2 describes the MG configuration.
Section 3 explains the HC and its formulation.
Section 4 provides the mathematical formulation of the problem. In
Section 4, we present the HHO, which is used to solve the optimization problem.
Section 5 presents the simulation results and discusses them. Finally,
Section 6 presents a summary of the work done, the study’s conclusions, and future concerns to be investigated.
3. Hosting Capacity (HC)
In the past, the electrical network was characterized by the unidirectional power flow from the primary grid to electrical loads. Nowadays, conventional power flow directions have changed dramatically due to the widespread use of DG technologies, particularly RESs such as PV and WT units [
29]. However, the high penetration of RESs may adversely affect the electrical system’s performance and result in numerous problems. Thus, enhancement of the HC of electrical systems, which expresses the maximum generation capacity from the RESs that the power system can host without exceeding the operational limits, is essential to increase the penetration level of RESs safely without exceeding any functional constraint.
Figure 2 shows the concept of HC after the integration of RESs into a system. It is clear that supporting the HC of the power system helps increase the RES penetration level while satisfying the system operation constraints.
Mathematically, HC of RESs (
) represents the ratio between the total injected output power by the RESs (
) and the apparent load power (
), as given in Equation (5) [
30].
Also, the SCR of RESs (
) represents the ratio between the actual energy provided by the RESs (
) and the overall RESs energy produced (
), as given in (6) [
31]. In other words, the SCR refers to the share of the RESs produced energy used directly or indirectly to satisfy the local demands, in which SCR of 1 means that the full RESs production is used locally (e.g., the case for either a small RES capacity or a large RES capacity combined with BESS).
H denotes the daily 24 h horizon.
From Equations (5) and (6), it can be noted that increased SCR using ES solutions leads to an increase in the HC, especially in the presence of batteries. Thus, supporting ES solutions’ usage might be a good measure to promote the HC improvement in MGs and power systems. Furthermore, ES can enable the full grid-related benefits from self-consumption if ESSs are set right in a cost-effective manner.
5. Results and Discussion
For the MG shown in
Figure 1,
Table 3 presents the bids of PV and WT units, in addition to the cost factors, efficiency, and lifecycle of the NaS batteries, which are used in this study.
Figure 5 shows the hourly predicted output power of the overall RESs, total load before and after the RESs connection, and the rated active power of the main transformer feeding the MG on a typical day.
It is clear from
Figure 5 that whenever DGs’ output power increases, the main grid’s output power decreases. It can also be seen from the same figure that a power reverse occurs when the total output power of the overall RES production is greater than the total load demand, as noted in the periods from hour 3 to hour 5, hour 7, and from hour 12 to hour 14. Besides, the overloading of the main transformer may occur when the total output power of the RESs is low, and the load demand is high.
Figure 6 shows the hourly SCR of the RESs connected without integrating any NaS batteries (base case). The SCR of the WT and PV does not equal 100% at all the hours. The SCR of WT ranges between 87.7% to 95.0% from hour 3 to hour 5 and equals 96.6% at hour 7. Also, the SCR of PV is 32.4% to 70.9% in the period from hour 13 to hour 14. To make the WT and PV more cost-effective for electricity production, the MG seeks to make the SCR of the WT and PV equal 100% at all hours during the day.
Accordingly, this work firstly determines the optimal allocation of BESSs to maximize the SCR of all the RESs connected while enhancing the HC of the MG. Secondly, using the results obtained from the first stage, the total operating cost of the MG with the batteries connected is minimized on the investigated typical day. Five cases are analyzed to show the effect of the increased number of BESSs on the MG performance. Case 1: One BESS (NaS type) is installed; Case 2: Two BESSs are installed; Case 3: Three BESSs are installed, Case 4: Four BESSs are installed, and Case 5: Five BESSs are installed.
Table 4 presents the optimal location and size of the BESSs obtained by the HHO algorithm in the five cases to maximize the SCR. After integrating one NaS battery or more to the MG, the SCR of the WT and PV increased to 100% at all hours during the day. In this regard, the BESS positively enhances the SCR of the RESs, then prices for applications in the MG may reduce, making such battery solutions more attractive to prosumers and operators alike.
Figure 7 shows the HC in the studied MG without NaS battery connection and NaS battery connection in the five cases. It can be seen that more RESs penetration can be supported by the increase in the number of batteries. As the RESs penetration increases from 9.33 MW in the base case without NaS battery connection to 10.75 MW in Case 1, 11.66 MW in Case 2, 12.25 MW in Case 3, 12.12 MW in Case 4, and to 11.73 MW in Case 5. It is clear from
Figure 7 that HC of RESs considerably improves with integrating BESSs; besides, it can be seen from the same figure that the change in the number of BESSs has a significant effect on the HC.
Once we got the optimal BESS location, size, and number, the optimal energy management of the MG is determined by reducing the operating costs to assess the impact of the BESSs on the system performance from an economic point of view.
Table 5 shows the results calculated for the operating cost of the MG with and without the BESS connection, in which the operating cost of the grid, PV, WT, the cost of each BESS, the total cost of BESS per day, and the total operating cost of the MG per day, are presented. It should be noted that the total operating cost in the base case represents are the costs associated with the MG upgrades and energy losses. BESS’s total cost per day consists of the battery’s capital and replacement costs during the project lifetime, in which the project lifetime is taken as 35 years, and the interest rate is set to 0.02 in this study. Recalling the life cycles of the NaS presented in
Table 3 and the total number of cycles performed through the NaS battery per year,
of the NaS battery is calculated to know the replacement number of the NaS battery through the project’s lifetime, and the results obtained using the HHO algorithm are given in
Table 5. Further, the percentage of saving in the operating costs in each case is calculated with respect to the corresponding operating cost of the base case.
The results show that the total operating cost of the MG depends considerably on the number of BESS connected to the MG. It is clear from
Table 5 that Case 3, with three BESSs integrated into the MG, provides the best saving percentage in the operating costs (31.7%).
Figure 8 shows the optimal output powers of the grid, PV, WT, and BESS in Case 3 at each hour during the day. Also,
Figure 9 shows the SOC of the three BESS at each hour during the day.
Figure 8 and
Figure 9 show that the three BS units charge in the periods with low market prices and when the total load is not high to satisfy the MG technical performance constraints (such as the period from hour 1 to hour 7). When the BS units are fully charged, the BS units begin to discharge during the periods when the energy market price is high to minimize the MG’s operating cost, such as the period from hour 16 to hour 21.
The transformer overloads may occur when the total output power of RESs is low and the total connected loads are high. The rated capacity (
) and power
of the transformer in the studied MG are 3500 kVA and 2976 kW, respectively.
Figure 10 shows the transformer load rate in the investigated cases and the base case.
It is notable from
Figure 10 that if the MG operates with no BESS, the transformer is overloaded from hour 8 to hour 11 and from hour 15 to hour 18. However, the transformer load rate does not exceed the transformer’s rated power after integrating the RESs in the MG with BESSs. Consequently, storage plays a critical role in reducing the transformer load rate because it helps shift the load from peak hours to off-peak (valley) hours. Therefore, storage can be used to defer transformer reinforcement plans.
It is worthy to note from
Figure 8 to
Figure 10 that the BESSs charged in the periods with a low market price and light load demands (such as the first periods); therefore, in the cases with storage units connected, the power losses of the MG increases in these periods above the base case, as shown in
Figure 11. It is also apparent in
Figure 11 that the power losses are constant in all the investigated cases in the period from hour 8 to hour 12 because the SOC of BESSs is constant. However, the power losses decreased from hour 15 to hour 19 because the BESSs discharged.
The costs of energy losses differ based on the corresponding power losses value in each case. Accordingly,
Figure 12 shows the total power losses of the MG during the day. It is notable from
Figure 12 that total power losses of the MG during the day in Case 5 (1696.7 kW) exceeds the total power losses in the base case (1571.7 kW), and this indicates that oversized storage or using many unneeded storage units may adversely influence the total power losses of the MG.
Figure 13 shows the voltage profile of the MG buses at four selected durations with different loadings—at the fourth hour (51% loading) presented in
Figure 13a, at the 10th hour (100% loading) shown in
Figure 13b, at the 14th hour (88% loading) shown in
Figure 13c, and the 21st hour (68% loading) shown in
Figure 13d. It is worthy to note from
Figure 13a that the MG’s voltage profile in the base case with no storage is almost 1 per unit at all buses at the fourth hour because of the light loading. In the case of integrating storage in the MG, the BESSs charge at the fourth hour because the market price is low; thus, the buses’ voltage profile decreases below the base case without violating the voltage limits. It is notable from
Figure 13b that the MG’s voltage profile at the 10th hour is the same in all cases because the SOC of the batteries is constant. Also, it can be seen from
Figure 13c that the voltage profile of the MG at the 14th hour gets lower because of the BESSs charging in this hour. Finally, it is clear from
Figure 13d that the MG’s voltage profile at the 21st hour enhanced beyond the base case because of the discharging of the BESSs. In this regard, the storage can improve the MG’s voltage profile at any particular hour.
The number of charging/discharging cycles and depth of discharge of BESS have an important influence on the storage’s lifetime. Datasheets of the BESS manufacturers are used to get the relationship between the number of charging/discharging cycles and the depth of discharge (DOD) of the NaS battery. Therefore, the effect of variation of these factors on the total operation cost and the total power losses was investigated.
Table 6 shows the lifecycles obtained for the various DOD values [
27].
It can be seen from
Table 6 that the number of cycles of the batteries increases with the decrease of the permitted DOD value. Thus, the expected lifecycle of NaS will increase, and both the replacement number and total cost of NaS batteries will decrease. However, this does not mean the MG’s total operation will be reduced because it depends on other factors, such as the output power of the RESs and the power imported/exported from the grid [
35,
36,
37].
Figure 14 shows the variation of the total operation cost of the MG values and the percentage of saving with different efficiency and DOD values according to the NaS battery characteristics. It can be seen from
Figure 14 that the total operation cost of MG decreases with the increase in storage efficiency. For example, increasing the storage efficiency from 75% to 95% would make the MG’s total operation cost decrease from
$141,157.1 to
$132,122.2 at 100% DOD. Typically, it can be seen from the same figure that the percentage of saving increases with the increase of the efficiency of the storage system. Increasing the efficiency from 75% to 95% would increase the savings portion from 26.9% to 31.6% at 100% DOD.
It is also clear from
Figure 14 that the total operation cost of MG increases with the decrease in DOD of storage. For example, decreasing DOD from 100% to 50% would make MG’s total operation cost increase from
$132,122.2 to
$157,170.2 at an efficiency of 95%. Typically, it can be seen from the same figure that the percentage of saving decreases with the decrease of the DOD of storage. Besides, decreasing the DOD from 100% to 50% would make the percentage of saving decline from 31.6% to 18.6% at an efficiency of 95%. We can also see from
Figure 14 that the NaS battery with efficiency equals 95%, and 100% DOD had provided the best operation cost.
Figure 15 shows the MG’s total power losses per day with different efficiency and DOD values. It is clear from
Figure 15 that the MG’s total daily power losses decrease with the increase in storage efficiency. For example, increasing efficiency from 75% to 95% would make the MG’s total power losses increase from 1632.8 kW to 1500.5 kW per day at 100% DOD. Typically, it can be seen from the same figure that the total power losses of the MG per day decrease with the decrease in DOD of storage. For example, decreasing DOD from 100% to 50% would make the MG’s total power losses per day drop from 1500.5 kW/day to 1364.9 kW/day at an efficiency of 95%. It can be seen from the figure that the total power losses of the MG per day considerably decrease with the increase in the storage efficiency or decrease in the DOD.