Overview
The Synthetic Electroencephalogram (EEG) Signal Generator is an interactive biochemical and
biophysical simulator designed to construct and model dynamic cortical electrical field fluctuations.
Electroencephalography measures local field potentials ($LFPs$) generated primarily by synchronized
post-synaptic potentials across cortical pyramidal neurons. In physical diagnostics, these microvolt-level
potentials ($10 - 100\ \mu\text{V}$) propagate from cortical cellular layers through conductive skull
boundaries, presenting characteristic oscillation profiles across discrete frequency domains.
This workspace mathematically synthesizes complex, non-stationary multi-band wave patterns by combining
independent stochastic and deterministic structural elements. Real-world brain states do not consist of simple,
isolated sine-wave components. Cortical signal pathways operate under persistent physiological systems,
wherein background cellular depolarizations produce a characteristic scaling profile known as $1/f$ pink noise.
The continuous analytical model of the synthesized EEG voltage $x(t)$ is formulated as:
$$x(t) = \eta(t) + \sum_{b \in B} A_b(t) \sin(2\pi f_b t + \phi_b(t)) + S_{transient}(t)$$
where $\eta(t)$ represents the continuous $1/f^\alpha$ pink noise scaling density, $B$ represents the set of
standard functional EEG frequency bands, and $S_{transient}(t)$ represents specialized, non-continuous
neurological microstructures, such as thalamocortical sleep spindles and slow cortical K-complex deflections.
Through this synthesis structure, the generator replicates physical baseline activity corresponding to
alert wakefulness, deep slow-wave sleep states, and transient neuro-oscillatory burst patterns.
How to Use
This simulation panel provides dynamic physical parameter adjustments through interactive sliders. The
"Operational Preset Mode" dropdown configuration immediately overrides parameters to mimic empirical
physiological profiles recorded across clinical diagnostic conditions:
- Wakefulness (Awake): Dominated by highly active $\alpha$ waves ($8-13\text{ Hz}$) and
desynchronized lower-amplitude $\beta$ background oscillations ($13-30\text{ Hz}$), reflecting an alert
but relaxed neural network with minimal slow-wave contributions.
- NREM Stage N1 (Transition): Represents drowsy transition states. It shifts the primary
spectral dominance from high-amplitude alpha to desynchronized, lower-amplitude $\theta$ bands ($4-8\text{ Hz}$).
- NREM Stage N2 (Light Sleep): Incorporates localized slow waves alongside discrete
neuro-oscillatory transient microstructures. This preset activates specialized thalamocortical sleep spindles
(oscillating at $12-15\text{ Hz}$) and high-voltage bi-phasic cortical K-complex waves.
- NREM Stage N3 (Deep Sleep): Dominated by high-amplitude, highly synchronized slow delta
activity ($0.5-4\text{ Hz}$), demonstrating deep synaptic synchronization across macroscopic cortical
neuronal ensembles.
- REM State (Dreaming): Simulates rapid eye movement sleep. The spectrum shifts back to a highly
desynchronized profile, closely resembling alert wakefulness with mixed-frequency theta and beta components
under low muscle tone conditions.
To configure custom, non-standard neural profiles, select the Manual Baseline Configuration. The "Band
Amplitude Controls" and "Band Frequency Center" details tabs allow independent modification of the absolute
voltages ($A_b$) and baseline frequencies ($f_b$) of individual components. Use the "Transient Microstructures" tab
to insert or alter the frequency and density of synchronized bursts. The top interactive panel includes a Start Demo
loop that cycles through an entire night's hypnogram structure in accelerated time, showing sleep stage transitions.
Interacting with any slider instantly pauses the demo, allowing fine manual adjustment. Use the Sound ON/OFF
button to translate microvolt-scale neural oscillations into an audible multi-frequency carrier hum.
Technical Details
The time-domain simulation pipeline utilizes a localized continuous analytical synthesis engine, calculating discrete
time points based on the dynamic sample parameter $f_s$ across the visible time window $W$ (seconds). Pink noise
$\eta(t)$ is synthesized using an adapted multi-octave logarithmic summation approximation, reproducing the typical $1/f^\alpha$ Power
Spectral Density ($PSD$) slope where $\alpha \approx 1$. Traditional white noise models feature flat power distributions,
whereas biological systems operate within a scaling space where power density is inversely proportional to frequency,
reflecting long-range temporal correlations in neural network structures:
$$S(f) \propto \frac{1}{f^{\alpha}}$$
For transient structural waveforms, sleep spindles are modeled as localized amplitude-modulated bursts using a
Gaussian envelope function combined with a fast sinusoidal carrier frequency $f_{spindle}$ ($12-15\text{ Hz}$):
$$S_{spindle}(t) = A_{spindle} \cdot e^{-\frac{(t - t_{center})^2}{2\sigma^2}} \sin(2\pi f_{spindle} t)$$
The bi-phasic morphology of K-complex deflections is simulated using a synchronized combination of asymmetric,
exponentially decaying Gaussian curves to reproduce the characteristic rapid negative hyperpolarization deflection
followed by a slower positive depolarization phase. To calculate real-time frequency components, the pipeline runs a
custom, Radix-2 Cooley-Tukey Fast Fourier Transform (FFT) algorithm directly over the active sample window. Input vectors
are zero-padded to the nearest power of two ($N = 512$) and processed using a classic bit-reversal structure to convert
the time series $x[n]$ into the complex frequency domain $X[k]$:
$$X[k] = \sum_{n=0}^{N-1} x[n] \cdot e^{-j \frac{2\pi}{N} k n}$$
To reduce spectral leakage and artifact generation at the window boundaries, a Hann window function is applied prior to
FFT processing: $w[n] = 0.5 \left(1 - \cos\left(\frac{2\pi n}{N-1}\right)\right)$. The calculated magnitude spectrum
$|X[k]|$ is projected onto the bottom half of the high-contrast oscilloscope interface, with the area beneath the curve
dynamically filled according to color-coded physiological band configurations.
Future Directions
Upcoming analytical expansions of this simulated environment will introduce multi-electrode spatial coordinates, mapping
discrete signals across the International 10-20 system (incorporating F3, F4, C3, C4, O1, and O2 virtual scalp electrodes).
This spatial modeling will allow users to simulate localized cortical events, such as focal epileptic discharges, unilateral
alpha desynchronization, and localized sensory-motor rhythms ($SMR$).
Furthermore, physiological artifact engines will be integrated, incorporating simulated electrooculography ($EOG$) ocular blinks,
high-frequency electromyography ($EMG$) muscle noise, and structural $50/60\text{ Hz}$ alternating current line interference. These addition
layers will provide researchers with a robust, authentic environment for testing filtering, artifact rejection, and Independent
Component Analysis ($ICA$) source separation workflows.
Related Laboratory Diagnostics