1. Introduction
Mathematical modeling allows for interpreting phenomena in nature, physics, chemistry, biology, medicine, etc. It also gives momentum to the development of several technologies and techniques crucial in neuroscience. Among the widely-used methods for analyzing neural activity, we list the brain scans based on tomography by positron emission, nuclear magnetic resonance, etc. [
1,
2]. Magnetoencephalography, as well as electroencephalography, are also widely-known methods [
1,
3]. The neural activity has a large number of bioelectrical signals [
4,
5]. Hence, electroencephalography is the most popular method among the methods for analyzing brain activity. Electroencephalography is a non-invasive method, based on the electron’s study in the scalp for registering the brain’s electrical activity [
1]. Each electrical signal is produced by neuron populations, working synchronously [
4,
6], known as electroencephalogram or EEG. Thus, the EEG is used to detect anomalies and pathologies in the brain, such as epilepsy, mal-functioning, brain rhythms, etc. [
1], validated by several diagnostic techniques. In research works, given situations require determining the causes underlying a specific phenomenon from partial information [
7]. Such problems are the so-called identification problems [
8,
9], widely studied in neuroscience for identifying bioelectrical brain signals from the EEG. To provide a solution for the identification problems, mathematical models, as well as non-invasive techniques, are used to interpret the EEG as a record of the potentials of an electrical signal [
1,
4,
5,
8]. These potentials come from a specific type of electrical activity of the excitable tissues measuring the potential difference between an explorer electrode and a reference one. Electrochemical activity generates bioelectrical sources. In some cases, we can consider the generators concentrated in a region of the brain, represented by square-integrable functions defined over that region [
1,
2,
4,
5,
8]. In the particular case of dipolar sources (representing epileptic foci), it is necessary to focus the problem analysis using the generalized functions or distributions. We recall that epilepsy is one of the most common neurological diseases, affecting around 50 million people of all ages around the world. The epilectic foci are modeled by dipolar sources, which are represented using the Dirac delta (WHO-epilepsy) [
10]. One of the main applications of electroencephalography is to study potentials, for determining zones of bioelectrical activity associated with a specific stimulus, either for studying cognitive processes or for the diagnostic and detection of epileptic foci (in both cases, located on the cerebral cortex or subcortical layers). Another application of the EEG is determining sleep anomalies. We bear in mind that epileptic foci can be related to edemas, tumors, and calcifications in the brain. Epilepsy is generated mainly by genetic factors; however, there is also acquired epilepsy, as in the neurocysticercosis case, and the presence of craniocerebral hemorrhages or trauma. The main cause of epilepsy late-onset is still neurocysticercosis, an infection of parasitic origin caused by the pig’s cysticercus that mainly affects individuals under 20 years of age and adults over 65 years to a lesser extent. Despite the considerable progress in other areas, EEG is still the most widely-used tool for its diagnosis.
We recall that a source can be expressed as the direct sum of two components, with one corresponding to the harmonic source producing the EEG. It is well known that it is not possible recovering the complete source. The most widely-used methods in the literature are devoted to recovering the harmonic source instead, namely, the Fourier Series Method, the conjugate gradient with finite element method to solve the corresponding boundary problems, and LORETA (based on Tikhonov regularization methods, to calculate the parameters of a dipolar source representing epileptic foci) [
11]. Some of these methods are easy to implement and conceptually simple in the case of simple geometries, for example, the Fourier series method, as in Conde-Mones et al. [
12], where a regularization is proposed using a cut-off in spherical geometries. On the other hand, the conjugate gradient method has a more complicated implementation and the capability to be used on more complex geometries, for example, in inverse electroencephalography, considering two coupled homogeneous regions [
12], where such a method was used to solve the Cauchy problem in an annular bidimensional region. In the same bidimensional case, Fraguela et al. [
13] analyzes the simple case of two concentric circles, requiring a priori information in order to determine the complete source. In other works such as Morin et al. [
14], the inverse EIP is considered for two dipolar sources, addressing the nonlinear problem as two linear problems. These two works are illustrated without considering temporal variation. Furthermore, the latter method, LORETA [
11], is applied to determine sources that can be represented by a finite number of parameters, which is a shortcoming since bioelectrical sources in the brain are more complicated.
Considering the applications of the homogeneous media problems, as in Tsitsas et al. [
15], we reduce the case of multiple layers to one homogeneous media. The latter allows us to use the theoretical and numerical results for the multi-layer case. Our proposal includes software tools to tackle these problems, considering the sources’ types presented in the previously mentioned works, and solving the problem in time considering the EEG frequencies.
In this work, we show a proposal to simplify the Electroencephalographic Inverse Problem (EIP), which gives our motivation, considering its relevance in determining bioelectrical sources—in particular, sources associated with epileptic foci. As we have mentioned before, the EEG is used to study cognitive processes and anomalies associated with these processes. Tumors, edemas, and calcifications are also studied using the EEG. To this aim, we consider in the first place the multiple layers conductive medium problem, modeled as a two-regions boundary problem for volumetric dipolar sources in the brain, from EEG measurements in the scalp. We use a simplification of the conductive medium problem to a homogeneous region problem with a null Neumann condition on its boundary. Additionally, the source must be recovered from one measurement on the boundary of the homogeneous region, which is obtained from the EEG. We model the conductive medium problem for two layers or regions (
and
), solving the direct and inverse problem from the model for two different sources in the conductive medium problem and the previously mentioned simplification. In the case corresponding to the scalp potential, we use exact procedures. To solve the simplified problem, we use the Green’s function in a single homogeneous region modeled for the Poisson’s equation with a null Neumann boundary condition along with the Fourier series method [
9,
16,
17]. Thus, the inverse problem transforms into a sources identification problem in a homogeneous medium with a null Neumann boundary condition. Subsequently, we build an algorithm to solve the problem efficiently along the time interval
s considering an iterative process for the optimal number of the interval divisions (128) and solving the problem at each time in the interval division. Our (simplification) gives numerical and computational advantages regarding the classical solution method, as was shown in the numerical examples developed for two types of sources. Thus, our proposal is feasible to improve the numerical computation of the inverse problem for other sources’ types. Another advantage of our proposal is the simplifications of the theoretical analysis because there are plenty of results for the case of the boundary value problem Poisson equation with the Neumann boundary condition. Furthermore, in the case of tumors, edemas, and calcifications, the electric characteristic changes in the place occupied by the anomaly. The latter leads to considering more regions and appropriated boundary conditions on the separation interface between the anomaly and the healthy brain (we regard a physiological anomaly also known as brain pathology, like the one corresponding to an alteration of the brain’s healthy tissue, caused by diseases or alterations. In the case of a tumor, the zone occupied changes the conductivity, giving place to a fibrous layer surrounding it, generating a current, the so-called secondary current, producing an abnormal EEG). Thus, the numerical and computational advantages mentioned above play an important role in this kind of problem.
We bear in mind that the simplification does not assume some piece of information about the sources or the medium. It uses variable changes to reduce the inverse source problem in a multi-layer region to one in a homogeneous region. As a first step, we solve the Cauchy problem in an annular region. This is an ill-posed problem due to its numerical instability, and regularization methods are used to handle the mentioned instability. Then, a Neumann problem for the Laplace equation is solved, which is a well-posed problem. These two problems allow us to find the proposal. The existence and uniqueness of the solution to these problems can be studied separately.
2. Mathematical Model of the EIP
We model a source identification problem [
4,
5,
18], with a source in the brain (
Figure 1g,h) and measurements (EEG) recorded on the scalp. We consider the EEG to be produced by large neuron conglomerates simultaneously activated (bioelectrical sources) [
4,
6]. Moreover, we assume the electric currents produced in the region
are caused only by the brain’s electrical activity. Such currents are classified as ohmic and primaries. The former is produced by the movement of ionic charges across the extracellular fluid in the brain and the latter by the diffusion currents along the neural membranes denoted by
[
1,
6] (main scope in the identification problem). Such membranes give additional information regarding the affected zone location (
Figure 1h). We illustrate this in the 3D models in
Figure 1a–e, where we show the skull, brain, and scalp. In
Figure 1a, we show a human with short hair in the same scalp region. In
Figure 1b,c, we show a cut in the left region displaying the frontal and parietal lobes, respectively. In
Figure 1d,e, we show a rotation and transversal cut of
Figure 1c, displaying the inner regions of the brain, skull, and scalp separately, and, in
Figure 1f, we show the skull and scalp in white, and the inner brain region in colors, with two contrasting regions.
Without loss of generality, we consider the human head as a conductor medium split into two disjoint regions [
19], as seen in
Figure 2c, with region 1 constituted by the brain, 2 by the light-tone color region (scalp and skull) in
Figure 1f (where
)
is the cerebral cortex and
is the rest of the head. We can apply this idealization to our construction, which could be further extended to consider additional layers to illustrate the rest of the tissues introducing electrical noise, interference, or modifying the signal coming from the source (inside
). As we mentioned before, the electric activity of the brain is generated by the ionic interchange of a conglomerate of neurons activated simultaneously, and this electrical activity is recorded using electrodes located on the scalp in a EEG (electroencephalogram) [
1,
4,
6,
13,
14,
18,
20,
21,
22]. The ionic interchange of this conglomerate produces a current density called the bioelectrical sources and is denoted by
(the primary current). The Electroencephalographic Inverse Problem (IEP) consists of finding, from the EEG, the bioelectrical sources that produces such EEG. The presence of this density current generates electromagnetic potentials associated with the vector fields
, and
which are coupled [
23]. From experimental data, it has been found that the corporal tissues can be regarded as a resistive medium for frequencies up to one Hertz since the capacitive impedance is extremely small [
1,
4,
5,
23]. Hence, we can neglect the displacement current in the Maxwell equations. Thus, the Ampere–Maxwell law can be written in the following form:
with
the magnetic induction field. Taking the divergence of both sides of the equation, we obtain
(describing the steady-state of the system). These equations represent the quasi-static model [
4,
5,
23].
The bioelectrical sources cannot radiate a considerable amount of energy since the observation and the source size are considerably smaller than the wavelength associated with the higher frequency produced by bioelectrical processes in the brain. These signals behave as slowly varying signals, and therefore we can consider
, i.e., we can neglect the variations of
on time
t. Hence, from the previous results and the Faraday law, we obtain
, considering
with
a conservative field. According to cerebral tissues’ linearity and homogeneity properties, the currents in any instant depend on the sources at such time and obey the superposition law. Hence, formally we can express the total current as a superposition of a current associated with the primary source
and the one due to the presence of the electric field
in the brain region with conductivity
(
is used to generalize the process, since there is a
conductivity for each region
, with
) leading to
, where
denotes a primary current,
represents the ohmic current (in both cases density of current), and
represents the constant conductivity of the region
(
). Hence, in the region
(which represents the brain), the potential
u satisfies
from which we obtain
, where
. In the region
, there are no bioelectrical sources, and the potential satisfies the Laplace equation. On the surface
separating the homogeneous regions, the boundary conditions correspond to the transmission conditions
Since the air conductivity is zero, we obtain
Finally, the potential
u satisfies the following boundary value problem:
The EEG is related to the potential
u in the following form (
t-fixed)
. Thus, if we consider the constant conductivities
and
in
and
, respectively, the brain cortex
, and the scalp
, we can have a suitable representation of
Figure 1 and in the following boundary problem, the Electroencephalographic Inverse Problem (EIP) [
4,
18,
24], described in Equations (
4)–(
8) (where
, i.e.,
is the electric potential in
for
,
n the unitary vector normal to the region
,
the Laplacian operator and
).
The boundary conditions in Equations (
6) and (
7) are the so-called transmission equations or conditions, and we obtain Equation (
8) considering the conductivity of
as zero (the air conductivity). From Green’s formulae [
9,
17,
24], we deduce the following compatibility condition
The cerebral cortex has a thickness varying from
mm to
mm. Hence, from the point of view of mathematical modeling, the cerebral cortex can be considered as a 3D-space surface. Thus, the bio-electrical sources generated in the cerebral cortex, not only dipolar sources, can be regarded as functions defined on the mentioned surface. Therefore, the boundary condition associated with the
current fluxes reflects the presence of cortical sources. Following the notation used for the volumetric sources, we denote the cortical current density by
. Hence, the boundary condition is given by:
with
the cortical source, satisfying a compatibility condition similar to Equation (
9). Moreover, if we consider simultaneously cortical and volumetric sources, the compatibility condition is given by
To build a simplification of the EIP, we analyze the identification problem of the source
f, using the boundary problem described in Equations (
4)–(
8) along with the boundary condition
, considering only volumetric sources, and we neglect the presence of cortical sources. Hence:
Definition 1. The inverse problem associated with Equations (4)–(8) (EIP) consists of determining a source f from a measurement V defined over , such as the solution u of the direct problem corresponding to the source f, satisfying . 4. EIP Considering Dipolar Sources
Determining the distributions describing the bioelectrical sources (given the neural activity) is not an easy task. Several techniques and methods have been applied to simplify this problem. For instance, from the previous simplification (SEIP), we can consider a current dipole (a dipolar model of equivalent current) already validated as an accurate representation of sources (shallow sources) inside the brain [
13,
14,
20,
21,
22,
27]. Hence, we can extend the analysis beyond more complex systems with multiple dipoles of the equivalent current type. In this sense, we illustrate the previously mentioned arguments with models simulating epileptic foci using several dipoles or multipolar expansions. Therefore, we consider a single dipole [
4], representing the source function
f, and at the same time
with
P the dipolar moment and
the Dirac delta centered at
a [
17,
24]. If the current is given by
, the existence’s proof of the boundary problem solution is carried out using Theorem 4 as follows: There exists a succession of continuous functions
converging to the Dirac delta. Moreover, there exists the solution
of the boundary problem, for each element in the functions succession
. Such a succession
converges to the solution to the problem described in Equations (
21) and (
22), with
Since
exists and does not depend on the convergence of the succession to
f, we will refer to such a limit as the solution to the boundary problem described in Equations (
21) and (
22). Thus, if
f is given by Equation (
29), the solution is
with
the Green’s function of the problem. In this case, we have a unique solution to the inverse problem if the measurement
V is well-known over all the scalp [
9,
28,
29]. Hence, if we know
V, we can recover the parameters of the dipolar source, i.e., the dipolar momentum
P and its location
a, using the least squares method [
9,
29]
with
the solution of the problem described in Equations (
21) and (
22),
f given by Equation (
29), and
expressed in terms of the source
f. We bear in mind the inconveniences of using the Green’s function method [
9,
17,
24] for explicitly determining the functions in complex geometries. Generally speaking, if there are edges where we cannot apply the Green’s method [
17], we can use the ideas presented in this work, to develop an algorithm to ease the determination of the Green’s functions and hence the solution.
6. Inverse Problem Solution
To solve the inverse problem, we consider
(dipolar moment), for the function
, if
, and 0 in other case with
x and
a vectors (Equation (
29)).
is the normalization constant
with
. Therefore, without loss of generality, we can assume the measurement is given by
. Following the previously described procedure, we determine function
as the solution of the Cauchy problem in
from
V. Hence, we obtain
with
. Subsequently, we determine the harmonic function
in
, orthogonal to the constants, such as the Neumann condition
holds. Such a function is given by
the measurement (simulation of a given experiment or experimental data)
g in
should satisfy
We emphasize that the Fourier coefficients of
g are expressed in terms of
and
(Equation (
55)). On the other hand, these coefficients are given in terms of the dipolar source parameters
P and
a. Finally, we should determine the dipole parameters
P and
a from the measurement
V (EEG), using the least-squares method [
13,
14,
20,
21,
22]. Thus, if we assume the coefficients
and
are known, we only require to minimize the functional
with
and
Fourier coefficients approximations of
g from Equation (
55) (
and
in Equations (
51) and (
52). We can obtain the measurement over the whole scalp if the measurement (EEG) is performed in a finite number of points in the scalp (electrodes) [
1,
3,
6,
8]. Such measurement can be obtained using an interpolation regularized method as that presented by Bustamante et al. [
32] or the spherical splines interpolation method presented by Perrin et al. [
33]. Simple geometries had been used to analyze the electroencephalographic inverse problem (EIP). However, in the case of dipolar sources, several methods have been presented to find their location—for example, in the work by Clerc et al. [
34] considering rational approximations in the complex plane and the work by Tsitsas et al. [
15], where an algorithm for finding the dipole from the Cauchy data are developed, considering the human head as a spherical model, similar to the extension of a case we have addressed in this work.
7. Numerical Examples
We present numerical (synthetic) examples aiming to illustrate the ideas presented in this work. We consider
,
,
and
, as well as a dipolar source such as
P (Equation (
29)) in Equations (
46), (
47), (
A2) and (
A3). We compute the measurement
V corresponding to the EEG (simulated according to the conditions in this work at time
, see
Figure 5c,d,g,h). The computations are performed under the numerical consideration of the model, with a mesh containing some parameters (similar to the finite element), as we show in
Figure 1i, recalling that the anomaly is located as in
Figure 1g or
Figure 1h. On the other hand, we consider the inherent error of the measurement
due to the equipment, randomly related to the Fourier coefficients of
V such that
, as well as the generalized error, for a suitable
, a random number Rand, and the errors
and
, associated with the Fourier coefficients
and
, given by
Considering this, we have the approximation to the function
g given by:
for the 2D case. On the other hand, for the 3D case, we consider the source
. We can analyze this source in spherical coordinates as
. We apply the previously described theory to solve the direct problem considering two regions, to simplify the problem to one region as well (as we have described through this work). In this case, the solution of the direct problem obtained as the restriction of the solution of the boundary value problem of two 3D regions, using the Fourier series method [
17] is given by:
with
Y the spherical harmonics [
9,
17] for a solution
in
of the form
and in
In this case, the error is given by
In what follows, we consider the parameters described at the beginning of this section (
,
,
and
). For the numerical experiments, we use COMSOL and MATLAB to solve the direct problems. We use scripts developed by us (in MATLAB) to solve the problems using circular and spherical harmonics. To minimize the functional in Equation (
56), we use the fminunc Matlab function.
The previously stressed ideas can be used in more realistic geometries of the head along with numerical methods, such as the finite differences and finite element methods.
In
Figure 6, we show the solutions to the boundary problems as well as that to the direct and inverse problems for the numerical examples previously mentioned in
Section 7. In
Figure 6a–d, we show the solution to the boundary problem for the dipolar source in
Figure 6a,b for the two regions 2D and 3D cases, respectively. In
Figure 6c,d, we show the simplified 2D and 3D cases, respectively. In
Figure 6e,f, we show the source recovered solution from solving the inverse problem, respectively. In
Figure 6g–j, we show the boundary problem for the source
, in
Figure 6g,h, the two regions 2D and 3D cases, respectively, whereas, in
Figure 6i,j, the simplified case for the 2D and 3D, respectively. In
Figure 6k,l, we show the source and the recovered solution from solving the inverse problem. The errors obtained between the exact and recovered sources were
for the dipolar source case, and
for the source
. In
Table 1, we show the numerical results from our different comparisons and proposals. We recall that we applied our simplification (reduced) proposal and Fourier series solution in Equations (
46) and (
47) (obtained as well from Equations (
51) and (
52)) to solve the inverse problem. Moreover, we solved the two-layers (original) conductive medium problem, comparing in both inverse problems the recovered source. As we mentioned previously, we included time into the problem and subsequently solved both problems, original and reduced, using our algorithm, described in
Figure 4, for different time interval divisions (moments in time) of
to compare our results. Among these divisions, we concluded that the time interval
is the most optimal and efficient, as we show in
Table 1 having significantly short computation times with respect to other divisions. Moreover, the percentage error (error [%]) between the model source (computed from the dipolar momentum
P in Equation (
29) and for
) and the recovered source (final part of the algorithm shown in
Figure 4) validates our proposal as optimal, with a computation time of 2 min in average and an error of
. In
Table 1, we also show the computation times for different sources recovered by inverse problems involving the multiple-layers conductive medium problem and our simplification proposal, along with the errors between the model sources and the recovered sources solving the inverse problem using our algorithm at different times.
8. Conclusions
In this work, we study the inverse problem for brain bioelectrical sources using the EEG recorded on the scalp. These sources and the EEG are correlated by a boundary value problem deduced from Maxwell’s equations and the head electrical properties. This boundary value problem is defined in a non-homogeneous region representing the head. We consider the epileptic foci case, i.e., anomalies with no electric characteristic changes in the brain but influencing the triggers’ quantities of the brain cells due to a possible problem in the sodium channels (sodium pathy). We are not considering tumor-associated anomalies such as edemas and calcifications, which have electric characteristic changes in the region they occupy. However, for illustration purposes, we briefly stress the tumor case. In the case of a tumor, the zone occupied by it changes its conductivity, generating a fibrous layer surrounding it. In such a layer, the produced current, i.e., the second current, produces an abnormal EEG. If the layer is considerably thin, it can be considered as the surface separating the region occupied by the anomaly from the healthy brain. In such a case, the generating source of the abnormal EEG can be regarded as a shallow-type source, defined over the separation surface and the boundary condition of the separation interface between the healthy brain and the pathology is given by Equations (
6) and (
10). On the other hand, if the fibrous layer is thick, the EEG generating source can be considered a volumetric source. In this case, the boundary conditions of separation interface are given by Equations (
6) and (
7).
We emphasize that, in this work, we are focusing only on the source type identification rather than on its localization since the used space coordinates are an idealization for the models and geometric considerations regarding the skull and head representation. Hence, the localization problem is beyond the scope of this work and will be addressed in a forthcoming article since the simplification can optimize the spatial localization of the source.
We apply a simplification, leading us to a boundary value problem in a homogeneous region. In the simplification, we solve the Cauchy problem for the Laplace equation in an annular region and use the Green’s functions method to reduce the problem to a homogeneous region. We solve the simplified problem in space and included time as an additional variable to solve the phenomenon at different times. We consider a moment in time as the division of the time interval in multiples of the frequency known in the EEG. Hence, we propose an algorithm to analyze the boundary problem, the direct problem solution, and the inverse problem solution at each time, considering the time as the iterations in the algorithm. We summarize the results of our proposal in
Table 1. We observe that the optimal times and errors show the highest efficiency for 128 divisions in the time interval with an error of
and computation time of 2 min in Matlab.
We illustrate the algorithm with sources associated with epilepsy. The latter is one of the most relevant applications of the EEG. In particular, we consider sources associated with epileptic foci. Moreover, the simplicity of the epileptic foci modeling is an attractive example of the dipolar moment application, relating the electromagnetic theory in the sources’ nature and the construction of our bioelectric activity-based proposal. We conclude that our proposal has applications in the identification of this kind of source.