About filters in GUI

mochen21mochen21 Chinese-Shenzhen
Hello, I wanna to use OpenBCI to achieve a system of BCI. And could you tell me something about the filters of OpenBCI GUI used?
More details are great ! 
(1)For example, how to set parameters of Notch filter and band pass filter ( 5-50Hz ) ?
(2)Also, I want to ask whether I understanding the working principle of Cyton, as follows:
    When using LSL import data stream to Matlab , I use the official script 'ReceiveDataInChunks.m' to get EEG data. For real data , I multiply a scale for the raw data .
    scale: 1 / (2^23-1) / 24 * 10^6 , which 24 is gain of Cyton . Is this correct?
Thank you.

Comments

  • The band pass should be around 0.5 or 1 Hz to anywhere from 30 to 70 hz top end depending on how much you want gamma frequencies versus do not want muscle artifact.

    The notch filter should be set to your region's electrical main AC frequency -- 60 Hz, in US, 50 Hz most other regions.

    The Cyton will send digital data as 24 bit signed integers (from -8388606 to 8388607) but its actual physical response is -187500 to 187500 microvolts, I believe, so your physical data graph should be scaled accordingly.


  • mochen21mochen21 Chinese-Shenzhen
    Thank you for your answer, this will help to build my project.
  • Maybe you need to add the Vref of 4.5 into your formula?
    Here is some pseudocode for the calculations, taken from the Java code:

        ADS1299_Vref = 4.5
        ADS1299_gain = 24.0
        openBCI_series_resistor_ohms = 2200
        scale_fac_uVolts_per_count = ADS1299_Vref / (2^23-1) / ADS1299_gain  * 1000000. 
        # ADS1299 datasheet Table 7, confirmed through experiment

        INT24MINIMUM = -8388608    # digital minimum
        INT24MAXIMUM =  8388607    # digital maximum
        CYTONPHYSICALMINIMUM = -187500
        CYTONPHYSICALMAXIMUM =  187500

       microvolts_per_digitalunit = (CYTONPHYSICALMAXIMUM - CYTONPHYSICALMINIMUM)/(INT24MAXIMUM - INT24MINIMUM)

    Note that scale_fac_uVolts_per_count should ==  microvolts_per_digitalunit  within an insignificant error

  • wjcroftwjcroft Mount Shasta, CA
    @mochen21 and @Billh, thanks for all the previous posts.

    Here's my impression: the LSL stream contains the Cyton channel data, ALREADY scaled to microvolts. Here is a tutorial from Irene, showing the output,


    Granted this is using the Python sender, but I believe the GUI LSL sender is the same. The GUI LSL sender could be altered if you change the GUI Settings panel to use other than the default x24 gain.

    You can see if your values received by Matlab look to be in the range shown on the page above. Generally Cyton EEG channel data will have a DC offset of tens of thousands of microvolts. This is removed in Matlab with a high pass filter or bandpass filter.

    Regards,

    William

  • edited May 2019
    Once filtered, the numbers should be in the +/ - 100 microvolt range if they are in physical microvolts, and about 50 times that if the numbers are digital units.
  • mochen21mochen21 Chinese-Shenzhen
    Thanks again for helping me with my questions.
    My project seems to be getting results, but I have a question about EEG signals. 
    Does phase information have a big impact on EEG signals? 
    This means that I design filters that need to consider whether to use filters with linear phase.
  • Here is an online discussion: https://sapienlabs.co/pitfalls-of-filtering-the-eeg-signal/

    The "tl; dnr" message there is that unless your timing of an event is critical, as in ERP's, a phase delay should not affect your results. ERP's here are unlike SSVEP because timing, not frequency, matters. If your BCI method is only using amplitudes and frequencies for control output, phase will not matter.


Sign In or Register to comment.