Skip to content

SNUADC sample clock

The sample clock of the SNUADC acquisition board, which digitises ECG, arterial pressure, plethysmogram and CVP at 500 Hz. The working reference for every waveform alignment.

Type oscillator
Nominal 500 Hz ADC sample clock
Kept by SNUADC

Description

All SNUADC channels share this clock: they start together and carry the same record timing. The public firmware of the board (an ATmega32U4 with a 16 MHz crystal) schedules each sample 2 ms after the last, or at once if it is late, so a stall of more than 2 ms re-anchors the sample grid and the stalled time is never sampled. Whether that firmware is the version deployed for VitalDB is not known.

Route to UTC

The route the atlas trusts most (2 links; its weakest link is measured apart from the link to UTC that every clock shares):

link measured SNUADC (frequent-correction mode) against the recorder PC: drift −0.954 ppm (n = 6321; census of 6,321 files (17 October): median −0.9535 ppm; 89.5% of recording hours within 0.05 ppm of −0.954; 747 files (12%) between −0.90 and −0.55 ppm)
link assumed Recorder PC against UTC: drift 0.1–10 ppm (assumed); corrected every 8–24 h (assumed)
Where every route ends.

Independent checks. 3 other routes reach UTC; where they meet, the offsets must close around the loop:

Plan. Measured to the recorder PC in both modes (stamp sawtooth, confirmed by the paced ECG and the PC-stamped heart rate); from there the route rests on the assumed PC–UTC link. The reset-order fix and the stamp-arithmetic census are done (17 October). To strengthen: explain the long recordings with no correction, and give each recording without a correction its own rate rather than its port's.

Modes

  • Step mode (step): The recorder lets the stamps drift, then pulls the track back by about half a second once the drift reaches that size. See SNUADC (step mode) against the recorder PC.
  • Frequent-correction mode (frequent): Stamps follow the PC closely, with occasional forward steps of 5–15 ms (about one an hour). Between corrections the stamps show only stamp arithmetic; the corrections themselves suggest a drift against the PC of a few ppm, which is not yet reconciled (SNUADC stamp arithmetic).
Link Clock Against Modes Rate Corrected every Status
BIS against SNUADC BIS clock SNUADC sample clock all −72 ppm (IQR −82 to −54) — measured
CardioQ against SNUADC CardioQ clock SNUADC sample clock all — — measured
Monitor output clock against SNUADC Monitor analogue output clock SNUADC sample clock all −25.4 to −28.7 ppm (6 cases) — estimated
Oximeter frames against SNUADC Pulse oximeter frame clock SNUADC sample clock all +7 to +92 ppm by setup (medians over 42 PC keys); within 3 ppm of its setup's median in 89% of recordings — measured
Pacemaker against SNUADC Pacemaker clock SNUADC sample clock all — — measured
PPG content against the oximeter frames (the sawtooth) Pulse oximeter frame clock SNUADC sample clock all 18–52 ppm by setup — measured
SNUADC (frequent-correction mode) against the recorder PC SNUADC sample clock Recorder PC clock frequent −0.954 ppm (n = 6321; census of 6,321 files (17 October): median −0.9535 ppm; 89.5% of recording hours within 0.05 ppm of −0.954; 747 files (12%) between −0.90 and −0.55 ppm) — measured
SNUADC (step mode) against the recorder PC SNUADC sample clock Recorder PC clock step −63 ppm (p10–p90 −79 to −44; 5th–95th −80.3 to −36.9 ppm; medians of −46 to −74 ppm by serial port) 2.08 h (5th–95th 1.65–3.57 h between resets; per-recording means p10–p90 1.68–3.07 h) measured
Solar8000 numerics against SNUADC Solar8000 clock SNUADC sample clock all 0 s/h median (p10–p90 about ±0.5 s/h) — measured

Variables spaced by this clock

Arterial pressure (SNUADC), ECG lead II (SNUADC), Plethysmogram (SNUADC)

Parameters

Parameter Value Status From
Pacing interval agreement between stretches 0.05–0.1 ms measured Paced ECG as an independent clock
SNUADC stamp arithmetic −0.954 ppm (n = 6321; census of 6,321 files (17 October): median −0.9535 ppm; 89.5% of recording hours within 0.05 ppm of −0.954; 747 files (12%) between −0.90 and −0.55 ppm) measured SNUADC stamp arithmetic

Observations

Observation Status Summary
About 20 ms of signal lost at every SNUADC reset established At each step-mode reset the acquisition pauses for about 20 ms inside the last record before the new timing, and that time is never sampled: 17.7 ms on the sample count (Signal lost at a SNUADC step-mode correction), once the filler sample is counted. Every record still holds 100 samples, so nothing in the file shows it.
All SNUADC channels share one clock established Every SNUADC waveform track of a case (ECG leads, ART, PLETH, CVP) has the same first stamp, the same record timing and the same corrections. They are stamped together.
Device clock drift depends on the setup established The drift of the SNUADC's and the BIS's timestamps against the recorder PC is largely set by the setup: knowing a recording's PC key (the serial ports of its four core devices) puts the SNUADC's drift within 3 ppm of its setup's median in 97% of cases and the BIS's in 83%, against 34% and 17% for the release's median. On the whole release's correction intervals the same test gives 71% and 60% (Identifying the recording setup of every case).
Five records out of order at every SNUADC reset established At each step-mode reset the five records after it are written in the wrong order: two continue the old timing and three start the new, interleaved. Read in file order, or sorted by stamp, one second of signal is scrambled.
SNUADC sends no time; the recorder stamps by count established The SNUADC board streams samples with no time stamps. Every SNUADC time in VitalDB is the recorder's model of the board's clock: the sample count at the nominal rate, pulled back when it drifts too far.
The EEG–ECG offset is fixed by the SNUADC correction mode established After the stamp model, BIS EEG still lags the SNUADC ECG by a constant: −804 ms in step mode and −660 ms in frequent-correction mode over the whole release, tight within a port or unit. The mode, a property of the setup, sets the constant.
The SNUADC correction mode belongs to setups, not dates established The frequent-correction mode is confined to a few setups, can switch either way within a case, and marks a period in at most one setup. It is not a global software change.
The oximeter's frame clock is a fingerprint of the setup established The rate of the oximeter's 30 Hz frame clock against the SNUADC sample clock is fixed per recording setup (+7 to +92 ppm across setups) and repeats within about 2 ppm inside a recording, so it identifies the hardware a recording was made on.
The plethysmogram is built in 30 Hz frames established The SNUADC PLETH waveform comes from the oximeter in 33.3 ms frames, smoothed to 500 Hz. Its content changes once per frame, on the oximeter's own clock, about 0.4 s after the finger.
A heartbeat-locked trace in the CO₂ waveform that ignores the Primus clock open Averaged on the ECG's R peaks, the Primus CO₂ waveform shows a heartbeat-locked signal in 60% of 10-minute windows (30-recording pilot), tight to about 20 ms. Unlike the breath, its lag does not drift with the Primus clock: it stays fixed on the SNUADC timeline.

Studies

Study Date Status Summary
The heartbeat in the Primus airway signals 2026-10-19 current A pilot in 30 recordings for a heartbeat-locked route from the Primus to the SNUADC. Airway pressure shows the heartbeat in 9% of windows only. CO₂ shows a heartbeat-locked trace in 60% of windows, tight to 20 ms, but its lag does not follow the Primus drift, so it cannot time the Primus. Closed as a clock route.
Gaps and unbroken segments in every waveform 2026-10-19 draft Every gap and every unbroken segment in the 6,388 recordings, per waveform. The curves are not smooth: a cliff at about 18 s in every device marks the recorder's pauses, SNUADC segments stop at 5 hours, Primus segments at about 2.0 hours and BIS segments at about 2.3 hours (each device's correction cycle), and BIS's short gaps grow with the time since the last one (clock resynchronisations, not lost data).
When each device's clock is corrected, in every recording 2026-10-19 draft From the steps between records in all 6,388 recordings: the BIS is corrected every 8,192 s and the Primus every 7,230 s, on their own timers (the first correction comes at any time after the device starts); the SNUADC is reset when 0.49 s of drift has built up. With the full rerun of the correction fit, it gives each device's drift against the recorder PC in 4,728 BIS and 2,728 SNUADC recordings, and shows that the Primus's 20–23 s AWP pauses belong to its correction cycle. Every rate here is relative to the recorder PC, whose own clock drifts and is corrected.
The Primus stamp step at each airway-pressure pause 2026-10-19 current Measured directly at 2,491 pauses in 1,021 recordings: where CO₂ carries on through the AWP pause (74%), the Primus stamps barely step (median −1 ms, p10–p90 −164 to +187 ms, close to the no-pause controls); where CO₂ stops too (26%), they step by up to seconds. No step undoes the drift built up since the last pause.
Message sizes and the steps between records 2026-10-19 draft Every record in every waveform: SNUADC writes messages of 100 samples (0.2 s), Primus 30 (0.48 s), BIS 16 (0.125 s), CardioQ no fixed size. Backward steps outnumber gaps by about a hundred to one and come from a few recordings with duplicated or interleaved records. Primus gaps are whole lost messages; most SNUADC and BIS gaps are not.
The SNUADC clock through the Solar8000 numerics, whole release 2026-10-19 current On the SNUADC's own sample count, the delay from the waveform to the PC-stamped Solar8000 heart rate and mean arterial pressure ramps at the SNUADC's drift against the PC, measured without its stamps or resets. In recordings with whole reset intervals it agrees with them (−63 ppm; median difference +1.5 ppm, 581 recordings). It is too noisy per recording, and in recordings under about 4 h its rate is biased toward zero, so it cannot yet speak for recordings without resets.
What each break in the stamps is 2026-10-19 draft Every step between waveform records in the release, sorted by mechanism: written twice, a SNUADC clock reset, interleaved streams, a pause shared by every device, whole messages, less than a message, or a fraction of a message beyond whole ones. A continuity test with controls shows which classes lose data: shared pauses and most longer SNUADC gaps do; steps under one message, and SNUADC's lone one-message steps, mostly do not.
How often each device is corrected 2026-10-17 current The devices re-synchronise in different ways: SNUADC when its drift reaches about half a second, BIS on a fixed 8,192 s timer, and the Primus by small steps about every two hours that do not keep up with its drift (+104 ppm, measured later by breath matching).
Monitor clocks in the waveforms' spectral lines 2026-10-17 open Differences of the raw converter counts show lines from the monitor's analogue outputs: 240 Hz in arterial pressure and plethysmogram, and a 30 Hz family in the plethysmogram alone. Each measures a monitor clock against SNUADC.
SNUADC against the PC-stamped heart rate 2026-10-17 current The Solar8000 heart rate is stamped by the recorder on arrival, so the delay from the ECG to it, on the ECG's raw sample count, ramps at the SNUADC clock's rate: −65.3 ppm, against −66.7 ppm from the stamp model. Two independent routes agree.
Paced ECG as an independent clock 2026-10-17 current Fixed-rate pacing gives a clock the recording chain cannot touch. Timing paced beats on three timelines shows that each SNUADC step-mode correction loses about 18 ms of signal, and that nothing else breaks the sample stream.
Recorder PC clock steps and recording pauses 2026-10-17 current A step of the recorder PC clock would move every device's stamps at once. Searching all 6,388 files for such simultaneous jumps found none of 0.5 s or more; what moves everything together is recording pauses.
Records out of order at SNUADC resets, and where the lost time goes 2026-10-17 current At every SNUADC reset the five records after it are written out of order: two continue the old timing and three start the new. Put back in order, the waveform runs on with no samples missing; the 18–20 ms lost at each reset goes missing inside the last old-timing record, and an extra zero sample follows.
SNUADC stamp arithmetic 2026-10-17 current Between corrections the SNUADC block stamps run −0.95 ppm against the sample count: each 0.2 s increment is about 0.19 µs short. This, not clock drift, is the "about −1 ppm" seen in frequent-correction mode.
The vitaldb package's loading conventions 2026-10-17 current The vitaldb Python package sets time zero from the tracks loaded, places waveform blocks by rounding their stamps up to a sample, and lets overlapping blocks overwrite each other. Each choice moves or loses samples.
Closing loops in the timing graph 2026-10-13 current Where two independent routes reach the same clock, the offsets around the loop must sum to zero. Three measured loops close within their noise; the BIS loop closes up to a constant latency; the proposed EMR loop is not a loop at all.
Rare devices against SNUADC 2026-10-13 current CardioQ, EV1000, Vigileo and Vigilance each get a link to the SNUADC timeline: beat matching for the CardioQ, mean arterial pressure alignment for the EV1000 and Vigileo, and a long-window fit for Vigilance's averaged heart rate.
The SNUADC firmware 2026-10-13 current The public SNUADC firmware explains the board's timing: it sends no time stamps, samples on its 16 MHz crystal, loses time rather than bunching samples after a stall, reads its channels one after another, and truncates its values. A predicted fault at the microsecond counter's wrap was not found in the data.
The cardiac artefact in the BIS EEG 2026-10-12 current The BIS EEG carries a weak electrical trace of every heartbeat. Too weak for beat-by-beat matching, it shows clearly when averaged on the ECG's R peaks, and gives a second SNUADC–BIS timing reference that agrees with the bursts to about 16 ms.
Shared bursts between the ECG and the EEG 2026-10-12 current Electrocautery and muscle bursts appear in both the SNUADC ECG and the BIS EEG. Cross-correlating their envelopes gives the offset between the two devices' stamps every 10 minutes: about −0.8 s, in a sawtooth that follows both clocks' corrections.
The stamp sawtooth model for SNUADC and BIS 2026-10-12 current Fitting each track's record stamps against its sample count as a drift with corrections (a sawtooth) puts SNUADC and BIS on one timeline without any artefact. Checked against shared bursts, the EEG–ECG timing error falls from about 790 ms on the recorded stamps to 33 ms with one constant per SNUADC mode in the pilot, and 42 ms over the whole release.
The Primus ventilator against SNUADC, by breaths 2026-10-12 open 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 +104 ppm against the recorder PC between its AWP pauses, with steps at the pauses that do not reset it.
Clock corrections in every file 2026-10-11 current A scan of all 6,388 files for the jumps where the recorder re-synchronises a device's stamps. Each device type has its own correction signature; only SNUADC and BIS correct clearly enough to measure their drift.
Physical units, shared drift and time order 2026-10-11 current Device drift rates cluster into units: about 8 SNUADC boards and 8–18 BIS monitors. Part of the drift is shared by both devices of a case and changes between cases: the recorder PC's own rate. Case order carries no time information.
Arterial pressure as a check on the PPG correction 2026-10-11 current Arterial pressure is sampled by the same converter but has no frame and no sawtooth, so every PPG slip leaves ECG→ABP unchanged. Against it, detected slips are 97–100% real and tier A leaves about 2 ms of drift mid-tooth.
The PPG's 30 Hz frame clock 2026-10-10 current ECG and PPG fiducials resolve to one 2 ms sample, but PPG fiducials taken on raw samples lock to a hidden 33.3 ms frame grid. Scanning for it finds the oximeter's frame clock to about 1 ppm, a fixed fingerprint of each recording setup.
The PPG sawtooth and its correction 2026-10-10 current The ECG→PPG delay creeps at 18–52 ppm and jumps up by one 33.3 ms frame at each slip, every 11–31 minutes. A tooth-by-tooth model removes it; where the correction is confident it is essentially exact on injected test data.