Modeling, Optimization and Validation for Brain Stimulation A Thesis Presented by Kimia Shayestehfard to The Department of Electrical and Computer Engineering in partial fulfillment of the requirements for the degree of Master of Science in Electrical and Computer Engineering Northeastern University Boston, Massachusetts April 2018
66
Embed
Modeling, optimization and validation for brain stimulation · Modeling, Optimization and Validation for Brain Stimulation A Thesis Presented by Kimia Shayestehfard to The Department
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Modeling, Optimization and Validation for Brain Stimulation
A Thesis Presented
by
Kimia Shayestehfard
to
The Department of Electrical and Computer Engineering
Therefore using optimization techniques to find the appropriate electrode configuration and the
optimum current injection pattern for reaching to the maximum electric field in the region of interest
(ROI) is crucial. However even by applying optimization techniques, due to the thresholds on the
3
CHAPTER 1. INTRODUCTION
maximum current injected to each electrode and total injected current, tACS can only stimulate
superficial regions of the brain.
1.1.3 Finite Element Method (FEM)
In order to better understand and design both ECoG and tCS stimulation strategies, it is
helpful to develop tools to simulate how injected currents travel through the brain. We can write
the general equations that describe the underlying physics, but to calculate simulations we need
a numerical solver to predict the spatial distribution of unknown quanities such current density,
electric potential, and electric field. There are many numerical solvers available, including the
Boundary Element Method, the Finite Element Method, the Finite Volume Method, and the Finite
Difference Method, for this purpose. The Finite Element Method is the most common one and we
used this method in our model building in this work. Using the Finite Element Method (FEM), we
approximated the unknown values such as current density or electric field distribution by discretization
of our physiological / geometric model and numerically solving the governing equations.
In more detail, we used a quasi-static approximation and used Laplace/Poisson equations and
boundary approximation to estimate the electric field in our mode.
The relationship between electric field E and scalar potential φ is given as:
E = −∇φ (1.1)
Assuming that there is no interior current source in the head equation ?? we have:
∇.σ∇φ = 0 (1.2)
This equation stating that the sum of currents going out from any point is zero. In order to solve
the above Laplace equation, we used the FEM to approximate electrical field numerically. For this
purpose we discretized the domain into volume elements and defined boundary conditions [27].
Assuming I denotes a vector of all electrode currents and I denotes an array of electrode currents
excluding the reference electrode, one obtains
I = [I1, I2, ..., IM−1, IM ]
I = [I1, I2, ..., IM−1]
Since currents must sum to 0, there are only M-1 free current variables and it is convenient for the
4
CHAPTER 1. INTRODUCTION
sequel to define IM = −∑i=M−1
i=1 Ii.
The electric field difference at the electrodes can be simply calculated as E(i) − E(M) = li,M ,
where E(i) and E(M) denote electric field at electrode i and M respectively. To make the solution
to Laplace’s equation unique we need to pick a common reference. For convenience we chose the
M th electrode, the one that we left out of vector I , as the reference and li,M denotes lead vector.
Calculating the lead vectors over the elements centers in the head space, results in a lead field vector
LiM ∈ R3×N where N is the number of source space elements. Therefore by fixing the last electrode
as the reference electrode, the lead field matrix becomes L = [L2,M , L3,M , ..., LM−1,M ] where
the lead field matrix size is L ∈ R3(M−1)×N . The electric fields on the center of elements can be
calculated as
Eelements = LI (1.3)
1.2 Scope and organization of this thesis
The overall scope of this thesis is to do modeling, optimization and validation for brain
stimulation. In chapter 2 we describe our work to validate simulations of ECoG stimulation on a
FEM-based human head model.This analysis could give us a better understanding of how reliable
our FEM model is. Having an accurate model could help us to modulate the stimulation effects
in the brain. Moreover, for optimization purposes, (e.g. finding the optimum current injection
pattern for stimulating a specific region in the brain), we can calculate our optimization results on
our model. We describe two ECoG datasets, from two different subjects, that were provided to
us by our collaborators; these are high quality data from clinical implementation of ECoG grids.
We then describe our method to extract meaningful information through our clinical data that we
can compare against our FEM model to validate it. Th clinical data sets were provided to us by
Prof. Jeffery Ojemann and his group members, David J Caldwell and Jeneva Cornin at Department
of Neurological Surgery, University of Washington. For building the FEM-based head model and
visualization of the results we used open source software ( SCIRunand map3d) and the head model
was generated by Moritz Dannhauer To the best of our knowledge, there have been a few reports
on validation of finite element models of transcranial current stimulation and transcranial magnetic
stimulation [29, 10] but no reports have been published on validation of FEM based models for
ECoG grids stimulation.
In Chapter 3 we investigate a very recent non-invasive method proposed by Grossman et.
al [19] to stimulate deep regions in the brain without stimulating overlying regions. The idea is
5
CHAPTER 1. INTRODUCTION
to deliver multiple electric fields at high frequencies that are out of neuron firing range, such that
their intersection creates a ”low frequency” amplitude modulation envelope within the range that
they report experimentally was able to modulate neural firing. Thus the promise of this method is
that we may be able to electrically stimulate neurons if we have an amplitude larger than a specific
threshold of this envelope. They called their method stimulation by ”temporal interference” (TI).
If we have a strong TI effect in deep areas of the brain, then we could stimulate these deep regions
without stimulating overlying regions.
To the best of our knowledge [19] is the only publication to date on II stimulation.
The authors concentrated on a mouse model, reporting extensive experimental results and a few
simulations. There is also a recent paper posted on arXiv, as far as we know not yet publishd, called
”Noninvasive Dynamic Patterns of Neurostimulation using Spatio-Temporal Interference” [7] that
combines optimization with the TI idea to suggest how to optimally stimulate deep regions of the
brain. They built a Hodgkin-Huxley model for a neuron to determine firing threshold as a function of
envelope frequency and a model of current dispersion in the head and used multi-electrode-pairs for
stimulating the region of interest (ROI), while leveraging very strong symmetry assumptions. Also
they replaced electrode pairs with a “patch” of multiple electrode-pairs, with each electrode- pair in
each patch generating currents of the same frequency. By applying an optimization algorithm they
then found find the minimum injected current for stimulating a central ROI in their model.
In Chapter 3 we formulate, solve and test a significantly more general multi-constraint optimization
problem that provide stimulus patterns to maximize the amplitude of the TI electric field envelope
modulation in the targeted region. We tested our simulations on a finite element (FE) multi-electrode
spherical model. Moreover we applied safety constraints that matches with clinical experiments safety
criteria. We describe and analyze the objective function we optimize along with the constraints we
impose to encourage focality as well as ensure safety, and then present and discuss our optimization
results. Finally in Chapter 4 we talk about future directions and conclusion of works we have done in
this thesis.
6
Chapter 2
Evaluation of finite element model of
Electrocorticography
2.1 Introduction
Electrocorticography (ECoG) stimulation uses electrode arrays surgically implanted on the
cortical surface to stimulate the brain. These arrays can be used to both record brain electrical activity
from the cerebral cortex and to inject current through the same electrodes in order to modulate
brain activity They can be used for mapping of brain function for pre-surgical planning and also
for rehabilitation and brain-computer interfaces, both of which are useful in several applications.
However little is known about the spatial pattern in which current injected by these arrays flow
through the cortex or how these patterns affect brain activity.
Having an appropriate model could help us to modulate the stimulation effects in the
brain. Moreover, for optimization purposes, (e.g. finding the optimum current injection pattern for
stimulating a region of interest (ROI) in the brain), we do the analysis on our model. Therefore Model
validation could help us to understand how reliable our model is, which is useful since these models
are widely used in simulating brain activity, stimulation effects and current distribution pattern. In
this chapter, we will present analysis of human ECoG arrays recordings data and comparisons to
finite element-based human head model predictions. The data were provided to us by the University
of Washington team as mentioned in Section 1.2. We have multipoint measurements using clinical
electrocorticography (ECoG) grids, strips and depth electrodes for 2 human subjects, denoted here
7
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
Case 1 and Case 21 For each stimulus epoch, one pair of electrodes was chosen for stimulation with
biphasic, bipolar, constant-current pulses, while voltages were recorded on all the non-stimulating
electrodes.
We note that in the particular datasets chosen for analysis here, the pulses were long
enough that we consistently saw relatively “flat” signals on both positive and negative phases of the
pulses. This is important because we use linear and quasistatic assumptions in our modeling and
thus want to extract a single amplitude number per measurement channel for a particular stimulation
electrode pair If we use stimulations with short pulse widths, the voltage signals on the measurement
electrodes do not look ”flat”; evidently there are capacitive effect with time constants that are too
long to saturate during the half-pulses. Figure 2.1 clearly shows the impact of stimulation duration
on recorded voltage shape.
(a) Stimulus pulse width is 0.4 ms. (b) Stimulus pulse width is 2.4 ms.
Figure 2.1: Stimulus pulse duration effect on recorded data shape.
Figure 2.2 shows the geometry of the electrodes for Case 1 and Figure 2.3 shows the
geometry of the electrodes for Case 2. These figures are created by Nile Wilson. They were created
using clinical magnetic resonance imaging (MRI) and computed tomography (CT) scan images. The
cortical reconstructions were completed using previously described techniques ( [5], [35], [21]).1For reference, the case numbers in the Unversity of Washington system are StimulationDepths 2fd831 and
StimulationSpacing 20f8a3
8
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
Figure 2.2: Montage of the electrodes in Case 1.
(a) (b)
(c) (d)
Figure 2.3: Montage of the electrodes in Case 2.
9
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
The rest of the chapter is organized as follows. In Section 2.2, we explain the methods
we used for information extraction. Section 2.3 reports on analysis of experimental data sets. In
Section 2.4, we will present comparisons against FEM simulation results and in Section 2.5 we
include some additional data analysis plots.
2.2 Methods
In this section, we present details of how the clinical data were acquired and the data
analysis methods we used.
2.2.1 Clinical data
The clinical data were acquired with a Tucker Davis Technologies (TDT) System 3 with the
RZ5D and PZ5Neurodigitizer. The stimulation was delivered through the TDT IZ2H-16 stimulator
and LZ48-400 battery pack. The experiments were done with patients with intractable epilepsy who
underwent neurosurgery and temporary electrode placement for clinical monitoring. They remaind
in the hospital for about 1 week post implantation. Initially they were taken off anti-epileptic drugs
to enhance seizure and spike mapping. The stimulation studies was only carried out once they were
back on these medications; usually 6 or 7 days after the initial electrode implant and typcally 1 day
before the electrode removal.
It was always emphasized to patients that the ECoG grid placement was determined based on only
clinical needs and not based on research interests.
In all the data sets analyzed here, the injected current contained a train of 10 biphasic
pulses with 2.4 ms pulse width and 120 ms inter-pulse gap. This gap is the time between end of
one pulse and start of next. Peak-to-peak amplitude was 1 mA. In both cases the sampling rate was
12.207 kHz.
In Case 1, we have 5 data sets obtained by stimulating different electrode pairs. All
stimulus channels were selected from grid electrodes. In Case 2, we have 4 data sets obtained by
choosing different electrode pairs for stimulation purposes. In all the data sets for Case 2, one
stimulus channel was selected from grid electrodes and the other from depth electrodes. As our data
was noisy, we needed to do some pre-processings to improve signal conditioning. In particular there
was a large DC offset on the signals. By subtracting the mean of each signal we were able to remove
10
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
this effect.
V i(t) = V ioffset(t)− V
ioffset(t) (2.1)
where i denotes the electrode number, V i denotes the voltage after DC offset removal, V ioffset
denotes the voltage with DC offset and V ioffset represent the average of voltage on each channel,
and t is time. All the data had similar offests , so we illustrate the signal with DC offset and without
DC offset one specific stimulus pair from Case 1 in Figure 2.4 .
(a) Signal with DC offset. (b) Signal after DC offset removal
Figure 2.4: Case 1 with source electrode ]12 and sink electrode ]20
2.2.2 Data analysis
In Case 1 we had 5 data sets obtained by recording brain activity during current injection
with different pairs of electrodes used to deliver the stimulus. There were 128 electrodes in total,
including two electrode grids, one of which had 32 electrodes and the other 16. We only used these
48 grid electrodes in this analysis since the rest of the electrodes were disconnected. In Case 2 we
have 4 data sets. There were 128 electrodes in total, including two electrode grids. Each had 32
electrodes, 32 depth electrodes and 32 strips electrodes. Information related to electrode types in
Figure 2.3 is in Figure 2.12. In each experiment, we wanted to extract two meaningful numbers
per channel, one positive and one negative number, to be compared with our finite element analysis
(FEA) results. For this purpose we averaged all the positive phase samples together and we did the
same thing with all negative phase samples during each current injection pulse.
11
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
Figure 2.5: Idealized stimulus current for one pulse.
For our analysis, we selected the relatively flat parts of both positive and negative phase
half-pulses. To do this, we selected 9 samples in each half-pulse, from the 3rd sample to the 11th
sample, based on an overall visual analysis of the duration of the transient effects at the start and end
of each half-pulse. We considered only these samples and rejected the first and last two samples in
each half pulse, which typically were not close to flat. Figure 2.6 illustrates why we ignored the first
two and the last two samples of each pulse in our analysis.
Figure 2.6: Voltage recorded during one stimulating pulse.
The mathematical representation of the procedure we took for data analysis is as follows.
Tstep = Tgap + Tpulse (2.2)
12
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
Where Tgap = 120 ms is the inter-pulse gap, Tpulse = 2.4 ms is the pulse duration and Tstep
represents the pulse repetition period, the time between start of one pulse and start of the next.
Vifirst =
1
n
k=10∑k=1
ts+T2− 2
fs+(k−1)(Tstep)∑
ts+3fs
+(k−1)(Tstep)
V i(t) (2.3)
Visecond =
1
nVifirst =
1
n
k=10∑k=1
ts+T− 2fs
+(k−1)(Tstep)∑ts+
T2+ 3
fs+(k−1)(Tstep)
V i(t) (2.4)
In equation 2.3 and 2.4, ts denotes the moment that we start stimulation, fs is the sampling
frequency , k is the pulse order (we had a train of 10 stimulus pulses), n is the number of samples
which we averaged over per pulse, V ifirst is the average of all samples during the first half-pulses
stimulation and V isecond is the average of all sample during the second half-pulse stimulation.
Additionally we quantified the reliability of the results by computing not only the average
amplitude of each channel but also the ratio of average of samples over their standard deviation for
both positive and negative phase half-pulses. In equation 2.7 and equation 2.8, Rifirst and Risecondindicate these ratios for each electrode and first and second half-pulses.
sifirst =
√√√√√√ 1
n
k=10∑k=1
T2− 2
fs+k(Tstep)∑
ts+3fs
+k(Tstep)
(V i(t)− V ifirst)
2 (2.5)
sisecond =
√√√√√√ 1
n
k=10∑k=1
T− 2fs
+k(Tstep)∑ts+
T2+ 3
fs+k(Tstep)
(V i(t)− V isecond)
2 (2.6)
sfirst and ssecond are the standard deviation for the n samples in first half pulses and half pulses,
respectively.
Rifirst =Vifirst
sifirst(2.7)
Risecond =Visecond
sisecond(2.8)
We also looked at which electrode, for a given stimulation pair location, had the strongest amplitude.
This pattern was not obvious, so to try to approximate the observed effect, with the thought that
13
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
perhaps this as a purely geometric effect, we devised an algorithm to try to predict the channel with
the greatest amplitude average. Our insight was that when we averaged positive pulses and negative
pulses, the largest magnitudes typically belonged to the electrodes, which were in the neighborhood
of one stimulation channel but relatively far from the other one. Hence in our algorithm we considered
only these electrodes. Let ea represent the active stimulation channel and eg represent the ground
channel, and N represent the 4-neighborhood of both stimulation channels.
Algorithm 1: Estimating the magnitude of the difference between the distances ofeach electrode from stimulus electrode pair
for ∀j ∈ N do
d1 = ‖di − dea‖22
d2 =∥∥di − deg∥∥22
relative dj = |d1− d2|end
We define relative dj as the magnitude of the difference between the distances of each
electrode in N from the two stimulation channels. In our algorithm, the electrode that had the
highest relative dj is the candidate for having the greatest averaged amplitude. Finally we calcu-
lated the noise power on each electrode to see if amplitude strength corresponds to noise power or not.
2.3 Data Analysis
Here we present the results of implementation of the methods discussed in 2.2 and our
analysis. A summary of all results for Case 1 and Case 2 are provided in Table 2.1 and Table 2.2, re-
spectively. In both Table 2.1 and Table 2.2 we define the ”Strongest Channel” as the channel, imax=i
for max(V ifirst), and ”algorithm candidate for the strongest channel”, jmax=j for max(V j
algorithm)
, as the channel, which based on our algorithm we might expect to be the strongest channel. In
column ]6 we report the channel with the highest noise power. Column ]7 and column ]8 represent
Rimaxfirst and Rjmax
first, respectively. We considered the results obtained from first-half pulses for our
analysis since the results for second-half pulses were the essentially the same, just the sign for the
values was different.
14
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
Stimulus Source Sink imax jmax Channel with Rimaxfirst Rjmax
first
Pair ] electrode ] electrode ] the highest
noise power
1 12 20 4 4 17 44.28 44.28
2 20 21 22 22 17 1.99 1.99
3 18 23 22 17 17 1.98 1.99
4 19 22 23 18 17 1.99 1.99
5 4 28 29 3 17 1.99 1.98
Table 2.1: Case 1
Stimulus Source Sink imax jmax Channel with Rimaxfirst Rjmax
first
Pair ] electrode ] electrode ] the highest
noise power
1 121 63 122 122 64 1.98 2.27
2 55 121 122 122 29 1.98 1.98
3 63 121 122 122 64 1.98 1.70
4 121 55 122 122 29 1.98 1.98
Table 2.2: Case 2
We note that in Table 2.1 our algorithm corresponds to the channel with the strongest
amplitude for row ]1 and row ]2, while for the other 3 rows our algorithm picked a channel adjacent
to the stimulation electrode while the channel with the largest estimated amplitude. Across the
entire experiment channel ]17 had the highest noise power. In Case 2 in all four experiments our
algorithmic choice corresponded to the channel with the strongest amplitude.
To illustrate the spatial distribution of the noise over the array, Figure 2.7 and Figure 2.8
visualize the noise power in grid electrodes for Case 1 and Case 2, respectively using the map3D
software. Note that in these figures we replace the noise power of stimulation channels with one of
their neighborhood channels for visualization purposes since on stimulation channels the recorded
signal is purely noise .
15
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) Active channel is e]12 and ground channel is e]20. (b) Active channel is e]20 and ground channel is e]21.
(c) Active channel is e]18 and ground channel is e]23. (d) Active channel is e]19 and ground channel is e]22.
(e) Active channel is e]4 and ground channel is e]28.
Figure 2.7: Estimation of noise power as a function of electrode number visualized in map3D for the 5different stimulation pairs for Case 1
16
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) Active channel is e]121 and ground channel is e]63. (b) Active channel is e]63 and ground channel is e]121.
(c) Active channel is e]121 and ground channel is e]55. (d) Active channel is e]55 and ground channel is e]121.
Figure 2.8: Estimation of noise power as a function of electrode number for the 4 different stimulation pairsfor Case 2
Figure 2.7 and Figure 2.8 confirm that the noise was not a function of stimulus location
and Figure 2.7 shows that there was a systematic region of the array that was more noisy, perhaps
due to weaker contacts, interference, or noise in an amplifier bank.
We cannot show the the mean amplitude and the standard deviation and the ratio of these
two factors in each positive phase samples and the negative phase samples for all channels, since
we have far too many data samples and channels. Figure 2.9 and Figure 2.10 show two plots per
stimulation pair in the strongest channels which have the highest mean amplitude and relatively low
variation in Case1 and Case2, respectively. The first row shows the mean amplitude and the standard
deviation of the samples and the second row shows the ratio of mean to standard deviation during
each half-pulse.
17
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) 4, 12− 20 (b) 4, 12− 20
(c) 22, 20− 21 (d) 22, 20− 21
(e) 23,19− 22 (f) 23, 19− 22
Figure 2.9: Figures in the left column show mean and standard deviation for each half pulse while figures inthe right column show the ratio of mean value to standard deviation for each half pulse. Each panel’s captionrepresents the electrode and stimulation pair as ], ]− ] respectively.
18
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) 22, 18− 23 (b) 22, 18− 23
(c) 29, 4− 28 (d) 29, 4− 28
Figure 2.9: Figures in the left column show mean and standard deviation for each half pulse while figures inthe right column show the ratio of the mean value to the standard deviation for each half pulse. Each panel’scaption-caption represents electrode and stimulation pair as ], ]− ] respectively.
19
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(e) 122, 121− 63 (f) 122, 121− 63
(g) 122, 63− 121 (h) 122, 63− 121
Figure 2.10: Figures in the left column indicate standard deviation and mean value for each half pulse whilefigures in the right column indicate the ratio of mean value to the standard deviation for each half pulse. Eachpanel’s sub-caption represents electrode and stimulation pair as ], ]− ] respectively.
20
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) 122, 55− 121 (b) 122, 55− 121
(c) 122, 121− 55 (d) 122, 121− 55
Figure 2.10: Figures in the left column indicate standard deviation and mean value for each half pulse andfigures in the right column indicate ratio of the mean value to the standard deviation for each half pulse. Eachpanel’s sub-caption represents electrode and stimulation pair as ], ]− ] respectively.
2.4 Evaluation of FEM based head model building
Figure 2.11 shows the average electric potential on each electrode during the stimulus
pulses compared to the FEA computations. In the FEA model the active channel was stimulated with
positive current amplitude and the ground was stimulated with negative value of current, so to make
the comparison more accurate, we compare FEA simulation results obtained by averaging the odd
(first) half pulses which had the same polarity as the stimulation channels. In Figure 2.11(e) we can
see the clinical data and simulation results in Case 1 with different stimulus electrode pairs. We can
see that generally there is a good agreement between the experiment and the simulation, except on a
few channels. Some of these less accurately simulated electrodes were adjacent to the stimulation
channels but this is not the case for all electrodes in the neighbourhood of stimulus channels. In
21
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
Figure 2.7 we observed that the 8× 2 grid, comprising electrodes ]33 to ]48, had the smallest values
of noise power in Case 1. Interestingly, they all also showed good agreement when we compared the
experimental results and FEM based simulation results.
22
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(e) Active channel is e]12 and ground channel is e]20. (f) Active channel is e]20 and ground channel is e]21.
(g) Active channel is e]19 and ground channel is e]22.
(h) Active channel is e]18 and ground channel is e]23. (i) Active channel is e]4 and ground channel is e]28.
Figure 2.11: The average electric potential on each electrode during the stimulus pulses compared to the FEAcomputations.
We tested a number of other factors that might have predicted which electrods were more
/ less accurately simulated in the FEM, including the degree to which the pulse tops and bottoms
23
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
were constant or had increasing / decreasing amplitude during the pulses as well as the residuals with
respect to both the mean and a linear fit during the half-pulses, but we did not found any behavior
that seemed to consistently correlate with the FEA agreement error.
2.5 Appendix
The figure below was provided to us to reportthe electrode types in Figure 2.3 for Case 2.
Figure 2.12: Information about electrode types in Case 2.
Here we included some additional figures of noise power and some noisy channels of each
data set, which have a relatively high variation among the mean values of the pulses. Note that y-axis
range is not similar in Figure 2.14
24
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) Active channel is e]12 and ground channel is e]20. (b) Active channel is e]20 and ground channel is e]21.
(c) Active channel is e]18 and ground channel is e]23. (d) Active channel is e]19 and ground channel is e]22.
(e) Active channel is e]4 and ground channel is e]28.
Figure 2.13: Estimation of noise power as a function of electrode number for the 5 different stimulation pairsin Case 1
25
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) Active channel is e]121 and ground channel is e]63. (b) Active channel is e]63 and ground channel is e]121.
(c) Active channel is e]121 and ground channel is e]55. (d) Active channel is e]55 and ground channel is e]121.
Figure 2.14: Estimation of noise power as a function of electrode number for the 4 different stimulation pairsin Case 2
26
CHAPTER 2. EVALUATION OF FINITE ELEMENT MODEL OF ELECTROCORTICOGRAPHY
(a) Active channel is e]12 and ground channel is e]20. (b) Active channel is e]20 and ground channel is e]21.
(c) Active channel is e]18 and ground channel is e]23. (d) Active channel is e]19 and ground channel is e]22.
(e) Active channel is e]4 and ground channel is e]28.
Figure 2.15: Visualization of spatial distribution of noise power as a function of electrode locaation usingmap3D, for the 5 different stimulation pairs in Case 1.
27
Chapter 3
Optimization of temporal interfering
current injection patterns
3.1 Introduction
As described briefly in the introduction to this thesis, transcranial current stimulation (tCS)
is a noninvasive brain stimulation technique in which weak, constant or time-varying electrical
currents are applied to the brain through the scalp. The tCS family of modaliies (tDCS, tACS,
tRNS) use scalp electrodes with electrode current intensity to area ratios of about 0.3–5 A/m2 at
low frequencies (typically < 0.5 kHz) resulting in weak induced electric fields in the brain, with
amplitudes of about 0.2–2 V/m [32]. There are many different factors influencing these cortical
current flow fields such as electrode size, location, model specifications, skull defects and lesions in
brain tissue [8, 9]. Conventional methods of using relatively large bipolar electrode montages (with
an area of 35 cm2 induce a broad cortical current flow field with the large intensities often located in
the non-target brain regions [12]). Although the effect of tCS in clinical studies is proven, due to the
poor focality in stimulating only a specific region, it is unclear whether these effects are driven by
stimulating the targeted region or non-targeted region. We face this issue especially in cases where
the region of interest (ROI) is located in deep brain regions. One approach for targeting the ROI and
improving tCS focality is to use ”dense” multi-electrode arrays instead of just two electrodes [12].
Although with this approach an enhancement in focality has been reported, still we are stimulating
only superficial regions of the brain. Grossman et. al and colleagues [19] recently presented a highly
novel solution to stimulate deep areas of the brain non-invasively. For this purpose they applied
28
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
currents with high oscillating frequencies at multiple sites on the scalp, such that these frequencies
were out of the range the neurons respond to. However these frequencies were chosen to be close to
each other, so that their sum resulted in an oscillating envelope of whose period was in the range that
neurons could be modulated by.
To analyize this idea, we assume that we have two electric fields with different high frequencies;
we call the first frequency f1 and the second frequency f2, where the relationship between f1 and
f2 is f2 = f1 + δf . The electric field generated by f1 is Ef1 = Acos(2πf1t) and the electric field
generated by f2 is Ef2 = Bcos(2πf2t). Let min(|A|, |B|) = |A|, then the superposition of these
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
Therefor by applying equation 3.4 to Figure 3.7 we have:
|−→E f1(
−→r )Cos(β) |=|−→E f1(
−→r ) ||−→E f2(
−→r ) | sin(α)|−→E f1(
−→r )−−→E f2(
−→r ) |(3.5)
Based on the law of Sines we have:
|−→E f1(
−→r ) |sin(γ)
=|−→E f1(
−→r )−−→E f2(
−→r ) |sin(α)
(3.6)
⇒|−→E f1(
−→r ) | sin(α) =|−→E f1(
−→r )−−→E f2(
−→r ) | sin(γ)
By combining equations 3.8 and 3.6 we have:
|−→E f1(
−→r )Cos(β) |=|−→E f1(
−→r )−−→E f2(
−→r ) ||−→E f2(
−→r ) | sin(γ)|−→E f1(
−→r )−−→E f2(
−→r ) |(3.7)
|−→E f1(
−→r )Cos(β) |=|−→E f2(
−→r )× (−→E f1(
−→r )−−→E f2(
−→r )) ||−→E f1(
−→r )−−→E f2(
−→r ) |(3.8)
So in this case
|−→EmaxAM (−→r ) |= 2
|−→E f2(
−→r )× (−→E f1(
−→r )−−→E f2(
−→r )) ||−→E f1(
−→r )−−→E f2(
−→r ) |(3.9)
3.2.2 Objective function
In the problem we want to address here, we again assume that we have two groups of
electrodes injecting AC currents with frequencies of f1 and f2 in the range of KHz, which cannot
stimulate the neurons, but the envelope of the amplitude-modulated signal has a frequency (equal to
the difference between the two input frequencies) that is small enough to stimulate the brain. As we
mentioned in Section 3.1. our goal is to maximize the envelope of these two temporally interfering
electric fields in a predetermined direction for each element of a predefined ROI while keeping the
magnitude of the TI effect in non-ROI below a threshold. For this purpose, our objective function is
thus to maximize the minimum of the two frequency dependant electric fields in the same chosen
direction when summed over all elements in the ROI. We spatially divided the electrodes in two
groups. The injected current array for each frequency is represented as follow.
35
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
If1 ∈ Rj×1 (3.10)
If2 ∈ Rk×1 (3.11)
where j and k refer to the number of electrodes belong to frequency f1 and f2, respectively. (In
what follows we take j = k but this is not necessary.) We use n ∈ R3×1 for the desired direction of
electric field and nTAi ∈ R1×j as the transform vector that gives the injected current to electric field
on each element in direction n.(Note that we assume for simplicity that the desired direction is the
same over the ROI but again this could be relaxed as needed.)
Our objective function thus is:
max∑i∈roi
min(| nTAiIf1 |, | nTAiIf2 |) (3.12)
where i indicates the elements indices in the ROI.
We denote nTAi = Si where Si ∈ R1×j , giving us
max∑i∈roi
min(|SiIf1 |, |SiIf2 |) (3.13)
Now we want to determine if our objective function is convex or concave. A function is
convex iff:
f(αx+ (1− α)y) ≤ αf(x) + (1− α)f(y) (3.14)
for all x, y ∈ Rj×1 and α ∈ [0, 1]. And a function is concave iff:
f(αx+ (1− α)y) ≥ αf(x) + (1− α)f(y) (3.15)
for all x, y in domain andα ∈ [0, 1]. Figure 3.8 shows a plot of objective function (min(|SiIf1 |, |SiIf2 |))only for one element in the ROI, where both SiIf1 and SiIf2 are scalars. As we can clearly see in
figure 3.8 the objective function is neither convex nor concave.
36
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
Figure 3.8
To show this fact it is sufficient to find two points in the domain of the objective function
that break the inequality for convexity and two points that break the inequality for concavity.
• Breaking the convexity:
In Figure 3.8 we pick two points in the objective function domain as |x| = min(|x|, |y|) and
|0.5x| = min(|0.5x|, |0.5y|). Assuming x > 0, based on equation 3.14 we should show that:
Therefor we show that for any α ∈ [0, 12 ] and the two given points in domain of objectives
function, the concavity inequality does not hold and the objective function is not concave.
To summarize, we found points in the objective function domain for which there exists α’s
in the range of [0, 1] that break inequality for convexity and concavity. Hence our objective function
is neither convex nor concave. This is true for over each element and the summation of all elements
together adds more complexity to our problem. Therefore we cannot guarantee that we can find the
global maximum. Nonetheless we will explore the problem by maximizing the TI electric field in the
ROI starting from initial values of the unknown current amplitudes and applying convex constraints.
3.2.3 Simulation
The model we used in this project is a sphere with radius of 9.2 cm. This size is the typical
size used for representing the human head. The size of spherical model and human head model
are not exactly the same in coronal, sagital and radial plane ( i.e. the spherical size is wider than
human head typical size for ear to ear distance but the nose to back of the head distance and height is
smaller). However the total volume is comparable with an average human head volume [26, ?]. The
38
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
sphere is completely homogeneous. There are no internal compartments and the elements sizes are
roughly equal. We have 685219 elements and 125227 nodes. The sphere conductivity is σ = 1 S/m.
As our model does not have any internal compartments we used a value for conductivity which is
not as low as the skull bone conductivity (e.g 0.007 S/m) not as high as cerebrospinal fluid (CSF)
conductivity (e.g 1.7 S/m). We note that there is a lot of variability in these values as reported in the
literature..
We have 19 electrodes. Each electrode is a cylinder with a radius of 1 cm and a height of 5 mm.
Electrode ]19 is fixed as the reference electrode and the lead fields for electrodes 1 to 18 are calculated
with respect to the reference electrode as we previously discussed in 1.1.3. The reference electrode is
shown in green in Figure 3.9.
Figure 3.9: Green electrode is the reference electrode for lead field matrix.
3.2.4 Constraints
We impose three constraints on our problem. The first constraint is the safety constraint.
In order to control the injected current delivered to the brain, we limit the maximum amount through
each individual electrode current.
‖If1‖∞ ≤ thr (3.24)
‖If2‖∞ ≤ thr
where ‖‖∞ represents the infinity norm. The second constraint is to ensure that that the total current
39
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
going into the brain for each frequency is equal to the total current coming out of the brain:
j∑i=1
If1i = 0 (3.25)
k∑i=1
If2i = 0
where j and k denotes the number of electrodes assigned to frequency f1 and f2 respectively. The
goal of the third constraint is to stimulate the neurons on the ROI and prevent other non-ROI regions
from stimulation and keep the TI modulation effect below the threshold. The threshold is the
minimum electric field we need to make the neurons fire. For this purpose, we spatially divided
electrodes into two groups with respect to the y-plane and assigned a frequency to each group. We
divided the boundary elements of the ROI in two groups with respect to y-plane as well. The intuition
behind this constraint was to limit the electric field generated by electrodes on the opposite side
since they are smaller than electric fields of the same side over each of these two boundaries. As we
previously proved, the magnitude of the smaller electric field will be the amplitude of the envelope
of the modulation effect, therefore if we limit the minimum of the electric fields on the boundaries
of the ROI, we hope to force the TI modulation effect on non-ROI elements to be below this limit.
Assume electrodes on the left− y plane have frequency of f1 and electrodes on the right− y plane
frequency of f2. If we use e− lf1 as the electric field generated by electrodes of frequency f1, e− lf2as the electric field produced by electrodes of frequency f2, e− rf1 as the electric field generated by
electrodes of frequency f1 and e− rf2 as the electric field generated by electrodes of frequency f2
and e thr as the threshold of minimum electric field over each element of the the boundary, we have:
‖e− lf2‖∞ ≤ e thr (3.26)
‖e− rf1‖∞ ≤ e thr
In Figure 3.10 the green arrow represents y-axis and blue arrow shows z-axis. As we mentioned
before, ROI boundaries and electrodes are grouped based on their location in y-plane.
40
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
Figure 3.10: Green arrow is indicating y-axis and red region show the ROI. Electrodes and ROI boundariesare divided w.r.t y-axis.
3.3 Results
In the first place, in order to validate our model, we used electrode configurations and
injected current values similar to Grossman et. al [19] to compare our results with the results in
the paper. We simulated the envelope modulation of interferential electric field projected along the
x-direction and along the y-direction. These result were obtained from two electrode pairs with
rectangular and trapezoidal geometry and the magnitude of the injected current was 1 mA. Our
observations showed that there is a good agreement between our results and the results provided
in the paper in terms of shape and location of the stimulation regions. The maximum value of the
electric field in a spherical human model is smaller than reported for a mouse head model since the
size of spherical human head model is larger. The results are presented in Figure 3.11 and Figure 3.12
41
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) TI effect projected in x direction. (b) TI effect projected in y direction.
(c) each blue-red pairs indicates the electrodes
used for stimulation.
(d) The TI modulation effect shown in Grossman’s
paper.
Figure 3.11: Electrodes have trapezoidal configuration
42
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) TI effect projected in x direction. (b) TI effect projected in y direction.
(c) each blue-red pairs indicates the electrodes
used for stimulation.
(d) The TI modulation effect shown in Grossman’s paper.
Figure 3.12: Electrodes have rectangular configuration
In the next step, we chose two different spherical ROIs with 1 cm radius. The center for
ROI1 was the same as the center of the sphere ([0, 0, 0]) while in ROI2 the center location was
[0, 5, 0]. Figure 3.13 shows the location of these ROIs inside our spherical model.
43
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) ROI center is (0, 0, 0). (b) ROI center is (0, 5, 0).
Figure 3.13: Red regions indicate the ROI inside the spherical model
We applied the following constraints to our problem and tried to maximize the TI modula-
tion effect:
- ‖If1‖∞ ≤ 2mA , ‖If2‖∞ ≤ 2mA
-∑j
i=1 If1i = 0 ,∑k
i=1 If2i = 0
- The third constraint is as follow.
where r is the sphere radius. We ran our optimization algorithm with different random starting values
Algorithm 2: Electric field threshold on the patch of a surface surrounding the ROI.
for y > 0 & 0.8 ≤ r ≤ 1.1cm do‖e− f2‖∞ ≤ 0.2(V/m)endfor y < 0 & 0.8 ≤ r ≤ 1.1cm do‖e− f1‖∞ ≤ 0.2(V/m)end
of the electrode currents to check the consistency of the results since we know the objective is not
convex. For ROI1 we got consistent results from our algorithm while all our constraints are active.
Figure 3.14 shows the current injection pattern and their values in (mA) unit for f1 and f2.
44
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) Injected currents for f1. Each columns indicates
the algorithm suggested current injection for a random
input currents.
(b) Injected currents for f2. Each columns indicates the
algorithm suggested current injection for a random input
currents.
(c) Current injection pattern for f1. (d) Current injection pattern for f2.
Figure 3.14
The electric field generated by f1 and electric field caused by f2 are shown in Figure 3.15.
The black patch inside the ROI1 represents the patch for our third constraint. In this case the ratio
of∑j
i=1 |If2|∑ki=1 |If1|
is approximately 1.07.
45
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) Ef1 . (b) Ef2 .
Figure 3.15
Figure 3.16 demonstrate the TI effect above 0.15(V/m) projected along x-direction.
Figure 3.16: EAM (−→x )
For ROI2, after executing our optimization code with five different random inputs we got
consistent results only for electrodes belong to f2 which are further from ROI2 in comparison to
electrodes connected to f1. Moreover, only the first two constraints are active in this case. Figure 3.17
shows the current injection values and also their current injection pattern for f1 and f2 for one of our
random inputs.
46
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) If1 mA. (b) If2 mA.
(c) Current injection pattern for If1 . (d) Current injection pattern for If2 .
Figure 3.17
The electric field generated by f1 (Ef1) and f2 (Ef2) are separately shown in Figure 3.18.
The black patch inside ROI2 represents the patch for our third constraint. As we can see below in
3.18(a) and 3.18(b), the electric field on the black patch is less than 0.2(V/m) for both Ef1 and Ef2 .
Hence the TI effect inside the ROI2 is less than our predetermined threshold.
47
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) Ef1 . (b) Ef2
(c) EAM (−→x ).
Figure 3.18
By increasing the threshold for our first, safety, constraint from 2mA to 20mA, our
algorithm results is the same for all our random input currents. Additionally, in this case all three
constraints are active. We can see the current injection pattern and their values in (mA) unit for f1
and f2 in Figure 3.19.
48
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) If1 . Each columns indicates the algorithm suggested
current injection for a random input currents.
(b) If2 . Each columns indicates the algorithm suggested
current injection for a random input currents.
(c) If1 . (d) If2 .
Figure 3.19
The electric field generated by f1 and f2 are shown in Figure 3.20. In this case the ratio of∑ji=1 |If2|∑ki=1 |If1|
is approximately 15.32.
49
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
(a) Ef1 . (b) Ef2 .
(c) TI effect.
Figure 3.20: EAM (−→x )
Although by increasing the threshold for the injected current to the individual electrodes
we mathematically reach active constraints and higher TI electric field in the ROI, we cannot use such
high values in clinical setting and thus it is not practical. One solution to reach a higher TI electric
field in the ROI safely is to increase the number of electrodes and distribute this high injected currents
over multiple electrodes. We tried to look at a number of factors such as maximum, minimum,
mean, median and range of TI electric field (E AM ) in both ROI and non-ROI in Table 3.1 and
Table 3.2. For ROI1, since by applying ‖If1‖∞ ≤ 2 mA we got the injected current values such that
all constraints are active, we brought the results with respect to 2 mA threshold in Table 3.1 however
for ROI2, we needed to increase the threshold from 2 mA to 20 mA to have the active constraints
and consistent injected currents, hence we brought the results for 20 mA in Table 3.2
50
CHAPTER 3. OPTIMIZATION OF TEMPORAL INTERFERING CURRENT INJECTION PATTERNS
Maximum Minimum Mean Median Range
E AM(v/m) E AM(v/m) E AM(v/m) E AM(v/m) E AM(v/m)
projected in projected in projected in projected in projected in