Search bioRxiv⌕ Search

bioRxiv · 10.1101/2025.04.05.647340

A High-Precision Timing Method and Digital Interface for Closed-Loop TMS

Abstract

ObjectiveCurrent transcranial magnetic stimulation (TMS) protocols exhibit high inter-subject variability in treatment outcomes, highlighting the need for personalized, brain-state-dependent closed-loop stimulation protocols. To enable such protocols, we aim to provide robust, precisely timed external control of TMS, with stimulation timed relative to feedback signals such as the electroencephalogram (EEG). ApproachCommercial TMS devices typically rely on trigger signals for precise external pulse timing, while adjusting stimulation parameters, such as intensity, is better handled via serial digital communication, which supports robust error detection and feedback. However, combining these communication methods is inherently complex and prone to timing issues, such as race conditions. Furthermore, trigger signals lack capabilities essential for real-time systems, such as preventing late pulse delivery. We present a method for precise and accurate pulse timing, implemented through a digital interface that uses exclusively serial digital messaging, eliminating the need for trigger signals. This interface enables external control of pulse timing, intensity, and other parameters. The TMS device maintains its own internal clock and delivers pulses at pre-scheduled times, decoupling timing precision from the control device. Additionally, we propose a method for synchronizing such time-tracking TMS devices with commercial EEG systems, enabling precisely timed EEG-TMS. Main resultsUsing these methods, our custom TMS device delivered pulses precisely aligned to the EEG signal, with timing errors consistently below 0.3 ms. These errors were constrained by the experimental setup, including the sampling rate of our EEG device and the signal-to-noise ratio affecting pulse detection. SignificanceOur timing method achieves sub-millisecond precision in brain-state-dependent closed-loop EEG-TMS, providing a foundation for robust TMS timing that supports adaptive, personalized stimulation protocols. The digital control interface, co-designed with our TMS device, integrates pulse timing and parameters, setting a precedent for future advancements in computer-controlled TMS.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Kahilakoski, O.-P., Sinisalo, H., Nieminen, J. O., Alkio, K., Valen, K., Kozak, G., Ilmoniemi, R. J., Roine, T.. 2025-04-09. A High-Precision Timing Method and Digital Interface for Closed-Loop TMS. https://doi.org/10.1101/2025.04.05.647340

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Comparative study of chlorophyll measurement in Physcomitrium patens moss using a conventional microscope adapted for combined 2D+1D imaging and spectral analysis

Imaging spectroscopy often requires expensive and complex equipment. Here we show a simple procedure for attaching a standard miniature fiber spectrometer to a conventional microscope, allowing easy integration of 2D imaging with 1D high-resolution spectral measurements. This combination provides much of the benefit of a full imaging spectrometer without the large equipment investment, and we provide instructions for modifying microscopes to this setup and the present measurements of living cells that demonstrate their performance. Using this setup, we compare the quantitative measurement of chlorophyll concentration in Physcomitrium patens moss using color imaging and spectral sampling.

bioengineering↗

De novo designed single-domain antibodies protect against lethal cobra venom neurotoxicity in vivo

Generative protein design can now rapidly produce de novo binders with high affinity and functional activity against a wide range of targets, including lethal snake venom toxins. However, so far most reported successes rely on new-to-nature scaffolds with limited therapeutic precedent. Single-domain antibodies (VHHs) offer a clinically validated alternative scaffold that can bind and neutralize long-chain -neurotoxins, which are some of the most lethal components in snake venoms. Here we compare three recently established de novo design models with VHH-design capabilities (Germinal, RFantibody, and BoltzGen) for their ability to generate VHHs against the neurotoxin -cobratoxin from the monocled cobra (Naja kaouthia). Using standardized model inputs and evaluation criteria based on AlphaFold3 interface confidence (ipTM) and RMSD self-consistency, we find that Germinal was the only method to generate designs passing stringent in silico criteria for experimental testing. We therefore performed a larger Germinal design campaign employing three different VHH frameworks and experimentally validated 46 designs in vitro. Of these, 42 expressed as soluble proteins and we identified four binding hits derived from two of the three tested frameworks. Of the four binders, two lead candidates were further characterized and demonstrated high affinity (KDs of 4.1 nM and 10.8 nM), monomeric behavior and low polyreactivity, indicating favorable biophysical and developability properties, as well as functional toxin neutralization in vitro. To assess their therapeutic potential we investigated their ability to protect against -cobratoxin toxicity in vivo. Both candidates fully protected mice after -cobratoxin challenge, with 100% survival compared to a lethal control. One candidate also retained notable neutralization capacity against whole venom of Naja kaouthia with a survival of 56%, while the other protected 22% when tested in a rescue setting. Together, we demonstrate that de novo VHH design can generate high affinity single-domain antibodies with in vivo protection against lethal cobra venom neurotoxicity, and provide practical insights into method- and framework-dependent performance.

bioengineering↗

Simple Feedback for Complex Movement: Capturing Whole-Limb Reorganization during Single-IMU Gait Retraining

Clinical gait retraining typically relies on multi-sensor arrays and high-dimensional feedback displays, imposing setup and interpretation burdens that limit routine clinical deployment. We developed a single-IMU visual biofeedback system that delivers real-time feedback of Lower Limb Trajectory Error (LLTE), a composite kinematic error metric integrating knee position and shank angle across the stance phase. Twenty able-bodied adults walked on a treadmill under two visual biofeedback targets (flexed-knee, extended-knee) while receiving either corrected (n=10) or uncorrected (n=8) feedback, where the correction accounted for limb orientation at initial contact. LLTE and stance-phase knee kinematics adapted consistently under the flexed-knee target for both feedback groups, with feedback formulation moderating the temporal trajectory of change. Adaptation toward the extended-knee target was limited, likely because participants were already operating near terminal knee extension and because the scalar error metric provided limited directional information for correction. Ankle range of motion (ROM) changed significantly across the stance phase under both target conditions, while hip ROM did not. Multiscale multivariate sample entropy (MSMVSE) increased monotonically with time scale across all conditions, with no statistically distinguishable difference between corrected and uncorrected feedback. These results suggest that single-IMU LLTE biofeedback can modify gait mechanics and that adaptation was expressed across multiple lower-limb segments rather than through changes at a single joint.

bioengineering↗