physiosim is a software signal emulator, not a metrologically certified
instrument. Its models are validated in software: the fidelity table
is computed live in your browser by measuring parameters back out of the synthesized waveforms
— R-peak HR, ratio-of-ratios SpO2, per-beat BP and respiration period —
exactly as host/validate.py does against the Python reference. This is a
synthesize-then-recover self-consistency check against that reference, not a comparison
with a calibrated device (per-beat BP recovery, in particular, follows from the
[0,1] → [dia, sys] scaling).
What it generates
Five coupled (patho-)physiological signals are synthesized sample-by-sample from
published parametric models, ported 1:1 from the validated host/physiosim.py
reference (same constants, lookup tables and coupling):
- ECG — a sum-of-Gaussians P-QRS-T morphology in the spirit of the
McSharry ECGSYN dynamical model, with respiratory baseline wander.
- Arterial blood pressure — integrated from a genuine
3-element Windkessel model (proximal resistance in series with arterial
compliance and peripheral resistance): a systolic upstroke, a dicrotic notch at aortic-valve
closure, and an exponential diastolic runoff with time constant
τ = RpC, scaled to the commanded systolic/diastolic pressures.
- PPG / pulse wave — a two-Gaussian per beat pulse
(systolic + diastolic peaks) following Tang et al. (2020), on infrared and red
channels.
- SpO2 — derived from the red/IR pair by the
ratio-of-ratios
R = (ACred/DCred) / (ACir/DCir)
and the first-order calibration SpO2 = 110 − 25·R, so
saturation is coupled to the pulse rather than an independent number.
- Respiration — the master modulator: it drives respiratory sinus
arrhythmia (RSA) into the heart-rate tachogram and a small respiratory arterial-pressure
swing that a deBoer-inspired, static-gain baroreflex senses, reflexively
adjusting instantaneous heart rate (BP↑ → HR↓). This is an on-demand,
static-gain reflex on the model's own mean arterial pressure — not a
self-sustaining closed-loop (Mayer-wave) model.
The channels share one cardiac and one respiratory phase, and two couplings are genuinely
operative: respiration drives heart rate both through RSA and through the respiratory
arterial-pressure swing the baroreflex senses
(respiration → BP → baroreflex → HR), while
SpO2 is recovered from the synthesized red/IR PPG by the ratio-of-ratios — so
saturation is tied to the actual pulse, not printed from the config. Press
Baroreflex challenge to inject a transient pressure bump and watch the heart
reflexively slow.
Parameter ranges vs commercial simulators
As software, physiosim reproduces the operating envelopes of commercial vital-signs
simulators — a $0, reproducible, scriptable reference source:
- Fluke ProSim 8 — SpO2 30–100% at ±1% of
setting, SpO2 synchronized to the ECG rate with a 150 ms delay.
- Rigel UNI-SiM — ECG 20–300 bpm, SpO2
50–100%, NIBP pressure accuracy ±0.5% FS.
- IngMar ASL 5000 — respiration 3–150 breaths/min.
SpO2 accuracy framing — ISO 80601-2-61
Pulse-oximeter accuracy is reported as Arms ≤ 4.0% over
70–100% SaO2 in the 2011/2017 editions of ISO 80601-2-61
— the verified headline figure. A 2025 revision is reportedly tightening this
further, but that edition is not verified here. This Arms framework is
the honest metric physiosim's SpO2 channel is framed against — a
target, not an achieved certified accuracy.
Relevance to Empa — Lab 401, Prof. Rossi
Empa's Laboratory 401 (Biomimetic Membranes and Textiles, St. Gallen) develops
“physical and numerical skin/body models for validating wearable and textile
sensors.” physiosim is exactly such a numerical body-signal model:
a reproducible, coupled, multimodal ground-truth source of ECG, respiration, NIRS/SpO2
and pulse to exercise the lab's textile ECG belt, respiration-monitoring shirt and photonic
NIRS/pressure textile — answering the “wearables must be as reliable as hospital
tools” requirement with an honest, reproducible reference.
Honesty ledger
- A software signal emulator, not a certified instrument.
- Models are validated in software against the Python reference (the live
measure-back), not against a calibrated reference device.
- SpO2 fidelity is framed against the ISO 80601-2-61
Arms framework as a target, not a certified result.
- A firmware twin (
firmware/physiosim.ino) implements the
identical models for an MCU + MCP4725 DAC; its signal-generation core
compiles for the ATmega328 and runs on an emulated AVR (QEMU
arduino-uno), where the UART-captured DAC sample stream matches the Python
reference to r = 1.000, < 0.1 % error
(see firmware/emulation/). A physical MCP4725, analog stage and oscilloscope
are still pending — no on-hardware capture is claimed.
References
- McSharry, Clifford, Tarassenko, Smith (2003). A dynamical model for generating synthetic
electrocardiogram signals. IEEE Trans. Biomed. Eng. 50(3):289–294.
- Tang et al. (2020). Synthetic photoplethysmogram generation using two
Gaussian functions. Scientific Reports 10:12467.
- deBoer, Karemaker, Strackee (1987). Hemodynamic fluctuations and baroreflex sensitivity
in humans: a beat-to-beat model. Am. J. Physiol. 253:H680–H689.
- ISO 80601-2-61 — Particular requirements for basic safety and essential
performance of pulse oximeter equipment.
GitHub repository
·
host/physiosim.py (reference model)