Artifact Rejection from EEG Signals – A Tutorial y

20
FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 1 Artifact Rejection from EEG Signals – A Tutorial Reyhaneh Aghayousefi and Mehdi Delrobaei School of Electrical and Computer Engineering, College of Engineering, K. N. Toosi University of Technology, Tehran, Iran. Abstract—Technologies using electroencephalographic (EEG) signals have been penetrated into public by the development of EEG systems. During EEG system opera- tion, recordings ought to be obtained under no restriction of movement for routine use in the real world. However, the lack of consideration of situational behavior constraints will cause technical/biological artifacts that often mixed with EEG signals and make the signal processing difficult in all respects by ingeniously disguising themselves as EEG components. EEG systems integrating gold stan- dard or specialized device in their processing strategies would appear as daily tools in the future if they are unperturbed to such obstructions. In this tutorial, we describe algorithms for artifact rejection in multi-/single- channel. In particular, some existing single-channel artifact rejection methods that will exhibit beneficial information to improve their performance in on-line EEG systems were summarized by focusing on the advantages and disadvantages of algorithms. Index Terms—Electroencephalographic (EEG) I. H ISTORY OF EEG R ICHARD Caton (1842–1926), a physician practicing in Liverpool, in 1875 presented his findings about electrical phenomena of the exposed cerebral hemispheres of rabbits and monkeys in the British Medical Journal. In 1890, Polish phys- iologist Adolf Beck published an investigation of spontaneous electrical activity of the brain of rabbits and dogs that included rhythmic oscillations altered by light. Beck started experiments on the electrical The material in this tutorial is based in part on Handbook of EEG Interpretation (2014) by William O. Tatum and my own research. For more information, please write to reyhane.yosefi[email protected] .c 2020 K. N. Toosi University of Technology. brain activity of animals. Beck placed electrodes directly on the surface of the brain to test for sensory stimulation. His observation of fluctuating brain activity led to the conclusion of brain waves [1]. In 1912, Ukrainian physiologist Vladimir Vladimirovich Pravdich-Neminsky published the first animal EEG and the evoked potential of the mammalian (dog). In 1914, Napoleon Cybulski and Jelenska-Macieszyna photographed EEG recordings of experimentally induced seizures [1], [2]. German physiologist and psychiatrist Hans Berger (1873–1941), Fig. 1, recorded the first hu- man EEG,Fig. 2, in 1924. Expanding on work previously conducted on animals by Richard Caton and others, Berger also invented the electroen- cephalogram (giving the device its name), an in- vention described ”as one of the most surprising, remarkable, and momentous developments in the history of clinical neurology”. His discoveries were first confirmed by British scientists Edgar Douglas Adrian and B.H.C. Matthews in 1934 and developed by them [1]. In 1934, Fisher and Lowenback first demonstrated epileptiform spikes. In 1935, Gibbs, Davis and Lennox described interictal spike waves and the three cycles/s pattern of clinical absence seizures, which began the field of clinical electroencephalog- raphy. Subsequently, in 1936 Gibbs and Jasper re- ported the interictal spike as the focal signature of epilepsy. The same year, the first EEG laboratory opened at Massachusetts General Hospital [3]. Franklin Offner (1911–1999), professor of bio- physics at Northwestern University developed a pro-

Transcript of Artifact Rejection from EEG Signals – A Tutorial y

Page 1: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 1

Artifact Rejection from EEG Signals – A Tutorial †

Reyhaneh Aghayousefi and Mehdi DelrobaeiSchool of Electrical and Computer Engineering, College of Engineering, K. N. Toosi

University of Technology, Tehran, Iran.

Abstract—Technologies using electroencephalographic(EEG) signals have been penetrated into public by thedevelopment of EEG systems. During EEG system opera-tion, recordings ought to be obtained under no restrictionof movement for routine use in the real world. However,the lack of consideration of situational behavior constraintswill cause technical/biological artifacts that often mixedwith EEG signals and make the signal processing difficultin all respects by ingeniously disguising themselves asEEG components. EEG systems integrating gold stan-dard or specialized device in their processing strategieswould appear as daily tools in the future if they areunperturbed to such obstructions. In this tutorial, wedescribe algorithms for artifact rejection in multi-/single-channel. In particular, some existing single-channel artifactrejection methods that will exhibit beneficial informationto improve their performance in on-line EEG systemswere summarized by focusing on the advantages anddisadvantages of algorithms.

Index Terms—Electroencephalographic (EEG)

I. HISTORY OF EEG

R ICHARD Caton (1842–1926), a physicianpracticing in Liverpool, in 1875 presented his

findings about electrical phenomena of the exposedcerebral hemispheres of rabbits and monkeys inthe British Medical Journal. In 1890, Polish phys-iologist Adolf Beck published an investigation ofspontaneous electrical activity of the brain of rabbitsand dogs that included rhythmic oscillations alteredby light. Beck started experiments on the electrical

† The material in this tutorial is based in part on Handbook of EEGInterpretation (2014) by William O. Tatum and my own research. Formore information, please write to [email protected]. c©2020K. N. Toosi University of Technology.

brain activity of animals. Beck placed electrodesdirectly on the surface of the brain to test forsensory stimulation. His observation of fluctuatingbrain activity led to the conclusion of brain waves[1].

In 1912, Ukrainian physiologist VladimirVladimirovich Pravdich-Neminsky published thefirst animal EEG and the evoked potential of themammalian (dog). In 1914, Napoleon Cybulski andJelenska-Macieszyna photographed EEG recordingsof experimentally induced seizures [1], [2].

German physiologist and psychiatrist HansBerger (1873–1941), Fig. 1, recorded the first hu-man EEG,Fig. 2, in 1924. Expanding on workpreviously conducted on animals by Richard Catonand others, Berger also invented the electroen-cephalogram (giving the device its name), an in-vention described ”as one of the most surprising,remarkable, and momentous developments in thehistory of clinical neurology”. His discoveries werefirst confirmed by British scientists Edgar DouglasAdrian and B.H.C. Matthews in 1934 and developedby them [1].

In 1934, Fisher and Lowenback first demonstratedepileptiform spikes. In 1935, Gibbs, Davis andLennox described interictal spike waves and thethree cycles/s pattern of clinical absence seizures,which began the field of clinical electroencephalog-raphy. Subsequently, in 1936 Gibbs and Jasper re-ported the interictal spike as the focal signature ofepilepsy. The same year, the first EEG laboratoryopened at Massachusetts General Hospital [3].

Franklin Offner (1911–1999), professor of bio-physics at Northwestern University developed a pro-

Page 2: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 2

Fig. 1: Hans Berger

totype of the EEG that incorporated a piezoelectricinkwriter called a Crystograph (the whole devicewas typically known as the Offner Dynograph).

In 1947, the American EEG Society was foundedand the first International EEG congress was held.In 1953 Aserinsky and Kleitman described REMsleep. In the 1950s, William Grey Walter developedan adjunct to EEG called EEG topography, whichallowed for the mapping of electrical activity acrossthe surface of the brain. This enjoyed a brief periodof popularity in the 1980s and seemed especiallypromising for psychiatry. It was never accepted byneurologists and remains primarily a research tool[4].

An electroencephalograph system manufacturedby Beckman Instruments was used on at least oneof the Project Gemini manned spaceflights (1965-1966) to monitor the brain waves of astronauts onthe flight. It was one of many Beckman Instrumentsspecialized for and used by NASA.

In 1988, report was given by Stevo Bozinovski,Mihail Sestakov, and Liljana Bozinovska on EEGcontrol of a physical object, a robot [5].

In October 2018, scientists connected the brainsof three people to experiment with the process ofthoughts sharing. Five groups of three people par-ticipated in the experiment using EEG. The successrate of the experiment was 81%.

II. WHAT IS EEG?Electroencephalography (EEG) is an electrophys-

iological monitoring method to record electricalactivity of the brain. It is typically noninvasive, withthe electrodes placed along the scalp, although inva-sive electrodes are sometimes used, as in electrocor-ticography. EEG measures voltage fluctuations re-

sulting from ionic current within the neurons of thebrain. Clinically, EEG refers to the recording of thebrain’s spontaneous electrical activity over a periodof time, as recorded from multiple electrodes placedon the scalp [6]. Diagnostic applications generallyfocus either on event-related potentials or on thespectral content of EEG. The former investigatespotential fluctuations time locked to an event, suchas ’stimulus onset’ or ’button press’. The latteranalyses the type of neural oscillations (popularlycalled ”brain waves”) that can be observed in EEGsignals in the frequency domain.

EEG is most often used to diagnose epilepsy,which causes abnormalities in EEG readings [7].It is also used to diagnose sleep disorders, depth ofanesthesia, coma, encephalopathies, and brain death.EEG used to be a first-line method of diagnosisfor tumors, stroke and other focal brain disorders,but this use has decreased with the advent of high-resolution anatomical imaging techniques such asmagnetic resonance imaging (MRI) and computedtomography (CT). Despite limited spatial resolution,EEG continues to be a valuable tool for researchand diagnosis. It is one of the few mobile techniquesavailable and offers millisecond-range temporal res-olution which is not possible with CT, PET or MRI.

Derivatives of the EEG technique include evokedpotentials (EP), which involves averaging the EEGactivity time-locked to the presentation of a stimulusof some sort (visual, somatosensory, or auditory).Event-related potentials (ERPs) refer to averagedEEG responses that are time-locked to more com-plex processing of stimuli; this technique is used incognitive science, cognitive psychology, and psy-chophysiological research.

A. Signal intensityEEG activity is quite small, measured in micro-

volts (mV).

B. Signal frequencyThe main frequencies,Fig. 3, of the human EEG

waves are:

1) Delta: Has a frequency of 3 Hz or below. Ittends to be the highest in amplitude and the slowestwaves. It is normal as the dominant rhythm ininfants up to one year and in stages 3 and 4 of sleep.It may occur focally with subcortical lesions and ingeneral distribution with diffuse lesions, metabolic

Page 3: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 3

Fig. 2: The first human EEG recording obtained by Hans Berger in 1924. The upper tracing is EEG, andthe lower is a 10 Hz timing signal.

encephalopathy hydrocephalus or deep midline le-sions. It is usually most prominent frontally in adults(e.g. FIRDA - Frontal Intermittent Rhythmic Delta)and posteriorly in children e.g. OIRDA - OccipitalIntermittent Rhythmic Delta) [8].

2) Theta: Has a frequency of 3.5 to 7.5 Hz andis classified as ”slow” activity. It is perfectly normalin children up to 13 years and in sleep but abnormalin awake adults. It can be seen as a manifestationof focal subcortical lesions; it can also be seen ingeneralized distribution in diffuse disorders suchas metabolic encephalopathy or some instances ofhydrocephalus [8].

3) Alpha: Has a frequency between 7.5 and 13Hz. Is usually best seen in the posterior regions ofthe head on each side, being higher in amplitudeon the dominant side. It appears when closing theeyes and relaxing, and disappears when openingthe eyes or alerting by any mechanism (thinking,calculating). It is the major rhythm seen in normalrelaxed adults. It is present during most of lifeespecially after the thirteenth year [8].

4) Beta: Beta activity is ”fast” activity. It has afrequency of 14 and greater Hz. It is usually seenon both sides in symmetrical distribution and ismost evident frontally. It is accentuated by sedative-hypnotic drugs especially the benzodiazepines andthe barbiturates. It may be absent or reduced inareas of cortical damage. It is generally regardedas a normal rhythm. It is the dominant rhythm inpatients who are alert or anxious or have their eyesopen [8].

III. SURVEY OF EEGAPPLICATIONS

A few primary applications of EEG recording andanalysis are brie?y mentioned below:

A. Epilepsy MonitoringThe most common clinical reason for getting

an EEG by a referring physician is to detect asuspected seizure disorder. The EEG can con?rmthe diagnosis of epilepsy and depending on theparticular pattern of seizure assist in the particularseizure type that is evident. Beyond the seizure,the EEG is also useful for assessing a variety ofother cerebral disorders. In disorders of alteredconsciousness and potential encephalopathies, theEEG can offer convincing evidence of the degreeof the disorder and indicate whether it is a lo-cal process with focal effects or something morewidespread. The prognosis can often be determinedfrom the EEG itself. EEG recording and analysis hasfound applications in basic research on origins andlocalization of seizure, testing epilepsy drug effects,and assisting in experimental cortical excision ofepileptic focus. An active area of intense researchis the area of seizure prediction with some importantmonitoring revisions having been made throughout[9].

B. Sleep StudiesThe EEG is sensitive to a range of states spanning

from different levels of vigilance states: stress state,alertness to resting state, hypnosis, and sleep. Thearea of sleep studies is one of the success storiesof EEG. Sleep staging is very clearly re?ected ina very reactive EEG. During normal state of wake-fulness with open eyes beta waves are dominant.In relaxation or drowsiness alpha activity rises andif sleep appears power of lower frequency bandsincreases. Sleep is generally divided into two broadtypes (1) nonrapid eye movement sleep (NREM)and (2) REM sleep. NREM and REM occur inalternating cycles. NREM is further divided intostage I, stage II, stage III, and stage IV. The lasttwo stages correspond to deeper sleep, where slowdelta waves show up in higher proportions. Withthese slower dominant frequencies, responsiveness

Page 4: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 4

Fig. 3: The main frequencies of the human EEG waves [8]

to stimuli decreases and so these are consideredindicative of deep sleep. Stage I sleep is typi?edby slowing, disintegration into varying or increasingirregularities. Thus, EEG monitoring ?nds extensiveuse to investigate sleep disorders and physiology[10].

C. Brain Computer InterfaceAs the EEG procedure is noninvasive and pain-

less, it is widely used to study the brain organizationof cognitive processes such as perception, memory,attention, language, and emotion in normal adultsand children. The Brain Computer Interface (BCI)is a communication system that recognizes a user’scommand only from his or her brainwaves andreacts according to them. For this purpose, theintervening computer algorithm or/and subject istrained. Simple tasks can consist of desired motionof a cursor or a pointer displayed on the screen onlythrough subject’s imaginary of the motion of his orher left or right hand. As a consequence of imagingprocess, certain characteristics of the brainwavesare altered and can be used for user’s commandrecognition, e.g., desynchronization of the motor-associated mu waves (brain waves of alpha rangefrequency associated with physical movements orintention to move), changes in beta or high gammabands, or presence or alteration of certain event-related potentials (ERPs) [11].

D. EEG BiofeedbackBiofeedback machines are devices for creation

of different mind states (e.g., relaxation, top per-formance) by practical manipulation of the brainwaves into desired frequency bands by repetitivevisual and audio stimuli. For making the trainingmore effective, biofeedback methods can be in-volved. Originally, changes in ?nger skin resistance

or temperature were monitored. EEG biofeedbackor neurofeedback uses EEG signals for feedbackinput. It is suggested that this learning proceduremay help a subject to modify his or her brainwaveactivity. One of the methods involved in neurofeed-back training is the so-called frequency-followingresponse. Changes in the functioning of the brainin desired way, e.g., increase in alpha activity, gen-erates appropriate visual, audio, or tactile response.Thus, a person can be aware of the right directionof the training [12].

There are numerous other applications of EEGrecording and analysis that range from basic scienceof brain organization, development and cognition toclinical science and applications to manage patientdisease states, drug and surgical treatments [9]:• Observe vigilance states including alertness,

coma, and brain death• Locate areas of brain damage following head

injury, stroke, tumor, etc.• Test afferent pathways (by evoked potentials)• Monitor cognitive engagement (alpha and

gamma rhythm)• Produce biofeedback situations, alpha, etc.• Monitor and potentially manage anesthesia

depth (e.g., the bispectral index for certainanesthetic agents such as propofol)

• Monitor human and animal brain development• Test drugs for convulsive effects• Monitor the neonatal electroencephalogram

(EEG)• Monitor psychophysiological variables

IV. VARIABLE USED IN THECLASSIFICATION OF EEG

ACTIVITYA. Frequency

Page 5: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 5

Frequency refers to rhythmic repetitive activity(in Hz). The frequency of EEG activity can havedifferent properties including:

1) Rhythmic: EEG activity consisting in wavesof approximately constant frequency.

2) Arrhythmic: EEG activity in which no sta-ble rhythms are present.

3) Dysrhythmic: Rhythms and/or patterns ofEEG activity that characteristically appear in patientgroups or rarely or seen in healthy subjects.

B. VoltageVoltage refers to the average voltage or peak

voltage of EEG activity. Values are dependent, inpart, on the recording technique. Descriptive termsassociated with EEG voltage include:

1) Attenuation : It is also refer as suppressionand depression, which demonstrates reduction ofamplitude of EEG activity resulting from decreasedvoltage. When activity is attenuated by stimulation,it is said to have been ”blocked” or to show ”block-ing”.

2) Hypersynchrony: It can be seen as an in-crease in voltage and regularity of rhythmic activity,or within the alpha, beta, or theta range. The termimplies an increase in the number of neural elementscontributing to the rhythm. (Note: term is used ininterpretative sense but as a descriptor of change inthe EEG).

3) Paroxysmal: Activity that emerges frombackground with a rapid onset, reaching (usually)quite high voltage and ending with an abrupt returnto lower voltage activity. Though the term does notdirectly imply abnormality, much abnormal activityis paroxysmal.

C. MorphologyMorphology refers to the shape of the waveform.

The shape of a wave or an EEG pattern is deter-mined by the frequencies that combine to makeup the waveform and by their phase and voltagerelationships. Wave patterns can be described asbeing:

1) Monomorphic: Distinct EEG activity ap-pearing to be composed of one dominant activity

2) Polymorphic: Distinct EEG activity com-posed of multiple frequencies that combine to forma complex waveform.

3) Sinusoidal: Waves resembling sine waves.Monomorphic activity usually is sinusoidal.

4) Transient: An isolated wave or pattern thatis distinctly different from background activity.• Spike: a transient with a pointed peak and a

duration from 20 to under 70 msec.• Sharp wave: a transient with a pointed peak

and duration of 70-200 msec.[3]

V. METHOD FOR RECORDINGTHE EEG

In conventional scalp EEG, the recording is ob-tained by placing electrodes on the scalp with aconductive gel or paste, usually after preparing thescalp area by light abrasion to reduce impedancedue to dead skin cells. Many systems typicallyuse electrodes, each of which is attached to anindividual wire. Some systems use caps, Fig. 4 ornets into which electrodes are embedded; this isparticularly common when high density arrays ofelectrodes are needed.

Fig. 4: EEG cap

Page 6: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 6

Electrode locations and names are specified bythe International 10-20 system for most clinical andresearch applications (except when high-density ar-rays are used). This system ensures that the namingof electrodes is consistent across laboratories. Inmost clinical applications, 19 recording electrodes(plus ground and system reference) are used. Asmaller number of electrodes are typically usedwhen recording EEG from neonates. Additionalelectrodes can be added to the standard set-up whena clinical or research application demands increasedspatial resolution for a particular area of the brain.High-density arrays (typically via cap or net) cancontain up to 256 electrodes more-or-less evenlyspaced around the scalp.

Each electrode is connected to one input ofa differential amplifier (one amplifier per pair ofelectrodes); a common system reference electrode isconnected to the other input of each differential am-plifier. These amplifiers amplify the voltage betweenthe active electrode and the reference (typically1,000–100,000 times, or 60-100 dB of voltage gain).In analog EEG, the signal is then filtered (nextparagraph), and the EEG signal is output as thedeflection of pens as paper passes underneath. MostEEG systems these days, however, are digital, andthe amplified signal is digitized via an analog-to-digital converter, after being passed through an anti-aliasing filter. Analog-to-digital sampling typicallyoccurs at 256–512 Hz in clinical scalp EEG; sam-pling rates of up to 20 kHz are used in someresearch applications.

During the recording, a series of activation pro-cedures may be used. These procedures may inducenormal or abnormal EEG activity that might not oth-erwise be seen. These procedures include hyperven-tilation, photic stimulation (with a strobe light), eyeclosure, mental activity, sleep and sleep deprivation.During (inpatient) epilepsy monitoring, a patient’stypical seizure medications may be withdrawn.

The digital EEG signal is stored electronicallyand can be filtered for display. Typical settings forthe high-pass filter and a low-pass filter are 0.5–1 Hzand 35–70 Hz respectively. The high-pass filter typi-cally filters out slow artifact, such as electrogalvanicsignals and movement artifact, whereas the low-pass filter filters out high-frequency artifacts, suchas electromyographic signals. An additional notchfilter is typically used to remove artifact caused byelectrical power lines (60 Hz in the United States

and 50 Hz in many other countries).

The EEG signals can be captured with opensourcehardware such as OpenBCI and the signal can beprocessed by freely available EEG software suchas EEGLAB or the Neurophysiological BiomarkerToolbox.

As part of an evaluation for epilepsy surgery, itmay be necessary to insert electrodes near the sur-face of the brain, under the surface of the dura mater.This is accomplished via burr hole or craniotomy.

This is referred to variously as ”electrocorticogra-phy (ECoG)”, ”intracranial EEG (I-EEG)” or ”sub-dural EEG (SD-EEG)”. Depth electrodes may alsobe placed into brain structures, such as the amyg-dala or hippocampus, structures, which are commonepileptic foci and may not be ”seen” clearly by scalpEEG. The electrocorticographic signal is processedin the same manner as digital scalp EEG (above),with a couple of caveats. ECoG is typically recordedat higher sampling rates than scalp EEG because ofthe requirements of Nyquist theorem, the subduralsignal is composed of a higher predominance ofhigher frequency components. Also, many of theartifacts that affect scalp EEG do not impact ECoG,and therefore display filtering is often not needed.

A typical adult human EEG signal is about 10 µVto 100 µV in amplitude when measured from thescalp.

For example, the components of a conventionalscalp EEG:

1) EEG Electrodes: Small metal discs usuallymade of stainless steel, tin, gold or silvercovered with a silver chloride coating (Fig. 5).They are placed on the scalp in special posi-tions. These positions are specified using theInternational 10/20 system. Each electrode siteis labeled with a letter and a number. Theletter refers to the area of brain underlying theelectrode e.g. F- Frontal lobe and T - Temporallobe. Even numbers denote the right side of thehead and odd numbers the left side of the head[8].

Page 7: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 7

Fig. 5: EEG cables showing the disc electrodes towhich electrode gel is appliedand applied to thesubject’s scalp.

2) Electrode Gel: It acts as a malleable extensionof the electrode, so that the movement ofthe electrodes cables is less likely to produceartifacts. The gel maximizes skin contact andallows for a low-resistance recording throughthe skin [8].

3) Impedance: A measure of the impediment tothe flow of alternating current, measured inohms at a given frequency. Larger numbersmean higher resistance to current flow. Thehigher the impedance of the electrode, thesmaller the amplitude of the EEG signal. InEEG studies, should be at lest 100 ohms orless and no more than 5 kohm.

4) Electrode Positioning (10/20 system): Thestandardized placement of scalp electrodes fora classical EEG recording has become commonsince the adoption of the 10/20 system Fig. 6.The essence of this system is the distancein percentages of the 10/20 range betweenNasion-Inion and fixed points. These pointsare marked as the Frontal pole (Fp), Central(C), Parietal (P), occipital (O), and Temporal(T). The midline electrodes are marked witha subscript z, which stands for zero. The oddnumbers are used as subscript for points overthe left hemisphere, and even numbers over theright.

VI. EEG MONTAGES

Since an EEG voltage signal represents a differ-ence between the voltages at two electrodes, the

display of the EEG for the reading encephalogra-pher may be set up in one of several ways. Therepresentation of the EEG channels is referred to asa montage [13] which can be divided into four mainparts.A. Sequential Montage

Each channel (i.e., waveform) represents the dif-ference between two adjacent electrodes. The entiremontage consists of a series of these channels.For example, the channel ”Fp1-F3” represents thedifference in voltage between the Fp1 electrode andthe F3 electrode. The next channel in the montage,”F3-C3”, represents the voltage difference betweenF3 and C3, and so on through the entire array ofelectrodes.B. Referential Montage

Each channel represents the difference betweena certain electrode and a designated reference elec-trode. There is no standard position for this refer-ence; it is, however, at a different position than the”recording” electrodes. Mid-line positions are oftenused because they do not amplify the signal in onehemisphere vs. the other, such as Cz, Oz, Pz etc. ason-line reference.C. Sequential Montage

The outputs of all of the amplifiers are summedand averaged, and this averaged signal is used asthe common reference for each channel.D. Laplacian Montage

Each channel represents the difference betweenan electrode and a weighted average of the sur-rounding electrodes [14].

VII. ARTIFACTArtifacts are defined as undesired signals that

may introduce changes in the measurements andaffect the signal of interest by Uriguen and Garcia-Zapirain (2015). EEG can be contaminated in fre-quency or time domain by artifacts that are resultedfrom internal sources of physiologic activities andmovement of the subject and/or external sources ofenvironmental interferences, equipment, movementof electrodes and cables [15]. Artifact types andsources are listed in the Tab. I.

Technical/biological artifacts, such as activepower line interference, eye blink, and muscle ac-tivity caused by recording mistake, good conduc-tivity of the scalp, and so on, are often mixed

Page 8: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 8

Fig. 6: 10/20 System of electrode placement

TABLE I: Artifact Types and Sources

Artifact Type SourceEye Blink Ocular Internal/PhysiologicalEye movement Ocular Internal/PhysiologicalREM Sleep Ocular Internal/PhysiologicalScalp Contractions Muscle Internal/PhysiologicalGlossokinetic Artifact Muscle Internal/PhysiologicalGlossokinetic Artifact Muscle Internal/PhysiologicalChewing Muscle Internal/PhysiologicalTalking Muscle Internal/PhysiologicalEKG Cardiac Internal/PhysiologicalSwallowing Muscle Internal/PhysiologicalRespiration Respiratory Internal/PhysiologicalGalvanic Skin Response Skin Internal/PhysiologicalSweating Skin Internal/PhysiologicalElectrode Movement Instrumental External/Extra-physiologicalElectrode Impedence Imbalance Instrumental External/Extra-physiologicalCable Movement Instrumental External/Extra-physiologicalElectromagnetic Coupling Electromagnetic External/Extra-physiologicalPowerline Electrical External/Extra-physiologicalHead Movement Movement External/Extra-physiologicalBody Movement Movement External/Extra-physiologicalLimbs Movement Movement External/Extra-physiological

with EEG signals whether the type of device isgold standard or specialized. They ingeniously dis-guise themselves as EEG components in observedEEG signals and cause a discrepancy between re-search motivation and system realization. Removingmimetic components (artifacts) or extracting intrin-sic EEG components from observed EEG signalswill become a more important process in all EEGsystems for practical use even if single electrodeis integrated with data acquisition module by aspecialized device.

Disclosing the meaning of electric signals com-prising various neuronal populations (sources)

breaks down the EEG inverse (blind source sepa-ration (BSS)) problem. It is well known that theenormous indeterminacies in brain make the BSSproblem ill-posed; however, statistical natures leadto restoring the well-posedness of the problem ina biosignal processing. By the properties, theoreti-cally multivariate statistical analysis approaches likeindependent component analysis (ICA) can separateobserved EEG signals into spatially and temporallydistinguishable components effectively, and then,estimated components will be identified as neu-ronal or artifactual sources by hard/soft thresholdto reconstruct artifact-free EEG matrix . Whereas

Page 9: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 9

there are several reviews on artifact rejection meth-ods including overall procedure (signal separation,component identification, and signal reconstruction)for multi-channel EEG signals , we have neverseen review of artifact rejection methods for single-channel EEG signals. In this tutorial, we thereforedescribe algorithms for artifact rejection in multi-/single-channel EEG signals.A. Technical Artifacts

Technical artifacts such as power line interfer-ence, impedance fluctuation, and wire movementsuperimpose their energy on observed EEG signalsbecause of faults in setting conditions . These canbe precluded from easy ways, detaching a chargingAC adapter from the recording device, carefullyattaching electrodes to the scalp, and using appro-priated electrode wires or adhesive tapes to stabilizewires shown in Fig. 7. The cross mark in the figureindicates detaching the source of technical artifactfrom the setting conditions [16].B. Biological artifacts

Biological artifacts, which are discharged poten-tials of internal organs, diffuse their energy overthe head and reach each electrode attaching onthe surface of the scalp as observed EEG signal.They contaminate observed signals due to the ironaccumulation in the brain and good conductivity ofthe scalp can be broadly separated into four cate-gories: (i) muscular, (ii) cardiac, (iii) eye movement,and (iv) eye blink. Fig. 9 shows common artifactsduring EEG recording. In Fig. 9a, an example ofeye movements artifacts is demonstrated. Also, inFig. 9b, Fig. 9c, and Fig. 9d an example of tonguemovements (chewing) artifacts, movement artifacts,and electrode artifacts is presented respectively.

EEG devices capture comprehensive electric fieldwhich was reached at an electrode even if thepotential contains information of electrophysiolog-ical actions except neuronal one (Fig. 8). Becauseall electrical potentials will be equally and blindlytreated, recording information including only EEGcomponents from electrodes placed on the scalp ishardly realized. Furthermore, frequency characteris-tics of biological artifacts and neuronal oscillationscould be overlapped.

That means that shunning contact with biologicalartifacts may seem hopelessly difficult comparedwith technical artifacts. If contaminated epochs arefound in visual or quantitative analysis, the EEG

system has to ignore them before deciding controlcommands. Otherwise, the operator will make afatal mistake in its system by counterfeit EEGpatterns.

Alternatively, signal processing techniques canextract EEG components from observed signals.Through this process, EEG systems would providecorrect outputs for their unique and beneficial inter-face. Even today, many works for detection, clas-sification, and removal of artifacts within observedEEG signals have been reported [17].

VIII. EXISTING METHODS ONARTIFACT REJECTION

In this section, the standard assumptions of ob-served cerebral signal for spatially and tempo-rally separating components are described beforeintroduction of artifact rejection methods to reachdeep understanding of the statistical framework.Then, methods of multi-/single-channel artifact re-jection (principal component analysis (PCA), in-dependent component analysis (ICA), regression,filtering, ICAbased signal decomposition, and non-negative matrix factorization) are presented. Eachalgorithm has specialized approaches for calculatingdemixing matrix, identifying separated components,and denoising the artifactual components to com-plete source separation. We have focused on theadvantages and disadvantages of approaches.

A. In Multi-Channel Signals

1) Standard Assumption of Sources:The first thing that all artifact rejection methodshave to do is calculating demixing matrix W underthe standard assumption of sources regardless ofthe target object. In EEG signal processing, theobserved cerebral signal x(n) is considered as thesum of the cerebral source (local-field) activity s(n)and the noise/artifact d(n). Neuronal cells havelimited their connection ability to short range order(less than 500 µm). Besides, synchrony in local-field activities diffuses through a contiguous corticalarea rather than jump between distant and weaklyconnected cortical areas.

Therefore, an assumption that cerebral sourcesand non-cerebral sources are linearly combined,allows the following formulation of the underlyingbiophysics of the signal generation and propagation

Page 10: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 10

Fig. 7: Ways of precluding technical artifacts [16]. (A) Power line interference. (B) Impedance fluctuation.(C) Wire movement.

Fig. 8: Configuration of an observed EEG signal including biological artifacts.

of the potential:

x(n) = As(n) + d(n) (1)

In Eq. 1, x(n) =[x1(n), x2(n), ..., xP (n)

]Tis the observed P-channel EEG data at the n-thpoint (superscript T means the transpose of a vectoror matrix); s(n) =

[s1(n), s2(n), ..., sQ(n)

]Tis the Q unknown source data, in which eachrow means cerebral or non-cerebral source; A isthe P × Q full-rank unknown mixing matrix; and

d(n) =[d1(n), d2(n), ..., dP (n)

]T is the Padditive zero-mean noise data. In real scenarios,there are likely to be more sources than observations(Q > P ); however, handing the number of sourcesthe same as the number of observations (Q = P )does not normally become a fatal problem. Thus,most algorithms extract a linear combination ofsources belonging to the same subspace [18].

All algorithms have a common disadvantage thatthey can only handle over-determined mixture forthe inverse process while having no priori informa-

Page 11: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 11

(a) Rapid eye movements generate small spike-like dischargesin the frontopolar derivations. (b) Chewing artifact.

(c) Movement artifact mimicking a partial seizure dischargeat the P3 electrode.

(d) Electrode ”pop” artifact at P7 simulates rhythmic seizureactivity.

Fig. 9: Common Artifacts During EEG Recording: Fig. 9a shows an example of eye movements artifacts,Fig. 9b shows an example of tongue movements (chewing) artifacts, Fig. 9c shows an example ofmovement artifacts, and Fig. 9d shows an example of electrode artifacts.

tion on the characteristics of the sources. Additionalthree assumptions are reluctantly accepted:

i. The noise/artifact is spatially uncorrelated withthe observed data E

[As(n)d(n)T

]= 0, where

E[.] is the expectation operator), and tempo-rally uncorrelated E

[d(n)d(n+ τ)T

]= 0,

where τ is lag time and ∀τ > 0);ii. The number of sources is equal to or less than

the number of observations (Q ≤ P )iii. The mixing matrix A is stationary.

2) Blind Source Separation Algorithms:Under aforementioned assumptions, BSS ap-proaches estimate sources

_

S =[_s(1), ...,

_

s(N)]

from observed EEG data X =[x(1), ..., x(N)

].

methods such as PCA and ICA jointly estimatedemixing matrix W (= A−1):

_

S(n) = Wx(n) (2)

Each unsupervised learning method has an algo-rithm that is subject to various indices: uncorrelated-ness, independence, non-Gaussianity, instantaneouspropagation, and linearity. Linear mixture concept

Page 12: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 12

of blind EEG source separation is shown in Fig. 10that presents a demixing matrix W (= W1W2) astwo-step estimator because some methods firstlydecorrelate an observed matrix by W1 and thendemix it by W2.

Given a mixing matrix is composed of the threeblind cerebral sources s(n) and provides the samenumber of observations x(n) in the Fig. 10.

PCA converts the observed matrix of possiblycorrelated variables into values of linearly uncorre-lated variables (principal components (PCs)) withthe first-and second-order statics. This algorithmconducts the eigenvalue decomposition to get thedirections u of greater variance in the input spaceof the EEG data X based on assumptions that dataare jointly normally distribution, and the sourcesare uncorrelated. In order to satisfy the assump-tions, obtained matrix Xold should be standard-ized to decorrelate samples of the same dimension(E[x(n)x(n + τ)T ] = 0) and to uniform unit(V [Xp] = 1).

In PCA algorithm, the first PC, which has thelargest variance in the standardized input space, isa linear combination of X defined by weights u1 =[u1, · · · , uP ]T :

PCl = XTul (3)

V [PCl] = V[XTul

]= uTl

∑ul (4)

where∑(

= XXT/(N − 1))

is covariance ma-trix of X. Therefore, this algorithm formulates thegiven problem in an optimization problem:

maxuTl∑

ulsubject to uT

l ul=1

(5)

It can be solved by Lagrange multiplier method:

L (ul, λl) = uTl∑

ul + λl(1− uTl ul

)(6)

∂L (ul, λ1)

∂ul= 2

∑ul − 2λlul = 0 (7)

uTl∑

ul =λluTl ul = λl (8)

The covariance matrix Σ is sequentially decom-posed into eigenvector up and eigenvalue λp by anassumption that the PCs are orthogonal. The eigen-vector up is similar to the column of the inversedemixing matrix W−1. PCA-based methods have an

advantage over stationary data; however, satisfyingtheir assumption for EEG data is difficult. On theother hand, PCA algorithm is often incorporatedinto a first decorrelation or whitening step of someICA algorithms.

ICA is the most famous and prevalent unsu-pervised learning algorithm to decompose multi-channel EEG data X into independent components(ICs)

_

S with highorder (spatial) moments, beyondthe second-order statics used in PCA, whereas somealgorithms use the statics as well as PCA. A state-of-the-art topical review published on 2015 reportedthat second order blind interference (SOBI) andinformation maximization (InfoMax) are the mostcommonly used algorithm for EEG signal process-ing. In this tutorial, we describe InfoMax algorithm.

The fundamental problem tackled by InfoMaxICA is how to minimize the mutual information(MI) of the output vector

_

s:

MI(_

s) =P∑

p=1

H(_

sp)−H(_

s) (9)

Probability density functions of observed signalp(x) and estimated signal p(

_

s) have following re-lationship:

p(_

s)d_

s = p(x)dx (10)

d_

s = J(x)dx = |W |dx (11)

p(_

s) = p(x)dx = p(W−1_s)|W |−1 (12)

Where J(x) is Jacobian matrix. The estimatingentropy H(

_

s) is given by:

H(_

s) = −∫p(

_

s) log p(_

s)d_

s (13)

= −∫

(log p(x)− log |W |) p(x)dx (14)

= −∫p(x) log p(x)dx+ log |W | (15)

= H(x) + log |W | (16)

Therefore, the MI can be rewritten as following:

MI(_

s) =P∑

p=1

H(_

sp)−H(x)− log |W | (17)

Page 13: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 13

Fig. 10: Linear mixture concept of blind EEG source separation.

By partially differentiating this index on param-eters W , optimized solution for source separationwill be obtained.

∂MI(_

s)

∂W=

p∑p=1

∂(−∫p(

_

s) log p(_

sp)d_

s)

∂W−(W T

)−1(18)

= −E[ϕ(

_

s)xT]−(W T

)−1(19)

where

ϕ(_

sp) =d log p(

_

sp)

d_

sp(20)

As analytical computation of equation as men-tioned above is difficult, this algorithm ( [19]) usesa gradient update rule based on the natural gradientand learning rate η that is a positive constant:

W ← W + η∆W (21)

∆W =(E[ϕ(

_

s)xT]

+ (W T )−1)W TW (22)

=(E[ϕ(

_

s)_

sT

+ I])W (23)

3) Component Identification AfterSource Separation: After source separation,estimated sources

_

S have to be continuouslyidentified as neuronal or artifactual sources toreconstruct artifact-free EEG matrix

_

X . Visualinspection of scalp topography and empiricaljudgment was given the credit for identificationof components. The overused techniques are stillexamined in an expedient manner for checkingthe results. That leads to increase in workload;therefore, hard/soft-threshold function, probabilityapproach, and machine learning algorithm withfeatures of the prepared material have been usedfor automatically identifying artifacts in estimatedsources to reduce the workload and to get morerepeatable labels . Proposing automatic andunsupervised component identification algorithmto characterize more precisely and flexibly hasstill been an active research area. Once estimatedsources are identified, they advance to next stepcalled denoising step, and then an underlying EEGmatrix will be reconstructed using inverse lineardemixing process (Fig. 11).

B. In Single-Channel Signals

1) Discrepancy Among StandardAssumptions About Multi/Single-channel

Page 14: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 14

Fig. 11: Block diagram of the blind source separation.

Data: We can easily imagine that single channeldata do not always satisfy the assumptions forBSS techniques. Calculating demixing matrix Wis especially difficult with single-channel artifactrejection methods (Fig. 12), so that researchers areforced to select whether to add information by usingthe reference channel before applying a method orto separate data by using only one-channel.

2) Regression: Regression algorithm wasmost frequently used to remove artifact up to themid-1990s . In this algorithm, an observed EEGsignal x(n) can be expressed as Eq. 24.

x(n) = xEEG(n) + xArt(n) + d(n) (24)

where xEEG(n), xArt(n), and d(n) are intrinsicEEG data, artifact, and noise. It is assumed that theexpected value of d(n) is 0.

The artifact would be corrected by calculatingpropagation factors to estimate the relationship be-tween the reference signal xRef (n) and the observedEEG signal and subtracting the regressed portion.The rationale of the procedure is as follows:

1) Step 1: Separately average over observed EEGand reference signals of T trials to estimatethe artifact waveform related variation for thechannels:

x(n) =1

T

T∑t=1

xt(n) (25)

2) Step 2: Subtract the averages from every trialdata to obtain deviations:

x′(n) = x(n)− x(n) (26)

where x(n) is duplicated T × 1 matrix of theobserved EEG average.

3) Step 3: Calculate the propagation factor C bylinear least-square regression whereby the ob-served EEG data are considered as a dependentvariable and the reference data are consideredas the independent variable:

X = C(XRef ) (27)

where

X =[x′(1), ..., x′(t), ..., x′(T )

]T(28)

x′(t) =[x′ (1 +N(t− 1)) , ..., x′ (tN)

](29)

4) Step 4: Correct the observed EEG data bysubtracting the reference data scaled by thepropagation factor C:

_

x(n) = x(n)− C (xRe f (n)) (30)

Because averaging operator emphasizes a time-locked activity in observed EEG signals, thismethod requires a reference channel and is powerfulonly if the operating system treats event-relatedbrain potentials. Cerebral activities are usually nottimelocked that means that important nontimelocked

components will be lost by the averaging op-eration. Furthermore, this method does not takebidirectional contamination into account and cancelsthe cerebral information from each observed EEG

Page 15: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 15

Fig. 12: Procedure of signal separation in single-channel artifact rejection methods.

signal upon linear subtraction. Despite its disadvan-tages, regression is still used as the ”gold standard”method to which the performance of any artifactrejection algorithms may be compared [20].

3) Filtering: Band-pass is one of the classicaland simple separation attempts to remove artifactsfrom an observed EEG signal. This method iseffective if the spectral distributions of the EEGcomponent and artifact do not overlap, and there aresmall band artifacts such as power line noise (50/60Hz interference). However, fixed-gain filtering is noteffective for biological artifacts because it will at-tenuate EEG component and change both amplitudeand phase of signal if the filtering keeps doingthat. Some adaptive algorithms try to adapt thefilter parameters w to minimize the error betweenthe artifact-free EEG signal

_

x (n) and the desiredoriginal signal x(n) to suppress the limitations ofthis method.

Adaptive filtering assumes that the intrinsic EEGsignal and artifact are uncorrelated; therefore, theartifact is considered to be an additive noise withinthe observed signal:

xt (n) = st (n) + n0t (n) (31)

In Eq. 31, xt(n) is the observed EEG signal of t-thtrial, n0(0) is the additive noise to offset and is un-correlated with intrinsic EEG signal st(n). The filter

parameters w are iteratively adjusted by a feedback(recursive) process designed to make the output asclose as possible to some desired response with anadditive noise interference. Fig. 13 shows the noisecanceller system using adaptive filtering. In thissystem, the primary input xt(n) and the referenceinput xRe ft (n) are the observed EEG and referencesignals. A reference input xRe ft (n) = n1t (n) whichis a noise correlated with n0t(n) and uncorrelatedwith intrinsic EEG signal st(n), adds informationto minimize the error et(n) between the responseyt(n) and the desired response.

Recursive least squares (RLS)-based adaptive fil-tering presents a superior performance than leastmean squares-based one. The algorithm can beimplemented using the following equations:

g(n) =R (n− 1)xRe f (n)

λ+ xRe fT (n)R(n− 1)xRe f (n)

(32)

e(n) = x(n)− y(n) (33)y(n) = w(n)xRe f (n) (34)

R(n) =R(n− 1)− g(n)xRe f

T (n)R(n− 1)

λ(35)

w(n) = w(n− 1) + g(n)e(n)labeleq5 (36)

where g(n) and w(n) are the gain vector andthe filtering parameters. The initial value of cross-correlation R(0) is δI , where δ and I are some

Page 16: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 16

Fig. 13: Procedure of separation method using ICA-based signal decomposition.

sufficiently large positive value and identity matrix.The updated filter parameters lead to output artifact-free EEG signal.

Consequently, adaptive filtering approach has apotential to recover ”pure” EEG signal more rapidlyand accurately than linear regression for ocular andcardiac artifacts. However, it is rather difficult toconverge to the solution of filtering parameters ifmuscular and vibration artifacts have contaminatedin the observed EEG signal. In that situation, thealgorithm sometimes does not converge because oftheir convulsive burst.

Optimal filtering like Kalman filtering can capturenon-stationary properties of artifacts. The frame-work has flexibility for non-linear system dueto approximating the probability density functionthat might lead to more effective artifact rejectionmethod. Many works on filtering algorithms havedeveloped this approach for more useful module inreal-time applications [21].

4) ICA-Based Signal Decomposition:Independent Component Analysis(ICA) will achievean artifact rejection with an outstanding perfor-

mance if the number of independent sources isequal to or lower than observations. Unfortunately,this method is only applicable to multi-channeldata; however, some works extended the idea tosingle-channel data to unmix a set of observedsignals (components) into intrinsic sources. Thesemethods decompose a single-channel into multiplecomponents by dividing into a sequence of blocksor different spectral modes before applying ICAso that we call these methods ICA-based signaldecomposition approaches (Fig. 14).

Single-channel ICA is the oldest method forsingle-channel data under an assumption that sta-tionary sources are being disjoint in the frequencydomain. An observed signal x(n) is split up into Kshort segments X, a sequence of contiguous blocksof length L which is to be handled as a set ofobservations.

X =[x (1) , ..., x (k) , ...,x (K)

]T (37)

x (k) =[x (L (k − 1) + 1) , ..., x (kL)

]T (38)

Page 17: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 17

Fig. 14: Procedure of separation method using ICA-based signal decomposition.

In Eq. 38 k is the block index. A standard ICAalgorithm than performs to the matrix X to derivethe demining matrix W. The artifacts overlap withEEG components and EEG signal has non-periodiccomponents; therefore, this method can be appliedwithin limited situations. Wavelet transform (WT)-based and empirical mode decomposition (EMD)-based ICA have already been reported successful inremoving artifacts for solving the similar problemthan single-channel ICA.

WT-based ICA transforms an observed signal intocomponents of disjoint spectra (a matrix) instead ofsignal (a vector) via discrete WT.

W (a, b) =1√a

∫x (n)ψa,b (n) dn (39)

ψa,b = ψ

(n− ba

)(40)

In Eq. 39, W (a, b) and ψa,b denote that thewavelet representation of x(n) and the motherwavelet with a and b defining the time-scale andlocation. The decision of parameters is hard if theuser does not have a priori knowledge of the signalof interest. Each IC using wavelet coefficients is, re-spectively, identified as either neuronal or artifactualby manually.

The artifactual ICs are replaced their values witharrays of zeros and then reconstructed to waveletcomponents. Finally, artifact-free signal is acquiredby inverse discrete WT.

EMD-based ICA decomposes an observed signalinto a number of K intrinsic mode functions (IMFs)hk(n).

x (n) =K∑k=1

hk (n) + d (n) (41)

In Eq. 41, d(n) is a residue of the original dataand a nonzero mean slowly varying function withonly a few or no extreme. This method can removeartifacts without a priori knowledge regarding char-acteristics of the signal embedded in the data. EachIMF has mono component of the original data andis estimated by an iterative process called ”shiftingprocess”:

Algorithm 1 Shifting Process Algorithm• Step 1: Find the local maxima and minima inxk(n).

• Step 2: Connect all of the local maxima andminima by cubic splines to form an upper anda lower envelope.

• Step 3: Calculate the mean of the two en-velopes, respectively.

• Step 4: Obtain improved IMF hk+1(n) bysubtracting the mean of the two envelopes fromthe current IMF hk(n)

• Step 5: Go to Step 1 until the residue is belowa stopping criterion.

This decomposition is based on the three condi-tions:

Page 18: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 18

i. the number of extreme and the number of zero-crossing must be equal or up to plus/minus one

ii. zero meaniii. all the maxima and all the minima of IMF will

be positive and negative everywhere.

Each IC using IMFs is, respectively, identifiedas either neuronal or artifactual by manually aswell as WT-based ICA. The artifactual ICs arereplaced their values with arrays of zeros. Finally,reconstructed IMFs are summed simply together toacquire artifact-free signal.

WT-based and EMG-based ICA have been re-ported as superb methods for artifact rejection.Therefore, a certain number of researchers tends toselect them over recent years. However, separatingintrinsic EEG components and artifacts are notsuccessfully completed by this approach becausefrequency characteristics of biological artifacts andEEG components could be overlapped. In addition,a presence of similar oscillations in different modesor a presence of disparate amplitude oscillationsin the same mode, named ”mode mixing” makesthe performance of artifact rejection worse. Signaldistortion or attenuation typically occurs accordingto the above-mentioned methods by excessive inter-ference. Thus, these approaches are not suitable forreal-time applications [22].

5) Nonnegative Matrix Factoriza-tion(NMF): In linear regression, filtering, andICA-based signal decomposition approaches,parameters W cannot often converge to a solutionfor perfectly demixing the mixtures. This impliesthat partially restricting the active space should bedetermined for single-channel signals.

Meanwhile, non-negative matrix factorization(NMF) has recently attracted attention as effectivealgorithms to remove artifacts from single-channelsignals because it can find the latent features un-derlying the interactions between EEG componentsand artifacts. An M-dimensional non-negative datavector xn is placed in the column of M ×N matrixX, where N is number of data vectors. The matrixX is based on short-time Fourier transform andapproximately factorized into an M×K nonnegativematrix H and a K×N nonnegative matrix W whereK is the number of ”basis” which is optimized forlinear approximation of the input vectors. It can be

represented by the following equation:

xn ≈ yn =K∑k=1

hkwk,n (42)

where an hk and a wk,n denote an entry of H andW. This equation means that respective non-negativeEEG feature (power spectrum or amplitude spec-trum) vector is approximated by linear combinationof the basis vector hk weighted by the componentof wk,n. Therefore, it can be rewritten as

X ≈ HW (43)

Some works reported that the supervised NMFcould effectively factorize the observed EEG signalsinto the brain activity components and the artifactsif the user has artifact data in advance. Beforeapplying supervised learning, template matrix XArt

has been factorized into HArt and WArt. The ma-trix X is continuously factorized into H and Wwhere H contains the elements of matrix HArt.The matrix HArt has no relation to the elementsof H while using standard NMF algorithm becausethe initial values are set randomly and updated bymultiplicative rules. In supervised learning algo-rithm, the matrix HArt is used as a fixed value thatwill partially restrict the active space. By contrast,activity components in the matrix WArt are variablevalues. For this constraint, the matrix H can attemptto express EEG components in the matrix X withthe remaining based K

′ . EEG components will bestored in the bases (Fig. 15).

After these processing, non-negative data ofartifact-free EEG are reconstructed from the follow-ing equation:

_

X = X ∗K∑

k=KArt+1

N∑n=1

HkWk,n

HW(44)

Eq. 44 and inverse Fourier transform make itpossible to acquire artifact-free signal. SupervisedNMF is still in its infancy, showed high performancefor artifact rejection. However, epoch detention step,which is not part of normal procedures in artifactrejection, must be embedded in the epoch-basedmethod. This leads to increase the computationalcost inevitably. Some low-cost (real-time) artifactdetection algorithms for single-channel EEG signalare a silver lining in a dark cloud [23].

Page 19: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 19

Fig. 15: Procedure of supervised NMF.

IX. SUMMARY

By the properties of artifacts, theoretically multi-variate statistical analysis approaches such as PCAand ICA, which separate multi-channel EEG signalsinto spatially and temporally distinguishable com-ponents, are useful for extracting EEG componentsfrom the scalp recordings. In particular, ICA is apowerful tool for separating observed EEG signalsinto maximally independent activity patterns derivedfrom cerebral or non-cerebral (artifactual) sources.However, ICA is unsuitable for analyzing EEG sig-nals recorded by specialized EEG device because ofmismatching of its assumption in the single (or few)channel case. Thus, proposing a removal method ofartifact from single-channel EEG signals is currentlya major challenge in EEG signal processing forthe widespread use of systems as a conventionaltechnology.

In this tutorial, we tried to summarize someexisting artifact rejection algorithms (PCA, ICA, re-gression, filtering, ICA-based signal decomposition,and NMF) focusing on the advantages and disadvan-tages of algorithms, which would provide beneficialinformation to improve their performance in onlineEEG systems. Last but not least, muscular artifactsreflecting body actions are natural enemies of EEGsystems. The inevitable encounter must be solvedby artifact rejection techniques. During real-timeEEG system operation using specialized devices,unsupervised learning algorithms cannot separateobserved signal into EEG and EMG componentsso far. Neuroscientists and neuro-engineers should

carefully analyze the characteristics of artifacts andintegrate them in a supervised learning algorithmfor effective rejection of artifacts or extraction ofintrinsic EEG components from observed EEG sig-nals without altering the underlying brain activity toroutinely use EEG systems in the future.

REFERENCES

[1] L. F. Haas, Hans berger (1873–1941), richard caton (1842–1926), and electroencephalography, Journal of Neurology, Neu-rosurgery & Psychiatry 74 (1) (2003) 9–9.

[2] K. Karbowski, Electroencephalography and epileptology in the20th century, Praxis 84 (49) (1995) 1465–1473.

[3] M. Fischer, H., and lowenbach, h.(1934a), Arch. exp. Path 174357.

[4] E. Aserinsky, N. Kleitman, et al., Regularly occurring periods ofeye motility, and concomitant phenomena, during sleep, Science118 (3062) (1953) 273–274.

[5] S. Bozinovski, M. Sestakov, L. Bozinovska, Using eeg alpharhythm to control a mobile robot, in: Proceedings of the AnnualInternational Conference of the IEEE Engineering in Medicineand Biology Society, IEEE, 1988, pp. 1515–1516.

[6] E. Niedermeyer, F. L. da Silva, Electroencephalography: basicprinciples, clinical applications, and related fields, LippincottWilliams & Wilkins, 2005.

[7] W. O. Tatum IV, Handbook of EEG interpretation, DemosMedical Publishing, 2014.

[8] Weblink:, Click here to view the refence page.[9] N. V. Thakor, D. L. Sherman, Eeg signal processing: Theory

and applications, in: Neural Engineering, Springer, 2013, pp.259–303.

[10] B. T. Jap, S. Lal, P. Fischer, E. Bekiaris, Using eeg spectralcomponents to assess algorithms for detecting fatigue, ExpertSystems with Applications 36 (2) (2009) 2352–2359.

[11] F. Lotte, M. Congedo, A. Lecuyer, F. Lamarche, B. Arnaldi,A review of classification algorithms for eeg-based brain–computer interfaces, Journal of neural engineering 4 (2) (2007)R1.

[12] Y. Nagai, Biofeedback and epilepsy, Current neurology andneuroscience reports 11 (4) (2011) 443–450.

Page 20: Artifact Rejection from EEG Signals – A Tutorial y

FINAL PROJECT OF BIOMECHATRONICS COURSE BY REYHANEH AGHAYOUSEFI 20

[13] R. P. Lesser, Guideline seven: a proposal for standard montagesto be used in clinical eeg, Journal of Clinical Neurophysiology3 (3 SUPPL. 1) (1986) 26–33.

[14] P. L. Nunez, K. L. Pilgreen, The spline-laplacian in clinicalneurophysiology: a method to improve eeg spatial resolution.,Journal of clinical neurophysiology: official publication of theAmerican Electroencephalographic Society 8 (4) (1991) 397–413.

[15] I. Kaya, A brief summary of eeg artifact handling, arXivpreprint arXiv:2001.00693.

[16] K. S., An accurate removal of eyeblink artifact from single-channel electroencephalogram by supervised tensor factoriza-tion (), Ph.D. thesis, Keio University (2016).

[17] M. Fatourechi, A. Bashashati, R. K. Ward, G. E. Birch, Emgand eog artifacts in brain computer interface systems: A survey,Clinical neurophysiology 118 (3) (2007) 480–494.

[18] C. M. Michel, M. M. Murray, G. Lantz, S. Gonzalez,L. Spinelli, R. G. de Peralta, Eeg source imaging, Clinicalneurophysiology 115 (10) (2004) 2195–2222.

[19] R. N. Vigario, Extraction of ocular artefacts from eeg usingindependent component analysis, Electroencephalography andclinical neurophysiology 103 (3) (1997) 395–404.

[20] G. Gratton, M. G. Coles, E. Donchin, A new method for off-lineremoval of ocular artifact, Electroencephalography and clinicalneurophysiology 55 (4) (1983) 468–484.

[21] F. Abd Rahman, M. F. Othman, N. A. Shaharuddin, A reviewon the current state of artifact removal methods for electroen-cephalogram signals, in: 2015 10th Asian Control Conference(ASCC), IEEE, 2015, pp. 1–6.

[22] S.-D. Wu, J.-C. Chiou, E. Goldman, Solution for mode mixingphenomenon of the empirical mode decomposition, in: 20103rd International Conference on Advanced Computer Theoryand Engineering (ICACTE), Vol. 2, IEEE, 2010, pp. V2–500.

[23] W.-D. Chang, H.-S. Cha, K. Kim, C.-H. Im, Detection of eyeblink artifacts from single prefrontal channel electroencephalo-gram, Computer methods and programs in biomedicine 124(2016) 19–30.