Abstract
Nuclear magnetic resonance (NMR) has shown good applications in engineering fields such as well logging and rubber material ageing assessment. However, due to the low magnetic field strength of NMR sensors and the complex working conditions of engineering sites, the signal-to-noise ratio (SNR) of NMR signals is low, and it is usually necessary to increase the number of repeated measurements to improve the SNR, which means a longer measurement time. Therefore, it is especially important to set the measurement parameters appropriately for onsite NMR. In this paper, we propose a stochastic simulation using Monte Carlo methods to predict the measurement curves of \({\mathrm{T}}_{1}\) and \({\mathrm{D}}_{0}\) and correct the measurement parameters of the next step according to the previous measurement results. The method can update the measurement parameters in real time and perform automatic measurements. At the same time, this method greatly reduces the measurement time. The experimental results show that the method is suitable for the measurement of the self-diffusion coefficient D0 and longitudinal relaxation time T1, which are frequently used in NMR measurements.
Similar content being viewed by others
Introduction
Nuclear magnetic resonance (NMR) can be used to explore the structure and properties of substances from the microscopic level through non-destructive methods and is now widely used in the fields of medicine, chemistry, materials, biology, petroleum, geology1, etc. The application of portable NMR sensors and unilateral magnetic resonance devices has attracted the attention of many researchers2,3,4,\({\mathrm{T}}_{\mathrm{d}}\) is set at a uniformly increasing step rate.
The diffusion curve is estimated by using these measured values, which consumes considerable time. At the same time, some users of NMR instruments may not have background knowledge of the NMR principles, so it is difficult for them to adjust the measurement parameters. Therefore, automatic and intelligent measurement algorithms are wanted by users.
The inversion recovery (IR) sequence used to measure T1 is shown in Fig. 2. Similar to the SGSE sequence and variable Td, \({T}_{i}\) is varied to measure the T1 recovery of the sample.
Method
In \({\text{T}}_{1}\) and \({\text{D}}_{0}\) measurements, adjusting \({\text{T}}_{\text{d}}\) and \({\mathrm{T}}_{\mathrm{i}}\) during the measurement needs to be performed. In our method, many diffusion curves and \({\text{T}}_{1}\) decay curves are randomly generated by Monte Carlo simulations, and then the unreasonable curves are excluded according to the data already measured, and the remaining curves can be used to estimate the measurement parameters for the next step. The detailed steps of the algorithm are as follows.
First, the initial range of B and \({\text{D}}_{0}\) are determined in Eq. (1), and the two-dimensional space determined by the initial ranges of these two parameters is called the initial parameter space. The initial parameter space is set to B ∈ [0, 2], \({D}_{0}\)∈[10–6 mm2/s, 10–2 mm2/s]. The \({D}_{0}\) range can cover most of the self-diffusion coefficients of the tested samples. The variation range is [2 ms, 180 ms], which can reflect the attenuation curve of all samples in the above \({\text{D}}_{0}\) range. A Monte Carlo sampling method is used to randomly select a specified number of data points in this initial parameter space and thus draw a cluster of t-\(\mathrm{f}(\mathrm{t})\) curves to calculate the uncertainty of the model at this point (expressed as the product of the variance of B and D0 in this space). f(t) is the diffusion decay curve, and t is the abscissa of the measured data points. The most divergent time point \({\mathrm{t}}_{1}\) in this curve cluster is selected as the first sampling point, and the actual corresponding measurement value \(\mathrm{f}{(\mathrm{t}}_{1})\) is obtained by measurement. From this measurement dataset, (\({\mathrm{t}}_{1}\), \(\mathrm{f}{(\mathrm{t}}_{1})\)) constitutes the first data point of the dataset, and the initial parameter space of B and D0 is constrained under the constraints of this data point (i.e. only the parameter space that matches the (\({\mathrm{t}}_{1}\), \(\mathrm{f}{(\mathrm{t}}_{1})\)) data point is retained), which in turn yields the B and D0 parameter subspaces. Similarly, the t-\(\mathrm{f}(\mathrm{t})\) curve cluster is plotted in this parameter subspace, and the model uncertainty is calculated, while the point \({\mathrm{t}}_{2}\), which makes the curve cluster most divergent, is still selected as the next sampled data point, and the measurement is performed. At this time, the data space is expanded to ((\({\mathrm{t}}_{1}\), f(\({\mathrm{t}}_{1}\)), (\({\mathrm{t}}_{2}\), f(\({\mathrm{t}}_{2}\)))), and the parameter space of B and D0 will be further reduced under the constraint of these two measurement data points. The above steps are repeated until the model uncertainty no longer significantly decreases; then, the parameter space of B and D0 under the data space constraint consisting of all measured data will be close to the true B and D0 values.
The diffusion decay curve \(\mathrm{f}\left(\mathrm{t}\right)\) satisfies the following form30:
This equation is correct for the constant gradient case, where the parameter vector A =\(\left[{\mathrm{D}}_{0},\mathrm{B}\right]\) is to be determined. t is the abscissa of the measured data points. Considering the form of Eq. (1), if there is no measurement error, \(\mathrm{B}\) should be equal to the peak of the measured echo, and the maximum \(\mathrm{Max}\left({\dot{\mathrm{y}}}_{\mathrm{i}}\right)\), \({\dot{\mathrm{y}}}_{\mathrm{i}}\) is the real measurement data. Considering the measurement error, the parameter search range can be set to \(\left[\mathrm{Max}\left({\dot{\mathrm{y}}}_{\mathrm{i}}\right)\pm 5\upsigma \right]\); and the \({\mathrm{D}}_{0}\) of common samples is between 0 and \({10}^{-8}{\mathrm{cm}}^{2}\cdot {\mathrm{s}}^{-1}\). Therefore, \({\mathrm{D}}_{0}\) and B are set to obey the uniform distribution in their respective intervals:
Multiple random sampling according to the above distribution is performed.
When there are sufficient curves that satisfy the condition of Eq. (3), \({\mathrm{DY}}_{\mathrm{t}}\) can be calculated, and then, it can be substituted into \({\dot{\mathrm{t}}}_{\mathrm{i}+1}=\mathrm{t}|{\mathrm{DY}}_{\mathrm{t}}=\mathrm{Max}\left({\mathrm{DY}}_{\mathrm{t}}\right)\) to obtain \({\dot{\mathrm{t}}}_{\mathrm{i}+1}\). \({\mathrm{T}}_{\mathrm{d}}\) is set to \({\mathrm{t}}_{\mathrm{i}+1}\) to obtain the new measured value of \({\dot{\mathrm{t}}}_{\mathrm{i}+1}\), and it is fit by least squares to obtain \({\widehat{\mathrm{a}}}_{\mathrm{i}+1}\). The iterations are stopped when \(|{\widehat{\mathrm{a}}}_{0\left(\mathrm{i}\right)}-{\widehat{\mathrm{a}}}_{0\left(\mathrm{i}-1\right)}|<\upvarepsilon\) is satisfied. The measurement of \({\mathrm{T}}_{1}\) was performed similarly.
The entire algorithm flow is shown in Fig. 3.
Experimental verifications
The equipment used in the experiment was a spectrometer (KEA2, Magritek Inc. New Zealand), RF power amplifier (BT00500 ALPHA-SA, Tomoco Inc., Australia) and unilateral nuclear magnetic resonance sensor (130 mT). To verify the effectiveness of the above algorithm, the diffusion coefficient of pure water was measured at points taken with the algorithms \({\mathrm{D}}_{0}\) and \({\mathrm{T}}_{1}\). Moreover, \({\mathrm{t}}_{\mathrm{i}}\) obtained by the algorithm is inputted into the programmable spectrometer, \({\dot{\mathrm{y}}}_{\mathrm{i}}\) is obtained from the actual measurement, and then, \({\dot{\mathrm{y}}}_{\mathrm{i}}\) is returned to the algorithm to calculate \({\mathrm{t}}_{\mathrm{i}+1}\). This process is shown in Fig. 4.
The upper limit of error \(\upvarepsilon ={10}^{-10}\) is set, and the algorithm stops iterating after 12 points are measured. With the increase in measurement data, the prediction dataset continues decreasing, giving the prediction dataset when the known data are 1, 5, 8, and 12, respectively, as shown in Fig. 5, and the diffusion curve plotted by the actual measurement data as shown in Fig. 6.
The same algorithm is used to measure \({\mathrm{T}}_{1}\) of the pure water, the upper error limit is set to \(\upvarepsilon ={10}^{-10}\), and the algorithm stops iterating after measuring 13 points. The predicted dataset with the known number of Data Points 1, 5, 8, and 13 is shown in Fig. 7, and the actual measured \({\mathrm{T}}_{1}\) curve is shown in Fig. 8.
Table 1 shows the data of D0 and T1 obtained by the Monte Carlo intelligent algorithm and manual measurements using the same experimental equipment with pure water and glycerol as samples at 20 °C room temperature, respectively.
To evaluate the accuracy and stability of the Monte Carlo optimization-based algorithm in the D0 and \({\mathrm{T}}_{1}\) measurement experiments, 10 repeated D0 and \({\mathrm{T}}_{1}\) measurements were performed on pure water and glycerol samples, respectively. The deviation of the mean value of the 10 replicate measurements relative to the manual measurements was used to measure the systematic error of the algorithm, and the standard deviation of the 10 replicate measurements was used to measure the accuracy of the algorithm30, as shown in Table 2.
The Monte Carlo-based optimization algorithm was experimentally demonstrated to be well adapted to two D0, pure water and glycerol, in \({\mathrm{T}}_{1}\) samples with values tens of times different, and the systematic error relative to the manually measured values is less than 1%. Considering the effect of temperature, it can be considered that the \({\mathrm{D}}_{0}\) and \({\mathrm{T}}_{1}\) parameters of the measured pure water under this algorithm are basically accurate.
In addition, with the algorithm optimization, the D0 and \({\mathrm{T}}_{1}\) measurement experiments can be completed with only 3 to 4 data points and achieves a speed increase of approximately 6 times compared to manual measurements of 15 to 25 data points, even without taking into account the manual process of repeatedly adjusting the measurement parameters, greatly improving the measurement efficiency.
In the application of low-field unilateral magnetic resonance, due to its poor magnetic field uniformity and low signal-to-noise ratio, the parameters of T2 generally do not need to be selected, and the echo time needs to be set as small as possible. Therefore, this study does not involve the adaptive adjustment of the measurement parameters in the T2 experiment30.
Conclusion
In this paper, the diffusion and relaxation curves of the samples are estimated by Monte Carlo simulation, and the algorithm selects the optimal measurement parameters according to the estimated values to achieve \({\mathrm{D}}_{0}\) and \({\mathrm{T}}_{1}\). The algorithm selects the optimal measurement parameters based on the estimated values and automates the parameter setting during the measurement, saves the measurement time, significantly reduces the measurement threshold, and facilitates \(\mathrm{NMR}\). The algorithm has been experimentally verified to be able to obtain more accurate results than the previous algorithm. The algorithm has been experimentally verified to obtain more accurate measurement results. Notably, the proposed intelligent search algorithm is based on the premise of single-component samples, and it needs to be extended for multi-component samples, which is also the future research direction of our team.
Data availability
The datasets generated and/or analysed during the current study are not publicly available due private reasons but are available from the corresponding author on reasonable request.
References
Brown, R. W., Cheng, Y.-C.N., Haacke, E. M., Thompson, M. R. & Venkatesan, R. Magnetic Resonance Imaging: Physical Principles and Sequence Design (Wiley, 1999).
Blümich, B., Haber-Pohlmeier, S. & Zia, W. Compact NMR (De Gruyter, 2014).
Blümich, B., Perlo, J. & Casanova, F. Mobile single-sided NMR. Prog. Nucl. Magn. Reson. Spectrosc. 52, 197–269 (2008).
Perlo, J., Casanova, F. & Blümich, B. Single-sided sensor for high-resolution NMR spectroscopy. J. Magn. Reson. 180, 274–279 (2006).
Zheng, X., **anjun, C., Kaikai, M. & Yunfeng, X. Novel unilateral NMR sensor for assessing the aging status of silicone rubber insulator. IEEE Sens. J. 16, 1168–1175 (2016).
Eghbalnia, H. R., Bahrami, A., Tonelli, M., Hallenga, K. & Markley, J. L. High-resolution iterative frequency identification for NMR as a general strategy for multidimensional data collection. J. Am. Chem. Soc. 127, 12528–12536 (2005).
Wang, H. N. & Wang Y. The research progress of De-Noising Methods in low-field NMR signal. Chin. J. Med. Phys., 34, 4261–4265 (2013).
Wu, F. et al. Automatic matching technology for determining acquisition parameters of formation rock T2-G experiment. Zhongguo Shiyou Daxue Xuebao (Ziran Kexue Ban) J. China Univ. Pet. 38, 50–56 (2014).
Zeng Qunying, C. S., Zhu **aoqin Chen Zhong. Optimized parameters in intermolecular multiple-quantum coherence NMR with CRAZED sequence. J. **amen Univ. Nat. Sci. 02, 176–180 (2005).
Hansen, A. L. & Brüschweiler, R. Absolute minimal sampling in high-dimensional NMR spectroscopy. Angew. Chem. Int. Ed. Engl. 55, 14169–14172 (2016).
Jaravine, V. A. & Orekhov, V. Y. Targeted acquisition for real-time NMR spectroscopy. J. Am. Chem. Soc. 128, 13421–13426 (2006).
Masuda, R. et al. Shortening NMR experimental times. Magn. Reson. Chem. 56, 847–851 (2018).
Q SY. A machine learning based adaptive method for multi-parametric NMR experiments. Halifax: 14th ICMRM (2017).
Tang, Y. & Song, Y. Q. Realtime optimization of multidimensional NMR spectroscopy on embedded sensing devices. Sci. Rep. https://doi.org/10.1038/s41598-019-53929-1 (2019).
**ng, D. et al. An adaptive method for determining an acquisition parameter t0 in a modified CPMG sequence. J. Magn. Reson. https://doi.org/10.1016/j.jmr.2017.01.006 (2017).
Reci, A., Sederman, A. J. & Gladden, L. F. Optimising magnetic resonance sampling patterns for parametric characterisation. J. Magn. Reson. 294, 35–43 (2018).
Reci, A., Ainte, M. I., Sederman, A. J., Mantle, M. D. & Gladden, L. F. Optimising sampling patterns for bi-exponentially decaying signals. Magn. Reson. Imaging 56, 14–18 (2019).
Guest, J., Kiraly, P., Nilsson, M. & Morris, G. A. Signal-to-noise ratio in diffusion-ordered spectroscopy: How good is good enough?. Magn. Reson. 2, 733–739 (2021).
Fan Yiren, N. Z., Shaogui, Deng, Wenjie, Zhao & Bingkai, Liu. Experimental study on NMR measurement parameters and reservoir properties. Pet. Geol. Exp. 27(6), 624–626 (2005).
Fu Yonghong, S., Kaichen, Z., Liang, W., Qian, D. Preliminary study and comparison of porosity measurement parameters of shale core gas measurement. Spec. Oil Gas Reserv., 25(3), (2018).
Abou, J. A. The Monte Carlo Methods—Recent Advances, New Perspectives and Applications (IntechOpen, 2022).
Bidokhti, P. S. Theory, Application, and Implementation of Monte Carlo Method in Science and Technology (Books on Demand, 2019).
Gabrié, M., Rotskoff, G. M. & Vanden-Eijnden, E. Adaptive Monte Carlo augmented with normalizing flows. Proc. Natl. Acad. Sci. U. S. A. 119, e2109420119 (2022).
Guth, P. A., Kaarnioja, V., Kuo, F. Y., Schillings, C. & Sloan, I. H. A Quasi-Monte Carlo method for optimal control under uncertainty. SIAM/ASA J. Uncertain. Quantif. 9, 354–383 (2021).
Heng J, Bishop AN, Deligiannidis G, Doucet A. Controlled sequential Monte Carlo. ar**v: Computation (2017).
Hübler, C. Analysing binding stoichiometries in NMR titration experiments using Monte Carlo simulation and resampling techniques. PeerJ Anal. Chem. 4, e23 (2022).
Jamroz, B. F. & Williams, D. F. Consistency in Monte Carlo uncertainty analyses. Metrologia 57, 065008 (2020).
Leal, J. E. S., da Silva, J. A. & Arencibia, R. V. Contributions to the adaptive Monte Carlo method. J. Braz. Soc. Mech. Sci. Eng. https://doi.org/10.1007/s40430-020-02548-3 (2020).
Rahbari, A. et al. Recent advances in the continuous fractional component Monte Carlo methodology. Mol. Simul. 47, 804–823 (2020).
Rata, D. G., Casanova, F., Perlo, J., Demco, D. E. & Blümich, B. Self-diffusion measurements by a mobile single-sided NMR sensor with improved magnetic field gradient. J. Magn. Reson. 180, 229–235 (2006).
Funding
This research was funded by the National Natural Science Foundation of China (No. 51707028), Chongqing Natural Science Foundation (No. cstc2021jcyj-msxmX0470), Science and Technology Funds of Chongqing Municipal Education Commission (KJQN202100533), and Innovation and Entrepreneurship Training Program for College Students (S202210637053).
Author information
Authors and Affiliations
Contributions
All authors contributed to the study conception and design. The experimental preparation, data collection and analysis were carried out by P.G. and R.Z., the analysis and manuscript preparation were carried out by J.Z. and J.S. and B.L. put forward constructive suggestions for discussion and analysis. The first draft of the manuscript was written by P.G., and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Guo, P., Zhang, R., Zhang, J. et al. A Monte Carlo algorithm to improve the measurement efficiency of low-field nuclear magnetic resonance. Sci Rep 13, 10533 (2023). https://doi.org/10.1038/s41598-023-37731-8
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-023-37731-8
- Springer Nature Limited