UBC Faculty Research and Publications

Automatic artefact removal in a self-paced hybrid brain- computer interface system Yong, Xinyi; Fatourechi, Mehrdad; Ward, Rabab K; Birch, Gary E Jul 27, 2012

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata


52383-12984_2011_Article_373.pdf [ 572.82kB ]
JSON: 52383-1.0223136.json
JSON-LD: 52383-1.0223136-ld.json
RDF/XML (Pretty): 52383-1.0223136-rdf.xml
RDF/JSON: 52383-1.0223136-rdf.json
Turtle: 52383-1.0223136-turtle.txt
N-Triples: 52383-1.0223136-rdf-ntriples.txt
Original Record: 52383-1.0223136-source.json
Full Text

Full Text

J N E R JOURNAL OF NEUROENGINEERINGAND REHABILITATIONYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50http://www.jneuroengrehab.com/content/9/1/50RESEARCH Open AccessAutomatic artefact removal in a self-pacedhybrid brain- computer interface systemXinyi Yong1*, Mehrdad Fatourechi1, Rabab K Ward1 and Gary E Birch1,2AbstractBackground: A novel artefact removal algorithm is proposed for a self-paced hybrid brain-computer interface (BCI)system. This hybrid system combines a self-paced BCI with an eye-tracker to operate a virtual keyboard. To select aletter, the user must gaze at the target for at least a specific period of time (dwell time) and then activate the BCI byperforming a mental task. Unfortunately, electroencephalogram (EEG) signals are often contaminated with artefacts.Artefacts change the quality of EEG signals and subsequently degrade the BCI’s performance.Methods: To remove artefacts in EEG signals, the proposed algorithm uses the stationary wavelet transformcombined with a new adaptive thresholding mechanism. To evaluate the performance of the proposed algorithmand other artefact handling/removal methods, semi-simulated EEG signals (i.e., real EEG signals mixed with simulatedartefacts) and real EEG signals obtained from seven participants are used. For real EEG signals, the hybrid BCI system’sperformance is evaluated in an online-like manner, i.e., using the continuous data from the last session as in areal-time environment.Results: With semi-simulated EEG signals, we show that the proposed algorithm achieves lower signal distortion inboth time and frequency domains. With real EEG signals, we demonstrate that for dwell time of 0.0s, the number offalse-positives/minute is 2 and the true positive rate (TPR) achieved by the proposed algorithm is 44.7%, which is morethan 15.0% higher compared to other state-of-the-art artefact handling methods. As dwell time increases to 1.0s, theTPR increases to 73.1%.Conclusions: The proposed artefact removal algorithm greatly improves the BCI’s performance. It also has thefollowing advantages: a) it does not require additional electrooculogram/electromyogram channels, long datasegments or a large number of EEG channels, b) it allows real-time processing, and c) it reduces signal distortion.BackgroundA brain-computer interface (BCI) system allows humansto use their brain signals (such as EEG) to control vari-ous devices such as a virtual keyboard [1-3], a functionalelectrical stimulator [4], an orthosis [5], amongst others.BCIs can be operated in a synchronized mode or an asyn-chronous (self-paced) mode [6]. In a synchronized BCIsystem, the periods when a user can control the systemare determined by the system itself. The system usuallysends an external cue to the user and the user must thenissue a control command within a window of opportu-nity provided by the system. This limits the use of a*Correspondence: yongy@ece.ubc.ca1Department of Electrical and Computer Engineering, University of BritishColumbia, 2356 Main Mall, Vancouver, V6T1Z4 CanadaFull list of author information is available at the end of the articlesynchronized BCI system in practical applications. A self-paced BCI system, on the other hand, allows users tocontrol the system whenever they desire. Hence, the usershave a more natural and flexible means for controlling anobject [6].Designing a self-paced BCI system with high perfor-mance is associated with two major challenges. Theyare:1. identifying the user’s intentional control (IC) statereliably [IC periods are periods when the user intendsto issue control] and2. reducing the number of false activations (falsepositives during the no control (NC) periods). [NCperiods are periods when the user does not intend toactivate the system such as when he/she is obtaining© 2012 Yong et al.; licensee BioMed Central Ltd. This is an Open Access article distributed under the terms of the CreativeCommons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, andreproduction in any medium, provided the original work is properly cited.Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 2 of 20http://www.jneuroengrehab.com/content/9/1/50information from the computer screen, thinkingabout a problem, talking, resting, etc].NC periods are usually much longer compared to ICperiods. As a high number of false positives can result inuser frustration, it is especially important to design a sys-tem that generates a very low (ideally zero) number of falsepositives.It is not easy and straightforward to apply existing pure(i.e., non-hybrid) self-paced BCI systems to operate apractical system such as a virtual keyboard. The reasonis that these systems can only recognize a limited num-ber of mental tasks as unique IC commands (mostly oneor two). This number is much smaller than the numberof letters used in spelling applications. Furthermore, mostself-paced BCI systems generate a large number of falsepositives per minute on average, which is not suitable formost practical applications.To overcome the above problems, in [7] we have pro-posed a hybrid system that combines a self-paced BCIwith an eye-tracker to operate a virtual keyboard. Ourproposed hybrid BCI system also successfully overcomesthe ‘Midas Touch’ problem, which is a major prob-lem experienced by conventional eye-gaze interfaces, andresults in a significantly smaller false positives generatedper minute [7]. The ‘Midas Touch’ problem is the diffi-culty of determining whether or not the user is intendingto select a certain object as the user might be gazing at theobject for reasons other than to enter it [8].As the hybrid BCI system relies on eye movements tocontrol the cursor, it is no surprise that the EEG signals inthe system are more contaminated with ocular artefactscompared to EEG signals in a pure BCI system. Also asin other BCI systems, EEG signals are also contaminatedwith artefacts caused by muscle activities, power lineinterference, and electrode movements [9]. These arte-facts can affect the performance of the system in severalways. In particular, they can:1. significantly reduce the amount of data available fordesigning the system;2. result in false positives during the NC periods and3. decrease the true positive rate of the system.Although some studies have clearly shown that artefactsaffect the performance of pure self-paced BCI systems[10,11], little attention has been paid to handle artefactsso far.In this paper, to minimize the effects of artefacts andimprove the performance of our hybrid BCI, we proposea new artefact removal algorithm. The proposed artefactremoval algorithm is integrated with our artefact detec-tion algorithm proposed in [12]. Both algorithms use thestationary wavelet transform (SWT). The wavelet coef-ficients obtained from the artefact detection algorithmare thresholded by applying a new adaptive thresholdingprocedure that we propose to remove artefacts in EEG sig-nals. Its advantages over state-of-the-art artefact removalalgorithms are:1. it can be fully automated;2. it uses an adaptive mechanism to reduce signaldistortion;3. it is computationally inexpensive and allowsreal-time processing; and4. it does not require additional electrooculogram(EOG) or electromyogram (EMG) channels, longdata segments or a large number of EEG channels.We compare the performance of different algorithmsusing real EEG signals and semi-simulated EEG signals(i.e., real EEG signals mixed with simulated artefacts).With semi-simulated EEG signals, we show that the pro-posed algorithm achieves lower signal distortion in bothtime and frequency domains. Next, using real EEG sig-nals, we fully investigate and compare the performance ofthe hybrid BCI system in the following situations: 1) whenartefacts are ignored (i.e., the original data are used); 2)when EEG segments with artefacts are rejected (i.e., theoutput of the system is blocked in the presence of artefactsand the system becomes unavailable); and 3) when auto-matic artefact removal algorithms such as the proposedalgorithm and Blind Source Separation (BSS) algorithmsare employed. We show that for dwell time of 0.0s (i.e.,the user can activate the system any time right afterhe/she gazes at a letter/word), the true positive rate (TPR)achieved using the proposed artefact removal algorithmis 44.7% with 2 false positives generated per minute. ThisTPR value is 33.6% and 20.1% higher than those achievedwhen artefacts are rejected and ignored respectively. Wealso show that our proposed method outperforms BSS byat least 16.2%.In the following subsections, we briefly review ourself-paced hybrid BCI system, current artefact handlingmethods in the literature as well as the state-of-the-art ofartefact removal algorithms.The structure of the self-paced hybrid BCI systemA hybrid BCI is defined as a system that combines aBCI with another system (such as another BCI or aneye-tracker) [13]. In this section, the overall structure ofthe hybrid self-paced BCI system proposed in our earlierwork is presented [7]. This system combines a BCI and aneye-tracker to operate a virtual keyboard.Figure 1 shows the block diagram of this hybrid sys-tem. It serves as an interface between a user and a text-entry application based on a virtual keyboard called theDynamic Keyboard [14]. The Dynamic Keyboard, whichis extensively used by people with disabilities, is designedYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 3 of 20http://www.jneuroengrehab.com/content/9/1/50Hybrid BCI SystemSelf−Paced BCIFigure 1 Our Hybrid BCI System. The hybrid BCI system proposed in [7].to have large selection boxes, and a word predictionfunctionality. The eye-tracker acts as the pointing deviceand the user’s eye gaze controls the cursor movement. Theuse of eye gaze is natural and fast because people oftenlook at the object of interest before controlling it [8]. TheBCI, on the other hand, acts as the clicking device. Itsinputs are the continuous EEG signals recorded from theuser’s scalp and the output is a binary control signal (i.e.,it is either ‘0’ or ‘1’).To make a selection (i.e., a click operation), a user hasto gaze at the target for at least a specific period of time(called the dwell time) and then activate the self-pacedBCI with amental task (which is an attempted hand exten-sion), as demonstrated in Figure 1. When changes in theEEG signals due to an attempted hand extension move-ment are detected by the signal processing unit in theBCI, a click command (an intentional control or IC) isinitiated. Note that an attempted hand extension resultsin an imagined movement by users with movement dis-abilities who cannot move their hands. For able-bodiedindividuals, it leads to an actual hand movement [15].Evidence from the literature shows that the patterns aris-ing from attempted movements are very similar to thoseof real movements [16,17]. This evidence allows the useof real movements in our study. However, note that theattempted hand movement can be replaced by any othermental task.Our previous study showed that increasing the dwelltime (Tdwell) reduces the number of false positives [7].This is because our design restricts the BCI’s operationto the periods during which the user’s point of gazeis within a region on the monitor that can be clickedon and the user gazes at that region for at least Tdwellseconds. For the rest of the time, the BCI is put inthe so-called ‘sleep’ mode, i.e., it does not process theinput EEG signals nor generates any output. By usingthis arrangement, we can greatly reduce the number offalse positives during the NC periods, as demonstratedin [7].The above system has one main drawback. When theusers are looking at different locations of the virtual key-board to make a selection, the amount of eye movementactivity is significant. Therefore, EEG signals are more fre-quently contaminated with ocular artefacts compared topure (non-hybrid) BCI systems. Hence, it is important todesign an algorithm that can efficiently handle artefacts inthis hybrid system.Artefact handling methodsA review of methods for handling EOG and EMG arte-facts in BCIs shows that more than half of the 250 BCIpapers studied did not report as to whether or not theyhad considered or handled EOG and/or EMG artefacts[9]. For those who did, three methods were generallyemployed:1. Ignore: ignoring the presence of artefacts;2. Reject : automatic rejection of artefact-contaminatedEEG segments; and3. Remove: automatic removal of artefacts.In a real-time self-paced BCI system, using Ignoreor Remove implies that both clean and contaminatedEEG signals are classified and therefore the systemis available for control at all times. On the otherhand, employing Reject indicates that the BCI sys-tem becomes unavailable for control when artefactsare present.Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 4 of 20http://www.jneuroengrehab.com/content/9/1/50Rejecting contaminated EEG segments (Reject) is com-mon in BCI literature. However, this approach has twomajor disadvantages:1. In the training phase, it can significantly reduce theamount of available data for training the classifier;2. In the testing phase, it forces the BCI system into anon-responsive state for a significant portion of thetime. This subsequently reduces the informationtransfer rate of the system.Due to these shortcomings, Reject needs to be replacedby methods that do not discard any data during artefact-contaminated periods.Unless the signal processing algorithms employed toprocess EEG signals are robust to the presence of artefacts,ignoring the artefacts in EEG signals (Ignore) is usuallynot an efficient approach either. This is due to the factthat artefacts affect the different frequency bands in EEGsignals and therefore impact the performance of a self-paced BCI system. For example, a study conducted byBashashati et al. [10] shows that the performance of theproposed self-paced BCI system deteriorates, when thedata with ocular artefacts are included in the analysis.Based on the results obtained from eight participants, theamount of decrease in the true positive rate (TPR) valuevaried from 2.3% to 15.1% (with an average of 6.8%), whenthe time-normalized false positive rate (TNFPR) was setto 9 FPs/min. In another study, Fatourechi et al. [11]combined the use of features extracted from three neuro-logical phenomena: movement-related potentials (MRPs),and the power of mu and beta rhythms to design a self-paced BCI system that is robust in the presence of arte-facts. Using a five-fold nested cross validation, the averageTPR and TNFPR achieved were 56.2% and 0.5 FPs/minfor non-contaminated data and 51.8% and 2 FPs/min forartefact-contaminated data. The deterioration in someindividuals was much greater, e.g., a drop of 13.2% and anincrease of 0.5 FPs/min in the TPR and TNFPR, respec-tively, were observed in one person. The results of theabove studies show that current state-of-the-art patternrecognition algorithms employed in self-paced BCI sys-tems cannot efficiently handle artefacts. As a result, othersolutions need to be explored.A better alternative solution to handle artefacts in a self-paced BCI system is to apply automatic artefact removalalgorithms to EEG segments contaminated with artefacts(Remove). Although removing artefacts is not straightfor-ward and increases the complexity of the BCI system, themajor advantage is that the BCI system becomes availablefor user’s control at all times including those with arte-facts happen. Besides, the performance of the system maybe improved if the artefact removal algorithm removes theartefacts effectively without distorting the EEG signals.In the rest of this section, we provide a brief review onartefact removal algorithms (for a more detailed review,please see [9]).Regression analysis is widely used to remove ocularartefacts from EEG signals [18-21]. It assumes that theobserved EEG signals are a linear superposition of EEGand EOG components [18]. The proportion of any EOGcomponent that is present in the EEG signal is estimatedand then removed using the least squares criterion. Thismethod has the disadvantage of requiring the recording ofsource signals from the EOG channels to remove ocularartefacts. For the case ofmuscle artefacts, it is not straight-forward to identify the source signals as these sourcescan originate from different muscle groups [21]. For thisreason, different reference channels from multiple musclegroups are required. This in turn can greatly increase thecomplexity of the algorithm.Another popular approach for artefact removal is blindsource separation (BSS) [22-25], including IndependentComponent Analysis (ICA) algorithms [20,26-28]. Thesealgorithms estimate the underlying sources from EEG sig-nals recorded from electrodes. The sources related toartefacts are removed to obtain denoised EEG signals. Asan example, Hung et al. automated the identification ofEEG activities of interest using several manually identi-fied movement-related spatial maps and used the cleanedsignals in the classification of motor imagery EEG sig-nals [26]. Halder et al. proposed the use of the AMUSE(Algorithm for Multiple Unknown Source Extraction)and ICA Infomax algorithms to isolate artefacts from3-second EEG segments. A combination of support vec-tor machines was used to classify the isolated artefactsextracted using the proposed BSS and ICA algorithms[22]. While BSS/ICA algorithms are widely used in theliterature for removing artefacts, a study conducted byWallstrom et al. [20] showed that these algorithms mayoverestimate the spectrum of artefacts and thus causespectral distortion in EEG signals. Moreover, such meth-ods require multi-channel data and long data epochs toproduce reliable results [29].An alternative artefact removal method is based onwavelet denoising. Stationary wavelet transform (SWT)[30] has been proposed to remove ocular artefacts (i.e.,artefacts caused by eye-blinks and eye movements) fromEEG signals [31-34]. In this approach, the wavelet coeffi-cients that correspond to the lower frequency bands arethresholded to remove ocular artefacts in EEG signals.These algorithms, however, are specific to ocular artefactsand to the best of our knowledge their performance isnot provided quantitatively. Besides, using the thresholdselection procedure based on Stein’s unbiased risk esti-mate (SURE) in [33] results in over-estimation of artefactsand therefore EEG signals are over-corrected (this will bedemonstrated later in this paper).Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 5 of 20http://www.jneuroengrehab.com/content/9/1/50In this study, we have explored the use of SWT inremoving various types of artefacts in EEG signals.The main reason is that it is computationally inexpen-sive and no additional EOG/EMG channels and longdata segments are required. To overcome the problemencountered when using the SURE threshold selectionprocedure, we have proposed a new adaptive thresholdingmechanism.In the next section, we first describe the experimentalprocedure and the type of EEG data used in this study.Next, the artefact detection algorithm and our proposedartefact removal algorithm are discussed. Finally, the met-rics used to evaluate the performance of the artefactremoval algorithm is presented.MethodsExperimental procedureData descriptionThe experiments [7] were approved by the UBC Behav-ioral Research Ethics Board. We recruited seven able-bodied individuals, who did not wear glasses for this study.Their age ranges from 26 to 31. Participants gave aninformed consent before participating in the experiment.Each individual was seated comfortably approximately 75cm in front of a computer monitor and wore a 64-channelelectrode cap. EEG signals were recorded from 15 elec-trodes placed over the motor cortex area of the brain asshown in Figure 2. Electrooculogram (EOG) signals wererecorded by two pairs of electrodes placed around botheyes. Facial muscle activities were recorded by four pairsof electromyogram (EMG) surface electrodes placed sym-metrically on two related facial muscles from each sideof the face: zygomaticus major and corrugator supercilii.All electrodes were referenced to the linked right and leftC3 CZ C4FC4C1 C2FC3 FCZFC1 FC2F2 F4F1 FZF3ReferenceFigure 2 Electrode Montage. The EEG channels used in our system.earlobes. All signals were amplified and sampled at 128 Hzusing a L64 Sagura EEG amplifier system [35].For eye-tracking, we used a Mirametrix S1 system [36].This eye-tracker employed a single high-resolution cam-era to estimate the point of gaze. The eye-gaze informa-tion such as the x and y coordinates of the fixation point,the pupils’ center x and y coordinates amongst otherinformation were recorded during the experiments.Experimental protocolEach experiment for each participant lasted for approx-imately 2.5 hours. At the beginning of each experiment,the eye-tracker was calibrated. Next, the participants weregiven approximately ten minutes to practise a text entrytask with the eye-tracker and the Dynamic Keyboard sothat they becamemore comfortable with using the system.The participants were then requested to rest for two min-utes. The data recorded during this resting period werelater used to determine the thresholds for the artefactdetection algorithm [12].Next, the participants were asked to type a sentence dis-played by the graphical user interface (GUI), at their ownspeed. Once a user finished typing one sentence, a newsentence appeared and replaced the old one. This proce-dure was repeated until the end of the ten-minute session.The sentences were randomly selected from the ‘PhraseSet’ provided by MacKenzie and Soukoreff [37], whichconsisted of 500 phrases, with lengths varying from 16 to43 characters. Each experiment consisted of three to fivesessions.To type a letter or word, each individual used eye-movements to move the cursor to the target button andthen performed a hand extension to activate the self-paced BCI system. The target was selected after a handextension movement was detected by the BCI. Duringdata collection we replaced the self-paced BCI systemwith an electrical hand switch that mimicked the opera-tion of a self-paced BCI system designed earlier by ourgroup [38]. This switch generated an output of ‘1’ whenthe user performed an IC command, i.e., the user per-formed an attempted hand movement and pressed theswitch [7]. The switch was programmed such that ithad a TPR of approximately 70% at a TNFPR of about9 FPs/min (TNFPR is the time-normalized false posi-tive rate or the number of false positives generated perminute). These were the best performance achieved byone of our recent self-paced BCI systems based on anattempted hand extension movement [38]. Please notethat during the experiment, the total TNFPR of thehybrid system was actually lower than the 9 FPs/min.This is because we designed the system so that false pos-itives may only occur during the times when the user isgazing at a button that can be clicked on. During theperiods when the user is navigating between selectionYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 6 of 20http://www.jneuroengrehab.com/content/9/1/50areas, false positives are blocked and they do not resultin any false selection. Hence, the total TNFPR wouldbe lower.Throughout the experiment, a participant could askfor a break whenever needed. Furthermore, whenever aparticipant felt that the eye-tracker was becoming moredifficult to control, we recalibrated the eye-tracker.Generating semi-simulated EEG signalsThe EEG data collected from the experiments describedabove were used to evaluate the performance of the hybridBCI system when various algorithms were used for arte-fact removal. As the exact percentage of artefacts in EEGsignals is not clear, it is difficult to measure the effec-tiveness of different methods in terms of the amount ofartefacts removed. For this reason, we have generatedsemi-simulated EEG signals so that the amount of arte-facts and signals removed by various artefact removalalgorithms can be quantified. The semi-simulated EEGsignals were constructed by adding simulated artefactsto real EEG data acquired from the experiments. As theclean EEG signals, the artefacts and their mixing processare now known, evaluating the performance of differentartefact removal algorithms becomes easier.For each of the 15 EEG channels, to generate a 1-secondsemi-simulated EEG signal, a 1-second clean EEG seg-ment from each channel was mixed with artefacts. Twodifferent types of artefacts were simulated: eye-blinks andmuscle artefacts. Eye-blinks were simulated by band-passfiltering a random noise from 1 to 3 Hz. The filter wasobtained using a finite impulse response (FIR) filter basedon Kaiser’s window [39]. Muscle artefacts were simulatedby band-pass filtering a random noise from 20 to 60 Hzusing an FIR filter based on the Kaiser’s window [39]. Thelevel of artefact contamination for each EEG channel wasestimated from real EEG signals. Then, the amplitudesof the simulated artefacts were adjusted such that thesemi-simulated signals have a signal-to-noise ratio (SNR)of 0 dB for the EEG channel that has the largest arte-fact contamination level. Figure 3 shows two examplesof semi-simulated EEG signals with ocular and muscleartefacts added respectively.To simulate real-life scenarios where EEG segments arecontaminated with artefacts at different locations, eachsimulated artefact was shifted and mixed with each cleanEEG signal to generate different semi-simulated EEGsignals.Automatic artefact detectionOur BCI system is composed of four main modules (seeFigure 4):1. an artefact detection module;2. an artefact removal module;3. a feature extraction module; and4. a feature classification module.This system employs Ne = 15 monopolar EEG chan-nels. It continuously segments the EEG signals using a1-second sliding window, with 87.5% overlap. Therefore,eight EEG segments are obtained each second. The arte-fact detection algorithm is first applied to each EEG seg-ment, before that segment is processed by the artefactremoval, feature extraction and feature classificationmod-ules. In the remaining part of this section, the artefactdetection algorithm [12] is briefly discussed.The automatic artefact detection algorithm is based onthe stationary wavelet transform (SWT) in [12]. It onlyemploys EEG signals acquired from the premotor and sen-sorimotor cortex areas of the brain. This allows us tobypass the use of additional EOG and EMG signals, aswell as frontal and temporal EEG electrodes in our artefactdetection module. The algorithm also has a low compu-tational complexity because it uses a simple thresholdingmethod for artefact detection. Furthermore, to minimizehuman intervention, the thresholds used in the algorithmare obtained automatically using the EEG data collected atthe beginning of each experiment as the user is requestedto rest and have minimal movement [12].The artefact detection algorithm uses the maximumamplitude of EEG signals and the SWT coefficients todetect artefacts (see Figure 5).In Figure 5,Aj is themaximum amplitude of an EEG seg-ment in channel j. In addition, Pij and Mij are the power0 0.2 0.4 0.6 0.8 1−20020Semi−simulated EEG (SNR = 0 dB)(a) Clean EEG 0 0.2 0.4 0.6 0.8 1−50050(b) Clean EEG + Ocular ArtefactsAmplitude0 0.2 0.4 0.6 0.8 1−50050(c) Clean EEG + Muscle ArtefactsFigure 3 Simulated Signals. Examples of semi-simulated EEGsignals generated from a single channel real EEG signal: a) cleansignal; b) clean signal with added ocular artefacts; c) clean signal withadded muscle artefacts.Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 7 of 20http://www.jneuroengrehab.com/content/9/1/50Control CommandsFeature Extractor Feature TranslatorAmplitude ThresholdingStationary Wavelet TransformInverse SWTThresholding SWT coefficientsEEG Signals(15 Channels)Denoised EEG SignalsAutomatic Artefact DetectionArtefact RemovalFigure 4 Structure of the Proposed Self-Paced BCI System. The structure of the proposed self-paced BCI system.and themaximum amplitude of the ith level wavelet coeffi-cients for the EEG channel j respectively as defined below:Pij = 1NN∑t=1a2i,j,t (1)Mij = maxt=1:N |ai,j,t| (2)where ai,j,t is the tth sample of the ith level wavelet coeffi-cients obtained for the EEG channel j andN is the numberof coefficients available.As shown in Figure 5, Pij, Mi, and Aj for each EEG seg-ment in channel j are computed and each of these featuresis compared with one of the three thresholds (ThPij , ThMijand ThAj ). The thresholds for these features are deter-mined using the reference EEG signals collected when theparticipants were requested to rest (please see [12] formore details).As different wavelet coefficient levels correspond to dif-ferent frequency bands, the algorithm could be used toidentify two major types of artefacts: (a) low frequencyartefacts (e.g., ocular, electrode movement and headmovement artefacts), and (b) higher frequency artefacts(e.g., facial muscle and electrode movement artefacts).The low frequency artefacts are declared present if:• the features of the last level of the detail coefficientsand the approximation coefficients in at least NChEEG channels exceed their thresholds; or• any of the EEG channels has a value Aj that exceeds25 μVAlso, the high frequency artefacts are declared to bepresent if the higher frequency features (Pij,Mij for i = 1,2, and 3) in at leastNCh EEG channels exceed the values oftheir corresponding thresholds.Here, NCh denotes the number of EEG channels thatare observed to have Pij and Mij values exceeding theircorresponding thresholds. This parameter affects the sen-sitivity (the percentage of correctly detected segmentswith artefacts) and the specificity (the percentage of cor-rectly identified artefact-free segments). The choice ofNCh = 0 is too stringent. Although it results in a highsensitivity value, the specificity value is often too low. Inour study, we have experimentally found that NCh = 5(i.e., one third of the electrodes) provides a reasonableijRest EEG Data2 minutesj = 1,2,..,15 Channels1 secondEEG Segmentj = 1, 2,...,15 ChannelsMaximumAmplitudePijijThPMijMijA j= 25ThA ThAjoPM   =ij j = 1oPM NeijPijNej = 1oA jDefine ThresholdsSWTi = 1,..,6 LevelsThoA  =j0   if      A jA j1    if        >ThAjandThM0    if   OtherwiseThPij1    if       >Mij >Figure 5 Features Used for Automatic Artefact Detection. Features used for automatic artefact detection [12] .Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 8 of 20http://www.jneuroengrehab.com/content/9/1/50specificity and sensitivity values. It is clear that there isa trade-off between the sensitivity and the specificity val-ues. For our application, a high sensitivity value (i.e., a highartefact detection rate) is more desirable because arte-facts can affect the performance of the system. Those EEGsegments that are falsely declared as contaminated withartefacts would not be rejected or discarded and thereforeno data loss would result.In this paper, we have integrated this artefact detectionalgorithm with our proposed artefact removal algorithmsto denoise EEG signals. If artefacts in an EEG segment aredeclared as present by the artefact detection algorithm,the artefact removal algorithm is then applied to removethem, as explained in the next section.Artefact removal algorithmWe propose to remove the artefacts using the station-ary wavelet transform (SWT) with an adaptive thresh-olding mechanism. As shown in Figure 4, the waveletcoefficients generated by the artefact detection moduleare used in our artefact removal algorithm to denoisethe EEG signals. The denoised signals are obtained byperforming an inverse SWT on the thresholded waveletcoefficients. The performance of the proposed algorithmis compared with those of other artefact removal algo-rithms such as blind sources separation (BSS) algorithms.The details of these algorithms and the performanceevaluation criteria used are provided in the followingsubsections.BackgroundThe discrete wavelet transform (DWT) is not transla-tion invariant. Small shifts in a signal can cause largechanges in the wavelet coefficients of the signal and largevariations in the distribution of energy in the differentwavelet scales [30]. Besides, due to the lack of the transla-tion invariance property, denoising with DWT sometimesintroduces artefacts (small ripples) in the signal near dis-continuities that are created by thresholding the waveletcoefficients [40]. A solution to the translation invarianceproblems is the use of a translation invariant estimationsuch as SWT [30].SWT is translation invariant because there is no down-sampling of data involved in the algorithm that decom-poses a signal [30]. Instead, the wavelet filters are dilated ateach decomposition level of the transform [30]. To removethe noise from a signal using SWT, three steps need to beperformed [40]:1. Transform the signal into the wavelet domain;2. Apply a thresholding function to the resultingwavelet coefficients; and3. Transform the modified wavelet coefficients back tothe original domain to obtain the denoised signal.Therefore, when applying SWT for artefact removal,two important issues need to be taken into consideration:1) the thresholding function used to attenuate the waveletcoefficients; and 2) the estimation procedure for obtainingthe optimal threshold. These issues are discussed next.Thresholding functionThe thresholding function is used to remove or reduce aselected number of wavelet coefficients so as to removeartefacts from a signal. Depending on the application andthe assumptions made, the large wavelet coefficients arerelated to either the signal of interest or to the artefacts. Inour application, we assume that the artefacts that obscurethe EEG signals introduce large wavelet coefficients in thewavelet domain. Hence, the wavelet coefficients (that arelarger than a particular threshold T) correspond to noisysamples and the wavelet coefficients smaller than T cor-respond to the signal of interest. Of course, the amountof the attenuation of these coefficients depends on thethresholding function employed.The two most widely used thresholding functions arethe hard thresholding (Eq. 3) and the soft thresholdingfunctions (Eq. 4) [40]. The hard thresholding function hasa discontinuity. This discontinuity results in a bigger vari-ance in the estimated signal (i.e., the output estimate issensitive to small changes in the input data) [41]. The softthresholding function on the other hand results in a biggerbias (and hence larger errors) in the estimated signal [41].To overcome the drawbacks of both the hard and the softthresholding, the non-negative garrote shrinkage function(Eq. 5) was proposed in [41]. This function is continuous,less sensitive to small changes in the data and has a smallerbias.δHard(x) ={0 |x| ≤ Tx |x| > T (3)δSoft(x) =⎧⎨⎩0 |x| ≤ Tx − T x > Tx + T x < T(4)δ+Garrote(x) ={0 |x| ≤ Tx − T2/x |x| > T (5)Another shrinkage function called the Smooth Sigmoid-Based Shrinkage (SBSS) function has been proposed byAtto et al. [42]. This function is defined as:δSBSS(x) ={0 |x| ≤ Tsgn(x)(|x|−T)1+e−τ(|x|−λ) |x| > T(6)where sgn(x) = 1 if x ≥ 0 and sgn(x) = −1 if x < 0;T controls the attenuation imposed on the data with largeYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 9 of 20http://www.jneuroengrehab.com/content/9/1/50amplitudes; λ is the threshold height (λ > T). Finally, τis the attenuation we want to impose on data with ampli-tudes in the interval ]T , λ[ and ]−λ,T[. Please see [42]for more details about the SBSS shrinkage function. Theadvantages of this shrinkage function are:1. It is smooth and it introduces small variability amongcoefficients with close values. Thus, it induces lesserror when reconstructing the signals;2. It can control the degree of attenuation imposed onwavelet coefficients: high attenuation on the smallcoefficients and weak attenuation on the largecoefficients.In this paper, we investigate the different threshold-ing functions. Among these functions, the non-negativegarrote thresholding function and the SBSS shrinkagefunction have not been explored in the BCI literature toremove artefacts from EEG signals andwill be investigatedfor the first time in our paper.Threshold value selectionThe thresholds selected for wavelet denoising, Ti, areimportant as they decide the degree of attenuationimposed on both artefacts and signals. Over-estimatingthe thresholds results in the under-estimation of artefactsand thus, the artefacts are not completely removed fromthe signal of interest. On the other hand, under-estimatingthe thresholds results in the over-estimation of artefactsand thus, the signal of interest is over-corrected.Two possible approaches to estimating the thresholdsinclude: 1) estimating the thresholds based on some ref-erence signals [31] (denoted by SWT-REF) and 2) usingthe so-called universal threshold proposed by [40] (Eq.7),which is denoted by SWT-UNV.Ti0 = σi√2lnN (7)where Ti0 is the universal threshold estimated for the ithdecomposition level wavelet coefficients ai:, σi is the esti-mated noise variance for ai:, and N is the number of datasamples. For this formula, σi = MADN(ai:)whereMADNis the normalized version of themedian absolute deviationdefined below:MADN(x) = 1cmedian(|x − median(x)|) (8)where c = 0.6745, as this value results in an estimate thatis unbiased when the data is normally distributed [43].Both approaches provide fixed thresholds, which arenot necessarily optimal. For instance, the universal thresh-old tends to be bigger than necessary and over-smoothsthe signal [41]. For our application, this implies that thisthreshold value fails to effectively remove artefacts.To adaptively find the optimal thresholds, Donohoand Johnstone proposed a threshold selection procedurebased on the Stein’s unbiased risk estimate (SURE) forsoft-thresholding [44]. This procedure is not valid for hardthresholding because the hard thresholding function isnot continuous and therefore it does not have boundedweak derivative (in Stein’s sense) [41].When applying SWT with soft thresholding and usingthe SURE procedure (denoted by SWT-SURE) to removeartefacts in EEG signals, we have observed that the esti-mated thresholds tend to be lower than the optimalthresholds. That means the thresholds do not only removethe artefacts, but they also remove some parts of the sig-nals as well. The evidence to support our observation willbe presented in the Results section.To overcome the problems encountered in the exist-ing threshold selection procedures discussed above, wepropose an adaptive thresholding algorithm, which isexplained next.Proposed adaptive SWTDenoising Algorithm - ASWTDSWT with hard thresholding [31] and soft thresholding[33,34] have been applied in the literature to remove noisein EEG signals. These studies, however, have only focussedon ocular artefact removal. Hence, only the wavelet coef-ficients that correspond to lower frequency bands (i.e., upto 16 Hz) are thresholded. To the best of our knowledge,SWT has not been used to remove other artefacts such asmuscle and electrode artefacts.Our proposed algorithm, which is denoted by AdaptiveSWT-based Denoising (ASWTD), is different from theabove studies in two main aspects:1. It uses a new adaptive thresholding procedure thatminimizes the effects of artefacts, while preservingthe features of the signal of interest and preventingthe signal from being over-corrected.2. To remove the various EEG artefacts in a self-pacedBCI system, ASWTD thresholds the waveletcoefficients at all the decomposition levels.We also investigate four different thresholding func-tions (i.e., the hard, soft, non-negative garrote and SBSSthresholding functions), when the proposed procedure isemployed.Figure 6 depicts the basic idea of the ASWTD algo-rithm. The thresholds are data-driven and adaptivelyupdated. The adaptive thresholding procedure requires aperformance-based criterion to decide how the thresholdsshould be adjusted with respect to the requirements ofour application. These requirements include reducing thepresence of artefacts and preserving the features of EEGsignals in a computationally efficient manner.In the proposed procedure, the evaluation criterionused to optimize the thresholds is P˚ij, the power of theYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 10 of 20http://www.jneuroengrehab.com/content/9/1/50AdaptiveThresholdingSWT ISWTEvaluationCriterionDenoisedEEG Signalfrom Channel jEEG Segment1 SecondFigure 6 The Proposed SWT-Based Artefact Removal Algorithm. The basic structure of the proposed SWT-based artefact removal algorithm.wavelet coefficients related to denoised EEG signals (seeEq. 1). P˚ij provides the frequency information of the signal,as the different wavelet decomposition levels correspondto the different frequency bands. If P˚ij > ThPij (the samethreshold value used in the artefact detection module),this means that the artefacts are still present in the signal.The threshold values of the thresholding function for eachdecomposition level i and EEG channel j are thenmodifiedas follows:Tij = Tij − μTij (9)where μ is the learning rate of the adaptive algorithm(0 < μ < 1). The larger the μ value, the faster the algo-rithm is in finding the optimal threshold. However, if μis too large, it might result in over-estimating the artefactcomponents and subsequently the signal distortion. Weuse the two values 0.1 and 0.5 forμ in this study. The valuethat results in a higher performance in the algorithm (i.e.,a larger true positive rate and a larger time-normalizedfalse positive rate in validation EEG data and less distor-tion in the semi-simulated EEG data) is selected. For thehard thresholding, the non-negative garrote and the SBSSfunctions, 0.1 is used. For the soft thresholding function,0.5 is used.As shown in Figure 4, ASWTD is integrated with theartefact detection module. In the artefact detection mod-ule, each of the 1-second EEG segments collected from 15EEG channels is decomposed into five levels using SWT.As SWT is only translation invariant under circular con-volution [30], any discontinuities at the borders can createlarge wavelet coefficients at those locations. To reduce thisboundary effect, each 1-second EEG segment is extendedsymmetrically on the right before the a` trous algorithmis applied. As most of the artefacts that contaminate theEEG signals are ocular artefacts, the wavelet functionemployed is Coiflet 3 because it resembles the shape ofeye-blink artefacts [31]. Whenever artefacts are detectedby the artefact detection module, ASWTD is applied tothe wavelet coefficients aij: to remove them.A summary of ASWTD is as follows:1. Define the initial level-dependent threshold for eachwavelet decomposition level using the universalthreshold specified in Eq. 7.2. Threshold the wavelet coefficients. The modifiedwavelet coefficients a¯ij: correspond to artefacts. Thewavelet coefficients that correspond to the EEGsignals a˚ij: are obtained by finding the differencebetween aij: and a¯ij: (i.e., a˚ij: = aij: − a¯ij:).3. Find the power of a˚ij: (P˚ij) as defined in Eq. 1 andcompare it to the threshold ThPij . While P˚ij > ThPij ,the threshold value is modified according to Eq. 9.4. Apply the inverse SWT to the final coefficient valuesa˚ij: to reconstruct the denoised EEG signals.Performance evaluationIt is difficult to evaluate the performance of artefactremoval algorithms because a good estimate of the cleanEEG activity is usually unavailable. For this reason, somestudies do not quantify the performance of their proposedartefact removal algorithms. Instead, they use qualitativevisual comparison, i.e., contaminated EEG signals and thecorrected or denoised EEG signals are plotted and qualita-tively compared [23,24,31,45]. Unfortunately, such quali-tative measures are subjective. Some researchers thereforehave attempted to quantify the performance by usingcriteria such as the ratio between the spectral densityfunctions of the corrected and the raw EEG signals [46]and expert scoring [18].Another approach to evaluate the performance of anartefact removal algorithm uses simulated EEG data. Inthis case, artefacts are manually added to clean EEG sig-nals and the artefact removal algorithm is then appliedto the simulated signals. With this approach, ‘clean’ EEGsignals should be known. Therefore, evaluation criteriasuch as a correlation coefficient [25], and errors in time[20,23,25,47] or frequency domains [20] can be used toevaluate the performance. Based on this rationale, wegenerated semi-simulated EEG signals and investigatedYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 11 of 20http://www.jneuroengrehab.com/content/9/1/50the performance of the different artefact removing algo-rithms. The performance metrics used include the signaldistortion:1. in the time domain by using the mean square error(MSE); and2. in the frequency domain by using the spectraldistortion PSDd defined as:PSDd =∑40f=1 PSDest(f )2∑40f=1 PSDclean(f )2(10)where PSDclean(f ) and PSDest(f ) are the spectralvalues at f Hz for the known clean EEG signal andthe denoised EEG signal obtained using an artefactremoval algorithm, respectively. The ideal value ofPSDd is 1, i.e., PSDest = PSDclean. Values ofPSDd < 1 indicate that the algorithm over-correctsthe semi-simulated EEG signals. On the other hand, ifPSDd > 1, the artefacts are not completely removedfrom the semi-simulated EEG signals or somedistortion is possibly introduced by the algorithm.Besides using semi-simulated EEG signals, we also eval-uate the performance of the different artefact algorithmswhen applied to real EEG data. The performance of thesystem was evaluated using the true positive rate (TPR)and the time-normalized false positive rate (TNFPR) ofthe hybrid BCI system. TPR is the percentage of IC com-mands that are correctly detected by the system. Falsepositive rate (FPR) is the percentage of false positives gen-erated by the system during NC periods. However, FPR isNOT a good performance metric to summarize the detec-tion performance over NC periods [7]. This is because dif-ferent self-paced BCI systems may have different numberof output decisions per second. Therefore, even thoughtwo systems may have the same FPR, the number of FPsper unit of time might be substantially different if theiroutput rates are different. For example, consider systemsA and B, where both A and B have an FPR of 1%. Sys-tem A produces 8 decisions every second and therefore itis expected to generate approximately 4.8 FPs per minute.On the other hand, System B, which produces 16 decisionsevery second is expected to generate approximately 9.6FPs per minute (i.e., twice the number of FPs generated bySystem A). As a result, it is more meaningful to comparethe performance of different systems during NC periodsusing a time-normalized measure of FPs as proposed in[11], and defined as follows:TNFPR = FPR100 × output rate × 60 (FPs/min) (11)To be consistent with our previous studies, a TP wasdeclared as present when the BCI system was activatedat least once in a window from 0.5s before to 1.0s after ahand switch activation [15]. Any EEG segment obtainedoutside the TP window was labeled as an NC trial. There-fore, any activation that occurred outside the TP windowwas considered as an FP. The BCI system generated 8 deci-sions every second. As a result, an FPR of 0.42% results inTNFPR = 0.0042 × 8 × 60 = 2 FPs/min (see Eq. 11).Feature extraction and classification algorithmsAfter processing the EEG signals by the artefact detectionand removal modules, the feature extraction and classifi-cation modules are applied next. The structure of thesemodules is shown in Figure 7 and their details are dis-cussed in our previous work [7]. A brief description oftheir structure is as follows: First, thirty combinationsof bipolar EEG signals are generated by calculating thedifference between adjacent monopolar channels: Cz-C1,Cz-C2, Cz-C3, Cz-C4, C1-C2, C1-C4, C1-C3, C2-C3, C2-C4, C3-C4, FCz-Cz, FC1-C1, FC2-C2, FC3-C3, FC4-C4,Fz-FCz, F1-FC1, F2-FC2, F3-FC3, F4-FC4, FCz-FC1, FCz-FC2, FCz-FC3, FCz-FC4, FC1-FC2, FC1-FC4, FC1-FC3,FC2-FC3, FC2-FC4, FC3-FC4. Then, the power spectraldensity of each bipolar signal is computed by applying FastFourier Transform (FFT) [a window size of one secondwas used]. The frequency components from 1 to 35 Hz areused because they correspond to the movement relatedpotentials as well as the mu and beta rhythms. This resultsin a total of 35 × 30 = 1050 features for each windowedEEG segment.Next, the stepwise Linear Discriminant Analysis (step-wise LDA) [48] selects the features that best discriminatebetween the IC and NC classes. In this study, the numberState ’1’ or ’0’PSD (FFT) Stepwise LDAClassifierLDA MovingAverage DebounceFeature TranslatorFeature ExtractorEEG’0’’1’CommandsControlFigure 7 Structure of the Feature Extraction and Classification Blocks of the BCI. The structure of the feature extraction and classificationalgorithms of the self-paced BCI system [7].Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 12 of 20http://www.jneuroengrehab.com/content/9/1/50of features selected by stepwise LDA is subject-specificand varies from 80 to 140. Finally, Linear DiscriminantAnalysis (LDA) [48] is applied as a classifier [7,49]. Forevery participant, the EEG data collected from all ses-sions he/she completed (ns sessions) are divided intothree parts:1. training data: the EEG data obtained from session 1 tons −1, except for the last minute of the session ns −1;2. cross-validation data: the last minute of the EEG dataobtained from session ns − 1;3. testing data: all the EEG data obtained from the last(nths ) session.The stepwise LDA and LDA classifier are trained usingthe training data. The value for the parameter μ in ourproposed artefact removal algorithm is chosen using thecross-validation data. For testing the LDA classifier, allEEG segments of the last session were tested continu-ously in an online-like manner (i.e. as is done in an onlineexperiment).During testing, the LDA classifies EEG features every0.125 seconds as a state ‘0’ (NC) or a state ‘1’ (IC). Asshown in Figure 7, a moving average filter (with the lengthof 2 samples) and a debounce block are also employedto further improve the detection performance [11,49,50].Debouncing the BCI output is similar to the debouncingof a physical switch. After an activation is detected by theLDA (i.e., a change from a state ‘0’ to a state ‘1’), the LDAoutput is set to a state ‘1’ for one sample. The next Tdbsamples, however, are forced to be the NC state ‘0’, whereTdb is the debounce period in samples. Similar to our pre-vious study [7], a debounce component with a Tdb of 8decision samples is used here as well.ResultsThe performance of our proposed ASWTD is comparedto those of SWT-REF, SWT-UNV, SWT-SURE, and threedifferent blind source separation (BSS) algorithms (imple-mented from ICALAB toolbox [51]):1. SOBI (Second Order Blind Identification) [24,25],2. ERICA (Equivariant Robust ICA - based onCumulants) [52] and3. AMUSE (Algorithm for Multiple Unknown SourceExtraction) [22,25].To be consistent with the way the EEG signals weresegmented in our hybrid BCI system, the EEG signalswere continuously segmented using a one-second mov-ing window (N = 128 samples), with an 87.5% overlap,before any BSS algorithm is applied. The mean valueswere removed from the 15-channel EEG segments andthen the data were pre-whitened with a prewhiteningmatrix [53] to remove any correlations in the data. TheBSS algorithms are then applied to the prewhitened EEGsegments to estimate the source components of the EEGsignals. The detected artefact components were removedand the denoised EEG signals were reconstructed.We identified the artefact components automatically,based on the statistical and spectral characteristics ofthe source components (s) [39]. If one of the conditionsstated below was satisfied, then artefacts were declared aspresent in the component:1. Amplitude thresholding: artefacts were declared aspresent, if |st| > Ths, where st is the amplitude of thetth sample of s. The threshold Ths was defined usingthe robust version of the ‘three sigma rule’ [43]:Ths = median(so) + 3MADN(so), where so are theamplitudes of the estimated source components ofthe clean reference EEG signals collected when theparticipants were resting.2. Kurtosis thresholding: artefacts were declared aspresent if |k| > Thk , where k is the kurtosis of asource component and Thk is the threshold. Beforethe kurtosis of each component was computed, allone-second source components were normalized tothe zero mean and a unitary standard deviation [52].The threshold Thk was defined as:Thk = median(ko) + 2MADN(ko), where ko is thekurtosis of the normalized source components of theclean reference EEG signals. The ‘three sigma rule’was not used in this case because we found that thisparticular threshold failed to detect some artefactcomponents. Therefore, a smaller threshold valuewas used.3. Spectral ratio thresholding: when high frequencyartefacts were detected in the EEG signals, theartefact components were identified using athresholding method based on the relative powerspectral values, Pratio, as defined in Eq. 12. Thisparameter quantifies the ratio of the spectral valuesof the high frequency components (21 - 40 Hz) to thespectral values of the low frequency components (5 -10 Hz).Pratio =∑40i=21 Pi∑10i=5 Pi(12)where Pi is the power spectral of a source componentat the frequency i (Hz). Artefacts were declared aspresent in a source component, if Pratio > Thpr . Thevalue of Thpr was determined using the robustversion of the ‘three sigma rule’:Thpr = median(Po) + 3MADN(Po), where Po is thePratio of the estimated sources of the clean referenceEEG data.Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 13 of 20http://www.jneuroengrehab.com/content/9/1/501 2 3 4 5 6 7 8 9 10050100150200250300350MethodsMSEa) MSE (SNR = 0dB)Ocular ArtefactsMuscle Artefacts1 2 3 4 5 6 7 8 9 10012345678910MethodsSpectral Distortionb) Spectral Distortion (SNR = 0dB)Ocular ArtefactsMuscle Artefacts  1: SWT−REF (Soft)  2: SWT−UNV (Soft)  3: SWT−SURE (Soft)  4: ASWTD−Hard  5: ASWTD−Soft  6: ASWTD−Garrote  7: ASWTD−SBSS  8: SOBI  9:  ERICA10: AMUSEIdeal Value = 0.0  1: SWT−REF (Soft)  2: SWT−UNV (Soft)  3: SWT−SURE (Soft)  4: ASWTD−Hard  5: ASWTD−Soft  6: ASWTD−Garrote  7: ASWTD−SBSS  8: SOBI  9:  ERICA10: AMUSEIdeal Value = 1.0Figure 8 The MSE and Spectral Distortion Obtained from Different Artefact Removal Algorithms. The (a) MSE and (b) spectral distortionobtained from the different artefact removal algorithms when semi-simulated EEG signals are used.To compare the performance of different artefactremoval algorithms, we use different criteria dependingon whether the data are semi-simulated or real EEG sig-nals, as summarized below:1. Semi-simulated EEG: MSE and Spectral Distortion;2. Real EEG: Qualitative Evaluation;3. Real EEG: TPR and TNFPR of the Hybrid BCI System;4. Real EEG: Inter-Trial Variability and ProcessingTime.The results are now presented.MSE/Spectral Distortion/Qualitative EvaluationFigure 8 presents the MSE and spectral distortion (PSDd)for different artefact removal algorithms when semi-simulated EEG signals (with ocular and muscle artefactsadded) are used. As seen in the figure, both SWT-REFand SWT-UNV have large MSE and PSDd values. In par-ticular, the PSDd values are much larger than the idealvalue of 1. Figure 9 shows an example when SWT-REFand SWT-UNV are applied to a real EEG signal con-taminated with ocular artefacts. The artefacts are noteffectively removed when the two approaches mentionedabove are used (Figure 9(b) and Figure 9(c)). The rea-son is that the estimated threshold values are bigger thanthe optimal thresholds and hence, the wavelet coeffi-cients corresponding to the artefacts are not completelyremoved.We also observe from Figure 8 that SWT-SURE has verysmall PSDd values (PSDd << 1). For EEG signals contam-inated with ocular artefacts, only the wavelet coefficients0 0.5 1−40−20020a) Raw EEG signalAmplitudeExample: EEG with Ocular Artefacts0 0.5 1−20020d) SWT−SURE0 0.5 1−20020b) SWT−REFTime/s0 0.5 1−40−20020c) SWT−UNVTime (s)Amplitude0 0.5 1−20020e) ASWTD−HardAmplitude0 0.5 1−20020f) ASWTD−Soft0 0.5 1−20020g) ASWTD−GarroteAmplitudeTime/s 0 0.5 1−20020h) ASWTD−SBSSTime/sFigure 9 Denoised EEG Obtained Using Various ThresholdSelection Procedures. The real EEG signal contaminated with ocularartefacts is shown in a). The denoised EEG signals obtained using thedifferent threshold selection procedures are shown in b) - h): b)SWT-REF; c) SWT-UNV; d) SWT-SURE; e) ASWTD-Hard; f) ASWTD-Soft;g) ASWTD-Garrote; and h) ASWTD-SBSS.Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 14 of 20http://www.jneuroengrehab.com/content/9/1/50that correspond to the lower frequency bands (i.e., up to16 Hz) are thresholded [33]. For EEG signals contami-nated with muscle artefacts, the wavelet coefficients fromall decomposition levels are thresholded as the artefactsaffect the EEG signals in all frequency bands. Hence, agreater over-correction (a smaller PSDd value) is observedin the case of muscle artefacts. Figure 9(d) shows thedenoised EEG signal obtained using SWT-SURE, whenapplied to the real EEG signal mentioned above. We notethat the amplitude of the denoised signal is relatively smalldue to the over-correction.As shown in Figure 8, the proposed ASWTD achievessmaller distortion: 1) the MSE values are smaller thanother artefact removal algorithms and closer to the idealvalue of 0, and 2) the spectral distortion values PSDd areclose to the ideal value of 1. Among all the threshold-ing functions, the non-negative garrote function has thebest performance. The BSS algorithms, on the other hand,have larger MSE values compared to our ASWTD. ThePSDd values for the case of ocular artefacts are largerthan 1, as the artefacts are not completely removed andsome signal distortion may have been introduced by thealgorithms. For the case of muscle artefacts, the BSS algo-rithms are not as efficient in isolating artefacts from theEEG signals, as compared to the case of ocular artefacts.Thus, more source components are identified as contam-inated with muscle artefacts and these components areunfortunately removed [22]. This may have resulted in anover-estimation of artefacts (and larger distortion in theestimated signals). Hence, PSDd values of less than one areobserved.Figure 9 (e) - (h) presents the denoised signals obtainedwhen ASWTD (with various thresholding functions) areused to remove artefacts in the real EEG signal Figure 9(a).Based on visual inspection, the artefacts are effectivelyremoved by ASWTD. For the SBSS function, less informa-tion from the small coefficients is removed from the EEGsignals and more information from the large coefficients(corresponding to artefacts) has been removed. Hence, thedenoised signal obtained shows slightly more details (andtherefore is less smooth) compared to the rest.Examples of applying SWT-SURE, ASWTD and BSSalgorithms to real EEG signals are shown in Figure 10 andFigure 11. The raw EEG segments are contaminated withan eye-blink and fEMG artefacts respectively. As shown inFigure 10, SOBI, AMUSE and ERICA remove the artefactsto a certain extent. In Figure 11(d), however, SOBI failsto completely remove the artefacts. For AMUSE, ERICAand SWT-SURE, the EEG signals are over-corrected andthe distortion is observed in the denoised signals. Onthe other hand, ASWTD with the non-negative garrotethresholding function gives the best results. It has smallersignal distortion as well as a smaller variance between thetwo estimated denoised signals.0 0.5 1−100−500a) Raw EEG signalAmplitude0 0.5 1−20020b) ASWTD−Garrote0 0.5 1−20020c) SWT−SUREAmplitude0 0.5 1−20020d) SOBITime/s0 0.5 1−20020e) ERICAAmplitudeTime/s 0 0.5 1−20020f) AMUSETime/sFigure 10 Denoised EEG Signals Obtained Different ArtefactRemoval Algorithms (Ocular Artefacts). The real EEG signalcontaminated with ocular artefacts is shown in a). The denoised EEGsignals obtained using the different artefact removal algorithms areshown in b) - f): b) ASWTD-Garrote; c) SWT-SURE; d) SOBI; e) ERICA;and f) AMUSE.TPR/TNFPR of the hybrid BCITable 1 compares the average performance achieved bythe hybrid BCI system for seven individuals, when dif-ferent artefact handling methods and dwell times (Tdwell)are used (note that a dwell time of 0.0s implies that theuser can select a target immediately once he gazes at it).0 0.5 1−50050a) Raw EEG signalAmplitudeTime/s 0 0.5 1−20020Example: EEG with Muscle Artefactsb) ASWTD−Garrote0 0.5 1−20020c) SWT−SUREAmplitudeTime/s 0 0.5 1−20020d) SOBI0 0.5 1−20020e) ERICAAmplitudeTime/s 0 0.5 1−20020f) AMUSEFigure 11 Denoised EEG Signals Obtained Different ArtefactRemoval Algorithms (Muscle Artefacts). The real EEG signalcontaminated with muscle artefacts is shown in a). The denoised EEGsignals obtained using the different artefact removal algorithms areshown in b) - f): b) ASWTD-Garrote; c) SWT-SURE; d) SOBI; e) ERICA;and f) AMUSE.Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 15 of 20http://www.jneuroengrehab.com/content/9/1/50Table 1 Comparing the Performance of Different Artefact HandlingMethodsMethod (TPR:%, TNFPR:FPs/min)Tdwell = 0.00 Tdwell = 0.25 Tdwell = 0.50 Tdwell = 0.75 Tdwell = 1.00Ignore (11.1, 2.0) (11.7, 2.0) (24.3, 2.0) (48.0, 2.0) (62.8, 2.0)Reject (24.6, 1.5) (26.3, 1.4) (28.1, 1.4) (30.7, 1.3) (28.7, 1.1)SOBI (28.5, 2.0) (33.9, 2.0) (42.3, 2.0) (54.5, 2.0) (66.4, 2.0)ERICA (17.1, 2.0) (20.1, 2.0) (31.3, 2.0) (45.4, 2.0) (60.4, 2.0)AMUSE (27.4, 2.0) (30.5, 2.0) (37.0, 2.0) (56.4, 2.0) (72.6, 2.0)SWT-SURE (16.2, 2.0) (19.7, 2.0) (27.7, 2.0) (38.0, 2.0) (54.2, 2.0)ASWTD Hard (36.4, 2.0) (34.3, 2.0) (43.1, 2.0) (53.0, 2.0) (69.7, 2.0)ASWTD Soft (44.0, 2.0) (46.5, 2.0) (51.1, 2.0) (62.3, 2.0) (70.3, 2.0)ASWTD Garrote (44.7, 2.0) (48.8, 2.0) (51.7, 2.0) (60.8, 2.0) (73.1, 2.0)ASWTD SBSS (36.7, 2.0) (37.7, 2.0) (48.0, 2.0) (56.4, 2.0) (71.8, 2.0)Comparing the performance of the hybrid BCI system with the different artefact handling methods and dwell times.All the real EEG segments obtained from the last sessionare included in the analysis (including those contaminatedwith artefacts). We consider the following three artefacthandling methods (explained in Section 2):1. Ignore: No artefact handling is employed;2. Reject : Contaminated EEG segments are rejected;3. Remove: An artefact removal algorithm (ASWTD,SWT-SURE, SOBI, ERICA or AMUSE) that denoisescontaminated EEG segments is applied.For ASWTD, different thresholding functions are used:1. ASWTD Hard: ASWTD + hard thresholding2. ASWTD Soft: ASWTD + soft thresholding3. ASWTD Garrote: ASWTD + non-negative garrotethresholding4. ASWTD SBSS: ASWTD + SBSS thresholdingA two-way Analysis of Variance (ANOVA) [54] wascarried out to examine the statistical significance of theresults. ANOVA showed that the mean performances ofthe hybrid BCI system with different artefact handlingmethods and different dwell times were significantly dif-ferent at a significance level of 0.01.As shown in Table 1, the hybrid BCI system with Ignorehas an average TPR = 11.1% and TNFPR = 2.0 FPs/min,when the dwell time is 0.0s. As the dwell time increasesto 0.5s, and finally to 1.0s, the TPR increases to 34.3% andthen to 62.8% (for the same TNFPR).When Reject is used, many EEG segments are rejectedand blocked by the system due to the presence of artefacts.The explanation is as follows. The EEG data recordedfrom seven participants during the last session containedan average of 88 ± 19 IC trials and 2595 ± 698 NC tri-als (IC trials = the number of attempted hand extensionexecuted; NC trials = the number of 1-second EEG seg-ments obtained outside the TP window, as defined ear-lier). Approximately 48.4 ± 38.8% of IC and 90.2 ± 11.4%of NC trials were contaminated with artefacts. Reject-ing these trials means that these data are discarded andnot presented as inputs to the system. Therefore, when-ever artefacts are detected, the availability of the BCIfor control is significantly reduced. This may lead togenerating many false negatives (i.e., missed true activa-tions) because many IC trials are blocked due to arte-facts. Hence, both the TPR and TNFPR values are smalland the results are not significantly different for variousdwell times.On the other hand, Remove allows the users to havemore control over the BCI system, as the system is oper-ational even in the presence of artefacts. Besides, thisapproach reduces the effects of artefacts and achieves abetter performance when compared to Ignore and Reject.This performance improvement is especially significant,when the value of Tdwell is small. For example, when dwelltime is 0.0s, the TPR achieved using ASWTD Garroteis 44.7% , which is more than 20% of those of Ignoreand Reject. As the dwell time increases, the performancedifference between the methods decreases. The reasonis that increasing the dwell time reduces the availabilityof the system to only those periods for which a selec-tion might happen. Thus, the system is put in the so-called ‘inactive’ mode more frequently and the effects ofartefacts on the system’s performance are significantlyreduced.ASWTD using different thresholding functions alsooutperforms SWT-SURE and other BSS algorithms.Among all the thresholding functions, the non-negativegarrote thresholding achieves the best performance, i.e.,TPR = 44.7% and TNFPR = 2.0 FPs/min. The TPRYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 16 of 20http://www.jneuroengrehab.com/content/9/1/50Table 2 Comparing the Performance of Ignore and ASWTD GarroteMethod (TPR:%, TNFPR:FPs/min)Tdwell = 0.00 Tdwell = 0.25 Tdwell = 0.50 Tdwell = 0.75 Tdwell = 1.00Ignore (11.1, 2.0) (11.7, 2.0) (24.3, 2.0) (48.0, 2.0) (62.8, 2.0)ASWTD Garrote (22.2, 2.0) (23.7, 2.0) (35.4, 2.0) (52.5, 2.0) (66.6, 2.0)Comparing the performance of the hybrid BCI system using Ignore and ASWTD Garrote when the classifier is trained using only clean EEG trials.increases steadily to 73.1% when the dwell time increasesto 1.0s.In Table 1, the performance of ASWTD is obtainedfrom the BCI classifier trained using both clean anddenoised EEG trials. We also investigate the performanceof ASWTD Garrote, when the BCI classifier is trainedusing only clean EEG trials (denoted by BCIclean). Theresults are presented in Table 2. Note that the TPR val-ues obtained in Table 2 are lower than those in Table 1because a smaller number of EEG trials are available totrain BCIclean due to artefact contamination. When Ignoreis used and the dwell time is 0.0s, TPR = 11.1% andTNFPR = 2.0 FPs/min are obtained. ASWTD Garrote,on the other hand, removes artefacts in contaminatedEEG trials and successfully improves the TPR values from11.1% to 22.2% (at the same TNFPR). The contributionto the improvement comes entirely from those EEG tri-als with artefacts, because the proposed algorithm doesnot operate on clean EEG trials (i.e., the performancefrom of both artefact handling methods remain the samewhen only clean EEG trials are evaluated). The resultsin Table 2 suggest that when artefacts are ignored, theartefacts results in a change in the quality of the EEGsignals and therefore affect the performance of BCIclean.ASWTD Garrote successfully minimizes the effects ofartefacts and improves the classifier’s performance. Whena larger number of trials are used in training the classi-fier (Table 1), ASWTD Garrote achieves even higher TPRvalues (at the same TNFPR).Inter-Trial Variability/Processing TimeWhen an artefact removal algorithm shows a large trial-by-trial variability in the amplitudes of the denoised sig-nals, this might suggest that the algorithm is not efficientin removing artefacts. Possible causes of such a largeinter-trial variability could be that:1. the algorithm does not completely remove artefactsor2. the algorithm sometimes removes the artefactsefficiently, but sometimes over-corrects the EEGsignals or does not completely remove the artefacts.Here, we quantify the inter-trial variability in the ampli-tudes of the denoised EEG signals (estimated usingvarious artefact removal algorithms) when applied to realEEG signals by finding the standard deviation of:1. the variance of each estimated denoised EEG signals(σvar)2. the difference between the maximum and minimumvalue of each denoised EEG signals (σmax−min)The results are presented in Table 3. Evidently, the σvarand σmax−min are large when the artefacts are ignoredbecause of the large differences between the amplitudesof clean and contaminated EEG signals. ASWTD, how-ever, has a significantly smaller σvar and σmax−min values.The BSS algorithms have larger σvar and σmax−min valuesbecause the denoised EEG signals estimated by these algo-rithms are less consistent. For example, in Figure 10(d),SOBI successfully removes the ocular artefacts, whereasin Figure 11(d), SOBI fails to completely remove themuscle artefacts. This results in a larger inter-trialvariability.Besides inter-trial variability, we also examine anotherperformance metric that needs to be taken into consid-eration for online implementation: the processing timerequired to run the artefact algorithms (see the lastcolumn of Table 3). In this study, all algorithms wererun in Matlab 2009b environment. For SWT, the RiceWavelet Toolbox from RICE University was used [55].The processor used was an 2.93 GHz Intel (R) Corei7 870. As shown in Table 3, all algorithms require nomore than 60 ms to process a 1-second EEG segmentwith 15 channels, indicating their suitability for onlineapplications.Table 3 Inter-Trial Variability and Processing TimeMethod σmax−min σvar Time (ms)Ignore 39.3 950.9 0SOBI 12.4 77.4 54ERICA 14.2 127.6 23AMUSE 12.5 82.0 12ASWTD Garrote 4.2 8.4 30Comparing the σvar and σmax−min values, and the processing time obtainedusing the different artefact handling methods.Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 17 of 20http://www.jneuroengrehab.com/content/9/1/50DiscussionThis paper proposes a fully automated algorithm toremove artefacts from EEG signals and subsequentlyimprove the performance of our hybrid BCI system.Specifically:1. we propose an adaptive thresholding method basedon SWT to remove various artefacts in EEG signals.It is shown that the proposed method (ASWTD)greatly improves the performance of the hybrid BCIsystem and reduces signal distortion and2. we investigate the effects of using differentthresholding functions in the performance ofASWTD.In the following subsections, more details about theabove claims are provided.Comparison of different artefact handling methodsWe have investigated and compared the performanceof our hybrid BCI system, when different artefacthandling methods are used to denoise the real EEGdata. The performance is evaluated using a pseudo-online testing paradigm, where all real EEG data (bothclean and contaminated) are included in the testing.Such testing provides us with a better understand-ing of the system’s performance in a real-world onlineapplication, where artefacts are present in the EEGsignals.We need to emphasize the importance of the systemhaving a low TNFPR. A low TNFPR ensures that the sys-tem does not cause too much frustration for users. This isbecause users are in an NC state for most of the time whenusing the system. Also, it is usually easier to deal witha missed IC command than with a false activation (i.e.,an FP). For example, in a text-writing application, a falsepositive results in selecting the wrong letter/word. Con-sequently, the user has to initiate additional commands tode-select the wrong letter/word and then select the cor-rect desired letter/word. On the other hand, in the case ofa missed IC, the user only has to issue the IC commandagain. Therefore, it is important to lower the TNFPR asmuch as possible.Table 1 and Table 2 show that artefacts can affectthe BCI system’s performance. If artefacts are ignored(Ignore), the system has a low TPR value, especially whenthe dwell time is small. The rejection of contaminatedEEG segments (Reject), on the other hand, reduces theamount of time for which the hybrid BCI system is avail-able for control. In addition, this approach rejects IC trialscontaminated with artefacts, which results in lower TPRvalues (Table 1). The drawbacks of Ignore and Reject sig-nify the need to minimize the effects of artefacts by apply-ing artefact removal algorithms. As shown in Table 1,Remove greatly improves the performance of the hybridBCI system.Our study demonstrated that the proposed artefactremoval algorithm ASWTD can improve the hybrid BCIsystem’s performance in two ways:1. ASWTD Garrote reduces the effects of artefacts andimproves the performance of the hybrid BCI system.This is when the BCI classifier is trained with cleanEEG trials only (see Table 2);2. ASWTD Garrote increases the number of clean EEGtrials available for training the BCI classifier. Both theclean and denoised EEG trials are used to train theclassifier. This further increases the detectionperformance of the hybrid BCI system (see Table 1).ASWTD also has another advantage: a smaller dwelltime can be used when the algorithm is incorporated intothe hybrid BCI system. Thus, the user does not have togaze at the target for too long to make a selection. Forexample, ASWTD Garrote achieves a TPR of 48.8% at aTNFPR of 2 FPs/min when the dwell time is 0.25s. Thisperformance is as good as the one achieved by Ignore butwhen the dwell time is 0.75s (TPR = 48.0%, TNFPR = 2FPs/min).Comparison of different artefact removal algorithmsOur results shows that ASWTDoutperforms SWT-SURE,SOBI, ERICA and AMUSE. More specifically, it achieves:1. lower MSE values and less spectral distortion whensemi-simulated EEG signals with ocular and muscleartefacts are used (see Figure 8);2. larger TPR values when real EEG signals are used(see Table 1); and3. smaller inter-trial variability in the amplitudes of thedenoised EEG signals when real EEG signals are used(see Table 3).As the proposed artefact removal algorithm introducesless distortion in EEG signals, false artefact detection (i.e.,the artefact detector falsely detects artefacts in a cleanEEG signal) may not pose too much of a problem. Anexample is shown in Figure 12, where a clean EEG segmentis processed using ASWTD Garrote, SWT-SURE, SOBI,ERICA and AMUSE. The denoised signal obtained usingASWTD has less distortion while the other algorithmsover-correct the EEG signal. Also, when semi-simulatedEEG signals are used (see Figure 8), ASWTD also achievessmaller MSE and PSDd values (which are closer to theideal values).SWT-SURE does not perform as well because the esti-mated thresholds often lead to the over-estimation of arte-facts and hence it removes some EEG features (PSDd <<1, for semi-simulated EEG signals). The other three BSSYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 18 of 20http://www.jneuroengrehab.com/content/9/1/500 0.5 1−20020a) Raw EEG signalAmplitude0 0.5 1−20020b) ASWTD−GarroteExample: Clean EEG 0 0.5 1−20020c) SWT−SUREAmplitudeTime/s 0 0.5 1−20020d) SOBI0 0.5 1−20020e) ERICAAmplitudeTime/s 0 0.5 1−20020f) AMUSETime/sFigure 12 Denoised EEG Signals Obtained Different ArtefactRemoval Algorithms (Without Artefacts). The real clean EEG signalis shown in a). The denoised EEG signals obtained using the differentartefact removal algorithms are shown in b) - f): b) ASWTD-Garrote; c)SWT-SURE; d) SOBI; e) ERICA; and f) AMUSE.algorithms also do not perform as well as ASWTD. Apossible reason is that BSS algorithms are not usuallyapplied to short EEG segments (i.e., 1 second). The lengthof data segment used in most artefact-removal studies isat least 3 seconds [22,24,26,45]. According to [45], if theamount of data used in a BSS algorithm is not sufficient,the decomposition results may not be robust. Hence, inthis study, the BSS algorithms are less effective in remov-ing artefacts and have a bigger inter-trial variability inthe estimated denoised EEG signals when compared toASWTD. The use of longer data segments can improvethe effectiveness of the BSS algorithms in removingartefacts.In terms of processing time (in the Matlab environ-ment), all algorithms require no more than 60 ms toprocess a 1-second segment collected from 15 EEG chan-nels. The proposed hybrid BCI system processes EEGsegments every 125 ms (i.e., 8 outputs are generated everysecond). Therefore, all signal processing algorithms haveto be executed within 125 ms. The artefact detection andFFT feature extraction algorithms take approximately 4ms and 3 ms, respectively, to process a 1-second EEG seg-ment with 15 channels. That means, when the proposedartefact detection and removal algorithm is incorporatedinto the BCI, the total processing time for all signalprocessing algorithms is less than 50 ms, which is suit-able for real-time processing. We expect these numbersto be significantly improved if the algorithm is imple-mented in C++ environment, which is more suitable forreal-time applications.Comparing different thresholding functionsOf the four thresholding functions investigated for ourproposed ASWTD, the non-negative garrote threshold-ing with the proposed adaptive thresholding procedureachieves the best performance (in terms of MSE, PSDd,and TPR values). This function is less sensitive to smallchanges in the data and has a smaller bias compared tohard and soft thresholding functions [41]. Hard thresh-olding does not perform as well (probably because it isdiscontinuous and the variance of the estimated denoisedsignal is larger than that achieved by other thresholdingfunctions). Besides, hard thresholding sets the values ofwavelet coefficients that are larger than their correspond-ing thresholds to zero. Hence, all the wavelet coefficientsthat correspond to artefacts are removed from the EEGsignals. It might also remove from the EEG signals somefeatures that are captured in these large coefficients. Thus,its PSDd values are slightly less than unity when appliedto semi-simulated EEG signals. Other thresholding func-tions, on the other hand, do not completely remove thoselarge wavelet coefficients that correspond to artefacts. Forexample, for non-negative garrote and soft thresholding,the wavelet coefficients that are larger than T are reducedby a certain amount depending on the coefficient values.This in turn preserves more features in the EEG signals.ConclusionsIn summary, we have demonstrated that the proposedartefact removal method ASWTD Garrote (SWT withthe non-negative garrote thresholding function and anadaptive thresholding mechanism) improves the TPR val-ues of the hybrid system (at the same TNFPR) and asmaller dwell time can be used. The proposed methodoutperforms other artefact handling methods and pro-vides the following advantages:• it does not require long data segments or a largenumber of EEG channels;• it allows real-time processing;• it does not require additional EOG/EMG channels todetect and remove artefacts;• it allows adaption to the characteristics of a givensignal, resulting in minimal distortion in EEG signalseven in the case of false artefact detection;• it can be applied to all artefact types; and• it is fully automated.In our future work, we will look into methods thatautomatically select the optimal wavelet function for theproposed algorithm. It is also of interest to extend theproposed algorithm (which is univariate) to a multivari-ate version and find out if and how it can improve theeffectiveness of the algorithm in denoising EEG signals.In addition, we will investigate algorithms to adaptivelyYong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 19 of 20http://www.jneuroengrehab.com/content/9/1/50update the classifier of the hybrid BCI system such thatthe TNFPR value remains low in online experiments.Finally, we will implement the proposed hybrid BCI sys-tem online and investigate the usability and performanceof the system during online studies.Competing interestsThe authors declare no competing interest.Author’s contributionsXY designed the hybrid BCI system, proposed the algorithm, carried out theexperiments, collected and analyzed the data. XY drafted the paper. MFassisted in the interpretation of the results and the evaluation of theperformance of the system. RKW and GEB supervised the development of thestudy. All authors reviewed and approved the final manuscript.AcknowledgementsThis work was supported by the Natural Science of Engineering ResearchCouncil of Canada (NSERC) and Qatar National Research Fund (QNRF) no.NPRP 09-310-1-058.Author details1Department of Electrical and Computer Engineering, University of BritishColumbia, 2356 Main Mall, Vancouver, V6T1Z4 Canada. 2Neil Squire Society,220 - 2250 Boundary Road, Burnaby, V5M3Z3 Canada.Received: 23 September 2011 Accepted: 3 July 2012Published: 27 July 2012References1. Donchin E, Spencer KM, Wijesinge R: The mental prosthesis: assessingthe speed of a P300-based brain computer interface. IEEE TransRehabil Eng 2000, 8(2):174–179.2. d R Millan J, Renkens F, Mourino J, Gerstner W: Brain-actuatedinteraction. Artif Intell 2004, 159:241–259.3. Scherer R, Mu¨ller GR, Neuper C, Graimann B, Pfurtscheller G: Anasynchronously controlled EEG-based virtual keyboard:improvement of the spelling rate. IEEE Trans Biomed Eng 2004,51(6):979–1307.4. Middendorf M, McMillan G, Calhoun G, Jones KS: Brain-computerinterfaces based on the steady-state visual evoked response. IEEETrans Rehabil Eng 2000, 8(2):211–214.5. Pfurtscheller G, Guger C, Mu¨ller G, Krausc G, Neuper C: Brain oscillationscontrol hand orthosis in a tetraplegic. Neurosci Lett 2000, 292:211–214.6. Mason SG, Birch GE: A brain-controlled switch for asynchronouscontrol applications. IEEE Trans Biomed Eng 2000, 47(10):1297–1307.7. Yong X, Fatourechi M, Ward RK, Birch GE: The design of apoint-and-click system by integrating a self-paced brain-computerinterface with an eye-tracker. IEEE JETCAS Special Issue on Brain MachineInterface 2011, 1(4):590–602.8. Jacob RJK: The use of eye movements in human-computerinteraction techniques: what you look at is what you get. ACM TransInf Syst (TOIS) 1991, 9(2):152–169.9. Fatourechi M, Bashashati A, Ward RK, Birch GE: EMG and EOG artifacts inbrain computer interface systems: a survey. Clin Neurophysiol 2006,118(3):480–494.10. Bashashati A, Nouredin B, Ward R, Lawrence P, Birch G: Effect ofeye-blinks on a self-paced brain interface design. Clin Neurophysiol2007, 118:1639–1647.11. Fatourechi M, Ward RK, Birch GE: Performance of a self-pacedbrain-computer interface on data contaminated witheye-movement artifacts and on data recorded in a subsequentsession. Comput Intelligence Neurosci 2008, 2008:13.12. Yong X, Fatourechi M, Ward RK, Birch GE: Automatic artefact detectionin a self-paced brain-computer interface system. In IEEE PACRIM.Victoria, Canada : IEEE; 2011:403–408.13. Pfurtscheller G, Allison BZ, Brunner C, Bauernfeind G, Solis-Escalante T,Scherer R, Zander TO, Muller-Putz G, Neuper C, Birbaumer N: The hybridBCI. Front Neurosci 2010, 2(3):1–11.14. Dynamic Keyboard|CanAssist. [http://www.canassist.ca/dynamic-keyboard].15. Bashashati A, Fatourechi M, Ward RK, Birch GE: User Customization ofthe Feature Generator of an Asynchronous Brain Interface. AnnBiomed Eng 2006, 34(6):1051–1060.16. Birch GE, Bozorgzadeh Z, Mason SG: Initial online evaluations of theLF-ASD brain-computer interface with able-bodied and spinal-cordsubjects using imagined voluntary motor potentials. IEEE Tran NeuralSyst Rehabil Eng 2002, 10(4):219–224.17. Beisteiner R, Hollinger P, Lindinger G, Lang W, Berthoz A:Mentalrepresentations of movements. Brain potentials associated withimagination of handmovements. Electroencephalography ClinNeurophysiology 1995, 96(2):183–193.18. Schlo¨gl A, Keinrath C, Zimmermann D, Scherer R, Leeb R, Pfurtscheller G:A fully automated correction method of EOG artifacts in EEGrecordings. Clin Neurophysiol 2007, 118:98–104.19. Moretti DV, Babiloni F, Carducci F, Cincotti F, Remondini E, Rossini PM,Salinari S, Babiloni C: Computerized processing of EEG-EOG-EMGartifacts for multicentric studies in EEG oscillations andevent-related potentials. Int J Psychophysiology 2003,47:199–216.20. Wallstrom GL, Kass RE, Miller A, Cohn JF, Fox NA: Automatic correctionof ocular artifacts in the EEG: a comparison of regression-based andcomponent-based methods. Int J Psychophysiology 2004,53:105–119.21. Gasser T, Schuller JC, Gasser US: Correction of muscle artefats in theEEG power spectrum. Clin Neurophysiol 2005, 116:2044–2050.22. Halder S, Bensch M, Mellinger J, Bogdan M, Kubler A, Birbaumer N,Rosenstiel W: Online artifact removal for brain-computer interfacesusing support vector machines and blind source separation. ComputInt Neurosci 2007, 2007:10.23. Ting KH, Fung PCW, Chang CQ, Chan FHY: Automatic correction ofartifact from single-trial event-related potentials by blind sourceseparation using second order statistics only.Med Eng Phys 2006,28:780–794.24. Joyce CA, Gorodnitsky IF, Kutas M: Automatic removal of eyemovement and blink artifacts from EEG data using blindcomponent separation. Psychophysiology 2004, 41(2):313–325.25. Crespo-Garcia M, Atienza M, Cantero J:Muscle artifact removal fromhuman sleep EEG by using independent component analysis. AnnBiomed Eng 2008, 36(3):467–475.26. Hung CI, Lee PL, Wu YT, Chen LF, Yeh TC: Recognition of motor imageryelectroencephalography using independent component analysisandmachine classifiers. Ann Biomed Eng 2005, 33(8):1053–1070.27. Jung TP, Humphries C, Lee TW, Makeig S, McKeownMJ, Iragui V, SejnowskiTJ: Extended ICA removes artifacts from electroencephalographicrecordings. Adv Neural Inf Process Syst 1998, 10:894–900.28. Iriarte J, Urrestarazu E, Valencia M, Alegre M, Malanda A, Veteri C, Artieda J:Independent component analysis as a tool to eliminate artifacts inEEG: a quantitative study. J Clin Neurophysiology 2003, 20(4):249–257.29. Delorme A, Makeig S: EEGLAB: an open source toolbox for analysis ofsingle-trial EEG dynamics including independent componentanalysis. J Neurosci Meth 2004, 134:9–21.30. Mallat S: AWavelet Tour of Signal Processing. 2 edition. USA: AcademicPress; 1998.31. Zikov T, Bibian S, Dumont GA, Huzmezan M, Ries CR: Awavelet basedde-noising technique for ocular artifact correction of theelectroencephalogram. In EMBS. Houston, USA: IEEE:2002.32. Ramanan SV, Kalpakam NV, Sahambi JS: A novel wavelet basedtechnique for detection and de-noising of ocular artifact in normaland epileptic electroencephalogram. In ICCCAS. Houston, USA:IEEE:2004.33. Krisnaveni V, Jayaraman S, Anitha L, Ramadoss K: Removal of ocularartifacts from EEG using adaptive thresholding of waveletcoefficients. J Neural Eng 2006, 3:338–346.34. Kumar PS, Arumuganathan R, Sivakumar K, Vimal C: Removal of OcularArtifacts in the EEG throughWavelet Transform without using anEOG Reference Channel. Int J Open Problems Compt Math 2008,1(3):13.35. L64 EEG/PSG Data Acquisition Amplifier System, Dr. SaguraMedizintechnik. [http://l64.sagura.royalmedicalsystems.com/].Yong et al. Journal of NeuroEngineering and Rehabilitation 2012, 9:50 Page 20 of 20http://www.jneuroengrehab.com/content/9/1/5036. Mirametrix Research, S1 Eye-tracker, 2010. [http://www.mirametrix.com/s1-eye-tracker.html].37. MacKenzie IS, Soukoreff RW: Phrase sets for evaluating text entrytechniques. In Ext. Abstracts on Human Factors in Computing Systems CHI2003. New York, USA: ACM Press; 2003:754–755.38. Bashashati A: Towards development of a 3-State Self-Paced BrainComputer Interface System. PhD in electrical and computerengineering,University of British Columbia, 2007.39. Delorme A, Sejnowski T, Makeig S: Enhanced detection of artifacts inEEG data using higher-order statistics and independent componentanalysis. NeuroImage 2007, 34:1443–1449.40. Coifman RR, Donoho DL: Translation-Invariant De-Noising. InNeuroImage. Berlin, Germany: Springer-Verlag; 1995:125–150.41. Gao HY:Wavelet shrinkage denoising using the non-negativegarrote. J Comput Graphical Stat 1998, 7(4):469–488.42. Atto AM, Pastor D, Mercier G:Wavelet shrinkage: unification of basicthresholding functions and thresholds. Signal, Image and Video Process2009, 5:11–28.43. Maronna RA, Martin RD, Yohai VJ: Robust Statistics: Theory andMethods. 1edition. England: Wiley; 2006.44. Donoho DL, Johnstone IM: Adapting to unknown smoothness viawavelet shrinkage. J Am Stat Assoc 1995, 90(432):1200–1224.45. Jung TP, Makieg S, Humphries C, Lee EW, Mcjeown MJ, Iragui V, SejnowskiT: Removing electroencephalographic artifacts by blind sourceseparation. Psychophysiology 2000, 37:163–178.46. Scho¨loegl A, Ziehe A, Mu¨ller KR: Automated ocular artifact removal:comparing regression and component-based methods. Available NatPrecedings 2009, 2009:24.47. Quiroga RQ, Garcia H: Single-trial event-related potentials withwavelet denoising. Clin Neurophysiol 2003, 114:376–390.48. Lachenbruch PA: Discriminent Analysis. New York: Hafner Press; 1975.49. Bashashati A, Ward RK, Birch GE: Towards development of a 3-StateSelf-Paced Brain-Computer Interface. Comput Intelligence Neurosci2007, 2007:8.50. Borisoff JF, Mason SG, Bashanti A, Birch GE: Brain-computer interfacedesign for asynchronous control applications: improvements to theLF-ASD asynchronous brain switch. IEEE Trans Biomed Eng 2004,51(6):985–992.51. ICALAB for Signal Processing. [\http://www.bsp.brain.riken.go.jp/ICALAB/ICALABSignalProc].52. Barbati G, Porcaro C, Zappasodi F, Rossini PM, Tecchio F: Optimization ofan independent component analysis approach for artifactidentification and removal in magnetoencephalographic signals.Clin Neurophysiol 2004, 115:1220–1232.53. Cichocki A, Amari SI: Adaptive Blind Signal and Image Processing: LearningAlgorithms and Applications. England: West Sussex; 2002.54. Ledolter J, Hogg RV: Applied Statistics for Engineers and Physical Scientists. 3edition. NJ: Pearson Prentice Hall; 2009.55. Rice Wavelet Toolbox | Rice DSP. [http://dsp.rice.edu/software/rice-wavelet-toolbox].doi:10.1186/1743-0003-9-50Cite this article as: Yong et al.: Automatic artefact removal in a self-pacedhybrid brain- computer interface system. Journal of NeuroEngineering andRehabilitation 2012 9:50.Submit your next manuscript to BioMed Centraland take full advantage of: • Convenient online submission• Thorough peer review• No space constraints or color figure charges• Immediate publication on acceptance• Inclusion in PubMed, CAS, Scopus and Google Scholar• Research which is freely available for redistributionSubmit your manuscript at www.biomedcentral.com/submit


Citation Scheme:


Citations by CSL (citeproc-js)

Usage Statistics



Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            async >
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:


Related Items