0% found this document useful (0 votes)
48 views

Quantifying Mental Relaxation With EEG For Use in Computer Games

Uploaded by

Soumitra Kundu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Quantifying Mental Relaxation With EEG For Use in Computer Games

Uploaded by

Soumitra Kundu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Quantifying Mental Relaxation with EEG for use in

Computer Games
T.A. Lin L.R. John
Department of Electrical Engineering MRC/UCT Medical Imaging Research Unit
University of Cape Town Department of Human Biology
RONDEBOSCH 7700, South Africa University of Cape Town
Observatory 7925, South Africa

Abstract - The aim of this study was to investigate the patients [5]. However, EEG results differ with different
potential of implementing electroencephalographic (EEG) electrode placements. This research looks into the
based measurement of mental relaxation as an interface for possibility of achieving relaxation measurement using a
a simple computer game. In this game, a simulated ball is simple one channel (Fp1-Fp2) EEG device.
controlled to move left or right based on player’s mental
relaxation level. EEG data, blood pressure, heart rate and Existing EEG based games include: Brainathlon [6],
subjective perception of relaxation were recorded from 10 which is an open source software game that provide players
subjects, participating in 9 different activities. ANOVA with a real time feedback of their current brain activities.
with repeated measures was carried out on 9 different EEG The brain activity is used to control the game play.
indices to identify the indices that are most capable of Mindball® [7], a game where players sit at each end of the
distinguishing between the various relaxation levels. The table that is laid out with two goals and a little ball. The
results showed that EEG detected difference in relaxation ball moves away from the player that is more calm and
levels that was undetected by blood pressure and heart rate relaxed. The brainwaves used to move the ball forward are
measurement. The analysis of the EEG indices showed that the alpha and theta waves; however, details of how these
the sum of indices such as alpha+theta, and waves were used is unknown (e.g. weighting).
alpha+beta+theta were good indices for measurement of ElectricGuru [8] is a free software which provides EEG
relaxation. feedback in the form of various graphics.

Keywords: EEG, mental relaxation, computer games. To our knowledge, Mindball® is the only EEG based
relaxation game implemented with pre-frontal electrodes
1. Introduction positions only. However, some users have expressed that
Mindball® does not work.
The idea of context-aware applications can be used in
games that can adapt their behavior based on the The aim of this study was to investigate methods for the
information sensed from the environment. In order to implementation of EEG based measurement of mental
produce games that are more interesting, gamers’ level of relaxation, and to demonstrate the potential of the interface
relaxation or concentration can be detected during the with a simple game, where a simulated ball is controlled to
game, and used to change the game behavior accordingly move left or right based on player’s mental relaxation level.
[1]. Previous research used heart rate, breathing rate, blood Bulk of this research concerns investigating what frequency
pressure, skin conductance level as a measurement to components of the EEG signals or the combinations of the
relaxation state [2]. However, since physical and mental frequency components best measures the user’s mental
relaxation states do not necessarily correlate, the relaxation level, as well as how viable it is to be measured
measurement of mental relaxation states could provide in real-time, so that it could be implemented in a game.
information that are more useful.
The purpose of the game is to demonstrate how well the
Electroencephalography (EEG) is the recording of ball can be controlled with EEG signals via different
electrical activities of the brain. Previous studies have relaxation level.
shown that mental relaxation state can be measured using
scalp EEG [1, 3, 4]. Alpha band is predominant in a
relaxed adult; theta band is the major component in light 2. Methodology
sleep stage, and beta band is predominant during
concentration. Alpha and theta ratio are also used to assess EEG data was gathered from subjects participating in 9
relaxation as it is shown to be different for ADD or ADHD different tests. An initial assumption was made that each
test induces perceptible relaxation levels in the participants to measure blood pressure and heart rate at the end of each
and those relaxation levels can be measured test.
physiologically, subjectively and neurologically.
2.4. Trial Procedure
2.1. Participants
The subjects were fitted with the one-channel
Ten right-handed males were recruited for the study, their ModularEEG system. Nine tests were presented in random
mean age being 26.1 +/- 7.68 years. All participants signed order. Five minutes of EEG data were recorded for each
consent forms, and were paid for their participation. test, and a 6th minute was used to measure blood pressure
According to the participants’ self-report, they had normal and heart rate. The subjects were instructed to refrain from
vision and hearing, and had no history of neurological unnecessary movement, and to relax. All subjects were
disorders. All recordings took place during the day time, familiarized with the trial procedures and equipments
within the same season of year. before commencement of the trial. At the end of the
experiment, the subjects were asked to rate the level of
2.2. List of Tests relaxation of each test in a Likert scale of 1 to 10, with 1 =
most relaxed, and 10 = least relaxed.
Nine tests were set up for the experiment, as shown in
table 1. All activities were done either at rest or with 2.5. EEG Preprocessing
mouse clicking movement with right hand only. This is to
ensure minimal artifact in the EEG data. EEG signals were sampled at 256 Hz. EEG voltage data
was cleaned offline using the EEGLAB toolbox [11] in
2.3. Equipments MATLAB to remove, by visual inspection, eye blinks and
muscle movement artifacts. The cleaned data was then
The ModularEEG hardware design from the OpenEEG Fourier transformed into its frequency spectrum, using an
website [9] was used to build the EEG device for recording. epoch size of 1 second with 20% sliding Hamming
BrainBay [10] was used to record the data into text files. window, resulting in at least 500 clean time-windows per
Disposable stick-on ECG electrodes were used for EEG test. EEG was then separated into bands (alpha, beta and
recording. A digital electro-sphygmomanometer was used theta) of absolute voltage for analysis. All indices used for
analysis are shown in table 2.

Table 1: The 9 testing activities


Test Activity Implementation Description
1 rest with eyes open none rest on a chair with eyes open
2 rest with eyes closed none rest on a chair with eyes closed
3 listen to relaxing music Watermark rest on a chair listening to relaxing music, eyes open
solve English word play Scrabble on computer, use right hand for mouse
4 problems Scrabble clicking
solve math problems on computer, use right hand for
5 solve math problems simple multiplication mouse clicking
card game, play as fast as play Solitaire on computer, use right hand for mouse
6 possible Solitaire clicking
play House of the dead on computer, use right hand
7 play a video action game House of the dead for mouse clicking
8 watching an action video Face Off watch the Face Off video
The kids aren’t right,
9 listen to Rock Music Faint rest on a chair listening to rock music, eyes open
Table 2: EEG indices used for analysis

Specific indices Ratio of specific indices Sum of specific indices


alpha (8~12Hz) alpha/beta alpha + theta
beta (13~30Hz) alpha/theta beta + theta
theta (4~7Hz) beta/theta alpha + beta + theta

2.6. Statistical Methods


One-way ANOVA (Analysis of Variance) was performed
on the heart rate, blood pressure measurement and the
subjective relaxation rating of the tests using
STATISTICA. Means and standard error were plotted and
compared. Tukey HSD [12] post-hoc tests were performed.

The EEG data gathered was large (+500 time-windows


per test, per subject), thus parametric methods were used
for analyzing the data. A three-way ANOVA with repeated
measures on three factors (tests, indices, and time-
windows) [13] was performed to analyze the data in
MATLAB, in order to compare the difference between the Figure 1: A screenshot of the game interface
three factors in the EEG data. Tukey HSD post-hoc tests
were carried out on the selected significant factors. For all
statistical analysis, a significance level of 0.05 was chosen.

2.7. The game implementation


The game was implemented in JAVA, using open source
libraries from Brainathlon, and Sun’s COMMAPI library
[14] for the serial connection from EEG device to the PC.
A simulated ball moves left or right along a horizontal axis
controlled by the player’s EEG signals relating to level of
mental relaxation. Two players can compete
simultaneously to determine who is more relaxed by
comparing the relative position of the ball. The
controllability of the ball was assessed by subject’s Figure 2: Electrode placements
perception of relaxation. See figure 1 for a screenshot of
the game interface, and figure 2 for a diagram showing
electrode placements at positions Fp1 and Fp2.
3.2 Measurement of Subjective Relaxation
The ANOVA results showed a significant difference in
3. Results the subjective relaxation ratings for the 9 tests. Post-hoc
Tukey HSD comparisons indicated tests 1, 2 and 3 (resting
3.1 Measurement of Physical Relaxation activities) are significantly different from tests 4, 5, 6, 7and
8 (games and movie activities). Test 9 (rock music) is
The ANOVA results showed that there is no significant significantly different from test 2, 3 and 7 (eyes closed,
difference between the means of systolic blood pressure relaxing music and action game). See figure 6.
and heart rate across the various tests (figure 3, 5).
However there is a significant difference in diastolic blood
pressure between test 7 (action game) and test 8 (action
video) (figure 4).
ANOVA: F(9, 72)=1.8507, p=.07365 ANOVA: F(8, 64)=19.309, p=.00000
125 10
Systolic blood pressure (mmHg)
9
120

Relaxation rating
115
7

110 6

5
105
4

100
3

95 2

1
90
start 1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9
Test number
Test number
Figure 3: Systolic blood pressure after the 9
Figure 6: Subjective relaxation rating after the
different tests
9 different tests

ANOVA: F(9, 72)=2.3168, p=.02377


80
3.3 Measurement of Neurological Relaxation
Diastolic blood pressure (mmHg)

75

The ANOVA results for all 3 factors (test, index, and


70 time-window) indicated a significant difference for tests,
indices and time-windows. The interaction results showed
65
that there is significant difference for index*time-window
60
but no significant difference for test*time-window, and
test*index*time-window. See table 2.
55

Tukey HSD post-hoc tests for the 9 tests in each index


50
start 1 2 3 4 5 6 7 8 9
showed that (for summary see table 3):
Test number
Specific indices: there is no significant difference for
Figure 4: Diastolic blood pressure after the 9
alpha and beta, but for theta, there is a significant
different tests
difference between test 6 (card games) with all other
activities. See figure 7.
ANOVA: F(9, 72)=1.4170, p=.19704
75
Ratio of specific indices: there is no significant
70
difference for alpha/theta or beta/theta ratio, but in
alpha/beta ratio, there is a significant difference for test
Heart rate (bpm)

65 2(eyes closed) versus tests 4, 7 and 9. See figure 8.

60 Sum of specific indices: there is a significant difference


for all sums tested. In the sum alpha+theta, there is a
55
significant difference for test 6 (card games) versus all
50
other activities, and test 2 (eyes closed) versus test 5 (math
problems). The sum beta+theta showed more significant
45 pairs, with the same significant pairs as the sum
start 1 2 3 4 5 6 7 8 9
alpha+theta, as well as 3 more significant pairs: test 2 (eyes
Test number closed) versus test 4, 7 and 9 (word game, action game,
Figure 5: Heart rate after the 9 different tests rock music). The sum alpha+beta+theta showed the most
number of significant pairs, with all the significant pairs in
all other indices, as well as test 2 (eyes closed) versus test 1
(eyes open). See figure 9, 10.
Table 2: Three-way analysis of variance with repeated measures on three factors (within-subjects) table. Significance level
= 0.05. The results are significant (S) or not significant (NS). SOV = source of variance, SS = sum of squares, df = degree
of freedom, MS = mean square, F = f-test stats, P = p-value.

SOV SS df MS F P Conclusion

Between-Subjects 10549.107 9

Within-Subjects 335092.280 449990


Test 5779.194 8 722.399 9.023 0.0000 S
Error(Test) 5764.308 72 80.060
index 165424.074 9 18380.453 118.725 0.0000 S
Error(Index) 12540.028 81 154.815
Time-window 722.764 499 1.448 1.143 0.0196 S
Error(Time-window) 5689.136 4491 1.267

Test*Index 5975.970 72 83.000 7.945 0.0000 S


Error(Test*Index) 6769.699 648 10.447
Test*Time-window 5146.237 3992 1.289 0.991 0.6408 NS
Error(Test*Time-window) 46719.405 35928 1.300
Index*Time-window 922.563 4491 0.205 1.214 0.0000 S
Error(Index*Time-window) 6841.044 40419 0.169
Test*Index*Time-window 6119.856 35928 0.170 0.992 0.8505 NS
Error(Test*Index*Time-
window) 55531.765 323352 0.172

Total 340495.150 449999

Table 3: Summary of significant pairs in each index. The results are labeled significant (S) or not significant (NS). The
number of pairs shows the number of significantly different pairs.

Specific indices Ratio of specific indices Sum of specific indices

alpha beta theta Alpha/beta alpha/theta beta/theta alpha + theta beta + theta alpha + beta + theta
NS NS S S NS NS S S S
8 pairs 3 pairs 9 pairs 12 pairs 14 pairs

3.0 3.5

2.5 * 3.0
Absolute voltage ratio

2.0 2.5
Absolute voltage

1.5 2.0

1.0 1.5

0.5 1.0

0.0 0.5

-0.5 0.0
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
Test number Test number
Figure 7: Absolute theta voltage Figure 8: Alpha/Beta ratio
4.5
these parameters, beat-to-beat monitoring of these
4.0 parameters could possibly provide more information.
3.5

4.2 Result of Subjective Relaxation


Absolute voltage

3.0

2.5

2.0
The subjective ratings of mental relaxation showed a
significant difference between resting (test 1,2,3,9) and
1.5
active (test 4,5,6,7,8) test scenarios. This shows that these
1.0
testing activities do induce various levels of mental
0.5 relaxation that are perceivable to subjects.
0.0

-0.5 4.3 Result of Neurological Relaxation


1 2 3 4 5 6 7 8 9
Test number
The ANOVA results showed a significant difference in
Figure 9: Absolute alpha + theta all individual factors, this shows that EEG signals (Fp1-
Fp2) changes with test, indices, and time-window. The
5
sums of indices have the most number of significant pairs
4
indicating that the sums can distinguish between the tests
better than individual indices or ratios, refer to table 3.
Absolute voltage

3
The greater difference in EEG as compared to heart rate
2
and blood pressure measurement also shows that
neurological measurement has more capability to
1
distinguish the different mental states to these activities
than the physical measurements.
0

-1
1 2 3 4 5 6 7 8 9
5. Conclusion
Test number
Figure 10: Absolute alpha + beta + theta This is the first study that attempts to measure mental
relaxation state using one channel (Fp1-Fp2) EEG for game
implementation. The EEG results indicate that the sum
alpha+theta, and sum alpha+beta+theta are good indices for
3.4 Qualitative Game testing measurement of neurological relaxation. Game testing also
reflects that these indices have the capability to measure
Two test-players ranked the indices according to the basic level of relaxation in at least half of the players.
controllability. The test-players expressed their view that However, further research should be done to investigate
the sums of indices were much more controllable than the more combinations of indices. An EEG interface to
individual indices, and the ratios were not controllable at measure mental relaxation could be used to create advanced
all. The sum of alpha and theta was then opened to a class computer games that are influenced by the state of
of 20 students for testing. About half of the students relaxation of the player.
indicated that they could perceive some control over the
ball with their relaxation levels. The quantitative results are
still being prepared.
Acknowledgements
The authors would like to thank Mr. Dean Hodgskiss for
4. Discussion his help with the hardware debugging, and to Mr. Clark Lin
for his help with the preparation of the experiments.
4.1 Result of Physical Relaxation
Diastolic blood pressure was the only measurement
showing significant difference, but this was only between References
test 7 and test 8, hence blood pressure and heart rate
measurement may not be a satisfactory indication of [1] Magerkurth C., Cheok A.D., Mandryk R.L., Nilsen T.
relaxation in this context. Perhaps only extreme physical “Pervasive Games: Bringing Computer Entertainment Back
relaxation changes such as during deep sleep, active sport to the Real World”
or intense worrying would induce measurable changes in
[2] Hofmann, S.G., Moscovitch, D.A., Litz, B.T., Kim,
H.J., Davis, L.L. and Pizzagalli, D.A. “The Worried Mind:
Autonomic and Prefrontal Activation during Worrying,”
Emotion Volume 5, Issue 4 , Pages 464-475, December
2005.

[3] Honal M., Schultz T., “Identifying User State Using


Electroencephalographic Data.”

[4] Webster, J.G., Editor. Medical instrumentation, third


edition. John Wiley & Sons, inc. New York, 1998

[5] Clarke, A.R., Barry, R.J., McCarthy, R. and


Selikowitz, M. “Children with attention-deficit/
hyperactivity disorder and comorbid oppositional defiant
disorder: an EEG analysis,” Psychiatry Research, Vol.
111, Issues 2-3, Pages 181-190, 30 August 2002.

[6] Palke, A. Brainathlon, “Enhancing brainwave control


through brain-controlled game play,” Master thesis, Mills
College 2004.

[7] http://www.medgaget.com/archives/2005/03/mindball
/the_ee.html “Mindball: The EEG game.” (Last viewed:
December 2005)

[8] http://www.realization.org/page/topics/electric_guru.h
tm ElectricGuru (Last viewed: October 2005)

[9] http://openeeg.sourceforge.net The OpenEEG project


(last viewed: October 2005)

[10] http://www.shifz.org/brainbay BrainBay (Last


viewed: October 2005)

[11] Delorme, A., Makeig, S. EEGLAB: an open source


toolbox for analysis of single-trial EEG Dynamics, Journal
of Neuroscience Methods, 134:9-21 (2004)

[12] Aczel, A.D. Complete Business Statistics, second


edition, IRWIN. 1992.

[13] Trujillo-Ortiz, A., R. Hernandez-Walls and F.A.


Trujillo-Perez. “RMAOV33: Three-way Analysis of
Variance with Repeated Measures on Three Factors Test,”
a MATLAB file.

http://www.mathworks.com/matlabcentral/fileexchange/loa
dFile.do?objectId=9638 (Last viewed: February 2006).

[14] http://java.sun.com/products/javacomm/index.jsp
JAVA communication API, Sun Developer Network. (Last
viewed: October 2005)

You might also like