A controller for a power converter is disclosed. An example circuit
controller according to aspects of the present invention includes an
input voltage sensor to be coupled to receive an input signal
representative of an input voltage of the power converter. A current
sensor is also included and is to be coupled to sense a current flowing
in a power switch. A drive signal generator is to be coupled to drive the
power switch into an on state for an on time period and an off state for
an off time period. The controller is coupled to adjust a switching cycle
period of the power switch to be proportional to a value of the input
signal multiplied by a time period. The time period is the time it takes
for the current flowing in the power switch to change between two current
values when the power switch is in the on state.