P3-Speller Target-NonTarget Signal values

Forum for discussion on different brain signals
Locked
janki
Posts: 9
Joined: 14 Jan 2004, 12:03

P3-Speller Target-NonTarget Signal values

Post by janki » 26 Mar 2004, 17:27

Hi,

I wanted to know how to get the signal values of the target and the non-target separately. I wanted to know the values in realtime at the end of the signal processing. Using the BCI-frequency tool we get the values of the target and non-target. Is there a way I could directly obtain these values online from the Signal Processing, for the BC++ code of bci2000.

a) need to know what program gives the P300 signal values

b) need to know what are the target values and non-target values over the average trial.


Thanks,
Janki.

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: P3-Speller Target-NonTarget Signal values

Post by gschalk » 29 Mar 2004, 08:52

Hi Janki,

The values for each stimulus are transmitted from SignalPRocessing to the Application as follows:

Whenever the state "StimulusCodeRes" is larger than 0, then its value determines which stimulus the result is for. At the same time, the state "StimulusTypeRes" determines whether this stimulus was a target (1) or a non-target (0). Finally, at that time the first control signal (signal[0]) contains the classified signal value for this stimulus.

The P3Speller uses this information to make its determination about which row and column was selected. I would suggest you search on "StimulusCodeRes" in the P3Speller project to see an example of how it's used.

Gerv

janki
Posts: 9
Joined: 14 Jan 2004, 12:03

Where do I get the value of the continous signal

Post by janki » 29 Mar 2004, 14:22

As I tried printing to the file, the signals[0] in the TTask doesnot seem to be giving the continous value of the signal. If I need the continous value of the signal where should I be looking into.
Thanks for your help Gerv.

Janki.

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: P3-Speller Target-NonTarget Signal values

Post by gschalk » 29 Mar 2004, 16:48

Do you mean the actual voltage values as opposed to the classification results? If so, then you do not have access to them in the application. The whole point of signal processing is to do that job.

Just so I understand the context: What are you trying to do?

Gerv

janki
Posts: 9
Joined: 14 Jan 2004, 12:03

for updating the MUD filters

Post by janki » 29 Mar 2004, 17:03

Hi Gerv,
What I am trying to do is write an adaptive algorithm for the P300 signal which would automatically update the MUD filters.
This is the reason why I am looking into finding where I can get continous value of the voltage which is written in the .dat file.

Thanks,
Janki.

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: P3-Speller Target-NonTarget Signal values

Post by gschalk » 29 Mar 2004, 17:18

Hi Janki,

This is in a different module (P3SignalProcessing.exe). However, before you are trying to implement anything online, you should evaluate a prospective algorithm offline. You can do this by interpreting the recorded raw signal. I strongly suggest NOT to implement an adaptive algorithm online first. Without thorough offline testing, you'll never succeed. Once you have identified a good candidate offline, you can then put it into the online system.

Gerv

Brendan
Posts: 12
Joined: 18 Aug 2003, 18:42

offline testing of single channel SWDA

Post by Brendan » 02 Apr 2004, 15:28

Hello,

Janki and I have already tested a simpler version of this "adaptive algorithm" offline. We would run a subject using the P3 speller, and process the data in BCI time frequency. I would look at Fz, Cz, and Pz, and determine which had the largest difference. I would then manually update the MUD filters (and if necessary TransmitChList) accordingly. In this update, I simply input the time points where the difference appeared large, and set the weight to 1. We then ran the subject again using the new MUD settings. This produced a dramatic improvement. Over 22 runs with people spelling a three letter sequence, pattern recognition performance was always 66% or 100%. This is better than reported in Donchin et al '00, and the fastest for any online P3 speller I know of.

However, it leaves ample room for improvement. All this does is more or less the same thing we initially tried up at the Wolpaw lab with one of our subjects, WW. An automated SWDA algorithm, capable of looking at more than one channel and using non-integer weight values proportional to the distance between the target and nontarget at each time point, would likely perform better. This is essentially what Janki's "adaptive algorithm" aims to do. The idea is to run a subject once, then run this adaptive algorithm that would insert a new (and very long) weight matrix into the MUD filter, and run the subject again. Enabling multichannel SWDA like this will of course also require changing TransmitCh, TransmitChList, and SpatialFilterKernal. Janki is interested in exploring this in a study here and I have been helping. It is a good idea.

Just to make sure, has anyone done this before? I understand Francois Cabestaing developed such an algorithm but did not implement it. The closest publication with an online BCI is Donchin et al '00, which only used one channel, Pz. This is not apparent from their paper, but both Manny and Kevin Spencer have told me this over email.

Of course, SWDA is only one approach. I suspect that an SVM, if somehow implemented through BCI2000, would perform much better. (See, for example, the Meinicke et al. NIPS paper on this.) This might be a good idea for a follow up study with an online field validation someday.

Brendan

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: offline testing of single channel SWDA

Post by gschalk » 05 Apr 2004, 09:35

I agree that it would be nice to have an automatic procedure to generate the MUD etc. values. (I am not sure that I would call it an adaptive algorithm, though.) As far as I know, nobody has implemented that online. As far as I am concerned, you've demonstrated the most extensive online P300 speller to date!

In any case, what would need to be done to make this work is essentially the following steps:
1) Write an offline tool that can analyze BCI2000 P300 speller data and that can calculate a linear discriminant function (such as SWLDA).
2) Test this algorithm and its performance offline.
3) Once you've determined that it works, you could use the offline tool to generate a parameter file, or, include this into BCI2000 online. IN the latter case, the offline algorithm would have to be written in C++ to be incorporated online.

This is most certainly doable, would be a nice addition to BCI2000, and would most likely make P300 spelling performance even better.

My only cautionary comment is that this requires a good understanding of statistics (and the current classification routines in BCI2000 to set up the external statistics correctly), C++ programming knowledge if to be incorporated online, and quite some time. If any of the three requirements are not met, this will not work. If I were to do this myself (and I wouldn't have to spend any time learning statistics, C++, or how BCI2000 works), I would estimate about 2-3 months to do a good job on this.

I hope this helps,
Gerv

Yalda Shahriari
Posts: 13
Joined: 22 Jan 2011, 01:03

Re: P3-Speller Target-NonTarget Signal values

Post by Yalda Shahriari » 26 Feb 2011, 06:57

Hi,
I am writing a matlab code for online character recognition by P300 speller and I have written the matlab code for P300 speller that has been run by simulink and 36 LEDs that each row and column has been intensifying in a random sequence. On the other hand I detect the signals by g.tech amplifier and I want to save the data in the workspace and then I have a pause between each character recognition decision and in that time I should import the signals from workspace and process the signal and then classify it and make a decision and then type it.
Does anybody have idea to do the process?
How can I make the simulation time of P300 speller and my m.file process synchronus that they run at the same time?

Best regards
Yalda Shahriari

Locked

Who is online

Users browsing this forum: No registered users and 5 guests