Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSVEP-Toolbox: MATLAB Toolbox for SSVEP-Based Brain-Computer Interfaces

A comprehensive open-source MATLAB toolbox for template-based SSVEP frequency detection and recognition

SSVEP-based brain-computer interface frequency detection using EEG signals

Paper DOI MATLAB

Authors: Mohammad Norizadeh Cherloo, Homa Kashefi Amiri, Amir Mohammad Mijani, Liang Zhan, & Mohammad Reza Daliri


Overview

SSVEP-Toolbox is an open-source MATLAB toolbox for steady-state visual evoked potential (SSVEP)-based brain-computer interfaces (BCIs).

The toolbox provides implementations and demonstration scripts for 19 template-based SSVEP frequency detection methods, including widely used CCA-, TRCA-, CORRCA-, and Multivariate Synchronization Index (MSI)-based approaches, as well as several extensions and combination methods.

The toolbox was developed alongside the following comprehensive study:

Norizadeh Cherloo et al. (2025). A comprehensive study of template-based frequency detection methods in SSVEP-based brain–computer interfaces. Behavior Research Methods, 57, 196.

The study systematically reviews and benchmarks template-based SSVEP frequency detection methods, while this repository provides the corresponding MATLAB implementations and practical demonstration codes.

Key Features

  • 19 template-based SSVEP frequency detection methods
  • MATLAB implementations for SSVEP-based BCI research
  • CCA-based SSVEP frequency recognition methods
  • TRCA-based SSVEP detection methods
  • CORRCA-based SSVEP detection methods
  • Multivariate Synchronization Index (MSI)-based methods
  • Filter-bank SSVEP detection approaches
  • Multiset and Multiway CCA methods
  • Tensor-based SSVEP analysis
  • Combination and fusion approaches
  • Demonstration scripts for individual algorithms
  • Benchmarking using the Tsinghua SSVEP Benchmark Dataset
  • Reproducible framework for comparing SSVEP detection algorithms
  • Mathematical descriptions and methodological details provided in the associated publication

Why SSVEP-Toolbox?

Steady-state visual evoked potentials (SSVEPs) are widely used in EEG-based brain-computer interfaces because periodic visual stimulation produces frequency-specific responses that can be detected from neural signals.

A large number of algorithms have been proposed for SSVEP frequency detection and recognition, including Canonical Correlation Analysis (CCA), Task-Related Component Analysis (TRCA), Correlation-based Component Analysis (CORRCA), and Multivariate Synchronization Index (MSI).

These methods differ in their mathematical formulations, use of reference signals and templates, exploitation of training data, filter-bank structures, and computational procedures.

SSVEP-Toolbox brings a broad collection of these methods into a common MATLAB framework, making it easier to:

  • study SSVEP frequency detection algorithms;
  • reproduce published methods;
  • compare different SSVEP recognition approaches;
  • benchmark algorithms using a common dataset;
  • understand the mathematical principles behind SSVEP detection;
  • evaluate different template-based approaches;
  • develop and test new SSVEP-based BCI algorithms.

Implemented SSVEP Detection Methods

The toolbox contains 19 template-based SSVEP frequency detection methods organized into four major methodological families.


CCA-Based SSVEP Frequency Recognition Algorithms

Canonical Correlation Analysis (CCA) and its extensions form one of the major families of template-based methods for SSVEP frequency recognition.

These methods demonstrate different ways of exploiting correlations between multichannel EEG responses and reference/template signals for SSVEP frequency recognition.


MSI-Based SSVEP Frequency Recognition Algorithms

The Multivariate Synchronization Index (MSI) provides a synchronization-based approach for SSVEP frequency detection by quantifying the synchronization between multivariate EEG responses and reference signals.

These methods provide alternative approaches to CCA-based frequency recognition for SSVEP-based brain-computer interfaces.


TRCA-Based SSVEP Frequency Recognition Algorithms

Task-Related Component Analysis (TRCA) exploits the reproducibility of task-related components across SSVEP trials.

TRCA-based approaches are particularly useful when training trials are available and can be used to construct subject-specific SSVEP templates.


CORRCA-Based SSVEP Frequency Recognition Algorithms

Correlation-based Component Analysis (CORRCA) methods exploit correlations between EEG trials and SSVEP templates for frequency recognition.

These methods provide another family of correlation-based approaches for EEG SSVEP detection and BCI classification.


Method Categories at a Glance

Method Family Main Approaches
CCA-based CCA, FBCCA, IT-CCA, Data-Driven CCA, Multiway CCA, Multiset CCA, L1-Regularized Multiway CCA, Fusing CCA, FBSS-CCA, Combination Methods, MCM
MSI-based MSI, FBMSI, IST-MSI
TRCA-based TRCA, FBTRCA, eTRCA
CORRCA-based CORRCA, FBCORRCA, TSCORRCA

Together, these methods provide a broad collection of template-based SSVEP frequency detection and recognition algorithms for EEG-based brain-computer interface research.


SSVEP Frequency Detection Workflow

A typical SSVEP-based BCI pipeline using these methods can be summarized as:

Visual Stimulation
       ↓
SSVEP Response
       ↓
EEG Acquisition
       ↓
Preprocessing
       ↓
SSVEP Trial / Epoch
       ↓
Template / Reference Signals
       ↓
Frequency Detection Algorithm
       ↓
CCA / TRCA / CORRCA / MSI / Other Method
       ↓
Target Frequency Recognition
       ↓
BCI Command

The primary focus of this toolbox is the SSVEP frequency detection and recognition stage of an EEG-based brain-computer interface.


Benchmark Dataset

The toolbox uses the Tsinghua SSVEP Benchmark Dataset, a widely used dataset for evaluating SSVEP-based BCI algorithms.

The dataset can be obtained from the Tsinghua University BCI Laboratory:

Download the Tsinghua SSVEP Benchmark Dataset

After downloading the dataset, place the required files inside the repository's:

dataset/

directory.

The benchmark dataset enables researchers to reproduce the experiments and compare different SSVEP frequency detection algorithms within a common evaluation framework.


Installation Guide

Step 1 — Clone or Download the Repository

Clone the repository using Git:

git clone https://github.com/Mohammad-Norizadeh-Cherloo/SSVEP-Toolbox.git

Alternatively, download the repository as a ZIP file from GitHub.

Step 2 — Download the Benchmark Dataset

Download the Tsinghua SSVEP Benchmark Dataset:

https://bci.med.tsinghua.edu.cn/download.html

Place the dataset inside the:

dataset/

folder.

Step 3 — Install the Tensor Toolbox

Some tensor-based methods require the MATLAB Tensor Toolbox.

Download the Tensor Toolbox from:

Tensor Toolbox

Install it according to the instructions provided by the Tensor Toolbox project.

Step 4 — Add the Toolbox to the MATLAB Path

Open MATLAB and run:

install.m

This adds the required directories to the MATLAB path.


Running the Demonstration Codes

Each implemented SSVEP detection method has a corresponding MATLAB demonstration script.

For example, Standard CCA can be executed using:

Standard_CCA_demo

TRCA can be executed using:

TRCA_demo

MSI can be executed using:

MSI_demo

and CORRCA can be executed using:

CORCA_demo

The demonstration scripts provide practical examples of applying the corresponding SSVEP frequency detection algorithm to EEG data.


Example Algorithms

Standard CCA

Standard CCA detects the target SSVEP frequency by measuring the canonical correlation between multichannel EEG signals and sinusoidal reference signals corresponding to candidate stimulation frequencies.

Filter Bank CCA

FBCCA extends CCA by applying multiple frequency-band filters and combining the resulting correlation scores to improve SSVEP frequency recognition.

TRCA

TRCA learns spatial filters that maximize the reproducibility of task-related components across repeated SSVEP trials.

CORRCA

CORRCA uses correlation-based spatial filtering to extract components that maximize the correlation between EEG responses.

Multivariate Synchronization Index

MSI measures multivariate synchronization between EEG responses and reference signals and can be used for SSVEP frequency detection without relying exclusively on canonical correlation.


Applications

SSVEP-Toolbox can be used for research and education in:

  • SSVEP-based brain-computer interfaces
  • EEG signal processing
  • SSVEP frequency detection
  • SSVEP frequency recognition
  • SSVEP classification
  • Brain-computer interface algorithm development
  • EEG-based BCI research
  • Comparison of CCA and TRCA methods
  • Comparison of SSVEP detection algorithms
  • SSVEP algorithm benchmarking
  • Neural signal processing
  • Reproducible BCI research
  • BCI algorithm education and teaching

Research Use

The toolbox is intended to support researchers who want to:

  1. Reproduce existing SSVEP frequency detection methods.
  2. Compare different SSVEP recognition algorithms.
  3. Benchmark algorithms using a common EEG dataset.
  4. Study the mathematical principles underlying SSVEP detection.
  5. Develop new template-based SSVEP algorithms.
  6. Evaluate CCA-, TRCA-, CORRCA-, and MSI-based approaches.
  7. Use MATLAB implementations as a foundation for further BCI research.

Associated Publication

This toolbox accompanies the following peer-reviewed publication:

Norizadeh Cherloo, M., Kashefi Amiri, H., Mijani, A. M., Zhan, L., & Daliri, M. R. (2025).

A comprehensive study of template-based frequency detection methods in SSVEP-based brain–computer interfaces.

Behavior Research Methods, 57, 196.

DOI: https://doi.org/10.3758/s13428-025-02710-6

Read the full paper

The paper provides the mathematical formulations, methodological descriptions, experimental evaluation, and benchmark results associated with the algorithms implemented in this toolbox.


Citation

If you use SSVEP-Toolbox, its implementations, or the associated benchmark results in your research, please cite the following publication:

@article{norizadeh2025comprehensive,
  title={A comprehensive study of template-based frequency detection methods in SSVEP-based brain--computer interfaces},
  author={Norizadeh Cherloo, Mohammad and Kashefi Amiri, Homa and Mijani, Amir Mohammad and Zhan, Liang and Daliri, Mohammad Reza},
  journal={Behavior Research Methods},
  volume={57},
  pages={196},
  year={2025},
  doi={10.3758/s13428-025-02710-6}
}

Repository Structure

SSVEP-Toolbox/
│
├── dataset/
│
├── Standard_CCA_demo.m
├── filterbank_CCA_demo.m
├── IT_CCA_demo.m
├── data_driven_CCA_demo.m
│
├── Mulitway_CCA_demo.m
├── Mulitset_CCA_demo.m
├── L1_Regularized_Mulitway_CCA_demo.m
├── fusing_CCA_demo.m
├── filterbank_SSCCA_demo.m
├── combination_method_demo.m
├── MCM_model_demo.m
│
├── MSI_demo.m
├── filterbank_MSI_demo.m
├── IST_MSI_demo.m
│
├── TRCA_demo.m
├── FBTRCA_demo.m
├── ETRCA_demo.m
│
├── CORCA_demo.m
├── FBCORRCA_demo.m
├── TSCORRCA_demo.m
│
└── install.m

Contributing

Contributions, suggestions, corrections, and improvements are welcome.

If you identify an implementation issue, reproducibility problem, documentation issue, or potential improvement, please open a GitHub Issue.

Researchers interested in extending the toolbox with additional SSVEP detection algorithms are also welcome to contribute.


License

Please refer to the repository license for information regarding the use, modification, and distribution of the code.


Author: Mohammad Norizadeh Cherloo
Educator & Researcher in Machine Learning, Deep Learning, Neural Decoding, Biomedical Signal Processing, and Brain-Computer Interfaces

Website Google Scholar YouTube LinkedIn

Acknowledgment

This toolbox was developed as part of research on SSVEP-based brain-computer interfaces, EEG signal processing, and template-based frequency detection methods.

For the mathematical details, methodological descriptions, and comprehensive benchmark results, please refer to the associated publication.


If you use this toolbox in your research, please cite the associated paper.

Releases

Packages

Contributors

Languages