Open Gauge Documentation
CalibrationWorked examples

Example 2 — Pressure transducer, quadratic fit (auto degree selection)

Automatic polynomial-degree selection via AIC, non-linearity detection, and the t-distribution coverage-factor path.

Exercises: automatic polynomial-degree selection (AIC), non-linearity detection, and the t-distribution / Welch-Satterthwaite coverage-factor path.

2.0 Setup

One asset, one channel:

FieldValue
NameLine Pressure Transmitter
Physical quantityPressure
Measurement typeAbsolute (either is fine for this example)
Range min / max0 / 700
UnitkPa
Accuracy value1.0
Accuracy unit% FS — fill in Range min/max first, then pick "% FS" as the first option
Resolution0.5
Resolution unitkPa

Leave measurement_uncertainty blank (not used in this example).

2.1 Calibration wizard settings

Type external (no reference asset needed), Regression degree: Auto (the point of this example), distribution t-distribution, confidence 95% (the t-distribution path derives its own coverage factor from the confidence level and the fit's effective degrees of freedom), decision rule Simple acceptance.

Data points — a transducer with a small but real quadratic non-linearity across its range:

#Reference (kPa)Measured (kPa)
10.600
2102.35100
3212.62200
4330.42300
5456.64400
6590.40500
7732.59600
8882.38700

The math

Open Gauge tries degree 1 through 5 and picks the lowest degree whose AIC isn't beaten by more than 2 points by a higher degree (the parsimony rule). For this data it selects degree 2:

reference=0.00040measured2+0.98014measured+0.50917\text{reference} = 0.00040 \cdot \text{measured}^2 + 0.98014 \cdot \text{measured} + 0.50917

(Try forcing "Regression degree: 2" explicitly — you should get the same coefficients as the auto-selected result, confirming AIC picked the same degree you'd pick by eye from the data.)

PointCalculatedResidual
10.509167+0.090833
2102.519881−0.169881
3212.523929+0.096071
4330.521310−0.101310
5456.512024+0.127976
6590.496071−0.096071
7732.473452+0.116548
8882.444167−0.064167

n=8n = 8, k=3k = 3 (degree 2 → 3 coefficients) → residual dof =5= 5. Max error = 0.169881 (point 2); span =882.380.6=881.78= 882.38 - 0.6 = 881.78 → %FS error =0.169881/881.78×100%=0.0193%= 0.169881/881.78 \times 100\% = \mathbf{0.0193\%}.

Non-linearity = 3.17% FS — the deviation of the quadratic fit from its own best-fit straight line. This is the number confirming "yes, a straight line would have been a noticeably worse fit" — that degree 2 was the right call, not degree 1.

Uncertainty budget:

Sourceu
fit_residuals (Type A, dof = 5)0.119470
resolution (Type B) = 0.5/120.5/\sqrt{12}0.144338
  • Combined: uc=0.1194702+0.1443382=0.187367 kPau_c = \sqrt{0.119470^2 + 0.144338^2} = \mathbf{0.187367\ kPa}.
  • νeff=uc4/(uA4/5)30.2\nu_{\text{eff}} = u_c^4 / (u_A^4/5) \approx \mathbf{30.2} (only fit_residuals has finite dof).
  • Expanded (t-distribution): k=t0.975,ν=30.22.042U=0.187367×2.042=0.3825230.38 kPak = t_{0.975,\,\nu=30.2} \approx 2.042 \Rightarrow U = 0.187367 \times 2.042 = 0.382523 \approx \mathbf{0.38\ kPa} (2 sig figs).

Decision rule (simple acceptance, spec = ±1.0% FS = ±8.818 kPa):

max error=0.1698818.818    CONFORMS\text{max error} = 0.169881 \le 8.818 \implies \textbf{CONFORMS}

(comfortably — this is a "good" calibration example).

Expected results

FieldValue
Polynomial degree2 (auto-selected)
Non-linearity3.17%
Combined uncertaintyshown rounded: 0.19
Expanded uncertainty (±)shown rounded: 0.38
StatementCONFORMS to ±1.0% of full scale, decision rule = Simple acceptance

On this page