We present a design for producing precisely adjustable and alternating single-axis magnetic fields based on nested Halbach dipole pairs consisting of permanent magnets only. Our design allows for three dimensional optical and mechanical access to a region with strong adjustable dipolar fields, is compatible with systems operating under vacuum, and does not effectively dissipate heat under normal operational conditions. We present a theoretical analysis of the properties and capabilities of our design and construct a proof-of-concept prototype. Using our prototype, we demonstrate fields of up to several kilogauss with field homogeneities of better than 5%, which are harmonically modulated at frequencies of ∼1 Hz with a power consumption of approximately 1.2 W. Moreover, we discuss how our design can be modified to generate adjustable quadrupolar magnetic fields with gradients as large as 95 kG/m in a region of optical and mechanical access. Our design is scalable and can be constructed to be suitable not only for table-top experiments, as in the case of polarimetric and magnetometric setups that require strong alternating magnetic fields, but also for large scale applications such as generators.

## I. INTRODUCTION

Special arrangements of magnetic structures that increase the magnetic flux on one side of the arrangement while reducing, or even canceling, it on the opposite side were first theoretically proposed by Mallinson^{1} but later realized by Halbach,^{2–4} who constructed yokeless arrangements of permanent multipole magnets. Nowadays, these arrangements are known as Halbach arrays.

Halbach arrays allow for the generation of strong and homogeneous magnetic fields in dipole, quadrupole, or even higher-order multipole configurations. Furthermore, these magnetic fields are the strongest possible per mass of permanent magnet material. Halbach arrays are used in a wide range of applications in science research,^{5} e.g., particle accelerators,^{3} nuclear magnetic resonance,^{6–8} drug targeting,^{9–11} but most importantly in the industrial sector, such as in the cases of brushless motors,^{12} magnetic gears,^{13} magnetic refrigeration,^{14} and magnetically levitating trains,^{15} and most notably in “kitchen-refrigerator” and pin-board magnets.

Recent developments in polarimetry^{16,17} and magnetometry^{18–20} require the use of strong and adjustable, or alternating, magnetic fields, but the ability to maintain three-dimensional (3D) optical and mechanical access in these applications is, in most cases, critical. A typical solution is to use electromagnets, but their usage can be undesirable due to power-supply-related noise^{16–20} or untenable due to power-availability constraints. Moreover, in the case of high-field generation using electromagnets, active cooling typically becomes necessary, introducing additional mechanical noise into the system.^{19} Other modalities have been proposed, such as in the case of Cugat and co-workers,^{9} who demonstrated a system of four rotatable transversely magnetized permanent-magnet rods that can be used to generate variable magnetic fields or field gradients. However, in this case, the field homogeneities are relatively poor, but most importantly, the magnetic fields outside the system are not zero, contrary to Halbach-based systems. Leupold *et al.*^{21} presented the idea of nested, concentric, and rotatable Halbach cylinders for the generation of strong adjustable, homogeneous magnetic fields using permanent magnets, circumventing major issues associated with the use of electromagnets. However, these and similar presented systems do not combine the ability to create strong homogeneous AC magnetic fields in areas with 3D optical and mechanical access.

In this article, we present a design based on concentrically nested Halbach dipole pairs, axially separated by an appropriate distance. This particular arrangement allows for the production of strong single-axis adjustable and alternating magnetic fields at the central plane of the structure while enabling 3D optical and mechanical access to a region of a homogeneous magnetic field.

We first describe the principles of operation of our design using a theoretical analysis. Then, we present a proof-of-concept prototype along with magnetic field measurements obtained with it, demonstrating the capabilities of our system. Finally, we discuss the ability to create quadrupolar magnetic fields using our design and present simulations for the attainable magnetic field gradients. Our primary motivation is the employment of the proposed system in cavity-enhanced polarimetry,^{16,17} where the generation of adjustable and reversible circular birefringent effects (e.g., Faraday rotation) is typically required. We also discuss the flexibility of our device and several possible applications that potentially benefit from it.

## II. THEORY OF OPERATION

### A. Ideal Halbach dipoles: Single and nested

Here, we focus on cylindrical Halbach arrays that generate homogeneous dipolar fields, i.e., Halbach dipoles, as shown in Fig. 1. An ideal Halbach dipole, represented as an infinitely long tube with continuously rotating magnetization inside the material of the wall, produces a homogeneous magnetic field within a cross-sectional plane of strength $Bouter=Brem\u22c5lnr1/r2$, where **B**_{rem} is the remanence of the permanent magnetic material, and *r*_{1} and *r*_{2} are the outer and inner radii of the tube, respectively [see Fig. 1(a)].^{3}

Let us now assume a configuration of two concentric, *nested*, Halbach dipoles, as shown in Fig. 1(b). In this case, the inner dipole now produces a homogeneous magnetic field of strength $Binner=Brem\u22c5lnr3/r4$. If this inner dipole has an inner and an outer radius of

respectively, then |**B**_{outer}| = |**B**_{inner}|. Since the resulting field in the center of the dipole pair is given by the vector addition of **B**_{outer} and **B**_{inner}, i.e., **B**_{tot} = **B**_{outer} + **B**_{inner}, it becomes apparent that for this specific geometry, appropriately equal and opposite rotations of the two nested dipoles yield any desired field in the range of $\xb1|B|totmax.$ along one axis of the system, as schematically depicted in Fig. 2. Such arrangements of nested Halbach dipoles allow for great versatility in choice of operating alternating frequency as well as in field tuning.^{7,21} While this design allows for single-axis variable magnetic fields, it does not allow for flexible 3D optical and mechanical access.

### B. Discretized Halbach dipole

To translate the idea of nested Halbach dipoles in a realistic design, we need to modify the ideal model presented above since an infinitely long tube of continuously changing magnetized material is impossible to realize. Various discrete versions of the ideal case have been suggested to approximate it,^{7} with the most straightforward discretization being the division of the cylindrical structure into segments of identical shape and magnetization but with different magnetization directions.^{22,23}

In this work, we choose to focus on cylindrical arrays of square-shaped permanent magnets as the discrete equivalent of ideal Halbach dipoles, similar to the ones depicted in Fig. 1(c) (representing a single Halbach dipole) and Fig. 1(d) (representing nested Halbach dipoles). For the single discretized Halbach dipole [Fig. 1(c)], we can estimate the resulting magnetic field within and outside its magnetization plane (namely, the x-y plane; see Fig. 2). The simplest approach is to model the cylindrical array of the *N* square-shaped permanent magnets as an array of *N* point-dipoles. In this case, the resultant magnetic field **B**_{array}, at a particular point in space with radius vector **R**, is the vector sum of the magnetic field **B**_{i} of each of the *N* dipoles at positions *r*_{i},^{24}

By using this approximation, we can estimate the strength of the magnetic field of the discretized Halbach dipole along its x-axis as a function of the distance from its central plane (i.e., along the z-axis, Fig. 2) as follows:^{24}

where *μ*_{0} = 4*π* · 10^{−7} T m/A is the permeability of vacuum, *m* is the magnetic dipole moment of a single dipole (we assume here that each dipole, representing each magnet, has the same magnetic dipole moment), *r* is the effective radius of the array of the point dipoles, and *z* is the distance from the array’s x-y plane.

By appropriately choosing the characteristics, dimensions, and orientation of the two arrays comprising a nested Halbach dipole, we can carefully tune the strength and homogeneity of the dipolar field inside and outside the plane of the nested dipoles. It is this property that we exploit for the creation of a device that allows for adjustable, homogeneous, magnetic fields within a region of 3D optical and mechanical access, by using concentrically nested Halbach dipole pairs, axially separated by an appropriate distance.

## III. PROOF-OF-CONCEPT DESIGN

### A. Nested Halbach dipole pairs

For a prototype device that integrates the above discussed concepts and is appropriate for our applications, we use two identical pairs of nested Halbach cylindrical arrays, shown in Fig. 3. Note that we choose the dimensions of the cylindrical structures to be in accordance with the design criteria imposed by Eq. (1).

Each cylindrical array consists of 12 magnets, and we use polyoxymethylene (POM) as a material for the cylindrical support structures to encase the magnets. We use cuboid-shaped neodymium (Nd_{2}Fe_{14}B) permanent magnets (N50 alloy; B_{rem} ≈ 14 kG) of two different sizes: 6 × 6 × 6 mm^{3} for the inner arrays and 12 × 12 × 6 mm^{3} for the outer arrays. The thickness of the plastic housings is chosen to be equal to the height of the magnets (i.e., 6 mm). We characterize the magnets separately and find their magnetization to vary no more than ∼5%. We note here that great care is required when assembling systems consisting of strong permanent magnets as contact can strongly influence their magnetic properties.

Our goal is to obtain strong, homogeneous, magnetic fields along one axis of the system (x-axis; Fig. 3) in an area with an optical and mechanical axis (with its geometrical center marked by a cross in Fig. 3), which can be adjustable and reversible, while minimizing the strength of the magnetic field along the other axes. For this reason, we start by measuring the magnetic field strengths of the built arrays along the x-axis as a function of displacement from their central planes (i.e., along the z-axis; Fig. 3). In Fig. 4, we present our measurements which we analyze using Eq. (3), yielding the effective magnetic moments for the large and small magnets to be 0.161(1) A m^{2} and 0.721(7) A m^{2}, respectively, and their radial position around the arrays to be located at *r* = 14.1(1) mm and *r* = 27.8(1) mm, respectively. These results are consistent with the parameters and geometry of our design.

Most importantly, we see that there exists a position outside the arrays (along the z-axis), where the strengths of the B_{x} magnetic field component produced by the large and small cylindrical arrays are equal. Therefore, as the nested dipoles are rotated in opposite directions, we expect that at this intersection point the B_{x} magnetic field component will cancel when the angle between the nested arrays is 90° and completely reverse for 180° (Fig. 2). It is at this position that the nested dipole Halbach pair configuration allows for single-axis variable magnetic fields with 3D optical and mechanical access. Moreover, this intersection point indicates that the gap *h* (Fig. 3), between the axially separated nested arrays, must be approximately equal to twice this intersection distance. For the built arrays we use in our prototype device, the separation between them should be, therefore, set to *h* ≃ 16–18 mm. We note here that the introduction of an additional offset between the central planes of the small (inner) and large (outer) nested arrays (see Fig. 3) allows us to further tune the intersection point and, as a consequence, the strength of the total magnetic field strength at that point. This offset adds an extra degree of freedom in the design parameters of our proposed system.

To decide on the final design parameters for our prototype device, we use the geometric characteristics of our built arrays (Fig. 3) and the results shown in Fig. 4 to theoretically estimate the attainable magnetic field strength and homogeneity for possible configurations of our device in the area between the axially separated nested dipole pairs. In particular, as a measure of the maximally attainable magnetic field homogeneity in a given geometry, we use the following parameter:

where *α* is the angle between the nested arrays (Fig. 2), |B_{x}(0, 0, 0, 0)| is the absolute value of B_{x} on the x-axis at the center of the Halbach array system for *α* = 0° (equal to the case of *α* = 180°), B_{yz}(*α*, *x*, *y*, *z*) is the projection of the magnetic-density flux vector on the yz-plane at a point with coordinates {*x*, *y*, *z*}, and *S* is the volume around the {*x*, *y*, *z*} point within which we estimate the *P*_{α} parameter. We use three different approaches to calculate the magnetic field strengths and their homogeneity—as characterized by the *P*_{α}(*x*, *y*, *z*) parameter—for a given design geometry of the proposed nested Halbach-pair device: we use (a) a dipole model, where each permanent magnet in the arrays is modeled as an ideal magnetic dipole; (b) an analytical model that uses analytical expressions for the magnetic field of a cuboid-shaped permanent magnet following the work of Ref. 25; and (c) a COMSOL-based finite element method that uses as inputs the geometry of our design and the measured magnetic moments of our magnets.

In Fig. 5, we show the dependence of the *P*_{α}(*x*, *y*, *z*) parameter on the distance between the central planes of the Halbach arrays for two extreme orientations, parallel (*α* = 0°) and perpendicular (*α* = 90°), and for different offset parameters. In particular, we estimate the value of the *P*_{α}(*x*, *y*, *z*) parameter within a sphere (*S*) of a given diameter centered around the geometrical center of the structure, estimating thus the homogeneity within a given volume for the structures shown in Fig. 3. We see that, for *α* = 0°, the magnetic field homogeneity is better than 5% within a sphere of ≈8 mm in diameter and for dipole separation gaps in the range of *h* ≈ 10–20 mm. Moreover, for *α* = 90°, we see that similar homogeneities are attainable, suggesting that for carefully selected gaps we can achieve overall field homogeneities of better than 5% while the system is rotating. We perform the same calculations assuming an additional offset (Fig. 3). We see that by adjusting this offset, we can tune the optimum gap distance for the system without affecting its field homogeneity, ensuring thus that one can add a small offset in the final design to allow for an increase in the maximum attainable magnetic field without significantly affecting its overall performance. Additionally, in Fig. 6, we show the exact shape of the volume within which two conditions are satisfied simultaneously: (a) *P*_{α}(*x*, *y*, *z*) is less than 5% for any angle *α* and (b) the strength of B_{x} does not vary more than 5% for *α* = 0°. For these calculations, we use a gap of *h* = 17 mm. This volume and its predicted homogeneity are sufficient for our polarimetric and magnetometric applications, but further adjustment is possible for suitability in other applications. In Sec. III B, we present a proof-of-concept prototype device, and, for its construction, we use the presented numerical simulations as our guide.

### B. Instrument design

In Fig. 7, we present a rendering and a schematic cross-sectional side view of our assembled prototype device. The inner and outer Halbach cylindrical arrays [with dimensions and characteristics as presented in Fig. 3 and annotated as (h) and (i) in Fig. 7] are screwed on a rotating system which consists of a hollow stainless-steel-based hub assembly [(a) and (b)], constrained axially and radially by angular ball and thrust roller bearings [(d)–(e)]. This hollow hub assembly allows for the insertion of, for example, optomechanical mounts, enabling the positioning of optics within the region of strong, homogeneous magnetic fields. The hub assembly together with the bearings are pressed and held in position by pulleys (c) on a stainless-steel plate. An external thread on the hub assembly (a) also enables the use of a locking mechanism, e.g., a locking nut (external thread not shown in Fig. 7). The same mechanism is mirrored to host and control the rotation of the opposite nested Halbach dipole pair and is held in position by the overall stainless steel body of the device. Finally, a system of timing belts (f) and gears (g) allows for the synchronized counter-rotation of the inner (h) and outer (i) Halbach arrays. The whole system can be driven using the gear shafts (j), manually and/or electrically by an external motor. This prototype design is adaptable to produce strong magnetic fields in any direction in a horizontal plane and is suitable for operation under vacuum. We wish to emphasize that the use of stainless steel in our prototype is chosen for reasons of robustness and it can affect the magnetic properties of the design, but other materials can be used without obvious shortcomings.

The presented design is scalable, but for suitability to our experimental plans, and in accordance with our simulations, we have chosen a gap of *h* ≃ 17 mm and an offset of +2 mm for our prototype device.

## IV. EXPERIMENTAL MEASUREMENTS

### A. Adjustable dipole magnetic fields

In Fig. 8, we present measurements of the magnetic field generated at the geometrical center of our prototype design (marked by a cross; Fig. 7). For our measurements, we use a transverse and an axial Hall probe magnetometer (HIRST Magnetic Instruments GM08 magnetometer) with a <1 mm sensor size. We see that with our prototype system, we can obtain fields as strong as ∼1.6 kG at the geometrical center, where we have 3D optical and mechanical access. We observe that any remnant field strengths along the other two axes (y and z) to be less than 4% of the maximum attainable field strength along the x-axis. Moreover, with the use of a stepping motor (Sanyo Denki 103H7123), we are able to continuously rotate our system at a rate of ∼1 Hz (in this case, we are limited by our stepping motor’s holding torque, which is frequency dependent). For this rotational frequency, and for a torque required to rotate the system of approximately 0.2 N m (see the Appendix), we estimate the power consumption for generating this alternating field to be ∼1.2 W. We also perform a harmonic fit of our measurements and verify that our system has a stable and harmonic behavior. Most critically, we observe that the remnant fields are out of phase with respect to the magnetic field along the x-axis, which suggests that by finely adjusting the geometry parameters of our design, we can tune the off-axis fields to be completely out of phase with the field along the x-axis. Finally, we note here that, if an anharmonic magnetic-field oscillation is desirable, it can be achieved by simply modulating the speed of the driving motor.

### B. Adjustable quadrupole magnetic fields

An additional feature of our design is the ability to generate homogeneous magnetic fields of multipole configurations. In particular, quadrupole magnetic fields can be generated inside single Halbach cylinders with quadrupolar magnetization distributions,^{26} but these cannot be adjusted and single arrays do not allow for 3D optical and mechanical access.

Using our design and by oppositely aligning the axially separated nested Halbach pairs, as schematically presented in Fig. 9(a), we can create an adjustable quadrupolar magnetic field along the x-z plane. In particular, in Fig. 9(b), we present a vector field map of the quadrupole magnetic field attainable using our design, and in Fig. 9(c), we present the attainable magnetic field gradient. For these simulations, we choose a gap *h* (Fig. 3) equal to 30 mm for which we obtain a permanent quadrupolar field along the x-z plane for any angle *α*. Moreover, we see that we can obtain magnetic field gradients ($\u2009\u2009dBx/dz$) of up to 95 kG/m, and by adjusting the relative orientation of the axially spaced nested Halbach pairs, we can adjust this gradient, a unique feature of our design. The presented configuration could be used in fields where linear magnetic gradients are required, e.g., nuclear magnetic resonance imaging,^{26} ion-beam focusing,^{27} and spin-polarized atom trapping.^{28} Detailed investigations of generation of quadrupolar fields using our design will be part of future work.

## V. CONCLUSIONS

In conclusion, we present a design for producing variable single-axis magnetic fields based on nested Halbach dipole pairs consisting of permanent magnets. We provide the design parameters for a prototype device with moderate dimensions that allow for 3D optical and mechanical access to a region with an adjustable field of up to several kilogauss and with field homogeneities of better than 5%. Our device is compatible with systems operating under vacuum and does not effectively dissipate heat under normal operational conditions. Moreover, using our prototype, we demonstrate harmonic generation of ∼1.6 kG strong magnetic fields at a frequency of ∼1 Hz, with an estimated power consumption of ∼1.2 W. We finally discuss the ability to create adjustable quadruple magnetic fields, making our design appropriate for other applications such as utility in linear accelerators and in magnetic particle trapping applications.

While the design parameters of our prototype device were selected to be suitable for table-top scientific experiments such as highly sensitive polarimeters and magnetometers built in our laboratories, it is important to emphasize that the proposed design can be scaled in all dimensions, with particular interest in industrial applications, such as DC motor generators.

## ACKNOWLEDGMENTS

We would like to thank Professor D. Budker for his constant support and help during this work. L.B. thanks G. Iwata and A. Lev for fruitful discussions. This research was supported by the European Commission Horizon 2020 (Grant No. FETOPEN-737071), ULTRACHIRAL Project. L.B. acknowledges support by a Marie Curie Individual Fellowship within the second Horizon 2020 Work Programme.

### APPENDIX: TORQUE

We experimentally measure the torque required to rotate our magnetic system (Fig. 7) through the supply current of a brushed motor used to rotate it through its gear-shaft mechanism.

For small rotation speeds, where effects of mechanical inertia can be neglected, the electrical power dissipated on a brushed motor used to rotate the magnetic system consists of a DC and an AC component. The DC component corresponds to the dissipated power on the Ohmic resistance of the motor’s coils and the power required to counteract standing forces (friction in the gearbox or in the bearings of the Halbach system), while the AC component is related to the forces required to rotate the magnetic system, which are the magnetic forces between the Halbach arrays.

In Fig. 10, we present measurements for the AC supply current of a brushed motor we use to rotate our systems. We apply a 5 V DC voltage to a brushed motor that is sufficient to apply enough torque to our prototype device system (Fig. 7) and produce a low-speed rotation (∼0.5 Hz). For an estimated power consumption of ∼0.64 W (estimated by the voltage drop at the motor and the current we present in Fig. 10), we can estimate the torque via the equation P(W) = *τ* · 2*π* · *ν*, where P is the dissipated power, *τ* is the torque, and *ν* is the rotational frequency. We therefore estimate the rms torque required to rotate the system to be ∼0.2 N m.

Furthermore, we use a COMSOL-based finite element method to estimate the torque required to rotate the magnetic system (Fig. 3). We present our simulations in Fig. 11. Our simulations show that the rms torque required to rotate the system is approximately ∼0.1 N m, which is in reasonable agreement with our experimental measurements. These simulations also explain the anharmonic behavior we observe in our measurements in Fig. 10 since the torque required to rotate the system changes as a function of the mutual angle between the nested dipoles.