Sub topic 12
DC errors: input bias current and offset voltage
This chapter assumes you can derive the inverting and non-inverting gains from the virtual short, and that you know the input resistance of each configuration. It also assumes you can use Ohm's law and the voltage divider. The earlier chapters used an ideal op amp whose inputs draw no current and whose two inputs sit at exactly the same voltage. Real inputs break both assumptions slightly. The result is a small DC voltage at the output when the input signal is zero. This chapter shows where that error comes from, how to estimate it, and how to reduce it.
The two non-ideal input effects
A real op amp has two DC input imperfections.
- Input bias current (Ib) is the small current each input pin draws. In a bipolar-input op amp it is the base current of the input transistors. In a JFET or CMOS op amp it is leakage current. It flows through whatever resistance is connected to the pin, so it produces a voltage drop.
- Input offset voltage (Vos) is the small voltage that must be applied between the inputs to make the output zero. Mismatch inside the input stage causes it. The virtual short holds the inputs equal only after this offset is accounted for.
Datasheets also give input offset current (Ios), the difference between the two input bias currents. The two pins never draw exactly the same current, so it is useful to write them as
- Ib+ = Ib + Ios/2
- Ib- = Ib - Ios/2
Here Ib is the average of the two currents, which datasheets call the input bias current. Ios is typically 5 to 30 percent of Ib for bipolar parts. All of these values vary with temperature, and for JFET and CMOS inputs the leakage roughly doubles for every 10 °C rise.
| Input type | Typical Vos | Typical Ib | Notes |
|---|---|---|---|
| General-purpose bipolar | 1 to 5 mV | 50 to 500 nA | Cheap, Ib needs attention with large resistors |
| Precision bipolar | 10 to 100 µV | 1 to 50 nA | Often has internal bias-current cancellation |
| JFET input | 1 to 5 mV | 1 to 100 pA at 25 °C | Ib rises quickly with temperature |
| CMOS or chopper-stabilized | 1 to 50 µV | 1 to 100 pA | Very low Vos, may add switching noise |
These are orders of magnitude, not guarantees. Always read the datasheet and use the worst-case column for your temperature range.
Modeling the errors
To analyze an error, set the input signal to zero and add the imperfections as ideal sources around an otherwise ideal op amp.
- Vos becomes a small voltage source in series with the non-inverting input.
- Ib+ becomes a current source drawing current into the non-inverting pin.
- Ib- becomes a current source drawing current into the inverting pin.
Offset voltage: multiplied by the noise gain
The offset source sits at the non-inverting input, so the op amp sees it as a signal applied there. The closed-loop response to a signal at that pin is the non-inverting gain, 1 + Rf/Rin, where Rin is the resistor from the inverting node to ground (or to the signal source, with the source shorted). This quantity is called the noise gain. It is the gain from the non-inverting input to the output, and it applies to Vos in both configurations.
Vout error from Vos = Vos × (1 + Rf/Rin)
This is an important point for the inverting amplifier. Its signal gain is -Rf/Rin, with magnitude 10 for Rf = 10 kΩ and Rin = 1 kΩ. Its noise gain is 11, because the offset sees the circuit as a non-inverting stage. A 2 mV offset therefore produces 22 mV at the output, not 20 mV.
Bias current: drops across the feedback resistors
Consider the inverting amplifier with the input grounded. Ib- is drawn into the inverting pin. The virtual short holds that node at 0 V, so no current flows in Rin. The current must come through Rf from the output:
Vout = Ib- × Rf
If Rf is 10 kΩ and Ib- is 90 nA, the output error is 0.9 mV. If Rf is 1 MΩ, the same current produces 90 mV. This is why large feedback resistors are risky with bipolar-input parts.
The non-inverting pin matters too. If a resistor Rc connects that pin to ground, Ib+ drops a voltage of -Ib+ × Rc there. The op amp treats that as an input signal and multiplies it by the noise gain.
Putting the three terms together:
Vout error = Vos × (1 + Rf/Rin) + Ib- × Rf - Ib+ × Rc × (1 + Rf/Rin)
Bias-current compensation
Choose Rc equal to the parallel combination of the resistors seen from the inverting node:
Rc = Rin × Rf / (Rin + Rf)
Then Rc × (1 + Rf/Rin) = Rf exactly, so the last two terms become (Ib- - Ib+) × Rf = -Ios × Rf. The bias current cancels, and only the much smaller offset current remains. The error is now
Vout error = Vos × (1 + Rf/Rin) - Ios × Rf
The rule is to make the resistance seen by each input pin equal. For the non-inverting amplifier the inverting node sees Rf in parallel with Rg, so the non-inverting pin should see the same resistance, including the source resistance of whatever drives it. A bypass capacitor across Rc is sometimes added to reduce the noise this resistor introduces.
Computing the error in code
The function below implements the formula above. It uses the signed values for a single nominal case. Worst-case analysis adds the absolute values of each term instead.
def output_error(rin, rf, vos, ib, ios, rc=0.0):
"""DC output error (volts) of an inverting amplifier with zero input.
rin, rf : resistors in ohms
vos : input offset voltage in volts
ib : average input bias current in amps
ios : input offset current in amps (Ib+ minus Ib-)
rc : resistor from the non-inverting pin to ground in ohms
"""
noise_gain = 1 + rf / rin
ib_pos = ib + ios / 2
ib_neg = ib - ios / 2
return vos * noise_gain + ib_neg * rf - ib_pos * rc * noise_gain
def parallel(a, b):
return a * b / (a + b)
for rin, rf in [(1e3, 10e3), (100e3, 1e6)]:
plain = output_error(rin, rf, 2e-3, 100e-9, 20e-9)
comp = output_error(rin, rf, 2e-3, 100e-9, 20e-9, rc=parallel(rin, rf))
print(f"Rin={rin:.0f} Rf={rf:.0f}: "
f"no Rc {plain * 1e3:.1f} mV, with Rc {comp * 1e3:.1f} mV")The output is:
Rin=1000 Rf=10000: no Rc 22.9 mV, with Rc 21.8 mV
Rin=100000 Rf=1000000: no Rc 112.0 mV, with Rc 2.0 mVWith the low-resistance network (1 kΩ and 10 kΩ), offset voltage dominates and compensation barely helps. With the high-resistance network (100 kΩ and 1 MΩ), bias current dominates, and the compensating resistor cuts the error from 112 mV to 2 mV. The comparison shows which source to attack first. Compare Vos × noise gain with Ib × Rf for your resistor values.
Special cases
Voltage follower
For the follower, the noise gain is 1 and Rf is zero (or small), so Vos appears at the output nearly unchanged. Bias current matters through the source resistance Rs. Ib+ flows through Rs and produces an error of about Ib × Rs. A 100 kΩ source with 10 nA of bias current gives 1 mV. The source resistance is a bigger risk than the feedback wire, so a follower with a high-impedance source usually needs a JFET or CMOS part. Adding a matching resistor in the feedback path can cancel the bias current, but only if the source resistance is known and stable.
Capacitor-coupled inputs
A capacitor in series with the input blocks DC, so Ib+ then has no path to ground and charges the capacitor until the output saturates. Every input pin needs a DC path. In a coupled non-inverting stage a resistor from the non-inverting pin to ground provides that path, and it sets the input resistance of the stage.
Reducing the offset error
You can reduce Vos × noise gain in several ways.
- Pick a part with lower Vos. Precision bipolar and chopper-stabilized parts reach microvolts.
- Reduce the noise gain. Split a high gain across two stages if the bandwidth allows.
- Use the trim pins provided on many op amps. A potentiometer between the offset-null pins cancels Vos at one temperature, but it does not follow drift.
- Block DC with a capacitor in series with the gain-setting resistor Rg (non-inverting) or Rin (inverting). The DC noise gain then drops to 1 and the offset is not amplified. The trade-off is that the amplifier no longer passes DC signals, and the capacitor forms a high-pass corner at 1/(2πRC).
Temperature and drift
The values on the datasheet are for 25 °C. Offset voltage drifts, typically a few µV/°C for general-purpose bipolar parts and below 1 µV/°C for precision parts. Bias current in JFET and CMOS parts changes much faster, doubling roughly every 10 °C. Trimming and compensation cancel the error at one temperature, not across a range. Specify a worst-case budget by adding the absolute value of each error term at the hottest temperature your design will see.
Practical checklist
- Compute Vos × (1 + Rf/Rin) using the maximum datasheet value.
- Compute Ib × Rf and Ib × Rsource for each pin using the maximum datasheet value at temperature.
- Compare. If bias terms dominate, lower the resistor values or choose a lower-Ib part. If the offset term dominates, lower the noise gain or choose a lower-Vos part.
- Add an Rc equal to the resistance seen by the inverting node when the bias terms matter.
- Confirm that the total error leaves enough output swing, as covered in the earlier chapter on supply rails.
Exercise
An inverting amplifier has Rin = 2 kΩ and Rf = 20 kΩ, and the op amp has Vos = 1 mV, Ib = 50 nA, and Ios = 5 nA. The non-inverting pin is grounded directly (Rc = 0). Using Ib- = Ib - Ios/2, what is the nominal DC output error with a zero input, and what value of Rc would cancel the bias-current term?
Show answer
The noise gain is 1 + 20k/2k = 11, so the offset term is 1 mV × 11 = 11 mV. Ib- = 50 nA - 2.5 nA = 47.5 nA, so the bias term is 47.5 nA × 20 kΩ = 0.95 mV. With Rc = 0 there is no Ib+ term, so the total error is 11.95 mV. To cancel the bias term, use Rc = 2k × 20k / (2k + 20k) ≈ 1.82 kΩ. The error then drops to 11 mV - Ios × Rf = 11 mV - 0.1 mV = 10.9 mV.
Exercise
A voltage follower buffers a sensor with a source resistance of 200 kΩ. The op amp has Ib = 30 nA and Vos = 0.5 mV. Estimate the worst-case output error from these two sources, and say whether a JFET-input part with Ib = 50 pA would help.
Show answer
The bias-current error is about Ib × Rs = 30 nA × 200 kΩ = 6 mV. The offset passes through at a noise gain of 1, so it adds 0.5 mV. The worst-case total is about 6.5 mV, dominated by bias current. With Ib = 50 pA the bias error becomes 50 pA × 200 kΩ = 10 µV, so the offset of 0.5 mV (if unchanged) becomes the main term. The JFET part helps by a factor of about 600 on the bias term, but you must check its Vos and its bias current at your maximum temperature.