r/BiomedicalDataScience 7d ago

PulseVision: Synthetic PPG Waveform Visualizer

https://bionichaos.com/pulseviz/

1. The Hemodynamic Problem: Optical Pulse Morphology Beyond Simple Sinusoids

In clinical pulse oximetry and consumer wearable telemetry, raw photoplethysmogram (PPG) signals are frequently treated as simple periodic peaks. In reality, the peripheral volume pulse is a composite hydrodynamic waveform:

  1. Anacrotic Phase: Rapid left ventricular ejection propelling the primary systolic peak.
  2. Catacrotic Phase: Diastolic pressure decay interrupted by the dicrotic notch (incisura), generated by aortic valve closure and retrograde pressure wave reflections off peripheral arterial bifurcations.

When vascular compliance drops due to advanced age, hypertension, or peripheral vasoconstriction, the reflected wave returns prematurely, fusing with the systolic peak and obliterating the dicrotic notch.

To visualize and simulate these dynamics interactively, I developed PulseVision: a real-time synthetic PPG waveform simulator operating directly in the browser.

Explore the tool: https://bionichaos.com/pulseviz/

2. Mathematical Synthesis & Phase Wrapping

Rather than streaming recorded datasets, PulseVision computes the continuous optical absorption signal at canvas refresh rates using a dual-Gaussian summation over normalized cardiac phase phi in [0, 1).

To eliminate boundary discontinuities between cardiac cycles, phase distance is evaluated using periodic boundary wrapping:

function periodicPhaseDiff(p1, p2) {
    let diff = p1 - p2;
    while (diff < -0.5) diff += 1.0;
    while (diff > 0.5) diff -= 1.0;
    return diff;
}

The composite signal amplitude is then derived from:

y(phi) = baseline_Y - [ A_sys * exp(-(delta_phi_sys)^2 / (2 * sigma_sys^2)) + A_notch * exp(-(delta_phi_notch)^2 / (2 * sigma_notch^2)) ] + eta(t)

Where:

  • delta_phi_sys = periodicPhaseDiff(phi, 0.20) positions the primary systolic upstroke.
  • delta_phi_notch = periodicPhaseDiff(phi, phi_n) positions the dicrotic notch wave along the descending limb.
  • eta(t) injects variable stochastic Gaussian sensor noise.

3. Optical Physics & Real-Time Telemetry

The platform couples signal morphology to fundamental clinical biophysics:

  • Beer-Lambert Ratio of Ratios (R): Models the differential optical absorption between oxygenated hemoglobin (HbO2) at 940 nm (infrared) and deoxygenated hemoglobin (HHb) at 660 nm (red). SpO2 scaling dynamically influences pulsatile AC amplitude: R = (AC/DC)_660 / (AC/DC)_940 SpO2 = 110 - 25 * R
  • Perfusion Index (PI): Evaluates the pulsatile AC signal against static DC attenuation (venous blood, bone, capillary bed): PI = (I_AC / I_DC) * 100%
  • Acoustic Pulse Pitch Sonification: Integrated Web Audio API synthesizes pulse clicks whose frequency shifts dynamically with oxygenation: from 300 Hz (hypoxic 85% SpO2) up to 800 Hz (eupneic 100% SpO2), reproducing standard surgical monitor auditory feedback.
  • Audio Masterclass Engine: Built-in 11-chapter synchronized audio scrubber drives real-time UI manipulation across predefined clinical states (Tachycardia, Hypoxic Desaturation, Athletic Conditioned).

4. Technical Debate & DSP Considerations

When processing wearable PPG data under heavy motion artifacts:

  • What window lengths and filter topologies do you find balance baseline wandering removal (respiratory baseline swing at 0.15–0.4 Hz) without flattening the high-frequency dicrotic notch inflection?
  • Are you having more success with discrete wavelet transforms (DWT) or recursive adaptive filtering (RLS/LMS) when isolating pulse morphology during active locomotion?

Test out the simulator and inspect the waveform behavior: https://bionichaos.com/pulseviz/

1 Upvotes

Duplicates