Pre-filtering

Forum for discussion on different signal processing algorithms
Locked
nabeel
Posts: 9
Joined: 27 Sep 2006, 12:07

Pre-filtering

Post by nabeel » 11 Oct 2006, 09:05

Ciao

I have a very basic question, i checked the BCI2000 article but could not find a clear answer. I want to use BCI in real time. Is it possible to pre-filter the EEG data (say a pass band of 0.1 Hz to 30 Hz) before it pass to the signal processing module? My hardware have low pass filter of 100Hz, and data is subjected to high frequency noise.

Regards

Anwar

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

Filtering ...

Post by gschalk » 11 Oct 2006, 16:01

Anwar,

There are two aspects of your question. First, when you want to extract EEG features in real time, it is (while not ideal) not a big issue that you have artifacts at higher frequencies. You simply only use those features (i.e., frequencies) that are not contaminated. Second, we will soon, i.e., within three weeks, have the capacity to filter the EEG for the display only. However, these filters could easily be inserted in the filter chain to actually process the signals, and we could assist you with the process.

The Gerv

nabeel
Posts: 9
Joined: 27 Sep 2006, 12:07

Post by nabeel » 11 Oct 2006, 20:02

Thankyou very much for prompt reply. I guess, its better to explain back ground of the problem so that i can have a better understanding of solution. i am using BCI2000 as a platform for other applications. i am trying to display the spectral analysis (temporal filtering from 0 to 30 Hz), i loaded ARsignalprocessing module along with D2box (though i dont use any application at all). so now i have a nice display of 16 channels raw EEG data and a spectral analysis (temporal filtering) displayed on screen (and due to some reasons there is high frequency noise in the signal). now if the person close his eyez then i expect a display of Alpha peak at few channels. but unfortunatelly so far i am unable to locate this spectral peak in on going continue spectra. i stored the same signal and analysis through EEGlab and i can see a alpha activity in spectra.
i want to ask that is there something worng with my procedure?
my second question is about Mario, i am unable to start Mario for offline analysis (mclmcrrt72.dll is missing).
If i have to add the filters, then please guide me through th procedure.
My Best Regards.
Anwar

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

Filtering ...

Post by gschalk » 11 Oct 2006, 22:32

Anwar,

For what you describe, you probably will not need any real-time filtering. When you run the data through EEGlab, depending on the settings, you might get an average spectrum that will show a nice alpha peak. When you do the same analysis online, it will not be averaged, and thus could be quite noisy. The other issue is that you may have configured the AR spectral analysis incorrectly. You may want to read the BCI2000Workshop tutorial for more information.

Regarding Mario: Please contact Emanuele (emanuele80@libero.it) for support and the newest version.

I hope this helps.

Gerv

nabeel
Posts: 9
Joined: 27 Sep 2006, 12:07

Post by nabeel » 12 Oct 2006, 08:43

Thankyou Again, i am incontact with Emanuelle for Mario, i was wondering that if possible somebody could look at my ARsettings

MEMFilter:ARTemporalFilter float StartMem= 0.0 0.0 0.0 512.0 // Start of Spectrum in Hz
MEMFilter:ARTemporalFilter float StopMem= 64.0 30.0 0.0 512.0 // End of Spectrum in Hz
MEMFilter:ARTemporalFilter float deltaMem= 0.2 0.2 0.02 2.00 // Resolution (line density)
MEMFilter:ARTemporalFilter float MemBandWidth= 1 3.0 0.5 32.0 // Spectral Bandwidth in Hz
MEMFilter:ARTemporalFilter int MemModelOrder= 10 10 2 32 // AR model order
MEMFilter:ARTemporalFilter int MemWindows= 8 2 1 8 // AR- number of input blocks
MEMFilter:ARTemporalFilter int MemDetrend= 0 0 0 2 // Detrend data? 0=no 1=mean 2= linear

if data is to noisy to see a Alpha peak (or Mu de/synchronization), is it (and how) possible to take an average of few windows (say total 2 seconds) and then display? i think according to your idea about averaging it should help.

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

analysis questions ...

Post by gschalk » 14 Oct 2006, 08:52

Anwar,

You may want to set MemDetrend to 1 to take out the mean of the signal (this will remove parts of the prominent peak at very low frequencies and may better reveal alpha). Also, remember that SampleBlockSize*MemWindows represents the total number of samples (i.e., window length) that the frequency analysis is computed on. Thus, you may want to increase one or the other to have a longer period that the frequency analysis is computed over, which will also suppress noise. Finally, you could increase the MemModelOrder, which loosely corresponds to the number of peaks you can see in the spectrum. If alpha is not large, then it may simply not show at a low model order. Caveat: as a rule of thumb, the model order should not be higher than half of SampleBlockSize*MemWindows, and really does not need to be more than 25 for EEG.

Finally, one question still is what you would actually like to accomplish. If it is identifying alpha in the EEG offline, EEGlab would be a much better tool than BCI2000. If it is providing feedback in real time, then you do not want to make the window too long (e.g., more than 500ms). We routinely and successfully give feedback on the mu rhythm using ~300ms windows (where the mu rhythm is not necessarily discernible by looking at the spectrum).

I hope this helps.

The Gerv

nabeel
Posts: 9
Joined: 27 Sep 2006, 12:07

Post by nabeel » 16 Oct 2006, 08:50

I have tested the setting you recommended. From your reply one thing clicked me, you talked about “where the mu rhythm is not necessarily discernible by looking at the spectrum”, and I am expecting this is the case with me. Actually what I like to accomplish is: visual feeding back of Mu activity of the subject (not in terms of hit or cursor movement, but just the spectra), i.e after every fix number of trials the subject see the modification/improvement in his Mu activity. But the activity is not discerned in the spectra.

Locked

Who is online

Users browsing this forum: No registered users and 6 guests