Showing posts with label Meditating. Show all posts
Showing posts with label Meditating. Show all posts

Thursday, January 2, 2014

Breathing Meditation - Alpha Coherence

In my previous post, I recorded EEG from a meditator and I saw that meditation seemed to lower the amplitude of his Alpha waves.  I think that it is interesting that I'm continuing to see objectively measurable changes in EEG in (apparent) response to meditating.  I'd like to dig in a little deeper, though.  In this post, I'd like to see how the Alpha waves in different parts of the head/brain relate to each other.  Are the Alpha waves synchronized ("coherent") across the head, or are they generated independently ("incoherent") in the different brain regions?  Also, does meditation have any effect on their synchronization or independence?  That's what I'm analyzing today.

Measuring Coherence:  I'm going to measure  the spectral coherence of the EEG signals to see which signals are synchronized with each other (if any).  Coherence is a comparison of two signals, so I'll be comparing pairs of EEG signals around the head.

Coherence Compares Amplitude and Phase:  Coherence looks at any changes in amplitude and in phase between the two signals.  For two signals whose amplitudes and phases change together, the coherence could reach up to a value of 1.0 (perfect coherence).  Or, if the amplitude and phase changes are completely independent, it is possible for the coherence to reach down to 0.0 (no coherence).

Coherence vs Frequency:  Coherence is computed in the frequency domain, which means that we can see which frequencies are coherent and which are not.  I'm most interested in what happens to this meditator's Alpha waves (which we saw were centered on 11.7 Hz), so I'll be mainly looking at the coherence around that frequency.

Baseline Coherence:  Let's start by looking at the coherence during the meditator's baseline recording.  This is when he was sitting with his eyes closed and relaxing -- but not meditating.  The figure below shows the coherence for different pairs of EEG electrodes around his head.  Blue is low coherence (0.0) and red is high coherence (1.0).  Again, I'm looking at the figures mostly around the Alpha waves (10-12 Hz).

Mean-Squared Coherence For EEG Signals Recorded with Eyes-Closed But Not Meditating.
Click to Enlarge.

Looking at his Alpha wave frequencies, I see that his Alpha are coherent on back-left side of his brain (between electrodes 5 and 7) and on the back-right side of his brain (between electrodes 6 and 8).  I think that it is interesting that the Alpha waves are not coherent between the left and right sides (between electrodes 7 and 8).  These three findings suggest that the back-left region of his brain is working as a unit (at these frequencies), that the back-right region of his brain is working as a unit, but that the left and right Alpha waves are being generated independently.  Again, this is when he is simply relaxing with his eyes closed.

Coherence While Meditating:  Below is a figure showing the results during meditation.  The color scale is the same as for the plots above for the baseline recording.  In this new figure, note the Alpha coherence on the back-right (electrodes 6 and 8) is still present but that the Alpha coherence on the back-left (electrodes 5 and 7) is now gone!  This suggests to me that the meditation has somehow decoupled the brain centers on the back-left of his brain.  Whoa.  Cool.

Mean-Squared Coherence For EEG Signals Recorded During Eyes-Closed Meditation.
Click to Enlarge.

Quantifying the Change in Coherence:  To make this change in coherence more clear, I collapsed these complicated spectrogram-like plots into a simple plot of coherence versus frequency.  The simpler plots are shown below.  This plot only includes data during the eyes-closed portion of each test.  Because we should really only look at the coherence at frequencies where there is appreciable signal energy (and we should ignore other frequencies), I've highlighted the region of the Alpha waves (the only signal that is consistently present during these recordings) by using thicker lines.

Comparing the Average Coherence Just When the Eyes Are Closed.
The thicker lines highlight the Alpha wave frequencies.
On the left, you see the average coherence when he was relaxing but not meditating.  On the right you see the average coherence when he was meditating.  Note that the red trace (the back-left of the head), clearly drops from a coherence of about 0.9 to a coherence of about 0.7.  Very clear.  Also, unnoticed before, the blue trace shows that the coherence between the left and right (electrodes 8 and 7) drops from about 0,7 down to about 0.5.  This plot clearly suggests that the back-left of the brain was acting more independently during meditation.

Discussion:  In the previous post, we saw Alpha waves throughout the back half of his head.  It would be easy to assume that we were seeing the same Alpha wave throughout the back of his head.  Today's analysis has shown that this is not the case.  When merely relaxing, the coherence measurement suggests that the back-left and the back-right parts of his brain are generating their own Alpha rhythms independently of each other.  When meditating, it looks like the back-left part of his brain further subdivides.  Why?  I don't know.  To what effect?  I don't know.  Is it a good thing or bad thing?  I don't know.  All I know is that it is really cool to be able to objectively measure changes in brain activity due to conscious control.

Next Steps:  I'm thinking that I now want to go back and measure the coherence of the signals that we recorded from the meditator at Maker Faire.  I'm pretty sure that my two meditators were using different meditative techniques, so it would be interesting to see if the changes in coherence are the same or different between the two meditators.  It would also be interesting to repeat these recordings to see if the changes are consistent between meditation sessions.  Finally, these coherence results simply show that the signals became more independent.  It doesn't actually tell me which specific properties of the signals (amplitude?  phase?) became different.  It would be cool to see which aspects of the signals changed due to meditation.  The brain sure is a dark and mysterious place!

Follow-Up: The coherence pattern seen above when not meditating has been confirmed in data from another non-meditating friend.

Monday, December 30, 2013

Breathing Meditation - Alpha Amplitude

It turns out that my previous post on EEG and meditation was surprisingly popular.  The post even got one of my friends interested enough that he, too, wanted to see what happened to his EEG signals while he was meditating.  So, we hooked him up to one of my OpenBCI boards and took some measurements!  Here's the story of what we found together.

My second willing meditator.
(And the blue cap returns!)

Goal:  My goal with these recordings is simply to see if meditation has a measurable effect (any effect) on one's EEG signals.  I'm trying understand if a particular form of mental activity (ie, meditation) can be measured objectively.

Setup:  For this set of recordings, we decided to go the Full Monty and bring out the blue EEG cap (see photo above).  This was the same cap as used with the previous meditator.  We got the cap as part of a kit that we bought from Biopac.  Our cap has lots of electrodes.  We chose to use the eight electrode locations shown below.  Our reference electrode was towards the front of the head along the centerline (near FPz/AFz) and our driven ground (aka "bias") was attached behind the right ear (right mastoid).  We used the electrode gel that came with the kit from Biopac.  For data logging software, we used the OpenBCI GUI that was written in Processing.

Electrode locations used for these recordings.
Fp1, Fp2, C3, C4, P7, P8, O1, O2.
Reference electrode was near Fpz.
Driven ground ("bias") was the right mastoid.

Two Test Scenarios:  My meditating friend performed two sets of recordings: one while meditating and one while simply relaxing.  The non-meditating data will act as a baseline against which we compare the meditating data.  Note that the two recordings were done in back-to-back sessions without removing the electrode cap.

Test Procedure:  Both session started with an initial period with his eyes opened followed a long period with his eyes closed.  It is during this eyes-closed period where he was either meditating, or he was simply relaxing but not meditating.  When he is meditating, my friend's meditation style is breathing meditation, where he focuses solely on his breathing and on his body's response to his breathing.

Example Results:  Example data from his baseline recording session is shown in the spectrogram below.  This data is from an electrode on the back of his head (channel 7, which is at O1).  In this figure, you can see that once he closes his eyes, he exhibits a strong EEG signal around 10-12 Hz, which is in the Alpha band.  This eyes-closed Alpha rhythm is a very typical EEG pattern.  In this recording, there is also a faint signal between 20-25 Hz, which is simply a harmonic of the fundamental 10-12 Hz Alpha wave.  Overall, this Alpha-dominated signal seems to be very consistent with most other eyes-closed data that we've recorded from other individuals (including myself).

Example EEG data recorded during the baseline (ie, not meditating) session.  This is from the back of his head.  The horizontal stripe of signal energy is around 10-12 Hz, which is in the Alpha band.  Alpha waves are indeed commonly seen when one's eyes are closed.

Full Baseline Results:  The plot above shows data from just from one location on the head.  The figure below, by contrast, shows all eight channels of EEG data that we recorded.  It gives a fuller picture of what is happening during the baseline (non-meditating) recording session.  Like in the single example above, the plot below shows that many of the electrodes pick up the steady Alpha rhythm when he closes his eyes.  You can see, though, that the Alpha rhythm is much stronger in the back of the head than in the front.  Since this eyes-closed "posterior dominant rhythm" originates in the now-idled visual cortex (which is the back of the brain), the fact that the Alpha waves are strongest in the back of the head and weakest in the front is exactly what we would expect to see.

EEG data recorded while relaxing but not meditating.  Notice that the Alpha waves (the horizontal stripe of energy in each plot) are strongest towards the back of the head.  Click on the figure to enlarge.

EEG Data While Meditating:  Now we get to the good stuff.  Now we turn our attention to the data recorded while my friend was meditating.  The figure below shows the data recorded while he was meditating.  The meditating began when he closed his eyes, so I've limited my examination just to the eyes-closed data.  Clearly, the dominant feature is that horizontal stripe of energy in the 10-12 Hz band representing the eyes-closed Alpha rhythm.  This is the same kind of signal that we saw when he was not meditating.  So, to first glance, meditating does not have an obvious effect on his brain waves.  For example, it did not make the Alpha waves disappear nor did it make any new signals appear.  If there are any changes due to meditating, the changes must be subtle.

EEG Data recorded while meditating by focusing on his breathing.  Alpha waves still dominate.  Click on the figure to enlarge.

Change in Alpha Amplitude:  Comparing these two figures more closely, one change that I do see is that the intensity of the Alpha waves appears to decrease when he is meditating.  Because this change in amplitude is difficult to see quantitatively in the spectrograms, I replotted the data as basic spectrum plots, as shown below.  In these new plots, I've included just the eyes-closed data.  These new plots clearly show that the dominant EEG energy is between 10-13 Hz, which are the Alpha waves.  We see that the Alpha waves in both the baseline and meditating recordings are centered around 11.72 Hz, so meditating did not change the speed of his Alpha waves.  We do see, however, that the amplitude of these Alpha waves are smaller when meditating.  In fact, we see that the amplitude is cut nearly in half (6.1 uVrms down to 3.6 uVrms).  That's a pretty big change!  While we cannot yet be sure that change was caused by the meditation (repeated tests would be necessary to confirm a cause and effect relationship), this data is highly intriguing and begs for additional recordings.  This is cool.

Amplitude of the EEG signals recorded  when his eyes were closed during the baseline test (left figure) and during the meditation test (right figure).  As can be seen, the strongest signals are between 10-13 Hz, which are Alpha waves.  His Alpha are centered on 11.72 Hz.  You can see that the amplitude of his Alpha decreases while he is meditating.

Comparison of Alpha to the Meditator at Maker Faire:  Looking at my previous post for the meditator at Maker Faire, we saw that the previous mediator had very different brain patterns than seen above.  First, the meditator at Maker Faire showed no Alpha waves at all.  None.  While most people do exhibit Alpha when the eyes are closed, eyes-closed Alpha is not universal.  So, it is possible that the meditator at Maker Faire is simply one of those individuals who does not exhibit eyes-closed Alpha.  Or, as an alternate conjecture, perhaps the act of meditation suppresses Alpha waves.  Perhaps our highly-experienced meditator at Maker Faire completely suppressed his Alpha response, whereas the novice meditator shown above only showed moderate suppression of his Alpha response.  Again, we have insufficient data to make any real conclusions, but this is very intriguing.

Comparison of Beta Waves to Meditator at Maker Faire:  Another key finding from the meditator at Maker Faire was that his meditation seemed to generate EEG activity in the 15-20 Hz band, which are the low-end Beta frequency range.  His generation of Beta waves is in contrast to the novice meditator shown here, who showed no change in Beta activity.  Perhaps the lack of Beta activity is due to his inexperience, or perhaps it is due to a difference in the type of meditation.  As discussed in the Travis paper linked previosuly, different types of meditation are known to correlate with different EEG responses just as different types of mental activity can generate activity in different EEG frequency bands.  So, perhaps the Maker Faire meditator was performing a "focused attention" style of meditation (which is associated with increased Beta) whereas today's meditator was more of an "open awareness" style  of meditation (which is not associated with Beta).  I am not properly educated in the different styles of meditation, so I really should not comment on this further.  Perhaps it would be best to get the individual meditators themselves to describe their own meditation style relative to the criteria defined in the Travis paper.  That would probably be the best approach.

Conclusions:  With only a single pair of recordings from a single individual from a single sitting, we cannot draw any solid conclusions.  What we can say is that we happened to see a decrease in the amplitude of the alpha waves in the back of the head during meditation.  If this change is actually due to the meditation, it shows that the meditation is indeed having measurable changes on brain activity.  I have no idea whether changing the amplitude of the Alpha rhythm is a good or bad thing...I just think that it is interesting that we can measure any change at all.  I would love to be able to confirm this finding or to see it in other people.

Next Steps:  This has been a very basic analysis of the EEG data that we recorded.  For example, in quantifying the amplitude of the Alpha waves, I simply looked at each EEG channel in isolation from the others.  Sure, I noted that the Alpha were strongest in the back, but I did not look at any more subtle changes with how the different channels correlate with each other.  It is possible that the act of meditation brings different regions of the brain into concert with each other.  Or, maybe meditation does the opposite and causes different regions of the brain to become decoupled from each other.  Either way, some sort of quantitative analysis of the correlation between the different EEG channels might expose additional changes in brain patterns due to meditation.  I would find this kind of change to be very interesting.   I don't know what it would mean, but I would find it interesting.  So, I guess that I'm saying that I am not yet done with this particular set of EEG data.  I will pursue some kind of cross-channel analysis in my next post.

Until then, thanks for reading!

Follow-Up: Here is the analysis of the cross-channel coherence.  Cool!
Follow-Up: The raw data is available as part of the OpenBCI repository on GitHub

Tuesday, December 17, 2013

EEG While Meditating

Way back in September, I was with the OpenBCI folks at Maker Faire NYC showing off our very first OpenBCI prototype.  I was there wearing my bright blue EEG cap doing live demos of my brain waves.  It was fun.  On day 2, however, there was a guy who came up and demanded (politely) that he wear the EEG cap.  Given how long it takes to setup the cap correctly (with all the EEG gel and whatnot), I tried to decline his request.  But he persisted.  He told me that he was a meditator and that he needed to know if anything was actually happening in his brain when he was meditating.  Wow, you got me hooked me.  Let's do it!

Non-Meditating:  First, just so we all recognize what a normal, messy EEG recording looks like, check out the graphs below.  These are spectrograms of EEG signals recorded from my head using OpenBCI V1 and an EEG cap with tin electrodes.  The top plot is from the front of my head (Fp1-Fz) and the bottom plot is from the back-left area of my head (I think that its actually T5-Fz).  Note that both signals are highly corrupted by low-frequency artifacts from blinking my eyes.  Otherwise note that, when my eyes are closed, I show a nice signal ~10 Hz in the back of my head.  This is the classic posterior dominant rhythm that occurs in the Alpha band.  Notice that, besides the alpha and besides the eye blink, there is not much structure anywhere else in plots...it mostly just looks like messy noise.  Fine.

My EEG With My Eyes Open and Closed (No Meditating).
The arrows point to alpha waves that are commonly seen when one's eyes are closed.

Meditating:  So, now we turn to the data from my meditating friend.  The spectrograms below show data that we recorded from him using the same OpenBCI board and the same blue EEG cap.  In these plots, my friend was already meditating by the time I started to record the data.  So, to the left of the vertical line, this is data when his eyes were closed and he was meditating.  To the right of the line, he was not meditating and his eyes were open and closed at various times.  I find this data to be quite impressive.  Notice that there is clearly a band of signal energy between 15-20 Hz while he is meditating.  In the second half of the data, where his eyes are closed, there is maybe some of that 15-20 Hz signal, but it isn't nearly as strong as during the meditation.  I think that it is very cool that we appear to be seeing a physical (well, electrical) effect in his brain due to meditation.  Additionally, note also that he shows no alpha waves (nothing around 10 Hz) when his eyes are closed.   Is the meditation suppressing his posterior dominant rhythm, or does he just not exhibit one?  I don't know, but it's cool.

EEG recorded from a meditator.  Left of the line, he is meditating.  Right of the line, he is not.
Notice the signal energy between 15-20 Hz (and the absence of alpha waves) when he is meditating.

What Does It All Mean?  I make no claims regarding meditation being good or bad.  I make no claims regarding EEG signal energy in the 15-20 Hz band being good or bad.  All I know is that we can measure changes in his brain waves and that they appear to be due to him meditating.  That's really cool to me.

More Learning:  Via email, I showed this data to with my meditating friend.  He sent me back an outstanding link that was a survey of different schools of meditation and their relationship to changes in measured EEG. If you're into that kind of thing, it makes for fascinating reading:

Travis, F., & Shear, J. "Focused attention, open monitoring and automatic self-transcending: Categories to organize meditations from Vedic, Buddhist and Chinese traditions." Consciousness and Cognition (2010)
http://www.koepnick.de/Three%20Typs%20of%20Meditation.pdf

Have any of you recorded your brain waves while meditating?  What did you find?  Let me know!

Follow-Up: I recorded another meditator.  Check out his data here!