Convex optimisation of gradient and shim coil winding ...

10 downloads 55777 Views 1MB Size Report
May 4, 2014 - imaging region and are made from coils of copper wire at room temperature. .... cases, optimisations were performed on a Mac Pro (Apple Inc.,.
Journal of Magnetic Resonance 244 (2014) 36–45

Contents lists available at ScienceDirect

Journal of Magnetic Resonance journal homepage: www.elsevier.com/locate/jmr

Convex optimisation of gradient and shim coil winding patterns Michael S. Poole a,⇑, N. Jon Shah a,b a b

Institute of Neuroscience and Medicine - 4, Forschungszentrum Jülich GmbH, Wilhelm-Johnen-Straße, 52425 Jülich, Germany Department of Neurology, Faculty of Medicine, RWTH Aachen University, JARA, Aachen, Germany

a r t i c l e

i n f o

Article history: Received 7 January 2014 Revised 20 March 2014 Available online 4 May 2014 Keywords: Gradient coil Shim coil Convex optimisation Field synthesis Boundary element method Wire spacing Sparsity Infinity norm Manhatten norm ‘p -Norm

a b s t r a c t Gradient and shim coils were designed using boundary element methods with convex optimisation. The convex optimisation framework permits the prototyping of many different cost functions and constraints, for example ‘p -norms of the current density. Several examples of gradients and shims were designed and simulated to demonstrate this, as well as to investigate the behaviour of new cost functions. A mixture of ‘1 - and ‘1 -norms of the current density, when used as a regularisation term in the field synthesis problem, was found to produce coils with bunches of equally spaced windings that do not take up all of the available surface. This is thought to be beneficial in the design of coils that will be manufactured from wire with a fixed cross-section. Ó 2014 Elsevier Inc. All rights reserved.

1. Introduction Magnetic resonance imaging requires 3 different types of magnetic field produced by the main magnet, gradient and radiofrequency (RF) coils. The main magnet generates an exquisitely homogeneous, stable and intense magnetic field usually with superconducting wires and is designed with a great deal of engineering knowledge and experience [1]. Radio-frequency coils are usually simple rectangular or circular loops combined with capacitors in circuits resonant at the Larmor frequency. Gradient coils must produce their magnetic fields to within a few % in the imaging region and are made from coils of copper wire at room temperature. Gradient coils must operate safely in the audio frequency range up to 20 kHz and support a maximum current of more than 800 A with more than 2000 V potential difference across each terminal. Shim coils are similar to gradient coils but need not support such high current and voltages. They are used to correct the magnetic field of the main magnet. The design of gradient and shim coils [2] can be divided into two types of methods, discrete wire and current density method, each with arguments for and against their use. Discrete wire methods model the thin wires that constitute a coil and continuous ⇑ Corresponding author. Fax: +49 2461 61 1919. E-mail address: [email protected] (M.S. Poole). http://dx.doi.org/10.1016/j.jmr.2014.04.015 1090-7807/Ó 2014 Elsevier Inc. All rights reserved.

current density methods model a coil with a surface current density. In discrete methods, the line-integral form of the Biot–Savart law is used to calculate the magnetic field produced by a coil. The position of the wires is parameterised and a cost function that defines the ‘‘quality’’ of the coil [3,4] is usually non-linear. Therefore, it is common and entirely appropriate to use stochastic optimisation techniques for global optimisation of the cost function with discrete wire coil parameterisation [5]. It is conceptually simple to add various kinds of penalty to the cost function to yield the most desirable design. However, a new parameterisation is required when the coil surface is changed requiring considerable mathematical effort for complicated surface shapes [6]. Continuous current density coil design methods [7,8] provide a good approximation to the manufactured coil if enough wires are used. A thin surface with a current density flowing on it can be modelled as incompressible flow with zero divergence. The surface integral form of the Biot–Savart law is used to calculate the magnetic field produced by a coil. Various parameterisations of continuous surface current density are possible that provide a simple linear relationship with the magnetic induction field. The most versatile of these is a parameterisation in which the current carrying surface is modelled as a connected ensemble of flat polygons, known as a mesh. The current density in the surface is then a vector field that is piecewise uniform [9]. The number of free

37

M.S. Poole, N. Jon Shah / Journal of Magnetic Resonance 244 (2014) 36–45

parameters over which to optimise can be greatly reduced with assumptions of symmetry [10,11]. Inversion of the Biot–Savart law to obtain coil designs is ill-posed, but easily solved by weighted Tikhonov regularisation with the power dissipation [7,12] or stored energy [13] of the coil with one-step matrix inversion methods. Since the current density has zero divergence and is confined to a surface, a potential function, the stream-function, is defined over the surface [8]. A scalar function whose curl (about the surface normal) yields the current density, the stream function is piecewise linear over a polygonal mesh [9,14]. The vertices of the mesh possess a stream function value that is linearly interpolated over its immediate neighbourhood of triangles. It is these stream function values that act as free parameters of continuous current density coil design methods. A final step in continuous current density methods is the conversion into discrete wires by taking level sets of the stream-function over the surface. Cost functions involving non-quadratic functions of the freeparameters of the coil design have been studied previously and solved efficiently using custom gradient descent based deterministic optimisation algorithms [4,15–18]. In the present paper we introduce a convenient general formulation of the problem where all components of the optimisation are convex. Several prototyping tools are available for the solution of convex optimisation problems. In the present study we used cvx [19,20] and demonstrate how new cost functions are easily prototyped. In particular, the magnitude of the current density is a convex function of the nodal stream function values and therefore we can minimise a convex norm of the absolute current density. Previously the infinity norm of the gradient magnitude was included in the optimisation to provide coils with minimised maximum current density [15]. These coils exhibit a lower maximum temperature for a given field gradient strength [21]. It should be noted that while it has always been possible to add such terms to the cost function, it is only when formulated in this way that they can be solved efficiently and deterministically and associated in any combination. This paper is arranged as follows: the mathematical formulation of the convex optimisation problem is given, followed by its representation in the parsed cvx code as written in Matlab (The Mathworks, Natick, MA, USA). The ‘1 -, weighted ‘2 - and ‘1 -norms of the current density were used for regularisation using triangular and sinusoidal boundary element methods (BEMs) on arbitrary and cylindrical surfaces, respectively. Fundamental studies (similar to those presented in Refs. [22,21]) of the behaviour of this new optimisation were made by trading the field accuracy for different norms of the current density and also by mixing them in varying amounts with fixed field accuracy. Coil patterns are shown for 0th, 1st and 2nd order solid harmonic target fields with resistance and mixed norm minimised solutions and shielded whole-body X-gradient coils were designed for comparison. Simulations of the resultant novel coil designs were performed and are presented herein with discussions of their relevance to coil construction.

2. Methods 2.1. Problem Formulation Two types of BEM were used in this study. One with flat triangular elements and linear shape functions to model the stream-function of the current density [9,14,23]. The values of the stream-function at the nodes of the mesh, w, define the coil. Meshes were made in Blender (Blender Foundation, Amsterdam, Netherlands) and exported to Matlab. The second method is restricted to a finite-length cylindrical surface on which the stream-function is a weighted sum of truncated sinusoidal functions [10,11].

Matrix equations that transform w to the various coil properties were constructed according to Eqs. (9)–(13) in Ref. [15] and are summarised below.  The z-component of the magnetic field at a series of points,

b ¼ Bw;

ð1Þ

 The Cartesian or cylindrical components of the current density in each triangle,

jx ¼ J x w;

jy ¼ J y w;

jz ¼ J z w;

ja/ ¼ J a/ w;

ð2Þ

 The stored energy in the coil;

W ¼ wT Lc w;

ð3Þ

 The resistive power dissipation of the coil,

P ¼ wT Rc w:

ð4Þ

Previously, a weighted linear combination optimisation problem was used with equality constraints. This is simple to solve when each term is quadratic in w using matrix inversion (with Lagrange multipliers for the equality constraints) [14,23]. A non-quadratic term was introduced to minimise the maximum absolute current density [15]. We generalise this by stating the optimisation in the form of a convex optimisation as defined in Ref. [24]:

minimise f 0 ðwÞ subject to f i ðwÞ 6 bi ;

i ¼ 1; . . . ; m;

ð5Þ

where the functions f0 ; . . . ; fm : Rn ! R are convex. Eqs. (1) and (2) are affine. Eqs. (3) and (4) are convex if Lc and Rc are positive semidefinite, which is the case. Various convex cost functions and constraints were tested in the present study using cvx; a toolbox for Matlab that parses the optimisation problem and passes it in standard form to sdtp3 [25] to find the solution. The simplest optimisation for the coil design problem is the Tikhonov regularised minimisation of the root-mean-squared (RMS) residual field.

minimise kBw  bt k2 þ akwk2 ;

ð6Þ

where bt is the target field and a is the user-defined regularisation parameter. The ‘2 -norm regularisation term, kwk2 , has no practical relevance. Substitution of w with an affine transformation Fw retains convexivity. If F is the matrix obtained from Cholesky decomposition of Lc or Rc then the solution of Eq. (6) will yield, respectively, the inductance (stored energy) or resistance (power dissipation) minimised coil. The minimum resistance coil design problem is written in cvx code as. cvx_begin variable x(length(Rc)); minimize (norm(B  x-bt,2) + alph  quad_form (x,Rc)); cvx_end

It should be noted that it is far simpler and quicker to solve the specific problem described by the code above using direct matrix inversion [9,14,23] than this convex optimisation method. In all cases, optimisations were performed on a Mac Pro (Apple Inc., Cupertino, CA, USA) equipped with 2.8 GHz Intel Xeon processors and 4 GB of RAM, using Matlab R2012a (The Mathworks, Natick, MA, USA), CVX [24] 2.0 (beta) build 945 and sdpt3 [25] version 4.0.

38

M.S. Poole, N. Jon Shah / Journal of Magnetic Resonance 244 (2014) 36–45

2.2. Normalisation

track thickness, t, of 3 mm and minimum gap between tracks, g _ , of 1 mm were used.

The matrices, B; J x ; J y ; J z ; J a/ ; Lc and Rc , used in the optimisation are derived from physical properties of the coil and therefore have a large range of scales. These matrices were normalised by their Frobenius norm to ensure that they all have approximately the same scale and therefore improved convergence behaviour. With reference to Eq. (6) for example, B ! B=kBkF , where kBkF is typically on the order of 107 . 2.3. Basic regularisation behaviour It is possible to substitute the power dissipation regularisation term, quad_form (x,Rc), by the maximum absolute current density [15], kjk1 , or the sum of absolute current densities, kjk1 , qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 2 2 2 2 where j ¼ jx þ jy þ jz or j ¼ ja/ þ jz . See Appendix A for more

2.4. Mixed regularisation The solutions produced by Eq. (7) represent the very extreme solutions of their regularisation type for a given maximum field error. It was shown previously that, depending on the coil design requirements, it can be beneficial to regularise with a combination of terms [21]. In this section, the same coil geometry and target field (X-gradient) as the previous section were used and Dmax was fixed to 5%. The optimisation problem was

minimise a

kjðwÞkp  K pp kjðwÞkq  K qq þ ð1  aÞ K qp  K pp K pq  K qq

ð8Þ

subject to kBw  bt k1 =kbt k1 6 5%;

detail on the relevance of ‘p -norms of the current density magnitude in coil design. It is also common to replace the ‘2 -norm of the field errors with the maximum field error, which is easily changed in cvx by altering the power of the norm to infinity (see Eq. (A5)). In this section the trade-off between maximum field error and the regularisation term was investigated [22,21]. The optimisation is written:

where a was varied from 0 to 1. If wp is the p-norm regularised solution to Eq. (7), then K pq ¼ kjðwp Þkq . The cases where ½p; q ¼ ½1; 2; ½1; 1 and ½2; 1 were studied. It is also simple to recast Eq. (8) into a constrained optimisation problem by converting one of the terms of the minimisation into an inequality constraint and varying the value of that constraint. Coils were simulated in the same manner as described in the previous section.

minimise kjðwÞkp

2.5. Wire patterns for mixed p ¼ 1 and p ¼ 1 regularised coils

subject to kBw  bt k1 =kbt k1 6 Dmax :

ð7Þ

In Eq. (7), p = 1, 2 or 1, and Dmax was varied over the range 0.5% to 20%. Since all areas of all the triangles are the same, the p ¼ 2 case is equivalent to the resistance (see Eq. (A4)). Eq. (7) for the p ¼ 1 case is written in cvx code as cvx_begin variable x(length(Rc)); minimize (max(norms([Jx  x Jy  x Jz  x], 2, 2))); subject to norm (B  x  bt, inf)./max(bt)