Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Mar-Apr;15(2):523-531.
doi: 10.1016/j.brs.2022.01.016. Epub 2022 Feb 14.

Closed-loop optimization of transcranial magnetic stimulation with electroencephalography feedback

Affiliations

Closed-loop optimization of transcranial magnetic stimulation with electroencephalography feedback

Aino E Tervo et al. Brain Stimul. 2022 Mar-Apr.

Abstract

Background: Transcranial magnetic stimulation (TMS) is widely used in brain research and treatment of various brain dysfunctions. However, the optimal way to target stimulation and administer TMS therapies, for example, where and in which electric field direction the stimuli should be given, is yet to be determined.

Objective: To develop an automated closed-loop system for adjusting TMS parameters (in this work, the stimulus orientation) online based on TMS-evoked brain activity measured with electroencephalography (EEG).

Methods: We developed an automated closed-loop TMS-EEG set-up. In this set-up, the stimulus parameters are electronically adjusted with multi-locus TMS. As a proof of concept, we developed an algorithm that automatically optimizes the stimulation orientation based on single-trial EEG responses. We applied the algorithm to determine the electric field orientation that maximizes the amplitude of the TMS-EEG responses. The validation of the algorithm was performed with six healthy volunteers, repeating the search twenty times for each subject.

Results: The validation demonstrated that the closed-loop control worked as desired despite the large variation in the single-trial EEG responses. We were often able to get close to the orientation that maximizes the EEG amplitude with only a few tens of pulses.

Conclusion: Optimizing stimulation with EEG feedback in a closed-loop manner is feasible and enables effective coupling to brain activity.

Keywords: Bayesian optimization; Closed-loop; Electroencephalography; Multi-channel TMS; Multi-locus TMS; Transcranial magnetic stimulation.

PubMed Disclaimer

Conflict of interest statement

Declaration of competing interest The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: P.L. has received consulting fees (unrelated to this work) from Nexstim Plc. R.J.I. is an advisor and a minority shareholder of Nexstim Plc. The other authors declare no competing interests.

Figures

Image 1
Graphical abstract
Fig. 1
Fig. 1
Benefit of multi-locus TMS in closed-loop TMS–EEG. a Instead of manual coil operation (left), multi-locus TMS (right) allows electronic adjustment of stimulus parameters (in this example, the stimulation orientation (middle)) with no delay. The transducer consists of two tailored overlapping coils (top right). b In automated TMS–EEG targeting, the evoked EEG responses are analysed in real-time and used to decide on the stimulation parameters for the next pulse in such a way that the optimal stimulation parameters are found with the least number of iterations. The stimulation parameters are effortlessly adjusted with multi-locus TMS. The loop is repeated until the optimal stimulation parameters are found.
Fig. 2
Fig. 2
Orientation dependency of the TMS-evoked EEG responses on the left pre-SMA (Subject 1). a Time courses of the TEPs in all channels with selected stimulation orientations (−90°, 0°, 90°). The black cross marks the position of the transducer center relative to the electrode locations (a) and the stimulation site relative to the brain anatomy (b). In b, the left superior frontal gyrus is highlighted in red. c The 36 stimulation orientations. The colours and line styles of the arrows indicate the corresponding stimulation orientations in a and d. d Enlarged TEP time courses of the channel FC1 with all stimulation orientations. e Isocolour plot of the TEP time courses with different stimulus orientations in FC1. f Peak-to-peak amplitudes of the P20−N40 complex in FC1 with different stimulation orientations. The dots depict the single-trial responses, the solid trace is a mean curve, and the shaded area illustrates the standard deviation. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.)
Fig. 3
Fig. 3
Two examples (a–c and d–f) of the EEG-based orientation search (Subject 1). a,d The search outcome, i.e., the found optimal orientation is marked with a black cross. The acquired single-trial P20–N40 amplitudes are presented with black dots. The blue trace illustrates the final posterior mean curve (modelled behaviour of the response curve). b,e The progress of the estimated optimal orientation during the search run. The posterior mean curves computed based on the gathered P20–N40 responses are encoded with coloured rows (grey to blue), and the black crosses indicate the estimated optimal orientation (maximum of the posterior mean curve) on each iteration. The uppermost row (indicated with a black rectangle) correspond to the blue posterior mean curve in a and d. c,f The sampling order. After two randomly sampled orientations (with a 180° difference), we sampled the orientation where the knowledge-gradient function (grey-to-red-coloured rows) reached its maximum (black dots). (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.)
Fig. 4
Fig. 4
Results of the validation of the EEG-based orientation search. a–f Subject-wise search results. Optimized orientations from single searches are depicted with red and blue markers. Mean curves of the optimized P20–N40 amplitudes constructed from the data measured in Experiment 1 are visualized with solid black lines, and the vertical dashed lines illustrate the maxima of the mean curves (ground-truth optimal orientations). Shaded grey areas indicate the standard deviation of the single-trial P20–N40 amplitudes. Subjects of Group A are presented in a–c and subjects of Group B in d–f. g Convergence of the automated orientation searches. Red (Group A) and blue (Group B) lines depict the convergences of the single search runs, and the black curve represents the average error until the minimal number of samples (30) is reached. The end results are presented with red and blue markers. The horizontal dotted line marks an error of 25°. h Average error in the search results as a function of the signal-to-noise ratio. i Average number of samples needed as a function of the signal-to-noise ratio. The marker shapes and colours in g–i corresponds the subject-wise marker styles in a–f. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.)

Similar articles

Cited by

References

    1. Barker A.T., Jalinous R., Freeston I.L. Non-invasive magnetic stimulation of human motor cortex. Lancet. 1985;325:1106–1107. doi: 10.1016/S0140-6736(85)92413-4. - DOI - PubMed
    1. Lefaucheur J.-P., Aleman A., Baeken C., Benninger D.H., Brunelin J., Di Lazzaro V., et al. Evidence-based guidelines on the therapeutic use of repetitive transcranial magnetic stimulation (rTMS): an update (2014–2018) Clin Neurophysiol. 2020;131:474–528. doi: 10.1016/j.clinph.2019.11.002. - DOI - PubMed
    1. Rossi S., Antal A., Bestmann S., Bikson M., Brewer C., Brockmöller J., et al. Safety and recommendations for TMS use in healthy subjects and patient populations, with updates on training, ethical and regulatory issues: expert guidelines. Clin Neurophysiol. 2021;132:269–306. doi: 10.1016/j.clinph.2020.10.003. - DOI - PMC - PubMed
    1. Amassian V.E., Cracco R.Q., Maccabee P.J., Cracco J.B., Rudell A., Eberle L. Suppression of visual perception by magnetic coil stimulation of human occipital cortex. Electroencephalogr Clin Neurophysiol. 1989;74:458–462. doi: 10.1016/0168-5597(89)90036-1. - DOI - PubMed
    1. Pascual-Leone A., Gates J.R., Dhuna A. Induction of speech arrest and counting errors with rapid-rate transcranial magnetic stimulation. Neurology. 1991;41:697–702. doi: 10.1212/WNL.41.5.697. - DOI - PubMed

Publication types