Auditory Steady-State Response with OpenBCI

Hi All,

Continuing with my work with OpenBCI, I'm trying to see if I can get an Auditory Steady State Response from my brain via OpenBCI.  I'm seeing in the scientific literature that this is a technique that people are getting to work, so I figured that I'd give it a try.  It was fun!

Here is a post describing my setup and my results (with my beloved spectrograms!):


After my success with SSVEP, I thought that I could nail ASSR on the first try.  Sadly, I was not able to see any ASSR.  I guess that it'll take more experimentation.

Any suggestions?

Chip

Comments

  • yjyj France , Bordeaux
    Hello,

    have you tried to get in touch with the Korean team?
          E-mail address: [email protected]
    I am pretty sure that they would help you.

    They could send you some recording and you yours...

    When you compute the average spectrum, try a wider window, 10 seconds, the peak, if it exists, will be sharper and higher, all the 40Hz energy being in a narrow band.

      Yannick.
  • yjyj France , Bordeaux
    Oh I forgot , have you tried again since january , with sin modulation and all electrodes?
    yj.
  • I managed to get ASSR with OpenBCI off myself (my wife too :) ).
    The response matches reported results by others.
    The "trick" is to combine many epochs (I use 160) to cancel out the noise, since the raw SNR is extremely low (well below 0 dB).
    For that, you need a source that outputs a trigger. I use WAV Trigger, connected PLO output to OpenBCI through an optoisolator and modified the FW to include readings thereof in an Aux channel.
    I use OpenBCI GUI to record a raw file and then off to custom Matlab processing.
    I'm using dry electrodes from FRI (reference is at Cz).
    Results pass nicely both 95% and 99% confidence levels.
    Cheers,
  • wjcroftwjcroft Mount Shasta, CA
    @qwer1304, that is great and might help others who want to correlate from external triggering sources. Please consider posting your firmware mods / code on Github or doing a short writeup on the Community page.

    I went to the WAV Trigger site, cool little board, the writeup on the inventor is also amazing, he was a director of R&D for Walt Disney Imagineering,

    http://robertsonics.com/about-2/

    William


  • wjcroftwjcroft Mount Shasta, CA
    Today ran across this blog entry ASSR experiment using OpenBCI and various modulation schemes. Their statement is that by using synchronized 40 hz AM modulation of 3 different carrier waves (1000, 2000, and 4000 hz) -- more fibers are engaged at once; hence a stronger response.

    http://atlantsembedded.com/b/getting-started-auditory-steady-state-response-assr

    [posted on their blog 21 February 2016]

    William

  • edited March 2016
    William, thx for this.
    Several observations / comments:
    • there're no details on what signal processing was done on the recordings and what the graphs show (They show amplitude vs frequency, but amplitude of what is that? What kind of averaging was done, if at all? Etc)
    • the standard measure of response "strength" is magnitude-squared coherence (MSC) and its comparison to a critical value corresponding to a desired confidence level (e.g., 95%) - MSC_p. It is a standard result in statistics that an MSC of a single recording is 1, which is a meaningless result (coherence of a measurement of weight vs height from a single person is 1); therefore averaging over epochs in frequency domain is needed. It is surprising that with only 20 epochs (they call them "trials") they managed to get a decent SNR (which requires averaging in time domain, i.e. block averaging). It is also known that the more block averaging one does the higher MSC gets (since noise goes down), but the higher MSC_p becomes too (meaning that you need a higher result to convince it's not a fluke), so the reliability of the result is unclear.
    • It is nice that they have relatively long epochs (I use 500 msec stimuli with 1 sec inter-stimuli windows) since this gives good true frequency resolution (1/T).
    PS Good sources on MSC are:
    • "19890000-Analysis of Auditory Evoked Potentials by Magnitude-Squared Coherence", Dobie & Wilson
    • "19930518-Objective response detection in the frequency domain", Dobie & Wilson
    The formula for MSC_p is:
    MSC_p = 1 - alpha^(1/(EDoF-1)) = 1 - alpha^(2/(DoF-2)), where:
    alpha - significance level, alpha = 1-p
    DoF - degrees of freedom
    EDoF - effective degrees of freedom = DoF/2
    DoF = q * L
    q - number of averaged time-blocks
    L - number of frequencies in a band, if band-averaging is performed
    L should be adjusted if zero-padding in FFT analysis is employed
  • wjcroftwjcroft Mount Shasta, CA
    @qwer1304, thanks. I did email the authors of that blog post, asking that they checkout this thread and possibly comment here. I do feel like your triggered signal averaging approach has the best chance of success.
  • @wjcroft, @qwer1304

    Hello to both of you and thank for your interest in my article. Just to answer a few questions, the blog article is meant only as a getting started guide for ASSR. It is actually a summary of my first two weeks doing ASSR within this new lab I'm working in, and rather than seeing it only published within the intranet, I worked out a quick version for the internet. This should explain why the scientific rigorousness wasn't of prime importance here.

    Regarding the graph, the y-scale is the amplitude of the signal components in the frequency domain. I didn't bothered indicating this it is in uV. I'm plotting the absolute value of the complex terms obtained from the discrete Fourier transform. 

    I used trials instead of epoch, a professional deformation, but also because of the paradigm I'm using. We are developing a use for ASSR in which we aim a detecting the onset of the signal rather than establishing the statistical significance of the ASSR, per se. Therefore, our recording is made of a series of pulses, lasting 17 seconds, which each elicit ASSR. For each "trial", we compute the FFT over the 16 seconds that lie within 1 second of the onset and offset. We average all bins together to obtain the result reported.

    The reliability of our result is more established by the fact that we recorded this kind of response over 20 times in the last few weeks, although we are experiencing a few problems depending on the mindset of the subject (fatigue, motivation, etc...)

    On a side note, while I didn't went into the details, all the code, nicely commented, is available at the bottom of the post for anyone interested in the details. I only had to refrain from posting the datasets, since these are more sensitive type of data. Further, I can also add that I'm the subject in this experiment and it was later confirmed that I have very bad ears. My partner Alexis has much stronger ASSR than the one represented.

    While I wasn't fully aware of how to compute the statistics for the ASSR at the moment of the post. I can now say that we are more heading toward an F-ratio related method, although this is not a science experiment, but an application design approach. The validity of our study will be confirmed by our ability to detect online ASSR onset using machine learning scores rather than p-values. I can already say that this is looking pretty good for us.

    All the best,
    Fred
  • Hi Fred. Thx for the clarifications.
    I looked at the processing code and I see that you don't employ any averaging of the signal (I do see that you average the results over trials). I'm very much surprised at how high your SNR is compared to what I see and what others have reported.
    Raw SNR is usually well below 0 dB, which is why block averaging is required.
    Best,
    David
  • Hi David,

    Looking at the details you provided I can suggest one path of investigation.

    I used 20 epochs, but each of a duration of 16 seconds. With a sampling frequency of 250Hz, this means that I have a resolution of 250/4000 Hz. The higher the resolution, the more the ASSR signature gets focused on a single term and the more the noise power gets dispersed among many. The longer the recording, the higher the SNR. 

    I personally noticed an immediate improvement when I started increasing the length of my bins, to eventually converge to a 1 bin per trial analysis. At first, I was computing over many 1 second bins and the ASSR was almost inexistant, and this for the same dataset.

    I also began averaging over several electrodes recently (C3, Cz, C4), this increases the reliability of the signal, but slightly decreases the potential of using only the best one. Although I havent took the time to measure the amount of noise that gets filtered out...
  • Hi Fred,
    You wrote:
    "The higher the resolution, the more the ASSR signature gets focused on a single term and the more the noise power gets dispersed among many. The longer the recording, the higher the SNR. "
    Not so, IMHO. Increasing the length of a trial indeed increases the frequency resolution of fft (actually - DFT). But, assuming white noise, the noise spectral density is fixed (it's the variance), so this has no effect on SNR.
    Averaging in time-domain indeed lowers the noise and thus improves the SNR.
  • If the auditory stimulation is steady in frequency, shouldn't the auditory response also stay steady in frequency?  If will not be "noise" in the FFT.  It will be a tone that can fit in one bin.  So, as you get more and more bins (for a fixed sample rate), the bins get skinnier and skinnier and the one bin with the auditory response stands more proudly above the noise.  If the auditory response is stable in frequency (I don't know how true this is), doing a longer FFT should increase SNR.

    What doesn't work is to increase the number of points in your FFT simply by turning up the sample rate but keeping the recording time the same.  That will not increase the SNR because, while the FFT is longer, the bandwidth is also wider (because of the increased sample rate).  So, you do not end up getting this "same noise spread over more bins" benefit.

    Chip
  • After giving it more thought here's what I think:
    It is required to compare power of the signal rather than the psd.
    Assuming the response is stable in frequency and time, the signal power is fixed.
    But as the trial gets longer and accordingly the resolution gets higher (bin width gets smaller), the noise power gets smaller (since noise psd is fixed, but the bandwidth gets smaller). Hence, increasing the trial length should indeed increase the SNR.

  • Yes indeed. Sorry if I didn't made it clear. I didn't came with this by myself, I read it in one of the papers by Picton and Lins (most probably, 1998).

    The observation about sampling frequency is also true. All you get is a larger Nyquist frequency, hence you can capture higher frequencies content, but increasing the frequency doesn't improve your frequency resolution... Humbly: http://www.atlantsembedded.com/content/discrete-fourier-transform-part-1

    A slight detail, I read you referred to white noise. In the case of EEG, pink noise is actually a better model for background noise. From what I know the SNR generally decrease as you aim for higher frequencies. This would be true for natural systems. Although you shouldn't quote me on that, I haven't looked it up.
  • Yep, it's here. See caption of Figure 2.
  • Another thought / observation:
    It is an unavoidable fact that EEG recordings are riddled with artifacts that must be removed prior to processing.
    It is straightforward and easy to remove these by dropping (short) epochs that contain them when data is recorded as epochs.
    However, it is hard to remove artifacts from a long sweep because:
    • if the whole sweep is removed lots of good data is lost too and a lot of collecting effort is wasted
      (this is akin to why it's easy to make small LCD panels, but hard to make large ones)
    • it is incorrect to remove just a portion of a sweep since this affects the correctness of subsequent processing
    This is one reason for processing of data in (relatively) short segments (usually, Hanning windows).
    In that case averaging of epochs (segments) is the method for increasing the SNR.
Sign In or Register to comment.