ملاحظة: تمت كتابة هذه التدوينة باللغة الإنجليزية لاختصاصها
In this post, we will discuss how to run your first P300 speller experiment using the Emotiv EEG headset and BCI2000.
P300 spellers are independent Brain-Computer Interface (BCI) spellers that allow you to communicate through your brain signals.
To run a P300 speller experiment, we need the following:
- An EEG device, such as Emotiv Epoc flex or Epoc +.
- A BCI script or software, such as BCI2000.
Therefore, this post will guide you through running your first P300 speller experiment using the Emotiv device and BCI2000.
Step 1: Register in BCI2000
Note: you can follow the registration instructions mentioned here.
Step 2: Download the BCI2000 source code
Step 3: Connect your P300 speller with your EEG device
- Rename it as P3Speller_Emotiv.bat, and open it in a text editor, e.g. notepad++.
- Change the signal generator file to an Emotiv file which is an ADC file that contains all the information needed for connecting Emotiv devices with BCI2000 software.
Step 4: Configure the P300 speller
Go to the batch folder and run the P3Speller_Emotiv.bat file. Click config in the P3Speller_Emotiv.bat window.
Table 1. P300 speller configuration: Emotiv source settings
Variable | Value |
---|---|
SourceCh | 14 |
SampleBlockSize | 4 |
SamplingRate | 128 |
ChannelNames covered |
AF3 F7 F3 FC5 T7 P7 O1 O2 P8 T8 FC6 F4 F8 AF4 |
SourceChOffset | 00000000000000 |
SourceChGain | 11111111111111 |
HighPassFilter | at 0.1Hz |
Figure 2. P300 speller configuration: Emotiv source settings
Finally, you can also change the application settings to design the P300 speller paradigm.
The following table and figure 4 illustrate the basic application settings for any language. Note that we explain the paradigm details of Arabic and English spellers in this tutorial. A detailed view of the paradigm design is explained in figures 5 and 6.
Table 2. P300 speller configuration: Basic application settings
Variable | Value |
---|---|
NumberOfSequences | 10 |
InterpretMode | copy mode |
DisplayResults | unchecked |
NumMatrixColumns | 6 |
NumMatrixRows | 6 |
TextToSpell | The desired word or sentence |
After applying the above changes, save a parameter file that contains all the settings for each word in your experiment dataset (if any, otherwise use a specific word). Parameter files are helpful when the same settings are used more than once.
In order to save the parameter file for the current configuration, click the Save Parameters button, then choose the file path and name to be stored within. Figure 7 shows an example of saving a parameter file.
Step 5: Wear your Emotiv device and ensure electrodes' connection
Epoc Flex from Emotiv company has up to 32 channels, and it contains all of the desired channels (Fz, Cz, Pz, P3, P4, P7, P8, and Oz).
First of all, to use Epoc Flex device for the first time, you need to charge it for about 3 hours, i.e. until its batteries become full. After that, start with hydrating the pads, placing them in the headset, then wearing it. The process will take about 2 to 5 minutes.
During your first two attempts of using the device, the contact quality might be low, which is expected as the pads take time to get softer. However, you will get 100% contact quality in your second or third attempt.
In addition, here are some tips to achieve 100% contact quality:
Get the right size of the Epoc Flex cap after measuring the average head sizes of your participants.
The headset is fully charged.
Electrodes are hydrated.
Softly and gently press on the pads, i.e. electrodes, after placing the headset in every experiment.
Exclude any metal hair accessories.
Wait some time after doing the above tips.
Device Contact Quality:
Wearing and correctly connecting the Emotiv devices requires training and experience. Due to that, Emotiv helps with their software to provide the users with the device's contact quality and if the electrodes are placed correctly or not. Figure 8 shows a screenshot of the contact quality pages for Epoc Flex device. Green lighted electrodes of the desired channels, i.e. channels with blue borders, are needed to use the Epoc Flex device.
Note: Based on our experiments, the Epoc Flex can work effectively without reaching 100% contact quality.
Figure 8. Epoc Flex contact quality page
Step 6: Run P300 speller (Calibration session)
Configure the speller by loading a pre-stored parameter file, as mentioned in Step 4, keeping in mind to change the storage information about the subject, i.e. participant name, with each participant. Then save the configuration by clicking on Set Config as illustrated in figure 9.
After setting the configuration, four windows will be generated:
• Log window: which displays and stores everything related to the experiment. An example of the log file is presented in figure 10.
• ERP for channel one window: which will display the Event Related Potentials (ERP), i.e. P300, detection when the experiment starts. An example of it is presented in figure 11.
Figure 11. P300 speller: ERP window
Then start the experiment by clicking on Start in the P3Speller_Emotiv window. Then a ”Waiting to start” text will appear as in figure 14.
The flashes will appear, indicating the beginning of the spelling process, and the process will continue until the full word is spelt. After spelling the term, a ”TIME OUT !!!” string will appear, as shown in figure 15.
After finishing the spelling experiment, a data file will be automatically saved in the data folder under the participant's name. That data file needs to be classified with the P300Classifier tool.
Step 7: Classify P300 speller outcomes using the P300Classifier
The experiments' data files need to be classified with the P300 classifier tool that BCI2000 provides. P300 classifier is placed in the tools folder in BCI2000. It is a stepwise regression that classifies the training file based on its flashes. A single file only can be added as a trained file. Then, specific parameter changes could be made before running the classifier. P300 classifier settings depend on some parameters related to the classifier, filter, spatial, and temporal settings. You only need to alter the settings of the filtering method and spatial settings, i.e. channel set.
BCI2000 offers two filtering options: raw or Common Average Reference (CAR). CAR is a known spatial filtering method that proved its efficiency when working with standard electrode placement systems, such as in our case 10-10 system. Moreover, the channels specified in the spatial setting are specified in the P300 speller configurations in the source settings. Thus, the channel set should be the same as the number of channels specified earlier, which were 14 channels that the BCI2000 supports with Emotiv devices.
Figure 16 illustrates the classification steps and parameters settings. After making these steps, a report will be generated in the details tab, where each flash’s accuracy will be presented, the spelt word in each flash, and the spelling duration as shown in figure 17. Note that high accuracy in fewer flashes represents a fast spelling process.
Final words..
Comments
Post a Comment