Type A standard uncertainty
Use
A contract says the pump must deliver at least 3.95 bar, the logged reading is 4.00 bar, and the client’s own gauge says 3.9 bar. Neither number ends the argument, because nobody can say how far each may be from the truth. A reading without an uncertainty cannot prove that a limit is met, that a filter is blocked, or that a saving is real. This lesson builds an uncertainty budget, a table that lists every source of doubt in a measuring chain and combines them into one stated figure, for a pressure transmitter read by a converter, and shows why money spent on the smallest term is wasted. #MeasurementUncertainty #UncertaintyBudget #Instrumentation
By the end of this lesson, you will be able to:
A booster pump supplies a building. The supply contract requires at least 3.95 bar in the discharge line. A pressure transmitter with a range of 0 to 10 bar sends 4 to 20 mA to a small controller in the plant room, and the log shows 4.00 bar. The pump supplier says the contract is met. The client asks one question: how sure is that number?
The reading is the end of a chain, and every link adds doubt. The transmitter has a maker’s limit of error, it sits in a room at 40 °C, and it was calibrated a year ago. The current passes through a sense resistor with a tolerance. An analogue to digital converter (ADC) turns the voltage into a whole number of counts, against a reference voltage that is itself not exact.
Six sources of doubt act on one number. Adding the six limits is too pessimistic: it assumes all six at their worst, in the same direction, at once. Ignoring five of them is too hopeful. The uncertainty budget is the agreed method between those two, set out in the Guide to the Expression of Uncertainty in Measurement, known as the GUM (JCGM 100:2008).
The error of a reading is the indication minus the true value. It is one number with a sign, and it is unknown. The uncertainty is a statement about how large that unknown error could reasonably be. It has no sign, and it is known, because you calculate it.
The terms have the meanings of the international vocabulary (VIM, JCGM 200:2012), as in what a reading is worth.
A tolerance, a spread of readings and a line on a certificate cannot be combined until they are in one common form. That form is the standard uncertainty, written
There are two ways to arrive at a standard uncertainty. They are named by the method of evaluation, not by the kind of error.
A Type A evaluation uses statistics on readings you took yourself. Take
Type A standard uncertainty
Use
Ten readings of a transmitter with
A Type B evaluation uses information that does not come from your own repeated readings: a datasheet, a tolerance class, a calibration certificate, a handbook. Most terms in an industrial budget are Type B.
The information usually arrives as a limit, written ±
| What you are given | Distribution | Divisor | Standard uncertainty |
|---|---|---|---|
| A maker’s limit ± | Rectangular | ||
| A limit ± | Triangular | ||
| A certificate that states an expanded uncertainty | Normal | 2 | |
| A standard deviation, from readings or stated as such | Normal | 1 | the value itself |
| A digital step of size | Rectangular, half-width |
The rectangular distribution is the honest choice when a limit is all you have. Its standard deviation is
A source of uncertainty is often not in the unit of the result. The tolerance of a resistor is in ohms and the result is in bar. The sensitivity coefficient
Here
Two simple cases cover much field work. For a sum or a difference, both coefficients have the size 1, so the standard uncertainties in units combine directly. For a product or a quotient, the same holds for the relative uncertainties
Combined standard uncertainty
This is the root sum of squares. Each contribution is squared, the squares (the variances) are added, and the root is taken. It is valid when the sources are independent of each other.
Variances add, and standard uncertainties do not. Two independent errors rarely reach their worst values together and in the same direction, so the combined doubt is less than the plain sum, as 4 steps east and 3 steps north take you 5 steps from the start, not 7.
One standard deviation covers only about 68 percent of cases for a normal distribution. To state an interval that a reader can rely on, multiply by a coverage factor
Expanded uncertainty
With
Write
Because the terms are squared before they are added, the large ones count far more than their size suggests. The share of a term is its variance divided by the total variance:
A term that is one third of the largest term adds only about 5 percent to the combined value, since
The root sum of squares assumes independent sources. Two readings taken through the same converter share its reference error. Shared errors are called correlated, and they do not combine by squares: in a sum they add directly, and in a difference they cancel. Application 2 shows a case. The budget also covers only the sources you listed. A blocked impulse line or a wrong range typed into the controller is a mistake, not an uncertainty, and no budget contains it.
Chain. The current is
What the software calculates. It reverses the chain with the nominal values
The factor 1000 changes amperes to milliamperes, and
Working point at 4.0 bar.
Note that 4.0 bar is 40 percent of the span but 10.4 mA is 52 percent of 20 mA, because of the 4 mA live zero. ✅
Every source here is a maker’s limit, so every one is a Type B evaluation with a rectangular distribution and a divisor of
Maker’s accuracy. 0.5 percent of the 10 bar span is a limit of ±0.050 bar.
The limit is the same at every pressure because it is a percent of span. ✅
Temperature effect. The room is
The maker gives a limit for the temperature coefficient, not its value or its sign, so it cannot be corrected and is treated as a doubt. ✅
Drift. One year at 0.2 percent of span per year is a limit of ±0.020 bar.
✅
Sense resistor. 0.1 percent of 150 Ω is a limit of ±0.150 Ω.
This is in ohms and needs a sensitivity coefficient. ✅
ADC quantisation. The converter rounds to a whole count, so the rounding error lies between
✅
Reference voltage. 0.5 percent of 3.3 V is a limit of ±0.0165 V.
✅
Transmitter terms. Accuracy, temperature effect and drift are already in bar at the transmitter, and the chain passes them on unchanged:
Sense resistor. If the real resistor is larger than 150 Ω by some fraction, the voltage is larger by the same fraction, and the software reads that as more current. The error is a percentage of the whole current, 10.4 mA, not of the pressure.
As a check: 0.1 percent of 10.4 mA is 0.0104 mA, and
One ADC count.
One count is 0.806 mV, or 5.37 µA, or 0.0034 bar. This is the resolution of the reading. ✅
Reference voltage. The ADC measures the voltage as a fraction of its reference. If the real reference differs from 3.3 V by some percentage, every voltage reading is wrong by that percentage of the reading. Again the error is a percentage of the whole current.
As a check: 0.5 percent of 10.4 mA is 0.052 mA, and
The budget. Each contribution is the standard uncertainty multiplied by the sensitivity coefficient.
| Source | Value (limit) | Distribution | Divisor | Standard uncertainty | Sensitivity coefficient | Contribution (bar) |
|---|---|---|---|---|---|---|
| Maker’s accuracy | ±0.050 bar | Rectangular | 0.02887 bar | 1 | 0.02887 | |
| Temperature effect, 15 °C | ±0.030 bar | Rectangular | 0.01732 bar | 1 | 0.01732 | |
| Drift, one year | ±0.020 bar | Rectangular | 0.01155 bar | 1 | 0.01155 | |
| Sense resistor, 0.1 % | ±0.150 Ω | Rectangular | 0.0866 Ω | 0.04333 bar/Ω | 0.00375 | |
| ADC quantisation | ±0.5 count | Rectangular | 0.2887 count | 0.003357 bar/count | 0.00097 | |
| Reference voltage, 0.5 % | ±0.0165 V | Rectangular | 0.00953 V | 1.970 bar/V | 0.01876 |
All six rows are Type B. ✅
Squares. In units of
Combined standard uncertainty.
✅
Expanded uncertainty.
✅
Result in the standard form.
The pressure is between 3.92 and 4.08 bar with a coverage of about 95 percent. The expanded uncertainty is 2.0 percent of the reading. ✅
Share of each term. Divide each variance by 1633.8.
| Source | Contribution (bar) | Share of the variance |
|---|---|---|
| Maker’s accuracy | 0.02887 | 51.0 % |
| Reference voltage | 0.01876 | 21.6 % |
| Temperature effect | 0.01732 | 18.4 % |
| Drift | 0.01155 | 8.2 % |
| Sense resistor | 0.00375 | 0.9 % |
| ADC quantisation | 0.00097 | 0.1 % |
The transmitter’s own accuracy is half of the variance. The reference voltage of the converter is second, ahead of temperature and drift. ✅
Halve the smallest term. Replace the 12-bit ADC by a 13-bit one, so that one count is half as large. The variance of that term falls from 0.9 to 0.2.
Halve the largest term. Replace the transmitter by one with ±0.25 percent of span. The variance of that term falls to a quarter, from 833.3 to 208.3.
The result becomes 4.00 bar ± 0.06 bar (k = 2). The expanded uncertainty falls by 21 percent. ✅
Compare with adding the limits. The plain sum of the six limits in bar is
This worst case is 1.7 times the expanded uncertainty, and it has no stated coverage. It would be reached only if all six errors were at their limits with the same sign. ✅
Check a second way. The Python script simulates 400 000 instruments. For each one it draws the errors at random inside their limits and passes a true pressure of 4.0 bar through the full chain, with rounding to whole counts. The standard deviation of the indications is 0.0404 bar, equal to
Check it on site. A budget is a prediction, so test it once. Connect a reference gauge with a certificate (
The drop.
Uncertainty of each reading. From Application 1,
✅
Uncertainty of the difference. For
✅
Result.
In a real controller both transmitters are read by the same converter, so the two readings share one reference error.
Separate the shared term. Remove the reference term from each reading. The variances that remain are
Sensitivity of the difference to the reference. A reference error moves both readings in the same direction, so only the difference of the two coefficients acts on the drop.
The contribution is
Combined.
✅
Result.
Why it is different. A differential transmitter measures the drop directly. Its limits are percentages of its own span of 1 bar, not of 10 bar, so every transmitter term is ten times smaller. ✅
Combined. The six variances in units of
✅
Result.
Check a second way. The script simulates the two-transmitter arrangement with one shared reference and finds a standard deviation of 0.0506 bar for the difference, equal to the value of Step 2. ✅
The script builds the budget of Application 1 from the datasheet values, prints each row with its share, repeats it with the smallest and the largest term halved, checks it by simulation, and calculates the pressure drop of Application 2 in the three ways. It saves two plots in one image: the shares as bars, and the simulated distribution of errors with the limits ±
"""Uncertainty budget of a 0 to 10 bar transmitter read by a 12-bit ADC,and the uncertainty of a pressure difference from two such transmitters."""import numpy as npimport matplotlib.pyplot as plt
SPAN = 10.0 # barR_NOM = 150.0 # ohm, sense resistorVREF = 3.3 # V, ADC referenceCOUNTS = 4096 # 12-bit converterBAR_PER_MA = SPAN / 16.0ROOT3 = np.sqrt(3.0)
def budget(pressure, span=SPAN, room_temp=40.0, years=1.0, acc=0.5, temp_coef=0.02, drift=0.2, r_tol=0.1, ref_tol=0.5, adc_counts=COUNTS): """Return a list of (name, limit, unit, u, c, contribution in bar).""" bar_per_ma = span / 16.0 current = 4.0 + pressure / bar_per_ma # mA count_bar = VREF / adc_counts / R_NOM * 1000.0 * bar_per_ma rows = [] a = acc / 100.0 * span rows.append(("accuracy", a, "bar", a / ROOT3, 1.0)) a = temp_coef / 100.0 * span * abs(room_temp - 25.0) rows.append(("temperature", a, "bar", a / ROOT3, 1.0)) a = drift / 100.0 * span * years rows.append(("drift", a, "bar", a / ROOT3, 1.0)) a = r_tol / 100.0 * R_NOM rows.append(("resistor", a, "ohm", a / ROOT3, bar_per_ma * current / R_NOM)) a = 0.5 rows.append(("ADC step", a, "count", a / ROOT3, count_bar)) a = ref_tol / 100.0 * VREF rows.append(("reference", a, "V", a / ROOT3, bar_per_ma * current / VREF)) return [(n, a, unit, u, c, u * c) for n, a, unit, u, c in rows]
def combine(rows): contrib = np.array([r[5] for r in rows]) return np.sqrt(np.sum(contrib**2))
def show(rows, title): uc = combine(rows) print(title) print(" source limit u c u*c (bar) share") for name, a, unit, u, c, uc_i in rows: print(f" {name:<12} {a:>7.4f} {unit:<5} {u:>9.5f} {c:>10.6f} " f"{uc_i:>10.5f} {100.0 * uc_i**2 / uc**2:>5.1f} %") print(f" combined standard uncertainty u_c = {uc:.4f} bar") print(f" expanded uncertainty U = 2 u_c = {2.0 * uc:.4f} bar") return uc
# ---------- Part 1: the budget at 4.0 bar ----------P = 4.0current = 4.0 + P / BAR_PER_MAvolt = current / 1000.0 * R_NOMprint(f"At {P:.1f} bar: {current:.1f} mA, {volt:.3f} V, " f"{volt / VREF * COUNTS:.0f} counts")rows = budget(P)uc = show(rows, "Budget at 4.0 bar, 40 degC, one year after calibration")print(f" result: {P:.2f} bar +/- {2.0 * uc:.2f} bar (k = 2), " f"{100.0 * 2.0 * uc / P:.1f} % of the reading")print(f" sum of all the limits (worst case): {sum(r[1] * r[4] for r in rows):.4f} bar")
print(f" as built: u_c = {uc:.5f}, U = {2 * uc:.4f} bar")uc_adc = combine(budget(P, adc_counts=2 * COUNTS))uc_acc = combine(budget(P, acc=0.25))print(f" smallest term halved (13-bit ADC): u_c = {uc_adc:.5f}, U = {2 * uc_adc:.4f} bar")print(f" largest term halved (0.25 % of span): u_c = {uc_acc:.5f}, U = {2 * uc_acc:.4f} bar")
# ---------- Part 2: check by simulation (Monte Carlo) ----------rng = np.random.default_rng(1)N = 400_000
def simulate(pressure, n, span=SPAN, vref_true=None, rng=rng): """Indicated pressure for n random instruments, every limit rectangular.""" bar_per_ma = span / 16.0 e_tx = (rng.uniform(-0.005, 0.005, n) + rng.uniform(-0.003, 0.003, n) + rng.uniform(-0.002, 0.002, n)) * span # bar i_true = 4.0 + (pressure + e_tx) / bar_per_ma # mA r_true = R_NOM * (1.0 + rng.uniform(-0.001, 0.001, n)) if vref_true is None: vref_true = VREF * (1.0 + rng.uniform(-0.005, 0.005, n)) v = i_true / 1000.0 * r_true counts = np.round(v / vref_true * COUNTS) v_calc = counts * VREF / COUNTS return (v_calc / R_NOM * 1000.0 - 4.0) * bar_per_ma
ind = simulate(P, N)print("Simulation of 400000 instruments at 4.0 bar")print(f" standard deviation {ind.std():.4f} bar, " f"inside +/- U: {100.0 * np.mean(np.abs(ind - P) <= 2.0 * uc):.1f} %")
# ---------- Part 3: pressure drop across a filter ----------P1, P2 = 4.00, 3.70rows1, rows2 = budget(P1), budget(P2)u1, u2 = combine(rows1), combine(rows2)u_ind = np.hypot(u1, u2)print("Pressure drop from two transmitters")print(f" u(P1) = {u1:.4f} bar, u(P2) = {u2:.4f} bar")print(f" separate references: u = {u_ind:.4f} bar, U = {2 * u_ind:.3f} bar, " f"{100.0 * 2 * u_ind / (P1 - P2):.0f} % of the drop")# shared reference: its error acts on both readings, so only the difference feels itvar_rest = sum(r[5]**2 for r in rows1[:-1]) + sum(r[5]**2 for r in rows2[:-1])c_ref = rows1[-1][4] - rows2[-1][4]u_ref_diff = c_ref * rows1[-1][3]u_shared = np.sqrt(var_rest + u_ref_diff**2)print(f" shared reference: reference term {u_ref_diff:.5f} bar, " f"u = {u_shared:.4f} bar, U = {2 * u_shared:.3f} bar")vref_same = VREF * (1.0 + rng.uniform(-0.005, 0.005, N))d_sim = simulate(P1, N, vref_true=vref_same) - simulate(P2, N, vref_true=vref_same)print(f" simulated, shared reference: standard deviation {d_sim.std():.4f} bar")rows_dp = budget(P1 - P2, span=1.0)u_dp = combine(rows_dp)print(f" one differential transmitter, 0 to 1 bar: u = {u_dp:.5f} bar, " f"U = {2 * u_dp:.4f} bar, {100.0 * 2 * u_dp / (P1 - P2):.1f} % of the drop")print(f" ratio of the two expanded uncertainties: {u_shared / u_dp:.0f}")
# ---------- Plot ----------names = [r[0] for r in rows]share = [100.0 * r[5]**2 / uc**2 for r in rows]order = np.argsort(share)fig, ax = plt.subplots(1, 2, figsize=(10, 4.2))ax[0].barh([names[i] for i in order], [share[i] for i in order])ax[0].set_xlabel("share of the variance (%)")ax[0].set_title("Budget at 4.0 bar")ax[1].hist(ind - P, bins=120, density=True)for x in (-2 * uc, 2 * uc): ax[1].axvline(x, color="black", linestyle="--")ax[1].set_xlabel("error of the indication (bar)")ax[1].set_title("Simulated errors, dashed lines at +/- U")fig.tight_layout()fig.savefig("uncertainty_budget.png", dpi=120)print("Saved uncertainty_budget.png")Expected output
At 4.0 bar: 10.4 mA, 1.560 V, 1936 countsBudget at 4.0 bar, 40 degC, one year after calibration source limit u c u*c (bar) share accuracy 0.0500 bar 0.02887 1.000000 0.02887 51.0 % temperature 0.0300 bar 0.01732 1.000000 0.01732 18.4 % drift 0.0200 bar 0.01155 1.000000 0.01155 8.2 % resistor 0.1500 ohm 0.08660 0.043333 0.00375 0.9 % ADC step 0.5000 count 0.28868 0.003357 0.00097 0.1 % reference 0.0165 V 0.00953 1.969697 0.01876 21.6 % combined standard uncertainty u_c = 0.0404 bar expanded uncertainty U = 2 u_c = 0.0808 bar result: 4.00 bar +/- 0.08 bar (k = 2), 2.0 % of the reading sum of all the limits (worst case): 0.1407 bar as built: u_c = 0.04042, U = 0.0808 bar smallest term halved (13-bit ADC): u_c = 0.04041, U = 0.0808 bar largest term halved (0.25 % of span): u_c = 0.03176, U = 0.0635 barSimulation of 400000 instruments at 4.0 bar standard deviation 0.0404 bar, inside +/- U: 96.1 %Pressure drop from two transmitters u(P1) = 0.0404 bar, u(P2) = 0.0400 bar separate references: u = 0.0569 bar, U = 0.114 bar, 38 % of the drop shared reference: reference term 0.00087 bar, u = 0.0506 bar, U = 0.101 bar simulated, shared reference: standard deviation 0.0506 bar one differential transmitter, 0 to 1 bar: u = 0.00391 bar, U = 0.0078 bar, 2.6 % of the drop ratio of the two expanded uncertainties: 13Saved uncertainty_budget.pngThe column c is the sensitivity coefficient and u*c is the contribution in bar. The simulated distribution is a sum of rectangular terms, so its tails are slightly shorter than normal. That is why 96.1 percent, a little more than 95 percent, falls inside ±
1. Convert each statement to a standard uncertainty: (a) a thermometer with a maker’s limit of ±0.3 °C, (b) a calibration certificate that states
(a) Rectangular:
2. The three sources of exercise 1 act on one temperature result, each with a sensitivity coefficient of 1. Find the expanded uncertainty for
3. The power of a single-phase heater is found from
4. Repeat the budget of Application 1 for an indication of 8.0 bar, with all other data unchanged. Which term is now the largest?
The current is 16.8 mA. The three transmitter terms are unchanged (0.02887, 0.01732, 0.01155 bar) and so is the ADC term (0.00097 bar). The resistor term is
5. A chilled water circuit has a supply temperature of 7.0 °C and a return temperature of 12.0 °C. Each is measured with an independent standard uncertainty of 0.15 °C. Find the temperature difference with its expanded uncertainty (
A pressure reading has six sources of uncertainty. One of them is the step of a 12-bit converter. You replace it with a 13-bit converter, so that this one term is halved. What happens to the uncertainty of the reading?
Each slider is the limit of one source, from zero to three times the lesson's value. Every limit here is a maker's limit, so it is divided by √3 and multiplied by its sensitivity coefficient to give a contribution in bar. The bar of a row is its share of the variance: its contribution squared, divided by the sum of all six squares. The gold bar is the dominant term. The simple sum adds the six limits in bar as if all were at their worst with the same sign. It has no stated coverage.
Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.
1. A datasheet gives the accuracy of a transmitter as ±0.050 bar and says nothing more. What standard uncertainty goes into the budget?
2. The 0 to 10 bar transmitter reads 4.0 bar, which is 10.4 mA. The reference voltage of the converter has a tolerance of ±0.5 percent. What is this limit in bar?
3. In the lesson's budget U = 0.0808 bar, and the maker's accuracy holds 51 percent of the variance. You fit a transmitter with half the limit (±0.025 bar). What is the new expanded uncertainty?
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.