Page 1 of 1
MEMFilter and spectral analysis
Posted: 09 May 2005, 13:27
by phammon
I have a question about what BCI2000 is doing to implement its spectral analysis. Looking at the MEMFilter tab, I would guess that the system is making an AR estimate and using the AR coefficients to get a high-resolution spectral estimate. Could you explain some of the details of the process, such as:
1) what method the system implements to estimate the AR coefficients
2) how the system gets a spectral estimate from these coefficients (e.g. FFT, etc.)
3) the reasoning behind using this approach for spectral estimates (I assume it has to do with trading off some accuracy of the estimate with getting estimates that have minimal time lag).
Thanks,
Paul Hammon
Spectral analysis ...
Posted: 11 May 2005, 12:12
by gschalk
1) what method the system implements to estimate the AR coefficients
The maximum entropy method.
2) how the system gets a spectral estimate from these coefficients (e.g. FFT, etc.)
The Burg algorithm.
3) the reasoning behind using this approach for spectral estimates (I assume it has to do with trading off some accuracy of the estimate with getting estimates that have minimal time lag).
The FFT does not have good frequency resolution on short data segments. The AR method has better frequency resolution in these situations. I am not sure whether you can call this minimizing the time lag, but you can certainly base feedback on shorter segments with the AR method. Please see the various BCI related articles by Dennis J. McFarland et al that discuss this topic.

The Gerv
more MEMFilter questions
Posted: 02 Jun 2005, 11:44
by phammon
I have another question about the MEMFilter tab. I would like to know what frequency bin number carries which frequencies. For example, with the settings:
deltaMem = 0.2
MemBandWidth = 3.0
MemDetrend = 0.0
MemModelOrder = 10
MemWindows = 4
StartMem = 0.0
StopMem = 30.0
My guess would be that the frequencies are distributed as follows:
1) 0-3 Hz
2) 3-6 Hz
3) 6-9 Hz
4) 9-12 Hz
5) 12-15 Hz
6) 15-18 Hz
7) 18-21 Hz
8.) 21-24 Hz
9) 24-27 Hz
10) 27-30 Hz
We find, however, that in this case the 10th frequency bin appears to be empty. Looking at the signal processing code, it seems that there are indeed only 9 bins for this setting. Additionally, the deltaMem value appears to interact with the bin numbers in a non-trivial way.
Basically, what I would like to know is what deltaMem means, how it and the other parameters influence the number and spacing of the frequency bins, and what the proper distribution of frequencies to bin numbers would be in this case.
Thanks,
Paul Hammon
AR SignalProcessing ...
Posted: 02 Jun 2005, 13:10
by gschalk
Paul,
These are excellent questions.
deltaMem = 0.2
MemBandWidth = 3.0
MemDetrend = 0.0
MemModelOrder = 10
MemWindows = 4
StartMem = 0.0
StopMem = 30.0
MemDetrend should not be 0.0. It should be 0 (no signal detrending), 1 (subtracting the signal mean prior to spectral analysis), or 2 (removing the linear trend).
My guess would be that the frequencies are distributed as follows:
1) 0-3 Hz
2) 3-6 Hz
3) 6-9 Hz
4) 9-12 Hz
5) 12-15 Hz
6) 15-18 Hz
7) 18-21 Hz
8.) 21-24 Hz
9) 24-27 Hz
10) 27-30 Hz
We find, however, that in this case the 10th frequency bin appears to be empty. Looking at the signal processing code, it seems that there are indeed only 9 bins for this setting. Additionally, the deltaMem value appears to interact with the bin numbers in a non-trivial way.
You are correct with the frequency distributions. Also, we've noticed that the last bin is always empty. We simply have not corrected this bug yet. Because the routines are very fast, and thus computational complexity is a non-issue, you might set StopMem to 60 or 70. Then you don't have to worry about that.
Basically, what I would like to know is what deltaMem means, how it and the other parameters influence the number and spacing of the frequency bins, and what the proper distribution of frequencies to bin numbers would be in this case.
deltaMem simply defines at which steps the spectral amplitude should be calculated. All amplitudes within a frequency bin are then averaged to produce the final output of the algorithm. I do not see how deltaMem should change any distribution of the frequency bins. If you leave it at the default, i.e., 0.2, you should be fine.
Please let us know if you have additional questions.
Best,
Gerv