Bayesian Calibration of Digital Twins: Parameter Estimation, Kennedy-O’Hagan Model Discrepancy, MCMC and Surrogates

Bayesian Calibration of Digital Twins: Parameter Estimation, Kennedy-O’Hagan Model Discrepancy, MCMC and Surrogates

Digital Twin Calibration: Bayesian Parameter Estimation, Kennedy-O’Hagan Discrepancy, MCMC and Surrogates

A thermal twin can fit its sensor data to within the thermocouple noise and still report a heat-transfer coefficient that is 19% wrong, with a credible interval so tight it excludes the truth. That is not a contrived failure. It is what happens by default when digital twin calibration ignores the gap between the simulator and the physics it leaves out, and we reproduce it below in about sixty lines of NumPy. It matters now because twins are moving from dashboards into decisions: setpoint optimisation, remaining-life estimates, and regulatory credibility arguments all consume calibrated parameters as if they were facts. You will leave with a working mental model of Bayesian calibration, the Kennedy-O’Hagan framework for model discrepancy, how to make it tractable with MCMC and surrogate emulators, and a concrete policy for when an operating twin should recalibrate.

What this covers: calibration versus state estimation, the Bayesian set-up, identifiability, Kennedy-O’Hagan, Metropolis-Hastings and NUTS, GP and polynomial-chaos surrogates, Sobol sensitivity analysis, validation, recalibration triggers, and a runnable heat-transfer example.

Context and Background

Every physics-based twin has two kinds of unknowns. States change on the timescale of the process: a temperature field, a battery’s state of charge, a rotor’s angular position. Parameters change slowly or not at all: a convective film coefficient, a thermal capacitance, a friction coefficient, a fouling resistance. Estimating states in real time is the job of filters, and we have covered that machinery in depth in data assimilation with Kalman and ensemble Kalman filters. Digital twin calibration is the other job: inferring the slow parameters from a deliberately curated dataset, with honest uncertainty, before the filter ever runs.

The distinction is not pedantic. A Kalman filter can absorb a wrong parameter by pushing the state around until residuals look acceptable. The twin then tracks the present well but extrapolates badly, which is exactly when you wanted it. Augmented-state filters that estimate parameters online exist, but they inherit the filter’s Gaussian and linearisation assumptions and tend to struggle when parameters are weakly identifiable.

The statistical state of the art for Bayesian model calibration traces to Marc Kennedy and Anthony O’Hagan’s 2001 paper, “Bayesian calibration of computer models”, in the Journal of the Royal Statistical Society, Series B, volume 63, issue 3, pages 425–464. Its central move was to treat the simulator as imperfect and to model the inadequacy explicitly rather than let it leak into the parameters. Later work extended it to high-dimensional and functional outputs, notably the 2008 Journal of the American Statistical Association paper on calibration with high-dimensional output (volume 103, pages 570–583).

On the engineering side, credibility is governed by verification and validation standards. ASME V&V 20 covers computational fluid dynamics and heat transfer; ASME lists it as V&V 20-2009 (R2021), now on stabilised maintenance. ASME V&V 10-2019 (reaffirmed 2025) covers computational solid mechanics, and V&V 40-2018 introduced a risk-informed credibility framework for medical devices. We unpacked the latter in our post on ASME V&V 40 credibility evidence for digital twins. None of these standards prescribes a Bayesian method for digital twin calibration. They do, however, require you to account for uncertainty in both the solution and the data, which is precisely what Bayesian calibration produces.

How Bayesian Digital Twin Calibration Works: A Reference Architecture

Digital twin calibration is the process of inferring a simulator’s slow, physically meaningful parameters from measured data, with quantified uncertainty. In the Bayesian form, you combine a prior over parameters with a likelihood that encodes measurement noise and model discrepancy, then sample the posterior, typically with MCMC over a fast surrogate of the simulator.

Digital twin calibration architecture separating offline Bayesian parameter calibration from online data assimilation

Figure 1: Where Bayesian calibration sits in a digital twin. Slow parameters are calibrated offline on curated data; fast states are assimilated online; a residual monitor decides when to recalibrate.

The diagram shows two loops running at different speeds. The calibration loop consumes a curated dataset and engineering priors, produces a parameter posterior, and hands that posterior to the twin model. The assimilation loop consumes the live stream and corrects states every sample. A residual and drift monitor watches the assimilation loop and, when its evidence crosses a threshold, kicks the calibration loop. Keeping these loops separate is the single most useful architectural decision in digital twin calibration.

Bayes’ rule, written for engineers

Let θ be the vector of calibration parameters, x the controlled inputs (heater power, ambient temperature, flow rate), and y the observations. Bayes’ rule gives the posterior as proportional to likelihood times prior: p(θ | y) ∝ p(y | θ) p(θ). Everything interesting lives in how you build those two terms.

In digital twin calibration, the prior p(θ) encodes what you knew before the test. For physical parameters this is rarely “nothing”. A convective coefficient for natural convection in air sits in a known band; a thermal capacitance follows from a weighed mass and a handbook specific heat. A log-normal prior suits strictly positive parameters that you know to within a factor; a normal prior suits parameters you know to within a few percent. Uniform priors over wide ranges look neutral but are not: they put most of their mass at large values and are not invariant to reparameterisation.

The likelihood p(y | θ) encodes how data arise given parameters. The naive version says y = η(x, θ) + ε, where η is the simulator and ε is independent Gaussian sensor noise with standard deviation σ. The log-likelihood is then a sum of squared residuals scaled by σ², so maximum likelihood equals weighted least squares. The Bayesian version adds the prior and returns a whole distribution rather than a point.

Why the posterior beats a point estimate

A least-squares fit gives you one parameter vector and, at best, a covariance from a local linearisation. The posterior gives you the full shape: skew, multiple modes, and the ridges that reveal correlated parameters. Those ridges are the clearest diagnostic of identifiability, meaning whether the data can distinguish one parameter value from another.

Consider a lumped thermal body. Its temperature obeys C dT/dt = Q − hA(T − T∞), where C is thermal capacitance, h the film coefficient and A the surface area. In a pure cooling test, the solution is an exponential with time constant τ = C/(hA). The data pin τ precisely but say nothing about h and C separately. The posterior collapses onto a thin curved ridge where h/C is constant. In the worked example below, a cooling-only test produced a correlation of 0.999 between h and C. The h interval was set almost entirely by the prior on C.

Add a heating phase with known power and the steady-state temperature rise ΔT = Q/(hA) pins hA directly. The ridge disappears and the h–C correlation in our run dropped to about −0.02. The lesson generalises to all digital twin calibration: identifiability is a property of the experiment, not just the model. You fix it with excitation design, not with a cleverer sampler.

Where calibration ends and assimilation begins

A practical rule: if a quantity would still be meaningful after you power the asset down and back up, calibrate it; if it would not, assimilate it. Film coefficients, contact resistances, valve flow coefficients and stiffnesses are calibration targets. Temperatures, pressures, positions and charge states are assimilation targets. Our comparison of Kalman, particle and ensemble filters for state estimation covers the latter in detail.

Grey zones exist. Fouling, wear and degradation change parameters over weeks or months. Treat these as slowly varying calibration targets with a recalibration cadence, not as states, unless you have a physics model for their evolution. Pushing them into a filter state vector without such a model usually turns the filter into an expensive curve-fitter.

The architecture in Figure 1 also implies an artefact: the parameter posterior is a versioned object with provenance. It records the dataset, the priors, the simulator version and the diagnostics. When an auditor or a V&V reviewer asks why the twin believes h = 11.9 W/m²K, you need that record, not a number in a config file.

Calibration is not the same as sensor calibration

One more boundary worth drawing. Sensor calibration corrects the instrument: offset, gain, drift and the uncertainty budget in the GUM sense. Model calibration corrects the simulator’s parameters given trustworthy measurements. If sensor bias is not handled first, model calibration will happily absorb it into a physical parameter. Our guide to sensor calibration, drift compensation and GUM uncertainty covers that upstream step. In the likelihood, sensor uncertainty becomes σ and any known bias becomes an explicit term.

The Kennedy-O’Hagan Framework and Model Discrepancy

The naive likelihood assumes the simulator, at the right θ, reproduces reality up to sensor noise. No engineering simulator does. Lumped models ignore spatial gradients, CFD models use turbulence closures, and every model omits some physics. When the likelihood has no place to put that inadequacy, the calibration puts it into θ. The parameters then become tuning knobs rather than physical quantities.

Kennedy O'Hagan model discrepancy structure for digital twin calibration: simulator plus Gaussian process discrepancy plus noise

Figure 2: The Kennedy-O’Hagan decomposition. Observations equal the simulator output at the calibration parameters, plus a discrepancy function of the inputs, plus measurement noise.

Kennedy and O’Hagan wrote the observation model as y(x) = ζ(x) + ε, where ζ is the true process. They then decomposed reality as ζ(x) = η(x, θ) + δ(x). The discrepancy δ(x) depends on the controlled inputs but not on θ, and it receives a Gaussian process (GP) prior. Their original formulation also carries a multiplicative scale on the simulator term, which most engineering applications fix at one. When the simulator is expensive, η is itself replaced by a GP emulator trained on a design of simulator runs, so the full model has two GPs plus noise.

What a Gaussian process discrepancy buys you

A GP is a distribution over functions defined by a mean and a covariance kernel. A squared-exponential or Matérn kernel says “the discrepancy is smooth and correlated over a characteristic length in input space”. Its variance hyperparameter says how large the discrepancy can be. In effect, the GP gives the posterior a structured place to put systematic error, so that the residuals are no longer forced to be white.

Two practical benefits follow. First, the predictive distribution widens where the model is known to be inadequate, which is honest. Second, the posterior over θ widens to reflect that some of the misfit could be explained either way. That widening is uncomfortable, and it is correct.

The confounding problem

There is a catch, and it is the most important thing to understand about the Kennedy-O’Hagan approach. A flexible δ(x) can explain almost any misfit, so θ and δ are confounded. Many combinations of parameter and discrepancy fit the data equally well.

Jenny Brynjarsdóttir and Anthony O’Hagan made this point sharply in “Learning about physical parameters: the importance of model discrepancy” (Inverse Problems, volume 30, article 114007, 2014). Their conclusion has two halves. Ignoring discrepancy produces biased and over-confident parameters. Modelling discrepancy with a vague GP prior does not fix it either; only realistic prior information about δ resolves the confounding. Rui Tuo and C. F. Jeff Wu reached a related conclusion from the frequentist side in the Annals of Statistics (2015, volume 43, issue 6). They argued that the “true” parameter in the Kennedy-O’Hagan model is unidentifiable. They proposed defining the target as the L2 projection: the θ that minimises the L2 distance between reality and the simulator.

For a twin builder, the translation is direct. If you want θ to mean something physical, you must say something physical about δ. Useful statements include “the discrepancy is zero at steady state”, “it is bounded by 0.5 K”, “it is smooth over a length of ten minutes”, or “it is monotone in power”. Each one constrains the GP and breaks part of the confounding.

When to skip the discrepancy term

Not every digital twin calibration needs a full Kennedy-O’Hagan model. If you only need good interpolation inside the calibration envelope, a biased “effective” parameter is often fine. It is a tuning constant, and the twin will predict well where it was trained. Trouble starts when you extrapolate, when you transfer the parameter to a different asset, or when you hand it to a design engineer as a physical value.

A defensible middle path is common in industry. Calibrate without δ, then inspect the structured residuals. If they are white and within noise across all operating regimes, record the parameter as effective and move on. If they are structured, add δ with an informative prior, or improve the physics. Improving the physics is usually the better investment.

Walk-through: Digital Twin Calibration of a Heat-Transfer Coefficient

The following example is deliberately small so you can run it in two seconds and see every moving part. All numbers below are from a synthetic experiment run for this post. They are illustrative, not a benchmark of any product.

The “plant” is a 0.1 m aluminium cube with a surface area of 0.06 m² and a thermal capacitance of 2,430 J/K. That capacitance follows from 2.7 kg of aluminium at roughly 900 J/kg·K. A 20 W heater runs for three hours and then switches off for three hours, with ambient at 20 °C. Reality includes natural convection with h = 10 W/m²K and thermal radiation with an emissivity of 0.3. A thermocouple samples once a minute with 0.2 K of Gaussian noise.

The twin is a lumped-capacitance model with convection only. The lumped assumption is legitimate here. The Biot number Bi = hL/k, with characteristic length L = V/A ≈ 0.017 m and aluminium conductivity near 200 W/m·K, is under 0.001. That is far below the usual 0.1 threshold, below which the lumped approximation generally errs by less than about 3%. What the twin omits is radiation, which is exactly the kind of quiet physics gap that real twins carry.

Runnable NumPy Metropolis-Hastings

import numpy as np

rng = np.random.default_rng(42)

# ---- Synthetic "plant": 0.1 m aluminium cube, heater on for 3 h, then off for 3 h
A, T_inf, Q_on = 0.06, 293.15, 20.0          # m^2, K, W
t = np.arange(0, 6 * 3600 + 1, 60.0)          # 1-minute samples

def truth(h=10.0, C=2430.0, eps=0.3, sigma_sb=5.670e-8, dt=1.0):
    """Reality = convection + radiation (the twin will NOT model radiation)."""
    T, out, k = T_inf, [], 0
    for ti in np.arange(0, t[-1] + dt, dt):
        if k < len(t) and abs(ti - t[k]) < 1e-9:
            out.append(T); k += 1
        q = Q_on if ti < 3 * 3600 else 0.0
        T += dt * (q - h * A * (T - T_inf) - eps * sigma_sb * A * (T**4 - T_inf**4)) / C
    return np.array(out)

y_obs = truth() + rng.normal(0, 0.2, t.size)  # thermocouple noise 0.2 K

# ---- Twin model: lumped capacitance, convection only (analytic piecewise solution)
def twin(h, C):
    tau, dT_ss = C / (h * A), Q_on / (h * A)
    t_off = 3 * 3600
    heat = dT_ss * (1 - np.exp(-t / tau))
    dT_off = dT_ss * (1 - np.exp(-t_off / tau))
    cool = dT_off * np.exp(-(t - t_off) / tau)
    return T_inf + np.where(t < t_off, heat, cool)

# ---- Log posterior over phi = (log h, C)
def log_post(phi, sigma=0.2):
    log_h, C = phi
    if C <= 0:
        return -np.inf
    lp = -0.5 * ((log_h - np.log(10.0)) / 0.5) ** 2       # h ~ LogNormal(ln 10, 0.5)
    lp += -0.5 * ((C - 2430.0) / 150.0) ** 2               # C ~ Normal(2430, 150) J/K
    r = y_obs - twin(np.exp(log_h), C)
    return lp - 0.5 * np.sum((r / sigma) ** 2)

# ---- Random-walk Metropolis-Hastings
def run_chain(n=20000, start=(np.log(8.0), 2300.0), step=(0.003, 4.5)):
    phi, lp = np.array(start), log_post(start)
    chain, acc = np.empty((n, 2)), 0
    for i in range(n):
        prop = phi + rng.normal(0, step)
        lp_prop = log_post(prop)
        if np.log(rng.uniform()) < lp_prop - lp:
            phi, lp, acc = prop, lp_prop, acc + 1
        chain[i] = phi
    return chain[n // 2:], acc / n

chains = [run_chain(start=(np.log(s), c)) for s, c in [(6, 2200), (9, 2400), (14, 2600), (11, 2500)]]
draws = np.concatenate([c[0] for c in chains])
h_draws = np.exp(draws[:, 0])

def rhat(x):  # classic Gelman-Rubin on equal-length chains
    m, n = x.shape
    B = n * x.mean(1).var(ddof=1); W = x.var(1, ddof=1).mean()
    return np.sqrt(((n - 1) / n * W + B / n) / W)

print("acceptance:", [round(c[1], 3) for c in chains])
print("R-hat h:", round(rhat(np.stack([np.exp(c[0][:, 0]) for c in chains])), 4))
print("h posterior mean %.2f, 95%% CI [%.2f, %.2f] (true convective h = 10.0)"
      % (h_draws.mean(), *np.percentile(h_draws, [2.5, 97.5])))
print("C posterior mean %.0f, 95%% CI [%.0f, %.0f] (true C = 2430)"
      % (draws[:, 1].mean(), *np.percentile(draws[:, 1], [2.5, 97.5])))
print("corr(h, C):", round(np.corrcoef(h_draws, draws[:, 1])[0, 1], 3))
res = y_obs - twin(h_draws.mean(), draws[:, 1].mean())
print("residual RMS %.3f K vs noise 0.2 K; max |res| %.3f K" % (np.sqrt((res**2).mean()), abs(res).max()))

On our machine, with NumPy and the seed shown, the script printed the following. Four chains accepted about 22% of proposals. R-hat for h was 1.0004. The posterior mean of h was 11.92 W/m²K with a 95% credible interval of [11.90, 11.93]. Capacitance came back at 2,432 J/K, interval [2,425, 2,439]. The residual RMS was 0.192 K, statistically indistinguishable from the 0.2 K sensor noise.

Reading the result honestly

Every conventional diagnostic says this digital twin calibration succeeded. The chains mixed, R-hat is near one, residuals look like noise, and capacitance is spot on. Yet h is about 19% high and its credible interval excludes the true convective coefficient by a wide margin. This is the Brynjarsdóttir-O’Hagan warning reproduced in miniature: an unmodelled physics term was silently absorbed into a physical parameter, and the posterior became confidently wrong.

First principles explain the size of the bias. Linearised radiation behaves like an extra film coefficient h_rad ≈ 4εσT³. At roughly 300–310 K with ε = 0.3, that is about 1.8–2.0 W/m²K, which matches the 1.92 W/m²K excess almost exactly. The twin did not learn convection. It learned convection plus linearised radiation and called it h.

Is that a problem? For predicting this block’s temperature between 20 and 50 °C, no: the effective coefficient interpolates well. For predicting behaviour at 200 °C, where radiation grows with T⁴, or for a polished block with lower emissivity, yes. That is the general shape of digital twin calibration risk. The fit is fine; the transfer is not.

Fixing it three ways

The physics fix adds a radiation term with emissivity as a second parameter. Emissivity and h are partly confounded because both scale heat loss, so you need excitation that separates them. Tests at two very different temperature levels exploit radiation’s nonlinearity. A prior on emissivity from surface finish data also helps.

The statistical fix adds a GP discrepancy δ(t) with an informative prior. In this case “smooth, under 0.5 K, and zero at ambient” is a defensible statement. The posterior on h widens and should move toward 10, at the cost of extra hyperparameters and a harder sampling problem.

The pragmatic fix relabels h as “effective h valid between 20 and 50 °C for this emissivity”. You then enforce that validity envelope in the twin’s run-time guard rails. All three are legitimate, provided you choose one consciously.

Porting to PyMC and NUTS

Random-walk Metropolis-Hastings, introduced by Metropolis and colleagues in 1953 and generalised by Hastings in Biometrika (1970, volume 57, pages 97–109), is transparent but scales poorly. Roberts, Gelman and Gilks showed in 1997 (Annals of Applied Probability, volume 7, pages 110–120) that its asymptotically optimal acceptance rate is 0.234 under quite general conditions. Our tuned 22% sits near that. In high dimensions, however, the step size needed for acceptable acceptance shrinks, and mixing collapses.

The No-U-Turn Sampler (NUTS) of Hoffman and Gelman (Journal of Machine Learning Research, volume 15, 2014) uses gradients of the log posterior to make long, informed moves, and it tunes its own path length. It is the default in Stan and PyMC. The sketch below shows the same model in PyMC. It was written against the PyMC 5/6 modelling API but was not executed in this run, so treat it as a starting point rather than tested code.

import pymc as pm
import pytensor.tensor as pt

with pm.Model() as thermal_twin:
    h = pm.LogNormal("h", mu=np.log(10.0), sigma=0.5)
    C = pm.Normal("C", mu=2430.0, sigma=150.0)
    hA = h * A
    tau, dT_ss = C / hA, Q_on / hA
    t_off = 3 * 3600
    heat = dT_ss * (1 - pt.exp(-t / tau))
    cool = dT_ss * (1 - pt.exp(-t_off / tau)) * pt.exp(-(t - t_off) / tau)
    mu = T_inf + pt.switch(t < t_off, heat, cool)
    pm.Normal("y", mu=mu, sigma=0.2, observed=y_obs)
    idata = pm.sample(draws=1000, tune=1000, chains=4, target_accept=0.9)

Two release notes matter if you port this. PyMC 6.0.0 was released in May 2026, and the latest release on the project’s GitHub page at the time of writing is v6.3.2. The 6.x line uses nutpie as the default NUTS sampler when it is installed. It also moves to ArviZ 1.0, where the default summary interval changes from a 94% highest-density interval to an 89% equal-tailed interval. Pin your versions, and state the interval type explicitly in any report.

Surrogates and Sensitivity Analysis for Expensive Simulators

The thermal example evaluates its model in microseconds. A CFD conjugate heat-transfer model may take hours per run, and MCMC needs tens of thousands of evaluations. Direct MCMC on such a model is not viable, so digital twin calibration at industrial scale depends on surrogates. The standard answer is to build a cheap statistical emulator of the simulator and to run MCMC on that.

Surrogate-accelerated digital twin parameter estimation workflow with Sobol screening, GP emulator and NUTS sampling

Figure 3: A surrogate-accelerated calibration pipeline. Screen inputs, design runs, fit and validate an emulator, sample the posterior, then check predictions on held-out data.

The workflow has two validation gates, and both are commonly skipped. The emulator must be accurate relative to measurement noise before you sample with it. The sampler must converge before you trust the posterior. The final posterior predictive check on held-out data is the step that turns a fit into evidence.

Screen first with Sobol indices

Calibrating every uncertain input is a common digital twin calibration mistake. Parameters that barely affect the outputs you measured cannot be learned from those outputs; their posterior equals their prior, and they only slow the sampler. Variance-based global sensitivity analysis identifies them.

Sobol indices decompose output variance into contributions from each input and their interactions. The first-order index Sᵢ is the share of variance from input i alone. The total-effect index S_Tᵢ includes all interactions involving input i. An input with a total-effect index near zero for every measured output can be fixed at a nominal value. The usual references are Sobol’s 1993 and 2001 papers and the 2010 estimator paper by Saltelli and colleagues in Computer Physics Communications.

Cost is the catch. The Saltelli scheme needs N(d + 2) model runs for d inputs, where N is typically hundreds to thousands. For an expensive simulator you therefore run Sobol analysis on a cheap first-pass emulator, or analytically on a polynomial chaos expansion. In Python, SALib implements Sobol, Morris, eFAST, PAWN and several other methods; version 1.6.0 was released on PyPI in September 2026.

Gaussian process emulators

A GP emulator treats the simulator output as an unknown smooth function of its inputs and conditions on a set of design runs. Its great advantage for calibration is that it reports its own uncertainty. Between design points, emulator variance grows. Kennedy-O’Hagan fold that variance into the likelihood, so the posterior is not over-confident where the emulator is guessing.

How many runs do you need? Loeppky, Sacks and Welch (Technometrics, 2009, volume 51, pages 366–376) gave evidence for the informal rule of about ten runs per input dimension for an initial design. Use a space-filling design such as a maximin Latin hypercube. Concentrate later runs where the posterior actually lives, which is a natural fit for sequential design and Bayesian optimisation-style acquisition.

GPs have limits. Exact GP fitting scales cubically with the number of runs. Outputs that are time series or fields need dimension reduction first; principal components of the output is the classic route and underpins the high-dimensional calibration work cited above. Strongly non-stationary responses, such as regime changes or bifurcations, defeat stationary kernels.

Polynomial chaos and other surrogates

Polynomial chaos expansions (PCE) represent the output as a series of orthogonal polynomials in the uncertain inputs. The polynomial family is matched to the input distribution, an idea formalised as the Wiener-Askey scheme by Xiu and Karniadakis (SIAM Journal on Scientific Computing, 2002, volume 24, issue 2, pages 619–644). PCE has a neat bonus: Sobol indices fall out of the coefficients analytically, so sensitivity analysis is almost free once the expansion is built.

PCE suits smooth responses with few inputs and well-defined input distributions. It degrades with many inputs, because the number of terms grows combinatorially, and with discontinuities. Reduced-order models built by projection, and learned operators, are the other options. We compared them in our guide to reduced-order and surrogate models for real-time twins and in neural operators versus PINNs.

Choosing a surrogate

The decision matrix below summarises typical behaviour. It reflects the published properties of each method plus practitioner judgement, not a measured benchmark.

Criterion GP emulator Polynomial chaos Projection ROM (POD) Neural surrogate
Inputs handled comfortably Up to roughly tens Few to low tens Many, via physics Many
Built-in predictive uncertainty Yes Not directly No Only with extra machinery
Sobol indices Via sampling Analytic from coefficients Via sampling Via sampling
Training runs needed Low, about 10 per input to start Low to moderate Moderate snapshots High
Gradients for NUTS Analytic Analytic Needs intrusive code Autodiff
Main failure mode Non-stationarity, cubic cost Discontinuities, many inputs Out-of-subspace dynamics Silent extrapolation error

For most digital twin calibration problems with fewer than about fifteen active parameters after screening, a GP emulator is the safe default. Its own uncertainty is the feature that keeps the posterior honest.

Convergence and posterior checks

Convergence diagnostics are a gate, not a formality. Vehtari, Gelman, Simpson, Carpenter and Bürkner revised R-hat with rank normalisation and folding (Bayesian Analysis, 2021, volume 16, issue 2). They recommend using samples only when R-hat is below 1.01 and the rank-normalised effective sample size exceeds 400. They also recommend rank plots over traditional trace plots. Run at least four chains from dispersed starting points; a single chain cannot reveal multimodality.

A posterior predictive check then asks whether data simulated from the calibrated model look like the real data. Do this on data not used for calibration: a different duty cycle, ambient condition or asset. Check interval coverage as well as point error. If your nominal 90% predictive interval covers only 60% of held-out points, the calibration is over-confident, and the cause is usually missing discrepancy. Our explainer on VVUQ for digital twins places these checks in the wider verification and validation workflow.

Recalibration in Operation

A digital twin calibration is a snapshot, not a permanent truth. Heat exchangers foul, bearings wear, firmware changes control laws, and maintenance swaps components. The question is not whether to recalibrate but what evidence should trigger it, and what kind of recalibration to run.

Recalibration decision logic for an operating digital twin based on residual coverage and change type

Figure 4: A recalibration policy. Residuals are standardised by predictive spread, coverage is monitored, and the type of change decides between incremental update, full recalibration and escalation.

The logic starts from standardised residuals: observed minus predicted, divided by the posterior predictive standard deviation. If the twin is well calibrated, these behave like draws from a known distribution and interval coverage stays near nominal. A cumulative-sum or exponentially weighted test on standardised residuals detects slow drift long before raw errors look alarming.

When coverage fails, classify the change. Gradual, parametric drift, such as fouling raising a thermal resistance, calls for an incremental update. Use the previous posterior as the new prior and condition on recent data. Step changes after maintenance call for a fresh calibration dataset, because the old posterior describes a different physical asset.

Changes that no parameter can explain are model-form errors. The classic example is a new heat path, such as a door that is now left open. These go to engineers, not to the sampler. Recalibrating against model-form error is how twins accumulate meaningless parameters.

Two operational details deserve emphasis. First, recalibration needs excitation. Steady operation at one setpoint is the cooling-only test from earlier: it pins a ratio, not individual parameters. Schedule informative manoeuvres, such as a setpoint step or a load change, during low-risk windows. Second, every recalibration produces a new versioned posterior. Downstream consumers, including the online filter and any optimiser, must know which version they are using.

Trade-offs, Gotchas, and What Goes Wrong

Confidently wrong posteriors. The worked example is the main gotcha. Tight intervals measure how well the data constrain the parameters within your model, not how close you are to physical truth. If residuals are white and the parameter still disagrees with independent evidence, suspect missing physics.

Vague discrepancy priors. Adding a Kennedy-O’Hagan GP with default hyperpriors often turns a biased posterior into an uninformative one. The posterior widens until θ is barely learned. Without physically grounded statements about δ, you trade bias for vagueness.

Over-parameterisation. In digital twin parameter estimation, teams calibrate twenty parameters because the simulator exposes twenty. Most are unidentifiable from the available sensors, and the sampler wanders along flat ridges. Screen with Sobol indices and calibrate the handful that matter.

Correlated noise. The likelihood above assumes independent noise. Sensors sampled faster than the process dynamics produce autocorrelated residuals. Treating them as independent overstates the information in the data, shrinking intervals. Thin to the process timescale, or model noise correlation explicitly.

Emulator error hidden in the posterior. If you plug a GP emulator’s mean into the likelihood and drop its variance, the posterior inherits emulator error as false certainty. Keep emulator variance in the likelihood, and validate the emulator on runs it did not see.

Leaky sensor problems. Bias in a thermocouple, an unrecorded ambient change, or a mislabelled heater power will be absorbed into θ. Calibration amplifies data-quality problems; it does not average them out.

Compute budget surprises. A Sobol analysis on 10 inputs with N = 1,000 needs 12,000 runs by the N(d + 2) formula. On a one-hour simulator, that is over a year of single-core time. Budget for emulators from day one.

Point-estimate hand-offs. Many twins calibrate in a Bayesian way and then deploy only the posterior mean. That throws away the uncertainty that justified the effort. Propagate posterior samples, or at least the covariance, into predictions and into the filter’s process noise.

Practical Recommendations

Good digital twin calibration starts with the experiment, not the algorithm. Write down which parameters you need, compute what each test can identify, and design excitation that breaks the obvious ridges. For thermal systems that means steady-state levels at more than one power and at least one sharp transient. For mechanical systems it means multiple load cases and frequencies.

Encode real engineering knowledge in priors. Use datasheet ranges, handbook correlations and previous calibrations of sister assets. Then run a prior predictive check to make sure the priors produce plausible behaviour before you touch data.

Calibrate the simplest credible model first, without discrepancy, and look hard at structured residuals across regimes. Add physics before you add a GP. When you do add a Kennedy-O’Hagan discrepancy, give it an informative prior and write down why.

Treat the posterior as a governed artefact. Version it with its dataset, priors, simulator hash and diagnostics, and connect it to your V&V evidence. Monitor standardised residuals in production and recalibrate by policy rather than by complaint.

A short digital twin calibration checklist:

  • Sensor calibration and data-quality checks done before model calibration.
  • Sobol screening complete; only influential parameters are calibrated.
  • Excitation design checked for identifiability, including a pairwise posterior plot.
  • Emulator validated against held-out simulator runs, with its variance kept in the likelihood.
  • Four or more chains, R-hat below 1.01, rank-normalised ESS above 400.
  • Posterior predictive coverage checked on held-out physical data.
  • Validity envelope recorded and enforced at run time.
  • Recalibration triggers and excitation schedule defined.

Frequently Asked Questions

What is the difference between digital twin calibration and data assimilation?

Calibration estimates slow or static parameters, such as a heat-transfer coefficient or stiffness, from a curated dataset, usually offline and with full uncertainty. Data assimilation estimates fast-changing states, such as temperatures or positions, continuously from the live sensor stream using filters like the Kalman or ensemble Kalman filter. The two work together: calibration supplies the model, assimilation keeps its states synchronised. Mixing them, for example by letting a filter absorb a wrong parameter, gives a twin that tracks well today but extrapolates badly tomorrow.

What is the Kennedy-O’Hagan model in simple terms?

It is a statistical framework, published by Kennedy and O’Hagan in 2001, that says observations equal the simulator’s output at the true parameters, plus a model discrepancy function, plus measurement noise. The discrepancy captures systematic simulator error and receives a Gaussian process prior. When the simulator is expensive, it is also replaced by a Gaussian process emulator. The point is to stop model inadequacy leaking into the parameters, though the discrepancy and parameters can be confounded unless the discrepancy prior is informative.

Why does my calibrated parameter look precise but disagree with physical measurements?

Most likely because the model omits physics that the parameter is absorbing. In Bayesian model calibration, a posterior interval reflects how tightly the data constrain the parameter within your model’s assumptions. It says nothing about whether those assumptions are right. In our thermal example, unmodelled radiation inflated the convective coefficient by about 19% while residuals matched sensor noise. Check structured residuals across operating regimes, add the missing physics or an informative discrepancy term, and validate against independent data.

Should I use MCMC or a least-squares optimiser for digital twin parameter estimation?

Use an optimiser when you need a quick point estimate, the posterior is roughly Gaussian, and uncertainty is not consumed downstream. Use MCMC when parameters are correlated or weakly identifiable, when the posterior may be skewed or multimodal, or when the uncertainty feeds a decision or a credibility argument. A good workflow does both. Find the mode with an optimiser, initialise chains near it, then sample with NUTS to obtain the full posterior and its diagnostics.

How many simulator runs do I need to build a surrogate for calibration?

For a Gaussian process emulator, a widely cited starting point is about ten runs per input dimension in a space-filling design. Loeppky, Sacks and Welch gave evidence for this rule in Technometrics in 2009. Screen inputs first with Sobol sensitivity analysis so you emulate only influential parameters. Then add runs where the posterior concentrates and validate the emulator on held-out runs. Its error should be small compared with measurement noise before you trust a posterior sampled on it.

How often should an operating digital twin be recalibrated?

Repeat digital twin calibration on evidence, not on a fixed calendar alone. Monitor residuals standardised by the twin’s predictive spread and track interval coverage. Gradual drift in coverage suggests an incremental update using the old posterior as the prior. A step change after maintenance needs a fresh calibration. Residual patterns no parameter can explain indicate model-form error and need engineering attention. Many teams combine evidence-based triggers with a periodic review cadence and scheduled excitation tests to keep parameters identifiable.

Further Reading

By Riju — about

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *