The invention provides a control circuit for controlling the operation of a power converter having a switch connected to an output of the power converter, said control circuit comprising a first amplifier for sensing an output voltage of the power converter and a second amplifier configured to derive a frequency compensated error signal output, to provide a frequency control compensation loop to an input of the power converter and the output of the second amplifier is connected to the switch of the power converter.