Data rate from Cyton board is irregular

I am new to using the Cyton board and Open BCI. To get started learning, I had a close look at the raw data coming as read from the Cyton board using the Brainflow C++ library. I am reading the data at approximately 20 Hz.

To check the sample rate, I started counting records, and I am getting about 60 data points per read, for a total of about 250 per second. The board spec says it is sampling at 250 Hz. So far so good.
However, when I look at the data in a spread sheet I was expecting to see a more or less regular 4 ms between samples (for 250Hz). What I saw is that you are usually getting a cluster of samples all within a few microseconds, and then there is a long delay before you get another cluster of samples.
I double checked, and observed the same behavior in a couple of data files logged with OpenBCI_GUI, so I do not think it is my code. I am wondering if I have a defective board?

I did a detailed write up with some graphs showing my observations. It is published as a google document here:https://docs.google.com/document/d/e/2PACX-1vRgXptqM7YI7C7uucgLpNmHbG-PHuu_i2eiUyFYih0-rsKHvKTNbvnRM2EPy2E7E6VMitOD2be_z6rJ/pub

If anyone who knows more about what to expect from the Cyton board regarding sample rate and sample frequency regularity, I would very much appreciate if you can review my notes and let me know if you have any insight.

Thank you
GB

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Graham, hi.

    Buffering happens at several levels. So these delays are normal. Components contributing to delays are in the usb driver system, the OS, Brainflow buffering, programming language IO system, etc.

    Samples are indeed at a constant interval, with rate ~ 250.xx Hz.

    William

  • William
    Thank you very much for your prompt reply. Although I did search first before posting this question, after the fact I found this post on the OpenBCI forum which also explains the same thing:

    https://openbci.com/forum/index.php?p=/discussion/2329/how-steady-is-cytons-sampling-rate-resolved

    Thank you for confirming, I understand now what is going on and can more confidently move forward to the next step of processing the data.

    I went back and re-read the BrainFlow documentation here: https://brainflow.readthedocs.io/en/stable/DataFormatDesc.html, and it does describe how the timestamps from some boards are generated by the PC at the time the packet was received, so it is fair to say that it is documented. However, it is also fair to say it not really explicit how this characteristic will show up as irregular sample rate in the record timestamp.

    I do respectfully suggest to the Brainflow team that they should add an extra sentence or two to the documentation on timestamp more explicitly describing that the PC generated timestamp will make it appear as if the data is at an irregular sample rate, but not to worry about it and use the sample index to make sure the data sequence is uninterrupted. This will hopefully obviate others from having the same doubts about the data that I did.

    Thank you very much for your time and attention.

    GB

Sign In or Register to comment.