Doctoral theses of the School of Science at Aaltodoc (external link)
Doctoral theses of the School of Science are available in the open access repository maintained by Aalto, Aaltodoc.
Title of the thesis: Software and hardware for real-time EEG-guided multi-locus TMS
Thesis defender: Olli-Pekka Kahilakoski
Opponent: Prof. Christoph Zrenner, University of Toronto
Custos: Prof. Matti Hämäläinen, Aalto University School of Science
Transcranial magnetic stimulation (TMS) is a non-invasive brain stimulation technique that modulates brain activity using externally generated magnetic fields. TMS is widely used in both neuroscience research and the treatment of brain disorders. However, conventional TMS systems typically stimulate a single brain location at predetermined time points, limiting their ability to align stimulation with specific brain states. These states fluctuate continuously due to internal brain dynamics, sensory stimuli, and the effects of prior stimulation.
In my thesis, I developed a combined hardware–software system that enables real-time EEG-guided brain stimulation. I introduced a timing architecture that shifts the control of pulse timing from an external control computer to the TMS device and synchronizes the internal clocks of the EEG and TMS systems. This allows timing the stimulation relative to the EEG signal with a timing error below 0.3 milliseconds. The timing architecture was implemented into our custom-built multi-locus TMS (mTMS) device, which allows stimulation targets to be electronically selected without physically moving the stimulation coil.
To enable real-time EEG-guided stimulation control, I also developed NeuroSimo, an open-source software tool that runs on real-time Linux. It allows researchers to implement custom stimulation algorithms in Python, while relying on underlying performance-optimized C++ components. The software continuously analyzes incoming EEG signals and triggers stimulation pulses in real time. When paired with a commercial off-the-shelf TMS device, the pipeline achieves end-to-end timing errors in the low-millisecond range, making the software readily deployable in many existing TMS research laboratories.
Together, the proposed timing architecture, mTMS hardware, and NeuroSimo software form a robust and extensible foundation for future TMS systems, supporting a shift to stimulation systems that dynamically adapt to changing brain states. Such systems could eventually target distributed brain networks across both space and time, opening new possibilities for both neuroscience research and personalized clinical treatments.
Keywords: transcranial magnetic stimulation (TMS), electroencephalography (EEG), closed-loop stimulation, real-time systems
Thesis available for public display 10 days prior to the defence at Aaltodoc.
Contact information: olli-pekka.kahilakoski@aalto.fi
Doctoral theses of the School of Science are available in the open access repository maintained by Aalto, Aaltodoc.