Patent ID: 7554821

Claim:
A method of shaping input current to a flyback-type AC to DC power converter based upon a reference shape of peak current values, the method comprising: receiving an input voltage signal to the power converter; determining a count corresponding to a phase of the input voltage signal, the count corresponding to one of at least a first range, a second range, and a third range of the phase of the input voltage signal; responsive to determining that the count corresponds to the second range of the phase of the input voltage signal, determining turn-on timings and turn-off timings of a switch in the flyback-type power converter based upon one or more operation modes, at least one of the operation modes being a peak current switching mode that determines the turn-off timings of the switch so as to keep the switch on until a current through the switch reaches the peak current value corresponding to the determined count at which time the switch is turned off; and controlling the switch to be turned on and off based upon the determined turn-on timings and the determined turn-off timings, respectively.