ViFi — Real-Hardware Results

This document records the methodology and numbers for ViFi’s real-hardware heart-rate estimation. It is written so a technical reviewer can verify what was measured, how, and what it does and does not prove.


Headline

4.15 bpm cross-session HR mean absolute error against a Polar H10 chest strap, on $44 of commodity ESP32-S3 hardware, single subject, single room, 4 paired captures totaling ~8 minutes of real-hardware data.

HoldoutTrained onHR MAEWithin ±5 bpmBias
session5sessions 3, 43.89 bpm68.2%+0.94 bpm
session4sessions 3, 54.41 bpm65.2%+3.02 bpm
Mean4.15 bpm66.7%+1.98 bpm

The model never saw the held-out session during training. Both cross-session evaluations are on completely independent recordings.


What was measured

Heart rate (HR), in beats per minute, every 10 seconds (5-second stride).

Each window’s prediction is compared against the Polar H10 ground-truth HR at the window center, interpolated linearly between the H10’s 1 Hz reading.

Metrics reported:


How the data was collected

Hardware

ComponentSpec
Transmitter (TX)ESP32-S3-DevKitC-1U-N8R8, external dual-band antenna
Receiver (RX)ESP32-S3-DevKitC-1U-N8R8, external dual-band antenna
Antenna pair2.4/5 GHz omnidirectional, vertical orientation
PigtailsIPEX1 U.FL → RP-SMA Female, 8”
FirmwareEspressif ESP-IDF v6.0 wifi_csi_rx example, one-line patch for the WIFI_BW_HT* enum rename
ChannelWiFi channel 11, HT40 (40 MHz bandwidth)
Subcarriers192 per packet (LLTF + HT-LTF combined)
Packet rate (measured)~67–77 Hz per session
Ground-truth HRPolar H10 chest strap

Setup

Logging

CSI: a custom serial reader records raw bytes from the RX board’s UART for exactly 120 seconds, alongside a metadata sidecar containing the measured packet rate.

HR: the Polar H10 streams 1 Hz HR notifications over BLE; auto-reconnects on Windows BLE drops (which happen every ~30 seconds and are handled transparently).

Both run as PowerShell background jobs in parallel; total wall-clock per capture: ~2.5 minutes.


Captures used

SessionCSI packetsHR readingsHR meanHR rangePacket rate
session38,489115~89 bpm85–9373.7 Hz
session48,026118~87 bpm80–9566.8 Hz
session59,283123~88 bpm84–9377.4 Hz

(Session2 was excluded from cross-session evaluation because it was captured before the metadata-sidecar feature shipped, so its packet rate had to be assumed at 100 Hz which biases the FFT analysis.)


Methodology

Pipeline (per 10-second window)

  1. Subcarrier selection. Compute variance across 192 subcarriers in the 0.1–3 Hz physiological band. Select top 8 by variance.
  2. 1-D envelope. Standardize each selected subcarrier (zero mean, unit variance), then average across them.
  3. Bandpass filter. Butterworth, 0.1–3 Hz.
  4. FFT. 4× zero-padded, parabolic peak interpolation in respiratory (0.15–0.6 Hz) and cardiac (0.9–1.8 Hz) bands.
  5. Feature extraction. 9-dim vector of peak frequencies, peak ratios, envelope statistics, and total band energy.
  6. XGBoost regression. Two regressors (HR, RR), trained on stacked feature matrix.

Sample-rate handling

When ESP-IDF doesn’t emit per-line timestamps (the default configuration), the parser synthesizes a uniform timestamp grid. Default 100 Hz was wrong — the watchdog throttles real packet rate to ~67–77 Hz. The capture tool writes a metadata sidecar with the measured rate; the parser auto-loads the sidecar to use the correct synthesized fs. This single correction is the difference between MAE 24 bpm (wrong assumed rate) and MAE 4 bpm (correct rate, after retraining).

Cross-session evaluation

The retraining tool accepts multiple paired captures and trains an XGBoost regressor on the union of all of them. To produce an honest generalization estimate, one session is held out from training, the model is retrained on the remaining sessions, then evaluated on the holdout.

The XGBoost regressor never sees the held-out session during training. Predictions on the holdout are pure generalization, not memorization.


What this proves


What this does NOT prove


Comparison to literature

WorkHardwareHR MAESubjectsConditions
PhaseBeat (Wang et al., IEEE INFOCOM 2017)Intel 5300 NIC (~$500)~1.5 bpmmultipleseated, controlled
FullBreathe (Zeng et al., UbiComp 2018)Intel 5300 NICsub-bpm RRmultiplevaried orientation
ResBeat (Zhang et al., 2020)Intel 5300 NICsub-bpm joint HR+RRmultipleseated, controlled
ViFi2x ESP32-S3 (~$20)4.15 bpm cross-session1seated, single room

ViFi’s contribution is not algorithmic novelty (the signal-processing approach is from these papers). It is hardware-cost reduction by ~25× and the application-layer engineering (capture pipeline, metadata sidecar, leave-one-session-out tooling) that makes the result reproducible end-to-end.


Roadmap to lower MAE

EffortExpected MAE dropStatus
Multi-subject dataset (10+ subjects)4.15 → 2.5–3 bpmStage 1 post-funding
Multi-room dataset (5+ rooms)further generalizationStage 1 post-funding
Phase-domain features (CFO/SFO calibration)→ 1.5–2 bpmStage 4
4-receiver array + multi-antenna averagingfurther improvementStage 5
Higher CSI packet rate (firmware patch)marginalStage 6

See the roadmap for the full sequence.


Engineering details

The full code — DSP pipeline, capture orchestrator, training scripts, prediction service, calibration, RF fingerprinting, audit log, and 102-test suite — is kept private during pre-clearance development. Available for technical review under NDA for investors, hospital partners, and prospective collaborators. Email popowitzzm@gmail.com.

Back to vifi.health