Disclosure of Invention
The invention aims to solve the technical problem of inversion of resistivity and thickness of stratum in front of a logging instrument by means of logging response of electromagnetic waves in azimuth while drilling in the logging while drilling process, and provides a logging while drilling forerunner stratum parameter inversion method based on a deep neural network.
The invention adopts the technical scheme that a resistivity inversion neural network and a stratum boundary inversion neural network are established, and the inverted stratum conductivity is used as priori information in the stratum boundary inversion process to improve the inversion precision of the stratum boundary, and the method comprises the following steps:
and S1, constructing a stratum model and a logging response data set. And establishing a three-layer forepoling stratum model, wherein the three-layer stratum model comprises an upper layer, a middle layer and a lower layer, a logging while drilling instrument is always arranged at the uppermost layer, and inversion is carried out on two layers of stratum parameters below. Calculating the logging response of the azimuth electromagnetic wave while drilling by adopting a one-dimensional forward algorithm, and forming a data set by stratum parameters and the logging response;
Step S2, preprocessing the generated sufficient response as a training set and label data of a neural network, wherein the preprocessing is used for accelerating training of a deep learning model, accelerating convergence and improving efficiency;
And step S3, constructing and training a resistivity inversion neural network. Based on the deep neural network, the logging response calculated by the one-dimensional positive algorithm is used as a data set, and the stratum resistivity is used as a label to train the resistivity inversion neural network. Debugging the resistivity inversion neural network after the training is finished, and adjusting parameters such as a network structure, a learning rate, a training period number and the like of the resistivity inversion neural network to enable the predicted value and the label error of the resistivity inversion neural network to be as small as possible;
And S4, constructing and training a stratum boundary inversion neural network. Based on a deep neural network, training the formation boundary inversion neural network by using a logging response and formation resistivity calculated by a one-dimensional forward algorithm as a data set and using a formation boundary label, debugging the formation boundary inversion neural network after the formation boundary inversion neural network is trained, and enabling the prediction value and label error of the formation boundary inversion neural network to be as small as possible by adjusting parameters such as a network structure, a learning rate and a training period number of the resistivity inversion neural network;
Step S5, generating a simulated stratum, firstly inputting a logging response corresponding to the simulated stratum into a resistivity inversion neural network to obtain a predicted resistivity, then inputting the logging response and the resistivity predicted by the resistivity inversion neural network into a stratum boundary inversion neural network together, performing joint inversion by using the resistivity inversion neural network and the stratum boundary inversion neural network, and finally drawing a stratum image according to the resistivity and the stratum boundary of the inversion.
The method has the beneficial effects that the rapid high-precision inversion of the electromagnetic wave front of the azimuth while drilling to the logging is realized through the electromagnetic wave front detection inversion method of the azimuth while drilling based on the deep learning. The logging response data and the stratum parameters obtained by the one-dimensional forward algorithm are used for training a deep learning model of the stratum resistivity and the boundary, and the inversion accuracy is improved by inverting the resistivity first and then taking the resistivity as prior information into a stratum boundary inversion neural network, so that a stratum apparent resistivity image is drawn, and reliable geosteering decision guidance is provided for logging. The invention can not depend on priori information of the initial stratum model, and the inversion speed can meet the real-time operation requirement.
Detailed Description
The embodiment discloses a logging while drilling forerunner stratum parameter inversion method based on a deep neural network. When logging while drilling and advancing, as the logging instrument is drilled, the resistivity of the current stratum where the logging instrument is positioned is directly measured, and as known, the upper boundary position and conductivity information of two strata below the stratum where the logging instrument is positioned need to be inverted.
In the inversion process of the stratum parameters of forward detection, the inversion accuracy is improved by adopting inversion resistivity firstly and then adding the inverted resistivity as priori information into the inversion process of the stratum boundaries, which is different from synchronous inversion of resistivity and stratum boundaries. The trained inversion model is utilized, real-time forward stratum parameter inversion can be carried out on the azimuth electromagnetic wave while drilling measured by the logging instrument under the condition that stratum priori information is not needed, and therefore a worker can conveniently and accurately and timely distinguish stratum information in front of the logging instrument according to inversion imaging.
A forward logging stratum parameter inversion method based on a deep neural network comprises the following steps:
And S1, establishing an azimuth electromagnetic wave front detection model while drilling as shown in FIG. 1. The stratum model is set to be a three-layer stratum model, namely stratum 1, stratum 2 and stratum 3 are sequentially arranged from top to bottom, and the conductivity corresponding to each stratum model is sigma1、σ2 and sigma3. The logging instrument located on the drilling instrument is always at the uppermost layer of the model, i.e. the formation where the logging instrument is currently located is formation 1, also referred to as the current formation. The position of the logging instrument is the original coordinate position Z0 =0 of the model, the resistivity of the stratum 1 is known, the electromagnetic wave logging response is obtained through the receiving and transmitting antenna on the logging instrument, and the conductivity and the boundary position of the next layer and the next two layers of the current stratum are inverted according to the electromagnetic wave logging response. The current stratum is stratum 1, the stratum 2 is the stratum next to the current stratum, and the stratum 3 is the stratum next to the current stratum. The formation boundary position is represented by the distance of the upper boundary of the formation from the logging tool. What is needed to be inverted is the conductivity of formation 2 from formation 3 and the distance Z0 of the upper boundary of formation 2 from formation 3. The difference between the upper boundary position Z2 of formation 3 and the upper boundary position Z1 of formation 2 yields the thickness of formation 2, i.e., the thickness of the formation that is the current layer of the formation.
Fig. 2 shows a dynamic while-drilling azimuth electromagnetic wave front detection model, in which a logging instrument is omitted and replaced by a dashed line with y=0, and the logging instrument can be spliced from left to right as inversion results at a plurality of moments, that is, from left to right, the logging instrument is closer to a stratum below along with the time, and the dynamic while-drilling azimuth electromagnetic wave front detection model can test inversion results of the logging instrument at different distances from the stratum in front.
And S2, constructing a data set for training. The well logging response of given stratum parameters is calculated by adopting a one-dimensional forward algorithm, and a data set is formed by the well logging response and the stratum parameters, wherein the one-dimensional forward algorithm is forward calculation of the response of an electromagnetic wave resistivity logging instrument along with the drilling in a multi-layer medium, and is specifically used for solving a problem aiming at a Maxwell equation set in an anisotropic medium, and based on a Hertz potential function, an interface amplitude is introduced, so that the deducing process of electromagnetic wave propagation is completely converged. Formation parameters include formation resistivity and formation boundary locations. The value range of the formation resistivity is 1-100 omega ּ m, and the value range of the formation boundary position is 0.5-12 m. The dataset consisted of 20 ten thousand sets of data, each set of data comprising 3 formation resistivity values, 2 formation boundary locations, and 24 log response values corresponding to the set of formation parameter values. In the training process of the resistivity inversion neural network, the logging response is used as training data, the resistivity is used as a label, and in the training process of the stratum boundary inversion neural network, the logging response and the resistivity are used as training data, and the stratum boundary position is used as a label.
And step S3, data preprocessing is carried out on the data set. The preprocessing can enable data distribution in the data set to be more reasonable, enable the neural network to be capable of fitting targets better, quicken convergence, and improve training efficiency and effect. In the embodiment, the formation resistance is firstly inverted to obtain conductivity, then 10 base logarithms are taken to reduce the difference in data orders, the resistivity is converted into conductivity-2~0 from the resistivity range of 1-100 omega ּ m, and then standard normalization treatment is carried out; the order of magnitude difference of the stratum boundary position is smaller, so that standard normalization processing is directly carried out on the stratum boundary position, the order of magnitude difference of 24 logging response data is larger, and the distribution is uneven, so that the logging response is subjected to column normalization processing, and normalization is carried out according to the respective maximum value and minimum value of 24 column logging responses, so that the distribution is more reasonable. By carrying out different data preprocessing on resistivity, stratum boundary position and logging response, a data set for neural network training can be more reasonable in numerical distribution, the convergence process of the neural network training is quickened, and a more reliable and efficient data base is provided for subsequent training and analysis.
And S4, establishing a resistivity inversion neural network model shown in FIG. 3. The model has 8 layers in total, and the structure of the model sequentially comprises an input layer, a first full-connection layer, a first normalization layer, a second full-connection layer, a second normalization layer, a third full-connection layer, a third normalization layer, a fourth full-connection layer, a fourth normalization layer, a fifth full-connection layer, a fifth normalization layer, a sixth full-connection layer, a sixth normalization layer and an output layer. The parameters of each layer are 24 units of input layers corresponding to 24 logging responses, 4096 units of the first full-connection layers, 4096 units of the fourth full-connection layers and batches of normalization layers of the first full-connection layers, 2048 units of the second full-connection layers, 2048 units of the third full-connection layers, 2048 units of the six full-connection layers and 2 units of output layers corresponding to 2 stratum conductivities to be inverted. The activating functions used by the first full-connection layer and the output layer are Sigmoid functions, and the activating functions used by all other layers are ReLU functions.
And S5, training the constructed resistivity inversion neural network by using the preprocessed data set. As shown in fig. 4, which is a schematic diagram of a training process of the resistivity inversion neural network, the logging response obtained in step S2 is obtained by preprocessing the logging response in step S3, the logging response is used as training data, the resistivity is used as a label, the training data and the label are input into the resistivity inversion neural network constructed in step S4, the resistivity inversion neural network outputs the predicted resistivity as an inversion result, and the training process of the resistivity inversion neural network is constrained by calculating the error between the predicted resistivity and the resistivity of the label. The training compiling environment is Python3.11.5, pytorch is adopted as a deep learning frame, batchsize is 8192 in the training process, an Adam optimizer is adopted for training, a loss function adopts a mean square error function of predicted resistivity and tag resistivity values of a neural network, the initial learning rate is 0.001, the learning rate reduction factor is 0.85, when the model loss function is not reduced after 100 epochs, the learning rate is reduced to be 0.85 times currently, and a trained resistivity inversion neural network is obtained after 3000 epochs are trained.
And S6, establishing a boundary inversion neural network model shown in FIG. 5. The neural network model comprises 8 layers in total, and has the structure of an input layer, a first full-connection layer, a first normalization layer, a second full-connection layer, a second normalization layer, a third full-connection layer, a third normalization layer, a fourth full-connection layer, a fourth normalization layer, a fifth full-connection layer, a fifth normalization layer, a sixth full-connection layer, a sixth normalization layer and an output layer in sequence. The parameters of each layer are set to 27 units for the input layer, corresponding to 24 logging responses and 3 formation resistivity, 4096 units for the first full-connection layer, 4096 units for the fourth full-connection layer, 2048 units for the second full-connection layer, 2041024 units for the fifth full-connection layer and 1024 units for the batch normalization layer, and 2 units for the output layer, corresponding to 2 formation boundary positions to be inverted. The activation functions used by the first and fourth full-connection layers are Sigmoid functions, and the activation functions used by all other layers are ReLU functions.
Step S7, as shown in FIG. 6, which is a schematic diagram of a boundary inversion neural network training process, the logging response and the resistivity in the preprocessed data set are used as training data, the stratum boundary position is used as a label to be input into the boundary inversion neural network constructed in the step S6, the boundary inversion neural network outputs the predicted stratum boundary position as an inversion result, and the boundary inversion neural network training process is constrained by calculating the error between the predicted stratum boundary position and the label stratum boundary position. The training compiling environment is Python3.11.5, pytorch is adopted as a deep learning frame, a loss function adopts a mean square error function of a neural network prediction stratum boundary and a label boundary value, the initial learning rate in the training process is 0.002, the learning rate reduction factor is 0.9, when the model loss function is not reduced after 100 epochs, the learning rate is reduced to be 0.9 times of the current, 3000 epochs are trained altogether, batchsize is 8192, and an optimizer adopts an Adam optimizer for training.
And S8, testing. After the resistivity inversion neural network and the boundary inversion neural network are trained, a joint inversion flow in an actual use process is shown in fig. 7, a logging instrument inputs a currently received logging response into the trained resistivity inversion neural network, the resistivity inversion neural network outputs predicted resistivity, then inputs the received logging response and the predicted resistivity into the boundary inversion neural network, the boundary inversion neural network outputs predicted stratum boundary positions, and finally a stratum image is drawn together according to the predicted resistivity and the stratum boundary positions. To intuitively verify the effect of the trained inversion neural network, we constructed a simulated forensic model as in fig. 8 (a) and fig. 9 (a), and performed joint inversion as described in fig. 7. The forerunner model of the reverse is shown in fig. 8 (b) and fig. 9 (b), and it can be seen that for a simulated formation, the forerunner model of the reverse is substantially identical to a given simulated formation. In the practical application process, the received electromagnetic wave logging response is input into a trained physical driving neural network, the deep learning model can output the resistivity and interface position information of the current stratum, and finally the resistivity imaging of the stratum is obtained.