With the development of new energy, the charge and discharge technology of battery is very important. Bi-directional buck-boost circuit is used as the circuit topology to realize bi-directional flow of energy. Two-stage LC filter circuit is adopted and current double-closed loop is used to reduce the current ripple of battery charging and discharging and improve the accuracy of charging and discharging current. This paper first simulates its circuit and algorithm with PSIM, and then makes a 300W prototype with TMS320F28335 DSP as the main control chip. The current accuracy obtained by simulation and prototype experiment is 0.00mA and 0.75mA, respectively. The test results show that the precision error of double current ring is small.