主权项 |
1. A method of controlling a bi-directional DC converter, the method comprising:
a) detecting whether there is an input power supply at an input port, wherein said bi-directional DC converter comprises a single magnetic element; b) operating said bi-directional DC converter in a first operation mode to charge a battery when said input power supply is detected at said input port; c) operating said bi-directional DC converter in a second operation mode to transfer power from said battery to an output port for a load when said input power supply is not detected at said input port; d) transferring power through said single magnetic element in both said first operation mode and said second operation mode; e) comparing, by a first feedback circuit, a current feedback signal of said battery against a first reference voltage to generate a first error signal, comparing a voltage feedback signal of said battery against a second reference voltage to generate a second error signal, and generating a first feedback signal by selecting a lesser of said first and second error signals; f) comparing, by a second feedback circuit, an output voltage at said output port against a third reference voltage, and generating a second feedback signal; and g) providing, by a first selection circuit, one of said first and second feedback signals to a pulse-width modulation (PWM) control circuit that controls a charging current of said battery according to said first feedback signal, or said output voltage according to said second feedback signal. |