Abstract

Introduction In recent years, there has been an increasing interest of using concurrent EEG-TMS to perform state informed brain stimulation to decrease the trial by trial variability. This is methodologically challenging because it requires real-time acquisition and fast analysis of EEG data. We present a framework for online analysis of EEG to enable state-informed TMS, more specifically, to trigger TMS pulses based on the phase of endogenous brain oscillations. The framework is based on open source software and written in Python and doesn’t require a specialized real-time computer. Methods We consider EEG data sampled at 5 kHz across 63-channels using a NeurOne EEG amplifier. The framework ensures minimal latency while circumventing issues of dropped samples by an efficient asynchronous analysis loop running in a separate process. In the current setting the analysis loop determines the phase of the pericentral μ -oscillation using the following steps: (1) Acquire a 500 ms data window. (2) EEG source projection (subject specific head model). (3) Linear detrending. (4) Phase estimation (continuous Morlet Wavelet transform). (5) Project phase estimate to the end of window. (6) Generate trigger if criteria for stimulation are met. Since a TMS pulse will subsequently contaminate the EEG signal with a large artifact, TMS is only performed for half of the estimated triggers, leaving the remaining for determining the performance. For phase estimation the Morlet wavelet was chosen due to its ability to handle non-stationary data. We targeted four phases (0°, 90°, 180° and 270°) in 15 subjects in a frequency band of 4 Hz centered on the subject μ -frequency. For each subject, we performed 60 stimulations for each phase. Results We were able to estimate the pericentral μ -phase with short latency. The analysis loop was updated with an average rate of more than 1500 Hz (Intel i7-4770 CPU). Therefore, the processing latency was negligible compared to the ∼ 3 ms latency of EEG data from the amplifier. To determine the performance, we analyzed the non-stimulated triggers using a centered 500 ms time window. The intended phase was hit with a mean absolute error of 48.6° across all subjects. We mainly attribute this variability to the fact that pericentral μ -power had often diminished at the intended stimulation time complicating estimation of the phase. Conclusion We present a framework capable of targeting the individual phase of the pericentral μ -rhythm with an acceptable accuracy using standard computer hardware. In practice, quite long windows are needed to stabilize frequency and amplitude estimation, and while an instantaneous phase estimate is produced by projecting to the end of the window, it is difficult to ensure that the oscillation is not diminished at the stimulation time. The presented framework readily generalizes to estimation of other states estimated from EEG data and other stimulation settings. Acknowledgements: Funded by the Novo Nordisk Foundation Interdisciplinary Synergy Program 2014 “BASICS”; NNF14OC0011413.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call