APP下载

A machine learning framework for low-field NMR data processing

2022-06-02SiHuiLuoLiZhiXioYnJinGungZhiLioBinSenXuJunZhouCnLing

Petroleum Science 2022年2期

Si-Hui Luo ,Li-Zhi Xio ,*,Yn Jin ,Gung-Zhi Lio ,Bin-Sen Xu ,Jun Zhou ,b,Cn Ling

a College of Artificial Intelligence and College of Petroleum Engineering,China University of Petroleum,Beijing,102249,China

b China National Logging Corporation,Xi'an,Shaanxi 710076,China

c Changzhou Institute of Technology,Changzhou,Jiangsu,213000,China

Keywords:Dictionary learning Low-field NMR Denoising Data processing T2 distribution

ABSTRACT Low-field (nuclear magnetic resonance) NMR has been widely used in petroleum industry,such as well logging and laboratory rock core analysis.However,the signal-to-noise ratio is low due to the low magnetic field strength of NMR tools and the complex petrophysical properties of detected samples.Suppressing the noise and highlighting the available NMR signals is very important for subsequent data processing.Most denoising methods are normally based on fixed mathematical transformation or handdesign feature selectors to suppress noise characteristics,which may not perform well because of their non-adaptive performance to different noisy signals.In this paper,we proposed a “data processing framework” to improve the quality of low field NMR echo data based on dictionary learning.Dictionary learning is a machine learning method based on redundancy and sparse representation theory.Available information in noisy NMR echo data can be adaptively extracted and reconstructed by dictionary learning.The advantages and application effectiveness of the proposed method were verified with a number of numerical simulations,NMR core data analyses,and NMR logging data processing.The results show that dictionary learning can significantly improve the quality of NMR echo data with high noise level and effectively improve the accuracy and reliability of inversion results.

1.Introduction

As a golden tool that can directly detect and reveal the dynamics of fluid molecules in rock porous media,nuclear magnetic resonance (NMR) technology can quantitatively identify the fluid components and precisely provide petrophysical parameters,such as pore structure,fluid saturation,permeability,wettability,viscosity and so on (Coates et al.,1999;Liang et al.,2019;Liu et al.,2019;Deng et al.,2014;Jia et al.,2016;Xiao et al.,2013).It is very helpful for the evaluation of oil and gas reservoirs.With the attention gradually being focused on unconventional and complex reservoirs,the NMR wireline,LWD (Logging While Drilling) and core analysis techniques become more and more important and practical for complex and tight reservoirs evaluation (Xiao et al.,2015;Luo et al.,2019,2020),such as shale and ultra-deep tight sandstone reservoirs (Song and Kausik,2019).

However,the data signal-to-noise ratio (SNR) detected from low-field NMR instrument is normally low,which will affect the subsequent NMR data processing and interpretation work.Two reasons were concluded based on the recent publications in recent years.Firstly,the NMR instruments employ the static magnetic field generated by the permanent magnet to polarize the formation at certain depth of investigation (DOIs) (Liao et al.,2021).The magnetic field is extremely weak and varied with surrounding environment,resulting in lower signal amplitude.Secondly,unconventional reservoirs have a low porosity and permeability,leading to the acquired low signal amplitude(Xie et al.,2015;Song and Kausik,2019).It is necessary to increase averages during the acquisition period to meet the requirements of NMR data processing and interpretation when SNR of data is low.

Low field NMR technology adopts CPMG pulse sequence based on relaxation and diffusion mechanism (Carr and Purcell,1954;Meiboom and Gill,1958) to accurately measure the formation.By collecting echo data and inverting echo data with Inverse Laplace Transformation(ILT)methods,the distribution of one-dimensional(1D) or two-dimensional (2D) parameters such as T1,T2,T1-T2and D-T2of formation fluid can be obtained (Xie and Xiao,2011;Song et al.,2002;Hürlimann and Venkataramanan,2002;Sun and Dunn,2002).The acquisition of these parameters is the premise of NMR interpretation for oil and gas reservoirs.Generally,the signal response equation of 1D or 2D NMR can be attributed to the first kind of “Fredholm Integral Equation”,which is an illconditioned problem without referable analytical solutions.At present,the most inversion researches are based on Singular Value Decomposition(SVD)and Butler-Reeds-Dawsons(BRD)(Prammer,1994;Butler et al.,1981).However,a small disturbance from noise in echo data will cause the deviation of the inversion results.Therefore,various inversion methods constrained by penalty terms have been developed (Zou et al.,2016),by choosing regularization parameters and its weight,to keep the solutions smoother and sparser simultaneously,in other words,to ensure the stability and resolution of the inversion results (Guo et al.,2018,2019).In addition,using machine learning methods to directly invert the echo data,suppress the uncertainty of numerical solution and improve resolution of 1D or 2D distributions is a new research direction of NMR data processing(Parasram et al.,2021;Wang et al.,2017).However,the artificial network method (Parasram et al.,2021) needs a large of label data sets (at least 400000 groups) to train the model,which are based on the forward T2distribution model.In addition,the sparse Bayesian learning method (Wang et al.,2017) requires the prior knowledge with initial inversion result of echo data,to provide the overlapping information of 2D distribution.

Although various inversion methods emerged,the noise in the NMR signals still seriously affect the accuracy of the inversion results.How to improve the data quality,like suppressing noises while highlighting signals,is the fundamental issue to obtain more desirable NMR processing results.To this end,it is necessary to effectively suppress the noise characteristics introduced by the instrument and the surrounding environment and further improve the SNR of the raw echo data.A lot of meaningful works on lowfield NMR data denoising methods have been published.In the early stage,some researchers adopted time domain filtering(Edwards and Chen,1996)and SVD methods(Lin and Hwang,1993;Chen et al.,1994) to suppress noise by directly filtering out the noise and removing the smaller eigenvalues that represent the noise in the eigenvalue matrix respectively.These methods will lead to strong uncertainty in the inversion results.Subsequently,the mathematical transformation method based on multi-scale wavelet (Mallat and Hwang,1992) began to be used in the processing of NMR echo data with low signal-to-noise ratio.It is feasible because the wavelet can better fit the signal distribution under noise disturbance and extract the signal characteristics of raw echo data.Subsequently,a lot of research works depended on discrete wavelet (DWT) were published.Zheng and Zhang (2007)proposed a spatial correlation threshold denoising method based on non-decimated wavelet transformation.Wu et al.(2011)took a wavelet domain threshold method to realize the denoising process in digital phase signal detection period.Xie et al.(2014)compared three denoising methods of NMR echo data based on wavelet transformation,which proved that wavelet threshold method can obtain higher denoised results and more accurate formation porosity.Meng et al.(2015) proposed an adaptive wavelet packet threshold denoising algorithm to denoise NMR logging data,and verified the effectiveness of NMR data under the condition of low signal-to-noise ratio.Ge et al.(2015) proposed a method based on particle swarm optimization (PSO) algorithm to improve the performance of method,combination of wavelet threshold and timedomain exponential weighted moving average,to reduce the noise of echo data and achieved good inversion results.Recently,the methods based on mathematical morphology(Gao et al.,2020)and the combination of variable window sampling and discrete cosine transformation(DCT)(Gu et al.,2021)have also been used in the denoising process of the raw echo data,which can effectively suppress the noise amplitude to some degree.

In the past decades,the sparse representation theory had been widely used in compression,inversion,feature extraction and image noise reduction (Starck et al.,2010;Ahmed and Fahmy,2001).The basic idea of sparse representation is to use a dictionary (a mathematical transformation matrix) and several corresponding non-zero coefficients to represent the signal.The noise has the characteristics with randomness and cannot be sparsely represented so that the available signals can be highlighted.For aforementioned DWT and DCT method,the noise can be directly removed by eliminating the small coefficients containing noise characteristics.If most of the coefficients of noise are zero,or there are only existed several values closer to zero,better denoising results can be achieved by filtering the smaller coefficients.The coefficients with large absolute values will retain the most effective information in the raw echo data.However,fixed mathematical transformation,such as DCT (Gu et al.,2021) and DWT (Xie et al.,2014;Meng et al.,2015),cannot effectively represent them all due to fixed analytic formula.For different types of NMR signals,the selection of threshold is highly subjective.When the noise is greater than the signal,the fixed mathematical transformation methods cannot fully represent signal characteristics.This may result in mistaken elimination of the sparse coefficients that representing the real echo data during denoising procedure and lead to the reduction of the accuracy and reliability in subsequent inversion process.If an appropriate transformation matrix or dictionary can be constructed adaptively according to the characteristics of NMR data,it could produce better denoising effects and improve the quality of raw data by preserving the sparse characteristics of signal and eliminating redundant noise characteristics.

Dictionary learning (DL) is a machine learning method,which can extract signal characteristics from the raw echo data by a selfadaptive and adjustable dictionary learned from noisy signals.Therefore,stronger sparse representation ability than that of fixed mathematical transformation can be established.Dictionary learning has been widely used in seismic data(Beckouche and Ma,2014) and noisy image recovering (Xu et al.,2017;Tošić and Frossard,2011),but rarely applied to low-field NMR data processing.Therefore,in this paper,we will adopt dictionary learning and propose a “data processing framework” to adaptively learn the signal and noise characteristics from the raw NMR echo data.The sparse representation and dictionary updating are simultaneously operated with Orthogonal Match Pursuit (OMP) and K-SVD respectively.The difference of sparse characteristics between signal and noise can be processed and finally reconstructed to improve the quality of NMR echo data.We also applied dictionary learning to process NMR core analysis and well logging data,and verified the advantages of using dictionary learning in the low-field NMR data processing.The numerical simulations,core analysis and well logging data processing results show that the dictionary learning can further improve the inversion accuracy and reliability and spectrum resolution at low SNRs.It is believed that dictionary learning can play an important and practical role in NMR core analysis and downhole NMR data processing in the future.

2.Principle and method

2.1.Response equation for NMR measurement

We firstly consider about 1D NMR data,and conduct numerical experiments based on dictionary learning.The 1D NMR measurement usually refers to the measurement of longitudinal relaxation time T1and transverse relaxation time T2of saturated fluid rocks,which can be used to obtain important reservoir parameter information such as pore structure,fluid saturation and permeability(Coates et al.,1999).T1is usually measured by“Inversion Recovery”or “Saturation Recovery” method,and T2is measured by CPMG(Carr-Purcell-Meiboom-Gill) pulse sequence.When the polarization time is sufficient,the general response equation of onedimensional T1or T2measurement can be obtained:

In Equation(1),i=1,2.When i=1,it means the measurement of T1,if c1=1,c2=1,it means “Saturation Recovery” method,if c1=1,c2=2,it means“Inversion Recovery”method.When i=2,it means the measurement of T2,and c1=0,c2=-1.The discrete form of Equation (1) is

In Equation (2),j=1,2,…,n,n is the number of preselected relaxation time components.k=1,2,…,m,m is the number of echo,tiis the acquisition time (usually an integral multiple of the echo interval).bkis the echo signal amplitude,Ti,jis the j-th relaxation time component preselected by Ti,εkis measured noise,including instrument background noise and external electromagnetic noise,f(Ti,j)is the amplitude of relaxation time Ti,j.

Since T2measurement is mainly used in practical application,this paper only considers obtaining the spin echo data constructed by T2distribution.

2.2.Dictionary learning

Dictionary learning(DL)is a machine learning method,which is based on sparse representation theory to obtain the over complete dictionary and sparse representation of the signal through a given training sets.Assuming the signals can be sparsely represented by several atoms in an over complete dictionary (as shown in Fig.1),DL allows us to get rid of the limitation of selecting the corresponding methods for establishing fixed mathematical transformed basis matrix (fixed dictionary),and to adaptively and accurately capture the characteristics of the current data.

Dictionary learning mainly contains two procedures:sparse representation and dictionary atoms updating.With sufficient iterations of these two procedures,we can adaptively obtain the redundant dictionaries representing data characteristics.The general procedure is as described below:

Fig.1.Schematic of sparse representation with a dictionary for signals.Signals can be approximately represented by using a dictionary and corresponding sparse coefficients.The procedure for obtaining coefficients is sparse representation and for updating atoms is dictionary update.Dictionary learning is consisted of above two procedures.

Step 1.Inputting training signal data x,initial dictionary D0,number of iterations N,error standard ε.

Step 2.Initializing residual error r0=x,and giving initial dictionary D0,which is composed of signal or fixed transformation basis,and setting the number of iterations t=0.

Step 3.For the given initial dictionary D0,obtaining the sparse representation αkof the training signal x (Sparse representation).

Step 4.For the training signal x and its sparse representation αk,updating each atom dkin dictionary D column by column to obtain the updated dictionary Dt(Dictionary updating).

Step 5.Judging whether the number of iterations t is greater than N and whether D meets the requirements of the final conditions.If yes,stop the iteration and output the final dictionary D,otherwise,return to Step 3.

2.2.1.Sparse representation

According to the sparse representation theory,the sparse representation of a signal can be expressed as an optimization problem with constraints (Starck et al.,2010;Elad and Aharon,2006) as followed:

Equation (3) is an optimization problem based on error constraint,and Equation (4) is an optimization problem based on sparsity constraint,which are equivalent to each other;D is the dictionary,α is the sparsity coefficient,x is the original signal,ε is the error threshold,and T is the sparsity or the number of non-zero sparse coefficients.The sparse representation is a NP hard problem,which can be solved by algorithms such as basis pursuit(BP)(Chen et al.,2001),orthogonal matching pursuit(OMP)(Pati et al.,1993).OMP algorithm is widely used in sparse representation,data compression and reconstruction because of its good reconstruction efficiency and fast running speed.OMP algorithm is a typical greedy algorithm (Pati et al.,1993).Its general process is as followed:

In Step 5,the operation speed is slow due to the inverse process.Therefore,the “Improved Batch OMP” method (Rubinstein et al.,2008) can be adopted to replace the least squares inversion process by using Cholesky decomposition in the conventional OMP algorithm,which will largely accelerate the running speed of the algorithm and ensure the solution accuracy.

2.2.2.Dictionary updating

The dictionary updating starts after the sparse representation.The sparse vector α or sparse matrix A obtained from sparse representation is used to update the atoms dkin dictionary D.The objective function of dictionary updating is:

where X is the signal vector or matrix to be processed,dkand djare the j-th and k-th atoms in dictionary D,and αkand αjare the j-th and k-th elements in sparse coefficient matrix A,respectively.E is the corresponding error matrix,and Ejrepresents the error matrix except for djatom.

Generally,the SVD method is used to decompose the error matrix,and its corresponding function expression is:

The first column of matrix U obtained after decomposition is selected as the new djatom.The first row of matrix V is multiplied by first eigenvalue of positive semi-definite diagonal matrix Λ,which is calculated to update the sparse coefficient αjcorresponding to the djcolumn.Until all atoms are updated once,it is indicated that one iteration is completed.

Repeating the sparse representation and the dictionary update procedures until the number of iterations K is reached or the iteration error meets the pre-selected value ε,the final dictionary and sparse coefficients are obtained.Because SVD decomposition with K iterations is required,this method is also called K-SVD dictionary learning (Aharon et al.,2006).

2.3.Denoising with dictionary learning

The NMR echo data can be regarded as an aperiodic and unilateral signal in time-domain,which is subjected to the law of multi-exponential decay.The energy of the NMR signal is mainly concentrated in the front part of the signal.The faster the signal decays,the more the short relaxation components are indicated,and the long decay part indicate the long relaxation components,as shown in Fig.2.Fig.2(b)and(c)show the sparse representation of NMR echo data in DCT domain and DWT domain (taking “db4”wavelet as an example).It can be seen that the DCT coefficients of echo signal are mainly concentrated within low frequency range,and the coefficients with high-frequency range mainly represent noise.DWT coefficients are calculated and spliced according to wavelet decomposition order.The noise may not be sparsely represented in both DCT domain and DWT domain,as shown in Fig.2(d).Therefore,the NMR echo data has good sparsity,and the coefficients of noise can be eliminated by using soft and hard thresholds to achieve the noise suppression of echo data(Gu et al.,2021;Xie et al.,2014;Meng et al.,2015).However,the denoising method based on the fixed mathematical transformation methods will not meet the adaptivity for different types of NMR echo data detected from different samples,because it uses a fixed base matrix to conduct the sparse representation.It can suppress the noise to a certain extent but its ability to improve the quality of data and corresponding inversion accuracy may be limited.

The NMR echo data with random noise can be expressed as:

where,y is the noisy echo data with noise,x is the noiseless echo data,n is the random noise which is generally thermal noise with standard deviation of σ.

The 1D NMR echo data are normally acquired by CPMG pulse sequence,and each adjacent echoes are correlated.In order to fully extract the characteristics of NMR signal and ensure high-quality redundant dictionary and sufficient sparse representation,the noisy data y can be sampled into patches.Directly obtaining 1D patch data from y(as shown in Fig.3(a)),or firstly building the raw data y into an l×k matrix and then using a 2D patch operation scheme (as shown in Fig.3(b)),are alternative.After selecting a patch size of n×m (n,m≪l,k),the 1D patch data can be directly used to construct the training set.The 2D patch data should be firstly transformed into a column vector like 1D patch data and then used to construct the training set.It is noted that the overlapping area of each patches should be the maximum to achieve the best applications.Optionally,70% of the patches or the entire patches can be employed as the training set for dictionary learning.

If the denoised data X can be fully described through the sparse representation of each patch,the denoising problem of a complete natural signal can be expressed as (Elad and Aharon,2006):

here,λ is a constraint factor and related to the standard deviation σ of noise.μijis a control factor of residual errors and is related to local patch data.It obeys constraint Dαij-≤T,and can be processed implicitly in the process of sparse representation,which can be neglected.Rijindicates the operation of patch selection.The first term of Equation (8) constrains the proximity between noisy data Y and denoised data X.The second term of Equation (8) ensures the continuous optimization of sparse coefficients when solving the objective function.The third term constrains the proximity between patch data RijX and its sparse representation Dαij.The latter two terms jointly ensure that there is only limited error resulted from the sparse representation of each patch RijX in the denoised results.

The sparse representation of Equation (9) can be performed by employing orthogonal matching pursuit algorithm(OMP)to obtain the sparse coefficient αijof local patches.

Finally,when dictionary D and sparsity coefficient αijof local patches are well learned and calculated respectively,Equation (8)can be rewritten as Equation (10)

Fig.2.Sparsity of NMR echo data in DCT domain and DWT domain.(a)The demonstration of noisy echo data and noiseless data which is acquired by low-field NMR tools;(b)the DWT and DCT coefficient distribution of noiseless echo data;(c)the DWT and DCT coefficient distribution of noisy echo data;(d)the DWT and DCT coefficient distribution of noise.The DWT and DCT coefficient distribution of noise.

Fig.3.Schematic of local patch operation for dictionary learning.

The numerical solution of Equation (10) can be written as Equation (11).The purpose of Equation (11) is to average the overlappinge data pointss,and finally reconstruct the data to obtain denoised results (Elad and Aharon,2006).The scalar λ is a regularization parameter to give a weighted average which will work on the local patches that are less overlapped.If λ=0,there is no noisy signal will be averaged into denoised result.However,it is not possible for the noiseless reconstruction.In the 1D case for ours,Equation (11) represents the averages of each point on the NMR signal because the overlapped 1D patches are operated for dictionary learning.For reconstruction of denoised NMR signals in Equation (11),we select λ=Max(echo data)/(10*σ)which is selfadaptive for denoising NMR echo data rather than a fixed value.This choice is depended on the consideration that different types of NMR echo data have different noise level and signal amplitude.With the increment of noise level,small λ is better for the denoised results and vice versa.

The framework of improving denoising NMR data quality with dictionary learning is shown in Fig.4.

3.Numerical simulations

3.1.Forward model

Fig.4.Schematic of data processing framework for improving NMR data quality with using dictionary learning.

Fig.5.Simulation echo data and corresponding inverted T2 distributions with SNR of 6,10,15 and 20 respectively.

In order to verify the advantages of dictionary learning for improving NMR echo data,we constructed a bimodal T2distribution,as shown in Fig.5(a).The micro/nano pores are mainly developed in shale or tight sandstone reservoir rocks.NMR needs to measure fluid properties and effectively distinguish fluid components,such as high viscosity organic matter,bound water,movable oil and so on.Therefore,the T2values of the fluid components are assumed to be 10 ms and 150 ms respectively.Under the noiseless condition,we set the total porosity as 10 and the proportion of each component as 6.5 and 3.5,respectively.Considering that the shortest echo spacing of downhole NMR instruments employed in tight and complex shale/sandstone reservoir evaluation is 0.2 ms (Song and Kausik,2019),the number of echoes is set as 2500 and the total acquisition time is 500 ms to ensure sufficient decay of NMR echo data.

In the numerical simulation,the Gaussian white noise is added to the noiseless echo data of the above model,and the SNR of the noisy echo data is set as 6,10,15 and 20 respectively.The BRD inversion method is used to obtain T2distribution (Butler et al.,1981),and the S-curve method (Zou et al.,2016) is used to select the regularization factor.In order to conduct comparison,we fixed the regularization factor within the range from 0.01 to 10,and adaptively obtained a satisfactory smoothing factor with the Scurve algorithm.Fig.5 demonstrates the echo data and corresponding inversion results with different noise levels.The porosity values are 11.62 p.u.(SNR=6),10.26 p.u.(SNR=10),10.42 p.u.(SNR=15),and 9.89 p.u.(SNR=20) respectively.The root mean square error(RMSE)betweenT2distribution and forward model are 0.057 p.u.(SNR=6),0.039 p.u.(SNR=10),0.040 p.u.(SNR=15),and 0.027 p.u.(SNR=20) respectively.It can be seen that the inversion results are deviated from the desirable values under low SNR condition.Next,we use dictionary learning method to process synthetic noisy echo data.The first step is to adaptively obtain the most suitable dictionary,which can characterize NMR data with different noise levels.Subsequently,well-learned dictionary is used to achieve noise suppression and improve the resolution of the T2spectrum and the accuracy of porosity estimation.

3.2.Parameters setting for DL

Prior to dictionary learning,we need to build a training set.The training set can be composed of noiseless NMR echo data or noisy one.However,we cannot previously know the characteristics of noiseless NMR data in practice.Therefore,we directly use noisy NMR echo data for training dictionary.As mentioned above,in order to fully extract the characteristics of NMR echo data,we directly extract maximum overlapped 2D patches from the NMR echo data.The size of each patch is n×n and the sampling step-size is 1.If the NMR signal can be transformed into a 2D sampling matrix with N×K (as demonstrated in Fig.3(b)),the maximum number of patches is:

Fig.6.Simulation results of denoised results after dictionary learning processing.(a-1) to (a-5) demonstrate addressed echo data with SNR=6;(b-1) to (b-5) demonstrate addressed echo data with SNR=10;(c-1)to(c-5)demonstrate addressed echo data with SNR=15;(d-1)to(d-5)demonstrate addressed echo data with SNR=20.The panels of third and fourth row are demonstrated by 50 × 50 image from echo data,which is convenient for contrast.

Fig.7.Calculated SNR of denoised echo data and RMSE with different patches for different SNR data.(a) SNR=9;(b) SNR=15;(c) SNR=20.

Fig.8.Frequency statistics of calculated porosity and root-mean-square error(RMSE)from T2 distribution.Echo data with three types of noise level was synthesized,inverted and calculated under 1000 numerical simulations for repeated tests.

The training set can be randomly selected from the extracted patches.According to Equation(12),all samples in the training set are selected for dictionary learning.The initial dictionary(a matrix)can be constructed by any fixed analytical transformed base,or it can also be built from the randomly selected training signals.Since the dictionary is redundant,the number of atoms (the number of columns in the dictionary) must be greater than the dimension of atom(the number of rows in the dictionary),and the dimension of atom must be the same as the dimension of column vectors converted from patches.Therefore,the size of the dictionary is n×(q ×n),where q >1.

OMP algorithm can be used for both sparse representation and noise suppression,since noise is not sparse and will be filtered in the process of calculating residual.Therefore,we can use the sparse representation with sparsity constraint when learning noiseless data,where sparsity T=10 and calculation error ε=1× 10-6.When learning noisy data,we can use error constraint for sparse representation,and the calculation error needs to meet(Beckouche and Ma,2014):

C=1.15 is the noise gain factor,which is an important empirical value estimation derived from a large number of image tests,which can make the sparse representation more stable(Elad and Aharon,2006);σ is the noise standard deviation of NMR echo data,and the noise standard deviation of each patch is assumed approximately the same;n is the dimension of each patch;Equation(13)represents a sparse representation of each local patch data of the noisy signal.

In the simulation work,we directly use the NMR echo data with different noise levels (SNR=20,15,10,6) for dictionary learning.However,for NMR data with different noise levels,different patch dimensions can better ensure the effectiveness and reliability of learning.For NMR data with different SNR,we select the corresponding patch dimensions as 5 × 5,6 × 6,6 × 6 and 7 × 7 respectively,and set the dimensions of the dictionary as 25×100,36 × 144,36 × 144 and 49 × 196,respectively.The number of iterations of the dictionary learning is 30.The details will be introduced in the simulation part.

3.3.Simulation results

Fig.6 demonstrates the echo data processing results at different SNRs.After respective dictionary learning and denoising process,the BRD inversion processing is conducted to obtain the T2distribution.The panels of first row in Fig.6 illustrate the echo data and residual signal before and after noise suppression(residual_signal=y original-y_denoised,where y-original represents noiseless signal and y_denoised represents denoised signal).The second row demonstrates the dictionaries of different sizes corresponding to different noisy data obtained by dictionary learning;the third row demonstrates noisy data(converted into 50× 50 maps for comparison);the fourth row is the data after denoising,and the fifth row is the inversion result of the echo data after denoising.It can be seen from Fig.6 that the characteristics of NMR echo data with different noise levels can be extracted adaptively,indicated by different atomic components.After denoising,NMR data SNR is increased by 3 times at least.

However,the noise is very difficult to be suppressed in the first few echoes because the energy of NMR echo data is mainly concentrated in first few echoes.As can be seen from the first row of Fig.6,with the increment of noise level,the fluctuation of residual signal gets more stronger within the first 100 ms of NMR echo data,as well as described in Gu et al.(2021).Instead of setting first few echoes into zeros to avoid the energy loss of first few echoes during denoising,we directly use well-trained dictionary to suppress noise.The T2distribution of denoised echo data has higher resolution and accuracy than that before denoised.It is owed to the sufficient learning from local patches of signal,which provides a more robust dictionary to achieve a more reliable noise suppression and signal reconstruction.

Fig.9.Comparisons of T2 distributions at different repetitions for six tight core samples.Echo data with TR=256 and 512 is adopted for the standard T2 inversion as comparison.Dictionary learning is employed on the NMR echo data with TR=16,32,64.

The selection of patch size is very important for dictionary learning,as demonstrated in Fig.7.The blue curve in Fig.7 represents the improved SNRs of denoised echo data after dictionary learning and denoising process.The orange curve is RMSE(the expression of RMES is described in Equation(15))representing the inversion accuracy and estimating the similarity between inversion results inverted from denoised echo data and forward model.It is very interesting that denoised echo data with the higher SNR will not increase the accuracy of inversion results.If the higher SNRs is pursued,the larger patch size will result in the elimination of available echo signals and produce over-smoothing denoised results.This conclusion indicates that reasonable selection of patches will give a more accurate solution.In addition,the patch size is not more than 6 when SNR is larger than 9.The patch size optimized for SNR lower than 9 is fluctuated (the range may be from 5 to 13)because of the strong randomness of noise,which is not demonstrated here.In the later applications,we select patch size of 7 as a compromise to perform dictionary learning when SNR is lower than 9.

Next,we will consider the effects of the randomness of noise for inversion results.Dictionary learning ensures the stability of NMR data processing under different noise levels,which can be indicated by obtaining T2distribution with BRD inversion.Therefore,we have conducted 1000 repeated tests and recorded on the echo data with random noise before and after dictionary learning processing,and we conduct three steps at each test:dictionary learning,denoising and inversion.We use the total porosity φ=10 and the forward T2distribution as comparison.The deviation and the RMSE with the standard T2distribution are estimated.

Total porosity φ and RMSE are respectively:

where,N is the number of pre-distribution points when BRD inversion is used,N=128;f()is the amplitude of T2value of predistribution points obtained by inversion;f(T2i)is the amplitude of T2value corresponding to forward bimodal model.

Fig.8 shows that the inversion results of echo data at different noise levels (blue histogram marks represent the original noisy echo data,and orange histogram represents the echo data after dictionary learning processing).A total of 1000 repeated tests and statistics were conducted.The statistical results show that the porosity calculated from the noisy echo data and denoised echo data after the dictionary learning obey the Normal Distribution.However,the porosity distribution meets the standard porosity(φ=10) Normal Distribution for the echo data processed by dictionary learning.It can be found that the porosity is still random due to the noise effects on the first few echoes and accurately obtained with the increment of SNR.Whereas,the T2distributions are closer to the model under low SNR.It is indicated that more effective information can be retained adaptively after dictionary learning.The overall statistical results are shown in Table 1,and the porosity values φ and RMSE values are the average of 1000 repeated tests.

Table 2Amplitude calculated from data of NMR core analysis before and after employing DL,which are compared with results by performing higher repetitions.

Table 3Parameters of dictionary learning for different repetitions.

4.Application of DL on NMR rock core analysis and well logging data

In practice,the raw NMR echo data contains several types of noise,such as antenna noise,electronic circuit noise and possible external electromagnetic harmonic noise.Generally,it is necessary to increase the repetition to reduce the noise level.Firstly,we conduct core experiments to verify the advantages of dictionary learning in noise suppression.The 2 MHz NMR Core Analyzer(Magritek,NZ) is adopted to obtain NMR echo data of different types of tight rock cores.The echo spacing is 0.2 ms,the number of echoes is 2500,and the acquisition time is 500 ms for each scan.NMR measurements were conducted on three shale and three tight sandstone samples.As shown in Fig.9,core 1-3 are shale samples,and core 3-6 are tight sandstone samples.Shale samples are dry samples with some residual oil in the pores,while tight sandstone samples are saturated with brine water and centrifuged.In the core analysis experiment,we do not pay attention to the porosity of rock core,but the improvement of the quality of echo data with low SNRs by using dictionary learning.We compared the calculated area of T2distribution inverted from noisy echo data and denoised echo data.The unit demonstrated is the amplitude of measured voltage (μV),as shown in Table 2.The parameters of dictionary learning are demonstrated in Table 3.For all the experiments,the SNRs of 16 repetitions is larger than 8 so that we select the patch size of 6 according to instruction from simulations.

Fig.10.Processed results of NMR logging data using the proposed denoised method for Well 1.The T2 distributions through DL denoising exhibit more obvious bimodal peaks.

Fig.9 shows the T2distribution results obtained from core samples by NMR experiments.For each core,CPMG measurements with 16,32 and 64 repetitions are conducted respectively.Dictionary learning and denoising processing are conducted after each measurement,and then BRD method is used for inversion.The range of regularization parameters used in inversion is 0.01-10,and the regularization parameter with the smallest inversion residual norm is adaptively selected.In order to reveal the improvement,we use the echo data acquired with 256 and 512 repetitions as comparison group to verify the inverted results after dictionary learning processing.The high repetitions will produce echo data with high quality leading to more precise inversion results.It can be seen from Fig.9 that the echo data of shale and sandstone samples measured by using 16,32 and 64 repetitions can be well improved after dictionary learning and denoising,indicating that the characteristics of the echo data are represented by the well-trained dictionary and the noise is greatly suppressed.After inversion,the T2distribution inverted by using the reconstructed echo data has better resolution.The peak positions become more accurate,and the estimations of T2distribution area are effectively improved,as shown in Table 2 (when signal amplitude is calibrated into porosity,the area under T2distribution is the total porosity).However,it should be noted that due to the randomness of noise,the noise level of each measurement is different.Even if it can be suppressed by dictionary learning,the sparse representation of dictionary learning is still an approximate representation of the original signal,and the echo data disturbed by noise cannot be completely restored,which leads to a certain deviation in the inversion result compared to echo data acquired with higher repetitions.Furthermore,the small characterizations of signal could be eliminated during denoising process with tolerated errors,leading to certain components with small amplitude vanished.It is an interesting issue which will be studied in the future.In general,dictionary learning has a good ability to improve the quality of echo data under different noise conditions,as well as to improve the accuracy and resolution of inversion results by using commonly used inversion methods.

We also apply the dictionary learning to improve the quality of NMR logging data,as demonstrated in Fig.10.Well 1 is one of intervals in an oil tight sandstone reservoir,which is investigated by employing CMR instrument (Schlumberger Technology).The first track is the depth and formation interval of 30 m is selected as an example.The second track includes gamma ray(GR),spontaneous potential(SP)and caliper(CAL)curve.The formation interval is full of brine water mud and can be indicated by the SP curve.The third track demonstrates the raw echo data of NMR logging.The echo number is 1800 per depth point and the echo data is calibrated into porosity unit.The fourth track is the denoised echo data processed by employing dictionary learning.The fifth and sixth track is T2distribution inverted from raw data and denoised data by using the BRD method,respectively.The seventh track represents the porosity calculated from different methods.In this track,the black porosity curve is obtained from the raw echo data in second track;the red porosity curve is obtained from the echo data after dictionary learning and denoising processing in third track;the bottle green curve is obtained from conventional neutron-density logging,the blue dots represent the core porosity with gas measurement.The last track is the averaged atoms,which are used for the sparse representation of NMR echo data.The larger the averaged atom is,the more coefficients need to be used to represent NMR echo data.The SNR of the NMR measurements is ranged from 6 to 12 even though common depth points(CDP)stacking of 7 times is conducted.We conduct a variable scheme for the selection of patch size to meet the requirement of echo data with different SNR.For patch operation parameter,the patch size of 7 is selected for NMR data with SNR lower than 9,and of 6 is selected for NMR data larger than 9.The sparsity T of 15 and iteration of 30 are set as dictionary learning parameters.Only few seconds are cost for dictionary learning and denoising for each echo data.During inversion period,the regularization factor is also set within the range from 0.01 to 10.From T2distributions,it can be seen that the NMR echo data after dictionary learning shows good resolution.The porosity calculated from noisy and denoised echo data are almost the same,which indicates that there is no available signal eliminated during denoising process.The energy of first few echoes are maintained well and noise are suppressed through all the echo data.The trend of NMR porosity curve is similar and closed to the neutron-density porosity curve within tolerated error.The good agreement between the neutron-density porosity curve and core porosity dots indicates the accuracy of well logging.At last,the variation of averaged atoms demonstrated the adaptivity of dictionary learning for different types of NMR echo signals.The small atoms indicate the effective suppression of noise.

5.Conclusions

In this paper,we explored feasibility of employing dictionary learning and proposed a “data processing framework” to improve the quality of low-field NMR echo data.Dictionary learning is a machine learning method based on sparse representation theory.With dictionary learning,useful information in noisy NMR echo data can be adaptively extracted and reconstructed,and further improve the quality of raw echo data and the accuracy and stability of inversion results.We have verified the advantages and application effects of dictionary learning method with numerical simulations and applied it on NMR core analysis data and well logging data.Some conclusions can be drawn:

1) Dictionary learning has good adaptability to echo data at different noise levels,which can be reflected by adaptively learned dictionaries and varied averaged atoms.

2) The quality of raw echo data with low SNR can be improved by employing dictionary learning,which will further improve the accuracy and reliability of inversion results when common inversion methods are used.It is meaningful to the requirement of rapid NMR logging and laboratory analysis,since more accurate petrophysical parameters can be obtained with fewer averages of raw echo data.

3) The selection of patch size is very important and its effect is valuable to be studied,since it will affect the quality of signal reconstruction.For NMR echo data,small signal elimination will also result in the inaccuracy of inversion results.

Although the quality of NMR echo data after dictionary learning processing has been greatly improved,the conventional inversion method is essentially dependent on noisy signal and the uncertainty of numerical solution is still existed,which cannot be eliminated totally.How to infuse the response equation of NMR echo data into dictionary learning to further reduce the uncertainty of inversion results caused by noise disturbance,is our next research topic.

Acknowledgements

This paper is supported by Science Foundation of China University of Petroleum,Beijing(Grant Number ZX20210024),Chinese Postdoctoral Science Foundation (Grant Number 2021M700172),The Strategic Cooperation Technology Projects of CNPC and CUP(Grant Number ZLZX2020-03),and National Natural Science Foundation of China (Grant Number 42004105).