A brain computer interface or BCI functions by translating a neural signal such as the electroencephalogram or EEG, into a signal that can be used to control a computer or other device. The procedure begins by attaching the EEG electrode cap to the subject's scalp to record brain activity. The subject is then asked to imagine several voluntary movements with their hands and feet, at which time a calibration procedure is performed, which analyzes the characteristics of the EEG as a result of the calibration procedure.
The R-squared values and scalp tomography can be used to determine which electrodes and frequency bins will be used to guide a cursor on the computer screen. Subjects will then be able to move a cursor quickly to target areas just by thinking about it. Hi, I'm Adam Wilson, and I work in Justin Williams lab in the Department of Biomedical Engineering at the University of Wisconsin-Madison.
Today I'll be sharing the procedure for recording brain activity called the electroencephalogram or EEG for controlling a brain computer interface application. So let's get started. You begin this protocol by connecting EEG electrodes to the subject's scalp through an EEG cap, which positions the electrodes according to the 10 20 international system.
To correctly position the cap on the subject's scalp, use a felt tip pen to mark the nasion, which is the intersection of the frontal nasal bones and the Indian, the largest protrusion of the occipital bone. Find the halfway point between nasn and inion and market. This position is called the vertex.
Find the CZ electrode on the cap and position it on the vertex Keeping CZ fixed. Slip the cap onto the head. Ensure that the FC cz and PZ electrodes are on the midline of the scalp, that the O one to O2 electrodes are horizontal and level with oz, and that FP one to FP two are level with FPZ.
Now attach the reference electrode, which typically clips onto an ear lobe. Now that the electrodes have been properly placed, one must ensure that proper electrical contact is made to the scalp. To do this conductive gel is first drawn up in a small syringe with a blunt end needle.
Then insert the needle into an electrode and gently abbra the scalp with the needle to remove any dead skin. Start with the ear reference electrode and repeat for all of the electrodes, including the ground, fill the electrode with a small amount of gel. Careful not to overfill it.
Check the impedances for all channels, which should all be less than five kilo ohms. Your method will vary depending on your amplifier system. To do so with the GUSB amp in BCI 2000, you will change the acquisition mode parameter to impedance and press set config to inquire impedance values for all channels.
If an electrode has an impedance greater than five kilo ohms, insert the needle again and abraid the scalp some more to strengthen the connection. Then check the impedance again. Now the EEG cap is ready for recording.
To get started, configure the computer system for dual monitor mode. Start BCI 2000 from the BCI 2000 launcher by selecting your amplifier source module, the dummy signal processing module, and the stimulus presentation module. Add the parameter files for your subject, the amplifier and the motor screening tasks, which you should configure ahead of time during the session, the screen is either blank or displays an instruction such as right hand, left hand, both hands, or both feet for three seconds at a time.
During each three second movement, the subject should continuously imagine the indicated movement. The hand movements should be opening and closing the hands like squeezing a tennis ball, and the foot movements should be moving the feet back and forth like pressing on a gas pedal with both feet. When the screen is blank, the subject should completely relax the body during a run.
Repeat each body part 20 times and perform five runs for a total of a hundred data points. Now you can analyze the data to determine the EEG features unique to each imagine motion. Now that you've finished collecting the screening data, it's time to use the BCI 2000 offline analysis tool to determine which features in the EEG signal the users are able to voluntarily modulate.
The offline analysis tool converts the EEG signal into the frequency domain where you can determine which channels and which frequency features in the signal were maximally correlated with the tasks. To begin analysis, start the math lab program and navigate to the BCI 2000 offline analysis folder and then start the program. Use the program to determine which EEG features are strongly correlated with each movement.
For each movement, plot the data, then find the plots with the largest R-squared values or strongest correlation. You can then use the channels and frequency bins with the largest R-squared values as control signals to move the cursor a particular direction. For example, set up features that change for the right hand condition to move the cursor to the right side of the screen.
When analyzing your data, make sure that the channels and frequencies chosen are consistent with known properties of cortical sensory motor rhythms. For example, you should see significant changes corresponding with imagined right hand movement over the contralateral motor cortex near C3 and CP three, and centered near eight to 12 hertz and or 18 to 28 hertz respectively. If these locations and values are different, then you probably measured noise or some random effect and should not configure that particular rhythm as a control feature.
For each condition, choose the channel number and frequency bins with the four largest R-squared values. With these values in hand, you can configure the system for the cursor control task. Now that you've determined the features correlated with each Imagine movement, it's time to set up the BCI system to use these features to control the cursor movement.
First, we will configure the cursor movement session in the BCI 2000 launcher by selecting your amplifier source module AR signal processing module and task module. First, configure the spatial filter with a common average reference. To do so, press config in the BCI 2000 operator to bring up the settings list and press the filtering tab.
Go to spatial filtering and change the spatial filter type dropdown box to common average reference or CAR under spatial filter, CAR output. List the channel names or numbers that you selected in the calibration session. Next, configure the classification matrix to use the features you selected under the filtering tab.
Go to the classifier parameter and press edit matrix. Set the number of columns to four and the number of rows to the total number of features selected. Each matrix row corresponds to an individual feature.
In the first column, enter all of the channel names. In the second column, enter the frequency bins you have selected to control each motion. In the third column, the output channel enter the cursor movement controlled by the feature.
A value of one corresponds to horizontal movement and two corresponds to vertical movement. The channels C3, CP three, C four and CP four should be set to one for horizontal cursor control. Task C3 CP three, C four CP four and CZ should be set to two for a vertical curse control task.
Finally, in the fourth column, enter the feature weight, which corresponds to the opposite intended direction. For example, to move the cursor right, you should wait C3 and CP three as minus one, and to move it left, you should wait C four and CP four as one. Similarly, to move the cursor down, you should wait CZ and CPZ as one, and to move the cursor up, you should wait C3 and C four as minus one.
Now that you've configured the system with the correct settings, it is time to start the experimental task. Conduct the trials in a dimly lit room with a comfortable chair for the subject. During trials, the subject should keep movement to a minimum.
To reduce artifacts, there will be breaks between trials. For the first trials, constrain the cursor to the axis of the target. That is if the target is at the top or bottom, it is only possible to move the cursor up or down, and if it is at the left or right of the screen, the subject can only move the cursor left or right.
One of the targets appears for one second. The cursor appears in the middle of the screen. The subject then has five seconds to use the appropriate imagined movements to direct the cursor to the target.
If the subject hits the target, it changes color after five seconds without a hit, the session time out and is counted as a miss. After the trial, there is a two second inter trial interval during which the subject can relax, blink, swallow, or otherwise readjust positions after 20 trials, VCI 2000 enters a suspended state. During this time, you may need to readjust some of the settings if the subject is unable to move the cursor.
If after four runs, the subject still cannot move the cursor, you may need to reanalyze the collected data in the BCI 2000 offline analysis tool. Select the new channels and frequencies based on the new feature plots. It may take several runs or possibly several sessions before a subject can become proficient at the task.
These images show the R-squared values and scalp topography for the calibration procedure indicating which channels and frequency bins should be selected. For cursor control, a trained subject should be able to quickly move the cursor to the shown target within one or two seconds. We've just shown you how to configure a brain computer interface to collect EEGs and to train a user to control a virtual cursor by using their brain activity.
It's important to remember that it can take a lot of training for someone to learn how to use this system, but with some persistence, nearly anyone can learn to do it. So that's it. Thanks for watching and good luck with your experiments.