Mains hum as an outside clock, and the recording PCs against the grid¶
The SNUADC waveforms carry the mains hum at 120 and 360 Hz in 39% of recordings. The grid is regulated to its nominal frequency, so the hum is a clock outside the recording, and through it the recorder PC's rate against the grid can be measured where the SNUADC's own rate is known, from the recording's whole teeth or its setup's: the PCs run slow, about 13 ppm, and two stations stand apart (−57 and +7 ppm). One-correction "rates", line fits through one step, were dropped (9 November).
| Date | 2026-11-09 |
| Status | current |
| Methods | Clocks carried in the signal |
| Techniques | Null controls |
| Clocks | Recorder PC clock, SNUADC sample clock, UTC |
| Devices | SNUADC, Vital Recorder |
| Variables | ECG lead II (SNUADC), Arterial pressure (SNUADC) |
Background¶
Korea's grid runs at 60 Hz. A grid frequency deviation is common to every device in a theatre, and each device sees the hum on its own sample count, offset by its own clock rate. The rates the atlas measures are all relative: one device against the recorder PC. A clock regulated from outside the recording breaks that circle.
Data¶
Pilot: 30 recordings with measured SNUADC and BIS rates. Whole release: all 6,388 recordings, on the longest contiguous run of records of each track, up to its first 60 min (27–28 Oct 2026). SNUADC ECG II, ECG V5, ART and CVP; BIS EEG1 and EEG2; in the pilot also PLETH and the Primus AWP and CO₂.
Method¶
- Lines. At each harmonic h × 60 Hz (h = 1–8), at its aliased position for the track's rate (at 500 Hz: 120, 180, 240, 140 [360], 200 [300], 80 [420] and 20 [480] Hz), the line strength is the peak of a 0.01 Hz Welch spectrum over the median of ±1 Hz.
- Frequency of each strong line (SNR > 20; > 50 for results) by complex demodulation: the phase slope over 1 s blocks, as ppm of the harmonic, on the device's own sample count. A line at the true grid frequency appears at −(device fast) ppm, so line = f_grid − f_SNUADC.
- The PC against the grid. With r = f_PC − f_SNUADC, the SNUADC rate from its stamp corrections (physiosync.stamp_clock; negative = SNUADC fast), g = r − line = f_PC − f_grid: positive means the PC runs fast. r is the recording's own rate where it has at least one whole tooth (two corrections in one stretch). With one correction, stamp_clock fits a line through a staircase of one step instead, and that slope depends on where the step falls, not on the rate: on synthetic recordings with a known rate it is off by −49 to +23 ppm (10th–90th percentile), against 0.0 ppm from whole teeth (vitaldb-bench examples/sim_stamp_clock_onecorr.py). Such a recording borrows its setup's rate instead: the median of the whole-teeth rates of the same recording station (its device ports), the recording left out, where there are at least 5. Within a setup a recording's own rate sits a robust SD of 0.75 ppm from that median (5th–95th percentile −2.0 to +2.1 ppm; 375 recordings checked; vitaldb-bench examples/setup_rate_check.py), as the setups page records for the SNUADC's drift.
- Controls. Two SNUADC channels' hum phases against each other; minute-by-minute line frequency in two channels.
Results¶
- Hum present in 2,455 of 6,348 recordings with SNUADC, mainly at 120 Hz and 360 Hz (seen at 140 Hz). The 60 Hz fundamental is weak and inconsistent. 240 Hz mixes mains with the monitor's own output line, so its estimates scatter (Monitor analogue output clock).
- Not mains: the PLETH lines at 60, 120 and 180 Hz belong to its 30 Hz frame family; the Primus pressure lines are mechanical, and 62.5 Hz sampling cannot carry the hum.
- Controls: two SNUADC channels' hum phases cancel to 0.0 ppm (0.2 rad residual over 60–118 min, 10 s blocks); their minute-by-minute frequencies have rank correlation +0.63. The grid varies by 11–20 ppm (SD) from minute to minute.
- The PC against the grid (1,206 recordings with hum and at least one correction; 9 November,
mains_hum.py agg --setup-rates):
| SNUADC rate from | n | g, median | IQR |
|---|---|---|---|
| The recording's own whole teeth | 318 | −14.0 ppm | −29.5 to −3.4 |
| Its setup's rate, borrowed | 580 | −11.8 ppm | −26.9 to −0.6 |
| Both | 898 | −12.6 ppm | −27.2 to −1.4 |
| Neither (no setup rate; not used) | 308 | −0.7 ppm |
Within the 13 setups with at least 5 recordings of each kind, borrowed minus own medians run from −22 to +16 ppm (median −5): about the sampling noise of such small medians, with no sign of a bias from borrowing. - By setup (≥ 30 recordings, 8 setups): medians −57 to +7 ppm (Recorder PC rate against the grid, range of setup medians). Six lie from −16 to −5 ppm; the COM12 station runs at −57 ppm (36 recordings) and the COM19 station at +7 ppm (71). By SNUADC port: COM4 −11.0 ppm (526), COM18 −16.6 (92), COM19 +6.8 (74), COM9 −15.2 (58), COM25 −14.9 (39), COM12 −56.3 (38), COM13 −28.0 (22). - Superseded (28–30 October): the same split by number of corrections, +1.6 ppm with one (846) and −13.8 ppm with two or more (360), setup medians −47 to +18 ppm (9 setups) and ports from −43 to +13.5 ppm. Those spreads came mostly from the recordings without a whole tooth (Recorder PC rate against the grid, recordings with one SNUADC correction (withdrawn), withdrawn).
| Parameter | Value | Status | From |
|---|---|---|---|
| Recorder PC rate against the grid, SNUADC rate from whole teeth | −14.0 ppm (p10–p90 −50.4 to +4.4; IQR −29.5 to −3.4; n = 318) | measured | Mains hum as an outside clock, and the recording PCs against the grid |
| Recorder PC rate against the grid, range of setup medians | setup medians −57 to +7 ppm (8 setups, 36–138 recordings each) | measured | Mains hum as an outside clock, and the recording PCs against the grid |
| Recorder PC rate against the grid, recordings with one SNUADC correction (withdrawn) | 1.6 ppm (IQR −16.9 to 16.2; n = 846) | withdrawn | Mains hum as an outside clock, and the recording PCs against the grid |
| Recorder PC rate against the mains grid | about −13 ppm (median; the PC runs slow); setups −57 to +7 ppm | measured | Mains hum as an outside clock, and the recording PCs against the grid |
| Recordings with mains hum in the SNUADC | 2,455 of 6,348 recordings with SNUADC (39%) | measured | Mains hum as an outside clock, and the recording PCs against the grid |
Discussion¶
The first check of any clock in the release against an outside, regulated reference. Most recording PCs run slow against the grid by about 10–16 ppm; two stations do not, one 57 ppm slow and one 7 ppm fast, so the PCs are not held to one rate. The finding that setups differ stands, but its numbers have changed: the earlier −47 to +18 ppm rested on one-correction recordings whose "rates" were line fits through one step (9 November, confirmed on synthetic recordings), and with whole teeth alone the two outlying stations dropped out for want of recordings.
Which recordings carry corrections is selected by their rate. A recording only gets stamp corrections once its stamps have run 480 ms ahead, and a whole tooth needs a second one in the same stretch, which depends on r = line + g, so g is selected along with it. Borrowing the setup's rate brings in the slower recordings of the same stations and weakens that selection (−11.8 ppm borrowed against −14.0 ppm own), but recordings with no correction at all, and stations with too few whole teeth, are still left out. The SNUADC rate from the mains hum, where the stamps cannot give it calibrates g on recordings like those it is applied to.
This replaces the assumed PC drift (Recorder PC drift against UTC, 0.1–10 ppm): the measured rates are larger. It gives a rate, not an offset: the PC's absolute time (its NTP steps) is not seen this way (Recorder PC time adjustments from the mains hum (negative result) tried and failed).
Limitations¶
The grid's own frequency wanders by 11–20 ppm from minute to minute and its hourly mean by a few ppm; each recording's value carries that. The grid is assumed to keep its nominal frequency on average; the release's shifted dates make it impossible to look the grid up. Only recordings with hum and a measured rate.
Open questions¶
- Why do setups differ? (unexplained phenomenon). Six setups' PCs run 5 to 16 ppm slow against the grid; the COM12 station's runs 57 ppm slow and the COM19 station's 7 ppm fast. PC hardware, time-synchronisation configuration, or the theatre. Whether a PC's rate changes over the years of the release is not known.
- The 240 Hz line (next step). Separating the monitor's own 240 Hz output line from the 4th mains harmonic in the same window (two close lines).
Code¶
- vitaldb-bench:
tools/mains_hum.py,tools/mains_phase.py,tools/mains_hum_plot.py,examples/sim_stamp_clock_onecorr.py,examples/setup_rate_check.py
Figures¶