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

Synergy-informed bilevel optimization reveals joint-specific benefits for realistic exoskeleton torque prediction

Simulation-driven optimization can guide exoskeleton control design, but its utility is limited by the accuracy with which muscle coordination is predicted. Strict effort-minimization formulations predict non-physiological muscle shutdown under high exoskeleton assistance, leading to peak assistive torques that exceed values reported in human-in-the-loop experiments. We evaluated the accuracy of synergy-informed simulations at predicting assistance across four single-joint exoskeleton configurations: ankle plantarflexion, knee extension, hip flexion, and hip abduction. We implemented a bilevel optimization to predict a parameterized assistive torque that minimizes metabolic cost, with assisted muscle dynamics estimated via either effort-minimization simulations (minimizing muscle effort only) or synergy-informed simulations (minimizing muscle effort constrained to a synergy structure). We used experimental data from five unimpaired adults walking at their preferred speed and compared results descriptively between the two formulations within each subject. Assistance based on effort-minimization simulations shut down agonist muscle activations and overestimated peak assistive torque compared with experimental values. In contrast, constraining muscle controls to a synergy structure prevented non-physiological muscle shutdown and yielded assistive torques closer to those measured in human-in-the-loop experiments. This benefit was not observed equally across all assisted degrees of freedom or subjects, emerging only where no single synergy could be suppressed to unload the assisted muscles. Synergy weights can therefore be interpreted as joint-specific predictors of when simulations can reliably inform wearable robot design.

bioengineering↗

Engineered microvessel networks -- Longitudinal transcriptomic profiling validates chip-grown tissues as a robust model for studying vasculature

Vascularised Organ-on-Chip (OoC) models are promising New Approach Methodologies (NAMs), but their translation requires validation for defined Contexts of Use (CoU). Here, we combine microfluidic microvessel networks (MVNs) with longitudinal bulk and single-cell RNA sequencing to determine how cell provenance influences engineered vascular phenotype. Stromal cell identity produced distinct network architectures and transcriptional trajectories, demonstrating that support cells, commonly treated as interchangeable, represent an important CoU variable. Primary human pancreatic microvascular endothelial cells failed to form stable perfusable networks, but supplementation with 10% Human Umbilical Vein Endothelial Cells (HUVECs) or Blood Outgrowth Endothelial Cells (BOECs) rescued self-assembly. Single-cell transcriptomics identified specialised endothelial populations associated with vascular morphogenesis, including tip, stalk, phalanx, endothelial to mesenchymal transition (EndMT) and pericyte-like endothelial cells. Failed networks lacked coherent endothelial specialisation, whereas rescued networks restored stabilising cell states and revealed FLRT2--UNC5B signalling within pericyte-like HUVECs, recapitulating a pathway implicated in angiogenic development in vivo. These findings establish cell provenance as a critical determinant of microvascular NAM performance and demonstrate how transcriptomic validation can define and strengthen the biological relevance of microvessel-on-chip models for specific CoUs.

bioengineering↗

Benchmarking foundation models for resting-state functional magnetic resonance imaging time series in cognitive aging research

Foundation models trained on large neuroimaging datasets could help smaller studies investigate cognition from brain recordings. However, whether the foundation model-derived representations improve assessment of current cognition, prediction of follow-up cognition, or characterization of cognitive change remains unclear. We evaluated nine configurations from five model families that process regional resting-state functional magnetic resonance imaging time series, using 3,103 scans from 1,653 participants across two observational and five intervention aging cohorts. Primary frozen representations showed no consistent superiority over conventional functional connectivity for concurrent cognitive associations or diagnostic classification. Changing the readout improved selected concurrent cognitive associations without updating model weights, indicating that performance depended partly on how representations were extracted. Additional post-training and embedding alignment yielded gains in selected settings but did not consistently improve performance across outcomes. In the primary longitudinal analyses, imaging representations did not establish added value beyond baseline clinical measures. These findings show that readout choice influences concurrent cognitive associations, while the added value of these representations for longitudinal outcomes remains unestablished.

bioengineering↗