not seeing FFT peaks in SSVEP with OpenBCI + PsychoPy flash generator

edited February 2020 in General Discussion

Hi All,
I am trying to get SSVEP work with OpenBCI. I have cyton board and Ultracortex mark IV.
I am using the activation frequencies 6.67,7.5,8.57,10,12,15 which are divisible by 60HZ monitor and used psychopy to generate the activation frequency.
I getting the EEG from O1 and O2 (10-20 system) via LSL and using python to get data and then do Notch filteing at 60Hz and butterworth bandpass for freqquncy 1-40Hz. After that I do FFT in python. Sample frequency is 250hz for the board and I am using the time epoch of around 1 sec to get FFT. Issue is I am not seeing the peaks for the activation frequency on FFT. I have even tried LED activation and same results.
I was looking to the post created by Haseeb
https://openbci.com/community/ssvep-based-bci-speller/
From this post looks like if the SSVEP activation is correctly applied then FFT peak should have been working out of the box with openBCI hardware, or at least it should have been showing peaks in the FFT frequency of OpenBCI GUI as seen in the video shown in the URL.
But for me even on openBCI GUI also I am not seeing the peaks when I do activation with SSVEP. Any advice on what I am missing ?

Best regards,
Arya

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Arya, hi.

    You mention: "...used psychopy to generate the activation frequency..."

    Is it possible that the frequency generation step has too much variability? Not enough stability to produce a precise frequency peak? Especially if the frequency is being generated in a program loop. There is much variation in timing in OS I/O operations due to scheduling, processor overhead, buffering, etc.

    Chip Audette, in his SSVEP posts, used a movie file to achieve more stabile timing. This is because the video playback chain, enforces precise frame to frame spacing.

    http://eeghacker.blogspot.com/2014/06/controlling-hex-bug-with-my-brain-waves.html
    https://eeghacker.blogspot.com/2014/05/visual-entrainment-blinking-screen.html

    Also, using 6 different SSVEP frequencies generated on one screen, may be too much, and too much cross interference between the screen areas. Finally one point to consider is that square wave amplitude modulation can result in 'harmonics', that appear in other frequency bands. Some SSVEP projects use sine wave AM modulation, to avoid this.

    Regards, William

  • Hi William,
    As written in the post I tried with real LED diode matrix also at a specific frequencies of 6,8,10,12,15 hz but did not see the peaks. For screen activation I am using psychopy which can control the precise interval of the flicker if the frequency is a multiple of 60HZ the screen refresh rate.
    As far as the number of activation, I have tried one activation generated on screen and still no results. I understand 6 frequency together might not be a good idea.
    I also considered sine wave activation by controlling brightness with LED diode matrix but failed to see any results.

    Best regards,
    Arya

  • wjcroftwjcroft Mount Shasta, CA
    edited February 2020

    Is your FFT operating with 1 Hz resolution? Have you tried individual bandpass filters at your frequencies?

    re: "... I am using psychopy which can control the precise interval of the flicker..." I would trust the frequency generation from a movie file. But not trust a frequency generated from an app / process, which is subject to OS latencies.

    Were your LED flashes from an Arduino or from PsychoPy?

  • wjcroftwjcroft Mount Shasta, CA
    edited February 2020

    Millisecond precision issues with PsychoPy
    https://www.psychopy.org/general/timing/millisecondPrecision.html

    Accuracy and Precision of Visual Stimulus Timing in PsychoPy
    https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4218832/

    Note that the common usage case is to present one stimulus of a given duration. If you are using PsychoPy to repetitively time on and off periods (to millisecond accuracy), that is a worst case scenario as far as stressing the timing constraints.

  • Are you getting an alpha peak with eyes closed and no flashes?

  • I did not try alpha peaks, is it related in some way to SSVEP?

  • wjcroftwjcroft Mount Shasta, CA

    Bill, thanks.

    Arya, I also updated the previous links.

    Bill is asking if you can see the 10 Hz alpha waves with eyes closed. This gives some confidence that you are measuring occipital lobe EEG accurately.

    William

  • ok sure, thanks for the help. I will try that out and write back!

  • wjcroftwjcroft Mount Shasta, CA

    Here is a survey / review paper on flash generation techniques used in SSVEP. Perhaps one of these authors would share their software technique with you. I continue to think that Chip's approach of using a movie file will give the most accurate flash output, because OS movie playback must adhere to strict timing accuracy. Hence drivers are optimized for this.

    https://www.hindawi.com/journals/cin/2010/702357/
    "A Survey of Stimulation Methods Used in SSVEP-Based BCIs"

  • Thanks, yes correct I will try that too. But before that I will try 10hz alpha wave. I understand about the accuracy perspective but first atleast some peaks around a range or harmonics should be seen with nearly accurate stimulation(pyscopy). As I was using the dry electrodes so might be the placement for O1 and O2 was not correct or connections were bad. I will use gold cup electrode and measure exactly O1 and O2 positions based on 10-20 system and then try to get 10hz alpha wave. If that comes then next step will be SSVEP on those postions.
    Also I am doing this on a mac, with latest version 10.15.3. Do you think that FTDI buffer fix will be needed ? On this page. https://docs.openbci.com/docs/10Troubleshooting/FTDI_Fix_Mac
    I see only versions mentioned till 10.14 so don't want to mess up the driver if 10.15 not supported etc.

  • wjcroftwjcroft Mount Shasta, CA

    FTDI fix for Mac or Windows is only needed if you see "stuttering" or pauses in the time series display using the GUI. If EEG data flow appears to be smooth, then the buffer fix is not needed.

    re: "...should be seen with nearly accurate stimulation..." I do not believe that 'nearly accurate' applies to PsychoPy, when using it to generate exact on/off/on/off/on/off... repeated flash cycles. It was designed for timing a single flash.

    Precisely exact alignment with O1 O2 is generally not needed. Where were you measuring for SSVEP previously?

  • wjcroftwjcroft Mount Shasta, CA

    In general, passive dry electrodes produce less microvolts signal than electrodes using wet electrolyte. It's also possible that the silver chloride coating layer on dry electrodes can wear down, further reducing output.

  • I was using ultracortex IV at O1 and O2 position

  • I was also looking to openVibe SSVEP basic experiment they have some inbuilt activation. But I have a mac, do you think openVibe running on a windows VM will hog the cpu. Generally Cyton streaming will have to done from macos to vm. Or I can try to get the cyton usb drives on VM and do a local VM steaming for Cyton data?

  • See if you can see an alpha rhythm peak at rest with eyes close and no flashes. This would be the normal brain wave pattern for the visual cortex without it getting visual input. The default alpha for the average brain with leads at O1 and O2 should be between 8 and 11 Hz. This will look like a small to medum sized peak with your FFT, with FFTfreq bins about 1 Hz apart, first filtering stuff out below 2 Hz and above 15 Hz .

    If you cannot see that default 8 to 12 Hz rhythm generated at rest with the subject's eyes closed, there may be a problem with the equipment setup, especially your lead placement. If you can get this rhythm, it turns out that it is easier sometimes to entrain the SSVEP if you use a flash frequency that is the same as the subject's natural alpha Hz rate, so I would try that flash stimulus frequency next, with eyes open once you get the alpha with eyes closed.

Sign In or Register to comment.