Reducing Latency in BioSemi ActiveTwo + LSL Setup for Real-Time Feedback

Post Reply
Mindartis9
Posts: 1
Joined: Fri Jul 04, 2025 8:10 am

Reducing Latency in BioSemi ActiveTwo + LSL Setup for Real-Time Feedback

Post by Mindartis9 »

Hi, I’m working on a real-time EEG system using the BioSemi ActiveTwo amplifier in combination with LabStreamingLayer (LSL), and I’d really appreciate some clarification on how the system handles data buffering and transmission.

We’re aiming to detect EMG signals in real time and provide fast feedback, with a target end-to-end latency under 30 ms. However, in testing, we’re observing a mean latency of approximately 79 ms with a standard deviation of 18 ms. This latency is measured from the moment a trigger is sent via parallel port (from a second computer) to the moment the corresponding EEG signal is detected on the main machine. All timing calculations are done from the same computer to avoid desynchronization.

We’re using the official BioSemi-to-LSL bridge (version 1.1b) with no modifications, and our Python pipeline is built with both pylsl.StreamInlet and MNE-LSL. We’ve noticed that LSL consistently delivers bursts of about 131 samples at a time, which suggests chunking or buffering is occurring upstream, potentially at the USB interface level or within the bridge itself.

To isolate the source of the delay, we also ran a control experiment where we created a mock LSL stream on one machine and received it on another via Ethernet, bypassing the BioSemi hardware. In this setup, we observed an average latency of just 13 ms, indicating that the bulk of the delay is introduced before the data even reaches LSL.

Our main questions are:

- Is the chunk size (131 samples) emitted by the BioSemi LSL bridge fixed or configurable?
- Is this ~79 ms latency expected due to limitations of the BioSemi USB interface or the bridge app, or is there a way to reduce it through configuration?
- How is the signal itself treated by the machine, and what operations are happening before the computer receives it?
- Has anyone succeeded in reducing end-to-end latency to below 30 ms in a similar setup, and if so, how?

Any insights or suggestions would be greatly appreciated.
Post Reply