Your new experience awaits. Try the new design now and help us make it even better

DATA REPORT article

Front. Robot. AI

Sec. Computational Intelligence in Robotics

This article is part of the Research TopicIntegrative Approaches with BCI and Robotics for Improved Human InteractionView all 4 articles

Open-Access fNIRS Dataset for Motor Imagery of Lower-Limb Knee and Ankle Joint Tasks

Provisionally accepted
  • 1Oslo Metropolitan University, Oslo, Norway
  • 2Air University, Islamabad, Pakistan
  • 3University of Canberra Faculty of Education Science and Technology, Canberra, Australia

The final, formatted version of the article will be published soon.

Brain-Computer Interface (BCI) is an advanced system that enables direct communication between the human brain and external devices, bypassing the need for muscle activity. BCI can translate brain signals into commands to control assistive technologies, offering support for individuals with severe motor impairments, such as those caused by stroke or spinal cord injury. BCI hold applications in healthcare, especially for restoring movement and interaction in patients with limited voluntary motor control. By leveraging neural activity, BCIs open pathways for motor rehabilitation, assistive device control, and even cognitive assessment, enhancing quality of life and promoting greater independence.A widely used control strategy in BCI research is motor imagery (MI), which involves mentally simulating specific physical movements without any actual muscle activation. MI is considered a cognitively driven process that mimics the planning stages of real movements and activates neural networks involved in motor execution. This includes regions such as the primary motor cortex, supplementary motor area (SMA), and premotor cortex, supporting the "functional equivalence" hypothesis (Naseer and Hong, 2015). Because MI can be performed without physical movement, it is especially suitable for patients who are paralyzed, amputated, or recovering from neurological trauma, making it highly relevant for neurorehabilitation and assistive technology development.Over the past decades, a variety of neuroimaging modalities have been employed to capture the neural correlates of MI for BCI applications. These include invasive techniques like intracranial EEG (iEEG) and non-invasive modalities such as electroencephalography (EEG), magnetoencephalography (MEG), functional magnetic resonance imaging (fMRI), and functional near-infrared spectroscopy (fNIRS) (Cutini and Brigadoi, 2014). EEG is widely favoured for its high temporal resolution and affordability; however, it is highly susceptible to electrical interference and motion artefacts. On the other hand, fMRI offers excellent spatial resolution but is often limited by its high cost, immobility, and operational complexity. These limitations restrict their practical use, especially in real-world or bedside BCI applications.Among non-invasive techniques, fNIRS has emerged as a promising neuroimaging modality for BCI systems. fNIRS uses near-infrared light to measure cerebral hemodynamic responses, specifically tracking changes in oxygenated (ΔHbO) and deoxygenated hemoglobin (ΔHbR) concentrations in the cortex (Khan et al., 2020). When a brain region becomes active, local blood flow increases, leading to a rise in ΔHbO and a decrease in ΔHbR. fNIRS offers a balance between spatial and temporal resolution, is portable, non-invasive, relatively affordable, and less sensitive to movement artifacts compared to EEG or fMRI (Nazeer, Naseer, Mehboob, et al., 2020). Its quiet, mobile nature also makes it more comfortable for users and suitable for long-duration BCI sessions. These advantages make fNIRS a particularly suitable tool for developing MI-based BCI systems aimed at real-world rehabilitation scenarios.While MI has been extensively studied for upper limb movements, there is increasing interest in lower limb motor imagery tasks due to their clinical importance. Lower limb movements such as ankle dorsiflexion/plantarflexion and knee flexion/extension are fundamental to essential motor functions like walking, balance, and postural control (Brockett and Chapman, 2016). Understanding how these movements are represented in the brain during MI can help in developing effective rehabilitation protocols and control strategies for assistive devices. MI of lower limb tasks engages similar motor areas to actual movement, supporting its use in BCIs that aim to stimulate recovery or control robotic assistance.Datasets focusing on lower limb MI are essential for advancing research in rehabilitation and assistive robotics. They provide the foundation for developing and training machine learning models that can accurately decode movement intent from brain signals. Several studies have shown that MI of knee or ankle movements can generate meaningful patterns suitable for decoding and can be used to control prosthetic limbs or lower limb exoskeletons (Colucci et al., 2022). For instance, joint EEG-fNIRS studies have demonstrated the effectiveness of decoding ankle dorsiflexion and its relevance to balance recovery in stroke patients (Liang et al., 2022). Similarly, several studies has been conducted to improve classification accuracy of fNIRS (Li et al., 2024;Li, Li, et al., 2025;Li, Sun, et al., 2025) and hybrid EEG-fNIRS signals (Xu et al., 2023;Wang et al., 2025) for motor imagery/execution tasks. Such insights are crucial for improving the responsiveness and reliability of BCI-driven assistive devices.To support this line of research, we introduce a novel fNIRS dataset focused on lower limb MI tasks, specifically ankle dorsiflexion/plantarflexion and knee flexion/extension. The dataset is designed to facilitate the development of BCI systems intended for controlling lower limb exoskeletons in rehabilitation applications (Minhas, Nazeer, Naseer, Khan, et al., 2024). By capturing the hemodynamic responses associated with these specific MI tasks, the dataset enables researchers to explore neural patterns linked to lower limb motor control and develop machine learning models for real-time BCI applications. The unique focus on lower limb motor tasks, combined with the use of fNIRS, distinguishes this dataset and highlights its potential for impactful contributions to neurorehabilitation, exoskeleton design, and assistive technology research. This section details the study's methodology, including participant selection, data acquisition 80 procedures, and the experimental paradigm for MI tasks. 81 The study included 21 healthy participants (12 males and 9 females) with a mean age of 24 ± 2.1 years, 83 along with one male participant (subject 22) who had a right above-knee ultra-short stump amputation. 84Ethical approval for the study was granted by the Ethical Committee at Air University (Approval No. 85 AU/EA/2021/03/003). A pre-screening questionnaire was used to confirm that none of the participants 86 had cardiovascular or neurological conditions, as such conditions could affect blood flow regulation or 87 neural activation patterns (Pelicioni et al., 2019). Participants were instructed to avoid smoking and 88 caffeine for at least three hours prior to the experiment (Sargent et al., 2020) Eight sources and eight detectors were used to record fNIRS signals from the motor cortex, yielding twenty physiological channels. Optode placement followed the internationally recognized EEG 10-20 system (Homan, Herman and Purdy, 1987), which ensures standardized and accurate localization of brain regions in neurophysiological research. A fixed source-detector distance of 3 cm was maintained using optode holders, as this spacing is optimal for capturing neural activity from the motor cortex [29], (Gagnon et al., 2014). Brain signals were recorded using the NIRSport2 system (NIRx Medical Technologies, Germany) using 760 nm & 850 nm wavelengths at a sampling rate of 10.1725 Hz. Data collection was managed using Aurora fNIRS software (NIRx Medical Technologies, Germany), while PsychoPy was used to design the experiment, send triggers, and run the task.To ensure signal accuracy, secure attachment of optodes to the scalp was prioritized, particularly in participants with thick hair, which can obstruct optical signals (Kwasa et al., 2023). This was achieved using appropriately sized elastic caps equipped with spring-loaded grommets and holders for consistent scalp contact. Real-time signal monitoring via Aurora facilitated the identification and correction of poor contact points. Participants were also advised to wash their hair prior to the session to minimize interference from oil and dandruff. In this study, MI tasks included dorsiflexion and plantarflexion of the ankle joint, as well as flexion and extension of the knee joint. These tasks were performed sequentially using the right leg, left leg, and both legs. Participants were positioned in Fowler's position (a 45-degree recline), which was selected to enhance cerebral blood flow (Kubota et al., 2017). The experiment took place in a quiet environment with reduced ambient light to minimize noise and optical interference (Solovey et al., 2009), thereby improving data accuracy by reducing artifacts. To differentiate between MI and ME, inertial measurement unit (IMU) sensors were secured to the participants' ankle joints using adjustable straps. These sensors were placed for monitoring purpose and helped detect any unintended physical movements during the tasks (Mizuguchi et al., 2012). Participants were seated in front of a computer screen placed approximately 2 meters away. Prior to the experiment, they were thoroughly briefed on the procedure and instructed to avoid any unnecessary movements (Shin et al., 2017). Trials were discarded if any physical movement was detected during the task. Visual cues were presented on the screen to guide participants throughout the experiment. Figure 1 shows the overall experimental protocol.The task began with a 45-second rest period to allow the hemodynamic response to stabilize. During this time, participants were instructed to remain still and avoid any voluntary movements. Following the initial rest, participants performed an MI task involving ankle plantarflexion, guided by on-screen instructions for a duration of 5 seconds. This was followed by a 10-second rest period to allow the hemodynamic signals to return to baseline (Nazeer, Naseer, Khan, et al., 2020). Subsequently, participants engaged in an MI task involving ankle dorsiflexion for 5 seconds. This cycle of MI tasks and rest was repeated for three trials, followed by a final 45-second rest period to return to baseline. The same protocol was repeated for knee joint movements, specifically flexion and extension, following the same sequence and timing as used for ankle tasks. Data preprocessing was carried out using Satori 2.0 (NIRx Medical Technologies, Germany). fNIRS signals are often affected by physiological artifacts such as respiration, cardiac pulsation, Mayer waves, and motion-related noise (Hakimi et al., 2023). To reduce artifacts, a fourth-order Butterworth bandpass filter was applied with a frequency range of 0.01-0.3 Hz (Minhas, Nazeer, Naseer, Kainat, et al., 2024). Z-transform normalization was also applied to standardize the data, making it easier to compare across subjects or conditions. Additionally, baseline-zero adjustment was performed to shift the starting point of the signal to zero, helping to clearly observe task-related changes over time. After filtering, the modified Beer-Lambert law was used to convert the optical signals into concentration changes of oxyhemoglobin (ΔHbO) and deoxyhemoglobin (ΔHbR) (Kocsis, Herman and Eke, 2006). The dataset is organized and distributed in the shared near infrared file format (.snirf), a standardized format designed to facilitate the sharing and analysis of fNIRS data. It comprises recordings from 22 participants, each performing six distinct motor imagery tasks. Correspondingly, the dataset is divided into six separate folders, each representing a specific activity (e.g., Left Ankle), with each folder containing data from all 22 participants for that particular task. Within these activity-specific folders, individual subject data are stored in separate subfolders named by participant ID. Each subfolder contains a pre-processed CSV file (e.g., sub1.csv) with filtered fNIRS signals, which can be used for classification and analysis tasks. In summary, we present a structured and preprocessed fNIRS dataset focused on lower limb motor imagery tasks involving the ankle and knee joints. Collected from 22 participants, this dataset supports the development of real-time BCI applications for rehabilitation and assistive technologies. Its standardized format, clear organization, and emphasis on lower limb MI tasks make it a valuable resource for researchers aiming to advance decoding algorithms, improve motor function restoration strategies, and enhance the design of BCI-driven exoskeleton systems.The study recruited limited number of participants i.e., 22, though it is sufficient for initial testing, however the sample size may not fully capture the variability present in larger or more diverse populations.

Keywords: Brain-computer interface, functional near-infrared spectroscopy, Open access, Motor Imagery, Dataset

Received: 29 Aug 2025; Accepted: 19 Nov 2025.

Copyright: © 2025 Khan, Nazeer, Minhas, Naseer and Mirtaheri. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence:
Haroon Khan, haroonkh@oslomet.no
Hammad Nazeer, hammad@au.edu.pk

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.