In order to solve the problem of intermittent and fluctuating output power in photovoltaic systems and wind power systems, it is necessary to introduce hybrid energy storage system controllers into the infrastructure equipment to fully utilize the characteristics of energy storage equipment. In order to better alleviate the hybrid energy storage system controller part of the problem, this paper uses the traditional particle swarm algorithm on the basis of improvement, using the improved particle swarm algorithm of the hybrid energy storage system controller for the actual case analysis. The study looks at the differences between wind power and photovoltaic power generation, creates a model of a hybrid energy storage system, builds a simulation model for controlling the hybrid energy storage system after understanding how it works, and then improves the model. The particle swarm algorithm is improved by optimizing the acceleration factor, and finally, the example simulation experiment is carried out. The experimental results demonstrate that the proposed hybrid energy storage system controller method in this paper effectively reduces costs, saves energy, and reduces emissions in practical applications. Secondly, in the microgrid experiments, the hybrid energy storage system controller with an improved particle swarm algorithm can effectively suppress bus power fluctuations, and the SOC of energy storage is maintained at 67–70%.