1 Introduction

Magnetic nanoparticles are in the focus of research in many biomedical applications [17, 19]. To reveal the location and the distribution of such particles, magnetorelaxometric measurements using SQUID sensor systems and linear inversion techniques can be used [3]. The imaging of magnetic nanoparticles is particularly important for hyperthermia cancer treatment [6, 23, 24] and for magnetic drug targeting [2, 4, 16].

To estimate the distributions of magnetic nanoparticles, the linear inverse problem (IP) of reconstructing dipole moments m from a measured magnetic field b has to be solved,

$$ {\mathbf{b}} = {\mathbf{L}} {\mathbf{m}} . $$
(1)

The lead field matrix L incorporates information about the sensor, source, and forward models. The lead field condition is crucial for the stability of the solution m, in the presence of numerical errors and noise contained in b. Our objective is to identify parameters associated with the source space grids to support a good condition for L with respect to practical requirements. As a result, the linear inverse solution m should be less sensitive to noise and errors. Because the condition is a property of the linear inverse problem (1), our findings are relevant to the application of different solution approaches, such as the TSVD [14], sLORETA [20], or FOCUSS [12] methods.

2 Methods

2.1 Sensor arrays and source spaces

Five sensor models of two magnetometer arrays, as typically used in magnetic nanoparticle measurements, were created. The first array represents the 304 channel PTB vector magnetometer system (Physikalisch-Technische Bundesanstalt, Berlin, Germany [22]), which we tested in four configurations: ‘PTB 304ch’ contained all 304 sensors, ‘PTB 114ch’ included the lowest 114 sensors with Z < 0.5 cm, ‘PTB 190ch’ included sensor layers with Z < 3.5 cm, and ‘PTB 247ch’ included sensor layers with Z < 7.5 cm. The AtB sensor system Argos 200 (Advanced Technologies Biomagnetics, Pescara, Italy) was used with 195 sensors, ‘ATB 195ch’.

The axes of the coordinate system are denoted X, Y, and Z. The axes were defined with respect to the sensor systems, in which the lowest sensors were positioned in the XY-plane with Z = 0. The positive Z-axis was upwardly directed from the center of the lowest sensors (see Fig. 1). The units corresponding to the positions and lengths are given in meters, if not stated otherwise. The term \(|| \cdot||\) describes the L2-norm.

Fig. 1
figure 1

Sensor positions (dots) and directions (bars) of the sensor array ‘PTB 304ch’. The default dipole positions of the source space grid are indicated by the circles

Regular planar grids of magnetostatic dipoles were used to model the source space. The distance between the lowest sensor plane and the source space grid was 6 cm, which represented a typical distance between the sensor system and the nanoparticles in our application. When defining the source space grids, we used the following default values: the number of sources was defined to be \(25 \times 25 = 625\), and the source grid area was configured with the dimensions \(0.28 \times 0.28\) m2, including an extension of 2 cm beyond the sensor area in both the X and Y directions. The centers of the source space grids were located at X = Y = 0, equivalent to the X/Y-centers of the sensor arrays. The standard direction of a source dipole was +Z. The sensor positions and directions of the array ‘PTB 304ch’ and the default source space grid are illustrated in Fig. 1.

The lead field matrix L is a linear mapping from the source onto the sensor space and incorporates the source, sensor, and forward models. When considering a magnetostatic field (see, for instance Clark et al. [7, Chap. 10.1]), L can be computed for sensor i and source j according to

$$ {\bf L}(i,j) = \sum_k w_{ik} {\bf d}_{i} \cdot \frac{\mu_0}{4 \pi} \left( \frac{3 {\bf e}_j \cdot {\bf r}_{ijk}} {|| {\bf r}_{ijk} ||^5} {\bf r}_{ijk} - \frac{{\bf e}_j}{|| {\bf r}_{ijk} ||^3} \right), $$

where k are the indices corresponding to the sensor integration points, w are the sensor weights, d are the sensor directions, e are the source directions, and r are the displacement vectors connecting the source positions and sensor integration points. The forward problem is solved for a given set of source activities m by multiplying Lm.

2.2 Condition measures

The condition of a lead field matrix L can be analyzed using the condition number with respect to the L2-norm (e.g., [21, 11]). The condition number \(\kappa\) for \({\mathbf {L}} \neq 0\) is defined by

$$ \kappa({\mathbf{ L}}) = || {\mathbf {L}} || \, ||{\mathbf{ L}^+} || = \sigma_1({\mathbf {L}}) \sigma_n({\mathbf {L}})^{-1} , $$
(2)

where \(\sigma_i\) is the ith of n singular values (SVs) of L, with \(\sigma_1>0\) and \(\sigma_i \geq \sigma_{i+1} \geq 0. \) However, significant numerical errors can occur during the computation of \(\kappa\) (see Sect. “Accuracy of the condition number κ” of the Appendix), and \(\kappa\) depends essentially on the smallest SV \(\sigma_n. \)

To increase the numerical stability during evaluation of the condition of \({\mathbf {L}}\neq 0\) and to reduce its dependency on the smallest SV \(\sigma_n, \) we propose a new condition measure, ρ, in which

$$ \rho({\mathbf {L}}) = \frac{\sigma_1({\mathbf {L}})} {1/n \sum_{i=1}^n \sigma_i({\mathbf {L}})}= \left( \frac{1}{n} \sum_{i=1}^n \frac{\sigma_i({\mathbf {L}})} {\sigma_1({\mathbf {L}})} \right)^{-1} . $$
(3)

ρ represents the ratio between the largest and the mean SV of L, as defined in the first part of Eq. (3). ρ can equivalently be interpreted as the inverse of the average decay of the SVs, as given in the second part of (3). A direct graphical comparison of the SV decay was presented by Nalbach et al. [18] as a measure for the information content of different sensor arrays. When a lead field matrix exhibits a slow decay of SVs, the correlations among the matrix rows (relate to the sensors) and among the matrix columns (relate to the sources) are small. Hence, the rows contain little redundant sensitivity information on the sources and, in practice, the information content of measurements provided by the modeled sensor array on the considered source distribution is high.

By employing the mean value of all SVs, the influence of the comparatively small SVs on ρ is considerably reduced. Smaller values of ρ and \(\kappa\) indicate a better condition in the context of L and related linear inverse problems. In Sect. “Condition of the TSVD-regularized linear inverse problem”of the Appendix, we define \(\rho_{\rm tsvd}({\bf L},r)\) and \(\kappa_{\rm tsvd}({\bf L},r)\) to measure the condition of L by considering the first r SVs only. Using this approach, we can determine the condition of TSVD-regularized [14] linear inverse problems, in which SVs smaller than \(\sigma_r\) are truncated. Practically relevant or optimal values of r, however, are often not known in advance. Further, we show in the Appendix sections “Condition of the TSVD-regularized linear inverse problem” and “Proof of \(1\leq \rho_{\rm tsvd} \leq \rho\)” that ρ tsvd and κ tsvd are bounded above by ρ and \(\kappa, \) respectively.

2.3 Simulations

In four simulations, the influence of the number of sources, grid extension, and dipole directions on the condition of the linear inverse problem, as measured by ρ(L), were evaluated. In a fifth simulation, the relative improvements in the linear inverse solutions were measured using source space grids that were expected to provide an improved condition.

In simulation 1, we investigated the influence of the number of sources contained in the source space grid on ρ. The number of sources and dipoles, respectively, increased from \(5 \times 5 = 25\) to \(50 \times 50 = 2{,}500. \) During this process, the source grid extensions and dipole directions were held constant at their default values.

The objective of simulation 2 was to vary the extensions of the source space grid relative to the sensor area in both the X and Y directions from −0.08 m (smaller than the sensor area) to +0.12 m (larger than the sensor area).

Simulation 3 combined simulations 1 and 2 by simultaneously evaluating the effect of the number of sources and the source grid extension on ρ.

In simulation 4, we gradually changed the uniform directions of the dipolar sources in the grid from \(0^\circ\) (the Z-direction) to \(90^\circ\) (the X-direction).

In simulation 5, we investigated the effects of adapted source grids on the quality of the linear inverse solutions. For this purpose, four exemplary source grids (A 1A 2B 1, and B 2) were evaluated. This set consisted of two pairs of comparable grids, labeled with indices 1 and 2 that provided identical numbers of sources. Source grids B provided X/Y extensions and source directions, which were expected to improve the condition of the related linear IP. The parameters associated with the source grids A 1B 2 are given in Table 1.

Simulation 5 included one magnetostatic dipole with a moment of 1 nA m2 at position p 0 = [−0.001, −0.001, −0.065]. The dipole was directed toward +Z for the source grids B and toward +X for the source grids A, which corresponded to the assumed directions of the sources in the grid. The sensor array ‘PTB 304ch’ was used to simulate the measurement data, and white Gaussian noise with an SNR of 5 dB relative to the signal level of the dipole oriented toward +X was added. For each grid, 100 simulation runs using different random noise profiles were performed.

The linear inverse problem was solved by applying the truncated singular value decomposition (TSVD) method [14]. The quality of the TSVD solutions was evaluated by testing all possible SV regularization parameters r, with 1 ≤ r ≤ n = 304. In this process, \(n^{\rm Dopt}\) counted the quantity of parameters r that resulted in solutions with a maximum dipolar moment located at the grid position [0, 0, −0.6]. This position in all four source grids represented the minimum distance to the simulated dipole and, therefore, the lowest localization error.

Furthermore, we compared the relative improvements (RI) of the solutions \({\mathbf {m}}_{r}^{B}\) using the source grids B with solutions \({\mathbf {m}}_{r}^{A}\) for grid A. To determine the RI, source grids with the same number of sources were compared, i.e., \(A_1 {\text{ with }} B_1 {\text{ and }} A_2 {\text{ with }} B_2\). The individual relative improvements in the solutions \({\mathbf {m}}_{r}^{B}\) compared with \({\bf m}_{r}^{A}\) were averaged over all possible TSVD regularization parameters r to yield a general measure that did not depend on the choice of r. The RI was evaluated with respect to the residual, \({\text{RI}}^{\rm Res}\), the distance between the grid dipole and the highest estimated moment, the position of the simulated dipole, \({\text{RI}}^{\rm Dopt}\), and the L2-norm of the solution, \({\text{RI}}^{\text{L2}}\). The residual and L2-norm of the solutions should be small, because their combined minimization is the objective of the TSVD minimum-L2-norm method.

To compare the solutions from grids B and A, the RI quantities were determined as follows:

$$ {\text{RI}}^{{\rm Res}}(B,A) = \frac{1}{n} \sum_{r=1}^n \frac{|| {\mathbf {b}}-{\mathbf {L}}_A \, {\mathbf {m}}^A_r ||} {|| {\mathbf {b}}-{\mathbf {L}}_B \, {\mathbf {m}}^B_r ||} , $$
(4)
$$ {{\text{RI}}^{\rm Dopt}}(B,A) = \frac{1}{n} \sum_{r=1}^n \frac{|| {\mathbf {p}}_0 - {\mathbf {p}}_{\rm max}\left( {\mathbf {m}}^A_r \right)||} {\Vert {\mathbf {p}}_0 - {\mathbf {p}}_{\rm max}\left( {\mathbf {m}}^B_r \right)||} , $$
(5)
$$ {\text{RI}}^{\text{L2}}(B,A) = \frac{1}{n} \sum_{r=1}^n \frac{|| {\mathbf {m}}^A_r ||} {|| {\mathbf {m}}^B_r ||} . $$
(6)

The term \({\mathbf {p}}_{\rm max}({\mathbf {m}}_r)\) in Eq. (5) represents a 3-by-1 vector that provides the source position with the maximum absolute value among all estimated dipole moments in \({\bf m}_r\). Among the three measures of RI, higher values indicate higher improvements and, therefore, better solutions. The TSVD solution \({\bf m}_r\) using the regularization parameter r was computed according to

$$ {\mathbf {m}}_r = \sum_{i=1}^r ({\mathbf {u}}^{T}_i \cdot \mathbf {b}) \sigma_i^{-1} {\mathbf {v}}_i , $$
(7)

where u, \(\sigma, \) and v are the singular vectors and values of the decomposition of the respective lead field, L.

3 Results

The results of simulation 1, as shown in Fig. 2a, indicated that for an overdetermined IP ρ increased significantly for increasing numbers of sources. An underdetermined IP, however, yielded only a slight increase in ρ for an increase in the number of sources.

Fig. 2
figure 2

Results of simulations 1–4. Lower values of ρ indicate a better condition

Figure 2b shows the results of simulation 2, which revealed that a larger source area decreased the measure ρ. Source space grids with extensions clearly smaller than the sensor area impaired the condition considerably. Positive extensions of the source grid beyond the sensor area led to a reduction in ρ.

The results of simulation 3 for the sensor array ‘PTB 304ch’ are shown in Fig. 2c. The influence of both parameters, the number of sources, and the extension of the grid in the X/Y directions were evaluated simultaneously. Almost no differences in ρ were observed for a grid extension of \({\geq 2}\) cm and a number of sources equal to or greater than twice the number of sensors. As shown in simulations 1 and 2, ρ increased considerably for grid extensions that were clearly smaller than the sensor area, and ρ was low if the number of sources was less than the number of sensors.

The outcomes of simulation 4, shown in Fig. 2d, indicate that the dipolar sources should be oriented toward +Z to provide low values of ρ. Deviations in the source directions of more than \(35^\circ\) away from Z clearly increased the values of ρ.

Table 2 and Figs. 3, 4 and 5 show the results of simulation 5. The semi-logarithmic plots of the SVs for the lead field matrices using source grids A 2 and B 2 are illustrated in Fig. 3. The largest, mean, and smallest SVs are indicated by horizontal lines for both matrices. This plot shows that grid \(B_2\) led to a better condition in terms of ρ and \(\kappa\) compared with \(A_2\) because grid \(B_2\) provided a smaller maximum SV together with higher values for the mean and smallest SVs.

Table 1 Parameters that define the source space grids
Table 2 Results of simulation 5: ρ\(\kappa, \) and \(n^{\rm Dopt}\)
Fig. 3
figure 3

Semi-logarithmic plot of the SVs of the lead field matrices using the ‘PTB 304ch’ sensor system and the source grids A 2 (blue solid lines) and B 2 (red dashed lines). The largest, mean, and smallest SVs are indicated by thin horizontal lines (color figure online)

Table 2 shows the condition measures ρ and \(\kappa\) for each of the four source grids \(A_1$ - $B_2. \) The mean value of \(n^{\hbox{Dopt}}\) quantified the number of regularization parameters that led to inverse solutions with a minimum distance to the simulated dipole. Use of the grid \(B_1\) instead of \(A_1\) improved the lead field condition; ρ decreased by a value of 12 and \(\kappa\) decreased by a factor of 100. With the source grid \(A_1, \) only 22 of 304 (7.2%) regularization parameters, on average, provided the lowest achievable localization error. With the source grid \(B_1, \) 62 of 304 (20.5%) possible parameters r, on average, led to solutions with minimum localization errors. A comparison of the denser source grids \(A_2\) and \(B_2, \) which included 3,025 magnetostatic dipoles, revealed similar improvements in ρ and \(\kappa\) when using grid \(B_2\) instead of \(A_2. \) With the source grid \(A_2, \) 7.7 of 304 (2.5%) regularization parameters, on average, provided solutions with a minimum distance to the simulated dipole. The use of grid \(B_2\) increased this number to 34.2 (11.3%).

The individual results for \({\text{RI}}^{\rm Res}, {\text{RI}}^{\rm Dopt}, \) and \({\text{RI}}^{\rm L2}\) of simulation 5 are shown in Fig. 4. The average relative improvements gained upon use of source grid B 1 instead of A 1 (Fig. 4a) are for \({\text{RI}}^{\rm Res}\) at 1.4, for \({\text{RI}}^{\rm Dopt}\) at 3.0, and for \({\text{RI}}^{\rm L2}\) at 26.4. A comparison of the TSVD solutions using source grids B 2 and A 2 (Fig. 4b) yielded slightly lower mean relative improvements: RIRes at 1.3, RIDopt at 3.0, and \({\text{RI}}^{\rm L2}\) at 23.0. The variations in RI were relatively small over the 100 runs with different representations of white Gaussian noise. No run provided values with \({\text{RI}}\leq 1. \)

Fig. 4
figure 4

Relative improvements in \({\text{RI}}^{\rm Res}\) (green dot), \({\text{RI}}^{\rm Dopt}\) (blue +), and \({\text{RI}}^{\rm L2}\) (red ×). Individual results from 100 simulation runs using different representations of noise are shown. The mean RI values are indicated by horizontal lines. Higher ordinate values represent higher improvements obtained using grids B instead of A (color figure online)

Figure 5 shows the visually selected best TSVD solutions with the fewest artifacts and minimum distance between the strongest estimated source and the simulated dipole for grids A 1B 2. The results for grids A (Fig. 5a, c) were obtained using the regularization parameter r = 28. For grids B, the best TSVD results were obtained using the regularization parameter r = 40 (Fig. 5b, d). Hence, the best estimates using grids B were provided by the larger parameters r. The differences between the solutions obtained using parameters between r = 28 and 40 were relatively small for B. The source grids B clearly provided fewer artifacts than the grids A, and the area of the highest source activity was more symmetric and focal. The results obtained using source grids with 625 and 3,025 sources differed not significantly. Application of the TSVD method to the source grids A 2 and B 2, with 3,025 magnetostatic dipoles, resulted in smoother estimates with dipole moments that were a factor of 5 smaller than those obtained using A 1 and B 1.

Fig. 5
figure 5

Plots of the visually best TSVD solutions showing the estimated magnetic moments of the dipoles defined by the source grid. The sources with the largest estimated moments are indicated by square

4 Discussion

The IP in our application is typically underdetermined; therefore, the number of sources produces a relatively small effect on the lead field condition. However, the practical application of a sparse source grid with equal or fewer numbers of sources than sensors can considerably improve the condition upon further reductions in the number of sources. The area of the source grid should extend over the sensor area. Brauer et al. concluded previously, based on a phantom experiment, that a two-dimensional source space grid should extend over at least five times the area of the distributed source [5]. Accounting for the spatial resolution and the number of dipoles within the grid, an extension of 1–3 cm in each direction should be adequate, in practice.

The orientations of the sources in our application and, therefore, the direction of the magnetic field applied during excitation should not deviate more than \(35^\circ\) from the Z-direction. In addition, sources oriented toward Z also provided for the given sensor arrays higher signal levels and better SNRs.

All five sensor array configurations in simulations 1–4 yielded qualitatively similar behavior that depended on the number of sensors. The best results for ρ were obtained for the configuration ‘PTB 114ch’. However, the better values of ρ obtained from the sensor array ‘PTB 114ch’, as compared with the values obtained from ‘PTB 304ch’, resulted mainly from the reduced number of SVs in the lead field matrix. A smaller number of sensors (as compared with the number of other arrays) introduce a relatively small redundancy in the measurement values; however, the ‘PTB 114ch’ sensor configuration picks up less information from the magnetic field compared to the configuration ‘PTB 304ch’.

As shown by the examples illustrated in simulation 5, the quality of the inverse solutions could be improved considerably using the source grid adaptations presented in this paper. Solutions using the adapted grids provided fewer artifacts, smaller L2-norms, and smaller residuals. In addition, a greater fraction of the possible TSVD regularization parameters led to optimal solutions in terms of the distance to the simulated source. Therefore, the appropriate determination of these parameters, for instance, using the Generalized-Cross-Validation [25] or the L-curve [13] methods should be easier and more reliable, in practice.

Some of our findings, including the specific recommendations for the source grid extensions and the direction of the magnetic sources, are directly related to the application of magnetic nanoparticle imaging. However, we expect that the basic findings, such as the general influence of the number of grid sources and the extensions of the source space on the lead field condition, are relevant to various linear IPs in magnetic applications. The findings of this study were used, for e.g., to detect ferromagnetic objects in geomagnetic measurements [10].

The condition measure, ρ, can be used to replace \(\kappa\) to reduce numerical errors that occur during the evaluation of the condition. In our example simulation 5, a shift in ρ by a value of 12 corresponded to a reduction in \(\kappa\) by a factor of 100. Variations in the parameters that define the source space grid yielded smooth changes in ρ, and ρ were not affected by obvious numerical errors. Furthermore, ρ can be used to evaluate the condition in other applications, e.g., to quantify the stability and convergence of the Newton method in finite element computations [26].