+ All Categories
Home > Documents > Signal Processing for Automated EEG Quality...

Signal Processing for Automated EEG Quality...

Date post: 25-Sep-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
209
Signal Processing for Automated EEG Quality Assessment by Sherif Haggag Submitted in fulfilment of the requirements for the degree of Doctor of Philosophy Deakin University February 2016
Transcript
Page 1: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Signal Processing for Automated EEG QualityAssessment

by

Sherif Haggag

Submitted in fulfilment of the requirements for the degree ofDoctor of Philosophy

Deakin UniversityFebruary 2016

Page 2: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi
parisr
Redacted stamp
Page 3: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi
parisr
Redacted stamp
Page 4: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

To My Family

ii

Page 5: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Table of Contents

Table of Contents iii

List of Tables vi

List of Figures vii

Research Publications xi

Abstract xiii

1 Introduction 11.1 Background and Motivation . . . . . . . . . . . . . . . . . . . . 11.2 Aims and Objectives . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Literature Review 62.1 What is meant by a Neuron? . . . . . . . . . . . . . . . . . . . . 62.2 Neural Signal in the brain . . . . . . . . . . . . . . . . . . . . . 102.3 Signal Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3.1 Invasive and Partially Invasive acquisition . . . . . . . . 142.3.2 Non-Invasive acquisition . . . . . . . . . . . . . . . . . . 15

2.4 EEG: an electrical activity recording . . . . . . . . . . . . . . . 162.4.1 EEG Bands . . . . . . . . . . . . . . . . . . . . . . . . . 192.4.2 Recording of EEG . . . . . . . . . . . . . . . . . . . . . 22

2.5 EEG Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 252.5.1 Evoked Related Potentials . . . . . . . . . . . . . . . . . 282.5.2 Quantitative EEG . . . . . . . . . . . . . . . . . . . . . 292.5.3 EEG Biofeedback . . . . . . . . . . . . . . . . . . . . . . 292.5.4 Brain Computer Interface . . . . . . . . . . . . . . . . . 30

3 Critical Review on Feature Extraction, Spike Sorting and Qual-ity Assessment Measures 363.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

iii

Page 6: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

3.2 Feature Extraction . . . . . . . . . . . . . . . . . . . . . . . . . 373.3 Spike Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463.4 Noise level Estimation and Quality Assessment Measure . . . . 543.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

4 Feature Extraction and Spike Sorting 604.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604.2 Feature Extraction Methods . . . . . . . . . . . . . . . . . . . . 61

4.2.1 Diffusion Maps . . . . . . . . . . . . . . . . . . . . . . . 624.2.2 Cepstrum Coefficients . . . . . . . . . . . . . . . . . . . 634.2.3 Mel-Frequency Cepstral Coefficients . . . . . . . . . . . 73

4.3 Spike Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

5 Noise Level Estimation 875.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875.2 Noise Estimation Methodology . . . . . . . . . . . . . . . . . . . 885.3 Noise Level Estimation Results . . . . . . . . . . . . . . . . . . 91

5.3.1 Matlab SNR function . . . . . . . . . . . . . . . . . . . . 915.3.2 Neural signal recorded by Multichannel systems . . . . . 935.3.3 EEG signal recorded by Neurofax EEG system . . . . . . 97

5.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

6 Automated Quality Assessment Scores 1016.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026.2 Recording EEG data . . . . . . . . . . . . . . . . . . . . . . . . 1066.3 Splitting EEG data frequency bands . . . . . . . . . . . . . . . 1076.4 Score 1: Analysing the amplitude of each channel . . . . . . . . 1096.5 Score 2: Highest Amplitude Score . . . . . . . . . . . . . . . . . 1116.6 Score 3: Dominant Frequency Score . . . . . . . . . . . . . . . . 1156.7 Score 4: Beta Amplitude Score . . . . . . . . . . . . . . . . . . 1186.8 Score 5: Beta Sinusoidal Score . . . . . . . . . . . . . . . . . . . 1206.9 Score 6: Theta Amplitude Score . . . . . . . . . . . . . . . . . . 1236.10 Score 7: Symmetry Analysis Score . . . . . . . . . . . . . . . . . 1256.11 Score 8: Morphology Score . . . . . . . . . . . . . . . . . . . . . 1276.12 Score 9: Eye movement Analysis Score . . . . . . . . . . . . . . 1286.13 Amplitude and Frequency Analysis Scores (10, 11, 12) . . . . . . 1316.14 General Summary Score (GSS) . . . . . . . . . . . . . . . . . . 1356.15 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

7 Quality Assessment Scores and BCI 1397.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1397.2 BCI Input, Importance and Applications . . . . . . . . . . . . . 1417.3 BCI Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

iv

Page 7: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

7.3.1 BioSig . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1427.3.2 BCI2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1437.3.3 OpenViBE . . . . . . . . . . . . . . . . . . . . . . . . . . 1437.3.4 BCILAB . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

7.4 Applying Scores to BCI applications . . . . . . . . . . . . . . . 1447.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1477.6 BCILAB plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . 1497.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

8 Conclusions and Future Work 1558.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1558.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

References 161

v

Page 8: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

List of Tables

3.1 Comparison between the common Spike Sorting techniques. . . . 53

4.1 Number of spikes in each cluster using Haar and Cepstrum rep-resentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

4.2 Number of correctly assigned spikes in each cluster using Cep-strum representation . . . . . . . . . . . . . . . . . . . . . . . . 71

4.3 Number of correctly assigned spikes in each cluster using Haarrepresentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

4.4 Haar’s Confusion Matrix. . . . . . . . . . . . . . . . . . . . . . . 724.5 Cepstrum’s Confusion Matrix. . . . . . . . . . . . . . . . . . . . 724.6 Clustering accuracy comparison using different noise levels. . . . 83

6.1 Percentage of each score in the General Summary Score. . . . . 137

7.1 The relationship between trials, scores and sorting accuracy isshown. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

7.2 Relation between quality assessment scores and sorting accuracyunder different noise levels. . . . . . . . . . . . . . . . . . . . . 149

7.3 Relationship between the proposed quality scores and noise. . . 153

vi

Page 9: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

List of Figures

2.1 Neurons are the building blocks of the nervous system [14] . . . 72.2 Neuron’s most important parts [14] . . . . . . . . . . . . . . . . 82.3 Chemical signals pass between neurons through a site called

Synapse [34]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4 The negativity of the resting neuron’s cell membrane. . . . . . . 122.5 Invasive Brain signal acquisition [43]. . . . . . . . . . . . . . . . 152.6 Partially Invasive Brain signal acquisition [44]. . . . . . . . . . . 162.7 Invasive and non-Invasive Brain signal acquisition [46]. . . . . . 172.8 Different EEG bands [61]. . . . . . . . . . . . . . . . . . . . . . 202.9 EEG cables which has the sensitive electrodes at the end . . . . 232.10 10-20 International System details. . . . . . . . . . . . . . . . . 242.11 SynAmps 2/RT is the latest EEG amplifier from Compumedics

Neuroscan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.12 Curry Software and Impedance test. . . . . . . . . . . . . . . . . 262.13 Quik-Cap Electrode Placement System. . . . . . . . . . . . . . . 262.14 Common steps of any BCI application [97]. . . . . . . . . . . . . 312.15 BCI Functional components and feedback loops [99]. . . . . . . 32

3.1 The signal processing steps used to obtain single unit activity. . 373.2 K-means calculation steps. . . . . . . . . . . . . . . . . . . . . . 483.3 Steps of the Valley Seeking clustering algorithm. . . . . . . . . 49

4.1 Sample signal representation. . . . . . . . . . . . . . . . . . . . 654.2 DFT of the signal. . . . . . . . . . . . . . . . . . . . . . . . . . 654.3 Log magnitude of the DFT of the signal. . . . . . . . . . . . . 664.4 Cepstrum representation of the signal. . . . . . . . . . . . . . . 66

vii

Page 10: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

4.5 Haar representation of signal in Fig. 4.1. . . . . . . . . . . . . . 664.6 Cepstrum representation. . . . . . . . . . . . . . . . . . . . . . . 674.7 Haar and Cepstrum output in terms of number of clusters and

number of spikes per cluster. . . . . . . . . . . . . . . . . . . . . 714.8 The main steps of Spike Sorting. . . . . . . . . . . . . . . . . . . 784.9 Observable and hidden states of the Hidden Markov Model. . . 794.10 The HMM states applied on the spikes. . . . . . . . . . . . . . . 794.11 HMM states and the transitions from one state to another. . . 804.12 Clustering accuracy comparison using different levels of noise . . 84

5.1 MFCC calculation steps . . . . . . . . . . . . . . . . . . . . . . 895.2 Noise Estimation Accuracy using different signals with different

Signal to Noise Ratio (SNR). . . . . . . . . . . . . . . . . . . . . 925.3 Relationship between the number of iterations used in HMM

and the accuracy of classification . . . . . . . . . . . . . . . . . 945.4 Classification Accuracy using different signals with different Sig-

nal to Noise Ratio (SNR). . . . . . . . . . . . . . . . . . . . . . 955.5 Relationship between the number of samples used in HMM and

the accuracy of classification . . . . . . . . . . . . . . . . . . . . 955.6 Relationship between the number of states used in HMM and

the accuracy of classification . . . . . . . . . . . . . . . . . . . . 965.7 Classification Accuracy using different Signal to Noise Ratio

(SNR) applied to EEG signal which is recorded by the 10-20international system. . . . . . . . . . . . . . . . . . . . . . . . . 97

5.8 Relationship between the number of iterations used in HMM forthe EEG signal and the accuracy of classification . . . . . . . . 98

5.9 Relationship between the number of EEG signals used by HMMfor training and the accuracy of classification . . . . . . . . . . . 98

5.10 Relationship between the number of states used in HMM forthe EEG signal and the accuracy of classification . . . . . . . . 99

5.11 Relationship between the number of noise levels and the accu-racy of classification using two clusters error tolerance . . . . . . 99

6.1 Eye blinking/movement effect on the EEG signal. . . . . . . . . 103

viii

Page 11: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

6.2 EEG raw data and the main frequency bands. . . . . . . . . . . 1056.3 International 10-20 system. . . . . . . . . . . . . . . . . . . . . . 1086.4 Relation between General Amplitude Score and SNR. . . . . . . 1116.5 Histogram of the amplitude of the EEG data. . . . . . . . . . . 1126.6 Relation between Highest Amplitude Score and SNR. . . . . . . 1146.7 Relation between Dominant Frequency Score and SNR. . . . . . 1176.8 Beta Amplitude score calculation steps. . . . . . . . . . . . . . . 1196.9 Relation between Beta Amplitude Score and SNR. . . . . . . . . 1206.10 Steps for calculating the Sinusoidal Score. . . . . . . . . . . . . 1226.11 Relationship between Beta Sinusoidal Score and SNR. . . . . . . 1246.12 Relation between Beta Amplitude Score and SNR. . . . . . . . . 1256.13 Relation between Symmetry Analysis Score and SNR. . . . . . . 1286.14 Relation between Morphology Score and SNR. . . . . . . . . . 1306.15 The effect of eye movement on F7 and F8 EEG channels. . . . . 1306.16 Relationship between Eye Movement Analysis score and the in-

put signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1326.17 Increasing in amplitude and frequency over time at C3-CZ, CZ-

C4 and C4-T4 channels. . . . . . . . . . . . . . . . . . . . . . . 1336.18 The percentage of each score group in the General Summary

Score. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

7.1 BCI input output interface. . . . . . . . . . . . . . . . . . . . . 1407.2 Recording EEG signals while doing different activities. . . . . . 1457.3 Relation between General Summary Score and BCI Accuracy. . 1477.4 Relation between noise, General Summary Score and BCI Ac-

curacy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1487.5 The developed plugin which assess the input signal in BCILAB. 1497.6 Comparison between a normal signal and the same signal after

applying different types of noise. . . . . . . . . . . . . . . . . . . 1517.7 Classification accuracy after applying two different models on

two datasets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

ix

Page 12: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

8.1 This figure shows the whole connection between neural signaland BCI application, beginning by recording the signal thenprocess and assess the signal, finally connecting to BCI appli-cations and providing feedback to the user using Haptic device.Average accuracy using different feature extraction and sortingmethods is shown in sub-figure (a), while sub-figure (b) showsthe automated assessment scores for an input signal. . . . . . . 157

8.2 Combining Haptic, visual feedback with BCI application. . . . . 159

x

Page 13: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Research Publications

1. Shady Mohamed, Sherif Haggag, Hussein Haggag, Saeid Nahavandi "To-wards Automated Quality Assessment Measure for EEG signals" Neuro-computing journal (under review).

2. Sherif Haggag, Shady Mohamed, Hussein Haggag, Saeid Nahavandi "Au-tomated Quality Assessment for EEG Signals Based On Extracted Fea-tures" Neurocomputing journal (under review).

3. T. Nguyen, A. Bhatti, A. Khosravi, S. Haggag, D. Creighton and S.Nahavandi "Automatic Spike Sorting by Unsupervised Clustering withDiffusion Maps and Silhouettes" Neurocomputing journal, Volume 153,04 April 2015, Pages 199-210.

4. Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi "Prosthetic Motor Imaginary Task Classification Based on EEG QualityAssessment Features" in the 22nd International Conference on Neural In-formation Processing (ICONIP), Istanbul, Turkey, 09-12 November 2015.

5. Sherif Haggag, Shady Mohamed, Hussein Haggag, Saeid Nahavandi "Pros-thetic Motor Imaginary Task Classification using Single Channel of Elec-troencephalography" in SMC IEEE International Conference, Hong Kong,09-13 October 2015.

6. Sherif Haggag, Shady Mohamed, Asim Bhatti, Hussein Haggag and SaeidNahavandi "Noise Level Classification for EEG using Hidden MarkovModels" in IEEE 10th International Conference on System of SystemsEngineering (SoSE), San Antonio, TX, USA, 17-20 May 2015.

xi

Page 14: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

xii

7. Sherif Haggag, Shady Mohamed, Asim Bhatti, Hussein Haggag andSaeid Nahavandi "Neuron’s Spikes Noise Level Classification using Hid-den Markov Models" in 21st International Conference on Neural Infor-mation Processing (ICONIP), Malaysia, 03-06 November 2015.

8. Sherif Haggag, Shady Mohamed, Hussein Haggag, Saeid Nahavandi "Neu-ral Hidden Markov Model Neurons Classification based on Mel-frequencyCepstral Coefficients" in IEEE 9th International Conference on Systemof Systems Engineering (SoSE), Glenelg, Australia, 09-13 June 2014.

9. Sherif Haggag, Shady Mohamed, Asim Bhatti, Hussein Haggag and SaeidNahavandi "Neural Spike Representation Using Cepstrum " in IEEE9th International Conference on System of Systems Engineering (SoSE),Glenelg, Australia, 09-13 June 2014.

10. Hailing Zhou, Shady Mohamed, Asim Bhatti,Chee Peng Lim, Nong Gu,Sherif Haggag and Saeid Nahavandi, "Neural spikes sorting using Hid-den Markov models" in International Conference on Neural InformationProcessing, Korea, 03-07 November 2013.

11. Sherif Haggag, Shady Mohamed, Asim Bhatti, Nong Gu, Hailing Zhou,Saeid Nahavandi "Cepstrum Based Unsupervised Spike Classification" inSMC IEEE International Conference, Manchester, United Kingdom, 13- 16 October 2013.

Page 15: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Abstract

Humans have long imagined a world in which they could control, interactand command different types of machines using only their thoughts. Excit-ing advances in Neuroscientific research mean that this seemingly impossibledream is fast becoming a remarkable reality. Researchers have opened a newwindow through which brain signals can be translated into commands using aBrain Computer Interface (BCI).

At its present stage of development, BCI applications allow users to com-mand simple tasks, but research stage, such as the following, is pushing itscapabilities ever closer to the ultimate objective of fully thought operatedmachines. The liberating possibilities of mind operated wheelchairs and pros-thetic limbs represent BCI’s most immediate and pressing application, buttheir potential is boundless. This will help disabled people to communicateand connect with the wider world during their daily lives. For example, peo-ple who suffer from spinal cord injuries, such as paralysis, are figuratively‘locked-in’ their bodies, as they cannot control any motor activity. However,brain signals have potential to play an important role in allowing people withspinal cord injuries to communicate effectively and gain control of their bodies.Non-invasive electroencephalogram (EEG) is perhaps the best known means ofneural signal recording and the current research is heading towards the use ofEEG to help those people find a way out and thereby improving their qualityof life.

EEG signals provide means to understand how the brain works. SpikeSorting is the first step in decoding brain signals. First, brain short and sharpelectronic pulses in the brain, or ‘spikes’ are detected, then the importantfeatures are extracted from which the spikes can be ordered into groups. If

xiii

Page 16: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

xiv

these steps are performed efficiently, it is possible to know the timing and theorigin of the spikes, then it is possible to ascertain abnormal behaviour andits location in the brain. The performance of BCI applications is contingentupon the accuracy of the Spike Sorting process.

The quality of the recorded EEG signal, furthermore, has a direct bearingon the performance of BCI applications. Noise produced during the record-ing of the EEG signal has a direct impact upon the quality of the acquiredneural signal, and therefore, the efficiency of BCI application’s performance.Most BCI research focuses only on the effectiveness of the selected featuresand classifiers; however, the quality of the input EEG signals is determinedmanually.

The accuracy of the current methods for analysing the brain signals isinadequate to current and future requirements. This research incorporates thedevelopment of novel feature extraction technique to extract more meaningfulfeatures and a new clustering algorithm, to more efficiently classify the spikesduring the Spike Sorting process. Moreover, in this research, an automatedsignal quality assessment method was proposed for the EEG signals. Theproposed method generates an automated quality measure for each windowin the EEG signal based on their characteristics as well as their noise levels.This EEG quality assessment measure will give researchers early indicationof the quality of the signal, which will help in testing new BCI algorithmsso that the testing can be made on high quality signals only. It will alsohelp BCI applications to react to high quality signals and to ignore lowerquality ones without the need for manual interference. The results of EEGdata acquisition experiments that were conducted with different levels of noiseshow the consistency of these algorithms in estimating the accurate signalquality measure.

Page 17: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 1

Introduction

1.1 Background and Motivation

Brain signals are now widely used in scientific investigation and particularly

for patient diagnoses. Surgery can be an option for patients with problems of

the brain, which have not responded to medications. To ensure the best out-

comes, it is critical that regions of the brain that produce abnormal activities

are clearly identified. To achieve this, patients undergo brain signals moni-

toring that allows neurophysiologists to determine areas that show abnormal

activities or spikes [1, 2].

It can take many days to comprehensively audit the EEG signals of a

specific person as a huge bulk of data is recorded in this period. The pathway

for analysing the data begins with visual analysis, followed by spike detection,

spike feature extraction and then Spike Sorting. This process is expensive, time

consuming and exhausting, and so in recent times, automatic spike detection,

feature extraction and Spike Sorting techniques have received a huge amount of

attention [3]. Automation significantly reduces review time but in comparison

to manual techniques, automation produces lower accuracy [4].

1

Page 18: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

2

Recent research studies show that by removing frequent spike regions -

seizure onset regions - surgical success can be increased. However, it is not well

understood how spikes work, or how they are generated and propagated [5,6].

A recent study shows a correlation between certain genes and abnormal

parts of the human brain, as well as the frequency and shape of neural spikes.

Accordingly, analysis of both qualitative and quantitative spikes is very im-

portant for disease diagnosis and identifying regions of abnormality [7, 8].

The first step in qualitative and quantitative spike analysis is Spike Sorting.

The process begins with spike detection, and then the extraction of features

from the spikes and then finally, the clustering of the spikes into different

groups, each representing a certain source or neuron. A meaningful feature ex-

traction method is needed and this will be discussed later in details. Moreover,

an accurate clustering algorithm to gather the spikes is also necessary [9, 10].

Neural signals are also used in many applications including the assessment

of various brain disorders types. As an example, if a patient suffers from

epilepsy, the seizure activity usually appears as rapid spiking waves on the

EEG. However, no one has previously used to assess the neural signal itself,

or found a means by which to establish if it is recorded correctly. There is no

automated quality assessment for the EEG signal which is vitally necessary to

neurologist, physicians, technicians and BCI researchers [11,12].

1.2 Aims and Objectives

The aim of this research is to improve the process of understanding neural

signal by refining the Spike Sorting processes and signal processing assessment.

Page 19: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

3

This research has three main aims: the first is to use mathematical methods to

refine the feature extraction process so as to extract only the most significant

features from the signal; the second is to improve the existing clustering algo-

rithm to cluster the data in a more meaningful and accurate way, and finally

to generate an automated biological and signal processing measure for EEG

assessment to be used in BCI applications.

1.3 Thesis Outline

This thesis is divided into eight chapters. In Chapter 2, the literature re-

view, a general introduction to neurons, where it shows how they communicate,

send information and function, and provides basic knowledge of brain compo-

nents, neural signals, EEG signals and applications. EEG signal characteris-

tics are explained, including, frequencies, voltages, morphology and synchrony.

Then, the relationship between EEG signal recording and BCI applications is

demonstrated. This chapter also explains the importance of the neural signal

quality and its effect on the performance of different applications, including

BCI.

Spike Sorting is the first step to decoding the brain. This is contingent on

the design of an automated quality measure since it can identify the behaviour

of the neurons. In order to undertake the Spike Sorting process, extracting the

spike features should be the commencement point, followed by the clustering

of the spikes according to those features. Chapter 3 presents a critical review

of feature extraction, Spike Sorting and Quality Assessment Measures. It

highlights the advantages and disadvantages of each method. This is followed

Page 20: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

4

by the problem statement, which shows that the process needs a new feature

extraction and Spike Sorting methods based on the reasons mentioned in this

chapter. Moreover, the reasons for developing a quality measure for assessing

the recorded EEG signal are explained. The research methodology plan and

the steps followed during the development of the research are also shown.

Chapter 4 details the new feature extraction and Spike Sorting methods

used to represent the neural signal in a better way. Diffusion Maps, Cepstrum

Coefficients and Mel-Frequency Cepstral Coefficients are used as feature ex-

traction methods. Hidden Markov Models (HMM) are used as the sorting

method as it was noticed that neural spikes are represented precisely and con-

cisely using HMM state sequences. An HMM was built for neural spikes,

whereby HMM states could represent the neural spikes.

A noise level estimation method for neural signal is needed, to determine

the amount of noise recorded in the neural signal. Chapter 5 introduces a noise

level estimation method, in order to estimate the amount of noise before doing

any kind of processing on the recorded signal. Mel-Frequency Cepstral Coef-

ficients and HMM are used in the estimation process. The method generates

an automated measure to estimate the noise levels in neural signal. HMM was

used to build a classification model that classifies the neural spikes based on

the noise level.

Knowing the quality of the EEG signal is very important to estimating

the amount of noise in the signal. Hence, automated scores, which are used

to assess the brain signal, are discussed in Chapter 6. Twelve scores were

developed to assess the EEG signal based on biological and statistical features.

Page 21: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

5

This represents the first online quality assessment measure for EEG signal.

Chapter 7 indicates how to practically connect the assessment measure,

developed in this research, with BCI applications. An online quality assess-

ment plugin is developed and linked to BCILAB, the best known MATLAB

toolbox for BCI applications available for anyone to use. This plugin can give

an assessment measure, which will help many people, such as neurologists,

physicians and technicians, in knowing the quality of the recorded signal. This

automated measure can provide benefit in many ways, such as ensuring that

the data is correctly recorded. Finally, Chapter 8 presents the conclusions and

points to future directions in using Haptics devices for this research.

Page 22: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 2

Literature Review

This chapter explains what is meant by neurons and shows how they com-

municate, send information and function. Moreover, this chapter will discuss

neural signals and especially the EEG signal, its bands, frequencies, voltages,

morphology and synchrony. Then, the process of recording EEG signal will

be explained and also how it is used in different applications, such as BCI

applications is determined.

2.1 What is meant by a Neuron?

A neuron is a nerve cell; it is considered the nervous system’s basic building

block as shown in Figure 2.1. Neurons and other cells in the human body have

many things in common, but there is a major difference between them in

that neurons have a specific functionality, not found in any other cells in the

human body: they can communicate with each other, and in addition, send

information to and from any organ in the human body [13].

Neurons have a very specific task. They are responsible for transporting

information between human organs either chemically or electrically. Neurons

can be classified into different categories, each category has its own task and

6

Page 23: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

7

Figure 2.1 Neurons are the building blocks of the nervous system [14]

functionality in the body of a human [15].

As an example, a sensory neuron is a type of neuron, its job is to transfer in-

formation from the human body’s sensory receptor cells to the brain. Another

type is the Motor neurons, which is responsible for communication between the

human’s body muscles and the brain. Also there is a specific type of neurons

which transfers information between the neurons themselves. These neurons

are called Interneurons. Sometimes the information is prevented from moving

to its destination properly as a result of a bad signal, but it can be detected by

the quality assessment measure (discussed in the subsequent chapters) [16,17].

Neurons and other body cells have many structural commonalities. The

genetic information of the cell is stored in this nucleus. Organelles are found in

the body of both cell types, which help to keep the cell alive, along with Mito-

chondria, Golgi bodies, and Cytoplasm and in addition encircling membranes

protect both neurons and other body cells. [18].

There are, however, major differences between the neurons and the other

body cells. One of these differences is that the reproduction of neurons stops

within a small period after birth, so when any neuron dies, it will not be

Page 24: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

8

Figure 2.2 Neuron’s most important parts [14]

replaced by a new one. This is why not all the brain parts have the same

number of neurons. Research shows that new communication channels and

paths are created when neurons die so that, depending on the neurons, living

neurons can communicate with those still living. Moreover, the membrane of

the neurons is created in a way that enables transmission of information to

another cell. Here, the Spike Sorting process is applied, to detect the areas of

the brain that behave abnormally. It can also detect the new communication

paths [19–21].

Neurons consist of four main parts as shown in Figure 2.2. The first part,

known as the Dendrites, is located at the beginning of neuron, looks like tree

branches and increase the cell’s surface area [22]. The role of Dendrites is to

send electrical signals to the Soma as soon as they receive any information

from the surrounding neurons. They cannot do their job if there is an external

electrical signal, as this will lead to the generation of an abnormal signal.

Synapses covers Dendrites as well [23]. The Soma is the next part of a neuron,

Page 25: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

9

where signals from Dendrites are received and forwarded. The Soma and the

nucleus do not perform an important role in the transmission of the neural

signal; their main job is to make sure that the cell functions are working.

In addition, Mitochondria and Golgi apparatus play an important roles in

supporting the cell. Mitochondria are the source of energy for the cell and the

Golgi apparatus collects the cell production from outside the cell wall [24,25].

The third and very important part is the Axon Hillock. Its location is at

the end of the Soma. The main function of the Axon Hillock is neuron firing. A

signal (action potential) will fire if the its strength surpasses the Axon Hillock

threshold [26,27].

The Axon is a stretched fiber, which runs from the cell body to the terminal

endings. Its main function is sending the neural signal [28]. The speed of

sending information mainly depends on the size of the Axon [29]. When the

size increases the transition rate increases. Myelin is a greasy insulator that

covers some Axons, these greasy Axons sends the information faster than the

non-greasy ones [30,31].

Finally, at the end of each neuron are features known as Terminal Buttons.

These buttons transmit the neural signal to other neurons. Between two nerve

cells is a minute gap known as a Synapse, which is located at the edge of the

terminal button; this gap is used by Neurotransmitters to transmit the signal

to other neurons.

Page 26: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

10

2.2 Neural Signal in the brain

Neurons have a unique shape compared to other human cells. Soma is the

name of this cell body. Soma contains the nucleus that carries the DNA. It

directs the cell to make different proteins. On one edge, the Soma sprouts

branch-like Dendrites for receiving signals. In the opposite direction, Axon

stretches away and acts as many Axon terminals for transmitting signals [32,

33].

The location of the Axon terminals is commonly adjacent to another neu-

ron’s Dendrites, however, this does not mean that the Axon terminals physi-

cally touch the other neuron’s Dendrites. They are very close but they do not

touch each other, and are separated, as mentioned above, by a space known as

a Synapse. Each neuron has about a thousand Synapses, which enables it to

connect with the nearby neurons. These Synapses link the cells and enables

them to transfer messages from its neuron to any adjacent neuron. The hu-

man brain contains a countless number of Synapses exceeding the number of

stars in the Milky Way galaxy. Abnormal signaling across these multitudinous

Synapses can lead to abnormal human behaviour [16].

The Synapses are empty space, and there is no immediate connection be-

tween the Axon terminals of one neuron and the Dendrites of another neuron.

This gap enables a cell to transfer chemical signals through, which is consid-

ered the message as shown in Figure 2.3. Each Axon terminal contains sacs

called Vesicles, which are replete with chemicals known as neurotransmitters.

Neurotransmitters can be any of 50 different chemicals. Each neurotransmitter

transmits various message type to the next neuron. This message is realised

Page 27: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

11

Figure 2.3 Chemical signals pass between neurons through a site calledSynapse [34].

by specific receptors located on the exterior part of the Dendrites [35].

These specific receptors behave like locks; the ’key’ to these ’locks’ is a

specific neurotransmitter. Once its key opens the lock, the neurotransmitter

drifts back into the gap between neurons and is destroyed by enzymes or trans-

ported back to the original neuron’s Axon terminal at which point it may be

destroyed or reused by a vesicle. Each neurotransmitter has its own function

and their recycling processes differ from one to another [36].

When the receptors of the accepting neuron’s Dendrites are filled by the

neurotransmitters, excitatory neurotransmitters prompt the receiver to for-

ward the signal to other cells, whereas inhibitory neurotransmitters block the

receiver from sending the signal to other cells. Neuron’s Dendrites can ac-

cept more than a single neurotransmitter signal at the same time, the signal

will be fired to the next neuron if the excitatory signals are stronger than the

inhibitory signals and will be blocked otherwise [37].

Even though transmitting a messages from one neuron to another requires

Page 28: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

12

Figure 2.4 The inside negativity of the resting neuron’s cell membraneis higher than the outside. Then the inside becomes more positive whenthe neuron is stimulated. This will leads to similar change in the adjoiningsegment of the neuron’s membrane that will cause the movement of theelectrical impulse along the neuron

chemicals, another medium is used to send that messages between the receiving

neuron’s Dendrites and its own Axon terminals. When neurotransmitter’s

trigger fires, the receiving neuron sends an electrical "action potential" along

its length similar to the electrical flow in a metal wire. An insulating coating

made of fatty myelin sheath surrounds the Axons to help in transmitting the

signal faster [38].

In the following section, the conduction of an electrical signal by a non-

metallic human cell will be explained. Usually, the neuron adjusts its own

charge in relation to the cell’s external space. To change its charge, a neuron

changes the charged ions, located inside and outside of the cell membrane.

When a neuron is not active and is not firing any signal, its internal ions

have more negative charges than the external ions. At this time, electrical

potential, known as resting membrane potential, is created side to side with the

cell membrane. The channels of sodium and potassium in the cell membrane

Page 29: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

13

control the ingoing and outgoing movement of positive sodium and potassium

ions in the cell [39].

The makeup of the Axon’s cell membrane is affected when any neurotrans-

mitters enters the receptor areas. In the Axon’s structure nearest to the Soma,

the cell membrane’s absorptivity increases. Positive sodium ions find their way

into the cell and increase the Axon section’s positivity in comparison to the

external section as shown in Figure 2.4. The sodium ions provide energy to

push the newly added positive charges outside the neuron and return to the

original state, but the same effect has also been generated in the nearby section

of the cell. Ultimately, this positive charge reaches the Axon terminals and

the distance travelled is is about the length of the Axon inside the cell [40].

The electrical charge changes again when the axon terminals receive the

signal. Sometimes the signal is not received, or too many signals are received,

which leads to a corrupted signal resulting in abnormal human behaviour.

Positive calcium ions plays last role of the sodium ions, as it penetrates the

extra-permeable cell membrane. When the calcium ions reach the Axon termi-

nal, the vesicles with a full capacity of neurotransmitter are triggered, causing

it to drift to the cell membrane, merge with it, and then let the specific neu-

rotransmitters move outside the cell. Although this process seems protracted,

the action potential occurs with astonishing speed. So if the Axon is a soccer

field, one second is the time for an action potential to move through it [41].

This whole process will be repeated by the next neuron to generate and

transfer the neural signal. Some abnormal neurons transfer random signals or

prevent the transmission of normal signal corrupting the original signal, but

Page 30: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

14

these abnormal behaviours can be detected by the Spike Sorting process that

will be discussed in the following chapters.

2.3 Signal Acquisition

The above section shows how neurons communicate with each other through

neural signals, which are mainly electrical activity generated by brain struc-

tures. These signals are acquired and processed by the signal acquisition and

processing techniques and devices. In general, there are three brain’s signal

acquisition techniques, which are invasive, partially invasive and non-invasive

acquisition.

2.3.1 Invasive and Partially Invasive acquisition

Both Invasive and Partially Invasive acquisition techniques require a surgery

to implant electrodes. In Invasive acquisition, electrodes are placed on the

brain as shown in Figure 2.5. These produce the highest quality signals, which

can be used by the BCI devices. However, this technique has two major draw-

backs. Firstly, it requires a surgery to open the skull and plant the electrodes.

Secondly, tissues build-up, which leads to weaker signals and after a while, the

body reacts to the presence of the foreign object and rejects it, resulting in no

signal at all [42].

On the other hand, Partially Invasive acquisition records the activity of the

brain inside the skull, but from the surface of the membranes that protect it

as shown in Figure 2.6. An electrode Grid is implanted by surgical incision,

but this has the same drawbacks of the Invasive acquisition techniques [45].

Page 31: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

15

Figure 2.5 Invasive Brain signal acquisition [43].

2.3.2 Non-Invasive acquisition

This is the most useful neuron signal imaging method, applied to the out-

side of the skull, on the scalp. There are many types of non-Invasive acquisi-

tion technologies, such as EEG, functional magnetic resonance imaging (fMRI),

magneto-encephalogram (MEG), P-300 based BCI, etc. EEG is the most com-

mon technique among non-invasive Brain Computer Interfaces (BCIs). EEG

has many advantages such as simplicity and ease of use, which are considered

the main requirements for any BCI application. This is the reason behind

using EEG in most of the experiments in this research. The next section will

discuss EEG in more details. Figure 2.7 shows the difference between Invasive

and non-Invasive acquisition.

Page 32: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

16

Figure 2.6 Partially Invasive Brain signal acquisition [44].

2.4 EEG: an electrical activity recording

Electroencephalography is a medical imaging technique that records these

signals from the scalp. The electroencephalogram (EEG) is defined as alter-

nating type electrical activity recorded from the scalp surface. This activity is

recorded using metal electrodes and conductive material [47].

The EEG can be measured by two ways. The first way is called electro-

cortiogram which records the signal directly from the cortical surface. The

second, electrogram, uses depth probes to record the data [48]. Electroen-

cephalographic reading is an entirely non-invasive process, which means it has

no risky side effects. It can be used safely on all normal adults and children

and there are no limitations on recording time [49,50].

Brain cells (neurons) does not trigger all the time, but it produces a re-

gional current flows. In the cerebral cortex, the Dendrites of many neurons

excite in a synaptic way, so the rule of EEG is to record the current flow

during the excitation process [51]. Electrical potentials differences are caused

Page 33: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

17

Figure 2.7 Invasive and non-Invasive Brain signal acquisition [46].

by summed post-synaptic potentials cells, which causes the creation of electri-

cal dipoles. These dipoles occurs between Soma, the body of the neuron and

apical Dendrites, which are the neural branches. Na+, K+, Ca++, and Cl-

ions are the main components of the brain’s electrical current, which moves

in a specific direction inside the neural membrane channels. The membrane

potential is the one responsible for direction determination [52]. There are var-

ious types of synapses and neurotransmitters but they cannot be seen unless a

complex microscope is used. After placing the electrodes on the head surface,

the electrical activity is record for a huge population of active neurons [53].

The electrical signal passes through the skin, skull and various other layers,

after which reaching the electrode, and from which it is recorded.

Electrodes captures these electrical signals, which are then amplified and

can be shown on a screen or saved on any memory device [54]. EEG is a highly,

effective and capable tool in the fields of neurology and clinical neurophysiology

because it can record the brain’s normal and abnormal electrical activity. The

Page 34: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

18

electric activity of the human brain begins when the baby is in the uterus

within 17-23 weeks. At birth, a baby will have about 1011 neural cells at a

mean density of 104 per cubic cm and connected by synapses to form neural

nets. When the brain is fully grown (adult brain), it has around 500 trillion

synapses.

The Synapses count per neuron is directly proportional to the age of the

person, which means that the number of synapses decrease with age. Similarly,

the brain’s neuron count is inversely proportional to age, because neurons do

not reproduce and are not replaced as they die [55].

Now the brain will be considered from an anatomical point of view. There

are main three sections in the brain; these sections are the cerebrum, cere-

bellum, and the brain stem [56]. The Cerebrum is the first and the most

important section, containing the right and the left hemispheres, the surfaces

of which, known as the cerebral cortex is very convoluted. The most superior

section of the central nervous system is the cortex [57]. Moreover, the cerebrum

has a center which is responsible for initiating movement, sensation conscious

attention, emotion expressions, analysis of complex matters and behaviour.

The second section is the Cerebellum, which controls the muscles move-

ments and maintains the balance of the body. The third and last section is the

brain stem, which manages the regularity of the heart, breathing, biological

clock, and hormone production and release. Due to its position, the electrical

activity of the cerebral cortex has the biggest influence on EEG [58]. All the

following subsections pave the way for the automated EEG quality assessment

Page 35: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

19

measure as these sections contains many biological and statistical characteris-

tics for EEG signals. All the signals recorded from all brain sections will be

used in the quality assessment measure, which is developed in this research.

2.4.1 EEG Bands

The intensity of the EEG signal is quite low, measured in microvolts (μV)

and divided into four main frequencies as shown in Figure 2.8 [59]. All four

bands were used in the proposed automated EEG quality assessment measure.

The Delta wave is the first frequency; it represents any frequency below 3 Hz.

It is known for being the slowest of the waves and with the highest amplitude.

The Delta wave appears normally in the EEG of babies less than 12 months

of age, also in the third and the fourth sleeping stages of older humans, or it

can be present in association with sub-cortical, deep and widespread injuries.

It is a dominant frequency in the frontal part of the adults brain (e.g. Frontal

Intermittent Rhythmic Delta "FIRDA") and also in the children posterior part

( e.g. Occipital Intermittent Rhythmic Delta "OIRDA") [60].

The second frequency is the Theta wave; a slow wave ranging between 3.5

Hz and 7.5 Hz. It is a slow wave. It usually appears in children of less than

13 years of age. In addition, it appears normally while sleeping but it will be

abnormal if it appease while a person is awake. It may happen during a focal

sub-cortical injury and in general diffuse disorders spreading like metabolic

encephalopathy and from a few hydrocephalus cases [62].

The third wave is called the Alpha wave. It is from 7.5 Hz to 13 Hz. It

mainly occurs in the posterior head areas in both hemispheres. It always has

high amplitude in the dominant side. It occurs when the person closes his or

Page 36: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

20

Figure 2.8 Different EEG bands [61].

her eyes and is calm, and vanishes when the eyes are open or when the brain

is contemplating, manipulating or is interrupted by any mechanism. It occurs

most frequently in normal relaxed adults. It usually occurs when the person

is older than the thirteenth year [63].

The activity which has frequency more than or equal 14 Hz is called Beta

wave activity. It occurs frequently on both sides of the hemisphere especially

the frontal area. It is mainly affected by anodyne drugs. A very limited

amount of this band appears - or even it totally disappears - sometimes in

relation to cortical damage areas. It usually appears when normal adults are

alert or worried or while opening their eyes [63]. All these bands will be used

in assessing the quality of the EEG signal in the following chapters.

Page 37: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

21

There are different properties for the EEG signal, such as:

• EEG frequencies The meaning of Frequency here is the rhythmic monotonous

activity, measured in Hz. There are different features for the EEG fre-

quency. The first feature is the Rhythmic wave which means that the

waves of the EEG activity are firing with a constant frequency. The sec-

ond feature is called the Arrhythmic wave which means that the EEG

activity has no specific rhythms or frequency. This means that the fre-

quency changes over time. The last feature is the Dysrhythmic wave,

which rarely appears in normal healthy people [64].

• EEG voltage The electrical activity in the brain has a low voltage, which

can be measured in micro-volts(μV). Its value varies, depending upon

the technique used for recording. It is known that the word amplitude

in EEG means the voltage in microvolts and it is the distance between

the peak of the wave and the trough of the wave. It ranges between

± 10 to ±100 μV and the average normal amplitude ranges from ±20 to

±50 μV [65] but it can reach ±1000μV in abnormal cases which will be

detected by the quality assessment measure.

• EEG morphology The shape of a waveform is known as its morphology.

The EEG pattern (wave) is determined by the mixture of frequencies

and the relationship between the phase and voltage of the wave. The

waves can be classified into several patterns. The first pattern is called

Monomorphic, in which one dominant activity creates the recorded EEG

activity. The second, known as the polymorphic pattern, is a complex

Page 38: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

22

waveform resulting from the mixing of multiple frequencies. Sinusoidal

is the name of the third pattern, in which the pattern looks like a sine

wave. Finally, the transient pattern where the wave appears isolated

and in which the background activity shape and the pattern are clearly

dissimilar [66].

The pointed peak in the wave is called spike if its width (duration) ranges

between 20 and 70 msec. It is called a Sharp wave if its width exceeds

70 msec up to 200 msec [67].

• EEG synchrony Some rhythmically distinct patterns appears simultane-

ously over various regions of the brain, which can have a unilateral ap-

pearance, meaning that it appears on the same side or it can have a

bilateral appearance, appearing on both sides [68, 69].

• EEG Periodicity Periodicity points to the brain patterns distribution

over time, whether or not a specific EEG activity pattern shows reg-

ularly. This activity can be general, focal or lateral [70].

2.4.2 Recording of EEG

Metal electrodes are used to record the EEG data [49] as shown in Fig-

ure 2.9. These electrodes are tiny metal discs, which are manufactured from

tin, stainless steel, silver or even gold and provided with a silver chloride cover.

They have specific positions on the scalp determined by the method used [50].

The best known method for electrode placement is the International 10/20

system, by which a number and a letter is assigned to each electrode. The

letter represents the implicit brain area where the electrode is placed, e.g., C-

Page 39: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

23

Figure 2.9 EEG cables which has the sensitive electrodes at the end. Aspecific gel is added on each electrode before putting the electrode in aspecific position on the human’s scalp.

central lobe and P - parietal lobe. The right side of the brain is represented

by even numbers and odd numbers represent the left side [71].

The 10/20 international system is now the standard method for scalp elec-

trode organisation. The system core is the percentage in distance, this percent-

age is 10/20 and it is measured from nasion-inion to specific points as shown in

Figure 2.10. These specific points are located in precise positions, the points

which are located in the Frontal pole begins with FP, the points located in

the center beginning with the letter C, similarly parietal points begins with

P, occipital begins with O and finally the temporal region begins with T. The

mid-line electrodes begins with the letter z, which means zero. The electrodes

which are located in the left hemisphere are assigned odd numbers and right

hemisphere even numbers [71].

The Neuroscan device was used for recording EEG signals in most of the

experiments, which are done in this research. A SynAmps 2/RT amplifier was

Page 40: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

24

(a) (b)

Figure 2.10 Each location is defined by alphabets F, T, C, P and O. Eachalphabet denotes frontal, temporal, central, parietal, and occipital lobes.Even numbers 2, 4, 6 and 8 represents right hemisphere and Odd number1, 3, 5 and 7 for left hemisphere as shown in Figure (a). Also the locationof each electrode is shown in Figure (b) [72].

used as shown in Figure 2.11. Designed with specific engineering considerations

to provide the best possible recordings, the SynAmps 2/RT amplifier is one

of the most advanced and versatile amplifiers, capable of recording true DC

potentials contained in cognitive potentials to the fastest ABRs.

Curry 7 Neuroimaging Suite software was used to record the data in the

experiments. Acquisition in Curry is enhanced with easy, more flexible, and

advanced tools for online data processing. The impedance can be tested for

each electrode without interrupting the data acquisition process, and is pro-

vided in a simple visual display with values for each electrode as shown in

Figure 2.12.

Quik-Cap EEG, shown in Figure 2.13, was used in experiments while

recording the data, because it can be quickly placed using easily identified

Page 41: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

25

Figure 2.11 SynAmps 2/RT is the latest EEG amplifier from Com-pumedics Neuroscan.

landmarks, and it requires no marking while recording.

2.5 EEG Applications

Speed is the biggest advantage of EEG [73]. Any stimulus received or un-

dertaken by humans produces neural activity; the more complex the stimulus,

the more complex the activity [74, 75]. EEG can record this activity within

fractions of a second after being triggered. MRI and PET scans gives more

spatial resolution compared to EEG. In order to understand the brain, EEG

images and MRI scans are used together. Brain electrical activity can be lo-

cated using EEG and can determine the source (brain location) of this electrical

activity. EEG is used in many research and clinical applications including:

1. Auditing of deep unconsciousness, watchfulness or the death of the brain

Page 42: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

26

(a) (b)

Figure 2.12 Figure (a) shows a screen shot from the Curry software. Also,the impedance test of each electrode is shown in Figure (b).

Figure 2.13 Quik-Cap Electrode Placement System.

[76].

2. Identifying the damaged areas after having a head injury, stroke or cancer

[77].

3. Sensory pathways testing [78].

4. Monitoring psychological relations [79].

5. Generating biological feedback [80].

Page 43: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

27

6. Managing numbness depth [81].

7. Learning more about epilepsy and finding the core of the seizure [82].

8. Testing the drugs effect on epilepsy [83].

9. Helping in epileptic research experiments [84].

10. Auditing the brain development of humans and animals [85].

11. Drug analysis for jerky effects [86].

12. Sleeping disorder and physiology investigation [87].

If a person has lesions from, for example, tumor, hemorrhage, or throm-

bosis, the cortex produces lower frequencies. Understanding this is useful in

identifying some lesions. EEG signal can offer information about the person

based on the amplitude and the frequency of the signal, also spike production

and the pattern of the wave [88]. EEG can identify brain problems if there is

any distortion in amplitude, frequency, spike production or in wave patterns.

For example, the brains of patients who have epilepsy releases very high volt-

age waves from the cortex region. There are a lot of factors that can change

the EEG patterns including behavioural, hormonal, circulatory, neuroelectric,

metabolic and biochemical factors. Variation of electric activity can be tracked

before, during and after taking medication, and its effect on the brain regions

can be monitored [89].

The procedure for recording EEG is non-invasive and painless, which is

why it is commonly used in brain research in many fields, including those of

Page 44: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

28

memory, perception, concentration, communication, and mental state in adults

and children. EEG has many applications in real life such as:

2.5.1 Evoked Related Potentials

Event Related Potential (ERP), which is the abbreviation of event related

potential, is one of the greatest beneficial applications for EEG recording.

Evoked potentials, also called event related potentials, are big fluctuations in

amplitude (voltage) due to the evoked neural activity. Mainly, any internal

or external stimulus triggers the evoked potential. ERPs are perfect methods

to investigate aspects of cognitive processes; the nature of which could be

normal or abnormal. They are used in many research fields such as psychiatric

and neurological disorders, mental operations such as understanding, alertness,

language processing and memorisation. ERPs can help PET and MRI scans in

finding the local activation regions, while performing a specific cerebral task.

Also the time course of these activities can be identified by ERPs [90].

ERPs cannot be identified from raw EEG data because the amplitude is

very small compared to other EEG components. On the other hand, ERPs

can be extracted by calculating the average of the EEG time-locked recording

periods (epochs) and this can show the frequency of the sensory, motor and

cognitive events. In order to obtain the ERP when a stimulus occurs, the

background EEG fluctuations are averaged out and the remaining will be the

event related brain potentials. Only these remaining electrical signals reflect

the activity, which is always related to the stimulus in a time-locked way.

Therefore, when a stimulus evokes a neural activity pattern, the ERP reflects

it with a high temporal resolution.

Page 45: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

29

2.5.2 Quantitative EEG

Technological approaches are used in conjunction with EEG to monitor si-

multaneous brain activity data from the whole head. Multi-channel measure-

ments are applied in quantitative EEG (QEEG), which helps in locating brain

regions presenting abnormal behaviour. From the output, two and three di-

mensional colour maps can be produced using topographic brain mapping [91].

2.5.3 EEG Biofeedback

EEG Biofeedback (Neurofeedback) is mainly used as a means of brain func-

tion training, by which the brain consciously acquires information to perform

more efficiently. Brain action is monitored from moment to moment and the

recorded information is shown back to the person, so the brain is pushed to

change its own activity to more patterns that are more appropriate. This

process requires a gradual learning process. In addition, it can be applied to

measurable brain function. It is called Biofeedback as it mainly depends on

electrical brain activity (electroencephalogram), or EEG.

Neurofeedback is considered as a self-regulatory training method and it is

applied directly to the brain. Good brain function should be self-regulated.

The central nervous system is helped to function better by the self-regulation

training. Frequency following response is one of the neurofeedback training

methods. It adjusts the brain functions in desired ways, such as increasing

the Alpha activity, which leads to better touch, sight and auditory response.

Thus, a person can know the optimal training route [92].

Some researchers say that subjects can enhance the performance of the

Page 46: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

30

brain [93,94], regulate behaviour and change the mood to a stable state using

the positive or negative feedback loop. On the other hand, some researches see

that it increases the brain’s unsuitability. However, it is generally applicable

for specific patients who suffer from certain mental disorders including epilepsy,

alcoholism and depression [95].

2.5.4 Brain Computer Interface

BCI also called mind-machine interface is a direct communication system

that reacts based on the user’s commands, extracted from the brainwaves of

the user. This system needs a significant amount of training from the specific

user’s brain waves in order to accurately understand the brain command.

At the beginning, the subject might be asked to perform a simple task,

such as imagining moving his or her arm based on an arrow on the screen. If

the arrow is pointing right, the user should imagine moving his or her right

arm and vice versa. The system then tries to understand and recognise the

command of the brain wave based on its characteristics. But now it is used

in recognising a more complex commands [96]. The common steps of any

BCI application are shown in Figure 2.14. The first step is to acquire the

brain signals. These signals are then analysed in order to convert them into

commands; these commands order an external device so as to perform a specific

action.

Components of a BCI system

It is very important to understand the entire BCI system in order to con-

duct any basic research in BCI. The main target of a BCI system is enabling

Page 47: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

31

Figure 2.14 Common steps of any BCI application [97].

the user to control other devices using the user’s brain signals. This control

task is done through different components, signals and feedback loops as shown

in Figure 2.15. Detailed steps for any BCI application are shown below.

• Electrodes Record the human brain activity.

• Amplifier Amplify the recorded signal.

• Feature Extractor Extract significant features from amplified version of

the recorded signals.

• Feature Translator Classify the extracted features into logical controls.

• Control Interface Logical controls are converted to semantic controls by

the control interface in order to be used as an input for the device con-

troller.

• Device Controller Semantic controls are converted by the device con-

troller to specific physical commands for the controlled device.

• Controlled Device Executes specific physical commands once received.

Page 48: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

32

Figure 2.15 BCI Functional components and feedback loops [99].

By following the above steps, the BCI system can translate brain signals to

device action. [98].

There are different types of BCI applications such as:

- Direct Control Applications

In this type of BCI applications, the main focus is using brain signals to

control devices directly. These devices are mainly used for clinical applications

such as prosthetic limbs, wheelchairs and communication devices. They can

also be used in gaming, entertainment and quality of life applications. BCI

does not yet have a full control over these devices, but researchers are now

working towards this objective. Valuable clinical applications for this tech-

nology include enabling disabled people to control their own movements, to

operate wheelchairs or prosthetic limbs, or to gain direct control of devices

Page 49: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

33

such as computers, telephones, radios, lights, televisions, washing machines

and so on. The quality of the signals plays an important role is the accuracy

of any BCI application and the quality assessment measure will be discussed

in the following chapters.

- Indirect Control Applications

This type of BCI applications depends upon special brain error signals,

such as Error Related Negativity. It can be a group of signals associated with

errors, such as attention/engagement, frustration/anger, or comprehension.

The application user does not engage directly in the control task. For example,

the user can be watching a robotic arm extending to a door handle and the

user can determine if the arm is in the right position or not and the brain will

trigger that reaction, which will be translated by the algorithms that controls

the arm in order to move the arm in the correct position. This example shows

the indirect control BCI application where the user’s error helped the robotic

arm to make the right choice, however, it does not directly control the arm

task.

In the last few years, a few BCI products have become available for normal

people to use and try. These products are not yet commonplace due to their

signal’s low accuracy and their high cost. A few BCI products are shown

below.

∗ Neural Impulse Actuator Mainly a brain BCI mouse which enables users

to control games using their thoughts, considered a game playing prod-

uct.

Page 50: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

34

∗ Deep Brain Stimulator Used to treat Depression, Epilepsy, Dystonia,

etc.

∗ Mindset Developed by NeuroSky, a Bluetooth BCI headset which can be

used in many BCI applications, especially games.

∗ Robotic Foot An example of a BCI products that can help disabled peo-

ple.

∗ Honda Asimo Control Robots which are designed and implemented in

Japan. These robots can work in receptions, in hospitals and many

other places. They also can also perform tasks, which are too difficult or

dangerous for humans.

∗ Artificial Arm Developed by DEKA and Development Corporation, is

good for paralysed patients.

∗ Mind Reader Google Glass Integrates Google Glass with BCI headsets

to produce a mind reader glass.

Generally, the success of these types of applications will largely depend on

the quality, specificity, robustness, and timeliness of the input brain signals.

This is the reason behind focusing on the quality of the brain signal in the

following chapters.

In this chapter, a general introduction to neurons has been given, EEG

signal recording, BCI and the applications, which use EEG signals. The im-

portance of the neural signal quality has been shown and how it affects the

performance of BCI applications. In the next chapter, a critical review of the

Page 51: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

35

current feature extraction, Spike Sorting, noise level detection and the quality

assessment for neural signals will be given.

Page 52: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 3

Critical Review on FeatureExtraction, Spike Sorting andQuality Assessment Measures

3.1 Introduction

A general introduction to EEG signal and BCI application was given in

the previous chapter. This chapter will undertake a critical review of the

main sections. These sections are feature extraction methods, Spike Sorting

techniques, neural signal noise estimation and quality assessment measures,

highlighting the main advantages and disadvantages of each.

Spike Sorting is very important as it is considered to be the first step in

decoding the brain. Figure 3.1 shows the steps to sorting the neural spikes [10].

The first step is feature detection using different types of thresholds [100], then

extraction of the spike features, where each spike is represented by a set of

features which can differentiate between spikes from different neurons [101].

Some dimensionality reductions are applied to the features so that the feature

coefficients, which are highly differentiated between spikes, can be determined

and saved for processing, and the rest can be discarded [102]. Finally is the

36

Page 53: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

37

Figure 3.1 The signal processing steps used to obtain single unit activity.

process referred to as clustering or sorting in which spikes are divided into

different groups, corresponding to different neurons and based on the extracted

feature coefficients [9].

As mentioned earlier, BCIs can help disabled people to restore their motor

ability and Spiking-based BCI applications can help disabled people to control

robotic devices such as prosthetic limbs. Current Spike Sorting methods needs

to be further refined to provide faster BCI applications, as these applications

suffer from a lengthy Spike Sorting step. The Spike Sorting process needs fea-

ture extraction and clustering methods, which can decode information without

losing spike identity.

3.2 Feature Extraction

Extracting the features is crucial to Spike Sorting steps as the spikes are

convoluted with noise and it is not easy to extract distinguishable features.

Moreover, it is important to reduce the number of features to avoid flooding

Page 54: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

38

the system with unnecessary data, creating computational burdens and real

time delays [10].

The brain is a supremely specialised organ comprised of millions of neurons,

which communicate with each other and the entirety of the human body by

firing a voltage called action potentials (spikes). A micro-electrode device

can be used to record the voltage of these action potentials within a specific

region, or they can be recorded as an EEG signal using a Neuroscan device.

In this instance, the objective of the neurophysiologist is to understand the

behaviour of the brain through the interpretation of these spikes, matching

them as accurately as possible to their respective neurons. The steps to sorting

the spikes begin with detection of spikes using different types of thresholding,

then extracting spike features, and then finally clustering the spikes according

to those features. Extracting the features is the most important part of this

process as the spikes are convoluted with noise data and it is not easy to extract

a distinguishable features.

The spike sample points can be identified in two ways: feature selection

and feature extraction. Feature selection trims down the dimensions of the

original data before applying sorting, while feature extraction converts the

sample point to a more representative data with the same dimensions. When

the spike data have a large number of features, it is useful to consolidate them

to enhance computations by reducing the calculation time and complexity.

There are many methods used to extract features. The most popular meth-

ods will be explained and the advantages and disadvantages of each method

will be highlighted.

Page 55: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

39

In [103], Yang used the Point-to-Point (PP) comparison as a feature extrac-

tion method. It is a ‘brute force’ approach that directly uses the spike sample

points instead of extracting features (i.e. it does not reduce the dimensions).

It is considered to be one of the easiest feature extraction methods. However,

time shift sensitivity is one of the main problems with this method. Shifting

the spikes before comparing them can solve the problem but it can also causes

serious problems in more complex cases [104].

Discrete Derivative (DD) was introduced in [105,106]. This depends mainly

on calculating the signal derivative at each spike sample point as shown in

Equation (3.1).

ddδ(i) = S(i) − S(i − δ) (3.1)

where S is a spike, i is one sample point, and δ is the delay in time (sec). Usu-

ally the time delay is used with three values, which are 1, 3, and 7. This will

solve the time delay problem. However, the feature space dimension is tripled

in comparison to the spike sample’s real number, so the most effective DD

coefficients are used as features to reduce the added dimensions. The problem

here is that many coefficients have to be used as features, which will decrease

the performance of feature extraction step; hence, it cannot be used in online

applications.

In [106,107], First and Second Derivative extrema were used as feature extrac-

tion methods, the First Derivative (FD) method depends on the derivation

of the spike waveform in the discrete domain. First it calculates the first

derivative of the spike, then the negative and positive peak of the derivative in

addition to the peak of the spike itself, with the extracted features according

Page 56: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

40

to Equation (3.2).

fd(n) = S(i) − S(i − 1) (3.2)

where S is a spike and i is the index of the sample point.

This method depends mainly on the derivative of the waveform. The first

derivative of a signal is defined as its rate of change. The second derivative is

defined as the rate of change of the slope that represents signal’s curvature.

Spikes have several structural characteristics, such as slope, amplitude and

curve. The First and Second Derivatives are used to detect those features.

The derivatives are calculated using the difference between each spike sam-

ple point and its previous sample point. The first and second derivatives are

calculated using Equations (3.2) and (3.3) respectively.

sd(i) = fd(i) − fd(i − 1) (3.3)

Then it uses the negative and positive peaks of the first derivative and the

negative and positive peaks of the second derivative as features for each spike.

Then these features can be used together to distinguish between different spikes

without any calibration.

A potential disadvantage of using the derivative is that the wavelength

modulation’s amplitude is smaller than the spectral line’s width, which helps

in distortion avoidance. This leads to a low signal amplitude compared to the

original signal. Since the noise level is still the same, this represents a loss in

signal to noise ratio and thus a compromise has to be reached.

Variable selection techniques were presented in [108,109] as feature extrac-

tion algorithms. They do not depend on the entire spike samples but only the

Page 57: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

41

necessary information that can be obtained from a subset of samples to cluster

the data after that. These samples are very useful when a single outstanding

sample set is presented.

There are many examples for the variable selection techniques such as:

1) Chi-square approach that evaluates the spikes information based on mea-

suring their chi- squared statistic.

2) Correlation approach that evaluates the spikes information based on corre-

lation coefficient.

It is difficult to ascertain the subset of samples that contains the essential

information and it requires significant computational time. Nevertheless, it

will be used if these subset samples are clear enough.

Yang used Informative samples in [101,110], which depend on a theoretical

framework to extract the spikes’ feature. This framework includes neuronal

geometry signatures, noise shaping, and informative sample selection. It uses

the high frequency signal spectrum to differentiate between the neuronal geom-

etry signatures. In addition, it uses the noise-predefined properties to reduce

the SNR. It then uses the Variable Selection Techniques to identify informa-

tive samples to be subsequently used to sort spikes. Again, it is very complex

and challenging process to select the samples, which hold the most pertinent

information. The input data is the main performance controller.

In [111], Ghanbari used Graph Laplacian features to reduce the dimensions

of the data. The main M dimension data X = {xn}Nn=1 is reduced to a M ′

dimensional data using the transformation Y = AT X, where A = {am}Mm=1

and a is a vector with M dimension and projection A can be calculated from

Page 58: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

42

this minimisation Equation:

minA

N∑i=1

N∑j=1

|yi − yj|2Wij (3.4)

It is eligible if the M dimension neighbouring points in the main data remain

close to each other after a projection to the low dimensional space [112].

The spike signal is modelled using an autoregressive (AR) model of pth

order in [106, 113]. Its coefficients are calculated using the Burg algorithm.

The features used are the coefficients of the AR model for each spike.

xt = c +p∑

i=1φixt−1 + εt (3.5)

where φ1, ..., φp are the parameters of the model, c is a constant and εt is white

noise.

AR model succeeded in separating the signal from background activity.

However, this method is time consuming, hardware intensive, and draws ex-

cessive amounts of processing power. For these reasons it is inefficient for

online applications.

Geometrical Shape was one of the earliest techniques to extract the spike

features and it was introduced in [114]. This technique depends on the shape

of the spike, which could be the width, the height or peak-to-peak amplitude.

This method was commonly used because the computer power and memory

was not so high, but it takes time to choose the features that can highly

differentiate between the spikes [115]. In this method, a long feature vector

should be used which causes a low speed for any online application.

Principal Component Analysis was used as a feature in [116,117]. The idea

Page 59: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

43

behind principal component analysis (PCA) is finding an arranged set of rect-

angular basis vectors that capture the directions in the spikes of largest vari-

ation. This indicate the signal’s most significant components. Usually, due to

high variations in the visual aspect of neural spikes, the principal components

are then re-measured. Therefore, PCA-based algorithms are semi-automated,

as they need the user intercession to ensure that the detection accuracy is high.

PCA algorithm performs well if there is a high correlation between spikes.

However, recorded spikes are usually mixed with noise. Therefore, PCA fails

in noisy recordings.

Suppose that the given data X = {xn}Nn=1 with dimensional M . PCA

uses the linear transformation V T XC to reduce the dimension of the data to

M ′ where XC = xn − E[x]Nn=1 and V is the projection matrix that contains

the largest M ′ eigenvalues λ1 ≥ λ2 ≥... ≥λM ′ obtained from the covariance

matrix of XC [118].

Because there is no probability distribution specified for the observations,

PCA is not a statistical method, however PCA is an excellent mean by which

to process and concisely represent data. PCA will work better if standardised

data is used which changes the mean to zero. Most of the time the scales of

the original variables are not comparable and the first principal component is

dominated by those variables with a high absolute variance. Standardisation

will lead PCA results to come out with respect to standardised variables. This

makes the interpretation and further applications of PCA results even more

difficult. PCA can get rid of second order dependences; on the other hand, it

causes trouble with higher order dependencies.

Page 60: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

44

Wavelet Transform (WT) is one of the most prominent and usable methods

for extracting features. It is a time-frequency representation of the signal, it

is defined as the convolution between a brain signal x(t) and wavelet function

Ψa,b(t) [100,119],

WΨX(a, b) = 〈x(t)|Ψa,b(t)〉 (3.6)

where Ψa,b(t) are expanded and shifted versions of a unique wavelet function

Ψ(t),

Ψa,b(t) = |a|− 12 Ψ

(t − b

a

)(3.7)

where a is the scale and b is the translation parameter.

There are different versions of the wavelet; low frequency components pro-

duce a contracted version and high frequency components produce a dilated

version. Hence, the signal’s detail can be identified at several scales using

different wavelet functions.

WT has many advantages. First, the localised shape differences are consid-

ered while extracting the features. Second, it extinguishes the signal station-

ary requirement. Third, the spike’s shape information is dispensed on many

wavelet coefficients, but in PCA the first three principal components repre-

sent most of the spike’s information that are not obligatory helps in cluster

identification. Moreover, wavelet coefficients are time focalised.

The most popular wavelet transform which are used is Haar wavelets, which

are rescaled square functions. Haar wavelets are the best wavelet transform

as it has heavyset support and orthogonality, also it can represent the spike

using small number of wavelet coefficients and it does not depend on any prior

knowledge (i.e. spike shape) [120].

Page 61: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

45

Multi-modal wavelet coefficient (Multimodality pickup) was introduced

in [120]. It is commonly used if the spike components are distributed with

multiple peaks. These components are used to separate a large number of

clusters in the data. Multiple peaks wavelet coefficients are picked up then the

Kolmogorov-Smirnov (KS) [120] test for the normality is employed. KS test

evaluates the deviation from the normal distribution.

To reduce the outliers; mean and variance statistical assessment is calcu-

lated for the normalised data. When mPICK is used without wavelet trans-

form, the KS test is applied to the distribution of the values at each time point

of all the detected spike waveforms and pick up the time points that yield large

multi-modality. A problem here is that the redundancy can be generally large

in the features extracted by mPICK.

Using wavelets can cause other serious problems. Firstly, the WT is shift

sensitive because input signal shifts generate unpredictable changes in WT co-

efficients. Secondly, the WT suffers from poor directionality because WT co-

efficients reveal only three spatial orientations. Thirdly, WT analysis lacks the

phase information that accurately describes non-stationary signal behaviour.

Given these disadvantages, a feature extraction method is necessary. Two

logarithmic feature vectors will be used to represent the signal; these methods

are the Cepstrum Coefficients and Mel-Frequency Cepstral Coefficients. The

advantages of using these methods are stated in the following chapter.

Page 62: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

46

3.3 Spike Sorting

This is the step where the neural spikes are grouped into different clusters

based on their sources. The clustering step is usually the most difficult and

complicated step in the Spike Sorting process. In early Spike Sorting, the

clustering method was performed manually, with the obtained features drawn

on a scatter plot and the boundaries of each cluster determined manually [114].

The best known Spike Sorting software packages enables the user to define

the cluster edges by drawing polygons in the feature space using the mouse

pointer. This method was not practical, however, as it mainly depends on

human judgement, which is not infallible [121, 122]. Moreover, they were ex-

tremely time consuming, so, researchers decided that they needed a semi-

automated approach. Semi-automated methods were implemented depending

on window discriminators, by which any spike that intersects with one or sev-

eral user-defined windows are marked and assigned to the same neuron. The

most common Spike Sorting methods will be investigated, and the main ad-

vantages and disadvantages of each method will be highlighted.

The first clustering algorithm is called K-means. It is a fully automated

method used to cluster the data and which is more sophisticated than manual

and semi-automated clustering methods. This method is called K-means and

it is now considered to be the benchmark for all other techniques [123]. The

K-means algorithm is based on a distance metric. The detailed algorithm is

described in the flowchart shown in Figure 3.2 at the end of this subsection.

Let us focus now on the main advantages and disadvantages of this method.

The major advantages of k-means are simplicity and speed. It is a very simple

Page 63: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

47

algorithm and its computation time is very low. On the other hand, its main

disadvantage is that it is a supervised algorithm, which means it does not work

unless the user enters the number of clusters.

Most of the time, Spike Sorting is used by Brain Computer Interface (BCI)

applications. These are considered to be fully automated applications in which

the user cannot enter any data. In addition, it is immensely difficult for the

user to know the number of neurons. However, substantial amounts of research

has been performed to estimate the number of neurons and use this as an input

to covert the k-means to an unsupervised algorithm [124].

K-means training does not run in real time, which is a major drawback. So

it cannot be used for any online (real time) application. In addition, K-means

is parametric which means that each point (spike) is allocated to a specific

cluster depending on the distances from the cluster’s centroid. This will lead

to spherical clusters, which is not the case of many neural data distribution

such as electrode drifting, and the neural data distribution will form ellipsoidal

clusters. However, K-means will divide the ellipsoidal cluster into two spherical

clusters.

Another algorithm that is used in Spike Sorting is called Valley Seeking. It

is an unsupervised clustering algorithm [125]. Valley seeking is based on the

normalised density derivative (NDD), it measures the dissimilarity between

each observation pair in a local neighbourhood. The normalised density deriva-

tive is calculated first and the peaks of this function are detected as shown in

Figure 3.3. The regions between these peaks are known as the valleys and they

identify the cluster boundaries.

Page 64: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

48

Figure 3.2 K-means calculation steps. The first step is to define thenumber of clusters that one needs to generate. Each cluster represents asingle neuron. Then, randomly select a random centroid for each cluster inthe k clusters. This will leads to k random centroids. Each data point willbe assigned to the cluster with the closest (usually by Euclidean distancemeasure) centroid. Then, recalculate the centroid of each cluster based onthe cluster’s mean value. Finally, steps 3 and 4 should be repeated untilthe centroid values do not change or until a specific number of loops isreached.

The major advantage of the valley seeking algorithm is that it is an unsuper-

vised algorithm, so the user does not enter the number of clusters. Moreover, it

is a non-parametric algorithm, which means that it can cluster different neural

data distribution with different shapes. On the other hand, it still has the same

running time problem as it does not run in real time, making it incompatible

with the real-time applications. From a hardware point of view, this algorithm

has a significant complexity as it performs operations and stores the data in at

least six n-by-n matrices where n represents the spike’s count. Valley seeking

cannot be used for large n as it will be difficult to implement on hardware.

Page 65: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

49

Figure 3.3 Steps of the Valley Seeking clustering algorithm.

In [120], Superparamagnetic clustering (SPC) was introduced, which be-

came one of the most acclaimed clustering algorithm in Spike Sorting pro-

cess [126]. It is an unsupervised clustering algorithm. The spikes are rep-

resented as a granular magnet model, where each spike is assigned a spin.

The temperature of the model is increased gradually from low to high. The

ferromagnetic region appears at very low temperatures where all the spins

are aligned, and the paramagnetic region appears at high temperatures. The

system is unstable and all the spins are at random positions. The superparam-

agnetic region appears when the temperature of the model lies between these

two temperatures (the high and the low). In this region, the spins, which have

a similar high-density region, are grouped together while the spins of different

high-density regions are not grouped. At these points, the clusters appear. An

algorithm is also written at the end of this subsection.

SPC has some advantages, similar to Valley Seeking. Firstly, SPC is an

unsupervised clustering algorithm in which the number of clusters (neurons) is

not used as an input. Secondly, it is nonparametric so it can represent any neu-

ral data distribution. It does, however, contain some disadvantages, the first

being its huge complexity. It needs at least 9 n-by-n matrices for computation,

Page 66: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

50

where n represents the spikes count and huge n must need many operations

and memory to be done. In addition, Monte Carlo simulation is needed for

SPC computation, making the computation time even more protracted. The

algorithm can be made simpler by replacing the Monte Carlo simulations with

mean-field approximation, which will decrease the running time, however the

complexity will increase. Moreover, SPC works offline, which means that it is

not a real time algorithm making it impractical for any BCI applications.

1. Estimate matrix D = (dij) which is basically based on Euclidean dis-

tance.

2. Get all neighbours’ points for point vi based on the K nearest neighbour-

ing algorithm. vi can be a neighbour for point vj if and only if vi and vj

are one of the K nearest neighbours for each other.

3. A random Potts spin is allocated to every point vi and is represented by

si = 1, 2, ..., q and si can have one as a default value. Also, q represents

the achievable number of spins which does not represent the number of

clusters at all. In [126] the value 20 is used for q.

4. Calculate Jij represents the interaction strength, and it is calculated for

two neighbouring points vi and vj, where

Jij =

⎧⎪⎨⎪⎩

1K

exp( d2ij

2a2 ), if vi and vj are neighbours.

0, otherwise.(3.8)

and a is the average of all dij‘s for all points which are neighbours.

5. Monte Carlo simulation is applied to all temperatures (such as T =

Page 67: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

51

0:0.02:0.2), Monte Carlo simulation is shown from step (a) until (d) with

iterations m ranges from 1 to M.

(a) A frozen bond is applied on nearest neighbouring points which are

represented as vi and vj with probability pfij = 1 − exp(Jij

T.δsi,sj

)

when si = sj where δsi,sj= 1 and it is zero in any other cases.

(b) A number x is selected randomly from a uniform distribution ranges

between zero and one. If x < pfij, there is a which is the bond

between vi and vj.

(c) All the points which are connected by a bond form a cluster.

(d) Generate cm as:

cmij =

⎧⎪⎨⎪⎩

1, if vi and vj are in the same cluster.

0, otherwise.(3.9)

6. Two-point connectedness is calculated and is given the symbol Cij. It

can calculated from this Equation: Cij = 1M

∑Mm=1 cm

ij

7. Spin-spin correlation function is calculated from the Equation below:

Gij = (q−1)cij+1q

8. If Gij > θ, where θ is a predefined threshold, the same cluster contains

vi and vj.

9. Cluster labels are assigned to observations based on the value of G.

Osort is the only automatic and online clustering algorithm. It is basically

designed and implemented by researchers who need to extract each signal

neuron in their experiments [127]. This target needs huge amount of data

Page 68: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

52

processing in real time. Their method is simple. They use the on-the-fly

technique to allocate each spike to a specific cluster. The algorithm is written

at the end of this chapter.

The Osort does not require either huge computations or memory and it is

considered the only algorithm that can be implemented in hardware. The

major disadvantage is that it clusters the data based on the distance, and

especially assumes that the data distribution is spherical. This means that it

works effectively with spherical data distribution but generates poor results

for any other distribution, such as ellipsoidal clusters, which usually happen

due to the multivariate noise.

The Osort algorithm is shown below.

1. The first data point is allocated to its own cluster as an initialisation

step.

2. Euclidean distance is calculated between the following data point and

the centroid of each cluster.

3. Calculate the smallest Euclidean distance and compare it with the merg-

ing threshold TM . The point is assigned to the nearest cluster if this dis-

tance is less than TM and the cluster’s mean should be calculated again

after adding the new point. The mean should use the most recent N

points. Otherwise, create a new cluster.

4. Check if any distance between any clusters is less than the sorting thresh-

old TS, if yes, those clusters should be combined together to create a new

big cluster with a new mean.

Page 69: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

53

Steps 2 to 4 are then done again in an open-ended fashion. The simple

form of the Osort algorithm, TM = TS, which is equivalent to the data variance

calculated continuously on a long (∼ 1 min) sliding window. The most recent

N points in each cluster must be used to calculate the cluster’s centroid. This

assists in identifying the drift of any electrode, as it is possible for the clusters

to drift.

A comparison that shows the differences between K-means, Valley Seeking

clustering, SPC, and Osort is shown in Table below. SPC gives close results to

Valley seeking clustering, but Osort generates many clusters, which should not

be there, and this is called over-clustering, where it splits the original cluster

to one or more sub-clusters. A summary of various characteristics of each of

the algorithms described in this section is given in Table 3.1.

Table 3.1 Comparison between the common Spike Sorting techniques.K-means Valley Seeking SPC Osort

NonParametric No Yes Yes NoAutomatic/Unsupervised No Yes Yes YesReal-time/Online No No No YesAdaptive No No No YesAccuracy low 0.9 0.74 0.85 0.74Complexity Low High High Low

In the next chapter, HMM will be used in the Spike Sorting process. Briefly,

this identifies the signal as a set of states, which will lead to a better accuracy.

It is non parametric algorithm, unsupervised, online and it has low complexity.

Page 70: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

54

3.4 Noise level Estimation and Quality As-sessment Measure

The input of the Spike Sorting process is a neural signal such as EEG signal.

EEG signal passes through several steps including feature extraction and Spike

Sorting. There is a very important step before applying any method, this step

is to establish the quality of the input signal and the amount of noise in the

signal. This aspect is paramount in this research.

Neural signal will be ideal if it does not contain any noise. Unfortunately,

it is impossible to record a neural signal without noise. Removing some noise

sources can be relatively easy; however, others are more challenging.

One of the main sources of noise is the external environmental noise, for

example computers, routers, displays, AC power lines and mobile telephones.

The easiest way to reduce the effect of the external environmental noise source

is to avoid having it in the first place, which can be done by turning off these

devices. However, this solution cannot be implemented in all cases, as one will

need to turn on at least one computer to record the data [128].

The external environmental noise source can be partially avoided by insu-

lating the recording room using a Faraday cage. This will reduce the external

environmental noise but it needs an advanced planning and costly materi-

als [129].

Physiological noise is another noise type, which can be generated from dif-

ferent sources such as cardiac signal (ECG), muscle movement artifacts (EMG)

and eye movement artifacts (EOG). The ECG signal effect cannot be avoided,

but it is considered to have the lowest effect on the recorded EEG signal.

Page 71: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

55

EMG and EOG signals can have a huge effect on the EEG signal. They can

be avoided for a minor period by asking the participant to stay in a motionless

position, but this will not last for a long time. Other researchers have tried

to plan their experiments carefully in order to avoid any motion during the

critical task recording component, for example, by ensuring no eye blinking or

any limb motion during recording of the main critical part [130].

Signal averaging [87] is considered to be the easiest way to deal with noise

in the recorded EEG signal. It is based on the assumption that the noise

is random or it can happen with a random phase. However, the EEG signal

should be stable. Signal averaging has some limitations. One of these problems

is stability, signal averaging will work when a stable signal is recorded over a

big count of trials. Another problem is that signal averaging can only eliminate

stationary, zero mean random noise, which means that it will not work with

any non-random noise. Finally, signal averaging needs a quite large number of

trials to sufficiently increase the Signal-to-Noise ratio.

Visual inspection [131] is one of the most common ways to detect the noise

in the recorded EEG signal. It is a straightforward procedure. Most common

artifacts can be detected before applying any analysis on the recorded data.

However, it is not always an effective method especially when dealing with a

huge amount of data; it needs a vast amount of time to visually inspect these

data. Moreover, it is a difficult task to detect some types of noise, even for

expert EEG analysts.

The estimation of SNR has been used in numerous fields, such as speech

and image processing [132, 133], and has been an active field of research in

Page 72: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

56

recent years. An accurate SNR estimation can improve the performance of

any algorithm, where the amount of noise is known prior to any processing.

Hence, it makes it easier to compensate for the effects of noise.

Different techniques have been developed for SNR estimation. These tech-

niques were used to estimate the amount of noise in a signal. One of those

techniques is called the Directive algorithm, which estimates the noise based

on spatial filtering. The original signal is detected and any other signal which

comes from other direction is considered as noise [134,135]. This technique is

successfully used in speech processing, however, it cannot be applied to brain

signal due to the countless number of sources (neurons), located in different

directions.

In [136–138], Noise Suppression algorithms were used to estimate the noise

level based on one channel only and without any spatial information. The

noise estimate is generated based on the signal pauses. In signal pauses, the

signal’s spectrum is calculated. This spectrum identifies the present noise floor.

It estimates the noise perfectly in speech applications; however, this will not

be the case if applied to brain signals. At anytime, different neurons must

fire action potentials as discussed in Chapter 2, hence, there are no pauses in

the neural signals, pauses upon which Noise Suppression algorithms mainly

depend on them.

Doblinger [139] divided the signal into bins based on frequency. Then, the

minimum of the noisy signal was tracked in each bin continuously. However, it

failed to detect any increase in the signal power as it is detected as an increase

in the noise floor.

Page 73: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

57

Hirsch and Ehrlicher [140] and Martin [141] proposed algorithms that do not

depend on the signal pauses. These algorithms depend on the statistical anal-

ysis of the spectral energy envelope. Both algorithms are based mainly on

tracking the minimum of the noisy signal within a specific limited window.

Tracking is based on two energy histograms values, which are built using dif-

ferent frequency bands. The minimum value is less than the mean, therefore

the unbiased noise estimate is calculated using a bias factor, which is reliant

upon the minimum estimate statistics. The fact that both methods are very

time consuming represents a methodological shortcoming. If the noise floor

changes, further time will be consumed while updating the noise spectrum.

In [142, 143], Cohen introduced a minima controlled recursive algorithm,

which tracks the noisy regions only and update updates the noise estimate

accordingly. Regions tracking is done based on a predefined threshold. When

the noise spectrum increases, there is a time delay and lagging twice that

window length. Delay and thresholding are the drawbacks of this method.

Ris and Dupont [144] mixed some of the previous methods with narrow

band spectral analysis, by which valleys between the segments of the signal

enabled noise estimation. However, this method needs extended time windows

to accomplish the required spectral resolution. The major drawback of the

method is the lack of fast adaptation when the noise levels increases, so this

method cannot be used in real time applications and when the SNR is high.

Finally, Stahl introduced a quantile-based algorithm to estimate noise in

[136], the noise is estimated depending on the noisy power spectrum‘s qth

quantile. A wrong noise floor is generated when the noise is varying in the

Page 74: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

58

signal, which is the case in neural signals. This leads to an incorrect noise

level estimation.

For all the reasons stated above, a noise estimation method, which depends

on principles of statistics and applied on the signal’s feature level in the loga-

rithmic spectral domain, is required. In brief, vectors holding the features of

a noisy signal could be modelled using a Gaussians mixture, and the recur-

sive EM algorithm to maximise the conditional likelihood function, which will

generates the noise feature vector.

An automated quality assessment measure is needed. This measure can

identify the quality of the recorded signal based on the amount of noise, and

the biological and statistical features of the signal. It can identify bad channels

and containing excessive noise [145]. This will be the first automated quality

assessment measure for the neural signal. There are various research and BCI

applications, which are based on neural signals such as EEG signals. All of

them use the EEG signals to control, give order and assess machines but the

assessment of the EEG signal itself has not yet been done. It is a compelling

topic of investigation to assess EEG signal and use this assessment measure to

improve the performance of the applications, such as BCI applications. It will

be used as an input for the BCI applications as well, hence, there will be two

inputs for BCI applications. The first input is the EEG signal itself and the

second is the quality of the EEG signal.

Page 75: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

59

3.5 Conclusion

This chapter has provided a critical review of feature extraction methods,

Spike Sorting techniques, noise estimation and quality assessment measures

for the neural signal. The main advantages and disadvantages of each method

has been highlighted. New feature extraction and Spike Sorting methods are

needed based on the reasons mentioned in this chapter. Moreover, a quality

measure will be needed to assess the recorded EEG signal. In the next chapter,

the new methods of feature extraction and Spike Sorting will be introduced.

Feature extraction methods will extract meaningful features which will improve

the accuracy of the Spike Sorting process. Moreover, new clustering algorithm

will be used to increase the speed and performance of the Spike Sorting process.

Then, the noise level estimation will be addressed in Chapter 5 followed by

the automated scores chapter.

Page 76: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 4

Feature Extraction and SpikeSorting

4.1 Introduction

A critical review on feature extraction methods, Spike Sorting techniques,

noise estimation and quality assessment measures for the neural signal were

provided in the previous chapter, where advantages and disadvantages of each

method were highlighted. In this chapter, the new feature extraction and Spike

Sorting methods are introduced. This is the first step to decoding the brain

and helps designing an automated quality measure since it can identify the

behaviour of the neurons. In order to undertake the Spike Sorting process,

, first the spike features should be extracted, and then clustering the spikes

according to those features [114]. Extracting the features is the most important

part in these steps as the spikes are convoluted with noise and it is not an

easy task to extract distinguishable features. Moreover, it is important to

consolidate the number of features in case of extracting too many unnecessary

features, to reduce computational burdens for real-time applications.

60

Page 77: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

61

Three different feature extraction methods were mainly used, which are Dif-

fusion Maps, Cepstrum Coefficients and Mel-Frequency Cepstral Coefficients.

Then, Hidden Markov Models (HMM) were applied for spike classification.

In the beginning of this research, the Diffusion Maps were used to represent

spikes in a meaningful feature vector, then trying to improve the performance

of extracting features, the Cepstrum and Mel-Frequency Cepstral Coefficients

were used.

The next step was focusing on the Spike Sorting process itself. HMM was

used for Spike Sorting. It was noticed that neural spikes have been represented

precisely and concisely using HMM state sequences. A HMM was built for neu-

ral spikes, where HMM states can represent the neural spike. The neural spike

can be represented by four states: it could be ascending, descending, silence or

peak. Each spike was constituted with an underlying probabilistic dependence

modelled by HMM. Based on this representation, spikes sorting became a clas-

sification problem of compact HMM state sequences. In addition, the method

was enhanced by defining HMM on extracted Cepstrum features, which im-

proved the accuracy of Spike Sorting. In addition, Mel-Frequency Cepstral

Coefficients (MFCC) were applied to improve the classification results. Sim-

ulation results demonstrated the effectiveness of the proposed method as well

as the efficiency.

4.2 Feature Extraction Methods

Feature extraction is one of the most important steps in which the salient

features of the spikes are derived based on spike wave-shapes. The features

Page 78: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

62

should be able to differentiate spikes of different neurons and preferably low di-

mensional well. Peak-to-peak amplitude, maximum spike amplitude and spike

width are simple features, which may be used [114]. These approaches however

are sensitive to noise and intrinsic variations in spike shapes. As shown in the

literature review, principal component analysis (PCA) is one of the popular

methods used for feature extraction in Spike Sorting [146,147]. Wavelet Trans-

form [148] has emerged as a competitive feature extraction method for Spike

Sorting [149–151].

4.2.1 Diffusion Maps

In the diffusion maps (DM) framework, one needs to construct a graph of

the data [152]. The weights of the edges of the graph are computed by the

Gaussian kernel function. This process results in a matrix w with elements

defined as :

wi,j = e− ||xi−xj ||22σ2 (4.1)

where σ is the variance of the Gaussian variables, xi and xj are nodes of the

graph. The matrix w afterwards is normalised to have the summation of its

rows elements equals to 1. The following matrix, denoted as p(1), is then

constructed:

p(1)i,j = wij∑

k wik

(4.2)

The matrix p(1) is considered as a Markov matrix as the DM originates from

dynamical systems theory. The matrix p(1) represents the probability of a

transition among data points in a single time step. The forward probability

matrix for t time steps p(t) is accordingly defined by (p(1))t. The diffusion

Page 79: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

63

distance is calculated based on the random walk forward probabilities p(t)ij as

follows:

D(t)(xi, xj) =

√√√√√∑k

(p(t)ik − p

(t)jk )2

ψ(xk)0 (4.3)

where ψ(xk)0 = mk∑j

mjwith mk = ∑

j pkj the degree of node xk. It is obvious

that pairs of data points with a small diffusion distance correspond to a high

forward transition probability. The low-dimensional representation O is then

represented by the d non trivial principal eigenvectors of the eigenproblem

using spectral theory on the random walk p(t)ν = λν. The largest eigenvalue

is trivial because the graph is fully connected, and thus its eigenvectors ν1 is

discarded. Then the low-dimensional data representation is expressed by

Y = (λ2ν2, λ3ν3, ..., λd+1νd+1) (4.4)

The results are shown in the next section, the accuracy of the most common

algorithms were compared and diffusion maps showed high accuracy despite

using less number of features, this reduced the computation cost as well. How-

ever, using Cepstrum coefficients and Mel-Frequency Cepstral Coefficients gave

the highest accuracy; the results will be discussed in the following sections.

4.2.2 Cepstrum Coefficients

The proposed method used Cepstrum to represent spikes of a noisy signal.

Cepstrum is the Inverse Fourier transform (IFT) of the logarithm of the es-

timated spectrum of a signal as shown in Figures 4.1, 4.2, 4.3 and 4.4. The

idea behind representing the spikes using Cepstrum is that not only does Cep-

strum hold information about magnitude, but also it selects more meaningful

features from noisy signals. Moreover, the number of the extracted features

Page 80: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

64

is very small compared to other methods, which leads to less computation.

Hence, Cepstrum gives better performance, more efficient Spike Sorting and

requires less computation time.

In this section, the proposed feature extraction method was compared with

the most common extraction method, the Haar wavelet transform. In order to

compare the feature extraction methods, Superparamagnetic Clustering (SPC)

algorithm was applied to both methods. SPC is considered the most common

clustering algorithm used for Spike Sorting.

A multielectrode array system was used to record the neural spikes and

after that, thresholding was applied to recorded data to detect the spikes.

There are abundant methods used to select a threshold for the data [153], but

the most accurate method is the dynamic thresholding as shown in Equations

(4.5) and (4.6) [119].

Thr = 4σn (4.5)

σn = median( |x|

0.6745

)(4.6)

where σn is the background noise standard deviation and x is the bandpass

filtered signal.

The next step was to extract the spike features. This is the most important

step because clustering the spikes depends on the accuracy of the extracted

features. Extracting the most dominant and invariant features that are insen-

sitive to noise will improve the performance of neural spikes classification.

Cepstrum is computed as in Equation ((4.7)):

Page 81: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

65

Figure 4.1 Sample signal representation.

Figure 4.2 DFT of the signal in Fig. 4.1. (F{x[n]})

c[n] = IDFT{log|DFT{x[n]}|} (4.7)

Cepstrum feature vector of a signal is computed as in Equation (4.8):

c[n] =N−1∑n=0

log

(∣∣∣∣∣N−1∑n=0

x[n]e−j 2πN

kn

∣∣∣∣∣)

e−j 2πN

kn (4.8)

where c is the Cepstrum feature vector of signal x, N is the number of samples

in the signal, j is√−1 and 0 ≤ k ≤ N − 1.

The last step was clustering the spikes based on the extracted features,

Superparamagnetic Clustering was used to cluster the spikes. It is the most

Page 82: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

66

Figure 4.3 Log magnitude of the DFT of the signal in Fig. 4.2.(log|F{x[n]}|)

Figure 4.4 The Cepstrum representation of the signal shown in Fig. 4.1and it is called as the inverse DFT of the of the signal in Fig. 4.3(F−1{log |F{x[n]}|}).

Figure 4.5 Haar representation of signal in Fig. 4.1.

Page 83: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

67

Figure 4.6 Cepstrum representation.

commonly used, unsupervised clustering algorithm, and is explained in [154].

It will be replaced by an improved clustering method in the following chapter.

Two algorithms were developed to measure the clustering accuracy between

Haar and Cepstrum’s spike representation. Algorithm 1 was developed to mea-

sure the clustering accuracy in terms of spikes correct assignment. The inputs

of the algorithm were the real spikes (RealS) and the real clusters (RealC) of

the used data. Also the generated spikes and clusters were marked as GenS

and GenC and the generated spikes were mapped to the real ones based on

the detection time (DTime).

Then the spike’s real cluster (RealClass) and the generated cluster (Class)

are known. For each generated cluster, the number of spikes were counted from

real cluster 1, 2 and 3 (SpkRealC1, SpkRealC2 and SpkRealC3) and max of

them will map the real cluster to the generated one (MappedRealtoGenClass),

then that max number was divided by the total number of spikes of the real

class to get the mapping ratio (MappedRealtoGenClassRatio).

Also Algorithm 2 was developed to measure the accuracy of the clustering

results using the confusion matrix [155]. First, Superparamagnitic clustering

algorithm was applied to 70% of the spikes (training data) and the remaining

30% was used for testing. Secondly, the mean for each generated cluster was

Page 84: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

68

Algorithm 1 Calculate spike and cluster matching correctness.Require: RealS and RealC are known.

Also GenS and GenC are calculated.Ensure: MappedRealtoGenClassRatio.

i = 0while GenS[i] = null do

MinDiff = 1000j = 0while RealS[j] = null do

TimeDiff = |RealS[i].DTime − GenS[i].DTime|if TimeDiff < MinDiff then

MinDiff = TimeDiffGenS[i].RealClass = RealS[j].Class

end ifj++

end whilei++

end whilewhile GenC[i] = null do

SpkRealC1 = GetSpikesInfo(GenC[i], RealC[1])SpkRealC2 = GetSpikesInfo(GenC[i], RealC[2])SpkRealC3 = GetSpikesInfo(GenC[i], RealC[3])MappedRealtoGenClass[i] =

MaxSpikeNo(SpkRealC1, SpkRealC2, SpkRealC3)MappedRealtoGenClassRatio[i] =MappedRealtoGenClass[i]/SpikesCount(GenC[i])

end while

calculated. Thirdly, the cluster that has the minimum Euclidean distance

between its mean and the testing spike was assigned to the testing spike.

Fourthly, the class that has the maximum number of spikes in that generated

cluster was assigned to the testing spike. Finally, the index of the detected

class and real class of the tested spike was incremented in the confusion matrix.

The accuracy can be calculated by adding the diagonal values then divide it

by the sum of the matrix values.

Page 85: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

69

Algorithm 2 Calculate Confusion Matrix for clustering results.Require: Cluster 70% of the detected spikes.

The remaining 30% will be used for testing.while GenC = null do

spikes = GetAllSpikesBelongtoCluster(GenC)ClusterMean[GenC] = Mean(spikes)GenC = nextCluster

end whilewhile TestingSpike = null do

GenCluster = minEucDis(TesingSpike,ClusterMean)MajorityClass = ClassMajoritySpikes(GenCluster)RealClass = getRealClass(TestingSpike)ConfusionMatrix[MajorityClass][RealClass]++TestingSpike = nextSpike

end while

For the performance comparison of classification using different feature vec-

tors, a synthetic time series signal representing the neural spikes, with varying

degree of noise levels, was adopted. This dataset is commonly used for per-

formance analysis [119]. The results were accumulated over 50 repetitions

to avoid any bias. Spikes embedded into the synthetic signal are from three

distinct classes; class 1, 2 and 3 contain 784, 776, 794 spikes respectively. Cep-

strum transformation gave better clustering results as compared with that of

the Haar wavelet (HW) features in terms of the computational cost, number of

generated clusters, number of spikes per cluster, number of unclustered spikes,

percentage of correctly assigned spikes and confusion matrix accuracy.

Unclassified spikes can be defined as the spikes that could not be assigned to

any cluster during classification. This factor was highlighted as one of the key

parameters in validating the performance of the proposed algorithm. Compar-

isons performed are shown in Table 4.1 where unclassified spikes were assigned

to cluster zero. A clear distinction can be seen between Haar and Cepstrum

Page 86: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

70

Table 4.1 Number of spikes in each cluster using Haar and Cepstrumrepresentation.

Generated Haar’s Spike Cepstrum’s SpikeCluster Count Count0 1032 1291 316 6722 273 6433 261 5074 94 845 65 306 24 -

based algorithms. The Haar method managed to classify around 40% spikes

whereas the classification done by Cepstrum method managed to cluster above

95% of the spikes. In reference to three classes of the synthetic data used for

this validation, Haar method classified all the remaining spikes into six clusters

whereas the Cepstrum method divided the spikes into five clusters with three

very dominant ones, as shown in Figure 4.7. Average correlation coefficient

calculated for spikes within the same cluster was around 93% and 95.5% for

Haar and Cepstrum, respectively. The number of spikes that are assigned to

the first three clusters (1, 2 and 3) using Cepstrum is approximately twice

the number assigned using Haar. This means that the Cepstrum succeeded to

represent the spikes in a better way leading to more meaningful clusters.

Haar represented the spike in a 64-sample point. After some processing

steps, the best 10 sample points were selected for clustering. However, for the

Cepstrum approach, only 20 sample points were used. This implied that less

computation time could be used.

Also, Tables 4.2 and 4.3 show the output of Algorithm 1. The number

Page 87: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

71

(a) (b)

Figure 4.7 Haar and Cepstrum output in terms of number of clusters andnumber of spikes per cluster.

of spikes, which were correctly assigned inside each cluster by the Haar repre-

sentation, was about 50% fewer than those by the Cepstrum representation.

Besides that, percentages of the correctly mapped spikes using the Cep- strum

representation were higher than those of the Haar representation.

Table 4.2 Number of correctly assigned spikes in each cluster using Cep-strum representation

GeneratedClass 1 Class 2 Class 3 HighlyMapped

Correctly Wrongly Not

Cluster Class assigned assigned assigned

1 633 24 15 1 80% 4.9 % 15.1%2 10 608 25 2 78% 4.5% 17.5%3 11 13 483 3 60% 3% 37%4 3 4 77 3 - - -5 1 3 26 3 - - -

Algorithm 2 was applied to the results to compare the accuracy between

Haar and Cepstrum representation in terms of classification. A percentage

of 70% of the spikes were used as training data and the remaining 30% is

used for testing. In this experiment, synthetic data were used, so the correct

class assignment were checked using the testing spikes and filling the confusion

Page 88: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

72

Table 4.3 Number of correctly assigned spikes in each cluster using Haarrepresentation.

GeneratedClass 1 Class 2 Class 3 HighlyMapped

Correctly Wrongly Not

Cluster Class assigned assigned assigned

1 6 302 8 2 38% 2% 60%2 263 8 2 1 33% 2% 65%3 2 8 251 3 31% 2% 67%4 1 89 4 2 - - -5 62 1 3 1 - - -6 2 20 2 2 - - -

Table 4.4 Haar’s Confusion Matrix.Class 1 Class 2 Class 3

Class 1 242 28 22Class 2 7 272 14Class 3 2 21 276

matrix. For example, if a testing spike belonged to class 1 and was assigned

to class 2 the cell [1][2] in the confusion matrix was incremented. The bigger

numbers in the diagonals the more accurate classification could be achieve.

The accuracy was calculated by dividing the sum of the diagonal number to

the total matrix sum. The confusion matrix of Haar shown in Table 4.4 gave

89% accuracy but when Cepstrum was used it gave 94% accuracy as shown in

Table 4.5.

Table 4.5 Cepstrum’s Confusion Matrix.Class 1 Class 2 Class 3

Class 1 282 8 2Class 2 10 279 4Class 3 9 13 277

Page 89: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

73

4.2.3 Mel-Frequency Cepstral Coefficients

The most informative directions; those with lower entropy and with no

statistical model or orthonormal constraints, for example PCA or WT, are

linearly pursued MFCC. In addition, it will be shown here that PCA and

WT do not provide the highest clustering accuracy amongst the compared

linear feature extractors. On the other hand, the Mel-Frequency Cepstral Co-

efficients (MFCC) was proposed [156] for this step. The proposed method

provided higher clustering accuracy amongst the compared methods using dif-

ferent classifiers.

The use of MFCC as features for neural spikes has many advantages:

(a) MFCC can represent signals in a compact and meaningful way as they

allow focusing on specific frequencies by giving them more weight.

(b) Classifiers with MFCC features can achieve a good accuracy without the

need to build complex classification models.

Although MFCCs have been successfully used in many applications such as

speech recognition, music modelling, or emotion recognition, to the best of our

knowledge, they were not previously explored as features for identifying neural

spikes. After extracting the features, HMM [157] was applied in the clustering

step which gave better clustering results than the existing methods such as

K-means [158–161] and Superparamagnitic clustering (SPC) [119]. The main

problem in those clustering algorithms is that they rely on shape measurement

such as comparing width, height and spikes peak-to-peak amplitude.

This model is a novel introduction of HMM to analyse shapes of different

Page 90: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

74

spikes. For each spike, the proposed method observed that it contained four

significant shape variations: silence, ascending, peak and descending. Each

spike was partitioned into several segments and define observations of HMM

as these spike segments. The states of HMM corresponded to the four shape

variations. HMM with mixture of Gaussians was applied in this method. An

expectation maximisation (EM) algorithm is used to compute optimal HMM

parameters. The Viterbi algorithm [162] was then used to find the most likely

state sequence to represent each spike. After that, the sorting of spikes was

undertaken to classify the state sequences obtained. Experiments demonstrate

the effectiveness and efficiency of the proposed method.

First of all, the neural signal was recorded, then the MFCC of the signal

was calculated using the following steps:

1. Each spike had its own data file that can be read into an array S(n), where

n ranges from 0, 1, ... N-1 with N being the number of samples.

2. Spikes were split into distinct frames, each frame is 20-40 ms (25ms is

standard). This means the frame length for a 16kHz signal was 0.025*16000

= 400 samples. Frame step was usually something like 10ms (160 samples),

which allows some overlap to the frames. The first 400 sample frame started

at sample 0, the next 400 sample frame starts at sample 160 and so on until

the end of the file was reached. If the file did not divide into an even number

of frames, it was padded with zeros until it did.

3. Once it is framed Si(n) was obtained where n ranges over 1-frame size and

i ranges over the number of frames. This is a form of quantisation.

4. When the complex DFT was calculated, Si(k) was gotten - where i denotes

Page 91: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

75

the frame number corresponding to the time-domain frame. To take the Dis-

crete Fourier Transform of the frame, the following equation was performed:

Si(k) =N∑

n=1si(n)h(n)e−j 2π

Nkn, 1 < k < K (4.9)

where h(n) is an N sample long analysis window, and K is the length of the

DFT.

5. Then Pi(k) was calculated which is the periodogram based power spectral

of frame i is given by:

Pi(k) = 1N

|Si(n)|2 (4.10)

This is called the Periodogram estimate of the power spectrum. The absolute

value of the complex fourier transform was taken, and square the result. It

would generally perform the FFT. 6. The Mel-spaced filterbank was computed.

It is a group of 20-40 (the standard value is 26) triangular filters that is prac-

ticed to the periodogram power spectral estimate from step number five. The

filterbank was represented in 26 vectors. Most values in each vector were zeros

except for a particular section of the spectrum. Each filterbank was multiplied

with the power spectrum to calculate filterbank energies, and then coefficients

were added up. The output from this step was 26 numbers that indicated the

amount of energy found in each filterbank.

7. The log magnitude was calculated for the 26 energies, calculated from step

six. This gave 26 log filterbank energies.

8. Discrete Cosine Transform (DCT) was taken to the log magnitude (calcu-

lated in step seven) to give 26 cepstral coefficients.

The least 13 cepstral coefficients were used and the rest neglected, as only the

most significant features were needed. These values are called Mel-Frequency

Page 92: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

76

Cepstral Coefficients.

After that, 10 spikes were used from each cluster to build an HMM, this

model was used to classify the testing data which has more than 500 spikes per

cluster. HMM details are explained in the section below as well as the results

of using both MFCC and HMM.

4.3 Spike Sorting

Millions of neurons’ activities reflect the complex processes of the brain.

It is very important to understand neuron actions, as this will leads to un-

derstanding brain behaviour. Neurons communicate with each other through

action potentials. These action potentials are called spikes, which appears

in any neural signal, and each neuron has a unique spike shape. Assigning

each spike to its own neuron is very challenging and it is called Spike Sort-

ing. The main goal of Spike Sorting is to find the correlation between specific

spikes and neurons. This research shows an improvement in the accuracy of

the Spike Sorting process, which will help in many brain computer interface

applications.

Many Spike Sorting techniques have been developed as shown in Chapter

3 (sections 1 and 2). The unknown number of neurons is one of the main

challenges of Spike Sorting. Distinguishing spikes in the local area is a difficult

task especially when there is physical and biological noise [114, 119]. Most of

the common Spike Sorting methods depend on shape measurement such as

comparing height, width, and peak-to-peak amplitude of spikes [163, 164] but

their main problem is that they are not efficient when signal to noise ratio is

Page 93: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

77

low.

In this section, HMM was used for Spike Sorting, which showed an effective

and efficient result. There were three main steps as shown in Figure 4.8, these

steps are spike detection and feature extraction [119] and spike clustering.

Using HMM and MFCC in Spike Sorting is the main contribution in this

chapter. HMM can easily represent any spike, as each spike can be represented

by four different significant shapes, either ascending or descending, reaching

its peak or remaining unchanged (silence) and the HMM states were based

on these four different spike states. HMM parameters were computed using

expectation maximisation (EM) algorithm and the spikes’ state sequences were

generated using the Viterbi algorithm, then the spikes were sorted based on

their states. The results showed that the proposed method is effective and

efficient.

HMM is a statistical tool to model sequences, and it describes the prob-

ability distribution over a set of observations. It has been successfully used

for speech recognition. HMM consists of a set of states {S1, S2, ... Sn} as

shown in Figure 4.9. The Process moved from one state to another generating

a sequence of states: {Si1, Si2, ..., Sik, ...} and the Markov chain property of

each subsequent state depended only on what was the previous state, defined

as: P (Sik|Si1, Si2, ...Sik−1) = P (Sik|Sik−1). In addition, there are states that

are not visible, but each state randomly generates one of M observations (or

visible states) {V1, V2, ... Vn}.

HMM was utilized to model spikes in order to understand its underlying

states over a sequence of observations. For a spike, the significant shape states

Page 94: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

78

(a)

(b)

(c) (d) (e)

Figure 4.8 The main steps of Spike Sorting.The Raw data are shown insub-figure(a). The spikes are detected as shown in sub-figure(b), then thespikes are divided into three groups as shown in sub-figures(c, d and e),based on the extracted features.

Page 95: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

79

Figure 4.9 Observable and hidden states of the Hidden Markov Model.

are silence, ascending, peak and descending. Each of them was assigned to a

state (from s1 to s4) of the HMM as shown in Figure 4.10.

(a) (b)

Figure 4.10 The HMM states applied on the spikes.

HMM has five main elements, N is the number of states, M is the number of

observations, A and B are the state transition, observation probability matrix

B respectively and finally the initial state distribution Π.

Spikes were modelled using HMM. This modelling helps in finding the hid-

den spike’s states through observations. Any spike can be represented by these

states: silence, ascending, descending and peak (states from 1 to 4 respectively)

Page 96: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

80

Figure 4.11 HMM states and the transitions from one state to another.

as shown in Figure 4.10. HMM states were built according to the spike states.

Figure 4.11 shows the possible transitions between states in any spike. Any

spike begins and ends with a silence state, also any state can move on to any

other state except moving from up state to the down state or from silence to

peak or vice versa. The state transition matrix is shown below.

A =

⎛⎜⎜⎜⎜⎜⎜⎝

0.3 0.4 0.3 0.00.4 0.3 0.0 0.30.3 0.0 0.4 0.30.0 0.3 0.3 0.4

⎞⎟⎟⎟⎟⎟⎟⎠

(4.11)

Spike detection is the first step in Spike Sorting. The most commonly used

method for a dynamic amplitude thresholding is introduced in [119], where

spikes are accurately detected. First the signal S is filtered by a bandpass

filter bf , then the standard deviation σ is calculated by

median{|Sbf |/0.6745}. (4.12)

Then the dynamic threshold will be 4σ.

Spikes were saved in L number of samples after being detected by the dy-

namic threshold. L was set to 64 based on the literature review. Using raw

Page 97: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

81

data as HMM observation vectors is not a good idea due to noise sensitivity.

Cepstrum coefficients were used as a feature extraction method as mentioned

before in section 4.1.2, Cepstrum coefficients were extracted to help in noise re-

duction. Cepstrum features can capture both the amplitude property of spikes

and the phase of the initial spectrum. This helps in extracting meaningful

features from the data regardless of the noise level. Cepstrum was used to

represent spikes of a noisy signal. Cepstrum is the Inverse Fourier transform

(IFT) of the logarithm of the estimated spectrum of a signal as mentioned

previously.

Datasets used for experiments are the same as that used in [119]. Each

dataset contains a recording from three neurons with different noise levels. It

is difficult to differentiate between spikes, as they are very similar in shape.

In order to cluster them one must extract the features which can differentiate

them properly.

For the performance comparison of classification using different feature vec-

tors, a synthetic time series signal representing the neural spikes with varying

degree of noise levels, was adopted. The results were accumulated over 50

repetitions to avoid any bias.

Table 4.6 shows the clustering accuracy using different methods for feature

extraction and clustering algorithms. Spikes were represented in the first four

experiments by wavelet transformation. The most significant features were

selected using Kolmogorov-Smirnov (KS) test [165] [166] and then the data

were clustered using Superparamagnetic Clustering (SPC) [119]. It gave about

52% clustering accuracy on average. This accuracy was very low as very similar

Page 98: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

82

spike shapes were used, which make differentiation difficult.

The same feature extraction algorithm was used in the second experiment

but Gap statistics (GS [167]) merged with K-means clustering algorithm was

used instead of SPC. The result of clustering became 66% on average as K-

means is more stable clustering algorithm. Gap statistics were replaced by Sil-

houette statistics (SH) [168] in experiment number three. Statistics were used

to estimate the number of clusters before applying any clustering algorithm,

so this converted K-means from a supervised to an unsupervised algorithm.

The clustering accuracy was 69% when Silhouette statistics were used. It gave

slightly better accuracy than Silhouette statistics as it could better identify the

number of clusters. Mean shift was used in clustering in experiment number

four. Mean shift gave 69% accuracy.

The same experiments were repeated using the same clustering algorithm

but with different feature extraction algorithm. Diffusion Map [169] was used

for feature extraction and it gave better clustering results compared to wavelet

transform as shown in Table 4.6. In experiment 5, 6, 7 and 8 the clustering

accuracy was improved and this means that using the Diffusion Map represents

the spike in a more meaningful way.

In the last experiment, MFCC was used as a feature extraction method.

The proposed algorithm gave better results in terms of clustering accuracy.

The bar chart shown in Figure 4.12 compares between all common techniques

in terms of clustering accuracy and shows the result using different noise levels.

It was found that using MFCC as a feature extraction method gave the best

results among all other feature extraction methods.

Page 99: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

83

Tab

le4.

6C

lust

erin

gac

cura

cyco

mpa

rison

usin

gdi

ffere

ntno

isele

vels.

Fea

ture

Sel

ecti

onW

TW

TW

TW

TD

MD

MD

MD

MM

FC

C

Clu

ster

ing

Noi

seL

evel

No

ofsp

ikes

SP

CM

ean

GS

+S

H+

SP

CM

ean

shif

tG

S+

SH

+H

MM

Alg

orit

hm

shif

tK

-mea

ns

K-m

ean

sK

-mea

ns

K-m

ean

s

Exa

mp

le1

0.05

2729

42.1

479

.08

78.9

780

.249

.69

80.5

983

.09

84.1

995

.93

0.1

2753

44.1

184

.55

77.5

781

.451

.47

91.9

791

.02

92.2

493

.98

0.15

2693

40.3

385

.57

74.5

279

.290

.31

74.6

889

.98

87.8

93.0

7

0.2

2678

51.4

587

.69

71.8

181

.58

77.1

693

.74

95.5

492

.42

95.7

3

0.25

2586

56.6

682

.72

75.3

799

.96

58.2

173

.56

72.9

173

.12

95.8

0.3

2629

29.4

466

.87

83.6

166

.98

30.6

972

.17

71.6

274

.73

94.8

7

0.35

2702

8094

.565

.96

99.4

227

.17

66.1

475

.65

75.8

391

.2

0.4

2645

74.8

893

.51

69.8

197

.95

19.8

578

.11

87.8

89.3

890

.47

Exa

mp

le2

0.05

2619

5367

.32

74.9

967

.32

89.3

99.9

388

.53

88.0

393

.27

0.1

2694

75.4

267

.85

63.1

867

.85

63.6

794

.91

91.8

193

.34

92.8

7

0.15

2648

66.0

567

.49

58.1

367

.49

32.3

577

.11

90.9

191

.31

91.9

3

0.2

2715

43.2

66.1

551

.84

66.4

849

.85

63.3

882

.94

84.8

990

.79

Exa

mp

le3

0.05

2616

60.1

867

.277

.39

33.9

566

.52

82.0

792

92.4

592

.07

0.1

2638

49.1

62.3

642

.23

34.2

728

.23

86.6

188

.89

89.2

491

.67

0.15

2660

51.1

42.2

246

.97

34.2

928

.91

90.2

790

.28

90.4

591

0.2

2624

29.7

748

.63

48.6

434

.79

19.9

476

.96

78.5

981

.15

89.2

Exa

mp

le4

0.05

2535

38.4

666

.51

75.8

866

.51

74.4

998

.35

96.6

894

.23

94.3

0.1

2742

28.1

767

.65

73.1

967

.65

98.9

191

.91

91.8

791

.45

93.8

0.15

2631

54.0

867

.39

87.8

567

.39

85.1

110

098

.39

97.9

292

.93

0.2

2716

7467

.16

74.0

967

.17

48.2

699

.26

99.2

696

.63

90.8

7

Ave

rage

2663

5266

6869

5484

8788

92

Page 100: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

84

Fig

ure

4.12

Clu

ster

ing

accu

racy

com

paris

onus

ing

diffe

rent

leve

lsof

noise

Page 101: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

85

4.4 Conclusion

A robust feature extraction method and a robust classifier are needed to

extract and classify features of a noisy signal as noise will affect the accuracy

of any method. However, using a robust feature extraction method and clas-

sifier in conjunction with a noise estimation measure will help in identifying

the quality of the recorded signal as well as the quality of the methods used.

Hence, this chapter has introduced robust methods for extracting and classi-

fying signals and the noise estimation. Quality assessment methods will be

introduced in the next chapters.

In this chapter, the new feature extraction methods were explained. Fea-

ture extraction is very important step in Spike Sorting especially when dealing

with signals, which are convoluted with noise. Three different feature ex-

traction methods were used: Diffusion Maps, Cepstrum Coefficients and Mel-

Frequency Cepstral Coefficients. Based on the results shown in this chapter,

neural spikes were represented in a meaningful way, which helped in getting

better Spike Sorting accuracy compared to other common methods.

HMM were also used for Spike Sorting in this chapter. It was noticed

that neural spikes were represented precisely and concisely using HMM state

sequences. An HMM was built for neural spikes, where HMM states could

represent the neural spikes. The neural spikes can be represented by four

states; it could be ascending, descending, silence or peak. They imbue every

spike with an underlying probabilistic dependence that is modelled by HMM.

Based on this representation, spikes sorting became a classification problem

of compact HMM state sequences. In addition, the method was enhanced by

Page 102: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

86

defining HMM on extracted Cepstrum features, which improves the accuracy of

Spike Sorting. Simulation results demonstrate the effectiveness of the proposed

method as well as the efficiency. Also in this chapter, Mel-frequency Cepstral

Coefficients (MFCC) were used to improve the classification results.

In the next chapter, the research is going to show how to estimate the

noise level in the neural signal. Estimating the noise level will be based on the

extracted features and the classification algorithms introduced in this chapter,

which will help ascertain the noise level in an accurate way.

Page 103: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 5

Noise Level Estimation

A robust feature extraction method and a robust classifier were introduced

in the previous chapter. However, considering the uncertainty produced by

noise and the subsequent decline in the quality of collected neural signal, this

chapter proposes a quality assessment method for neural signal. The method

makes an automated measure to estimate the noise levels in the neural signal.

Hidden Markov Models (HMM) were used to build a classification model that

classifies the neural spikes based on the noise level associated with the signal.

This neural quality assessment measure will help physicians and researchers

to focus on the patterns in the signal that have a high Signal-to-Noise ratio

(SNR) and carry more information.

5.1 Introduction

Noise is the main problem that occurs while recoding any kind of neural

signals. Noise is undesired signal which is implicated with the main recording

[147]. Noise affects the recording and it is difficult to use the data in the

presence of large amounts of noise [170]. It is arduous process to estimate the

SNR in a neural signal [171].

87

Page 104: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

88

Noise can be divided into two categories. First, there is biological noise,

which is commonly produced by limbs, eyes or head activities. The second

category of noise is external noise, generated by technological factors [106].

Principally, the electrodes record the signal which is generated by a specific

number of neurons but the problem here is that one cannot control the number

of neurons, so unneeded spikes were recorded, which decreases the SNR [101].

It is not possible to record the neural signals without the biological noise but it

is a relatively easy to detect them and remove it after recording and analysing

the neural signal. The effect of technological interference can be minimised by

knowing the amount of SNR [106,155,171–173].

The most challenging aspect of removing any type of noise is to differentiate

between the noise and the signal, as removing the noise may leads to distortion

of the signal. One of the ways to remove the noise is using the Wavelet Trans-

form proposed in [172] and [119]. The main problem in this method is that it

largely depends on the assumption that the signal magnitudes dominate the

magnitudes of the noise in a Wavelet representation. The main objective in

this chapter is to give a more accurate measure for noise in a neural signal.

5.2 Noise Estimation Methodology

The main idea was to extract the most significant features of a pure signal

and the noise from a noisy signal, then each signal was classified to a group

based on the extracted features. The features were extracted using MFCC

which was explained in details in Chapter 4. First, a neural signal was recorded

and each spike was saved in a separate file. Then, the MFCC of the spikes was

Page 105: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

89

Figure 5.1 MFCC calculation steps

calculated using the steps shown in Figure 5.1.

Each spike contained N samples which were stored in an array S(N). The

array was then split into distinct number of frames (i) and a small number of

samples overlapping between each frame. Then, the DFT of each frame Si(k)

was calculated using Equation (5.1).

Si(k) =N∑

n=1si(n)h(n)e−j 2π

Nkn, 1 < k < K (5.1)

where h(n) is an N sample long analysis window, and K is the length of the

DFT.

Then, the periodogram based power spectral of frame i(Pi(k)) was calcu-

lated using Equation (5.2).

Pi(k) = 1N

|Si(n)|2 (5.2)

The Mel-spaced filterbank, consisting of a group of 26 triangular filters, was

then applied. Then, the log magnitude of the output was taken giving 26 log

filterbank energies. Finally, DCT was taken for the output, which gave 26

Page 106: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

90

cepstral coefficients. The least 12 cepstral coefficients were used as only the

most significant features are needed. These values are called Mel-Frequency

Cepstral Coefficients.

The next step was to build a classification model using HMM [157, 174].

HMM is a statistical tool to model sequences and describe the probability

distribution over a set of observations. HMM has been successfully used for

speech recognition. HMM consists of a set of states {S1, S2, ... Sn}.

The process moves from one state to another generating a sequence of

states: {Si1, Si2, ..., Sik, ...} and the Markov chain property of each subsequent

state depends only on what was the previous state and can be defined as:

P (Sik|Si1, Si2, ...Sik−1) = P (Sik|Sik−1). Also there are states which are not

visible, but each state randomly generates one of M observations (or visible

states) {V1, V2, ... Vn}.

HMM was utilized to model spikes in order to understand its underlying states

over a sequence of observations. For a spike, the significant shape states are

silence, ascending, peak and descending. Each of them was assigned to a state

(from s1 to s4) of the HMM. The main problem in other classification algo-

rithms is that they rely on shape and distance measurement such as comparing

height, width, and peak-to-peak amplitudes of spikes.

These HMM models were used to classify the testing data which is more

than 500 spikes per group. The HMM which was developed contains four

states for the spike. It iterated five times, frame size was 0.025, frame shift

was 0.01, forward backward direction and matrices were set to identity matrix.

In addition, the data, used in the experiments, was neural signals recorded from

Page 107: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

91

three different neurons each with its unique shape, the same signal was used

but with different noise levels and the HMM model classification of the same

signal to one of different groups based on the noise level.

5.3 Noise Level Estimation Results

Three different experiments were conducted in this section, the first exper-

iment is based on comparing the estimation results of the proposed method to

a well known method. Then, two different devices were used in the second and

third experiments to prove that the proposed method can estimate the noise

level on different signals recorded by different devices. Multichannel systems

was used to record the neural signal data in the second experiment. While

in the third experiment, Neurofax EEG system was used to record the EEG

signal.

5.3.1 Matlab SNR function

First, the developed system was compared to one of the noise estimation’s

well-known functions; this function is created by the Mathworks team for use

in different domains, such as speech processing. When given time-domain in-

put, SNR performed a periodogram using a Kaiser window with large sidelobe

attenuation. To find the fundamental frequency, the algorithm searched the

periodogram for the largest nonzero spectral component. It then computed

the central moment of all adjacent bins that decreased monotonically away

from the maximum. To be detectable, the fundamental should be at least in

the second frequency bin. Higher harmonics are at integer multiples of the

fundamental frequency. If a harmonic fell within the monotonically decreasing

Page 108: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

92

region in the neighbourhood of another, its power was considered to belong to

the larger harmonic, which may or may not be the fundamental.

The function estimated a noise level using the median power in the regions

containing only noise. The DC component was excluded from the calculation.

The noise at each point was the estimated level or the ordinate of the point,

whichever was smaller. The noise was then subtracted from the values of the

signal and the harmonics.

Figure 5.2 Noise Estimation Accuracy using different signals with differ-ent Signal to Noise Ratio (SNR).

A needed comparison was done between the proposed method and one

of the most common methods, which is developed by Mathworks team. Both

methods were applied to 500 different signals with different noise levels (SNR),

which are 0.1, 1, 10, 100, 1000, 10000. As shown in Figure 5.2, the proposed

method showed better accuracy in terms of noise estimation as the median

power fails if the fundamental is not the highest spectral component in the

signal which occurs in low SNR values.

Page 109: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

93

5.3.2 Neural signal recorded by Multichannel systems

In this experiment, the effectiveness of using MFCC and HMM in estimat-

ing the amount of noise in the neural signal will be shown. A new device was

used, which can record a specific number of neurons using specific chips. This

device is called Multielectrode Array (Multichannel systems) [175]. A signal

was used with different SNR. HMM was trained using 20 spikes and 500 spikes

were used for testing. The neural signal, which was used in the experiments,

was the same, but with different noise levels, the original signal was considered

the cleanest signal as it was recorded very carefully and then the noise was

added based on the needed SNR using MATLAB. HMM was used to classify

the same signal to one of different groups based on the noise level.

HMM was built using 3 iterations, the more iterations used, the more com-

plex the system, and complexity affects the time for running the program.

On the other hand, the accuracy of the classification increases to a certain

limit when the number of iterations increases. Figure 5.3 explains the rela-

tionship between the number of iterations used in HMM and the accuracy of

classification. When only two iterations were used, the complexity was very

low.

The proposed model was able to differentiate between different noise levels

with accuracy of 95% and these noise levels (SNR) are 0.1, 1, 10, 100, 1000,

10000. Also the noise levels were meant to be very close to each other and our

model was able to differentiate between them to an accuracy of 89% and these

noise levels (SNR) are 0.5, 1, 5, 25, 125, 625.

Figure 5.4 shows the accuracy of classification of the spikes when the SNR

Page 110: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

94

Figure 5.3 Relationship between the number of iterations used in HMMand the accuracy of classification

is 0.1, 1, 10, 100, 1000, 10000 using three different signals. The accuracy of

SNR estimation was about 95 % which will help later to estimate the amount

of information in the signal. Also in Figure 5.4 the level of SNR used in the

signals was very close to proving how accurate the proposed model is and the

results shows that accuracy of classification of the spikes when the SNR is 0.5,

1, 5, 25, 125, 625 is about 89%.

When the number of iterations was increased to 3 the accuracy was in-

creased by about 25 % to be 92.1%. When the number of iterations was

increased to 4 and 5, the accuracy increased to 95.6 % and 95.7% respec-

tively. Evidently, the number of iterations should not exceed 5 iterations as

the accuracy does not significantly change. Therefore, the HMM was built

using 3 iterations to reduce the complexity and increase the accuracy of the

classification method.

One major advantage in the proposed model is the low number of training

Page 111: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

95

Figure 5.4 Classification Accuracy using different signals with differentSignal to Noise Ratio (SNR).

Figure 5.5 Relationship between the number of samples used in HMMand the accuracy of classification

Page 112: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

96

Figure 5.6 Relationship between the number of states used in HMM andthe accuracy of classification

samples. This model uses only 20 spikes for training and tests the noise levels

for 500 spikes. This reduces the complexity of the model and makes it unnec-

essary to use more samples to train, as the model was built using a specific

number of iterations and states. Figure 5.5 shows the relationship between the

number of training samples and classification accuracy. Using only 5 samples

will give about 90% accuracy, a high value, particularly when considering the

low number of training samples.. The accuracy remains nearly the same as

shown when the number of training samples exceeds 20 samples, so the best

number of samples to use with respect to efficiency and accuracy is 20.

The number of states used in the HMM was four, which closely correlated

to the spikes. These states are: silence, ascending, peak and descending. And

if the number of states was changed as shown in Figure 5.6 the accuracy of the

classification will be changed markedly due to the fact that the spike shape

can be represented in 3 or 4 states maximum.

Page 113: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

97

Figure 5.7 Classification Accuracy using different Signal to Noise Ratio(SNR) applied to EEG signal which is recorded by the 10-20 internationalsystem.

5.3.3 EEG signal recorded by Neurofax EEG system

The proposed model was applied to a recorded EEG signal with different

noise levels and it differentiated between these noise levels with accuracy of

91%. These noise levels (SNR) were 0.1, 1, 10, 100, 1000 and 10000. This

model was also able to differentiate between close noise levels with accuracy

83% and these noise levels (SNR) were 0.5, 1, 5, 25, 125 and 625 as shown in

Figure 5.7.

Figure 5.8 shows that the HMM models needed only three iterations to train

and test the data, these three iterations gave the best classification results.

Figure 5.9 confirms that 20 signals were enough to train the system and get

the highest possible classification accuracy. As mentioned before, the EEG

signal has only four states so the HMM used only four states giving the highest

Page 114: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

98

Figure 5.8 Relationship between the number of iterations used in HMMfor the EEG signal and the accuracy of classification

accuracy, as shown in Figure 5.10.

Figure 5.9 Relationship between the number of EEG signals used byHMM for training and the accuracy of classification

The number of training samples was small. The proposed model only uses

20 signals for training and tests the noise level for 200 signal, which reduced

the complexity of the model.

An n error tolerance could also be used when SNR levels were very close to

each other, where the n adjacent clusters were considered as the same cluster

as they have a very close SNR values. For example, if the error tolerance

was two, this means that any two adjacent clusters were considered to be the

Page 115: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

99

Figure 5.10 Relationship between the number of states used in HMM forthe EEG signal and the accuracy of classification

Figure 5.11 Relationship between the number of noise levels and theaccuracy of classification using two clusters error tolerance

same cluster. Figure 5.11 shows the relationship between the number of noise

levels and the classification accuracy. When the error tolerance is two, the

classification accuracy was more than 94% even if the signal have 20 noise

levels.

5.4 Conclusion

This chapter proposed an SNR quality assessment method for neural signal.

The method generates an automated measure to estimate the noise levels in

neural signal. HMM was used to build a classification model that classifies

Page 116: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

100

the neural spikes based on the noise level. This model works better with the

controlled environment than the uncontrolled environment as the EEG data is

generated based on an enormous number of neurons. On the other hand, the

neural signal, which is recorded by the multichannel device, observed a limited

number of neurons.

This is considered to be the first quality assessment measure of neural

signal, which can be used as a flag beside other flags, discussed in the following

chapter to achieve a complete quality measure for neural signal.

Page 117: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 6

Automated Quality AssessmentScores

EEG signals allows people to understand how the brain works and BCI

is one of the most popular EEG applications. Capturing high quality EEG

signal is one of central challenges in BCI applications. The EEG signal noise

affects the quality of the captured neural signal, which will subsequently affect

the performance of the BCI applications. Although most of the BCI research

focuses on the effectiveness of the selected features and classifiers, the quality

of the input EEG signal is manually set. A noise estimation method was

introduced in the previous chapter, but in this chapter, a full automated quality

assessment method for the EEG signal is proposed.

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. In this research, twelve scores were developed to postulate

EEG signals. This EEG quality assessment measure gives researchers an early

indication of the signal’s quality. This is useful in applying new BCI algo-

rithms to test on only high quality signals. It also helps BCI applications to

automatically react to high quality signals and ignore lower quality ones. EEG

101

Page 118: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

102

data acquisition experiments were conducted with different noise levels and the

results showed the consistency of the proposed algorithms in estimating the

accurate signal quality measure.

6.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 to record neural signals that includes different

waves and spikes with varying amplitudes and frequencies [1, 157, 176–178].

These signals are recorded by placing a set number of electrodes on the human

scalp [179]. Billions of neurons communicate together with electrical pulses,

forming a huge complicated neural network [180,181].

There are many challenges in recording the EEG signal [182, 183]. 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 [184]. Sometimes the signal can be fully corrupted and needs to be

reacquired [185].

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 Physi-

ological activity, which is generated by organs in the human body, other than

the brain, such as muscles and limbs. The second category is external envi-

ronmental factors. Figure 6.1 shows the effect of an eye blink on the quality

of the acquired EEG signal.

Page 119: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

103

Figure 6.1 Eye blinking/movement effect on the EEG signal.

Many feature extraction and classification techniques have been developed

in the past few years to improve the performance of the BCI applications

[186, 187]. 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

[188–190].

The main objective of this chapter 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:

Page 120: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

104

• Online Quality Assessment While the EEG signal is recorded using the

proposed system, an online alert is given when any channel has abnormal

behaviour. This will assist researchers to determine to stop recording to

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.

During the EEG acquisition process, the electrodes sense the signals of a

specific number of neurons. Controlling the number of neurons captured is

challenging, so any unwanted number of spikes will decrease SNR [101, 106].

It is not feasible to record the neural signals without the biological noise, but

detecting and removing it is a relatively easy task [106, 155, 171, 173]. The

effect of the technical factors can be minimised by establishing the SNR. To

evaluate the accuracy, a normal signal was recorded carefully and then added

noise to it. The percentage of noise was controlled based on the SNR value as

the original clean signal is already recorded.

Although detecting the occurrence of biological noise is difficult, it is more

challenging to remove the noise when the level and type of noise is unknown

[191]. For example, eye blinking artifact detection is easy while recording the

EEG signal as most EEG recording software has an eye blinking detection

algorithms [131]. On the other hand, many factors affect - and sometimes

destroy - the viability of the recording, such as electromagnetic signals, high

power cables under buildings and mobile phone signals. These factors are more

Page 121: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

105

Figure 6.2 EEG raw data is shown in the top figure, and then the mainfrequency bands are shown in the rest of the figures. The main EEGfrequency bands are Delta, Theta, Alpha and Beta as shown respectively.

difficult to isolate [192,193].

Clear differentiation between noise and signal is needed to avoid having

to minimise environmental noise and potentially compromising signal quality

when removing it. Wavelet transform [119, 172] can be used to remove the

noise. The major challenge with this method is the assumption that the signal’s

magnitude dominates the noise’s magnitude in any wavelet representation, and

this assumption may not hold for many neural signal recordings. The aim of

this chapter is not to minimise the noise in an EEG signal but to identify the

quality of the EEG signal.

Specific features in EEG signals can provide more information about the

quality of a signal’s recording. These features are the biometric features of the

signal bands, which are used in this chapter. Each EEG signal consists of a

range of signals within different frequency bands [178]. These bands are the

Page 122: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

106

Alpha, Beta, Theta and Delta as shown in the Figure 6.2 [194]. These bands

are used to differentiate between quality scores that can be used to determine

whether or not the recorded EEG signal is reliable. This is the first automated

measure that assesses the EEG signal from a biological and statistical point of

view. The rest of the chapter is organised as follows: section 2 is the aim of this

chapter, followed by two sections for setting up the data. Each score is then

separated and independently analysed. This is followed by the conclusion.

The main idea for this chapter is to generate an automated quality assess-

ment measure for an input EEG signal. This model generates twelve scores,

which indicate the quality of the signal. The first score is calculated from the

general amplitude of the EEG channels. The second score is calculated based

on which channel have the highest amplitude. The third score is based on

calculating the dominant frequency for the channels. Followed by two scores

for analysing the Beta band and another one score for the assessment of the

Theta band amplitude. Then, another three scores are calculated, depending

upon the geometrical shape of the signals in each channel. Finally, the last

three scores are based on amplitude and frequency analysis. The following

sections describe the overall methodology of the research, with an emphasis on

how the twelve scores are used to assess EEG quality.

6.2 Recording EEG data

Prerecorded EEG signal database was used to test the effectiveness of the

proposed scores [195]. The EEG data were recorded using the Neurofax EEG

Page 123: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

107

system and the electrodes were placed based on the International 10-20 sys-

tem, as shown in Figure 6.3. The participants sat on a reclining chair facing

a video screen, and they were asked to remain motionless during the perfor-

mance. 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 160Hz, while the AC lines in

the host country operate at 50 Hz. The data were exported with a common

reference using Eemagine EEG.

There were 12 scores that are produced by the proposed system to evaluate

the input EEG signal. Different noise levels were added to the EEG signal after

recording it to validate this 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.

6.3 Splitting EEG data frequency bands

Figure 6.2 shows the frequency bands of the EEG signal. Delta waves,

which always appear during deep sleeping and have a frequency ranging from

0Hz till 4Hz. A sample of the Theta waves, which appears during normal sleep,

is shown in the second graph. Its frequency ranges between 4Hz and 8Hz. 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 8Hz and

12Hz. The standard properties of the low gamma wave are not well known so

it is difficult to use them as a baseline. A sample of the Beta wave is shown

Page 124: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

108

Figure 6.3 International 10-20 system is a way to describe the location ofscalp electrodes. These scalp electrodes are used to record the EEG signal.

in the last graph, and it appears when the person is awake doing a mental

activity and its frequency ranges between 12Hz and 40Hz.

The recorded EEG data were split to four different frequency bands, Delta,

Theta, Alpha and Beta. Butterworth filter was used successfully in splitting

the bands [196,197].

The Fourth Order Butterworth filter was used to split the EEG bands as

it is designed as an Nth order lowpass digital filter and it is commonly used to

split the bands, as described in Equation (6.1).

H(z) = b(1) + b(2)z−2 + ... + b(n + 1)z−n

1 + a(2)z−1 + ... + a(n + 1)z−n(6.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.

Page 125: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

109

6.4 Score 1: Analysing the amplitude of eachchannel

Normal EEG waveforms, like many other waveforms, can be defined and

assessed using some properties, such as the amplitude measure. The EEG

is in essence a layout between voltage and time. The voltage of the EEG

determines the amplitude. The cortical EEG signal passes through the scalp,

which strongly affects the original signal strongly. EEG normal amplitudes

can range between -100 and 100 μV and they were measured from peak to

peak [198].

The EEG amplitude (voltage) was analysed 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 3 was developed to calculate Score 1. It

mainly counts the repetition of each amplitude value, and 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 for selecting

-1000 and 1000μV is that it is highly unlikely for EEG to fall outside of these

values under normal conditions. EEG signal distortion can be manifested by a

reduction in amplitude; a decrease of dominant frequencies beyond the normal

Page 126: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

110

limit and production of spikes or special patterns. Epileptic conditions pro-

duce stimulation of the cortex and the appearance of high-voltage waves (up

to 1000 μV) [63]. High amplitude is a very important factor in assessing the

EEG signal. A histogram was plotted to show the amplitude’s count in each

bin. After which, a percentage was calculated based on the count of normal

bins between -100 and 100 μV, and the count of all other bins.

Algorithm 3 Calculating General Amplitude Scoreprocedure CheckGeneralamplitude

NormalValuesSum1 ← sum(bincounts(91:111))TotalSum1 ← sum(bincounts)s1 ← NormalValuesSum1/TotalSum1NormalValuesSum2 ← length(find(p(91:111) >0))TotalSum2 ← length(find(p >0))s2 ← NormalValuesSum2/TotalSum2Score 1 ← ((s1+s2)/2)*100

end procedure

The first experiment used 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 a low score

for the high noise level and a high score for the low noise level as shown in

Figure 6.4.

Figure 6.5 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

this score. It is a measure of whether the data are peaked or flat relative to

Page 127: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

111

(a) (b) (c)

Figure 6.4 Relation between General Amplitude Score and SNR. GeneralAmplitude score ranges between 0 and 100. The signal is noisier when thescore value decrease. Sub-figure a, b and c show the output of the GeneralAmplitude score but the difference between each sub-figure is the noiselevels being used. Sub-figure a shows the score when noise level 0.1, 0.5, 1and 2 were applied, then the noise level range was increased to be 0.1, 1, 5and 10 in sub-figure b and the score increased while increasing the SNR asshown. The noise level range was increased again to be 0.1, 1, 10 and 100in sub-figure c. As shown in all sub-figures, the General amplitude scoreis directly proportional to the SNR.

a normal distribution [199]. It was used to reveal the peakedness or flatness

of the bins distribution as shown in Figure 6.5. 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 the Kurtosis values were increased to

4.1021, 37.9853, 68.2545 and 70.7982 in the second experiment. Finally, the

Kurtosis values became 4.0910, 38.0452, 70.8802 and 71.8349, respectively in

the last experiment.

6.5 Score 2: Highest Amplitude Score

Alpha brainwaves always appear for an adults experiencing quietly flowing

thoughts, awake but relaxed (eyes closed) and in some meditative states. Alpha

is known as the brain’s resting state. Alpha waves have the highest amplitude

Page 128: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

112

FP1 FP1 FP1 FP1 FP1

F3 F3 F3 F3 F3

C3 C3 C3 C3 C3

C4 C4 C4 C4 C4

Figure 6.5 The histogram of the amplitude of the EEG data was drawn.The normal EEG data ranges between -100 and 100μV which is shownin blue and the abnormal range was drawn in red. Each row shows thehistogram of a certain channel, and each column shows different noise level(the SNR increase while moving from left to right). As shown, the red barsdecreases gradually while moving from left to right as the noise decreasesand the amplitude returns to the normal range.

in the occipital and parietal regions of the cerebral cortex [200].

Alpha rhythm amplitudes change considerably from one individual to an-

other and can even change within the recording of the same person from time

to time. Sometimes, a referential ear montage can be used to determine the

alpha rhythm amplitude. In 1929, Berger found that the voltage of the alpha

rhythm ranges between 15μ and 20 μV [201], the small range explained by

Page 129: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

113

instrument limitations. However in 1963, William Cobb found that the al-

pha amplitude ranges between 40μ and 50 μV. Until now, there has been no

specific range for the Alpha amplitude, which could be used as a score. How-

ever, electroencephalographers agree that values above 100μV are abnormal

and uncommon in clean EEG signal, which supports Score 1.

The maximum alpha voltage is always over the occipital region. Hence,

all the electrodes, which recorded the signal on the occipital region, should

have the highest amplitude such as O1 and O2 channels [198]. There were

two scores calculated through analyzing the Alpha band, the second score

will be discussed in the next section. 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 [3, 63, 178, 202–204]. Therefore, the proposed system checks the

highest amplitude depending on Algorithm 4. In order to not be affected by

any outliers, the highest 1% of the amplitude values is considered the highest

amplitude in each window, which will resolve any outliers’ misguidance.

Alpha band characteristics of normal EEG are described in [202] beside the

Theta and Beta characteristics. It will be difficult for a person who experiences

seizure to control his or her body during the seizure, and so accordingly, the

proposed system considers epileptic or paroxysmal segments representative of

abnormality. The scores will warn the BCI application of abnormal behaviour.

For example, this system will show low scores if a person is using a BCI

application to control a wheelchair while having a seizure.

Different noise levels were applied as in the previous section. Figure 6.6

Page 130: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

114

Algorithm 4 Calculating Highest Amplitude Score1: procedure CheckHighestamplitude2: Foreach Channel C in All Channels3: HighestAmplitudes(C) ← Get Maximum Values in each channel4: End Foreach5: Sort HighestAmplitudes6: Foreach Channel C in Channels O1,2 P3,4 T5,6 C3,4 A1,2 T3,47: index ← Find Index of C in HighestAmplitudes8: IF index > NumberOfElectrodes/29: score += 1

10: ELSIFindex > NumberOfElectrodes/411: score += 0.512: ENDIF13: End Foreach14: Score 2 = (score/10)*10015: end procedure

shows the accuracy of the score based on the noise level. The SNR is directly

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 with

the increasing SNR, as shown in Figure 6.6 which indicates that this score is

accurate.

(a) (b) (c)

Figure 6.6 Highest Amplitude Score and SNR values are directly pro-portional as shown in subfigures a, b and c. Subfigure (a) shows that thescore was less than 20% when SNR was 0.1. Then the score was around80% when SNR value became 10 as shown in subfigures b and c.

Page 131: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

115

6.6 Score 3: Dominant Frequency Score

Through daily life, the brain’s activities range constantly through cogni-

tive, sensory, and motor activities, meaning that brain’s waves will also vary

constantly. However, the brain become slower while relaxing, meditating or

when participating in biofeedback; the amplitude increases and the signals

become more synchronised. In this case, the Alpha waves become the domi-

nant signal. The frequency of the Alpha waves is spread through both hemi-

spheres [205,206].

The second score within the alpha waves checks the dominant frequency

in each channel, as the dominant frequency should be similar in each hemi-

sphere in normal relaxing conditions. Figure 6.3 shows the left and the right

hemispheres in different colours and the correlation between adjacent chan-

nels 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 drop if there is an action is performed

by the user, and this will lead to asymmetry. Therefore, this score is indicative

of a good quality signal, but not necessarily indicative of a bad signal. As an

Page 132: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

116

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 homonymous loss of vision with exactly

the same "field cut" in both eyes. Therefore, 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.

This will lead to symmetry between the signals recorded for the occipital lobe

on both hemispheres; hence, the score threshold is expected to be high.

Algorithm 5 Calculating Dominant Frequency Scoreprocedure CheckDominantFrequency

2: Channels: FP1, FP2, F3, F4, C3, C4, P3, P4,O1, O2, F7, F8, T3, T4, T5, T6

4: Foreach Channel C in ChannelsdomFreqC ← CalculateDominantFrequency(C)

6: End Foreachleft ← [domFreqFP 1, domFreqF 3, domFreqC3, domFreqP 3,

8: domFreqO1, domFreqF 7, domFreqT 3, domFreqT 5]right ← [domFreqFP 2, domFreqF 4, domFreqC4, domFreqP 4,

10: domFreqO2, domFreqF 8, domFreqT 4, domFreqT 6]score3 = correlationbetweenleftandright

12: end procedureprocedure CheckDominantFrequency(signal)

14: fftLength ← length(signal)xdft ← fft(signal,fftLength)

16: FrequencySpectrum ← 200freq ← [0:fftLength-1].*(FrequencySpectrum/fftLength)

18: freqsCareAbout ← freq(freq <Fs/2)xdftYouCareAbout ← abs(xdft(1:round(fftLength/2)))

20: [maxVal, index] ← max(xdftYouCareAbout)maxFreq ← freqsCareAbout(index)

22: end procedure

Page 133: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

117

The algorithm for calculating the Alpha Band’s second score is shown be-

low, as Algorithm 5. The Fast Fourier transform is calculated for the signal,

then the total frequency axis is calculated so the frequencies can be selected

which are pertinent (either the positive or negative frequencies), since they are

redundant for a real signal. The dominant frequency will be the unnormalised

maximum amplitude of the frequency rage after taking into consideration the

absolute magnitude.

The same noise levels were introduced, as with previous experiments. The

results indicated an increasing score as the SNR increased. The Dominant

Frequency score was of such a low percentage accuracy because the SNR was

very low, but it lifted 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. Figures 6.7a, 6.7b and 6.7c show that the score is affected signifi-

cantly by the noise level and this indicates that the score is very meaningful.

(a) (b) (c)

Figure 6.7 This Figure shows the relationship between Dominant Fre-quency Score and SNR. Subfigure a shows the score values when the SNRwas very low, the score values were low as well which indicates that thescore and the SNR values are directly proportional. Then SNR valueswere increased which led to an increase in the score values as shown insubfigures b and c.

Page 134: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

118

6.7 Score 4: Beta Amplitude Score

Beta brainwaves manage the ordinary waking consciousness state during

which the brain undertakes cognitive tasks and monitors a person’s environ-

ment [207]. Beta represents a fast activity, when the person is in an alert and

attentive mode. Also it appears while making decisions and solving problems.

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 [202].

This 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 one, two or three outliers were obtained but it will be affected if tens or

hundreds of outliers were obtained as the normal clean signal should not have

this 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 6.8.a and 6.8.b and its pseudocode is shown

in Algorithm 6.

Algorithm 6 Calculating Beta Amplitude Score1: procedure CheckBetaamplitude2: Betawaves: BetaFP1, BetaFP2, BetaF3, BetaF4, BetaC3, BetaC4,3: BetaP3, BetaP4, BetaO1, BetaO2, BetaF7, BetaF8, BetaT3,4: BetaT4, BetaT5, BetaT6, BetaFZ, BetaCZ,BetaPZ5: Foreach Betawave B in Betawaves6: i ← find(absolute(B) < maxamp)7: n ← length(i)8: scores(B) ← n/length(B)9: End Foreach

10: score4 ← Average(scores)11: end procedure

Page 135: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

119

(a) (b)

Figure 6.8 Figure (a) shows the steps of calculating the overall BetaAmplitude score while Figure (b) shows the steps of calculating the BetaAmplitude score for a channel.

This score depends mainly on the Beta band. It is calculated from 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 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.

Figure 6.9 shows how the quality of the signal affects Beta Amplitude Score,

the score is low if the noise in the signal is high.

Page 136: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

120

(a) (b) (c)

Figure 6.9 Relation between Beta Amplitude Score and SNR. Beta Am-plitude Score ranges between 0 and 100. This score will have a large valueif the entered EEG data is clean, otherwise it will give a small value. BetaAmplitude Score output is shown in sub-figures a, b and c. Sub-figure ashows the score when noise level 0.1, 0.5, 1 and 2 were applied,then thenoise level range was increased to be 0.1, 1, 5 and 10 in sub-figure b andthe score increased while increasing the SNR as shown. The noise levelrange was increased again to be 0.1, 1, 10 and 100 in sub-figure c. Asshown in all sub-figures, the score was very low when the SNR is low andbegan increasing while increasing SNR, which shows that the score andthe SNR are directly, proportional.

6.8 Score 5: Beta Sinusoidal Score

Sinusoidal waves are common in nature, they can be observed in many

different signals. In 1830, Joseph Fourier proved that any complex wave could

be analysed into set of sine waves. Brain patterns form wave shapes that are

commonly sinusoidal. EEG signal consists of a mixture of rhythmic waves;

therefore, EEG can be transformed into different set of continuous rhythmic

sinusoidal EEG waves, which are called bands. Four major bands have been

identified which are alpha, beta, delta and theta band. Beta waves are the

most likely to be encountered in research as it is considered the most common

band, it consists of a small number of sine components in case of there is no

external noise [208–210].

The second score (Score 5), which is generated from the beta wave analysis,

Page 137: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

121

confirms the presence or absence of a sinusoidal-like wave. The closer the

beta waves to a sinusoidal pattern, the higher the quality it represents. The

signal is divided into windows, in which 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 the number

of DCT components, which are needed to represent 99% of the energy in the

same signal, were counted. Next, the signal was reconstruct using the extracted

components and check the correlation between the generated signal and the

original signal.

The equation below, Equation (6.2), is utilised to compute the DCT, where

N is the number of samples in each window. This is represented as:

y(k) = w(k)N∑

n=1x(n)cos( π

2N(2n − 1)(k − 1)) k = 1, 2, 3.., N

where :

w(k) =

⎧⎪⎨⎪⎩

1√N

, if k = 1√2N

, 2 ≤ k ≤ N

(6.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 Figure 4.6. The inverse DCT is used to return the

signal back to the time domain. The equation below, Equation (6.3), details

the formulation of the Inverse Discrete Cosine Transform where y is the DCT

Page 138: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

122

Figure 6.10 Steps for calculating the Sinusoidal Score.

of the signal x.

x(n) =N∑

k=1w(k)y(k)cos(π(2n − 1)(k − 1)

2N) n = 1, 2, 3.., N

where :

w(k) =

⎧⎪⎨⎪⎩

1√N

, if k = 1√2N

, 2 ≤ k ≤ N

(6.3)

Figure 6.10 shows the steps for calculating the Sinusoidal Score. The algo-

rithm pseudocode is shown in Algorithm 7.

Page 139: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

123

Algorithm 7 Calculating Sinusoidal Score1: procedure CheckSinusoidal2: Betawaves: BetaFP1, BetaFP2, BetaF3, BetaF4, BetaC3, BetaC4,3: BetaP3, BetaP4, BetaO1, BetaO2, BetaF7, BetaF8, BetaT3,4: BetaT4, BetaT5, BetaT6, BetaFZ, BetaCZ,BetaPZ5: Foreach Betawave B in Betawaves6: dct(B) ← dctcomparison(B)7: score5 = Average(dct)8: end procedure9: procedure dctcomparison(signal)

10: Signaldct ← CalculateDCT (signal)11: AbsSignaldct ← CalculateAbsoluteV alue(Signaldct)12: [SortAbsSdct, indices] ← sort(AbsSignaldct,′ descend′)13: i ← 114: while norm(SortAbsSdct(indices(1 : i)))/norm(Signaldct) < 0.99 do15: i ← i + 116: end while17: Sinusoidalpercentage ← i/totalcount18: end procedure

A signal is nearly sinusoidal if the same signal was managed to be generated

with a small number of DCT components and possessing a high correlation

to 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.

Figure 6.11 represents score five 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.

6.9 Score 6: Theta Amplitude Score

Theta brainwaves always appear in the brain of a person sleeping or in

deep meditation. It is the learning and memory entrance [211]. Theta waves

indicate dreaming, imagining and anything occurs behind the normal conscious

Page 140: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

124

(a) (b) (c)

Figure 6.11 Relation between Beta Sinusoidal Score and SNR. Beta Si-nusoidal Score is mainly based on calculating the percentage between twonorm vectors. The signal will not be in a sinusoidal shape when it is mixedwith noise, which means that it needs a lot of DCT components to generatethe original signal. Subfigures a, b and c shows the relationship betweenBeta Sinusoidal Score and SNR. Different noise levels were applied and thescore increased when the noise decreased.

awareness. Theta band ranges between 4Hz to 7 Hz and its amplitude should

not exceed 30μV [202].

A score is calculated from the amplitude of the Theta wave of each channel.

The amplitude should not exceed 30 μV in all the channels. This score is

calculated from the percentage of samples exceeding the maximum amplitude.

The algorithm used is the same as utilised when analysing the Beta wave,

using the details in Algorithm 6. More sample points extending the maximum

amplitude in noisy signals compared to the normal signal. Theta Amplitude

Score is the percentage value of the samples exceeding the maximum amplitude

over the total number of samples in the signal window.

The quality of the signal affects Theta Amplitude Score as shown in Fig-

ure 6.12, the score is low if the noise in the signal is high.

Page 141: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

125

(a) (b) (c)

Figure 6.12 Relation between Beta Amplitude Score and SNR. Beta Am-plitude Score ranges between 0 and 100. This score will have a large valueif the entered EEG data is clean, otherwise it will give a small value. BetaAmplitude Score output is shown in sub-figures a, b and c. Sub-figure ashows the score when noise level 0.1, 0.5, 1 and 2 were applied,then thenoise level range was increased to be 0.1, 1, 5 and 10 in sub-figure b andthe score increased while increasing the SNR as shown. The noise levelrange was increased again to be 0.1, 1, 10 and 100 in sub-figure c. Asshown in all sub-figures, the score was very low when the SNR is low andbegan increasing while increasing SNR, which shows that the score andthe SNR are directly, proportional.

6.10 Score 7: Symmetry Analysis Score

Symmetry between homologous electrode pairs is considered a basic prin-

ciple of normal EEG activity, this symmetry is found during both waking and

sleeping states. The symmetry should be in amplitude and frequency of two

homologous derivations, however, exact symmetry is not expected. [212].

The occipital lobe is one of the four major lobes of the cerebral cortex in

the human brain. It forms the brain’s visual processing center and contains

most of the anatomical region of the visual cortex [213]. The occipital lobes

are involved in several body functions including visual perception and colour

recognition. Damage to one side of the occipital lobe causes homonymous loss

of vision with exactly the same "field cut" in both eyes. They are not partic-

ularly vulnerable to injury because of their location at the back of the brain,

Page 142: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

126

although any significant trauma to the brain could can produce subtle changes

to the visual-perceptual system, such as visual field defects and scotomas.

This score is based on the symmetry between the left and the right occipital

lobes. The symmetry is based on the spikes amplitude and timing. The first

step is detecting the spikes in the EEG signal using the local maxima method,

then each spike is compared with any spike appears at the same time frame

but in the other side. The comparison is based on the amplitude of the spike.

Symmetry should be at least 50% between both sides [214].

As shown below, Algorithm 8 was developed to calculate Score 7. Mainly,

it checks the symmetry between the occipital lobes. The occipital lobes in

the EEG channels are known as O1 and O2. First, the channel reference

is generated based on the average of four different channels. Then the DC

component is adjusted in both channels O1 and O2 by normalisation. The

spikes are extracted based on the local peaks, defined as a data sample which

is either larger than the two neighbouring samples or is equal to infinity. Each

spike in one hemisphere is compared with the same spike occurs at the same

period in the other hemisphere (O1 and O2). The symmetry of the spikes

occurs on the both hemisphere represents the score.

Three experiments were undertaken using different noise levels as men-

tioned in the beginning of section 6.3. The score system developed was able

to generate low scores for high noise levels and high scores for low noise levels,

as shown in Figure 6.13.

Page 143: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

127

Algorithm 8 Calculating Occipital Symmetry Scoreprocedure CheckOccipitalSymmetry

car ← average(T3,T4,T5,T6)O1 CAR ← O1 - carO2 CAR ← O2 - carO1 CAR ← normalize(O1 CAR)O2 CAR ← normalize(O2 CAR)O1 spikes,O1 times ← findpeaks(O1 CAR)O2 spikes,O2 times ← findpeaks(O2 CAR)Score 7 ← checksimilarity(O1 spikes,O1 times,O2 spikes,O2 times)

end procedure

6.11 Score 8: Morphology Score

This score is based on the morphology of the signals in the left and right

hemisphere. In a resting state, the morphology of the spikes on both hemi-

spheres should be similar, otherwise there is likely a problem in the recording

signal [104, 215]. The channels, which are used, are FP1-F3, F3-C3, C3-P3,

P3-O1, FP1-F7, F7-T3, T3-T5, T5-O1 and their corresponding electrodes in

the opposite hemisphere are FP2-F4, F4-C4, C4-P4, P4-O2, FP2-F8, F8-T4,

T4-T6 and T6-O2. The spikes’ morphology at FP1-F3 channel is compared

with FP2-F4 channel and so on.

The morphology similarity is calculated based on Algorithm 9. First of

all, not all spikes have the same number of samples therefore all the spikes

are resampled in order to have the same number of samples. This will help in

calculating the correlation between the spikes shape.

Score 8 depends mainly on the morphology of the signal in each channel,

as the morphology of corresponding channels in each hemisphere should be

similar. The signals of each corresponding electrodes are recorded for each

channel, and then the correlation of corresponding channels in each hemisphere

Page 144: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

128

(a) (b) (c)

Figure 6.13 Relation between Symmetry Analysis Score and SNR. Sym-metry Analysis Score ranges between 0 and 100. The signal is noisierwhen the score value decrease. Subfigures a, b and c show the output ofthe Symmetry Analysis score but the difference between each sub-figureis the noise levels being used. Subfigure a shows the scores after applyingnoise levels 0.1, 0.5, 1 and 2 were applied, then the noise level range wasincreased to be 0.1, 1, 5 and 10 in subfigure b and the score increased whileincreasing the SNR as shown. The noise level range was increased againto be 0.1, 1, 10 and 100 in subfigure c. As shown in all subfigures, thesymmetry analysis score is directly proportional to the SNR.

is calculated.

Different noise levels were applied in three experiments as mentioned in

section 6.3. The morphology score has a low percentage accuracy because the

SNR was very low, but it increased in subsequent experiments as the SNR

was raised to 0.1, 1, 5 and 10 for the second experiment and to 0.1, 1, 10

and 100 in the third one. Figures 6.14a, 6.14b and 6.14c shows that the

score was significantly affected by noise levels indicating that the score is very

meaningful.

6.12 Score 9: Eye movement Analysis Score

The appearance of eye movements potentials appearance in the EEG sig-

nal is a well-known phenomenon, which is relatively easy to recognise by the

experienced electroencephalographer. Essentially, the eye plays the role of an

Page 145: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

129

Algorithm 9 Calculating Morphology Similarity Score between channel Aand B

1: procedure CheckMorphologySimilarity2: MaxRow = min(size(A,1),size(B,1))3: MaxCol = max(size(A,2),size(B,2))4: NewA = resample(A,MaxRow,size(A,1))5: NewB = resample(B,MaxRow,size(B,1))6: NewA = resample(NewA’,MaxCol,size(A,2))’7: NewB = resample(NewB’,MaxCol,size(B,2))’8: for s = 1 : MaxRow do9: a = NewA(s,:)

10: b = NewB(s,:)11: c(s)=real(corr(a’,b’))12: end for13: Score 8 = average(c)14: end procedure

electric dipole, the cornea becoming positive compared to the retina. During

eye movement, the potential near to the eye is changed by the corneo-retinal.

These potentials are sent through the whole head, and affect the EEG sig-

nals [216].

Eye movement potentials are considered to be a problem that faces both

clinical and experimental EEG recording techniques. The magnitude of the

eye movements signals can be larger than the magnitude of the EEG signals,

which is why they represent one of the main sources of artifacts in EEG data.

Some methods were used to remove eye movement signals from EEG data,

however, the target was not to remove any artifacts but to assess the quality

of the EEG data [217].

Sometimes, eyes move normally while recording the EEG signal, in which

case the EEG data will need to be discarded. It will be deemed abnormal if

eyes movement dominates the whole recording [218]. This score checks the

Page 146: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

130

(a) (b) (c)

Figure 6.14 Relation between Morphology Score and SNR is shown insubfigures a, b and c. Different noise levels where applied, the score wasvery low when the SNR is low and began increasing while increasing SNRwhich shows that the score and the SNR are directly proportional.

Figure 6.15 The effect of eye movement on F7 and F8 EEG channels.

percentage of eye movement in the recorded EEG data. Eyes movement can

be easily detected by checking the amplitudes of F7 and F8 channels as shown

in Figure 6.15 [131, 219]. The spikes at both channels should have the same

amplitude polarity. When eyes move, the polarity of F7 and F8 channels

should be opposite to each other. Algorithm 10 shows the steps of calculating

the eyes movement score.

Figure 6.16 shows the effect of the signal’s quality on the Eye Movement

Score. The score was low when the signal contained eyes movement windows,

otherwise, the score was relatively high.

Page 147: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

131

Algorithm 10 Calculating Eye Movement Analysis Scoreprocedure EyeMovCalculation

2: [xv,xt] = findpeaks(x)[yv, yt] = findpeaks(-y)

4: for i = 1 : length(xv) docurTime = abs(yt - xt(i))

6: v = min(curTime)IF v < 3

8: opSpikes = opSpikes + 1ENDIF

10: end forres1 = 1 - (opSpikes /length(xv))

12: opSpikes = 0[xv,xt] = findpeaks(y)

14: [yv, yt] = findpeaks(-x)for i = 1 : length(xv) do

16: curTime = abs(yt - xt(i))v = min(curTime)

18: IF v < 3opSpikes = opSpikes + 1

20: ENDIFend for

22: res2 = 1 - (opSpikes /length(xv))score = (res1+res2)/2

24: end procedure

6.13 Amplitude and Frequency Analysis Scores(10, 11, 12)

EEG signals have specific features in relation to their amplitudes and fre-

quencies. One of the characteristics of the amplitude is variation via a wide

range, this range begins from a few micro-volts and extends to hundreds of

micro-volts. In general, normal adults EEG signals are less than 100μV. Am-

plitude can reach 200μV in normal children. On the other hand, abnormal

activities and noise can change increase the amplitude to reach 1000μV such

Page 148: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

132

(a) (b)

Figure 6.16 Relationship between Eye Movement Analysis score and theinput signals. Figure a shows the score output when a normal signal wasused as an input, it shows high score which means that the signal is clean.On the other hand, Figure b shows low score when a signal full of eyesmovement was used as an input. The score and the percentage of eyemovements in the signal are directly proportional.

as Hypsarrhythmia, where extremely high amplitude is one of it’s main char-

acteristics [63].

Frequency is also a very important factor in assessing the quality of EEG

signal. Frequency of EEG activity is classified into four main waves, which are

delta , theta, alpha and beta waves. If the same frequency appears repeat-

edly, counting the number of waves occurring within 1 second can measure

(estimate) the frequency of the EEG signal. Otherwise, the frequency must be

estimated by measuring the duration [220].

Constant, continuously increasing or decreasing amplitudes or frequencies,

for a long time period or regularly happening, always occur due to technical

and noise problems. Such technical problems affect the quality of the recorded

signal. There are ways in which these problems can occur, such as erroneously

short inter-electrode distance, excessive electrode paste, leading to shorting of

electrodes, or mistakenly recorded sensitivity or filter setting parameters [212].

Three scores will be introduced to assess the quality of the EEG signal. EEG

signal will be assessed based on the amplitude and the frequency characteristics

Page 149: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

133

mentioned above.

Score 10 is based on the Amplitude and Frequency of the EEG signal,

the signal’s amplitude and the frequency in each electrode are very important

quality factors. The normal EEG signal should have different amplitude and

frequency over time [221] which means that there will be a significant problem

in the signal if its amplitude and frequency is continuously increasing over time

in C3-CZ, CZ-C4 and C4-T4 channels [87], as shown in Figure 6.17.

Figure 6.17 Increasing in amplitude and frequency over time at C3-CZ,CZ-C4 and C4-T4 channels.

Algorithm 11 checks if the amplitude and frequency of the signal are

increasing over time or not. It returns a zero-one score, which means that it

returns one if both amplitude and frequency are increasing overtime, and are

otherwise zero. This score is calculated for each window and the average score

is calculated and converted to percentage at the end.

On the other hand, the amplitude of normal spikes should not be increasing

over time and neither should their frequency be decreasing over time [221]. In

abnormal cases, the amplitude of the signal in any channel increases and the

frequency decreases over time [87]. Hence, this score checks the amplitude and

frequency of each window and returns one if the amplitude is increasing and

frequency is decreasing over time, It otherwise returns zero. Algorithm 12

shows how Score 11 is calculated for each channel window, and the total score

is the average score of all channels.

Page 150: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

134

Algorithm 11 Calculating Increasing Amplitude and Frequency Scoreprocedure CheckIncreasingAmpFreq

2: for i = 1:length(signal)-51 dowindow = signal(i:i+50)

4: maxamp(i) =max(window)[maxValue,indexMax] = max(abs(fft(window-mean(window))))

6: maxfreq(i) = indexMax * 500 / length(window)end for

8: n = 5maxamp(1+find(diff(maxamp)==0)) = []

10: AmpSorted = any(conv(double(diff(maxamp) >0), ones(1,n), ’valid’)==n)maxfreq(1+find(diff(maxfreq)==0)) = []

12: maxfreq = real(maxfreq)IF length(maxfreq) > 1

14: FreqSorted = any(conv(double(diff(maxfreq) >0), ones(1,n), ’valid’)==n)ELSE

16: FreqSorted =0ENDIF

18: return AmpSorted && FreqSortedend procedure

Indications of constant frequency or amplitude contradicts with the main

characteristics of the EEG signal. This only occurs if there is an error in the

recording such as a loose electrode, which will lead to a constant frequency.

Score 12 is calculated using Algorithm 13, which detects whether or not the

amplitude or the frequency is constant.

In the dataset used, five windows had increasing amplitude and frequency,

four windows had increasing amplitude, but decreasing frequency and there

were no windows indicating constant amplitudes or frequencies. Score 10 gave

91% as a quality measure which indicates that there is a small number of

windows with increasing amplitude and frequency. On the other hand, Score

11 gave 94% as a quality measure, this shows that the signal has some windows

with increasing amplitude and decreasing frequency. Finally, Score 12 gave

Page 151: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

135

Algorithm 12 Calculating Increasing Amplitude and Decreasing FrequencyScore

procedure CheckIncAmpDecFreq2: for i = 1:length(signal)-51 do

window = signal(i:i+50)4: maxamp(i) =max(window)

[maxValue,indexMax] = max(abs(fft(window-mean(window))))6: maxfreq(i) = indexMax * 500 / length(window)

end for8: n = 5

maxamp(1+find(diff(maxamp)==0)) = []10: AmpSorted = any(conv(double(diff(maxamp) >0), ones(1,n), ’valid’)==n)

fliplr(maxfreq)12: maxfreq(1+find(diff(maxfreq)==0)) = []

maxfreq = real(maxfreq)14: IF length(maxfreq) > 1

FreqSorted = any(conv(double(diff(maxfreq)<0), ones(1,n), ’valid’)==n)16: ELSE

FreqSorted =018: ENDIF

return AmpSorted && FreqSorted20: end procedure

100% as this dataset does not have any windows in the signal, with constant

amplitude or frequency.

6.14 General Summary Score (GSS)

The proposed quality assessment scores were introduced in the previous

sections. These scores were arranged into different groups in order to combine

Algorithm 13 Checking Constant Amplitude and Frequencyprocedure CheckConstantAmpFreq

2: [xv,xt] = findpeaks(x)value diff = length(diff(xv) >10) >0

4: time diff = length(diff(xt) >2) >0res = value diff OR time diff

6: end procedure

Page 152: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

136

them into one score. The General Summary Score shows a general quality

percentage of the input signal and examining each individual score will pro-

vide more detailed information about the quality of the signal. Each score

will contribute with a specific percentage based on how often does it happen.

Some scores were based on the amplitude of the signal and they were grouped

together into “A” group. Other scores depended on the frequency of the signal

and the letter “F” was assigned to them. Some scores were grouped into oth-

ers, where they were calculated based on different inputs. One the other hand,

it was recognised that some scores would show repeatedly low scores when the

task required movement during the recording of the data. These were given

the letter “R”. Scores 1, 2, 4 and 6 depended mainly on the signal’s amplitude,

Figure 6.18 The percentage of each score group in the General SummaryScore.

hence, they were grouped under group “A”. Score 3 was calculated based on

the frequency of the signal as is marked as “F”. The others “O” group included

scores 5. However, there were scores that were marked as “O & R” at the same

Page 153: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

137

time, such as Score 7 and 8, because they would show repeatedly low scores if

there was movement involved in the recording. Score 9 was marked as “A &

R” as it was affected by movement and was based on amplitude at the same

time. The last three scores (Score 10, 11 and 12) were marked as “A & F” as

they depended on amplitude and frequency.

Table 6.1 Percentage of each score in the General Summary Score.Score Percentage (%)

1 102 103 104 105 56 107 58 59 510 1011 1012 10

Any score that was marked as “A” only represented a 10% of the general

summary score. Moreover, any score that was marked as “F” only or “A & F”

represented 10% of the total score. Any other score represented only 5% if it

was marked as “O”, “O & R” or “A & R”, as some of these scores were affected

by movements and were preferred to be calculated when the participant was

in this motionless resting state. Table 6.1 shows the percentage of each score

in the general summary score. Four “A”, one “F”, one “O”, two “O & R”, one

“A & R” and three “ A & F” scores represent 40%, 10%, 5%, 10%, 5% and

30% of the General Summary Score respectively as shown in Figure 6.18. If

any score showed a zero value, this means that the whole general score will be

Page 154: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

138

reduced by 50%. In this case, each score is checked individually to know what

is the problem that cause this very low score value.

6.15 Conclusion

This chapter proposed quality assessment methods for EEG signal. These

methods generate an automated measure to detect the quality of the signal

based on its biological and statistical properties. Twelve scores were introduced

and each score was based on a specific property in the EEG signal. This is

considered to be the first quality assessment measure for EEG signals.

This research has many advantages. The whole process is undertaken on-

line, which means an online quality assessment framework was developed. In

case of data abnormality, an online alert will appear as an indicator of data

corruption. Furthermore, this measure can be considered a very important in-

put for BCI applications because it will help in identifying the degree of data

reliability. The next chapter will show that this measure can be used as an

additional input for BCI applications; this will increase the accuracy of BCI

applications.

Page 155: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 7

Quality Assessment Scores andBCI

7.1 Introduction

The main difficulty with BCI applications is that the signal processing is

always person and task specific. Non-stationary brain dynamics lead to a dif-

ferent brain function map for each person. This makes it harder to deploy

the BCI applications for general use. SNR plays an important role in the BCI

application’s accuracy, as sometimes the noise is substantial compared to the

brain activity. This is the reason for developing the proposed quality assess-

ment scores in the previous chapter and to merge them with BCI applications

in this chapter.

The goal of BCI technology, as defined by the Wadsworth Center is “to give

severely paralysed people another way to communicate, a way that does not

depend on muscle control” [222]. BCI is a system that takes a human neural

signal, such as the EEG signal, as an input as shown in Figure 7.1. It can

then predict an abstract aspect of the person’s cognitive state. Three different

cognitive states are measured: the Tonic state, which indicates the degree of

139

Page 156: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

140

Figure 7.1 BCI input output interface.

relaxation and cognitive load; the Phasic state, which indicates movement and

switching attention, and the Event-related state, which indicates event firing

or external factors. Most successful BCI applications run online, in real time

and depend on a single-trial basis.

BCI applications are not restricted to using brain activity as the only source

of information. Instead, BCI applications use context parameters for improv-

ing the predictions accuracy. Context parameters have a great potential for

real world applications, which are different to controlled laboratory condi-

tions. One of their main functions is to help factoring out variations in brain

activity. These parameters are the application, environmental and user state.

Brain signal plays a major role in BCI, to transfer information from the user

to the application. These measures would be added as an extra parameter to

determine the data state.

There are three types of BCIs :

Active BCI: Outputs are extracted from the brain activity of the user. The

user controls it in a direct and deliberate way, and it does not depend

on any external events to control an application.

Reactive BCI: Acquires outputs from brain activity, mainly depending on

Page 157: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

141

external stimulation, which indirectly affects the user’s brain in order to

control an application.

Passive BCI: Derives its outputs from arbitrary brain activity without vol-

untary control, for enriching a human computer interaction with implicit

information.

Active and reactive BCIs are considered “classical” BCIs, and introduced

in Chapter 3 as direct and indirect control. These subtypes cover all BCIs

spaces, from independent conscious control to rendering external events and

reaching the passive BCIs, which are complementary. These categories have

a smooth boundary, as the conscious control and rendering of external events

are not binary properties of brain activity. Any category requires a complex

signal processing and user calibration.

7.2 BCI Input, Importance and Applications

Brain signals are the main inputs of BCI applications. These can be derived

through non-invasive means, such as Electroencephalogram (EEG), explained

in details in Chapter 3, or Functional Near-Infrared Spectroscopy (fNIRS).

Alternatively, the input signal can be derived through invasive means using

different methods, such as Microarrays, Neurochips or ECoG. There are some

other inputs which can be used beside the brain signals such as motion capture

and eye-tracking techniques. Some other body signals can be used as an addi-

tional input for BCI, such as Electromyography (EMG), Electrocardiography

(ECG) and Electrooculography (EOG).

BCI is mainly used for severely disabled or injured people, such as those

Page 158: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

142

with Tetraplegia or Locked-in syndrome. It can enhance communication and

bodily control. P300 Speller and Hex-o-Spell are example BCI Speller Pro-

grams, which helps disabled people to to spell words and even speak. More-

over, paralysed people require assistance on daily basis. Brain2Robot project

was developed to help those people with a robotic control system, which is

controlled by EEG signals. The user’s thoughts are the main controller of the

robot. There are many other BCI projects that helps in prosthetic control and

home automation, such as brain project and IGUI.

Recently, BCI has been used in many different fields. It has been used in

monitoring the actions of car drivers, such as alertness monitoring, braking

intent, workload and intent of changing lanes. Forensics is another field where

BCI is widely used, in Lie Detector applications, brain fingerprinting and trust

assessment. BCI is also now used in the gaming industry and entertainment,

using the Neurosky Mindset.

7.3 BCI Systems

In this section, the most common BCI systems will be discussed, highlight

the main reasons for using BCILAB in the following experiments.

7.3.1 BioSig

Open-source and developed using MATLAB/Octave (cross-platform), BioSig

is one of the oldest BCI toolboxes. It was developed in 2002 at Graz Univer-

sity of Technology and contains a vast quantity of statistical and analytical

functions, including Blind Source Separation (BSS) and LDA Classifier. Its

major shortcoming is that it can only analysis the data offline. Moreover, it

Page 159: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

143

is not user friendly as there is no graphical user interface and it employs very

complicated code [223].

7.3.2 BCI2000

In 1999 the Wadsworth Center produced BCI2000. It was developed by

C++ and it includes an online acquisition technique for a wide range of ac-

quisition hardware devices and some signal processing methods. It comes

complete with a very good documentation and excellent user guidance, but it

lacks most of the advanced signal processing and machine learning algorithms

now available [224].

7.3.3 OpenViBE

This was initially made by Inria Rennes, and it was developed using C++

and runs on Windows and Linux. It concentrates on visual programming. It

has a friendly graphical user interface, it is well documented, and compatible

with a range of acquisition hardware devices. However, it has a complex build-

ing block design, which make it difficult to implement one’s own code in it. It

also suffers from having only rudimentary signal processing algorithms [225].

7.3.4 BCILAB

This is the best-known BCI toolbox for MATLAB. It was developed using

MATLAB at Swartz Center for Computational Neuroscience (UCSD) in 2010.

Online analysis can be done which gives BCILAB a huge advantage. It has

the largest collection of signal processing, machine learning methods, which

are BCI based methods. It needs a code expert to add, modify and extend as

Page 160: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

144

it has a complex internal framework and it only supports only five acquisition

systems; however, it can be linked to any of the other previous frameworks.

For these reasons, BCILAB was used in the experiments. This research also

managed to add a plugin (code) to the toolbox, which will be discussed later

in this chapter [226].

7.4 Applying Scores to BCI applications

Quality assessment scores were developed in the previous chapter, and these

scores will be applied to real BCI applications using real data. These data

were recorded using the Compumedics Neuroscan device. Curry NeuroImag-

ing Suite 7 software was used to record the data, also Synamps 2/RT amplifier

was used while recording the data. Quik-Caps were used to provide speedy,

consistent application of 32 electrodes. Quick-Caps are fabricated from a flex-

ible breathable Lycra material with soft neoprene electrode gel reservoirs for

enhanced participant comfort. All electrodes within the Quik-Caps were placed

based on the International 10-20 electrode placement standard. The data were

recorded with sampling rate of 1000Hz. The recorded EEG, after an ethical

approval was taken, was for a twenty-three years old male, right handed and

with no known medical condition.

Two experiments were performed. In the first experiment, an arrow was

shown on the screen, the arrow pointing randomly in one of four different

directions. The arrow could point up, down, right or left. Twenty random

arrow directions appeared in each trial, each arrow appeared for 8 seconds

and there was a 5 seconds break between any arrow appearances. Showing a

Page 161: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

145

Figure 7.2 Recording EEG signals while doing different activities.

black cross instead of the arrows indicated the break. The second experiment

showed the same arrows, but each arrow flashed with different frequency.

In both experiments, the participant was asked to imagine moving the com-

puter’s mouse on the screen towards the direction indicated. Different trials

were recorded under the effect of different noise levels. In the first trial, the

participant was asked to sit motionless and stay focused on the imagination

task. In the second trial the participant was asked to walk while watching the

screen and focusing on the main task. Running was the activity undertaken by

the participant while recording took place in the third trial. The participant

was asked to listen to music while recording the fourth trial. The next trial in-

cluded talking on the phone while recording the data. For the second last trial,

the participant was asked to touch the desk surface while data was recorded.

Finally, the participant was asked to blink his eyes continuously while the data

was recorded. All of these activities were performed in conjunction with the

main task, which was to move the computer’s mouse based on the direction

of the apparent arrow. Then the data were sorted using Kmeans, which is

considered a simple sorting algorithm in BCILAB.

Table 7.1 shows the average relationship between the scores and the recorded

EEG signals. In addition, it shows the average relationship between the scores

Page 162: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

146

Table 7.1 The relationship between trials, scores and sorting accuracy isshown.

Score/Trail 1 2 3 4 5 6 7

1 72.87472 52.63158 20.49257 100 96.26541 100 1002 98.38261 96.34585 85.33534 94.53569 100 100 1003 29.24772 32.1591 25.72884 53.14691 56.18117 21.63943 83.13194 84.66595 81.53843 54.50289 84.6673 77.26333 83.61863 81.813375 20.90537 14.84569 19.98254 10.18209 15.24071 22.9546 25.328016 54.68769 48.18274 33.90985 51.02741 48.46199 57.7906 50.148777 96.8837 87.89941 0 100 4.140432 0 08 72.10744 69.36311 69.40994 69.60825 69.60675 67.2682 70.310569 67.77412 67.98066 54.99066 52.38999 100 56.86192 77.61457

10 97.3236 72.9927 23.69668 71.09005 47.39336 47.39336 47.3933611 99.83273 99.89355 99.70379 98.96327 96.96386 97.734 96.9934812 100 100 100 99.05213 97.1564 97.8673 97.1564

General Summary Score 76.2331455 72.4776195 54.601386 38.42864625 71.4179466 33.979284 37.1631925Sorting Accuracy 94.4444 80.1254 71.8549 69.0476 82.1667 62.5 20.7407

and sorting accuracy. The Relation between the General Summary Score and

the BCI Accuracy is shown in Figure 7.3. The General Summary Score is

directly proportional to the BCI accuracy. The scores are independent, which

means that each score focuses on specific criteria in the input signal. The

noisiest signal was recorded when the participant was running and that is the

reason of getting low scores for that trial.

On the other hand, the cleanest signal was recorded when the participant

was staying motionless and the proposed system showed high scores from that

trial. The Symmetry Analysis Score showed very low values especially in the

running, touching surface, talking on the phone and eyes blinking trials, also

it showed high values while sitting and listening to music. However, the Spikes

Count Score was very high while relaxing and decreased when noisy actions

were done. As shown in Table 7.1, the Increasing Amplitude and Frequency

Score was directly proportional to the noise in each trial. Increasing Amplitude

and Decreasing Frequency Score was nearly the same in all trials because

the data contains one window only with increasing amplitude and decreasing

Page 163: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

147

Figure 7.3 Relation between General Summary Score and BCI Accuracy.

frequency, but other results were shown before in the results section. All trials

contained eye movement, so the Eye Movement Analysis Score was low in all

scores especially the running trial. Sorting was then applied to classify the

data based on the displayed arrows. In the first trial, the participant was

asked to remain motionless and this produced the highest accuracy. On the

other hand, walking, running and other actions showed lower accuracy. This

means that the sorting accuracy was very high in the motionless trials and

getting lower when the noise increased and the quality of the signal decreased.

7.5 Applications

The proposed system can be applied to many different applications. It can

be used in many BCI applications where the scores are treated as an input in

conjunction with the main signal. This system was applied to one of the BCI

applications, using prerecorded data [195] in which subjects were asked to sit

on a reclining chair facing a video screen and to remain motionless during the

recording. Some EEG channels were used to control the movement of the cur-

sor on the screen online. The EEG signal bands was the main controller of the

Page 164: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

148

Figure 7.4 Relation between noise, General Summary Score and BCIAccuracy.

cursor movement, by which the cursor moved vertically towards the position of

a target located at the right edge of the video screen. A black screen appeared

for one second at the beginning of each trial. Then, a target was shown on

the right in four attainable locations. After one second, a cursor appeared at

the left edge center and moved all the way right with a fixed speed. The sub-

ject’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 indicated the end of the trial.

As shown in Table 7.2 the input EEG signal was evaluated using the pro-

posed system as the scores were generated. Then the target sorting was applied

to the input EEG signal. Table 7.2 shows the relationship between the system’s

scores, SNR and the sorting accuracy. This system generated low scores when

SNR was low, then the sorting process was applied and the sorting accuracy

was directly proportional to both the generated scores and the SNR values.

Figure 7.4 shows that the General Summary Score is directly proportional to

the SNR and also it is directly proportional to the sorting accuracy.

Page 165: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

149

Table 7.2 Relation between quality assessment scores and sorting accu-racy under different noise levels.

SNR/Score 1 2 3 4 5 6 7 8 9 10 11 12 GSS Sorting accuracy

0.1 10.9286 1.9072 29.48 2.21 17.4 14.92 2.11 43.06 69 88.89 88.89 10 31.30108 96.061 30.3575 18.7262 30.58 20.24 17.7 77.26 21.24 69.44 71.6 88.89 88.89 16 46.09337 97.64

100 50.3833 72.4002 35.32 78.16 47.73 98.63 50.38 84.32 72.7 88.89 88.89 63 70.32385 99.21

Figure 7.5 The developed plugin which assess the input signal inBCILAB.

7.6 BCILAB plugin

In the last experiment, a plugin was created that anyone can use it within

BCILAB code. The proposed quality assessment measure was imported and

two different datasets were used, two different models and four different types

of noise. This quality assessment plugin is very easy to use and can be added

as a menu item, as shown in Figure 7.5. The two different datasets for differ-

ent subjects where used in this experiment, these datasets are recorded and

prepared by BCILAB developers and are commonly used in testing.

The data sets which were used are the ones which are packaged with the

toolbox. The datasets are just for imagined movements. The participants were

asked to imagine moving their left-hand and their right-hand. Each dataset

holds the EEG data of a person imagining the two hand movements for 20

Page 166: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

150

minutes. A stimulus is shown on the computer screen every 7.5 seconds. The

participant was asked to imagine moving the left arm when the letter “L” is

shown on the screen or imagine moving the right arm if the letter “R” is shown

on the computer screen. Data analysis and learning is the main target needed

when doing these experiments, so as to estimate which hand the user imagined

to moving using the users’ raw EEG data. Hence, it will lead to a predictive

model, which can be used in real time, such moving a wheel chair or controlling

a cursor.

Four different types of noise were applied on the datasets as shown in Fig-

ure 7.6. White noise is the first type, it was generated randomly and its power

over the frequency range was equal. Its name is derived from the white light,

where in the visible region, all its wavelengths have equal brightness. More-

over, white noise is fairly common. The second type was the Pink noise, which

has a lower frequency weighted character, meaning it is more powerful in low

frequency. 1/f noise is regarded as a pink noise subtype, where the frequency

is inversely proportional to noise power. Noise that is more powerful at high

frequencies is known as Blue noise, which is commonly used in experimental

work. Finally, the Square root noise was applied, which is a random noise

and the signal’s amplitude square root is proportional to the amplitude of the

noise, and it has a white power spectrum.

One of the main advantages of using BCILAB is having a huge variety of

signal processing models and machine learning functions. Hence, two different

models were applied to two datasets. Each model has its own feature extraction

Page 167: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

151

(a) (b)

(c) (d)

(e)

Figure 7.6 This Figure shows the normal signal compared to the samesignal after applying different types of noise. Figure (a) shows the normalsignal, Figures (b), (c), (d) and (e) show the signal after applying the blue,pink, white and square root noise respectively.

Page 168: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

152

and classification (machine learning) techniques.

The first model is called Logarithmic Bandpower (LBP). It is a basic model

for oscillatory processes. The logarithmic Bandpower is based on the design

of the original Graz Brain-Computer Interface, which used literalised motor

imagery for control. The features were extracted using the logarithmic variance

of each channel. The data were then filtered using the surface Laplacian;

that is a non-adaptive spatial filter. Then, the learner component processed

the resulting feature vectors. The learner model in this model is the Linear

discriminant analysis (LDA). The windowed means (WM) is the second model.

It captured the slow changing potentials, the multi-window signal average in

each channel is used as the feature vector and it used the Support Vector

Machines (SVM) as a classifier.

Blue, Pink, Square Root and White noise were applied on the two datasets

as an initial step. Then, the developed scores were applied, which are men-

tioned in Chapter 6, to these datasets. These scores gave a quality indication,

which can help in identifying whether to apply the signal processing techniques

to the data or not. It was expected that the dataset, that had low scores would

give low classification accuracy. After applying the two models to the data,

the classification accuracy was found to be low when the scores were low.

The quality scores were applied to two datasets, the average scores are

shown in Table 7.3. Signal 1 had the least amount of noise as different noise

types were applied on signals 2, 3, 4 and 5. The scoring system gave signal 1

the highest scoring values compared to the other signals, which indicates the

high accuracy of the proposed system.

Page 169: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

153

Table 7.3 Relationship between the proposed quality scores and noise.Different noise types were applied to all the signals except signal 1. Blue,Pink, Square Root and White noise were applied to Signals 2, 3, 4 and 5respectively. These quality scores are shown in the first row, they have thehighest values compared to the other signals. Scores 10, 11 and 12 were notchanged as the data do not have any continuously increasing, decreasingor constant amplitudes and frequencies.

Signal\Score 1 2 3 4 5 6 7 8 9 10 11 12

1 32.31451 49.16605 38.08838 91 54.89063 96.08076 84.08477 70.17037 61.78387 100 100 1002 20.02751 49.23535 32.32885 88.67056 48.83882 96.08553 24.04292 69.76608 61.54034 100 99.90234 1003 19.04506 28.07739 24.04083 38.80683 45.00288 81.44688 24.0108 70.0476 61.67826 100 99.90234 1004 25.8472 32.42748 31.40555 43.55905 43.35115 93.75288 52.95945 65.25099 1.521668 100 100 1005 25.97907 24.83562 32.502 28.12952 42.46834 86.27574 29.76674 65.13548 1.387632 100 100 100

(a) (b)

Figure 7.7 Classification accuracy after applying two different models onthe two datasets. Different noise types were applied to datasets 1 and 2.None of the noise types were applied to signal 1. Hence, it had the highestaccuracy. Signals 2, 3, 4 and 5 had lower accuracy because Blue, Pink,Square Root and White noises were applied to them respectively.

Page 170: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

154

Figure 7.7 shows the relationship between the classification accuracy and

the noise types. First, the normal datasets were classified without applying

any noise. Then, the noise types were applied which were mentioned earlier

and classified the same datasets. The classification accuracy in both models

decreased after applying the noise. These results match with the quality scores,

where the scores gave low values for the noisy datasets.

7.7 Conclusion

In this chapter, this research managed to practically connect this research

work with one of the renowned BCI toolboxes. The quality assessment measure

was linked to BCILAB and a plugin was created and will be available for

anyone to use. This plugin can give an assessment measure, which will help

many people, such as neurologists, doctors and technicians in knowing the

quality of the recorded signal. This measure can give help in many ways, such

as knowing if the data is correctly recorded. The main conclusions and future

work will be discussed in the following chapter.

Page 171: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

Chapter 8

Conclusions and Future Work

8.1 Conclusions

Brain signals are now widely used in different aspects of life, such as patient

diagnoses and helping disabled people. Recent studies show a genetic basis for

some abnormalities of the brain, abnormalities with likely psychological con-

sequences and are strongly indicated by the frequency and shape of the neural

spikes. People with physical impairments may also gain improved quality of

life from highly controllable prosthetic limbs. Accordingly, both qualitative

and quantitative spikes analysis are very important for the disease diagnosis

and identifying the regions of abnormality.

The aim in this research was to improve the process of understanding neural

signal. The first part was to improve the feature extraction process by trying

to extract the most meaningful features from the signal using mathematical

methods. Secondly, the proposed methods sought to improve the existing

classification algorithm in order to classify the data in a more meaningful and

accurate way. Finally, the proposed methods looked to generate an automated

measure for EEG assessment based on biological and signal processing.

155

Page 172: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

156

The first step in the qualitative and quantitative spike analysis was Spike

Sorting. The process began with spike detection, then extracting features

from the spikes and finally classification of the spikes into different groups,

each represent a certain source or neuron. In this research, a critical review

of feature extraction methods, Spike Sorting techniques, neural signal noise

estimation and quality assessment measures was undertaken and the main

advantages and disadvantages of each method were highlighted.

The next stage in this research was to show the new feature extraction

methods. Feature extraction is very important step in Spike Sorting especially

when dealing with signals, which are convoluted with noise. Three different

feature extraction methods were developed: Diffusion Maps, Cepstrum Coef-

ficients and Mel-Frequency Cepstral Coefficients. At the beginning Diffusion

Maps were used to extract the features from the neural signal. The average

accuracy of the most common algorithms were compared as shown in Figure

8.1. The first four methods used Wavelet Transform as a feature extraction

method, then the next four showed the results of using Diffusion Maps followed

by the Mel-Frequency Cepstral Coefficients as the last method. The proposed

methods showed high accuracy despite using less number of features and less

computation time. Based on the results shown in the previous chapters, neu-

ral signals were represented in a meaningful way, which helped in achieving

improved Spike Sorting accuracy, in comparison to other common methods.

Hidden Markov Models (HMM) was used in this research for Spike Sorting.

It was observed that neural spikes were represented precisely and concisely

using HMM state sequences. An HMM was built for neural spikes, where HMM

Page 173: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

157

Figure 8.1 This figure shows the whole connection between neural signaland BCI application, beginning by recording the signal then process andassess the signal, finally connecting to BCI applications and providingfeedback to the user using Haptic device. Average accuracy using differentfeature extraction and sorting methods is shown in sub-figure (a), whilesub-figure (b) shows the automated assessment scores for an input signal.

states can represent the neural spike. The neural spike can be represented by

four states: ascending, descending, silence or peak. They constitute every

spike with an underlying probabilistic dependence that is modelled by HMM.

Based on this representation, Spike Sorting become a classification problem

of compact HMM state sequences. In addition, the method was enhanced

by applying HMM on the extracted Cepstrum features, which improved the

accuracy of Spike Sorting. Simulation results demonstrated the effectiveness

of the proposed method as well as the efficiency. In addition, Mel-frequency

Cepstral Coefficients (MFCC) were used to improve the classification results.

Nevertheless, no one had automatically assessed the input neural signal

itself, or established whether or not it had been correctly recorded. There

Page 174: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

158

was no automated quality assessment for the EEG signal, which is really im-

portant and is needed by many people including neurologist, physicians and

technicians. The next stage of this research was to propose a quality assess-

ment method for neural signal. Neural signal is used in many applications and

it is used to assess various brain disorders types. As an example, if the patient

suffers from epilepsy, a seizure activity usually appears as rapid spiking waves

on the EEG. The method generated an automated measure to detect the noise

levels in neural signal. HMM was used to build a classification model that

classified the neural spikes based on the spike noise level. This is the first

quality assessment measure of neural signal, which can be used as a flag beside

other scores to achieve a complete quality measure for neural signal.

Twelve scores have been introduced in this research to detect the quality of

the signal based on biological and statistical properties; each score is based on

a specific property in the signal or its bands as shown in Figure 8.1. General

amplitude of the EEG channels was used to calculate the first score. The sec-

ond score was calculated based on which channel had the highest amplitude.

The dominant frequency for the channels was used to calculate the third score.

The Beta band was analysed using two scores and another one score for the

assessment of the Theta band amplitude. Then, another three scores were cal-

culated, depending upon the geometrical shape of the signals in each channel.

Finally, the last three scores were based on amplitude and frequency analysis.

This research has introduced valuable innovations: the whole process was

performed online, meaning an online quality assessment framework was ob-

tained. So the EEG signal was recorded, the proposed system gave an online

Page 175: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

159

Figure 8.2 Combining Haptic, visual feedback with BCI application.

alerts when any channel had any abnormal or wrong behaviour, which is very

important for BCI applications. This measure was used as an input for BCI

and increased the accuracy of BCI applications. Increased credibility of data

is another advantage; this measure gave more credit for the clean signal and

gave less credit for the abnormal and noisy signal. This helped BCI applica-

tions, which used EEG signal to know how to deal with noisy data when they

received it at anytime.

8.2 Future Work

In order to get the full benefit of any BCI application, any BCI user,

especially patients, have to understand how BCI application works and also

Page 176: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

160

how to use them. Well designed feedback provides a better understanding for

any BCI application. Haptic devices enrich the digital world by the sense of

touch. These devices enable users to have a real three dimensional navigation

and a force feedback, which can be used in different applications. Using a

Multi-feedback BCI system, which will depend on visual feedback combined

with Haptic feedback, will help to improve the accuracy of BCI applications.

Moreover, it will make it easier to be used and trained.

BCI applications can be combined with visual feedback and Haptic feed-

back as shown in Figure 8.2. Using the quality assessment measure as an input

to the BCI applications will help in improving and identifying the accuracy

of these applications. The future work of this research will involve extensive

research and experiments on merging BCI applications with Haptic devices to

provide feedback for disabled people. It can be used in many other disciplines,

such as gaming.

Page 177: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

References

[1] S. Haggag, S. Mohamed, A. Bhatti, H. Haggag, and S. Nahavandi, “Neu-

ral spike representation using cepstrum,” in System of Systems Engineer-

ing (SOSE), 2014 9th International Conference on, pp. 97–100, IEEE,

2014.

[2] G. Buzsaki, Rhythms of the Brain. Oxford University Press, 2006.

[3] E. Hulata, R. Segev, Y. Shapira, M. Benveniste, and E. Ben-Jacob, “De-

tection and sorting of neural spikes using wavelet packets,” Physical re-

view letters, vol. 85, no. 21, pp. 4637–4640, 2000.

[4] Y. Yuan, C. Yang, and J. Si, “An advanced spike detection and sorting

system,” in Neural Networks, 2009. IJCNN 2009. International Joint

Conference on, pp. 3477–3484, IEEE, 2009.

[5] S. Demont-Guignard, P. Benquet, U. Gerber, and F. Wendling, “Analysis

of intracerebral eeg recordings of epileptic spikes: insights from a neural

network model,” Biomedical Engineering, IEEE Transactions on, vol. 56,

no. 12, pp. 2782–2795, 2009.

[6] C. E. Stafstrom, “Sites of interictal spike generation in neocortex,”

Epilepsy Currents, vol. 4, no. 3, p. 96, 2004.

161

Page 178: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

162

[7] A. Holley, A. Duchamp, M.-F. Revial, A. Juge, and P. MacLeod,

“Qualitative and quantitative discrimination in the frog olfactory recep-

tors: analysis from electrophysiological data,” Annals of the New York

Academy of Sciences, vol. 237, no. 1, pp. 102–114, 1974.

[8] T. M. Itil, “Qualitative and quantitative eeg findings in schizophrenia.,”

Schizophrenia bulletin, vol. 3, no. 1, p. 61, 1977.

[9] R. Q. Quiroga, “Spike sorting,” Scholarpedia, vol. 2, no. 12, p. 3583,

2007.

[10] S. Gibson, J. Judy, and D. Markovic, “Spike sorting: The first step

in decoding the brain: The first step in decoding the brain,” Signal

Processing Magazine, IEEE, vol. 29, pp. 124–143, Jan 2012.

[11] E. Cohen and Y. Gross, “Treatment of disorders by unidirectional nerve

stimulation,” Jan. 27 2004. US Patent 6,684,105.

[12] L. Sornmo and P. Laguna, Bioelectrical signal processing in cardiac and

neurological applications. Academic Press, 2005.

[13] B. A. Simms and G. W. Zamponi, “Neuronal voltage-gated calcium

channels: structure, function, and dysfunction,” Neuron, vol. 82, no. 1,

pp. 24–45, 2014.

[14] “What is a neuron?.” http://psychology.about.com/od/

biopsychology/f/neuron01.htm. Accessed: 2015-09-30.

[15] Z. S. Lodish H, Berk A, Overview of Neuron Structure and Function. et

al. Molecular Cell Biology. 4th edition. New York, 2000.

Page 179: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

163

[16] E. R. Kandel, J. H. Schwartz, T. M. Jessell, et al., Principles of neural

science, vol. 4. McGraw-Hill New York, 2000.

[17] E. Adrian, “Croonian lecture: the messages in sensory nerve fibres and

their interpretation,” Proceedings of the Royal Society of London. Series

B, Containing Papers of a Biological Character, pp. 1–18, 1931.

[18] L. Cohen, “Changes in neuron structure during action potential propa-

gation and synaptic transmission.,” Physiological Reviews, vol. 53, no. 2,

pp. 373–418, 1973.

[19] S. Krantic, N. Mechawar, S. Reix, and R. Quirion, “Apoptosis-inducing

factor: a matter of neuron life and death,” Progress in neurobiology,

vol. 81, no. 3, pp. 179–196, 2007.

[20] A. S. Tsvetkov, S. Mitra, and S. Finkbeiner, “Protein turnover differences

between neurons and other cells,” Autophagy, vol. 5, no. 7, p. 1037, 2009.

[21] G. Fiskum, A. Starkov, B. M. Polster, and C. Chinopoulos, “Mitochon-

drial mechanisms of neural cell death and neuroprotective interventions

in parkinson’s disease,” Annals of the New York Academy of Sciences,

vol. 991, no. 1, pp. 111–119, 2003.

[22] F.-B. Gao, J. E. Brenman, L. Y. Jan, and Y. N. Jan, “Genes regulating

dendritic outgrowth, branching, and routing in drosophila,” Genes and

development, vol. 13, no. 19, pp. 2549–2561, 1999.

[23] L. Eliot, “WhatÕs going on in there,” How the brain and mind develop

in the first five years of life, pp. 237–239, 1999.

Page 180: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

164

[24] A. Peters, S. L. Palay, et al., The fine structure of the nervous system:

the cells and their processes. Hoeber Medical Division, Harper & Row,

1970.

[25] S. J. Baloyannis, V. Costa, and D. Michmizos, “Mitochondrial alterations

alzheimer’s disease,” American journal of Alzheimer’s disease and other

dementias, vol. 19, no. 2, pp. 89–93, 2004.

[26] Z. F. Mainen, J. Joerges, J. R. Huguenard, and T. J. Sejnowski, “A model

of spike initiation in neocortical pyramidal neurons,” Neuron, vol. 15,

no. 6, pp. 1427–1439, 1995.

[27] S. L. Palay, C. Sotelo, A. Peters, and P. M. Orkand, “The axon hillock

and the initial segment,” The Journal of Cell Biology, vol. 38, no. 1,

pp. 193–201, 1968.

[28] M. H. Kole and G. J. Stuart, “Signal processing in the axon initial seg-

ment,” Neuron, vol. 73, no. 2, pp. 235–247, 2012.

[29] M. R. Raffe, “Principles of peripheral nerve repair,” Newton CD and

Nunam, 1985.

[30] M. Adachi, A. Hirano, and S. M. Aronson, The pathology of the myeli-

nated axon. Igaku-Shoin Medical Pub, 1985.

[31] J. Brown and J. L. Opitz, “Treatment of neuropathies,” Handbook of

clinical neurology, vol. 7, 1970.

[32] A. R. Palmer, “Neural signal processing.,” 1995.

Page 181: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

165

[33] J. A. Hoffer, R. B. Stein, M. K. Haugland, T. Sinkjaer, W. K. Durfee,

A. B. Schwartz, G. E. Loeb, C. Kantor, et al., “Neural signals for com-

mand control and feedback in functional neuromuscular stimulation: a

review,” J Rehabil Res Dev, vol. 33, no. 2, pp. 145–157, 1996.

[34] J. E. Lisman, S. Raghavachari, and R. W. Tsien, “The sequence of events

that underlie quantal transmission at central glutamatergic synapses,”

Nature Reviews Neuroscience, vol. 8, no. 8, pp. 597–609, 2007.

[35] D. D. Ginty and R. A. Segal, “Retrograde neurotrophin signaling: Trk-

ing along the axon,” Current opinion in neurobiology, vol. 12, no. 3,

pp. 268–274, 2002.

[36] T. L. O’Donohue, W. R. Millington, G. E. Handelmann, P. C. Contreras,

and B. M. Chronwall, “On the 50th anniversary of dale’s law: multiple

neurotransmitter neurons,” Trends in Pharmacological Sciences, vol. 6,

pp. 305–308, 1985.

[37] M. Urbanska, M. Blazejczyk, and J. Jaworski, “Molecular basis of den-

dritic arborization,” Acta neurobiologiae experimentalis, vol. 68, no. 2,

p. 264, 2008.

[38] K.-W. Yau, “Receptive fields, geometry and conduction block of sensory

neurones in the central nervous system of the leech.,” The Journal of

Physiology, vol. 263, no. 3, pp. 513–538, 1976.

[39] S. Meng, M. Rouabhia, and Z. Zhang, Electrical stimulation in tissue

regeneration. INTECH Open Access Publisher, 2011.

Page 182: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

166

[40] H. Y. Frank and W. A. Catterall, “Overview of the voltage-gated sodium

channel family,” Genome Biol, vol. 4, no. 207, pp. 10–1186, 2003.

[41] A. Ghosh and M. E. Greenberg, “Calcium signaling in neurons: molec-

ular mechanisms and cellular consequences,” Science, vol. 268, no. 5208,

pp. 239–247, 1995.

[42] G. Moruzzi and H. W. Magoun, “Brain stem reticular formation and ac-

tivation of the eeg,” Electroencephalography and clinical neurophysiology,

vol. 1, no. 1, pp. 455–473, 1949.

[43] V. A. Zerris, J. D. Donoghue, L. R. Hochberg, D. K. OÕRourke, and

E. A. Chiocca, “Braingate: Turning thought into actionÑfirst experience

with a human neuromotor prosthesis: 885,” Neurosurgery, vol. 57, no. 2,

p. 425, 2005.

[44] “g.tec medical engineering.” https://gtecmedical.wordpress.com/.

Accessed: 2015-10-30.

[45] R. Mathur and N. Douglas, “Frequency of eeg arousals from nocturnal

sleep in normal subjects.,” Sleep, vol. 18, no. 5, pp. 330–333, 1995.

[46] N. C. on Bioethics, “Novel neurotechnologies: intervening in the brain,”

2013.

[47] P. Ferenci, A. Lockwood, K. Mullen, R. Tarter, K. Weissenborn, and

A. T. Blei, “Hepatic encephalopathyÑdefinition, nomenclature, diagno-

sis, and quantification: final report of the working party at the 11th

Page 183: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

167

world congresses of gastroenterology, vienna, 1998,” Hepatology, vol. 35,

no. 3, pp. 716–721, 2002.

[48] S. S. Spencer, “Depth electroencephalography in selection of refractory

epilepsy for surgery,” Annals of neurology, vol. 9, no. 3, pp. 207–214,

1981.

[49] E. L. Reilly, “Eeg recording and operation of the apparatus,” Electroen-

cephalography: basic principles, clinical applications and related fields,

pp. 122–142, 1999.

[50] R. Katznelson, “Eeg recording, electrode placement, and aspects of gen-

erator localization,” Electric fields of the brain, pp. 176–213, 1981.

[51] L. I. Zhang and M.-m. Poo, “Electrical activity and development of neu-

ral circuits,” Nature Neuroscience, vol. 4, pp. 1207–1214, 2001.

[52] E. Callaway, Brain electrical potentials and individual psychological dif-

ferences. Grune & Stratton, 1975.

[53] D. B. Lindsley, “Electrical potentials of the brain in children and adults,”

The Journal of General Psychology, vol. 19, no. 2, pp. 285–306, 1938.

[54] A. L. Loomis, E. N. Harvey, and G. Hobart, “Electrical potentials of

the human brain.,” Journal of experimental Psychology, vol. 19, no. 3,

p. 249, 1936.

[55] C. Shagass, “Electrical activity of the brain,” Handbook of psychophysi-

ology, pp. 263–328, 1972.

Page 184: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

168

[56] J. K. Mai, J. Assheuer, and G. Paxinos, Atlas of the human brain. Aca-

demic Press San Diego:, 1997.

[57] H. Damasio, Human brain anatomy in computerized images. Oxford

university press, 1995.

[58] G. Salamon and Y. P. Huang, Radiologic anatomy of the brain. Springer,

1976.

[59] S. Blanco, R. Q. Quiroga, O. Rosso, and S. Kochen, “Time-frequency

analysis of electroencephalogram series,” Physical Review E, vol. 51,

no. 3, p. 2624, 1995.

[60] D. B. Lindsley, “Emotions and the electroencephalogram.,” 1950.

[61] M. Ortiz, “A brief history of biosignal-driven art,”

[62] D. L. Schacter, “Eeg theta waves and psychological phenomena: A review

and analysis,” Biological Psychology, vol. 5, no. 1, pp. 47–82, 1977.

[63] M. Teplan, “Fundamentals of eeg measurement,” Measurement science

review, vol. 2, no. 2, pp. 1–11, 2002.

[64] H. Adeli, S. Ghosh-Dastidar, and N. Dadmehr, “A wavelet-chaos

methodology for analysis of eegs and eeg subbands to detect seizure

and epilepsy,” Biomedical Engineering, IEEE Transactions on, vol. 54,

no. 2, pp. 205–211, 2007.

[65] P. Olejniczak, “Neurophysiologic basis of eeg,” Journal of clinical neu-

rophysiology, vol. 23, no. 3, pp. 186–189, 2006.

Page 185: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

169

[66] W. T. Blume, G. B. Young, and J. F. Lemieux, “Eeg morphology of par-

tial epileptic seizures,” Electroencephalography and clinical neurophysi-

ology, vol. 57, no. 4, pp. 295–302, 1984.

[67] C.-W. Ko and H.-W. Chung, “Automatic spike detection via an artificial

neural network using raw eeg data: effects of data preparation and impli-

cations in the limitations of online recognition,” Clinical neurophysiology,

vol. 111, no. 3, pp. 477–481, 2000.

[68] J. Dauwels, F. Vialatte, C. Latchoumane, J. Jeong, and A. Cichocki,

“Eeg synchrony analysis for early diagnosis of alzheimer’s disease: a

study with several synchrony measures and eeg data sets,” in Engineer-

ing in Medicine and Biology Society, 2009. EMBC 2009. Annual Inter-

national Conference of the IEEE, pp. 2224–2227, IEEE, 2009.

[69] C. Schevon, J. Cappell, R. Emerson, J. Isler, P. Grieve, R. Goodman,

G. McKhann, H. Weiner, W. Doyle, R. Kuzniecky, et al., “Cortical ab-

normalities in epilepsy revealed by local eeg synchrony,” Neuroimage,

vol. 35, no. 1, pp. 140–148, 2007.

[70] R. P. Brenner and N. Schaul, “Periodic eeg patterns: classification, clin-

ical correlation, and pathophysiology.,” Journal of Clinical Neurophysi-

ology, vol. 7, no. 2, pp. 249–268, 1990.

[71] R. W. Homan, J. Herman, and P. Purdy, “Cerebral location of interna-

tional 10–20 system electrode placement,” Electroencephalography and

clinical neurophysiology, vol. 66, no. 4, pp. 376–382, 1987.

Page 186: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

170

[72] G. H. Klem, H. O. Lüders, H. Jasper, and C. Elger, “The ten-twenty

electrode system of the international federation,” Electroencephalogr Clin

Neurophysiol, vol. 52, no. suppl., p. 3, 1999.

[73] B. Blankertz, G. Dornhege, M. Krauledat, K. Muller, V. Kunzmann,

F. Losch, and G. Curio, “The berlin brain-computer interface: Eeg-based

communication without subject training,” Neural Systems and Rehabil-

itation Engineering, IEEE Transactions on, vol. 14, no. 2, pp. 147–152,

2006.

[74] T. Thompson, T. Steffert, T. Ros, J. Leach, and J. Gruzelier, “Eeg

applications for sport and performance,” Methods, vol. 45, no. 4, pp. 279–

288, 2008.

[75] T. Ning and J. Bronzino, “Autoregressive and bispectral analysis tech-

niques: Eeg applications,” Engineering in Medicine and Biology Maga-

zine, IEEE, vol. 9, no. 1, pp. 47–50, 1990.

[76] K. Bauerle, C.-A. Greim, M. Schroth, M. Geisselbrecht, A. Köbler, and

N. Roewer, “Prediction of depth of sedation and anaesthesia by the nar-

cotrendtm eeg monitor,” British journal of anaesthesia, vol. 92, no. 6,

pp. 841–845, 2004.

[77] S. M. Kosslyn, Image and brain: The resolution of the imagery debate.

MIT press, 1996.

Page 187: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

171

[78] M. B. Sterman, “Physiological origins and functional correlates of eeg

rhythmic activities: implications for self-regulation,” Biofeedback and

self-regulation, vol. 21, no. 1, pp. 3–33, 1996.

[79] D. G. Gilbert, F. J. McClernon, N. E. Rabinovich, W. D. Dibb, L. C.

Plath, S. Hiyane, R. A. Jensen, C. J. Meliska, S. L. Estes, and B. A.

Gehlbach, “Eeg, physiology, and task-related mood fail to resolve across

31 days of smoking abstinence: relations to depressive traits, nicotine

exposure, and dependence.,” Experimental and Clinical Psychopharma-

cology, vol. 7, no. 4, p. 427, 1999.

[80] K. K. Ang, C. Guan, K. Sui Geok Chua, B. T. Ang, C. Kuah, C. Wang,

K. S. Phua, Z. Y. Chin, and H. Zhang, “Clinical study of neurorehabili-

tation in stroke using eeg-based motor imagery brain-computer interface

with robotic feedback,” in Engineering in Medicine and Biology Society

(EMBC), 2010 Annual International Conference of the IEEE, pp. 5549–

5552, IEEE, 2010.

[81] A. P. Bagshaw, J. Jacobs, P. LeVan, F. Dubeau, and J. Gotman, “Ef-

fect of sleep stage on interictal high-frequency oscillations recorded from

depth macroelectrodes in patients with focal epilepsy,” Epilepsia, vol. 50,

no. 4, pp. 617–628, 2009.

[82] R. B. Pachori and V. Bajaj, “Analysis of normal and epileptic seizure

eeg signals using empirical mode decomposition,” Computer methods and

programs in biomedicine, vol. 104, no. 3, pp. 373–381, 2011.

Page 188: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

172

[83] J. R. Cho, D. L. Koo, E. Y. Joo, S. M. Yoon, E. Ju, J. Lee, D. Y. Kim,

and S. B. Hong, “Effect of levetiracetam monotherapy on background

eeg activity and cognition in drug-naïve epilepsy patients,” Clinical neu-

rophysiology, vol. 123, no. 5, pp. 883–891, 2012.

[84] U. R. Acharya, F. Molinari, S. V. Sree, S. Chattopadhyay, K.-H. Ng,

and J. S. Suri, “Automated diagnosis of epileptic eeg using entropies,”

Biomedical Signal Processing and Control, vol. 7, no. 4, pp. 401–408,

2012.

[85] P. J. Marshall, J. N. Saby, and A. N. Meltzoff, “Imitation and the de-

veloping social brain: infantsÕ somatotopic eeg patterns for acts of self

and other,” Int. J. Psychol. Res., vol. 6, pp. 22–29, 2013.

[86] P. A. Davis, “Comparative study of the eegs of schizophrenic and manic-

depressive patients,” 2014.

[87] S. Sanei and J. A. Chambers, EEG signal processing. John Wiley &

Sons, 2013.

[88] J. Claassen, S. Mayer, R. Kowalski, R. Emerson, and L. Hirsch, “Detec-

tion of electrographic seizures with continuous eeg monitoring in criti-

cally ill patients,” Neurology, vol. 62, no. 10, pp. 1743–1748, 2004.

[89] D. R. Simkin, R. W. Thatcher, and J. Lubar, “Quantitative eeg and

neurofeedback in children and adolescents: Anxiety disorders, depressive

Page 189: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

173

disorders, comorbid addiction and attention-deficit/hyperactivity disor-

der, and brain injury,” Child and adolescent psychiatric clinics of North

America, vol. 23, no. 3, pp. 427–464, 2014.

[90] Y. Tu, Y. S. Hung, L. Hu, G. Huang, Y. Hu, and Z. Zhang, “An auto-

mated and fast approach to detect single-trial visual evoked potentials

with application to brain–computer interface,” Clinical Neurophysiology,

vol. 125, no. 12, pp. 2372–2383, 2014.

[91] D. C. Hammond, “Book review: Handbook of quantitative electroen-

cephalography and eeg biofeedback: Scientific foundations and practical

applications,” Clinical EEG and neuroscience, vol. 45, no. 1, pp. 59–60,

2014.

[92] E. V. Friedrich, N. Suttie, A. Sivanathan, T. Lim, S. Louchart, and J. A.

Pineda, “Brain–computer interface game applications for combined neu-

rofeedback and biofeedback treatment for children on the autism spec-

trum,” Frontiers in neuroengineering, vol. 7, 2014.

[93] N. C. Moore, “A review of eeg biofeedback treatment of anxiety disor-

ders,” Clinical EEG and Neuroscience, vol. 31, no. 1, pp. 1–6, 2000.

[94] G. E. Schwartz, “Biofeedback, self-regulation, and the patterning of

physiological processes: By training subjects to control voluntarily com-

binations of visceral, neural, and motor responses, it is possible to assess

linkages between physiological responses and their relationship to human

consciousness,” American Scientist, pp. 314–324, 1975.

Page 190: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

174

[95] D. A. Hoffman, J. F. Lubar, R. W. Thatcher, M. B. Sterman, P. J.

Rosenfeld, S. Striefel, D. Trudeau, and S. Stockdale, “Limitations of the

american academy of neurology and american clinical neurophysiology

society paper on qeeg,” 2014.

[96] R. Xu, N. Jiang, C. Lin, N. Mrachacz-Kersting, K. Dremstrup, and

D. Farina, “Enhanced low-latency detection of motor intention from eeg

for closed-loop brain-computer interface applications,” Biomedical Engi-

neering, IEEE Transactions on, vol. 61, no. 2, pp. 288–296, 2014.

[97] A. Ortiz-Rosario and H. Adeli, “Brain-computer interface technologies:

from signal to action,” Reviews in the Neurosciences, vol. 24, no. 5,

pp. 537–552, 2013.

[98] V. Kaiser, G. Bauernfeind, A. Kreilinger, T. Kaufmann, A. Kübler,

C. Neuper, and G. R. Müller-Putz, “Cortical effects of user training

in a motor imagery based brain–computer interface measured by fnirs

and eeg,” Neuroimage, vol. 85, pp. 432–444, 2014.

[99] R. Raj, R. Singal, and A. Gagneja, “A technical analysis of brain com-

puter interface and its real world applications,”

[100] Z. Nenadic and J. W. Burdick, “Spike detection using the continu-

ous wavelet transform,” Biomedical Engineering, IEEE Transactions on,

vol. 52, no. 1, pp. 74–87, 2005.

Page 191: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

175

[101] Z. Yang, Q. Zhao, and W. Liu, “Spike feature extraction using infor-

mative samples,” Advances in Neural Information Processing Systems,

vol. 21, pp. 1865–1872, 2009.

[102] J. P. Cunningham and M. Y. Byron, “Dimensionality reduction for large-

scale neural recordings,” Nature neuroscience, 2014.

[103] X. Yang and S. A. Shamma, “A totally automated system for the detec-

tion and classification of neural spikes,” Biomedical Engineering, IEEE

Transactions on, vol. 35, no. 10, pp. 806–816, 1988.

[104] D. McFarland, A. Lefkowicz, and J. Wolpaw, “Design and operation

of an eeg-based brain-computer interface with digital signal processing

technology,” Behavior Research Methods, Instruments, & Computers,

vol. 29, no. 3, pp. 337–345, 1997.

[105] S. Gibson, J. W. Judy, and D. Markovic, “Comparison of spike-sorting

algorithms for future hardware implementation,” in Engineering in

Medicine and Biology Society, 2008. EMBS 2008. 30th Annual Inter-

national Conference of the IEEE, pp. 5015–5020, IEEE, 2008.

[106] S. E. Paraskevopoulou, D. Y. Barsakcioglu, M. R. Saberi, A. Eftekhar,

and T. G. Constandinou, “Feature extraction using first and second

derivative extrema (fsde) for real-time and hardware-efficient spike sort-

ing,” Journal of neuroscience methods, vol. 215, no. 1, pp. 29–37, 2013.

[107] T. I. Aksenova, O. K. Chibirova, O. A. Dryga, I. V. Tetko, A.-L. Benabid,

and A. E. Villa, “An unsupervised automatic method for sorting neuronal

Page 192: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

176

spike waveforms in awake and freely moving animals,” Methods, vol. 30,

no. 2, pp. 178–187, 2003.

[108] T. Takekawa, Y. Isomura, and T. Fukai, “Accurate spike sorting for

multi-unit recordings,” European Journal of Neuroscience, vol. 31, no. 2,

pp. 263–272, 2010.

[109] S. P. Rebrik, B. D. Wright, A. A. Emondi, and K. D. Miller, “Cross-

channel correlations in tetrode recordings: implications for spike-

sorting,” Neurocomputing, vol. 26, pp. 1033–1038, 1999.

[110] Z. Yang, L. Hoang, Q. Zhao, E. Keefer, and W. Liu, “1/f neural noise

reduction and spike feature extraction using a subset of informative sam-

ples,” Annals of biomedical engineering, vol. 39, no. 4, pp. 1264–1277,

2011.

[111] Y. Ghanbari, P. E. Papamichalis, and L. Spence, “Graph-laplacian fea-

tures for neural waveform classification,” Biomedical Engineering, IEEE

Transactions on, vol. 58, no. 5, pp. 1365–1372, 2011.

[112] X. He, D. Cai, and P. Niyogi, “Laplacian score for feature selection,” in

Advances in neural information processing systems, pp. 507–514, 2005.

[113] S. Shoham, L. M. Paninski, M. R. Fellows, N. G. Hatsopoulos, J. P.

Donoghue, R. Normann, et al., “Statistical encoding model for a primary

motor cortical brain-machine interface,” Biomedical Engineering, IEEE

Transactions on, vol. 52, no. 7, pp. 1312–1322, 2005.

Page 193: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

177

[114] M. S. Lewicki, “A review of methods for spike sorting: the detection

and classification of neural action potentials,” Network: Computation in

Neural Systems, vol. 9, no. 4, pp. R53–R78, 1998.

[115] P. Horton, A. Nicol, K. Kendrick, and J. Feng, “Spike sorting based upon

machine learning algorithms (soma),” Journal of neuroscience methods,

vol. 160, no. 1, pp. 52–68, 2007.

[116] D. A. Adamos, E. K. Kosmidis, and G. Theophilidis, “Performance eval-

uation of pca-based spike sorting algorithms,” Computer methods and

programs in biomedicine, vol. 91, no. 3, pp. 232–244, 2008.

[117] A. Pavlov, V. A. Makarov, I. Makarova, and F. Panetsos, “Sorting of

neural spikes: when wavelet based methods outperform principal com-

ponent analysis,” Natural Computing, vol. 6, no. 3, pp. 269–281, 2007.

[118] T. Takekawa, Y. Isomura, and T. Fukai, “Spike sorting of heterogeneous

neuron types by multimodality-weighted pca and explicit robust varia-

tional bayes,” Frontiers in neuroinformatics, vol. 6, 2012.

[119] R. Quian Quiroga, Z. Nadasdy, and Y. Ben-Shaul, “Unsupervised spike

detection and sorting with wavelets and superparamagnetic clustering,”

2004.

[120] R. Quiroga, Z. Nadasdy, and Y. Ben-Shaul, “Unsupervised spike de-

tection and sorting with wavelets and superparamagnetic clustering,”

Neural computation, vol. 16, no. 8, pp. 1661–1687, 2004.

Page 194: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

178

[121] F. Wood, M. J. Black, C. Vargas-Irwin, M. Fellows, and J. P. Donoghue,

“On the variability of manual spike sorting,” Biomedical Engineering,

IEEE Transactions on, vol. 51, no. 6, pp. 912–918, 2004.

[122] K. D. Harris, D. A. Henze, J. Csicsvari, H. Hirase, and G. Buzsáki,

“Accuracy of tetrode spike separation as determined by simultaneous in-

tracellular and extracellular measurements,” Journal of neurophysiology,

vol. 84, no. 1, pp. 401–414, 2000.

[123] J. MacQueen et al., “Some methods for classification and analysis of mul-

tivariate observations,” in Proceedings of the fifth Berkeley symposium

on mathematical statistics and probability, vol. 1, pp. 281–297, Oakland,

CA, USA., 1967.

[124] D. Novak, J. Wild, T. Sieger, and R. Jech, “Identifying number of neu-

rons in extracellular recording,” in Neural Engineering, 2009. NER’09.

4th International IEEE/EMBS Conference on, pp. 742–745, IEEE, 2009.

[125] C. Zhang, X. Zhang, M. Q. Zhang, and Y. Li, “Neighbor number, val-

ley seeking and clustering,” Pattern Recognition Letters, vol. 28, no. 2,

pp. 173–180, 2007.

[126] M. Blatt, S. Wiseman, and E. Domany, “Data clustering using a model

granular magnet,” Neural Computation, vol. 9, no. 8, pp. 1805–1842,

1997.

[127] U. Rutishauser, E. M. Schuman, and A. N. Mamelak, “Online detection

and sorting of extracellularly recorded action potentials in human medial

Page 195: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

179

temporal lobe recordings, in vivo,” Journal of neuroscience methods,

vol. 154, no. 1, pp. 204–224, 2006.

[128] T. M. Vaughan, J. R. Wolpaw, and E. Donchin, “Eeg-based commu-

nication: prospects and problems,” Rehabilitation Engineering, IEEE

Transactions on, vol. 4, no. 4, pp. 425–430, 1996.

[129] A. S. Zandi, G. A. Dumont, M. J. Yedlin, P. Lapeyrie, C. Sudre, and

S. Gaffet, “Scalp eeg acquisition in a low-noise environment: A quan-

titative assessment,” Biomedical Engineering, IEEE Transactions on,

vol. 58, no. 8, pp. 2407–2417, 2011.

[130] R. T. Wilkinson and K. B. Campbell, “Effects of traffic noise on quality

of sleep: assessment by eeg, subjective report, or performance the next

day,” The Journal of the Acoustical Society of America, vol. 75, no. 2,

pp. 468–475, 1984.

[131] A. Delorme, T. Sejnowski, and S. Makeig, “Enhanced detection of arti-

facts in eeg data using higher-order statistics and independent compo-

nent analysis,” Neuroimage, vol. 34, no. 4, pp. 1443–1449, 2007.

[132] P. Scalart et al., “Speech enhancement based on a priori signal to noise

estimation,” in Acoustics, Speech, and Signal Processing, 1996. ICASSP-

96. Conference Proceedings., 1996 IEEE International Conference on,

vol. 2, pp. 629–632, IEEE, 1996.

Page 196: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

180

[133] C. Plapous, C. Marro, and P. Scalart, “Improved signal-to-noise ratio

estimation for speech enhancement,” Audio, Speech, and Language Pro-

cessing, IEEE Transactions on, vol. 14, no. 6, pp. 2098–2108, 2006.

[134] Y. Xu, J. B. Weaver, D. M. Healy Jr, and J. Lu, “Wavelet transform

domain filters: a spatially selective noise filtration technique,” Image

Processing, IEEE Transactions on, vol. 3, no. 6, pp. 747–758, 1994.

[135] T. Wittkop, V. Hohmann, and B. Kollmeier, “Noise reduction strategies

employing interaural parameters,” The Journal of the Acoustical Society

of America, vol. 105, no. 2, pp. 1211–1211, 1999.

[136] V. Stahl, A. Fischer, and R. Bippus, “Quantile based noise estimation for

spectral subtraction and wiener filtering,” in Acoustics, Speech, and Sig-

nal Processing, 2000. ICASSP’00. Proceedings. 2000 IEEE International

Conference on, vol. 3, pp. 1875–1878, IEEE, 2000.

[137] R. Martin, “Spectral subtraction based on minimum statistics,” power,

vol. 6, p. 8, 1994.

[138] S. F. Boll, “Suppression of acoustic noise in speech using spectral sub-

traction,” Acoustics, Speech and Signal Processing, IEEE Transactions

on, vol. 27, no. 2, pp. 113–120, 1979.

[139] G. Doblinger, “Computationally efficient speech enhancement by spec-

tral minima tracking in subbands,” Power, vol. 1, p. 2, 1995.

[140] H. Hirsch and C. Ehrlicher, “Noise estimation techniques for robust

speech recognition,” in Acoustics, Speech, and Signal Processing, 1995.

Page 197: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

181

ICASSP-95., 1995 International Conference on, vol. 1, pp. 153–156,

IEEE, 1995.

[141] R. Martin, “An efficient algorithm to estimate the instantaneous snr of

speech signals.,” in Eurospeech, vol. 93, pp. 1093–1096, 1993.

[142] I. Cohen and B. Berdugo, “Noise estimation by minima controlled recur-

sive averaging for robust speech enhancement,” Signal Processing Let-

ters, IEEE, vol. 9, no. 1, pp. 12–15, 2002.

[143] I. Cohen, “Noise spectrum estimation in adverse environments: Im-

proved minima controlled recursive averaging,” Speech and Audio Pro-

cessing, IEEE Transactions on, vol. 11, no. 5, pp. 466–475, 2003.

[144] C. Ris and S. Dupont, “Assessing local noise level estimation methods:

Application to noise robust asr,” Speech Communication, vol. 34, no. 1,

pp. 141–158, 2001.

[145] A. Anier, T. Lipping, R. Ferenets, P. Puumala, E. Sonkajärvi, I. Rätsep,

and V. Jäntti, “Relationship between approximate entropy and visual

inspection of irregularity in the eeg signal, a comparison with spectral

entropy,” British journal of anaesthesia, p. aes312, 2012.

[146] H. K. Jung, J. H. Choi, and T. Kim, “Solving alignment problems in neu-

ral spike sorting using frequency domain pca,” Neurocomputing, vol. 69,

no. 7, pp. 975–978, 2006.

[147] J. Wild, Z. Prekopcsak, T. Sieger, D. Novak, and R. Jech, “Performance

comparison of extracellular spike sorting algorithms for single-channel

Page 198: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

182

recordings,” Journal of Neuroscience Methods, vol. 203, no. 2, pp. 369–

376, 2012.

[148] R. A. DeVore and B. J. Lucier, “Wavelets,” Acta numerica, vol. 1, pp. 1–

56, 1992.

[149] C. Yang, B. Olson, and J. Si, “A multiscale correlation of wavelet coeffi-

cients approach to spike detection,” Neural computation, vol. 23, no. 1,

pp. 215–250, 2011.

[150] H.-Y. Lai, Y.-Y. Chen, S.-H. Lin, Y.-C. Lo, S. Tsang, S.-Y. Chen, W.-T.

Zhao, W.-H. Chao, Y.-C. Chang, R. Wu, et al., “Automatic spike sorting

for extracellular electrophysiological recording using unsupervised single

linkage clustering based on grey relational analysis,” Journal of neural

engineering, vol. 8, no. 3, p. 036003, 2011.

[151] Y. Yuan, C. Yang, and J. Si, “The m-sorter: An automatic and ro-

bust spike detection and classification system,” Journal of neuroscience

methods, vol. 210, no. 2, pp. 281–290, 2012.

[152] R. R. Coifman and S. Lafon, “Diffusion maps,” Applied and computa-

tional harmonic analysis, vol. 21, no. 1, pp. 5–30, 2006.

[153] P.-M. Zhang, J.-Y. Wu, Y. Zhou, P.-J. Liang, and J.-Q. Yuan, “Spike

sorting based on automatic template reconstruction with a partial so-

lution to the overlapping problem,” Journal of neuroscience methods,

vol. 135, no. 1, pp. 55–65, 2004.

Page 199: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

183

[154] M. Blatt, S. Wiseman, and E. Domany, “Superparamagnetic clustering

of data,” Physical review letters, vol. 76, no. 18, pp. 3251–3254, 1996.

[155] P. Machart and L. Ralaivola, “Confusion matrix stability bounds for

multiclass classification,” arXiv preprint arXiv:1202.6221, 2012.

[156] N. V. Cuong, V. Dinh, and L. S. T. Ho, “Mel-frequency cepstral coef-

ficients for eye movement identification,” in Tools with Artificial Intel-

ligence (ICTAI), 2012 IEEE 24th International Conference on, vol. 1,

pp. 253–260, IEEE, 2012.

[157] H. Zhou, S. Mohamed, A. Bhatti, C. P. Lim, N. Gu, S. Haggag, and

S. Nahavandi, “Spike sorting using hidden markov models,” in Neural

Information Processing, pp. 553–560, Springer, 2013.

[158] E. Hulata, R. Segev, and E. Ben-Jacob, “A method for spike sorting and

detection based on wavelet packets and shannon’s mutual information,”

Journal of Neuroscience methods, vol. 117, no. 1, pp. 1–12, 2002.

[159] E. De Benedetti, S. Lew, and B. Zanutto, “A wavelet approach for on-

line spike sorting in tetrode recordings,” in Engineering in Medicine and

Biology Society (EMBC), 2010 Annual International Conference of the

IEEE, pp. 6662–6665, IEEE, 2010.

[160] S. Takahashi, Y. Anzai, and Y. Sakurai, “Automatic sorting for multi-

neuronal activity recorded with tetrodes in the presence of overlapping

spikes,” Journal of neurophysiology, vol. 89, no. 4, pp. 2245–2258, 2003.

Page 200: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

184

[161] S. Takahashi, Y. Anzai, and Y. Sakurai, “A new approach to spike sort-

ing for multi-neuronal activities recorded with a tetrode how ica can be

practical,” Neuroscience research, vol. 46, no. 3, pp. 265–272, 2003.

[162] L. H. Ang, M. Kamuf, and W. G. Lim, “Soft output viterbi algorithm

method and decoder,” Mar. 27 2013. EP Patent 2,302,811.

[163] G. J. Dinning and A. C. Sanderson, “Real-time classification of multiunit

neural signals using reduced feature sets,” Biomedical Engineering, IEEE

Transactions on, no. 12, pp. 804–812, 1981.

[164] E. M. Schmidt, “Computer separation of multi-unit neuroelectric data:

a review,” Journal of neuroscience methods, vol. 12, no. 2, pp. 95–111,

1984.

[165] G. Tauchen and V. Todorov, “Kolmogorov-smirnov type tests for local

gaussianity in high-frequency data,” 2012.

[166] H. W. Lilliefors, “On the kolmogorov-smirnov test for normality with

mean and variance unknown,” Journal of the American Statistical Asso-

ciation, vol. 62, no. 318, pp. 399–402, 1967.

[167] A. K. Jain, “Data clustering: 50 years beyond k-means,” Pattern Recog-

nition Letters, vol. 31, no. 8, pp. 651–666, 2010.

[168] P. J. Lisboa, T. A. Etchells, I. H. Jarman, and S. J. Chambers, “Finding

reproducible cluster partitions for the k-means algorithm,” BMC bioin-

formatics, vol. 14, no. Suppl 1, p. S8, 2013.

Page 201: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

185

[169] A. Singer and H.-t. Wu, “Orientability and diffusion maps,” Applied and

computational harmonic analysis, vol. 31, no. 1, pp. 44–58, 2011.

[170] T. Lapainis, C. Scanlan, S. Rubakhin, and J. Sweedler, “A multichannel

native fluorescence detection system for capillary electrophoretic analy-

sis of neurotransmitters in single neurons,” Analytical and bioanalytical

chemistry, vol. 387, no. 1, pp. 97–105, 2007.

[171] F. Briggs, G. R. Mangun, and W. M. Usrey, “Attention enhances synap-

tic efficacy and the signal-to-noise ratio in neural circuits,” Nature, 2013.

[172] N. Ramachandran and A. Chellappa, “Feature extraction from eeg using

wavelets: Spike detection algorithm,” in International Symposium on

Modern Computing (JVA 2006), pp. 120–124, 2006.

[173] V. E. Bielat and A. Levi, “Open access textbookÑaccess, quality, use,”

2012.

[174] Y. Ephraim, “Hidden markov models,” Encyclopedia of Operations Re-

search and Management Science, pp. 704–708, 2013.

[175] Y. Perelman and R. Ginosar, “An integrated system for multichannel

neuronal recording with spike/lfp separation, integrated a/d conversion

and threshold detection,” Biomedical Engineering, IEEE Transactions

on, vol. 54, no. 1, pp. 130–137, 2007.

[176] H. Moravec, “When will computer hardware match the human brain,”

Journal of evolution and technology, vol. 1, no. 1, p. 10, 1998.

Page 202: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

186

[177] S. Haggag, S. Mohamed, A. Bhatti, N. Gu, H. Zhou, and S. Naha-

vandi, “Cepstrum based unsupervised spike classification,” in Systems,

Man, and Cybernetics (SMC), 2013 IEEE International Conference on,

pp. 3716–3720, IEEE, 2013.

[178] S. Sanei and J. A. Chambers, EEG signal processing. John Wiley &

Sons, 2008.

[179] M. Seeck, C. M. Michel, N. Mainwaring, R. Cosgrove, H. Blume, J. Ives,

T. Landis, and D. L. Schomer, “Evidence for rapid face recognition from

human scalp and intracranial electrodes,” Neuroreport, vol. 8, no. 12,

pp. 2749–2754, 1997.

[180] S. Haggag, S. Mohamed, H. Haggag, and S. Nahavandi, “Hidden markov

model neurons classification based on mel-frequency cepstral coeffi-

cients,” in System of Systems Engineering (SOSE), 2014 9th Interna-

tional Conference on, pp. 166–170, IEEE, 2014.

[181] T. Nguyen, A. Bhatti, A. Khosravi, S. Haggag, D. Creighton, and S. Na-

havandi, “Automatic spike sorting by unsupervised clustering with dif-

fusion maps and silhouettes,” Neurocomputing, 2014.

[182] H. J. Hermens, B. Freriks, R. Merletti, D. Stegeman, J. Blok, G. Rau,

C. Disselhorst-Klug, and G. Hägg, European recommendations for sur-

face electromyography. Roessingh Research and Development The

Netherlands, 1999.

Page 203: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

187

[183] C. J. De Luca, “The use of surface electromyography in biomechanics,”

Journal of applied biomechanics, vol. 13, pp. 135–163, 1997.

[184] I. Hettiarachchi, S. Mohamed, and S. Nahavandi, “A marginalised

markov chain monte carlo approach for model based analysis of eeg

data,” in Biomedical Imaging (ISBI), 2012 9th IEEE International Sym-

posium on, pp. 1539–1542, IEEE, 2012.

[185] C. L. Philips, J. M. Parr, and E. Riskin, Signals, systems, and trans-

forms. Prentice Hall, 1995.

[186] B. Yang, Q. Wang, Z. Han, H. Wang, and L. He, “Development of a bci

simulated application system based on directx,” in Practical Applications

of Intelligent Systems, pp. 813–822, Springer, 2014.

[187] I. T. Hettiarachchi, T. T. Nguyen, and S. Nahavandi, “Motor imagery

data classification for bci application using wavelet packet feature extrac-

tion,” in Neural Information Processing, pp. 519–526, Springer, 2014.

[188] Y. Zhang, G. Zhou, Q. Zhao, J. Jin, X. Wang, and A. Cichocki, “Spatial-

temporal discriminant analysis for erp-based brain-computer interface,”

Neural Systems and Rehabilitation Engineering, IEEE Transactions on,

vol. 21, no. 2, pp. 233–243, 2013.

[189] Y. Zhang, G. Zhou, J. Jin, X. Wang, and A. Cichocki, “Frequency recog-

nition in ssvep-based bci using multiset canonical correlation analysis,”

International journal of neural systems, vol. 24, no. 04, p. 1450013, 2014.

Page 204: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

188

[190] W. Wu, Z. Chen, X. Gao, Y. Li, E. N. Brown, and S. Gao, “Probabilistic

common spatial patterns for multichannel eeg analysis,” Pattern Analysis

and Machine Intelligence, IEEE Transactions on, vol. 37, no. 3, pp. 639–

653, 2015.

[191] P. Khatwani and A. Tiwari, “A survey on different noise removal tech-

niques of eeg signals,” International Journal of Advanced Research in

Computer and Communication, vol. 2, no. 2, 2013.

[192] A. V. Kramarenko and U. Tan, “Effects of high-frequency electromag-

netic fields on human eeg: a brain mapping study,” International Journal

of Neuroscience, vol. 113, no. 7, pp. 1007–1019, 2003.

[193] C. M. Krause, L. Sillanmäki, M. Koivisto, A. Häggqvist, C. Saarela,

A. Revonsuo, M. Laine, and H. Hämäläinen, “Effects of electromagnetic

field emitted by cellular phones on the eeg during a memory task,” Neu-

roreport, vol. 11, no. 4, pp. 761–764, 2000.

[194] J. C. Doyle, R. Ornstein, and D. Galin, “Lateral specialization of cogni-

tive mode: Ii. eeg frequency analysis,” Psychophysiology, vol. 11, no. 5,

pp. 567–578, 1974.

[195] N. Birbaumer, N. Ghanayim, T. Hinterberger, I. Iversen, B. Kotchoubey,

A. Kübler, J. Perelmouter, E. Taub, and H. Flor, “A spelling device for

the paralysed,” Nature, vol. 398, no. 6725, pp. 297–298, 1999.

Page 205: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

189

[196] H. Jokeit and S. Makeig, “Different event-related patterns of gamma-

band power in brain waves of fast-and slow-reacting subjects,” Proceed-

ings of the National Academy of Sciences, vol. 91, no. 14, pp. 6339–6343,

1994.

[197] “Real-time applications in control and communications.” http:

//catalog.rpi.edu/preview_course_nopop.php?catoid=11&coid=

18464. Accessed: 2014.

[198] E. Niedermeyer and F. L. da Silva, Electroencephalography: basic prin-

ciples, clinical applications, and related fields. Lippincott Williams &

Wilkins, 2005.

[199] K. V. Mardia, “Measures of multivariate skewness and kurtosis with

applications,” Biometrika, vol. 57, no. 3, pp. 519–530, 1970.

[200] J. C. de Munck, S. I. Gonçalves, T. J. Faes, J. P. Kuijer, P. J. Pouwels,

R. M. Heethaar, and F. L. da Silva, “A study of the brain’s resting state

based on alpha band power, heart rate and fmri,” Neuroimage, vol. 42,

no. 1, pp. 112–121, 2008.

[201] L. Goldstein, A. A. Sugerman, M. H. Stolberg, H. B. Murphree, and C. C.

Pfeiffer, “Electro-cerebral activity in schizophrenics and non-psychotic

subjects: Quantitative eeg amplitude analysis,” Electroencephalography

and clinical neurophysiology, vol. 19, no. 4, pp. 350–361, 1965.

Page 206: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

190

[202] M. Kaibara, G. M. Holloway, and G. B. Young, Blume’s Atlas of Pedi-

atric and Adult Electroencephalography. Lippincott Williams & Wilkins,

2010.

[203] R. J. Davidson, D. C. Jackson, and C. L. Larson, “Human electroen-

cephalography,” Handbook of psychophysiology, vol. 2, pp. 27–52, 2000.

[204] P. Mirowski, D. Madhavan, Y. LeCun, and R. Kuzniecky, “Classifica-

tion of patterns of eeg synchronization for seizure prediction,” Clinical

neurophysiology, vol. 120, no. 11, pp. 1927–1940, 2009.

[205] W. C. Dement, Some must watch while some must sleep, vol. 37. San

Francisco Book Co., 1976.

[206] J. R. Plant, “Biopsychology (4th edn.), by pj pinel, allyn & bacon, need-

ham heights, ma, 2000. isbn 0-205-28992-4; 544 pp.,” 2000.

[207] I. Miller and R. A. Miller, “The schumann’s resonances and human psy-

chobiology,” Nexus Magazine, vol. 10, no. 3, pp. 43–49, 2003.

[208] B. J. Baars and N. M. Gage, Cognition, brain, and consciousness: In-

troduction to cognitive neuroscience. Academic Press, 2010.

[209] F. H. Duffy, V. G. Iyer, and W. W. Surwillo, Clinical electroencephalog-

raphy and topographic brain mapping: Technology and practice. Springer

Science & Business Media, 2012.

[210] B. Gawronski and G. V. Bodenhausen, Theory and explanation in social

psychology. Guilford Publications, 2014.

Page 207: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

191

[211] M. P. Walker and R. Stickgold, “Sleep-dependent learning and memory

consolidation,” Neuron, vol. 44, no. 1, pp. 121–133, 2004.

[212] T. Yamada and E. Meng, Practical guide for clinical neurophysiologic

testing: EEG. Lippincott Williams & Wilkins, 2012.

[213] M. S. Livingstone and D. H. Hubel, “Anatomy and physiology of a color

system in the primate visual cortex,” J Neurosci, vol. 4, no. 1, pp. 309–

356, 1984.

[214] S. P. Springer and G. Deutsch, Left brain, right brain: Perspectives from

cognitive neuroscience . WH Freeman/Times Books/Henry Holt & Co,

1998.

[215] J. Goutsias, L. Vincent, and D. S. Bloomberg, Mathematical morphology

and its applications to image and signal processing, vol. 18. Springer

Science & Business Media, 2006.

[216] D. Girton and J. Kamiya, “A simple on-line technique for removing eye

movement artifacts from the eeg,” Electroencephalography and clinical

Neurophysiology, vol. 34, no. 2, pp. 212–216, 1973.

[217] J. Barlow and A. Remond, “Eye movement artifact nulling in eegs by

multichannel on-line eog subtraction,” Electroencephalography and clin-

ical neurophysiology, vol. 52, no. 5, pp. 418–423, 1981.

[218] C. A. Joyce, I. F. Gorodnitsky, and M. Kutas, “Automatic removal of

eye movement and blink artifacts from eeg data using blind component

separation,” Psychophysiology, vol. 41, no. 2, pp. 313–325, 2004.

Page 208: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

192

[219] S. Makeig, A. J. Bell, T.-P. Jung, T. J. Sejnowski, et al., “Independent

component analysis of electroencephalographic data,” Advances in neural

information processing systems, pp. 145–151, 1996.

[220] R. Cooper, J. W. Osselton, and J. C. Shaw, EEG technology.

Butterworth-Heinemann, 2014.

[221] G. Pfurtscheller and F. L. Da Silva, “Event-related eeg/meg synchroniza-

tion and desynchronization: basic principles,” Clinical neurophysiology,

vol. 110, no. 11, pp. 1842–1857, 1999.

[222] J. R. Wolpaw, D. J. McFarland, and T. M. Vaughan, “Brain-computer

interface research at the wadsworth center,” Rehabilitation Engineering,

IEEE Transactions on, vol. 8, no. 2, pp. 222–226, 2000.

[223] A. Schlogl and C. Brunner, “Biosig: a free and open source software

library for bci research,” Computer, vol. 41, no. 10, pp. 44–50, 2008.

[224] G. Schalk, D. J. McFarland, T. Hinterberger, N. Birbaumer, and J. R.

Wolpaw, “Bci2000: a general-purpose brain-computer interface (bci) sys-

tem,” Biomedical Engineering, IEEE Transactions on, vol. 51, no. 6,

pp. 1034–1043, 2004.

[225] Y. Renard, F. Lotte, G. Gibert, M. Congedo, E. Maby, V. Delannoy,

O. Bertrand, and A. Lécuyer, “Openvibe: an open-source software plat-

form to design, test, and use brain-computer interfaces in real and virtual

environments,” Presence: teleoperators and virtual environments, vol. 19,

no. 1, pp. 35–53, 2010.

Page 209: Signal Processing for Automated EEG Quality Assessmentdro.deakin.edu.au/eserv/DU:30088806/haggag-signalprocessing-201… · Sherif Haggag, Shady Mohamed, Omar Haggag and Saeid Nahavandi

193

[226] C. A. Kothe and S. Makeig, “Bcilab: a platform for brain–computer

interface development,” Journal of neural engineering, vol. 10, no. 5,

p. 056014, 2013.


Recommended