A comparison of different numerical methods for ...

0 downloads 0 Views 459KB Size Report
forward problem in EEG and MEG. Gerhard W Pruist .... Methodr for solving the EEG and MEG forward problem. A3 ... These can be derived by truncating Taylor.

Physiol. Meas. 14 (1993) Al-A9. Printed in the UK

A comparison of different numerical methods for solving the forward problem in EEG and MEG Gerhard W Pruist, Brian H Gilding$ and Maria J Peterst t Faculty of Applied Physics, University of mente, Po Box 217, 7500 AE Enschede, The Netherlands $ Faculty of Applied Mathematics, University of 'hente, PO Box 217,7500 AE Enschede, TheNetherlands


Abstract. In view of the complexity of the conductivity and the geometry of the human head, a numerical method would appear to be necessary for the adequate calculation of the electric potential and the magnetic induction generated by electric sources within the brain. Four numerical methods that could be used for solving this problem are the finite-difference metho& the finite-element method, the boundary-element method, and the finite-volume method. These methods could be used to calculate the electric potential and the magnetic induction directly. Alternatively, they could be applied to compute the electric potential or the elechic field and the magnetic induction could then be determined by numerical integration of the Biot-Savart law. In this paper the four numerical methods are briefly reviewed. Therafter the relative merits of the methods and the various options for using them to solve the EEC and MEC problem are evaluated.

1. Introduction Measurements of the electric potential on the human scalp and measurements of the magnetic flux outside the head are cuently being employed as means of locating electric generators within the human brain. This paper is addressed to the forward problem of determining the electric potential and magnetic field generated by a given source. Stateof-the-art models for solving the forward problem (Peters and de Munck 1990) have a number of limitations. For instance, present-day models only incorporate restricted isotropic conductivity, while considerable anisotropy is known to exist (Hoeltzell and Dykes 1979) and its effect seems to be of importance (Peters and E l i s 1988). Also present-day models exhibit shortcomings with regard to incorporating the effect of scalpless regions of the head such as the eyes, and the effect of complexly shaped fluid-occupied volumes such as the ventricles. In order to be able to investigate satisfactorily the influence of the aforementioned factors, it would appear that the only currently practical method of solving the forward problem would be that of applying a suitable numerical procedure. In this paper the advantages and disadvantages of a number of available numerical methods for solving the forward problem will be reviewed.

2. Basic formulation For the description of electric and magnetic fields resulting from brain activity, the 'quasistatic' Maxwell equations are often used (Plonsey 1969). These are the Maxwell equations in 0967-3334/93/ SAOM)lt09$07.50 @ 1993 IOP Publishing Ltd



G WPruiseral

which the time derivatives are neglected. Since magnetization is very small these equations can be formulated as


x B = poJ

VxE=O and



where B is the magnetic induction 0,po the magnetic permeability of free space (T m A-l), J the current density (A m-*), and E the electric field (V m-'). On a macroscopic level it is usual to consider

where Jprepresents the current density inside the source region and U - Ethe current density outside the source region with U denoting the conductivity (S m-I). The conductivity U is a tensor in the form of a symmetric, positive definite matrix. Between different regions of the head such as the scalp and the skull, there is ajump in the conductivity. At such interfaces, the magnetic induction, the tangential components of the electric field, and the normal component of the current density are continuous. However, the normal component of the electric field and the tangential components of the current density are discontinuous on such interfaces. To pose a well-defined mathematical problem for the electromagnetic activity in the head, it is consequently necessary to identify these interfaces and specify the physical continuity requirements as internal boundary conditions on them. Similar considerations lead to analogous boundary conditions at the surface of the head. Far from the head the magnetic induction and the electric field are negligible. This can be modelled in several ways (Emson 1988). The easiest method is to suppose that B = 0 and ~E= 0 on a sphere surrounding the head at a suffcient large distance from the head. Other partial differential equations and some integral equations can be derived from the 'quasi-static' Maxwell equations. For instance equation (2) is equivalent to

E = -VO


where 0 is defined to be the electric potential (V). Taken the divergence of (1) and substituting (4) and (5) in the resulting expression yields


.( U . [email protected])= V .Jp.


In accordance with this formulation the necessary boundary condition of continuity of the normal component of the current density at the surface of the head reads (U. [email protected])

.n. = 0.



Also, taking the curl of (1) and using the relation V x (V x B)= V ( V B ) - A B and (4) leads to AB = -poV

X (.&+U



Methodr for solving the EEG and MEG forward problem


From this the following integral equation for B can be derived;

where V denotes the spatial integration domain formed by the head and r the distance from a point of integration to the point of observation. This integral equation is well known as the Biot-Savart law. Other integral equations that can be deduced are the Bamard formula (Barnard et al 1967), which is a snrface integral equation for the potential, and the Geselowitz formula (Geselowitz 1970), which gives the magnetic induction in terms of integrals involving the potential.

3. The numerical methods The objective of any numerical method for solving a problem involving a differential or integral equation is to generate a set of algebraic equations involving a finite number of unknowns, whereby the solution of the algebraic equations characterizes an approximation to the solution of the original problem. Below four candidate methods for solving the forward problem are reviewed. The fnife-diference method (FDM) (Mitchell and Griffiths 1980) is probably the best known numerical method for solving differential equations. In this method the derivatives in the equation are replaced by finite differences. These can be derived by truncating Taylor expansions. Values of the dependent variable in a discrete number of points in a grid become the unknowns. The FDM can best be illustrated by considering the one-dimensional version of equation (6) with the boundary condition (7) and assuming that the conductivity D is homogeneous in the problem domain. In this case (6) can be written as @'I=



with f a known function. The boundary condition (7) becomes simply

@' = 0.


Let xi denote a point in an equidistant grid with spacing h and let Ot, @ + I , and %-I denote the unknown values of @ in the points x i , x i + l , and xi-l respectively. Then, Taylor expansion of the function 0 around xi yields

+ [email protected]'(xi) + i h @


= ai


= Qi'- [email protected]'(xi)

+ [email protected]"'(x,)+ O(h4)


+ [email protected]"(xi)- [email protected]"'(xi)+ O ( h 4 ) .


I 2

I, ( x i )


Adding these expressions and dividing by hZ gives @"(xi) = (@[+I

- 20i + @ i - l ) / h 2+ O(h2).

Substituting this in equation (10) leads to the finite-differenceapproximation (@i+i

- 20i + @i-i)/h* = fi



G W Pruis et al

where fi = f ( x i ) . From the above it follows that this approximation is correct to order hZ. In a similar fashion finite-difference approximations to partial derivatives can be obtained to discretize equation (6) and equations (lp(3) in three spatial dimensions. Finite-difference methods were originally developed for rectangular grids. They can now also be applied to non-rectangular grids, although their construction is more difficult in this case. Such grids that follow the shape of the problem domain are called boundary conforming. Application of the FDM to the full equation (6) in three spatial dimensions leads to an algebraic matrix equation in which the unknowns are the values (Qi}y=l of Q in the discrete points on the numerical grid. The matix itself is positive definite. As a result the matrix equation may be solved by fast iterative techniques such as the GaussSeidel method and the conjugate-gradient method (Stoer and Bulirsch 1980). The accurate treatment of a boundary condition such as (11) with the FDM is not so straightforward (Peyret and Taylor 1983). Supposing that (11) holds at some right-hand boundary point x,, the obvious temptation is to utilize the variant of (13): @'(x,J = (@,,


+ O(h).

Substitution of this in (11) leads to the finitedifference approximation

Qn - Qn-,= 0 which is correct to order h. However, this is one order of h less accurate than the previously used approximation (14). The appropriate method of mating the boundary condition (11) is to introduce a fictitious point X,+I outside the domain of interest. Subtracting (13) from (12) for xi = x, and dividing by h yields Q ' ( x= ~ (Qn+i

- @pi)/%

f O(h2).

This provides a discretization of the boundary condition (11) as @"+I

- @.-I


with order of accuracy h2. This order is equal to that in (14). The value On+, of the unknown in the fictitious point is eliminated in execution by inclusion of (14) for the boundary point xi = x,. It should be clear that the treatment of the corresponding condition (7) in three spatial dimensions requires more care. Internal boundary conditions on surfaces where there is a jump in the conductivity of the head have also to be treated similarly circumspectly. In fact for consistent accuracy it is necessary to choose a numerical grid that is boundary conforming with such surfaces. This means that designing a good finite-difference network for modelling a head is difficult. The finite-element method (FEM) (Oden and Reddy 1976) is also one of the most successfully used methods for numerically solving partial differential equations and is widely used in electromagnetism. A number of different approaches may be adopted. Ofthese the Rayleigh-Ritz and Galerkin methods are probably the best known (Pinder and Gray 1977). The FEM can be applied to equations (1H4)Wur and de Hoop 1985) hut it is more common to apply it to the potential equation (6). The Galerkin approach to (6) with the boundary condition (7) will be explained here. For this problem this approach is equivalent to the Rayleigh-Ritz method. In applying the Galerkin approach to (6) and (7) the first

Methods for solving the EEG and MEG forward pmblem


step is to derive a ‘weak formulation’ for the problem. This is obtainable by multiplying equation (6) by an arbitrary test function rp and then integrating by p w s over the volume V of the head. Using Green’s first identity for the integration by parts in combmation with the boundary condition (7) yields the weak formation

which must hold for every differentiable test function‘rp. It can be verified that the problem of solving (6) and (7) with the appropriate internal boundary conditions on interfaces of discontinuous Conductivity leads to exactly the same formulation. In applying the Galerkin FEM to (15) the head is divided into small volumes, called elements. These are cubes or tetrahedrons for example. They can be chosen at will, which provides geometric flexibility. Computational points are identified with vertices or other characteristic points .in the network formed by the elements. The unknown @ is approximated by

=~c n





where ( ( ~ i ] r =denotes ~ a set of interpolating functions called basis functions and [@i];=l denotes a set of unknown coefficients. The basis functions have local support, i.e. the area in which they are non-zero is limited to a few adjacent elements, and they span the space of piecewise polynomial functions. Furthermore they have the property that they are each equal to unity at a given computational point and equal to zero at all other computational points. Subsequently each coefficient @ j in the expansion (16) corresponds to the value of the unknown @ in the associated computational point. Substituting the expansion (16) and the functions (oj for j = 1,2, ... ,n as test functions in the weak formulation (15) produces n equations in the n unknown coefficients [@i];Fl. These can be reformulated as a single matrix equation. Because of the property of the local support of the basic functions the matrix will contain a large number of zeros. As was the case with the FDM,the resulting matrix equation is positive definite and can be tackled with efficient numerical techniques. The boundary-element method (BEM) (Brebbia and Dominguez 1989) is a numerical method that has already been used for solving the forward problem (Meijs et a1 1987). Its characteristic is that it is based upon a reformulation of a problem as a surface integral equation such as the Barnard formula. The surfaces have to be closed and must separate regions in which crucial variables such as the conductivity are isotropic and homogeneous. To obtain a set of algebraic equations from the surface integral equation, the surfaces are triangulated or panelled. On each surface element, the unknown is approximated by developing it as a truncated Taylor expansion as was done with the FDM, or by developing it in terms of a set of local basis functions as was done with the FEM. The ensuing matrix equation results in a matrix that is dense, i.e. contains very few zeros. It is also ill conditioned (Meijs 1988). This makes it difficult to solve the equation efficiently. However, the BEM only requires the discretization of a few surfaces instead of a discretization of the whole volume of the head. The finite-volume method (WM) (Patankar 1980) is +ery much like the FDM. It is a younger technique than the three techniques previously discussed, and has been largely developed for problems in fluid dynamics. The method has not often been applied to electromagnetic problems which means that there is little experience of using the method in this field.


G W Pruis et a1

To use the FVM, the problem domain is divided into small volumes. The partial differential equations under consideration are then intenated over each volume to obtain a set of equations in the form of surface integrals. By way of illustration, integrating equations (1)-(3) over a small volume V with surface S leads to

V x EdV=



E x dS= 0


respectively. The surface integrals are approximated in terms of values of the unknowns in a number of representative points on the surfaces. For instance, considering a volume in the shape of a cube, the surface integal can be approximated in terms of the unknown at the centre of each face using the mid-point integration rule. Alternatively it can be approximated in terms of the unknown at each vertex of the cube using the trapezoidal integration rule. Higher-order accuracy is obtained by increasing the order of accuracy of the numerical integration, or, looking at it another way, by increasing the number of computational points and corresponding interpolation on each face. A complete set of algebraic equations is obtained by imposing continuity requirements for the surface integrals for every face separating adjoining volumes. In principle, any shape and size of volume can be used with the FVM, resulting in geometric flexibility. If a division of a problem domain into cuboids is carried out and the mid-point rule for integration on each face is applied, it can be verified that the N M yields an identical discretization to that of the FDM. However, the application of the FVM to non-rectangular grids is much easier than that of the FDM (Peyret and Taylor 1983).

4. Application to the forward problem

The FDM, the FEM and the N M can he used to solve equations (1H4). In addition, these methods can be applied to solve equation (6). Then, after calculating the electric field via equation (5), the magnetic induction can be computed using (8) or numerical integration of the Biot-Savart law (9). The BEM can be used to solve the Barnard formula. Thereafter the magnetic induction can be deduced from numerical integration of the Geselowitz formula. In the application of the FDM and the FVM to equations ( 1 x 4 ) it is enough to impose E = 0 and B = 0 at a sufficiently large distance from the head. However, this involves the computation of the electric field and magnetic induction at a large number of points outside the head. The incorporation of internal boundary conditions with equations (1)-(4) and the potential formulation (6), and the incorporation of the outer boundary condition (7) are quite difficult with the FDM on a boundary-conforming grid. Applying the FVM to the potential formulation, terms of the form

Methods for solving the EEG and MEG forward problem


occur in the discretization. These are the terms that are equated in the intemal and external boundary conditions. Thus the incorporation of these boundary conditions is,easy with the FVM. The FEM does not exhibit any of the earlier-mentioned problems with the treatment of these boundary conditions either. Notwithstanding the ease with which the boundary conditions can be incorporated with the FVM applied to the potential formulation, since the potential 0 is the discretized variable, the actual application is not so straightforward. This is because the component V O in (17) still has to be approximated by finite differences. Given that the electric field has been computed, numerical integration (Stroud 1971) of the BiotSavart law is computationally more efficient than solving (8) with the FDM, the FEM, or the FVM if the number of points at which one wishes to determine the magnetic induction is relatively small. By way of illustration consider the comparison with the E M . If the electric field has been determined inside the head using an FEM network of Ni tetrahedrons, then using numerical integration of the Biot-Savart law, 3Ni integrals have to be evaluated to determine the magnetic field at a given observation point. This is one integral over every element for each component of the magnetic induction. On the other hand, if one applies the FEM to solve (8) for the magnetic induction outside the head, 24 (= 4!) integrals over every element for each component of the magnetic induction have to be evaluated. This gives a total of 3 x 24 x (Ni No)integrals, where No is the additional number of tetrahedrons outside the head. It is true that the integrals involved in the BiotSavart law are more difficult to compute than those generated with the E M . No matrix inversion is necessary, though, with numerical integration of the BiotSavart law. After using the BEM to solve the Barnard formula, in principle the potential is only known on the surface of discretization. However, the potential at points not lying on one of those surfaces can be obtained by substituting the computed solution in the Barnard formula and numerically integrating the resulting expression.


5. Discussion

Four numerical methods for solving the forward problem have been described-the FDM, FEM, BEM, and FVM-PIUS the option of combining any one of these methods for computing the electric potential or electric field with numerical integration for computing the magnetic induction. In practice there is much similarity between the different methods (Zienkiewicz 1983). In the FDM, FEM, and F V M it is necessary to divide the problem domain into smaller volumes defined by a grid or network. An approximate solution is calculated at points on this grid by supposing that it represents some kind of interpolation of the real solution. The BEM is similar except that the interpolation occurs on surfaces. The FDM can be seen as a special case of the FVM on a rectangular grid (using the mid-point rule for integration), whilst the FVM can be seen as a particular FEM in which the test functions are chosen to be functions equal to unity within a given element and zero outside. The FEM applied to a rectangular grid leads to an FDM approximation. Further details of the different methods can be found in the references cited. In order that application of any of the numerical methods described, optionally in combination with numerical integration for the magnetic induction, provide an advance on current models for solving the forward problem in EEG and MEG, the following aspects should be taken into account: (i) the physical geometry of the head should be treated adequately, which means that grid points should be able to be chosen freely without adverse consequences;


G W Pruis et a1

(ii) the internal and external boundary conditions where conductivity differs must be incorporated satisfactorily: (iii) anisotropy should be taken into account; and (iv) scalpless regions of the head, such as the eyes, and fluid-filled volumes in the head should be modelled adequately. In addition it is desirable that the method should be computationally efficient. All of the methods reviewed can handle an irregular geometry. However, some of the methods lend themselves to this better than others. The application of the FDM and the FVM to the potential equation yields the greatest diffculties in this respect. The point of the treatment of boundary conditions is closely related to that of the treatment of the geometry in the sense that in general an adequate treatment of geometry is necessary for an adequate treatment of the boundary conditions. It is not necessarily true that a method that adequately treats the boundary conditions also handles geometry well. As an illustration consider the FVM working on the potential equation. Modelling anisotropy and treating scalpless regions in the head is impossible with the BEM, because this method can only be applied when the domain consists of subregions with piecewise isotropic conductivity. Other methods can handle these facets. Approximation of the potential equation (6) or equation (8) by the FDM, the FEM, or the FVM yields a sparse, positive definite matrix. From the computational point of view, this is an advantage, because such matrices can be solved by fast matrix solvers. For calculating the potential by the BEM, a dense, ill-conditioned discretization matrix has to be inverted. However, this matrix is small in comparison to the matrices obtained with the other methods. The numerical integration of the BiotSavart law requires no matrix inversion and as a result it is faster than any of the methods that could be used for calculating the magnetic induction. To obtain the potential, an additional computation is necessary if equations (1)-(4) are solved with the FDM, FEM, or FVM. Given that the potential has been computed at discretization points on a network using the FDM, E M or N M , the potential at an arbitrary point can be determined by interpolation. However, when the BEM is used, to determine the potential at an arbieary point it is necessary to reapply the Barnard formula and numerical integration. Table 1. Comparison of the different methods with respect to modelling. FDM



Boundary conditions Anisotropy Scalpless regions Computation





+ + +-



+ + + + -







+ + + + +

+ + + +



+ ~+ +


In table 1 a qualification of the various numerical methods with respect to the aspects which should be taken into account is presented. The letter I stands for numercial integration. For each method the best possible formulation is considered. This means the Maxwell equations (1)-(3) and relation (4) for the FDM, FEM,and the N M ; the Barnard formulation for the BEM followed by numerical integration of the Geselowitz formula: and the potential equation for the FDM, E M , and FVM in combination with numerical integration of the BiotSavart law. A plus sign signifies a relatively good performance and a minus sign a relatively bad performance. From this table it would appear that methods that are the most promising

Methods for solving the EEG and MEG forward problem


for further research are the PEM for the potential in combination with numerical integration for the Biot-Savarf law. and the FVM.

References Bamard A C L, Duck J M, Lynn M S and Timlake W P 1967 The application of electromagnetic theory to electro&diology I1 Biophys. 3. 7 463-91 Brebbia C A and Dominguez I 1989 Boundary Elements: An Inlroducto~Course (New York McGraw-Hill) Emson C R I 1988 Methods for the solution of open-boundary electromametic-field problems IEE Pmc. A U5 151-8

D B 1970 On the magnetic field s n e m d outside an inhomogeneous volume conductor by internal current sources IEEE T r o n r i l q n MAG-6 3 4 6 7 Hor.lrmIl P B and Dykes R W 1979 Conducuvit> in the somalosensog conex of the cat-evidenc: for conic4 anisotropy Brain Rzr 177 6 1 4 2 3legs J LV H 1988 The intluencc of head geomemes on e l m " and m ~ ~ e t c c n c c p h d oT~l~mtuu Univenin Geselowitz

of Twentc Meijs J W H. Bosch F G C, Peters 41 J and Lopes d3 Silm F H 1987 On the magnetic ficld diskibution gencnled ~ siruatcd in a realistically shaped mmpmmenr modcl of the h a d Elecrmmcrph. b) 3 drpolw C U K Z ~soxce Clm. Neuropl~).~iol. 66 3 6 - 9 8 .>litchell .i R and Gnffiths D F 1980 The F m i e Dtffereme Merhod in Pomol Differenlid Eqrarionr M e w York: Wiky) 3Iur G urd dc Hoop A T 1985 A fin:a-element method for computing thnc-dimensional electromsgnilic ltelds in inhomogeneous mud13 IEEE Tram Mngn. MAG-21 2188-91 Ode" J T and Rcddg J N 1976 An Inrroducrion io die Morhe,mrical Tlwory of Finirr Ebnzetm ( k n York: Wiley) P3tmkw S V 1980 .\'umericnl Hear Tromjer ond Flwd Flow (Ncw York.McGrau.-Hill) Pinder G F and Gray \V G 1977 Fmite Elemenr S~lmulunnnin Suforc md Sdbwr/ace H)drulo&7 (New YorA. Academic)

Peters hl J md Eli= P J H 1988 On Ihc m3yeLic field and Ihc electrical poldntiil generalad by bioelectric rOlrcCe5 in an misovopic volume conductor .Wed E d . Eng. Contpur 26 617-23 Peters M J and de 3lunck J C 1990 04 ike Fonlord and rhr Inidire Pmblem for EEC and I ~ E CAuditory Eiokrd M o g n d c Fields orrd Elecoic Po!ewid.~ed F Grando", 41 Hoke and G L Romvli ( B a l : Karger) pp 70-102 Pqret R and Tiylor T D 1983 Conipwmomd MeihDds for Fluid F10.v (Berlin. Spnngr) Plonsey R 1969 Bioclccrric P l w m " (&U York hlffiraw-Hill) Staer J and Bulirich R 1980 Inirod.cnort to .Vmnrncnl Anal)ris (New York: Springer) Suoud .A H 1971 ,lppmz6v" Cakulrirwns ofMulriplc Itmgmls (Kew York.Preniicc-Hall) Zienluewicz 0 C 1983 The generalized finite element mclhod-st3te of the an and future directions J Appl. .Mech 30 1210-7

Suggest Documents