EEG harmonic components, and data scaling factor
Hi,



I was testing the EEG data scaling factor by looking at the output and the input voltage.
Here is the experiment,
I set up a sine wave generated by the function generator with vary frequencies which were less than 125Hz and the amplitude of 0.01V (10mV). I connected the N1N pin with the positive probe and the SRB2, AGND pin were connected to the negative probe. And I opened up the OpenBCI_GUI to monitor the signal and implemented the data in MATLAB. What I observed were,
- Input signal: 10Hz and 10mV, a nice and clean sinusoidal waveform obtained.
However, when I was slowly increasing the frequency, probably (>25Hz) , I observed that signal was getting harmonics components.
- Input signal: 123Hz and 10mV
And my second quesiton is the data scaling factor
for the above example of 10Hz, 10mV. The amplitude of the output signal is around 9000, (I am guessing the unit is microvolts). Since my input is 10mV, with a default gain 24x, thus
input: 10mV/24 = 0.416667 mV and data scaling factor is 9mV/0.416667mV =21.6 ?
and i don't know how the 24-bit will affect the data scaling factor here?
I am not sure whether my thinking is correct or not and sorry for my bad English.
Thanks for the helps!
Comments
The large majority of EEG usage at 250 hz will be with waveforms below 50 hz. In many cases not even reaching 40 hz.
Regarding your statement: "I am currently using the 8 channel board which samples at 250Hz. All the experiments I did, the frequency was less than 125Hz." Realize that to avoid distortion and harmonics, you need more than just the Nyquist limit. Probably more like 5, 6 or more samples per waveform cycle. 250/6 = 41.6 hz.
If you need faster sample rates, there are some other threads on the forum which explain how that can be done using wired USB link or Bluetooth 2.0.
https://en.wikipedia.org/wiki/Aliasing
https://en.wikipedia.org/wiki/Aliasing#Sampling_sinusoidal_functions
If you stay below 40 hz with your EEG you should be fine. What is your application?
You may also be engaging effects due to impedance mismatch at your connection between the signal generator and the OpenBCI electrodes. The ADS1299 is expecting an input impedance somewhere between around 5K ohms and say 100K ohms.
You may want to check this thread,
http://openbci.com/forum/index.php?p=/discussion/637/methods-for-signal-validation-eeg-phantom-heads
And Jeremy's paper,
https://hal.inria.fr/hal-01328427/document
Regards, William
If you saw that phantom head thread, this is what the phantoms do, they simulate realistic skin impedances, then inject simulated EEG signals into the head mass. The papers in that thread show it is not so trivial to do this.
With the compressed horizontal time scale you have chosen, the exact aliasing effects are somewhat hard to see, even at 20 hz. Was this latest graph still using the AGND connection instead of Bias? That may be contributing to your distortion and amplitude reduction. Have you tried verifying with another device (such as oscilloscope) that your input amplitude remains constant across frequency? As I mentioned before, there could be impedance mismatch or other factors contributing to your measurements. The phantom head links were referenced to show that simulating EEG signals and measurement has certain subtleties.
re: 'My thought is, if this is the board with 250Hz sample rate, it should handle at most 125Hz waveforms (Nyquist limit)"
Try a thought experiment. With 250 hz sample rate and a 125 hz sine wave. If your sample time happens to be at the sine wave maximums, you get something like a triangle wave output. This has huge harmonics if you look at the FFT, it's not a single wavelength as the FFT would show for a sine wave. Similarly (and more likely) if the samples are NOT at the maximums, you get various types of sawtooth waves, or even nothing if the samples happen to be at the zero points. Sawtooths again have tons of harmonics in the FFT.
So the only time you get decent FFT response minimizing the harmonics is when you have a good number of samples per waveform. And obviously EEG signals are not pure sine waves, they are very complex with many simultaneous frequencies per time period.
Did you see the paper link by Jeremy Frey with his comparison of OpenBCI characteristics to a research grade device? We pass with flying colors. Have you tried any actual EEG measurements with your unit? What is your application?
Regards, William