To realize the suppression of low-frequency fluctuation of DC microgrid bus voltage needs to realize the con-trol of energy storage bidirectional DC-DC converter.The control system of the energy storage DC-DC converter is de-signed,and the PI control is used to realize the double closed-loop control of the voltage outer loop and current inner loop,and the charging and discharging control strategy of the supercapacitor is designed according to the state of the charge.Finally,a supercapacitor energy storage DC-DC experimental system is built,and the system control is realized by automatically generating C code from MATLAB using automatic code generation technology.On this basis,experiments are carried out on charging,discharging,and charging and discharging respectively,and the experimental results in different cases are analyzed,and the results verify the correctness of the design of this paper.