Transcranial magnetic stimulation (TMS) has proven to be a promising tool for research, diagnosis, and treatment of neurodegenerative diseases and psychiatric disorders such as depression, schizophrenia, chronic pain, Parkinson’s disease, and tinnitus (ringing in the ears). A noninvasive and painless technique to stimulate the cerebral cortex with magnetic fields, TMS was created in 1985 by British scientist Anthony Barker, and has since captured the attention of the scientific community. The development of a robotic neuronavigation system with freely available software by researchers at the University of São Paulo’s Ribeirão Preto School of Philosophy, Sciences, and Languages and Literature (FFCLRP-USP) may assist in consolidating the technique.
In this innovation, a robotic arm substitutes manual positioning of the coil that emits magnetic pulses towards the brain. Control is achieved using neuronavigation software known as InVesalius, a program that uses magnetic resonance imaging (MRI) or computerized tomography (CT scan) images to create a three-dimensional model of the brain and determine the exact site for stimulation. This software is also equipped with a computing tool called MarLe, capable of identifying the position of the cranial bone and coil to ensure precise cerebral stimulation. MarLe is a wordplay on “markerless,” in reference to the distribution of markers on the head to guide neuronavigation.
“The robotic arm positions the coil according to commands given by the operator via the neuronavigation system, and automatically adjusts the position if the user moves,” explains physicist Renan Matsuda, who developed the robotic control and MarLe during his doctoral work under the Program for Physics Applied to Medicine and Biology at FFCLRP-USP.
The study resulting in the creation of the system was conducted at the FFCLRP Biomagnetism Laboratory under the guidance of physicist Oswaldo Baffa Filho, a professor at the institution, with the work co-guided by physicist Victor Hugo Souza, an alumnus from USP at Ribeirão Preto currently working as a researcher at Finland’s Aalto University, a partner in the research from the outset. Physicist Risto Ilmoniemi, emeritus professor at Aalto, is also collaborating on the study.
The project received support from the Brazilian National Council for Scientific and Technological Development (CNPq) and the Research, Innovation and Dissemination Center for Neuromathematics (RIDC NeuroMat), funded by FAPESP and coordinated by Baffa. Last year, Matsuda was one of the winners of the 12th edition of the USP Outstanding Thesis Award in the category General Area – Innovation.
The group has published several scientific articles on innovation, most recently in the journals Physical and Engineering Sciences in Medicine, in May 2023, and Brain Stimulation in March 2024. In this latter publication, researchers demonstrated that combining the robotic positioning with a new multichannel TMS system under development at Aalto University is still more effective for gaining precision in treatments with TMS. In the traditional procedure, a single coil is used to stimulate the brain, whereas multichannel TMS uses five overlapping coils.
“The combination of these techniques enables automation of the whole process to position the stimulator and map brain functions with millimeter accuracy,” says Souza. He goes on: “although magnetic stimulation does not present risks to the patient, if the pulses are applied in unwanted places the stimulation could cause contractions of the jaw and other cranial muscles, bringing on headaches.”
Map of the brain
Matsuda began working on the project during his undergraduate course in medical physics between 2011 and 2015 at FFCLRP, meeting Souza and physicist André Peres, who, under Baffa’s guidance, were developing neuronavigation software in collaboration with researchers from the Renato Archer Information Technology Center (CTI) of the Brazilian Ministry of Science, Technology, and Innovation (MCTI). “We created a kind of Google Maps for the brain,” says Matsuda.
Named for the father of modern anatomical studies, Belgian physician Andreas Vesalius (1514–1564), the InVesalius software was made available on the MCTI website and in online repositories. “The development of software for navigated magnetic stimulation was the great differentiator in this project,” says Baffa. “There was commercial software available for neuronavigation with specific functions for TMS, but ours was the world’s first with open-source code. Last year a new free-to-use software for TMS emerged in the US,” says Souza. An article describing the development of InVesalius was published in November 2018 in the Journal of Neuroscience Methods.
The next step, taken during Matsuda’s PhD studies, was development of the robotic control and the MarLe, the spatial tracking system for neuronavigation. According to the researcher this resulted in the creation of a flexible system enabling integration of the neuronavigation software into any robotic arm acquired in the market. On commercial TMS platforms the software is associated to a specific device, and the systems—all imported—generally cost more than €100,000 (about R$600,000), while the robotic arm alone can be acquired for €30,000 (R$180,000).

Célio MessiasTMS equipment at USP’s Ribeirão Preto laboratoryCélio Messias
Research, diagnosis, and treatment
Whether at research centers or assistance services, Brazil is among the countries with more widely disseminated noninvasive neuroimaging, says physiotherapist Abrahão Fontes Baptista, of the Center for Mathematics, Computing, and Cognition at the Federal University of ABC (UFABC). “The USP team at Ribeirão is a global leader in terms of development,” he adds.
And this is not mere opinion. In 2021, Baptista carried out a scientometrics study (aimed at evaluating scientific metrics) and mapped Brazilian output on the theme on international databases Scopus and Web of Science. He concluded that Brazil is at the forefront of global scientific production on noninvasive neuromodulation, an area encompassing not only transcranial magnetic stimulation, but other noninvasive categories of neural activity modulation.
Baptista says that physiotherapy professionals are currently among those most resorting to neuromodulation, whose primary indications include chronic pain control, recovery from neurological conditions, such as Multiple Sclerosis, cerebrovascular accident (CVA, or more commonly, stroke), and spinal cord injuries. As a diagnostic tool, TMS has been used to evaluate the function and integrity of the corticospinal motor pathways that transmit the signals responsible for voluntary body movements, identifying possible damage.
This is the research field of neurobiologist Claudia Domingues Vargas, of the Federal University of Rio de Janeiro (UFRJ) and a researcher at RIDC NeuroMat. Vargas undertakes studies with patients suffering lesions to the brachial plexus, a bundle of nerves extending from the spinal cord to the shoulders, arms, and hands. “This is a common injury in motorcycle accidents,” explains Vargas.
Transcranial magnetic stimulation enables mapping of neural impairment and carries out a residual assessment of the affected area, because the lesion may adversely affect certain fibers and spare others. Using NeuroMat, the researcher has been following the project since the beginning. “It is a very user-friendly platform, but its most important aspect is the specifics. Using InVesalius, I can accurately find out whether I am reaching the area of interest.”
According to psychiatrist André Ruszkowski Brunoni, of the USP School of Medicine Psychiatry Department, new studies into depression may increase the requirement for more precise equipment. “In order to activate the depressed brain, the coil has to be placed over the prefrontal cortex area; however, functional neuroimaging studies have begun to emerge, showing more specific sites to improve the response to treatment. This is something still being investigated, and, if confirmed, there will be a significant demand for more precise equipment. “Then the work by the Ribeirão Preto group will come to the fore,” predicts Brunoni.
The specialist, however, does not foresee immediate clinical applicability of the robotic arm in treating depression. “It is a very expensive device that will need to be tested on patients to confirm whether there are additional gains that offset the treatment cost.”
The psychiatrist has been conducting research into depression, anxiety, obsessive-compulsive disorder, post-traumatic stress disorder, bipolar disorder, and schizophrenia at the University of São Paulo School of Medicine’s Hospital das Clínicas for more than 10 years—for now, the treatment is limited to depression, the most widely investigated condition. He takes on patients through research projects and private healthcare plans. The procedure is yet to be included in the Brazilian National Health Service (SUS), although transcranial magnetic stimulation was recognized by the Federal Medicine Council in 2012.
“We have enough robust evidence to include neuromodulation in the SUS system, but CONITEC [National Commission for Incorporation of Technologies in SUS] still requires the formulation of a project to this end,” says Baptista, of UFABC. He goes on to explain that current care is provided to the population through extension projects run by the university.
While the technique is not available through SUS, the procedure is becoming more common in the private health network as the devices become cheaper, with sessions costing between R$350 and R$500.
“With more modern protocols now, a good response can be achieved after fifteen days. Stimulation begins on a weekly basis, and is then spaced out over time, just for maintenance,” explains Brunoni, who has been developing several research projects, some supported by FAPESP, with a view to making neurostimulation treatment more effective.
Matsuda, currently on a postdoctoral internship at Aalto University, is also working to improve the therapeutic tool. “At the moment I’m working with the electroencephalogram [EEG]. The idea is to define in which region of the brain to apply the magnetic pulse used not only in MRI, but also EEG signals to monitor electrical brain activity at the time of application.” The use of resonance images in conjunction with EEG signals, he says, may provide gains in accuracy and increased efficacy of the procedure.
The story above was published with the title “A helm to navigate the brain” in issue in issue 348 of february/2025.
Projects
1. Center for Research, Innovation, and Dissemination in Neuromathematics – NeuroMat (nº 13/07699-0); Grant Mechanism RIDC; Principal Investigator Oswaldo Baffa Filho (USP); Investment R$35,172,903.80.
2. Can a context tree model predict primary motor cortex excitability? A study of robotic transcranial magnetic stimulation navigated using electromyography and electroencephalography (nº 22/14526-3); Grant Mechanism Postdoctoral Fellowship; Supervisor Oswaldo Baffa Filho (USP); Beneficiary Renan Matsuda; Investment R$165,298.59.
Scientific articles
SOUZA, V. H. et al. Development and characterization of the InVesalius Navigator software for navigated transcranial magnetic stimulation. Journal of Neuroscience Methods. Vol. 309, pp. 109–20. Nov. 1, 2018.
MATSUDA, R. H. et al. MarLe: Markerless estimation of head pose for navigated transcranial magnetic stimulation. Physical and Engineering Sciences in Medicine. Vol. 46, pp. 887–96. May 11, 2023.
MATSUDA, R. H. et al. Robotic–electronic platform for autonomous and accurate transcranial magnetic stimulation targeting. Brain Stimulation. Vol. 17, pp. 469–72. Mar.–Apr. 2024.
SÁ, K. N. et al. Pesquisa brasileira em neuromodulação não invasiva aplicada às condições de saúde. Arquivos de Neuro-Psiquiatria. Nov. 22, 2021.
Republish