BioniChaos Logo
  • Home
  • About
  • Contact

AI BioSignal Controller


Real-Time Fuzzy AI Diagnostics
Classification State NORMAL ALPHA
Fuzzy Index (μ) 0.18
Wavelet Energy (E_w) 24.5 uV²
Approx. Entropy (ApEn) 0.42

Understanding AI, Machine Learning, and Fuzzy Logic in Biomedical Signal Processing

Overview

Biomedical telemetry signals, such as Electroencephalograms (EEG) and Electrocardiograms (ECG), represent high-dimensional, complex, non-stationary physiological time-series data. Traditional binary classification models often struggle with these signals due to intrinsic physiological variation, noise artifacts, and the continuum between benign variation and acute clinical pathologies. Fuzzy logic provides a powerful mathematical framework designed explicitly to process imprecise, uncertain, and overlapping clinical criteria by mapping continuous physical metrics—such as instantaneous voltage amplitude, spectral energy distribution, and signal complexity—into continuous membership degrees ranging between 0.0 and 1.0.

In neurological monitoring, real-time seizure detection relies on isolating epileptiform discharges from background alpha, beta, and theta rhythms. Epileptic spikes typically display sudden high-amplitude sharp waves accompanied by a dramatic drop in approximate entropy (ApEn) and a sharp rise in high-frequency wavelet energy. Similarly, in cardiac monitoring, detecting premature ventricular contractions (PVCs) or paroxysmal arrhythmias requires distinguishing abnormal ectopic ventricular beats from baseline sinus rhythms or muscle tremor noise artifacts. By unifying fuzzy inference engines with automated machine learning feature extractors, modern biomedical instrumentation achieves rapid, reliable, and interpretable diagnostic outcomes.

How to Use

This interactive simulator emulates a dual-mode biomedical signal analyzer driven by a real-time fuzzy inference system. Users can adjust parameters dynamically using the HUD controls and interactive viewport:

  • Start / Stop Demo Button: Located at the top of the control panel. Click "START DEMO" to initiate an automated diagnostic sequence. The button switches color and displays "STOP DEMO" while active. Touch or adjust any control or click the canvas to instantly halt demo mode.
  • Interactive Canvas Touch/Click: Tap or click anywhere directly inside the active black oscilloscope canvas workspace to inject an acute transient epileptiform spike or ectopic cardiac wave at that exact moment.
  • Signal Modality: Switch between brain wave dynamics (EEG) and cardiac rhythm dynamics (ECG) to observe how signal morphology and fuzzy rules adapt to different physiological systems.
  • Clinical Condition Preset: Select standard baseline rhythms, pathologically altered signals (such as ictal epileptiform discharges or ventricular ectopic bursts), or high-noise interference states to test the classification system.
  • Fuzzy Risk Threshold: Adjust the decision boundary sensitivity (μthreshold) to shift the system between conservative and highly aggressive anomaly detection.
  • EMG/Baseline Interference: Inject high-frequency electromyographic noise or baseline wander to evaluate how well fuzzy membership functions filter out artifacts compared to hard binary thresholds.
  • Wavelet / Feature Gain: Modify the feature extraction amplification multiplier to see how energy density (Ew) and approximate entropy (ApEn) influence real-time classification indices.
  • Audio Feedback: Toggle sonification on or off via the button in the top-right corner of the control panel to hear pitch-modulated representations of signal velocity and fuzzy anomaly warning tones.
  • Reset Simulation: Instantly wipe all parameter alterations and revert the laboratory terminal to default operating conditions.

Technical Details

The simulation workspace employs a dual-panel rendering architecture constructed on HTML5 Canvas and scaled dynamically using window.devicePixelRatio to eliminate pixelation on high-density displays. Signal generation relies on multi-component sinusoidal synthesis combined with stochastic Gaussian processes.

For EEG generation, baseline alpha rhythms (8–12 Hz) and beta rhythms (13–30 Hz) are modeled mathematically as:

SEEG(t) = Aα · sin(2π fα t + φ) + Aβ · sin(2π fβ t) + η(t)

Ictal seizure events trigger transient high-amplitude spike-wave complexes (3 Hz primary wave with sharp harmonic spikes) that temporarily override background cerebral activity.

For ECG generation, synthetic heartbeats are generated using modified Gaussian wave clusters mapping P-waves, QRS complex vectors, and T-waves:

SECG(t) = ∑ ai · exp( - (t - ti)2 / (2 bi2) )    for i ∈ {P, Q, R, S, T}

Real-time feature extraction continuously computes two primary physiological vectors over a sliding time window:

  1. Wavelet Energy Density (Ew): Evaluated via high-pass detail coefficients estimating local high-frequency power surges.
  2. Approximate Entropy (ApEn): Quantifies sub-pattern regularity and signal complexity. A sudden drop in ApEn combined with high Ew strongly indicates synchronized pathological states (such as epileptic seizures).

These features are evaluated in a Takagi-Sugeno-Kang (TSK) fuzzy logic membership engine utilizing Gaussian membership functions:

μHighEnergy(Ew) = exp( - (Ew - ce)2 / (2 σe2) )

The defuzzified crisp anomaly index (μrisk) determines real-time classification labels and dynamically modulates visual neon alerts and auditory synthesized pitch frequencies via the Web Audio API. Numerical calculations feature strict boundary containment wrappers (if (isNaN(v) || !isFinite(v))) to guarantee zero execution deadlocks during live computation.

Future Directions

Future upgrades to this laboratory workspace will integrate edge-device WebAssembly (Wasm) modules for real-time deep neural network inference (such as 1D Convolutional Neural Networks and LSTMs) running alongside traditional fuzzy logic engines. Additional planned enhancements include multi-channel 10-20 EEG lead topologies, 12-lead vectorcardiogram rendering, and direct integration with synthetic Patient Data Repository standards (PhysioNet) for clinical benchmarking.

Related Interactive Biomedical Laboratories

  • Seizure Simulator & 3D EEG Layout

    Interactive 3D cortical electrode array visualizer modeling focal and generalized epileptiform seizure propagation.

  • ICA/PCA EEG Cocktail Party Mixer

    Blind source separation terminal utilizing Independent Component Analysis to decompose mixed EEG channels into ocular artifacts and clean neural activity.

  • CardioQuest Cardiovascular Dynamics Lab

    Comprehensive hemodynamics and cardiac cycle simulator tracing pressure-volume loops and arterial pulse waves.

  • Cardiac Conduction & Artificial Pacemaker Sync

    Interactive sinoatrial and atrioventricular node electrophysiology simulator with artificial pacing synchronization modes.