Energy optimization of stand‑alone electrical grid considering the optimal performance of the hydrogen storage system and consumers

In recent decades, the deficiency of fossil fuels and rising global warming in many countries have led to a global consensus against energy consumption and the use of solutions Abstract The surge in energy storage systems and the increasing involvement of demand-side participation can be attributed to their favorable characteristics, including their seam-less integration into electrical networks and their capacity to offer operational flexibility during critical periods. This scholarly article focuses on enhancing energy utilization in an autonomous electrical grid by incorporating hydrogen storage and demand-side participation. The optimization of the stand-alone electrical grid is based on maximizing efficiency and minimizing energy consumption costs as the main objective functions are modeled. The modeling efficiency is formulated considering the ratio of the energy not supplied (ENS) to energy generation by resources. And costs of energy consumption are modeled as consumption of fuel costs by resources. The consumers’ participation is proposed based on an incentive approach to consumers for demand shaving in peak times. Also, the hydrogen storage system is installed in the stand-alone electrical grid to improve the main objectives. The particle swarm optimization (PSO) algorithm for energy optimization and solving objective functions is applied. In the end, numerical simulation is carried out in some case studies to confirm and supremacy of energy optimization with the participation of the hydrogen storage system and consumers. The case studies based on non-participation and participation of the storage system and consumers in energy management are implemented. The implementation of case studies examines the impact of both non-partici-pation and participation of the storage system and consumers in energy management. The findings reveal that when the storage system and consumers actively participate, there is a significant improvement in efficiency and a substantial reduction in energy costs. Specifically, the efficiency is enhanced by 3% and the energy costs are reduced by 29.5% compared to the scenario where they do not participate.

to decrease their effects [1].The solutions with attention to the status and topology of systems can be varied to have a cleaner environment and operational approaches of the energy grids with the integration of energy resources [2].The selected suitable solution in the energy grids can have environmental, technical, and economic privileges required from the generation side, demand side, and energy organizations [3].For example, in recent years, smart grids have been introduced as new technology in energy systems with solutions such as consumers' participation in energy saving, implementing interaction links among generation and demand sides by real-time communication data, and optimal usage of energy resources considering the status of the energy grids [4].The real-time communication data in the smart grid technologies leads to providing energy saving and enhancing the efficiency of the energy grids by using optimal energy balance and demand management [5].These applications of smart grids can be used in far energy systems such as stand-alone electrical systems with local energy resources for supply-demand with low reliability [6].In stand-alone electrical grids, because of the low capacity of the resources and lack of power transmission lines of power plants, supplying energy demand with high efficiency and reliability is difficult [7].Thus, energy storage systems and consumers' participation in energy saving can be cost-effective and simple solutions in such grids [8,9].The proposed stand-alone electrical grid integrated with the smart grid is indicated in Fig. 1.The bilateral communication data among demand and generation sides by the operator are coordinated for optimal energy generation and consumption, in which the generation side includes a hydrogen storage system and diesel generators (DGs).

Literature review
The literature review on stand-alone electrical grids and other energy systems is proposed in this section.In [10], energy resource installation based on economic and emission objectives in the stand-alone electrical grid is reported.Also, the authors in [11] proposed resource design in the stand-alone electrical grid with consideration of the economic and technical objectives.The short-term energy optimization in the standalone electrical grids is studied in [12], considering local energy generation by plugging electric vehicles (PEV).Authors in [13] operation of the electrical and thermal storage systems in the hybrid energy system are analyzed with consideration of the lifetime of the storage systems.The impact of the renewable resources uncertainty on the technical and economic objectives in the stand-alone electrical grid is proposed in [14].The energy operation in stand-alone residential buildings with smart algorithms and demand participation is introduced in [15].In [16], HOMER software for long-term energy planning is employed for the hybrid energy resources sizing in a stand-alone microgrid in the rural section.The improved technical objectives like voltage, reactive power, and power losses are studied in [17] using the optimal placement of the resources in the stand-alone electrical grid.In [18], modeling load dispatch via participation of the energy storages and demand shifting is proposed for enhancing reliability and peak demand management in high energy prices.The authors in [19] have studied the environmental objectives of a stand-alone electrical grid with attention to micro-hydro generation for analyzing cost-competitive and ecologically sensitive sites in electricity supply.In [20], a life cycle energy approach is proposed for the autonomous buildings to minimize the energy demand where different design configurations of energy resources such as battery bank capacity and photovoltaic systems are done using the post-processed optimization.In [21], the optimum sizing problem of generation units based on maximizing the recovery curtailed power generation of resources in an autonomous electrical grid is solved using the distributed algorithm.

Contributions
In this paper, energy optimization of a stand-alone electrical grid considering the optimal performance of the hydrogen storage system and consumers is studied.The consumers' performance is modeled subject to an incentive approach via demand shaving in peak times.The hydrogen storage system is also cited in the stand-alone electrical grid for supply demand in emergencies.Enhancing efficiency and minimizing energy costs are proposed as the main objectives in the operator's stand-alone electrical grid and viewpoint.The particle swarm optimization (PSO) algorithm and max-min fuzzy method are applied for energy optimization and solving objective functions.Eventually, contributions in this paper are summarized as follows: 1) The optimal performance of the hydrogen storage system and consumers are considered in the stand-alone electrical grid.2) The incentive approach is proposed for consumers' performance in energy optimization.3) Enhance efficiency and minimizing energy costs are proposed as the main objectives.
4) The particle swarm optimization (PSO) algorithm and max-min fuzzy method are applied to solve a problem.
In Table 1, a comparison of this paper with a literature review is listed.

Methodology
The system modeling by mathematical formulation is presented as follows:

Consumers' performance modeling
In this subsection, an incentive approach for the participation of consumers in energy demand optimization is proposed.The incentive approach for consumers' performance is modeled as follows: In Eq. ( 1), the incentive approach is formulated based on offer prices from operators to consumers for peak demand shaving.Equation ( 2) is the peak demand shaving bound.

Hydrogen storage system modeling
The modeling hydrogen storage system contains a hydrogen tank, electrolyzer, and fuel cell.The modeling hydrogen storage system is as follows [22]: (1)

This paper
The Eqs. ( 3) and (4) indicate the power limit of the electrolyzer and fuel cell, respectively.Equations ( 5) and ( 6) indicate the rate of hydrogen in the hydrogen tank and the hydrogen tank pressure value, respectively.

Objectives modeling
Minimizing energy costs and maximizing efficiency are proposed as the main objectives in a stand-alone electrical grid as follows:

Energy costs
The energy costs modeling contains DGs' costs and the cost of the incentive approach as follows: where The DGs' cost is modeled by Eq. ( 8), and the incentive approach cost was modeled in "Consumers' performance modeling" section.

Efficiency
The maximization of the efficiency objective in the stand-alone electrical grid is modeled based on energy not supplied (ENS) in demand by generation side.The efficiency objective is as follows: Subject to: In Eq. (10), the ENS limit is modeled, and by Eq. ( 11), the status of the ENS can be calculated. (

Constraints
The constraints in the stand-alone electrical grid are essential equations for energy optimization.The constraints ( 12)-( 15) indicate energy balance in the grid, DGs' power limit, DGs' ramp up, and ramp down, respectively.

Solution optimization
The PSO algorithm is an optimization method for stochastic search, which is taken from the social behavior of birds, fish, and bees.In this algorithm, a set of particles is organized into groups.For the formulation PSO algorithm, two variables v and x, are respectively named particle position and particle velocity.The best position of the particle is determined based on merit in the objective function represented as p_best, and the best position of the particle in the whole group is denoted as g_ best.To ensure algorithm convergence, a coefficient called the contraction coefficient is employed for better adjustment of PSO parameters.Therefore, the velocity and position of the particle based on the contraction coefficient can be written as follows [23,24]: where d is the repetition counter, x d is the particle position in repetition, x d+1 is the particle position in repetition v d , and d + 1 is particle velocity in repetition d.The w is inertia weight, and φ 1 and φ 2 are the acceleration coefficient of each particle.Rand is a generation function for random numbers with a monotonous dispersal in the range of [0,1].The α is a function of φ 1 and φ 2 for better convergence of the PSO.The suitable choice of w has caused a balance between local and global search space.Generally, for a better and optimized function of an algorithm w, dynamically change: where iter shows the current iteration.For decreasing the steps of the search, particle velocity will be limited by the amount of v max :  where v max will improve the local search, and the v max will be justified for each decision variable between 10 and 20% of the variable range.

Max-min fuzzy method
Since energy costs and efficiency are optimized simultaneously in this study.The frontier solutions will be obtained.The operator must determine the optimal solution for objectives in the frontier solutions as a decision maker.Hence, the max-min fuzzy method is proposed to determine the optimal solution as follows [25]: Here, Γ (f z (ϑ)) and f z (ϑ) represent the membership functions or solutions in zth objective and value of objective at ϑth frontier solutions, respectively.To determine the optimal solution among frontier solutions, a maximum and minimum procedure is presented in Eq. ( 21).In Eq. ( 21), a high rate of minimum solution is introduced as the optimal solution.

Input data and case studies
Regarding the mathematical modeling of the stand-alone electrical grid in previous sections, numerical simulation considering the proposed optimization is implemented in this section.In this section, input data and case studies of the optimization process are introduced as follows: The 37-node test system as a stand-alone electrical grid is depicted in Fig.
2 [26].The input data of the DGs and hydrogen storage system in Table 2. is listed.The three DGs with the same characteristics are considered in the test system.In Fig. 3, the load demand of the consumers is shown.The offer price for implementing the incentive approach and maximum demand shaving is considered by 60 $/kW and 35kW, respectively.The case studies are presented as follows: (20)  Case study (A): Energy optimization without consideration of the incentive approach and hydrogen storage system.Case study (B): Energy optimization with the incentive approach and hydrogen storage system.
These case studies are proposed for verifying energy optimization considering the participation of the incentive approach and hydrogen storage system.

Results and discussion
The discussion and results of the numerical simulation based on participation and nonparticipation of the incentive approach and hydrogen storage system in case studies B and A are analyzed in this subsection.Also, results are compared to each other for verification of energy optimization.

Fig. 3 Load demand
In Fig. 4, the load demand after and before implementing the incentive approach is depicted.The electrical demand in Fig. 4 at hours 14, 15, 18-20, and 23 is shaved by implementing an incentive approach.The mentioned hours are peak demand of the consumers.In the following, frontier solutions for case studies A and B with six solutions and objectives, such as energy cost and efficiency, are presented in Fig. 5.The 1) This work can be modeled by other approaches such as the robust optimization approach.
2) The uncertainty of the energy demand and renewable energy sources can be considered in this study.
3) The new objective functions like energy losses can be modeled in the proposed study.

Page 2 of 13
Peng and Zhang Journal of Engineering and Applied Science (2024) 71:61

Fig. 2 A
Fig.2A 37-node test system as stand-alone electrical grid

Fig. Load demand after and before DSM 5
Fig. Load demand after and before DSM

Λ
Bid price for incentive approach $ D In , D ENS , D E Demand shaved, ENS, and demand kW P FC , P d Fuel cell and DG powers generated kW P EL , P HT Electrolyzer power and hydrogen power kW μ off , μ on DGs' status (on = 1 and off = 0) -

Table 2
Input data of DG and hydrogen storage system