Ways to improve data collection quality and increase sample rate

jcyhuangjcyhuang Philadelphia

Hi team,
We are running an experiment collecting the participant's EEG (gel-free cap offered from the site) and ECG with the Cyton + Daisy board (15 channels for EEG and 1 for ECG) while he/she watches a 30-min video. So far we've collected around 30 people's biometrics. Running these data through the MNE package, we dropped on average ~50% of the epochs (i.e., there's only 50% of usable data left) across participants. We are wondering if the dev team has suggestions to improve the data quality. Below is our current setup and things we have tried -
1. Given that we have two focus rooms and two Cyton+Daisy boards, we have set each board to a designated channel to minimize board interference.
2. Turn off SRB2 and BIAS for the ECG to minimize interference with the EEG data
3. Add a USB extension cord so that the Cyton board is right next to the USB dongle.
4. Ensure impedance is less than 50 for each electrode (checked through the GUI v5.1.0)
5. Ask participants to minimize movement during the collection
Are there other things that're worth a try?

Additionally, we are looking to increase the sample rate of our data collection. We have the wifishields but have seen the relevant threads discussing the power issue / packet loss issue for Cyton + wifishield. We have three questions
1. Other posts have suggested to power both the Cyton board and the Wifishield and transfer through UDPx3. How do we set up the UDPx3 protocol using a Python script? Furthermore, I don't seem to find this configuration option on GUI v5.1.0 either.
2. Would using saving the data to a SD card while using Cyton+wifishield help with the packet loss issue?
3. Are there other ways to increase the sampling rate to beyond 250? We found a script from github that seems to be addressing this need (https://github.com/OpenBCI/OpenBCI_Cyton_Library/pull/96/files). However, we are relatively new to the BCI world and are not sure how we can implement / use this script. Would love some pointers if possible.

Thank you team!

Comments

  • wjcroftwjcroft Mount Shasta, CA

    JCY, hi.

    Can you clarify? You mention "packet loss", is that with the default Bluetooth radio transfer, or are you referring to the Wifi Shield? You also state that MNE threw out 50% of epochs / samples. Is that also because of the packet loss, or because of subject movement artifacts? Movement artifacts cannot be helped, but some algorithms attempt to do auto-epoching to eliminate movement artifacts. Etc.

    The Pull Request you mention was never merged.

    https://github.com/OpenBCI/OpenBCI_Cyton_Library/pull/96

    In general we do not recommend firmware modifications, as they can be unstable and interfere with customer service requests. But feel free to correspond with the PR authors, they may be more reassuring or provide guidance / handholding.

    Since the Wifi Shield has been missing from the Shop for some time, and is still awaiting some power supply mods for Cyton, it is possible that OpenBCI_GUI no longer offers support for the Wifi Shield connections on Cyton. Mentioning Richard @retiutut. There may be a workaround.

    William

  • jcyhuangjcyhuang Philadelphia
    edited October 2022

    Hi William,
    Thank you for your response!

    Can you clarify? You mention "packet loss", is that with the default Bluetooth radio transfer, or are you referring to the Wifi Shield?

    Referring to the wifishield here. We've also observed higher % of packet loss when we run Cyton + wifishield like what other posts have mentioned. Our proposal here is to store data to the SD card while transferring the data with the wifishield, would that be able to get us a higher sample rate (i.e., greater than 250) and lower % of packet loss?

    You also state that MNE threw out 50% of epochs / samples. Is that also because of the packet loss, or because of subject ?? movement artifacts? Movement artifacts cannot be helped, but some algorithms attempt to do auto-epoching to eliminate movement artifacts. Etc.

    Most likely non-artifacts noises given that we already filtered and ran ICA to correct for the artifacts before rejecting the epochs. We are wondering if there are other things in terms of the experiment setup that we should consider to lower the drop rate. For example, we observed that the drop rate decreased when we fixed the interference issue between two boards.

    The Pull Request you mention was never merged.

    https://github.com/OpenBCI/OpenBCI_Cyton_Library/pull/96

    In general we do not recommend firmware modifications, as they can be unstable and interfere with customer service requests. But feel free to correspond with the PR authors, they may be more reassuring or provide guidance / handholding.

    Thank you. Bummer that it wasn't incorporated!

    Since the Wifi Shield has been missing from the Shop for some time, and is still awaiting some power supply mods for Cyton, it is possible that OpenBCI_GUI no longer offers support for the Wifi Shield connections on Cyton. Mentioning Richard @retiutut. There may be a workaround.

    To clarify, we are looking for a way to set the protocol to UDPx3 with the Brainflow API in Python (vs. the GUI).

  • wjcroftwjcroft Mount Shasta, CA

    If you look in this file,

    https://github.com/OpenBCI/OpenBCI_WIFI/blob/master/examples/DefaultWifiShield/DefaultWifiShield.ino

    The 'x3' modes are turned on, when a JSON key 'redundancy' is detected. As you can see in the code this is available for both the tcp and udp modes.

    Unfortunately the Wifi Shield dev, AK Keller departed OpenBCI staff long ago. So is not available for questions.

    https://docs.openbci.com/ThirdParty/WiFiShield/WiFiAPI/

  • jcyhuangjcyhuang Philadelphia

    Hi William, Thanks again for all your help!

    The 'x3' modes are turned on, when a JSON key 'redundancy' is detected. As you can see in the code this is available for both the tcp and udp modes.

    Maybe I'm just dense here. Could you point to the lines that you are referring to? We are using the config_board() function, I also noticed that we can set the IP protocol to UDP in the script. However, I'm not sure if there's currently a way to set up UDPx3...

    An additional question for you regarding to the data quality - would our ground and reference electrodes make a difference to the data quality? Instead of the ones that are included on the gel-free cap, would you recommend getting the ear clip ones for better data quality?

  • retiututretiutut Louisiana, USA
    edited October 2022

    I do not recommend using Cyton+Wifi. This is a key to this entire thread. Please try your analysis using 125Hz with 16 channels and Cyton+Daisy. Chasing higher sampling rates does not necessarily increase resolution of 16ch EEG recordings, as source location is not the target analysis.

    I was personally around for the in-depth investigation into the Wifi shield, and UDPx3 was not a fix for the hardware issues on the Wifi shield itself.

  • wjcroftwjcroft Mount Shasta, CA

    @jcyhuang said:
    ...
    Maybe I'm just dense here. Could you point to the lines that you are referring to? We are using the config_board() function, I also noticed that we can set the IP protocol to UDP in the script. However, I'm not sure if there's currently a way to set up UDPx3...

    If you click on the DefaultWifiShield.ino link in the above comment, then in your browser, search for the string 'redundancy', you will find the lines. Unfortunately as I commented about A J Keller, no one currently at OpenBCI is knowledgeable about the Wifi firmware. So I am not sure how you send this JSON to the Shield. However there is mention of JSON functionality in the various Wifi docs, such as https://docs.openbci.com/ThirdParty/WiFiShield/WiFiAPI/

    An additional question for you regarding to the data quality - would our ground and reference electrodes make a difference to the data quality? Instead of the ones that are included on the gel-free cap, would you recommend getting the ear clip ones for better data quality?

    The Gel-Free cap ground and reference connections should be fine. No need to use ear clips. But feel free to experiment.

Sign In or Register to comment.