A programmable gain amplifier comprises a current source that generates a
first current based on a first transfer function. A voltage amplifier
receives an input voltage signal and generates an output voltage signal
based on a gain A, wherein the gain A is based on a control current and a
second transfer function. A compensation module generates the control
current based on the first current and a mapping function, wherein the
mapping function is based on the first transfer function and the second
transfer function to reduce the effect of an independent variable on an
overall transfer function that relates the first current to the gain A.