Detecting EEG frequency bands

Hello,

I'm working on a project that will use a Ganglion board to capture the various EEG signals (alpha, beta, gamma, delta, theta, etc...).  Is there anything built into the firmware on the Ganglion or the software off-board to do the processing required to detect these bands?  If not, what is the simplest way?  I'm looking to find all of these bands simultaneously.

Thank you for your help!

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Pete, hi.

    The signal processing would be likely be too intense for the Simblee firmware in the Ganglion. All of the typical VPLs (Visual Programming Language) apps can do this easily with no programming: BioEra, BrainBay, OpenViBE, neuromore, etc.

    Typically (in neurofeedback at least) band detection is done with individual filters, one per band. But since you are looking at all bands, an FFT approach could work as well. For that matter you could mod the OpenBCI_GUI to output the FFT bin values; same info that is shown on the screen graph. You could either output that raw, or collect the bins into bands at the standard hz values.

    Using an FFT or filter approach always entails some delay between the EEG change and the band or bin amplitude value appearing after the signal processing chain. 


    William

  • Hey there is a power band widget in the GUI that gets the power in each band! The hardwork is done!
  • Just to follow up with this*.

    The OpenBCI GUI does have a band powers widget.  That's really useful for seeing those values in the GUI.  For my use case, I really needed some code to capture these values without needing to run the GUI.  My first attempt was to look at the code that the GUI uses.  That was mildly helpful, but I couldn't use Java for my purposes, so I was trying to re-write everything from scratch, separated from the rest of the GUI.

    Then I found these great NPM modules from Alex Castillo: OpenBCI Observable & EEG Pipes.  Using those, I built something that worked for my use case fairly easily.

    Thanks, everyone, for your help.

    * As a developer, I hate it when a forum post has no resolution
  • HOW GREAT IS EEG PIPES!!! Thanks @petewall
  • Hey Pete,

    I have a PR for a new pipe that does what you are looking for:

    With the powerByBand pipe you could simply do:

    const { createEEG, bufferFFT, powerByBand } = require("eeg-pipes");

    const eeg$ = createEEG().pipe(
    bufferFFT(),
    powerByBand()
    );

    eeg$.subscribe(console.log);

    and get the average power per channel per band:

    /*
    delta:
    [ 2.7838527544416607,
    1.7215282015555413,
    1.2830691109333134,
    3.189874283126162 ],
    theta:
    [ 1.9972199355122509,
    1.8275953454722245,
    1.7084767276997392,
    1.3135378851718782 ],
    alpha:
    [ 1.1063319975954156,
    0.4715759505859628,
    0.9543863878349488,
    1.2653740839045298 ],
    beta:
    [ 0.8229068046671555,
    0.7202742653575429,
    1.036620858519412,
    1.0019576776254864 ],
    gamma:
    [ 0.8444094145588882,
    0.6971213677799489,
    0.7866005565157465,
    0.7926856634275653 ]
    }
    */

    Best,

    Alex
Sign In or Register to comment.