OpenBCI_GUI incorrect calculation of rms value
Currently, the rms value of a channel is calculated as its standard deviation (call to std() in Open_BCI file, line 227).
IMHO, this is incorrect since Yrms = sqrt(<Y^2>) while std(Y) = sqrt(<Y^2> - <Y>^2).
This bites you when the signal has a DC bias, which shows up when no BP filter is employed.
std(Y) = sqrt(<Y^2> - <Y>^2). If Y=DC+X, then <Y^2> = DC^2+Xrms^2, <Y>^2 = DC^2, and std(Y) = Xrms rather than Yrms = sqrt(DC^2 + Xrms^2).
Consider changing line 227 to: data_std_uV[Ichan]=sqrt(pow(std(fooData_filt),2) + pow(mean(fooData_filt),2));
D
PS This is exactly the situation I ran into this: I had some electrodes that were railing and couldn't understand what was happening. Turns out, they were DC biased because of bio-incompatibility of the electrode material (brass).
Comments
It IS widely acknowledged in EEG not to mix electrode metal types, because this causes a battery effect.
Here is an insightful paper on the noise characteristics of various electrode metal types,
http://www.eeginfo.ch/fileadmin/images/was_ist_neurofeedback/wie_funktionierts/SCP_recording_electrodes_and_paste.pdf
This is especially important when measuring SCP, Slow Cortical Potentials or ILF, Infra Low Frequency EEG. In other words, very slowly changing DC bias. Brass is not mentioned at all.
William
http://openbci.com/forum/index.php?p=/discussion/201/large-millivolt-data-values-fbeeg-full-band-eeg
For conventional EEG, a high pass filter at around .5 hz removes the slow components. In an ILF design, the signal paths fork just before the highpass filter, with the slow waves having their own processing algorithms.
See some of the links in that thread for the research supporting use of slow wave EEG.
William