Two-dimensional nuclear magnetic resonance inversion method and device based on sparrow algorithm-RSVD combination

By combining the sparrow algorithm and the RSVD algorithm, the two-dimensional nuclear magnetic resonance inversion data is compressed and optimized, and the problem of slow inversion speed in the existing technology is solved, and efficient and instant two-dimensional nuclear magnetic inversion is achieved.

CN119940058APending Publication Date: 2025-05-06PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311445351.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing two-dimensional nuclear magnetic resonance inversion method improves the inversion accuracy while reducing the inversion speed, making it difficult to meet the demand for real-time inversion during logging.

Method used

The sparrow algorithm is combined with the random singular value decomposition algorithm (RSVD) to compress the data through RSVD, and then the compressed data is inverted by the sparrow algorithm, which significantly improves the inversion speed and maintains high accuracy.

Benefits of technology

It significantly accelerates the speed of two-dimensional nuclear magnetic inversion, ensures inversion accuracy, reduces calculation time and hardware costs, and is suitable for real-time inversion of two-dimensional nuclear magnetic logs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940058A_ABST
    Figure CN119940058A_ABST
Patent Text Reader

Abstract

The invention discloses a two-dimensional nuclear magnetic resonance inversion method and device based on sparrow algorithm-RSVD combination, and belongs to the technical field of nuclear magnetic resonance inversion. Comprising the following steps: S1, designing and generating a forward model suitable for two-dimensional nuclear magnetic inversion; s2, setting the number of iterations of a random singular value algorithm RSVD according to the forward modeling model, and performing data compression by using the random singular value algorithm RSVD; s3, setting the number of iterations of the sparrow algorithm, and performing inversion on the compressed data input by using the sparrow algorithm; and S4, calculating inversion time and a relative error and generating a two-dimensional spectrum. According to the method, the RSVD algorithm is used for compressing the data, and then the sparrow algorithm is used for inverting the compressed data, so that the inversion speed can be remarkably increased during two-dimensional nuclear magnetic inversion, the inversion precision can be ensured, and the calculation time and the hardware cost are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of nuclear magnetic resonance inversion technology, and in particular to a two-dimensional nuclear magnetic resonance inversion method and device based on a sparrow algorithm-RSVD combination. Background Art

[0002] Nuclear magnetic resonance (NMR) logging technology has great advantages in complex reservoir fluid identification, pore structure identification, and fluid permeability analysis and calculation. One-dimensional NMR logging has been developed for a long time, but due to the overlap of lateral relaxation times of fluids with different properties, it is impossible to completely detect reservoirs with multiple fluids coexisting. Two-dimensional NMR has gradually become the focus of research today.

[0003] At present, the two-dimensional NMR inversion method is developing rapidly. Commonly used methods include the traditional singular value decomposition algorithm (SVD), the truncated singular value decomposition algorithm (TSVD), the multi-echo string data joint inversion method and the SIRT-based two-dimensional NMR inversion algorithm. The least squares decomposition (LSQR) algorithm proposed in recent years and the inversion hybrid algorithm that uses the LSQR inversion result as the initial value input to TSVD have effectively improved the accuracy and speed of two-dimensional NMR inversion. Adding echo strings and inversion parameters to two-dimensional NMR logging can greatly enhance the inversion effect, but this will also lead to a decrease in the inversion speed, which is very unfavorable for real-time inversion during logging.

[0004] Based on the above-mentioned problems, the present invention proposes a two-dimensional nuclear magnetic resonance fast inversion algorithm combined with a sparrow algorithm and RSVD. The algorithm compresses the data through a random singular value algorithm (RSVD), and then uses the sparrow algorithm to invert the compressed data, which can significantly improve the inversion speed without reducing the inversion accuracy, which has great gain for two-dimensional nuclear magnetic resonance logging. Summary of the invention

[0005] The present invention aims to solve the shortcomings of the two-dimensional nuclear magnetic resonance inversion method in the prior art, and proposes a two-dimensional nuclear magnetic resonance inversion method and device based on the sparrow algorithm-RSVD combination, compresses data with a random singular value decomposition algorithm, and then uses the sparrow algorithm to invert the compressed data, thereby effectively accelerating the inversion speed and ensuring the inversion accuracy.

[0006] In order to achieve the above-mentioned object of the invention, the technical solution of the present invention is as follows:

[0007] A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination, characterized in that it comprises the following steps:

[0008] S1. Design and generate a forward model suitable for 2D NMR inversion;

[0009] S2, setting the number of iterations of the random singular value algorithm RSVD according to the forward model, and using the random singular value algorithm RSVD algorithm to perform data compression;

[0010] S3, setting the number of iterations of the sparrow algorithm, and using the sparrow algorithm to invert the compressed data input;

[0011] S4. Calculate the inversion time and relative error and generate a two-dimensional spectrum.

[0012] Furthermore, the forward model suitable for two-dimensional nuclear magnetic resonance inversion is a two-dimensional model that obeys Gaussian fluid distribution. When the forward model used for two-dimensional nuclear magnetic resonance inversion is constructed using nuclear magnetic resonance parameters, it includes an oil-water model and a gas-water model, and the constructed objective function is min||Ax-b||2, x≥0.

[0013] Furthermore, when using the random singular value algorithm RSVD algorithm for data compression, the submatrix Q is constructed T AW∈R K ×K , where A is the input matrix, Q T is the transpose of matrix Q, R K×K It is a two-dimensional zero matrix with dimension K. The matrix of the forward model is compressed by this submatrix to obtain the reconstructed matrix.

[0014] Furthermore, the submatrix Q T AW∈R K×K The method to obtain is:

[0015] Create low-dimensional sub-matrices Q and W of dimension K so that ||A-QQ T AWW T || 2 ≤ε; where A is the input matrix and ε is the positive error tolerance; then the compressed submatrix is ​​restricted to the subspace, i.e., Q T AW∈R K×K , where Q T is the transpose of matrix Q, R K×K is a two-dimensional zero matrix of dimension K.

[0016] Furthermore, the inversion of the compressed data input by using the Sparrow algorithm includes: first, using the Sparrow algorithm to invert the submatrix Q T AW∈R K×K The small non-zero singular values ​​in are optimized to reduce the condition number of the matrix and suppress the noise of the sub-matrix to obtain high signal-to-noise ratio data; then, the matrix after noise suppression is inverted and the singular values ​​of the matrix are solved.

[0017] Furthermore, the noise suppression of the sub-matrix includes:

[0018] Input submatrix Q T AW∈R K×K Involve it in the following solution process:

[0019]

[0020] Among them, t is the current iteration count, iter max is the maximum number of iterations set, the matrix position R of the i-th solution in the j-th column of Y 2 is the warning value, ST is the safety value; Q is a random number that obeys the normal distribution, L is a column vector in which each element is 1; α is a random number distributed between 0 and 1.

[0021] Furthermore, when the sparrow algorithm is used to invert the compressed matrix, the iterative process is:

[0022] in is the current optimal solution position, is the solution with the worst fitness at present, β is the control step size parameter, K is a random number (-1,1), f i is the current fitness value, f g is the current best fitness value, f w is the current worst fitness value, and ε is the error control value.

[0023] The present invention also provides a two-dimensional nuclear magnetic resonance inversion device based on the sparrow algorithm-RSVD combination, comprising:

[0024] The forward model generation module is used to design and generate a forward model suitable for two-dimensional nuclear magnetic inversion;

[0025] A data compression module is used to set the number of iterations of the random singular value algorithm RSVD according to the forward model, and to perform data compression using the random singular value algorithm RSVD algorithm;

[0026] The sparrow algorithm inversion module is used to set the number of iterations of the sparrow algorithm and use the sparrow algorithm to invert the compressed data input;

[0027] The inversion result generation module is used to calculate the inversion time, relative error and generate a two-dimensional spectrum.

[0028] In summary, the present invention has the following advantages:

[0029] The inversion method of the present invention compresses data using a random singular value decomposition (RSVD) algorithm, and then uses the sparrow algorithm to invert the compressed data. When performing two-dimensional nuclear magnetic resonance inversion, the inversion speed can be significantly accelerated, and the inversion accuracy can be guaranteed, thereby effectively reducing the calculation time and hardware cost. The design is reasonable and has good effects.

[0030] By inverting (T2, D) and (T1, T2)(T1, D) of two fluid distribution models, the present invention clarifies that the algorithm proposed in the present invention has higher inversion accuracy than LSQR-RSVD, occupies less memory, provides great convenience for parallel computing, and can provide a reference for the real-time inversion of two-dimensional nuclear magnetic resonance. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A flow chart of a two-dimensional nuclear magnetic resonance fast inversion algorithm combined with a sparrow algorithm and RSVD in the present invention;

[0032] Figure 2 It is a (T2-D) inversion result diagram of the oil-water model of the present invention based on the sparrow algorithm-RSVD joint algorithm;

[0033] Figure 3 It is a (T2-D) inversion result diagram of the gas-water model of the present invention based on the Sparrow algorithm-RSVD combined algorithm;

[0034] Figure 4 It is the (T1-T2) inversion result diagram of the oil-water model of the present invention based on the sparrow algorithm-RSVD joint algorithm;

[0035] Figure 5 It is the (T1-T2) inversion result diagram of the gas-water model of the present invention based on the Sparrow algorithm-RSVD joint algorithm;

[0036] Figure 6 It is the (T1-D) inversion result diagram of the oil-water model of the present invention based on the sparrow algorithm-RSVD joint algorithm;

[0037] Figure 7 This is the (T1-D) inversion result diagram of the gas-water model of the present invention based on the Sparrow algorithm-RSVD combined algorithm. DETAILED DESCRIPTION

[0038] The present invention is further described in detail below in conjunction with examples, but the embodiments of the present invention are not limited thereto.

[0039] The present invention proposes a two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination, and its implementation process is as follows: Figure 1 As shown, the following steps are included:

[0040] Step 1: Design and generate a forward model suitable for two-dimensional nuclear magnetic resonance inversion. The forward model suitable for two-dimensional nuclear magnetic resonance inversion is a two-dimensional model that obeys Gaussian fluid distribution. When using nuclear magnetic resonance parameters to construct the forward model used for two-dimensional nuclear magnetic resonance inversion, it includes two fluid models: oil-water model and gas-water model.

[0041] For two-dimensional NMR inversion, the fluid is assumed to exist in a porous medium. Under the action of the gradient field, according to the different assumed fluid models and using the corresponding NMR parameters, the CPMG pulse sequence can be used to obtain the echo train of the two-dimensional NMR response of the fluid in the medium.

[0042] Among them, the two-dimensional NMR signal can be written as: b(t,T E ,T w )=∫∫f(x,y)K 1 (x)K 2 (y)dxdy+ε;

[0043] Where:

[0044] b(t,T E ,T w ) is the echo amplitude at time t;

[0045] f(x,y) is the two-dimensional proton number distribution;

[0046] ε is the noise signal;

[0047] k 1 (x), k 2 (y) are the kernel functions of x and y respectively.

[0048] For different inversion parameters, by using different kernel functions k 1 (x), k 2 (y) can get the signal of the forward model. In this process, the discrete response signal equation is combined with the linear equation constraint of nuclear magnetic resonance, and the inversion model can be transformed into:

[0049] A ne×(nx×ny) X (nx×ny)×1 =b ne ,X≥0;

[0050] Then the inverse solution becomes:

[0051] is min||Ax-b|| 2 , x ≥ 0;

[0052] Among them, A is a ne×nx×ny matrix, ne is the number of echoes and the number of rows of matrix A, the number of unknowns is nx×ny, and matrix A is usually a Vandermonde matrix with insufficient rank, and its singular values ​​decay rapidly to zero.

[0053] Two-dimensional NMR technology uses the longitudinal relaxation time (T 1 ), transverse relaxation time (T 2 ) and the diffusion coefficient (D) are identified by the two-dimensional combination difference. For the two-dimensional NMR inversion, it is assumed that it is under the condition of complete polarization. When testing the inversion algorithm proposed in the present invention, the gradient field strength is set to 4.0×10 -3 T / cm; set the gyromagnetic ratio (γ) to 2π×42.58×10 6 Hz / T; Two fluid occurrence states are designed, type one is light oil (40%), free water (30%) and bound water (30%), and type two is natural gas (40%), free water (30%) and bound water (30%).

[0054] When performing (T2-D) two-dimensional inversion for the set fluid model, the echo interval TE is set to [0.6, 1.2, 4.8, 9.6, 19.6].

[0055] When performing (T1-T2) two-dimensional inversion on the set fluid model, the echo interval TE is 1.2 ms and the waiting time TW is set to [0.1, 0.1, 1.0, 10.0, 100.0, 200, 500.0, 1000.0, 5000.0, 10000.0, 10000.0].

[0056] When performing (T1, D) inversion on the fluid model, the echo interval of the oil-water model is set to [0.6, 1.2, 2.4, 3.6, 4.8, 7.2, 9.6, 15.6, 16.2, 19.6] through multiple tests, and the waiting time is consistent with that in the (T1-T2) two-dimensional inversion.

[0057] For the gas-water model, due to the different diffusion properties of gases, the sequence of TE and TW is increased, where TE is set to [0.6, 1.2, 2.4, 3.6, 4.8, 7.2, 9.6, 12.0, 14.4, 15.6, 19.6, 24.6, 27.0, 29.4, 34.2] and TW is set to [0.1, 0.2, 1.0, 10.0, 100.0, 200.0, 500.0, 1000.0, 2000.0, 4000.0, 6000.0, 8000.0, 10000.0, 10000.0, 10000.0].

[0058] Step 2: By analyzing the matrix size of the forward model, the number of iterations of the random singular value algorithm RSVD is set while meeting the error tolerance, and then the forward model is compressed. In this invention, the number of iterations is set to 600 and the error tolerance is 10 -9 ;

[0059] The forward model is compressed based on the random singular value algorithm RSVD. The random singular value algorithm RSVD compresses the forward model data mainly by establishing a sub-matrix much smaller than the forward model matrix size to obtain the main information of the forward model. The core idea is to establish low-dimensional sub-matrices Q and W with a dimension of K, so that: ||A-QQ T AWW T || 2 ≤ε, where A is the compressed submatrix and ε is the positive error tolerance. Although K should be as small as possible, it should be ensured to be close to the input matrix A, and then the compressed submatrix is ​​restricted to the subspace R K×K , i.e. Q T AW∈R K×K , where Q T is the transpose of matrix Q, R K×K is a two-dimensional zero matrix of dimension K.

[0060] Step 3: Use the sparrow algorithm to invert the compressed sub-matrix A;

[0061] Since the target matrix is ​​usually ill-conditioned, when the target matrix is ​​inverted by the sparrow algorithm, the target matrix Q is first T AW∈R K×K Substitute the following solution process, that is, optimize the small non-zero singular values ​​in the target matrix through the sparrow algorithm to reduce the condition number of the matrix, so as to obtain high signal-to-noise ratio data:

[0062]

[0063] Among them, t is the current iteration count, if is the conditional selection, iter max is the maximum number of iterations set, Y is the matrix position of the i-th solution in the j-th column, R 2 is the warning value, ST is the safety value; Q is a random number that obeys the normal distribution, L is a column vector in which each element is 1; α is a random number distributed between 0 and 1. When inverting, through the iterative process:

[0064] Seek the global optimal solution for the target matrix to obtain the inversion result.

[0065] Through the above calculations, the noise of the target matrix is ​​suppressed, and the inversion process can be regarded as solving an optimization problem. Then, the matrix after noise suppression is inverted, and the singular value of the target matrix is ​​solved using the following process. The specific solution process is as follows:

[0066]

[0067] in, QT AW∈R K×K Solve the singular values ​​after noise suppression. and is an orthogonal matrix. Obviously, U∑V T is the approximate singular value decomposition of A, and the inversion result is obtained.

[0068] Step 4: Calculate the inversion time, relative error and memory usage and generate a two-dimensional spectrum.

[0069] The two-dimensional NMR inversion method based on the sparrow algorithm-RSVD combination described in this embodiment can quickly invert the two-dimensional NMR data of oil-water and gas-water fluids coexisting.

[0070] As shown in the following table, Table 1 shows the time and memory used for inversion of the method proposed in the present invention, and Table 2 shows the time and memory used for inversion of the LSQR-RSVD algorithm. Figure 2 The (T2-D) two-dimensional inversion results of the oil-water model based on the Sparrow algorithm-RSVD joint algorithm; Figure 3 The (T2-D) two-dimensional inversion result of the gas-water model based on the Sparrow algorithm-RSVD joint algorithm. Figure 4 The (T1-T2) two-dimensional inversion results of the oil-water model based on the Sparrow algorithm-RSVD joint algorithm; Figure 5 The (T1-T2) two-dimensional inversion results of the gas-water model based on the Sparrow algorithm-RSVD joint algorithm; Figure 6 The (T1-D) two-dimensional inversion results of the oil-water model based on the Sparrow algorithm-RSVD joint algorithm; Figure 7 This is the (T1-D) inversion result of the gas-water model based on the Sparrow algorithm-RSVD combined algorithm.

[0071] Table 1 Sparrow algorithm-RSVD joint algorithm inversion calculation time and memory usage

[0072]

[0073] Table 2 LSQR-RSVD joint algorithm inversion calculation time and memory usage

[0074]

[0075] By inverting the (T2-D), (T1-T2), and (T1-D) of two fluid distribution models, compared with the LSQR-RSVD inversion algorithm, the present invention has higher inversion accuracy and smaller occupied content. The small memory occupation provides great convenience for parallel computing and can provide a reference for the real-time inversion of two-dimensional nuclear magnetic resonance.

[0076] Example 2

[0077] This embodiment provides a two-dimensional nuclear magnetic resonance inversion device based on the sparrow algorithm-RSVD combination, including:

[0078] The forward model generation module is used to design and generate a forward model suitable for two-dimensional nuclear magnetic inversion;

[0079] A data compression module is used to set the number of iterations of the random singular value algorithm RSVD according to the forward model, and to perform data compression using the random singular value algorithm RSVD algorithm;

[0080] The sparrow algorithm inversion module is used to set the number of iterations of the sparrow algorithm and use the sparrow algorithm to invert the compressed data input;

[0081] The inversion result generation module is used to calculate the inversion time, relative error and generate a two-dimensional spectrum.

[0082] The specific functional implementation of each of the above modules corresponds one-to-one to the corresponding steps in the method of Example 1, and will not be repeated here.

[0083] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination, characterized in that: The following steps are involved: S1. Design and generate a forward model suitable for 2D NMR inversion; S2, setting the number of iterations of the random singular value algorithm RSVD according to the forward model, and using the random singular value algorithm RSVD algorithm to perform data compression; S3, setting the number of iterations of the sparrow algorithm, and using the sparrow algorithm to invert the compressed data input; S4. Calculate the inversion time and relative error and generate a two-dimensional spectrum.

2. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination according to claim 1, characterized in that: The forward model suitable for two-dimensional nuclear magnetic inversion is a two-dimensional model that obeys Gaussian fluid distribution.

3. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination according to claim 1, characterized in that: When using nuclear magnetic parameters to construct a forward model for two-dimensional nuclear magnetic inversion, an oil-water model and a gas-water model are included, and the objective function of the constructed model is min||Ax-b||2, x≥0.

4. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination according to claim 1, characterized in that: When using the random singular value algorithm RSVD algorithm for data compression, construct the submatrix Q T AW∈R K×K , where Q T is the transpose of matrix Q, R K×K It is a two-dimensional zero matrix with dimension K. The matrix of the forward model is compressed by this submatrix to obtain the reconstructed matrix.

5. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination according to claim 4, characterized in that: Submatrix Q T AW∈R K×K The method to obtain is: Create low-dimensional sub-matrices Q and W of dimension K so that ||A-QQ T AWW T || 2 ≤ε; where A is the input matrix and ε is the positive error tolerance; then the compressed submatrix is ​​restricted to the subspace, i.e., Q T AW∈R K×K , where Q T is the transpose of matrix Q, R K×K is a two-dimensional zero matrix of dimension K.

6. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination according to claim 4, characterized in that: The inversion of the compressed data input by using the Sparrow algorithm includes: first, using the Sparrow algorithm to invert the submatrix Q T AW∈R K×K The small non-zero singular values ​​in are optimized to reduce the condition number of the matrix and suppress the noise of the sub-matrix to obtain high signal-to-noise ratio data; then, the matrix after noise suppression is inverted and the singular values ​​of the matrix are solved.

7. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination according to claim 6, characterized in that: The noise suppression of the sub-matrix comprises: Input submatrix Q T AW∈R K×K Involve it in the following solution process: Among them, t is the current iteration count, iter max is the maximum number of iterations set, the matrix position R2 of the i-th solution in the j-column of Y is the warning value, ST is the safety value; Q is a random number that obeys the normal distribution, L is a column vector whose every element is 1; α is a random number distributed between 0 and 1.

8. A two-dimensional nuclear magnetic resonance inversion method based on the sparrow algorithm-RSVD combination according to claim 7, characterized in that: When the sparrow algorithm is used to invert the compressed matrix, the iterative process is: in is the current optimal solution position, is the solution with the worst fitness at present, β is the control step size parameter, K is a random number (-1,1), f i is the current fitness value, f g is the current best fitness value, f w is the current worst fitness value, and ε is the error control value.

9. A two-dimensional nuclear magnetic resonance inversion device based on the sparrow algorithm-RSVD combination, characterized in that: include: The forward model generation module is used to design and generate a forward model suitable for two-dimensional nuclear magnetic inversion; A data compression module is used to set the number of iterations of the random singular value algorithm RSVD according to the forward model, and to perform data compression using the random singular value algorithm RSVD algorithm; The sparrow algorithm inversion module is used to set the number of iterations of the sparrow algorithm and use the sparrow algorithm to invert the compressed data input; The inversion result generation module is used to calculate the inversion time, relative error and generate a two-dimensional spectrum.