This application was developed in MATLAB using App Designer as part of a master’s thesis project within BrainRestore, a research initiative aimed at developing a Brain–Computer Interface (BCI) system for motor rehabilitation in patients with central nervous system disorders.
The application allows users to:
- Visualize pre-processed EEG data: Explore previously acquired datasets and apply filters for advanced analysis.
- Acquire EEG data in real time (feature under development): Record EEG signals during task execution. At present, acquisition is simulated by plotting an already recorded dataset.
- Manage subject information: Store subject details (age, sex, dominant hand) and organize data in a structured way.
- Save results: Export acquired data, markers, questionnaire results, and task performance metrics to
.xlsxfiles.
This tool is intended for research and educational use in the context of EEG-based active and passive BCI systems.
- Introduction to BCI Systems
- Project Context: BrainRestore
- Application Features
- Installation and Configuration
- Usage Instructions
- File Structure
- Purpose Statement and Project Status
- Contributing
- Demo
- License
A Brain–Computer Interface (BCI) is a system that detects voluntary changes in brain activity and translates neural signals into computational commands in real time. Electroencephalography (EEG) is the most widely used non-invasive technique in BCI applications, providing direct access to neural activity with high temporal resolution.
BCI systems are generally divided into two categories:
- Active BCI: The user intentionally modulates brain activity to control a device or receive feedback.
- Passive BCI: The system monitors brain activity to adapt human–computer interaction, often to estimate mental workload or attention levels.
Feedback plays a crucial role in BCI systems, as it informs users about their performance and encourages optimal modulation of brain activity, increasing engagement and task focus.
The BrainRestore project focuses on developing a BCI-based framework for motor rehabilitation in patients with central nervous system disorders. Specifically, the project investigated motor–cognitive Timed Up and Go (TUG) tasks while recording EEG, IMU, and EMG signals.
The goal was to assess the cognitive cost associated with dual-task motor–cognitive activities and to estimate mental workload.
EEG signals were acquired using the portable Mindtooth Touch system, which features:
- 8 water-based ("WET") electrodes (5 frontal, 3 parietal)
- 2 reference and ground electrodes
- Sampling frequency of 125 Hz
- Bluetooth technology for real-time data transmission
- Provides access to two main functionalities:
- View EEG Data
- Acquire EEG Data
- Allows users to:
- Select task, subject, channels, sampling rate, number of channels, and plotting scale
- Apply a band-pass filter by specifying low and high cutoff frequencies
- Start, pause, or stop data visualization
- Display subject information during visualization
- Reset inputs, close the app, or navigate to the acquisition screen
- Reads
.setfiles from thedataset_folder, generated by pre-processing.csvfiles usingcodeEEG.m
-
Important Note: Real-time EEG acquisition is currently under development. At this stage, starting the acquisition displays a simulated plot using pre-recorded data.
-
Allows users to:
- Add new subjects and store demographic information in
.xlsxfiles - Configure acquisition parameters (task, sampling rate, channels, scale)
- Insert task-related markers during acquisition (counting, motor, dual-task)
- Stop acquisition and start a new task for the same subject or reset for a new subject
- Save acquired EEG data, NASA-TLX questionnaire results, and task performance metrics to
.xlsxfiles
- Add new subjects and store demographic information in
-
Organizes data using a hierarchical folder structure:
EEG/ ├── Task1/ │ ├── Subject1/ │ │ ├── File di dati │ ├── Subject2/ │ │ ├── File di dati ├── Task2/ │ ├── Subject1/ │ │ ├── File di dati
- MATLAB R2020b or later
- Required toolboxes:
- App Designer
- EEGLAB Toolbox (for EEG data manipulation)
- Spreadsheet Toolbox (for
.xlsxfile handling)
- Main Screen
- Click View Data to open the data visualization interface
- Click Acquire Data to open the acquisition interface
- Data Visualization
- Select task, subject, and visualization parameters
- Apply filters if needed
- Start visualization and monitor subject information
- Data Acquisition
- Add or select a subject
- Configure acquisition parameters
- Start acquisition and insert markers when required
- Save data and complete post-acquisition questionnaires
EEG-data-visualizer/
├── main.mlapp # Schermata principale dell'applicazione
├── old_acquisition_update.mlapp # Schermata di visualizzazione dati
├── newAcquisition_update.mlapp # Schermata di acquisizione dati
├── codeEEG.m # Script per il pre-processing dei file .csv
├── dataset_folder/ # Cartella contenente i file .set
├── EEG/ # Cartella per salvare i dati acquisiti
│ ├── Task1/
│ │ ├── Subject1/
│ │ ├── Subject2/
│ ├── Task2/
│ │ ├── Subject1/
├── README.md # Questo file
This project was developed exclusively for academic purposes as part of a university thesis. It was not designed, validated, or certified as a clinical product or medical device.
The codebase has not been actively maintained or extended after thesis submission. As a result:
- Real-time EEG acquisition remains incomplete and is currently simulated
- Runtime errors or unexpected behaviors may occur, some of which are likely related to EEGLAB integration or data format assumptions (e.g., running EEGLAB before running the application,
.csv/.setimport issues, invalid filter parameters) - No comprehensive robustness, validation, or clinical-grade error handling has been implemented
- Use this repository as a research prototype or starting point, not for clinical or production use
- Verify EEGLAB compatibility and test changes on small datasets before extending the application
- Contributions, bug reports, and improvements are welcome via issues or pull requests
Contributions are welcome. Please open an issue or pull request describing:
- The proposed changes
- Tests performed
- Rationale for the modification
All contributions will be reviewed.
Here's a video showing how the application works (related to the visualization part).
video_EEG.mp4
This project is distributed under the MIT License.
See the LICENSE file for more details.