**1. Introduction**

In recent years, wind and photovoltaic power generation have been essential for new power systems mainly based on new energy sources. With the promotion of carbon neutrality and the increasingly prominent problem of energy shortage, the large-scale application of new energy generation has become the trend of power system development. Because wind and sunlight are the primary energy sources of new energy generation, they are randomly influenced by the environment, temperature, geographical location, and other aspects, quickly leading to the imbalance of power conversion and the instability of power generation time, affecting the system's stability. Given the intermittent and uncertain influence of new energy, with the popularization of new energy, the proportion is increasing, which will significantly impact the stability, safety, and system operating rate for new energy sources [1]. The application of energy storage technology in new energy systems helps to improve the utilization rate of power generation in new energy power systems, keep the system stable in power supply during peak power generation and low power generation due to external influence, and improve the utilization efficiency of power generation systems [2]. Aiming at the intermittency and instability nature of new energy power generation, the energy storage is utilized in order to store and release the electric energy, and power supplementation is carried out so as to improve the energy utilization rate and the stability of the power supply of the power system.

**Citation:** He, G.; Wang, Z.; Ma, H.; Zhou, X. Optimal Capacity Configuration of Wind–Solar Hydrogen Storage Microgrid Based on IDW-PSO. *Batteries* **2023**, *9*, 410. https://doi.org/10.3390/ batteries9080410

Academic Editors: Luis Hernández-Callejo, Jesús Armando Aguilar Jiménez and Carlos Meza Benavides

Received: 24 May 2023 Revised: 21 July 2023 Accepted: 26 July 2023 Published: 6 August 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Because of the uncertainty and fluctuation of scenery, large-scale access to clean energy will also contain more uncertain factors, which will cause the phenomenon of abandoning wind and light and affect power stability [3]. The incorporation of hydrogen energy storage in the system has the advantages of being pollution-free, sustainable, and energy-saving, and is a green and clean energy storage system. The use of a hydrogen energy storage system allows for the storage of excess electricity from wind and solar energy abandonment, realizing the use of clean energy in the form of integrated energy of electricity–hydrogen–electricity, and improving the efficiency of the available renewable energy sources. Hydrogen energy storage has high energy density, a low cost of running and sustaining compared with other energy storage, long-term storage and non-pollution, applicable to both instantaneous power supply and long time power supply, applicable to different situations. Compared with the traditional battery, the fuel cell in hydrogen energy storage can be between the hydrogen chemical energy converted to electrical energy without the mutual conversion of other energy forms, which significantly reduces the loss and increases the power generation efficiency, and has the advantage of high energy conversion, environmental protection and the like.

With the gradual increase in the occupation of new energy sources, the percentage of wind and solar farms has been increasing, and consequently the research on power fluctuation problems has been gradually deepened. There have been many studies at home and abroad on the problem of optimal allocation of integrated energy system capacity. Literature [4] uses variational mode decomposition (VMD) to analyze the unbalanced power in a wind–solar hybrid microgrid. It establishes a model for the optimal allocation of hybrid energy capacity for the storage of batteries and supercapacitors. Literature [5] established a capacity optimization allocation method to reduce grid-connected photovoltaic power for photovoltaic power plants as well as hybrid energy storage systems. According to [6], the megawatt isolated microgrid consisting of photovoltaic/wind turbines, energy storage, diesel, and gas turbines is optimized in capacity allocation to solve electricity supply problems for powerless remote locations. Literature [7] proposes a quantitative optimal configuration method for a wind and solar complementary power supply system. Literature [8] puts forward an optimization strategy of double-layer hybrid energy storage capacity for a distribution grid by accounting for the distribution network loss and the total cost of the stored capacity system. In literature [9], a configuration model of a multi-source microgrid is constructed considering three aspects: installation location, unit arrangement and combination, extraordinary load of electric vehicles, and the dynamic matching problem between power generation and power consumption is analyzed. In reference [10], a multi-objective optimal allocation method of energy storage systems is proposed to deal with the issue of energy storage allocation under one-party investment and multiple benefits. These studies all show that the adoption with hybrid energy storage is crucial in rational distribution of microgrids, both consider the issues of reducing power loss and system investment cost or maximum economy, but do not consider the utilization of clean energy. In literature [11], the coupling of renewable energy power generation and hydrogen energy storage is shown to be a powerful means of achieving clean and carbon-neutral energy consumption, which has excellent potential for development. Literature [12] explains the application value system of hydrogen energy storage in the "source-network load" of the new power system. Hydrogen energy storage has the advantages of cross-season, cross-regional and large-scale storage. It has a specific rapid response ability, which has substantial application value in all aspects of the "source-network load" of new power systems. Literature [13] mainly considers how to construct a multi-energy combined storage and supply model in the integrated energy system with hydrogen storage as the conversion hub of multiple energy forms in low carbon parks, so as to achieve the optimized allocation method with low carbon emission and low cost; literature [14] uses the hydrogen produced by the hydrogen storage system to work together with a heat storage system and air source heat pump to reduce the use cost of electricity, heat and cold energy in the park, and establishes a capacity optimal allocation model taking integrated

energy cost minimization as the optimization target. The research on hydrogen energy storage systems mainly focuses on using hydrogen without considering the conversion of hydrogen energy storage as electric energy. Literature [15] builds a typical wind and solar hydrogen storage capacity configuration model based on wind energy, solar photovoltaic, electric energy storage, and hydrogen production equipment, Then establishes a demand response model of day-ahead segmented electricity price load to reduce the total cost of running the system. The application of hydrogen energy storage focuses on the recycling of hydrogen. Increasing hydrogen energy conversion into electric energy is conducive to improving the rate of abandoning wind and light and transforming into a green and low-carbon environment [16].

Based on the issues described above, a wind–solar hydrogen storage microgrid system with a wind turbine, photovoltaic generator, hydrogen storage system, and battery system as subsystems is constructed in the paper, and the particle swarm algorithm for improving the dynamic adjustment of inertia weights is applied to the system's capacity configuration, and the optimal configuration proposal on system capacity is obtained, which makes the highest system economy, achieves power stabilization, reduces the rate of abandoning wind and solar power, as well as the reduction of the system's shortage of power.

#### **2. Wind–Solar Hydrogen Microgrid System**

The distributed new energy system has wind power, photovoltaic, geothermal, tidal, and other subsystems with random output. The integrated development of a comprehensive energy system enhances the combined application of energy [17]. This paper's wind, light, and hydrogen microgrid system consists of wind turbines, photovoltaic generators, hydrogen production units, hydrogen storage units, fuel cells, and other auxiliary equipment. Hydrogen energy storage is used to realize the interconnection of electricity– hydrogen–electricity, to suppress the power fluctuation of distributed new power sources, which can contribute to the sustainability of energy [18]. The electricity–hydrogen system architecture of the park is schematically displayed in Figure 1. By matching and coupling various forms of energy storage, the energy utilization rate can be improved, achieving peak shaving and valley filling, stabilizing power fluctuation, and leading to certain economic benefits.

**Figure 1.** Schematic diagram of electric–hydrogen integrated energy structure.

Figure 1 is a schematic structural diagram of an electric–hydrogen system, mainly consisting of a generation unit, a capacity storage unit and load. The electricity generation unit comprises of wind power generation and photovoltaic power generation, which takes renewable energy as the main energy source of the system, while the energy storage unit comprises a storage battery and hydrogen storage system, which has a role of balancing the load of the system, and absorbs excess energy through the energy storage system when there is sufficient wind and light energy; and supplements it through the energy storage system when there is insufficient wind and light energy.

#### *2.1. Modeling of Generator Set*

#### 2.1.1. Photovoltaic Generation System

Physical photovoltaic (PV) power generation is the direct transformation of solar energy through PV panels into electrical energy. Photovoltaic power generation is affected by solar radiation, the radiation angle, sunshine hours, and environmental temperature. The specific photovoltaic power generation output model is shown in Formula (1) [19]:

$$P\_{\rm PV}(t) = P\_{\rm PVN} f\_{\rm PV} \frac{G(t)}{G\_{\rm ref}} [1 + a(T\_c(t) - T\_{\rm ref})] \tag{1}$$

where: *P*pv(*t*) represents the actual electricity generation power of the photovoltaic panel; *P*pvN is the nominal capacity of the photovoltaic panel to generate electricity; *f* pv is the operation efficiency of photovoltaic system; *G*(*t*) is the actual light intensity at time *t*; *G*ref is the reference standard light intensity; *α* is the temperature coefficient; *Tc*(*t*) is the operating temperature of the photovoltaic panel at time *t*; *T*ref is the reference standard ambient temperature.

Photovoltaic panel operation temperature transformation is caused by the ambient temperature, and solar light intensity is caused by many aspects of the influence of the relationship shown in Formula (2):

$$T\_C(t) = T(t) + \frac{T\_{\text{rated}}}{800} G(t) \tag{2}$$

where: *T*(*t*) is the actual ambient temperature; and *T*rated is the standard reference temperature of a photovoltaic panel.

#### 2.1.2. Wind Power Generation Model

Wind turbine power output is affected by various aspects such as the speed of wind, blades, ambient temperature, air pressure, etc. [20]. Wind power generation means to convert the kinetic energy to mechanical energy and utilize a turbine to convert the mechanical energy into electrical power. The wind speed changes randomly due to external factors, leading to intermittent and fluctuating wind power generation. The power delivery by wind turbine is most affected by the wind speed, and approximated relationship with the wind speed is shown in Formula (3):

$$P\_{\rm wt}(t) = \begin{cases} 0, \ v(t) < v\_{\rm in} \ v(t) > v\_{\rm o} \\ P\_{\rm r} \frac{v(t) - v\_{\rm in}}{v\_{\rm r} - v\_{\rm in}}, v\_{\rm in} \le v(t) \le v\_{\rm r} \\\ P\_{\rm r}, \ v\_{\rm r} < v(t) \le v\_{\rm o} \end{cases} \tag{3}$$

where: *P*wt(*t*) is the active output power of the wind farm in time *t*, *P*<sup>r</sup> is the rated output power of the wind turbine, *v*(*t*) is the actual wind speed of the wind turbine in time *t*, *v*r is the rated wind speed, *v*in is the cut-in wind speed, and *v*<sup>o</sup> is the cut-out wind speed.

#### *2.2. Modeling of Hydrogen Energy Storage System*

The hydrogen energy storage system is an integral part for the energy storage system in an independent microgrid system. The hydrogen energy storage system mainly comprises electrolytic cells, fuel cells, and hydrogen storage equipment. Its structural schematic diagram is shown in Figure 2.

**Figure 2.** Structure diagram of hydrogen energy storage system.
