Monday, December 2, 2013

Self-Noise of OpenBCI

An important quality of any EEG system is its noise floor.  If an EEG system has a noise floor that is too high, the noise might mask the small EEG signals that you're trying to measure.  So, when working with an EEG system, it is important know that its noise floor is low enough.  I've been working with the OpenBCI system, but I don't know what it has for a self-noise level.  So, I decided to measure it.

Measuring the Self-Noise of the OpenBCI Board by
Shorting the Inputs to Analog Ground

Expected Noise Level:  The heart of the OpenBCI board is the Texas Instruments ADS1299, which is a "low-noise, 8-channel, 24-bit analog front-end for biopotential measurements". Its datasheet says that it has a self-noise of 1 uV over a bandwidth of 0.01 Hz to 70 Hz.  That 0.01 Hz value is a very low frequency and would require at least 100 seconds of data, if not several hundred seconds of data (to get a good average) to properly evaluate.  Since I don't care about signals down to 0.01 Hz, and since I want a faster test, I looked at the datasheet for other statements regarding its noise level.  The best value that I found was in the Table 4 in the data sheet, which I copied below for convenience.  A footnote on the table says the values are based on a recording of 1000 data points.  When running at 250 Hz, this means that their sample had 4 seconds of data and not the 100s of seconds of data needed to recreate the value reported for 0.01 Hz.  This is a shorter test.  Great.

Table 4 from the ADS1299 Data Sheet Showing Self-Noise for a Gain of 24.
For a sample rate of 250 Hz, the noise level is 0.14 uVrms for a 65 Hz bandwidth.
We run the ADS1299 at a sample rate of 250 Hz, so looking near the bottom of the table, we see that we should expect a noise level of 0.14 uVrms for a bandwidth of 65 Hz (presumably 0.25 Hz up to about 65 Hz).  To make sure that I'm interpretting this table correctly, I found Figure 3 in the datasheet (copied below), which shows a sample of noise recorded with a gain of 24 and a sample rate of 250 Hz.  Based on the amplitude of the noisy signal, I would say that this graph is consistent with the 0.14 uVrms value that we took from the table above.  That's good.  Now, let's do our own experiment to see if the self-noise of the OpenBCI board is at this low level.

Figure 3 from the ADS1299 Data Sheet Showing a Sample of Self Noise.
This picture is consistent with the 0.14 uVrms level given in the table.

How to Measure "Self Noise":  When evaluating the self-noise of a sensing device, what you want to measure is the amplitude of the signal that the device thinks that it sees, even when there is not "real" signal present.  If there is no real signal present, then anything that is present is noise.  One easy way to ensure that no real signal is present is to simply short the inputs to ground.  That's what we'll do.

Shorting the Input to Ground:  For the OpenBCI board, each input is actually a differential measurement between the input and the common reference labeled "SRB2".  So, as you can see in the picture above, I shorted "input 1" to "SRB2" with the yellow jumper wire, and then I shorted SRB2 to analog ground with the white jumper wire.

Other Hardware:  The OpenBCI board was mounted on an Arduino Uno.  It was plugged into a PC via USB.  The Arduino (and, therefore, the OpenBCI board) were being powered from USB.

Software Setup:  I configured the OpenBCI board for normal EEG data collection.  This means that it was using a sample rate of 250 Hz with a gain of 24.  All channels except for channel 1 were turned off.

Results:  I recorded 10 seconds of the digital values that were output by OpenBCI board via the Arduino.  After scaling the raw counts into volts (1 count = 0.022 uV), and after filtering the noise to a bandwidth of 0.1-65 Hz, I made the time-domain plot below, which mimics the plot above from the ADS1299 datasheet.  As can be seen, it looks very similar.  The RMS value is 0.16 uV, which is very close to the 0.14 uV reported in the data sheet.  Given that datasheet values are usually very hard to achieve in practice, I find the 0.16 uVrms value to be a remarkable result.

Noise Recorded from OpenBCI with its
Inputs Jumpered to Analog Ground.

Characteristics of the Noise:  In addition to the RMS value, it can also interesting to look at the histogram and spectral properties of the noise.  The histogram below is for the same sample of OpenBCI data shown above.  It appears to be Gaussian shaped, which is good because that is what is expected.  The spectrum shown below  is also good because the spectrum is generally flat all the way up to the Nyquist frequency for this sample rate (Nyquist = half the sample rate = 250 Hz / 2 = 125 Hz).  Looking in detail, the magnitude of the noise density appears to average about 0.02 uV/sqrt(Hz) for frequencies up to 65 Hz, which is also good because it is consistent with our RMS value being 0.16 uV (this is consistent because 0.16 uV / sqrt(65 Hz)  = 0.02 uV/sqrt(Hz)).  Good news all-around!

Histogram of 10 Seconds of Noise Recorded from OpenBCI with its
Inputs Jumpered to Analog Ground.
Spectrum of Self-Noise Recorded from OpenBCI with its
Inputs Jumpered to Analog Ground.
Conclusion:  Based on this single 10 second recording, the self-noise of channel 1 of my OpenBCI board is 0.16 uVrms over the bandwidth of 0.1 to 65 Hz.  This is consistent with the value reported in the datasheet for the ADS1299 (which was 0.14 uVrms), so I have confidence in the value that I measured.

Other EEG Systems:  This 0.16 uVrms value sounds pretty good to me, but I do not have much experience with other EEG systems.  How about you?  Do you know the noise level for other systems?  Can you share the values?  I'd love to build a table comparing the different systems!

Follow-UP:  Based on reader's comments, I've extended my measurements to go lower in frequency and to look across multiple channels.  Check out the results here!

3 comments:

  1. Chip, thanks for this great series of posts you've been doing on the OpenBCI board. A couple questions.

    (1) I noticed on some of the posts that you were just using two wires (signal and reference), and not including the analog ground. [Of course on this noise level post you were shorting all three.] Is it not the case that for any actual neurofeedback setup you would want to be including the ground wire electrode, along with the signal(s) and reference? All the commercial equipment (Brainmaster, Pocket-Neurobics, etc.) uses that ground electrode, either on a separate head location, or on earlobe, mastoid, etc. As you are mentioning here, it contributes to the noise performance.

    (2) There are some newer forms of neurofeedback, working with the slowly changing DC levels produced by ensembles of glial cells / astrocytes -- that do indeed produce very slow moving 'fluctuations'. These are not frequencies per se, more like level shifts. So this form of neurofeedback, is called ILF or ISF Infra Low Frequency or Infra Slow Fluctuations. And can be as low as .001 hz. Yep, that is one thousand seconds or 16 minutes cycle time(!) The ILF approach was developed by the Othmer's here in the U.S. I can send you some of their research links. It has especially proven helpful for working with vets and PTSD. Since one of your sponsors is DARPA, they should have an interest. Ag-AgCl sensors are used for ILF, because of their stability.

    William Croft (croft {at} lightfield {dot} com)

    ReplyDelete
    Replies
    1. That's some great info that you've shared. Thanks so much!

      Re: the third electrode: I totally agree that the third electrode (variously named "ground", or "driven ground", or "patient bias") is a standard feature of EEG. IMO, this connection serves two purposes: (a) it drives the common-mode DC voltage of the subject such that he is between the voltage rails of the EEG amplifier (otherwise the amplifier would saturate, even though it is attempting to be differential), and (b) it has some effect on canceling common-mode noise. In my experience, issue (a) is not an issue when running off a floating battery-powered system (such as my laptop) and that (b) the noise-canceling properties are overblown, except at 60 Hz, which I handle through software filtering. This is just my personal experience, but that's why I'm usually silent about my third connection. I'm definitely open to alternate (and more mainstream) opinions to better educate me on this issue.

      Re: low-frequency signals. Wow, that's cool. I will definitely look into it more. If you can share some links, I'd like to see what people are up to. Going down to 0.001Hz is crazy! Who wants to wait around for 1000 seconds! Definitely cool.

      Thanks again for your interest and for your excellent comments.

      Chip

      Delete
    2. Oh, and just to clarify, the "Analog Ground" that I was using here in this post is not actually intended to be the third connection to the subject. It is just the midpoint between our bi-polar voltage rails.

      We do have a driven ground, which is provided by the ADS1299, and is dynamically generated based whichever input channels (or all input channels) that you'd like. The ADS1299 folks call this the "bias". We bring the bias out to a pin next to the input pins. I just haven't been using it much (see my main comment above).

      Delete