1848 Article p287
1848 Article p287
ABSTRACT
ORIGINAL RESEARCH
Our research team has developed a system and methodology for measuring psycho-physiological pa-
PAPER rameters, which can be used to determine the level of fatigue and fitness of the person being measured.
This article describes the electroencephalography (EEG) part of this system. This article covers the
technical and mathematical background of EEG measurement, the selection and implementation of the
measurement tool in the development environment, and the development of the measurement and
processing algorithm. The result is a system that can detect, digitize, and process the digitized signal
from the brain, and save the processed signal in an XML database.
KEYWORDS
EEG, LabVIEW, XML, FFT, adatbazis, Muse, UDP protokoll, Bluetooth low energy, OSC protokoll
1. INTRODUCTION [1]
Electroencephalography (EEG) is a non-invasive measurement procedure for detecting
electrical signals from the brain and then processing these signals. With the help of signals
from the brain, we can determine the current state of the human mind and track the change
to certain external stimuli from the ground state. Fixing the baseline is a critical point for
EEG measurements, since every person has a different datum elsewhere, it is not possible to
add a single datum for each person. Compared to the correctly recorded baseline condition,
we can draw conclusions that the subject’s mental state has deteriorated or improved as a
result of certain stimuli. Deeper, more comprehensive analysis requires serious neurological
knowledge, but simpler, but more important analyses can be performed by simple mathe-
matical calculations.
For example, surveying the mental health of those involved in extreme work is an area of
application that has shown rapid development and need for further research. This includes
performing the aforementioned resting measurement, which is important for the subject to
be calm and relaxed. After resting, it is possible to re-examine the physical or mental subject
to see how your brain responded to the exercise. Typically, these jobs include pilots, fire-
fighters, air traffic controllers, ambulances.
The purpose of this research is to create a system that can quantify the fatigue and fitness
*Corresponding author.
status of a person and store this data in a database. The complete system includes an ECG
E-mail: [email protected]
gauge, an EEG gauge, a vascular stiffness gauge, a muscle oxygen level gauge, and a skin
temperature gauge. The data processed must be credible in order to provide an expert with
relevant data.
This paper is part of a larger research project, further results will be published in [18, 19].
for this is the Fast Fourier Transform, or FFT, which is a Fast Fourier Transform (FFT) is a (fast) algorithm that
faster version of the discrete Fourier transform. can be used to calculate DFT. The following equation gives
the DFT transformation formula:
1. Butterworth filter
Butterworth filters are of the type IIR, or Infinite Impulse X
N −1 −j 2nik
N
Response filters. Butterworth filters have the following X½k ¼ x½i*e k ¼ 0; 1; 2 . . . N 1: (2)
i¼0
characteristics:
Damped amplitude function at all frequencies, where: X [n] values are the time domain values of the
The amplitude curve decreases monotonically from a sampled signal, N is the number of sample values.
given cut-off frequency, The FFT and the power spectrum are very useful for
Maximum flatness, unit response in transmission band measuring the frequency content of steady and transient
and zero in crop band, signals. The FFT gives an average frequency content over the
Half power frequency or 3 dwindling frequency is related entire measurement range. Therefore, FFT is useful when
to cutting frequency, the signal is steady state or when an average power content
is required at each frequency. The frequency spectrum
The great advantages of Butterworth filters are their
smoothness and monotonically decreasing frequency func-
tion, so they do not distort the signal even when properly
filtered (Fig. 4).
1
HðjuÞ ¼ sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
2Nffi (1)
1 þ «2 uup
obtained from the EEG signal can be classified into the The device is capable of real-time monitoring of brain
notable frequency bands shown in Table 1: waves on 4 EEG channels with 256 [Hz] sampling rate and
12 [bit] resolution, and a 3-axis accelerometer and gyroscope
are included to estimate head pose and movement. Pose and
3. SELECTING THE EEG MEASURING movement information will be useful later in the measure-
INSTRUMENTATION [11] ment as motion can cause disturbance in the signal, so if the
EEG waveform and the accelerometer are both jumping and
disturbed at the same time. Source of disturbance signal
The development procedures started with the selection of
caused by the movement and jerking.
proper EEG device that is properly authenticated, can
Fig. 6 clearly shows that the device uses 4 channels, two
communicate wirelessly and is easy to install to patient and
on the forehead and two behind the ear, with the reference
use by non-technical experts as well. There are many EEG
electrode located in the center of the forehead (Fpz). This 4-
metering systems on the market for sport, meditation, and
channel EEG measurement system proved to be sufficient
medical applications, in variable price ranges. Our selection
(in technical and financial terms) for this project, and it is
was the Muse 2016 EEG instrument, which can detect EEG
signals with the same accuracy as a laboratory instrument, possible to extract the data needed to assess the subject’s
state of mind [13]. Bluetooth wireless connection provides a
and comes with a manufacturer-supplied Application Pro-
stable connection in our office and laboratory use, for our
gramming Interface (API) for quick integration into any
measurement, but it should be noted that it may not be
development environment and facilitating the development
suitable for all possible application areas. Wireless connec-
process [12].
tion may be disturbed by other wireless devices utilizing the
Muse EEG is a 4-channel EEG measurement device
same 2.4 GHz ISM band. Cooperation with other Bluetooth
capable of delivering real-time data of EEG signals via
health care devices, such as smart watches or sleep monitors,
wireless connection (Bluetooth Low Energy 4.2.) (Fig. 5)
The technical parameters of the Muse EEG are shown in was not tested.
Table 2.
4. MUSE EEG IMPLEMENTATION IN LABVIEW
Table 1. EEG frequency bands and their characteristics DEVELOPMENT ENVIRONMENT
Name Frequency Features
4.1. Pairing Muse EEG with your computer
d-delta Less than, 4 Fastest and strongest brain wave,
Hz very low frequency, high amplitude. A utility called Muse Direct needs to be installed from the
Usually deep sleep or sleepless Microsoft Store to connect the device to your computer. This
sleep. It is also found in deep application communicates with the device via a Bluetooth
meditation. connection, and then transmits the incoming data to the
q-theta 4–8 Hz Drowsiness, light sleep, deep processing program as an OSC (Open Sound Control)
relaxation or meditation. stream, UDP (User Datagram Protocol). Please note that
a-alpha 8–12 Hz Relaxation, tranquility or peace. Bluetooth was the lower level protocol and TCP/IP protocol
b-beta 12–30 Hz Normal waking awareness, high
was the higher level protocol, where UDP was applied (Fig. 7).
alert, active thinking, anxiety or
focus. Most people work in this
Clicking on the Bluetooth slider will start exploring and
band during the day. connecting to nearby Muse devices. After connection, you
g-gamma More than 30 Fastest brainwave. Hyperactivity or will receive information on signal quality and battery status.
Hz processing of information from
different brain areas.
Fig. 10. Bandwidth Butterworth Filter Program Detail [own figure] Fig. 11. FFT algorithm program snippet [own figure]
3u.csv”. Since the date and time are saved, plus the seconds
to 3 decimal places, it is possible to accurately differentiate
and identify each measurement file.
After the measurement is started, the program creates an
XML database in which the configuration settings are stored.
The most important of these are the serial numbers of the
devices, the name of the person performing the measure-
ments, the resolutions of the devices, the sampling fre-
quency, the path of the measurement file created after the
measurement, the number of channels and the minimum
Fig. 12. FFT graph for EEG signal [own figure] and maximum values. This database can be used to validate
the output of the measurement in terms of configuration
parameters (Fig. 15).
5. TEST MEASUREMENT
Measurement and testing of EEG signals was carried out
with the assistance of a team of medical experts, including
helicopter pilots. Measuring EEG signals first and foremost
requires proper placement of the Muse, as this is the only
way the device can provide valuable, processable signals. The
device’s data sheet states that it works with a dry electrode
system, but for a perfect contact, it is advisable to moisten
the surface of the electrode with a slightly damp or blue
spirit cotton pad (Figs. 16 and 17).
Before starting the measurement, the subject should be Measurements are tracked using graphs that transmit
asked to close his eyes and move as little as possible, as these measured data in real-time to provide an accurate view of
can cause interfering signals in the collected signals, which the measurement process. You can display more than one
could greatly distort the measurement output. graph on the graph at a time, so you can look for correla-
The installation was in all cases done by an expert per- tions between the waveforms of some measured values
son, continuously monitoring the data collected by the de- (Fig. 22).
vice during the measurement. During the measurement the The report calculates the data computed by all programs,
experts found everything was fine, and any fine-tuning was the power, relative and absolute distributions of each fre-
carried out on site (Figs. 18 and 19). quency range, and the percentage distribution of the right
During the test measurement, the gyroscope and the and left hemispheres, all of which appear on the expert panel
accelerometer proved to be useful as these sensors can be for the first and second half of the measurement (Figs. 23–
used to detect whether motion was caused by a disturbance 25).
signal (some disturbing signals such as motion, jerking) or For the sake of clarity, the first and second halves of the
other external sources, interference (Figs. 20 and 21). measurement were distinguished in the hemispheric dia-
gram by two colors, so that they can be clearly distin-
guished. And displaying a chart helps you keep track of the
trend.
6. CONCLUSIONS
In this paper, we presented a technical method and evalu-
ation logic to measure physical and mental fitness/fatigue.
Commercially available, Muse EEG device was used for EEG
measurement and LabView environment was used to
develop evaluation logic. Butterworth filter was applied to
remove unwanted noise from signal, then FFT was applied
to convert time domain to frequency domain. The signal was
classified according to common frequency bandwidths of
brain signals: Delta, Theta, Alpha, Beta and Gamma. The
area covered by FFT signals was also measured to decide the
dominant left or right hemispheres.
In the end, the system is working as expected, all
required functions have been successfully implemented. The
Fig. 17. ECG measurements was done in calm and quiet laboratory system is stable, even for long-term continuous measure-
to minimize external disturbance may has effect on patient’s mind ments. This paper is part of a larger research project, further
state results will be published in [18, 19].
REFERENCES
[15] N. Instruments, Ni Biomedical Toolkit, National Instruments, Trans. Biomed. Eng., vol. 60, no. 4, pp. 1100–10, April 2013.
[Online]. Available: http://sine.ni.com/nips/cds/view/p/lang/hu/ https://doi.org/10.1109/TBME.2012.2215960.
nid/211023 [Hozzaferes datuma: 18 October, 2018]. [18] D. Torma, Gy. Gy} ori, and K. Sarvajcz, “Processing and analyzing
[16] M. R. Lakshmi, T. V. Prasad, and V. C. Prakash, “Survey on psychophysiological data using NI DIAdem software,” Int. Rev.
EEG signal processing methods,” IJARCSSE, Int. J. Adv. Res. Appl. Sci. Eng., IRASE, vol. 11, no. 2, pp. 188–96, 2020. https://doi.
Comput. Sci. Software Eng., vol. 4, no. 1, 2014, ISSN: 2277 org/10.1556/1848.2020.20128.
128X. [19] D. Dezso, G. Gyori, and H. Giza Husi, “Development of ECG
[17] H. Higashi, and T. Tanaka, “Simultaneous design of FIR filter measurement and processing system in labview development
banks and spatial patterns for EEG signal classification,” IEEE environment,” IRASE, Under Publication.
Open Access. This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/
licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited, a link to the CC
License is provided, and changes – if any – are indicated. (SID_1)