Abstract:Due to the randomness and fluctuation of wind turbine and photovoltaic output and the complexity of microgrid system topology, it brings great challenges to system capacity optimization. In order to improve the economy of microgrid and the capacity of renewable energy consumption, a research method of capacity optimization al-location of electric-hydrogen microgrid system considering electric spring was proposed in this paper based on new energy residual power to produce hydrogen. Firstly, the mathematical models of wind, light, hydrogen and electric spring were established, and then the corresponding energy control strategy was proposed. Finally, the objective function was set as the lowest life-cycle cost and energy waste rate, and the improved NSGA-Ⅱ al-gorithm was used to configure the scheme. In order to verify the feasibility of the scheme, the optimal con-figuration scheme was sought based on the specific data of a certain region. The analysis of the configuration results shows that the addition of electric spring device in the electric hydrogen microgrid can effectively im-prove the utilization rate of wind and solar resources and reduce the cost of energy storage, further improve the economy of the configured microgrid system, and provide new ideas for the capacity optimization of the mi-crogrid. .