PTAT, CTAT and temperature
Measure a voltage that rises with temperature and one that falls, see why a beta multiplier's current climbs with temperature, and add the two kinds of voltage into one that barely moves.
- Lesson
- E4.6
- Time
- 25 min
- Runs on
- ngspice
- Check
- 5 questions
A bias block's specification asked for its current to stay within ±5 % from −40 to 125 °C. Its reference, the beta multiplier of E4.4, ignores the supply, but nobody had asked about temperature: it gave 7.447 µA cold, 9.166 µA at 27 °C and 12.13 µA hot.
dc TEMP -40 125 1.- Temperature -40 °Ci_ideal = 7.447 µA
Cold: 7.447 µA, 19 % low.
- Temperature 27 °Ci_ideal = 9.166 µA
9.166 µA, the value E4.4 designed for.
- Temperature 125 °Ci_ideal = 12.13 µA
Hot: 12.13 µA, 32 % high.
Read the plot as a table
| Temperature | i_ideal |
|---|---|
| -40 °C | 7.447 µA |
| -20 °C | 7.957 µA |
| 0 °C | 8.465 µA |
| 20 °C | 8.982 µA |
| 27 °C | 9.166 µA |
| 40 °C | 9.516 µA |
| 60 °C | 10.07 µA |
| 80 °C | 10.66 µA |
| 100 °C | 11.29 µA |
| 120 °C | 11.95 µA |
| 125 °C | 12.13 µA |
Measured on ngspice 42 (166 points, one per degree).
To see why, measure the two kinds of voltage a transistor can give you.
A voltage that rises with temperature
The thermal voltage UT = kT/q (k Boltzmann's constant, q the electron charge, T in kelvin) is 25.87 mV at 27 °C and grows by k/q = 86.17 µV per kelvin. A quantity proportional to absolute temperature is called PTAT.
In weak inversion, below threshold, a MOS current is exponential in VGS: each factor e of current costs n·UT, with the slope factor n between 1 and 2 (E2.6). Feed two identical devices currents in a ratio K and their gate voltages differ by ΔVGS = n·UT·ln K. The threshold cancels, so ΔVGS is PTAT.
- dvgs
- vgs
- Temperature -40 °Cdvgs = 87.89 mV · vgs = 602.6 mV
ΔVGS = 87.89 mV, VGS = 602.6 mV.
- Temperature 27 °Cdvgs = 102.3 mV · vgs = 550.7 mV
ΔVGS = 102.3 mV, rising 230.4 µV/K. VGS = 550.7 mV, falling 750.6 µV/K.
- Temperature 125 °Cdvgs = 126.6 mV · vgs = 478.2 mV
ΔVGS = 126.6 mV, VGS = 478.2 mV.
Read the plot as a table
| Temperature | dvgs | vgs |
|---|---|---|
| -40 °C | 87.89 mV | 602.6 mV |
| -20 °C | 92 mV | 586.6 mV |
| 0 °C | 96.27 mV | 571.1 mV |
| 20 °C | 100.7 mV | 556 mV |
| 27 °C | 102.3 mV | 550.7 mV |
| 40 °C | 105.4 mV | 541 mV |
| 60 °C | 110.1 mV | 526.1 mV |
| 80 °C | 115.1 mV | 511.3 mV |
| 100 °C | 120.1 mV | 496.6 mV |
| 120 °C | 125.3 mV | 481.9 mV |
| 125 °C | 126.6 mV | 478.2 mV |
The lab netlist on ngspice 42, dc TEMP -40 125 1.
Compare the slope with the formula. ΔVGS = n·UT·ln 8 grows by n · 86.17 µV · ln 8 = n · 179.2 µV per kelvin. The measured 230.4 µV/K gives n = 1.29.
The value fits less well: with n = 1.29 the formula gives 69.3 mV at 27 °C, the run 102.3 mV. The formula needs both devices deep in weak inversion. The 1 µA device is, with gm/ID = 22.49 V−1 (E2.5: above 20). The 8 µA device, at 17.18 V−1, is in moderate inversion, where VGS grows faster than the logarithm of the current, and that extra part is not PTAT.
A voltage that falls with temperature
The lower panel, VGS at a constant 1 µA, falls 750.6 µV/K. A quantity that falls as temperature rises is called CTAT (complementary to absolute temperature).
It falls because the threshold falls with temperature (E2.7). Mobility falls too, which pushes VGS up, but at a small current the threshold wins; at large currents the two cancel, and above that VGS rises.
Why the beta multiplier's current climbs
In the beta multiplier the voltage across RS is VGS1 − VGS2, a ΔVGS of the same kind, so it rises with temperature. With a fixed resistor, so does I = ΔVGS/RS. An ideal SPICE resistor has no temperature coefficient unless you give it one.
A real resistor has a temperature coefficient. SKY130's res_high_po poly resistor (W = 0.35 µm, L = 9.08 µm) measures 9.733, 9.997 and 10.57 kΩ at −40, 27 and 125 °C. In place of the ideal 10 kΩ it cancels part of the rise.
Ideal resistor
RS s 0 10k
7.447 µA at −40 °C, 12.13 µA at 125 °C: −19 % and +32 % around 9.166 µA.
res_high_po, 10.0 kΩ at 27 °C
VR s2 r2 0
XRS r2 0 0 sky130_fd_pr__res_high_po W=0.35 L=9.08
7.741 µA at −40 °C, 11.07 µA at 125 °C: −16 % and +21 % around 9.170 µA.
Both copies in one netlist. VR is a 0 V source that reads the current.
Still far outside ±5 %. But the beta multiplier is also called a constant-gm bias. Its current moves so that the transconductance gm of its devices stays nearly still, and an amplifier biased from it keeps its gain and bandwidth (E5).
@m...[gm].- i_ideal
- i_poly
- gm_ideal
- gm_poly
- Temperature -40 °Ci_ideal = 7.447 µA · i_poly = 7.741 µA · gm_ideal = 94.4 µS · gm_poly = 96.61 µS
gm = 94.40 µS (ideal R), 96.61 µS (poly).
- Temperature 27 °Ci_ideal = 9.166 µA · i_poly = 9.17 µA · gm_ideal = 89.59 µS · gm_poly = 89.61 µS
Both 89.6 µS: the resistors are equal here.
- Temperature 125 °Ci_ideal = 12.13 µA · i_poly = 11.07 µA · gm_ideal = 86.27 µS · gm_poly = 82.55 µS
86.27 and 82.55 µS. With the ideal R the current rose 63 % while gm fell 9 %.
Read the plot as a table
| Temperature | i_ideal | i_poly | gm_ideal | gm_poly |
|---|---|---|---|---|
| -40 °C | 7.447 µA | 7.741 µA | 94.4 µS | 96.61 µS |
| -20 °C | 7.957 µA | 8.196 µA | 92.66 µS | 94.27 µS |
| 0 °C | 8.465 µA | 8.622 µA | 91.18 µS | 92.14 µS |
| 20 °C | 8.982 µA | 9.03 µA | 89.97 µS | 90.24 µS |
| 27 °C | 9.166 µA | 9.17 µA | 89.59 µS | 89.61 µS |
| 40 °C | 9.516 µA | 9.426 µA | 88.97 µS | 88.52 µS |
| 60 °C | 10.07 µA | 9.816 µA | 88.16 µS | 86.96 µS |
| 80 °C | 10.66 µA | 10.2 µA | 87.48 µS | 85.52 µS |
| 100 °C | 11.29 µA | 10.59 µA | 86.91 µS | 84.16 µS |
| 120 °C | 11.95 µA | 10.98 µA | 86.39 µS | 82.87 µS |
| 125 °C | 12.13 µA | 11.07 µA | 86.27 µS | 82.55 µS |
The beta-multiplier netlist on ngspice 42.
The poly resistor flattens the current but makes gm move more, because gm is set mainly by RS: in the square law gm1 = 2(1 − 1/√K)/RS. Pick the resistor for the quantity you need constant.
Adding PTAT to CTAT
One voltage rises 230.4 µV/K, the other falls 750.6 µV/K. Scale the rising one by w = 750.6/230.4 = 3.258 and add: the slopes cancel at 27 °C.
- v(n1)
- v(wp)
- v(sum)
- Temperature -40 °Cv(n1) = 602.6 mV · v(wp) = 286.3 mV · v(sum) = 888.9 mV
The sum is 888.9 mV.
- Temperature 27 °Cv(n1) = 550.7 mV · v(wp) = 333.4 mV · v(sum) = 884.1 mV
884.1 mV, slope zero: the weight was chosen here.
- Temperature 125 °Cv(n1) = 478.2 mV · v(wp) = 412.3 mV · v(sum) = 890.6 mV
890.6 mV: 6.5 mV peak to peak over 165 K, against 124 mV for VGS alone.
Read the plot as a table
| Temperature | v(n1) | v(wp) | v(sum) |
|---|---|---|---|
| -40 °C | 602.6 mV | 286.3 mV | 888.9 mV |
| -20 °C | 586.6 mV | 299.7 mV | 886.4 mV |
| 0 °C | 571.1 mV | 313.6 mV | 884.8 mV |
| 20 °C | 556 mV | 328.2 mV | 884.1 mV |
| 27 °C | 550.7 mV | 333.4 mV | 884.1 mV |
| 40 °C | 541 mV | 343.3 mV | 884.2 mV |
| 60 °C | 526.1 mV | 358.9 mV | 885 mV |
| 80 °C | 511.3 mV | 374.9 mV | 886.3 mV |
| 100 °C | 496.6 mV | 391.3 mV | 888 mV |
| 120 °C | 481.9 mV | 408.1 mV | 890 mV |
| 125 °C | 478.2 mV | 412.3 mV | 890.6 mV |
The lab netlist on ngspice 42.
| Temperature | ΔVGS (PTAT) | VGS at 1 µA (CTAT) | VGS + 3.258·ΔVGS |
|---|---|---|---|
| −40 °C | dv_m40 = 8.789124e-02 | vgs_m40 = 6.025664e-01 | sum_m40 = 8.889161e-01 |
| 27 °C | dv_27 = 1.023285e-01 | vgs_27 = 5.506870e-01 | sum_27 = 8.840731e-01 |
| 125 °C | dv_125 = 1.265645e-01 | vgs_125 = 4.782327e-01 | sum_125 = 8.905799e-01 |
| Change over 165 K | +38.67 mV | −124.3 mV | 6.507 mV peak to peak |
The lab's printed values. The weighted sum moves 19 times less than VGS alone.
The sum is a shallow bowl: both slopes change with temperature, and one weight cancels only their first-order parts. The rest is called curvature.
A bandgap reference builds this in silicon, usually from bipolar transistors: the base-emitter voltage is the CTAT term and the difference of two of them the PTAT term. A bipolar junction follows its equations closely and spreads less than a MOS threshold. SKY130 has a parasitic PNP, but this track's library has no bipolar models, so the lesson stops at the principle.
Asked in interviews
What do PTAT and CTAT mean?
Proportional to absolute temperature, and complementary to it (falling as temperature rises). U_T = kT/q and the difference of two junction or weak-inversion voltages at a fixed current ratio are PTAT. A base-emitter voltage, or a MOS V_GS at a small constant current, is CTAT.
How would you make a PTAT voltage in CMOS?
Run two matched transistors in weak inversion at a current ratio K. Their V_GS difference is n·U_T·ln K. Keep both deep in weak inversion; in moderate inversion the difference picks up a part that is not PTAT.
How does a bandgap reference work, and why use a bipolar device?
It adds a CTAT voltage, usually V_BE, to a PTAT voltage scaled so that the slopes cancel, leaving a small curvature. V_BE is used because it follows its equations closely and varies less across the process than a MOS threshold.
Try it
Run it and read the lines: ΔVGS and VGS at three temperatures and their slopes at 27 °C, the gm/ID of the two devices, and the weighted sum. Open Plots to see all the node voltages against temperature.
Now change things and predict first. Set I8 0 n8 8u to 0.8u and I1 to 0.1u: both devices go deeper into weak inversion. Now n from the slope (1.29) and n from the 27 °C value (1.90) should move toward each other; check with dv_slope and dv_27. Change w to 3.0 and to 3.5 and watch the bottom of the bowl move to the hot or the cold end. Replace .lib sky130 tt with ss: the CTAT voltage moves with the corner, the PTAT one hardly does.
Run the netlist to draw its plots here.
dv_m40 = 8.789124e-02 dv_27 = 1.023285e-01 dv_125 = 1.265645e-01 dv_slope = 2.303965e-04 vgs_m40 = 6.025664e-01 vgs_27 = 5.506870e-01 vgs_125 = 4.782327e-01 vgs_slope = -7.506307e-04 gmid1_27 = 2.249288e+01 gmid8_27 = 1.718249e+01 sum_m40 = 8.889161e-01 sum_27 = 8.840731e-01 sum_125 = 8.905799e-01 sum_pp = 6.506729e-03 from= -1.000000e+99 to= 1.000000e+99Check yourself
Remember
- UT = kT/q is PTAT; so is ΔVGS = n·UT·ln K of two matched devices in weak inversion at a current ratio K. In moderate inversion ΔVGS picks up a part that is not PTAT.
- VGS at a small constant current is CTAT, about −0.75 mV/K here, because the threshold falls with temperature.
- A beta multiplier's current is ΔVGS/RS, so it rises with temperature; a resistor with a positive coefficient narrows the spread, while its gm stays nearly constant, which is why it biases amplifiers.
- Weighting PTAT against CTAT cancels the slope at one temperature and leaves a small curvature: the principle of the bandgap reference, which uses bipolar VBE in production.