Feedback and loop gain

Wrap an amplifier in negative feedback, measure its loop gain, and predict the closed-loop gain error, bandwidth and output impedance from it.

Lesson
E6.2
Time
30 min
Runs on
ngspice
Check
5 questions

A buffer feeds a signal between 0.8 and 1.0 V to a 12-bit converter, whose step is 1.8 V/4096 = 0.44 mV. Built on the five-transistor OTA of E5.3, its error drifted from −1.28 mV to −3.11 mV across that range. The same buffer built on the two-stage op-amp stayed within 0.18 mV.

DC sweepBuffer error across the input rangev(out) − v(in) of two unity-gain buffers on the same input: the one-stage OTA-A and the two-stage OPA-B.
  • OTA-A buffer
  • OPA-B buffer
-3.5 mV-3.0 mV-2.5 mV-2.0 mV-1.5 mV-1.0 mV-0.5 mV0Error v(out) − v(in)0.80 V0.85 V0.90 V0.95 V1.00 VInput-4 mV-3 mV-2 mV-1 mV0Error v(out) − v(in)0.80 V0.85 V0.90 V0.95 V1.00 VInput
  1. Input 800 mVOTA-A buffer = -1.279 mV · OPA-B buffer = -176.9 µV

    At 0.8 V the OTA-A buffer is 1.28 mV low, the OPA-B buffer 0.18 mV low.

  2. Input 1 VOTA-A buffer = -3.114 mV · OPA-B buffer = -142.5 µV

    At 1.0 V the OTA-A buffer is 3.11 mV low. The error grew by 1.83 mV over 200 mV: the output moves only 0.991 of each input change. OPA-B is 0.14 mV low.

Read the plot as a table
InputOTA-A bufferOPA-B buffer
800 mV-1.279 mV-176.9 µV
850 mV-1.724 mV-141.6 µV
900 mV-2.166 mV-131.8 µV
950 mV-2.624 mV-133.3 µV
1 V-3.114 mV-142.5 µV

Measured on ngspice 42, a DC sweep in 1 mV steps.

Both are the same loop, with the output wired back to the − input; what differs is how much gain goes around it.

The loop and its gain

A negative-feedback loopArrows show the signal. The amplifier multiplies the difference between the input and the returned fraction of the output.
A negative-feedback loopArrows show the signal. The amplifier multiplies the difference between the input and the returned fraction of the output. component Input the signal to copy component Difference input minus β ×output component Amplifier A output = A ×difference component Output what the load sees component Feedback β returns β × output inputdifferenceoutputsampleβ × output
  1. The input arrives

    vin reaches the input of the amplifier. In an op-amp the difference is taken by the input pair itself: + minus −.

  2. The amplifier multiplies

    The amplifier makes vout = A times the difference. For OTA-A, A = 136.7.

  3. A fraction comes back

    The feedback network returns β·vout to the − input. A signal that goes once around the loop is multiplied by A and by β: the loop gain T = Aβ.

  4. The loop settles

    vout = A(vin − βvout), so vout/vin = A/(1 + T). A buffer has β = 1 and T = A.

Read the diagram as text
  • Input: the signal to copy
  • Difference: input minus β × output
  • Amplifier A: output = A × difference
  • Output: what the load sees
  • Feedback β: returns β × output
  • Input → Difference: input
  • Difference → Amplifier A: difference
  • Amplifier A → Output: output
  • Output → Feedback β: sample
  • Feedback β → Difference: β × output

In the buffer of the hook, the feedback network is a wire: β = 1.

Solve the loop and the closed-loop gain is A/(1 + T). Write it as (1/β)·T/(1 + T). When T is large, the gain is 1/β, set by the feedback network alone. What is left over is the gain error, 1/(1 + T): it depends on the loop gain, not on A alone.

The feedback is negative: the returned fraction is subtracted, so an output that rises too far shrinks the difference and pulls itself back down. Positive feedback would add instead and drive the output to a rail, which the comparator of E8 does on purpose.

A buffer has β = 1, so T = A. With OTA-A, T = 136.7 and the error should be 1/137.7 = 0.73 %. With OPA-B, T = 11019 and the error falls to 0.009 %, which is why op-amp designers chase DC gain.

Gain error is 1/(1 + T)

Measure it. Each open-loop gain comes from the inductor bench of E5. A 1 TH inductor from the output to the − input and 1 F from there to ground close the loop for DC, so the bias is right. The AC signal sees an open loop. The gain-of-two loop is opened the same way at M1's gate, and v(tk) at the divider is T itself.

CircuitLoop gain TA/(1 + T) · 1/βMeasured gainError
OTA-A buffer136.7 (42.7 dB)0.99274cl_ota = 9.910593e-010.89 %
OPA-B buffer11019 (80.8 dB)0.99991cl_buf = 1.000058e+00+0.006 %
OPA-B, gain of two, 20 kΩ + 20 kΩ768.91.99740cl_two = 1.997700e+000.115 %

Measured at 10 Hz on ngspice 42. Error is 1 − measured/(1/β).

The OTA-A buffer misses its prediction by 0.17 %. In a buffer both inputs move with the signal, so the OTA also sees a common-mode input. Its common-mode gain Acm = −0.233 (E5.2) adds to the output: vout/vin = (A + Acm)/(1 + A) = 0.99104, against 0.99106 measured. The same term pushes OPA-B's buffer a hair above 1.

The gain-of-two amplifier shows a second effect. Its 40 kΩ of feedback resistors hang on the output, and OPA-B's second stage has a high output resistance. The open-loop gain falls from 11019 to 1538 (63.7 dB), so T = 1538 × 0.5 = 769. A feedback network that loads the output cuts A, and with it T.

What the loop buys: bandwidth and impedance

AC analysisOTA-A open loop and as a bufferGain of OTA-A on the open-loop bench, and of the same OTA as a unity-gain buffer, both into 1 pF.
  • open loop A
  • buffer
-50 dB-40 dB-30 dB-20 dB-10 dB010 dB20 dB30 dB40 dB50 dBGain10 Hz100 Hz1 kHz10 kHz100 kHz1 MHz10 MHz100 MHz1 GHzFrequency0 dBopen-loop pole 188 kHzbuffer −3 dB 27.4 MHz-60 dB-40 dB-20 dB020 dB40 dB60 dBGain10 Hz10 kHz10 MHzFrequency0 dBopen-loop pole 188 kHzbuffer −3 dB 27.4 MHz
  1. Frequency 1 kHzopen loop A = 42.71 dB · buffer = -0.07801 dB

    At 1 kHz the open-loop gain is 42.7 dB (136.7). The buffer gives −0.08 dB: 0.991.

  2. Frequency 188 kHzopen loop A = 39.7 dB · buffer = -0.07821 dB

    The open-loop gain is 3 dB down at 188 kHz. The buffer has not moved: its loop gain is still 97.

  3. Frequency 25.54 MHzopen loop A = -0.004288 dB · buffer = -2.792 dB

    The open-loop gain reaches 1 at 25.5 MHz. Here T = 1 and the loop runs out of gain.

  4. Frequency 27.38 MHzopen loop A = -0.617 dB · buffer = -3.089 dB

    The buffer is 3 dB down at 27.4 MHz, 146 times the open-loop bandwidth. It traded 42.7 dB of gain for that bandwidth.

Read the plot as a table
Frequencyopen loop Abuffer
10 Hz42.71 dB-0.07801 dB
100 Hz42.71 dB-0.07801 dB
1 kHz42.71 dB-0.07801 dB
10 kHz42.7 dB-0.07801 dB
100 kHz41.63 dB-0.07806 dB
188 kHz39.7 dB-0.07821 dB
1 MHz28.04 dB-0.08367 dB
10 MHz8.185 dB-0.6122 dB
25.54 MHz-0.004288 dB-2.792 dB
27.38 MHz-0.617 dB-3.089 dB
100 MHz-12.57 dB-12.61 dB
1 GHz-38.63 dB-40.2 dB

Measured on ngspice 42, 50 points per decade.

Bandwidth. The loop holds the gain at 1/β for as long as T stays large. Above the open-loop pole A falls as 1/f, and the closed loop ends near the frequency where T = 1. For a buffer that is fu; for a loop with β < 1 it is about β·fu. Gain is traded for bandwidth, with the gain-bandwidth product as the exchange rate.

Impedance. Push 1 A of AC into the output and read the voltage: at 1 kHz OTA-A alone shows 841.7 kΩ, the ro2 ‖ ro4 of its output. As a buffer it shows 6.10 kΩ, and the ratio of the two is 137.9, which is 1 + T: the loop sees any change at the output and corrects it.

Desensitivity. The loop also holds the gain when A moves. Heat the lab's gain-of-two amplifier to 125 °C: T falls by 15.9 %, and the closed-loop gain moves by 0.020 %. The prediction, 15.9 %/(1 + T), is 0.021 %.

27 °C

.lib sky130 tt
* (default temperature, 27 C)
XH in hn oh vdd opa
RFH oh hn 20k
RGH hn ref 20k

t_two = 7.689262e+02, cl_two = 1.997700e+00

125 °C

.lib sky130 tt
.temp 125
XH in hn oh vdd opa
RFH oh hn 20k
RGH hn ref 20k

t_two = 6.465233e+02, cl_two = 1.997303e+00: T −15.9 %, gain −0.020 %.

The lab netlist at two temperatures, measured on ngspice 42.

Feedback costs one thing. A has phase shift, and near fu the returning signal arrives late. If it arrives a full half-cycle late, the loop rings or oscillates: E6.3 measures how late is too late.

Asked in interviews
  1. What is loop gain?

    The gain a signal sees going once around the loop, T = Aβ. Break the loop where it does not change the bias or the loading, inject a signal, and see what comes back.

  2. What is the gain error of a buffer with 60 dB of open-loop gain?

    T = 1000, so the gain is 1000/1001 and the error 1/(1 + T) ≈ 0.1 %. A real buffer adds the common-mode gain: OTA-A's 0.73 % became 0.89 %.

  3. What does feedback do to output impedance?

    Voltage feedback divides it by 1 + T: OTA-A's 841.7 kΩ fell to 6.10 kΩ as a buffer. The effect fades with frequency as T falls.

Try it

Run the netlist and predict cl_two from t_two before you read it: 2·T/(1 + T). Open Plots to see all five gains against frequency.

Now add .temp 125 under the .lib line and run again: a_opa and t_two fall, cl_two barely moves. Then change both 20 k resistors to 200k, in both copies: the load on the output shrinks, a_loaded rises toward a_opa, and the error falls.

SPICEngspice 42 · simulator service
Edit the netlist, then run it
Expected measurements: a_opa = 1.101886e+04 cl_buf = 1.000058e+00 a_loaded = 1.537852e+03 t_two = 7.689262e+02 cl_two = 1.997700e+00

Check yourself

Predict the outputAn ideal amplifier with a gain of 100 is wired as a buffer: its output drives its own − input. The run prints the real part of v(out) for 1 V in. Type the line meas prints (format: g = 6.319360e-01).
* an ideal amplifier of gain 100 wired as a buffer
VIN in 0 dc 0 ac 1
E1 out 0 in out 100
.control
ac lin 3 1k 3k
meas ac g FIND vr(out) AT=1k
.endc
.end
ConceptAn op-amp with open-loop gain A sits in a loop with feedback factor β. Which is its gain error, the fraction by which the gain falls short of 1/β?
ConceptThe same op-amp builds a buffer and a gain-of-ten amplifier. Which has the larger gain error, and why?
ConceptRead the open- and closed-loop Bode figure. Where does the buffer's gain fall 3 dB?
ConceptOTA-A alone has an output resistance of 841.7 kΩ. As a buffer, T = 136.7. About what output resistance does the buffer show at 1 kHz?

Remember

  • The loop gain T = Aβ is the gain once around the loop; the closed-loop gain is (1/β)·T/(1 + T).
  • The gain error is 1/(1 + T): 0.73 % for OTA-A as a buffer (0.89 % measured, with its common-mode gain), 0.009 % for OPA-B.
  • A feedback network that loads the output lowers A and T: 40 kΩ cut OPA-B's gain from 11019 to 1538.
  • Feedback divides output impedance by 1 + T (841.7 kΩ to 6.10 kΩ) and changes in A by 1 + T (15.9 % to 0.020 %).
  • The closed loop ends near the frequency where T = 1: the buffer reached 27.4 MHz from a 188 kHz open-loop pole.