A FNNLS-based method for nuclear magnetic resonance data inversion
By changing the object of the fitting calculation through the FNNLS algorithm, the problems of slow speed and low accuracy of nuclear magnetic resonance data inversion in the existing technology are solved, and fast and accurate nuclear magnetic resonance data inversion is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2026-04-03
AI Technical Summary
Existing nuclear magnetic resonance data inversion methods suffer from problems such as slow computation speed, inability to adapt to large-scale data inversion, relatively optimal results, and complex and unstable penalty function selection.
The Fast Non-Negative Least Squares (FNNLS) algorithm is adopted. By changing the object of fitting calculation, the full matrix fitting is transformed into small-region feature array fitting, which reduces computational redundancy and transforms the nuclear magnetic resonance data inversion problem into a least squares form for solution.
It significantly improves the speed and accuracy of NMR data inversion, is applicable to one-dimensional and multi-dimensional data inversion, and enhances the accuracy and stability of the results.
Smart Images

Figure CN115951419B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nuclear magnetic resonance technology, and in particular to a nuclear magnetic resonance data inversion method based on FNNLS. Background Technology
[0002] In the exploration and development of oil, nuclear magnetic resonance (NMR) technology plays a crucial role in studying rock physics and guiding reservoir location. NMR data can effectively evaluate reservoir characteristics. For example, the T2 spectrum distribution can characterize the pore structure of formations, calculate effective porosity, and distinguish between bound water and free water. The two-dimensional distribution of T1-T2 and D-T2 spectra can qualitatively identify reservoir fluid properties or quantitatively calculate fluid saturation. This formation rock physics information provides accurate and reliable data for formation and reservoir evaluation, development planning, and summarizing regional patterns.
[0003] Currently, inversion methods for raw NMR data are mainly divided into fitting inversion methods and iterative inversion methods. Fitting inversion methods mainly include optimization fitting methods such as Non-negative Least Squares (NNLS), while iterative inversion methods mainly include direct solution methods such as Truncation Singular Value Decomposition (TSVD) and matrix iteration methods. NMR inversion can be categorized into one-dimensional, two-dimensional, and multi-dimensional inversion based on the data structure. NNLS and TSVD methods have good applications in one-dimensional inversion. Two-dimensional inversion can usually be transformed into a one-dimensional least squares problem using tensor products (Krock inner products) and then solved using methods such as NNLS and TSVD. However, due to the excessive computational cost of two-dimensional data, the solution speed is significantly reduced; setting a long sampling step can consume 10 to 100 times more time. Therefore, finding an accurate and fast inversion algorithm is a continuous pursuit in the field of NMR inversion.
[0004] Inversion methods that rely on iterative calculations typically require setting a termination condition (such as residuals), which often results in a relatively optimal solution. In contrast, optimization algorithms such as NNLS can preserve the absolute optimal solution during successive calculations. Therefore, without considering the computational time cost, optimization algorithms such as NNLS provide more stable solutions. If the computational complexity of NNLS can be reduced, higher-quality solutions can be obtained in one-dimensional or two-dimensional inversions.
[0005] Based on the above discussion, this patent proposes a nuclear magnetic resonance data inversion method based on FNNLS (Fast Non-Negative Least Squares).
[0006] A review of relevant literature revealed that some scholars have developed nuclear magnetic resonance inversion methods using NNLS, TSVD, and other techniques, and have achieved good results to a certain extent.
[0007] However, in the process of inverting raw NMR data using existing inversion methods (NNLS, TSVD, etc.), the above-mentioned existing methods have the following shortcomings: First, the traditional NNLS algorithm usually performs linear fitting on the entire inversion sequence to obtain a single-step optimal solution, which makes it unsuitable for inverting large-scale data and difficult to apply in practice; Second, the inversion method through iterative calculation (TSVD) usually requires setting a termination condition (such as setting a residual threshold), which leads to the obtained result often being a relatively optimal solution, and not a true accurate solution; Third, both of the above algorithms require the addition of a penalty function of appropriate magnitude, and the process of selecting the magnitude of the penalty function is relatively complex and unstable. Summary of the Invention
[0008] The purpose of this invention is to solve the problems existing in the prior art and to propose a nuclear magnetic resonance data inversion method based on FNNLS.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] A method for inverting nuclear magnetic resonance data based on FNNLS includes the following steps:
[0011] Step S1: First, acquire the raw NMR data obtained from the actual measurement using an NMR instrument, and select the kernel function of the response based on the radio frequency pulse type. Taking the CPMG sequence as an example, the relevant calculation formula for its T2 relaxation time is as follows:
[0012]
[0013] In the formula, M(t) is a function of the total magnetization as a function of time, and T... 2i For different pore types, the T2 relaxation time, x i The pore type represents the proportion of the whole, and t is the measurement time parameter;
[0014] Step S2: Set the step size n of the inversion matrix and represent the inversion process in matrix form:
[0015] M = AX
[0016]
[0017]
[0018]
[0019] In the formula, A is the inversion matrix constructed based on the negative exponential function, X is the column vector representing the proportion of each type of pore, m is the number of sampling points of the total magnetization, and n is the sampling length of the T2 relaxation spectrum.
[0020] Step S3: For the above inversion problem, the least squares linear regression model is commonly used. The column vector X representing the proportion of each type of pore is used as the linear fitting parameter, and the residuals of all observations are used as the loss function. When the loss function Q is minimized, the sample is considered to have met the least squares fitting condition.
[0021]
[0022] In the formula, M i Let A be the i-th value of the acquired signal. i X is the i-th row vector of the inversion matrix, and X is the column vector representing the proportion of each type of pore.
[0023] Traditional nonnegative least squares (NNLS) methods have significant limitations in terms of computational complexity, making them unsuitable for inversion of long T² domain points or high-dimensional data. By analyzing the shortcomings of traditional NNLS methods, this paper proposes a Fast Nonnegative Least Squares (FNNLS) algorithm. In the least squares fitting process, the algorithm changes the computational object of the fitting process. By adding an intermediate array P, the original full matrix fitting is transformed into fitting a small-region feature array P. The feature array P is updated with the optimal value in a single step, significantly reducing the computational redundancy in the linear fitting process.
[0024] Step S4: Input the raw data measured by the nuclear magnetic resonance instrument into the program in the specified format, select an appropriate inversion kernel function, and transform the inversion problem into the least squares form. Then, calculate the inversion result using the FNNLS method.
[0025] Beneficial effects:
[0026] 1. This invention proposes a method for inverting raw nuclear magnetic resonance data based on FNNLS, which significantly improves the speed of nuclear magnetic resonance data inversion using least squares algorithms.
[0027] 2. This invention has the universality of inversion, and can be used not only for one-dimensional data inversion such as T1 and T2, but also for multi-dimensional data inversion such as T1-T2 and D-T2, and has higher accuracy than iterative methods.
[0028] This invention improves the data optimization method in the least squares process, and implements the FNNLS algorithm by drawing software flowcharts and writing example software. It is then applied to actual one-dimensional and two-dimensional nuclear magnetic resonance inversion data, improving the accuracy and speed of least squares-based algorithms for nuclear magnetic resonance data inversion. Attached Figure Description
[0029] Figure 1 This is a flowchart of the FNNLS calculation proposed in this invention;
[0030] Figure 2 Examples of T1 spectrum, T2 spectrum, T1-T2 spectrum, and D-T2 spectrum inversion proposed in this invention;
[0031] Figure 3 This is a comparison chart of data inversion using the variable signal-to-noise ratio model proposed in this invention;
[0032] Figure 4 This is a comparison diagram of the inversion between NNLS and FNNLS proposed in this invention;
[0033] Figure 5 The figures show the inversion results of the three sample data proposed in this invention. Detailed Implementation
[0034] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0035] Reference Figure 1-5 A method for inverting nuclear magnetic resonance data based on FNNLS includes the following steps:
[0036] Step S1: First, acquire the raw NMR data obtained from the actual measurement using an NMR instrument, and select the kernel function of the response based on the radio frequency pulse type. Taking the CPMG sequence as an example, the relevant calculation formula for its T2 relaxation time is as follows:
[0037]
[0038] In the formula, M(t) is a function of the total magnetization as a function of time, and T... 2i For different pore types, the T2 relaxation time, x i The pore type represents the proportion of the whole, and t is the measurement time parameter;
[0039] Step S2: Set the step size n of the inversion matrix and represent the inversion process in matrix form:
[0040] M = AX
[0041]
[0042]
[0043]
[0044] In the formula, A is the inversion matrix constructed based on the negative exponential function, X is the column vector representing the proportion of each type of pore, m is the number of sampling points of the total magnetization, and n is the sampling length of the T2 relaxation spectrum.
[0045] Step S3: For the above inversion problem, the least squares linear regression model is commonly used. The column vector X representing the proportion of each type of pore is used as the linear fitting parameter, and the residuals of all observations are used as the loss function. When the loss function Q is minimized, the sample is considered to have met the least squares fitting condition.
[0046]
[0047] In the formula, M i Let A be the i-th value of the acquired signal. i X is the i-th row vector of the inversion matrix, and X is the column vector representing the proportion of each type of pore.
[0048] Traditional nonnegative least squares (NNLS) methods have significant limitations in terms of computational complexity, making them unsuitable for inversion of long T² domains or high-dimensional data. By analyzing the shortcomings of traditional NNLS methods, this paper proposes a Fast Nonnegative Least Squares (FNNLS) algorithm. In the least squares fitting process, the algorithm changes the computational object of the fitting process. By adding an intermediate array P, the original full matrix fitting is transformed into fitting a small-region feature array P. The feature array P is updated with the optimal value in a single step, significantly reducing the computational redundancy of the linear fitting process. The FNNLS computation flowchart is shown below. Figure 1 As shown;
[0049] Step S4: Input the raw data measured by the NMR instrument into the program in the specified format, select an appropriate inversion kernel function, and transform the inversion problem into a least-squares form. Calculate the inversion results using the FNNLS method. Examples of inversion results for T1, T2, T1-T2, and D-T2 spectra are provided. Figure 2 As shown.
[0050] The software used in this patent is built based on Python 3.7, with Numpy as the main software extension package, PyCharm as the running platform, and PyQtgraph as the data display control. The main functions are all integrated into the nuclear magnetic resonance data processing software POLIMAR2021.
[0051] A multi-exponential distribution model was constructed using a normal distribution, with a T2 domain sampling length of 100 points and a time domain sampling length of 5000. The time domain distribution of the model data is shown in the figure. Gaussian white noise of different amplitudes was added to the model, and inversion was performed on signals with signal-to-noise ratios of 5, 10, 20, 30, 40, and 50, respectively. The resulting T2 relaxation spectra are shown in the figure.
[0052] The robustness and accuracy of the FNNLS algorithm were tested using the value square deviation (VSD) between the inversion results and the model data with different signal-to-noise ratios (SNR). Since the model data is only 100 characters long and has a certain degree of randomness (i.e., the original data itself contains some noise), the VSD between the inverted data and the model data is minimized when the SNR = 30. (The comparison of inversion results is shown in the figure.) Figure 3 This demonstrates that the FNNLS algorithm has strong adaptability to data inversion for variable signal-to-noise ratio models.
[0053] Using example data measured from CPMG sequences, inversion was performed using both NNLS and FNNLS methods. The inversion rates and results were compared. The NNLS inversion speed was 0.9 s, and the FNNLS inversion speed was 0.26 s. The inversion results of the two methods completely overlapped, as shown below. Figure 4 As shown.
[0054] (2) The inversion results of two-dimensional nuclear magnetic resonance data, such as T1-T2 and D-T2 spectra, can realize the calculation of parameters such as oil-water separation boundary and accurate calculation of oil-water mixing ratio. The original D-T2 measurement data of three groups of samples with known oil-water volume ratios (100% water, 50% water and 50% oil, and 0% water and 100% oil) were used for example inversion comparison. The original data dimension was 20*15000.
[0055] Traditional NNLS inversion methods are too complex to be suitable for inverting two-dimensional NMR data. This paper selects a residual threshold of 10. -4 The TSVD iterative algorithm is compared with FNNLS. The inversion results for the three sample data are as follows: Figure 5 The statistical table of the inversion results is shown below:
[0056] Statistical table of TSVD and FNNLS inversion results
[0057]
[0058] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A nuclear magnetic resonance data inversion method based on FNNLS, characterized in that, Includes the following steps: Step S1: First, acquire the raw NMR data obtained from the actual measurement using an NMR instrument, and select the kernel function of the response based on the radio frequency pulse type. Taking the CPMG sequence as an example, the relevant calculation formula for its T2 relaxation time is as follows: Step S2: Set the step size n of the inversion matrix and represent the inversion process in matrix form: M = AX Step S3: For the above inversion problem, the least squares linear regression model is commonly used. The column vector X representing the proportion of each type of pore is used as the linear fitting parameter, and the residuals of all observations are used as the loss function. When the loss function Q is minimized, the sample is considered to have met the least squares fitting condition. Step S4: Input the raw data measured by the nuclear magnetic resonance instrument into the program in the specified format, select an appropriate inversion kernel function, and transform the inversion problem into the least squares form. Then, calculate the inversion result using the FNNLS method.
Citation Information
Patent Citations
LSQR-based low-field two-dimensional NMR spectrum inversion algorithm
CN104375108A
Two-dimensional nuclear magnetic resonance rapid inversion algorithm based on LSQR-RSVD
CN110147520A