Sub topic 10
Common-mode rejection and resistor matching
This chapter assumes you can derive the four-resistor difference amplifier output. The chapter on that circuit covers it. Here you will measure how well the circuit ignores a signal that appears on both inputs, and you will see how resistor tolerance sets that limit.
Why the common-mode signal matters
A difference amplifier exists to amplify the difference between two voltages and ignore what they share. In practice, the two inputs often carry a large shared voltage. Examples are a sensor sitting on a 2 V bias, a bridge output riding on its excitation voltage, or ground noise picked up along a long cable. The wanted signal may be a few millivolts on top of that.
Two quantities describe the input pair:
- The differential voltage is Vd = V2 − V1. This is the signal you want.
- The common-mode voltage is Vcm = (V1 + V2) / 2. This is the part both inputs share.
Any pair of inputs can be rewritten in these terms:
- V1 = Vcm − Vd/2
- V2 = Vcm + Vd/2
Deriving the two gains
Use the same labels as the difference amplifier chapter. V1 drives the inverting input through R1. Rf is the feedback resistor. V2 drives the non-inverting input through R2, and R3 runs from that input to ground.
Superposition gives the output as:
Vout = A2·V2 − A1·V1
with
- A1 = Rf / R1, the inverting gain applied to V1
- A2 = (R3 / (R2 + R3)) · (1 + Rf / R1), the divider times the non-inverting gain applied to V2
Substitute the Vcm/Vd forms of V1 and V2:
Vout = (A2 − A1)·Vcm + ((A1 + A2) / 2)·Vd
So the circuit has a differential gain and a common-mode gain:
- Ad = (A1 + A2) / 2
- Acm = A2 − A1
Simplifying Acm gives a compact result:
Acm = (R1·R3 − Rf·R2) / (R1·(R2 + R3))
Acm is exactly zero when R1·R3 = Rf·R2. That is the same as Rf/R1 = R3/R2, the matched-ratio condition for a pure difference. When the condition holds, Ad = Rf/R1.
Defining CMRR
The common-mode rejection ratio (CMRR) compares how strongly the circuit amplifies the wanted signal and the unwanted one:
CMRR = |Ad / Acm|
It is usually quoted in decibels: CMRR(dB) = 20·log10(|Ad / Acm|). A higher number means better rejection. An ideal, perfectly matched circuit has Acm = 0 and infinite CMRR.
A useful way to read CMRR is to refer the error to the input. A common-mode voltage Vcm produces the same output error as a differential voltage of Vcm / CMRR. If CMRR is 1000 and Vcm is 1 V, the output looks as if a 1 mV difference had been applied.
A worked example with 1% resistors
Design a difference amplifier with gain 10: R1 = R2 = 10 kΩ and Rf = R3 = 100 kΩ. With exact values, Acm = 0.
Now let every resistor be 1% off, in the direction that hurts most:
- R1 = 10.1 kΩ
- Rf = 99 kΩ
- R2 = 9.9 kΩ
- R3 = 101 kΩ
Then:
- Numerator: R1·R3 − Rf·R2 = 10.1k × 101k − 99k × 9.9k = 1.0201×10⁹ − 0.9801×10⁹ = 4.0×10⁷ Ω²
- Denominator: R1·(R2 + R3) = 10.1k × 110.9k ≈ 1.120×10⁹ Ω²
- Acm ≈ 0.0357
- Ad ≈ 9.82
So CMRR ≈ 9.82 / 0.0357 ≈ 275, which is about 49 dB. A 1 V common-mode voltage then produces about 36 mV at the output. That equals a 3.6 mV differential input, which swamps a small sensor signal.
A rule of thumb for tolerance
When all four resistors have tolerance t (for example 0.01 for 1%), the worst-case CMRR is approximately:
CMRR ≈ (1 + G) / (4t)
where G = Rf/R1 is the differential gain. The factor of 4 comes from four resistors each able to shift the ratio by t in the worst direction. For G = 10:
| Resistor tolerance | Worst-case CMRR | In dB |
|---|---|---|
| 5% | 55 | 34.8 dB |
| 1% | 275 | 48.8 dB |
| 0.1% | 2750 | 68.8 dB |
| 0.01% | 27500 | 88.8 dB |
Two points follow from the formula:
- Tighter resistors improve CMRR in direct proportion. Each tenfold improvement in tolerance adds 20 dB.
- Higher gain gives a larger numerator, so it gives better CMRR for the same tolerance. This is a trade-off against bandwidth and output swing. It does not fix the ratio mismatch itself.
The rule is a worst-case bound. Real resistors from one batch tend to drift together, so typical results are better. You should still design to the bound unless you can measure each unit.
Checking it numerically
The script below computes Ad, Acm and CMRR from four resistor values. It then tries every combination of each resistor at +tolerance or −tolerance, which finds the worst case for you. It uses only the standard library.
import math
from itertools import product
def gains(r1, rf, r2, r3):
"""Return (Ad, Acm) for the four-resistor difference amplifier."""
a1 = rf / r1
a2 = (r3 / (r2 + r3)) * (1 + rf / r1)
return (a1 + a2) / 2, a2 - a1
def cmrr_db(r1, rf, r2, r3):
ad, acm = gains(r1, rf, r2, r3)
if acm == 0:
return math.inf
return 20 * math.log10(abs(ad / acm))
def worst_case_db(r1, rf, r2, r3, tol):
"""Try every +/- tolerance corner and return the lowest CMRR in dB."""
worst = math.inf
for signs in product((-1, 1), repeat=4):
r = [x * (1 + s * tol) for x, s in zip((r1, rf, r2, r3), signs)]
worst = min(worst, cmrr_db(*r))
return worst
print(cmrr_db(10e3, 100e3, 10e3, 100e3)) # inf (perfect match)
print(round(worst_case_db(10e3, 100e3, 10e3, 100e3, 0.01), 1)) # about 49 dB
print(round(worst_case_db(10e3, 100e3, 10e3, 100e3, 0.001), 1)) # about 69 dBThe perfectly matched case prints inf, because the common-mode gain is exactly zero. The 1% and 0.1% cases land close to the rule-of-thumb values in the table.
Other things that spoil rejection
Resistor tolerance is the main limit, but it is not the only one.
Source impedance
The two inputs see different resistances. V1 faces R1. V2 faces R2 + R3. If the sources have their own output resistances, those add in series with R1 and R2 and unbalance the ratios. A source with 500 Ω of output resistance on one input only is equivalent to changing R1 or R2 by 500 Ω. With R1 = 10 kΩ that is a 5% error, which is far worse than the resistor tolerances. This is why difference amplifiers work best when driven from low-impedance sources, or when each input is buffered first.
The op amp's own CMRR
A real op amp has a finite CMRR of its own, usually 70 to 120 dB at low frequency, and it falls with frequency. The circuit's total CMRR is limited by the worse of the resistor-matching figure and the op amp figure. Buying 0.01% resistors does not help if the op amp contributes 70 dB.
Frequency
Mismatched stray capacitance and the op amp's falling gain make rejection worse at high frequency. Mains hum at 50 or 60 Hz is usually fine, but fast switching noise may not be rejected as well as the DC figure suggests.
Trimming
If you need better rejection than your resistors give, make one resistor adjustable. A common choice is to build R3 from a fixed resistor in series with a small trimmer. Apply the same voltage to both inputs, then adjust the trimmer until the output is at its minimum. This sets R1·R3 = Rf·R2 directly, whatever the individual tolerances were. Remember that the trim is only good at the temperature and source impedance you tuned it at.
Where this leads
Because matching limits rejection so strongly, precision designs rarely use the bare four-resistor circuit alone. The usual remedies are integrated difference amplifiers with laser-trimmed thin-film resistor networks, or an instrumentation amplifier that places input buffers in front of a difference stage. The buffers remove the source-impedance problem, and the resistor network handles the matching.
Exercises
Exercise
A difference amplifier uses R1 = R2 = 20 kΩ and Rf = R3 = 200 kΩ. Which single change to R3 makes the common-mode gain exactly zero if Rf is measured as 210 kΩ and R1 and R2 stay at 20 kΩ?
Show answer
Acm = 0 requires R3/R2 = Rf/R1. With Rf/R1 = 210k/20k = 10.5, R3 must equal 10.5 × 20 kΩ = 210 kΩ.
Exercise
A difference amplifier has differential gain 100 and is built from 0.1% resistors. Estimate the worst-case CMRR with the rule of thumb, in dB. Then find the output error for a 2 V common-mode input.
Show answer
CMRR ≈ (1 + 100) / (4 × 0.001) = 101 / 0.004 = 25250, which is 20·log10(25250) ≈ 88 dB. Acm = Ad / CMRR = 100 / 25250 ≈ 0.00396, so a 2 V common-mode input gives an output error of about 7.9 mV.
Exercise
In the gain-10 example, one input source has an output resistance of 1 kΩ in series with R1 (10 kΩ), and the other source is ideal. All resistors are otherwise exact. Is Acm zero? Compute it.
Show answer
No. R1 is effectively 11 kΩ. Acm = (R1·R3 − Rf·R2) / (R1·(R2 + R3)) = (11k × 100k − 100k × 10k) / (11k × 110k) = 1.0×10⁸ / 1.21×10⁹ ≈ 0.083. This is about 2.3 times worse than the 1% worst case, because source impedance acts like a 10% error on R1.