BioniChaos Logo
  • Home
  • About
  • Contact
Signal & Bio-Modality
Sampling & Quantization Engine
Live Signal Diagnostics
Nyquist Limit ($f_{Nyq}$)
32.0 Hz
Sample Interval ($T_s$)
15.6 ms
Peak Error ($\Delta t_{err}$)
2.1 ms
Aliasing Distortion
NONE (0.0%)

1. Overview & Biomedical Principles

In physiological signal monitoring, selection of the discrete sampling rate $f_s$ represents a fundamental trade-off between signal reconstruction fidelity, temporal resolution for fiducial point extraction, power consumption, memory footprint, and wireless transmission bandwidth. Biomedical sensors such as Electrodermal Activity (EDA) sensors and Photoplethysmography (PPG) optical sensors capture biopotentials and microvascular hemodynamics governed by vastly different autonomic frequency spectra.

Photoplethysmography ($PPG$) measures non-invasive light absorption changes in microvascular tissue beds corresponding to cardiac blood volume pulse variations during each ventricular ejection phase. A high-fidelity PPG pulse waveform consists of a sharp systolic rise time (driven by arterial compliance), a primary systolic peak, a dicrotic notch reflecting aortic valve closure, and a secondary diastolic wave. The high-frequency spectral components of the PPG systolic ascent gradient $\left.\frac{dS}{dt}\right|_{\max}$ routinely exceed $10\text{ Hz}$ to $20\text{ Hz}$. Standard clinical pulse rate variability ($PRV$) metrics demand microsecond to millisecond timing accuracy of systolic peak fiducial points.

Electrodermal Activity ($EDA$), formerly known as Galvanic Skin Response ($GSR$), quantifies changes in skin electrical conductance ($\mu\text{S}$) resulting from sudomotor sweat gland activation driven by the sympathetic nervous system. EDA signals comprise two distinct physical sub-components:

  • Tonic Skin Conductance Level ($SCL$): A slow-varying baseline conductance shifting over tens of seconds to minutes ($0\text{ Hz} - 0.05\text{ Hz}$).
  • Phasic Skin Conductance Response ($SCR$): Transient impulse responses triggered by discrete emotional or cognitive stimuli, characterized by rise times of $1\text{ s} - 3\text{ s}$ and decay half-times of $2\text{ s} - 10\text{ s}$ ($0.05\text{ Hz} - 2\text{ Hz}$).

Under the Nyquist-Shannon Sampling Theorem, complete reconstruction of a continuous bandlimited signal $x(t)$ requires the discrete sampling frequency $f_s$ to strictly exceed twice the highest non-zero frequency component present in the spectrum:

$$f_s > 2 \cdot f_{\max} = 2 \cdot f_{Nyq}$$

Sampling below this theoretical limit induces spectral aliasing, where high-frequency signal energy and noise fold over into lower baseband frequencies, creating non-existent artificial spectral peaks, distorting pulse wave fiducial markers, and corrupting heart rate variability ($HRV$) calculation.

2. Interactive Visualizer User Guide

This interactive laboratory provides real-time visualization of the analog-to-digital conversion ($ADC$) workflow, signal reconstruction filters, and frequency-domain spectral transformations.

  • Start Demo / Stop Demo (`#demoBtn`): Toggles an automated dynamic sweep demonstrating how dropping the sampling rate from $500\text{ Hz}$ down to $4\text{ Hz}$ causes dramatic waveform distortion and frequency aliasing. Physical interaction with any control instantly breaks out of demo mode and returns to your custom state.
  • Reset Baseline (`#resetBtn`): Instantly restores standard default diagnostic baseline settings ($64\text{ Hz}$ Wearable PPG configuration).
  • Sound ON/OFF (`#soundToggleBtn`): Enables real-time audio synthesis. Systolic pulse beats emit clean pitch clicks when sampling is adequate, transitioning to distorted frequency-modulated harmonic feedback when aliasing distortion occurs.
  • Modality Selection: Switch between synthesized PPG optical waveforms, slow-varying EDA conductance spikes, or dynamic composite multi-rate signals.
  • Sampling Rate Slider ($f_s$): Adjust the discrete clock frequency from $2\text{ Hz}$ up to $500\text{ Hz}$. Watch the stem markers in the top plot adjust position in real-time.
  • ADC Bit Depth Slider: Modify quantization resolution from $4\text{ bits}$ ($16$ discrete levels) to $16\text{ bits}$ ($65,536$ levels) to observe step quantization error and signal-to-quantization-noise ratio ($SQNR$).
  • Reconstruction Selector: Compare Zero-Order Hold (ZOH staircase), First-Order Linear Interpolation, and ideal Whittaker-Shannon Sinc kernel interpolation.
  • Hardware Benchmark Presets: Test FDA-cleared clinical long-term configurations like the Empatica E4 ($4\text{ Hz}$ EDA baseline), High-Fidelity Phasic EDA ($200\text{ Hz}$), Standard Wearable PPG ($64\text{ Hz}$), or deliberate sub-Nyquist Aliased PPG ($15\text{ Hz}$).

3. Mathematical Foundations & Technical Architecture

The synthetic continuous baseline signal $S_{analog}(t)$ is generated continuously within a high-precision physics frame loop. The Photoplethysmography wave $S_{PPG}(t)$ is modeled as a sum of dual asymmetric Gaussian functions parameterized by heart rate period $T = \frac{60}{HR}$:

$$S_{PPG}(t) = A_1 \exp\left(-\frac{(t \bmod T - \tau_1)^2}{2\sigma_1^2}\right) + A_2 \exp\left(-\frac{(t \bmod T - \tau_2)^2}{2\sigma_2^2}\right)$$

Where $A_1, \tau_1, \sigma_1$ govern the systolic main ejection peak, and $A_2, \tau_2, \sigma_2$ control the dicrotic wave reflecting systemic vascular reflection.

The discrete sampling operation performs uniform ideal impulse train multiplication followed by mid-tread uniform linear quantization across bit depth $B$:

$$x[n] = S_{analog}(n \cdot T_s) + \mathcal{N}(0, \sigma_{noise}^2)$$ $$x_q[n] = \Delta \cdot \left\lfloor \frac{x[n] - V_{\min}}{\Delta} + 0.5 \right\rfloor, \quad \Delta = \frac{V_{\max} - V_{\min}}{2^B - 1}$$

Signal reconstruction $\hat{S}(t)$ via Whittaker-Shannon interpolation evaluates the sinc convolution sum across sliding discrete windows:

$$\hat{S}_{sinc}(t) = \sum_{n=-\infty}^{\infty} x_q[n] \cdot \operatorname{sinc}\left(\frac{t - n T_s}{T_s}\right), \quad \operatorname{sinc}(u) = \frac{\sin(\pi u)}{\pi u}$$

When $f_s < 2 f_{\max}$, continuous spectral components above $f_{Nyq} = \frac{f_s}{2}$ fold into the baseband spectral domain at alias frequency $f_{alias}$:

$$f_{alias} = \left| (f_{in} + f_{Nyq}) \bmod f_s - f_{Nyq} \right|$$

This visualizer computes continuous discrete time dynamic frame calculations, calculating dynamic device pixel ratio normalization ($DPR$) inside decoupled absolute canvas wrappers to prevent infinite DOM expansion loops while maintaining absolute zero-scroll layout stability.

4. Future Directions & Clinical Engineering Horizons

As wearable biomedical devices shrink in scale, continuous sensor streaming yields to intelligent event-driven adaptive sampling algorithms. Future updates to this simulation framework will incorporate dynamic multi-rate decimation filters, compressed sensing bio-signal reconstruction, compressive autoencoders, and artifact-resistant fiducial point estimators operating at ultra-low power sub-Nyquist regimes.

Contextual Biomedical Laboratories

Explore related interactive visualizers and simulation tools across the BioniChaos biomedical engineering hub:

  • Continuous Glucose Monitoring Dynamics Simulator
    Explore metabolic signal processing, sensor lag dynamics, and continuous interstitial fluid tracking models.
  • Cardiovascular Hemodynamics & Arterial Pressure Lab
    Interactive simulation of ventricular ejection, pulse wave velocity, and systemic arterial compliance models.
  • Cardiac Conduction & Artificial Pacing Visualizer
    Simulate SA/AV node impulse propagation and artificial cardiac pacemaker capture thresholds.
  • Real-Time Acoustic Fourier Spectrogram Visualizer
    High-speed audio spectral decomposition, FFT visualizer, and real-time frequency distribution analyzer.