a frequency compensation circuit internal to an integrated circuit which comprises a transconductance amplifier having a first input configured to receive a reference voltage , a second input configured to receive an input voltage and an input current , a first output configured to output a first output current and a second output configured to output a second output current ; and a compensation circuit connected to said second output of said transconductance amplifier , wherein said first output is connected to said second input .