Clinical & Biophysical Overview
Electroencephalographic (EEG) monitoring has emerged as a crucial tool for assessing cortical activity and ensuring patient safety during general anesthesia. The macroscopic electrical potentials recorded at the scalp reflect post-synaptic currents within vertically aligned pyramidal cells in layers III, V, and VI of the cerebral cortex. Under the influence of anesthetic agents—predominantly facilitators of $\gamma$-aminobutyric acid type A ($GABA_A$) receptors, such as propofol, sevoflurane, and isoflurane—the patterns of synaptic interaction are dramatically altered.
As the concentration of an anesthetic increases, the high-frequency, low-amplitude, desynchronized EEG signature of the awake state transitions through distinct neurophysiological phases. The initial phase of induction often triggers a transient state of excitation, characterized by an increase in beta-band activity (13–30 Hz), often termed the "beta buzz." As the patient progresses into a surgical plane of anesthesia, deep thalamocortical feedback loops are established, manifesting as highly coherent and synchronized frontal alpha oscillations (8–13 Hz) paired with low-frequency slow-wave delta activity (0.5–4 Hz).
The mathematical representation of the relative power within a specific frequency band ($RP_{band}$) is defined relative to the total spectral power over the clinically relevant bandwidth (usually $0.5$ to $30$ Hz):
$$RP_{band} = \frac{\int_{f_{low}}^{f_{high}} P(f) \, df}{\int_{0.5}^{30} P(f) \, df}$$
Where $P(f)$ represents the continuous Power Spectral Density (PSD) of the EEG channel, and $[f_{low}, f_{high}]$ defines the spectral boundaries of the designated band (e.g., $8$ to $13$ Hz for the alpha band).
In states of ultra-deep anesthesia, the cortical metabolic reserve is suppressed to such an extent that the brain transitions into burst suppression. This clinical state is represented by periods of flat-line suppression (near-zero amplitude, typically $< 5\,\mu V$) punctuated by high-amplitude bursts of mixed delta and alpha frequency oscillations. The clinical quantification of this state is tracked using the Burst Suppression Ratio ($BSR$), which represents the percentage of a given epoch spent in suppression:
$$BSR = \frac{\sum T_{suppression}}{T_{epoch}} \times 100\%$$
Technical Details
The dynamic waveform generator utilizes a combination of real-time additive synthesis and a recursive differential state-machine to construct the simulated scalp potentials ($V(t)$). The baseline wave is computed as the sum of multiple localized oscillators corresponding to the physiological bands:
$$V(t) = \sum_{i \in \{\delta, \theta, \alpha, \beta\}} A_i(d) \sin(2\pi f_i(d) t + \phi_i) + \eta_{EMG}(t)$$
Where $A_i(d)$ and $f_i(d)$ are amplitude and frequency modulating functions that depend directly on the depth of anesthesia parameter $d \in [0, 100]$, and $\eta_{EMG}(t)$ is a Gaussian muscle noise process. For Propofol, the alpha coefficient is modeled with a narrow band centered around $10.5$ Hz with high temporal coherence. For Ketamine, the slow delta rhythm is decoupled, and high-frequency beta-gamma oscillations are persistently maintained.
The real-time Fast Fourier Transform (FFT) uses a sliding window of $N = 512$ points sampled at $f_s = 128$ Hz, yielding a frequency resolution of $\Delta f = f_s / N = 0.25$ Hz. To minimize spectral leakage caused by finite window boundaries, a Hann window ($w_n$) is applied to the epoch before computation:
$$w_n = \sin^2\left(\frac{\pi n}{N-1}\right)$$
The Spectral Edge Frequency at 95% ($SEF_{95}$) is computed by sorting the power spectral bins and solving for the boundary frequency index $k_{95}$ where:
$$\sum_{k = 1}^{k_{95}} |X_k|^2 \ge 0.95 \sum_{k = 1}^{N/2} |X_k|^2$$
The sound engine is powered by the Web Audio API. It routes multiple parallel oscillators through bandpass resonant filters controlled by the power distribution of the alpha and delta components. This produces a low-frequency hum during deep anesthesia, and transitions to high-frequency, complex clicking and chirping during lighter planes or when EMG noise is present.
Future Directions
Future iterations of this cortical monitoring framework aim to integrate multi-channel scalp arrays mapping the 10–20 international system. This expansion will facilitate the clinical visualization of **anteriorization**—the classic migration of alpha-frequency power from occipital regions to frontal lobes during GABAergic induction. We are also exploring the implementation of phase-amplitude coupling ($PAC$), tracking the nesting of high-frequency alpha spindles within the slow delta wave phases. Additionally, neural mass modeling based on Wilson-Cowan differential networks will allow the simulation to transition from phenomenological signal matching to biophysical modeling of thalamic and cortical neural populations.