Optimal bi-planar gradient coil configurations for diamond nitrogen-vacancy based diffusion-weighted NMR experiments

Introduction Diffusion weighting in optically detected magnetic resonance experiments involving diamond nitrogen-vacancy (NV) centers can provide valuable microstructural information. Bi-planar gradient coils employed for diffusion weighting afford excellent spatial access, essential for integrating the NV-NMR components. Nevertheless, owing to the polar tilt of roughly \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$55^{\circ }$$\end{document}55∘ of the diamond NV center, the primary magnetic field direction must be taken into account accordingly. Methods To determine the most effective bi-planar gradient coil configurations, we conducted an investigation into the impact of various factors, including the square side length, surface separation, and surface orientation. This was accomplished by generating over 500 bi-planar surface configurations using automated methods. Results We successfully generated and evaluated coil layouts in terms of sensitivity and field accuracy. Interestingly, inclined bi-planar orientations close to the NV–NMR setup’s requirement, showed higher sensitivity for the transverse gradient channels than horizontal or vertical orientations. We fabricated a suitable solution as a three-channel bi-planar double-layered PCB system and experimentally validated the sensitivities at \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$28.7 \mathrm mT/m/A$$\end{document}28.7mT/m/A and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$26.8 \mathrm mT/m/A$$\end{document}26.8mT/m/A for the transverse \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G_{x}$$\end{document}Gx and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G_{y}$$\end{document}Gy gradients, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$26 \mathrm mT/m/A$$\end{document}26mT/m/A for the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G_{z}$$\end{document}Gz gradient. Discussion We found that the chosen relative bi-planar tilt of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$35^{\circ }$$\end{document}35∘ represents a reasonable compromise in terms of overall performance and allows for easier coil implementation with a straight, horizontal alignment within the overall experimental setup.


Introduction
Nitrogen-vacancy (NV) based nuclear magnetic resonance (NV-NMR) in diamonds is a promising approach for investigating the biological micro-to nanoscale domain, such as single cells [1].NV-based magnetometry provides broadband detection of magnetic fields with high sensitivity and small sample sizes [2][3][4].In optically detected NV-NMR, the sample's magnetization is detected by measuring the fluorescence of nearby NV centers [5,6].
NMR-based spectroscopy [7] and imaging (MRI) [8] are, on the other hand, well-established measurement techniques, extensively used for medical and technical applications.Nuclear magnetization is measured by detecting oscillating magnetic fields precessing around a static external magnetic field [9].
In NMR/MRI of sub-millimeter samples, the signal-tonoise ratio (SNR) is dominated by the resistive noise of the MR receiver coil [10].By replacing the MR receiver coil with an NV-diamond detector, the SNR can potentially improve for positions close to the NV centers [11,12].
Within the microscopic scale of the diamond's area of interest [6], particle motion occurs through diffusion.By investigating these diffusion properties, it is possible to gain insights into the microstructural level.[13,14].Technically, diffusion-weighted NMR/MRI studies the diffusion properties of a sample by phase accumulation of the NMR signal [15].This is achieved as signal preparation by adding spatially varying gradient fields, which are generated by corresponding gradient coils.To capture the full directional information of diffusion, three orthogonal gradient fields are necessary [13].
In MRI, gradient coils are generally used to induce spatially dependent frequency variations of the MR signal, providing spatial information [16,17].In most standard cases, gradient fields G i are linear variations of the magnetic field component along the main static magnetic field: The static field, called B 0 , is conventionally aligned here along the z-axis of the coordinate system.For full 3D encoding, three orthogonal gradient fields are required to define the internal MR coordinate system (x, y, z).Each gradient field is generated by a separate gradient coil, commonly named after the direction of the induced field variation within the given coordinate system, i.e., " G x ", " G y ", and " G z ".
In the context of NV-NMR, the necessary orientation of the static B 0 field within an NV-NMR is defined by the NV center (refer to Fig. 1C, D).For our experimental setup (described separately in [18]), we utilize NV centers solely along the [111] direction.Throughout the NV-NMR experiment, the diamond is oriented such that its (100) surface normal aligns with the laboratory's vertical z-axis.The projection of the [111] NV-axes onto the xy-plane is furthermore parallel to the y-axis.This orientation is determined by constraints of the experimental setup such as the microfluidic system and the lasers incident on the diamond surface.For such orientation, NV-centers in [111] direction are now positioned at an angle of 54.74 • ( ≈ 55 • ) with respect to both the laboratory z-axis and the diamond's (100) surface [19].The NV-NMR signal relies on the Zeeman splitting of electronic NV states [20], where the NV axis typically aligns with the external B 0 field.In our case, to align with the NV quantization axis, the B 0 field must also be oriented approximately 55 • relative to the diamond's (100) surface normal (z-axis).Now, if we define our set of NV-specific gradient axes, we rotate our coordinate system by 55 • around the x-axis to achieve a G z parallel to B 0 .Consequently, in comparison to the laboratory coordinates, G x remains along the x-axis, while G y and G z undergo rotation by 55 • .This angulation requirement causes a significant difference from the regular orientation of the main and gradient fields relative to the laboratory coordinate system and must be taken into account.
This study focuses on incorporating a three-channel gradient system for diffusion weighting and potentially future imaging applications into an NV-NMR experimental setup, aimed at investigating diffusion properties in microfluidic systems [21].The NV-NMR setup and diffusion-based experiments are presented separately in detail by a separate publication by F. Bruckmaier et al. [18].
Due to the constraints and requirements of the available NV-NMR setup, we choose a bi-planar design with square current-carrying surfaces (See Fig. 1B).On a much larger scale, bi-planar gradient coils are already established for open whole-body MRI systems [22][23][24][25][26]. Since the distance between the gradient coils to be designed and the B 0 magnet used in this experiment will be relatively large, no active shielding layers are included.We pay particular attention to finding optimal square side lengths, surface separations, and orientations of bi-planar coil configurations.
Furthermore, this work presents a general investigation of the gradient performance of a bi-planar system as a function of geometrical parameters, specifically the relative orientation of the coil with respect to the main magnetic field B 0 .Apart from existing work on cylindrical coils [27] that quantitatively relate surface geometry to performance, the authors are not aware of similar work on bi-planar configurations.

Integration of a gradient system into the NV-NMR setup
Integrating a gradient system into the existing NV-NMR experimental setup presents challenges due to the limited space available, which is primarily occupied by NV-NMR components [18].The goal is to identify a suitable surface geometry that accommodates these restrictions.
The original NV-NMR experimental setup is situated within a custom-made 0.175T magnet (3T-215-RT, Super- conducting Systems INC., Billerica, USA) and primarily comprises an NV-doped diamond, a microfluidic sample directly mounted on the diamond's surface, an excitation laser beam, and a photodiode for fluorescence readout [18].Additionally, a microwave coil, positioned close to the diamond, is employed to drive the spin states of the NV centers.A schematic of this setup is depicted in Fig. 1A.Unobstructed optical paths are required for both the excitation laser and fluorescence readout, which must not be blocked by the gradient system.
Owing to these spatial constraints, implementing the widely-used cylindrical gradient coil geometry proves difficult.We have also opted against employing the mono-planar approach, as it typically yields poor gradient homogeneity in the direction perpendicular to the current-carrying surface [28].Consequently, this study examines bi-planar coil configurations with two parallel square surfaces.
In accordance with the NMR/MRI coordinate convention, the three orthogonal gradient fields G x , G y , and G z , are aligned with the x, y, and z axes of the internal NMR/MRI coordinate system.The static B 0 field is also aligned along the z-coordinate axis.
For the NV-NMR setup, the B 0 field must be inclined at a 55 • angle relative to the NV-diamond crystal and its (100) surface plane to align with the orientation of the NV quantization axis (see Fig. 1D).However, since our focus here is solely on the gradient system design, we maintain the NMR/ MRI convention, i.e., with a B 0 field and an NV quantiza- tion axis aligned along the z-axis.We can account for the resulting coil orientations in the original NV-NMR setup by rotating the bi-planar surface back by the same polar angle of 55 • (see Fig. 1D).

Search for the optimal bi-planar geometry
To identify the optimal bi-planar gradient geometry for the NV-NMR setup described earlier (see Fig. 1), we utilized the MATLAB-based open-source design tool, CoilGen [29] (https://github.com/Philipp-MR/CoilGen).CoilGen allows for the rapid automatic generation of numerous coil configurations by sampling various geometric parameters of the bi-planar surface.By analyzing the performance of the resulting coil variants, we can determine the optimal configurations.We investigated the following geometric parameters of the bi-planar surface: For understanding, a full grid search across these three variables involves testing each variable across approximately 10-20 distinct values, results in several thousand combinations.

3
However, due to the geometric limitations of the NV setup, not all combinations derived from the grid search are feasible for integration into the experiment.To narrow the scope of this paper, we choose to vary only one parameter while maintaining fixed at practical and reasonable values for the others.This approach allows us to present qualitative trends that emphasize the impact of geometric parameters on sensitivity.
The target region for the gradient system is defined as a spherical volume with a diameter of 3 mm at the center of the diamond, which has dimensions of 2 mm × 2 mm × 0.5 mm, corresponding to the geometric center of the evaluated bi-planar surfaces.The mesh resolution for the bi-planar surface is set to 2178 regularly spaced mesh nodes, representing a compromise between discretization accuracy and computation time, considering that multiple cases will be computed.Although the number of nodes could have been further optimized, we did not address this aspect in the present work to maintain a specific focus.
The value range investigated for the square side length l was chosen as 10 mm to 200 mm, and for the bi-planar separation d as 10 mm to 200 mm, based on the design constraints imposed by the NV-NMR components.
Concerning the influence of the surface normal orientation ⃗ n = ⃗ n(, ) of the bi-planar geometry, we examine various azimuthal ( 0 • <  < 360 • ) and polar angles ( 0 • <  < 90 • ) on the upper hemisphere, defined according to the ISO 80000-2:2019 coordinate convention.The two other bi-planar parameters are set constant to l = 5cm and d = 3cm .Normal vectors pointing to the lower hemisphere are excluded for symmetry reasons, as they would correspond to reversing the gradient direction by altering the current polarity.For each gradient channel ( G x , G y , G z ), 102 evenly distributed normal orienta- tions are studied over the hemispheres (See Fig. 1 and 3).
To ensure that different effects are not masked while studying the geometric parameters l and d, we fixed the azimuthal and polar angles of the surface normal ⃗ n at 90 • and 35 • , respec- tively, corresponding to the orientation depicted in Fig. 1b.For each set of design parameters, a set of coil layouts for the three channels is generated using the CoilGen software, which allows for a grid search within a specified parameter space.Each solution is evaluated for gradient sensitivity using the following equation: To quantify the relative field error, we define the deviation from the linear target [30] as follows: (1) Equation 1 provides the sensitivity of the three channels ( G x , G y , G z ) with respect to the resulting gradient field per unit current, while Eq.defines the deviation from the target in terms of the magnetic field without differentiation.This approach allows for a more direct comparison with experimental field measurements.

Generating the coil layouts
For each specified surface geometry (i.e., a set of values for the bi-planar parameters l, d, and ⃗ n ), a coil layout is gener- ated.The process is outlined as follows: Using the CoilGen software, a triangulated bi-planar surface mesh is generated based on the given values of l, d, and ⃗ n .This mesh represents the current-carrying surface, where an electric surface current density ⃗ j is optimized to achieve the desired magnetic target field within the target region.The optimization is performed using the stream function approach [30,31], which is implemented in the CoilGen software.
In the stream function approach, a surface current density ⃗ j is defined and optimized based on a scalar stream func- tion Ψ , where ⃗ j = ⃗ n × ⃗ ∇Ψ [32,33].The stream function Ψ is defined on the nodes of the current-carrying surface and determines the current density ⃗ j that generates the desired magnetic field ⃗ B .In the context of MR, this is usually a spatial modulation of the z-component parallel to the static main field, B 0 [16].In our case, the current-carrying surface is the bi-planar surface that we are optimizing in this study.The optimization problem for Ψ and its explicit Tikhonov solution, as described by Poole et al. [34] and Calvetti et al. [35], is given by: In this equation, S represents the sensitivity matrix that relates the circular nodal currents to the target field coordinates based on Biot-Savart's law.The matrix S depends on the current-carrying surface geometry and needs to be recalculated for each bi-planar configuration.The expression SΨ gives the magnetic field generated by Ψ at the tar- get location.R is the regularization matrix representing the electric resistance.The regularization parameter balances field accuracy and power dissipation.A larger increases sensitivity (gradient field per unit current) but may result in a higher field deviation from the linear target field (field error).
The optimized stream function result must be discretized into n equally spaced potential steps to obtain the wire turns of the coil, known as isocontour lines [33].The number of potential steps n affects efficiency and field accuracy, with higher values improving accuracy but also increasing inductance and reducing the distance between coil windings.The

Setup for the experimental validation
The wire pattern was implemented using two double-layer PCBs for each gradient channel, with a copper thickness of 35 m (Beta LAYOUT GmbH, Aarbergen, Germany).The coil design's performance was experimentally validated in a clinical 3T whole-body MRI scanner (MAGNETOM Prisma, Siemens Healthcare GmbH, Erlangen, Germany).To align the B 0 direction of the MRI scanner with the inter- nally required B 0 orientation direction of the gradient sys- tem, a tilted PCB coil holder for the PCBs was designed using Blender v.2.7 software (Stichting Blender Foundation) and 3D printed using Polylactide on a Prusa i3 MK3S+ 3D printer (Prusa Research a.s).
An MRI phantom consisting of a small plastic bottle filled with copper sulfate solution was placed inside the gradient system.A (7cm) loop coil was positioned on top of the setup for MR signal reception.Phase images were acquired using a double gradient echo sequence with echo times of 4ms and 7.72ms .Phase differences were converted to corre- sponding field strengths using the equation B = ⋅ ΔΦ∕ΔTE [36].The MR sequence parameters were chosen to achieve an isotropic resolution of 1mm , with an echo spacing small enough to avoid phase wrapping artifacts.
Theoretical field maps were calculated from simulated wire tracks using Biot-Savart's law.

Results
More than 500 combinations of the bi-planar geometric parameters, including square side length (l), separation (d), and orientation ( ⃗ n ), were generated and analyzed in terms of sensitivity and deviation from the targeted field (Figs. 2, 3  and 4).During the stream function optimization, the regularization factor ( ) was set to a constant value of = 100, 000 to account for power dissipation specific to the 2178 mesh nodes of the bi-planar current-carrying surface.This value was intentionally set higher than the optimal value determined by the L-curve [35] to further enhance sensitivity.
The influence of surface separation (d) and square side length (l) on gradient sensitivity and relative error was examined for the G x channel (Figs. 2).With a fixed square side length of l = 10 cm, sensitivity decreased as the separation increased, and significant field error occurred for separations larger than d = 3 cm.
Regarding the bi-planar square side length (l) with a fixed separation of d = 3 cm, sensitivity increased with larger surface sizes, but no further gain was observed for square side lengths greater than 5 cm.Significant field error occurred for surfaces with l > 5 cm.
The influence of surface orientation was investigated for all three channels by analyzing solutions with different polar angles ( ) and azimuthal angles ( ) on the upper hemisphere (Figs. 3, 4).For the transverse gradient channels G x and G y , tilted bi-planar orientations exhibited higher efficiency compared to horizontal or vertical alignments.The highest sensitivity was achieved with a polar angle of 55 • in the direction of the respective gradient axis (Figs. 3, 4).For the G z channel, the highest sensitivity of approximately 25mT∕m∕A was obtained when the solution was directed towards the z axis.
Various optimization approaches were identified to enhance the overall performance of the gradient system (Fig. 4).One option is to balance the sensitivity of the G z channel with one of the transverse G x and G y channels, achieved by setting ≈ 30 • and = 0 • or = 90 • .Another possibility is to select ≈ 40 • and = 45 • , which balances the power of all channels but slightly reduces total sensitivity and symmetry of the G x and G y channels.
Despite the maximum polar angle of 55 • for either the G x or G y channel, the configuration with = 35 • and an azimuthal angle of = 90 • (Fig. 1b) was chosen for imple- menting the gradient coil set on PCBs.This orientation allows for an upright, horizontal alignment in the laboratory coordinate system, simplifying integration into the overall measurement setup.
The separations of the biplanar coils used for the different channels were adjusted to compensate for sensitivity differences.The G x channel, with the lowest sensitivity, was placed at the innermost position of the three-channel gradient system (Fig. 5 A).By using double-layered tracks and a slightly lower number of coil turns for G z (Table 1), all sensitivities were adjusted to a similar range of 26 − 29 mT/m/A.
A complete gradient set combining G x , G y , and G z chan- nels, with a square side length of l = 5 cm, bi-planar surface separations of d = (3, 3.35, 3.7) cm, and an orientation of polar angle 35 • and azimuthal angle 90 • , was manufactured using the layouts shown in Fig. 5 on double-layer PCBs (also see the prototype in Fig. 6).The tracks of the individual coils had a width of 0.5 mm and a minimal gap of 0.01 mm between them.The copper thickness of the PCBs was 35 .All interconnections were designed to allow for a spi- ral back-and-forth connection without additional feed lines (Fig. 5).
Experimental and theoretical field maps are depicted in Fig. 7.The measured performance for the transverse G x and G y coils was 28.7mT/m/A and 26.8 mT/m/A, respectively, while the G z coil achieved 26 mT/m/A.The relative differ- ences between measured and simulated values were below 8% for G x and G y , and below 6% for G z (Fig. 7).

Discussion
The aim of this study was to design an optimal bi-planar gradient configuration for the diffusion-weighting experimental NV-NMR setup.We successfully implemented a three-channel gradient coil set on PCBs.However, this work can also be considered a more general study of bi-planar geometric parameters and their influence on gradient performance.
In terms of parameter selection for the final built system, we chose a square side length of l = 5cm due to limited available space and the absence of any observed advantage in sensitivity or accuracy in the parameter study (see Fig. 2C).The saturation of sensitivity for increasing l can be attributed to two factors.First, the surface area appears sufficient as fewer windings are placed on radially outer locations.Second, without dynamic adjustment of node density, the mesh resolution decreases with increasing l, especially for the relevant inner surface region.
For the bi-planar surface separation d, we found that sensitivity is inversely related (see Fig. 2A).We chose a separation of d = 3cm as the smallest value that avoids inter- fering with the optical path of the existing NV-NMR setup and overlapping with the RF excitation coils.However, this parameter had the strongest influence on sensitivity.Future With regards to the square side length l, the sensitivity increases as the surfaces become larger, up to l = 5cm .Surprisingly, the gradient performance (i.e.high sensitivity, low error) starts to significantly deteriorate for larger surfaces with l > 5cm .We attribute this reduction in performance for larger surfaces to the decrease in mesh resolution in the central region.It should be noted that the shown sensitivities of the final layouts in Fig. 5 differ by a factor of about two because the PCB coils were constructed in double layers, which doubles the sensitivity.Additionally, the sensitivity has changed to some extent since the the number of wire turns were adjusted, which was necessary to avoid overlapping tracks Fig. 3 Simulated gradient sensitivities = G∕I as a function of surface orientation ⃗ n(, ) : A: Definition of the normal orientation of the bi-planar current-carrying surface with the polar angle and the azimuthal angle .The NMR/MRI coordinate convention is used, i.e., the z-axis coincides with the direction of the main field B 0 .B-D: Simulated sensitivities for the G x , G y , and G z gradient coils as a function of normal orientation distributed on the hemisphere.The two other bi-planar parameters are set constant to l = 5cm and d = 3cm .The sampled normals are densely and regularly distributed on the hemisphere with more than 100 values.For better illustration, the data points are linearly interpolated to create a smooth surface.For the G z -channel, the solution with the highest sensitivity (red dot) of approximately 25mT∕A∕m has a polar angle of 0 • .For the transverse G x and G y -channels, optimal polar angles of approximately 55 • were found with respective azimuth values of 0 • for the G x and 90 • for the G y channel.Again, it should be noted that the shown sensitivities differ from the final layouts in Fig. 5 because we built the final PCB coils in double layer configuration and we adjusted the number of wire turns to avoid overlapping tracks Fig. 4 Simulated gradient sensitivities = G∕I as a function of surface orientation ⃗ n(, ) .Same underlying data as shown in Fig. 3, but reduced for better visualization to azimuthal angles of 0 • , 45 • and 90 • .For the G z -channel (in blue) the solution with highest sensitivity is in ′′ z ′′ direction with a polar angle of 0 • .For the G x and G y channel an optimal polar angles of 55 • were found with respective azimuth values of 0 • for G x and 90 • for G y designs should position the gradient coils as close as possible to the target region.
Regarding the influence of surface orientation ⃗ n , we notably found that polarly tilted bi-planar orientations have higher efficiency for the transverse gradient channels than  The red circles represent the spherical region of interest with a diameter of 3mm.Relative differences between measured and simulated are found to be below 8% for all the G x and G y channel and below 6% for the G z channel 1 3 horizontal or vertical orientations.As seen from the plots in Figs. 3 and 4, we evaluated two options for implementing a gradient system with balanced near-optimal performance.Option 1 involves choosing a polar angle of = 30 • and an azimuth of = 0 • (or = 90 • ), balancing the performance of one of the transverse ( G x or G y ) coils with the G z gradi- ent while accepting a lower performance of the remaining channel.Option 2 involves balancing the sensitivities of all three axes with an azimuth of = 45 • , resulting in a homogeneously reduced performance.We chose a solution close to option 1 with = 35 • because we could partially compensate for the sensitivity differences with the final ordering of the coils within the overall system, which automatically implies different bi-planar surface separations (in our case, 3cm, 3.35cm , and 3.75cm ).Furthermore, the polar angle of = 35 • is required by the NV-NMR setup for a sim- ple straight horizontal integration of the bi-planar gradient system in the laboratory coordinate frame (see Fig. 1b-d).Coincidentally, the optimal transversal polar angle = 55 • is not far from the advantageous bi-planar angle of = 35 • for the NV-NMR setup.
We do not claim to have found a universally optimal polar angle for transversal bi-planar gradients.The optimal polar angle also depends on other geometric parameters such as surface separation and design variables like the regularization factor .The optimal polar angle must be found specifically for each problem.However, it has consistently been shown that inclined bi-planar alignments achieve higher efficiencies for transverse gradient coils.
The relative orientation of the gradient field axes relative to B 0 and the NV axis was not optimized to avoid further increasing the parameter space and computational effort.In general, gradient directions do not necessarily have to coincide with the respective x, y, and z axes of the internal coordinate system, which in our case is the coordinate system of the diamond NV center.Therefore, further improvements and design variants in this respect are possible in the future.
With a gradient sensitivity of over 26mT∕m∕A for all three channels in the built system, it is possible to obtain a gradient strength of 100mT/m with a current of only 3.8A.Such high gradient strengths are desirable for obtaining high b-values for diffusion-based NV-NMR experiments.
However, in DC mode, 3.8A would lead to intolerable heating of the PCBs.With a copper thickness of 35 m for the tracks and an average width of 0.5mm, the cross-section can safely support only a constant DC strength of 1A without significant heating above an additional 10 • C [37].Never- theless, since the current duty cycle of diffusion weighting pulses is typically less than 10% [38], it will be possible to apply pulsed currents with higher current strength without exceeding the thermal loading of the system.However, future versions of the coils should use thicker tracks to further reduce resistance heating.
With the relatively small values of 3 − 5 H for the mag- netic inductance (see Table 1), no peak voltage limitations are expected while driving the coils, unlike whole-body MR gradient systems.Therefore, as typical for small gradient coils [39], the performance of the presented system is limited by ohmic losses rather than inductance.
To the best of our knowledge, no detailed studies analyzing the effects of varying side lengths, surface separations, and orientations of bi-planar current-carrying surfaces have been conducted.We hope that this study helps foster more efficient gradient coil designs in the future, which may include further optimization parameters such as the size and shape of the target area (or field of view), active shielding, and optimizing the relative orientation between the gradient directions and the respective coordinate axes.

Conclusion
A bi-planar MR gradient system was successfully designed, implemented, and experimentally validated for NV-NMRbased experiments.Through an extensive exploration of over 500 layout designs incorporating varying square side lengths, surface separations, and orientations, we determined that inclined orientations offer higher efficiency for the G x and G y channels compared to vertical or horizontal orientations.Taking these findings into consideration, we selected a design with a 35 • inclination and implemented a three-channel gradient system on PCBs.Sensitivity measurements revealed values of 28.7mT/m/A and 26.8mT/m/A for the transverse G x and G y gradients, respectively, while the G z gradient exhibited a sensitivity of 26mT/m/A within a spherical target region with a diameter of 3mm.Notably, the measured results aligned well with the predicted magnetic fields for all three channels, confirming the effectiveness of the bi-planar gradient system.

Fig. 1 A
Fig. 1 A: Simplified scheme of the given NV-NMR setup[18]: 1. NV-Diamond and microfluidic assembly mounted directly on its surface, 2: Green excitation laser, 3: Red emitted photons and receive photo diodes, 4: RF Calibration Coil, 5: RF Excitation Coil, 6: Microwave Coil to drive the NV-center; B: Integration of a bi-planar gradient surface (shown in blue) within the overall setup (shown in grey).The configuration shown is the variant that was finally built.The optimized bi-planar parameters (square side length l, surface separation

1 .
Planar surface separation d (ranging from 10 mm to 200 mm) 2. Square side length l (ranging from 10 mm to 200 mm) 3. Surface normal orientation ⃗ n relative to B 0

Fig. 2
Fig. 2 Simulated gradient sensitivities = G∕I and relative field errors for different surface separations d and square side lengths l of the bi-planar gradient geometry.The plots show results for the G x channel with bi-planar surface orientation identical to the one shown in Fig. 1B.A,B Sensitivity ( in mT∕m∕A ) and relative field error in % versus bi-planar separation d with d from 1cm up to 10cm.The square side length is kept constant to l = 5cm .C,D Resulting sensitivity ( in mT∕m∕A ) and relative field error in % versus different square side lengths l from 1cm up to 10cm for a fixed separation of d = 3cm .The sensitivity reduces considerably as the surface separation d increases.For separations greater than d = 3cm , the field error

Fig. 5
Fig. 5 Technical details and PCB layouts of the built biplanar gradient system: A: Spatial position of the different gradient PCBs carrying the coil layouts.B-D: Wire patterns of the fabricated gradient system for the G x , G y and G z channel.The square side length for the shown layout are chosen for all channels to be 5cm wheres the bi-planar surface separations are chosen to be 3cm, 3.35cm and 3.75cm.The current-carrying surface orientation is chosen as an polar tilt of 35 • and a azimuth of 90 • in y-direction, which allows for an upright, horizontal orientation in the laboratory coordinate system.The tracks of the individual PCBs were generated with a track width of 0.5mm.The copper thickness of the used double layered PCB is 35 m .Each of the two boards of the three bi-planar gradient channels carries the conductors over two layers.The two layers allow a spiral back-and-forth (dark grey, light grey) connection without additional feed lines.The conductive connection between the upper and lower layers are indicated by the red dots.The final ports are shown by black dots.The black frame indicates the boundary of the PCBs

Fig. 6 AFig. 7
Fig. 6 A Photograph of the experimental setup for the field measurement of the realized gradient system.Components: 1: PCBs with the printed wire patterns, 2: phantom bottle, 3: SMA connector, 4: 3D-Printed (PLA) angulated coil holder, 5: Region of interest with