The five-transistor OTA
Load a differential pair with a current mirror, predict and measure its DC gain and unity-gain frequency, and tell the + input from the − input without guessing.
- Lesson
- E5.3
- Time
- 30 min
- Runs on
- ngspice
- Check
- 5 questions
A new designer wired an OTA as a buffer: the operating point put the output at 0.902 V, and AC analysis showed 42.7 dB of gain with +85° of phase at unity gain. The inputs were swapped, so the loop was positive feedback, and 0.902 V was a balance point that a real circuit leaves at once.
- v(in)
- right
- swapped
- Time 0 sv(in) = 900 mV · right = 897.8 mV · swapped = 902.2 mV
Both start where the DC solution put them: 0.898 V for the right buffer, 0.902 V for the swapped one.
- Time 120 nsv(in) = 900 mV · right = 897.8 mV · swapped = 1.7 V
The swapped buffer passes 1.7 V after 0.12 µs, before the input has moved at all. The solver's rounding was enough to tip it.
- Time 3 µsv(in) = 910 mV · right = 907.7 mV · swapped = 1.8 V
The right buffer has followed the 10 mV step to 0.908 V. The swapped one sits at the 1.8 V rail.
Read the plot as a table
| Time | v(in) | right | swapped |
|---|---|---|---|
| 0 s | 900 mV | 897.8 mV | 902.2 mV |
| 120 ns | 900 mV | 897.8 mV | 1.7 V |
| 500 ns | 900 mV | 897.8 mV | 1.8 V |
| 1 µs | 900 mV | 897.8 mV | 1.8 V |
| 1.5 µs | 910 mV | 907.7 mV | 1.8 V |
| 2 µs | 910 mV | 907.7 mV | 1.8 V |
| 2.5 µs | 910 mV | 907.7 mV | 1.8 V |
| 3 µs | 910 mV | 907.7 mV | 1.8 V |
Measured on ngspice 42 (1514 time points).
A DC solution says only that a balance exists; whether the circuit stays there depends on the sign of the feedback.
The mirror adds the two halves
Replace the two load resistors of E5.1 with a PMOS current mirror (E4.2 Ratios, PMOS mirrors and distributing bias). M3 is diode-connected on M1's side; M4 copies M3's current into M2's side, which is the single output.
- Balance
Both inputs at 0.9 V. M1 and M2 each carry about 9.3 µA. M3 takes M1's current, M4 copies it, and M2 takes the copy away: no current is left for CL.
I · I
- Raise the + input
M1 pulls Δi more. M3 carries it, so M4 pushes Δi more into the output. M2 pulls Δi less, because the tail current is fixed. Both changes push the output up: 2Δi flows into CL.
I + Δi · I + Δi · 2Δi
- Raise the − input
Now M2 pulls more and M1 less, so M4 pushes less: the output falls. The gate on the diode side is +, the gate on the output side is −.
Read the circuit as text
- M3 PMOS transistor (8/1): gate →
x, source →VDD, drain →x - M4 PMOS transistor (8/1): gate →
x, source →VDD, drain →out - M1 NMOS transistor (10/1): gate →
n1, drain →x, source →tail - M2 NMOS transistor (10/1): gate →
n2, drain →out, source →tail - IB current source (20 µA): + →
VDD, − →n3 - MB NMOS transistor (8/1): gate →
n3, drain →n3, source →0 - M5 NMOS transistor (8/1): gate →
n3, drain →tail, source →0 - C_L capacitor (1 pF): pin 1 →
out, pin 2 →0 - out port: terminal →
out - + port: terminal →
n1 - − port: terminal →
n2
x= 0.618 Vout= 0.898 Vtail= 0.204 V
Operating point of the lab at 0.9 V. NMOS bodies at ground, PMOS bodies at VDD. W/L in µm.
With resistor loads, each drain moves by gmvd/2 times its load. Here M1's half of the signal current is not lost in a resistor: the mirror copies it to the output, where it adds to M2's half. The whole gmvd reaches one node, so the differential-to-single-ended conversion costs nothing.
That output node sees M2's and M4's output resistances in parallel. So the DC gain is A0 = gm(ro2 ∥ ro4) = gm2/(gds2 + gds4). An amplifier that turns a voltage into a current, with a gain set by the load it drives, is an operational transconductance amplifier (OTA).
Gain, bandwidth and the second pole
The lab runs OTA-A open loop. A 1 TH inductor from the output to the − input closes the loop at DC, so the output settles at its unity-gain level. A 1 F capacitor holds the − input still for AC; E6.5 explains when that trick misleads.
- gain
- phase
- Frequency 10 Hzgain = 42.71 dB · phase = -0.003049°
The DC gain A0 is 42.71 dB, 136.6 V/V, with 0° of phase: the output follows the + input.
- Frequency 187.5 kHzgain = 39.71 dB · phase = -44.97°
The output pole: the gain is 3 dB down at 187.5 kHz and the phase has reached −45°.
- Frequency 25.53 MHzgain = -0.002124 dB · phase = -95.04°
The gain crosses 0 dB at fu = 25.53 MHz, with a phase of −95.0°.
Read the plot as a table
| Frequency | gain | phase |
|---|---|---|
| 1 Hz | 42.71 dB | -0.0002973° |
| 10 Hz | 42.71 dB | -0.003049° |
| 100 Hz | 42.71 dB | -0.0305° |
| 1 kHz | 42.71 dB | -0.305° |
| 10 kHz | 42.7 dB | -3.047° |
| 100 kHz | 41.63 dB | -28.03° |
| 187.5 kHz | 39.71 dB | -44.97° |
| 1 MHz | 28.04 dB | -79.57° |
| 10 MHz | 8.185 dB | -91.07° |
| 25.53 MHz | -0.002124 dB | -95.04° |
| 100 MHz | -12.57 dB | -109.5° |
| 1 GHz | -38.63 dB | -145.5° |
Measured on ngspice 42 (the lab netlist, 50 points per decade).
| Quantity | Hand formula | Hand value | Measured |
|---|---|---|---|
| DC gain A0 | gm2/(gds2 + gds4) | 42.74 dB | 42.71 dB |
| Unity-gain frequency fu | gm2/(2πCL) | 26.13 MHz | 25.53 MHz |
| Gain-bandwidth A0·f-3dB | equals fu for one pole | 25.63 MHz | 25.53 MHz |
gm2 = 164.2 µS, gds2 = 0.901 µS, gds4 = 0.296 µS from the lab's operating point.
Gain needs gm and output resistance; bandwidth needs gm and a small CL. The output pole sits at 1/(2π(ro2 ∥ ro4)CL), so fu = A0·f-3dB = gm/(2πCL) does not depend on ro at all.
Hand and run agree within 2.3 %: the formula keeps only gm and CL, while the run includes every device capacitance. The mirror also adds a second pole at node x, about gm3/(2πCx). The phase at fu is −95.0°, only 5° past a single pole, so that pole sits far above fu. A buffer made from this OTA is very stable; E6 names that 85° the phase margin.
To raise the gain without more current, raise ro: make the devices longer. Doubling W and L of M1 to M4 lifts A0 from 42.71 to 44.16 dB, only 1.18×. M4's gds falls from 0.296 to 0.131 µS, but M2's barely moves (0.901 to 0.920 µS). The larger devices also load node x: the phase at fu drops to −107.9°.
Which input is which
Rule: in an OTA with an NMOS pair and a PMOS mirror load, the gate on the diode side (M1) is +, and the gate on the output side (M2) is −. Do not trust a netlist's node names; check the sign.
DC: open loop
With the loop open, raise the + input by 1 mV: the output must rise, by about A0 millivolts.
AC: low-frequency phase
From + to the output the phase at low frequency is 0°; from − it is 180°. The lab prints
ph10, the phase at 10 Hz: −0.003°.
A closed-loop DC check cannot tell. A buffer with swapped inputs still has a balance point near its input, because the balance equation does not care about the sign of the feedback. The hook's 0.902 V was exactly that.
Input on +, output fed back to −
VIP inp 0 DC 0.9 AC 1
XM1 x inp tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1
XM2 out inn tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1
LF out inn 1T
Output 0.898 V; phase 0° at 10 Hz and −95.0° at fu. Negative feedback.
Input on −, output fed back to +
VIN inn 0 DC 0.9 AC 1
XM1 x inp tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1
XM2 out inn tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1
LF out inp 1T
Output 1.800 V, or 0.902 V with .nodeset v(out)=0.9; then 42.73 dB, phase 180° at 10 Hz and +85.2° at fu. Positive feedback.
Both on ngspice 42. The swapped bench still converges: a DC run cannot catch the sign.
Asked in interviews
Draw a five-transistor OTA and mark the inputs.
An NMOS pair on a tail current source, with a PMOS mirror as the load. The diode-connected PMOS sits on M1's side, the output on M2's side. M1's gate is +, M2's gate is −: raising + pulls more current through the diode, which the mirror copies to the output.
What are its DC gain and unity-gain frequency?
A0 = gm1(ro2 ∥ ro4); fu = gm1/(2πCL). Gain depends on output resistance, gain-bandwidth only on gm and the load. OTA-A gives 42.71 dB and 25.53 MHz into 1 pF.
Where is the second pole, and how do you raise the gain without more power?
At the mirror's diode node, about gm3/(2πCx), where Cx is the gate capacitance of M3 and M4 plus M1's drain. Raise the gain with longer devices or cascodes, which raise ro; longer devices lower that pole, so the phase at fu gets worse.
Try it
Run the netlist. a0, f3db, fu and ph_fu read the Bode plot; gbw is A0·f-3dB; a0_hand and fu_hand are the formulas from M2's and M4's operating point. isup is the supply current, 38.67 µA, printed as −i(VDD) because SPICE counts current into the + terminal of VDD as positive.
Predict, then run. Set CL out 0 2p: A0 stays and fu should halve. Make M1 to M4 twice as wide and twice as long: A0 rises a little and the phase at fu falls. Then swap inp and inn on the VIP, LF and CF lines and read vout and ph10: the output sits at the 1.8 V rail and some measurements fail. Add .nodeset v(out)=0.9 and it balances at 0.902 V, with ph10 near 180°.
Run the netlist to draw its plots here.
a0 = 4.271332e+01 f3db = 1.875369e+05 fu = 2.553041e+07 ph_fu = -9.503574e+01 ph10 = -3.049303e-03 gbw = 2.563024e+07 a0_hand = 4.274152e+01 fu_hand = 2.613078e+07Check yourself
Remember
- A current-mirror load copies M1's current change to the output, so the full gmvd reaches one node: A0 = gm(ro2 ∥ ro4), 42.71 dB for OTA-A.
- The output pole sets f-3dB; the unity-gain frequency fu = gm/(2πCL) does not depend on ro: 25.53 MHz measured, 26.13 MHz by hand.
- The mirror's diode node adds a second pole far above fu, so the phase at fu is only −95°.
- The gate on the diode side is +, the gate on the output side is −; check the sign open loop or by the low-frequency phase, because a buffer with swapped inputs still converges.