openbci-archive/OpenBCI_NodeJS_Cyton

Device and simulator output difference

Opened this issue · 7 comments

agneg commented

Hello,

I was wondering about the measurement units of output, In the README file it says "Channel 8: -0.00001875 Volts." as an example of output. So I would assume the output would be in Volts. However the output scale for simulator and actual device is obviously different.

For simulator is something as in example: -0.00001875
But actual device gives measurements which look more like: -0.1875

So I was wondering what is the reasoning for this difference and what is the actual measurement unit for the device output?

Sincerely,
Agne

-0.1875V is a minimum value indicating that that channel is "Railed", please verify that your have clean or new electrodes with good contact on the scalp, that you have a bias and ground attached to the body as well. -0.1875 is in Volts.

I did a google search for "openbci railed" and here's a useful link:
http://openbci.com/forum/index.php?p=/discussion/220/channels-stuck-at-railed

And from the tutorials check out for learning to minimize noise:
http://docs.openbci.com/Tutorials/01-Cyton_Getting%20Started_Guide#cyton-getting-started-guide-v-connect-yourself-to-openbci-5-minimizing-noise

agneg commented

I know that it is an indication for the railed signal, it was just a number I had by my hand.

My question still stands about the measurement units and difference in output values.

I changed the numbers in the example and proposed #8 to update the README.

So I was wondering what is the reasoning for this difference

I have to assume you are talking about the DC offset that is present in the real world signal. There is no DC offset in the simulator data, it's just AC signals. The real world data will have a DC offset which can make numbers look like 4.56383599 Volts but after a bandpass filter from 1-50Hz for example would make the number much smaller and closer to the numbers you see on the simulator.

What is the actual measurement unit for the device output?

All OpenBCI NodeJS modules will output channel data in Volts.

agneg commented

Signal processing is not something I know much about but it really is confusing when code acts as if it is giving output from device and simulator in the same way but the data is actually very much different.

I still can not get device output even close to the simulator values. I am applying now the 1-50Hz bandpass filter and 50Hz notch filter. Both basically copied from: https://github.com/OpenBCI/OpenBCI_Processing/blob/master/OpenBCI_GUI/EEG_Processing.pde

I can see that values for the filter are hardcoded for 250 sample rate, therefore I am not using daisy module for this test. Device firmware is up to date. I do realize my head is a bit small for the helmet we have but at least some electrodes seem to work(checked in OpenBCI GUI).

The values I get now are in lower range but still too hight. Example: -0.042

Try to avoid drawing conclusions from a single time point. EEG signal processing is hard!

Here is a library that uses this library and provides a bunch of filters and such for you on top of this library.

https://github.com/alexcastillo/openbci-observable

agneg commented

I am not drawing conclusions from one time point, I am just giving an example of one. The difference is too apparent and that is probably why impedance basically works on simulator output and does not on device output.

Thanks, I will take a look at the linked library.

Always try to give an example of more then one point because EEG signals vary over time. If your channel is railed, we will see it not change overtime, if you are getting real eeg then the number will slightly change overtime.

Which functions are you using for impedance?

You can place a resistor on the real device between N Chan and Bias/GND of a know value (say 5kOhm) and verify impedance is working because the impedance value should be right around 5kOhm. The data sheet for ADS1299 says it’s +/- 20% accurate so these numbers can change based on environmental variables.

Another idea is to add code to the simulator to add in a random DC offset but the values you would see would be way different then from the devices.

Can you please share the patch for the bug you found with impedance?