Towards automated quality assessment measure for EEG signals

Towards automated quality assessment measure for EEG signals

Neurocomputing (xxxx) xxxx–xxxx Contents lists available at ScienceDirect Neurocomputing journal homepage: www.elsevier.com/locate/neucom Towards a...

1MB Sizes 72 Downloads 102 Views

Neurocomputing (xxxx) xxxx–xxxx

Contents lists available at ScienceDirect

Neurocomputing journal homepage: www.elsevier.com/locate/neucom

Towards automated quality assessment measure for EEG signals Shady Mohamed, Sherif Haggag, Saeid Nahavandi, Omar Haggag Institute for Intelligent Systems Research and Innovation, Deakin University,Geelong, Australia1

A R T I C L E I N F O

A BS T RAC T

Communicated by Wei Wu

EEG signals provide the means to understand how the brain works and they can be used within a wide range of applications; especially BCI applications. The main issue that affects the performance of such applications is the quality of the recorded EEG signal. Noise produced during the recording of the EEG signal impacts directly on the quality of the acquired neural signal. BCI applications performance is susceptible to the quality of the EEG signal. Most BCI research focuses on the effectiveness of the selected features and classifiers. However, the quality of the input EEG signals is determined manually. This paper proposes an automated signal quality assessment method for the EEG signals. The proposed method generates an automated quality measure for each EEG frequency window based on the EEG signal bands characteristics as well as their noise levels. Six scores were developed in this research and the quality of the EEG signal is postulated based on these scores. This EEG quality assessment measure will give researchers an early indication of the quality of the signal. This research will help in testing new BCI algorithms so that the testing could be made on only high quality signals. It will also help BCI applications to react to high quality signals and ignore lower quality ones without the need for manual interference. EEG data acquisition experiments were conducted with different levels of noise and the results show the consistency of our algorithms in estimating the accurate signal quality measure.

Keywords: EEG signal DCT BCI Neural signal

1. Introduction Neurons communicate with each other using electrical spikes that carry the information required for a specific activity. Electroencephalogram (EEG) is the standard means by which we record neural signals that includes different waves and spikes with varying amplitudes and frequencies [1–5]. These signals are recorded by placing a set number of electrodes on the human scalp [6]. Billions of neurons communicate together with electrical pulses, forming a huge complicated neural network [7,8]. There are many challenges in recording the EEG signal [9,10]. Some sources other than the brain produce unwanted electrical interference, which is recorded with the cerebral activity and increases the noise in the recorded EEG [11]. Sometimes the signal can be fully corrupted and needs to be reacquired [12]. The noise affecting the quality of the EEG signals originates mainly from the non-cerebral activities taking place at the time of recording. Non-cerebral activities can be divided into two categories. The first category is the physiological activity, which is generated by organs in the human body, other than the brain, such as muscles and limbs. The second category is external environmental factors. Fig. 1 shows the effect of an eye blink on the quality of the acquired EEG signal. Many feature extraction and classification techniques have been developed in the past few years to improve the performance of the BCI

1

applications [13,14]. However, the EEG data recording process has a significant impact on the resulting performance of the BCI algorithms. The traditional method is to observe the recorded signal and discard the highly corrupted parts that are clearly contaminated with noise. However, there are some inherent noise features within the signal that cannot be clearly observed. Having means of measuring the quality of the recorded EEG signal will be of a great importance to detect these features and highlight only the reliable parts of the signal [15–17]. The main objective of this section is to generate an automated quality assessment measure for an input EEG signal through generating automated scores that evaluate the quality of the signal while recording. These scores are based on biological and mathematical features where signal processing techniques are needed. This idea has many benefits such as: • Online quality assessment: While recording the EEG signal, our system will give an online alert when any channel has abnormal behavior. This will help researchers decide whether to stop recording and resolve the noise-generating issues, or continue recording. • Important factor in BCI applications: The proposed scores can be used as input to BCI applications. This will increase the accuracy of BCI applications, as the brain commands will be handled with different levels of confidence based on the quality of the signal.

URL: http://www.deakin.edu.au.

http://dx.doi.org/10.1016/j.neucom.2017.01.002 Received 18 March 2015; Received in revised form 25 November 2016; Accepted 2 January 2017 0925-2312/ © 2017 Elsevier B.V. All rights reserved.

Please cite this article as: Mohamed, S., Neurocomputing (2017), http://dx.doi.org/10.1016/j.neucom.2017.01.002

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

when the level and type of noise is unknown [28]. An example, it is an easy procedure to detect eye blinking artifact while recording the EEG signal and most EEG recording software has an eye blinking detection algorithms [29]. On the other hand, there are many factors that affect and sometimes destroy the recording such as electromagnetic signals, high power cables under the buildings and mobile phone signals. These factors are harder to detect [30,31]. In order to tackle the issue of minimizing the environmental noise we must be able to differentiate between the noise and the signal, and to avoid compromising the signal quality while removing the noise. One of the ways to remove the noise is through using the wavelet transform proposed in [32,33]. The main problem with this method is that it assumes that the signal's magnitude dominates the noise's magnitude in any wavelet representation. This assumption may not hold for many neural signal recordings. The target of this research is not to minimize the noise in an EEG signal, however, the target is to identify the quality of the EEG signal. EEG signals have specific features that can provide more information about the quality of a signal's recording. These features are the biometric features of the signal bands which we use in this research. Each EEG signal consists of a range of signals within different frequency bands [5]. These bands are the Alpha, Beta, Theta and Delta as shown in Fig. 2 [34]. Different quality scores were created based on these bands. These scores show whether or not we can rely on the recorded EEG signal. To our knowledge, this is considered the first automated measure that assesses the EEG signal in terms of biological and statistical point of view. The rest of the paper is organized as follows: Section 2 is the Methodology which explains each quality score in details. Section 3 is the results section where the results of each score are shown and analyzed. Section 4 shows our system validation in BCI applications. Finally, the last section includes the conclusion and future work.

Fig. 1. Eye blinking/movement effect on the EEG signal.

Earlier research has been made to analyze, diagnose or even remove the noise from EEG signals as in [18–21]. However, this research is not about diagnosis, analysis or noise removal. This research is mainly about giving an automated online indicator of the reliability of the acquired signal. Suggesting means to remove the detected noise which is outside the scope of this paper. As an example, an alert will appear to the researcher while recording the data if the data is corrupted with an indication of the degradation in the quality of the signal [22,23]. During the EEG acquisition process, the electrodes record the signals which are generated by a specific number of neurons. The difficulty is that there is little control over the number of neurons captured in the recordings, so any unneeded number of spikes will decrease Signal-to-Noise Ratio (SNR) [24,25]. It is not possible to record the neural signals without the biological noise, but it is a relatively easy job to detect them or remove them after recording and analyzing the neural signal [22,25–27]. The effect of the technical factors can be minimized by knowing the amount of SNR. The difficulty in minimizing technical factors is due to the level of the SNR. To validate the accuracy of our scores, we recorded a normal signal carefully and then we added noise to the signal. We controlled the percentage on noise based on the SNR value as we already have the original clean signal. Although it is not a difficult task to detect the occurrence of biological noise and a wide range of methodologies to remove this kind of noise is available. It is more challenging to remove the noise

2. Methodology The main idea for this research is to generate an automated quality assessment measure for an input EEG signal. Our model generates six scores which indicate the quality of the signal. The first score is calculated based on the general amplitude of the EEG channels. The second score is calculated based on which channel has the highest amplitude. The third score is based on calculating the dominant frequency for the channels. The last three scores depend on the

Fig. 2. EEG raw data is shown in the top figure, then the main frequency bands are shown in the rest of the figures. The main EEG frequency bands are Delta, Theta, Alpha and Beta as shown respectively.

2

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

case scenario of EEG to have these values and it is not likely to exceed these values for any acceptable reason. EEG signal distortion can be manifested by reduction in amplitude; a decrease of dominant frequencies beyond the normal limit and production of spikes or special patterns. Epileptic conditions produce stimulation of the cortex and the appearance of high-voltage waves (up to 1000 μV) [36]. High amplitude is a very important factor in assessing the EEG signal. A histogram is plotted to show the amplitude's count in each bin. After that a percentage is calculated based on the count of normal bins which are between −100 and 100 μV and the count of all other bins. Algorithm 1. Calculating General Amplitude Score. procedure CHECKGENERALAMPLITUDE NormalValuesSum1 ← sum(bincounts(91:111)) TotalSum1 ← sum(bincounts) s1 ← NormalValuesSum1/TotalSum1 NormalValuesSum2 ← length(find(p(91:111) > 0)) TotalSum2 ← length(find(p > 0)) s2 ← NormalValuesSum2/TotalSum2 Score 1 ← ((s1 + s2)/2)*100

Fig. 3. International 10–20 system is a way to describe the location of scalp electrodes. These scalp electrodes are used to record the EEG signal.

amplitude and the geometrical shape of the bands of each channel. The following sections describe the overall methodology of the research, with an emphasis on how the six scores are used to assess EEG quality.

2.3. Splitting EEG data frequency bands The recorded EEG data were split to four different frequency bands, Delta, Theta, Alpha and Beta. Butterworth filter has been used successfully in splitting the bands [37,38]. The fourth order Butterworth filter was used to split the EEG bands as it is designed as an Nth order lowpass digital filter, as described in the following equation:

2.1. Recording EEG data Prerecorded EEG signal database was used to test the effectiveness of the proposed scores [35]. The EEG data were recorded using the Neurofax EEG system and the electrodes were placed based on the International 10–20 system, as shown in Fig. 3. The participants sat on a reclining chair facing a video screen, and they were asked to remain motionless during the performance. Data were collected from three subjects with ten daily sessions for each subject. Each session consisted of six runs. These 180 runs were used in the experiments. The recording was done at 160 Hz, while the AC lines in the host country operate at 50 Hz. The data were exported with a common reference using Eemagine EEG. Fig. 2 shows the frequency bands of the EEG signal. Delta waves which always appears while deep sleeping and its frequency ranges from 0 to 4 Hz. While a sample of the Theta waves were shown in the second graph, its frequency ranges between 4 Hz and 8 Hz and it appears while normal sleeping. The third graph shows a sample of the Alpha wave which usually appears when the person is awake and resting and its frequency ranges between 8 Hz and 12 Hz. The standard properties of the low gamma wave are not well known so it is hard to use them as a baseline. A sample of the Beta wave is shown in the last graph, and it appears when the person is awake doing a mental activity and its frequency ranges between 12 Hz and 40 Hz.

H (z ) =

b(1) + b(2)z−2 + ⋯ + b(n + 1)z−n 1 + a(2)z−1 + ⋯ + a(n + 1)z−n

(1)

where n=4 and H is the filter coefficient in length n+1, row vectors a and b are the transfer function coefficients of the filter, with coefficients in descending powers of z. The main advantage of Butterworth filters is their smooth, monotonically decreasing frequency response. 2.4. Analyzing the Alpha band (Scores 2 and 3) There are two scores calculated through analyzing the Alpha band. The first score (Score 2) requires that the highest amplitude should occur in O1, O2, P3, P4, T5, T6, C3, C4, A1, A2, T3 and T4 channels, based on the biological description of a normal and clean EEG [5,36,39–42]. Therefore, our system checks the highest amplitude depending on Algorithm 2. In order not to be affected by any outliers, the highest 1% of the amplitude values is considered the highest amplitude in each window, this will solve any outlier's misguidance. Alpha band characteristics of normal EEG are described in [39] beside the Theta and Beta characteristics. It will be hard for a person who has seizure to control his body during the seizure. Accordingly, our system considers epileptic or paroxysmal segments as abnormality. The scores will warn the BCI application of abnormal behavior. For example, our system will show low scores if a person is using a BCI application to control a wheelchair while having a seizure.

2.2. Analyzing the amplitude of each channel (Score 1) The EEG amplitude (voltage) was analyzed for each channel. A histogram of the count of each amplitude value was created. The histogram shape will be perfect if the values are increasing to a maximum value and then decreasing only once. There will be a problem in the quality of the data if this pattern is inconsistent and appears more than once in the histogram. The larger the number of peak changeover from increasing to decreasing amplitude scores in the overall signal, the lower the quality of the signal. As shown below, Algorithm 1 was developed to calculate Score 1. It mainly counts the repetition of each amplitude value. Then it divides the amplitudes into small bins, each bin carries a specific amplitude range between −1000 and 1000 μV and the width of each bin is 10 μV. The reason behind selecting −1000 and 1000 μV is that it is the worst

Algorithm 2. Calculating Highest Amplitude Score. 1: 2: 3: 4: 5: 6: 3

procedure CHECKHIGHESTAMPLITUDE Foreach Channel C in All Channels HighestAmplitudes(C ) ← Get Maximum Values in each channel End Foreach Sort HighestAmplitudes Foreach Channel C in Channels O1,2 P3,4 T5,6 C3,4 A1,2

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

high. The algorithm for calculating the Alpha band's second score is shown below, as Algorithm 3.

T3,4 7: 8: 9: 10: 11: 12: 13: 14:

index ← Find Index of C in HighestAmplitudes IFindex > NumberOfElectrodes /2 score +=1 ELSIFindex > NumberOfElectrodes /4 score +=0.5 ENDIF End Foreach Score 2 = (score /10)*100

Algorithm 3. Calculating Dominant Frequency Score. procedure CHECKDOMINANTFREQUENCY Channels: FP1, FP2, F3, F4, C3, C4, P3, P4, O1, O2, F7, F8, T3, T4, T5, T6 Foreach Channel C in Channels 4: domFreqC ← CalculateDominantFrequency(C) End Foreach 6: left ← [domFreqFP1, domFreqF 3, domFreqC 3, domFreqP 3, domFreqO1, domFreqF 7, domFreqT 3, domFreqT 5] 8: right ← [domFreqFP 2, domFreqF 4, domFreqC 4, domFreqP 4, domFreqO2, domFreqF 8, domFreqT 4, domFreqT 6] 10: score3=correlation between left and right procedure CHECKDOMINANTFREQUENCY(SIGNAL) 12: fftLength ← length(signal) xdft ← fft(signal, fftLength) 14: FrequencySpectrum ← 200 freq ← [0: fftLength − 1].* (FrequencySpectrum/fftLength) 2:

The second score within the alpha waves checks the dominant frequency in each channel, as the dominant frequency should be similar in each hemisphere in normal relaxing conditions. Fig. 3 shows the left and the right hemispheres in different colors and the correlation between adjacent channels in each hemisphere should provide a measure of the quality of the signal recording. For example, the dominant frequency as calculated for FP1 channel should be similar to the same channel in the other hemisphere, which is FP2. This measure should be applied to all channels. The symmetry percentage is calculated between both hemispheres and it ranges between 0, which means no symmetry at all, and 100, which means they are identical. The score threshold is based on the actions of the participant and the BCI application used for it. For this reason the score has a threshold, which is set by the user. If there is no action needed from the participant the score threshold will be high. On the other hand, the threshold will go down if there is an action done by the user which will lead to asymmetry. So, this score is an indication of good quality signal but not necessarily indication of a bad signal. As an example, the occipital lobe is one of the four major lobes of the cerebral cortex in the human brain. The occipital lobe is the visual processing center of the brain containing most of the anatomical regions of the visual cortex. Damage to one side of the occipital lobe causes homonomous loss of vision with exactly the same “field cut” in both eyes. So if the action is based on watching visual images, there will be a common vision area between the two eyes which leads to having a similarity between the two signals reaching the occipital lobe and this will lead to symmetry between the signals recorded for the occipital lobe on both hemispheres, hence the score threshold is expected to be

16: 18:

freqsCareAbout ← freq(freq < Fs/2) xdftYouCareAbout ← abs(xdft(1: round(fftLength/2))) [maxVal, index ] ← max(xdftYouCareAbout) maxFreq ← freqsCareAbout(index)

2.5. Analyzing the Beta band (Scores 4 and 5) There are two scores to indicate the accuracy of the Beta wave. The first score (Score 4) is calculated based on the amplitude of the Beta wave of each channel. The amplitude should not exceed 20 μV in any of the channels [39]. Our score checks all the values which exceed the known maximum amplitude. This step is calculated for each window frame and the score will not be affected if we have one, two or three outliers but it will be affected if we have tens or hundreds of outliers as

Fig. 4. Sub-figure (a) shows the steps of calculating the Beta Amplitude Score. While sub-figure (b) shows the steps of calculating the Beta Amplitude Score for a channel.

4

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

the normal clean signal should not have these many outliers. Score 4 is calculated based on the percentage of samples exceeding the maximum amplitude. The algorithm for calculating Score 4 is shown below in the Flowcharts 1.1 and 1.2 and its pseudocode is shown in Algorithm 4 (Fig. 4).

4: BetaT 4, BetaT 5, BetaT 6, BetaFZ , BetaCZ , BetaPZ 5: Foreach Betawave B in Betawaves 6: dct (B ) ← dctcomparison(B ) 7: score5 = Average(dct ) 8: procedure DCTCOMPARISON(SIGNAL) 9: Signaldct ← CalculateDCT (signal ) 10: AbsSignaldct ← CalculateAbsoluteValue(Signaldct ) 11: [SortAbsSdct , indices] ← sort (AbsSignaldct , ’descend’) 12: i←1 13: while norm(SortAbsSdct (indices(1: i )))/ norm(Signaldct ) < 0.99 do 14: i←i+1 15: Sinusoidalpercentage ← 1/ i

Algorithm 4. Calculating Beta Amplitude Score. 1: 2:

procedure CHECKBETAAMPLITUDE Betawaves: BetaFP1, BetaFP2, BetaF3, BetaF4, BetaC3, BetaC4, 3: BetaP3, BetaP4, BetaO1, BetaO2, BetaF7, BetaF8, BetaT3, 4: BetaT4, BetaT5, BetaT6, BetaFZ, BetaCZ, BetaPZ 5: Foreach Betawave B in Betawaves 6: i ← find (absolute(B ) < maxamp ) 7: n ← length(i ) 8: scores(B) ← n / length(B ) 9: End Foreach 10: score 4 ← Average(scores )

2.6. Analyzing the Theta band (Score 6) The Theta band ranges between 4 and 7 Hz and its amplitude should not exceed 30 μV [39]. A score is calculated based on the amplitude of the Theta wave of each channel. The amplitude should not exceed 30 μV in all the channels. This score is calculated based on the percentage of samples exceeding the maximum amplitude. The algorithm used is the same as utilized when analyzing the Beta wave, using the details in Algorithm 4.

The second score (Score 5) that is generated from the beta wave analysis is checking if the wave is sinusoidal or not. The closer the beta wave to a sinusoidal pattern, the higher quality it represents. The signal is divided into windows, where each window has a specific number of samples. The signal has to be transformed from the time domain to the frequency domain, based on the Discrete Cosine Transform (DCT). DCT is used to represent the amount of energy stored in the signal. Then we calculate how many DCT components are needed to represent 99% of the energy in the same signal. Next, we reconstruct the signal using the extracted components and check the correlation between the generated signal and the original signal. The equation below, Eq. (2), is utilized to compute the DCT, where N is the number of samples in each window. This is represented as: N ⎞ ⎛ π y(k ) = w(k ) ∑ x (n )cos⎜ (2n − 1)(k − 1)⎟ ⎠ ⎝ 2N n =1

3. Experimental results There are six scores that are produced by our proposed system to evaluate the input EEG signal. As stated in Section 2.1 of the methodology, the EEG data were recorded using the Neurofax EEG system and the electrodes were placed based on the International 10– 20 system as shown in Fig. 2. Different noise levels were added to the EEG signal after recording it to validate our system. Close noise levels were used in the first experiment which are 0.1, 0.5, 1 and 2. In the second experiment, noise levels difference was increased to 0.1, 1, 5 and 10 and at the last experiment it was increased to 0.1, 1, 10 and 100.

k = 1, 2, 3‥, N

where

⎧ ⎪ ⎪ w (k ) = ⎨ ⎪ ⎪ ⎩

1 , if k = 1 N 2 , 2≤k≤N N

3.1. General Amplitude Score (Score 1) The EEG signal's amplitude (voltage) was analyzed for each channel. The idea was to count the number of occurrences for each amplitude value. Then a histogram of the count of each amplitude value was drawn based on the details shown in Section 2. The histogram will be perfect if the count values increase and then reduce with increasing amplitude values. The quality of the signal decreases if there are more than one peak changeover from increasing to decreasing amplitude scores in the signal. The larger the number of peak changeovers from increasing to decreasing amplitude scores in the overall signal, the lower the quality of the signal. The first experiment is using a clean EEG signal with the addition of some close noise levels (SNR=0.1, 0.5, 1, 2). The same experiment was repeated two more times but with different noise levels, noise levels 0.1, 1, 5 and 10 were used for the second experiment and 0.1, 1, 10 and 100 were used in the third experiment. The developed score system was able to generate low score for the high noise level and high score for the low noise level as shown in Fig. 6. Also Fig. 7 shows the effect of noise on General Amplitude Score using each individual channel. The incorrect amplitude is shown in red and the correct amplitude is shown in blue. Kurtosis measure was used to support our score, it is a measure of whether the data are peaked or flat relative to a normal distribution [43]. It was used to reveal the peakedness or flatness of the bins distribution as shown in Fig. 7, it showed that flatness of the distribution increased when the noise increased. In the first experiment, the Kurtosis values were 4.0849, 21.7938, 38.0479 and 55.8012 when the noise levels were 0.1, 0.5, 1 and 2 respectively. Then Kurtosis

(2)

Then the DCT components are sorted in a descending order. The original signal is reconstructed using the least number of DCT components based on flowchart shown below in Fig. 5. The inverse DCT is used to return the signal back to the time domain. The equation below, Eq. (3), details the formulation of the Inverse Discrete Cosine Transform where y is the DCT of the signal x: N

x (n ) =

⎛ π (2n − 1)(k − 1) ⎞ ⎟ ⎠ 2N

∑ w(k )y(k )cos⎜⎝ k =1

n = 1, 2, 3‥, N

where

⎧ ⎪ ⎪ w (k ) = ⎨ ⎪ ⎪ ⎩

1 , if k = 1 N 2 , 2≤k≤N N

(3)

Fig. 5 shows the steps for calculating the Sinusoidal Score. The algorithm pseudocode is shown in Algorithm 5. Algorithm 5. Calculating Sinusoidal Score. 1: 2: 3:

procedure CHECKSINUSOIDAL Betawaves: BetaFP1, BetaFP 2, BetaF 3, BetaF 4, BetaC 3, BetaC 4 , BetaP 3, BetaP 4, BetaO1, BetaO2, BetaF 7, BetaF 8, BetaT 3, 5

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

Fig. 5. Steps for calculating the Sinusoidal Score. The first step is to transform the signal to the frequency domain using DCT. The following step is to count how many DCT components are needed to restore 99% of the energy of the same channel. Then, the extracted components are used to reconstruct the signal. Finally, the correlation between the generated and the original signal is calculated.

proportional to the score. In the second series of experiments, the SNR was increased to be 0.1, 1, 5 and 10 and then in the third series of experiments, the SNR it was increased to be 0.1, 1, 10 and 100, the score increased as well while increasing SNR as shown in Fig. 8 and this indicates that our score is accurate.

values were increased to 4.1021, 37.9853, 68.2545 and 70.7982 in the second experiment. Finally, Kurtosis values became 4.0910, 38.0452, 70.8802 and 71.8349 respectively in the last experiment.

3.2. Highest Amplitude Score (Score 2) 3.3. Dominant Frequency Score (Score 3)

Score 2 is calculated based on the highest amplitude in the alpha band of each channel. This score requires that the highest amplitude between channels should occur in the O1, 2 P3, 4 T5, 6 C3, 4 A1, 2 T3, and 4 channels, so the system checks the highest amplitude and generates the score based on it. Different noise levels were applied as in Section 3.1. Fig. 8 shows the accuracy of the score based on the noise level. The SNR is directly

Score 3 mainly depends on the dominant frequency of the alpha wave in each channel, as the dominant frequency should be similar in each hemisphere in relaxing state. The dominant frequency is calculated for each channel and then the correlation of corresponding channels in each hemisphere is calculated. The correlation percentage

Fig. 6. Relation between General Amplitude Score and SNR. General Amplitude Score ranges between 0 and 100. The signal is more noisy when the score value decreases. Sub-figures (a)–(c) show the output of the General Amplitude Score but the difference between each sub-figure is the noise levels being used. Sub-figure (a) shows the score when noise levels 0.1, 0.5, 1 and 2 were applied, then the noise level range was increased to be 0.1, 1, 5 and 10 in sub-figure (b) and the score increased while increasing the SNR as shown. The noise level range was increased again to be 0.1, 1, 10 and 100 in sub-figure (c). As shown in all sub-figures, the General Amplitude Score is directly proportional to the SNR.

6

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

Fig. 7. The histogram of the amplitude of the EEG data were drawn. The normal EEG data ranges between −100 and 100 μV which is shown in blue and the abnormal range was drawn in red. Each raw shows the histogram of a certain channel, and each column shows different noise levels (the SNR increase while moving from left to right). As shown, the red bars decreases gradually while moving from left to right as the noise decreases and the amplitude returns to the normal range.

Fig. 8. Highest Amplitude Score and SNR values are directly proportional as shown in subfigures (a)–(c). Subfigure (a) shows that the score was less than 20% when SNR was 0.1. Then the score was around 80% when SNR value became 10 as shown in subfigures (b) and (c).

very low, but it increased in the subsequent experiments as the SNR was increased to 0.1, 1, 5 and 10 for the second experiment and to 0.1, 1, 10 and 100 in the third one. Figs. 9a–c show that the score is affected significantly by the noise level and this indicates that the score is very meaningful.

is calculated between both hemispheres and it ranges between 0 which means no symmetry at all and 100 which means they are identical. The same noise levels were introduced as previous experiments. The results indicated an increasing score as the SNR increased. The Dominant Frequency Score was of such a low percentage accuracy as the SNR was 7

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

Fig. 9. The figure shows the relation between Dominant Frequency Score and SNR. Subfigure (a) shows the score values when the SNR was very low, the score values were low as well which indicates that the score and the SNR values are directly proportional. Then SNR values were increased which lead to an increase in the score values as shown in subfigures (b) and (c).

Fig. 10. Series of different SNR values were applied as shown in subfigures (a)–(c), the score increased while increasing the value of SNR which indicates that the score and SNR values are directly proportional.

Fig. 11. Beta Sinusoidal Score mainly based on calculating the percentage between two norm vectors. The signal will not be in a sinusoidal shape when it is mixed with noise, which means that it needs a lot of DCT components to generate the original signal. Subfigures (a)–(c) shows the relation between Beta Sinusoidal Score and SNR. Different noise levels were applied and the score increased when the noise decreased.

3.4. Beta Amplitude Score (Score 4)

exceeding the maximum amplitude, the more noise is included in the signal. The Beta Amplitude Score is the percentage of the samples exceeding the maximum amplitude over the total number of samples in the signal window. Fig. 10 shows how the quality of the signal affects Beta Amplitude Score, the score is low if the noise in the signal is high.

This score depends mainly on the Beta band. It is calculated based on the amplitude of the Beta wave of each channel. It checks the amplitude which should not exceed 20 μV in all the channels. The more samples 8

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al.

Table 1 The relation between SNR, scores and sorting accuracy. Signal to noise ratio

Score 1 (%)

Score 2 (%)

Score 3 (%)

Score 4 (%)

Score 5 (%)

Score 6 (%)

Sorting accuracy (%)

0.1 0.5 1 2

33.4255 66.9676 86.8644 91.9501

14.2424 52.8809 73.6346 75.347

28.59 36.73 40.68 52.99

18.6 73.15 94.45 98.89

44.1 48.3 56.9 61.3

72.31 80.47 91.55 94.56

16 20 49 63

5. Conclusions

Also the same algorithm was applied on the Theta band to calculate the Theta score (Score 6). The amplitude parameter was changed to be 30 μV. Theta score results ranged between 72% and 99% depending on the noise level of the input signal.

This paper proposed an EEG signal quality assessment methods. These methods generate an automated measure to detect the quality of the signal based on its biological and statistical properties. Six scores were introduced and each score was based on a specific property in the signal as a whole or in the individual signal bands. Experimental results showed the consistency of our methods in estimating the quality of the recorded EEG signal.

3.5. Beta Sinusoidal Score (Score 5) This score also depends on the Beta wave. The Beta wave should be very close to sinusoidal shape if the signal is clean. To implement this measure, the signal is divided into windows of the same size. Then, the windows were transformed from the time domain to the frequency domain using the DCT. The absolute value of the DCT components was sorted in a descending order. Then, the least number of components were used to generate the original signal. The relation between the norm vector of the selected DCT components and the norm vector of the whole DCT components should be more than 99% (as reaching 100% will need a huge number of components). A signal is nearly sinusoidal if we manage to generate the same signal with a small number of DCT components with a high correlation with the original signal. Fig. 11 represents Score 5 which shows the inverse of the number of DCT components used to generate the same signal. As shown, the number of components decreases (the inverse increases) when SNR was increased.

References [1] H. Moravec, When will computer hardware match the human brain, J. Evol. Technol. 1 (1) (1998) 10. [2] S. Haggag, S. Mohamed, A. Bhatti, N. Gu, H. Zhou, S. Nahavandi, Cepstrum based unsupervised spike classification, in: 2013 IEEE International Conference on Systems, Man, and Cybernetics (SMC), IEEE, 2013, pp. 3716–3720, Manchester, United Kingdom. [3] H. Zhou, S. Mohamed, A. Bhatti, C.P. Lim, N. Gu, S. Haggag, S. Nahavandi, Spike sorting using hidden Markov models, in: Neural Information Processing, Springer, 2013, pp. 553–560, Daegu, Korea. [4] S. Haggag, S. Mohamed, A. Bhatti, H. Haggag, S. Nahavandi, Neural spike representation using cepstrum, in: 2014 9th International Conference on System of Systems Engineering (SOSE), IEEE, 2014, pp. 97–100, Adelaide, Australia. [5] S. Sanei, J.A. Chambers, EEG Signal Processing, John Wiley & Sons, Australia, 2008. [6] M. Seeck, C.M. Michel, N. Mainwaring, R. Cosgrove, H. Blume, J. Ives, T. Landis, D.L. Schomer, Evidence for rapid face recognition from human scalp and intracranial electrodes, Neuroreport 8 (12) (1997) 2749–2754. [7] S. Haggag, S. Mohamed, H. Haggag, S. Nahavandi, Hidden Markov model neurons classification based on mel-frequency cepstral coefficients, in: 2014 9th International Conference on System of Systems Engineering (SOSE), IEEE, 2014, pp. 166–170, Adelaide, Australia. [8] T. Nguyen, A. Bhatti, A. Khosravi, S. Haggag, D. Creighton, S. Nahavandi, Automatic spike sorting by unsupervised clustering with diffusion maps and silhouettes, Neurocomputing 153 (2015) 199–210. [9] H.J. Hermens, B. Freriks, R. Merletti, D. Stegeman, J. Blok, G. Rau, C. DisselhorstKlug, G. Hägg, European Recommendations for Surface Electromyography, Roessingh Research and Development, The Netherlands, 1999. [10] C.J. De Luca, The use of surface electromyography in biomechanics, J. Appl. Biomech. 13 (1997) 135–163. [11] I. Hettiarachchi, S. Mohamed, S. Nahavandi, A marginalised Markov chain Monte Carlo approach for model based analysis of EEG data, in: 2012 9th IEEE International Symposium on Biomedical Imaging (ISBI), IEEE, 2012, pp. 1539– 1542, Barcelona, Spain. [12] C.L. Philips, J.M. Parr, E. Riskin, Signals, Systems, and Transforms, Prentice Hall, Upper Saddle River, United States, 1995. [13] B. Yang, Q. Wang, Z. Han, H. Wang, L. He, Development of a bci simulated application system based on directx, in: Practical Applications of Intelligent Systems, Springer, 2014, pp. 813–822, Berlin, Germany. [14] I.T. Hettiarachchi, T.T. Nguyen, S. Nahavandi, Motor imagery data classification for bci application using wavelet packet feature extraction, in: Neural Information Processing, Springer, 2014, pp. 519–526, Kuching, Malaysia. [15] Y. Zhang, G. Zhou, Q. Zhao, J. Jin, X. Wang, A. Cichocki, Spatial-temporal discriminant analysis for erp-based brain–computer interface, IEEE Trans. Neural Syst. Rehabil. Eng. 21 (2) (2013) 233–243. [16] Y. Zhang, G. Zhou, J. Jin, X. Wang, A. Cichocki, Frequency recognition in ssvepbased bci using multiset canonical correlation analysis, Int. J. Neural Syst. 24 (04) (2014) 1450013. [17] W. Wu, Z. Chen, X. Gao, Y. Li, E.N. Brown, S. Gao, Probabilistic common spatial patterns for multichannel eeg analysis, IEEE Trans. Pattern Anal. Mach. Intell. 37 (3) (2015) 639–653. [18] Y. Zhang, G. Zhou, J. Jin, Q. Zhao, X. Wang, A. Cichocki, Aggregation of sparse linear discriminant analyses for event-related potential classification in brain– computer interface, Int. J. Neural Syst. 24 (01) (2014) 1450003. [19] J. Li, Z. Struzik, L. Zhang, A. Cichocki, Feature learning from incomplete eeg with denoising autoencoder, Neurocomputing 165 (2015) 23–31. [20] Y. Zhang, G. Zhou, J. Jin, M. Wang, X. Wang, A. Cichocki, L1-regularized multiway canonical correlation analysis for ssvep-based bci, IEEE Trans. Neural Syst. Rehabil. Eng. 21 (6) (2013) 887–896.

4. System validation in BCI application The proposed system can be applied in many different applications. It can be used in BCI applications where the scores can be treated as an input to the system beside the input signal itself. Our system was applied on one of the BCI applications where subjects were asked to sit on a reclining chair facing a video screen, also the subjects were asked to remain motionless during the recording. Some EEG channels were used to control the movement of the cursor on the screen online. The EEG signal was the main controller of the cursor movement, where the cursor moves vertically towards a vertical position of a target located at the right edge of the video screen. A prerecorded database was used to test the effectiveness of the proposed scores [44], data were collected from three subjects for 10 sessions of 30 min. A black screen appeared for 1 s at the beginning of each trial. Then, a target was shown on the right in four attainable locations. After 1 s, a cursor shown up at the left edge center and moved all the way right with a fixed speed. The subject's EEG controlled its vertical position. The main goal was to change the cursor location to match the height of the target. Then the screen went black when the cursor arrived at the right edge and this indicates the end of the trial. First, the input EEG signal was evaluated by our system and the scores were produced. Then the target sorting was applied to the input EEG signal. Table 1 shows the average relation between our system's scores, SNR and sorting accuracy. Our system generated low scores when the SNR is low and these low scores gave an indication that the sorting accuracy will not be good. Then the sorting process was applied and the accuracy was not good as expected. On the other hand, the scores were high when the SNR was high. Then the sorting process accuracy was high as expected. 9

Neurocomputing (xxxx) xxxx–xxxx

S. Mohamed et al. [21] W. Wu, C. Wu, S. Gao, B. Liu, Y. Li, X. Gao, Bayesian estimation of erp components from multicondition and multichannel eeg, NeuroImage 88 (2014) 319–339. [22] F. Briggs, G.R. Mangun, W.M. Usrey, Attention enhances synaptic efficacy and the signal-to-noise ratio in neural circuits, Nature, 499, 476–480, (25 July 2013). [23] J. Wild, Z. Prekopcsak, T. Sieger, D. Novak, R. Jech, Performance comparison of extracellular spike sorting algorithms for single-channel recordings, J. Neurosci. Methods 203 (2) (2012) 369–376. [24] Z. Yang, Q. Zhao, W. Liu, Spike feature extraction using informative samples, Adv. Neural Inf. Process. Syst. 21 (2009) 1865–1872. [25] S.E. Paraskevopoulou, D.Y. Barsakcioglu, M.R. Saberi, A. Eftekhar, T.G. Constandinou, Feature extraction using first and second derivative extrema (fsde), for real-time and hardware-efficient spike sorting, J. Neurosci. Methods. Volume 215, Issue 1, 30 April 2013, Pages 29–37. [26] P. Machart, L. Ralaivola, Confusion matrix stability bounds for multiclass classification, arXiv preprint arxiv:1202.6221. [27] V.E. Bielat, A. Levi, Open Access Textbook Access, Quality, Use, 2013. [28] P. Khatwani, A. Tiwari, A survey on different noise removal techniques of eeg signals, Int. J. Adv. Res. Comput. Commun. 2(2), 2013. [29] A. Delorme, T. Sejnowski, S. Makeig, Enhanced detection of artifacts in eeg data using higher-order statistics and independent component analysis, Neuroimage 34 (4) (2007) 1443–1449. [30] A.V. Kramarenko, U. Tan, Effects of high-frequency electromagnetic fields on human eeg: a brain mapping study, Int. J. Neurosci. 113 (7) (2003) 1007–1019. [31] C.M. Krause, L. Sillanmäki, M. Koivisto, A. Häggqvist, C. Saarela, A. Revonsuo, M. Laine, H. Hämäläinen, Effects of electromagnetic field emitted by cellular phones on the eeg during a memory task, Neuroreport 11 (4) (2000) 761–764. [32] N. Ramachandran, A. Chellappa, Feature extraction from eeg using wavelets: spike detection algorithm, in: International Symposium on Modern Computing (JVA 2006), 2006, pp. 120–124. [33] R. Quian Quiroga, Z. Nadasdy, Y. Ben-Shaul, Unsupervised Spike Detection and Sorting with Wavelets and Superparamagnetic Clustering. [34] J.C. Doyle, R. Ornstein, D. Galin, Lateral specialization of cognitive mode: II. EEG frequency analysis, Psychophysiology 11 (5) (1974) 567–578. [35] N. Birbaumer, N. Ghanayim, T. Hinterberger, I. Iversen, B. Kotchoubey, A. Kübler, J. Perelmouter, E. Taub, H. Flor, A spelling device for the paralysed, Nature 398 (6725) (1999) 297–298. [36] M. Teplan, Fundamentals of eeg measurement, Meas. Sci. Rev. 2 (2) (2002) 1–11. [37] H. Jokeit, S. Makeig, Different event-related patterns of gamma-band power in brain waves of fast- and slow-reacting subjects, Proc. Natl. Acad. Sci. 91 (14) (1994) 6339–6343. [38] Real-time Applications in Control and Communications, 〈http://catalog.rpi.edu/ preview_course_nopop.php?catoid=11 & coid=18464〉 (accessed 2014). [39] M. Kaibara, G.M. Holloway, G.B. Young, Blume's Atlas of Pediatric and Adult Electroencephalography, Lippincott Williams & Wilkins, Pennsylvania, United States, 2010. [40] R.J. Davidson, D.C. Jackson, C.L. Larson, Human electroencephalography, in: Handbook of Psychophysiology, vol. 2, 2000, pp. 27–52. [41] E. Hulata, R. Segev, Y. Shapira, M. Benveniste, E. Ben-Jacob, Detection and sorting of neural spikes using wavelet packets, Phys. Rev. Lett. 85 (21) (2000) 4637–4640. [42] P. Mirowski, D. Madhavan, Y. LeCun, R. Kuzniecky, Classification of patterns of eeg synchronization for seizure prediction, Clin. Neurophysiol. 120 (11) (2009) 1927–1940. [43] K.V. Mardia, Measures of multivariate skewness and kurtosis with applications, Biometrika 57 (3) (1970) 519–530. [44] D. McFarland, A. Lefkowicz, J. Wolpaw, Design and operation of an eeg-based brain–computer interface with digital signal processing technology, Behav. Res. Methods Instrum. Comput. 29 (3) (1997) 337–345. http://dx.doi.org/10.3758/ BF03200585.

Shady Mohamed obtained his PhD from Deakin University, Australia, in the area of classical control theory in 2009. Currently, he is a senior research fellow at the Institute for Intelligent Systems Research and Innovation, Deakin University, Australia. His research interest focuses on digital signal processing, image processing and speech processing, EEG data analysis and noise removal, classical control theory, Haptics technology and robotics control.

Sherif Haggag received PhD from the Institute for Intelligent Systems Research and Innovation, Deakin University, Australia in 2016. Also, he received his Bachelor degree in computer and information sciences in 2009 and his Honors degree in computer sciences in 2010, both from Ain Shams University in Cairo, Egypt. His research interests include neurocomputing, signal processing and neuroscience.

Saeid Nahavandi received a PhD from Durham University, U.K. He is an Alfred Deakin Professor, Chair of Engineering, and the Director of the Institute for Intelligent Systems Research and Innovation at Deakin University, Australia. He has published over 600 papers in various international journals and conferences. His research interests include modeling of complex systems, robotics and haptics. He is the Co-Editor-in-Chief of the IEEE Systems Journal, an Editor (South Pacific Region) of the International Journal of Intelligent Automation and Soft Computing. He is a Fellow of Engineers Australia (FIEAust), the Institution of Engineering and Technology (FIET) and Senior member of IEEE (SMIEEE).

Omar Haggag Omar received his bachelor degree in Computer and Information Sciences in 2016, and the in 2010 from Ain Shams University in Cairo, Egypt. He is currently doing his Honors degree at Ain Shams University in Cairo, Egypt interests include image processing, augmented reality and motion tracking.

10