P300: Basic P300 Speller demo with xDAWN Spatial Filter

  • NB: Document intended for OpenViBE 1.2.0 (doc updated 20.May.2016).

This document describes using the OpenViBE P300 demo scenario with the xDAWN spatial filter.

Using the speller

This set of scenarios implements the P300 Speller BCI using only the OpenViBE Designer. You will find it in share/openvibe/scenarios/bci-examples/p300-speller-xDAWN. P300 is a well-known pattern in the brainwaves, a positive peak that occurs 300 ms after a relatively rare but expected event. The Speller application flashes randomly a grid of letter, and the user is instructed to focus on the letter (s)he wants to spell out. After some repetitions, a vote determines which letter the BCI system selects.

The P300 pattern can be enhanced using the xDAWN algorithm that trains a dedicated spatial filter. The approach allows integrating information from a larger set of electrodes than what is used in the ‘basic’ OpenViBE P300 demo scenario. More details of xDAWN can be found here: http://www.icp.inpg.fr/~rivetber/Publications/references/Rivet2009a.pdf.

1. Acquisition setup
To use the P300 speller, first have the headset set up on the subject with a proper electrode configuration. Then, run the Acquisition Server and start the data acquisition. With the P300 as implemented by these scenarios, it may be beneficial to disable the drift correction in the acquisition server settings.

2. Running the scenarios
Next, execute the following scenarios in order. The scenarios 1 to 3 are needed to train a classifier that detects the P300 event.

  • p300-xdawn-0-signal-monitoring.xml: This scenario should be always used prior to anything and in background to check the signal quality of the acquisition device. Once you are sure that the EEG acquisition runs correctly, you can go on to the next step !
  • p300-xdawn-1-acquisition.xml: First step is to acquire some data in order to train the LDA classifier that will detect the P300 brainwaves. The default training session is made of 10 trials. Each time the user is instructed to focus on a particular letter (instruction in blue). After 12 repetitions (12 flashes of each row and column, so 24 flashes for each letter on the grid) we move on to the next letter. Change the Lua Stimulator settings to configure the number of letter, the timings, the colors, etc.
  • p300-xdawn-2-train-xDAWN.xml: This scenario trains the Spatial Filter that will reduce the signal space to 3 dimensions, the most significant for detecting a P300.
  • p300-xdawn-3-train-classifier.xml: This scenario trains a LDA classifier that try to discriminate the two classes : P300 or not. Use this scenario after a xDAWN filter has been trained.
  • p300-xdawn-4-online.xml: This scenario allows the user to spell some text. (S)He can choose to spell the designated letters (in blue) or any other letter. However it is advised to follow the instructions as a well-formed online session can be used to train again the classifier if the results are not good enough. After the 12 repetitions, the system displays the letter it chose as the best candidate (in green). Change the Lua Stimulator settings to configure the number of letter, the timings, the colors, etc.
  • p300-xdawn-5-replay.xml: This scenario replays a file, and show the feedback the user could have with the current set of parameter (classifier & spatial filter).

Note:In the training scenarios, remember to change the Generic Stream Reader box to read from the file you recorded in the acquisition step.

 

Fig.1 The P300 speller.

Some design notes

Starting from OpenViBE 1.2.0, the P300 scenarios rely on TCP Tagging. With this mechanism, the P300 Speller Visualization box sends the flash event markers directly to the Acquisition Server. This approach should allow improved time accuracy in the marker placement into the EEG stream, and subsequently improved spelling accuracy. Note that currently in order to use this, the Acquisition Server must be running on the same computer as Designer.

This entry was posted in Example scenarios and tagged , , . Bookmark the permalink.