MaximaLabsOpen app

Monitor Items — Data Reconciliation KPIs

Raw sensor readings shown side-by-side with statistically rectified values from `flowsim.analysis.reconciliation` — a weighted-least-squares adjustment with a gross-error (Z-test-style) flag on any measurement whose residual is implausibly large.

telemetryreconciliationgross-error
Concept

Raw sensor readings shown side-by-side with statistically rectified values. Linear data reconciliation finds the adjusted estimates ŷ closest to the raw measurements y (variance-weighted least squares) that exactly satisfy the linear conservation balances A·ŷ = 0.

The math
Show the governing equations
y^=yVA(AVA)1Ay,V=diag(σ2)\hat{y} = y - V A^\top (A V A^\top)^{-1} A y, \quad V = \text{diag}(\sigma^2)
zi=yiy^iσadj,i(standardized gross-error test)z_i = \frac{y_i - \hat{y}_i}{\sigma_{\text{adj},i}} \quad \text{(standardized gross-error test)}
A closed-form solution — the pseudo-inverse handles redundant or rank-deficient balance sets. A measurement whose standardized adjustment z exceeds a critical value (default 3.0) is flagged as a likely faulty sensor or unmeasured leak, not silently averaged away.
Execution

Feeds the digital-twin deviation matrix — live tag value, simulated reference, and the reconciled estimate together, so a real sensor fault is distinguishable from an honest plant/model mismatch.

How to Setup (GUI)

Enable reconciliation on a twin

  1. Open the Twin panel on a converged simulation and map each live tag to a flowsheet location (a stream field or unit metric) — the same mapping form used for the deviation matrix itself.
  2. Set each tag's threshold % when mapping it — this is what reconciliation uses as the measurement's variance (σ), not a separate sensor-accuracy field, so a tighter threshold makes that sensor's reading trusted more in the adjustment.
  3. There's nothing else to turn on: reconciliation runs automatically once flow-targeted tags with live readings exist against a solved flowsheet's mole-conserving unit balances — it appears as a reconciled column next to each tag's raw value in the deviation matrix, with gross-error flags inline.
How to Setup (SDK)
POST /api/simulations/{sim_id}/twin/reconcile
→ { available, reconciled: {tag: value}, adjustments: {...}, gross_errors: {...}, balance_residual }
Troubleshooting & Common Errors
available: falseNo flow-targeted tags with live readings against a solved flowsheet yet — run the simulation and map at least one flow tag first.
a tag keeps flagging as a gross errorIts standardized adjustment z exceeds the fixed critical value (3.0, ~99.7% confidence — not user-configurable today) every cycle — check the physical transmitter, not just the model, before assuming the sensor is fine and the balance is wrong.
reconciled value barely moves off the raw readingA tight threshold % makes that measurement trusted more, so the solver adjusts it less; loosen the threshold if you know that sensor is less accurate than its default.