filter bands for processing EEG, ECG

zfmengzfmeng Japan
edited June 2019 in OpenBCI_GUI
Hi~

According to the previous advices, I applied band pass (0.5Hz-40Hz), IIR filter, order-5, to process the EEG raw data collected by Cyton board.
How about it ?

By the way, how about the ECG raw data? What filter is suitable for the ECG ?

Thank you very much

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Z, hello.

    Your EEG filter parameters are typical and good. That same bandpass should be fine for your ECG. Here is a relevant paper,


    Regards,

    William
  • HI~William, 

    OK. Thank you. I would try then.
  • Hi~ William

    I tried the same filter with the ECG data and it works well.
    Thank you.

    But I wonder if the filters matter, FIR or IIR ? And how about the orders ?

    By the way, the sample frequency is 250Hz, which means 250 point/sec, but the raw data is recorded as 0-255 and repeat.
    Is the sample frequency 250Hz or 256Hz ? I'm not sure about it.

    Thank you very much.


     
  • wjcroftwjcroft Mount Shasta, CA
    Z, the packet counter is just a single 8 bit byte value. This does not coincide in any way with sample rate. One byte holds unsigned values from 0 to 255. Sample frequency is 250 Hz, or 125 Hz with Daisy (no Wifi Shield.)


    The filter order just determines the sharpness of the band edges. 5 is fine.
  • Hi~ William

    Thank you for your explaination.

    OK. I understand.
    Then how to get the point and the time ?

    I tried to process the raw data with eeglab.
    Could you offer me some advices ?

    Thank you very much.


  • wjcroftwjcroft Mount Shasta, CA
    "Then how to get the point and the time ?"

    Not understanding your question, can you rephrase?

  • Hi~ William

    I used Polymate before and it recorded the data as the first column is point. 
    As its sample frequency is 1000Hz, the time could be obtained by point/1000.

    How about the raw data from Cyton Board ?
    Could you understand my question?

    Thank you.
  • wjcroftwjcroft Mount Shasta, CA
    Sample rates are not guaranteed to be EXACTLY 250.000 Hz. There is something called 'drift' on all EEG amplifiers. For example on the Cyton, your actual sample rate may be 249.7. The only way to synchronize real world events with your EEG recording, is to use the External Trigger mechanism, via the Aux channels. See this thread for a discussion,


    The other metric involving sample rates, is called 'jitter', momentary variations in the sample rate. This is very low on Cyton and can be ignored.

    Other threads on the forum discuss how to setup an Aux channel external trigger. Use the search button in lower right column.

    William

  • wjcroftwjcroft Mount Shasta, CA
    Such external triggers are especially important when you are signal averaging to work with P300. Without precise sync, you don't know when the stimulus was presented.
  • Hi~

    After band pass filter, how about the amplitude of the EEG signal (-50~50uV) ?

    Thank you. 
  • wjcroftwjcroft Mount Shasta, CA
    Yes, same as what you see with the GUI. Sub-bands of course will be less.
  • Thank you.

    I used low pass (60Hz), and band pass (0.5~40Hz) to process the raw data, but the 60Hz noises seem still exist.

    What about the solution? Thank you.
  • wjcroftwjcroft Mount Shasta, CA
    You want a 'notch' filter at 60Hz or whatever your mains frequency is. NOT a low pass. Have you experimented with the various settings in the GUI? Notch, bandpass range, etc.
  • Yes. I set the Notch 60Hz, and the band pass is 5-50Hz.
    It seems work well. So do I need to apply the same filter as GUI?
    First, notch filter (60Hz), then band pass (5-50Hz).
    Thank you.
  • wjcroftwjcroft Mount Shasta, CA
    edited June 2019
    5-50 Hz would leave out delta band. So .5 to 50 would be better (assuming your mains is 60). Filter ordering should not make any difference. Notch just works very narrowly. But... applying the notch first will remove substantial noise and harmonics. Your .5 to 50 should already remove most of the mains noise. Try both ways and see if there is any difference.

  • Thank you. 

    Yes. My mains is 60.
    OK. I would try to use notch filter.
  • @zfmeng
    Pls, can I get a few tips from you? In what software did you implement the filters for ECG? If I could get the codes. Thanks

Sign In or Register to comment.