Mar 292017
 

An interesting feature of Power Spectral Density (PSD) graphs of EEG recordings is the peaks that sometimes appear in the spectrum. Below are two examples of spectra with peaks:

PSD lb S23

In both graphs, we note that power density varied across the beta band, manifesting itself as peaks. In the upper graph there is a double peak near the top of the beta band, around 28-30 Hz. In the lower graph, there is an additional peak near 17 Hz, as well as a strong peak near the boundary of the theta and alpha bands (about 8.5 Hz). Using only the absolute mean power across either the theta or alpha bands would not have done justice to the size of this peak.

While the best way to capture the significance of the peaks would be to mathematically integrate the Power Spectral Density over the width of the peak, this could be a challenging undertaking. I chose instead to do a semi-quantitative analysis using visual inspection of each PSD graph, along with a graphical key to assign a score from 0 to 3 indicating the “prominence” of the peak. A score of zero means that there is no peak, a score of 3 indicates a very strong peak and scores 1 and 2 correspond to intermediate conditions. The key was built using screenshots of PSD graphs from the sample.

Key for scoring alpha and beta peaks:

key for scoring peaks

Alpha peaks consistently appeared around 7-12 Hz. The beta peaks I was interested in were near the top of the beta band 26-32 Hz. I scored each graph and plotted the values for beta (front sensors) and alpha (back sensors) vs hours of meditation experience:

peak beta lf vs hrs peak beta rf vs hrs

 

peak alpha lb vs hrs peak alpha rb vs hrs

While these plots suggest that the most prominent peaks (score=3) occur for practitioners with several thousand hours of meditation experience, they show that less prominent peaks can also be associated with extensive meditation practice.

This part of the investigation suggests that prominent (scored as 3) beta peaks in the front and alpha peaks in the back appear among more experienced practitioners but not among novices. On the other hand, there are also experienced meditators who do not show the prominent peaks. So we cannot say that we have found a definitive ‘signature’ of zazen meditation.

Mar 052017
 

A young meditation practitioner (26-year-old, female) joined the September 2016 7-day sesshin at Tahoma Monastery. She had some previous meditation experience, but this was her first time training with Shodo Harada Roshi. Her brainwaves were recorded once while not meditating, and on three occasions while doing zazen. Between September and February, she averaged 4 hrs/day of meditation practice. Recordings were made on:

Sep 7, 2016 – sitting quietly, but not meditating
Sep 7, 2016 – zazen before September osesshin (~600 hours previous meditation experience)
Sep 17, 2016 – zazen after September osesshin (~50 hours additional meditation)
Feb 22, 2017 – zazen after February osesshin (~1300 accumulated hours of meditation experience)

The following features stand out:

  1. Peaks in the alpha band, recorded at the left rear electrode (TP9) grow stronger with each subsequent zazen period. While not evident in the recording of the non-meditative condition, these peaks appear more pronounced in each successive meditation recording.
  2. The frequency of eye blinks while meditating is much less than when not meditating. In addition, there seems to be a trend of decreasing eye blink frequency with greater meditation experience.
  3. At the front sensors (FP1 and FP2) there seems to be growing power in the higher frequency (beta and gamma) bands relative to a lower frequency band (theta) with greater meditation experience.

Peaks in the alpha band become more prominent with zazen practice

First, let us examine the Power Spectral Density charts at the left back sensor (TP9) .

When subject is not meditating, there is no significant peak in the alpha band.

In the first recording, subjects were instructed to meditate for 20 minutes, then to stop meditating for 5 more minutes. When asked if she was able to NOT meditate during the final five minutes, the subject said,

“I think so. I was just trying to think really fast about anything, about things I was trying to remember, to remember things, to recall. And then the whole time I was just making stuff up.”

Small peaks are visible in the alpha band during zazen meditation (before osesshin)

At the end of the period, the subject remarks,

“That was really hard. It made me nervous.”

 

The next recording was made a week later, at the end of osesshin.

Alpha peaks begin to appear after the osesshin.

Investigator: Have you noticed a change in the quality of your meditation during week?

Subject: Definitely. Completely. I feel like I kind of earned how to meditate, actually. I don’t know. It’s not like I haven’t done it before. But now it’s starting to click now.

Investigator: Was there a kind of a key idea you that you used, or a technique you adjusted to do it?

Subject: Learning how to relax.

Investigator: How to relax?

Subject: Yeah. That’s really hard for me.

The final recording was made 5 months later after a second osesshin. The subject had practiced meditation about 4 hours per day in the intervening time.

Two distinctive peaks appear in the alpha band (5 months after the previous recording).

Investigator: How has this sesshin been going for you?

Subject: It’s been going up and down.

Investigator: How about this particular sitting right now?

Subject: I couldn’t really get into the breathing like I wanted. I couldn’t fully relax. Physically, sitting is still hard for me.

Investigator: So with your breathing, what were you aiming for?

Subject: Comfortable. Something more round. Sort of, that doesn’t feel so forced.

Investigator: But you weren’t finding that in is this round?

Subject: I didn’t really sink into it, but it wasn’t terrible.

Note that there are two distinct peaks two peaks in the alpha band as opposed to just one seen in most other subjects.The significance of this is unknown.

Similar results were obtained for the right back sensor (TP10) :

No alpha peak for the non-meditating condition.

 

Slight alpha peak during zazen meditation.

 

Small peaks in the alpha band during zazen (after sesshin).

 

Pair of clear alpha peaks after the February 2017 osesshin.

Eye blinks become less frequent with meditation practice

The Muse headband automatically records eye blinks. Eye blinks were anti-correlated with meditation–that is, the stronger a person’s meditation focus, the less frequently they blink their eyes. Below are the results for the present practitioner, subject S23:

Frequent eye blinking when not meditating.

 

Less frequent eye blinks when doing zazen (same recording as above).

 

After the September osesshin, eye blinking is substantially reduced.

 

After the February osesshin, eye blinking has nearly ceased.

Higher frequency bands develop greater power relative to lower frequency bands with greater meditation experience

Radar charts of relative band power for each of the four recordings suggested that higher frequency bands began to dominate lower frequency bands on successive recordings of meditation, after a week-long osesshin and then again after a second osesshin five months later.

Delta frequency appears to predominate, but this probably due to frequent eye blinking (see spectrogram below).

Higher frequencies (gamma and beta) appear at left front electrode (FP1).

Greater power of beta and gamma in frontal region compared to rear.

Beta and Gamma frequencies predominate.

Frequent blinking masquerades as a delta band signal as can be seen in the correlation between the low frequency patches (below 4 Hz) in yellow-orange of the spectrogram below on which the eye blink signal has been superimposed.

Eye blinks result in registering low-frequency (delta) oscillations so were therefore ignored in the subsequent analysis. See also the post, Sleuthing a delta wave mystery.

To get a better handle on the increase in high frequency oscillations with greater practice, we defined a new parameter which represents the ratio between a stand-in for high frequency (beta power) and a stand-in for low frequency (theta power). Values were normalized to be positive. Results are given below.

Ratio of beta to theta power when not meditating

Ratio of beta to theta power during zazen before first osesshin

Ratio of beta to theta power during zazen after the first osesshin

Ratio of beta to theta power during zazen after the second osesshin five months later

The ratio of beta to theta power seems to support the hypothesis of increasing high frequency oscillations in the frontal area with greater zazen practice.

Jan 272016
 

Alpha waves are generally defined as neural oscillations in the range of 7.5 Hz to 12.5 Hz. They represent the strongest electrical signals on the scalp and were first discovered by German neurologist Hans Berger in 1924). Alpha waves originate in the occipital lobe (back of the head). They are especially prominent during a state of relaxation with the eyes closed.

Due to their characteristically high power, alpha waves are the easiest EEG signals to pick up.

In order to determine the precise frequency of alpha waves as well as other neural oscillations, we implemented Power Spectral Distribution (PSD) graphs. These graphs plot the spectrum of a given EEG signal, i.e., the intensity of the signal (Db/Hz) vs. its frequency (Hz). The y-axis is logarithmic with a range from 0.1 to 100 and the x-axis is linear in frequency.

The example below shows the spectrum of the signal from the left back sensor (TP9) during a four-minute period of zazen (counting the breath).

PSD lb

The tip of the most pronounced peak falls at 8.18 Hz, at the bottom end of the alpha band.

The alpha peak is apparent in all four sensors, most prominently in the left back (TP9) sensor but also in the right back (TP10), and the sensors left front (FP1) and right front (FP2), as seen below.

 PSD lf  PSD rf
 PSD lb  PSD rb

Note that the alpha rhythm is stronger in the region near the ears (lb, rb) than in the front (lf, rf).

For a single individual (myself) over a period of twelve months, this peak has been stable during zazen practice. Across 34 sessions, the mean frequency has been 8.2 Hz with a standard deviation of 0.2 Hz.

In recordings of other people, the same peak can be seen, but at slightly different frequencies. The alpha band feature is quite robust: it seems to occur in most people, especially if they are relaxing. It occurs reliably when a person’s eyes are closed, and can also occur with eyes open as long as the eyes are relatively still and not moving about.

Among 11 different individuals of wide-ranging meditation experience, the range of the alpha peak was from 8.1 Hz to 11.0 Hz.  The mean frequency was determined to be 9.4 Hz with a standard deviation of 0.8 Hz. Thus the spread of the alpha peak frequencies across different individuals is over four times as wide (0.8 Hz vs. 0.2 Hz) as the spread of frequencies for a single individual.

Returning to the original recording of one individual, we see segments for three separate conditions: reading, following the breath, and counting the breath (eyes open for all three segments). Below is a spectrogram of the full session.

S1-rec22-full-session-lb-spectrogram-annotated

The alpha power is stronger during meditation (following or counting the breath) than it is during reading. This is indicated by the strong horizontal yellow line at frequency 8 Hz for the meditation conditions and its near absence during reading.

The PSD charts for each of these three intervals, measured at the left back (lb) sensor provides more detail on the predominate frequencies.

PSD for counting breath

PSD for following breath

PSD for counting breath

Values for alpha peaks are reading: 4 dB/Hz; following (eyes open): 32 dB/Hz and counting (eyes open): 40 dB/Hz.

A strong alpha peak is not necessarily a signature of meditation, but reading definitely suppresses the alpha oscillations compared to two kinds of meditation with eyes open.

Our next task will be to use Power Spectral Density graphs to examine other regions of the frequency spectrum, in delta, theta, beta and gamma bands.

Jan 272016
 

With new graphing tools available in the Physiology Viewer 2.0, previous recordings can be reexamined and studied in more detail.

September 10, 2015 was the 5th day of a 7-day sesshin (meditation retreat) at Tahoma Monastery. At the end of the day, after the last round of formal meditation, I recorded my brainwaves, as I did each day of the retreat.

Below is a graph that was derived from an EEG recording of fifteen minutes of meditation. It shows signal power for beta and gamma frequency bands measured at the left front sensor.

absolute power - full session

 

We note that for a period of about 400 seconds near the beginning, there is a gradual and relatively uniform increase in beta and gamma power. Let us focus on a region of interest, the interval from 50-450 seconds.

We replot the graph for the region of interest and then label two sub-regions, each two minutes long, “first 2 min” and “4 min later”. The purpose of this is simply to have an earlier and a later region to compare.

absolute power - zoomed in

Characteristics of the two intervals can also be compared by examining the two radar charts below.  In these charts, absolute band power for all four sensors is included.

   

The signal at the left front sensor is of particular interest as it shows a significant increase in beta and gamma power. The Physiology Viewer, shown below provides new ways of examining the data. In particular, a spectrogram and a Power Spectral Density (PSD) graph are part of the suite data visualization tools.

Physiology Viewer 2.0

 

We have chosen to identify two 120-second intervals with the names “zazen – first 2 min” and “zazen – 4 min later”. Selecting these individual intervals allows us to examine the EEG signal in more detail.
Spectrogram

A spectrogram is a graph of frequency vs. time. Frequency is plotted on the vertical axis and time along the x-axis.

We select the Spectrogram for the left front sensor (lf) during the entire session. The result is a frequency vs. time graph where the intensity of each frequency is indicated by color. Here, yellow indicates greater intensity than blue. The associated color bar serves as a legend.

Spectrogram

Note that during the “first 2 min” interval, there is less yellow in the frequency range from 12-50Hz (and hence, less power in the beta and gamma bands) than there is during the “4 min later” interval.

In addition, a horizontal yellow band runs through the entire session at a frequency value of about 8 Hz. This is in the alpha band. It will be readily apparent when we view these data using PSD graphs.

Note: Regarding the ‘vertical bands’ in the spectrogram, see a later post, Correlations of brain waves with respiration cycle.

Power Spectral Density (PSD) Graph

The PSD graph displays a spectrum of the signal. Frequency (Hz) is plotted on the horizontal axis and intensity of the signal (dB/Hz) on the vertical axis. The graphs below show the spectral composition of the two selected intervals with frequency bands indicated in color.

PSD - first 2 min

PSD - 4 min later

We see clearly how the beta and gamma intensity have increased over the course of a few minutes. While there are several peaks in the beta and gamma bands, it is unclear at this time whether a given peak is characteristic of an individual over a long time, as the alpha peak seems to be, or whether different individuals display commonly identifiable peaks.

 

Jan 272016
 

This post is directed to programmers who are interested in seeing the code I’ve written to display graphs. Others may want to skip ahead.

The Physiology Viewer program has undergone a reorganization that makes it faster and more stable. In addition, there are two new features for visualizing signals in the frequency domain: spectrograms and graphs of power spectral density (PSD). Finally, it is now possible to overlay the breath signal over a spectrogram, which provides a new tool for investigating the correlation between brain waves and breath.

Physiology Viewer 2.0 Main tab

The combo box just beneath the title is used to select a particular recording. The text box displays comments referring to that recording.

There are up to four lines to the right of the text box indicating which kind of data was recorded and at what sampling rate (EEG, heart, breath and button press).

The check boxes to the right of Time Series, d, t, a, b, g correspond to the frequency bands delta, theta, alpha, beta and gamma. Data can be displayed either as absolute band power or relative. Median or mean values can be superimposed on the graph as desired.

Check boxes p and v refer to respiration (pressure) and electrocardiogram (voltage) signals. The check box s refers to input from a button device ( a custom current probe connected to the LabQuest logging device).

The letters c and m represent the Concentration and Mellow values that are automatically computed from a Muse proprietary algorithm. Since we don’t know what this algorithm is, I have not used it in my research, but have made it available in case we want to compare our results with these functions later.

Check boxes j and k are used to indicate jaw clench and eye blink events, which are detected by the Muse headband. Jaw clench and eye blinks may be a useful way for subjects to indicate internal mental states.

On the right-hand side is a graphic representing the subject’s head (nose facing upward, ears to the side). The four radio buttons surrounding the head graphic are used to select the sensor of interest.

Clicking on the Display button brings up a graph or chart corresponding to current selection of Time Series, Spectrogram, PSD vs. frequency, Raw EEG, Radar Chart and Table. Checking the Overlay breath check box next to Spectrogram brings up a spectrogram with the breath signal superimposed. The dropdown list box next to Table provides options for mean, median, standard deviation and mean combined with standard deviation.

The rows beneath Intervals, t_initial and t_final can be used to assign arbitrary names to time intervals within the session. Any region of interest can be named. The Save button must be clicked to save these data into the Excel workbook, EEG_CardioRespSessions.xls.

Below is an example of a spectrogram for an interval of zazen which shows the typical alpha signal around 8 Hz and an unusually strong signal in the beta band.

S1-rec142-zazen-spectrogram

Below is the PSD spectrum for the same interval, showing the beta peak to be centered around 28 Hz.

PSD showing unusually strong beta peak

Both spectrograms and PSD graphs use the Fast Fourier Transform (FFT) algorithm operating upon sequential series of 1024 samples within the time series data. Spectrograms are generated using the specgram() function in the matplotlib library.

Our PSD graphs are generated using the psd() function from the matplotlib library. It uses Welch’s method with NFFT=1024, noverlap=512, the default ‘hanning’ window and a sampling rate of 220 samples/s. Color patches were added using the add_patch method of figure subplots.

The Physiology Viewer, written in Python 3.4 and is available at

https://github.com/davidtro/physiology-viewer