Help with FFT of Bipolar EEG Montage in Matlab EEGLAB

Discussion in 'Programmer's Corner' started by HayWire, Dec 4, 2012.

  1. HayWire

    Thread Starter New Member

    Dec 3, 2012
    Hi all!

    I'd be very grateful if somebody would be willing to look over what I came up with via an amateur attempt to FFT and EEG file, to see if 'what I think I found' appears to valid to bring as questions to a neurologist. I've included screencaps of the FFT and electrode positions. I apologize in advance for anything I've overlooked - I have no science background, and I'm trying to muddle through this anyhow due to the medical urgency.


    Resting EEG (awake, non-sleep-deprived) was recorded in the hospital using Cadwell software. Patient is a 40 year old female experiencing intermittent strokelike symptoms. Hospital did visual inspection of EEG tracings, only to rule out epilepsy.

    I exported unscaled data from a Cadwell .EAS file to .EDF using Cadwell's free EEG Anywhere file reader off their website. Broke into two export files by montage. Imported both files into Matlab's freeware compiled version of EEGLAB, manually rejected the most obvious muscle artifact, and generated an FFT. (At least that's what I think I did... :D )

    I did not find a way to split out individual electrode signals to enable generation of scalp maps. I did not alter filter settings. I generated FFT of subsets of the data to determine which electrode pairings were represented by which colored line, as EEGLAB only seems to include seven color options, and does not label them with electrode pair labels.


    The principles I used to check for 'anything weird' on the EEG were that:
    - both sides of the brain should be doing sort of the same thing
    - 'alpha' frequencies (i.e. those between 8 and 13 Hz) are considered the normal 'idling rhythm' of the adult brain, so if there's a distinct peak on a line, it should be somewhere in there
    - nobody really knows what to make of brainwaves above 25 Hz, so I did not include them in the review
    - since activity was recorded bipolar, what's going on in any one spot of the brain can only be speculated upon by comparing the two electrode pairs that include a particular electrode, and then guesstimating the influence of the second electrode in the pair by looking at the second electrode's other complementary pairing
    - influence from heartbeat and stuff will add a lot of power at very low frequencies near the Y axis, without suggesting diffuse slowing of the brain
    - FFT samples showing in online Matlab EEG tutorials resemble the FFT for a 'normal' EEG


    The two electrode pairs encompassing T5 (also known as P7) were recording very different activity relative to the rest of the brain. Overall, at T5/P7, there was higher activity across all frequencies, with emphasis in the slower frequencies. Only the electrode pair that included O1 had a distinct peak, which I'm assuming was influence from the O1 electrode, based on comparison to the other O1 pairing.

    Power started to go back up for some electrode pairs moving into the higher frequencies (redirected upward around 13 or 17 Hz). Distribution of the signal power was wider than seen in Matlab tutorial samples, especially at and after the 'peak'. EEG analyzed was also at significantly lower overall power than Matlab tutorial sample.


    In the area of the T5/P7 electrode, the high volume of activity happening in the lower frequency ranges suggests 'slowing' in the area of the T5/P7 electrode relative to the rest of the brain. Since some of the symptoms active at the time included not being able to read clocks or maps, or do math, or do long reading, etc., and left parietal controls a lot of that, I'm wondering if the T5/P7 anomaly might shed some light on the cause of that.

    Most of brain seems to be idling at a normal alpha rhythm, between 11 and 12 Hz, with reasonable cross-hemispheric symmetry. However, the low overall power suggests diffuse non-epileptiform abnormality. I wonder if this helps explain why symptoms included pervasive experience of having a 'blank mind', without much active thought or feeling.

    I don't know what (if anything) to make of the fact that EEG has wider power distribution at higher frequencies.


    1. Do the assumptions and procedure appear valid / invalid?
    2. Any way to know likelihood that the FFT generated should be 'valid'?
    3. Do the observations appear to be valid? Is there a more accurate / scientific way to state them?
    4. Can anyone comment on whether the interpretation is appropriate?
    5. Can any other meaningful conclusions be drawn about the data in general, or specific to what one would expect to find in a 'normal' EEG?

    I'd be happy to email any files or provide the second montage if you'd like to take a look. Any help very much appreciated! :)
  2. MrChips


    Oct 2, 2009
    This is a Masters thesis. Yet you say you have no science background. You must be amazing.
    I did my MSc on FFT of EEG and I would have to say I'm not qualified to answer your questions.
    I also didn't have Matlab then.

    There is another member here on AAC with clinical experience.
    HayWire likes this.
  3. HayWire

    Thread Starter New Member

    Dec 3, 2012
    The ones who are really amazing are those who generously create web pages and videos and GUI EEG freeware online so that a humble poetry writing major can find her way to attempt something this cool :)

    After the original post, I manually checked to see where in either montage the dominant hemisphere showed lower amplitude than the non-dominant hemisphere. Mapped that out (attached) on the standard electrode positions along with the T5/P7 outlier and saw colored lines light up the two cerebral areas that showed up as abnormal on the MRI (which both of which correspond to the type of weird symptoms that are showing up...). Dunno if it was a coincidence, but for today it made me feel like I was getting closer to some kind of answer.

    Also corrected a mislabeled line on the original FFT I posted and reattached, and added the FFT for the other montage. The other montage seems messier, maybe because it had a lot more myoclonic artifact to pull out, and had the photic stimulation going too?

    Would still welcome any and all feedback on procedure, assumptions, observations, interpretation, or anything else folks here might be willing to share :)

    Thanks so much!