According to the shortages of traditional DC switching power with resistance box or thyristor rectifier, designs a kind of charging and discharging system which could bi-directional work, it has higher efficiency, higher power factor. The system mainly composes of two parts which were three-phase VSR and DC/DC inverter. When it needed to charging, the DC/DC converter was worked in the buck mode, the VSR output voltage was reduced to fit the voltage of the battery, When it needed to discharging, the DC/DC inverter worked in a boost way, and feed battery energy back to the DC side of VSR, and then the energy was boosted and filtered back to the power grid by transformer. Finally, designs and manufactures a prototype, the test results shows that the system can switch charging and discharging state according according to the condition ,and it can obtain power factor close to 1, reach bi-flow of energy, achieve sinusoidal current waveform control at the network side.