IEEE TRANSACTIONS ON MAGNETICS, VOL. 47, NO. 12, DECEMBER 2011 4761 Design of Gradient Coil for Magnetic Resonance Imaging Applying Particle-Swarm Optimization Clemente Cobos Sánchez, Mario Fernández Pantoja, and Rafael Gómez Martín Department of Electromagnetism, University of Granada, 18071 Granada, Spain Designing a gradient coil for magnetic resonance imaging (MRI) is an electromagnetic inverse problem often formulated as a con- strained optimization, which has been successfully solved by inverse boundary element methods. The constant search for new coil fea- tures and improved performance has highlighted the need of employing more versatile optimization techniques capable of dealing with the new requirements. In this paper, the solution of linear and nonlinear optimization problems using particle-swarm optimization (PSO) algorithms is presented. Examples of coil designed using this heuristic method are shown, including a comparison to solutions provided by conventional optimization approaches. Numerical experiments reveal that the application of PSO for the solution of inverse boundary element problems for coil design is a computationally efficient algorithm that is capable of handling nonlinear problems and that offers fast convergence, especially for those symmetric coil geometries where the computational effort can be drastically reduced by using suit- able dimensionality-reduction techniques. Index Terms— Boundary element methods, magnetic resonance imaging, optimization methods. I. INTRODUCTION M AGNETIC resonance imaging (MRI) is a noninvasive technique that relies on the principles of nuclear mag- netic resonance (NMR) and is used for in vivo imaging of the human body. MRI is based on the use of well-defined and con- trolled magnetic fields, such as the magnetic field gradients, used to encode spatially the signals from the sample. These field gradients are generated by coils of wire, usually placed on cylindrical surfaces, although many other geometries can be employed [1]. Gradient-coil design is an inverse problem, where the goal is to find optimal positions for the multiple windings of coils so as to produce fields with the desired spatial dependence and properties (low inductance, high gradient-to-current ratio, minimal resistance, good-field gradient uniformity, etc.) [1]. Over the last two decades, new design methods have been developed to improve gradient coil performance and patient comfort [1], [2]. A remarkable group of coil design methods is the one made up of approaches based on heuristic techniques, such as simulated annealing (SA) optimization algorithms, which have been used to design a longitudinal gradient coil [3], shielded quadrupolar gradient coils to be used in super- conducting magnet geometries [4], or transverse gradient coil elements [5], [6]. Further, genetic algorithms (GA) have also been successfully applied to the design of gradient coils so as to produce more linear and compact cylindrical Z-gradient coils [7], X-gradient coils [8], [9], and biplanar coils [10], [11]. Most of these heuristic techniques based on SA or GA deal directly with wire elements, positions of which are included as free parameters in the design optimization. Unfortunately, this fact considerably restricts the flexibility of such approaches, incapacitating them frequently to handle many other different Manuscript received March 11, 2011; revised May 15, 2011; accepted June 07, 2011. Date of publication June 13, 2011; date of current version November 23, 2011. Corresponding author: C. Cobos Sánchez (e-mail: ccobos@ugr.es). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TMAG.2011.2159510 geometries and coil-optimization properties. Additionally, these stochastic techniques may involve convergence problems, in the sense that the solution found is not necessarily the global one. To overcome this problem, the stream function for current density can be introduced in the evolution of designing gra- dient coils, as it provides an alternative and realistic representa- tion of the problem [12]. Thus, an especially successful group of coil-design techniques are those that incorporate the stream function within an inverse boundary element method (IBEM). The pioneer of this type of approach was Pissanetzky [12], who introduced the idea in 1992. This technique was also later ap- plied to the design of single- and multi-surface gradient coils [13], and more recently to produce coils with arbitrary geometry [14], [15], and extended to higher orders [16]. The stream func- tion IBEM is a quite flexible approach that allows the inclusion of new coil features in the design process, for instance, the min- imization of power dissipation [14] or minimization of the elec- tric field induced in a prescribed conductor [17]. These new coil properties have been traditionally added as linear terms to the IBEM problem, which has been successfully solved with clas- sical optimization approaches, such as regularized matrix inver- sion. More recently neither linear nor quadratic requirements have been included in a stream function IBEM [18], [19], which has shown the need of considering optimization techniques as being able to handle nonlinearities and singularities. Here, a solution to linear and nonlinear stream function IBEM problems for coil design by particle-swarm optimiza- tion (PSO) algorithms is presented. PSO is an evolutionary technique based on heuristic algorithms [20], of easy imple- mentation and quick convergence, which has been successfully applied in many fields [21]. PSO has also been demonstrated to be a robust and fast algorithm that can solve nonlinear and nondifferentiable optimizations [22], generating a high-quality solution within shorter calculation time and with more stable convergence characteristic than other stochastic methods [23]. PSO is specifically chosen over other optimization heuristic techniques because of its proven power in problems where the global minimum should be found rather than a local minimum. The structure of this work is as follows. First, the problem under study is presented by introducing the related background 0018-9464/$26.00 © 2011 IEEE