Abstract
Objective. Accurate modeling of transcranial magnetic stimulation (TMS) coils with the magnetic core is largely an open problem since commercial (quasi) magnetostatic solvers do not output specific field characteristics (e.g. induced electric field) and have difficulties when incorporating realistic head models. Many open-source TMS softwares do not include magnetic cores into consideration. This present study reports an algorithm for modeling TMS coils with a (nonlinear) magnetic core and validates the algorithm through comparison with finite-element method simulations and experiments. Approach. The algorithm uses the boundary element fast multipole method applied to all facets of a tetrahedral core mesh for a single-state solution and the successive substitution method for nonlinear convergence of the subsequent core states. The algorithm also outputs coil inductances, with or without magnetic cores. The coil–core combination is solved only once i.e. before incorporating the head model. The resulting primary TMS electric field is proportional to the total vector potential in the quasistatic approximation; it therefore also employs the precomputed core magnetization. Main results. The solver demonstrates excellent convergence for typical TMS field strengths and for analytical B–H approximations of experimental magnetization curves such as Froelich’s equation or an arctangent equation. Typical execution times are 1–3 min on a common multicore workstation. For a simple test case of a cylindrical core within a one-turn coil, our solver computed the small-signal inductance nearly identical to that from ANSYS Maxwell. For a multiturn rodent TMS coil with a core, the modeled inductance matched the experimental measured value to within 5%. Significance. Incorporating magnetic core in TMS coil design has advantages of field shaping and energy efficiency. Our software package can facilitate model-informed design of more efficiency TMS systems and guide selection of core material. These models can also inform dosing with existing clinical TMS systems that use magnetic cores.
Keywords: transcranial magnetic stimulation (TMS), coil design, nonlinear magnetic core, B–H magnetization curve, anhysteretic B–H curve, boundary element fast multipole method (BEM-FMM), numerical modeling
1. Introduction
It has long been known that soft magnetizable materials [1] can be used as a core of transcranial magnetic stimulation (TMS) coils [2, 3], (see also review [4]). A magnetic core may focus or redirect both the coil magnetic and electric fields to a region of interest and thus can increase the energy efficiency of TMS considerably. The use of a magnetic core can potentially offer an efficient way to produce stimulation fields using a smaller device that requires less energy and produces less heating [5].
Since the TMS magnetic field strengths typically reach 1.5 Tesla (T) or higher, it is desirable to use materials that saturate at or above 1.5 T. One suitable material, for example, is vanadium permendur. Other suitable materials include the metallic glasses (i.e. Metglas), permalloy, supermalloy, powdered iron, and silicon irons or silicon steels, in particular, 3% grain oriented steel (magnesil). Ferrite could also be used, although it is not preferred, due to the fact that it saturates at 0.5 T [2, 3]. New magnetic materials suitable for high-frequency, high-power applications in modern switching power electronics (transformers, pulse power cores, high-frequency inductors) are actively being developed [6–9]. These materials might potentially become very suitable candidates for modern and future medical TMS applications.
Despite their desirable properties, TMS magnetic cores are not widely used at present. Neuronetics, Inc. of PA, USA is the only company that has been widely (and successfully) employing the magnetic (iron) core technology for TMS applications [5]. The modern research on TMS coils with the magnetic cores is also rather sparse [4, 10–16]. There seem to be several potential questions pertinent to the subject matter. First, the time constant of a simple RL circuit modeling a coil is where L is coil’s inductance and R is coil’s resistance. Adding the magnetic core might significantly increase the inductance hereby increasing the duration of the TMS pulse and decreasing the induced electric field following the Faraday’s law of induction. It is however unclear whether or not the inductance really changes that much, for all possible geometries and especially in saturation. There are some optimistic examples in the literature [10]. Numerical modeling could help us to investigate this problem.
Second, there is doubt that the addition of ferromagnetic cores is practical as they might enter magnetic saturation in the field range needed for TMS [17]. As long as the material is (nearly) saturated, its major advantage—the much higher permeability—may largely be lost. It is however unclear whether or not the remaining permeability increase might still be sufficiently high, especially for the new magnetic materials. Numerical modeling can help us answer this question.
Third, Koponen and colleague noted that although ‘an iron core can increase the energy efficiency of a TMS coil considerably; however, this increase comes at a cost of increased bulkiness…’ [18]. This is indeed true, but it is not entirely clear how bulky should the core really be in different situations. Numerical modeling could again help us to quantify the necessary core volume in every specific case.
The magnetic core modeling is a complicated non-linear problem. The finite element method (FEM) and the finite difference method are the major tools of modeling TMS coils with magnetic cores [10–13]. FEM has been extensively developed and used in more general power-electronics problems with the magnetic cores including quite sophisticated hysteresis and anisotropic models [19–25].
An industry-leading commercial FEM software package, ANSYS Maxwell, could be employed to model the coil with the core in the magnetostatic approximation including arbitrary anhysteretic B–H curves, non-zero coercivity, self- and mutual inductances, etc. Though the ANSYS Maxwell Eddy current solver could output the induced electric field directly, the corresponding solution appears highly oscillatory and, in the authors’ own experience, might be less accurate. A very relevant demonstration is given in [11]—see figure 7, and especially figures 8 and 11 of this reference. Furthermore, both these software packages tend to slow down when a realistic high-resolution head model is included into consideration. On the other hand, the excellent open-source TMS software SimNIBS [26–28], can incorporate anatomically-accurate head models, but it cannot yet model coil inductance or a coil with a magnetic core. Therefore, there is a need for a tool that could model the coil, the core, and the head in one package and be appropriate for solving the specific TMS tasks and testing different existing and prospective cores.
In this study, we aim to develop and disseminate such a tool. We expand the previously developed boundary element fast multipole method (BEM-FMM) engine [29, 30] to a rapid modeling of TMS coils with a linear and nonlinear core. Note that the accurate modeling of the linear core problems via the BEM-FMM appears mostly straightforward and is fast. It is accomplished using the duality between magnetostatic, electrostatic, and DC BEM conduction analyses [31] since the conduction BEM-FMM solver is already available [30, 32, 33].
For the nonlinear (and/or anisotropic) analysis, we have to introduce a volumetric tetrahedral mesh in addition to the standard BEM triangular surface mesh. Then, the problem is how to expand the standard fast linear-core BEM formulation [34–36] to the nonlinear case. One possible solution is based on the introduction of volume magnetic charges and using the method of double integral equation (surface+volume) [37]. However, it might be too complicated. In this study, we suggest using a different simpler method that still utilizes only one integral equation of the standard BEM. At the same time, it applies this equation to all faces of the underlying tetrahedral mesh of the core, including not only the boundary faces but also all inner faces. In other words, we assume a constant permeability within each tetrahedron and impress the surface charge density at each outer and inner face to satisfy the boundary condition of the continuous normal component of the magnetic flux density.
In the following sections, we will first present the methods for modeling TMS coils with and without magnetic core, numerical implementation of the solver, and material models for magnetic cores. Next, we will compare solutions generated by our software with those from a commercial FEM solver. We will further validate our software by comparing the model to experimental measurements of a constructed TMS coil, as well as to analytic solution (the latter is presented in the supplementary material).
2. Methods
2.1. Solving the primary field of TMS coil without magnetic core
The primary field of a TMS metal coil and the primary coil current are assumed to be unaffected by the magnetic core. The primary field of a TMS coil will be denoted by superscript p. The static coil is characterized by a conduction current density (A m−2) everywhere within metal conductors. The magnetic vector potential generated by coil currents flowing within all metal windings with volume V is found from Ampère’s law
where µ 0 is magnetic permeability of vacuum (air). In the quasistatic approximation, the separation of variables applies. It yields , where I(t) is the temporal waveform of a TMS pulse generator and is the static current distribution map. The induced primary electric field, , therefore becomes
at any time moment. Similarly, the static part (this term will be omitted in what follows) of the magnetic flux density is found from Biot–Savart law in the form:
and the magnetic field intensity in free space is finally given by
2.2. Solving secondary field with magnetic core
The magnetic core is characterized by its relative permeability, µ r, which may be field independent (a linear core) or change with the field intensity (a nonlinear core). In the presence of the magnetic field of the coil—the primary field given by equations (1)—the core material becomes magnetized; that is the microscopic dipoles acquire a net alignment along certain direction(s). Their net effect results in a secondary magnetic vector potential , secondary magnetic flux , and the secondary magnetic field —the response of the magnetic materials. The total potential, flux, and the field become the sum of both the primary and the secondary fields. The magnetic vector potential of a single magnetic dipole with moment located at , is given by
In the magnetized object, each volume element carries a dipole moment . Here, M is magnetization or dipole moment per unit volume. It is expressed through the magnetic field within the magnetized object in the form
where µ r is the relative permeability of the core. Therefore, the secondary magnetic vector potential generated by the magnetized core with the volume W becomes (see, for example, [34])
anywhere in space. Once is known, can be found from equations (2b ) and (2c ). However, is now the total field. The secondary field present in this expression is not known. So is the secondary flux . The goal of the numerical modeling is to solve for them.
2.2.1. Solving linear core
In the magnetoquasistatic approximation, the displacement current is negligible. Thus, the approximate form of Ampère’s law is the continuity condition of the current density, j. Anywhere within the coil current-free region, . Therefore, Ampère’s law for the secondary field yields . Therefore, the secondary field can be written in the form of a gradient of a certain function—the (full or reduced) magnetic scalar potential with the units of ampere (A) [34, 36]. Bypassing operations with the potential, one could choose a representation in the form of magnetic charges—the surface charge density with the units of weber per square meter (Tesla). The conceptual magnetic charges are a useful abstraction that aid in the solutions of (nonlinear) magnetostatics [34, 38]. Namely, the magnetic material can be removed and replaced, in the evaluation of the secondary field and other secondary quantities, by the surface bound charges so that one has [34]
Equation (3a ) is identical with the corresponding electrostatic charge representation (after replacing permeability by permittivity and H by E) or with the DC current representation (after replacing permeability by conductivity and H by E). Other definitions of magnetic charges are possible, to within a constant factor µ 0 [34]. It can be shown [34] that where n is the outer normal to the core surface S. Otherwise, the divergence of magnetization is equal to zero.
Equation (3a ) is augmented with the boundary condition on surface S with the local normal vector and with µ, µ 0 being the permeabilities inside and outside with regard to the direction of its outer normal vector, respectively,
where is the total magnetic field just inside/outside the permeability interface. After substitution of equation (3a ) into equation (3b ) and using the principal value of the singular surface integral [39], an integral equation for ρ s—the Fredholm equation of the second kind referred to in [34] as a Phillips-type equation—is obtained in the form:
where the magnetic permeability contrast is uniquely defined at the material interface.
Equation (3c ) coincides with the corresponding result for quasi-static conduction problems in TMS, transcranial electrical stimulation (TES), and electro-/magneto-encephalography (EEG/MEG) modeling [30, 32, 33] when the substitution stated above is made. It is solved exactly in the same way, using the generalized minimum residual method (GMRES [40, 41]) for the iterative solution and the fast multipole accelerator [42, 43], for computing the matrix vector product. The GMRES convergence is excellent [30, 32, 33]. For large , the subtraction approach is used to correct a numerical error inside the core [31, 44]. After is found, is computed from equation (3a ), and is computed from equation (2c ). Thus, our method is as follows:
-
(a)
Given the known of the coil in free space and the known µ of the core, solve the integral equation (3c ) for the density of effective surface magnetic charge residing on the core surface, via the FMM.
-
(b)
Find the secondary field of the core, , from equation (3a ). Then, find the total field and magnetization from equation (2b ).
-
(c)
Substitute in equation (2c ) and find the secondary magnetic vector potential .
-
(d)
Finally, add to the potential of the coil in free space, , and obtain the total magnetic vector potential, , of the coil with the core.
2.2.2. Solving nonlinear core
When the core permeability becomes field-dependent, volume magnetic charges can be introduced along with the surface charges [34]. One more integral equation thus has to be added to equation (3c ) and the coupled equations have to be solved simultaneously. This approach was in particular described and tested in an excellent study from [37]. However, it might be too complicated. In this study, we suggest using a different method that still utilizes only one integral equation (3c ). At the same time, it expands it to all faces of an underlying tetrahedral mesh of the core, including not only the boundary faces as in equation (3c ) but also all inner faces. Our method is as follows:
-
(a)
A normal vector is introduced for any inner face based on two adjacent tetrahedra. It is directed from a tetrahedron ‘plus’ to a tetrahedron ‘minus’. Their initial choice is arbitrary. The initial local permeability is assigned to each tetrahedron at the first step since is known as the coil field in free space.
-
(b)
Secondary magnetic field is assumed to be constant within every small tetrahedron. It is computed using equation (3a ) given initially or previously known charge density on all faces. At the first and only at the first step, and, therefore, .
-
(c)
Local permeability is then computed for every tetrahedron given and the known B-H curve.
-
(d)
Resulting differential contrast is next computed for every face, either inner or on the boundary. In the last case, there is only one adjacent tetrahedron and .
-
(e)
Integral equation (3c ) is finally solved next via the FMM with this particular set of contrasts K. This gives us the new magnetic charge densities for every facet.
-
(f)
The process repeats itself starting with step #2.
-
(g)
The process stops when variations in the local permeability, , and in the field within the core become small enough, i.e. the solution converges.
This successive substitution method converges fairly well (see section 3.2 for performance). At the same time, it requires accurate values of the neighbor potential integrals present in equations (3(a) and (c)). These values are precomputed as described in the prior studies [30, 32, 33].
When dealing with stronger nonlinearities (steeper B–H curves and/or complicated core geometry), smoothing of the local permeability for every tetrahedron at step #3 above might be done in the form
where the summation is performed over four neighbor tetrahedra. For boundary tetrahedra, the summation is running over a smaller number of neighbors (three or two or one).
2.3. Solving the total field of the coil–core combination
It is important to emphasize that the coil–core combination is solved only once and up front, i.e. before using the head model. Two parameters required are the strength of the terminal coil current, I 0, and the current change rate, . The second parameter is purely linear; it could be altered post factum and at any step of the solution when desired.
The solution for the coil with the core is further utilized in the main TMS field computations. The coil–core configuration can be moved or rotated as required, without the need of recalculating the core magnetization. The coil+core solver’s output is as follows:
-
(a)
Local permeability and the total field within the core. These two are used to calculate the major parameter of interest—magnetization within the core from equation (2b )—as well as the inductance change.
-
(b)
The corresponding inductance correction is added to equation (5b ) so that the total inductance with the core now becomes
-
(c)The secondary vector potential anywhere in space is found from equation (2c ) since the core magnetization is already known. Equation (1b ) is thus modified by
for the combined induced electric field E. We prefer to store and then compute E from equation (4c ) for any coil–head geometry as required. Following the established TMS computations terminology, this will be the primary or incident electric field of the coil with the magnetic core. -
(d)
If necessary, the secondary field outside the core is found from equation (3c ) extended to the nonlinear core as described above. We prefer to store magnetic charges within the core and then compute for any head geometry as required.
2.4. Calculation of coil inductance without the core
The magnetic energy of the primary coil field without the core is given by
The inductance of the primary coil, , is found directly from the energy relation, , where I 0 is the total terminal coil current. When the coils is discretized into N short straight line segments each carrying current i m and located at r m , the coil inductance without the core is given by the Neumann formula (see, for example, [47–49])
where s m and s n are the lengths of the segments; m and n are the outer and inner summation indexes, respectively. The inner sum in equation (5b ) is computed via the FMM [42, 43], as a potential of a single layer repeated three times. Those computations are done in parallel. After that, the outer sum is found directly. The m = n terms are set to zero, which is justified when the number of subdivisions, N, is large. We found that for precise inductance calculations via the Neumann formula, the ratio of average segment length to average segment spacing should be no less than 1–3.
2.5. Magnetic material models
Here, we consider an isotropic material with relative permeability µ r. Its most basic characteristic is the anhysteretic magnetization B–H curve, , [17]—the key element of modeling magnetic hysteresis loops. It is fitted using the outermost B–H hysteresis loop. The anhysteretic curve strongly depends on the frequency of the sinusoidal (or pulsed) core test system (see, for example, [8]). The rest of the core properties might be accounted for as the hysteresis loss, classical eddy current loss, and anomalous loss [50].
Although it is possible to introduce hysteresis models of ferromagnetic materials into the numerical analysis, it is still relevant to use the single-valued B–H curve in such an analysis [39]. For the magnetically soft materials used in the TMS design, the hysteresis loops are relatively narrow, that is, the coersive force is smaller compared to ‘hard’ ferromagnetic material (see [39] for more in depth discussion). Therefore, the single-valued B–H curve adequately characterizes such materials in many applications [39]. In such a case, the losses are usually estimated using analytical formulae, while the nonlinear problem is solved using the Newton–Raphson or successive substitution method [39, 51–53].
In this study, only the single anhysteretic curve will be modeled. The core loss could be included into consideration post factum. Along with more sophisticated fitting models [39, 54], two popular models for the anhysteretic curve are the inverse-tangent model:
and the Froelich’s equation
Here, we adopt the forms of these constitutive relations as presented in [55], along with the limiting saturation value of µ 0 on the right-hand sides of both equations. The presence of this µ 0 term is sometimes neglected, but it is physically justified and is critical for the accurate numerical analysis at the high flux densities. In equation (6a ), constant a 1 has the units of T, while in equation (6b ) constant a 1 has the units of m H−1. In equation (6a ), constant a 2 has the units of m A−1, while in equation (6b ) constant a 2 has the units of 1/T.
We will test three magnetic materials with gradually decreasing saturation fields shown in figure 1.
-
(a)
The first curve in figure 1 corresponds to some generic nonlinear material with a high saturation field above 2 T as well as with a modestly varying permeability and a relatively small magnitude of . It is described by equation (6a ) with , m A−1.
-
(b)
The second curve in figure 1 is an approximate curve fitting for a 2-mil M3 silicon steel core datasheet of Arnold Magnetic Technologies at 2 kHz [56]. This laminated core saturates at approximately 1.7 T. To obtain the single valued anhysteretic B–H curve, we use locus points of 6 symmetric hysteresis cycles. They are tabulated in the datasheet as the pairs. The pair is added at the origin of the B–H plane. The entire curve is described by equation (6a ) with , m A−1 or by equation (6b ) with m H−1, T−1 although some discrepancy appears between either analytical approximation and experiment below 300 A m−1. Namely, the curve supplied by the manufacturer exhibits a peak around 60 A m−1. Unfortunately, most of the simple approximations, including the inverse tangent or Froelich’s equation, lack to accurately model this peak. In many cases, this is not a problem if we are interested in modeling for higher magnetic flux densities [57], which is exactly the TMS case.
-
(c)
The third curve in figure 1 is an accurate curve fitting data for a METGLAS® 2605-SA1 amorphous foil core datasheet [8]. This laminated core saturates at approximately . High-frequency losses of this material are low [8]. The B–H curve is now given by equation (6b ) with m H−1, T−1.
All three material curves described above are characterized by quite different values of the maximum permeability variation rate, . This rate is important for stability considerations of the nonlinear numerical solution. It is known that at very high permeability variation rates, the nonlinear iterative solutions may easily diverge. For the first material, the maximum of the permeability variation rate is 0.11 µH A−1, for the second one it is 304 µH A−1, and it is equal to 126 µH A−1 for the third material.
3. Results
3.1. Wire and core models in the software package
3.1.1. Wire model
Computation of integrals (1) for any metal coil is straightforward. It is performed as described in [29] and supplement of [30] using the fast multipole method [42, 43]. All volumetric conductors are replaced by a computational wire grid consisting of a large number of straight, short, infinitely-thin filaments of electric current or segments. The number of these elementary filaments may easily exceed 100 000–1000 000 depending on the required solution accuracy. Then, all integrals (1) are discretized on filaments and are computed numerically using the fast multipole method or FMM [42, 43].
This approach is rather fast and flexible (typical run times are less than 1 s). It allows us to model a uniform current flow (the Litz wire), the skin layer effect in a solid copper conductor (current distribution close to the surface) as well as a twisted Litz wire which is encountered in some applications as shown in figure 2.
3.1.2. Core model
Any custom core CAD file in *.stl format can be imported into the present software using MATLAB’s native STL converters. At the same time, an internal tetrahedral mesh generator is made available for simple (deformed or not) shapes such as cylinder (figure 3(a)), rectangular cuboid (figure 3(b)), C-shapes (figures 3(c) and (d)) and their combinations (see figure 3(e)), with an arbitrary volumetric (tetrahedral) and surface mesh resolution.
A number of validation examples have been constructed and tested which compare the present method and its accuracy for linear and nonlinear cores. Those include comparisons with the analytical formulae (linear inductance) [45, 48, 58], with a high-end commercial FEM magnetostatic solver ANSYS Maxwell, a part of ANSYS® Electronics Desktop 2021/R2 (nonlinear/linear fields, saturation/linear inductance), and with realistic TMS coil experiments (linear inductance).
All examples are contained in the ready-to-use downloadable software package as separate projects. Concurrent ANSYS projects are also included. Below, we present the most interesting (and challenging) examples in our opinion. Other examples are described in the supplementary material. Section S2 in the supplementary material presents a succinct software description along with the running sequences. We use the accessible self-contained MATLAB platform under Windows.
3.2. Comparison with ANSYS Maxwell FEM for three different materials (saturated core)
The problem geometry is shown in figure 4(a). A simple solid cylindrical core is symmetrically located within a one-turn coil. The core mesh has ∼80 000 tetrahedra, the coil wire grid has ∼50 000 elementary current segments. Specific dimensions along with the total applied current and the observation line for H are shown in figure 4(a). The coil conductor is assumed to be non-magnetic and with a uniform electric current distribution across its cross-section (Litz wire). The homogeneous core is assumed to be non-conducting.
Three core materials #1, 2 and 3 from section 2.5 (shown in figure 1) with the gradually decreasing saturation of the magnetic flux within the core have been used. To assure the non-linear region of operation and core saturation in every case, the coil current is chosen as kA.
Two convergence measures of the non-linear successive substitution solution are the relative deviation in the magnetic charge density, e 1, for all faces and the relative deviation in the permeabilities at tetrahedra centers for all tetrahedra, e 2, i.e.
at every nonlinear iteration step n. Here, is the Euclidean norm of the spatial distribution. Equation (7) is the relative deviation of the spatial field calculated as the norm over all surfaces or the norm over all volumetric elements.
In all three cases, a good monotonic convergence has been observed. For material #1, we reach the following values: , after 20 iterations. For material #2, we reach , after 20 iterations, too. For material #3, we reach , after 25 iterations. The resulting magnetic fields along the core centerline are shown in figures 4(b)–(d) by blue curves. The corresponding ANSYS FEM solutions (with ∼2.2 M tetrahedra) are given by black curves. For comparison purposes, the linear-core solutions with (material #1), (material #2, Froelich’s model), and (material #3) are given by thin red curves. The ANSYS Maxwell FEM solutions execute in about 1.5–2 h using a 2.8 GHz multicore workstation (Windows platform) while the BEM-FMM solutions execute in 2–3 min on the same workstation.
Table 1 compares static inductance values obtained using both the numerical methods for the small-signal inductance values for the linear core and the inductance values for the saturated core at the given coil current of 20 kA. We emphasize that for the present (loose) coil winding the coil–core inductance is not very significantly affected by the magnetic core, either saturated or not. This fact was also noticed previously [10]. This is in stark contrast to the tight windings around the core considered, for instance, in the next example.
Table 1.
Linear core | Nonlinear core | Average core µ r | |
---|---|---|---|
Inductance, nH | mA | kA | kA |
BEM-FMM material 1 | 115 | 107 | 75 |
BEM-FMM material 2 | 116 | 103 | 29 |
BEM-FMM material 3 | 116 | 96 | 10 |
ANSYS material 1 | 116 | 107 | NA |
ANSYS material 2 | 116 | 103 | NA |
ANSYS material 3 | 116 | 96 | NA |
3.3. Comparison with measurements for a rat coil with and without magnetic core
3.3.1. Coil construction
Figure 5 shows the geometry and major dimensions for a family of experimental focal TMS rat coils that were constructed. The coil windings, which are based on a plastic template with a 15∘ skew angle shown in figure 5(a), consist of two (or more) helical spirals of a variable pitch shown in figure 5(b). For the particular design considered, every spiral has 20 turns and is made of a custom Litz wire. The total coil length of the coil is 110 mm.
The single-wire radius in the Litz bundle is 0.15 mm (29 gauge with insulation), the number of single wires in the Litz bundle is 100. According to the packing tables [59], the optimal dimensionless radius of the circles in the container circle is 0.0902 in this case given that the latter has the radius of one. This yields the optimal radius of the bundle being equal to 1.663 mm. This is the best possible estimate; a more realistic estimate for the bundle radius used here is approximately 2 mm. This gives us the bundle diameter of the coil conductor of approximately 4 mm. Additionally, Litz wire twisting was estimated and then used in the model construction below.
A rectangular laminated magnetic core is tightly inserted in the rectangular opening of the template shown in figure 5(a). The core consists of multiple 2-mil sheets of M3 grain oriented silicon steel (Arnold Magnetic Technologies, Rochester, NY, USA), which is material #2 of the previous example.
3.3.2. Modeling
The computational model consists of several components shown in figure 6: (a) the long rectangular core of M3 silicon steel, (b) the skewed inner helical spiral with the radius of 9 mm and a variable pitch, (c) the similar outer spiral with the radius of 16 mm rotated by 180∘ and, (d) an optional 6-turn third helical spiral used to boost the injected electric field.
The underlying computational mesh includes approximately 200 000 elementary current segments modeling metal windings and approximately 25 000 tetrahedra modeling the magnetic core. Small-signal (linear-core) simulations including inductance and H- as well as E-field calculations run in approximately 1–2 s on a 2.8 GHz computer. For the latter case, the magnetization in the entire core volume is computed as described above.
3.3.3. Small-signal coil inductances
Table 2 summarizes the small-signal inductances of the two coils (20+20 and 20+20+6 turns), which were measured using an LCR meter (model: Keysight U1732C) at 1 kHz. The small-signal relative magnetic permeability of the core was assumed to be approximately 19 900 following the Froelich’s curve from figure 1 for the M3 silicon steel (material #2). The agreement between experiment and modeling is within 10% for all reported values. Small variations in the coils’ assembly have been tested and nearly identical inductance values were obtained.
Table 2.
Coil A: 2 layers of windings | Coil B: 3 layers of windings | |||
---|---|---|---|---|
20+20 turns | 20+20+6 turns | |||
Inductance, µH | No core | With core | No core | With core |
Measured | 7.0 | 40.0 | 8.5 | 50.0 |
Modeled | 7.0 | 37.0 | 8.4 | 47.8 |
3.3.4. Static inductance as a function of increasing coil current
The initial (small-signal) static inductance of the coil with the core decreases when the current increases to typical TMS levels and the core saturates. This important tendency is illustrated in table 3 for the experimental TMS rat coil with 20+20+6 turns and with the square M3 magnetic core from figure 6. Realistic TMS coil current strengths were considered.
Table 3.
Coil current, A | 100 | 1000 | 3000 |
Modeled inductance, µH | 27.9 | 10.3 | 9.0 |
Average core µ r | 99.5 | 7.6 | 2.9 |
4. Discussion
4.1. Method convergence
It is known that the nonlinear FEM solvers for the magnetic cores do not necessarily converge. For example, the COMSOL application notes specifically discuss the cases where the convergence is absent [60]. The present method will also not converge for an arbitrary B–H curve. The critical parameter introduced in section 2.5 is the permeability variation rate, , of a magnetic material. If this rate is very high (the nonlinearity is very strong), the converge cannot be guaranteed. Several methods have been tested including local permeability averaging as in equation (3d ), Jacobian smoothing of magnetic contrast variations at every iteration step as well as introducing more integration points over the tetrahedra volumes and the following averaging. None of these methods generated ultimately better results.
The only method which was converging in all tested cases is that which computed the averaged H-field value within a tetrahedron based on four field values just inside its four faces at the face centers i.e. directly via the surface magnetic charges. However, this method generated choppy fields within the core and was less favorably compared to the FEM solver ANSYS Maxwell within the core. Therefore, it was not implemented, but was rather used as a small auxiliary contribution to assure the convergence in the demanding cases.
At present, we could probably guarantee the method convergence for typical TMS field strengths and for the simple analytical B–H approximation curves such as equations (6), and more accurate yet smooth analytical interpolations [8, 50, 54, 55]. Note again that this could be quite enough if we are interested in modeling for higher magnetic flux densities [57], which is exactly the TMS case.
4.2. Model limitations
Only the simple anhysteretic magnetization curve has been modeled in the present study, without including the core losses described in the introduction into consideration. The core losses may be significant for many magnetic materials and at shorter pulse durations. Their accurate description will require a separate detailed study.
No material anisotropy has been included although its modeling is rather trivial with the suggested method. At step 3 in section 2.2.2, the local permeability for every tetrahedron could be different in different directions. This can be taken into account by adjusting the magnetic contrast for the four faces of the tetrahedron using the product of a permeability tensor and the normal vector of every facet. Unfortunately, the FEM solver ANSYS Maxwell cannot be used for comparison purposes in this case: it can either model the B–H curve or the anisotropy of an otherwise linear magnetic material.
4.3. Temporal considerations
Although the our solver is quasistatic in nature, there are temporal waveform issues to consider. For conventional TMS sinusoidal pulses, the coil current and electric field waveforms are 180∘ out of phase. Consequently, when the coil current reaches its maximum—when we expect higher effects from the nonlinear core, possibly deeper core saturation—the induced electric field is zero at this time. Typically, one is interested in the electric field distribution at its peak as it is thought to reflect maximum impact on neuronal activation. In other devices, such as the controllable pulse width stimulator [61], peak coil current is reached when the electric field is still quite high, albeit not at maximum. Interestingly, the induced change in neuronal membrane potential reaches maximum at peak coil current [61]. Depending on the outcome of interest, one might have to perform multiple simulations at different time points along the current waveform. In any case, our model requires both the coil current and its time derivative values as input parameters. The effect of the magnetic core on electric field and neuronal activation can be studied at different time points along any arbitrary pulse waveform.
5. Conclusions
The present study reports the simple, accurate, and accessible algorithm for modeling TMS coils with a (nonlinear) magnetic core and validates the algorithm through comparison with FEM simulations and experiments. The algorithm is using the BEM-FMM applied to all facets of the tetrahedral core mesh as a single-state solution and the successive substitution method to assure the nonlinear convergence of the subsequent states. The coil–core combination is solved only once, before incorporating the head model. The resulting primary TMS electric field is proportional to the total magnetic vector potential in the quasistatic approximation; it therefore also employs the precomputed core magnetization. Changes in the regular TMS computation pipeline are reduced to a minimum. The method demonstrates excellent convergence for typical TMS field strengths and for analytical B–H approximations of the experimental magnetization curves in the form of Froelich’s equation or the inverse tangent equation. Average execution times have been between 1 and 3 min on a common multicore workstation. The method also outputs coil’s self- or mutual inductances, with or without the magnetic core.
Finally, we provided numerous example applications as part of our codebase, including models for rodent and human TMS coils with a magnetic core. These examples have potential impact on translational and clinical applications of TMS, as well as future technology development for TMS.
Acknowledgments
This study was supported by grant from National Institute of Mental Health (R01-MH111829, R01-MH128421). H N, Q M and H L were supported by the National Institute on Drug Abuse Intramural Research Program (ZIADA000638-01). Z D was supported by the National Institute of Mental Health Intramural Research Program (ZIAMH002955). S N M and Z D are inventors on patents related to magnetic coil technology. The authors thank Mr Roberto A Sabater Gómez of the Department of Electrical and Computer Engineering at Worcester Polytechnic Institute, for assistance with software testing and manuscript editing.
Data availability statement
The data that support the findings of this study are openly available at the following URL/DOI: https://tinyurl.com/rdkdrkck.
Code Availability
The ready-to-use software package is available at https://tinyurl.com/rdkdrkck. It contains eight validation and application examples in the form of separate projects. Concurrent ANSYS Maxwell projects are also included. We employ the accessible MATLAB platform under Windows.
References
- 1.Chen C-W. Magnetism and Metallurgy of Soft Magnetic Materials. New York: Dover Publications; 2013. [Google Scholar]
- 2.Epstein C M, Davey K R. Apparatus and method for transcranial magnetic brain stimulation, including the treatment of depression and the localization and characterization of speech arrest. 6,425,852 US Patent. 2002
- 3.Davey K R, Epstein C M. Magnetic nerve stimulation seat device. 6,500,110 US Patent. 2002
- 4.Goetz S M, Deng Z-D. The development and modeling of devices and paradigms for transcranial magnetic stimulation. Int. Rev. Psychiatry. 2017;29:115–45. doi: 10.1080/09540261.2017.1305949. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Neuronetics, Inc. News release details. 2019. (available at: https://ir.neuronetics.com/news-releases/news-release-details/neuronetics-inc-celebrates-dr-charles-epsteins-contributions) (Accessed 30 November 2021)
- 6.Leary A M, Ohodnicki P R, McHenry M E. Soft magnetic materials in high-frequency, high-power conversion applications. JOM. 2012;64:772–81. doi: 10.1007/s11837-012-0350-0. [DOI] [Google Scholar]
- 7.Sarker P C, Islam M R, Guo Y, Zhu J, Lu H Y. State-of-the-art technologies for development of high frequency transformers with advanced magnetic materials. IEEE Trans. Appl. Supercond. 2019;29:1–11. doi: 10.1109/TASC.2018.2882411. [DOI] [Google Scholar]
- 8.U.S. Department of Energy—National Energy Technology Laboratory METGLAS® 2605-SA1 core datasheet. 2018. (available at: www.netl.doe.gov/sites/default/files/netl-file/METGLAS-2605-SA1-Core-Datasheet_approved)
- 9.Ouyang G, Chen X, Liang Y, Macziewski C, Cui J. Review of Fe-6.5 wt%Si high silicon steel—a promising soft magnetic material for sub-kHz application. J. Magn. Magn. Mater. 2019;481:234–50. doi: 10.1016/j.jmmm.2019.02.089. [DOI] [Google Scholar]
- 10.Salvador R, Miranda P C, Roth Y, Zangen A. High permeability cores to optimize the stimulation of deeply located brain regions using transcranial magnetic stimulation. Phys. Med. Biol. 2009;54:3113–28. doi: 10.1088/0031-9155/54/10/010. [DOI] [PubMed] [Google Scholar]
- 11.Carmona I C, Kumbhare D, Baron M S, Hadimani R L. Quintuple AISI 1010 carbon steel core coil for highly focused transcranial magnetic stimulation in small animals. AIP Adv. 2021;11:025210. doi: 10.1063/9.0000219. [DOI] [Google Scholar]
- 12.RamRakhyani A K, Lazzi G. Analysis of non-linear magnetic core for magnetic neural stimulators. 2013 US National Committee of URSI National Radio Science Meeting (USNC-URSI NRSM); 2013. p. p 1. [Google Scholar]
- 13.RamRakhyani A K, Lazzi G. Ferrite core non-linearity in coils for magnetic neurostimulation. Healthc. Technol. Lett. 2014;1:87–91. doi: 10.1049/htl.2014.0087. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Meng Q, Jing L, Badjo J P, Du X, Hong E, Yang Y, Lu H, Choa F-S. A novel transcranial magnetic stimulator for focal stimulation of rodent brain. Brain Stimul. 2018;11:663–5. doi: 10.1016/j.brs.2018.02.018. [DOI] [PubMed] [Google Scholar]
- 15.Wilson M T, Tang A D, Iyer K, McKee H, Waas J, Rodger J. The challenges of producing effective small coils for transcranial magnetic stimulation of mice. Biomed. Phys. Eng. Express. 2018;4:037002. doi: 10.1088/2057-1976/aab525. [DOI] [Google Scholar]
- 16.Khokhar F A, Voss L J, Steyn-Ross D A, Wilson M T. Design and demonstration in vitro of a mouse-specific transcranial magnetic stimulation coil. IEEE Trans. Magn. 2021;57:1–11. doi: 10.1109/TMAG.2021.3077976. [DOI] [Google Scholar]
- 17.Deng Z-D, Lisanby S H, Peterchev A V. Coil design considerations for deep transcranial magnetic stimulation. Clin. Neurophysiol. 2014;125:1202–12. doi: 10.1016/j.clinph.2013.11.038. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Koponen L M, Nieminen J O, Mutanen T P, Stenroos M, Ilmoniemi R J. Coil optimisation for transcranial mangetic stimulation in realistic head geometry. Brain Stimul. 2017;10:795–805. doi: 10.1016/j.brs.2017.04.001. [DOI] [PubMed] [Google Scholar]
- 19.Yoon H, Kim I, Shin P S, Koh C S. Finite element implementation of a generalized Chua-type vector hysteresis model and application to iron loss analysis of three-phase transformer. IEEE Trans. Magn. 2011;47:1122–5. doi: 10.1109/TMAG.2010.2073684. [DOI] [Google Scholar]
- 20.Wang X, Xie D, Bai B, Takahashi N, Yang S. 3-D FEM analysis in electromagnetic system considering vector hysteresis and anisotropy. IEEE Trans. Magn. 2008;44:890–3. doi: 10.1109/TMAG.2007.916712. [DOI] [Google Scholar]
- 21.Leonard P J, Rodger D, Karagular T, Coles P C. Finite element modelling of magnetic hysteresis. IEEE Trans. Magn. 1995;31:1801–4. doi: 10.1109/20.376386. [DOI] [Google Scholar]
- 22.Miano G, Serpico C, Verolino L, Visone C. Comparison of different hysteresis models in FE analysis of magnetic field diffusion. IEEE Trans. Magn. 1995;31:1789–92. doi: 10.1109/20.376383. [DOI] [Google Scholar]
- 23.Hoffmann K, Bastos J P A, Leite J V, Sadowski N, Barbosa F. A vector Jiles–Atherton model for improving the FEM convergence. IEEE Trans. Magn. 2017;53:1–4. doi: 10.1109/TMAG.2017.2660303. [DOI] [Google Scholar]
- 24.Li W, Kim I H, Jang S M, Koh C S. Hysteresis modeling for electrical steel sheets using improved vector Jiles–Atherton hysteresis model. IEEE Trans. Magn. 2011;47:3821–4. doi: 10.1109/TMAG.2011.2158296. [DOI] [Google Scholar]
- 25.Benabou A, Clénet S, Piriou F. Comparison of Preisach and Jiles–Atherton models to take into account hysteresis phenomenon for finite element analysis. J. Magn. Magn. Mater. 2003;261:139–60. doi: 10.1016/S0304-8853(02)01463-4. [DOI] [Google Scholar]
- 26.Saturnino G B, Puonti O, Nielsen J D, Antonenko D, Madsen K H, Thielscher A. Brain and Human Body Modeling: Computational Human Modeling at Embc 2018. Cham: Springer; 2019. SimNIBS 2.1: a comprehensive pipeline for individualized electric field modelling for transcranial brain stimulation; pp. pp 3–25. [PubMed] [Google Scholar]
- 27.Saturnino G B, Madsen K H, Thielscher A. Electric field simulations for transcranial brain stimulation using FEM: an efficient implementation and error analysis. J. Neural Eng. 2019;16:066032. doi: 10.1088/1741-2552/ab41ba. [DOI] [PubMed] [Google Scholar]
- 28.Saturnino G B, Thielscher A, Madsen K H, Knosche T R, Weise K A. A principled approach to conductivity uncertainty analysis in electric field calculations. Neuroimage. 2019;188:821–34. doi: 10.1016/j.neuroimage.2018.12.053. [DOI] [PubMed] [Google Scholar]
- 29.Makarov S N, de Lara L I N, Noetscher G M, Nummenmaa A. Modeling primary fields of TMS coils with the fast multiple method. bioRxiv Preprint. 2019 doi: 10.1101/514919. [DOI]
- 30.Makarov S N, Wartman W A, Daneshzand M, Fujimoto K, Raij T, Nummenmaa A. A software toolkit for TMS electric-field modeling with boundary element fast multipole method: an efficient MATLAB implementation. J. Neural Eng. 2020;17:046023. doi: 10.1088/1741-2552/ab85b3. [DOI] [PubMed] [Google Scholar]
- 31.Makarov S N, Noetscher G M, Nazarian A. Low-Frequency Electromagnetic Modeling for Electrical and Biological Systems Using Matlab. New York: Wiley; 2015. [Google Scholar]
- 32.Makarov S N, Golestanirad L, Wartman W A, Nguyen B T, Noetscher G M, Ahveninen J P, Fujimoto K, Weise K, Nummenmaa A R. Boundary element fast multipole method for modeling electrical brain stimulation with voltage and current electrodes. J. Neural Eng. 2021;18:0460d4. doi: 10.1088/1741-2552/ac17d7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Makarov S N, Hämäläinen M, Noetscher G M. Boundary element fast multipole method for enhanced modeling of neurophysiological recordings. IEEE Trans. Biomed. Eng. 2020;68:308–18. doi: 10.1109/TBME.2020.2999271. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Van Bladel J G. Electromagnetic Fields. 2 edn. Hoboken, NJ: Wiley-IEEE Press; 2007. [Google Scholar]
- 35.Lean M, Wexler A. Accurate field computation with the boundary element method. IEEE Trans. Magn. 1982;18:331–5. doi: 10.1109/TMAG.1982.1061889. [DOI] [Google Scholar]
- 36.Rucker W M, Richter K R. Three-dimensional magnetostatic field calculation using boundary element method. IEEE Trans. Magn. 1988;24:23–26. doi: 10.1109/20.43848. [DOI] [Google Scholar]
- 37.Krstajic B, Andelic A, Milojkovic S, Babic S, Salon S. Nonlinear 3D magnetostatic field calculation by the integral equation method with surface and volume magnetic charges. IEEE Trans. Magn. 1992;28:1088–91. doi: 10.1109/20.123871. [DOI] [Google Scholar]
- 38.Arrott A S, Templeton T L. Using magnetic charge to understand soft-magnetic materials. AIP Adv. 2018;8:047301. doi: 10.1063/1.4994219. [DOI] [Google Scholar]
- 39.Vladimirov V S. Equations of Mathematical Physics. New York: Marcel Dekker; 1971. [Google Scholar]
- 40.Saad Y. Iterative Methods for Sparse Linear Systems. 2nd edn. Philadelphia, PA: SIAM; 2003. [Google Scholar]
- 41.Oseledets V, Dolgov S, Kazeev V, Savostyanov D, Lebedeva O, Zhlobich P, Mach T, Song L. TT-Toolbox. FGMRES. 2016. (available at: https://github.com/oseledets/TT-Toolbox/blob/master/solve/fgmres.m)
- 42.Greengard L, Rokhlin V. A fast algorithm for particle simulations. J. Comput. Phys. 1987;73:325–48. doi: 10.1016/0021-9991(87)90140-9. [DOI] [Google Scholar]
- 43.Gimbutas Z, Greengard L, Magland J, Rachh M, Rokhlin V. fmm3D Documentation. Release 0.1.0. 2021. (available at: https://github.com/flatironinstitute/FMM3D . https://github.com/flatironinstitute/FMM3D/blob/master/fmm3d_manual.pdf)
- 44.Mayergoyz I, Chari M, D’Angelo J. A new scalar potential formulation for three-dimensional magnetostatic problems. IEEE Trans. Magn. 1987;23:3889–94. doi: 10.1109/TMAG.1987.1065774. [DOI] [Google Scholar]
- 45.Smythe W R. Static and Dynamic Electricity. 2nd edn. New York: McGraw Hill; 1950. [Google Scholar]
- 46.Jackson J D. Classical Electrodynamics. 3rd edn. New York: Wiley; 1998. [Google Scholar]
- 47.Sonntag C L W, Lomonova E A, Duarte J L. Implementation of the Neumann formula for calculating the mutual inductance between planar PCB inductors. 2008 18th Int. Conf. Electrical Machines; 2008. pp. pp 1–6. [Google Scholar]
- 48.Dengler R. Self inductance of a wire loop as a curve integral. Adv. Electromag. 2016;5:1–8. doi: 10.7716/aem.v5i1.331. [DOI] [Google Scholar]
- 49.Liu S, Su J. Accurate expressions of mutual inductance and their calculation of Archimedean spiral coils. Energies. 2019;12:2017. doi: 10.3390/en12102017. [DOI] [Google Scholar]
- 50.Sudhoff S D. Power Magnetic Devices: A Multi-Objective Design Approach. Hoboken, NJ: Wiley-IEEE Press; 2014. [Google Scholar]
- 51.Janicke L, Kost A. Convergence properties of the Newton–Raphson method for nonlinear problems. IEEE Trans. Magn. 1998;34:2505–8. doi: 10.1109/20.717577. [DOI] [Google Scholar]
- 52.Das R, Lowther D A. Acceleration of field computation involving HTS. IEEE Trans. Magn. 2013;49:1785–8. doi: 10.1109/TMAG.2013.2242052. [DOI] [Google Scholar]
- 53.Niu S, Fu W N, Ho S L. Nonlinear convergence acceleration of magnetic field computation. IEEE Trans. Magn. 2015;51:1–4. doi: 10.1109/TMAG.2015.2445342. [DOI] [Google Scholar]
- 54.Shane G M, Sudhoff S D. Refinements in anhysteretic characterization and permeability modeling. IEEE Trans. Magn. 2010;46:3834–43. doi: 10.1109/TMAG.2010.2064781. [DOI] [Google Scholar]
- 55.Dadić M, Jurc̈ević M, Malarić R. Approximation of the nonlinear B-H curve by complex exponential series. IEEE Access. 2020;8:49610–6. doi: 10.1109/ACCESS.2020.2979866. [DOI] [Google Scholar]
- 56.Arnold Magnetic Technologies 2 mil grain oriented silicon steel hysteresis curve at 2000 Hz. 2012. (available at: www.arnoldmagnetics.com/wp-content/uploads/2017/10/2-Mil-Grain-Oriented-Silicon-Steel-Hysteresis-Curve-at-2000Hz.pdf)
- 57.Dadić M. 2021. Private communication.
- 58.Grover F W. Inductance Calculations. New York: Dover Publications; 2009. [Google Scholar]
- 59.Specht E. The best known packings of equal circles in a circle (complete up to N = 2600) 2021. (available at: http://hydra.nat.uni-magdeburg.de/packing/cci/)
- 60.COMSOL knowledge database improving convergence in nonlinear time dependent models. (available at: www.comsol.com/support/knowledgebase/1127 . and COMSOL Blog: www.comsol.com/blogs/how-the-b-h-curve-affects-a-magnetic-analysis-and-how-to-improve-it/)
- 61.Peterchev A V, Jalinous R, Lisanby S H. A transcranial magnetic stimulator inducing near-rectangular pulses with controllable pulse width (cTMS) IEEE Trans. Biomed. Eng. 2008;55:257–66. doi: 10.1109/TBME.2007.900540. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The data that support the findings of this study are openly available at the following URL/DOI: https://tinyurl.com/rdkdrkck.