Bivariate Polynomial Fitting Methods for Multi Temperature Sensor Calibration
Bivariate polynomial fitting corrects non-linear sensor temperature cross-sensitivity by mapping primary outputs and thermal data across scaled matrix surfaces.

Surface
Thermal cross-sensitivity degrades primary sensor response whenever temperature gradients shift across an array. Platinum resistance elements, piezoresistive pressure cells, and capacitive humidity bridges suffer non-linear output shifts as ambient thermal conditions move across industrial operational bands. A single-variable polynomial treats thermal drift as if it were an isolated scalar offset.
Real sensing elements, however, show coupled dependencies where output magnitude varies non-linearly across both the primary physical stimulus and ambient sensor temperature.
Mapping this dual dependency requires a continuous mathematical representation across two independent variables. The raw sensor signal serves as the first variable, while a dedicated temperature monitoring element or adjacent reference diode supplies the second. A bivariate surface function fits these dual inputs against an absolute reference standard, mapping raw output codes directly to corrected engineering units.
The mathematical formulation defines corrected output z as a combined power series of primary input x and temperature input y. Order m governs the primary input terms, while order n controls the thermal terms. The general expansion takes the form:
z = sum_{i=0}^m sum_{j=0}^n c_{ij} x^i y^j
Finding the coefficient array c_{ij} requires structured calibration data collected across a controlled grid of operating points. Combining a second-order expansion in primary response with a third-order expansion in temperature produces twelve distinct surface coefficients. Selecting appropriate orders depends on underlying sensor physics: silicon strain gauges demand higher thermal expansion orders than wire-wound resistance elements due to piezoresistive temperature coefficient curvature.
Uncertainty in surface interpolation increases by a factor of four near the physical boundaries of the calibration domain when order selection exceeds three.
Surface fitting merges primary linearity correction and ambient thermal compensation into a single mathematical transformation. On high-throughput production benches, dual-variable mapping can eliminate downstream thermal chamber steps. When spatial gradients form across the physical sensor substrate, primary signal output drifts independently of ambient temperature readings.
Metrologists must then determine whether residual surface error originates from rapid ambient thermal swings or mathematical surface under-fitting.
Whether unmodeled high-order thermal hysteresis limits the long-term accuracy of a twelve-coefficient bivariate fit remains a matter for empirical verification across extended operating cycles.

Matrix
Constructing the linear system for bivariate polynomial fitting relies on an extended Vandermonde structural matrix. Each row in matrix X corresponds to an individual calibration measurement point, while each column represents a bivariate monomial term x^i y^j. For N calibration data points and K total polynomial terms, matrix X maintains dimension N by K. The vector of known standard values z forms an N-element column vector.
Setting up the normal equations yields:
(X^T X) c = X^T z

What Condition Number Triggers Calibration Matrix Ill Conditioning?
Checking matrix condition numbers identifies numeric instability before deploying coefficients. Raw sensor digital outputs frequently run between thousands and millions of counts, whereas temperature values span much narrower ranges. Computing powers of raw counts within matrix X causes column magnitudes to diverge by ten orders of magnitude.
The condition number of matrix product X^T X then exceeds the floating-point precision limit of standard double-precision solvers, causing catastrophic numerical cancellation during matrix inversion.
Centering and scaling raw input variables mitigates ill-conditioning. Subtracting the arithmetic mean from each input variable and dividing by its sample standard deviation restricts input domains to the interval between negative two and positive two. This linear variable transformation brings the Vandermonde matrix columns into comparable numerical bounds, reducing condition numbers from extreme exponential levels down to manageable double-digit magnitudes.
| Polynomial Order (m, n) | Variable Scaling Applied | Solver Algorithm | Matrix Condition Number | Residual RMS Error (mK) |
|---|---|---|---|---|
| 2, 2 | None (Raw Data) | Normal Equations (LU) | 1.4e14 | 18.4 |
| 2, 2 | Mean Centered and Scaled | Normal Equations (LU) | 4.2e02 | 1.2 |
| 3, 3 | None (Raw Data) | Normal Equations (LU) | 8.8e18 | 242.0 |
| 3, 3 | Mean Centered and Scaled | QR Decomposition | 1.8e03 | 0.4 |
| 3, 3 | Mean Centered and Scaled | Singular Value Decomposition | 1.8e03 | 0.4 |
Solving scaled systems demands robust numerical decomposition methods. Inverting X^T X directly amplifies errors and degrades output stability. Singular Value Decomposition decomposes matrix X into orthogonal matrices U and V alongside singular values S; setting near-zero singular values to absolute zero eliminates collinear column dependencies without introducing artificial variance.
QR decomposition using Householder reflections offers comparable numerical stability with reduced computational overhead on factory calibration computers.
- Raw Data Ingestion collect uncorrected primary counts and thermal monitor values alongside verified reference values.
- Domain Normalization transform input variables to zero mean and unit variance to stabilize Vandermonde column magnitudes.
- Structural Matrix Construction populate bivariate monomial columns up to the specified maximum orders m and n.
- Decomposition and Solution compute surface coefficients using singular value decomposition to resolve potential collinearities.
- Coefficient Denormalization convert scaled surface coefficients back to raw register scales for embedded microcontroller storage.
Running coefficient calculations on raw, unscaled inputs leads to localized math overflow on embedded microcontrollers, delivering corrupted temperature corrections to downstream control units.

Chamber
Data quality depends on thermal equilibrium inside the calibration environment. Automated liquid calibration baths and forced-air environmental chambers house multi-sensor fixtures during data acquisition sweeps. Spatial temperature non-uniformity across the chamber volume introduces systematic bias into reference measurements.
Positioning reference platinum resistance thermometers directly adjacent to test units reduces spatial gradient errors.
Thermal soak time dictates sensor stabilization. Sensing elements encased in heavy stainless steel housings display long thermal time constants. Acquiring data before internal thermal equilibrium is reached shifts raw response curves relative to reference standards.
Dynamic thermal sweeps introduce thermal lag errors that distort bivariate surface geometry, making step-and-hold temperature profiling necessary to guarantee static equilibrium at each calibration node.
Spatial temperature variations exceeding ten millikelvin across a test fixture distort bivariate coefficient calculations across all thermal orders.
Design of experiments methodology determines calibration grid density. Full factorial sampling records sensor array readings across every combination of primary stimulus and ambient temperature. Sparse grid sampling and Latin hypercube techniques reduce total chamber dwell time by selecting targeted coordinate points across the operational envelope.
Sparse sampling maintains matrix invertibility while cutting total chamber run time by sixty percent.
| Sampling Method | Total Calibration Points | Relative Bath Dwell Time | Matrix Rank Status | Maximum Boundary Interpolation Error |
|---|---|---|---|---|
| Full Factorial Grid (5×5) | 25 | 1.00 | Full Rank | Baseline (+/- 0.015 C) |
| Full Factorial Grid (3×3) | 9 | 0.36 | Full Rank | 1.8x Baseline |
| Sparse Grid (Targeted) | 12 | 0.48 | Full Rank | 1.1x Baseline |
| Latin Hypercube Array | 10 | 0.40 | Rank Deficient Risk | 2.4x Baseline |
Self-heating in active sensing elements creates hidden thermal offsets. As primary excitation currents pass through resistive bridges, they generate localized internal heat. Calibration routines must therefore maintain identical electrical duty cycles between bench calibration and field deployment.
Changing excitation voltage after bivariate coefficient generation invalidates calculated thermal compensation parameters.
Thermal surface fit discrepancies often stem from uncalibrated excitation source noise rather than ambient chamber drift.

Residuals
Evaluating fit quality requires structured inspection of surface residuals ~ the arithmetic differences between reference standard values and surface model predictions across all calibration points. Randomly distributed residuals centered around zero confirm correct polynomial order selection. In contrast, structured residual patterns, such as parabolic distributions or systematic spatial ripples, signal model under-fitting.
Polynomial over-fitting generates severe interpolation errors between calibration points. Increasing polynomial order m or n to match data point counts forces fit residuals to zero at discrete nodes. Between these nodes, high-order polynomial curves oscillate wildly, a phenomenon known as Runge phenomenon in two-dimensional space.
Validating surfaces against independent check-points placed between calibration nodes exposes these unphysical surface oscillations.
Uncertainty budgets must combine bath non-uniformity with residual model fit variance using root sum square addition.
Propagating calibration uncertainty into bivariate model output follows standard metrological guidelines. Total standard uncertainty combines reference PRT uncertainty, bath instability, signal acquisition noise, and surface model residual variance. Sensitivity coefficients derive from partial derivatives of the surface equation with respect to each input variable:
u_combined^2 = (dz/dx)^2 u_x^2 + (dz/dy)^2 u_y^2 + 2 (dz/dx) (dz/dy) u_xy + u_fit^2
Evaluating polynomial fit selection relies on key model metrics.
- Order Adequacy Verification inspect residual plots for non-random geometric trends indicating insufficient thermal expansion order.
- Cross Validation Analysis calculate prediction error sum of squares by systematically withholding individual calibration points during solver runs.
- Parameter Significance Testing evaluate individual coefficient standard errors to identify unnecessary high-order terms.
- Boundary Divergence Check test surface extrapolation points outside the calibrated temperature domain to detect Runge oscillation growth.
Surface polynomial order selection stops when residual variance matches the underlying hardware noise floor.

Receipt
Implementing bivariate calibration models directly shapes production line economics. Dwell time inside precision temperature chambers represents the single largest cost driver in high-accuracy sensor manufacturing. A twenty-five point full factorial calibration grid requires five distinct bath temperature holds, keeping test racks occupied for six hours per batch.
Transitioning to a nine-point sparse grid reduces chamber occupancy time to two hours, increasing bench throughput by a factor of three.
Computational resource allocation on embedded microcontrollers constrains surface polynomial order choices. Storing twelve floating-point coefficients demands forty-eight bytes of EEPROM per sensor channel. Evaluating a bivariate polynomial with order m=2 and n=3 requires nineteen multiplication operations and eleven addition operations per conversion cycle.
Fixed-point arithmetic microcontrollers require scaled integer coefficient conversions, adding firmware complexity and potential rounding errors during runtime signal evaluation.
- EEPROM Allocation Drift writing uncompressed floating-point surface coefficients without checksum validation risks corrupting calibration registers during power-cycle events.
- Extrapolation Domain Overrun operating sensors outside factory-calibrated thermal bounds causes high-order polynomial corrections to diverge rapidly.
- Excitation Current Mismatch executing calibration runs with bench power supplies while field units run on unregulated battery voltages introduces uncompensated thermal offsets.
- Uncalibrated Thermal Monitors using low-cost internal microcontroller temperature sensors with uncorrected zero-point errors shifts the secondary input axis of the bivariate surface.
Landed costs climb significantly when field applications require traceable re-calibration intervals. Field calibration of multi-variable sensor arrays requires portable multi-temperature reference sources or modular sensor swapping programs. Recalibrating bivariate surfaces in field environments demands automated routines capable of acquiring multi-variable coordinates without removing hardware from operational piping.
Sensor designs incorporating factory-programmed coefficient arrays in smart digital heads permit field replacement without requiring system-level thermal re-calibration.
Over years of continuous service, long-term mechanical stress and package strain shift primary zero-point offsets. Single-point zero adjustments shift the entire bivariate surface vertically along the z-axis without altering calculated surface curvature coefficients. Re-zeroing field units at a single known reference point restores primary measurement accuracy across the full operational temperature domain, preserving initial factory bivariate calibration investments over extended operational lifespans.

