Skip to content

The Primus ventilator against SNUADC, by breaths

Each breath shows in the Primus airway pressure and, through the chest, in SNUADC's central venous pressure. Tracking that lag puts the Primus on the SNUADC timeline to about 55 ms over the whole release, with a line per stretch between its AWP pauses (49 ms in the pilot). At scale it measures the Primus drifting a median +105 ppm against the recorder PC between its AWP pauses, with steps at the pauses that do not reset it.

Date 2026-11-11
Status current
Methods One event, two clocks
Techniques Windowed cross-correlation, Null controls
Clocks Primus clock, SNUADC sample clock
Devices Primus anaesthesia machine, SNUADC
Variables Airway pressure (Primus), Capnogram (Primus), Arterial pressure (SNUADC)

Background

The Primus shares no artefact with SNUADC, but ventilation reaches the circulation: each breath moves central venous and arterial pressure. Ventilation is very regular, so a plain cross-correlation matches one breath away almost as well as at the right lag.

Data

  • Pilot: 20 of the longest benchmark cases with CVP, airway pressure and ECG; a 0/60/115/170 ppm sweep on 150 cases.
  • Whole release (19 October): every recording with Primus airway pressure and SNUADC CVP or arterial pressure (3,473 of 6,388 after skipping 2,897 without AWP or a reference and 18 with fewer than 200 mechanical breaths); 1,067 recordings give CVP lags, 1,384 arterial ones.

Method

SNUADC times were corrected with the stamp model. Breath-onset-triggered averages of airway pressure and CVP in 10-minute windows gave the lag. Breath identity was then confirmed by breath matching: the size of each breath's CVP response against the peak airway pressure of breath i + k, which varies enough from breath to breath to pick the right k. Injected errors of one or two breaths tested it.

Commands (vitaldb-bench; $R the release, $W the work folder). Release-wide lags and their held-out errors, in four parts: P=4 OUT=$W/primus_sync_accuracy_v4 bash tools/run_tool_scan.sh primus_sync_accuracy --modes $W/results/sync_full/snuadc_mode_label.json --ports $W/results/sync_full/snuadc_mode.json --step-rates $W/port_rates/snuadc_step_rates_v4.json (10 Nov, recorded run: $W/primus_sync_accuracy_v4/_runs), then python tools/primus_sync_accuracy.py agg $W/primus_sync_accuracy_v4/part_*.jsonl --out $W/primus_sync_accuracy_v4/agg. With each stretch on its right breath (the breath rule of How the Primus AWP is stamped, and which breath the lag locks onto, rebuilt on the v4 run: $W/runbooks/primus_chain_v4.md): python tools/primus_numbers.py --work $W --sync $W/primus_sync_accuracy_v4 --rule $W/primus_breath_rule_v4 --out $W/primus_numbers_v4. Rerun 10–11 November with the v4 rates (model5's cap for tracks without a correction): the held-out errors moved by under 4 ms, the breath-error share from 12.4% to 12.2%, the per-recording lag by 9 ms. Earlier, rerun 9 November with the stamp model's setup-rate fallbacks (The stamp sawtooth model for SNUADC and BIS); the 19 October run used port rates (old rates file and folders without _v3; it reproduces exactly). The headline numbers did not change: 79 ms robust SD, 12.2% of windows a whole breath off; the 95% interval and the raw lags moved by under 5 ms. One slope per recording with an offset at every pause: tools/primus_pause_aware.py. Drift and steps at the pauses: python tools/primus_drift_probe.py CASES OUT.jsonl. The breath-matching figure: python tools/vent_sync_pilot.py --root $R --cases 4644,4817,3148,750,2443,1403,3706,5780,2838,1936,3146,3549,2172,629 --units $W/results/sync_full/units.csv --step-rates $W/results/pat/snuadc_step_rates.json --out $W/vent_breath_matching/vent14.jsonl (about 1.5 minutes), then python tools/vent_match_figure.py --scan $W/vent_breath_matching/vent14.jsonl --cases <the same> --out $W/vent_breath_matching (redrawn 3 November; it matches the first, ad hoc drawing, with 653 of 1,212 windows confirmed by breath matching).

Results

  • The Primus clock drifts uncorrected between its stamp gaps: the AWP→CVP lag ramps within each stretch at a median +92 ppm (IQR 34–153), and 72% of lag steps fall at Primus stamp jumps.
  • Breath-triggered averages give the lag to 59 ms median per window (p90 269 ms, including whole-breath mis-assignments after resets).
  • Breath matching confirms the breath identity in 53% of good windows and recovers injected ±1–2-breath errors 91–96% of the time when confident. With confirmed identity the lag fits per-stretch lines to 49 ms (p90 165 ms).
  • The drift is 31–200 ppm (median +141) and not constant within a case. A sweep of assumed drifts is inconclusive: 170 ppm fits no better than 115.
  • At scale (19 October). The same lag, on the SNUADC stamp model, in 1,061 recordings with CVP (Pulse pressure variation gated by ventilator breaths): the Primus AWP stamps sit a median 1.8 s before the breath seen in the SNUADC CVP (p10–p90 0.6 to 5.1 s; a bias of −1.8 s), and a line through each whole recording (1,060 with a slope) gives +92 ppm (p10–p90 −48 to +233; v4 rates, examples/ppv_by_breath_v4; +87 ppm before). Fitted with one slope per recording and one offset per stretch between AWP pauses, in 178 recordings with pauses (tools/primus_drift_probe.py): the drift within stretches is a median +105 ppm (p10–p90 +28 to +184), and the per-stretch offsets halve the residual (195 to 99 ms). The steps at the 390 pauses (median −29 ms, p10–p90 −685 to +494 ms) are unrelated to the drift built up in the stretch before (correlation 0.0): the pauses move the stamps but do not reset the drift.
  • Error over the whole release, held out (19 October, rerun 9 November; tools/primus_sync_accuracy.py). Each 10-minute window predicted from all the others (a slope and an offset in each stretch between AWP pauses; every CVP window, whatever breath its stretch sits on): a median absolute error of 55 ms (p90 188 ms, p95 288 ms) in 1,067 recordings with CVP, against 74 ms (p90 259 ms) with one slope per recording and a new offset at every AWP pause (tools/primus_pause_aware.py). The arterial mean pressure as a second reference is noisier (83 ms; p90 346 ms, 1,383 recordings), sometimes a breath out; where both exist (460) their drifts differ by a median 49 ppm. An injected shift of 0.25 s and drift of 100 ppm (196 recordings) come back as 0.252 s and 99.6 ppm (medians, one slope per recording).
  • The same errors with each stretch on its right breath (2 November; tools/primus_numbers.py). A whole-breath shift of a stretch moves every window in it together, so the held-out errors above already describe a stretch on its right breath; this window set leaves out the windows within 5 minutes of a pause and those the breath rule does not cover (37,875 windows, 1,067 recordings). The median absolute error is 53 ms (robust SD 79 ms; 95% −263 to +277 ms), the figure the Primus timing forms use. On top of it, 12.2% of windows sit in a stretch still a whole breath off after the rule (How the Primus AWP is stamped, and which breath the lag locks onto), which the forms carry as its own component. The 55 and 53 ms are the same fit on two window sets, not two methods.
  • Counts. The 1,061 recordings of Pulse pressure variation gated by ventilator breaths have CVP lags on the stamp model; 1,060 of them give a whole-recording slope. The release-wide run of tools/primus_sync_accuracy.py, with its own selection, has 1,067 recordings with held-out CVP windows.
Six panels over 9 hours. Left column: sawtooth lines for SNUADC and BIS and a rising line for the Primus spanning about 3.5 seconds; burst lags ramping between minus 0.6 and minus 1.2 seconds; breath lags rising from minus 2 to plus 2 seconds. Right column: the same quantities flat near zero.
One recording (case 1216, 8.7 hours), before synchronisation (left) and after (right), on the same scales. Top: each clock's time minus the synchronised time. The SNUADC's stamps drift and are pulled back by half a second about every two hours; the BIS's stamps sit about 0.8 s off and are pushed forward every 8,192 s; the Primus drifts about 4 s over the recording and steps at its airway-pressure pauses (dotted lines). After synchronisation the typical error left is about 3 ms (SNUADC), 40 ms (BIS) and 55 ms (Primus, whole-release medians; bands). Middle: the same electrocautery and muscle bursts seen in the ECG and the EEG, as recorded and on the synchronised times, a check independent of the correction. Bottom: the airway-to-central-venous pressure lag of the breath cycle, as recorded and, after, as the error left when each 10-minute window is predicted from all the others.
Parameter Value Status From
Primus drift against the recorder PC, from breath matching 105 ppm (p10–p90 29 to 189; 178 recordings (v4 rates, 11 Nov; vitaldb-bench examples/drift_probe_summary.py; 104, 28–184 before); whole-recording lines give +92 ppm median in 1,060 (v4 rates; p10–p90 −48 to +233)) measured The Primus ventilator against SNUADC, by breaths

Discussion

The SNUADC stamp model places the SNUADC on the recorder PC's timeline, so the lag's slope is the Primus drift against the PC: about +105 ppm, close to the 115 ppm assumed earlier from this pilot. The Primus's own small corrections (How often each device is corrected) imply only 1–11 ppm, so they do not track the drift. The measured lag includes the physiological airway-to-CVP delay, which is constant within a recording and does not affect the slope.

Other references from the arterial line do not settle which breath is right (6 November; rerun 10 November with the v4 rates, tools/primus_ptt_arm.py, primus_ptt_arm_v4/agg/summary.json). In each of the 42,181 CVP windows of 1,066 recordings, the beat-to-beat ECG-to-ART delay, the pulse pressure and the arterial mean were matched to the same breath average, free to pick a neighbouring breath. The ECG-to-ART delay passes the matching's own quality rule in 1.8% of windows (71 recordings) and then agrees with CVP within a quarter breath in 51% and is a whole breath off in 29%; the pulse pressure in 8.3% (63% and 24%); the arterial mean in 14.8% (60% and 27%). Where the arterial mean is a breath away from CVP (1,595 windows) the ECG-to-ART delay is usable in 18. The breathing modulation of the arterial signals is too weak or too alike from breath to breath to pick the breath, so pauses in ventilation remain the way to fix it (How the Primus AWP is stamped, and which breath the lag locks onto).

Limitations

A 20-case pilot. The offset includes the physiological airway-to-CVP delay. Of the pilot's figures only the drift (+92 ppm, IQR 34–153), the 72% of lag steps at stamp jumps and the lag spreads are in a saved output (results/pat/vent_sync_pilot_summary.txt). The injected-error recovery, the per-case fits and the drift sweep (31–200 ppm, median +141) were not saved, and the two drift medians, from different steps of the pilot, are not reconciled.

Open questions

  • Stretches measured a breath off in the release-wide run (conflict between studies). The release-wide run (tools/primus_sync_accuracy.py) finds each window's lag within half a breath of a coarse estimate, without this study's breath-identity check. About a quarter to a third of its stretches sit a whole breath off (How the Primus AWP is stamped, and which breath the lag locks onto), so its per-stretch accuracy holds only for stretches on the right breath, and the between-recording spread is inflated. The Primus timing forms now take each stretch's breath from How the Primus AWP is stamped, and which breath the lag locks onto (pauses in ventilation, else a rule), with the remaining breath error (12.2% of the matched time) as its own component.
  • What sets the steps at the AWP pauses (unexplained phenomenon). Partly answered by The Primus stamp step at each airway-pressure pause (2,491 pauses): where CO₂ carries on through the AWP pause the stamps barely step (median −1 ms, p10–p90 −164 to +187 ms); the large steps, up to seconds, come where CO₂ stops too (26% of pauses). None undoes the drift built up. Open: what the stamps re-anchor to when both waveforms stop.
  • Separating the airway-to-CVP delay (next step). The physiological delay from airway pressure to CVP is inside the measured offset and has not been separated.
  • Breath times as a derived variable (next step). The breaths this study finds in the Primus airway pressure and CO₂ are not a published label family, so they are not an atlas variable. Published with a version, they would be derived from Airway pressure (Primus) and Capnogram (Primus), and features per breath would propagate from them.

Worked examples

Example Side Status Summary
Pulse pressure variation gated by ventilator breaths time current Pulse pressure variation per ventilator breath, in 3,448 recordings: the ventilator's clock sits a median 1.8 s off the arterial line's, which moves half of all breaths' values by a point or more and scatters where in the breath the pulse pressure peaks; a recording's median PPV hardly changes.

Code

Figures

Fourteen small scatter plots of lag in ms against hours, with filled and open dots and red dashed vertical lines.
Lag of the Primus ventilator against SNUADC, from CVP after breath matching, in 14 cases. The lag ramps by about 50–200 ppm and steps at Primus stamp jumps (red dashed lines). case 1936 and case 3549 show offset plateaus near 8 s; in case 3549 and case 2172 red crosses mark values before the fix. The later breath rule (How the Primus AWP is stamped, and which breath the lag locks onto, work/primus_breath_rule/stretch_k.json) takes one to three breaths off every stretch of case 3549, all set by the main mode rather than by their own pauses, so its plateau is most likely whole breaths; in case 1936 it keeps the matched breath in five of six stretches, so that plateau is not explained.