Research proposal to I²CNER · interactive showcase v2.1
Clock offset or leak?
Two problems can look alike in sensor data: a real hydrogen leak and a clock that is out of sync.
In the mass balance of a hydrogen dispenser line, when can a constant outlet clock offset be told apart from a real hydrogen leak — and when not? Explore it in four parts: a simulator, a detector performance map, a recomputation in your browser and a blind test.
Why it matters. A station can check for leaks by comparing the hydrogen that goes in with what comes out. If one meter’s clock is a fraction of a second off, the books look as if gas went missing — and a small real leak can hide in the same kind of error. This page shows, in an illustrative model, when a detector tells the two apart and when it cannot.
example All simulations use the illustrative model of the published benchmark v1.5.0. They are not properties of any real station, meter or alarm setting. Rates come only from the published v1.5.0 simulation results; conditions not in those results are grey (no interpolation).
Not an official page of Kyushu University or I²CNER. Proposed host (under discussion): I²CNER, Kyushu University.
1. Clock or leak?
example
Each slider change computes one fill in your browser with the v1.5.0 model (the published code itself) and judges it with the published thresholds. One fill is one example; rates are in the map (2).
Shaded: ±0.3 s = the declared benchmark range (thresholds are calibrated over these offsets). Dotted: ±0.4 s = B5’s admissible alignment search (±2 samples × 0.2 s). The two bounds are different.
Leak in the model: leak flow = set share × steady-state flow × p/p_end from onset to the end of the flow. The pressure p rises during the fill, so “5 %” is not a constant actual share.
Drift values here (0.0005–0.006 s/s ≈ 500–6000 ppm) are stress values, far beyond an ordinary clock.
inletoutletresidual RB2 allowance (reference)B5 statistic
Chart values (every 10 s)
Verdict (example)
Alarms per detector (published thresholds): ▲ positive ▽ negative – none
Mass balance (this fill, example)
The verdict rule is a display combination for this page (B5 primary, compared with A). It is not a finding of the study. Scoring is the benchmark’s: a leak counts as detected only if B5’s first alarm comes at or after leak onset on the positive side.
2. Detector performance map (published simulation results only)
Rows: leak size; columns: clock offset δ. Each cell is the share of correct decisions of the selected detector in this model (leak: first alarm after onset on the positive side; no leak: no alarm). It is not a general limit of what can be distinguished. Grey = not in the published results, not interpolated. Tap a cell to load it into the simulator.
Method codes: A0 flows only · A + change of hydrogen mass in the line · B1/B2 fixed timing allowance u·|Δq| (u = 0.2 / 0.4 s) · B3 state-dependent allowance · B4 two stages (B2 gate, then C) · B5 admissible time-alignment search detector (outlet shifted by −2…+2 samples = ±0.4 s, positive/negative channels) · C 1 s blocks with two one-sided CUSUMs · I1–I3 whole-fill classifiers (different protocol: 80 fills per cell, leak from the start).
3D view: height = share of correct decisions (published v1.5.0 simulation results only). Flat grey tiles are not in the results (no height, no interpolation). The outlined band is the declared range ±0.3 s. Drag or use the arrow keys to rotate; tap a bar to see its value. Same numbers as the table below.
Swipe the table sideways to see every offset.
| leak \ δ | −1.0 | −0.5 | −0.3 | −0.2 | −0.1 | 0.0 | +0.1 | +0.2 | +0.3 | +0.5 | +1.0 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| none | 0% (0/400) | 99.75% (399/400) | 100% (400/400) | 100% (400/400) | 100% (400/400) | 100% (400/400) | 100% (400/400) | 100% (400/400) | 100% (400/400) | 91.75% (367/400) | 0% (0/400) |
| 1 % | not in results | not in results | not in results | not in results | not in results | 0% (0/400) | not in results | not in results | not in results | not in results | not in results |
| 2 % | not in results | not in results | 16.25% (65/400) | not in results | not in results | 16% (64/400) | not in results | 16% (64/400) | 16% (64/400) | not in results | not in results |
| 5 % | not in results | not in results | 90% (360/400) | not in results | not in results | 80% (320/400) | not in results | 80% (320/400) | 80% (320/400) | not in results | not in results |
| 10 % | not in results | not in results | 100% (400/400) | not in results | not in results | 99.5% (398/400) | not in results | 99.5% (398/400) | 98.75% (395/400) | not in results | not in results |
Colour = share of correct decisions (cividis, 0 % dark blue → 100 % light). Hatched grey = not in the published results. Outlined columns = declared range ±0.3 s.
Case inspector
Timing and instrument faults (no leak): share without alarm
3. Check it yourself
The published benchmark code (mass_balance_clock.mjs) runs in this browser (Web Worker) and is compared with the published values. Nothing is sent to a server.
SHA-256 of expected_output.json (v1.5.0; reproduce with node mass_balance_clock.mjs > out.json): c2642719411660360de6113e17f84b462ab109589c9a38d62df4fff9748242a7
Quick check (subset)
① SHA-256 of the two published files (code and expected_output.json) against SHA256SUMS.txt. ② Recompute the primary calibration (7 strata × 1000 clean fills) and compare 9 thresholds. ③ Recompute 5 conditions (δ 0 / +0.3 / +0.5 s, leak 2 % / 5 %) × 400 fills and compare 56 alarm and correct-diagnosis counts. 9000 fills in total (about 5 s on a desktop). Sensitivity, ROC, bootstrap, map and cost are not covered.
Full recomputation
The whole run() output is serialised as JSON and its SHA-256 compared byte for byte with the published hash. About 55 000 fills (about 35 s in Node.js on a desktop; not measured on phones, may take minutes).
4. Blind test
example
Look at the flow and residual of 10 fills and guess: clock offset or leak? 5 are clock only, 5 are leaks (some with an offset), in random order. All are fills from the v1.5.0 test population, computed with the illustrative model.
Limitations
- Illustrative model (assumptions in the README); synthetic simulation results, not real measurements.
- A single-fill verdict depends on chance. Rates come only from the published simulation results in the map (2).
- The simulator and blind test use the published thresholds (rounded to 4 decimals); the quick check recomputes the unrounded ones.
- The sliders also allow combinations outside the benchmark (e.g. drift + offset); those results are single examples, not published rates.
- EKF and profile likelihood are not implemented. In the model a leak does not affect pressure (a model simplification), so an independent P/T confirmation cannot be evaluated.
- B5 is a descriptive name for a search over admissible time alignments; no likelihood-ratio derivation is claimed. Its search is repeated in every window, so it does not show that one constant offset explains the whole fill.