Sub topic 14
How finite open-loop gain changes the result
This chapter assumes you know the ideal op amp model, the virtual short, and KCL at the inverting input. Here you replace the infinite open-loop gain with a finite value A and see how much the closed-loop gain moves.
Redoing the analysis with finite A
A real op amp has output Vout = A(v+ − v−). The input difference is no longer exactly zero. It equals Vout/A, which is small but not zero. The input current is still taken as zero.
Inverting amplifier
The non-inverting input is grounded, so v+ = 0 and v− = −Vout/A. KCL at the inverting node, with no current into the op amp, gives:
(Vin − v−)/Rin = (v− − Vout)/Rf
Substitute v− = −Vout/A and multiply through by Rf:
Vin·Rf/Rin = −Vout·[1 + (1 + Rf/Rin)/A]
The result is:
Vout/Vin = −(Rf/Rin) / [1 + (1 + Rf/Rin)/A]
Non-inverting amplifier
The feedback divider gives v− = Vout·Rg/(Rg + Rf) = Vout/G, where G = 1 + Rf/Rg is the ideal gain. Then Vout = A(Vin − Vout/G), which gives:
Vout/Vin = G / (1 + G/A)
The gain error
Both results have the form (ideal gain) / (1 + N/A). N is the noise gain. It is the gain from the op amp's input to the feedback-loop output, and the loop gain A/N sets the accuracy.
| Circuit | Ideal gain | N |
|---|---|---|
| Inverting | −Rf/Rin | 1 + Rf/Rin |
| Non-inverting | 1 + Rf/Rg | 1 + Rf/Rg |
When N/A is small, the fractional error is about −N/A. The inverting circuit has a larger error than its gain magnitude suggests, because N is one more than |gain|.
def inverting_gain(rf, rin, a=None):
"""Closed-loop gain Vout/Vin of the inverting amplifier.
a=None uses the ideal model; otherwise a is the finite open-loop gain."""
ideal = -rf / rin
if a is None:
return ideal
return ideal / (1 + (1 + rf / rin) / a)
def noninverting_gain(rf, rg, a=None):
"""Closed-loop gain Vout/Vin of the non-inverting amplifier."""
ideal = 1 + rf / rg
if a is None:
return ideal
return ideal / (1 + ideal / a)
print(inverting_gain(10e3, 1e3)) # -10.0
print(inverting_gain(10e3, 1e3, a=1e5)) # about -9.9989
print(noninverting_gain(9e3, 1e3)) # 10.0
print(noninverting_gain(9e3, 1e3, a=1e5)) # about 9.999With A = 10^5, the inverting gain of −10 becomes −9.9989. That is an error of about 0.011%, matching N/A = 11/10^5.
What the error tells you
- The closed-loop gain depends mostly on the resistors. Changing A from 10^5 to 10^4 changes the gain only slightly, which is why op amp circuits stay predictable even though A varies widely between parts.
- The virtual short is approximate. The input difference is Vout/A, so a 5 V output with A = 10^5 leaves 50 µV between the inputs.
- The error grows with N. For a fixed A, high-gain stages are less accurate.
Checking with a simulation
You can compare the formulas with a SPICE model. Setting the VCVS gain to 1e6 makes the error about 1.1 ppm, so the output is very close to −10 V.
Inverting amplifier with an ideal op amp modeled as a VCVS
Vin in 0 DC 1
R1 in inn 1k
R2 inn out 10k
E1 out 0 0 inn 1e6
.op
.endLower the VCVS gain to 1e3 and the output moves to about −9.89 V, matching −10/(1 + 11/1000).
Exercise
A non-inverting amplifier is designed for a gain of 100 using an op amp with A = 10,000. What is the actual closed-loop gain, and what is the percent error?
Show answer
Here G = 100 and A = 10,000. The gain is G/(1 + G/A) = 100/(1 + 0.01) = 99.01. The error is about −0.99%, close to the estimate −N/A = −1%.