To enhance peak-shaving and valley-filling performance in residential microgrids while reducing the costs associated with energy storage systems, this paper selects retired power batteries as the storage solution, breaking through existing optimization models. Regarding the capacity configuration. rage solutions to tackle air pollution, stabilize its grid, and integrate renewable energy. This article explores the cit groundbreaking projects, their impact, and what they mean for the region energy landscape. As a flexible resource,energy storages can play an important ro considering the improvement goal of peak-valley difference is proposed could effectively reducethe load difference between the valley and peak.