Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

2nd International Conference on Current Trends in Engineering and Technology, ICCTET’14 ►113◄

Classification of Human Emotions from EEG


Signals using Filtering and ANFIS Classifier
R.MalathiRavindran
Research Scholar, P.G Department of Computer Applications,
N.G.M College, Pollachi, Coimbatore
Email: rajansunguru@gmail.com

Abstract - Human emotion classification has been an attractive The electroencephalograms (EEG) is plays an
research area in the field of data mining. Several research important role in clinical diagnosis such as identifying the
works have been carried out for investigating the classification brain disorders and neuro-psychological disorders by
system for human emotions. This research article is intended to observing the brain signals [6]. The EEG brain signals used
deal with the classification of human emotions through in the applications such as a Brain Computer Interfaces
Electroencephalogram (EEG). The essential aspects of this (BCIs), identifying the human emotions etc. [7]. The systems
system are feature extraction and accurate classification of the have been used to connect the brain and devices such as
emotion-related EEG-characteristics to attain a significant computers or robotic limbs are called as Brain computer
emotion recognition system. In this research work, the interface [8]. It consist of three essential components such as
emotions and the patterns of EEG signals of human brain are signal acquisition component, signal processing components,
studied. The aim of this work is to investigate the changes in
signal processing component and external device [9]
the brain signals in the domain of different emotions. The
study can be analyzed for its utility in the diagnosis of
psychosomatic disorders like anxiety and depression in
The EEG brain signal has been decoded in the
economical way with higher precision. The modified adaptive several applications such as BCI, clinical diagnosis,
filtering for signal preprocessing is proposed in this system for cognitive science, neuroscience etc. in order to obtain the
removing the noise and artifacts in EEG signal. The adaptive efficient results. The analysis of EEG signals is very similar
neuro fuzzy inference system is also proposed for classifying to the classification problems and it consists of processes
and analyzing the emotions based on the features selected. The such as feature extraction, preprocessing and classification or
proposed system is compared with the existing system and the analysis [10, 11]. The several new algorithms are introduced
performance of the proposed system is evaluated using the in the previous studies for analyzing the brain signals [12].
metrics such as specificity and sensitivity. Even though the signals are analyzed and efficient results are
obtained in the previous studies it have some problems such
Keywords - Brain signal, Adaptive neuro fuzzy inference as noisy signals, high dimensional feature space outliers,
system, adaptive filtering non-stationary of EEG and complicated classification
technique. During the analysis of the brain signal, another
I. INTRODUCTION issue is raised in the previous studies is uncertainty [14]. The
In human body, brain has been considered as a one instability of the mental state, lack of focus, non-stationary
of the important organ. The capacities of the persons such as of brain activities are the main reasons for uncertainty in the
art, language, rational thoughts and moral judgments have brain signal.
been controlled by brain. It is also responsible for each
individual's personality [1]. The brain consists of 100 billion EEG Brain
nerve cells which are used for not only systemizing the Preprocessing Feature
signals extraction
physical actions, but also regulating the unconscious works
such as digestion and breathing. The brain waves have been
observed using the innovative technologies such as
electroencephalograms (EEG) [2], [3], magneto
encephalograms (MEG) [4], and functional MRI (fMRI) [5]. Analysis Classification
These tools or techniques are mainly used for understanding
the complicated mechanisms of the brain. The brain waves
are mainly used as an input in identifying the brain disorders Figure 1. Block Diagram of the system for analysis of Brain signals
such as Alzheimer’s disease and epilepsy.

© IEEE 2014
IEEE Conference Number - 33344
July 8, 2014, Coimbatore, India.
2nd International Conference on Current Trends in Engineering and Technology, ICCTET’14 ►114◄

In this research work, the analyses of brain waves features are extracted for classifying the human emotions
using recorded EEG signals have been explained for such as positive and negative. The author used linear
identifying the emotions in the humans. The general block dynamic approach for smoothing the features extracted from
diagram of analyzing the EEG signals has explained in the the raw signal. The correlation coefficients are used for
figure 1. reducing the dimensions of the features. The algorithm used
in this research has been compared with the existing
Emotions play a significant and powerful role in approaches. The manifold model is used for observing the
everyday life of human beings. The emotions in the human changes in the emotions. The support vector machine is used
beings are used to identify the psychosomatic disorders. for classifying the emotions based on the features obtained
These disorders are occurred because of the changes in brain from the raw signal.
electrical and chemical activities. These changes in the brain
are observed using the electroencephalograms (EEG) as The author mainly focused on recognition of
brain signals and images. In this research work, brain signals “inner” emotions from electroencephalogram (EEG) signals
captured in the machine EEG is used as an input to the in [18]. The real time fractal dimension based algorithm is
proposed system for identifying the human emotions. introduced in this research work for classifying the human
emotions. The algorithm used in this research is mainly
II. RELATED WORK based on the arousal valence emotion model. The
An evidence-based combining classifiers method international affective digitized sounds database is used in
has been introduced in [15] by Kheradpisheh et al (2014) for this research as an input dataset. The author mainly focused
analyzing the brain signals. The author had introduced the on the music and sound stimuli. Finally, the real-time
concept of hybrid classifiers for solving the complex algorithm was proposed, implemented and tested to
problems such as uncertainty in the brain signals. The recognize six emotions such as fear, frustrated, sad, happy,
labeling of each and every training sample had been pleasant and satisfied. Real-time applications were proposed
explained by the author in the feature extraction process. and implemented in 3D virtual environments. The user
Then the belief functions of each and every feature space emotions are recognized and visualized in real time on
retrieved from the feature extraction are evaluated by the his/her avatar adding one more so-called “emotion
author using the combination of classifiers. The results dimension” to human computer interfaces. An EEG-enabled
obtained from this system are compared with the existing music therapy site was proposed and implemented. The
system and the author proved that the system used in this music played to the patients helps them deal with problems
research work is better than the existing systems. Although it such as pain and depression. An EEG-based web-enable
removes the uncertainty in the brain signals better than the music player which can display the music according to the
existing system, still it had some problems during the real user’s current emotion states was designed and implemented.
time implementation.
An optimized EEG-signal based recognition
Hosseini introduced a system for identifying the algorithm along with neural network have been developed in
human emotions using the EEG signal or brain signal as an earlier work [19] to identify feeling based on the spectral
input in [16]. The high order spectra are mainly used for features .Most important features such as spectral ,spatial and
analyzing the EEG signal in this research work. The new sequential features are selected in this work from EEG-
visual induction based acquisition protocol is designed by the signals by applying transformation methods such as Gabor
author used for observing and recording the brain waves. filtering functions and wavelet domain based transformation
The channels used for observing the brain signals is FP1, methods. Final recognition is carried out based on the
FP2, T3, T4 and Pz and two emotion states such as calm- selected from human six basic emotions features , then
neutral and negatively exited are considered. The signals are Probabilistic Neural Network(PNN) classifier with improved
first preprocessed and the features extracted from the signals particle swarm optimization (IPSO) is proposed for
after the preprocessing technique. The high order spectra are recognition process .The experimentation results achieves up
used for extracting the features from the signals. After the to approximately 64.78% in brain-computer interfaces
feature extraction, the genetic algorithm and support vector systems.
machine is used as classifier in this research work. The
results are compared to the existing algorithms such as A statistical classification system has been proposed
Linear Discriminant Analysis (LDA) classifier. in [20] for human emotions through Electroencephalogram
(EEG) bio-sensors. A total of six statistical features are
Dan et alanalyzed the concept of relationship computed from the EEG data and Artificial Neural Network
between EEG signals and emotions of humans in [17]. The (ANN) is applied for the classification of emotions. The

© IEEE 2014
IEEE Conference Number - 33344
July 8, 2014, Coimbatore, India.
2nd International Conference on Current Trends in Engineering and Technology, ICCTET’14 ►115◄

system is trained and tested with the statistical features


extracted from the psychological signals acquired under As seen from the Figure 2, there are four signals
emotions stimulation experiments. The effectiveness of each namely the information (EEG) signal ( ), (the noise signal
statistical feature and combinations of statistical features in ( ) corrupting the desired signal ( ); and the reference
classifying different types of emotions has been studied and signal ( ). EEG signals generally suffers from the
evaluated. In the experiment of classifying four main types interference by the line voltage; thus, in the simulations
of emotions: Anger, Sad, Happy and Neutral, the overall carried out for adaptive FIR filter design, noises with
classification rate as high as 90% is achieved. different frequencies are added to the EEG signal. However,
in simulations realized for adaptive IIR filter design, an
III. METHODOLOGY additive white Gaussian noise (AWGN) is preferred because
A. Preprocessing using modified adaptive filtering of its widespread use in the literature and some important
features that will be mentioned in the next chapter. The
Before analyzing the brain signals, the brain signals reference signal (input signal) ( ) is, similarly, a
need to be suitably processed.For example, in order to correlated version of the n(n). The error signal e(n), which is
remove artifacts, this section is devoted to such equal to the difference between the noisy signal and the
preprocessing approaches. adaptive filter output y(n), is evaluated and fed back to the
EEG recordings typically not only comprises of the adaptation approach to vary the adaptive filter coefficients to
electrical signals from the brain, but also several unwanted minimize a given cost function. The Mean Squared Error
signals [21, 22]: (MSE) cost function to be minimized can be defined as
 Interference from electronic equipment, for ( ) = [| ( )| ]
example, 50 or 60Hz power supply signals,
 Electromyographic (EMG) signals induced through In this equation, represents the expected value.
the muscular activity, For each algorithm, the quality of the solution in the
population is calculated using the following formula
 Ocular artifacts, due to eye movement or blinking. 1
()=
These unnecessary parts may bias the investigation 1+ ( )
of the EEG, and may lead to wrong conclusions [22]. Noise where ( ) is the cost function defined by the above
cancellation is the process of attaining the preferred signal equation.
from a noisy, corrupted signal by eliminating the noise.
Figure 2 denotes the structure of an adaptive noise canceller. In order to calculate the quality of a possible
Modified Adaptive Filters are efficiently used in scenarios solution, a moving scheme is employed for computing ( ).
where signal conditions or system parameters are slowly The cost function is calculated by using a block of K samples
changing and the filter is to be varied to balance the ( = 1000) and the data block is shifted by 1 sample after
variation. The swarm intelligence based Artificial Bee each cycle or iteration.
Colony (ABC) is a search algorithm that can be utilized to B. Feature extraction
provide the approach for optimize the filter coefficients.
After pre- processing, the original EEG signal is
time domain signal and the signal energy distribution is
( )
scattered. The signal features are buried away in the noise. In
= ( )+ ( ) order to attain the features, the EEG signal is investigated to
provide a description of the signal energy as a function of
− + time or/and frequency. Based on previous investigations,
′( ) ( ) features extracted in frequency domain are one of the best to
Adaptive Σ identify the brain actions based on EEG signals.
Filter
The implemented feature extraction algorithms are
based on frequency analysis, Higher Order Statistics (HOS)
integrated with wavelet transform and autoregressive model.
Adaptation
Algorithm The feature extraction approaches based on
frequency analysis operates on earlier described quite freely
chosen segments of signal (for example one second long).
Figure 2. Proposed modified adaptive filtering

© IEEE 2014
IEEE Conference Number - 33344
July 8, 2014, Coimbatore, India.
2nd International Conference on Current Trends in Engineering and Technology, ICCTET’14 ►116◄

For each time window the Discrete Fourier Transform is C. Classification


calculated. The DFT is defined by the formula: Classification is the process of determining the label
of a feature vector x, through a mapping f, where f is learnt
= from a training set T. The main objective of the learning
stage is to provide the algorithm with pre-classified labeled
data (vectors of 320 features), from which the algorithm
The features in this case are absolute values of , constructs the mapping to predict the labels of new data.
that corresponds with the amplitudes of signal components Neural networks have the characteristic of self-study, self-
of kth frequency component. organization, and associational memory which are not
present in the traditional methods. With the strong fault
Another approach to feature extraction uses higher tolerance, based on neural networks, identification models
order statistics. In this case, EEG signal is partitioned into can run steadily and repeatedly [3].
consecutive blocks, for instance, one second length windows
of signal. Blocks can overlap. For each block, wavelet Comparison of these features can be made to
transform is evaluated. The approximations are the low- determine the emotion disorder. As an initial step, detection
frequency components of the signal. The details are the high- of emotional disorder, one clear indication, seizure, is
frequency components. The details of the signal on different determined by comparing EEGs of a patient in normal
decomposition levels are considered. The following features condition & with seizure. Seizure is one of the symptoms
are computed from this signal such as Mean, Standard that may occur in a patient with nervousness. The abnormal
deviation, skewness, kurtosis, mean of absolute values of activity of the brain in epileptic patient is known as seizure
first difference of raw signals, mean of absolute values of condition. This activity appears on the screen of the EEG
first difference of normalized signal. The mean value µ is machine as waveforms of varying frequency and amplitude
computed using the following equation. measured in voltage. In this study, two features, viz., Mean
1 and Variance are compared to detect the seizure occurred in
µ = X the patient.
N
Adaptive Neural Fuzzy Inference Systems classifier
Standard deviation is given by the following equation The last step of the proposed system is
⁄ classification of signals based on the feature extracted. In the
1 proposed approach, ANFIS models are used for
= ( − )
−1 classification. For training the network, back-propagation
Mean of absolute values of first difference of raw signals algorithm is chosen. Using the ANFIS between patterns, a
decision can be made as to identify the human emotions.
1
= | − |
−1 ANFIS architecture comprises of five layers of
Mean of absolute values of first difference of normalized nodes for comparing the sample image with different images
signal in database. Out of the five layers, the first and the fourth
layers consist of adaptive nodes while the second, third and
1 fifth layers consist of fixed nodes. The adaptive nodes are
= − =
−1 interconnected with their respective parameters, duly
Skewness updated with each subsequent iteration while the fixed nodes
are devoid of any parameters [22]-[23]-[24].
( − )
=
Rule 1: If (x is A1) and (y is B1) then (f1 = p1x + q1y + r1)
The kurtosis Rule 2: If (x is A2) and (y is B2) then (f2 = p2x +q2y + r2)
E(x − µ) where x and y are the inputs, Ai and Bi are the fuzzy sets, fi
k=
σ are the outputs within the fuzzy region specified by the fuzzy
Variance rule, pi, qi and ri are the design parameters that are
determined during the training process. The ANFIS
architecture to implement these two rules is shown in Fig. 7,
in which a circle indicates a fixed node, whereas a square
indicates an adaptive node.

© IEEE 2014
IEEE Conference Number - 33344
July 8, 2014, Coimbatore, India.
2nd International Conference on Current Trends in Engineering and Technology, ICCTET’14 ►117◄

Layer 1: fuzzification layer every node I in the layer 1 is an of correct classification as well as time consumed for the
adaptive node. The outputs of layer 1 are the fuzzy training of the neural network. The results show that the
membership grade of the inputs, which are given by: combination computed produced the highest rate of correct
= ( ), = 1,2 (1) classification. Using the features computed by this
combination, 95% of correct classification rate is achieved
= ( ), = 3,4 (2) for the classification of 5 types of emotions with 12.68
seconds consumed for training. In terms of time
where and is the inputs to node , where is a consumption, the combination of equation (9) is the lowest at
linguistic label (small, large) and where ( ), ( ) 7.50 seconds but only achieved 78.33% in terms of
can adopt any fuzzy membership function. Usually we performance.
choose ( ), to be bell-shaped with maximum equal to 1
and minimum equal to 0, such as: The performance of an EEG-based emotion
recognition algorithm is frequently evaluated by means of
(3)
( ) = 1/1 + ( − )/ classification accuracy as following: the percentage of
where (a , b andc ) are the parameters of the emotions correctly identified which is calculated by:
membership function. Parameters are referred to as premise
parameters. number of correct classi ied
Classi ication accuracy =
Layer 2: rule layer a fixed node labeled M whose output is number of total emtions
the product of all the incoming signals, the outputs of this
layer can be represented as:
= = ( ) ( ) = 1,2 (4)
Classification accuracy
Layer 3: normalization layer are also fixed node is a circle 100
90
Classification accuyracy(%)
node labeled N.
80
= = = 1,2 (5) 70
( + ) 60
50
Layer 4: defuzzification layer an adaptive node with a node: 40
The output of each node in this layer is simply the product of 30
the normalized firing strength and a first order polynomial. 20
= = ( + + ) = 1,2 (6) 10
0
Layer5: summation neuron a fixed node which computes the SVM BPNN ANFIS
overall output as the summation of all incoming signals. Classifiers
(7)
Figure 3. Comparison of classification accuracy
= = /( + )
MATLAB has been used to implement algorithm.
In order to estimate the performance of systems and calculate
It can be seen that there are two adaptive layers in
the classification accuracy, the systems are trained with 80%
this ANFIS architecture, namely the first layer and the fourth
of dataset. Table 2 shows the values of influence parameters
layer. In the first layer, there are three modifiable
at the performance, which is used to simulate the proposed
parameters {a , b and c } , which are related to the input
algorithm.
membership functions. These parameters are generally
Sensitivity and specificity
termed as premise parameters. In the fourth layer, there are
T
also three modifiable parameters { , , } pertaining to the Sensitivity =
first-order polynomial. These parameters are the so-called T +F
consequent parameters. T
Speci icity =
IV. EXPERIMENTAL RESULTS T +F
The results for the classification of 5 types of where is defined as positive results against
emotions are as shown in Table 4. The effectiveness of the is defined as negative results
combinations of statistical features is compared based on rate is defined as negative results

© IEEE 2014
IEEE Conference Number - 33344
July 8, 2014, Coimbatore, India.
2nd International Conference on Current Trends in Engineering and Technology, ICCTET’14 ►118◄

is defined as positive results The signal is then passed through the filters of different
frequencies to separate alpha, beta, delta and theta waves.
SVM BBPNN The features are extracted from these signals. After
ANFIS analyzing Mean, Power Spectral Entropy and Variance of
1.2 both normal and seizer EEG signals, it was found that using
Variance gives more accurate information about the seizure
1 in EEG signal among the given feature sets. This technique
has revealed the possibility of precise diagnosis of
0.8 psychosomatic disorders in more simple and economical
Sensitivy

0.6 way.

0.4 REFERENCES

0.2 [1] Ashish Panat and Anita Patil “Study of the EEG Signals of
Human Brain for the Analysis of Emotions” dvances in
0 Computing and Information Technology Advances in
Intelligent Systems and Computing Volume 177, 2013, pp
1 2 3 4 5 6 7 8 9 10 659-665.
Number of samples [2] P. Nunez and R. Srinivasan, Electric Fields of the Brain: The
Neurophysics of EEG, Oxford University Press, 2006.
[3] S. Sanei and J. Chambers, EEG signal processing, Wiley-
Figure 4. Sensitivity Comparison Interscience, 2007.
[4] Cohen D., 1972. Magnetoencephalography: detection of the
SVM brain’s electrical activity with a superconducting
magnetometer. Science 175:664–66.
BBPNN
1.2 ANFIS(proposed) [5] Scott A. Huettel, Allen W. Song, Gregory McCarthy,
Functional Magnetic Resonance Imaging, Sinauer Associates,
1 2004.
[6] Sanei S, Chambers J (2007) EEG signal processing.
0.8
Specificity

Chichester: Wiley-Interscience.
[7] Lebedev MA, Nicolelis MA (2006) Brain machine interfaces:
0.6 past, present and future. Trends in Neurosciences 29: 536–
546.
0.4 [8] Wolpaw JR, Birbaumer N, McFarland DJ, Pfurtscheller G,
Vaughan TM (2002) Brain-computer interfaces for
0.2 communication and control. Clinical Neurophysiology 113:
767–791.
0
[9] Allison B, Wolpaw E, Wolpaw J (2007) Brain-computer
1 2 3 4 5 6 7 8 9 10 interface systems: progress and prospects. Expert review of
medical devices 4: 463–474.
Number of samples [10] Nicolas-Alonso L, Gomez-Gil J (2012) Brain computer
interfaces, a review. Sensors 12: 1211–1279.
Figure 5. Specificity Comparison
[11] Hsu WY (2010) EEG-based motor imagery classification
using neuro-fuzzy prediction and wavelet fractal features.
The figure 4 and 5 shows the graphical Journal of Neuroscience Methods 189: 295–302.
representation of proposed system for identifying the [12] Furdea A, Ruf C, Halder S, Massari DD, Bogdan M, et al.
emotions in human and the performance of the proposed (2012) A new (semantic) reexive brain-computer interface: In
system is better than the existing system. search for a suitable classifier. Journal of Neuroscience
Methods 203: 233–240.
V. CONCLUSION [13] Blankertz B, Curio G, Muller K (2002) Classifying single
trial EEG: Towards brain computer interfacing. Advances in
The study has proved the effective utility of Neural Information Processing Systems 1: 157–164.
economical and simple method of study of brain using EEG [14] Herman P, Prasad G, McGinnity T (2005) Investigation of the
for diagnosis the different emotion disorders viz., anxiety type-2 fuzzy logic approach to classification in an EEG-based
and depression. One of the major symptoms, seizure is brain-computer interface. In: 27th Annual International
analyzed in this study. The EEG signal in EDF format is Conference of the Engineering in Medicine and Biology
Society. 5354–5357.
converted into .WAV format using EDF to WAV converter.

© IEEE 2014
IEEE Conference Number - 33344
July 8, 2014, Coimbatore, India.
2nd International Conference on Current Trends in Engineering and Technology, ICCTET’14 ►119◄

[15] Kheradpisheh SR, Nowzari-Dalini A, Ebrahimpour R,


Ganjtabesh M (2014) An Evidence-Based Combining
Classifier for Brain Signal Analysis. PLoS ONE 9(1): e84341.
oi:10.1371/journal.pone.0084341
[16] Seyyed Abed Hosseini “Classification of Brain Activity in
Emotional States Using HOS Analysis” I.J. Image, Graphics
and Signal Processing, 2012, 1, 21-27.
[17] Dan Nie ; Xiao-Wei Wang ; Li-Chen Shi ; Bao-Liang Lu
“EEG-based emotion recognition during watching movies”
5th International IEEE/EMBS Conference on Neural
Engineering (NER),pp. 667 – 670, 2011.
[18] Yisi Liu, Olga Sourina, Minh Khoa Nguyen “Real-Time
EEG-Based Emotion Recognition and Its
Applications”Lecture Notes in Computer Science Volume
6670, 2011, pp 256-277.
[19] Saadat Nasehi, Hossein Pourghassem “An Optimal EEG-
based Emotion Recognition Algorithm Using Gabor Features”
WSEAS TRANSACTIONS on SIGNAL PROCESSING
Issue 3, Volume 8, July 2012.
[20] 1Chai Tong Yuen, 2Woo San San, 3Jee-Hou Ho and 4M.
Rizon “Effectiveness of Statistical Features for Human
Emotions Classification using EEG Biosensors” Research
Journal of Applied Sciences, Engineering and Technology
5(21): 5083-5089, 2013.
[21] Delorme A., Sejnowski T., and Makeig S., 2007. Enhanced
detection of artifacts in EEG data using higher-order statistics
and independent component analysis. Neuroimage
34(4):1443–9.
[22] Abdulkadir Sengur., “An expert system based on linear
discriminant analysis and adaptive neurofuzzy inference
system to diagnosis heart valve diseases,” Expert Systems
with Applications, 2008.
[23] G. Zhao, C. Peng and Xiting Wang., “Intelligent Control for
AMT Based on Driver’s Intention and ANFIS Decision-
Making,” World Congress on Intelligent Control and
Automation, 2008
[24] Anupam Das, J. Maiti and R.N. Banerjee., “Process control
strategies for a steel making furnace using ANN with
bayesian regularization and ANFIS,” Expert Systems with
Applications, 2009.

© IEEE 2014
IEEE Conference Number - 33344
July 8, 2014, Coimbatore, India.

You might also like