Sub topic 8
Superposition as an Analysis Tool
What this chapter assumes
You should already know the ideal op amp model, negative feedback, and the virtual short. You should also be comfortable with voltage dividers and with the inverting and non-inverting amplifier gain formulas. Those two gains are the pieces this chapter combines.
The principle
Superposition says that in a linear circuit with several independent sources, the response is the sum of the responses to each source acting alone. To find the response to one source, you turn off all the others:
| Source type | How to turn it off | Replace with |
|---|---|---|
| Independent voltage source | Set it to 0 V | A short circuit (a wire to ground, if its other terminal is ground) |
| Independent current source | Set it to 0 A | An open circuit |
| Dependent source | Do not turn it off | Leave it in place |
An op amp circuit qualifies in the following cases:
- The resistors and capacitors are linear.
- The op amp operates in its linear region, meaning the output is not saturated.
- Negative feedback holds the inputs at the same voltage, which is the virtual short.
Under those conditions the op amp's output is a linear function of its input voltages. Superposition then applies even though the circuit contains an active device.
The procedure
- Pick one input source and set every other independent source to zero.
- Recognize the resulting circuit. For op amp circuits it is usually an inverting or a non-inverting amplifier.
- Write the output for that case using the virtual short and the known gain formula.
- Repeat for each source.
- Add the partial outputs, keeping their signs.
Example 1: why the summing amplifier works
Take the inverting summing amplifier with inputs V1 and V2 through R1 and R2, and feedback resistor Rf. Set V2 to 0 V. Then R2 connects from ground to the inverting node. That node is a virtual ground, so no current flows through R2. The circuit is an ordinary inverting amplifier from V1:
Vout1 = -(Rf/R1) V1
Setting V1 to 0 V gives, in the same way:
Vout2 = -(Rf/R2) V2
The total is
Vout = -Rf (V1/R1 + V2/R2)
This is the summing amplifier equation. Superposition gives it directly, and it shows why the inputs do not interact: each input resistor ends at the same virtual-ground node, so a change in one input does not change the current from the other.
Example 2: deriving the difference amplifier
Now use superposition on a circuit where the two sources enter different op amp terminals. The circuit has:
- V1 driving the inverting input through R1.
- Rf as the feedback resistor from the output to the inverting input.
- V2 driving the non-inverting input through R2.
- R3 from the non-inverting input to ground.
Case A: V2 = 0
With V2 grounded, R2 and R3 are both connected from the non-inverting input to ground. No current flows into the ideal op amp input, so there is no voltage drop across R2 and the non-inverting input sits at 0 V. The circuit is an inverting amplifier:
Vout_A = -(Rf/R1) V1
Case B: V1 = 0
With V1 grounded, R1 connects from the inverting node to ground, and the circuit is a non-inverting amplifier. Its input voltage is set by the divider R2 and R3. Because the ideal input draws no current, the divider is unloaded:
V+ = V2 · R3 / (R2 + R3)
The non-inverting gain is 1 + Rf/R1, so
Vout_B = V2 · R3/(R2 + R3) · (1 + Rf/R1)
Combine
Vout = V2 · R3/(R2 + R3) · (1 + Rf/R1) − V1 · Rf/R1
This is the general four-resistor result. For a pure difference, set the ratios equal:
Rf/R1 = R3/R2 = k
Then R3/(R2 + R3) = k/(1 + k), and the term (k/(1 + k)) · (1 + k) simplifies to k. The output becomes
Vout = k (V2 − V1)
With this matching condition, a signal that appears equally on both inputs cancels. The next chapter covers what happens when the ratios are not equal.
Checking the result numerically
You can check a superposition result by solving the circuit directly, without splitting the sources. For the difference amplifier, the virtual short sets V− = V+, and Kirchhoff's current law at the inverting node gives the output. The script below computes the output both ways and confirms they agree.
import math
def direct(v1, v2, r1, rf, r2, r3):
"""Solve the ideal difference amp directly with the virtual short and KCL."""
vp = v2 * r3 / (r2 + r3) # unloaded divider at the non-inverting input
vn = vp # virtual short
i_in = (v1 - vn) / r1 # current from V1 toward the inverting node
return vn - rf * i_in # the same current flows through Rf
def by_superposition(v1, v2, r1, rf, r2, r3):
"""Add the inverting-amplifier part and the non-inverting-amplifier part."""
part_v1 = -(rf / r1) * v1
part_v2 = v2 * r3 / (r2 + r3) * (1 + rf / r1)
return part_v1 + part_v2
args = (1.0, 3.0, 10e3, 20e3, 10e3, 20e3) # v1, v2, r1, rf, r2, r3
a = direct(*args)
b = by_superposition(*args)
print(round(a, 6), round(b, 6)) # both about 4.0
print(math.isclose(a, b)) # True
# Common-mode input: both inputs at 1 V with matched ratios
print(round(direct(1.0, 1.0, 10e3, 20e3, 10e3, 20e3), 6)) # about 0The result of 4 V matches the matched-ratio formula: k = 2, and 2 × (3 − 1) = 4.
Where superposition helps and where it does not
Superposition is a good fit when:
- The circuit has several sources and each single-source circuit is a known amplifier.
- You want to see each input's contribution separately, for example to see how a mismatch in one resistor affects only one term.
- You are building up an equation by hand and want to check it against a direct nodal solution.
It is a poor fit, or needs care, when:
- A nonlinear element is present, such as a diode in the feedback path or an op amp driven into saturation.
- You want a quantity that is not linear in the sources, such as power or RMS values of a sum.
- There are many sources and a single node equation would be shorter. For a summing amplifier with five inputs, writing one KCL equation at the virtual ground is faster than five single-source cases.
Common errors
- Removing the op amp. Only independent sources are turned off. The op amp and its feedback network stay in the circuit for every case.
- Opening a voltage source instead of shorting it. A zeroed voltage source is a wire to ground, not a gap. An open input would leave the resistor floating and change the circuit.
- Forgetting that the op amp input draws no current. In Case B above, R2 and R3 form an unloaded divider only because the ideal input current is zero. With a real op amp this holds as long as the resistor values are small compared with the input resistance.
- Dropping a sign. The V1 contribution is negative and the V2 contribution is positive. Keep each partial result's sign through the addition.
- Applying the non-inverting gain to the wrong voltage. The factor 1 + Rf/R1 multiplies the voltage at the non-inverting input after the divider, not V2 itself.
Exercises
Exercise
A difference amplifier has R1 = R2 = 10 kΩ and Rf = R3 = 50 kΩ. V1 = 2.0 V and V2 = 2.2 V. Use superposition to find Vout.
Show answer
Case A (V2 = 0): VoutA = -(50k/10k) × 2.0 = -10 V. Case B (V1 = 0): V+ = 2.2 × 50k/(10k + 50k) = 1.8333 V, and the gain is 1 + 50k/10k = 6, so VoutB = 11 V. Total: Vout = -10 + 11 = 1 V. This agrees with k(V2 - V1) = 5 × 0.2 = 1 V.
Exercise
The same circuit has R1 = R2 = 10 kΩ and Rf = 100 kΩ, but R3 is 90 kΩ instead of 100 kΩ. Both inputs are 1 V, so the signal is purely common-mode. What is Vout, and what does this show?
Show answer
Case A: VoutA = -(100k/10k) × 1 = -10 V. Case B: V+ = 1 × 90k/(10k + 90k) = 0.9 V, and the gain is 1 + 10 = 11, so VoutB = 9.9 V. Total: Vout = -0.1 V instead of 0 V. A 10 percent error in one resistor leaves a small output from a common-mode input, so the amplifier no longer rejects it perfectly.