Page 1 of 1

How to move the cursor

Posted: 14 Jan 2004, 12:53
by verasen
I am trying to create my own custom application using mu output from BCI2000. This requires me to create my own cursor and move it based on the mu output. How does one decide how the cursor shall move and in what direction? I understand that the mu values will push the cursor in 1 direction or the other, but how does one decide how much of a push the cursor receives based on the mu value?

Assume the mu value outputted is between -32767 to 32767. If a value of 0 is received does it mean the cursor doesn't move? And i'm guessing a value of 32767 pushes the cursor to the right really fast. Is that true?

Thanks,
Umang

Control signals

Posted: 14 Jan 2004, 14:16
by gschalk
Hi Umang,

As described in my previous post, signal processing communicates an array of control signals to the user application. In general, it is completely up to the user application what to do with these values. In the RJB and D2Box task, for example, the first control signal moves the cursor up and down, whereas the second moves it to the right or left. Values of zero won't move the cursor and positive values push the values to the bottom or right, respectively. In the RJB task, for example, the cursor moves from left to right at a constant rate. Thus, the influence of brain signals is eliminated by configuring the MLR matrix with a weight of 0. In addition, the LR_A and LR_B variables define a number larger than 0, which then gives the cursor a constant bias to the right.

I hope this helps,
Gerv

Moving cursor

Posted: 26 Jan 2004, 13:57
by verasen
What I need are the intermediate values between the signal processing and the final position of the cursor. I don't want to work with the raw mu value per say in which you have to apply Fourier transforms etc, but instead need the final processed value that moves the cursor. I believe this value is between -32767 and 32767. Similarly, getting the 2nd value for 2D would also help. Is there a tutorial where I can see exactly how to extract this value out of BCI2000. My application is in VB so I'd need to send these 2 values over a socket connection to my application.

I prefer not to deal with the matrix and all the other configurations that you have to set. Is there a prm file that has all the settings configured for what I'm trying to do?

Signal values ...

Posted: 26 Jan 2004, 15:04
by gschalk
The values that move the cursor are signal[0] and signal[1]. They are added to the current cursor position to produce the new cursor position. Thus, to the extent that I understand the problem correctly, if you transfer signal[0] and signal[1] to your application, you should be all set.

Gerv

Getting mu power spectra from BCI2000

Posted: 26 Jan 2004, 16:04
by Brendan
Hello,

In response to the recent posts from Gerv and Umang on this subject, I believe the following settings will make the output of the signal processing application equal to the mu power of 12 Hz over the C3 electrode site:

1) Under the MEMFilters tab, use the following settings: MEMBandWidth of 3, StartMEM of -1.5, and StopMEM of 30 (or anything well above 12). This tells BCI2000 to create frequency bins 3 Hz wide, starting with -1.5 to 1.5 Hz (and thus centered on 0 Hz), and so on. Note that the 5th frequency bin created this way will be centered on 12 Hz.

2) set the TransmitChList under Source so it is only sending one channel. Common examples are channel 9 for site C3 or channel 13 for C4. These numbers assume a standard 64 channel montage. You must also set TransmitCh to 1, specifying that you are sending only one channel.

3) Set the SpatialFilterKernal under Filter to a 1 x 1 matrix with a 1. This will disable the spatial filter, telling it to simply send the value of one site. Note that using a LLAP filter is recommended for mu data (see McFarland et al. 1997), and can be easily implemented in BCI2000. If you want a LLAP, you will need to change this part and #2 above as described in the manual.

4) Also under Filter, set the MUD filter to 1 5 1 (a 1 x 3 matrix). This tells BCI2000 to only look at the first channel passed from SpatialFilterKernal, look at the 5th frequency bin passed from MEMFilter, and multiply it by 1.

5) Also under Filter, set UD_A to 0 and UD_B to 1. This means that the curve that controls the cursor position will have an intercept of 0 and slope of 1. This means that the value output by the MUD filters will be translated linearly. A nonzero value of UD_A would represent a constant added to the output of MUD, while any value of UD_B other than 1 will cause it to be multiplied by that number.

6) Under Statistics, set Intercept and TrendControl to 0. This disables the online adaptation of weights, which would otherwise try to change the values specified above to optimize control.

In response to Umang's question:
"Assume the mu value outputted is between -32767 to 32767. If a value of 0 is received does it mean the cursor doesn't move? And i'm guessing a value of 32767 pushes the cursor to the right really fast. Is that true?"

A 0 means the cursor does not move as long as the intercept is 0.
The cursor movement produced by mu activity (meaning, the power at 12 Hz for one site, whether filtered or not) is a function of the parameters described in 4 and 5 above. In other words, a value of 32767 could produce any sort of movement, depending on the settings. With the settings described above, it would produce rapid upward movement. If you change the MUD filter settings above to 1 5 -1, it would produce rapid downward movement. Left/right movement is controlled by the MLR filters.

Note that all of this provides you with only one value of mu at one site. If interested in multidimensional control, such as 12 Hz power over C3 and C4 sites or power at different frequencies, you will need to make some additional changes.

best,
Brendan