Energy storage device plays an irreplaceable role in microgrids and has a great market application prospect in microgrids. This article considers the reliability of wind turbines and photovoltaic units when configuring energy storage capacity and uses the sequential Monte Carlo method to simulate the normal operation and outage probability of wind turbines and photovoltaic units.In view of the complementary advantages of battery storage and supercapacitor storage, DFT (discrete Fourier transform) is for the spectral analysis of unbalanced power during a period. The optimization model with the goal of minimum cost is established, and the solution is solved by the toolbox of matlab. Finally, an example is used to verify the rationality of the proposed method and it provides reference for further research on energy storage planning of microgrids.