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 sweepThe beta multiplier's current from −40 to 125 °CE4.4's reference with an ideal 10 kΩ resistor, swept with dc TEMP -40 125 1.
7 µA8 µA9 µA10 µA11 µA12 µA13 µAReference current-40 °C-20 °C020 °C40 °C60 °C80 °C100 °C120 °CTemperature+5 %−5 %7 µA8 µA9 µA10 µA11 µA12 µA13 µAReference current050 °C100 °CTemperature+5 %−5 %
  1. Temperature -40 °Ci_ideal = 7.447 µA

    Cold: 7.447 µA, 19 % low.

  2. Temperature 27 °Ci_ideal = 9.166 µA

    9.166 µA, the value E4.4 designed for.

  3. Temperature 125 °Ci_ideal = 12.13 µA

    Hot: 12.13 µA, 32 % high.

Read the plot as a table
Temperaturei_ideal
-40 °C7.447 µA
-20 °C7.957 µA
0 °C8.465 µA
20 °C8.982 µA
27 °C9.166 µA
40 °C9.516 µA
60 °C10.07 µA
80 °C10.66 µA
100 °C11.29 µA
120 °C11.95 µA
125 °C12.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.

DC sweepΔVGS rises with temperature, VGS fallsTwo diode-connected NMOS, W/L = 8/1 µm, at 1 µA and 8 µA. Above: ΔVGS. Below: VGS of the 1 µA device.
  • dvgs
  • vgs
80 mV90 mV100 mV110 mV120 mV130 mVΔV_GS (PTAT)450 mV500 mV550 mV600 mV650 mVV_GS at 1 µA (CTAT)-40 °C-20 °C020 °C40 °C60 °C80 °C100 °C120 °CTemperature80 mV90 mV100 mV110 mV120 mV130 mVΔV_GS (PTAT)450 mV500 mV550 mV600 mV650 mVV_GS at 1 µA (CTAT)050 °C100 °CTemperature
  1. Temperature -40 °Cdvgs = 87.89 mV · vgs = 602.6 mV

    ΔVGS = 87.89 mV, VGS = 602.6 mV.

  2. 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.

  3. Temperature 125 °Cdvgs = 126.6 mV · vgs = 478.2 mV

    ΔVGS = 126.6 mV, VGS = 478.2 mV.

Read the plot as a table
Temperaturedvgsvgs
-40 °C87.89 mV602.6 mV
-20 °C92 mV586.6 mV
0 °C96.27 mV571.1 mV
20 °C100.7 mV556 mV
27 °C102.3 mV550.7 mV
40 °C105.4 mV541 mV
60 °C110.1 mV526.1 mV
80 °C115.1 mV511.3 mV
100 °C120.1 mV496.6 mV
120 °C125.3 mV481.9 mV
125 °C126.6 mV478.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).

DC sweepCurrent moves, gm staysAbove: the reference current with each resistor. Below: gm of XN1 in each copy, read with @m...[gm].
  • i_ideal
  • i_poly
  • gm_ideal
  • gm_poly
7 µA8 µA9 µA10 µA11 µA12 µA13 µAReference current80 µS85 µS90 µS95 µS100 µSg_m of XN1-40 °C-20 °C020 °C40 °C60 °C80 °C100 °C120 °CTemperature6 µA8 µA10 µA12 µA14 µAReference current80 µS85 µS90 µS95 µS100 µSg_m of XN1050 °C100 °CTemperature
  1. 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).

  2. 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.

  3. 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
Temperaturei_ideali_polygm_idealgm_poly
-40 °C7.447 µA7.741 µA94.4 µS96.61 µS
-20 °C7.957 µA8.196 µA92.66 µS94.27 µS
0 °C8.465 µA8.622 µA91.18 µS92.14 µS
20 °C8.982 µA9.03 µA89.97 µS90.24 µS
27 °C9.166 µA9.17 µA89.59 µS89.61 µS
40 °C9.516 µA9.426 µA88.97 µS88.52 µS
60 °C10.07 µA9.816 µA88.16 µS86.96 µS
80 °C10.66 µA10.2 µA87.48 µS85.52 µS
100 °C11.29 µA10.59 µA86.91 µS84.16 µS
120 °C11.95 µA10.98 µA86.39 µS82.87 µS
125 °C12.13 µA11.07 µA86.27 µS82.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.

DC sweepVGS + 3.258·ΔVGSVGS, 3.258·ΔVGS, and their sum, made by ideal B sources: a numerical demonstration.
  • v(n1)
  • v(wp)
  • v(sum)
0.2 V0.3 V0.4 V0.5 V0.6 V0.7 V0.8 V0.9 V1.0 VVoltage-40 °C-20 °C020 °C40 °C60 °C80 °C100 °C120 °CTemperature0.2 V0.4 V0.6 V0.8 V1.0 VVoltage050 °C100 °CTemperature
  1. Temperature -40 °Cv(n1) = 602.6 mV · v(wp) = 286.3 mV · v(sum) = 888.9 mV

    The sum is 888.9 mV.

  2. 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.

  3. 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
Temperaturev(n1)v(wp)v(sum)
-40 °C602.6 mV286.3 mV888.9 mV
-20 °C586.6 mV299.7 mV886.4 mV
0 °C571.1 mV313.6 mV884.8 mV
20 °C556 mV328.2 mV884.1 mV
27 °C550.7 mV333.4 mV884.1 mV
40 °C541 mV343.3 mV884.2 mV
60 °C526.1 mV358.9 mV885 mV
80 °C511.3 mV374.9 mV886.3 mV
100 °C496.6 mV391.3 mV888 mV
120 °C481.9 mV408.1 mV890 mV
125 °C478.2 mV412.3 mV890.6 mV

The lab netlist on ngspice 42.

TemperatureΔVGS (PTAT)VGS at 1 µA (CTAT)VGS + 3.258·ΔVGS
−40 °Cdv_m40 = 8.789124e-02vgs_m40 = 6.025664e-01sum_m40 = 8.889161e-01
27 °Cdv_27 = 1.023285e-01vgs_27 = 5.506870e-01sum_27 = 8.840731e-01
125 °Cdv_125 = 1.265645e-01vgs_125 = 4.782327e-01sum_125 = 8.905799e-01
Change over 165 K+38.67 mV−124.3 mV6.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
  1. 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.

  2. 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.

  3. 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.

SPICEngspice 42 · simulator service
Edit the netlist, then run it
Expected measurements: 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+99

Check yourself

Predict the outputAn ideal SPICE resistor of 10 kΩ carries 1 µA while the temperature is swept from −40 to 125 °C. Type the line meas prints (for example v125 = 1.000000e-01).
* An ideal 10 k resistor carrying 1 uA, swept over temperature
I1 0 r 1u
R1 r 0 10k
.control
dc TEMP -40 125 5
meas dc v125 FIND v(r) AT=125
.endc
.end
ConceptTwo identical NMOS in deep weak inversion carry 1 µA and 10 µA. Why is the difference of their gate voltages proportional to absolute temperature?
ConceptWhy does VGS of a diode-connected NMOS at a constant 1 µA fall as temperature rises?
ConceptIn the PTAT-plus-CTAT plot, at which temperature does the sum VGS + 3.258·ΔVGS change least?
ConceptThe beta multiplier's current rises 63 % from −40 to 125 °C with an ideal resistor. Why do analog designers still use it to bias amplifiers?

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.