Page 1 of 1

Versatile EEG - Bitbrain

Posted: 15 Jul 2025, 05:36
by elenamon
Hi all,
I'm currently developing a cursor task pipeline using the Bitbrain Versatile EEG amplifier (32 channels) and I'm encountering some warnings during runtime. The main difference from the standard cursor task is that, upon target hit, a video is displayed to the subject as feedback.
Videos are loaded during the Preflight phase, and each time the target is hit, the video is restarted from the first frame within the Feedback module.

The pipeline runs without warnings when using the SignalGenerator as the signal source. However, when I switch to using EEG data streamed via LSL from the Bitbrain device, the following warning occasionally appears in the system log:

Code: Select all

Average block duration if off by more than 5%.
Nominal:31.25ms, Actual:32.8731ms.
The BlockSize parameter is set to 8. I've tried changing the BlockSize parameter to 32 and 64, but the warning still appears. Sometimes it even shows up during Prerun or at the end of a run.
For reference, the same BlockSize settings were tested with the SignalGenerator without any warnings.

My questions are:
  • Does this warning indicate a potential performance or timing issue during acquisition?
  • Is there something I should modify in the configuration to avoid it, particularly when using LSL with Bitbrain hardware?
Moreover, what about the AlignChannels parameter for this amplifier, it should be on? I could not find a reference in the wiki.

Any insights or recommendations would be greatly appreciated.

Thanks in advance!

Re: Versatile EEG - Bitbrain

Posted: 15 Jul 2025, 11:00
by mellinger
Hi,

I am not an expert on LSL but what I would do first is to make sure that block duration is correct on the LSL side. I guess there is some example acquisition program in Python that you could modify to take timestamps and output the average block duration.

In BCI2000, if you have issues with filters that take too much time to process you will get appropriate warnings. Even if not, you will be able to tell from the "Roundtrip" curve in the timing window whether there is an issue with a filter. Roundtrip time should never approach the "Block duration" line.

Regarding the AlignChannels parameter, this is not needed for modern hardware any more. You may just ignore it.

Regards

Re: Versatile EEG - Bitbrain

Posted: 16 Jul 2025, 12:02
by elenamon
Hi,

Thank you very much for your suggestions regarding both the LSL side and the roundtrip analysis in BCI2000 — they’ve been really helpful in understanding where to look.

I have a follow-up question:
What exactly happens when the roundtrip time occasionally reaches or slightly exceeds the block duration line in the timing window? Could this cause instability in feedback timing or other noticeable effects in real-time performance?

Also, do you have any general recommendations for choosing a reasonable BlockSize value? I’ve been testing with 8, 32, and 64, but I’d appreciate any guidance on how to find the best value. The sampling frequency of the Versatile EEG system is of 256Hz.

Thanks again for your support!

Re: Versatile EEG - Bitbrain

Posted: 16 Jul 2025, 15:23
by mellinger
What exactly happens when the roundtrip time occasionally reaches or slightly exceeds the block duration line in the timing window? Could this cause instability in feedback timing or other noticeable effects in real-time performance?
If roundtrip time consistently reaches or exceeds block duration, the main effect of this is that signal samples will pile up in the source buffer, and finally the source buffer will overflow, and samples will get lost. Also, BCI2000 source time stamps will no longer match the time of data acquisition because data will remain in the source buffer for a while before BCI2000 sees it and applies its time stamp. This means that you will no longer be able to match brain signal data with behavioral data.
Also, do you have any general recommendations for choosing a reasonable BlockSize value? I’ve been testing with 8, 32, and 64, but I’d appreciate any guidance on how to find the best value. The sampling frequency of the Versatile EEG system is of 256Hz.
Choosing SampleBlockSize is a tradeoff between the frequency of feedback updates, and reliability of processing. Smaller SampleBlockSizes mean more frequent feedback updates, but at the same time result in greater processing overhead.

As a rule of thumb, I would start out with a SampleBlockSize that corresponds to about 20Hz of feedback update, i.e. 12 samples in your case (256/20 is about 12). If that turns out to be too small, i.e. processing overhead is too large, go down to 16Hz or even 12Hz of feedback update (16 or 20 samples).

Another issue to consider is the presence of hardware or software buffers in the acquisition chain. Depending on that, different sample block sizes may result in either smooth or strongly varying block durations. Switching to the next power of 2 may help fix this behavior if it occurs.

Re: Versatile EEG - Bitbrain

Posted: 24 Jul 2025, 04:11
by elenamon
Hi, thank you a lot for all the info and your support. Now I can choose the value of the BlockSize knowing how it works.
Just to let you know the warning was related to the Amplifier and not to the time to load and playback. In detail the warning shows up only when the microSD card was inserted in the amplifier.
Thanks again