EEG Based Brain Computer Interface(BCI) Research for Computer Science

Dinuka Salwathura
3 min readNov 4, 2017

For our final year project we selected EEG related research. Because we had the Emotiv EPOC neuroheadset which is non-invasive and can be easily extract EEG with it.

EEG is a broad subject and we needed to narrow down our research into a feasible one for a year. EEG Acquisition is done for several instances/experiments. There are four main EEG acquisition types,

  1. Event Related Evoked Potentials (ERP)
  2. Visual Evoked Potentials (VEP)
  3. Evoked Potentials Acoustic (PEA)
  4. Motor Evoked Potentials (MEP)
  5. Steady State Visual Evoked Potentials (SSVEP)

People have mostly done researches on Subject Dependent BCI. That means we need to train the software system for the specific user or set of users before using it. So we thought of doing the research on making BCI Subject Independent. But we can’t make BCI Subject Independent for every use case. Out of the above EEG acquisition methods we selected VEP.

Normally EEG an be acquired from 64 different positions of the head as shown in the below diagram.

Fig 1 — Node Placement [1]

Visual Cortex which is sensitive for the visual stimuli of our brain is located at the back of the brain. Which is correspondent to the nodes O1 and O2. So we had to analyze the EEG of O1 and O2 channels.

To obtain data from Emotiv EPOC neuroheadset we have two methods. To obtain data from the Emotiv SDK[2] or using the Emokit open source library for python[3]. We first analzed both the data coming from the sdk and emokit.

We noticed the data obtained from Emotiv SDK is preprocessed using the algorithms developed by Emotiv. So it may not be more effective to use sdk data in analyzing since we don’t know what are the preprocessing they have done.

Emokit library gave us the raw data and we could do our own preprocessing. In the terms of preprocessing there are hell lot of noise in EEG data. One obvious noise is the 50Hz noise from the electricity. There are so much of 5unrecognized noise which may differ from person to person.

EEGFig 2 — EEG trace of a person presented to a flash which is VEP

Figure 2 is extracted from [3] and it shows the EEG change when the subject is presented to a flash light. All the other spiked in figure 1 could be noise. And EEG subjects to gender also[5].

After extracting EEG and preprocessing you have to use Machine Learning to classify the signals. We need to label the data that we know, which is according to the experiment. For machine learning we used Scikit-learn library, numpy, pandas, matplotlib libraries available for python. KNIME open source data analyzing tool was also used. In KNIME we can use the graphical tools and input csv/json/flat data and plot them, analyze them and get the statistics of the dataset easily.

Fig 3 —A KNIME Workflow of the project

So if you are going to do a research in BCI you need to identify which particular acquisition method you will work on, what is the device you are using, how will you acquire data. We found after doing all the experiments and analysis VEP signals poor when it comes to subject independent. They work very good for Subject Dependent cases, we got 76% accuracy for cross validation on VEP classification.

You can use our project which can extract data from Emotiv EPOC neuroheadset and classify them with the machine learning algorithms in Scikit-learn in python

https://github.com/Neuro-UOM/

References

[1]https://www.researchgate.net/profile/Yuvaraj_Rajamanickam3/publication/261746849/figure/fig5/AS:296656764456974@1447739892874/Fig-5-Emotiv-EPOCs-electrode-positioning-according-to-the-10-20-system-used-for.png

[2]https://github.com/Emotiv/community-sdk

[3]https://github.com/openyou/emokit

[4]http://webvision.med.utah.edu/wp-content/uploads/2011/11/1.EEG_.jpg

[5]https://www.ncbi.nlm.nih.gov/pubmed/23130897

--

--

Dinuka Salwathura

Computer Science Engineer | Co-Founder of Stack Technologies(Exited in 2022)), Hybriteq & Tripmo | https://dinukasal.github.io