Part VIII: Industrial, Energy, and Infrastructure Sensor AI
Chapter 36: Predictive Maintenance and Prognostics

Uncertainty-aware RUL and maintenance decision economics

"My point estimate said 60 cycles. It never mentioned it was a coin flip between 20 and 120. The maintenance planner found out the hard way."

A Newly Humble AI Agent

Why this section matters

Every prior section in this chapter produces a number: remaining useful life. Nobody actually wants the number. What a plant wants is a decision: replace this bearing now, order the part but keep running, or do nothing this week. The bridge from an RUL estimate to that decision is built from two things a bare point prediction cannot supply. The first is uncertainty: a predicted 60 cycles that could plausibly be 20 or 120 demands a very different action than a tight 60 give-or-take-5. The second is economics: the cost of a surprise failure is almost never equal to the cost of a planned replacement, and that asymmetry, not the RUL midpoint, is what sets the optimal moment to act. This section joins the two. We turn RUL into a predictive distribution, put a cost on being wrong in each direction, and derive the replacement decision that minimizes expected cost, which is the only version of prognostics that a controller or a work-order system can consume responsibly.

This section leans on the probabilistic vocabulary of Chapter 4 (predictive distributions, aleatoric versus epistemic uncertainty) and on the calibration and conformal machinery of Chapter 18, which is what makes an RUL interval trustworthy rather than decorative. It takes the point-RUL models of Section 36.4 as given and asks the operational question they leave open: given what we predict and what we know we do not know, what should we do?

From a point to a predictive RUL distribution

A usable prognostic does not output \(\widehat{\text{RUL}}=60\); it outputs a distribution \(p(\text{RUL}\mid x_{1:t})\) over the cycles of life remaining given everything observed so far. Two sources of spread live inside that distribution and they behave differently. Aleatoric uncertainty is irreducible physical variability: two nominally identical pumps fed identical loads still fail at different cycles because of manufacturing scatter and micro-differences in operating history. More data never shrinks it. Epistemic uncertainty is the model's own ignorance: a degradation pattern it has seen only twice, or an operating regime outside its training envelope. This one does shrink with data, and it is the component that spikes precisely when a machine drifts out of distribution, which is exactly when a maintenance mistake is most likely.

The practical ways to obtain the distribution mirror the toolkit of Chapter 18: a deep ensemble of RUL regressors whose disagreement estimates epistemic spread; Monte Carlo dropout as a cheap ensemble surrogate; a model with a heteroscedastic head that predicts both a mean and a variance for aleatoric noise; or a quantile regressor that outputs the 10th, 50th, and 90th RUL percentiles directly. Whatever the source, the object we carry into the decision is the same: a set of RUL samples or quantiles, not a single number.

Distinguishing the two uncertainties changes the action, not just the error bar

If a wide RUL interval is dominated by aleatoric spread, collecting more sensor data will not narrow it; you must decide under that irreducible risk, and the right move is usually to act conservatively (replace earlier). If it is dominated by epistemic spread, the machine is in a regime the model barely knows; the right move may be to gather more information (increase inspection rate, request a manual check) before committing to an expensive replacement. A single lumped variance hides this fork. Separating the two turns uncertainty from a caveat into a control signal.

The maintenance decision as expected-cost minimization

Now attach money. Let \(C_f\) be the cost of a corrective action: an unplanned, in-service failure, including collateral damage, emergency labor, and lost production. Let \(C_p\) be the cost of a preventive action: a planned replacement of a still-working part, wasting whatever life remained. Almost universally \(C_f \gg C_p\), and the whole game is spending a little \(C_p\) to avoid a large \(C_f\) with the right probability. Suppose at the current cycle we may either replace now (cost \(C_p\)) or defer and re-examine after a horizon \(\Delta\) (the inspection interval, or the procurement lead time before a part could even arrive). Deferring risks a failure within that window with probability \(P(\text{RUL}\le\Delta)\), computed from the predictive distribution. Comparing expected costs, deferral is worth it only while

$$P(\text{RUL}\le \Delta)\;\cdot\;C_f \;<\; C_p \quad\Longleftrightarrow\quad P(\text{RUL}\le \Delta) \;<\; \frac{C_p}{C_f}.$$

That ratio \(C_p/C_f\) is a critical failure probability: replace as soon as the estimated chance of failing before the next opportunity to act exceeds it. If a preventive swap costs one-twentieth of a failure, you should tolerate up to a 5% failure probability before acting, no more. Notice what sets the threshold: not the RUL midpoint, but the cost asymmetry. A cheap-to-replace, catastrophic-to-fail component (small ratio) triggers early and conservatively; an expensive part with benign failure (large ratio) is run closer to the edge. The predictive distribution enters only through the tail probability \(P(\text{RUL}\le\Delta)\), which is why a well-calibrated lower quantile matters far more than an accurate mean.

For a component we manage over its whole life rather than at one instant, the same ingredients give the classic age-replacement policy from renewal theory: choose a planned replacement age \(\tau\) minimizing long-run cost per unit time,

$$g(\tau)\;=\;\frac{C_p\,R(\tau)\;+\;C_f\,\big(1-R(\tau)\big)}{\mathbb{E}\!\left[\min(\text{RUL},\tau)\right]},\qquad R(\tau)=P(\text{RUL}>\tau),$$

where \(R(\tau)\) is the reliability (survival) function connecting this directly to the hazard models of Section 36.3. The numerator is the expected cost of one renewal cycle (you either reach \(\tau\) and pay \(C_p\), or fail first and pay \(C_f\)); the denominator is the expected length of that cycle. The code below evaluates both rules on a predictive RUL sample.

import numpy as np
rng = np.random.default_rng(0)

# Predictive RUL distribution at the current cycle, e.g. from a deep ensemble
# or quantile regressor (Chapter 18). Here: a right-skewed posterior in cycles.
rul = rng.lognormal(mean=np.log(60), sigma=0.45, size=50_000)

C_p, C_f = 20.0, 100.0            # preventive vs corrective cost
critical = C_p / C_f             # tolerated failure prob before acting

# (1) Act-now-vs-defer rule over a procurement/inspection horizon of 15 cycles.
horizon = 15
p_fail_soon = np.mean(rul <= horizon)
print(f"critical ratio C_p/C_f = {critical:.2f}")
print(f"P(fail within {horizon} cy) = {p_fail_soon:.3f}  -> "
      f"{'REPLACE NOW' if p_fail_soon > critical else 'defer, re-check later'}")

# (2) Age-replacement: cost-per-cycle-optimal planned replacement age.
def cost_rate(tau):
    R = np.mean(rul > tau)                       # reliability at tau
    exp_cycle_len = np.mean(np.minimum(rul, tau))
    return (C_p * R + C_f * (1 - R)) / exp_cycle_len

taus = np.arange(5, 120)
rates = np.array([cost_rate(t) for t in taus])
tau_star = taus[int(np.argmin(rates))]
print(f"cost-rate-optimal replacement age = {tau_star} cy, "
      f"failure prob by then = {np.mean(rul <= tau_star):.2f}")
Two decisions from one predictive RUL distribution. Rule (1) is the instantaneous act-now test against the critical ratio; rule (2) sweeps a planned replacement age and picks the one minimizing long-run cost per cycle. Both consume the tail of the distribution, not its mean, which is why calibrated quantiles matter more than a low RMSE.

Running it, the cost-rate-optimal age lands well below the median RUL: because \(C_f\) is five times \(C_p\), the policy deliberately replaces parts with life still in them to buy down failure risk. Slide \(C_f\) up and \(\tau^\star\) marches earlier; that single knob, not the model, is what a reliability engineer actually tunes.

A haul-truck fleet and the value of the tenth percentile

A mining operator ran RUL models on the wheel-motor bearings of its autonomous haul trucks. The first deployment scheduled replacements at the predicted mean RUL and still suffered roadside failures, each one stranding a 300-tonne truck and costing roughly forty times a planned bay swap. The fix was not a better mean. It was to feed the model's calibrated 10th-percentile RUL into the critical-ratio rule with the true \(C_p/C_f\approx 0.025\), which said: act once the failure probability over the two-shift maintenance window crosses 2.5%. That moved replacements meaningfully earlier for the high-uncertainty units and left the confidently-healthy ones running longer. Unplanned bearing failures fell sharply while total bearings consumed barely moved, because the policy spent its conservatism only where the predictive tail was fat. The mean RUL had been answering the wrong question all along.

Calibration and conformal guarantees make the economics trustworthy

The expected-cost rules above are only as honest as the probability \(P(\text{RUL}\le\Delta)\) they consume. If the model's predictive distribution is overconfident, that tail probability is understated, the critical-ratio test fires too late, and the "optimal" policy quietly runs machines to failure. Calibration is therefore not a nicety here; it is load-bearing. The discipline from Chapter 18 applies directly: check that stated RUL intervals have their claimed coverage on held-out, unit-disjoint data (a 90% interval should contain the true RUL 90% of the time), and recalibrate if not.

Conformal prediction is especially attractive for RUL because it wraps any point regressor, ensemble, or foundation-model embedding (Section 36.5) and returns intervals with a finite-sample, distribution-free coverage guarantee, given exchangeable calibration data. The catch, and it is a real one for prognostics, is that degradation trajectories are not exchangeable: a unit late in its life is systematically different from an early one. Naive conformal intervals therefore under-cover in the danger zone, so time-aware and adaptive variants are used, and any coverage claim must be validated on the failure-imminent regime specifically, not just pooled across all cycles.

Where the field is pushing

Current work aims at RUL intervals that stay calibrated under the non-exchangeability of degradation. Adaptive conformal methods (for example ACI and its online descendants) update the conformal quantile as coverage drifts, keeping guarantees valid under the distribution shift that a degrading machine inherently produces. In parallel, prognostics-as-decisions research folds the cost model directly into training, optimizing a maintenance-utility objective rather than RMSE so that the network sharpens exactly where a wrong decision is expensive, echoing the utility-versus-accuracy split that the C-MAPSS/N-CMAPSS labs in this chapter measure. Foundation-model RUL embeddings paired with conformal wrappers are the emerging way to get both transfer across machines and honest, per-unit intervals from a single stack.

Let a conformal library own the coverage guarantee

Hand-rolling split-conformal RUL intervals with a proper unit-disjoint calibration split, nonconformity scores, and an adaptive quantile update is 60 to 100 lines and easy to get subtly wrong (the exchangeability and grouping assumptions are where coverage silently leaks). Libraries such as MAPIE and crepes reduce it to wrapping your fitted RUL regressor and calling .predict with a target coverage: they compute the calibration residuals, apply the group/time structure, and return intervals with the stated guarantee in a handful of lines. You still own the hard part, choosing a leakage-safe calibration set, but the library removes roughly 80 lines and the off-by-one quantile bugs that make an interval look calibrated when it is not.

Finally, calibrated cost-aware RUL is what lets higher-level automation act safely. An operations agent (Chapter 22) that raises work orders, or a fleet scheduler (Section 36.7) that batches replacements across a plant, both consume the expected-cost decision and its uncertainty rather than a raw number; feeding them an uncalibrated point RUL is how automation confidently schedules the wrong thing at scale.

Exercise: the cost ratio is the real hyperparameter

Using the predictive-RUL sampler in the code above: (1) sweep the cost ratio \(C_p/C_f\) across \(\{0.5, 0.1, 0.025, 0.005\}\) and plot the cost-rate-optimal replacement age \(\tau^\star\) and the implied failure probability at \(\tau^\star\) for each. (2) Now double the spread of the predictive distribution (raise the lognormal sigma) while keeping its median fixed, and recompute \(\tau^\star\) at a fixed ratio. Explain in three sentences why wider uncertainty pushes \(\tau^\star\) earlier even though the median RUL did not move, and connect that to why an overconfident (too-narrow) model is dangerous in exactly the direction that costs the most.

Self-check

  1. Why is the mean of the predictive RUL distribution the wrong quantity to threshold on, and which feature of the distribution does the critical-ratio rule actually use?
  2. You observe a component whose RUL interval is wide. What one additional question determines whether you should replace it early or instead increase its inspection rate, and why?
  3. A conformal RUL interval reports 90% coverage pooled over all cycles but a plant still hits surprise failures. What non-exchangeability effect most likely explains this, and where must you re-measure coverage?

What's Next

In Section 36.7, we scale this single-unit decision to a whole fleet: thousands of assets producing RUL distributions at once, shared spare-parts pools and crew constraints that couple their decisions, and the deployment and monitoring plumbing (drawing on Chapter 69) that keeps a prognostic model calibrated as the fleet, its machines, and its operating conditions all drift over years of service.