Calibration Theory

An ideal programmable gain amplifier (PGA) amplifies an input voltage by a precise programmed gain value, G. If the PGA is ideal, the voltage measured at the output can be divided by G to determine the input voltage. However, many PGA implementations have two imperfections that must be considered in an application. First, there is an input offset voltage that is effectively added to the input signal before amplification. Second, the actual gain may be slightly different from the programmed value due to analog component tolerances, etc.
Figure 1. PGA with Gain and Offset Equations

The figure above depicts a high-level representation of a PGA with gain and offset equations included. For an input signal x, an offset value of C is added, and then the sum (x+C) is multiplied by the gain value G to obtain the output signal y. The fundamental idea behind gain and offset calibration is to input two different values, xa and xb, so as to obtain two different output values, ya and yb. If xa, xb, ya, and yb are all determined accurately via measurement, the first two equations can be solved for G and C, allowing the gain and input offset to be calculated.

As a realistic example, consider a PGA that has been programmed to have a nominal gain of 16. First, a voltage of 60 mV is input, and the output voltage is measured as 986 mV, so xa is 60 mV, and ya is 986 mV. Next, a voltage of 120 mV is input, and the output voltage is measured as 1940 mV, so xb is 120 mV, and yb is 1940 mV. Inserting these four values into the equations for G and C leads to a result of 15.9 for the gain G and 2.0 mV for the input offset C.