A power converter delivers electrical power from an electrical power
source to a load according to a plurality of operation modes, where at
least one of the operation modes is a peak current switching mode. Under
the peak current switching mode, a switch controller controls the switch
in the power converter to be kept on until the current through the switch
reaches a peak current value corresponding to a given phase of the input
voltage signal to the power converter. The peak current values have a
reference shape, which may be a trapezoidal. The power converter may have
any topology, such as a flyback-type power converter or a boost-type
power converter.