Simultaneous Determination of Local Magnetic Fields and Sensor Orientation with Nitrogen-Vacancy Centers in Nanodiamond Preprint: APS/123-QED Yizhou Wang, Haochen Shen, Zhongyuan Liu, Yue Yu, Shengwang Du, Chong Zu, Chuanwei Zhang Abstract Nitrogen-vacancy (NV) centers in nanodiamonds have emerged as a promising quantum sensing platform for biomedical imaging applications, yet random orientations of individual particles presents significant challenges in large-scale sensor calibration. In this study, we demonstrate a novel approach to simultaneously determine each particle’s crystallographic axes and the surrounding local vector magnetic field. Specifically, a minimum of four distinct bias fields is required to unambiguously extract both the orientation and the local field. We validate our method experimentally using NV centers in two scenarios: (1) in a bulk diamond with known crystal orientation as a proof of concept, and (2) on various single nanodiamonds to mimic real-world applications. Our work represents a crucial step towards unlocking the full potential of nanodiamonds for advanced applications such as in-situ biomedical imaging and nanoscale sensing in complex environments. I Introduction Quantum sensing with nitrogen-vacancy (NV) centers in diamond has enabled precise measurements of magnetic Balasubramanian et al. 2008 ; Maze et al. 2008 ; Acosta et al. 2009 ; Schoenfeld and Harneit 2011 ; Güldeste and Bulutay 2024 ; Barry et al. 2020 ; Acosta et al. 2009 ; Jarmola et al. 2012 ; Huang et al. 2016 , electric Dolde et al. 2011 ; Block et al. 2021 ; Taylor et al. 2008 , chemical Igarashi et al. 2012 ; Fujisaku et al. 2019 ; Rendler et al. 2017 and thermal signals Acosta et al. 2010 ; Chen et al. 2011 ; Toyli et al. 2012 ; Yanagi et al. 2020 ; Kucsko et al. 2013 at the nanoscale, with applications spanning condensed matter physics Casola et al. 2018 ; Hsieh et al. 2019 ; Ku et al. 2020 ; Bhattacharyya et al. 2024 ; Liu et al. 2025 ; Sun et al. 2021 , quantum technology Zu et al. 2014 ; Gao et al. 2025 ; Childress and Hanson 2013 , and biomedicine Barnard 2009 ; Schirhagl et al. 2014a ; Aslam et al. 2023 ; Yukawa et al. 2025 . A core strength of NV centers lies in their ability to reveal vector magnetic field information through optically detected magnetic resonance (ODMR), a technique that exploits spin-dependent fluorescence to track electron spin transitions Fang et al. 2013 ; Gruber et al. 1997 . However, extending NV-based magnetometry to biologically relevant contexts presents unique challenges, primarily due to the random orientations of NV-containing nanodiamonds when dispersed within complex environments like cells and tissues Kukura et al. 2009 ; McGuinness et al. 2011 ; Shimabukuro et al. 2003 . Previous studies have demonstrated the feasibility of orientation tracking Fukushige et al. 2020 in biological systems using ODMR spectra, achieving sub-degree angular resolutions McGuinness et al. 2011 , and even full tomographic orientation reconstruction via modulated external magnetic fields Igarashi et al. 2020 . Despite these advances, current orientation tracking approach typically relies on the assumption that “the external magnetic fields at their positions are well known” Segawa and Igarashi 2023 . This interdependency—where precise magnetometry requires known orientation, and orientation determination relies on known fields—poses considerable challenges for robust orientation sensing and magnetometry when the local field signals from the target sample, such as those from ferritin Papaefthymiou 2010 ; Dubiel et al. 1999 , are present and unknown. Our approach directly addresses this challenge. We demonstrate that a minimum of four independent ODMR measurements, under appropriately chosen bias field configurations, are sufficient to reconstruct both the full local vector magnetic field and the NV orientations. This congruence is significant: it matches the number of measurements previously established for determining only the NV axes when external magnetic fields are well-characterized Igarashi et al. 2020 , suggesting that comprehensive information (both local field and orientation) can be efficiently extracted with a comparable measurement overhead. The paper is organized as follows: First, we detail the theory and methodology underpinning our approach in Secs. II and III , including the Hamiltonian for the NV center and the mathematical formulation for reconstructing orientation and field parameters from ODMR spectra under multiple bias fields. Second, we describe the experimental validations (Sec. IV ) and numerical simulations (Sec. V ) of our method. This includes proof-of-concept experiments on a bulk diamond crystal with known NV orientations, followed by experiments on various single nanodiamonds where both orientation and local field are unknown. We compare experimental findings with corresponding numerical simulations for both scenarios. Finally, we conduct a noise analysis, investigating the impact of factors such as the number and strength of bias magnetic fields, and experimental noise from finite ODMR linewidth and photon shot noise. We conclude with a discussion of our findings and potential avenues for future research in Sec. VI . Figure 1: Introduction to nitrogen-vacancy (NV) Centers in nanodiamonds. \mathbf{(a)} Schematic of an experimental setup for imaging NV centers in diamond crystals. The lab frame coordinate axes x , y , and z are indicated in blue. The inset shows an optical fluorescence image of two single-crystal nanodiamonds of size around 1 \mu m. When a 532nm laser is shone on the defect containing diamond, a 637nm fluorescence of interest is emitted. \mathbf{(b)} Energy level structure of the NV center ground state under an external magnetic field. The Zeeman splitting between m_{s}=\pm 1 states is proportional (to first order) to \vec{B}\cdot\hat{n} , where \hat{n} is the NV axis direction and \vec{B} is the magnetic field at the diamond. \mathbf{(c)} Atomic models of the four possible NV center orientations ( NV_{1}-NV_{4} ) within the diamond lattice, each corresponding to a different crystallographic direction and is colored uniquely (red, blue, green, and orange, respectively). \mathbf{(d)} A typical optically detected magnetic resonance (ODMR) spectrum from a single nanodiamond showing characteristic resonance peaks corresponding to the four NV orientations, with the splitting magnitude proportional (to first order) to the projection of the magnetic field along each NV axis. II Methodologies and Frameworks Having outlined the paper’s structure, we now describe the physical platform and analysis workflow in detail. Fig 1 provides an overview: Panel (a) sketches the wide-field ODMR microscope used in this study and, in the inset, shows two representative single-crystal nanodiamonds whose diameters are \sim\!1\,\mu\text{m} . Each nanodiamond hosts an ensemble of negatively charged NV centres that function as local vector magnetometers. The sensing element itself is governed by the ground-state spin-1 Hamiltonian Doherty et al. 2013 ; Schirhagl et al. 2014b depicted in panel (b), \hat{H}=D_{\mathrm{gs}}\,S_{z}^{2}+\gamma_{e}\,\bigl(\vec{B}\!\cdot\!\vec{S}\bigr), (1) where D_{\mathrm{gs}}=(2\pi)\times 2.87 GHz being the zero-field splitting, \gamma_{e}=(2\pi)\times 28.0 MHz/mT being the gyromagnetic ratio, \vec{B} being the vector magnetic field and \vec{S} is the spin-1 operator for the NV. Here we assume the magnetic field is the dominating signal and neglect the small local strain and electric field induced mixing between |m_{s}=\pm 1\rangle levels. The resulting energy of the three NV spin levels could be obtained by solving the eigenvalues using the matrix form, \lambda[(D-\lambda)^{2}-\mu_{e}^{2}B_{z}^{2}]-(\lambda-D)\mu_{e}^{2}[(B^{\mathrm{tot}})^{2}-(B^{\mathrm{proj}})^{2}]=0 (2) where \lambda are the spin state energies, B^{\mathrm{tot}} is the magnitude of the total magnetic field (including the applied bias magnetic field and the local field from the environment that we would like to sense), and B^{\mathrm{proj}} is the total magnetic field’s projection on the specific NV axis. The ODMR spectrum measures the two microwave transitions from |m_{s}=0\rangle to |m_{s}=\pm 1\rangle levels, and the splitting between the two resonances can be calculated as ( \lambda_{+1}-\lambda_{-1} ). For single crystal nanodiamond containing an ensemble of NV centers, the NV axis can align along one of four crystallographic directions (Fig. 1 b). The resulting ODMR spectrum typically exhibits four pairs of resonances with splitting, to the leading order, proportional to the magnetic field projection, B^{\mathrm{proj}} , onto each of the NV axis (Fig. 1 c). We label the four NV axis as \hat{n}_{1} , \hat{n}_{2} , \hat{n}_{3} , and \hat{n}_{4} (see supplementary equation (S3)). We also note that, the total magnetic field can be further decomposed into \vec{B}^{\mathrm{tot}}=\vec{B}^{\mathrm{bias}}+\vec{B}^{\mathrm{loc}} , where \vec{B}^{\mathrm{bias}} denotes the bias magnetic field we applied externally and \vec{B}^{\mathrm{loc}} being the local magnetic field in the environment that we want to sense. Thus the magnetic fields in the laboratory frame (labeled by coordinate { \hat{x} , \hat{y} , \hat{z} }) can be projected to the NV frame by: \hat{n}_{j}\cdot(\vec{B}^{\mathrm{bias}}+\vec{B}^{\mathrm{loc}})={B}_{j}^{\mathrm{proj}} (3) where j=1,2,3,4 represents the unit vectors of the four possible NV symmetry axes. We will apply a series of bias magnetic field and measure the corresponding ODMR splittings for all NV groups (Fig 1 d). By plugging Eq. ( 3 ) into Eq. ( 2 ) and solving these simultaneously, we can obtain the corresponding local magnetic field and nanodiamond crystallographic orientation in the lab frame. Considering it is a set of nonlinear equations with multiple unknowns, instead of solving the equations directly, we change that into an optimization problem and opt to use MATLAB Multistart The MathWorks, Inc. 2025 . Figure 2: Illustration of the process for determining the local magnetic field and NV center orientation using multiple bias magnetic fields. (a) When a single bias field B_{1}^{\mathrm{bias}} is applied, the possible solutions of B^{\mathrm{loc}} form a sphere, (resembled by the two red arrows), making the local field undetermined. (b) With a second non-parallel bias field B_{2}^{\mathrm{bias}} , the solution space reduces to a ring (red dashed curve) at the intersection of two spheres. However, the local field is still ambiguous. (c) A third bias field B_{3}^{\mathrm{bias}} further constrains the possible solutions to two mirror-symmetric points, as shown by the solid and dashed red arrows pointing upward and downward correspondingly. This symmetry introduces a degeneracy that prevents a unique determination of the local field. (d) In the case of four bias fields, this degeneracy is resolved. III Minimum Number of Bias Magnetic Fields A crucial aspect of our method is determining the minimum number of \vec{B}^{\mathrm{bias}} required to extract both NV orientation and the local field, \vec{B}^{\mathrm{loc}} . Given that each NV center has a unique orientation in the nanodiamond, \vec{B}^{\mathrm{loc}} can only be reconstructed when sufficient constraints are imposed by \vec{B}^{\mathrm{bias}} , as analyzed below. Single Bias Field: Our framework starts by setting the unknown local field \vec{B}^{\mathrm{loc}} as a fixed vector originating at the coordinate (0, 0, 0) in the lab frame (Fig. 2 a). When a single bias magnetic field B^{\mathrm{bias}}_{1} is applied, the only directly obtainable quantity is the magnitude of the total field |\vec{B}^{\mathrm{tot}}_{1}| (see Supplementary Materials), while orientation remains undetermined. Specifically, the \vec{B}^{\mathrm{tot}}_{1}=\vec{B}^{\mathrm{bias}}_{1}+\vec{B}^{\mathrm{loc}} can reside anywhere on a sphere with center at (- B^{\mathrm{bias}}_{x} , - B^{\mathrm{bias}}_{y} , - B^{\mathrm{bias}}_{z} ) and radius as the magnitude of \vec{B}^{\mathrm{tot}}_{1} , thus leaving the determination of \vec{B}^{\mathrm{loc}} impossible. Two Bias Fields: By applying a second \vec{B}^{\mathrm{bias}}_{2} which is not parallel to the first bias field, we impose a second constraint: \displaystyle|\vec{B}^{\mathrm{bias}}_{1}+\vec{B}^{\mathrm{loc}}|=|\vec{B}^{\mathrm{total}}_{1}| (4) \displaystyle|\vec{B}^{\mathrm{bias}}_{2}+\vec{B}^{\mathrm{loc}}|=|\vec{B}^{\mathrm{total}}_{2}| Geometrically, this restricts the set of possible \vec{B}^{\mathrm{loc}} to a ring-shaped intersection of the two spheres, as depicted in Fig. 2 b. While this additional constraint reduces number of possible solutions, it is still not sufficient to uniquely determine \vec{B}^{\mathrm{loc}} . Three Bias Fields: Introducing a third \vec{B}^{\mathrm{bias}}_{3} that is not in the same plane as the prior two bias fields, we can further restrict the possible \vec{B}^{\mathrm{loc}} to two points, as illustrated in Fig. 2 c. This occurs because the intersection of three spheres generally results in two solutions that are symmetric about the plane formed by the centers of three spheres. Four Bias Fields: To resolve this two-fold degeneracy, we apply a 4th non-coplanar \vec{B}^{\mathrm{bias}}_{4} (i.e. the centers of the four spheres do not lie in the same plane), as shown in Fig. 2 d. Interestingly, four bias fields is also the minimum number needed to determine solely the nanodiamond axes in the absence of the unknown \vec{B}^{\mathrm{loc}} Igarashi et al. 2020 . As a result, four bias fields are sufficient to simultaneously determine \vec{B}^{\mathrm{loc}} and nanodiamond orientation. Subsequent numerical simulations and experimental validation confirm this necessity: with three bias fields, there remains a symmetry-induced ambiguity, while four bias fields consistently produce unique solutions for determining local magnetic fields. IV Experimental Validation Two experimental configurations are used here: • A bulk diamond with known crystal orientation: the NV axes are well-characterized, allowing us to validate the accuracy of our method in a controlled environment. • Single nanodiamond: mimicking real-world applications, where the NV axes are random and unknown. The method is tested for robustness in reconstructing these parameters. We first perform measurements on a [100]-cut plate diamond, with the four NV axes orientations are known a priori and given by \displaystyle\hat{n}_{1} \displaystyle=[+\sqrt{2},0,+1]/\sqrt{3}; (5) \displaystyle\hat{n}_{2} \displaystyle=[0,+\sqrt{2},-1]/\sqrt{3}; \displaystyle\hat{n}_{3} \displaystyle=[-\sqrt{2},0,+1]/\sqrt{3}; \displaystyle\hat{n}_{4} \displaystyle=[0,-\sqrt{2},-1]/\sqrt{3}. We apply 28 sets of bias field, \vec{B}^{\mathrm{bias}} , each with a magnitude of approximately 1 mT using three-dimensional electromagnetic coils. As a calibration, we tested whether our method could accurately reconstruct these known axes and determine \vec{B}^{\mathrm{loc}} from the measured ODMR spectra. To quantify the stability of our reconstruction from different subsets of \vec{B}^{\mathrm{bias}} , we define two metrics (i) The standard deviation of the predicted \vec{B}^{\mathrm{loc}} : \delta B^{\mathrm{loc}}_{j}=\sqrt{\frac{\sum(B^{\mathrm{loc}}_{j}-\bar{B}^{\mathrm{loc}}_{j})^{2}}{N}} (6) where the summation is over a total of N reconstruction runs (each using a different subset of bias fields), j=x,~y,~z . (ii) The standard deviation of the predicted axes orientations represented by the great circle distance, d_{\mathrm{gc}} : \displaystyle d_{gc} \displaystyle=\frac{1}{N}\sum_{(\theta,\phi)}\cos^{-1}(\sin(\theta)\sin(\bar{\theta})\cos(\phi-\bar{\phi}) (7) \displaystyle+\cos(\theta)\cos(\bar{\theta})); Here (\theta,\phi) are the spherical coordinates representing a specific axis of NV (e.g., the first principal axis) determined in each run of reconstruction, and (\bar{\theta},\bar{\phi}) are the mean spherical coordinates for that axis over the N runs. For a proof-of-concept test, we choose N=50 subsets of four randomly chosen bias field data and obtain the averaged NV axes orientations to be (Fig. 3 ) \displaystyle\hat{n}_{1}^{\mathrm{exp}} \displaystyle=\hat{n}_{1}-0.0061\,\hat{x}-0.0051\,\hat{y}+0.0085\,\hat{z} (8) \displaystyle\hat{n}_{2}^{\mathrm{exp}} \displaystyle=\hat{n}_{2}+0.0013\,\hat{x}+0.0095\,\hat{y}+0.0137\,\hat{z} \displaystyle\hat{n}_{3}^{\mathrm{exp}} \displaystyle=\hat{n}_{3}-0.0061\,\hat{x}-0.0142\,\hat{y}-0.0088\,\hat{z} \displaystyle\hat{n}_{4}^{\mathrm{exp}} \displaystyle=\hat{n}_{4}+0.0108\,\hat{x}+0.0098\,\hat{y}-0.0135\,\hat{z} The reconstructed axes agree well with the known bulk diamond crystal orientation (Eq. ( 5 )), with a mean angular deviation of d_{gc}<0.5^{\circ} . Simultaneously, we obtain the local field \vec{B}^{\mathrm{loc}}=[-2.5,-14.9,-53.2]\pm[1.0,1.1,1.4]~\mu\text{T}. The uncertainties represent the standard deviation ( \delta B ) across multiple reconstruction runs. \vec{B}^{\mathrm{loc}} closely matches the geomagnetic field in the U.S. Midwest, highlighting the precision of our method. Figure 3: Preliminary results for obtained local magnetic field (a, b) and axes reconstruction (c, d)using our method. Each row represents a different scenario: QDM Experiment (a, c) , and Nanodiamond Experiment (b, d) . For each calculation shown, ten bias fields were randomly selected from the nanodiamond dataset and four from QDM dataset. (a, c) Reconstructed \vec{B}^{\mathrm{loc}} (marked by red dots) plotted in a cube, with shaded areas corresponding to their projections on yz, xz, xy planes. The average value marked by a blue dot. (c, d) Corresponding reconstructed NV axes orientations (solid lines) compared to the ground truth (For QDM) or mean orientation. Dashed lines shown within the inset cube is a zoom-in view of points distribution in a 0.02\times 0.02\times 0.02 box, centered around one of the predicted axes. QDM experiment (b, e) shows sub- 2\,\mu{T} consistency ( \delta B ) and high axes fidelity. Nanodiamond experiment (c, f) shows \sim 50\,\mu{T} field consistency ( \delta B ) and sub- 0.5^{\circ} axes consistency ( d_{gc} ). Figure 4: Impact of noise and number of bias fields on reconstruction. The predictions for local fields marked in red, axes marked in blue and their corresponding experimental results in green and orange. (a, b) Deviation in axes prediction ( d_{gc} ) in d , marked as Deviation (Deg) and local field prediction ( \delta B ), marked as ”Dev. Mag. Field” in a versus noise level for the nanodiamond simulation, using 4-20 bias fields per run (x axis) and 1 to 5 MHz of Gaussian noises (y axis). Dashed orange lines indicate experimental noise levels of around 4 MHz. (c, d) Deviation in axes predictions e and magnetic fields b but for QDM. Artificial Gaussian noise of 0.1 MHz to 0.5 MHz applied and 4-10 bias magnetic fields used in each run. Dashed orange lines indicate experimental noise levels of around 0.3 MHz. (e) Heatmap showing the corresponding deviation in axes prediction ( d_{gc} ) as a function of the noise level and the overall scaling of the bias field magnitudes. (f) Heatmap showing the predicted local field deviation ( \delta{B} ) as a function of the noise level and the overall scaling of the bias field magnitudes. We next extend our protocol to NV centers embedded in individual nanodiamonds, a more demanding setting where the crystal orientation is unknown a priori . In nanodiamonds, the ODMR resonances are substantially broadened (full-width-half-maximum, FWHM \sim 10 MHz) compared to bulk diamond (FWHM \sim 0.6 MHz), resulting in elevated noise floors and increased uncertainty in parameter extraction. To mitigate this, we apply 34 different bias magnetic fields with magnitudes of approximately 5–10 mT to better separate the eight resonances. Reconstruction is then performed by randomly selecting subsets of these fields. Using four bias fields per run, the consistency in axes prediction remains high, with d_{gc} typically around 1 ∘ . However, the prediction for the local field \vec{B}^{\mathrm{loc}} exhibits significantly greater variation than in bulk diamond due to the broader ODMR linewidth. To improve the field accuracy, we increase the number of bias fields per run. Fig. 3 b shows the average reconstructed \vec{B}^{\mathrm{loc}} using 10 randomly selected bias field dataset, yielding \vec{B}^{\mathrm{loc}}=[-7,-33,-7]\pm[36,11,24]\mu\mathrm{T} and a standard deviation \delta B of approximately 50 \mu T. This reduced precision arises primarily from the differing noise characteristics in bulk and nanodiamond ODMR spectra. Notably, our bulk diamond is isotopically purified to 13 C concentrations below 10^{-4} to suppress nuclear spin noise Balasubramanian et al. 2009 ; Dréau et al. 2011 . V Numerical Analysis and Discussion Last, we perform simulations to quantify how experimental noise, strengths of bias fields, and number of bias fields in one run affects the reconstruction accuracy. Starting from the bulk-diamond local field of around \vec{B}^{\mathrm{loc}}=50~\mu\text{T} pointing to -z direction, we synthetically generate eight-peak ODMR spectra and add Gaussian noise with amplitudes between 0.1 MHz and 0.5 MHz. Each noisy spectrum is fitted to locate the resonance frequencies, which are then passed to our reconstruction algorithm. For every noise level we repeat the procedure with 4–10 bias-field configurations randomly selected from the 28 used in the bulk-diamond experiment. We perform an analogous analysis for nanodiamonds. Here the Gaussian noise amplitude is varied from 1 MHz to 5 MHz, and 4–20 bias-field subsets are drawn from the 34 fields available in the experiment for each run. The simulations uncover two clear trends (Fig. 4 ). First, the prediction errors, including both the local-field deviation, \delta B , and the angular deviation, d_{gc} , grow approximately linearly with the injected noise amplitude, in agreement with standard error-propagation expectations. Second, adding more bias fields per reconstruction run improves accuracy, but the benefit saturates at around ten fields in nanodiamond case. Simulations using bulk diamond parameters exhibit the same qualitative behavior, but with uniformly smaller deviations owing to their lower noise level thus higher signal-to-noise ratio in the ODMR spectra. We also evaluate how bias‐field strength influences reconstruction accuracy. Specifically, we carry out simulations in which all bias magnitudes are uniformly scaled by factors of 2–10 (denoted “Bias-Scaling Factor” in Fig. 4 e,f). Increasing the field strength noticeably enhances axis determination, yet yields only marginal improvement in the local-field error. This behavior can be intuitively understood using the geometrical picture in Fig. 2 . Axis orientation is inferred indirectly from the relative directions of \vec{B}^{\mathrm{bias}} ; with a fixed noise floor, scaling the bias magnitudes reduces the angular uncertainty and thus yields a more precise axis estimate. By contrast, the local field \vec{B}^{\mathrm{loc}} is extracted from the intersection point of the total field vectors. Once the bias field is already much larger than \vec{B}^{\mathrm{loc}} , further scaling hardly changes the absolute positional error as it is set by the same noise floor. VI Conclusions & Outlooks We have developed and experimentally validated a framework for simultaneously determining the NV center orientation and the local vector magnetic field. Our results show that at least four non-coplanar bias fields are required, echoing with previous orientation-only methods but uniquely enable vector field reconstruction. The primary performance bottleneck of our protocol arises from the intrinsic noise inside nanodiamond sensors: 13 C nuclear spin bath, strain variations, and structural inhomogeneities. Addressing these noise sources is critical to improving the accuracy and reliability of our method under real-world conditions; approaches outlined in Refs. Schloss et al. 2018 ; Münzhuber et al. 2020 ; Güldeste and Bulutay 2024 ; Dubey et al. 2025 ; Yamamoto et al. 2025 ; Dréau et al. 2011 ; Kitazawa et al. 2017 ; de Lange et al. 2010 offer viable solutions. Ultimately, we anticipate a robust, simultaneous readout of nanodiamond orientation and local magnetic fields will enable new classes of experiments, from tracking ferritin-related magnetic signatures in living systems Papaefthymiou 2010 ; Dubiel et al. 1999 to diagnosing nanoscale magnetism in quantum materials. Acknowledgements. The authors acknowledge the support of NSF Grant 2503230 for enabling this research. C.Zu acknowledges support from NSF Expand-QISE 2328837. C.Zhang acknowledges support from NSF ECCS-2411394.