^{1}

^{*}

^{2}

^{*}

The goal of this work is to identify human brain waves in different states non-invasively, and to distinguish them into different levels of mental states in order to provide immediate mental state feedback to a classroom instructor and maximize learning outcomes. In order to apply such knowledge, this project utilizes a commercial NeuroSky Mindwave Mobile EEG to collect brain signals, MATLAB to filter data, voltage thresholds to detect blinks, which are used in tandem with power spectral density (PSD) analysis in order to classify mental states. This knowledge can then be provided to a class instructor who can use it to maximize the learning experience for students .

Electroencephalography (EEG) is a method of recording brain activity from electrophysiological indicators. These indicators are evident from the measurable postsynaptic potentials generated by neurons firing. An EEG device will then record these changes in the electrical waves generated by brain activity at the cerebral cortex or scalp surface. Through observation, it quickly becomes evident that different physiological states and facial movements will generate signals with distinct electrical attributes.

Owing to its non-invasive nature, EEG detection has been widely used in many fields, such as neurophysiology, psychology, pathophysiology, cognitive neuroscience, neuroengineering, and even social psychology, etc. [

Therefore, it follows that a classroom environment is a use case for applying mental state detection as a supplementary aid to enhance the learning experience. As EEG technology has advanced, there now exist EEGs that do not require a conductive gel to function, and unit cost continues to drop [

The tools utilized in this work include a NeuroSky Mindwave Mobile (

In addition, a MATLAB script, “readRAW_dft.m” was utilized for allowing a Bluetooth connected device with an operating system to interpret electrophysiological signals from the test subject. This was utilized, along with other MATLAB plotting tools in order to collect data. Some modifications and additional features were implemented due to some of the initial shortcomings of the script, which will be described in further detail in the next section.

In order to optimize the data gathered from the output of the NeuroSky EEG headset, several processing steps were necessary (see

To this end, filtering was done on the signal for the method of eyeblink detection in this project. Each trial lasted for 20 seconds, with a sampling rate of 512 per second, during which the EEG headset measures the postsynaptic potentials at its sensor region as a function of time. The units are microvolts and seconds respectively, though a raw signal waveform contains numerous artifacts of external noise (see

This signal is first post-processed with a band-pass filter function built into MATLAB [

This signal is then interpreted by a blink-detection mechanism, which functions based on voltage thresholds. The set value for the threshold is 250 microvolts, which was qualitatively chosen from initial trials to avoid false positives while still detecting most blinks. This blink recognition method is also used for detecting two mental states out of the four tested for: a distracted and tired state. By detecting the number of times the test subject has blinked within 20 seconds, a total of seven blinks or greater will register as “tired”, and a total of two or fewer blinks will register as “distracted”.

The timespan measured in each trial is 20 seconds, and the sampling rate is set to 512 times/second. As a result, each data sample will have 20 × 512 = 10,240 sample points, corresponding to each different time. This will generate a row vector of a magnitude up to 10,240, which results in a data matrix for analysis.

The method of analyzing the voltage amplitude in the time domain relies on an inequality function for detecting a voltage spike in excess of the voltage threshold. First, upon inspecting the matrix generated by the filtered signal, and finding the corresponding value for a blink of an eye, it is marked (

In order to be able to utilize an EEG to determine the mental state of an individual, experimentation was conducted to identify electrophysiological indicators. The majority of the trials conducted follow a

structure of analyzing frequency in relation to some other variable. For example, an analysis of power spectral density (PSD) in relation to the frequency of postsynaptic potential oscillations. It is not a new concept to analyze PSD in the context of analyzing mental states with an EEG [

As the default graphical output of the NeuroSky EEG headset related voltage over time, a process had to be implemented for converting such a graph to power spectral density over frequency. In order to perform this function, the mathematical mechanism utilizes a fast Fourier transformation (FFT) to convert the domain of the initial graph from time in seconds to frequency in hertz, the reciprocal unit (4 to 25 Hz, with 3 to 25 μV/sqrt (Hz) as the new y-axis). The FFT was favored over a discrete Fourier transformation for processing speed, which is highly relevant to this classroom application [

P ( f ) = lim T → ∞ 1 T | S T ( f ) | 2

The FFT decomposes the original N-point sequence into a series of short sequences and makes full use of the symmetry and periodicity of the exponential factors in the FFT formula. The corresponding FFTs of these short sequences are then appropriately combined with the corresponding FFTs of these short sequences to achieve the purpose of deduplication calculations, reducing the number of multiplication operations and thereby simplifying the structure.

Then, due to the conjugate law of the imaginary portion of the function, the only useful information for the final result is stored in the subscript “1 to 1 + N/2”. The negative phase frequency of the signal converted to the spectrum is eliminated and the above calculation is applied after this elimination. The power spectral density formula finds the normalized power for each frequency. Here, every 256 sample points are used for the above operation, that is, the power density spectrum is calculated every 0.5 seconds. After removing the sample point of the negative frequency, it is 256/2 + 1 = 129 available sample points, and one record will produce 10,240/256 = 40 line vectors, which will be stored in a matrix of 40 rows and 129 columns. Next, the matrix is summed by columns and divided by 40. The result is a row vector of length 129. The average calculation increases the stability of the data to reduce the interference generated by the outside world and the device itself.

Then, according to the actual application, the power sample points corresponding to the signal with the frequency of 4 - 25 Hz are extracted, and the data analysis table is imported. For classification, the mental states of “tired”, “normal”, and “vigorous”, are divided into detecting A (theta waves (4 - 8 Hz)), B (alpha waves to low beta waves (8 - 16 Hz)), and C (mid-to-high beta waves respectively (16 - 30 Hz)), in other words, splitting a row vector into three row vectors, the data in different frequency domain regions can be more conveniently compared. Then, all the power data for different frequencies in each area is superimposed (because they have the same dimensions), so that the power in different mental state areas can

Wave Type | Frequency Range | Mental State |
---|---|---|

Delta wave | 0 - 3.5 Hz | Unconscious |

Theta wave | 4 - 7.5 Hz | Fantasizing |

Alpha wave | 8 - 12 Hz | Calm, relaxed |

Low Beta wave | 12 - 15 Hz | Integrated |

Mid Beta Wave | 16 - 20 Hz | Thinking, aware |

High Beta wave | 21 - 30 Hz | Alert, agitated |

Gamma wave | 30 - 100 Hz | Motor functions and higher mental activity |

be expressed by a number, and they are represented by the letters A, B, and C. In order to determine the proportion of the frequencies in these regions to each other, a simple formula is used to calculate the ratio of each number and the remaining number sum: RATIO A = A/(B + C). The denominator excludes the value of the proportion of what is being calculated in particular so that each data point will be used only once in this calculation. The calculation shows the contrast of power in different mental states, and the overall process is described in

The above graphical representations (

In testing a commercially available EEG headset, it has become apparent that it can detect differentiable signals for varying mental states and motor movements, and this can be applied to detect concentration to a usable resolution in a classroom setting.

This is evident from corroboration with separate research efforts on electrophysiological analysis, which denote a range of around 8 Hz and below as an unfocused, drowsy state. Previous work has also attempted to utilize power spectral density as an analysis method, and despite disruption in the data from noise at relatively higher frequencies (50+ Hz), there is a clear spike at the lowest range of frequencies. These insights are sufficient for a basic classroom implementation of EEG headsets.

Some of the main limitations to the research conducted concern a small sample size: the number of trials conducted remains in the double digits. First of all, this has some errors compared to the larger data set nature. Furthermore, it imposed limitations on the type of analysis that could be carried out, excluding techniques such machine learning [

In order to conclude, the significance of this work must be reiterated on. It does not represent any notably new or groundbreaking developments, but verifies previous studies and is focused on assessing the viability of its specific application. If a relatively simplistic analysis of the brain’s electrophysiological outputs is capable of generating enough useful results to be of use in a classroom environment, the technical challenges of implementing EEG headsets into the classroom are not particularly imposing. Though the cost may be prohibitive for some public institutions at the moment, advancements will likely continue to progress in improving accessibility.

We would like to express our sincere appreciation to Professor Jan Van der Spiegel of the University of Pennsylvania for his valuable suggestions and guidance during this research program.

We would also like to thank the Cathaypath International Summer (CIS) program for funding and facilities, and it has been our pleasure to participate and engage in the program.

The authors declare no conflicts of interest regarding the publication of this paper.