Cold-junction compensation (source code)

= Cold-junction compensation

= CJC
{c}
{synonym}

<Cold-junction compensation> converts a reading with reference <temperature> $T_c$ into the equivalent reading for a chosen standard reference. Define the <thermocouple reference function> $F(T)=E(T,0)$, where $0$ means $0\,{}^\circ\mathrm C$, not absolute zero. Additivity of the <definite integral> gives
$$
E(T_h,T_c)=F(T_h)-F(T_c),\qquad
F(T_h)=V_{\rm raw}+F(T_c),\qquad
T_h=F^{-1}\!\bigl(V_{\rm raw}+F(T_c)\bigr).
$$
The final <inverse function> requires a suitable one-to-one calibration interval. A terminal <thermometer> supplies $T_c$ independently; the raw <thermocouple> <electric potential difference> supplies only the difference of the two reference-function values. In general, first converting $V_{\rm raw}$ to a <temperature> and then adding $T_c$ is wrong, because the <thermocouple reference function> need not be linear. The SCC-TC manual explicitly adds the reference-equivalent voltage before its final voltage-to-<temperature> conversion.<SCC-TC Series Thermocouple Input Modules User Guide by National Instruments>[pp. 5–6, Scaling Voltage Measurements, steps 1–5]{ref}

For a stipulated model only, take $S_A-S_B=40\,\mu\mathrm{V/K}$ throughout the interval. No actual material pair is assigned this constant. Because <degree Celsius> differences have the same numerical size as <kelvin> differences,
$$
T_h=80\,{}^\circ\mathrm C,\quad T_c=20\,{}^\circ\mathrm C
\quad\Longrightarrow\quad
V_{\rm raw}=(40\,\mu\mathrm{V/K})(60\,\mathrm K)=2.4\,\mathrm{mV}.
$$
In this model $F(20)=0.8\,\mathrm{mV}$ and $F(80)=3.2\,\mathrm{mV}$. Adding the $0.8\,\mathrm{mV}$ correction produces $3.2\,\mathrm{mV}$, whose inverse calibration gives $80\,{}^\circ\mathrm C$. Applying the zero-reference calibration directly to $2.4\,\mathrm{mV}$ would instead display $60\,{}^\circ\mathrm C$.

Now physically change only the reference <temperature> to $30\,{}^\circ\mathrm C$, leaving the measuring junction at $80\,{}^\circ\mathrm C$. The raw reading becomes $2.0\,\mathrm{mV}$; the correction becomes $F(30)=1.2\,\mathrm{mV}$, so the corrected total stays $3.2\,\mathrm{mV}$. Physically changing the reference changes the measured <electric potential difference>. Adding a software correction changes its interpretation and leaves the raw reading intact. If the actual reference is $30\,{}^\circ\mathrm C$ but the software still assumes $20\,{}^\circ\mathrm C$, this model displays $70\,{}^\circ\mathrm C$.

\Image[/thermocouple-reference-compensation-calibration.png]
{title=Adding the reference-equivalent voltage before inverting the <thermocouple reference function>}
{description=Calculated constant-<Seebeck coefficient>-difference example only. The zero-reference line $F(T)=E(T,0)$ and the $20\,{}^\circ\mathrm C$ raw-reading line differ by $F(20)=0.8\,\mathrm{mV}$. At $T_h=80\,{}^\circ\mathrm C$, adding that correction takes $2.4$ to $3.2\,\mathrm{mV}$. Changing the reference to $30\,{}^\circ\mathrm C$ changes the raw reading and the correction in opposite directions. Real calibration curves need not be straight.}

An actual implementation in <FP-TC-120 and cFP-TC-120 Operating Instructions by National Instruments> (p. 7, Cold-Junction Compensation) uses terminal-mounted <temperature> sensors, reports their reading as “CJ Temperature”, and enables compensation in <temperature> mode but not voltage mode. This makes the distinction between a raw voltage readout and a compensated <temperature> readout observable. The specified reference-sensor range also produces an out-of-range indication: a calculated number outside a supported range is not a validated measurement.<FP-TC-120 and cFP-TC-120 Operating Instructions by National Instruments>[p. 7, Cold-Junction Compensation: mode selection, CJ Temperature and out-of-range reporting]{ref}