**7. Conclusions**

In this paper, the influence of wind turbines, photovoltaic systems, hydrogen storage systems, and battery output ratios on the operation of independent microgrid systems is considered, which is experimentally verified to improve the degree of renewable energy consumption.

In this paper, a particle swarm algorithm is proposed to improve the particle swarm algorithm for dynamically adjusting the inertia weights, establish a capacity optimization model, and obtain a capacity optimization scheme with the optimal system operating cost, system loss of power supply probability and system power. The integrated operation cost of the wind–solar hydrogen storage microgrid system is reduced by 0.431%, and the variance of the whole system after hydrogen storage configuration is 28.23% of that

before configuration. The power fluctuation and the rate of abandoning wind and light are reduced.

The improved IDW-PSO algorithm will improve the optimization accuracy, reduce the risk of falling into the optimal local solution, and accelerate the iteration speed so that the system can get the optimal solution faster and better. The improved algorithm is improved from 142 to 124 iterations, and the accuracy of the results is improved by 0.024%.

This scheme can reduce carbon dioxide and carbon emissions by about 1019.13 km annually in this area. When building the optimal configuration of wind and solar hydrogen storage systems, considering the economic indicators and power shortage load, the complementary relationship between hydrogen energy storage and storage battery is used to combine them and realize the suppression of power fluctuations, to achieve the purpose of peak shaving peaks and filling in valleys, to eliminate the wind and light rejection rate better, increase system economic efficiency, to reduce the amount of power shortage in the system, and strive to make the system more environmentally friendly by realizing carbon neutrality.

This paper in the microgrid capacity optimization configuration model allows for a wind-optical-hydrogen-storage microgrid system to provide some support. Starting from the energy demand side, this model can not only configure the capacity of wind, light, storage battery, and hydrogen storage, but also add more forms of energy—for example, flywheel energy storage, biological energy storage, pumped storage, and so on. The system is more environmentally friendly for the application of hydrogen energy storage, and the interconnection of electricity and hydrogen is used to realize carbon emission reduction. With the development of time and the application of hydrogen energy, the cost of hydrogen production is reduced, the difficulty of hydrogen production is reduced, and the efficiency of hydrogen production is improved. Hydrogen energy storage can optimize power and energy simultaneously in electricity storage and power generation and will be further studied. High-density, pollution-free, and sustainable utilization of hydrogen is a significant trend and the significance of efficient production. In future research, the load-side model or the model of demand-side response and load-side interaction will be further considered when optimizing the system to be closer to the actual demand.

**Author Contributions:** Conceptualization, G.H. and Z.W.; methodology, G.H.; software, G.H.; H.M.; validation, G.H.; formal analysis, G.H.; investigation, G.H.; H.M.; X.Z.; resources, G.H.; H.M.; data curation, G.H.; Z.W.; writing—original draft preparation, G.H.; writing—review and editing, G.H.; Z.W.; visualization, G.H.; Z.W.; supervision, Z.W.; project administration, G.H.; Z.W.; funding acquisition, none. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data sharing not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
