Abstract
Permanent magnet arrays offer several attributes attractive for the development of a low-cost portable MRI scanner for brain imaging. They offer the potential for a relatively lightweight, low to mid-field system with no cryogenics, a small fringe field, and no electrical power requirements or heat dissipation needs. The cylindrical Halbach array, however, requires external shimming or mechanical adjustments to produce B0 fields with standard MRI homogeneity levels (e.g., 0.1 ppm over FOV), particularly when constrained or truncated geometries are needed, such as a head-only magnet where the magnet length is constrained by the shoulders. For portable scanners using rotation of the magnet for spatial encoding with generalized projections, the spatial pattern of the field is important since it acts as the encoding field. In either a static or rotating magnet, it will be important to be able to optimize the field pattern of cylindrical Halbach arrays in a way that retains construction simplicity. To achieve this, we present a method for designing an optimized cylindrical Halbach magnet using the genetic algorithm to achieve either homogeneity (for standard MRI applications) or a favorable spatial encoding field pattern (for rotational spatial encoding applications). We compare the chosen designs against a standard, fully populated sparse Halbach design, and evaluate optimized spatial encoding fields using point-spread-function and image simulations. We validate the calculations by comparing to the measured field of a constructed magnet. The experimentally implemented design produced fields in good agreement with the predicted fields, and the genetic algorithm was successful in improving the chosen metrics. For the uniform target field, an order of magnitude homogeneity improvement was achieved compared to the un-optimized, fully populated design. For the rotational encoding design the resolution uniformity is improved by 95% compared to a uniformly populated design.
Index Terms: Permanent magnets, Genetic algorithms, Magnetic resonance imaging
I. Introduction
ALTHOUGH conventional high-field MRI scanners use superconducting solenoid magnets for the DC polarizing field (B0), there is a long history of permanent magnet MRI for low to mid-field scanners [1]. Commercial examples include the Siemens Magnetom C! (0.35 T), the GE Signa Profile (0.2 T), and Hitachi AIRIS (0.3 T). Rare earth Neodymium-Iron-Boron (NdFeB) magnets are typically employed in MRI permanent assemblies due to their high remanence (Br) and high coercivity (Hci) compared to SmCo, Alnico, and Ferrite magnets [2]. Clinical permanent magnet scanners have low power requirements and maintenance costs and a reduced fringe field footprint compared to superconducting solenoid magnets. The major drawbacks of these designs are limitations in field strength (generally <0.35 T), field drift with temperature, and weight. Additionally, the C-shaped dipole magnets use large iron (or high permeability steel) for yokes to contain and guide the flux. Although the yokes greatly decrease fringe fields, they also increase the weight of the magnet assembly considerably, up to 16,000 kg [3].
The Halbach cylinder [4]–[6] is an alternative, yoke-less permanent magnet design that offers a good balance between field strength and bore size with a small fringe field footprint, but with a low weight compared to yoked magnets [7].An ideal Halbach cylinder magnet is an infinitely long hollow cylinder with a continuously varying polarization in the magnet material as a function of azimuthal angle (Fig. 1). The dipole mode of the Halbach cylinder consists of a 4π rotation of magnet polarization and results in a homogeneous transverse field. Small bonded continuous magnetization Halbach rings can be produced using injection molding and field alignment systems and are manufactured for brushless motors [8]–[10]. However, this process becomes infeasible for magnets on the human imaging scale. The closest realizable approximation to the ideal magnet is broken up into trapezoidal shaped segments [4], [11]. However, segmenting the cylinder into rectangular or cylindrical rods is common since these are commonly mass-produced shapes with a simple relationship between the magnetization direction and the shape. Although the sparser segmentation reduces the field strength and homogeneity, they are also lighter and less expensive and thus possibly a good choice for portable and low-cost MRI scanners[12]–[17]. A recent thorough review of Halbach arrays for mobile NMR and MRI was published by Blümler and Casanova [6].
Fig. 1.

The magnet polarization for a dipolar Halbach cylinder. The magnetic polarization orientation, ϕ, varies as 2 times the azimuthal angle, θ (ϕ = 2θ). This orientation of the magnet polarization mimics the fringe field that would result from a perfect magnetic dipole placed at the center of the cylinder. To the extent that the discrete magnets can mimic this dipolar pattern, the result is a homogeneous field in the transverse direction.
In 2003, Moresi et al. described a small 8 rung Halbach cylinder (array diameter = 9 cm) made up of cylindrical magnet pieces for tabletop NMR experiments, in which iron plates with a 5 mm small gap for access were added to the ends of the cylinder to improve homogeneity [12]. In 2004, Raich and Blümler introduced the NMR MANDHaLa (Magnet Arrangements for Novel Discrete Halbach Layout), made up of Halbach rings (5.7 cm diam.) sandwiched together. Each ring consisted of identical stock bar magnets with square cross-sections [13]. In 2009, Danieli et al. presented a highly homogeneous design similar to the “NMR Mandhala”, but with an optimized spacing between the Halbach rings, improving the field uniformity along the cylindrical axis. The resulting 50 kg magnet had an inner diameter of 20 cm and average field strength of 0.22 T. They went on to shim the field using small NdFeB shim blocks and linear fields from the gradient coils, producing a 100 Hz line-width in a 3cm volume (11 ppm) [14]. In a departure from the spaced rings of the “NMR Mandhala” designs, a sparse Halbach magnet introduced by Cooley et al. [16] used continuous rectangular magnet rungs instead of stacked rings. The magnet consisted of 20 N42 NdFeB magnet rungs with a 1″×1″ cross section and length of 35.6 cm on a 36 cm diameter. This low length to diameter ratio (1) led to more significant fringe effects [18]. To compensate for the field drop-off along the cylinder axis, two additional Halbach “end rings” made up of 20 1″ NdFeB cubes were added inside the cylinder (at the ends). The magnet was designed as a prototype for a portable brain scanner, although the size (23 cm bore diameter) was slightly smaller than needed for this application.
This previous sparse Halbach cylinder was used for arotating Spatial Encoding Magnetic Field (rSEM) for image encoding [19]. In this approach, the MRI scanner hardware is greatly simplified by eliminating cryogen and water cooling, gradient coils, and gradient power amplifiers. Instead the permanent magnet Halbach array is used to produce both the spin-polarizing B0 field and the Spatial Encoding Magnetic field (SEM). To encode images, the SEM is modulated through physical rotation of the magnet. In this case, the spatial pattern of the field inhomogeneity is not a nuisance to be minimized, but forms an important component of the imaging system (the SEM). This changes the design considerations for the magnet. In standard MRI and NMR magnets, a simple optimization metric which maximizes the average field and minimizes the field variation over the Region of Interest (ROI) would be used. However, when the magnet is also used for image encoding, some built-in field variation must be allowed and the shape of that field pattern should be considered. High-order spatial terms (quadratic and above) in the field pattern can be problematic since they result in non-uniform image resolution and contain locations where the local field gradient is zero [19]–[21]. At these zero gradient locations, the MR signal is not frequency encoded, forming an “encoding hole” in this rSEM encoding scheme [19], [22]. Even-order terms in the SEM additionally lead to image aliasing since then two or more locations have identical MR frequencies [19]. Therefore a linear spatial field pattern or a monotonic field without zero gradient regions within the ROI is desirable for the rSEM magnet.
In this paper, we propose an optimization framework for designing sparse Halbach magnets with a flexible optimization target. The overall magnet size and extent is fixed, but the permanent magnet material is non-uniformly populated. Using user-defined optimization metrics, a genetic algorithm is used to populate the spaces allotted for the permanent magnets with one of 3 types of material. We demonstrate the approach with the design of human head-sized sparse Halbach cylinders for portable MRI. Both a traditional homogeneous field target design and a monotonic encoding field target design (for rSEM imaging) are optimized. We compare field patterns of the optimized designs to a uniformly populated Halbach cylinder, and compare both designs for use with rSEM MRI. We also compare the simulated field map of the rSEM optimized design with the experimental field measured from the constructed magnet. Finally, we evaluate the rSEM MRI spatial resolution through image point-spread-function (PSF) simulations formed from the measured SEM. Although it is not within the scope of this manuscript, the ultimate purpose of the rSEM magnet is for performing MRI experiments on human subjects using the rSEM encoding method.
II. Methods
The magnet design framework is based on the physical constraints of the human brain imaging application and the need for a realistic (readily buildable) mechanical design. The potential locations of 1″ cube NdFeB material are predetermined in a fixed geometric model and the population of each location corresponds to a binary decision variable of whether or not to populate that location with magnetic material. In our design we extend this decision to three choices (no magnet, or N42 or N52 grade material). Because the optimization variables are integer and the appropriate metrics and constraints are non-linear, we use a genetic algorithm (GA) to ensure high quality designs. Flux density maps in a target volume are estimated using superposition of the field patterns of the individual magnet elements. Features of these maps (homogeneity, monotonicity, etc.) are calculated to quantify the “fitness” of a magnet design.
Because a simplified-model was used to optimize the rSEM magnet and GA does not guarantee a global optimum, the optimization procedure was repeated multiple times and the results were further evaluated with full rSEM imaging simulations.
A. Full Geometric Magnet Model
The design procedure starts with the determination of the full geometric model of the magnet, comprising a set of permanent magnet pieces with fixed sizes, locations, and orientations. Figure 2 illustrates the full geometric model and a CAD model of the constructed magnet with patient. The full model is based on a sparse Halbach cylinder with 24 rectangular rungs made up of 18 rows of 1″ NdFeB cubes. A common problem in Halbach cylinders is that the field falls off significantly near each end of the finite cylinder. To allow for a compact, lightweight design, the magnet bore is designed to be smaller than shoulder-width. Therefore, the length between the inferior-end of the cylinder to brain isocenter is limited by the shoulders, but this limitation does not exist in the superior direction. Because of this asymmetry, it’s advantageous to use differing approaches to the field fall-off problem at each end, yielding an asymmetric magnet design along the body superior-inferior (head-foot) axis. For the fall-off at the inferior aspect of the head, we use an approach similar to our previous magnet design [19] and employ a 1-row Halbach ring (layer 1) to boost the field. The diameter of the booster ring is set to 32 cm (measured from magnet centers), allowing access of an adult patient wearing a multi-channel receive array helmet (Fig. 2b). Although a booster ring could be used at the superior end as well, instead we extend the magnet asymmetrically beyond the top of the patient’s head. This provides an increased diameter for the insertion and removal of the RF coils at the superior-end. In principle, we could extend the design as far as we like, but weight and cost concerns compelled us to truncate the design 29cm above isocenter. The diameter of the inner Halbach cylinder (layer 2) was set to 41cm to allow sufficient space for transmit coils. A concentric 50cm diameter Halbach cylinder (layer 3) was added to increase the field strength and design flexibility. We employed the standard rule of thumb that the brain isocenter is 18 cm above the shoulder for adult subjects. Thus the isocenter of the magnet must be < 18cm above the patient-end of the magnet, so only 7 × 1″ rows (17.78 cm) of the magnets are possible below isocenter. Our design choice of extending the superior end of the magnet 29 cm past isocenter translates to 11 rows of magnet cubes above isocenter (18 rows total).
Fig. 2.

a) Model of the discrete locations considered for the placement of the 1 inch cubic rare-earth magnets. The multiple layers of 24 rungs are shown with the 20cm diameter spherical region of interest. Each of the 2 full layers of rungs contains 18× 1″ cubes. The isocenter is 7 inches (∼18cm) above the shoulders in order to place it near the center of the brain. Layer 1 consists of only a single 1″ cube per rung near the patient’s neck to compensate for field drop-off in this region. The rung centers are on diameters of 32cm, 41cm, and 50cm for the three respective layers. b) Drawing of the mechanical housing designed to hold the 1 inch magnet cubes.
Possible magnet designs are represented by the magnet design vector, M, containing magnet indicator values (0, 1, or 2) for each cube location. Here a value of 0 indicates a nonmagnetic spacer, 1 indicates a grade N42 magnet (Br = 1.32 T), and 2 indicates a grade N52 magnet (Br = 1.48 T). There are 888 possible locations for the magnets in the full model, therefore M contains 888 variables that may only have values of 0, 1, 2 (3888 possible designs).
B. Optimal Flux Density Map
The magnet design optimization method is applied to two brain MRI approaches. The first design targets the generation of a traditional homogeneous polarizing field, B0, envisioned for use in a traditional scanner employing switchable gradient coil encoding. For this application the average field should be maximized and the field variations (in parts-per-million) should be minimized. The second magnet design approach is aimed at utilizing the rotating Spatial Encoding Magnetic fields (rSEM) for image encoding [19]. In this case, the Halbach magnet needs to generate both the B0 field and an optimized SEM. The average flux density across the object will act as the B0 field and the built-in field variation will act as the SEM. The latter is modulated to encode images by rotating the magnet [19]. Another approach recently described by Bümler, combines two concentric Halbach cylinders, one with a dipole field configuration and the other with a quadratic field to create an approximately linear gradient [23]. When the two cylinders are rotated relative to each other the direction of the gradient also rotates, offering an alternative approach for the described rSEM method. In our built-in gradient approach, a simple linear SEM would be advantageous, but the SEM created by the traditional Halbach cylinder is restricted to limitations of the previously described “full geometric model”, and will inevitably contain non-linearities. SEMs which depart from linear SEMs make the resulting image resolution spatially non-uniform. This is the case in the intrinsic encoding field present in the previously described rotating Halbach magnet [19], as well as in the electromagnetic coil produced SEMs in PatLoc [19], O-space [24], Multi-dimensional Encoding [25], and 4D-RIO imaging [26]. When the SEM is not linear, the traditional k-space formalism no-longer applies, but “local k-space” trajectories can be calculated and the point-spread-function (PSF) can be simulated to describe the spatially varying resolution[21], [24], [26]–[29]. Since resolution is proportional to the local spatial slope of the SEM, the spatial resolution is particularly poor at locations with a null in the spatial derivative of the SEM, resulting in an “encoding hole”. In the rSEM method, when the encoding hole is aligned with the axis or rotation, there is a severe image artifact at the rotation axis. However, when the encoding hole is spatially shifted (e.g. with a linear field), the blurring is less severe, but still results in a coaxial smearing artifact. To avoid spatial extrema in the SEM, the target field pattern for the rSEM magnet will be monotonic in the encoding direction, ideally dominated by a 1st order field component.
In both magnet design cases (uniform field target and encoding target), the total range of the field variation in the ROI is limited by practical hardware considerations. A wide range of field variation translates to a wide bandwidth of resonance frequencies, typically requiring low RF coil quality factors (Q), and compromising coil efficiency. In addition to inefficient coils, the excitation must use short, high peak-power RF pulses if traditional RF excitation pulses are used. Low Q receive coils are also problematic, and special attention should be taken to increase the bandwidth of the coil without adding losses (e.g. with active feedback [30], [31]). Finally, high signal bandwidths translate to short encoding windows and high BW sampling, directly affecting the image SNR.
C. Optimization Procedure
The goal of the optimization procedure is to assign each of the 888 indices (cube locations) in the magnet design vector, M, one of the three possible values (0, 1, 2) such that the configuration optimizes the design metrics of the flux density in a 20cm diameter spherical volume (DSV) imaging region. This will require evaluating the design metrics repeatedly for each magnet design considered during the search. To do this efficiently, we first simulated the field contribution from each possible NdFeB cube location for each of the two magnet grades (values 1 or 2) using finite element analysis (FEA) with COMSOL Multiphysics (Stockholm, Sweden). This resulted in 2×888 field maps, each of which contained 887 cube locations which were not populated (value = 0) and one that was either a N42 of N52 magnet (value = 1 or 2). For each of these field maps, the x, y, and z component of the magnetic flux density was fit to 8th order spherical harmonics, and the 243 (3×81) corresponding coefficients were stored in memory. For the full model in Fig. 2a, 431.6k coefficients (3.3 MB) were stored to describe the field from the 888 possible magnet locations and the 2 possible magnet grades (N42 and N52). With these coefficients, the 3D field maps, B (x), (where x is the 3D position vector x = (x, y, z)) can be efficiently estimated from arbitrary magnet designs through a linear combination of the field contributions from the magnet pieces specified in M. We note that the use of superposition of the fields of individual magnet cubes neglects the potential magnetizing/demagnetizing effects of nearby magnet cubes. Although the construction of the 3D field map is a linear function of the integer decision variables, we are interested in non-linear metrics and constraints that correspond to a desirable/feasible design. Thus, we employ a stochastic search algorithm that is well suited for this non-linear integer programming problem. The Genetic Algorithm (GA) is a population-based, metaheuristic optimization procedure that uses the mechanics of natural selection to find a solution that minimizes a user-defined fitness function [32]–[34].
We used a MATLAB (Natick, MA) implementation of GA, which accepts integer constraints on the optimization variables. In the optimization process, the solver first generates an initial population of 100 individual magnet design vectors M randomly. Then, “Genetic Operators” are applied iteratively to compose subsequent generations until a stopping criterion is met. The “Selection” or “Reproduction” operator selects “Chromosomes” from the current population as parents for the next generation. Stochastic fitness proportional methods are often used for selection. In this work, we use a penalty function based method to incorporate constraint violations into the fitness function [35]. MATLAB uses this penalty function in a “tournament selection” to determine the parents of the next generation [36]. In this way, the next generation (children) are derived from only the fittest solutions (those with the lowest penalty term) in the previous generation (parents). After the tournament to determine those that can act as parents for future generations, the next generation of solutions (children) are produced in one of three ways: 1) 5% of the fittest parents are cloned and passed on to the next generation. 2) 75% of the children in the next generation are produced by a “Crossover Operator”, which combines vectors from pairs of parents; 3) 20% of individuals are generated with a “Mutation Operator”, which introduces small random changes to single parents. If the termination criteria in not met by this new population, the process is repeated iteratively. The algorithm terminates when the average relative change in the penalty value is less than a specified tolerance over 50 generations. Heuristic algorithms like GA are not guaranteed to find a globally optimum solution; therefore, we repeat the optimization procedure 100 times and select the best design from each run for later comparison.
To design a homogeneous Halbach magnet, symmetry in the design was asserted to more efficiently search through possible magnet designs. The magnet distribution is assumed to be symmetric across the XY and XZ plane. In addition, rows 4–7 were forced to be symmetric with rows 8–11. Intuitively, this symmetry should increase homogeneity, while decreasing the number of integer variables in the optimization from 888 to 203. For all indices of M, an integer constraint is specified, with an upper bound of 2 and lower bound of 0 (restricting entries to {0,1,2} to reflect the three types of magnetic material used). A minimum B0 non-linear constraint is enforced:
| (1) |
where the notation: ║B (xi)║2, denotes the l2 norm or magnetic field magnitude at location xi.
The fitness function is defined as the homogeneity parts-per-million (ppm) based on the full field range in the 20cm DSV:
| (2) |
To design the Halbach magnet with an optimized SEM, symmetry is again asserted to increase search efficiency, here across the XY plane but not the XZ plane. This forces a gradient to be in the Y direction. Again, magnet symmetry is assumed across the YZ plane, but only for the eight magnet rows about isocenter to encourage a homogeneous field in the X dimension. We use the same B0 non-linear constraint: Bmean > 70mT. The fitness function for achieving the optimized SEM is a combination of 2 factors: 1) The total field range in the 20 cm DSV and 2) the number of voxels with undesirable gradients; i.e. those with a zero or negative gradient:
| (3) |
where a is an empirically determined weighting term (∼109). This scheme rewards a monotonic encoding field, penalizing gradient nulls and encoding ambiguity that come from even-order field components.
D. Magnet Design Evaluation
The best designs from 100 runs of the GA were compared, and the flux density map characteristics were verified with full COMSOL simulations of the designs. For the homogeneous magnet design, the design with the lowest ppm value was chosen.
Choosing the final design for the rSEM magnet is less straight-forward. In this case, we must verify sufficient image encoding by ensuring that the encoding matrix is well-conditioned. Additionally, it is important that the range of fields is not too broad that the excitation bandwidth cannot cover it. Although our fitness function explicitly contained a penalty to the range of fields present in the object, this could be outweighed by the monotonicity term in the fitness function. Thus we eliminated solutions with a field range > 2.3 mT. In the remaining candidates, we simulated MRI imaging of a numerical Shepp-Logan phantom through rotational encoding. We simulated spin-echo data from 180 rotations of the magnet spaced 2° apart, and reconstruct the image using an iterative time domain conjugate gradient method [27], [37]. To test for robustness to calibration errors, we regenerated the imaging data with a 2 µT B0 error added to the field maps and reconstructed using the original field maps. The RMSE between these images and “ground truth” was used to choose the rSEM magnet design that provides sufficient image encoding and is robust to errors in the measured encoding fields. We also evaluated spatially varying point-spread functions of the final rSEM design by simulating images as described above with lines of point sources (without the B0 error). The sources were modeled as 0.5 mm points smoothed with a Gaussian filter and spaced 5 mm apart along half of the Y axis and half of the Z axis [22].
E. Construction
The chosen rSEM magnet design was constructed to validate the design and optimization procedure. The table, “Magnet population in constructed rSEM Halbach magnet” shows the full magnet distribution and is available for viewing as Supplementary Information. To construct the magnet array, first the full magnet former was assembled with waterjet-cut ABS rings that hold 1″ square fiberglass tubes, which are appropriately rotated for the dipole mode of a Halbach array. Each tube was then populated with magnet cubes using a pushing jig (the magnet cubes in each rung repel in this configuration). A copper shield was wrapped around the magnet to reduce RF interference. The 3D field of the constructed magnet was measured using a 3-axis Metrolab gaussmeter (Geneva, Switzerland) mounted to a 3-dimension robotic translation stage.
III. Results
A. Genetic algorithm design results
Figure 3a–b shows the best and mean penalty values for each generation in one example run of the Genetic Algorithm for the homogeneous magnet design (Fig. 3a) and rSEM design (Fig. 3b). Fig. 3c–d shows scatter plots of the resulting best designs (lowest penalty values) from 100 runs of GA. The average field is plotted on the vertical axis and the range of fields present in the target volume is plotted on the horizontal axis. The scatter plot for the homogeneous magnet target is shown in Fig. 3c, with the color of each dot indicating the homogeneity ppm in the 20 cm DSV, which is, of course, highly correlated with the range. Fig. 3d shows a similar plot for the rSEM target using the horizontal and vertical axes to represent two figures of merit and the color to represent the third figure of merit. In these plots, the color of the dots represents how monotonic the encoding field is (the number of voxels with gradient <=0.) In both scatter plots (Fig. 3c–d), designs closest to the upper left corner are desirable because they have high average field strengths and low field variation. Among these design solutions, the bluer dots are desirable for having either lower ppm (Fig. 3c) or more monotonic SEMs (Fig. 3d).
Fig. 3.

a–b) Convergence plot for the two design targets showing penalty values as a function of generation for one run of the genetic algorithm (GA). Both the mean and best penalty values are plotted for the multiple designs produced in each generation. For the homogeneous target design (a), the penalty value is the homogeneity parts per million (ppm) computed from the field range and average field in a 20cm DSV target volume. For the monotonic encoding field target field design (b), the penalty value is computed as a combination of 2 factors: 1) the frequency range over the 20 cm DSV target volume, and 2) the number of non-positive gradient points in the target volume. All designs were constrained to produce a mean field of at least 70 mT. c) Scatter plot of the best off-spring for 100 runs of GA for the homogeneous magnet design. The plot shows field range versus average field in target volume. The color represents the homogeneity ppm. d) Scatter plot of the best off-spring for 100 runs of GA for the monotonic encoding field target. The plot shows average field vs field range in the target volume. The color represents the percentage of non-positive gradient voxels in the volume. The encoding robustness of these 2 designs (Design A and B) are the ones simulated in Fig. 4.
Figure 4 compares image encoding robustness for 2 representative rSEM magnet designs from Fig. 3d. These 2 designs have similar homogeneity metrics, Design A: Bppm = 25, 870ppm, Design B: Bppm = 28, 716ppm. However, Design B has 2.9% non-positive gradient voxels in the 20 cm DSV while Design A has 5% (less monotonic). The RMSE in the simulated image is 13% higher in Design A without encoding matrix errors, and 128% higher when a 2 µT field map error is added to the simulation. When compared to all the resulting magnet designs with a field range < 2.3 mT (100 kHz Larmor freq.), Design B was found to be the most robust to errors in the encoding field calibration.
Fig. 4.

Simulation of rotational encoding with the two designs (A and B) identified in Fig. 3. A transverse field plot through the magnet isocenter is shown. Simulated image of the Shepp–Logan phantom generated with each design (middle). Simulated image resulting when a field error of 2 uT was used to generate the simulated data (right). This sort of error might occur from an imperfect calibration of the encoding field. Although design A and B have similar metrics, design B was found to be more robust to field mis-calibration.
Figure 5 shows the magnet material distributions of the chosen homogenous field target design (a) and monotonic field target (b). Grey cubes represent N42 grade magnets, blue cubes represent N52 grade magnets, and air spacers are empty. Figure 6 shows results from the 3D magnetic flux density simulations performed using COMSOL for these designs, as well as the complete “full geometric model” fully populated with N52 grade magnets for comparison (Fig. 6a). Although the average B0 field is different for these designs, the color axis is set to a 3 mT range for all the plots to directly compare the field variation in the 20 cm DSV. The fully populated design has a field variation 17.6 mT and Bmean = 127.5 mT (homogeneity = 137,870 ppm). The significant field variation of the fully populated model (Fig. 6a) makes this design ill-suited for both applications. The optimized homogeneous design has a field variation 1 mT and Bmean = 76.5 mT (homogeneity = 13,669 ppm). Thus, the optimized homogeneity is improved by a factor of 10.1. The optimized rSEM magnet design has a field variation 2.2 mT and Bmean = 81.1 mT (homogeneity = 27,377 ppm).
Fig. 5.

Chosen distribution for the 1″ cubes for the two magnet design goals. Grey cubes are N42 NdFeB magnets, blue cubes are N52 magnets and gaps may be populated with plastic spacers. a) Optimized design for the homogeneous field target and b) optimized design for the monotonic encoding field target, Design B of Fig. 4.
Fig. 6.

Magnetic flux density maps simulated with COMSOL Multiphysics for sparse Halbach cylinder designs. The 20 cm DSV target volume is illustrated with white dashed line. The color map range is restricted to 3 mT to better visualize the field inside the 20 cm DSV. a) Fully populated Halbach model (Fig. 2a) using N52 grade NdFeB magnet cubes. The field in the 20cm dia. DSV has Bave = 127.5 mT and range 137,870 ppm. b) Simulation of the result from the homogeneous field target optimization (Fig. 5a). In the 20cm DSV, average flux density is: Bave = 76.5mT and homogeneity is: ppm = 13,669. c) Simulation of the result from the monotonic encoding field target optimization (Fig. 5b). In the 20cm DSV, average flux density is: Bave = 81.1mT and homogeneity is 27,377 ppm.
B. Constructed RSEM magnet field pattern
Figure 7 shows the constructed Halbach magnet designed with a monotonic encoding field target. The total weight of the constructed magnet is 122 kg. Figure 8 shows the simulated and measured magnitude field maps for YZ plane slices (axial to the cylinder) along with 1D plots of the field at selected locations. For comparison, Figure 9 shows the same plots for the simulated homogeneous target field design (not constructed). The 2D plots (in Fig. 8 and 9) show a red circle, representing the outline of the 20 cm target DSV where it intersects the plane. The 3 lines in the 2D maps indicate the locations of the 1D field plots shown below. In the monotonic target field design (Fig. 8), the 1D plots emphasize the dominant 1st order component of the encoding field in the Y direction.
Fig. 7.

a) Magnet former under construction. White waterjet-cut ABS rings hold/align the 1″ square green fiberglass square tubes which hold the 1″ cubic magnets. Brass rods and cylindrical fiberglass spacers provide structural stability. b) Constructed rotating-SEM-optimized Halbach magnet array (without end cover) on magnet cart with motor-controlled rollers.
Fig. 8.

Simulated and measured field maps of the chosen monotonic target field Halbach magnet design. Color scale 2D magnitude field maps (YZ plane) at X locations (along the cylinder). Red circle shows outline of the 20 cm DSV target intersecting that slice. 1D plots of the field along the cut-lines shown overlaid on the 2D field map.
Fig. 9.

Simulated field maps of the homogeneous target field Halbach design. Color scale 2D magnitude field maps (YZ plane) at X locations (along the cylinder). Red circle shows outline of the 20 cm DSV target for that slice. 1D plots of the field along the cut-lines shown overlaid on the 2D field map.
Figure 10 shows the modeled PSFs for a line of point-sources when the field is used to rotationally encode (rSEM) a 2D image [22]. The PSF analysis is shown for both the simulated maps of the homogeneous target field design (Fig. 10b) and the measured field of the constructed monotonic field target design (Fig. 10c). The simulation object (Fig. 10a) is also shown overlaid on the encoding fields used for the simulation. Figure 10d–e shows the simulated 2D images with a 20 cm field of view (FOV) as well as zoomed-in 7 cm FOV images to emphasize the differences in image resolution near the center of the FOV. Figure 11a–b shows a 1D representation of the 2D simulation results in Figure 10. Figure 11c shows a comparison of the full-width at half-max (FWHM) of the PSFs. In these PSF simulations, it is clear that the image resolution in the center of the FOV is superior with the optimized SEM. The standard deviation of the PSF width in the optimized design is decreased by 95% compared to the simulated homogeneous target Halbach magnet.
Fig. 10.

a) The simulation object for evaluating the point-spread-functions contains two lines of 0.5mm point sources spaced 5mm apart. b–c) 2D field maps through isocenter (YZ plane) for the simulated homogeneous field target (b) and the constructed monotonic encoding field target (c) Halbach magnet. d–e) Simulated 2D images using the rotating encoding fields shown in (b) and (c).
Fig. 11.

a–b) Simulated 1D image of point sources spaced 5 mm apart (line cut through images in Fig. 10). a) Image simulated using measured SEM from constructed Halbach magnet designed with optimized monotonic encoding field. b) Image simulated using the simulated field from the chosen homogeneous target Halbach design (not constructed). c) Full-width at half-max (FWHM) measurements of the point-spread-functions are shown as a function of distance from center of FOV.
A limitation of this optimization framework is that the magnet geometry must be chosen a priori, and only population of the potential locations with three different types of material is evaluated by the algorithm. This could easily be expanded to include more types of magnets (an increased range of the values in M). Alternatively, additional parameters could be added to the optimization relating to the position, rotation angle, and size of permanent magnet material. However, this would require the addition of several variables and constraints to the optimization. This might significantly increase computation time and increase the probability of convergence to local minimums of the penalty functions. In general, we have empirically found that reducing the number of variables (for example by asserting symmetry in the magnet) increased the overall quality of the results.
This design framework is not limited to a sparse rectangular rung design. For some applications, a denser Halbach magnet may be desired as it results in a higher average field when compared to the sparse design. For example, Halbach cylinders are often segmented into trapezoidal or “keystone” shaped magnet pieces that are directly abutting. Much like the current implementation, this geometrical design can be broken down into rows and angle and populated with different magnet grades or spacers.
There are some practical aspects of the magnet that are not taken into account in the magnet array model. For example, the cubic NdFeB elements in the array create magnetic fields which could demagnetize neighboring elements. This effect is not represented in the field superposition method used for evaluating magnet distribution in our optimization. Luckily, when using a sparse design these demagnetization effects are minimal due to the angular gaps between magnet rungs. However, with dense Halbach designs, the demagnetizing effect is significant and should be taken into account in the design procedure [38]. We note that the final simulations of the design were performed in the COMSOL FEA simulation environment which does consider these effects.
Another practical design concern is fabrication-based variations in the physical dimensions and flux density distribution of the NdFeB pieces. Although the current optimization procedure does not consider variation in these parameters, there may be magnet designs that are more robust to such uncontrolled variations. Methods for robust multi-objective implementations of the Genetic Algorithm have been proposed, and could potentially be adapted to these design problems to find magnet designs that are a good trade-off between performance and robustness to magnet variations [39]. Alternatively, quality control can be increased when selecting the magnetic material.
Temporal stability of the magnetic field is also an important consideration for MRI applications but was not directly considered in our design procedure. MRI applications can generally avoid non-reversible magnetization changes, which occur at very high temperature (> 80°C for N48 magnets). However, NdFeB magnets have large negative temperature coefficient (−1000 to −1200 ppm/°C), which characterizes reversible changes in the residual magnetization with fluctuations in room temperature [1], [40]. There are other magnet designs and types of permanent magnet material that are less affected by temperature fluctuation. For example, SmCo magnets have a temperature coefficient of −300 to −450 ppm/°C, but have an increased component cost and lower remnant flux density compared to NdFeB material. A magnet design was recently proposed that combines oppositely oriented NdFeB and SmCo Halbach units in a configuration that cancels the temperature coefficient [41]. This leads to a highly stable, temperature compensated magnet assembly (−10 ppm/°C) at the cost of a reduced average field from field cancellation of the oppositely orientated Halbach units. This general approach could be incorporated into our optimization framework by including oppositely oriented SmCo material as an option in the M vector indices. However, our current approach for controlling the temporal instability uses NMR probes to track these effects. We then address the temporal drift by directly including the measured field changes in the generalized image reconstruction framework [19]. Thus, we did not attempt to include a temperature drift parameter in the penalty function. This type of approach has also been applied to very high resolution (up to 20 µm) imaging with NdFeB based MRI systems using traditional MRI encoding and reconstruction employing NMR lock sequences and styrofoam insulation [40].
IV. Discussion
This design framework allows for the flexible design of permanent magnet arrays for various applications. Although the fitness functions and constraints are straightforward for the homogenous magnet design, several optimizations parameters were tested for the rSEM optimized magnet design. The ideal fitness function for rSEM magnet would directly evaluate the encoding capabilities of the magnet. Candidates for inclusion in the fitness function include the RMSE of images simulated with the encoding field or the encoding matrix [19] condition number. Practically, these fitness variables are difficult to evaluate with sufficient speed. For standard rSEM imaging parameters, full encoding matrix size is on the order of 65k × 370k, and computation of the matrix condition number or a full image simulation is computationally time-consuming (> 1 minute). In a typical run of our implementation of GA, the fitness may be evaluated up to 20,000 times. If computing the fitness function required 1 minute, the 100 runs of GA we perform would take almost 4 years. In contrast, the currently implemented fitness function requires only 6 ms to evaluate and the 100 runs of the GA we report here required about 3hrs to complete. Of course, the indirect metric for image encoding does not fully reflect the encoding robustness of a proposed design. Therefore, we included additional imaging simulations of several top candidates to select a final design.
V. Conclusion
We present a method for designing sparse Halbach magnets for a given target field using the Genetic Algorithm and finite element simulations and demonstrate the design process using two example designs for MRI human brain imaging applications. This design framework uses a fixed geometry that fits around an adult head and does not extend past the shoulders. Ample space is allowed for necessary RF coils. The designs were evaluated using constraints and fitness functions evaluated in a 20 cm DSV, which represents the brain volume. The homogeneous target design resulted in a simulated homogeneity of 13,670 ppm in a 20cm DSV compared to 137,900 ppm in the fully populated magnet. The rSEM target design was optimized to have a built-in monotonic encoding field (97.1% of voxels with gradient > 0) while maintaining a reasonable total field variation (∼ 2.2 mT) in the 20cm DSV. Point-spread-function simulations using the measured magnetic field show that the resolution uniformity in the 20cm field of view improved by ∼95% compared to the homogeneous design. The next step will entail performing 2D phantom MRI experiments with the constructed rSEM magnet. In order to extend to 3D for human imaging, encoding along the X dimension will be performed either with Transmit Array Spatial Encoding (TRASE) [42], [43] or with phase encoding with a 1D gradient coil, which has been previously demonstrated in highly inhomogeneous fields [44].
Supplementary Material
Acknowledgments
The authors thank Bastien Guerin for assistance with image reconstruction and Matthew Rosen, Christopher Vaughan, Joshua Park, Chenoa Schatzki-McClain and Simon Sigalovsky for assistance with magnet design and construction. Research reported in this paper was supported by the National Institute of Biomedical Imaging and Bioengineering (NIBIB) of the National Institutes of Health under award number R01EB018976 and K99EB021349. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.
References
- 1.Miyamoto T, Sakurai H, Takabayashi H, Aoki M. A development of a permanent magnet assembly for MRI devices using Nd-Fe-B material. IEEE Trans Magn. 1989 Sep;25(5):3907–3909. [Google Scholar]
- 2.Sagawa M, Fujimura S, Togawa N, Yamamoto H, Matsuura Y. New material for permanent magnets on a base of Nd and Fe (invited) J Appl Phys. 1984;55:2083–2087. [Google Scholar]
- 3.Klein H-M. Clinical Low Field Strength Magnetic Resonance Imaging: A Practical Guide to Accessible MRI. Cham, Switzerland: Springer; 2015. [Google Scholar]
- 4.Halbach K. Design of permanent multipole magnets with oriented rare earth cobalt material. Nucl Instrum Methods. 1980;169(1):1–10. [Google Scholar]
- 5.Halbach K. Physical and optical properties of rare earth cobalt magnets. Nucl Instrum Methods Phys Res. 1981 Aug;187(1):109–117. [Google Scholar]
- 6.Blümler P, Casanova F. Mobile NMR and MRI: Developments and Applications. Royal Society of Chemistry; Cambridge, UK: 2015. Hardware developments: Halbach magnet arrays; pp. 133–157. [Google Scholar]
- 7.Li C, Devine M. Efficiency of permanent magnet assemblies for MRI devices. IEEE Trans Magn. 2005 Oct;41(10):3835–3837. [Google Scholar]
- 8.Atallah K, Howe D. The application of Halbach cylinders to brushless AC servo motors. IEEE Trans Magn. 1998 Jul;34(4):2060–2062. [Google Scholar]
- 9.Zhu ZQ, Xia ZP, Atallah K, Jewell GW, Howe D. Powder alignment system for anisotropic bonded NdFeB Halbach cylinders. IEEE Trans Magn. 2000 Sep;36(5):3349–3352. [Google Scholar]
- 10.Xia ZP, Zhu ZQ, Howe D. Analytical magnetic field analysis of Halbach magnetized permanent-magnet machines. IEEE Trans Magn. 2004 Jul;40(4):1864–1872. [Google Scholar]
- 11.Marinescu M, Marinescu N. New concept of permanent magnet excitation for electrical machines: analytical and numerical computation. IEEE Trans Magn. 1992 Mar;28(2):1390–1393. [Google Scholar]
- 12.Moresi G, Magin R. Miniature permanent magnet for table-top NMR. Concepts Magn Reson Part B Magn Reson Eng. 2003 Jan;19B(1):35–43. [Google Scholar]
- 13.Raich H, Blümler P. Design and construction of a dipolar Halbach array with a homogeneous field from identical bar magnets: NMR Mandhalas. Concept Magn Reson Part B. 2004;23B(1):16–25. [Google Scholar]
- 14.Danieli E, Mauler J, Perlo J, Blümich B, Casanova F. Mobile sensor for high resolution NMR spectroscopy and imaging. J Magn Reson. 2009 May;198(1):80–87. doi: 10.1016/j.jmr.2009.01.022. [DOI] [PubMed] [Google Scholar]
- 15.Soltner H, Blümler P. Dipolar Halbach magnet stacks made from identically shaped permanent magnets for magnetic resonance. Concepts Magn Reson Part A. 2010 Jul;36A(4):211–222. [Google Scholar]
- 16.Windt C, Soltner H, van Dusschoten D, Blumler P. A portable Halbach magnet that can be opened and closed without force: The NMR-CUFF. J Magn Reson. 2011 Jan;208(1):27–33. doi: 10.1016/j.jmr.2010.09.020. [DOI] [PubMed] [Google Scholar]
- 17.Cooley CZ, et al. Two-dimensional imaging in a lightweight portable MRI scanner without gradient coils. Magn Reson Med. 2015 Feb;73(no. 2):872–883. doi: 10.1002/mrm.25147. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Zhang B, Hatch GP. Field Analysis and Comparison of Several Permanent Magnet Dipole Structures. IEEE Trans Magn. 2009 Oct;45(10):4395–4398. [Google Scholar]
- 19.Hennig J, et al. Parallel imaging in non-bijective, curvilinear magnetic field gradients: a concept study. Magn Reson Mater Phy. 2008;21(1–2):5–14. doi: 10.1007/s10334-008-0105-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Gallichan D, et al. Simultaneously driven linear and nonlinear spatial encoding fields in MRI. Magn Reson Med Off J Soc Magn Reson Med Soc Magn Reson Med. 2011 Mar;65(3):702–714. doi: 10.1002/mrm.22672. [DOI] [PubMed] [Google Scholar]
- 21.Stockmann JP, Ciris PA, Galiana G, Tam L, Constable RT. O-space imaging: Highly efficient parallel imaging using second-order nonlinear fields as encoding gradients with no phase encoding. Magn Reson Med. 2010;64(2):447–456. doi: 10.1002/mrm.22425. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Cooley CZ, Stockmann JP, Armstrong BD, Sarracanie M, Rosen MS, Wald LL. Spatial resolution in rotating Spatial Encoding Magnetic field MRI (rSEM-MRI) Proc 22nd Annu Meet ISMRM Milan 2014. 2014:0033. [Google Scholar]
- 23.Blümler P. Proposal for a permanent magnet system with a constant gradient mechanically adjustable in direction and strength. Concepts Magn Reson Part B Magn Reson Eng. 2016 Feb;46(1):41–48. [Google Scholar]
- 24.Stockmann JP, Galiana G, Tam L, Juchem C, Nixon TW, Constable RT. In vivo O-Space imaging with a dedicated 12 cm Z2 insert coil on a human 3T scanner using phase map calibration. Magn Reson Med. 2013;69(2):444–455. doi: 10.1002/mrm.24282. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Lin F-H. Multidimensionally encoded magnetic resonance imaging. Magn Reson Med. 2013 Jul;70(1):86–96. doi: 10.1002/mrm.24443. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Gallichan D, et al. Practical considerations for in vivo MRI with higher dimensional spatial encoding. Magma N Y N. 2012 Dec;25(6):419–431. doi: 10.1007/s10334-012-0314-y. [DOI] [PubMed] [Google Scholar]
- 27.Lin FH, et al. Reconstruction of MRI data encoded by multiple nonbijective curvilinear magnetic fields. Magn Reson Med. 2012 Oct;68(4):1145–1156. doi: 10.1002/mrm.24115. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Layton KJ, et al. Single shot trajectory design for region-specific imaging using linear and nonlinear magnetic encoding fields. Magn Reson Med Off J Soc Magn Reson Med Soc Magn Reson Med. 2012 Oct; doi: 10.1002/mrm.24494. [DOI] [PubMed] [Google Scholar]
- 29.Layton Kj, Morelande M, Farrell Pm, Moran B, Johnston La. Performance Analysis for Magnetic Resonance Imaging With Nonlinear Encoding Fields. IEEE Trans Med Imaging. 2012 Feb;31(2):391–404. doi: 10.1109/TMI.2011.2169969. [DOI] [PubMed] [Google Scholar]
- 30.Baudin E, Safiullin K, Morgan SW, Nacher P-J. An active feedback scheme for low field NMR experiments. J Phys Conf Ser. 2011;294(1):012009. [Google Scholar]
- 31.Hoult DI. Fast recovery, high sensitivity NMR probe and preamplifier for low frequencies. Rev Sci Instrum. 1979 Feb;50(2):193–200. doi: 10.1063/1.1135786. [DOI] [PubMed] [Google Scholar]
- 32.Holland JH. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control and Artificial Intelligence. Cambridge, MA, USA: MIT Press; 1992. [Google Scholar]
- 33.Deb K. Optimization for Engineering Design: Algorithms and Examples. 2nd ed. New Delhi, India: PHI; 2013. [Google Scholar]
- 34.Blum C, Roli A. Metaheuristics in Combinatorial Optimization: Overview and Conceptual Comparison. ACM Comput Surv. 2003 Sep;35(3):268–308. [Google Scholar]
- 35.Deb K. An efficient constraint handling method for genetic algorithms. Comput Methods Appl Mech Eng. 2000 Jun;186(2–4):311–338. [Google Scholar]
- 36.Mixed Integer Optimization - MATLAB & Simulink. Available: https://www.mathworks.com/help/gads/mixed-integer-optimization.html.
- 37.Schultz G, Ullmann P, Lehr H, Welz AM, Hennig J, Zaitsev M. Reconstruction of MRI data encoded with arbitrarily shaped, curvilinear, nonbijective magnetic fields. Magn Reson Med. 2010 Nov;64(5):1390–1403. doi: 10.1002/mrm.22393. [DOI] [PubMed] [Google Scholar]
- 38.Galea M, Papini L, Zhang H, Gerada C, Hamiti T. Demagnetization Analysis for Halbach Array Configurations in Electrical Machines. IEEE Trans Magn. 2015 Sep;51(9):1–9. [Google Scholar]
- 39.Li M, Azarm S, Aute V. A Multi-objective Genetic Algorithm for Robust Design Optimization; Proceedings of the 7th Annual Conference on Genetic and Evolutionary Computation; New York, NY, USA. 2005. pp. 771–778. [Google Scholar]
- 40.Kose K, Haishi T. High resolution NMR imaging using a high field yokeless permanent magnet. Magn Reson Med Sci. 2011;10:159–167. doi: 10.2463/mrms.10.159. [DOI] [PubMed] [Google Scholar]
- 41.Danieli E, Perlo J, Blümich B, Casanova F. Highly stable and finely tuned magnetic fields generated by permanent magnet assemblies. Phys Rev Lett. 2013;110(18):180801. doi: 10.1103/PhysRevLett.110.180801. [DOI] [PubMed] [Google Scholar]
- 42.Sharp JC, King SB. MRI using radiofrequency magnetic field phase gradients. Magn Reson Med. 2010;63(1):151–161. doi: 10.1002/mrm.22188. [DOI] [PubMed] [Google Scholar]
- 43.Stockmann JP, Cooley CZ, Guerin B, Rosen MS, Wald LL. Transmit Array Spatial Encoding (TRASE) using broadband WURST pulses for RF spatial encoding in inhomogeneous B0 fields. J Magn Reson. 2016 Jul;268:36–48. doi: 10.1016/j.jmr.2016.04.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44.Prado PJ, Blümich B, Schmitz U. One-Dimensional Imaging with a Palm-Size Probe. J Magn Reson. 2000 Jun;144(2):200–206. doi: 10.1006/jmre.2000.2038. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
