How it works

The physics, detectors, and calculations — in full

Track A · Synthetic data · TRL 3

Everything below runs in your browser in js/sim.js. AquaSentinel is a fouling forecast and early-warning system. It uses a mechanistic data generator and a scoring protocol to test when its forecast occurs relative to a future intervention criterion. It is a TRL 3 computational proof of concept: all benchmark figures are modeled on synthetic data, not measured plant outcomes.

1. The digital twin (how the data is generated)

A seawater RO train is simulated hourly in constant-permeate-flow mode: feed pressure is raised to hold the design flux as the membrane fouls, so fouling shows up as rising pressure and declining normalized permeability. The governing relations:

Jw = A_eff · (ΔP − Δπ) water flux (solution-diffusion) A_eff = A0 · TCF / (1 + f) effective permeability; f = fouling fraction π = k_osm · C osmotic pressure (van 't Hoff, linearized) Cm = β · C_avg concentration polarization (film theory) SEC = ΔP / (36·η·r) · (1 − erd·(1−r)) + aux specific energy [kWh/m³]

Default operating point (high-salinity Gulf/Red Sea): feed ≈ 45,000 mg/L, ≈ 28 °C, recovery 45 %, design flux 14 LMH, pump efficiency 0.85, energy-recovery effectiveness 0.95.

2. Fault models

FaultHow it perturbs the train
Mineral scalingaccelerating fouling (∝ days + days²) and rising salt passage
Biofoulingsigmoidal biofilm growth → permeability decline + a characteristic feed-channel Δp rise
Particulatecake layer → sharp feed-channel Δp rise, modest permeability loss
Integrity breachstep rise in salt passage at near-constant pressure (instantaneous)
Sensor driftslow upward bias on the permeate-conductivity sensor only — no physical change (a deliberate confounder)

Each fault carries a recorded onset time and a per-timestep label — the ground truth real historians lack.

3. What the detectors see

Detectors use only the measured channels plus known design constants. They reconstruct the plant's own normalized parameters:

NDP = ΔP_meas − π(feed,temp) net driving pressure Kw25 = (flux_meas / NDP) / TCF temperature-corrected specific flux normPerm = Kw25 / A0 ≈ 1.0 when clean, declines with fouling normSp = (perm_cond / C_wall / TCF) / baseline temperature-normalized salt passage normDpfc = feed-channel Δp / baseline normalized differential pressure

4. The detectors

DuPont-aligned intervention comparator

Uses the upper recommended FilmTec cleaning criteria: normPerm < 0.90, normSp > 1.10, or normDpfc > 1.15. AquaSentinel's primary benchmark requires 24 hours of confirmation and separately reports 12/24/48-hour sensitivity. The confirmation duration is our declared policy assumption, not a DuPont instruction.

CUSUM (statistical)

A one-sided cumulative-sum on the permeability-trajectory residual (a single, in-control mean-zero signal): S(i) = max(0, S(i−1) + z(i) − k), alarm when S > h. Catches permeability-affecting faults; by design it misses a pure salt-passage breach.

Trailing intervention forecast

Fits trailing 72-hour trends using only present and past observations and projects when the trajectory will reach an intervention criterion during the next 72 hours. An advisory requires 12 hours of persistence. Rate gates reject deliberately slow sensor drifts; salt forecasts require corroboration from permeability or pressure unless the signature is a large sudden integrity step.

Forecast scope. Scaling, biofouling, and particulate fouling develop gradually enough to support a meaningful time-to-criterion forecast. A sudden integrity breach is detected after it begins and is not claimed as advance prediction.

Locked Python protocol: 300 held-out runs across three operating regimes; 100% simulated process-fault detection, 175/180 process runs earlier than the primary comparator, an average modeled intervention window of approximately 1.3 days for gradual faults, and 0 observed process alarms in 120 synthetic controls. This is simulated evidence, not plant performance.

Sensor and condition controls

The locked suite includes fault-free operation, conductivity drift, pressure-sensor drift, feed-channel-pressure drift, conductivity bias, telemetry dropout, salinity ramp, and temperature shift. Passing these declared controls prevents known confounders from being hidden; it does not prove real-world specificity.

CIP-aware re-baselining

Cleaning events are operator-logged (known times), so the expected trajectory is re-fit per cleaning segment — the detector isn't fooled by the post-cleaning permeability jump.

Logistic regression (learned)

A class-balanced logistic model uses reserved seeds 10001-10003. Reported test seeds are 0-4, so no displayed test run is used for training. It is a secondary reference, not the headline detector.

Fault diagnosis (which fault)

Beyond detection, a transparent classifier reads the presence pattern across [permeability drop, salt rise, feed-channel Δp rise] — each saturated to present/absent — and matches it to a fault signature (e.g., salt-only → integrity; Δp-dominant, no salt → particulate). The permeability term uses the deviation below the expected natural trajectory, so background aging isn't mistaken for a fault.

5. Scoring metrics

The current locked version measures realized lead to the simulated criterion. The next forecast-validation version will also score predicted crossing-time error, forecast stability, 24/48/72-hour accuracy, and interval coverage. AquaSentinel will show probability only after calibration is implemented and tested.

6. The cost calculator

The page computes only a synthetic energy-window scenario between advisory and criterion:

avoided_energy = ½ · ΔSEC · capacity · window_days [kWh per event] avoided_cost = avoided_energy · electricity_price avoided_CO₂ = avoided_energy · grid_CO₂_intensity annual = per-event × fouling_events_per_year

ΔSEC is modeled; the ½ assumes a linear ramp. Downtime, CIP, membrane-life and intervention savings are unknown, not hidden upside. They require plant records and are separated as editable hypotheses in the offline decision model.

7. Plausibility check vs. the literature

This is not real-plant validation. It checks whether the twin's synthetic numbers sit in physically plausible published ranges:

QuantityAquaSentinel (modeled)Published SWRO range
Specific energy (with ERD)≈ 2.85 kWh/m³≈ 3–4 kWh/m³ [1,3]
Recovery45 %≈ 40–50 % [1]
Feed pressure≈ 67 barhigh-salinity SWRO ≈ 60–80 bar [1]
Feed salinity (Gulf/Red Sea)45,000 mg/L≈ 40,000–46,000 mg/L

Separately, an automated self-consistency test confirms the twin's clean-state pressure, specific energy and normalized permeability reproduce the closed-form equations above to floating-point precision — i.e. the calculations are implemented correctly (a correctness check, distinct from plant validation).

[1] Elimelech & Phillip 2011, Science. [2] Voutchkov 2018, Desalination. [3] Abuwatfa et al. 2023, Membranes (review of ML for membrane fouling, which notes the field's need for a publicly accessible open dataset — the gap AquaSentinel fills).

8. Limitations & roadmap

← Back to the live demo Download Apache-2.0 source release