This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Effects of head modeling errors on the spatial frequency representation of MEG

Wan-Jin Yeo1,2, Eric Larson2, Joonas Iivanainen3, Amir Borna3, Jim McKay4,
Julia Stephen5, Peter Schwindt3, Samu Taulu1,2
1 Department of Physics, University of Washington, Seattle, WA 98195, United States
2 Institute for Learning and Brain Sciences, University of Washington, Seattle, WA 98195, United States
3 Sandia National Laboratories, Albuquerque, NM 87123, United States
4 Candoo Systems Inc., Port Coquitlam, BC V3C 5M2, Canada
5 The Mind Research Network, Albuquerque, NM 87106, United States
(August 12, 2025)
Abstract

Optically-pumped magnetometers (OPM) – next-generation magnetoencephalography (MEG) sensors – may be placed directly on the head, unlike the more commonly used superconducting quantum interference device (SQUID) sensors, which must be placed a few centimeters away. This allows for signals of higher spatial resolution to be captured, resulting in potentially more accurate source localization. In this paper, we show that in the noiseless and high signal-to-noise ratio (SNR) case of approximately 6\geq 6 dB, inaccuracies in boundary element method (BEM) head conductor models (or equivalently, inaccurate volume current models) lead to increased signal and equivalent current dipole (ECD) source localization inaccuracies when sensor arrays are placed closer to the head. This is true especially in the case of deep and superficial sources where volume current contributions are high. In the noisy case however, the higher SNR for closer sensor arrays allows for an improved ECD fit and outweighs the effects of head geometry inaccuracies. This calls for an increase in emphasis in head modeling to reduce inverse modeling errors, especially as the field of MEG strives for closer sensor arrays and cleaner signals. An analytical form to obtain the magnetic field errors for small perturbations in the BEM head geometry is also provided.

1 Introduction

Magnetoencephalography (MEG) is a non-invasive neuroimaging modality that provides spatiotemporal estimates of brain activity [16, 18, 23]. These estimates are based on inverse modeling, i.e., inferring the distribution of electric current in brain tissue based on a measurement of the associated magnetic field. Until recently, the only practical sensor type sensitive enough for MEG measurements has been the superconducting quantum interference device (SQUID), which requires cryogenics in order to maintain the superconducting state of the sensors. The necessary thermal insulation between the sensors, which must be held in a dewar containing liquid helium, and the surface of the head creates a minimum gap of at least 2 cm between the scalp and the sensors. However, reducing the measurement distance is imperative to further improve spatial resolution of MEG as the magnetic fields decay rapidly as a function of distance. Fortunately, recent developments in sensor technology, especially in the domain of optically pumped magnetometers (OPM), have made on-scalp MEG possible [2, 3, 4, 20, 21, 24]. The reduced proximity between the sensors and the brain sources has the potential to significantly improve the spatial resolution of MEG, since the detected signal strength and spatial complexity are expected to increase.

Brain sources are typically modeled as having a primary current and volume current. The primary current is where neural activity occurs and is the portion of the current that is of primary interest. In many cases, the primary current can be modeled as a current dipole, especially for focal sources. The volume current is the passive return current that closes the current loop inside the head. Because volume currents are mathematically equivalent to surface currents on the conductivity boundaries of closed, piece-wise homogeneous conductor models of the head [11], any inaccuracies in head geometries that are involved in forward signal calculations will inaccurately account for the volume current, resulting in an incorrect forward model. One such forward calculation method is the boundary element method (BEM), which typically uses triangulated, decimated surface meshes for the head model so that the electric potential, which is implicitly defined and difficult to determine in the continuous case, may be more easily calculated through some assumptions, such as uniform conductivity within compartments [27, 31, 35].

For OPMs that can potentially detect signals with higher spatial resolutions due to their decreased sensor-to-array distance, higher spatial frequency contributions from primary and volume currents are expected to be detected. Here, we investigate the importance of BEM triangle mesh accuracy in forward modelling of MEG signals as a function of sensor array distances by perturbing vertices of the mesh to imitate mesh inaccuracies. We also investigate which spatial frequencies suffer from the greatest errors as a function of sensor array distance. We used the simplest and most straightforward BEM methods, the constant collocation (CC) and linear collocation (LC) approaches, to illustrate this effect. The simplicity of CC BEM has the added advantage of being able to easily illustrate the general method one may use to find analytical forms of the errors, as shown in Appendix A. Then, we illustrate the effects of the inaccurate forward signals in equivalent current dipole (ECD) source localization fits. We show that in the noiseless case, increased signal error due to BEM errors result in less accurate source localization, especially for deep sources. However, in the presence of noise, the increased SNR due to closer sensor array distances to the head generally still improves the source localization.

There are many sources of errors for BEM, which may be broadly categorized as anatomical modeling errors and/or numerical errors. For example, the effect of conductivity errors on forward signals have been studied in [19, 34, 36, 39], and different mesh triangulation methods and basis choices to estimate the potentials within each triangle may result in numerical errors that affect accuracy of forward calculations [28, 32]. Studies on head geometry errors, especially focusing on the skull, have also been conducted in for example [5, 25]. An overview of many of these errors can be found in [7]. In this paper, we specifically investigate the effect of random vertex perturbations from an ideal spherical head model on the resulting signal. One other paper has explored head model errors from ideal spherical models as well, but with the assumption that the errors are sufficiently smooth so that they can be described with a spherical harmonic expansion accurately [29]. Since our approach accounts for individual vertex perturbations, it may offer a solution to more precise adjustments/corrections to discretized head models.

We first give an overview of BEM used in MEG signal forward calculations, with emphasis on the CC approach. Then, we discuss our results for the effects of BEM head geometry inaccuracies on the signal vectors for varying sensor array and source distances. We also analyzed the errors in the spatial frequency domain via a decomposition into the Signal Space Separation (SSS) basis with varying ll-degree truncation choices. Finally, we performed ECD fits with the inaccurate forward calculated signals to determine their effects on source localization in both noiseless and noisy sensor cases. In the appendix, analytical forms that one may use as an alternative way to calculate signal perturbations are also provided.

2 Boundary Element Method overview

2.1 Geselowitz’ formula

It is common practice in MEG and EEG modeling to express the total current as a superposition of two components, i.e.,

𝐉(𝐫)=𝐉P(𝐫)+𝐉v(𝐫),\mathbf{J}\left(\mathbf{r}^{\prime}\right)=\mathbf{J}^{P}\left(\mathbf{r}^{\prime}\right)+\mathbf{J}^{v}\left(\mathbf{r}^{\prime}\right), (1)

where 𝐉P(𝐫)\mathbf{J}^{P}\left(\mathbf{r}^{\prime}\right) represents the physiologically interesting primary current and 𝐉v(𝐫)\mathbf{J}^{v}\left(\mathbf{r}^{\prime}\right) is the associated passive volume current component that completes the loop of electric current in the brain tissue. On the basis of the Coulomb force, the passive volume current is of the form

𝐉v(𝐫)=σ𝐄=σV,\mathbf{J}^{v}\left(\mathbf{r}^{\prime}\right)=\sigma\mathbf{E}=-\sigma\nabla V, (2)

where σ\sigma, 𝐄\mathbf{E}, and VV are the electric conductivity, the electric field, and the electric potential, respectively. The second equality in equation (2) is valid when the time derivative of the magnetic field 𝐁\mathbf{B} is insignificant, which is the case in MEG and EEG [16]. If we assume a piecewise homogeneous conductor head model with NSN_{S} conductivity boundary surfaces, the magnetic field due to 𝐉(𝐫)\mathbf{J}\left(\mathbf{r}^{\prime}\right) is given by Geselowitz’ formula [11, 16]

𝐁(𝐫)=𝐁0(𝐫)+μ04πl=1NS(σlσl+)SlV(𝐫)𝐫𝐫|𝐫𝐫|3×𝑑𝐒l,\mathbf{B}\left(\mathbf{r}\right)=\mathbf{B}_{0}\left(\mathbf{r}\right)+\frac{\mu_{0}}{4\pi}\sum_{l=1}^{N_{S}}\left(\sigma_{l}^{-}-\sigma_{l}^{+}\right)\int_{S_{l}^{\prime}}V\left(\mathbf{r}^{\prime}\right)\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\times d\mathbf{S}^{\prime}_{l}, (3)

where

𝐁0(𝐫)=μ04πv𝐉P(𝐫)×𝐫𝐫|𝐫𝐫|3𝑑v\mathbf{B}_{0}\left(\mathbf{r}\right)=\frac{\mu_{0}}{4\pi}\int_{v^{\prime}}\mathbf{J}^{P}\left(\mathbf{r}^{\prime}\right)\times\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\ dv^{\prime} (4)

is the contribution by primary currents, vv^{\prime} is the total head volume, and σl\sigma_{l}^{-} and σl+\sigma_{l}^{+} denote conductivities of the inner and outer regions relative to SlS_{l}. The second term on the right hand side of (3) is the contribution by volume currents, which we will denote as 𝐁vol\mathbf{B}_{vol}. We need the electric potential VV in order to calculate 𝐁vol\mathbf{B}_{vol} and hence the total magnetic field. Below we review the expressions to obtain discrete values of VV on the boundaries that we may thus use to approximate and discretize 𝐁\mathbf{B}.

2.2 Discretization of the electric potential field

Here, we give an overview of the CC BEM approach. The LC requires only a slight modification, as will be pointed out. More comprehensive reviews may be found in [6, 8, 31, 33, 35].

The electric potential V(𝐫)V(\mathbf{r}) for a field point 𝐫\mathbf{r} on the kkth surface SkS_{k} is given intrinsically by [16, 31]

V(𝐫)=V(𝐫)12πl=1NSσlσl+σk+σk+SlV(𝐫)𝐫𝐫|𝐫𝐫|3𝑑𝐒lV\left(\mathbf{r}\right)=V_{\infty}\left(\mathbf{r}\right)-\frac{1}{2\pi}\sum_{l=1}^{N_{S}}\frac{\sigma_{l}^{-}-\sigma_{l}^{+}}{\sigma_{k}^{-}+\sigma_{k}^{+}}\int_{S_{l}^{\prime}}V\left(\mathbf{r}^{\prime}\right)\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\cdot d\mathbf{S}^{\prime}_{l} (5)

where

V(𝐫)=12π(σk+σk+)v𝐉P(𝐫)𝐫𝐫|𝐫𝐫|3𝑑v.V_{\infty}\left(\mathbf{r}\right)=\frac{1}{2\pi\left(\sigma_{k}^{-}+\sigma_{k}^{+}\right)}\int_{v^{\prime}}\mathbf{J}^{P}\left(\mathbf{r}^{\prime}\right)\cdot\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\ dv^{\prime}. (6)

Like in the 𝐁\mathbf{B} field case, eq. (6) describes the primary current contribution to the potential whereas the surface integral is the volume current contribution. The primary current contribution is easily obtained if we have prescribed 𝐉P\mathbf{J}^{P}. In particular, if we let 𝐉P\mathbf{J}^{P} be a collection of current dipoles with positions represented by delta functions, the integral collapses to a simple form. For NN dipoles 𝐉nP=𝐐nδ(𝐫𝐫n)\mathbf{J}_{n}^{P}=\mathbf{Q}_{n}\delta(\mathbf{r}-\mathbf{r}_{n}) where n=1,,Nn=1,\dots,N, we have

V(𝐫)=12π(σk+σk+)n=1N𝐐n𝐫𝐫n|𝐫𝐫n|3.V_{\infty}\left(\mathbf{r}\right)=\frac{1}{2\pi\left(\sigma_{k}^{-}+\sigma_{k}^{+}\right)}\sum_{n=1}^{N}\mathbf{Q}_{n}\cdot\frac{\mathbf{r}-\mathbf{r}_{n}}{\absolutevalue{\mathbf{r}-\mathbf{r}_{n}}^{3}}. (7)

As for the volume current contribution, we may discretize each surface SlS_{l} into NlN_{l} triangles. Then, (5) can be written as

V(𝐫)=V(𝐫)12πl=1NSσlσl+σk+σk+m=1NlΔlmV(𝐫)𝐫𝐫|𝐫𝐫|3𝑑𝐒ΔlmV\left(\mathbf{r}\right)=V_{\infty}\left(\mathbf{r}\right)-\frac{1}{2\pi}\sum_{l=1}^{N_{S}}\frac{\sigma_{l}^{-}-\sigma_{l}^{+}}{\sigma_{k}^{-}+\sigma_{k}^{+}}\sum_{m=1}^{N_{l}}\int_{\Delta_{l}^{m}}V\left(\mathbf{r}^{\prime}\right)\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\cdot d\mathbf{S}_{\Delta_{l}^{m}}^{\prime} (8)

where Δlm\Delta_{l}^{m} is the mmth triangle of surface SlS_{l}.

If we have chosen a large enough NlN_{l} such that the triangle areas are small, we may reasonably make some assumptions about the behavior of the potential VV within each triangle. In turn, VV can be estimated with some basis and weight functions defined relative to parameters of relevant triangles, independent of 𝐫\mathbf{r}. The potential VV can then be explicitly defined and solved for. Many such approximations exist, including using constant or linear basis with collocation or Galerkin weighting [33]. Higher-degree basis functions have been considered as well [10].

In this paper, we use BEM as a tool to calculate the errors of volume current contributions due to closer sensors. Since we are not actually concerned with the accuracy between different approximation methods but rather the overall behaviour of the resulting signal due to head geometry errors, the most straightforward approximations which are the CC and LC approaches suffice for our purposes. We present the CC case in the next section which assumes a constant potential within each triangle. The LC approach approximates the potential within each triangle as a linear function via an interpolation from the potentials at the three vertices; see [6, 33, 35]. The simplicity of the CC approach allows us to outline an analytical method one may use to find errors for small boundary perturbations as well (Appendix A).

2.3 Linearization of electric potentials

First, we may assume that triangles are small enough such that the potential is constant in each triangle, i.e., V(𝐫)V(𝐜lm)V(\mathbf{r}^{\prime})\approx V(\mathbf{c}_{l}^{m}) when 𝐫Δlm\mathbf{r}^{\prime}\in\Delta_{l}^{m}, where 𝐜lm\mathbf{c}_{l}^{m} is the centroid of Δlm\Delta_{l}^{m}. This allows us to pull the potential term out of the integral, and we get

ΔlmV(𝐫)𝐫𝐫|𝐫𝐫|3𝑑𝐒ΔlmV(𝐜lm)Δlm𝐫𝐫|𝐫𝐫|3𝑑𝐒Δlm.\int_{\Delta_{l}^{m}}V\left(\mathbf{r}^{\prime}\right)\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\cdot d\mathbf{S}_{\Delta_{l}^{m}}\approx V\left(\mathbf{c}_{l}^{m}\right)\int_{\Delta_{l}^{m}}\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\cdot d\mathbf{S}_{\Delta_{l}^{m}}^{\prime}. (9)

Notice that the integral on the right hand side is now simply the solid angle spanned by the triangle Δlm\Delta_{l}^{m} from the observation point 𝐫\mathbf{r}; let us denote it as Ωlm(𝐫)\Omega_{l}^{m}\left(\mathbf{r}\right). If we let 𝐫i0𝐫i𝐫\mathbf{r}_{i0}\equiv\mathbf{r}_{i}-\mathbf{r}, i=1,2,3i=1,2,3 be the three vertices of the triangle relative to 𝐫\mathbf{r}, and let ri0r_{i0} be their lengths, we may equivalently express each Ωlm\Omega_{l}^{m} as [30]

Ωlm=2arctan[𝐫10(𝐫20×𝐫30)r10r20r30+(𝐫10𝐫20)r30+(𝐫30𝐫10)r20+(𝐫20𝐫30)r10].\Omega_{l}^{m}=2\arctan\left[\frac{\mathbf{r}_{10}\cdot\left(\mathbf{r}_{20}\times\mathbf{r}_{30}\right)}{r_{10}r_{20}r_{30}+\left(\mathbf{r}_{10}\cdot\mathbf{r}_{20}\right)r_{30}+\left(\mathbf{r}_{30}\cdot\mathbf{r}_{10}\right)r_{20}+\left(\mathbf{r}_{20}\cdot\mathbf{r}_{30}\right)r_{10}}\right]. (10)

Let 𝐫\mathbf{r} coincide with centroids of the triangles as well. Then, all the potential terms of (5) are discretized at the same locations and it can now be compactly written as

V(𝐜ki)=V(𝐜ki)12πl=1NSm=1Nlσlσl+σk+σk+V(𝐜lm)Ωlm(𝐜ki).V\left(\mathbf{c}_{k}^{i}\right)=V_{\infty}\left(\mathbf{c}_{k}^{i}\right)-\frac{1}{2\pi}\sum_{l=1}^{N_{S}}\sum_{m=1}^{N_{l}}\frac{\sigma_{l}^{-}-\sigma_{l}^{+}}{\sigma_{k}^{-}+\sigma_{k}^{+}}V\left(\mathbf{c}_{l}^{m}\right)\Omega_{l}^{m}\left(\mathbf{c}_{k}^{i}\right). (11)

In matrix form, this looks like

[𝐕1𝐕NS]=[𝐕,1𝐕,NS]+[𝐆1,1𝐆1,NS𝐆NS,1𝐆NS,NS][𝐕1𝐕NS]\begin{bmatrix}\mathbf{V}_{1}\\ \vdots\\ \mathbf{V}_{N_{S}}\end{bmatrix}=\begin{bmatrix}\mathbf{V}_{\infty,1}\\ \vdots\\ \mathbf{V}_{\infty,N_{S}}\end{bmatrix}+\begin{bmatrix}\mathbf{G}_{1,1}&&\cdots&&\mathbf{G}_{1,N_{S}}\\ \vdots&&\ddots&&\vdots\\ \mathbf{G}_{N_{S},1}&&\cdots&&\mathbf{G}_{N_{S},N_{S}}\\ \end{bmatrix}\begin{bmatrix}\mathbf{V}_{1}\\ \vdots\\ \mathbf{V}_{N_{S}}\end{bmatrix} (12)

where

Gk,li,m=12πσlσl+σk+σk+Ωlm(𝐜ki).G_{k,l}^{i,m}=-\frac{1}{2\pi}\frac{\sigma_{l}^{-}-\sigma_{l}^{+}}{\sigma_{k}^{-}+\sigma_{k}^{+}}\Omega_{l}^{m}\left(\mathbf{c}_{k}^{i}\right). (13)

Note that the 𝐆\mathbf{G} matrix is dependent only on the geometry and conductivities of the conductor, and it is also the only term that depends on the boundary geometry. This means that for each different source configuration in the same head model, 𝐆\mathbf{G} needs to be calculated only once, whereas the primary current contribution 𝐕\mathbf{V} needs to be recalculated.

2.4 Matrix deflation

If we write the matrix equation (12) as 𝐕=𝐕+𝐆𝐕\mathbf{V}=\mathbf{V}_{\infty}+\mathbf{G}\mathbf{V}, then we have

(𝕀𝐆)𝐕=𝐕\left(\mathbb{I}-\mathbf{G}\right)\mathbf{V}=\mathbf{V}_{\infty} (14)

where 𝕀\mathbb{I} is the identity matrix. It is seemingly straightforward to solve for 𝐕\mathbf{V} by taking the inverse of (𝕀𝐆)(\mathbb{I}-\mathbf{G}), but (𝕀𝐆)(\mathbb{I}-\mathbf{G}) is actually non-invertible since it is rank-deficient; the electric potential has infinite number of solutions since it is defined up to an additive constant. This manifests from the fact that the fundamental equation we are trying to solve is the Poisson equation within the head

(σV)=𝐉p\gradient\cdot\left(\sigma\gradient V\right)=\gradient\cdot\mathbf{J}^{p} (15)

with Neumann boundary condition at each boundary (current continuity)

σ+V𝐧=σV𝐧\displaystyle\sigma^{+}\gradient V\cdot\mathbf{n}=\sigma^{-}\gradient V\cdot\mathbf{n} (16)

where 𝐧\mathbf{n} is the outward-pointing unit surface normal. These equations are specified only up to the first derivative/gradient of VV, hence VV is defined up to a constant.

We thus know that both 𝐕\mathbf{V} and 𝐕+k𝐞\mathbf{V}+k\mathbf{e}, where 𝐞=(1,1,,1)T\mathbf{e}=(1,1,\dots,1)^{T} and kk is a nonzero constant, are solutions to the matrix equation. So, in addition to (14), we also have

(𝕀𝐆)(𝐕+k𝐞)=𝐕.\left(\mathbb{I}-\mathbf{G}\right)\left(\mathbf{V}+k\mathbf{e}\right)=\mathbf{V}_{\infty}. (17)

Subtracting (14) from this yields

(𝕀𝐆)𝐞=0\left(\mathbb{I}-\mathbf{G}\right)\mathbf{e}=0 (18)

which indicates that (𝕀𝐆)\left(\mathbb{I}-\mathbf{G}\right) has a zero eigenvalue with associated eigenvector 𝐞𝟎\mathbf{e}\neq\mathbf{0}, i.e. it is indeed singular. Equivalently,

𝐆𝐞=𝐞.\mathbf{G}\mathbf{e}=\mathbf{e}. (19)

This means that 𝐆\mathbf{G} has a unit eigenvalue with corresponding eigenvector 𝐞\mathbf{e}. So, one way to avoid the singularity is to eliminate this unit eigenvalue; the standard way to do this is by deflation, as follows.

First, assume the unit eigenvalue of 𝐆\mathbf{G} is simple [26]. For any vector 𝐚\mathbf{a}, we need to find a vector 𝐜\mathbf{c} with constant entries (not all necessarily the same) such that

𝐜T𝐚={kif𝐚=k𝐞0otherwise.\displaystyle\mathbf{c}^{T}\mathbf{a}=\begin{cases}k\ \ \text{if}\ \mathbf{a}=k\mathbf{e}\\ 0\ \ \text{otherwise.}\end{cases} (20)

The first case imposes the condition of defining a reference potential in some way. For example, if we pick 𝐜\mathbf{c} to have all the same entries, then it means we let the sum of all potentials over all boundaries to be zero [17]. We may also pick just a few entries to be zero, corresponding to a possibly more meaningful reference potential; for example, Wilson terminals are used in electrocardiogram [9]. The second case ensures that all eigenvalues of 𝐆=(𝐆𝐞𝐜T)\mathbf{G}^{\prime}=(\mathbf{G}-\mathbf{e}\mathbf{c}^{T}) are equal to the eigenvalues of 𝐆\mathbf{G}, except for the unit eigenvalue which is replaced by zero. This ensures the 𝐆\mathbf{G}^{\prime} is non-singular and hence invertible by condition (19). We may explicitly show this preservation of eigenvalues for 𝐆\mathbf{G}^{\prime} as follows. Let λ\lambda and 𝐯e\mathbf{v}_{e} be eigenvalues and corresponding eigenvectors of 𝐆\mathbf{G}. For 𝐯e𝐞\mathbf{v}_{e}\neq\mathbf{e},

𝐆𝐯e=(𝐆𝐞𝐜T)𝐯e=𝐆𝐯e𝐞𝐜T𝐯e=λ𝐯e𝐞0=λ𝐯e\displaystyle\mathbf{G}^{\prime}\mathbf{v}_{e}=\left(\mathbf{G}-\mathbf{e}\mathbf{c}^{T}\right)\mathbf{v}_{e}=\mathbf{G}\mathbf{v}_{e}-\mathbf{e}\mathbf{c}^{T}\mathbf{v}_{e}=\lambda\mathbf{v}_{e}-\mathbf{e}0=\lambda\mathbf{v}_{e} (21)

hence eigenvalues are preserved. For 𝐯e=k𝐞\mathbf{v}_{e}=k\mathbf{e},

𝐆k𝐞=(𝐆𝐞𝐜T)k𝐞=𝐆k𝐞𝐞𝐜Tk𝐞=k𝐞𝐞k=0.\displaystyle\mathbf{G}^{\prime}k\mathbf{e}=\left(\mathbf{G}-\mathbf{e}\mathbf{c}^{T}\right)k\mathbf{e}=\mathbf{G}k\mathbf{e}-\mathbf{e}\mathbf{c}^{T}k\mathbf{e}=k\mathbf{e}-\mathbf{e}k=0. (22)

So, we are now able to solve for 𝐕\mathbf{V} with the invertible deflated (𝕀𝐆)(\mathbb{I}-\mathbf{G}^{\prime}),

𝐕=(𝕀𝐆+𝐞𝐜T)1𝐕.\mathbf{V}=\left(\mathbb{I}-\mathbf{G}+\mathbf{e}\mathbf{c}^{T}\right)^{-1}\mathbf{V}_{\infty}. (23)

2.5 Discretization of the magnetic field

We now have a set of discrete potential solutions at the centroids of the triangles. If we discretize the 𝐁vol\mathbf{B}_{vol} integral in an identical manner as the electric potential case above, it allows us to get an approximation of the magnetic field at arbitrary field locations 𝐫\mathbf{r} directly from (3). The magnetic field is given by

𝐁(𝐫)𝐁0(𝐫)+μ04πl=1NS(σlσl+)m=1NlV(𝐜lm)𝛀lm\displaystyle\mathbf{B}\left(\mathbf{r}\right)\approx\mathbf{B}_{0}\left(\mathbf{r}\right)+\frac{\mu_{0}}{4\pi}\sum_{l=1}^{N_{S}}\left(\sigma_{l}^{-}-\sigma_{l}^{+}\right)\sum_{m=1}^{N_{l}}V\left(\mathbf{c}_{l}^{m}\right)\mathbf{\Omega}_{l}^{m} (24)

where we have defined the “vector solid angle”

𝛀lm\displaystyle\mathbf{\Omega}_{l}^{m} Δlm𝐫𝐫|𝐫𝐫|3×𝑑𝐒Δlm.\displaystyle\equiv\int_{\Delta_{l}^{m}}\frac{\mathbf{r}-\mathbf{r}^{\prime}}{\absolutevalue{\mathbf{r}-\mathbf{r}^{\prime}}^{3}}\times d\mathbf{S}_{\Delta_{l}^{m}}^{\prime}. (25)

The evaluation of 𝛀lm\mathbf{\Omega}_{l}^{m} has been done in [6] via Stoke’s Theorem, and is given by

𝛀lm=i=13(γi1γi)𝐫i\mathbf{\Omega}_{l}^{m}=\sum_{i=1}^{3}\left(\gamma_{i-1}-\gamma_{i}\right)\mathbf{r}_{i} (26)

where

γi1|𝐫i+1𝐫i|lnri|𝐫i+1𝐫i|+𝐫i(𝐫i+1𝐫i)ri+1|𝐫i+1𝐫i|+𝐫i+1(𝐫i+1𝐫i)\gamma_{i}\equiv-\frac{1}{\absolutevalue{\mathbf{r}_{i+1}-\mathbf{r}_{i}}}\cdot\ln\frac{r_{i}\absolutevalue{\mathbf{r}_{i+1}-\mathbf{r}_{i}}+\mathbf{r}_{i}\cdot\left(\mathbf{r}_{i+1}-\mathbf{r}_{i}\right)}{r_{i+1}\absolutevalue{\mathbf{r}_{i+1}-\mathbf{r}_{i}}+\mathbf{r}_{i+1}\cdot\left(\mathbf{r}_{i+1}-\mathbf{r}_{i}\right)} (27)

and i=1,2,3i=1,2,3 correspond to the three vertices of triangle mm on surface SlS_{l}. Also note that 𝐫4𝐫1\mathbf{r}_{4}\equiv\mathbf{r}_{1} and 𝐫0𝐫3\mathbf{r}_{0}\equiv\mathbf{r}_{3}.

This expression allows us to calculate the magnetic field easily, assuming useful indexing of vertices and triangles has been done in the process of surface discretization.

2.6 Calculation of magnetic flux signals

For forward calculation of the signal vectors, we calculate the magnetic flux through magnetometer pick-up loops. In reality, this pick-up loop setup corresponds only for SQUIDs; OPMs measure the volume integral of the magnetic field over a cylindrical sensing volume. However, we are interested primarily in how the reduced distance of OPM sensor arrays may affect the signal measured due to BEM head model errors, hence we do not consider volume integrals over the magnetic field here.

For NN sensors, the magnetic field is discretized into NN channel readings of magnetic flux. The vectorization of these readings into an N×1N\times 1 vector ϕ\bm{\phi} is defined as the signal vector. The signal space (or signal) is the NN-dimensional vector space with elements being any possible signal vector. Within the context of BEM, the signal space may be defined as the space containing all possible signals one may obtain when doing a forward calculation using the triangulation of a perfectly accurate head model.

In the case of sensors measuring the magnetic flux through a surface specified by an area and a normal vector, the jjth element of ϕ\bm{\phi} is given by

ϕj=Sj𝐁(𝐫)𝑑𝐒j,\phi_{j}=\int_{S_{j}}\mathbf{B}(\mathbf{r})\cdot d\mathbf{S}_{j}, (28)

where d𝐒jd\mathbf{S}_{j} represents an infinitesimal surface element on the sensor surface with unit normal 𝐧j\mathbf{n}_{j}. The calculation of (28) is commonly done by cubature approximation over the sensor area [1].

3 Representation of perturbations in the signal and source space

3.1 Additive perturbation of signal space

From the BEM steps above, we see that any inaccurate head mesh models will lead to inaccurate forward calculations of the magnetic flux, since they correspond to perturbed triangle vertices and centroids. This in turn leads to inaccurate calculations of the potential, magnetic field and magnetic flux signal vector. These errors may be written as an additive perturbation since they are random and independent of the unperturbed quantities,

𝐕=𝐕+δ𝐕\displaystyle\mathbf{V}^{\prime}=\mathbf{V}+\delta\mathbf{V} (29)
𝐁=𝐁+δ𝐁\displaystyle\mathbf{B}^{\prime}=\mathbf{B}+\delta\mathbf{B} (30)
ϕ=ϕ+δϕ\displaystyle\bm{\phi}^{\prime}=\bm{\phi}+\delta\bm{\phi} (31)

where the perturbations to each element of the flux signal vector are given by

δϕj=Sjδ𝐁(𝐫)𝑑𝐒j,\delta\phi_{j}=\int_{S_{j}}\delta\mathbf{B}(\mathbf{r})\cdot d\mathbf{S}_{j}, (32)

Note that the BEM errors are only relevant to the forward modeling of the signal vectors; real recorded signal vectors by definition do not have BEM errors. In the context of (noiseless) BEM forward modeling, the goal is to set up a head model such that the calculated signal ϕ\bm{\phi}^{\prime} is as close to the (noiseless) recorded/true data ϕ\bm{\phi} as possible. If information about the BEM geometry is perfect, then ϕ=ϕ\bm{\phi}^{\prime}=\bm{\phi} with δϕ=0\delta\bm{\phi}=0. We re-emphasize that the primary current contribution (4) does not depend on the head model by Geselowitz’s formula, thus all errors come from inaccurate volume contribution. In other words, δ𝐁=δ𝐁vol\delta\mathbf{B}=\delta\mathbf{B}_{vol} and hence δϕ=δϕvol\delta\bm{\phi}=\delta\bm{\phi}_{vol}.

As an aside in Appendix A, we present an analytical approach to calculate the first-order perturbation contributions of δ𝐕\delta\mathbf{V} and δ𝐁\delta\mathbf{B}. The subsequent calculation of the flux perturbation δϕ\delta\bm{\phi} may be done numerically with cubature approximations [1] or analytically [40].

3.2 Quantification of signal reconstruction errors with subspace angle

A compact metric for quantifying the difference between the recorded/reference data and modeled/perturbed data is the angle between the corresponding signal vectors ϕ\bm{\phi} and ϕ\bm{\phi}^{\prime} respectively. We may calculate their subspace angle θ\theta by [15]

subspace(ϕ,ϕ)=θ=arccos(Projϕϕϕ).\text{subspace}(\bm{\phi},\bm{\phi}^{\prime})=\theta=\arccos\left(\frac{\lVert\text{Proj}_{\bm{\phi}}\bm{\phi}^{\prime}\rVert}{\lVert\bm{\phi}\rVert}\right). (33)

If we decompose the signals into their different spatial frequency components via the SSS method [38], then the angle for individual different spatial frequency components can be calculated as well. In the SSS formalism, signal vectors are decomposed into their ll degree components via a vector spherical harmonic (VSH) expansion, and each spatial frequency component is conveniently characterized by an ll degree component. Higher ll degrees correspond to higher spatial frequencies, whereas lower ll degrees correspond to lower spatial frequency signal components. Let 𝐒\mathbf{S} be the basis matrix containing the VSH modes, 𝐒1:L\mathbf{S}_{1:L} be the first l=Ll=L degree portion of 𝐒\mathbf{S}, and 𝐱1:L\mathbf{x}_{1:L} be the corresponding coefficients/multipole moments of 𝐒1:L\mathbf{S}_{1:L}. The subspace angle θl\theta_{l} specific to the cumulative spatial frequency bands from l=1l=1 to l=Ll=L is thus

θ1:L=arccos(Projϕ1:Lϕ1:Lϕ1:L),\theta_{1:L}=\arccos\left(\frac{\lVert\text{Proj}_{\bm{\phi}_{1:L}}\bm{\phi}_{1:L}^{\prime}\rVert}{\lVert\bm{\phi}_{1:L}\rVert}\right), (34)

where

ϕ1:L=𝐒1:L𝐱1:L\bm{\phi}_{1:L}=\mathbf{S}_{1:L}\mathbf{x}_{1:L} (35)

and

ϕ1:L=𝐒1:L𝐱1:L.\bm{\phi}_{1:L}^{\prime}=\mathbf{S}_{1:L}\mathbf{x}_{1:L}^{\prime}. (36)

Given a measured signal vector ϕ\bm{\phi}, the multipole moments 𝐱1:L\mathbf{x}_{1:L} must first be estimated by taking the pseudoinverse of 𝐒1:L\mathbf{S}_{1:L},

𝐱1:L𝐒1:Lϕ.\mathbf{x}_{1:L}\approx\mathbf{S}_{1:L}^{\dagger}\bm{\phi}. (37)

Then, if required, individual ll degree portions 𝐱1:L\mathbf{x}_{1:L} may be obtained from 𝐱1:L\mathbf{x}_{1:L}. Note that to avoid aliasing in signal reconstruction, a high enough ll degree truncation is required so that the high-frequency components of the signal do not get projected inaccurately onto basis vectors corresponding to low frequencies. It was shown in [38] that a truncation at approximately L=8L=8 is sufficient to represent signal vectors; in this paper, we truncate at L=12L=12 in anticipation of close sensor array distances capturing signals of higher spatial complexities. Also note that l0l\neq 0 necessarily due to the absence of magnetic monopoles.

4 Results

4.1 Simulation setup

For our reference set-up, we used a simple 1-shell spherical head model of radius 9 cm and conductivity 0.33 S/m with origin located at the center of the sphere, and did a CC BEM forward calculation as described in Sections 2 and 3 to obtain ϕ\bm{\phi}. The BEM method was implemented using the Matlab library as provided in [35]. The spherical surface was triangulated into 1280 triangles (642 vertices), and 4 dipole sources with varying depths located at (2,0,0)(2,0,0) cm, (4,0,0)(4,0,0) cm, (6,0,0)(6,0,0) cm, and (8,0,0)(8,0,0) cm were specified. All the dipoles had a moment of (0,10,0)(0,10,0) nAm. To simulate inaccurate mesh modeling to obtain ϕ\bm{\phi}^{\prime}, the vertices of the spherical mesh were randomly perturbed radially up to 2%, 4%, 6%, 8% and 10% relative to the 9 cm radius.

The sensor array that we used consisted of 324 square magnetometer pick-up loops with side length 2.1 cm all with non-radial orientations (to avoid linear dependence of the SSS basis [38]), uniformly arranged on a spherical shell up to π/6\pi/6 below the z=0z=0 plane. It has been shown in [40] that a 9-point cubature approximation yields accurate calculations for the sensor distances of 10 cm to 15 cm that we considered, thus we used a 9-point cubature approximation for the calculation of signal vectors in this paper. Figure 1 illustrates the sensor, head, and source setup as described above.

The averaged results over 100 forward calculations with this random vertex perturbation setup is presented in the following sections.

Refer to caption
Figure 1: A (6,0,0)(6,0,0) cm dipolar source with moment (0,10,0)(0,10,0) nAm (red arrow) is shown located within a triangulated sphere of radius 9 cm that has its vertices randomly perturbed by up to 10% (blue mesh). The spherical sensor array of radius 10 cm with 324 square pick-up loops of side length 2.1 cm and random orientations is also shown in gray.

4.2 Signal vector error for sensor arrays at varying distances

First, we investigate how the error due to BEM mesh inaccuracy varies according to sensor array distance using equation (33). The sensor array radii were set to be from 10 cm to 15 cm, in increments of 1 cm (i.e. 1 cm to 6 cm from the surface of a 9 cm head model) and the signal was assumed the be noiseless. Figure 2 shows that for all the source distances considered, as sensor array distance increases, the subspace angle between the reference signal ϕ\bm{\phi} and perturbed signal ϕ\bm{\phi}^{\prime} decreases, indicating decreasing relative effects of mesh boundary inaccuracies as sensor array distance from the head increases. Moreover, smaller perturbations to the head model resulted in smaller subspace angles for a given sensor array distance when compared to higher perturbations as expected. These results may also be visually seen via plots of ϕ\bm{\phi} and ϕ\bm{\phi}^{\prime} explicitly; we show this in Figure 3 with the 2 cm source case across the various sensor distances and mesh perturbations for one of the 100 random mesh perturbation realizations.

Refer to caption
Figure 2: In the noiseless case, the decreasing subspace angle between the reference signal and perturbed signal as distance increases shows that the signal error caused by head model errors are less impactful for more distant sensor arrays. Intuitively, as the perturbation of the head model increases, the subspace angle increases as well.
Refer to caption
Figure 3: (First row) We plot the signal vectors ϕ\bm{\phi} and ϕ\bm{\phi}^{\prime} and signal error ϕϕ\bm{\phi}^{\prime}-\bm{\phi} for the 2 cm source with a 10% mesh perturbation across various sensor array distances. We see that indeed, as sensor array distance increases, signal error decreases for the same amount of mesh perturbation. (Second row) The 2 cm source with a sensor array distance of 10 cm was considered across the various mesh perturbations. We see that increased mesh perturbations give increased signal error.

An interesting observation is that from the 2 cm source case to the 4 cm and 6 cm source cases, the subspace angle decreases before increasing again in the 8 cm source case; i.e. there is a “turnaround” point in subspace angle as a function of source distance. This may be explained by the fact that for deeper and superficial sources, the ratio between the volume current contribution to the primary current contribution is higher than for sources that lie between them. For all mesh perturbation cases, 4 cm and 6 cm sources have the lowest volume-to-primary current contributions to the signal as compared to the 2 cm and 8 cm sources. Figure 4 illustrates this for the 10% mesh perturbation case. This may be explained qualitatively by the fact that the 2 cm deep primary source has a low signal strength due to its larger source-to-sensor distance, and hence has a low volume-to-primary current contribution to the signal. The superficial 8 cm source has a small source-to-sensor distance, and hence measures a larger volume current contribution, resulting in the higher volume-to-primary current contribution to the signal. As mentioned previously, all signal errors result from errors in the volume contribution portion only, i.e. δϕ=δϕvol\delta\phi=\delta\bm{\phi}_{vol}. Thus, the higher volume contribution relative to the primary contribution implies higher signal errors given a same amount of mesh perturbation (equivalently, volume current perturbation) for the 2 cm and 8 cm source cases, hence explaining the “turnaround” point of the subspace angles at some source distance in between them.

Refer to caption
Figure 4: The volume-to-primary current contributions towards the total signal for all mesh perturbations is the highest for the 8 cm and 2 cm source distance cases; the 10% mesh perturbation case is shown here. This implies highest signal errors at superficial and deep source locations for constant mesh perturbations, which agrees with the result in Figure 2.

Next, we determine if the additive error of the signal vector, δϕ\delta\bm{\phi}, may be explained by increasing orders of l=Ll=L degree truncation, and if δϕ\delta\bm{\phi} varies according to sensor distances. First, we show that the unperturbed signal may be explained to a large extent with L=12L=12 degree truncation for all the sensor array distances that we considered. This is shown in the first row of plots in Figure 5; the subspace angle with S1:L\textbf{S}_{1:L} decays to become nearly zero at L=12L=12 for all source distances. As expected, closer sensor array distances have higher subspace angles than further sensor arrays, which agrees with Figure 2.

From the second row of plots in Figure 5 however, we see that despite the total signal ϕ\bm{\phi} being well-explained at L=12L=12, the signal errors δϕ\delta\bm{\phi} which consist mostly of higher frequency components require a higher LL truncation to explain the signal for all source distances. The subspace angle still decreases for increased ll degree truncation as expected (since δϕ=δϕvol\delta\phi=\delta\phi_{vol} are still volume current contributions), and the subspace angles are smaller for increased sensor array distances. However, the angles are much higher than those of the total signal ϕ\bm{\phi}, indicating that higher spatial frequency components are affected more by inaccurate mesh modeling. This is because a higher ll degree truncation required to fully explain the additive signal error δϕ\delta\bm{\phi} of closer sensor arrays indicates that their δϕ\delta\bm{\phi} has a more spatially complex pattern with higher spatial frequency components. This higher spatial complexity is due to the fact that higher spatial frequency components decay quickly with increasing distance, hence by placing sensors closer to the source, these components can be captured to give higher resolution of the signal error δϕ\delta\bm{\phi}. Note that Figure 5 is for the case where the vertices of the mesh was perturbed radially up to 10%. The plots for the different mesh perturbations are similar, hence we present just the 10% case here.

Refer to caption
Figure 5: (Top row) The total signal ϕ\bm{\phi} can be explained well at L=12L=12 degree truncation of the VSH basis matrix 𝐒1:L\mathbf{S}_{1:L} for all source distances and a 10% mesh perturbation. For closer sensor distances, the subspace angle between ϕ\bm{\phi} and 𝐒1:L\mathbf{S}_{1:L} is higher given an LL degree truncation. (Bottom row) Similarly, for a given LL degree truncation and a given perturbed head model (10% perturbation in this case), the subspace angle decreases for increasing sensor distances. However, the angles are higher than in the total signal case, indicating higher spatial complexity of the signal and signal errors recorded by sensor arrays closer to the head.

4.3 Source localization and orientation errors

From our results above which considers the noiseless signal case, the signal vector suffers from higher inaccuracies for closer sensor arrays due to the larger errors in their higher spatial frequency components. Deep and superficial sources also had higher signal inaccuracies due to a higher volume current contribution relative to primary currents. Here, we investigate if these observations will be seen in the form of source localization errors as well. The source localization procedure was done via a standard ECD fit using the “fit_dipole” function in MNE-Python 1.0 [13, 14]. The forward model here was computed using LC BEM however, as it is currently the only solving method implemented in MNE-Python.

The results for the noiseless case are shown in the first columns of Figures 6, 7, 8 and 9, which correspond to the 2 cm, 4 cm, 6 cm and 8 cm source case respectively. Indeed, in the noiseless case, source localization and orientation errors are largest for closer sensor arrays, as well as deep and superficial sources for a fixed mesh perturbation. These observations are in agreement with the result for signal errors as presented above.

However, the primary motivation to move sensors closer to the head is because closer sensors have the potential to give more accurate source localization results due to higher SNR as mentioned in the introduction. The definition of SNR (with units of decibels) used in MNE-Python 1.0 follows that of Goldenholz [12],

SNR=10logq2Nj=1Nϕj2sj2\displaystyle\text{SNR}=10\log\left\lfloor\frac{q^{2}}{N}\sum_{j=1}^{N}\frac{\phi_{j}^{2}}{s_{j}^{2}}\right\rfloor (38)

where qq is the source strength, NN is the total number of sensors on the sensor array, ϕj\phi_{j} is the signal on sensor jj and sj2s_{j}^{2} is the noise variance on sensor jj. We thus introduced various noise levels to determine the noise level at which the effect of having more accurate source localization due to higher SNR of closer sensors outweighs the effect of less accurate source localization due to the higher errors of the high frequency components of the noiseless signal. We found that this occurred at a SNR of around 6 dB (the sensor noise was varied to force a 6 dB SNR for a varying sensor array distances); the localization and orientation errors began to increase as sensor array distances increased at around an SNR of 6 dB. This is shown in the second column of Figures 6, 7, 8 and 9. The rightmost column of Figures 6, 7, 8 and 9 show that for an SNR greater than 6 dB, in this case a constant 20 fT noise level, then there is an improvement in source localization for closer sensor arrays. This means that a higher SNR allowing for better source localization resolutions outweighs the effects of BEM errors for noisy signals with SNR above approximately 6 dB.

Refer to caption
Figure 6: 2 cm source case. (Left column) The position and orientation errors of the ECD fit for the noiseless signal case is shown. For closer sensor array distances, the error increases. This agrees with the result that closer sensor array measurements give more inaccurate signals in the noiseless case. (Middle column) In the noisy case where we have a SNR level of 6 dB, the localization and orientation errors start to increase slightly as sensor array distances increase, indicating that the effects of better localization due to higher SNR is starting to balance out the effects of poorer localization due to more inaccurate signals captured by closer sensor array distances. (Right column) In the noisiest case with a constant noise level of 20 fT, the dipoles are better localized at closer sensor distances since the effect of higher SNR now outweighs the effects of signal error due to head model inaccuracies.
Refer to caption
Figure 7: 4 cm source case. The description of this figure is similar to Figure 6.
Refer to caption
Figure 8: 6 cm source case. The description of this figure is similar to Figure 6.
Refer to caption
Figure 9: 8 cm source case. The description of this figure is similar to Figure 6.

5 Conclusion

In this paper, we have investigated the signal and source localization errors due to BEM head geometry inaccuracies with respect to varying MEG sensor array distances. This examination was motivated by next-generation OPM sensors that may be placed directly on the subject’s head, resulting in signal measurements with higher spatial resolutions. This includes measuring any inaccurate volume current contributions with higher resolution; as stated before, in a piecewise homogeneous conductor model of the head, volume currents may be equivalently expressed as surface currents at the head model boundaries. As such, head model inaccuracies lead to inaccurate volume current contributions.

We found that for signals with SNR greater than 6 dB, placing sensor arrays closer to the head causes higher relative signal errors for a perturbed spherical head model, and thus this leads to higher source localization errors. This is because the signal measured by these sensor arrays now contain finer spatial details due to the ability to now capture the fast-decaying high spatial frequency components of the magnetic field, and these high frequency components suffer from higher errors due to head model inaccuracies. Moreover, for deep and superficial sources where there are higher relative volume current contributions to the signal, the signal and source localization errors are higher as well for a fixed mesh perturbation amount. For signals with SNR below 6 dB, the advantage of having higher SNR for closer sensor array distances outweighs the effects due to the increased errors arising from the high spatial frequency components, thus source localization errors decrease; this is consistent with the current understanding of the advantages of using OPM sensor arrays.

Our results tell us that in general, for noisy signals, OPM sensors should indeed result in more accurate source localization results despite head modelling errors. However, as signal noise levels decrease either via an improvement in sensor technology or signal processing methods (e.g. averaging over many trials), BEM head geometry errors must be minimized when sensor distances are shifted closer to the head in order to avoid increased signal and source localization inaccuracies.

6 Acknowledgements

We would like to thank Matti Stenroos for helpful discussions regarding BEM, as well as clarifications about his BEM codes. This project was funded by the NIH Brain Initiative grant U01EB028656 awarded to Sandia National Laboratories.

Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC—a wholly owned subsidiary of Honeywell International Inc.—for the U.S. Department of Energy’s National Nuclear Security Administration, under contract DENA0003525. This paper describes objective technical results and analysis. Any subjective views or opinions that might be expressed in the paper do not necessarily represent the views of the U.S. Department of Energy, the United States Government, or the National Institutes of Health. The content is solely the responsibility of the authors.

Appendix A Analytical first-order errors for CC BEM

From (24), we see that there are three terms that depend on the head model accuracy that affect the calculation of the magnetic field: the conductivities σl±\sigma_{l}^{\pm}, the scalar electric potential V(𝐜lm)V(\mathbf{c}_{l}^{m}) (equivalently, the matrix 𝐆\mathbf{G}), and the vector solid angle 𝛀lm\mathbf{\Omega}_{l}^{m}. The latter two depend on the mesh accuracy, whereas the former depends on the conductivity values.

A.1 Perturbations to mesh vertices

First, we consider perturbations to VV. By looking at the form of 𝐆\mathbf{G} as in (13), we see that there are two possible sources of error in the head model: the solid angle (i.e. vertex/triangle centroid perturbations), and the conductivity values of each region. Here, we offer analytical forms to compute the first-order errors due to each of these sources of error. Higher order corrections may be obtained with the help of e.g. Matlab or Mathematica.

The solid angle can be regarded as a scalar field in 12-dimensional space (3 coordinates per 𝐫\mathbf{r}, 𝐫1\mathbf{r}_{1}, 𝐫2\mathbf{r}_{2}, 𝐫3\mathbf{r}_{3}). A perturbation to one of these 12 coordinates corresponds to perturbations in the xx, yy or zz direction of one of the three vertices of the corresponding triangle 𝐫1\mathbf{r}_{1}, 𝐫2\mathbf{r}_{2}, 𝐫3\mathbf{r}_{3}, or the xx, yy or zz direction of the point of reference 𝐫\mathbf{r}. Let 𝐫=(x,y,z)\mathbf{r}=(x,y,z) and 𝐫i=(xi,yi,zi)\mathbf{r}_{i}=(x_{i},y_{i},z_{i}), where i=1,2,3i=1,2,3. For small perturbations, only the first-order expansion term is significant. If we let xx be perturbed to become x+δxx+\delta x, the error in solid angle calculations (10), δΩ\delta\Omega, can be approximated as

δΩ=Ω(x+δx,y,z,x1,,z3)Ω(x,,z3)Ωx|𝐫,𝐫1,𝐫2,𝐫3δx\delta\Omega=\Omega\left(x+\delta x,y,z,x_{1},\dots,z_{3}\right)-\Omega\left(x,\dots,z_{3}\right)\approx\left.\frac{\partial\Omega}{\partial x}\right|_{\mathbf{r},\mathbf{r}_{1},\mathbf{r}_{2},\mathbf{r}_{3}}\delta x (39)

Let the argument within the arctan be P=P(x,,z3)P=P(x,\dots,z_{3}). The right hand side of (39) may be evaluated by the chain rule:

Ωx=ΩPPx=21+P2Px.\frac{\partial\Omega}{\partial x}=\frac{\partial\Omega}{\partial P}\frac{\partial P}{\partial x}=\frac{2}{1+P^{2}}\frac{\partial P}{\partial x}. (40)

Note that due to the symmetric form of the solid angle where the numerator obeys scalar triple product identity and the denominator has all terms that obey cyclic index permutations, we only need to evaluate 2 partial derivatives of PP to get all 12 of them. Namely, we only need to evaluate one partial derivative with respect to any of the 3 coordinates of 𝐫\mathbf{r}, and another with respect to any of the 9 coordinates of 𝐫i\mathbf{r}_{i}. Cyclic permutation of the coordinate indices (x,y,z)(z,x,y)(y,z,x)(x,y,z)\leftrightarrow(z,x,y)\leftrightarrow(y,z,x) then gives us the other partial derivatives with respect to the other 2 coordinates of the corresponding 𝐫\mathbf{r} or 𝐫i\mathbf{r}_{i}. Then, for the case of partial derivatives corresponding to coordinates of 𝐫i\mathbf{r}_{i}, permutation of vertex indices (1,2,3)(2,3,1)(3,1,2)(1,2,3)\leftrightarrow(2,3,1)\leftrightarrow(3,1,2) gives us the other 2 triangle vertices’ 6 partial derivatives. Note that if we extend to higher-order partial derivatives, symmetry considerations may still be used to reduce the total number of partial derivatives to evaluate. However, mixed partials mean that more than 2 partial derivatives need to be evaluated necessarily.

One may also interpret the above 12 partial derivatives to evaluate as a 1-1 correspondence between the index permutations and 12 coordinates. The 3 𝐫\mathbf{r} coordinates correspond to the 3 cyclic permutations on the coordinate indices (x,y,z)(x,y,z), whereas the 9 𝐫i\mathbf{r}_{i} coordinates correspond to the 3×3=93\times 3=9 possible pairings of the cyclic permutations of two sets of indices, namely the coordinate indices (x,y,z)(x,y,z) and vertex indices (1,2,3)(1,2,3). If we denote the 3 coordinates of 𝐫\mathbf{r} as (x1,x2,x3)(x_{1},x_{2},x_{3}) and the 9 coordinates of 𝐫i\mathbf{r}_{i} as xjx_{j}, j=4,,12j=4,\dots,12, then the total perturbation of the solid angle is

δΩlm(𝐜ki)21+P2(j=13Px1|{σjc}δxj+j=412Px4|{σjc+v}δxj)\delta\Omega_{l}^{m}\left(\mathbf{c}_{k}^{i}\right)\approx\frac{2}{1+P^{2}}\left(\sum_{j=1}^{3}\left.\frac{\partial P}{\partial x_{1}}\right|_{\{\sigma^{c}_{j}\}}\delta x_{j}+\sum_{j=4}^{12}\left.\frac{\partial P}{\partial x_{4}}\right|_{\{\sigma^{c+v}_{j}\}}\delta x_{j}\right) (41)

where σjc=(xj,xk,xl)\sigma^{c}_{j}=(x_{j},x_{k},x_{l}) are the 3 possible coordinate index cyclic permutations, and σjc+v\sigma^{c+v}_{j} are the 9 possible pairs of coordinate index and vertex index cyclic permutations. Any small perturbation of a vertex results in the adjacent triangles’ perturbed centroids (i.e. perturbed observation points 𝐫\mathbf{r}) and the adjacent triangles’ change in solid angles; these two cases correspond to the first and second sums in (41) respectively.

The effects of the perturbations above may be represented by a sparse additive perturbative matrix δ𝐆\delta\mathbf{G} as defined in (48), whose elements are calculated by (41) and (A.2). Note that the first sum of (41) corresponding to the case of perturbed centroids contribute to nonzero row entries, whereas the second sum corresponding to perturbed vertices contribute to nonzero column entries, due to our arrangement of the block elements in 𝐆\mathbf{G}.

We now want to see how this affects 𝐕\mathbf{V}. Let 𝐀(𝕀𝐆+𝐞𝐜T)\mathbf{A}\equiv(\mathbb{I}-\mathbf{G}+\mathbf{e}\mathbf{c}^{T}) and 𝐀~𝐀+δ𝐆\tilde{\mathbf{A}}\equiv\mathbf{A}+\delta\mathbf{G}. If 𝐀~\tilde{\mathbf{A}} is non-singular, then [37]

𝐀~𝐀~1\displaystyle\tilde{\mathbf{A}}\tilde{\mathbf{A}}^{-1} =(𝐀+δ𝐆)𝐀~1=I\displaystyle=\left(\mathbf{A}+\delta\mathbf{G}\right)\tilde{\mathbf{A}}^{-1}=I (42)
𝐀1\displaystyle\implies\mathbf{A}^{-1} =(I+𝐀1δ𝐆)𝐀~1\displaystyle=\left(I+\mathbf{A}^{-1}\delta\mathbf{G}\right)\tilde{\mathbf{A}}^{-1} (43)
𝐀~1𝐀1\displaystyle\implies\tilde{\mathbf{A}}^{-1}-\mathbf{A}^{-1} =𝐀1δ𝐆(𝐀+δ𝐆)1\displaystyle=-\mathbf{A}^{-1}\delta\mathbf{G}\left(\mathbf{A}+\delta\mathbf{G}\right)^{-1} (44)

Therefore, errors in potential are given by

δ𝐕=𝐀1δ𝐆(𝐀+δ𝐆)1𝐕.\delta\mathbf{V}=-\mathbf{A}^{-1}\delta\mathbf{G}\left(\mathbf{A}+\delta\mathbf{G}\right)^{-1}\mathbf{V}_{\infty}. (45)

Next, we consider the first-order perturbation to the vector solid angle (26). It depends only on the coordinates of the triangles’ vertices and may be obtained in a straightforward manner,

δ𝛀lmi=13[j=19(γi1γi)xjδxj]𝐫i.\delta\mathbf{\Omega}_{l}^{m}\approx\sum_{i=1}^{3}\left[\sum_{j=1}^{9}\frac{\partial\left(\gamma_{i-1}-\gamma_{i}\right)}{\partial x_{j}}\delta x_{j}\right]\mathbf{r}_{i}. (46)

A.2 Perturbations to conductivity

We now consider perturbations to σ±\sigma^{\pm}, which are conductivity values within the layers of the head model. This is an easier case to deal with, since we may simply add a perturbative constant δσ\delta\sigma to each σ\sigma. For the conductivity term within 𝐆\mathbf{G}, let us denote this error term as

δσk,l\displaystyle\delta\sigma_{k,l} =σl+δσlσl+δσl+σk+δσk+σk++δσk+σlσl+σk+σk+\displaystyle=\frac{\sigma_{l}^{-}+\delta\sigma_{l}^{-}-\sigma_{l}^{+}-\delta\sigma_{l}^{+}}{\sigma_{k}^{-}+\delta\sigma_{k}^{-}+\sigma_{k}^{+}+\delta\sigma_{k}^{+}}-\frac{\sigma_{l}^{-}-\sigma_{l}^{+}}{\sigma_{k}^{-}+\sigma_{k}^{+}}
=(σlσl+)(δσk+δσk+)+(σk+σk+)(δσl+δσl)(σk+σk+)2+(σk+σk+)(δσk+δσk+)\displaystyle=-\frac{\left(\sigma_{l}^{-}-\sigma_{l}^{+}\right)\left(\delta\sigma_{k}^{-}+\delta\sigma_{k}^{+}\right)+\left(\sigma_{k}^{-}+\sigma_{k}^{+}\right)\left(\delta\sigma_{l}^{+}-\delta\sigma_{l}^{-}\right)}{\left(\sigma_{k}^{-}+\sigma_{k}^{+}\right)^{2}+\left(\sigma_{k}^{-}+\sigma_{k}^{+}\right)\left(\delta\sigma_{k}^{-}+\delta\sigma_{k}^{+}\right)} (47)

Together with (41), the total perturbative matrix δ𝐆\delta\mathbf{G} for small vertex perturbations and arbitrary conductivity inaccuracies is

δGk,li,m=12πδσk,lδΩlm(𝐜ki).\delta G_{k,l}^{i,m}=-\frac{1}{2\pi}\delta\sigma_{k,l}\delta\Omega_{l}^{m}\left(\mathbf{c}_{k}^{i}\right). (48)

The errors in the total magnetic field up to first order with respect to perturbations of the components of 𝐫i\mathbf{r}_{i} as well as conductivities σ\sigma may be given by

δ𝐁(𝐫)μ04π{l=1NS(σlσl+)m=1Nl[δV(𝐜lm)𝛀lm+V(𝐜lm)δ𝛀lm]+l=1NS(δσlδσl+)m=1NlV(𝐜lm)𝛀lm}\displaystyle\delta\mathbf{B}\left(\mathbf{r}\right)\approx\frac{\mu_{0}}{4\pi}\left\{\sum_{l=1}^{N_{S}}\left(\sigma_{l}^{-}-\sigma_{l}^{+}\right)\sum_{m=1}^{N_{l}}\left[\delta V\left(\mathbf{c}_{l}^{m}\right)\mathbf{\Omega}_{l}^{m}+V\left(\mathbf{c}_{l}^{m}\right)\delta\mathbf{\Omega}_{l}^{m}\right]+\sum_{l=1}^{N_{S}}\left(\delta\sigma_{l}^{-}-\delta\sigma_{l}^{+}\right)\sum_{m=1}^{N_{l}}V\left(\mathbf{c}_{l}^{m}\right)\mathbf{\Omega}_{l}^{m}\right\} (49)

with its terms given by (45), (48), (A.2), (41), and (46).

References

  • [1] M. Abramowitz and I. Stegun, Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, Dover, New York, 1964.
  • [2] A. Borna, T. R. Carter, A. P. Colombo, Y.-Y. Jau, J. McKay, M. Weisend, S. Taulu, J. M. Stephen and P. D. D. Schwindt, “Non-Invasive Functional-Brain-Imaging with an OPM-based Magnetoencephalography System”, PLoS ONE, vol. 15, no. 1, 2020.
  • [3] A. Borna, T. R. Carter, J. D. Goldberg, A. P. Colombo, Y.-Y. Jau, C. Berry, J. McKay, J. Stephen, M. Weisend, and P. D. D. Schwindt, “A 20-channel magnetoencephalography system based on optically pumped magnetometers”, Phys. Med. Biol., vol. 62, no. 23, 2017.
  • [4] E. Boto, S. S. Meyer, V. Shah, O. Alem, S. Knappe, P. Kruger, T. M. Fromhold, M. Lim, P. M. Glover, P. G. Morris, R. Bowtell, G. R. Barnes and M. J. Brookes, “A new generation of magnetoencephalography: Room temperature measurements using optically-pumped magnetometers”, NeuroImage, vol. 149, pp. 404-414, 2017.
  • [5] M. Dannhauer, B. Lanfer, C. H. Wolters and T. R. Knösche T.R., “Modeling of the human skull in EEG source analysis,” Human Brain Mapping, vol. 32, no. 9, pp. 1383–1399, 2011.
  • [6] J. C. de Munck, “A linear discretization of the volume conductor boundary integral equation using analytically integrated elements (electrophysiology application),” IEEE Transactions on Biomedical Engineering, vol. 39, no. 9, pp. 986-990, 1992.
  • [7] A. S. Ferguson and G. Stroink, “Factors Affecting the Accuracy of the Boundary Element Method in the Forward Problem – I: Calculating Surface Potentials,” IEEE Transactions on Biomedical Engineering, vol. 44, no. 11, 1997.
  • [8] A. S. Ferguson, X. Zhang and G. Stroink, “A Complete Linear Discretization for Calculating the Magnetic Field Using the Boundary Element Method,” IEEE Transactions on Biomedical Engineering, vol. 41, no. 5, 1994.
  • [9] G. Fischer, B. Tilg, R. Modre, F. Hanser, B. Messnarz and P. Wach, “Modeling the Wilson Terminal in the Boundary and Finite Element Method,” IEEE Transactions on Biomedical Engineering, vol. 49, no. 3, pp. 217-224, 2002.
  • [10] N. G. Gençer and I. O. Tanzer, “Forward problem solution of electromagnetic source imaging using a new BEM formulation with high-order elements,” Physics in Medicine & Biology, vol. 44, no. 9, 1999.
  • [11] D. B. Geselowitz, “On Bioelectric Potentials in an Inhomogeneous Volume Conductor,” Biophysical Journal, vol. 7, no. 1, pp. 1-11, 1967.
  • [12] D. M. Goldenholz, S. P. Ahlfors, M. S. Hämäläinen, D. Sharon, M. Ishitobi, L. M. Vaina and S. M. Stufflebeam, “Mapping the signal‐to‐noise‐ratios of cortical sources in magnetoencephalography and electroencephalography,” Human Brain Mapping, vol. 30, no. 4, pp. 1077-1086, 2008.
  • [13] A. Gramfort, M. Luessi, E. Larson, D. A. Engemann, D. Strohmeier, C. Brodbeck, R. Goj, M. Jas, T. Brooks, L. Parkkonen, and M. S. Hämäläinen. “MEG and EEG data analysis with MNE-Python,” Frontiers in Neuroscience, 7(267):1–13, 2013.
  • [14] A. Gramfort, M. Luessi, E. Larson, D. A. Engemann, D. Strohmeier, C. Brodbeck, L. Parkkonen, and M. S. Hämäläinen. “MNE software for processing MEG and EEG data,” NeuroImage, 86:446–460, 2014.
  • [15] H. Gunawan, O. Neswan and W. Setya-Budhi, “A Formula for Angles between Subspaces of Inner Product Spaces,” Beiträge zur Algebra und Geometrie, vol. 46, no. 2, 2005.
  • [16] M. S. Hämäläinen, R. Hari, R. Ilmoniemi, J. Knuutila and O. V. Lounasmaa, “Magnetoencephalography - theory, instrumentation, and applications to noninvasive studies of the working human brain,” Review of Modern Physics, vol. 65, no. 2, pp. 413-497, 1993.
  • [17] M. S. Hämäläinen and J. Sarvas, “Realistic Conductivity Geometry Model of the Human Head for Interpretation of Neuromagnetic Data,” IEEE Transactions on Biomedical Engineering, vol. 36, no. 2,1989.
  • [18] R. Hari and A. Puce, MEG-EEG Primer, Oxford University Press, 2017.
  • [19] J. Haueisen, C. Ramon, M. Eiselt, H. Brauer, H. Nowak, “Influence of tissue resistivities on neuromagnetic fields and electric potentials studied with a finite element model of the head,” IEEE Transactions on Biomedical Engineering, vol. 44, no. 8, pp 727–735, 1997.
  • [20] R, M. Hill, E. Boto, M. Rea, N. Holmes, J. Leggett, L. A. Coles, M. Papastavrou, S. K. Everton, B. A. E. Hunt, D. Sims, J. Osborne, V. Shah, R. Bowtell and M. J. Brookes, “Multi-channel whole-head OPM-MEG: Helmet design and a comparison with a conventional system,” NeuroImage, vol. 219, no. 116995, 2020.
  • [21] J. Iivanainen, M. Stenroos and L. Parkkonen, “Measuring MEG closer to the brain: Performance of on-scalp sensor arrays,” NeuroImage, vol. 147, p. 542 - 553, 2017.
  • [22] J. Iivanainen, R. Zetter, M. Grön, K. Hakkarainen and L. Parkkonen, “On-scalp MEG system utilizing an actively shielded array of optically-pumped magnetometers,” NeuroImage, vol. 194, p. 244 - 257, 2019.
  • [23] R. J. Ilmoniemi and J. Sarvas, Brain signals: Physics and mathematics of MEG and EEG. MIT Press, 2019.
  • [24] S. Knappe, T. Sander and L. Trahms, Optically-Pumped Magnetometers for MEG, Springer Verlag, Heidelberg, 2014.
  • [25] B. Lanfer, M. Scherg, M. Dannhauer, T. R. Knösche, M. Burger and C. H. Wolters, “Influences of skull segmentation inaccuracies on EEG source analysis,” NeuroImage, vol. 62, no. 1, pp. 418-431, 2012.
  • [26] M. S. Lynn and W. P. Timlake, “The numerical solution of singular integral equations of potential theory,” Numerische Mathematik, vol. 11, pp. 77-98, 1968.
  • [27] A. J. Mäkinen, R. Zetter, J. Iivanainen, K. C. J. Zevenhoven, L. Parkkonen and R. J. Ilmoniemi, “Magnetic-field modeling with surface currents. Part I. Physical and computational principles of bfieldtools,” Journal of Applied Physics, 063906, 2020.
  • [28] J. W. H. Meijs, O. W. Weier, M. J. Peters and A. van Oosterom, “On the Numerical Accuracy of the Boundary Element Method,” IEEE Transactions on Biomedical Engineering, vol. 36, no. 10, 1989.
  • [29] G. Nolte, T. Fieseler and G. Curio, “Perturbative analytical solutions of the magnetic forward problem for realistic volume conductors,” Journal of Applied Physics, vol. 89, no. 2360, 2001.
  • [30] A. V. Oosterom and J. Strakee, “The Solid Angle of a Plane Triangle,” IEEE Transactions on Biomedical Engineering, vol. BME-30, no. 2, pp. 125-126, 1983.
  • [31] C. Phillips, J. Mattout and K. Friston, Forward models for EEG, Academic Press, 2006.
  • [32] H. A. Schlitt, L. Heller, R. Aaron, E. Best and D. M. Ranken, “Evaluation of Boundary Element Methods for the EEG Forward Problem: Effects of Linear Interpolation,” IEEE Transactions on Biomedical Engineering, vol. 42, no. 1, 1995.
  • [33] M. Stenroos, “The transfer matrix for epicardial potential in a piece-wise homogeneous thorax model: the boundary element formulation,” Physics in Medicine & Biology, vol. 54, no. 18, 2009.
  • [34] M. Stenroos and O. Hauk, “Minimum-norm cortical source estimation in layered head models is robust against skull conductivity error,” NeuroImage, vol. 81, pp. 265-272, 2013.
  • [35] M. Stenroos, V. Mäntynen and J. Nenonen, “A Matlab library for solving quasi-static volume conduction problems using the boundary element method,” Computer Methods and Programs in Biomedicine, vol. 88, no. 3, pp. 256-263, 2007.
  • [36] M. Stenroos and A. Nummenmaa, “Incorporating and Compensating Cerebrospinal Fluid in Surface-Based Forward Models of Magneto- and Electroencephalography,” PLoS ONE, vol. 11, no. 7, 2016.
  • [37] G. W. Stewart and J.-G. Sun, Matrix perturbation theory, Academic Press, Boston, 1990.
  • [38] S. Taulu and M. Kajola, “Presentation of electromagnetic multichannel data: The signal space separation method,” Journal of Applied Physics, vol. 97, 2005.
  • [39] S. Vallaghe and M. Clerc, “A Global Sensitivity Analysis of Three- and Four-Layer EEG Conductivity Models,” IEEE Transactions on Biomedical Engineering, vol. 56, no. 4, pp. 988-995, 2009.
  • [40] W.-J. Yeo, Y.-R. Yeo and S. Taulu, “Towards analytical calculation of the magnetic flux measured by magnetometers,” Physics Letters A, vol. 411, 2021.