Professional Documents
Culture Documents
Mani Adib
in
In this work, we present a new method for removing artifacts from scalp
lar Stimulation (EVS). Using EVS, we stimulate the vestibular nerves, which
can affect different regions in the brain via the interconnection of the vestibu-
lar system with some regions in the brain. As a result, some of the brain
Throughout its long history, EVS has been found as an interesting research
entertainment. Although there have been many advances in the EVS appli-
stimulus acts as an input to the brain and how the brain responds. In this
study, we monitored and recorded the brain activities during the application
of EVS, using EEG. The recorded EEG data during EVS application, con-
tain the information that elicit the EVS induced responses. However, the
on the EEG signals. To analyze the EEG and study the brain functions
ii
Abstract
bution of the EVS current in the EEG signals at each electrode. The pro-
it. Wavelet transform was employed to project the recorded EEG signal
into various frequency bands and then the regression method was used to
the performance of our method and compared it to the other well accepted
artifact removal methods, using both simulated and real data. The results
show that the proposed method has better performance compared to the
iii
Preface
paper.
iv
Table of Contents
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
v
Table of Contents
3.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
matical Principles . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
mization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
EVS Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
vi
Table of Contents
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Appendices
vii
List of Tables
7.1 Correlation between the EVS signals and the estimated EVS
artifact extracted from EEG signals for real data using dif-
ferent methods . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.2 Correlation between the EVS signal and the estimated EVS
viii
List of Figures
2.1 The inner ear in human (the left ear), including the Cochlea
of the head and the cathode connected to the left side of the
head [9]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
ix
List of Figures
rest S. Bao . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3 Measured EEG data 60 seconds before, during the SVS stim-
4.4 Measured EEG data 30 seconds before and during the GVS
x
List of Figures
6.3 Fit percentage between the simulation output and the mea-
ital channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
time intervals (a) 5sec, (b) 7 sec, (c) 10sec, and (d) 14sec . . 57
7.1 Correlation between the EVS signal and the estimated EVS
7.2 Correlation between the EVS signal and the estimated EVS
artifact using the RLS filters (top) and the LMS filters (bottom) 67
7.3 Correlation between the EVS signal and the estimated EVS
quency bands . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
quency bands . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
7.6 The Occipital EEG channel data after applying the proposed
tween 1-16Hz . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
xi
List of Figures
7.7 The Occipital EEG channel data after applying the proposed
tween 1-32Hz . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.8 The Occipital EEG channel data after applying the proposed
than 64Hz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
7.9 The Occipital EEG channel data before removing EVS artifacts 76
7.10 Power spectrum of the EEG data before, during and after
7.11 Correlation between the EVS signals and the estimated EVS
artifacts using the proposed method (red) and the ICA method
7.12 EEG signal during the GVS pulses with the amplitude of 0.5mA 82
7.13 The cleaned up EEG signal during the third GVS pulse using
components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
nent (bottom) . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
xii
Chapter 1
Introduction
1.1 Overview
1
1.1. Overview
In spite of the fact that many applications have been developed and imple-
mented using EVS, it is yet to completely understand how the EVS stimulus
acts as an input to the brain system and how the vestibular responses are in-
terpreted by the brain. Although many scientific endeavors have been made
in the field, researchers are still striving to learn more about the vestibular
contributions to brain dynamics and whole-body control.
To study the effects of EVS on the brain functions, and also to develop
a model that explains the EVS responses, we need to monitor and record
the brain activities during the EVS application. Simultaneous acquisition
of EEG/EVS or fMRI/EVS [17] can provide us with data, which shows
how the vestibular system is connected to different regions in the brain
and how the signals sent from vestibular system affect different functions
of the brain. Collecting brain signals using either MRI or EEG during
EVS is very challenging, due to the different types of artifacts that EVS
causes in the MRI images and EEG signals. Some researchers had suggested
to use different type of vestibular stimulations, such as caloric vestibular
stimulation (CVS), to avoid the electrical artifacts. However, they realized
that the other vestibular stimulations may not provide the same effects as
EVS does. EVS can activate the entire vestibular system and stimulate a
wide range of central vestibular neurons, including the semicircular canals
2
1.2. Research Motivation and Contribution
3
1.2. Research Motivation and Contribution
However, exploring the EVS effects and studying the stimulus interactions
with the brain using EEG is very challenging, as the EVS current is dis-
tributed throughout the scalp, and generates an artifact on EEG signals.
The thesis tackles this problem to help researches in the field of neuro-
sciences and physiology analyze the EEG signals during EVS, thus utilize
EVS in a more efficient manner. The main contribution of this study is to
a novel method to eliminate the EVS induced artifacts, which have much
higher amplitude compared to that of the brain signals. This new method
can estimate the contribution of the EVS current in the EEG signals at each
electrode and remove it in a way that the least undesired changes are in-
troduced to the original brain signals. This method is less computationally
demanding and faster than most of the other methods. In this method, as
opposed to ICA-based methods, we do not need to collect EEG data from
many different channels and analyze all the data, in order to remove the
artifact. It is very useful for the applications that only a limited number of
EEG channels are to be analyzed, as the artifact can be removed without
additional data processing from any extra channels.
4
1.3. Future Research Goals and Potential Innovations
Innovations
The EVS studies show that it can be potentially employed for diagnostic and
therapeutic procedures, not only for vestibular disorders but also for some
of the neurological diseases. However, implementing these applications is
very challenging due to lack of a complete understanding of the function
of the EVS stimuli and the ability to precisely trace the vestibular signals
path in different brain regions. In this project, our primary goal is to pro-
vide researchers with clean EEG signals acquired from any individual EEG
channel during EVS, independent from the other EEG channels. This novel
method can be employed in many EEG/EVS studies to remove the artifacts
induced by EVS stimuli with different waveforms, power spectra, duration
and frequency range.
After removing the EVS artifact, researchers will be able to pursue long-term
research goals such as finding the correlation between EVS and brain signals
and identifying the effects of the EVS on the brain dynamics. This can lead
to better characterization of the vestibular system and the central nervous
system responses to the EVS stimuli. Identifying a model for the vestibular
system can benefit in detecting the EVS effects on different regions of the
brain, and ultimately it can help researcher find a way to alter the brain
dynamics using EVS in future.
5
1.3. Future Research Goals and Potential Innovations
for each specific application. Thus it is very important that the artifact
removal methods can be run in a real time closed-loop system. In this study,
we developed and optimized the method in a way that it can be implemented
in embedded systems, with low latency and low computational cost.
6
Chapter 2
2.1 Background
The vestibular system is one part of the inner ear and along with the other
part of the auditory system, the Cochlea, constitutes the labyrinth of the
inner ear in most mammals (Fig. 2.1). The vestibular system, has two parts:
the semi-circular canal system, which senses rotational movements, and the
Otoliths, which senses linear accelerations.
The two main groups of receptors in the vestibular system, are located in
the three semi-circular canals (to sense the rotations along the pitch, roll,
7
2.1. Background
and yaw axes), and in the two Otolith organs (the Utricle for horizontal and
the Saccule for vertical sensory information).
Figure 2.1: The inner ear in human (the left ear), including the Cochlea and
the vestibular system — Courtesy of NIH Medical Arts
The three semi-circular canals are interconnected tubes, which are approx-
imately orthogonal to each other, and aligned in different planes. These
canals are: the horizontal semicircular canal (or the lateral semicircular
canal), superior semicircular canal (or the anterior semicircular canal), and
the posterior semicircular canal. As these canals are oriented along the
pitch, roll, and yaw axes, they can provide sensory inputs for rotary move-
ments. The anterior and posterior semicircular ducts are oriented vertically
(in the sagittal plane and the frontal plane) and can detect vertical head
movements such as bending forward the head towards the ground, and the
8
2.1. Background
lateral semicircular duct, which has a 30-degree angle with the horizontal
plane can detect horizontal head movements, such as spinning the head in
a rotating chair. The movement of a fluid inside the semicircular canals
pushes on a structure which is called the Cupula. Cupula contains hair cells
that convert the mechanical movement to electrical signals. The canals in
right and left sides are oriented in a way that each canal on each side has a
parallel counterpart on the other side. These counterparts work in a push-
pull mode, which means when one canal is stimulated, the counterpart on
the other side is inhibited.
The two organs in the Otoliths, Utricle and Saccule, contain small crystals
of calcium carbonate called Otoconia. Otoconia crystals are placed on a
viscous gel layer. Since they are heavier than their surroundings, they get
displaced during linear movements and deflect the hair cells, which leads to
polarization of the cells and produces a sensory signal. Utricle and Saccule
provide both static and dynamic sensory information. The static infor-
mation is based on the orientation of the head relative to gravity, while
the dynamic information provided by the Utricle and Saccule indicates the
changes of the velocity of the person (for example, in case of accelerating or
decelerating in a car or elevator).
9
2.1. Background
The vestibular system signals are projected to the Cerebellum and to differ-
ent areas in the Cortex. The projections to the Cerebellum are relayed back
as eye movements, head muscle movements and postures. It also affect the
body motor control through the Thalamus and balance through the Spinal
Cord. The projections to the Cortex, spread out over different areas, have
different effects that are not completely understood yet.
Electrical stimuli can affect a part of primary afferents of the Otolith and
the semicircular canals in the vestibular system. Afferent neurons, called
as well receptor neurons, carry signals from receptors (the Otolith and the
semicircular canals) towards the central nervous system. EVS stimulation
changes the afferent neurons discharge patterns through polarization effects.
For example, EVS can increase the firing rate of the responsive afferents of
the semicircular canals in the cathode side [9, 31].
10
2.1. Background
Figure 2.2: Vestibular nerve system and the EVS mechanism: Stimulation is
applied to the mastoids (the arrow) and activates the relay stations upstream
[31].
11
2.1. Background
There are three major responses to the EVS stimulation applied to the mas-
toids in human subjects: ocular, postural, and perceptual responses. As
previous mentioned, different studies showed that during EVS, vestibular
afferents from both otoliths and semicircular canals can be stimulated. A
canal signal may cause a rotation of head and an otolith signal may cause a
tilt or induced a translational acceleration of the body. In healthy subjects,
a GVS stimulus (square pulse EVS) over 0.5 mA produces a roll of the trunk
and head and GVS stimuli around 1mA (applied for few seconds), produce
perceptions of body rotation and may cause the subjects to sway if they are
standing or perceive illusory movements if they are not standing. GVS stim-
uli at 2 mA produce ocular torsion [9, 31]. Some of these responses can be
modulated by the EVS frequency. For instance, low frequency components
of the EVS current seems to be responsible for the body sway, thus when the
frequency components lower than 2Hz are removed from a vestibular stimuli
with a 0-25 Hz bandwidth, the trunk sway responses to the EVS stimulus
are drastically suppressed [5]. These responses are the major behavioral
EVS effects that are usually observed in healthy subjects. Fitzpatrick et al.
illustrated a model of semicircular canals’ responses to EVS stimulations in
Fig. 2.3.
EVS has some effects on cognitive functions as well. The connections be-
tween vestibular brainstem nuclei and other regions in brain (e.g. medial
temporal lobe, and lateral temporal–inferior parietal lobe) are thought to
be the reason of these effects. As an example, applying EVS in healthy sub-
ject can enhance the visual memory (e.g. increase the speed of the visual
12
2.1. Background
Figure 2.3: Fitzpatricks semicircular canal model which shows the yaw,
pitch, and roll sensations evoked by bilateral bipolar vestibular stimulations
with the anode connected to the right side of the head and the cathode
connected to the left side of the head [9].
13
2.2. Applications
memory recall) and increase the response time of the mental transformation
tasks [34]. In patient with parietal lobe lesions, EVS can improve a variety
of multi-modal spatial cognition tasks. For example, in patient with visual
neglect resulting from parietal lesions, applying EVS can cause corrections
of the spatial reference frame distortion [31]. Vesibular system interactions
with sensory-motor and cognitive mechanisms, such as spatial attention,
spatial cognition, non-spatial attention (neglect), body cognition and visual
memory [5, 9, 31, 34], have been studied using EVS.
In some research studies, the effects of EVS on the basal ganglia and the
limbic system have been investigated. The vestibular nerves send signals to
the cerebellar vermis which has influences on the turnover of dopamine and
noradrenaline in the basal ganglia. This indicates the possible vestibular
effects on the basal ganglia and the limbic system. It has been shown that
EVS can be employed to suppress the symptoms of the degenerative neuronal
diseases such as multiple system atrophy and Parkinson’s disease [23, 35, 36].
2.2 Applications
Many research institutions around the world have been studying EVS from
different aspects and developing a variety of applications. Since EVS can
provide a cost effective and safe way to stimulate the human body bal-
ance, motion and acceleration sensors, it can be used to create the illusion
of motion and spatial disorientation, induce body movements and possibly
improve the motor performance.
14
2.2. Applications
EVS has been used in flight simulation systems to train pilots through a vir-
tual environment. One of the main problems in flights is that there are situ-
ations, where the vestibular sensors cannot provide reliable signals. Hence,
the sensory signals are interpreted incorrectly, leading to spatial disorienta-
tion (false perception related to the position in three dimensions). These
sensory illusions occur because of the unnatural environment in the flights.
For example, when a pilot makes a banking left turn, the vestibular system
will detect the roll into the turn. As the turn is continued, the vestibular
system will compensate and does not react to the constant turn. Conse-
quently the brain perceive a false return to level flight. To train pilots and
familiarize them with these situations, EVS can be employed to provide
these sensory illusions in virtual reality simulation systems.
Not only can EVS be useful in the flight trainings, but also it could be
applicable for pre-flight tests, to check the pilots vestibular system prior to
aircraft operation. Recently, EVS has been also used to simulate post-flight
sensorimotor effects, since it can safely induce the symptoms of post-flight
sensorimotor disruptions, such as postural, gaze, locomotor and perceptual
deficits. These symptoms are usually observed in pilots and astronauts
following long duration flights [7].
15
2.2. Applications
In the biomedical field, EVS can be employed to help patients with an im-
paired sense of balance. There have been several trials to introduce novel
treatments using EVS for various neuro-psychological disorders such as mul-
tiple system atrophy (MSA) and Parkinson’s disease (PD) [22, 23, 35, 36].
16
Chapter 3
One of the main problems that researchers have faced in advancing the EVS
applications and exploring new applications, lies in the fact that it is not pre-
cisely understood how the stimulus interacts with the human body system.
To tackle this problem, researchers have used devices, such as functional
Magnetic Resonance Imaging (fMRI) to study the brain activities during
EVS application. For example, some areas of the cerebral cortex involved
in the perceptual and motor functions were studied during the stimulation
of the vestibular organs, using fMRI [17]. The MRI images acquired in the
study conducted by Elie Lobel et al. show the brain areas that are activated
and inactivated during EVS, where the stimulus intensity was set at 0.5 mA
less than the subject pain threshold, ranged from 3.0 to 4.2 mA (Fig. 3.1
and Fig. 3.2).
MRI images are precise and provide very useful information about brain
activities. However, MRI scanners are very expensive and in many research
17
3.1. Problem Statement
centers, they are not available or there is very limited availability to the
MRI scanner for non-urgent studies and research purposes. On the other
hand, the condition of the subject inside the MRI tunnel, e.g. lying still in
an enclosed space and surrounded by loud MRI noises, may affect the results
of the EVS studies. Also, some of the EVS studies cannot be conducted in
MRI due to the induced body movements during the application of EVS,
which affect the MRI images.
More importantly, we can not use MRI to monitor the brain activities of the
subject in the real applications, while the subjects are involved with their
other daily activities.
18
3.1. Problem Statement
Another research tool extensively used for the brain studies is EEG. In
EEG recordings, the brain’s spontaneous electrical activities are recorded
from multiple electrodes, placed on the scalp. EEG has been used in dif-
ferent diagnostic procedures, such as diagnosis of epilepsy. In most of the
diagnostic procedures, the general focus is on the spectral content of EEG,
which illustrates the type of oscillations in neural activities.
The brain’s EEG signals are formed by the electrical activities of billions of
neurons. The neurons which are electrically charged to propagate potential
signals create a wave of ions. The ions’ wave reaches the EEG electrodes
on the scalp and generates a potential difference between the scalp and the
EEG electrodes, recorded over time. The EEG recordings, therefore, are
the reflection of the summation of the activity of millions of synchronized
19
3.2. Limitations
neurons with similar spatial orientation. This makes the EEG recordings
complicated to interpret into the brain activities. Especially the electrical
activity from deep sources in the brain is more difficult to detect, not only
because their signals are mixed with currents from different regions, but also
the voltage falls off when the current passes through the skull.
In spite of the complexity of analyzing the EEG signals due to its poor signal
to noise ratio and low spatial resolution , EEG is still an essential tool in
studying the brain activities, because it can provide very useful data with
high temporal resolution close to 1 ms, which can reflect neural activities
almost in a real-time manner. In addition, EEG studies can be performed
in most of conditions at very low cost and it allows some degree of flexibility
in different experiments. Therefore, in this project, we used EEG during
application of EVS to monitor the brain activities.
3.2 Limitations
To obtain the information on how the EVS can influence neural activities, it
is essential for us to acquiring clean EEG signals during the EVS stimulation.
One of the limitations in regard to the EEG/EVS studies is the occurrence
of different artifacts in the EEG signals. Especially, the ability to study
the ongoing neural activities during the EVS stimulation is very limited
because of the artifact which appears in the EEG recordings due to the
EVS stimulation.
20
3.2. Limitations
The EVS artifact appears because of the leakage of the EVS current mainly
through the scalp. The EVS current flowing through the scalp generates an
additional potential, with much higher amplitude than that of the neural
activities, especially in the area close to the stimulation site. This additional
potential, superimposed on the EEG signals, is observed as a large artifact.
The EVS stimulation artifact is the major difficulty in understanding the
physiological mechanism of the EVS and monitoring the EVS effects on
different regions of the brain and the neural circuitries.
Hence, removing the EVS artifact is the first step in the EEG/EVS studies.
Dealing with the EVS artifact is very challenging because usually the ampli-
tude of the EVS artifacts is much higher than that of the EEG signals, even
when the EVS signals are very small (e.g. 100uA). As a result, in EEG/EVS
studies, we have very poor signal to artifact ratio. As an example, an ex-
perimentally measured EEG signal contaminated with the EVS artifacts is
illustrated in Fig. 3.3. Although the stochastic EVS applied in this example
is a small pink noise with 100uA RMS, the signal to artifact ratio (SAR; the
RMS value of the true EEG signal to that of the EVS artifact in decibels)
is -15.171dB .
Considering that the frequency spectra of the neural signals and EVS arti-
facts overlap very often, filtering the frequency components of EVS artifacts
results in loss of the original neural signals. The major focus on the EEG
frequency bands is on delta, theta, alpha and beta bands. Delta is the fre-
quency band up to 4 Hz, theta is the frequency band between 4 Hz to 8 Hz,
alpha is the frequency band between 8 to 12Hz and beta is the frequency
21
3.2. Limitations
2500
2000
1500
500
−500
−1000
−1500
−2000
−2500
Figure 3.3: Measured EEG data 60 seconds before, 72 seconds during the
EVS stimulation (pink noise with 100uA RMS) and 60 seconds after applying
the EVS
band between 12 to 30 Hz. To remove the EVS artifact, the artifact removal
method must be able to remove the artifacts from the frequency band of
interest in such a way that the original neural signals remain intact and the
physiological effects of EVS on EEG signals can be analyzed.
22
Chapter 4
There are different EVS electrodes configurations. The most common con-
figuration is bilateral bipolar, where the anodal and cathodal electrodes are
placed behind each ear. There are other configurations as well, such as bi-
lateral mono-polar or unilateral mono-polar. In bilateral mono-polar EVS,
the electrodes with same polarity are placed behind each ear, with a distant
reference electrode. In unilateral configurations, the stimulation is delivered
23
4.1. EVS Instrumentation and Set-up
24
4.1. EVS Instrumentation and Set-up
In all studies, the delivered stimulation signals are recorded as the reference
signals, which allows us to identify the EVS artifacts (this will be discussed
in the next chapter). To record the stimulation signals, we used the same
DAQ board that we used to send the control signals. Fig. 4.1 shows the
experimental set-up for our SVS studies, where we used the DS5 stimulator,
connected to a PC computer via a DAQ board. This set-up enables us to
deliver the desirable stimuli (generated by the PC computer) and simulta-
neously record the output of the stimulator, and save it on the computer.
25
4.2. EEG Acquisition Set-up
26
4.2. EEG Acquisition Set-up
Before collecting EEG/EVS data, we need to look into the electrical prop-
erties of the body, specifically the scalp impedance. The most important
reason for the impedance check, is the quality of the EEG and the EVS
stimulation. If the impedance at the electrode-skin interface is not opti-
mized, neither can we acquire high quality EEG signals nor deliver effective
EVS stimulations.
The electrical properties of the skin influence the EVS current threshold,
(the EVS current which is large enough to change the firing pattern of the
nerves at the stimulation site), the pain threshold and muscle stimulation.
The muscle stimulation may occur indirectly from the EVS stimulation.
Muscle contractions can be triggered at a current level which varies with the
electrical properties of the body. In the EEG/EVS experiments, twitches of
ear and skin during the EVS stimulation, is not desired since it adds some
more artifacts to the EEG data. In some of our studies, we tried to keep
27
4.2. EEG Acquisition Set-up
the EVS current lower than the muscle stimulation threshold, to reduce or
eliminate the muscle contraction.
In our SVS studies, we carried out the EEG recording with a Neuroscan
Synamps2 system (NeuroScan, NC, U.S.A.). This EEG device uses a low
noise 24 bit Analog-to-Digital converter which allows a broad dynamic range.
During our EVS studies no saturation occurred. We acquired the EEG
signals from 20 electrodes located on the scalp according to the international
10-20 EEG system (Fig. 4.2). We set the EEG sampling frequency to 1 kHz
and recorded the EEG signals before, during and after the stimulation, (e.g.
60 seconds before and 60 seconds after the stimulation and 72 seconds during
the stimulation). The EEG data were stored in files with cnt format, which
is a standard format containing binary data, used by many EEG system
manufacturers. To load these data in the MATLAB software, we used a
software converter, presented in Appendix C.
All the EEG data for the SVS experiments, were collected by our collabo-
rator in the Pacific Parkinson’s Research Centre. In these experiments, we
applied vestibular stimulation to nine healthy subjects (6 male, 3 female)
between the ages of 21 and 53 yr, with no known history of neurological
disease or injury.
28
4.2. EEG Acquisition Set-up
In these GVS experiments, the EEG sampling frequency was set to 4 kHz
29
4.2. EEG Acquisition Set-up
and we recorded the EEG signals during the stimulation, before and after
the stimulation (e.g. 30 seconds before and 30 seconds after the stimulation).
This ASALab EEG device uses a low noise 24 bit Analog-to-Digital converter
which allows an acquisition of 29.8 nV per bit and it provides a very broad
dynamic range, so that no saturation occured during our EEG/GVS data
acquisition.
All the EEG data for the GVS experiments, were collected by our collabo-
rator in the Sensorimotor Physiology Laboratory. In these experiments, we
applied vestibular stimulation to four healthy subjects (3 males, 1 female)
between the ages of 22 and 31, with no known history of neurological disease
or injury.
In all of our EVS studies, subjects were asked to relax, remain still and
concentrate on a focal point on the screen in front of them, so that myogenic
and ocular artifacts occur as least as possible. Under resting conditions,
there are also less variations in the head impedance [29], which is important
for data acquisition and dealing with artifacts in EEG/EVS studies.
Fig. 4.3 and Fig. 4.4 present the acquired EEG during the SVS and GVS
studies.
30
4.2. EEG Acquisition Set-up
Figure 4.3: Measured EEG data 60 seconds before, during the SVS stimu-
lation using 72 seconds Pink noise with 100uA RMS and 60 seconds after
the SVS application
"
!
Figure 4.4: Measured EEG data 30 seconds before and during the GVS
stimulation using 5 square pulses with the cycle of 10 seconds On, 30 seconds
Off and amplitude of 500uA
31
Chapter 5
A Review of Artifact
Removal Methods and Their
Mathematical Principles
5.1 Background
32
5.2. ICA-based Artifact Removal Methods
Another class of the artifact removal methods are regression based methods.
In these methods, in order to identify the artifacts, the propagation factors or
transmission coefficients must be calculated. Then the estimated proportion
of the EVS is subtracted from the EEG. There are also other artifact removal
methods, such as wavelet denoising methods and adaptive filtering methods.
In the following, some of the most common artifact removal methods are
discussed, and we explained how we applied them to clean the EEG signals,
contaminated by the EVS artifacts.
33
5.2. ICA-based Artifact Removal Methods
where M is the unknown mixing matrix defining weights for each source
contributions to the EEG signals recorded at each channel. In ICA, the
measured K channel EEG signals are taken into a N dimensional space and
projected onto a coordinate frame, where the data projections are minimally
overlapped and maximally independent of each other. There are different
approaches to find the independent components. The main ICA approaches
are minimizing the mutual information and maximizing the non-Gaussianity
(using kurtosis or joint entropy) among the data projections.
We use two of the most popular ICA algorithms in this study: Fast-ICA
and extended Infomax ICA algorithms. Please refer to Appendix D and
Appendix ?? for the MATLAB codes, we used for the extended Infomax
ICA and Fast-ICA algorithms.
34
5.2. ICA-based Artifact Removal Methods
We applied ICA to the measured EEG sets to identify the EVS artifacts
components. To remove the EVS artifact, we find all components that
are attributed to the EVS reference signals using the correlation coefficient
between the ICA components and the EVS signals. After identifying the
artifact components, we applied two approaches to remove the artifact.
In the first approach, we set the components that account for artifacts to
zero, Sartf (t) = 0, and obtained a new source matrix Ŝ(t) in which the
artifact sources were filtered out.
35
5.3. Regression-based Artifact Removal Methods
set at four standard deviations above the mean of the normal EEG signal
without the artifacts (e.g. the signals before applying the EVS) and all
data points with amplitude over the threshold were set to zero. Thus a new
source matrix Ŝ(t) was obtained with the modified components. We set the
threshold at a level, chosen in order to keep a part of the original neural
activities which are not contaminated by EVS.
Where Ê(t) is the new data set which represents the estimated artifact-
removed data. In the chapter “Study Results and Assessment”, we compared
the ICA-based artifact removal methods with the other methods, that we
introduced here.
The injected EVS current signals and the EEG signals are recorded concur-
rently, while the EVS current distribution through the scalp contaminates
the recorded EEG signals. We used the recorded EVS current to estimate
the EVS artifacts in the measured EEG signals using regression analysis. In
this method, the dependency of the EVS artifacts and the EVS reference
signals is modeled and as a result we can estimate the EVS artifacts in the
contaminated EEG signals. The recorded EVS current is taken as the input
36
5.3. Regression-based Artifact Removal Methods
On the other hand, different model structures can be used in regression anal-
37
5.3. Regression-based Artifact Removal Methods
B(q) C(q)
A(q)y(t) = u(t) + e(t) (5.3)
F (q) D(q)
Here, u(t) is the reference input (the recorded GVS current), y(t) is the
output (the measured EEG) and e(t) is a white noise (mean = 0, variance
= σ 2 ) which represents the stochastic part of the model. A(q), B(q), C(q),
D(q) and F(q) are polynomials in terms of the time-shift operator q which
describe the influence of the GVS current and measurement noise on the
EEG data. Model structure such as ARMAX, Box-Jenkins and Output-
Error (OE) are the subsets of the above general polynomial equation. For
example, in ARMAX model F(q) and D(q) are equal to 1, in Box-Jenkins
A(q) is equal to 1 and in Output-Error model A(q), C(q) and D(q) are equal
to 1.
38
5.4. Adaptive Filter-based Artifact Removal Methods
We also used State-Space models, where the relation between the EVS sig-
nals, the EVS artifacts and noise are described by a system of first order
differential equations. The state equation relates the state variables, noise
and the EVS signals to the first derivatives of the state variables. The
Output equation relates the state variables and the EVS signal to the EVS
artifact.
Methods
In our application, the primary input of the adaptive filter system is the
measured contaminated EEG signal, Em (n), which is taken as a mixture
39
5.4. Adaptive Filter-based Artifact Removal Methods
of a true EEG, Et (n), and an artifact component z(n). The adaptive filter
block takes the GVS current, iGV S (n), as the reference input, and estimates
the artifact component. The filter coefficients, hm , are adjusted recursively
in an optimization algorithm driven by an error signal 5.4:
where:
M
ÊEV S (n) = hm .iEV S (n + 1 − m) (5.5)
m=1
As the adjustment of the filter coefficients does not affect the E[Et 2 (n)], min-
imizing the term E[(z(n) − ÊEV S (n))2 ] is equivalent to minimizing E[e2 (n)].
40
5.4. Adaptive Filter-based Artifact Removal Methods
∂E[e2 (n)]
Δm = (5.9)
∂hm (n)
∂e(n)
hm (n+1) = hm (n)−2μE[e(n) ] = hm (n)−2μE[e(n)iEV S (n)] (5.10)
∂hm (n)
We also employed RLS, where the algorithm recursively finds the filter co-
efficients that minimize the following weighted least squares cost function:
n
ε= λn−i e2 (i) (5.11)
i=M
41
5.5. Wavelet-based Artifact Removal Methods
42
5.5. Wavelet-based Artifact Removal Methods
Figure 5.1: Power spectrum of a EVS with pink noise waveform in the
frequency range of 0.1-10Hz
For the discrete signals, the discrete wavelet transform (DWT) algorithm
can be applied, where the set of basis functions are defined on a dyadic grid
in the time-scale plane as:
43
5.5. Wavelet-based Artifact Removal Methods
where, 2j governs the amount of scaling and k2j governs the amount of
translation or time shifting. The wavelet transform is the inner-product
of the basis wavelet functions and the signal in the time domain. In the
DWT algorithm, the discrete time-domain signal is decomposed into high
frequency or details components and low frequency or approximation compo-
nents through successive high pass and low pass filters. For multi-resolution
analysis, the original signal is decomposed into an approximation and de-
tails parts and the approximation part is recursively decomposed again by
iterating this process. Thus, one signal can be decomposed into many com-
ponents.
However, as the basic DWT algorithm does not preserve translation invari-
ance, a translation of wavelet coefficients does not necessarily correspond
to the same translation of the original signal. This non-stationary property
originates from the down-sampling operations in the pyramidal algorithm.
The algorithm can be modified by inserting 2j − 1 zeros between filters co-
efficients of the layer j, instead of down-sampling. This modified version
of the DWT algorithm is called stationary wavelet transform (SWT) and it
can preserve the translation invariance property.
We applied both DWT and SWT, to decompose the EEG signals using
different mother wavelets, such as Symlet and Daubechies of different orders.
Both the EVS current and the simulated EEG signals were decomposed into
12 levels, as a result, for the signals acquired at the sampling rate of 1000Hz,
44
5.5. Wavelet-based Artifact Removal Methods
the frequency bands for approximation and detail components are tabulated
in Table 5.1.
L1 L2 L3 L4 L5 L6
Approximation 0-250 0-125 0-62.5 0-31.25 0-15.75 0-7.87
Details 250-500 125-250 62.5-125 31.25-62.5 15.75-31.25 7.87-15.75
L7 L8 L9 L10 L11 L12
Approximation 0-3.93 0-1.96 0-0.98 0-0.49 0-0.24 0-0.12
Details 3.93-7.87 1.96-3.93 0.98-1.96 0.49-0.98 0.24-0.49 0.12-0.24
45
Chapter 6
Removal Method
None of the current artifact removal methods are able to remove the EVS
artifacts in a way that the resulting cleaned up EEG signals are usable for
physiological and neurological studies. In EVS/EEG studies, the artifact
to signal ratio is so large that, even if a small amount of the EVS artifacts
remained, the original brain signals are not detectable. We concluded that
there is a need to design a specific artifact removal method, which can deal
with the EVS artifacts. We proposed a novel method for EVS artifact re-
moval by combining regression analysis and wavelet decomposition 1 . In
1
This work was submitted to the IEEE TRANSACTIONS ON BIOMEDICAL ENGI-
NEERING and currently is under revision
46
6.1. Design a Hybrid Wavelet-based Artifact Removal Method
this method, we used wavelet transform to decompose the EEG and EVS
signals into a number of frequency bands (e.g. 12 frequency bands, when the
sampling frequency is 1kHz). Then, we employed the regression methods to
estimate the EVS artifacts in each frequency band, using the decomposed
reference components within the same frequency band. In this method, the
wavelet decomposition helps to obtain the best estimate of the EVS con-
tribution in each EEG channel, since the regression model deals with the
frequency components of each band once at a time. In other words, the
recorded EVS signals and the contaminated EEG data are broken down
into various frequency bands by means of wavelet analysis, then the EVS
artifacts are estimated separately in each frequency band through the regres-
sion analysis. After estimating the EVS artifacts in each frequency band,
the estimated artifacts are subtracted from the contaminated EEG in that
frequency band. The cleaned up EEG signals can be reconstructed from the
artifact-removed components in the frequency range of interest (e.g. 1Hz to
32Hz).
Using the wavelet decomposition, we can separate the EVS artifacts fre-
quency components, thus the regression-based estimation method can deal
better with the nonlinear behavior of the skin conduction. This wavelet
based time-frequency analysis approach enhances the performance of the
47
6.1. Design a Hybrid Wavelet-based Artifact Removal Method
regression analysis, and the hybrid proposed method outperforms the other
methods. The comparison results are presented in the chapter “Study Re-
sults and Assessment”.
48
6.2. Impedance Analysis and Simulation Study for Method Optimization
To optimize the performance of the proposed method, and to quantify the ac-
curacy of the method relative to alternative approaches, a simulation study
was carried out. We simulated the contaminated EEG signals with EVS ar-
tifact in a way that we exactly know what is the true EEG signal and what
is the artifact. For simulating the contaminated data, we combine some
artifact-free EEG data with the simulated EVS contamination. To be able
to simulate the actual process of the EVS contamination in EEG signals, we
analyzed the skin-electrode interface and simulated the physical structures
of EVS and EEG electrodes contacts and skin. The simulation of the elec-
trical interactions between EVS and body is based on a physiological model,
where the EVS and EEG electrode-skin interfaces and skin were replaced
with their electrical equivalent. Then, the EVS signals were applied to the
model to generated the simulated EVS artifacts.
In this simulation study, we assumed that the EVS current mainly dis-
tributes through the scalp and the deeper layers of the head have negli-
gible effects, considering the skull impedance is much higher than scalp
impedance (skull conductivity is around 0.018 S.m−1 and scalp conductiv-
ity is around 0.44 S.m−1 ) [30]. We modeled the physical structure of the
electrical impedance of the electrode-skin interface and also the impedance
of the head between the points that the EEG and the EVS electrodes were
placed, using a resistive-capacitive circuit [33] as shown in Fig. 6.2.
49
6.2. Impedance Analysis and Simulation Study for Method Optimization
Figure 6.2: Electrical equivalent circuit for the electrode-skin interface and
the underlying skin [33]
In this electrical equivalent circuit, Ehe is the half cell potential of the elec-
trode/gel interface, the parallel combination of resistive Rd and capacitive
Cd components represent the impedance associated with the electrode-gel
interface. Rs is the series impedance associated with the resistance of the
electrode gel. Ese is the potential difference across the epidermis, whose
impedance is represented by the resistance Re and capacitance Ce .
50
6.2. Impedance Analysis and Simulation Study for Method Optimization
trical skin impedance. For example the range of the resistivity of the inner
tissues (Ru ) is typically 100 − 200Ωcm2 and for the outer layers (Re ), it
is between 104 − 106 Ωcm2 along with a capacitances (Ce ) in the range of
1 − 50nF/cm2 [24]. However, the sweat glands and ducts can add an equiv-
alent parallel RC network (represented by broken lines in Fig. 6.2) and a
potential difference between sweat glands, ducts, dermis and subcutaneous
layers [33].
Since the pure resistance of the deeper layers of skin and the resistance of
the electrode gel are negligible, we can simplify the impedance structure as
following (6.1):
Rd Re Rp sB1 + B0
Z(s) ≈ ( + )≈ 2 (6.1)
sRd Cd + 1 sRe Ce + 1 sRp Cp + 1 s A2 + sA1 + 1
where, Em is the measured EEG, Xin is the injected EVS current, E is the
original neural signals or artifact-free EEG and Wnoise is the measurement
noise.
51
6.2. Impedance Analysis and Simulation Study for Method Optimization
∗ sB1 + B0
Em = Xin (6.3)
s2 A2+ sA1 + 1
100
90
80
70
Fit percentage
60
50
40
30
20
10
0
0 5 10 15 20
EEG channels
Figure 6.3: Fit percentage between the simulation output and the measured
EEG at each channel
52
6.2. Impedance Analysis and Simulation Study for Method Optimization
∗ (t))2
(Em (t) − Em
f it = 100(1 − ) (6.4)
( (Em (t) − mean(Em (t))2
1 + sTz
Z ∗ (s) = Kp (6.5)
s2 Tw2 + 2sζ.Tw + 1
53
6.2. Impedance Analysis and Simulation Study for Method Optimization
Figure 6.4: The transfer function of the modeled impedance at the occipital
channel
(V (t) − Z ∗ .I(t))2
f it = 100(1 − ) (6.6)
( (V (t) − mean(V (t))2
54
6.2. Impedance Analysis and Simulation Study for Method Optimization
To address the concern about the time-variant properties of the scalp impedance
even during each trial, we computed the impedance models for shorter time
intervals during EVS. We observed that the length of time intervals does
not significantly affect the fitness of the models, which means the impedance
model does not change during each trial with duration up to few minutes.
For example, in one of our EEG/EVS studies where the EVS duration was
70 seconds, we calculated the impedance models for 1s, 2s, 5s, 7s, 10s, and
14s time intervals and analyzed the fitness of the impedance model at each
channel. Fig.6.5 and Fig.6.6) show how the fitness of the impedance model
at channel 18 varies in different time intervals. The results show that for
most of the intervals, the fitness of the model is very close to the fitness
obtained by using the entire trial, which is around 87%.
55
6.2. Impedance Analysis and Simulation Study for Method Optimization
100
90
80
70
Fit percentage
60
50
40
30
20
10
0
0 10 20 30 40 50 60 70
Number of time intervals
(a)
100
90
80
70
Fit percentage
60
50
40
30
20
10
0
0 5 10 15 20 25 30 35
Number of time intervals
(b)
Figure 6.5: The fit percentage for the impedance model at channel 18 for
time intervals (a) 1sec and (b) 2sec
56
6.2. Impedance Analysis and Simulation Study for Method Optimization
100
90
80
Fit percentage 70
60
50
40
30
20
10
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Number of time intervals
(c)
100
90
80
70
Fit percentage
60
50
40
30
20
10
0
1 2 3 4 5 6 7 8 9 10
Number of time intervals
(d)
100 100
90 90
80 80
70 70
Fit percentage
Fit percentage
60 60
50 50
40 40
30 30
20 20
10 10
0 0
1 2 3 4 5 6 7 1 2 3 4 5
Number of time intervals Number of time intervals
(e) (f)
Figure 6.6: The fit percentage for the impedance model at channel 18 for
time intervals (a) 5sec, (b) 7 sec, (c) 10sec, and (d) 14sec
57
6.3. Optimization of The Proposed Method Using Simulated Data
This indicates that the impedance of the scalp does not change during each
EVS trial and the impedance model can be represented by one transfer
function for the entire trial with a duration of few minutes in the EEG/EVS
studies.
To generate the simulated EVS artifacts, we applied the EVS current sig-
nals to the transfer functions of impedance models. In order to generate a
data set with known EEG and EVS artifact components, we combined the
simulated EVS artifacts and the clean EEG data which were acquired under
rest condition without application of any stimulation. This facilitates opti-
mization of the proposed method as well as comparison of the performance
of different methods in removing the EVS artifacts.
Simulated Data
58
6.3. Optimization of The Proposed Method Using Simulated Data
Cov(Et , Êt )
Corr(Et , Êt ) = (6.7)
σEt · σÊt
where, Et is the original artifact-free EEG signal and Êt is the artifact-
removed EEG signal.
(Et (t) − Êt (t))2
RSSN = (6.8)
(Et (t) − mean(Et (t)))2
where, Et (t) represents the original artifact-free signal and Êt (t) is the
artifact-removed signal.
The first step in optimizing the proposed method is to choose the wavelet
algorithm and the mother wavelet, so that the performance of the method
is maximized, based on correlation and RSS analysis. To compare different
wavelet algorithms and mother wavelets, we employed a number of mother
wavelets from two different wavelet family which have been commonly used
in EEG signal processing, such as Daubechies (db3, db4, and db5) and Symlets
(sym3, sym4, and sym5). Both SWT and DWT algorithms were used with
these mother wavelets in the proposed artifact removal method and applied
to the simulated data and decomposed the data into 12 frequency bands.
Then the EVS artifacts were estimated using separate OE model structures
59
6.3. Optimization of The Proposed Method Using Simulated Data
In Table 6.1, we tabulated the normalized residual sum of squares and the
correlation between the original artifact-free signals and the artifact-removed
signals, reconstructed by the components in the frequency range lower than
32 Hz.
Table 6.1: Correlation and normalized residual sum of squares between the
artifact-removed signals and the original artifact-free EEG signals for simu-
lated data using different wavelets
60
6.3. Optimization of The Proposed Method Using Simulated Data
We applied the proposed method to the simulated data, using each of these
models with different orders. Data was decomposed in 12 frequency bands
using SWT with Daubechies 4. In Table 6.2, we tabulated the normalized
residual sum of squares and the correlation between the original artifact-free
signals and the artifact-removed signals reconstructed by the components in
the frequency range lower than 32 Hz.
Table 6.2: Correlation and normalized residual sum of squares between the
artifact-removed signals and the original artifact-free EEG signals for simu-
lated data using different regression models
61
6.3. Optimization of The Proposed Method Using Simulated Data
The results of the regression analysis, using different regression model struc-
tures, show between all those models the Output-Error order 2 outperforms
the other models, followed by the nonlinear Hammerstein-Wiener order 2
and 3 and State-Space order 2. We employed the Output-Error order 2
model in the proposed method to achieve the best performance, when it is
applied to the real data.
62
Chapter 7
63
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
We chose the occipital channel because the data acquired from this channel,
which contains important physiological information, gets heavily contami-
nated by the EVS artifacts, since the EEG electrodes for occipital channels
are located very close to the EVS electrodes.
To assess the performance of the artifact removal methods in the SVS stud-
ies, we applied the methods to the EEG/EVS data, collected from four
different subjects, where the stimulus was a recorded zero-mean pink noise
current, with a 1/f type power spectrum within frequency range of 0.1Hz to
10Hz and duration of 72 seconds, delivered at 5 different RMS levels between
60uA to 450uA.
First we employed the ICA-based methods, the adaptive filters and the
regression-based methods. Then we selected the best methods with higher
performance from each type of these methods and compared them with
our proposed method, where we used the wavelet analysis to improve the
performance of the regression-based artifact removal methods.
64
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
In Fig. 7.1 and Fig. 7.2, we depicted the result of the correlation analysis for
the RLS-based filters with different length and different forgetting factors.
We observe that the filter with the forgetting factor of 0.99997 and the length
of 2 had the best performance.
In Fig. 7.2 and Fig. 7.3, we depicted the result of the correlation analysis
for the LMS-based filters. It is shown that between these LMS-based filters
with different length and adaptation gains, the filter with the adaptation
gain of 0.5 and the length of 3, had the best performance.
65
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
Figure 7.1: Correlation between the EVS signal and the estimated EVS
artifact using the RLS filters
66
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
Figure 7.2: Correlation between the EVS signal and the estimated EVS
artifact using the RLS filters (top) and the LMS filters (bottom)
67
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
Figure 7.3: Correlation between the EVS signal and the estimated EVS
artifact using the LMS filters
68
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
In Table 7.1, we tabulated the results of the correlation analysis for these
methods and compared the correlation coefficients between the EVS signals
and the EVS artifacts estimated by each of these methods in the real data
sets.
Table 7.1: Correlation between the EVS signals and the estimated EVS
artifact extracted from EEG signals for real data using different methods
Method Correlation
ICA-Infomax method (Removing the artifact component) 0.6859
ICA-Infomax method (Applying threshold to the artifact component) 0.6858
Regression method with OE2 0.7673
RLS Adaptive filter (Forgetting factor: 0.99997, length:2) 0.7615
LMS Adaptive filter (Adaptation gain: 0.5, length:3) 0.7010
The results show that between all the methods, that mentioned earlier, the
second order Output-Error regression model can estimate the EVS artifacts
with a higher correlation with the original EVS signals. This is also in con-
formance with our skin impedance analysis, where we analyzed the resistive-
capacitive equivalent circuit of the electrode and skin physical structures as
shown in Fig. 6.2.
69
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
models matched well with the skin and electrodes impedance model.
70
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
100
90
80
70
Fit percentage
60
50
40
30
20
10
0
1 2 3 4 5 6 7 8 9 10 11 12
Frequency bands
Figure 7.4: Fit percentage of the estimated EVS artifacts with simulated
EVS contaminated signals using the OE order 2 in 12 frequency bands
0.9
0.8
Correlation coefficient
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
1 2 3 4 5 6 7 8 9 10 11 12
Frequency bands
Figure 7.5: Correlation between the estimated EVS signals and simulated
EVS contaminated signals using the OE order 2 in 12 frequency bands
71
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
The results show that in the frequency range of the EVS signals, we can
achieve better results in estimating the artifacts in terms of fit percentage
and correlation coefficients. For example, when the EEG signals sampled
at 1kHz, are split into 12 frequency components, in the frequency compo-
nents L6 to L10, which approximately correspond to 8-16Hz, 4-8Hz, 2-4Hz,
1-2Hz and 0.5-1Hz bands, we can achieve 96% fit percentage with the cor-
relation coefficient of 0.99. It explains why the regression-based estimation
achieve higher performance in rejecting the EVS artifacts, when the artifact
is estimated in each frequency band separately.
Another benefit of using wavelet decomposition is that we can filter out the
frequency components that are out of interest. Removing those frequency
components can, in effect, be equivalent to reducing noise in the estimation
process and improve the results of the regression analysis.
We removed the frequency components, which were out of our interest, (out-
side the band between 0.98Hz and 31.25Hz), and reconstructed the artifact-
removed EEG data in the frequency range of interest. Through a correlation
analysis, we can demonstrate that the wavelet based time-frequency analy-
sis approach significantly enhances the performance of the artifact removal
method.
We calculated the correlation coefficients between the EVS signals and the
estimated EVS artifacts reconstructed from different frequency bands, and
we illustrated how the wavelet analysis improves the regression estimates.
The result of the correlation analysis is tabulated in Table 7.1.
72
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
Table 7.2: Correlation between the EVS signal and the estimated EVS ar-
tifact reconstructed from different frequency components for real data
The results show that the correlation between the EVS signal and the esti-
mated EVS artifact significantly increases by using wavelet decomposition
method. After removing the frequency components lower than 0.98Hz and
higher than 31.25Hz, which are not of the main interest, the correlation
coefficient between the EVS signal and estimated EVS artifact range was
increased up to 0.9899, while without using wavelet decomposition, the cor-
relation coefficient between the EVS signal and estimated EVS artifact was
0.7673. As shown in the Table 7.1, removing different frequency components
affects the results of the regression estimates.
We could significantly suppress the EVS artifact and achieve high Signal to
Artifact Ratio (SAR), defined as:
RM SEEG
SAR = 20Log10 ( ) (7.1)
RM SArtif act
73
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
For instance, in the EEG/EVS studies, where the stimulus was a pink noise
with a RMS value of 100uA, we could achieve a SAR of −0.7057dB in the
frequency range of 1Hz-16Hz (Fig. 7.6), which means a large amount of the
artifact is removed, considering that the correlation coefficient between the
removed artifactual components and the EVS signals is 0.9899.
In the other frequency ranges, the artifact residual is larger and we have
lower SAR. For example, in the frequency range of 1Hz-32Hz (Fig. 7.1), we
could obtain a SAR of −4.5592dB and in the range of 1Hz-64Hz, the SAR
was −6.0206dB (Fig. 7.8).
74
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
150
100
−50
−100
−150
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
5
Time (msec) x 10
Figure 7.6: The Occipital EEG channel data after applying the proposed
artifact removal method using the frequency components between 1-16Hz
250
200
150
100
EEG voltage (uV)
50
−50
−100
−150
−200
−250
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
5
Time (msec) x 10
Figure 7.7: The Occipital EEG channel data after applying the proposed
artifact removal method using the frequency components between 1-32Hz
75
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
300
200
100
EEG voltage (uV)
−100
−200
−300
−400
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
5
Time (msec) x 10
Figure 7.8: The Occipital EEG channel data after applying the proposed
artifact removal method using the frequency components lower than 64Hz
2500
2000
1500
EEG voltage (uV)
1000
500
−500
−1000
−1500
−2000
−2500
Figure 7.9: The Occipital EEG channel data before removing EVS artifacts
76
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
After removing the EVS artifact in the frequency band of 1Hz to 16Hz, we
analyzed the power spectrum of the EEG data before, during and after EVS
application. Fig. 7.10 shows that during the EVS application, there is an
increase in the power in frequency bands of 1-12Hz and 20-28Hz.
45 20
40 10
35 0
Frequency (Hz)
30 −10
25 −20 dB
20
−30
15
−40
10
−50
5
−60
20 40 60 80 100 120 140 160 180
Time(s)
35 30
Frequency (Hz)
30 20
25 10 dB
20
0
15
−10
10
−20
5
−30
20 40 60 80 100 120 140 160 180
Time (s)
Figure 7.10: Power spectrum of the EEG data before, during and after EVS
application (top) and Power spectrum of the EVS (bottom)
77
7.1. Assessment of The Artifact Removal Methods in Stochastic EVS Studies
78
7.2. Assessment of The Proposed Artifact Removal Method in Pulsed GVS Studies
Figure 7.11: Correlation between the EVS signals and the estimated EVS
artifacts using the proposed method (red) and the ICA method (blue) for
different stimulation amplitudes
79
7.2. Assessment of The Proposed Artifact Removal Method in Pulsed GVS Studies
This type of stimulation has been commonly used to study the GVS evoked
postural responses and characterization of muscles and whole-body responses
[9, 28]. Even, in some of the studies of this type, square wave GVS pulses
with higher amplitude (e.g. 4mA) and shorter duration (sometimes as short
as 20ms) are applied [28].
The proposed method is not suitable when we need to acquire the EEG data
immediately after the GVS onset, because we cannot accurately reconstruct
large sharp jumps by means of wavelet transform. When we applied the
proposed method to remove the high-amplitude GVS artifact, we observed
additional large ripples near the sharp edges of the square pulses, due to
the Longo phenomenon. The Longo oscillations near the edge of the high-
amplitude GVS pulses reflect the difficulty that we faced in approximating
a huge sharp edge by a finite series of wavelets. As a result, the original
80
7.2. Assessment of The Proposed Artifact Removal Method in Pulsed GVS Studies
EEG signal immediately after the GVS onset was not completely recovered.
Except for the short period after the GVS onset, we are still able to remove
a major portion of the GVS artifacts from the EEG signals. Following we
discuss about how we employed the proposed method to remove the GVS
artifacts.
Fig. 7.12 shows a sample of the measured EEG signal during the GVS with
the amplitude of 0.5 mA. We applied the proposed artifact removal method
and using the wavelet decomposition, split the signals into a number of fre-
quency components. Considering that if the EEG signals are reconstructed
from all the frequency components, the artifact is still dominant, as shown in
Fig. 7.13. In this figure (Fig. 7.13), we can also observe the large oscillations
(Longo phenomenon), near the edge at both ends of the GVS signal.
81
7.2. Assessment of The Proposed Artifact Removal Method in Pulsed GVS Studies
Figure 7.12: EEG signal during the GVS pulses with the amplitude of 0.5mA
Figure 7.13: The cleaned up EEG signal during the third GVS pulse using
the proposed method, reconstructed from all the frequency components
82
7.2. Assessment of The Proposed Artifact Removal Method in Pulsed GVS Studies
Figure 7.14: The cleaned up EEG signal reconstructed from the frequency
components between 4-32Hz (top) and GVS artifact component (bottom)
83
7.2. Assessment of The Proposed Artifact Removal Method in Pulsed GVS Studies
We observed that the proposed method is very efficient in removing the high-
amplitude GVS artifacts, but the immediate data after the GVS onset were
not fully recovered and we lost some data around few hundreds of millisec-
onds. This aspect is important in the vestibular-evoked postural/balance
response studies, where researchers are looking for data from 5 milliseconds
after the GVS onset. There is therefore, a need to develop another method,
which can deal with the sharp edges of the GVS artifacts and recover the
EEG data right after the GVS application.
84
Chapter 8
85
8.1. Summary and Conclusion
Most of the current researches in the field of EEG analysis, have been focused
on the component-based methods, such as ICA, to remove different types
of artifacts from EEG signals. The proposed method behaves differently in
rejecting the EVS artifact and it was shown that our method can outperform
the methods commonly used in the field.
86
8.1. Summary and Conclusion
also analyzed the impedance properties of the head (specifically scalp) and
skin-electrode interface. A simulation study was performed and its results
showed that the impedance models for the skin and skin-electrodes interfaces
remain fairly constant over the entire trial (up to few minutes) and the small
variation in impedance during the EVS stimulation is not considerable. Also,
when we applied the proposed method on the real data, using the second
order nonlinear Hammerstein-Wiener model with few breakpoints in the
piecewise-linear block, it provided the same results as the Output-Error
model of the second order. This implies that the scalp impedance does
not vary much during the EVS application, and relationships between the
injected EVS current and the EVS artifacts at the EEG electrodes remain
constant over the entire trial.
Furthermore, using the proposed method, we don’t need to collect and pro-
cess multiple EEG channels as oppose to the ICA-based analysis, therefore
this method is much faster than the ICA-based methods. This also allows
us to have a simple experimental set-up for collecting EEG signals with few
EEG channels for the EVS studies, which makes the data acquisition easy
and less time consuming in preparation. When the acquisition session takes
a long time, the subject gets tired and as a result more myogenic and oc-
ular artifacts are introduced in the EEG data. On the other hand, as the
in proposed method less data are processed, it is easier to implement in a
real-time system.
87
8.2. Areas of Future Studies
recover the EEG signals in a short period of time (in the order of millisec-
onds) right after the GVS onset.
Since there is still some room to reduce the EVS-induced artifacts, which re-
main in the EEG data after applying the proposed method in the frequency
band out side the 1Hz to 16Hz, the immediate future work would be the
improvement of the proposed artifact removal method. We suggest that a
combination of the proposed method with other methods may improve the
results. For example, employing the ICA methods after using the proposed
method, may improve the results. Applying the proposed method can re-
move a major part of the EVS artifacts and reduce the artifact to signal ratio
significantly, while ICA-based methods may help to remove the remaining
artifacts in broader frequency bands such as 1Hz to 32Hz, by considering
broader statistical correlations, beyond the linear ones.
Moreover, the proposed artifact removal method may need some modifica-
tions when EVS with different waveforms, power spectra and duration are
employed in EVS studies. Nevertheless, the proposed method may not be
suitable for some special studies. For example, in the case of vestibular-
evoked studies where high-amplitude GVS stimulation is used, we lose some
EEG data right after the GVS onset, while those data are important in some
physiological studies. In such cases, a refined method must be developed.
88
8.2. Areas of Future Studies
After cleaning up the EEG signals from the artifacts, the next phase of
this research would be analyzing the EEG signals during the EVS appli-
cation, identifying the effects of the EVS on the EEG signals and finding
the correlation between EVS and the induced EEG patterns. This leads to
characterization of the central nervous system responses to EVS stimula-
tion, e.g. vestibular-evoked postural/balance responses. Researchers need
this information to understand the vestibular system functions and its ef-
fects on different regions in brain, which may lead to find a way to alter the
brain dynamics using the EVS signals. Manipulating the dynamics of the
brain and its oscillatory activities may introduce new alternative non-drug
treatments for the vestibular and some of the neurophysiological disorders.
89
8.2. Areas of Future Studies
90
Bibliography
[5] Christopher J. Dakin, Billy L. Luu, Kees van den Doel, John Timo-
thy Inglis, and Jean-Sbastien Blouin. Frequency-specific modulation of
vestibular-evoked sway responses in humans. Journal of Neurophysiol-
ogy, 103(2):1048–1056, 2010.
91
Bibliography
[6] Arnaud Delorme and Scott Makeig. Eeglab: an open source toolbox for
analysis of single-trial eeg dynamics including independent component
analysis. Journal of Neuroscience Methods, 134(1):9–21, 2004.
[8] Yaara Erez, Hadass Tischler, Anan Moran, and Izhar Bar-Gad. Gener-
alized framework for stimulus artifact removal. Journal of Neuroscience
Methods, 191(1):45–59, 2010.
[9] Richard C. Fitzpatrick and Brian L. Day. Probing the human vestibu-
lar system with galvanic stimulation. Journal of Applied Physiology,
96(6):2301–2316, 2004.
[10] Jun Gao, Yong Yang, Pan Lin, Pei Wang, and Chong Zheng. Automatic
removal of eye-movement and blink artifacts from eeg signals. Brain
Topography, 23:105–114, 2010.
92
Bibliography
[13] Ping He, Glenn Wilson, and Christopher Russell. Removal of ocular
artifacts from the eeg: a comparison between time-domain regression
method and adaptive filtering method using simulated data. Medical
and Biological Engineering and Computing, 45:495–503, 2007.
[16] Lennart Ljung. System Identification: Theory for the User (2nd Edi-
tion). Prentice Hall PTR, December 1998.
[17] Elie Lobel, Justus F. Kleine, Denis Le Bihan, Anne Leroy-Willig, and
Alain Berthoz. Functional mri of galvanic vestibular stimulation. Jour-
nal of Neurophysiology, 80(5):2699–2709, 1998.
93
Bibliography
94
Bibliography
[28] Gregory Martin Lee Son, Jean-Sbastien Blouin, and John Timothy In-
glis. Short-duration galvanic vestibular stimulation evokes prolonged
balance responses. Journal of Applied Physiology, 105(4):1210–1217,
2008.
95
non-invasive brain stimulation in neuropsychology. Neuropsychologia,
48(10):2789–2810, 2010.
96
Appendix A
The DS5 has been developed for the new and increasingly important field of
Clinical Nerve Excitability Studies 2 . These studies, including electrotonus
and threshold electrotonus, are giving us added understanding of human
nerve excitability and the pathophysiology of diseases such as diabetic neu-
ropathy, carpal tunnel syndrome (CTS), amyotrophic lateral sclerosis (ALS),
multifocal motor neuropathy (MMN), motor neurone disease (MND) taxol-
cisplatin neuropathy and neuromyotonia.
Multiple Applications
Although the DS5 has been primarily designed for clinical studies of periph-
eral nerves using threshold tracking techniques, because the unit provides
a current output proportional to the voltage input and can deliver up to
50mA (from a compliance voltage of greater than 100V), it should appeal
2
All the material in this appendix is from the Digitimer company’s website:
www.digitimer.com
97
Appendix A. DS5 Isolated Bipolar Constant Current Stimulator
Unlike other clinical stimulators, the DS5 is not a traditional square wave
pulse stimulator. Instead, the DS5 will produce an isolated constant current
stimulus proportional to a voltage applied at its input, with the shape of
the input waveform describing the shape of the stimulus. As a result, when
driven by a computer running appropriate software, the DS5 is capable
of generating a stimulus consisting of multiple components including sine
waves, ramps, square waves or totally arbitrary waveforms. Patient safety is
assured at all times by the implementation of safety features which, amongst
other things, also limit the amount of energy passed to the subject.
The DS5 has been developed in collaboration with Professor Hugh Bostock
at the Institute of Neurology in London, who uses the stimulator to facili-
tate the threshold tracking measurements alluded to above. Briefly, muscle
action potentials evoked by a test stimulus from the DS5 are amplified and
compared with a desired target response. The resultant error signal is used
to modulate the amplitude of the test stimulus. Once a baseline level of ex-
citability is established, conditioning pulses can be applied to examine their
effect on the excitability of the nerve being studied. By carrying out this
procedure using his own specialist software, diagnostic tests can be partially
automated and completed more rapidly.
98
Appendix A. DS5 Isolated Bipolar Constant Current Stimulator
The DS5 stimulator has four input voltage ranges: 1V, 2.5V, 5V and 10V
making it widely compatible with other hardware. There are three output
ranges: 10mA, 25mA and 50mA, with selection either by front panel con-
trols or Windows PC Control Software. On the rear of the device are two
BNC sockets, one accepting the voltage input waveform, the other provid-
ing a Monitor Output, allowing the stimulus waveform to be fed into a data
acquisition system so it can be recorded alongside your EMG data.
For more information about this device, please refer to the following link.
99
Appendix B
For this unit, the isolated output section is battery-powered and optically-
coupled to the input section, for the ultimate in clean isolation. Two
rechargeable batteries are utilized: a 9V battery that powers the control
circuitry, and a 12V battery that provides the signal power. Both recharge-
able batteries provides full function for at least 8 hours of continuous use.
3
All the material in this appendix is from the A-M Systems company’s website: www.a-
msystems.com
100
Appendix B. Model 2200 Analog Stimulus Isolator
For more information about this device, please refer to the following link.
http://www.a-msystems.com/s-139-analog-stimulus-isolator-model-2200.aspx
101
Appendix C
102
Appendix C. Matlab CNT Converter
% Outputs:
% cnt - structure with the continuous data
% cnt.header
% cnt.electloc
% cnt.data
% cnt.tag
%
% Authors: Sean Fitzgibbon, Arnaud Delorme, 2000-
%
% Note: function original name was load_scan41.m
103
Appendix C. Matlab CNT Converter
% $Log: loadcnt.m,v $
% Revision 1.21 2005/08/16 22:46:55 arno
% allowing to read event type 3
%
% Revision 1.20 2005/05/12 15:50:37 arno
% keypad modified by Andreas
%
% Revision 1.19 2004/11/23 17:08:57 hilit
% fixed a typo
%
% Revision 1.18 2004/09/14 23:31:57 arno
% dataformat
%
% Revision 1.17 2004/09/14 23:27:44 arno
% opening file as little endian
%
% Revision 1.16 2004/03/19 18:52:42 arno
% blockread msg
%
% Revision 1.15 2004/03/19 18:51:26 arno
% allowing blockread option
%
% Revision 1.14 2003/11/05 16:38:08 arno
% reading events for 32-bit data
%
% Revision 1.13 2003/10/30 19:41:01 arno
104
Appendix C. Matlab CNT Converter
if ~isempty(varargin)
r=struct(varargin{:});
else r = [];
end;
type=’cnt’;
105
Appendix C. Matlab CNT Converter
if nargin ==1
scan=0;
end
h.rev = fread(fid,12,’char’);
h.nextfile = fread(fid,1,’long’);
h.prevfile = fread(fid,1,’ulong’);
h.type = fread(fid,1,’char’);
h.id = fread(fid,20,’char’);
h.oper = fread(fid,20,’char’);
h.doctor = fread(fid,20,’char’);
h.referral = fread(fid,20,’char’);
h.hospital = fread(fid,20,’char’);
h.patient = fread(fid,20,’char’);
h.age = fread(fid,1,’short’);
h.sex = fread(fid,1,’char’);
h.hand = fread(fid,1,’char’);
h.med = fread(fid,20, ’char’);
h.category = fread(fid,20, ’char’);
h.state = fread(fid,20, ’char’);
h.label = fread(fid,20, ’char’);
h.date = fread(fid,10, ’char’);
h.time = fread(fid,12, ’char’);
h.mean_age = fread(fid,1,’float’);
106
Appendix C. Matlab CNT Converter
h.stdev = fread(fid,1,’float’);
h.n = fread(fid,1,’short’);
h.compfile = fread(fid,38,’char’);
h.spectwincomp = fread(fid,1,’float’);
h.meanaccuracy = fread(fid,1,’float’);
h.meanlatency = fread(fid,1,’float’);
h.sortfile = fread(fid,46,’char’);
h.numevents = fread(fid,1,’int’);
h.compoper = fread(fid,1,’char’);
h.avgmode = fread(fid,1,’char’);
h.review = fread(fid,1,’char’);
h.nsweeps = fread(fid,1,’ushort’);
h.compsweeps = fread(fid,1,’ushort’);
h.acceptcnt = fread(fid,1,’ushort’);
h.rejectcnt = fread(fid,1,’ushort’);
h.pnts = fread(fid,1,’ushort’);
h.nchannels = fread(fid,1,’ushort’);
h.avgupdate = fread(fid,1,’ushort’);
h.domain = fread(fid,1,’char’);
h.variance = fread(fid,1,’char’);
h.rate = fread(fid,1,’ushort’);
h.scale = fread(fid,1,’double’);
h.veogcorrect = fread(fid,1,’char’);
h.heogcorrect = fread(fid,1,’char’);
h.aux1correct = fread(fid,1,’char’);
h.aux2correct = fread(fid,1,’char’);
h.veogtrig = fread(fid,1,’float’);
107
Appendix C. Matlab CNT Converter
h.heogtrig = fread(fid,1,’float’);
h.aux1trig = fread(fid,1,’float’);
h.aux2trig = fread(fid,1,’float’);
h.heogchnl = fread(fid,1,’short’);
h.veogchnl = fread(fid,1,’short’);
h.aux1chnl = fread(fid,1,’short’);
h.aux2chnl = fread(fid,1,’short’);
h.veogdir = fread(fid,1,’char’);
h.heogdir = fread(fid,1,’char’);
h.aux1dir = fread(fid,1,’char’);
h.aux2dir = fread(fid,1,’char’);
h.veog_n = fread(fid,1,’short’);
h.heog_n = fread(fid,1,’short’);
h.aux1_n = fread(fid,1,’short’);
h.aux2_n = fread(fid,1,’short’);
h.veogmaxcnt = fread(fid,1,’short’);
h.heogmaxcnt = fread(fid,1,’short’);
h.aux1maxcnt = fread(fid,1,’short’);
h.aux2maxcnt = fread(fid,1,’short’);
h.veogmethod = fread(fid,1,’char’);
h.heogmethod = fread(fid,1,’char’);
h.aux1method = fread(fid,1,’char’);
h.aux2method = fread(fid,1,’char’);
h.ampsensitivity = fread(fid,1,’float’);
h.lowpass = fread(fid,1,’char’);
h.highpass = fread(fid,1,’char’);
h.notch = fread(fid,1,’char’);
108
Appendix C. Matlab CNT Converter
h.autoclipadd = fread(fid,1,’char’);
h.baseline = fread(fid,1,’char’);
h.offstart = fread(fid,1,’float’);
h.offstop = fread(fid,1,’float’);
h.reject = fread(fid,1,’char’);
h.rejstart = fread(fid,1,’float’);
h.rejstop = fread(fid,1,’float’);
h.rejmin = fread(fid,1,’float’);
h.rejmax = fread(fid,1,’float’);
h.trigtype = fread(fid,1,’char’);
h.trigval = fread(fid,1,’float’);
h.trigchnl = fread(fid,1,’char’);
h.trigmask = fread(fid,1,’short’);
h.trigisi = fread(fid,1,’float’);
h.trigmin = fread(fid,1,’float’);
h.trigmax = fread(fid,1,’float’);
h.trigdir = fread(fid,1,’char’);
h.autoscale = fread(fid,1,’char’);
h.n2 = fread(fid,1,’short’);
h.dir = fread(fid,1,’char’);
h.dispmin = fread(fid,1,’float’);
h.dispmax = fread(fid,1,’float’);
h.xmin = fread(fid,1,’float’);
h.xmax = fread(fid,1,’float’);
h.automin = fread(fid,1,’float’);
h.automax = fread(fid,1,’float’);
h.zmin = fread(fid,1,’float’);
109
Appendix C. Matlab CNT Converter
h.zmax = fread(fid,1,’float’);
h.lowcut = fread(fid,1,’float’);
h.highcut = fread(fid,1,’float’);
h.common = fread(fid,1,’char’);
h.savemode = fread(fid,1,’char’);
h.manmode = fread(fid,1,’char’);
h.ref = fread(fid,10,’char’);
h.rectify = fread(fid,1,’char’);
h.displayxmin = fread(fid,1,’float’);
h.displayxmax = fread(fid,1,’float’);
h.phase = fread(fid,1,’char’);
h.screen = fread(fid,16,’char’);
h.calmode = fread(fid,1,’short’);
h.calmethod = fread(fid,1,’short’);
h.calupdate = fread(fid,1,’short’);
h.calbaseline = fread(fid,1,’short’);
h.calsweeps = fread(fid,1,’short’);
h.calattenuator = fread(fid,1,’float’);
h.calpulsevolt = fread(fid,1,’float’);
h.calpulsestart = fread(fid,1,’float’);
h.calpulsestop = fread(fid,1,’float’);
h.calfreq = fread(fid,1,’float’);
h.taskfile = fread(fid,34,’char’);
h.seqfile = fread(fid,34,’char’);
h.spectmethod = fread(fid,1,’char’);
h.spectscaling = fread(fid,1,’char’);
h.spectwindow = fread(fid,1,’char’);
110
Appendix C. Matlab CNT Converter
h.spectwinlength = fread(fid,1,’float’);
h.spectorder = fread(fid,1,’char’);
h.notchfilter = fread(fid,1,’char’);
h.headgain = fread(fid,1,’short’);
h.additionalfiles = fread(fid,1,’int’);
h.unused = fread(fid,5,’char’);
h.fspstopmethod = fread(fid,1,’short’);
h.fspstopmode = fread(fid,1,’short’);
h.fspfvalue = fread(fid,1,’float’);
h.fsppoint = fread(fid,1,’short’);
h.fspblocksize = fread(fid,1,’short’);
h.fspp1 = fread(fid,1,’ushort’);
h.fspp2 = fread(fid,1,’ushort’);
h.fspalpha = fread(fid,1,’float’);
h.fspnoise = fread(fid,1,’float’);
h.fspv1 = fread(fid,1,’short’);
h.montage = fread(fid,40,’char’);
h.eventfile = fread(fid,40,’char’);
h.fratio = fread(fid,1,’float’);
h.minor_rev = fread(fid,1,’char’);
h.eegupdate = fread(fid,1,’short’);
h.compressed = fread(fid,1,’char’);
h.xscale = fread(fid,1,’float’);
h.yscale = fread(fid,1,’float’);
h.xsize = fread(fid,1,’float’);
h.ysize = fread(fid,1,’float’);
h.acmode = fread(fid,1,’char’);
111
Appendix C. Matlab CNT Converter
h.commonchnl = fread(fid,1,’uchar’);
h.xtics = fread(fid,1,’char’);
h.xrange = fread(fid,1,’char’);
h.ytics = fread(fid,1,’char’);
h.yrange = fread(fid,1,’char’);
h.xscalevalue = fread(fid,1,’float’);
h.xscaleinterval = fread(fid,1,’float’);
h.yscalevalue = fread(fid,1,’float’);
h.yscaleinterval = fread(fid,1,’float’);
h.scaletoolx1 = fread(fid,1,’float’);
h.scaletooly1 = fread(fid,1,’float’);
h.scaletoolx2 = fread(fid,1,’float’);
h.scaletooly2 = fread(fid,1,’float’);
h.port = fread(fid,1,’short’);
h.numsamples = fread(fid,1,’ulong’);
h.filterflag = fread(fid,1,’char’);
h.lowcutoff = fread(fid,1,’float’);
h.lowpoles = fread(fid,1,’short’);
h.highcutoff = fread(fid,1,’float’);
h.highpoles = fread(fid,1,’short’);
h.filtertype = fread(fid,1,’char’);
h.filterdomain = fread(fid,1,’char’);
h.snrflag = fread(fid,1,’char’);
h.coherenceflag = fread(fid,1,’char’);
h.continuoustype = fread(fid,1,’char’);
h.eventtablepos = fread(fid,1,’ulong’);
h.continuousseconds = fread(fid,1,’float’);
112
Appendix C. Matlab CNT Converter
h.channeloffset = fread(fid,1,’long’);
h.autocorrectflag = fread(fid,1,’char’);
h.dcthreshold = fread(fid,1,’uchar’);
for n = 1:h.nchannels
e(n).lab = fread(fid,10,’char’);
e(n).reference = fread(fid,1,’char’);
e(n).skip = fread(fid,1,’char’);
e(n).reject = fread(fid,1,’char’);
e(n).display = fread(fid,1,’char’);
e(n).bad = fread(fid,1,’char’);
e(n).n = fread(fid,1,’ushort’);
e(n).avg_reference = fread(fid,1,’char’);
e(n).clipadd = fread(fid,1,’char’);
e(n).x_coord = fread(fid,1,’float’);
e(n).y_coord = fread(fid,1,’float’);
e(n).veog_wt = fread(fid,1,’float’);
e(n).veog_std = fread(fid,1,’float’);
e(n).snr = fread(fid,1,’float’);
e(n).heog_wt = fread(fid,1,’float’);
e(n).heog_std = fread(fid,1,’float’);
e(n).baseline = fread(fid,1,’short’);
e(n).filtered = fread(fid,1,’char’);
e(n).fsp = fread(fid,1,’char’);
e(n).aux1_wt = fread(fid,1,’float’);
e(n).aux1_std = fread(fid,1,’float’);
e(n).senstivity = fread(fid,1,’float’);
113
Appendix C. Matlab CNT Converter
e(n).gain = fread(fid,1,’char’);
e(n).hipass = fread(fid,1,’char’);
e(n).lopass = fread(fid,1,’char’);
e(n).page = fread(fid,1,’uchar’);
e(n).size = fread(fid,1,’uchar’);
e(n).impedance = fread(fid,1,’uchar’);
e(n).physicalchnl = fread(fid,1,’uchar’);
e(n).rectify = fread(fid,1,’char’);
e(n).calib = fread(fid,1,’float’);
end
114
Appendix C. Matlab CNT Converter
if strcmpi(r.dataformat, ’int16’)
startpos = r.t1*h.rate*2*h.nchannels;
else startpos = r.t1*h.rate*4*h.nchannels;
end;
if isempty(r.ldnsamples)
if ~isempty(r.lddur)
r.ldnsamples = round(r.lddur*h.rate);
else r.ldnsamples = nums;
end;
end;
% channel offset
% --------------
if ~isempty(r.blockread)
h.channeloffset = r.blockread;
end;
if h.channeloffset > 1
fprintf(’WARNING: reading data in blocks of %d,
if this fails, try using option "’’blockread’’, 1"\n’);
end;
115
Appendix C. Matlab CNT Converter
counter = 1;
while counter*h.channeloffset < r.ldnsamples
dat(:, counter*h.channeloffset+1:
counter*h.channeloffset) = ...
fread(fid, [h.channeloffset h.nchannels]
, r.dataformat)’;
counter = counter + 1;
end;
end;
%ftell(fid)
if strcmpi(r.scale, ’on’)
disp(’Scaling data .....’)
%%% scaling to microvolts
for i=1:h.nchannels
bas=e(i).baseline;
sen=e(i).senstivity;cal=e(i).calib;
116
Appendix C. Matlab CNT Converter
mf=sen*(cal/204.8);
dat(i,:)=(dat(i,:)-bas).*mf;
end
end
if eT.teeg==2
nevents=eT.size/sizeEvent2;
if nevents > 0
ev2(nevents).stimtype = [];
for i=1:nevents
ev2(i).stimtype = fread(fid,1,’ushort’);
ev2(i).keyboard = fread(fid,1,’char’);
temp = fread(fid,1,’uint8’);
ev2(i).keypad_accept = bitand(15,temp);
ev2(i).accept_ev1 = bitshift(temp,-4);
ev2(i).offset = fread(fid,1,’long’);
ev2(i).type = fread(fid,1,’short’);
ev2(i).code = fread(fid,1,’short’);
117
Appendix C. Matlab CNT Converter
ev2(i).latency = fread(fid,1,’float’);
ev2(i).epochevent = fread(fid,1,’char’);
ev2(i).accept = fread(fid,1,’char’);
ev2(i).accuracy = fread(fid,1,’char’);
end
else
ev2 = [];
end;
elseif eT.teeg==3
nevents=eT.size/sizeEvent3;
if nevents > 0
ev2(nevents).stimtype = [];
if r.dataformat == ’int32’
bytes_per_samp = 4;
else
bytes_per_samp = 2;
end
for i=1:nevents
ev2(i).stimtype = fread(fid,1,’ushort’);
ev2(i).keyboard = fread(fid,1,’char’);
temp = fread(fid,1,’uint8’);
ev2(i).keypad_accept = bitand(15,temp);
ev2(i).accept_ev1 = bitshift(temp,-4);
os = fread(fid,1,’ulong’);
ev2(i).offset = os * bytes_per_samp * h.nchannels;
ev2(i).type = fread(fid,1,’short’);
ev2(i).code = fread(fid,1,’short’);
118
Appendix C. Matlab CNT Converter
ev2(i).latency = fread(fid,1,’float’);
ev2(i).epochevent = fread(fid,1,’char’);
ev2(i).accept = fread(fid,1,’char’);
ev2(i).accuracy = fread(fid,1,’char’);
end
else
ev2 = [];
end;
elseif eT.teeg==1
nevents=eT.size/sizeEvent1;
if nevents > 0
ev2(nevents).stimtype = [];
for i=1:nevents
ev2(i).stimtype = fread(fid,1,’ushort’);
ev2(i).keyboard = fread(fid,1,’char’);
ev2(i).offset = fread(fid,1,’long’);
end;
else
ev2 = [];
119
Appendix C. Matlab CNT Converter
end;
else
disp(’Skipping event table (tag != 1,2,3 ;
theoritically impossible)’);
ev2 = [];
end
end
f.header = h;
f.electloc = e;
f.data = dat;
f.Teeg = eT;
f.event = ev2;
f.tag=t;
120
Appendix C. Matlab CNT Converter
frewind(fid);
fclose(fid);
121
Appendix D
Extended-Infomax ICA
Algorithm
tion of input data using the logistic infomax ICA algorithm of Bell Sejnowski
(1995) with the natural gradient feature of Amari, Cichocki and Yang, or
Authors:
Scott Makeig with contributions from Tony Bell, Te-Won Lee, Tzyy-Ping
Reference:
Makeig, S., Bell, A.J., Jung, T-P and Sejnowski, T.J., ”’Independent com-
122
Appendix D. Extended-Infomax ICA Algorithm
Toolbox Citation:
http://www.sccn.ucsd.edu/eeglab
http://www.sccn.ucsd.edu/eeglab/icafaq.html
http://www.cnl.salk.edu/ tony/ica.html
under the terms of the GNU General Public License as published by the
123