Unity Gain Buffer – How Does a Unity Gain Buffer Work?

bufferfeedbackoperational-amplifier

Say we slow down time to a crawl, and turn on a power source connected to a unity gain buffer. Initially, the non-inverting input receives the signal and the inverting input receives nothing, so the output is indeed the signal. Right after, the signal is fed back to the inverting input. Would that not mean that the output should then be 0, since the differential amplifier would output the difference between the signal and itself?

Schematic of unity gain buffer

Best Answer

You've applied the non-idealities of the op amp inconsistently, and have reached a false contradiction. In particular, you've assumed that the op amp has infinite open-loop gain when you concluded that output = input, but then added the non-ideality of finite open-loop gain (meaning that diff. input = 0 implies output = 0) halfway through the problem.

If you accept that the open-loop gain is a finite value \$A_0\$, then it can be shown that your overall closed-loop gain of the unity-gain amplifier is \$\frac{A_0}{1+A_0}\$. This is of course consistent: if you apply 1 V to the non-inverting input, then your output is \$\frac{A_0}{1+A_0}\$, the difference in the inputs is \$\frac{1}{1+A_0}\$, and multiplying that by \$A_0\$ matches up.

If you instead accept that the open-loop gain is infinite, then you can only reach the conclusion that in feedback, the two inputs have equal voltage and hence the output must equal the input.

However, let's actually take a really simple op amp model, and slow down time as you asked. I'll demonstrate that this steady-state gain isn't all we see, and there are actually some pretty cool slew-rate behaviors. This should cover this clarification comment of yours:

If I get this right, the inverting input gets nothing, the difference between the two is then just the initial signal, which swings to say the positive supply rail if the initial signal was positive. But then, the signal minus the feedback would be negative and get pushed to the negative supply rail, right? Doesn't this just lead to infinite oscillations?

I'll take a little five-transistor1, single-stage op amp (using TSMC's 180nm mixed-signal process, and not optimized for slew rate). Every op amp will be different in what it does. Some may undershoot. Some may overshoot like mine. Some may swing around the output for a few oscillations if they're only barely stable at unity gain.

enter image description here

The principle of this circuit is as follows. It's not representative of every op amp, but knowing the theory behind the example is important toward understanding the slew rate remarks I'll make soon.

  1. NMOS_IDC_IN and NMOS_IDC_OUT form a current mirror which delivers a constant current to the differential pair.
  2. NMOS_IN_P and NMOS_IN_N form a differential pair. When VIN_P is above VIN_N, more current is sunk by NMOS_IN_P from the left branch and less is sunk by NMOS_IN_N from the right branch. When the two are equal, the currents are equal.
  3. When less current is sunk from the right branch by NMOS_IN_N, the output directly rises.
  4. When more current is sent via the left branch, the PMOS_LOAD_P and PMOS_LOAD_N pair copy the current back down the right branch.
  5. The resulting small signal currents are sent into the load.

The gist here is that this amplifier operates in a differential-to-single-ended transconductance mode. We deal in differences of voltages for the input, and we send current in or out of the output pin.

enter image description here

Here's a simple testbench:

enter image description here

At the start, our op amp is already showing its non-ideal, finite gain. We put in 400 mV, we got out 407 mV.

Next, I'm going to abruptly increase the input voltage of the unity-gain buffer from 0.4 V to 1.4 V, while looking at three things:

  • The input voltage (red, dotted)
  • The output voltage (yellow)
  • The internal gate voltage that's responsible for delivering current into the output (green), which I'll call PGATE. The lower this voltage goes, the more current we can deliver into the output.

Over the 100 ps that the input is swinging, nothing happens. The amp is just too sluggish to respond much. We get 65 mV of output swing for 1000 mV of input swing. It's mostly the input spike directly getting conducted through parasitic capacitances into the output.

enter image description here

Now let's look at the whole output slope:

enter image description here

NMOS_IN_P turns on more strongly; It's sinking a fair amount of current but it can only sink as much current as the current mirror sinks (50 uA). As it turns on, we see PGATE drop and the upper current mirror activates to send more current into the load.

At the same time, NMOS_IN_N cuts off.

We're now slewing the output as fast as this amplifier possibly could - the left branch (NMOS_IN_P) is taking every ounce of bias current it can, and sending a copy of that bias current into the load since the upper mirror is copying it. At the same time, NMOS_IN_N is cut off, taking no current. No matter how hard we drive VIN_P, it can't go any faster (i.e. we are thinking about a constant slew rate, not a gain as a function of the input voltage). The left branch can't carry more than the total bias current, and the right branch can't carry less than no current.

As we reach the point where VIN = VOUT, things are still not quite in balance. NMOS_IN_N is completely shut off and will be sluggish to turn on. Likewise, the upper current mirror is driving a large amount of current, and turning it off will take a while, so the amplifier overshoots. As the current mirror dials its output back to the steady state bias current, and as NMOS_IN_N turns back on, the output settles to its final value, 1.3973 V (a tad shy of 1.4 V).

1 Six transistors, actually. Only five are part of the op amp core; the sixth establishes a bias voltage as the reference side of the tail current mirror.