Abstract
A hybrid microgrid powered by hydrogen is an energy infrastructure that depends on hydrogen as its primary energy carrier within a localized network. This study proposed a novel bi-level optimization approach to enhance power quality and cost efficiency of the system. In the quest to improve energy management systems (EMS) and enhance power quality, a bi-level optimization approach named Particle swarm optimization-Modified water wave optimization (PSO-MWWO) has been proposed. This method integrates adaptive population size and an adaptive wavelength coefficient to boost its overall effectiveness. It is attractive with specialists in energy management systems (EMS), control systems, and hydrogen technologies can significantly augment the efficiency of coordination endeavours. PSO-MWWO can incorporate environmental considerations, such as minimizing emissions or exploiting the use of renewable energy resources (RESs) in hydrogen production and consumption. This paper thoroughly examines its implementation, operation, and unique features, with a particular emphasis on the power quality of a hydrogen based microgrid. The achieved results and numerical analysis affirm the superiority of the proposed technique compared to other traditional methods like mixed integer linear programming (MILP), HOMER, Variable mesh optimization (VMO), and Cataclysmic genetic algorithm in optimizing component sizing, renewable production, hydrogen production, reliability, cost effective, and overall efficacy. This substantiates its practical utility in real-time applications. The efficacy of this method is empirically demonstrated through the implementation in MATLAB software.
Similar content being viewed by others

Introduction
In the comprehensive context of recent energy systems, microgrids play a key role in endorsing sustainability, consolidation reliability, and progressing energy self-sufficiency. The role becomes principally obvious amid the growing adoption of renewable energy sources and the intensifying demand for robust energy solutions1. Microgrids represent decentralized energy systems that operate on a smaller scale once associated to traditional centralized grids2. Hybrid microgrids are designed to generate, distribute, and manage power within precise localized areas, such as neighborhoods, commercial complexes,, or even industrial sites3. Microgrids encompass numerous decisive features, including their energy sources, ability to operate independently (islanded operation), connectivity to the main grid, energy management strategies, and local control mechanisms4. A significant benefit of microgrids is their resilience when confronted with power disruptions5. They have the capability to preserve power supply even in the incident of power outages, which is a crucial feature for vigorous services such as hospitals, emergency response centers, and isolated communities6. By efficiently managing energy production and consumption at a local level, microgrids contribute to enhanced energy efficacy7.
Hybrid grids is an emerging technology and concept that embraces substantial potential for addressing some of the encounters associated with renewable energy integration and grid steadiness8,9,10. Hydrogen is considered an energy carrier and storage key for power grids. It can store surplus energy when supply exceeds demand and consume it when required, helping to balance the grid supply11. During periods of low energy production, the stored hydrogen will be converted in a fuel cell, ensuring a dependable power supply to meet load demand12. Hydrogen can be produced through numerous approaches, including electrolysis (by means of power to split water into hydrogen and oxygen), steam methane ameliorating, and other progressive technologies. Renewable energy sources like wind and solar can be utilized for green hydrogen production13. Hydrogen can be stored in several forms, like gaseous hydrogen, liquid hydrogen, and solid hydrogen storage resources. The storage process choices actually depend on factors like efficiency, safety, and microgrid provisions14,15.
Hydrogen’s high energy density makes it ideal for storing substantial amounts of energy in relatively small volumes, which is beneficial for grid-scale storage16. Hydrogen storage enables the integration of fragmentary renewable energy sources (such as wind and solar) into the grid by providing a means to store surplus energy and deliver it when these sources are not producing13. Previous studies have explored the techno-economic benefits of electrolyzer capacity, hydrogen storage tank size, and the integration of renewable energy in the system17. Although hydrogen production is free from greenhouse gas emissions, the combustion of hydrogen, similar to other high-temperature burning processes, releases nitrogen oxides. These pollutants contribute to smog, acid rain, and health issues such as asthma and respiratory infections18. Transition to hydrogen could significantly reduce the warming effects associated with fossil fuels, provided that the hydrogen is produced from renewable energy resources and that strict measures are implemented to prevent hydrogen leaks and other secretions19. Hydrogen production offers significant potential for decarbonizing various sectors, such as transportation, industry, and power generation20. By achieving this, it can play a crucial role in global efforts to reduce greenhouse gas emissions and combat climate change21.
Hydrogen storage can improve grid resilience by providing backup power during grid outages or disasters. Fuel cells that produce power from stored hydrogen can be utilized for this purpose. Hydrogen can be transported over extensive reserves than power, making it a valuable option for connecting remote renewable energy generation sites to the grid or for communicating local grids22. The common structure of the microgrid is elaborated in Fig. 1.
Structure of hydrogen storage based microgrid23.
However, it’s important to acknowledge that hydrogen storage also faces several challenges, including energy losses during conversion and storage, cost-effectiveness, safety considerations, and the necessity for infrastructure development such as pipelines and storage facilities16. Nonetheless, numerous pilot projects and initiatives are underway worldwide to explore and implement hydrogen storage solutions within power grids, marking an exciting advancement in the quest for cleaner and more reliable energy systems. These projects aim to establish the technology’s feasibility and potential benefits. Hydrogen storage in power grids is a chunk of the wider efforts to evolution to cleaner and additional sustainable energy systems. It offers an auspicious resolution to the challenges related to renewable energy unpredictability and grid reliability while contributing to the decarbonization of the energy sector24. The systematic challenges associated with hydrogen based microgrids, such as transportation, storage, and distribution issues, along with technical and economic barriers, are addressed25.
Modified Water Wave Optimization (MWWO) and Particle Swarm Optimization (PSO) are both nature-inspired optimization techniques used to crack complex optimization hitches in this study. Each of them is based on different ideologies and mechanisms26,27. MWWO is exceptional in the behavior of water waves. It imitates the propagation and interaction of waves to compute solutions28. PSO is stimulated by the means of an entire bird’s flock or fish school. It simulates the way distinct particles in a swarm collaborate to find the ultimate solution29. MWWO characterizes potential solutions as waves on a water surface. These waves propagate and interact with each other, representing the exchange of information among solutions.
Particles regulate their velocities based on their own finest position and most notable position between the complete crowd. MWWO introduces damping factors to control convergence, simulating the dissipation of energy in real water waves. PSO balances exploration (finding new areas of the search space) and exploitation (refining the current best solution). Both PSO and MWWO are part of the extensive field of metaheuristic optimization, and their efficacy depends on features like parameter tuning and the specific characteristics of the problem being solved30. This study examines the efficiency of hybrid microgrids, with focus on improving the power quality through cost-effective optimization techniques31. Researchers often choose between these algorithms based on the problem at hand and their performance in practice32,33,34. The Energy Management System is established to account for power fluctuations due to uncertainties in renewable energy35.
As outlined in the preceding descriptions, the primary advantage of this research lies in the upgraded cost-effectiveness of hydrogen based microgrids through effective energy management and improve the power quality of the system36. The utilization of MWWO and PSO to address this model is a noteworthy aspect because these are not explored previously in the field of hydrogen based microgrid applications. Furthermore, the article considers the eventual achievement of voltage convergence in this model to improve the power profile37. The proposed research design offers notable contributuion over traditional microgrid design approaches:
-
In this paper, bi level nature inspired optimization techniques Particle swarm optimization-Modified water wave optimization (PSO-MWWO) are proposed, it steadily delivers superior results in optimizing component sizing, renewable production, hydrogen production, reliability, cost effective, and overall efficacy when compared to traditional hydrogen based microgrid designs.
-
Utilizing hybrid microgrid, the PSO-MWWO approach modernized the assemblage of microgrid anatomy, simplifying the preliminary design development and enhance the system performance due to with its better speed of convergence, greater solution diversity, and improved balance between exploration and exploitation.
-
The proposed PSO-MWWO technique converges the power at an appropriate level and improves the power quality ultimately due to some factors like search spaceis increased, optimization characteristics by tying the local and the global exploration aptitude are remarkable.
-
To justify the efficiency and strength of suggested PSO-MWWO novel technique over traditional methods, a convergence of power has been implemented which has not been active much in literature. Presenting these comparisons are in table is a novel approach, making them easy to understand and encouraging researcher to pursue further studies in this field of interest.
-
The ultimate outcomes showed that the proposed PSO-MWWO technique is robust and outclass the conventional techiques in terms proper energy distribution among the hybrid energy resources, better SoC, lower level of harmoics, maximizing the system efficiency in a cost effective manner and improved voltage response by improving power quality.
Further sections of this article cover: section II the hydrogen based system model, section III described the optimized energy management system EMS, the Simulation and its results are demonstrated in section IV and final section V holds the conclusion.
Hydrogen based system model
This section delves into modeling the microgrid (MG) system and its components, stressing the importance of accurately representing each subsystem. Employing a meticulous approach, crafted a precise model that includes elements like wind turbine, photovoltaic, hydrogen repository, electrolyzers and fuel cell with variable power. The section conducts a thorough investigation of each component within the system.
This research presents a microgrid system that unified several components, containing a proton exchange membrane fuel cell, an alkaline electrolyzer, oxygen and hydrogen gas storage enclosure, battery storage, and photovoltaic generators38. In precise, the fuel cell and electrolyzer utilized in this research align with the specifications of a Nexa 26 V, 46 A, 1.2 kW Proton Exchange Membrane Fuel Cell (PEMFC) established by the Ballard39and hydrogen Igen 300/1/25, 43 V, 120 A, 5 kW Alkaline Electrolyzer. To ehnace the global performance and resource usage of hybrid microgrids, a comprehensive power and energy management plan of action is put into practice40. This approach is purposefully crafted to optimize the system’s operation41. The hydrogen based microgrid is simulated using MATLAB/Simulink software.
At the initial phase in designing a microgrid is to estimate the energy requirements of the load or the capacity it will oblige. It embraces assessing the typical daily and peak energy demand, as well as recognizing the energy sources currently used and the potential for renewable energy. This comprises recognizing the quantity of hydrogen storage, fuel cells, and further components mandatory to encounter the energy demand. This involves choosing the proper fuel cells, power electronics, and other components to optimize the performance of the system. The management of the microgrid system involves monitoring the energy demand and supply, managing the hydrogen production and storage, and maintaining the system components. It requires the development of a control system that can efficiently accomplish the energy flows and optimize the system’s performance.
Wind turbine model
Wind turbines produce electrical power continuously, delivering energy for local consumption and replenishing a hydrogen storage system. Additional power is either fed back into the grid or used for non-critical purposes. Computing the output power of the wind mills entails transforming the wind speed, as measured at the anemometer height, to measure the wind turbine hub height by means of the power law Eq. (1)42.
In this scenario, \(\:{V}_{a}\) and \(\:{V}_{b}\) represents wind speeds at the wind turbine hub height and the reference height \(\:{h}_{ref}\), calculated in meters per second. Moreover, γ denotes the exponential factor within the power law and is usually known as the “roughness factor.” This factor is permitting to the impact of various variables, such as the local terrain, temperature, and wind velocity, which can vary with the time of day or time of year. Therefore, it can oscillate significantly between open, flat landscapes and compact forested areas. As a result, the wind turbine’s power output, considered as \(\:{P}_{Wout}\), can be determined using a series of Eq. (2).
The output of WT is relying on two key factors: the rated power \(\:{P}_{Wout}\) of the turbine and wind speed V. Moreover, vital wind velocity standards are used to control the turbine’s action. The Cut-in velocity presented by \(\:{V}_{C-in}\), the rated speed of the turbine designated by \(\:{V}_{Ra}\)and lastly, the cut-off speed can be determined by \(\:{V}_{C-Off}\). So, remaining constant values \(\:x\) and \(\:y\) can be calculated by specific expressions (3) and (4):
Usually, the \(\:{V}_{C-in}\) can be found within the bracket of 2.5–3.5 m per second and \(\:{V}_{C-Off}\) has the range of 20–25 m per second.
Photovoltaic model
During this phase of the article, solar panels produce power in the presence of sunshine43. The produced power is employed to meet local energy needs and replenish the hydrogen storage. The surplus electrical power can be directed back to the grid or utilized for non-essential devices. Information necessary for solar power management is sourced from solar irradiation (I) and ambient temperature (\(\:{T}_{a}\)), which are acquired from the National Solar Radiation Database (NSRDB). When PV power production starts, the cell temperature (\(\:{T}_{Cell}\)) is computed using a specific (5).
Where NOCT represents the nominal operating cell temperature of the solar panels, the output power of a PV cell is computed using (6).
\(\:{R}_{fac}\) is the reduction factor accounting for dust accretion, on the other hand \(\:{\eta}_{PV}\) denotes the solar panels conversion efficiency, \(\:{A}_{PV}\:\)signifies the surface area of the panels, and \(\:{K}_{P}\:\)represents the temperature coefficient. As a result, (7) quantifies the total power generated by an entire PV panel.
\(\:{P}_{total\:\:}\)is the total power and the temperature rise may compromise its efficacy. The minor modification in temperature of solar panels can lead to a decrease in power concerning both voltage and current.
Hydrogen repository model
The object of a hydrogen storage system is similar to common energy storage concepts. It encloses the production of hydrogen through electrolysis by means of excess power, its storage within the tank, and its assembly to a fuel cell for hydrogen release. The repository capacity of the hydrogen tank has a direct influence on the quantity of hydrogen that can be stored and discharged. This relationship is articulated as follows in (8).
where,\(\:{\:\text{C}}_{{\text{H}}_{2}}\left(\text{t}+1\right)\) is the refurbished capacity of the tank, while \(\:{\text{C}}_{{\text{H}}_{2}}\)(t) is the running capacity of the container and k is the storage efficiency of tank. \(\:{\text{P}}_{\text{i}\text{n}-\text{F}\text{C}}\left(\text{t}\right)\) is the power of the hydrogen container at time t.
Electrolyzer Model
Hydrogen generation is made by employing an electrolyzer, which acts as the primary device for transforming power into hydrogen. The outcomes of the electrolyzers functioning can be succinctly represented by (9)
Where, \(\:{\text{k}}_{1}\) represents the electro-hydrogen conversion ratio. \(\:{\text{P}}_{\text{i}\text{n}-\text{E}}\left(\text{t}\right)\) and \(\:{\text{P}}_{\text{o}\text{u}\text{t}-{\text{H}}_{2}}\)(t) are the input/ output power of the electrolyzer at the prescribed time t.
FC Model
When the power supply is inadequate, a fuel cell steps in to produce power by transforming chemical energy into electrical energy. The amount of power generated by fuel cells can be designated as a function of power released from hydrogen and the efficiency with which the hydrogen’s electrical energy is converted. So, the output power can be measured in (10).
In the present disclosure the oxygen and hydrogen chunk are to be considered is lossless. The total volume of \(\:{\text{O}}_{2}\) and \(\:{\text{H}}_{2}\) can be calculated by (11) and (12)
The volume of container level variance hinges on the primary level like \(\:{\text{V}}_{\text{O},\text{t}}\) and \(\:{\text{V}}_{\text{H},\text{t}}\). Flow rates are labelled in \(\:{n}_{O,t}{t}_{opt}\) and \(\:{n}_{H,t}{t}_{opt}\) respectively. Matlab polyfitZero function can give these terminologies. So, flow rates of oxygen and hydrogen can be measured by (13) and (14)
The flow rates of oxygen based electrolyzer and FC are expressed as \(\:{\text{n}}_{\text{O}\:\text{E}\text{l},\text{n}}\) and \(\:{\text{n}}_{\text{O}\:\text{F}\text{C},\text{n}}\), though the flow rates of the hydrogen based electrolyzer and FC are \(\:{\text{n}}_{\text{O}\:\text{E}\text{l},\text{t}}\) and \(\:{\text{n}}_{\text{H}\:\text{F}\text{C},\text{t}}\) respectively. Now the exchange current and voltage can be measured by (15–17).
Where \(\:{\text{V}}_{\text{o}\text{u}\text{t}}\) and \(\:{\text{i}}_{\text{o}\text{u}\text{t}}\) are output of voltage and current, ‘Rh’ is the plank’s constant and k is Boltzmann constant while N is the number of cells and output voltage taking all losses including \(\:{\text{V}}_{\text{R}\text{e}\text{s}}\) resistive and \(\:{\text{V}}_{\text{D}}\) deffusive.
Optimized energy management system
In the strategic development and modeling of hydrogen based microgrids, optimization models are often crafted with a focus on critical metrics that include investment costs, power reliability, and emissions of pollutants. In the hybrid microgrid design presented in this research, the optimization model revolves around pivotal decision variables, capacities of the electrolyzer, hydrogen storage tank, and FC within the hydrogen storage system. This model offers an inclusive assessment, considering aspects like initial cost, present cost, and the efficiency of power shortages linked to the hydrogen storage unit. Eventually, it fabricates an optimized model for the hydrogen storage system, thereby enhancing the precision and efficiency of microgrid planning and modeling.
When deciding on the power conversion structure and the scale of power sources for a microgrid serving crucial loads, there are two distinct performance metrics to contemplate like enhancing the power efficiency of the microgrid by improving voltage profile and the final one is cost-effectiveness. The incorporation of Particle Swarm Optimization (PSO) and Modified Water Wave Optimization (MWWO) within hydrogen based microgrids has the potential to elevate the control of energy resources, boost system efficiency, and promote the utilization of hydrogen as an energy carrier. So, how these optimization algorithms can be applied in the context of hydrogen based microgrids. The objective function of the energy management system, given in (18), is based on two main factors: enhancing power system quality and being cost-effective.
Particle Swarm Optimization (PSO) can efficiently optimize the allocation of hydrogen-based power generation to meet microgrid demand, thereby enhancing power quality and efficiency \(\:{P}_{\eta}\) and that can be done when to import/export electricity based on hydrogen availability and improves the voltage profile.
Modified Water Wave Optimization (MWWO) can be employed to optimize the production of hydrogen considering real-time factors such as weather conditions, renewable energy generation, and demand fluctuations. Modified Water Wave Optimization (MWWO) optimizes energy management within the microgrid by taking into account factors such as hydrogen availability, load patterns, and environmental goals, ensuring optimal operation under changing conditions. A graphical depiction of numerous wave shapes in profound and thin water for the MWWO model is offered in Fig. 2.
Wave shapes with respect to wave energy44.
Three categories of operation on the waves are painstaking which are termed as propagation, refraction and breaking correspondingly in (19–20)45.
Where, after the propagation, which occurs during each iteration, each value should propagate to obtain a new optimal value and shown by \(\:{x}^{{\prime\:}}\). L(t) is the length of \(\:{t}^{th}\)dimension of search space (1 ≤ t ≤ n) and uniformly distributed random number within the range of [-1, 1]. r is the reduction coefficient and is very small positive number to avoid to get the infinity output. \(\:{f}_{max}\) and \(\:{f}_{min}\) are the maximum and minimum fitness numbers at presesent while \(\:\epsilon\:\) denotes the least positive number to provision the divion by zero. Once the propagation is done next step is to find the refraction of cost and it includes the Gaussian random number with mean and standard deviation in (21–23) and refraction is illustrated in Fig. 3.
Where N (µ, σ) denotes the gaussian random number, µ is the mean value and σ denotes the standard deviation. Meanwhile, after the refraction, the closeness of result may be reset by the wavelength.
Wave refraction phenomena44.
Finally, Breaking operator regulates a centralized search around the optimal results and eventually solutions in the wave transforming into a series of individual waves elaborated in (24) and it can depicted from Fig. 4.
β is the breaking coefficient and which ranges between 0.001 and 0.01.
Breaking phenomena44.
A simple linear model has been suggested that decreases the inhabitants of n waves from maximum size \(\:{iteration}_{max}\) to smallest value \(\:iteration\) as described in (26). The adaptive wavelength coeffeient helps to increase the efficiency of propagation can be measured in (27–28).
Where, \(\:{r}_{min}\) and \(\:{r}_{max}\) are the minimum and maximum reduction coefficients while the existing production is denoted by the iteration of process. In the preliminary steps, r enhances exploration by having higher values. As the number of iterations rises, r decreases, leading to improve exploitation performance. Therefore, it strikes a favorable balance between exploration and exploitation.
Whereas the constraints of the optimization problem encompass factors like the power output from each type of Distributed Energy Resource (DER), preserving power balance within the Microgrid (MG) system, and managing energy exchange between components. The constraints on power generation for each type of DER include both the minimum and maximum output power confines at any given time t and can measured as in (29).
Where \(\:{P}_{minimum}\)and \(\:{P}_{maximum}\) are the limits of output power is measured in watts, and \(\:{P}_{output}\:\)is the acceptable output power.
Table 1 provides an illustration of the significant differentiators between the PSO-MWWWO approach, and established microgrid design methods. These include comparisons with the widely used HOMER software, the conventional industry approach for powering critical loads, and numerous remarkable methods from cited sources14,15and30,32. The PSO-MWWO method drawn in this research incorporates all the essential elements that designers require when devising resilient and sustainable microgrid systems customized for applications.
table 1.
The proposed Energy Management Systems (EMS) contains the deliberation of multiple aims, and comprises technical and economic features. As far as the technical point, EMS aims to optimize equipment life and reduce power losses during the supply to loads by improving the system efficiency. whereas, the cost-effectiveness of a system is a primary concern once the economics analyses. Various constraints are integrated into this EMS architecture, including the inclusion of hydrogen energy storage, handling excess power during hydrogen generation, conducting power demand from utility, and adhering to time constraints. The proposed flow chart outlining the MWWO is described in Fig. 5.
Simulation and results
In this study, the aforementioned stages need to be executed by engaging the EMS and a power that keeps regular surveillance of the system’s status and governs power distribution. To address the optimization trial, the Yalmip toolbox is utilized46. Meanwhile, the article adopts the bi-level optimization that is Modified Water-wave optimization MWWO and Particle Swarm Optimization (PSO) technique, commonly known by PSO-MWWO. It is implemented for its ability to efficiently and accurately tackle complex problems within a short timeframe. This optimization approach has been integrated into a MATLAB Simulink model.
In this research, the simulation development takes several inputs into account, including economic data, daily solar radiation, wind speed measured in meters per second, and the electricity demand from consumers47. The assumptive peak load for consumers within the microgrid is about in MW. Table II offers the average solar radiation, wind speed (in per unit), and the load characteristics. The capital costs for each unit are attained from48 and summarized. The exploration reinforces a forecasted technique that blocs the modified water wave optimization (MMWO) and Particle Swarm Optimization (PSO) with microgrid system applications within the MATLAB software environment. The optimal sizes for each unit in the sense of cost are detailed in Table II.
The operational categories of MWWO as revealed in Fig. 6. The convergence etiquette of the MWWO algorithm regarding cost, which leads to the optimal strategy for the hydrogen based microgrid system, is interpreted as in Fig. 7. The cost dynamically decreased for the hydrogen based microgrid systems.
The optimal solution is achieved remarkably after just thirty iterations. The power generated from the solar system, wind turbine, and fuel cells is effectively utilized to meet the consumers’ demands. The second phase of the research comprises the voltage convergence of hydrogen based microgrids. It’s a bilevel optimization implementation so here PSO is engaged. Once the power production is done from different renewable energy resources then a crucial part is occupying the fuel cell through electrolyzers. They are extensively used for the separation of water into its constituent elements, hydrogen and oxygen. Electrolyzers have various applications, including hydrogen production for fuel cells, energy storage, and contributing to the development of a more sustainable and renewable energy ecosystem. In a fuel cell, hydrogen combines with oxygen to produce electricity and water as a byproduct, making it a clean and efficient method of generating electric power. The voltage level of each renewable energy resource plays a vital role in meeting load with reduced uncertainties, as the voltage and power profile are also considered in this part of the article.
For validation, a vigorous voltage profile at the core generation source, the complete storage system can reap benefits such as amended battery state of charge and fuel cell current values. The fuel cell preserves a sustainable current to meet load during periods of RES power shortages, as depicted in Fig. 7. Furthermore, addresses fuel consumption during fuel cell energy management, which is presented in its corresponding characteristics. Fuel utilization within the energy management of fuel cells is another significant facet, which is comprised in its characteristics.
It is evident that, in terms of optimization speed, both the MWWO and PSO algorithms closely approach the optimal solution after just 10 iterations, while the particle swarm algorithm requires at least 30 repetitions to attain a similar level of proximity to the optimal solution when its applied distinctly. When considering optimization outcomes, the model of bi-level algorithm emerges as the most favorable, presenting a more desirable optimal value for the capacity model compared to PSO. Optimized behavior of output voltage and current of multiple phases from simulation are in Figs. 8–10.
Finally, to assess the variability of the microgrid design generated by the PSO-MWWO method under diverse load conditions, a sensitivity analysis is conducted by examining the outcomes achieved in various voltage convergences. Figure 9 observes all voltage convergences, indicating that convergence was attained within the designed thirty iterations. Moreover, the converged voltage adhered to an encoded constraint, ensuring that it remains within the range of -2 to 2 with respect to their phases. The convergence part of the hydrogen based microgrid is implemented by means of PSO, resulting in an improvement of the power profile and system stability. The optimized output of the system is shown in Fig. 10. after the convergence of the entire system.
Predicting the voltage profile of a hydrogen based microgrid is a complex task due to its dependence on several factors, including microgrid accessibility. Moreover, critical loads often suffer changes in their installed capacity, resulting in disparities between the estimated power demand and power production.
The sensitivity analysis of the system is evaluated based on two key factors: (i) ensuring cost-effectiveness and (ii) improving power quality through the proposed technique. The cost sensitivity analysis examines how changes in parameters such as hydrogen storage efficiency, electrical load, and renewable energy integration impact the total system cost, as shown in the Fig. 11. The analysis reveals that while the costs for solar and wind energy are relatively similar, hydrogen storage and electrical load costs differ significantly from the costs of renewable energy resources. The observed pattern in the system cost will differ when there are variations in the electric load profile. Specifically, the system cost value increases as the electric load increases. The minimum and maximum total cost assessment can be derived from this analysis, revealing a range of approximately $2.17 million to $2.29 million. Figure 12. illustrates the sensitivity analysis concerning power quality improvement. Based on the calculations, wind velocity changes by approximately 49%, solar radiation varies by about 17%, and streamflow shows a variation of around 32%. This analysis examines the voltage deviations occurring over a 24-hour period, highlighting their significant impact on power quality.
Finally, the economic and policy factors interrelated with the hydrogen based microgrid must be calculated. Moreover, comparison of proposed PSO-MWWO with other traditional techniques on daily basis are shown in Fig. 14. It covers assessing the costs and benefits of the microgrid system and developing a technical model that can certify the economic viability of the system. The analysis underscores the effectiveness and viability of the PSO-MWWO in addressing the optimized capacity model for the hybrid hydrogen based microgrid proposed in this study. Even within this framework, the particular best hydrogen based microgrid design upholds an availability level that surpasses the established constraint. However, when confronted with heightened load impulsiveness, both the microgrid’s net present cost and energy efficacy experience a decay. These performance setbacks arise from the fluctuations in hourly power demand, causing a shift in the operating point of power converters towards a less efficient range.
PSO-MWWO exhibits exceptional global search capabilities by simulating natural evolutionary processes. It has proven effective in addressing a range of complex optimization challenges, encompassing both single-objective and multi-objective optimization problems. Traditional algorithms frequently struggle to achieve global optimal solutions. While metaheuristic algorithms do not guarantee a global optimum, they have a higher likelihood of finding it due to their mechanisms, such as crossover and mutation. PSO-MWWO does not depend on the gradient of the optimization problem, meaning it can handle problems that are not differentiable. This contrasts with traditional optimization methods like gradient descent and quasi-Newton techniques, which require differentiability. Time complexity is a fundamental aspect of the proposed research, as it gauges the amount of time an algorithm needs to complete based on the size of the input. It provides a structured framework for evaluating and comparing the efficiency of different algorithms. In this study, it was found that less time was required for both cost estimation and improving the power quality of the hybrid microgrid.
The comparison of this proposed method with classical and contemporary methods has been conducted on a daily basis across multiple parameters in Fig. 15. This highlights the superiority of the proposed method over traditional methods already adopted in the field of hybrid microgrids. The considered parameters for comparison include component sizing, power production from renewable resources, hydrogen storage through electrolysis, cost-effectiveness, system reliability, and voltage convergence levels aimed at improving the power quality of the system. The proposed bi-level optimization technique PSO-MWWO has demonstrated highly commendable results, surpassing traditional methods with outstanding improvements in power quality and cost-effectiveness.
Conclusion
This article introduces a novel approach for hydrogen based microgrids that serve for cost-effectiveness and improvement in power quality, which is ignored by the other scholars. The proposed approach tackles the shortcomings of conventional hydrogen based microgrid designs by integrating the selection of energy conversion structures and the sizing of energy sources into an integrated design framework. The planning process incorporates performance metrics like cost and power quality. Compared with other conventional researches on daily basis and it is found that its much advantageous. This article also provides a strategy for power convergence to validate the efficacy of this new technique. Through simulation, the assessment shows that power convergence enhances the quality of hydrogen-based microgrid systems, resulting in improved performance for hybrid microgrid regarding cost-effectiveness. The proposed method achieved savings of approximately 6.867% of the total cost by incorporating bi-level optimization. With a focus on power quality, this study has realized an impressive 94.9% improvement in cost-effectiveness by using bi-level optimization compared to previous methodologies.
Future research will concentrate on optimizing power delivery to consumers in hydrogen based microgrids, aiming to enhance society’s access to carbon-free energy sources. This paper has established the significance and engineering utility of System-based energy management for hydrogen based microgrids. Moreover, it lays the foundation for prospective research in the future. For instance, it opens the door for comprehensive optimization of both the microgrid system’s sizing and operation, which should be derived from the energy management methodology introduced in this study.
Data availability
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
Change history
06 February 2025
A Correction to this paper has been published: https://doi.org/10.1038/s41598-025-88770-2
References
Khare, V. & Chaturvedi, P. Design, control, reliability, economic and energy management of microgrid: a review. e-Prime - Adv. Electr. Eng. Electron. Energy. 5, 100239. https://doi.org/10.1016/j.prime.2023.100239 (Sep. 2023).
Wu, X., Cao, B., Liu, B. & Wang, X. A Planning Model of Standalone Hydrogen-Based Carbon-Free Microgrid Through Convex Relaxation, IEEE Trans Smart Grid, vol. 14, no. 4, pp. 2668–2680, Jul. doi: (2023). https://doi.org/10.1109/TSG.2022.3224900
Zhao, B. et al. Nov., Energy management of multiple microgrids based on a system of systems architecture, IEEE Transactions on Power Systems, vol. 33, no. 6, pp. 6410–6421, doi: (2018). https://doi.org/10.1109/TPWRS.2018.2840055
Li, J., Liu, Y. & Wu, L. Optimal operation for community-based multi-party microgrid in grid-connected and islanded modes. IEEE Trans. Smart Grid. 9 (2), 756–765. https://doi.org/10.1109/TSG.2016.2564645 (2018).
Wang, Y., Rousis, A. O. & Strbac, G. A Three-Level Planning Model for Optimal Sizing of Networked Microgrids Considering a Trade-Off between Resilience and Cost, IEEE Transactions on Power Systems, vol. 36, no. 6, pp. 5657–5669, Nov. doi: (2021). https://doi.org/10.1109/TPWRS.2021.3076128
Uddin, M. et al. Microgrids: A review, outstanding issues and future trends, Sep. 01, Elsevier Ltd. doi: (2023). https://doi.org/10.1016/j.esr.2023.101127
Decentralized_demand_side_management_with_rooftop_PV_in_residential_distribution_network.
Behera, S. & Dev Choudhury, N. B. A systematic review of energy management system based on various adaptive controllers with optimization algorithm on a smart microgrid. Int. Trans. Electr. Energy Syst. 31 (12). https://doi.org/10.1002/2050-7038.13132 (Dec. 2021).
Behera, S., Dev, N. B., Choudhury & Biswas, S. Maiden Application of the Slime Mold Algorithm for Optimal Operation of Energy Management on a Microgrid considering demand response program. SN Comput. Sci. 4 (5). https://doi.org/10.1007/s42979-023-02011-9 (Sep. 2023).
Bhatti, M. Z. A., Siddique, A., Aslam, W. & Atiq, S. Design and analysis of a hybrid stand-alone Microgrid. Energies (Basel). 17 (1). https://doi.org/10.3390/en17010200 (Jan. 2024).
Shao, Z., Cao, X., Zhai, Q. & Guan, X. Risk-constrained planning of rural-area hydrogen-based microgrid considering multiscale and multi-energy storage systems. Appl. Energy. 334 https://doi.org/10.1016/j.apenergy.2023.120682 (Mar. 2023).
Ren, K. et al. A data-driven DRL-based home energy management system optimization framework considering uncertain household parameters. Appl. Energy. 355 https://doi.org/10.1016/j.apenergy.2023.122258 (Feb. 2024).
Zhu, J. R., Jin, Y., Zhu, W., Lee, D. K. & Bohlooli, N. Multi-objective planning of micro-grid system considering renewable energy and hydrogen storage systems with demand response. Int. J. Hydrogen Energy. https://doi.org/10.1016/j.ijhydene.2022.12.279 (May 2023).
May Alvarez, J. A., Zurbriggen, I. G., Paz, F. & Ordonez, M. Microgrids Multiobjective Design Optimization for Critical Loads, IEEE Trans Smart Grid, vol. 14, no. 1, pp. 17–28, Jan. doi: (2023). https://doi.org/10.1109/TSG.2022.3195989
Atia, R. & Yamada, N. Sizing and Analysis of Renewable Energy and Battery systems in Residential Microgrids. IEEE Trans. Smart Grid. 7 (3), 1204–1213. https://doi.org/10.1109/TSG.2016.2519541 (May 2016).
Van, L. P., Do Chi, K. & Duc, T. N. Review of hydrogen technologies based microgrid: Energy management systems, challenges and future recommendations, May 01, Elsevier Ltd. doi: (2023). https://doi.org/10.1016/j.ijhydene.2022.12.345
Abomazid, A. M., El-Taweel, N. A. & Farag, H. E. Z. Optimal Energy Management of Hydrogen Energy Facility Using Integrated Battery Energy Storage and Solar Photovoltaic Systems, IEEE Trans Sustain Energy, vol. 13, no. 3, pp. 1457–1468, Jul. doi: (2022). https://doi.org/10.1109/TSTE.2022.3161891
G, P. K. A. M and Hydrogen towards sustainable transition: a review of production, economic, environmental impact and scaling factors. Dec. 01 2023 Elsevier B V https://doi.org/10.1016/j.rineng.2023.101456
Datta, J. & Das, D. Energy management of multi-microgrids with renewables and electric vehicles considering price-elasticity based demand response: a bi-level hybrid optimization approach. Sustain. Cities Soc. 99 https://doi.org/10.1016/j.scs.2023.104908 (Dec. 2023).
Shen, X., Li, X., Yuan, J. & Jin, Y. A hydrogen-based zero-carbon microgrid demonstration in renewable-rich remote areas: System design and economic feasibility. Appl. Energy. 326 https://doi.org/10.1016/j.apenergy.2022.120039 (Nov. 2022).
Kassab, F. A. et al. Optimal sizing and energy management of a microgrid: A joint MILP approach for minimization of energy cost and carbon emission, Renew Energy, vol. 224, Apr. doi: (2024). https://doi.org/10.1016/j.renene.2024.120186
Carr, S., Zhang, F., Liu, F., Du, Z. & Maddy, J. Optimal operation of a hydrogen refuelling station combined with wind power in the electricity market. Int. J. Hydrogen Energy. 41 (46), 21057–21066. https://doi.org/10.1016/j.ijhydene.2016.09.073 (Dec. 2016).
Liu, X., Zhong, W., Hou, M. & Luo, Y. Two-Stage Optimal Operation Management of a Microgrid Considering Electricity-Hydrogen Coupling Dynamic Characteristics, Front Energy Res, vol. 10, Mar. doi: (2022). https://doi.org/10.3389/fenrg.2022.856304
Kumar Nunna, H. S. V. S. & Doolla, S. Multiagent-based distributed-energy-resource management for intelligent microgrids. IEEE Trans. Industr. Electron. 60 (4), 1678–1687. https://doi.org/10.1109/TIE.2012.2193857 (2013).
Youssef, H., Kamel, S., Hassan, M. H., Yu, J. & Safaraliev, M. A smart home energy management approach incorporating an enhanced northern goshawk optimizer to enhance user comfort, minimize costs, and promote efficient energy consumption. Int. J. Hydrogen Energy. 49, 644–658. https://doi.org/10.1016/j.ijhydene.2023.10.174 (Jan. 2024).
Qamar, H. G. M., Guo, X., Ghith, E. & Tlija, M. Aug., A Novel Approach to Energy Management with Power Quality Enhancement in Hydrogen Based Microgrids through Numerical Simulation, Applied Sciences, 14, 17, p. 7607, doi: (2024). https://doi.org/10.3390/app14177607
Behera, S. & Dev Choudhury, N. B. Application of MSMA-based-Fuzzy plus PID controller’s for battery management in microgrid, in International Conference on Electrical, Computer, Communications and Mechatronics Engineering, ICECCME Institute of Electrical and Electronics Engineers Inc., 2022. doi: (2022). https://doi.org/10.1109/ICECCME55909.2022.9988567
Soltanian, A., Derakhshan, F. & Soleimanpour-Moghadam, M. MWWO: Modified water wave optimization, in 3rd Conference on Swarm Intelligence and Evolutionary Computation, CSIEC Institute of Electrical and Electronics Engineers Inc., Jul. 2018, pp. 1–5. doi: (2018). https://doi.org/10.1109/CSIEC.2018.8405412
Jiang, J. J., Wei, W. X., Shao, W. L., Liang, Y. F. & Qu, Y. Y. Research on large-scale Bi-level particle swarm optimization algorithm. IEEE Access. 9, 56364–56375. https://doi.org/10.1109/ACCESS.2021.3072199 (2021).
Jahid, A., Hossain, M. S., Monju, M. K. H., Rahman, M. F. & Hossain, M. F. Techno-Economic and Energy Efficiency Analysis of Optimal Power Supply Solutions for Green Cellular Base stations. IEEE Access. 8, 43776–43795. https://doi.org/10.1109/ACCESS.2020.2973130 (2020).
Elkholy, M. H. et al. A resilient and intelligent multi-objective energy management for a hydrogen-battery hybrid energy storage system based on MFO technique. Renew. Energy. 222 https://doi.org/10.1016/j.renene.2023.119768 (Feb. 2024).
Zhou, L. et al. Optimal sizing of PV and bess for a smart household considering different price mechanisms, IEEE Access, vol. 6, pp. 41050–41059, Jun. doi: (2018). https://doi.org/10.1109/ACCESS.2018.2845900
Aribowo, W. et al. Sand cat swarm optimization for controlling PID in DC motor. Telkomnika (Telecommunication Comput. Electron. Control). 22 (2), 462–470. https://doi.org/10.12928/TELKOMNIKA.v22i2.25630 (Apr. 2024).
Rousis, A. O., Konstantelos, I. & Strbac, G. A Planning Model for a Hybrid AC-DC Microgrid Using a Novel GA/AC OPF Algorithm, IEEE Transactions on Power Systems, vol. 35, no. 1, pp. 227–237, Jan. doi: (2020). https://doi.org/10.1109/TPWRS.2019.2924137
Seedahmed, M. M. A., Ramli, M. A. M., Abusorrah, A. & Alqahtani, M. M. Control-oriented model of an optimally designed Hybrid Storage System for a Standalone Microgrid. IEEE Access. 11, 119161–119186. https://doi.org/10.1109/ACCESS.2023.3326333 (2023).
Vivas, F. J., De las Heras, A., Segura, F. & Andújar, J. M. A review of energy management strategies for renewable hybrid energy systems with hydrogen backup, Elsevier Ltd. doi: (2018). https://doi.org/10.1016/j.rser.2017.09.014
Huynh, D. C., Ho, L. D., Dunnigan, M. W. & Barbalata, C. Operation Optimization of a Microgrid based on Minimization of Power Loss and Improvement of Voltage Stability, Institute of Electrical and Electronics Engineers (IEEE), Aug. pp. 395–400. doi: (2023). https://doi.org/10.1109/icsse58758.2023.10227242
Abdelghany, M. B., Al-Durra, A. & Gao, F. A Coordinated Optimal Operation of a Grid-Connected Wind-Solar Microgrid Incorporating Hybrid Energy Storage Management Systems, IEEE Trans Sustain Energy, Jan. doi: (2023). https://doi.org/10.1109/TSTE.2023.3263540
Hilairet, M. et al. A passivity-based controller for coordination of converters in a fuel cell system. Control Eng. Pract. 21 (8), 1097–1109. https://doi.org/10.1016/j.conengprac.2013.04.003 (2013).
K/bidi, F., Damour, C., Grondin, D., Hilairet, M. & Benne, M. Multistage power and energy management strategy for hybrid microgrid with photovoltaic production and hydrogen storage. Appl. Energy. 323 https://doi.org/10.1016/j.apenergy.2022.119549 (Oct. 2022).
Li, B., Miao, H. & Li, J. Multiple hydrogen-based hybrid storage systems operation for microgrids: a combined TOPSIS and model predictive control methodology. Appl. Energy. 283 https://doi.org/10.1016/j.apenergy.2020.116303 (Feb. 2021).
Bukar, A. L., Tan, C. W. & Lau, K. Y. Optimal sizing of an autonomous photovoltaic/wind/battery/diesel generator microgrid using grasshopper optimization algorithm. Sol. Energy. 188, 685–696. https://doi.org/10.1016/j.solener.2019.06.050 (Aug. 2019).
Yugeswar Reddy, O., Jithendranath, J., Chakraborty, A. K. & Guerrero, J. M. Stability Constrained Optimal Operation of Standalone DC Microgrids Considering Load and Solar PV Uncertainties, IEEE Transactions on Power Delivery, vol. 38, no. 4, pp. 2673–2681, Aug. doi: (2023). https://doi.org/10.1109/TPWRD.2023.3253623
Jin, Y., Li, S. & Ren, L. A new water wave optimization algorithm for satellite stability. Chaos Solitons Fractals. 138 https://doi.org/10.1016/j.chaos.2020.109793 (Sep. 2020).
Zhang, J., Zhou, Y. & Luo, Q. An improved sine cosine water wave optimization algorithm for global optimization. J. Intell. Fuzzy Syst. 34 (4), 2129–2141. https://doi.org/10.3233/JIFS-171001 (2018).
Efberg, J. YALMIP: A toolbox for modeling and optimization in MATLAB, (2004).
Molu, R. J. J. et al. Optimization-based energy management system for grid-connected photovoltaic/battery microgrids under uncertainty, Case Studies in Chemical and Environmental Engineering, vol. 8, Dec. doi: (2023). https://doi.org/10.1016/j.cscee.2023.100464
HassanzadehFard, H. & Jalilian, A. Optimal sizing and location of renewable energy based DG units in distribution systems considering load growth. Int. J. Electr. Power Energy Syst. 101, 356–370. https://doi.org/10.1016/j.ijepes.2018.03.038 (Oct. 2018).
Acknowledgements
The authors extend their appreciation to King Saud University for funding this work through Researchers Supporting Project number (RSPD2025R685), King Saud University, Riyadh, Saudi Arabia.
Funding
This research is funded by King Saud University for funding this work through Researchers Supporting Project number (RSPD2025R685), King Saud University, Riyadh, Saudi Arabia.
Author information
Authors and Affiliations
Contributions
Hafiz Ghulam Murtza Qamar: Methodology, Investigation, Conceptualization, Software, Validation, Writing – original draft. Xiaoqiang Guo: Writing – original draft, Supervision, Software, Methodology, Investigation, Formal analysis, Conceptualization, Validation. Ehab Ghith: Investigation, Formal analysis, Reviewing and editing. Mehdi Tlija: Formal analysis, Investigation, draft, Funding acquisition, Validation, Writing – review & editing. Dr Abubakar Siddique: Writing – review & editing, Validation, Formal analysis, Methodology, Writing – original draft.
Corresponding author
Ethics declarations
Ethics approval and consent to participate
This study was conducted in accordance with the ethical principles and guidance from ethical committee. All study protocols were approved by ethics committee of School of Electrical Engineering, Yanshan University, Qinhuangdao, China. Further, a informed consent was obtained from the individuals who have participated in this study.
Competing interests
The authors declare no competing interests.
Use of AI tools declaration
The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The original online version of this Article was revised: In the original version of this Article Mehdi Tlija was incorrectly affiliated with 'Department of Electrical & Biomedical Engineering, Khwaja Fareed University of Engineering and Information Technology (KFUEIT), Rahim Yar Khan 64200, Pakistan'. The correct affiliation is: Department of Industrial Engineering, College of Engineering, King Saud University, P.O. Box 800, Riyadh 11421, Saudi Arabia.
Electronic supplementary material
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Murtza Qamar, H., Guo, X., Seif Ghith, E. et al. Assessment of energy management and power quality improvement of hydrogen based microgrid system through novel PSO-MWWO technique. Sci Rep 15, 863 (2025). https://doi.org/10.1038/s41598-024-78153-4
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-024-78153-4
Keywords
This article is cited by
-
Optimizing solar farm interconnection networks using graph theory and metaheuristic algorithms with economic and reliability analysis
Scientific Reports (2025)
-
Smart Algorithms and Controls for Electric Vehicle Battery Management Systems: A State-of-the-Art Review
Journal of The Institution of Engineers (India): Series B (2025)
















