SSVEP experiment, no FFT peaks found

Marcus78Marcus78 Michigan
edited September 2021 in General Discussion

Hello everyone,
I am currently working with EEG data acquired during an SSVEP experiment. I am still relatively new to the BCI domain, so I do not have a lot of experience yet. I am trying to determine what frequency was used for the flickering for each of the trials that was done. But for some reason I can not recognize the prominent peaks in the frequency domain. I preprocessed the data by doing ICA to remove eye blinks and also applied a bandpass filter to only keep frequencies between 5 and 48 Hz.
This is the unfiltered signal (from electrode Oz) :

And this one is the signal (same trial and same electrode Oz) for which I applied the preprocessing steps as described above:

Could you tell me what I am doing wrong here? I should be able to identify from the plot what the flickering frequency was. The sampling frequency is 256 and I only plotted the first 200 frequencies.
I hope you can give advice.
Thanks a lot.

Comments

  • retiututretiutut Louisiana, USA
    edited September 2021

    If you're trying to do this manually it would help to lower the X axis limit to 50Hz or 75Hz. Next, it would be best to know what the SSVEP frequency being used was, rather than having us (and maybe you) trying to guess. Eye blinks as an EMG artifact will generally not show in Oz, though other movement artifacts and excessive hair can limit the signal quality.

    The extreme amplitude in the lower Hz could also indicate other artifacts.

  • I had the limit of 200 Hz on the X axis, as I thought this may help to identify the SSVEP frequency because of the harmonics that may show? But okay I changed it:
    This is the unfiltered signal in frequency domain when lowering the X axis:

    This in the filtered signal in frequency domain when lowering the X axis:

    And this is the filtered signal before transforming to frequency domain:

    What other kinds of artifacts could be present? Maybe the 50 Hz alternating current noise?

  • wjcroftwjcroft Mount Shasta, CA

    Richard, thanks.

    Marcus, please look over some of these related posts. The timing accuracy of your screen flicker has a number of subtleties that must be addressed. The first link shows some calibration and accuracy tests that can be done with a photodiode.

    https://openbci.com/forum/index.php?p=/discussion/3052/not-getting-expected-results-from-vep-visual-stimuli-eeg-data-resolved

    https://www.google.com/search?as_q=ssvep+timing&as_sitesearch=openbci.com

    Regards, William

  • Hello William,
    unfortunately I can not rerun the experiment anymore. I think there should not be any problems that occurred during the process of the experiment. So my only question at this point would be if there is any advice that you could give in terms of how I can determine the SSVEP frequency that was used, given the data that I have. I am assuming I may have to do additional preprocessing steps to better be able to infer the SSVEP frequency from the plots?

  • wjcroftwjcroft Mount Shasta, CA

    Hi Marcus,

    I think there should not be any problems that occurred during the process of the experiment.

    Hmm. So, wondering if you read any of the links I gave. The most likely reason that you are not seeing peaks in the FFT corresponding to your stimulation frequency -- is that the screen flash frequency had noise (or 'jitter') in the stability of the frequency. Thus no distinct peaks are showing up in the FFT. Any 'peak' wobbled back and forth in frequency, and was thus lost in the noise.

    I am assuming I may have to do additional preprocessing steps to better be able to infer the SSVEP frequency from the plots?

    Umm, no, unlikely. If the stimulation flashing was unstable in frequency, there would be no way to remove that randomness by 'preprocessing'. I suggest you try to rerun your experiment, following some of the guidelines given in the links. As you can see by the second link, several other experimenters have had similar randomness in their screen flash stimulation. The only solution is to remove the randomness.

    Regards, William

  • edited September 2021

    Marcus,
    FFT of a signal that has a noisy signal at X hertz is going to show peaks at 2X, 3X, and 4X hertz because there is, possibly, a slight pattern to the noise which may make the troughs between the peaks larger, or the front third of every third peak larger, et cetera.

    The occipital cortex starts to get flicker fusion by 25 to 30 hertz so there is no point in looking higher than 30 for a signal caused by anything above about 20 hertz since it will be small enough to be overwhelmed by the native occipital alpha rhythm.

    I think it is clear which peak is the "real" one you should decide upon-- it is the max of the FFT below 20.

  • little_snowlittle_snow little_snow

    I have also encountered the same problem. The frequency of SSVEP data collected is completely incorrect, and the collected data seems to have some issues, as shown in the figure. Each interval data is the same. What is the reason for this abnormality in the data.

  • wjcroftwjcroft Mount Shasta, CA
    edited August 16

    Hi @little_snow,

    Did you read some of the previous comments in this thread? In order for SSVEP timing to work, your stimulation source must be extremely accurate. Not all video monitors can provide this. Earlier comments have tests you can run to quantify your monitor frame rate and stimulation rate stability.

    In terms of the photo you gave, what is the source? I see that there are alternating patterns with 8 channels relatively 'RAILED' in magnitude or no/bad electrode connections. And the other groups of 8 channels showing more typical data. Note that all users of the Cyton data stream, must apply pre-filtering. This removes the DC offset and mains noise. Typical filters might be a bandpass from say .5 Hz to 45 Hz, and a notch at your mains frequency. The recordings / data stream from the Cyton is RAW data with no filters applied. DC bias is explained here:

    https://openbci.com/forum/index.php?p=/discussion/201/large-millivolt-data-values-fbeeg-full-band-eeg

    If you want to see a working example of cVEP (code based VEP), see this recent tutorial.

    https://openbci.com/forum/index.php?p=/discussion/3894/new-mindaffect-eeg-cvep-bci-robot-control-tutorial-by-pyotr-vozniak

    Again, that page shows that pretests can validate your monitor stimulation setup as providing adequate stability.

    William

  • little_snowlittle_snow little_snow
    edited August 16

    The device I am using is a Cyton board, I use 8 channels which adopts dry electrode acquisition. How to reduce lead resistance, and the electrode connection I am using is shown in the figure. Does it have an impact on the collected data? thank you.

    "And the other groups of 8 channels showing more typical data". What does' more typical data 'refer to? Can you explain it in detail? Thank you.

  • little_snowlittle_snow little_snow
    edited August 16

    This is the dry electrode I am using.

  • wjcroftwjcroft Mount Shasta, CA

    If you examined the cVEP link I gave above, you can see that MindAffect cVEP BCI uses similar 'dry' comb electrodes, but with a tiny coiled up absorbent (sponge-like) material inside the combs. This is because MindAffect research group has found that 'passive' dry electrodes alone do not provide enough signal strength for reliable VEP detection. The small amount of water on the skin surface substantially increases the VEP signal amplitude. Leading to better detection of the cVEP pseudo random sequences.

    Your first photo shows an Ultracortex electrode with a moderately worn wire connection. As long as the wire is still attached, it will not have much impact on the signal. Because copper wire is such an excellent conductor. As the Ultracortex operation instructions suggest, it is best to unplug before doing substantial twists on any given electrode. This reduces wear on the wires. If you have electrodes that have broken the wire or need replacement, email to customer support (contact at openbci.com) for ordering.

    I am still unclear on the initial screenshot of the spreadsheet you show on your August 15 comment. It 'looks like' you have 16 channels (the Cyton+Daisy) and are only using a subset of the 16 channels. You have likely turned off the other channels, and this is why they display the '187500' values.

  • little_snowlittle_snow little_snow
    edited August 17

    Hello, the device I purchased is the Cyton+Daisy, but I only used the Cyton board and cropped the raw data obtained, retaining only eight channels of data. This is the data shown in my picture now. I would like to know what caused this situation so that I can improve my experimental process. Meanwhile, these data are raw data without any processing, collected directly through Python Brianflow. thank you.

  • wjcroftwjcroft Mount Shasta, CA

    Your screen shot above (August 15) clearly shows a data stream containing 16 channels, not 8 . The appearance is that the Cyton mainboard 8 channels are alternating with the 8 Daisy channels. Or vice versa. If you study the SDK docs this is how the channels appear over the air, alternating mainboard and Daisy, eight at a time.

    https://docs.openbci.com/Cyton/CytonDataFormat/#16-channel-data-with-daisy-mdule

    So I'm not clear on the processing you did before we see your screen shot. If you are not using the Daisy, you can just unplug it from the main board (carefully). The screen shot seems to imply that you switched off some number of channels; these appear with the unusual '187500' values.

  • little_snowlittle_snow little_snow
    edited August 17

    I really want to know how you found out from the screenshot that I am using 16 channels? I obtained the data using BrainFlow in Python, and there is a line of code that sets up the Cyton board. Isn't the setting of the code 'board_id=BoardIds. CYTON-BOARD. value' 8 channels? I unplug it from the main board (carefully),Will it solve this problem? Is it correct for me to understand that this board must be physically removed and cannot be set?

  • wjcroftwjcroft Mount Shasta, CA

    re: 16 channels

    The spreadsheet screen shot shows alternating groups of 8 channels. 8 + 8 = 16. This is probably some kind of misbehavior caused by your wrong selection of the board type.

    re: force setting board ID of 'Cyton + Daisy' to 'Cyton'

    Well you have proved that this does not work. The main reason is that the firmware detects the presence of the Daisy, and conditions all of its operation on that fact. The firmware DOES NOT 'receive' the board type from Brainflow. The board type setting function only conditions Brainflow to accept the correct radio packets.

  • little_snowlittle_snow little_snow
    edited August 18

    Thank you very much for answering my question. It has been a great help to me. There is another question that I need to confirm with you. If I use the openbci GUI to obtain data and select 8 channels in the settings, will this problem not occur. Thank you again for your help.

  • wjcroftwjcroft Mount Shasta, CA

    Didn't we already agree that your issue was the mismatch between the firmware (detecting the Daisy) and the 'board mode' you chose with Brainflow (Cyton, no Daisy)?

    Since the GUI uses the same Brainflow library, it would produce the same result if you create a mismatch between the hardware configuration, and the type of device selected.

  • little_snowlittle_snow little_snow

    I would like to consult with you about a new question. Currently, I have two types of electrodes available for collecting electroencephalogram (EEG) data, as shown in Figure 1 and Figure 2. If you want to collect SSVEP data, which electrode is more effective? Can the second electrode simply press these two things together? Don't you need any additional accessories? Looking forward to your reply, thank you.

    @wjcroft said:
    Didn't we already agree that your issue was the mismatch between the firmware (detecting the Daisy) and the 'board mode' you chose with Brainflow (Cyton, no Daisy)?

    Since the GUI uses the same Brainflow library, it would produce the same result if you create a mismatch between the hardware configuration, and the type of device selected.

  • wjcroftwjcroft Mount Shasta, CA

    The image you loaded above uses EIGHT MEGABYTES on our file server. PLEASE try to limit the images to a less than couple megs by lowering resolution before uploading.

    Did you view the cVEP (MindAffect) tutorial link posted earlier (by Pyotr Vosniak)? Best cVEP or SSVEP signal amplitude requires some skin moistness. This is done in the tutorial by coiling an absorbent material such as flat foam strip, into the combs. Silver chloride electrodes generally give similar results, regardless of manufacturer. But moist electrodes are recommended by MindAffect. The second electrode shown is used in a velcro headband.

    https://shop.openbci.com/products/openbci-eeg-headband-kit

    Headband material is Velcro One-Wrap, with holes punched, You can make your own. You can also make chin or top straps of the same material.

    https://www.amazon.com/VELCRO-Brand-ONE-WRAP-Double-Sided-Multi-Purpose/dp/B000078CUB

Sign In or Register to comment.