1. Biophysical Foundations of Electroencephalography
Electroencephalography (EEG) records extracellular postsynaptic field potentials generated by
macroscopic
ensembles of cortical pyramidal neurons oriented perpendicular to the cerebral surface. Rather than
capturing single-unit action potentials—which have brief millisecond durations that destructively
interfere over space—scalp EEG monitors the spatially and temporally synchronized excitatory (EPSP) and
inhibitory postsynaptic potentials (IPSP) across thousands of adjacent neurons.
From an electrodynamic standpoint, these synchronized neural sheets can be modeled as active current
dipoles embedded in a volume conductor. Under quasistatic Maxwell approximations for biological tissue
($\sigma \approx 0.2\text{ to }0.4\,\text{S/m}$ for cerebral cortex), the extracellular potential
$V(\mathbf{r})$ at an electrode position $\mathbf{r}$ relative to dipole moment $\mathbf{p}$ is
governed by:
$$V(\mathbf{r}) = \frac{1}{4\pi\sigma} \frac{\mathbf{p} \cdot (\mathbf{r} - \mathbf{r}_0)}{\|\mathbf{r} -
\mathbf{r}_0\|^3}$$
Due to volume conduction across the cerebrospinal fluid, skull bone ($\sigma_{\text{bone}} \approx
0.006\,\text{S/m}$), and scalp layers, scalp signals undergo substantial lowpass spatial filtering and
attenuation. The resultant voltage fluctuations typically range between $10\,\mu\text{V}$ and
$100\,\mu\text{V}$ in healthy human adults.
Canonical Neural Oscillatory Bands
The human brain organizes information processing through synchronized oscillatory frequencies spanning
discrete functional bands:
- Delta ($\delta$, $0.5 - 4\,\text{Hz}$): High-amplitude ($50 - 150\,\mu\text{V}$),
slow-wave oscillations originating from synchronized thalamocortical loops during Stage 3/4
Non-Rapid Eye Movement (NREM) Slow-Wave Sleep (SWS) and general anesthesia. Pathological focal delta
in awake adults frequently signifies structural brain lesions or subcortical white matter ischemia.
- Theta ($\theta$, $4 - 8\,\text{Hz}$): Rhythms associated with hypnagogic
transition, drowsiness, episodic memory encoding, and hippocampal-prefrontal theta-gamma phase
synchronization. Prominent frontal midline theta ($Fz$) correlates with active working memory load
and mental arithmetic.
- Alpha ($\alpha$, $8 - 13\,\text{Hz}$): The classic Berger rhythm, maximal over the
occipital and parietal regions ($O_1, O_2, P_z$) during relaxed wakefulness with eyes closed. It
represents sensory gating and functional inhibition of task-irrelevant cortical areas. Attenuation
or desynchronization (alpha blocking) occurs immediately upon ocular opening or cognitive
activation.
- Beta ($\beta$, $13 - 30\,\text{Hz}$): Low-amplitude ($5 - 25\,\mu\text{V}$),
high-frequency desynchronized oscillations prominent over frontocentral regions ($C_3, C_4, F_z$).
Beta rhythms reflect active mental engagement, sensorimotor state maintenance, alert attentional
focus, and motor cortex stabilization prior to movement.
2. Synthetic Waveform Generation & Mathematical Superposition
This simulator creates an authentic continuous electrophysiological signal $x(t)$ sampled at
$f_s = 256\,\text{Hz}$ over a rolling time window $T = 5.0\,\text{seconds}$ ($N =
1,280\,\text{samples}$).
Each physiological frequency band $b \in \{\delta, \theta, \alpha, \beta\}$ is synthesized by summing $M
= 16$ individual frequency components distributed randomly around the center frequency $f_{c,b}$ across
bandwidth $\Delta f_b$:
$$x_b(t) = \sum_{m=1}^{M} \frac{A_b}{M} \sin\left(2\pi f_m t + \phi_m\right), \quad f_m \sim
\mathcal{N}\left(f_{c,b}, \left(\frac{\Delta f_b}{2.355}\right)^2\right)$$
where $\phi_m \in [0, 2\pi)$ represents a randomized phase angle initialized for each component. By
superimposing multiple stochastic phases within each band, the simulation mimics the biological
envelope waxing and waning characteristic of human EEG spindle bursts.
The complete composite electrophysiological time series is the linear superposition of cerebral band
currents and non-cerebral biopotential artifacts:
$$x(t) = x_{\delta}(t) + x_{\theta}(t) + x_{\alpha}(t) + x_{\beta}(t) + \eta_{\text{EMG}}(t) +
\eta_{\text{EOG}}(t)$$
3. Artifact Biophysics: Electromyography & Electro-Oculography
Real-world neurophysiological telemetry is heavily vulnerable to contamination from non-cerebral sources
whose voltages often exceed cortical potentials by an order of magnitude:
- Electromyographic (EMG) Muscle Artifacts: Surface EMG arises from asynchronous
motor unit action potentials (MUAPs) recruited in the frontalis, temporalis, and masseter muscles
during jaw clenching, swallowing, or head tension. It exhibits a broadband spectral signature
extending from $20\,\text{Hz}$ to beyond $300\,\text{Hz}$. This simulator implements non-stationary
Poisson burst arrivals:
$$\eta_{\text{EMG}}(t) = A_{\text{EMG}} \left[ 0.1 \xi_{\text{white}}(t) + 0.9 B(t)
\xi_{\text{burst}}(t) \right]$$
where $B(t) \in \{0, 1\}$ models intermittent clenching activations with stochastic burst durations
($100 - 400\,\text{ms}$).
- Electro-Oculographic (EOG) Blink Transients: The human eyeball functions as an
electrostatic dipole with an electrically positive cornea relative to the negative retina
($\Delta V \approx 0.4 - 1.0\,\text{mV}$). When blinking, the eyelid slides across the corneal dome
and the globe rotates superiorly (Bell's phenomenon), projecting high-amplitude ($100 -
400\,\mu\text{V}$), low-frequency monophasic transients into frontal electrodes ($Fp_1, Fp_2$). In
this engine, blinks are modeled as smooth sinusoidal bell pulses:
$$\eta_{\text{EOG}}(t) = 2 A_{\text{EOG}} \sin^2\left(\frac{\pi (t -
t_{\text{blink}})}{\tau_{\text{blink}}}\right), \quad t \in [t_{\text{blink}}, t_{\text{blink}} +
\tau_{\text{blink}}]$$
with duration $\tau_{\text{blink}} \approx 220\,\text{ms}$.
4. Spectral Analysis & Fast Fourier Transform (FFT)
To transition from the raw voltage oscilloscope to the frequency spectrum, the simulated discrete
series $x[n]$ is transformed using a Radix-2 Cooley-Tukey Fast Fourier Transform:
$$X[k] = \sum_{n=0}^{N-1} x[n] e^{-j \frac{2\pi}{N} k n}, \quad k = 0, 1, \dots, N-1$$
The empirical power spectral density is normalized against the sample window length $N$:
$$P[k] = \frac{|X[k]|}{N}, \quad f_k = k \frac{f_s}{N}$$
The simulator displays both the empirical power spectrum (solid neon cyan fill) and theoretical Gaussian
target overlays $G_b(f)$ for each active wave band:
$$G_b(f) = 0.4 A_b \exp\left( - \frac{(f - f_{c,b})^2}{2 \sigma_b^2} \right), \quad \sigma_b = \frac{\Delta
f_b}{2}$$
Constructive & Destructive Interference: As demonstrated in the frequency visualizer,
the empirical composite spectrum does not identical match the smooth Gaussian envelopes. This reflects
physical phase cancellation and vector summing among frequency components: when two harmonically
adjacent waves are in phase, spectral power spikes; when they encounter $180^\circ$ anti-phase, power
momentarily dips.
5. Interactive Diagnostics & Workflow Instructions
- State Presets: Rapidly initialize canonical brain states using the dropdown. Select
Relaxed (Alpha) to observe the $10\,\text{Hz}$ posterior dominant rhythm, Deep Sleep
(Delta) for high-voltage slow waves, or Focused (Beta) for desynchronized
cognitive
engagement.
- Manual Band Modulation: Adjust individual band sliders in the HUD panel. Real-time
RMS voltage, peak frequency, and dominant rhythm telemetry update automatically at $60\,\text{fps}$.
- Artifact Injection: Increase EMG to inspect high-frequency noise bleeding into the
beta band, or raise EOG to observe huge ocular deflections masking underlying theta/alpha waves in
the time-domain trace.
- Advanced Band Mechanics: Expand the advanced panel to alter band center
frequencies ($f_c$) and bandwidth dispersions ($\Delta f$), enabling custom simulation of
pathological
slowing or drug-induced beta spindles (e.g., benzodiazepine effects).
- Interactive Canvas Inspection: Hover or drag your pointer directly across the
visualizer canvases to cross-examine specific time-domain voltages ($\mu\text{V}$) and
frequency-domain power densities ($\mu\text{V}^2/\text{Hz}$).
- Sound Sonification: Toggle the sound synthesizer to hear an acoustic pitch-mapped
auditory translation of the dominant cortical frequency and myogenic artifact crackle.
Related Interactive Laboratories on BioniChaos
Open Access License: This interactive educational module is released under
CC BY-NC 4.0 (Attribution-NonCommercial)
for non-commercial research, academic study, and clinical education.
Commercial & Enterprise Licensing: For white-labeling, proprietary LMS/course
embedding, hardware dashboard telemetry integration, or custom feature engineering, secure a
commercial license at
BioniCloud.com or contact
Dr. Yuri Beno.