pbrunner wrote:David,
I am glad that you were able to get the BCI2000 v3.0.5 version to work with your Nueroscan device.
The issue with MATLAB is that you are limited in the update rate for two reasons. First there is an overhead in each call to MATLAB, second the MATLAB code itself takes much longer to execute than comparable C++ code. You have two options to overcome this:
(1) Reducing the update rate, which you can achieve by increasing the SampleBlockSize parameter. If you provide feedback on the output of BCI2000, you should aim for at least 10 updates per second, i.e., a SampleBlockSize of 50 in your case.
(2) Improving the performance of the MATLAB code. You can use the "profile on" and "profile viewer" command at the beginning and end of your MATLAB code, repsectively. Running this once will show you how much time each command requires. You then can vectorize your code to improve performance.
In addition to this, I would like to ask you to test the 32-bit BCI2000 v3.6 beta with the same parameters. This would help to assess whether there is an issue in the current code that needs to be addressed.
Regards, Peter
Hi Peter,
Here are my testing results (all based on binary release) :
1. BCI2000 v3.6 32bit + 32bit Matlab 2015b + native 32bit NeuroscanClient.exe :
BCI2000 waits indefinitely, Scan 4.5 recognizes a client but does not transfer any data.
2. BCI2000 v3.6 32bit + 32bit Matlab 2015b + 32bit NeuroscanClient.exe copied from BCI2000 v3.0.5 :
Failed with the warning messages:
DummyApplication: could not make a connection to the next module at 127.0.0.1
SignalSource: connection to the previous module timed out after 20s
SignalSource: application dropped connection unexpectedly
3. BCI2000 v3.6 64bit + 64bit Matlab 2015b + native 64bit NeuroscanClient.exe:
BCI2000 waits indefinitely, Scan 4.5 recognizes a client but does not transfer any data.
4. BCI2000 V3.0.5 + 32bit Matlab 2015b + 32bit V3.0.5 NeuroscanClient.exe :
BCI2000 receives data successfully, but it always fails the roundtrip time check after about 5 minutes. I only have access to Scan 4.5 but not Neuroscan Access SDK and it seems that Scan 4.5 locks the block period to 40ms, i.e. I can only have combinations such as 1000Hz/40 Block size and 500Hz /20 Block size. For my application, I don't want to go below 500Hz, but all supported frequencies above 500Hz fail the timecheck.
I have done all the testings on a very powerful machine running windows 7 64 bit. I have optimized my matlab code as much as I can. Previously, I have used the same Matlab signal processing and application with g.USBamp recording at 600Hz / 30 Block size on BCI2000 V3.6 64bit. Everything worked like a charm and never once did I receive any time warning.
It'll be great if you can give me some advice. I am most interested in solving the problem in test case 2 because BCI2000 v3.6 still seems like a better choice to me.
Thanks.
David