About Us

Grid and the EEG analysis are projects created by the Computer Science and Engineering Department at the University of Houston-Downtown.

About Us Content

EEG visualization and analysis techniques

1. Overview:

(1) Background

Using electroencephalographic (EEG) data, cognitive psychologists can visualize and observe correlations between different active brain states. It is desirable to create an application that takes EEG data and exposes it to various analytical techniques so the resultant brain states can be studied and predicted. We present the design and implementation of a system that integrate onsite EEG data collection, analysis, web based EEG data storage and modeling tools, and user feedback through mobile communication devices. Architecture of the system is shown in Figure 1.

Figure 1

Figure 1. iChartonline system architecture

The vast implications of using EEG data to analyze brain states include designing brain-computer interfaces (BCI) where users can operate on a machine via brain activities, and using brain state models in healthcare related activities. Imagine a world where mere thinking about retrieving information will give you the results you are looking for; a world that no longer requires a keyboard, mouse, or traditional hardware input devices to interface with a computer; a place where you can instantly find out your health information in real time. Imagine a device that can instantly retrieve your body and mind condition and share this information with a medical expert that can then immediately analyze the data and make an appropriate health diagnosis. Instead of reacting to a condition that may already have caused irreparable health damage after the fact, there is a good chance that this information could be proactively provided and prevent deteriorating health conditions from occurring in the first place. Much of the capability and technology is available now to implement all these thoughts. We may not be able to know exactly what you are thinking, but we can gather brainwave data and make it available for analysis. We can control computers with mere thought! The methods may still be somewhat primitive and the technology in its infancy, but never the less, with only a few inexpensive off the shelve parts and a little ingenuity we can create a device that is capable of sensing body conditions and even read brainwaves.

As an example, we present a case study in transcendental meditation [1], a spiritual development technique, which was popularized by former Hindu ascetic Mharishi Mahesh Yogi and gained popularity in the west during the 1960’s [2]. The concurrent brain states associated with transcendental meditation have been viewed as something outside of the world of physical measurement and objective evaluation by most scientific communities. Scientists now have the ability to measure and register electric potential of the human brain through the use of electroencephalographic technologies. One approach is to study finite differences within the minds of those practicing meditation, and those who do not. Such an endeavor is an avenue towards modeling a wide range of brain states [3]. The combination of electroencephalographic data with modeling methods in fields such as data mining and bioinformatics could be used to prove that subjects in a state of transcendental meditation are in a verifiable and observable state of mind that can be monitored and predicted [1]. Experiments found that cancer patients that practiced meditation experienced higher well-being levels, better cognitive function and lower levels of inflammation than a control group [4].

We experimented a method of quick prototyping an EEG headset, in a cost effective way and with state of the art technologies. This headset is a good starting foundation for anybody interested in researching body data via sensors. The Arduino components can be extended and exchanged to any desired configuration. It is only up to the imagination of the builder to decide what is possible and where to take the project next.

We used meditation research to reach out to the high end applications of EEG data analysis in understanding human brain states and assisting in promoting human healthcare. Some devotees to the practices of transcendental meditation have shown the ability to control these brain states. We want to numerically prove or disprove this assumption; the analysis of these states could be the initial step in a process to first predict and later allow individuals to control these states.

(2) Challenges

The challenges in EEG related studies include the design of the measuring tools and the methodologies in analyzing EEG data. Here we extricate a method to build an inexpensive headset to measure brainwaves. An EEG is a tool used to capture brainwave activity while it is performing a cognitive task. This allows the detection of the location and magnitude of brain activity involved in the various types of cognitive functions. EEGs allow the viewing and recording of the changes in brain activity during the time a task is performed. EEGs for this purpose have been around for many years, albeit only in medical research facilities and typically being very expensive. The intrigue is being able to inexpensively build an EGG with off the shelf parts and be able to perform the same type of brainwave research at home as sophisticated medical research facilities.

The primary motivation behind this is to know what signals the brain produces does under certain situations and to know how these signals are consciously manipulated via controlled thoughts. Additionally it is desirable to know if there is a way to enhance studying and learning abilities and being able to retain more information. As an example, attempts have been made to study the tangible effects of meditation on human body and behavior, and investigate the possibilities of applying scientific methods to measure the effects. A direct benefit of this study will be to extend psychology to develop new methods for healing various mental diseases. This objective is feasible because meditation is efficient in training human self-control since its goal is having one’s every whim under observation. Through this study, it is anticipated to start a campaign to establish “measurable” meditation methods, applying scientific methodology to religions, and eventually making religions “tangible”.

(3) Current techniques

A cursory look into the topic revealed a wealth of information, much theoretical and limited to large government organizations and research facilities with huge budgets. For instance, the government has a program called the “Brain Research through Advancing Innovative Neurotechnologies™ (BRAIN).” The web site states the following: “The Brain Research through Advancing Innovative Neurotechnologies™ (BRAIN) Initiative is part of a new Presidential focus aimed at revolutionizing our understanding of the human brain. By accelerating the development and application of innovative technologies, researchers will be able to produce a revolutionary new dynamic picture of the brain that, for the first time, shows how individual cells and complex neural circuits interact in both time and space. Long desired by researchers seeking new ways to treat, cure, and even prevent brain disorders, this picture will fill major gaps in our current knowledge and provide unprecedented opportunities for exploring exactly how the brain enables the human body to record, process, utilize, store, and retrieve vast quantities of information, all at the speed of thought.” The site even contains funding opportunities for companies and research facilities to participate and contribute to the program. Examples such as this can be found in abundance and what quickly becomes apparent is that there is a thirst for more knowledge about the human brain and how it works.

Very little information exists in the hobby and home space for EEG devices. Organizations such as OpenEEG and OpenBCI are available and facilitate the information sharing amongst hobbyists and attempt to inform the general public about the subject of gathering brainwave data. Companies like NeuroSky and Emotive sell headset EEG devices and provide software development kits (SDK) that include the tools necessary to gather brainwave data, but are limited to only reading brainwaves. In research perspectives, there is still space to gather more information, to have an enhanced data model, and see additional dependencies while the brain performs or reacts to specific tasks.

On the brain state modeling side, two types of research models have been used: statistical models and micro models. Statistics models are built by applying statistical analysis to collected data from meditation practitioners, while micro models try to catch physiological features of the brain state under examination. Current literatures show that both methods are used in the study of complementary and alternative medicine, which includes meditation as one of the methods. Loizzo et al, performed a 20-week contemplative self-healing program study, which showed that a contemplative self-healing program can be effective in significantly reducing distress and disability among the testers [5]. Habermann et al, on the other hand, performed a long-term (5-20 years) project to investigate the use of complementary and alternative medicine and its effects on the testers’ health [6]. Comparisons across different groups of people are also found. For example, in a 6-week mindfulness-based stress reduction program, subjects assigned to the program demonstrated significant improvements in psychological status and quality of life compared with usual care [7]. Another comparison is found where a group of Qigong practitioners were compared to a control group and positive indicators were found in the study [8].

A survey of the literature on cognitive impairment and cancer presented in [9] suggests that meditation may help to improve cancer-related cognitive dysfunction and alleviate other cancer-related sequelae.

It is well understood that although statistical studies can provide evidence for the effectiveness of meditation, it fails to provide a systematic view of human’s epistemology and psychology. This addresses the needs for micro models that depict the inter-relationship between human’s mind and physical body.

2. Findings and Products:

Our prototyping headset is composed of the following components.

(1) Composition of EEG headset

Sensors: The following three sensors are used on the headset:

  1. EEG sensor, commercial product from NeuroSky. The NeuroSky technology was chosen for its dry sensors capabilities. This means that the sensor requires no special liquid chemicals while making contact with the skin to read brainwaves (see Figure 2). The sensor is based on technology that is referred to as ThinkGear™. ThinkGear™ is the technology inside every NeuroSky product that enables a device to interface with the wearers’ brainwaves. It includes the sensor that touches the forehead, the contact and reference points located on the ear pad, and the onboard chip that processes all of the data and provides this data to software and applications in digital form.

    Figure 2

    Figure 2: NeuroSky EEG Sensor

  2. Pulse Sensor, Open Source pulse sensor from pulsesensor.com. The pulse sensor is a current to voltage converter Op Amp circuit that uses a photodiode as current source. It has a Low Pass Filter for output. The devices uses surface mount parts in order to keep it as small as possible. It needs an ambient light sensor which is sensitive to the visible light spectrum (see Figure 3).

    Figure 3

    Figure 3: Pulse Sensor

  3. Temperature sensor, commercial integrated circuit sensor, TMP36 - Analog Temperature sensor from Adafruit (See Figure 4). The TMP36 temperature sensor is a solid state device. Meaning it does not use mercury. Instead, it uses the fact that as temperature increases, the voltage across a diode increases at a known rate. By precisely amplifying the voltage change, it is easy to generate an analog signal that is directly proportional to temperature.

    Figure 4

    Figure 4: Adafruit TMP-36 Temperature Sensor

Microprocessor: Arduino Mega 2560 (See Figure 5), Open Source.

Figure 5

Figure 5: Arduino Mega 2560

Microprocessor Blue Tooth Shield: Bluetooth Low Energy (BLE) Shield (See Figure 6) from redbear.com. Added to the Arduino for low energy blue tooth communications with the iPhone.

Figure 6

Figure 6: Red Bear Labs Bluetooth Low Energy Arduino Shield

In order to test and validate that the headset is working properly and that all the sensors are functioning, a test environment had to be constructed. To simulate a real world environment, a mobile Smart Phone application was developed on the Apple iPhone platform. This platform was chosen for ease of access to development tools and availability of software development kits (SDK) from all the hardware and chipset vendors. Both NeuroSky and Red Bear Labs included sample applications that were then easily transferred to a custom application using a simple view to display all the sensor values.

To show that the headset sensors are working a custom mobile application was developed to view the results. Sample screenshots of the application with the actual results are displayed in Figure 7.

Figure 7

Figure 7: iOS Sensor Headset Application

(2) Case study: analysis of meditation state

We measured an experienced meditator’s brainwaves while meditating and compared them to several other states including idle and talking. We found prominent differences between the experienced meditator’s brainwaves and those of other states. The experienced meditator’s brainwaves clearly displayed a stable state most of the time, as shown in Figure 8(a). However, during certain times after the initial meditation stage, extraordinary high waves were observed, as shown in Figure 8(b).

Figure 8a

(a) Meditating 1

Figure 8b

(b) Meditating 2

Figure 8. An Experienced Meditator’s Brain Waves

Figure 9 shows the brainwaves of idle, talking, and meditating from an inexperienced meditator. We can clearly see that the irregularities of these states are higher than the experienced meditator’s state, especially the idle and the talking states. The inexperienced meditator showed some similarity to the state shown in Figure 8(a) but it didn’t show the features in Figure 8(b). This initial study indicates that trained meditators can demonstrate regularity during meditation practice.

Figure 9a

(a) Idle

Figure 9b

(b) Talking

Figure 9c

(c) Inexperienced Meditation

Figure 9. Brain Waves of Other States

EEG data can be broken down into its component frequencies. These frequencies represent specific brain states including deep meditation and high anxiety. We are able to collect this frequency information through a commercially available EEG headset from Neurosky. It pairs to host devices through a Bluetooth connection, and works in conjunction with open source software available on both the iOS and Android mobile operating systems. This data can then be uploaded to our existing SQL database for further examination and analysis. Because of the large size of these files and number of samples needed to be collected, we used a Windows PowerShell script to automate the importing of our data.

Using the data collected from the headset we can analyze each of the statistical attributes representative of specific brain states. We make use of Mathworks MATLAB software to take the frequency power spectrum data collected and perform post processing analysis. Along with MATLAB we use Microsoft’s spreadsheet software to compile our data for simple model design and tabulate statistical attributes relative to each brain state.

We make an assumption that the actual brain states with regards to the normalized power spectrum are Normally Distributed, and our range of error for brain state recognition is within 1 standard deviation of the mean.

We use EEGID software to collect data from the Neurosky headset. Then the data collected is sent through email in CSV file format. The data is representative of three to five minute sampling periods for individuals at certain brain states. This CSV file contains a header row that identifies each of the collected data, including PoorSignal, EEG Raw Value, EEG Raw Value Volts, Attention Level, Meditation Level, Blink Strength, Delta(1-3Hz), Theta(4-7Hz), Alpha Low(8-9Hz), Alpha High(10-12Hz), Beta Low(13-17Hz), Beta High(18-30Hz), Gamma Low(31-40Hz), and Gamma Mid(41-50Hz).

The Neurosky Mobile Headset reports brain wave frequencies as a function of its power spectrum. This is done through a Fourier Transform

It decomposes the EEG time series into a voltage by frequency spectral graph (Power Spectrum). This is a method of numerical analysis in the field of Quantitative EEG.

We tabulate the simple statistics of all the data and create a plot showing three brain waves in three states (meditation, reading aloud, watching a movie).

From this data set and plots we develop models that represent identifiable brain states. As we continue our research and collect more data, a level of refinement and accuracy should be achieved.

We create a script in MATLAB to normalize power spectrum data, truncate data sets, plot normalized power spectrum per time sample, and calculate simple statistics and log to diary file. Each script set was applied to every data set. The reason for normalization is that data between sessions cannot be easily compared. Contact between the headset and the user will differ as environmental conditions change. In addition, automatic scaling occurring in the hardware to account for noise makes the data large values. The normalized method is to sum all the eight powers and divide each power by the sum to scale all the reported data within the range of 0 to 1.

From the range of mean and +/- one sample standard deviation of normalized data, we generate three brain state models in meditation, reading aloud, and watching a movie (Figure 10, 11, 12). Validation and recognition rate are tested against collected data (Figure 13).

We collect and examine data sets through a recognition algorithm determined by the modeled brain states.

In the model of meditation, alpha waves are the most common brain waves. Delta waves are common in reading aloud as well as in watching a movie. However, alpha, beta and gamma increase in watching a movie compared to reading aloud. We intend to use this data collected for analysis of our specified brain states. As we collect more data we will identify a baseline model using statistical means.

Figure 10

Figure 10. Meditaion Model of Normalized Power Spectrum

Figure 11

Figure 11. Reading Aloud Model of Normalized Power Spectrum

Figure 12

Figure 12. Watching A Movie Model of Normalized Power Spectrum

Figure 13a Figure 13b

Figure 13. Validation of three data sets against reading aloud model

The recognition rates of the three brain states are 65% for mediation, 80% for reading aloud, and 75% for watching a movie. 65% in meditation is not a high level of acceptance, but it does make sense because none of the subjects are meditation practitioners. Mediation should be more discernible with samples of actual mediation practitioners.

3. Words from the Principle Investigator

We plan to use electroencephalography (EEG) data to build a brain waves model that can identify characteristics of meditation states. The practical significance of finding a meditation model is two fold. Firstly, it can be used to guide and regulate meditation practices. Secondly, it can be used to assist meditation teachers to verify the effectiveness of the meditation methodologies. The proposed project is an extension to a collaborative study with the University of Canberra, and the Royal North Shore Hospital, the University of Sydney. Existing work that has been done in this collaborative project includes collecting EEG data from medical Qigong classes at the Royal North Shore Hospital, the University of Sydney, and investigating brain state modeling using EEG data. At the University of Houston-Downtown, we designed a program for EEG data visualization and analysis and an iPad application for real-time EEG data monitoring. The proposed project will focus on meditation brain states using test subjects with cascaded meditation mastery levels, viz., subjects with no or little experience or in a poor health condition, meditation trainees with entry level experience, and experienced meditation masters. With over 20 years experience in meditation and the knowledge in the philosophy of meditation, I am suitable to be the PI for the proposed project. I will use my knowledge to gear the data collection and analysis towards supposed behaviors of brain states in a successful meditation process. My knowledge about sectors of meditation practitioners and social liaison will help me identify meditation masters. My high performance computing background will contribute to the establishment of necessary algorithma and a proper computing platform for efficient processing of large EEG data volumes. The orchestrated project that involves participating researchers who have demonstrated strong expertise in meditation training and EEG data analysis will contribute significantly to scientific studies of meditation.

4. UHD Grid Computing Lab Profile

UHD Grid Computing Lab hosts a high performance 64-nodes computing cluster. It front-end server provides functionalities for job submission, scheduling and execution. The service portal is publically accessible at http://grid.uhd.edu. The Lab is also a venue for student research. This Lab will be shared by all the parties involved in the proposed project as a platform for storing and processing EEG data. UHD Grid Computing Lab is located in the south main building of UHD, which is a municipal university at Houston, Texas, located inside the I-610 loop, looking at Houston downtown across the bridge over San Jacinto River. Click to locate UHD on Google Map.


  • Davidson, R., Kabat-Zinn, J., Schumacher, J., et al., Alterations in Brain and Immune Function Produced by Mindfulness Meditation. Psychosomatic Medicine. 65(4):564-570. 2003.
  • Holzel, BK., Carmody, J., Vangel, M., et al., Mindfulness practice leads to increases in regional brain gray matter density. Psychiatry Research: Neuroimaging. 2 022;191(1):36-43. 2010.
  • Lin, H., Measurable Meditation, Proceedings of the International Symposium on Science 2.0 and Expansion of Science (S2ES 2010), the 14th World Multiconference on Systemics, Cybernetics and Informatics (WMSCI 2010), Orlando, Florida, June 29 - July 2, 2010, pp. 56-61.
  • Oh, B., Butow, P., Mullan, B., et al., Impact of medical Qigong on quality of life, fatigue, mood and inflammation in cancer patients: a randomized controlled trial. Annals of Oncology, (3):608-614, 2009.
  • Loizzo, J.J., Peterson, J.C., Charlson, M.E., Wolf, E.J., Altemus, M., Briggs, W.M., Vahdat, L.T., & Caputo, T.A. (2010). The effect of a contemplative self-healing program on quality of life in women with breast and gynecologic cancers. Altern Ther Health Med, 16(3), 30-37.
  • Habermann, T.M., Thompson, C.A., LaPlant, B.R., Bauer, B.A., Janney, C.A., Clark, M.M., Rummans, T.A., Maurer, M.J., Sloan, J.A., Geyer, S.M., & Cerhan, J.R. (2009). Complementary and alternative medicine use among long-term lymphoma survivors: a pilot study. Am J Hematol, 84(12), 795-798.
  • Lengacher, C.A., Johnson-Mallard, V., Post-White, J., Moscoso, M.S., Jacobsen, P.B., Klein, T.W., Widen, R.H., Fitzgerald, S.G., Shelton, M.M., Barta, M., Goodman, M., Cox, C.E., & Kip, K.E. (2009). Randomized controlled trial of mindfulness-based stress reduction (MBSR) for survivors of breast cancer. Psychology, 18(12), 1261-1272.
  • Oh, B., Butow, P., Mullan, B., & Clarke, S. (2008). Medical Qigong for cancer patients: pilot study of impact on quality of life, side effects of treatment and inflammation. Am J Chin Med, 36(3), 459-472.
  • Biegler, K.A., Chaoul, M.A., & Cohen, L. (2009). Cancer, cognitive impairment, and meditation. Acta Oncol, 48(1), 18-26.
Back to top